All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.unibo.tuprolog.argumentation.ui.gui.Arg2pIdeApplication.kt Maven / Gradle / Ivy

The newest version!
package it.unibo.tuprolog.argumentation.ui.gui

import it.unibo.tuprolog.argumentation.actor.libs.ActorSolver
import it.unibo.tuprolog.argumentation.core.Arg2pSolver
import it.unibo.tuprolog.ui.gui.TuPrologIDEBuilder
import javafx.application.Application
import javafx.stage.Stage
import kotlin.system.exitProcess

class Arg2pIdeApplication : Application() {
    override fun start(stage: Stage) {
        try {
            val arg2p = Arg2pSolver.default(staticLibs = emptyList(), dynamicLibs = listOf(ActorSolver()))
            TuPrologIDEBuilder(stage)
                .title("Arg-tuProlog IDE")
                .customLibraries(arg2p.to2pLibraries().libraries)
                .customTabs(
                    listOf(
                        ArgumentationGraphFrame.customTab().also { it.tab.id = "arg-graph" },
                        FlagManagerFrame.customTab(arg2p.to2pLibraries().libraries.toList()).also { it.tab.id = "arg-flags" },
                    ),
                )
                .show()
        } catch (e: Throwable) {
            e.printStackTrace()
            throw Error(e)
        }
    }

    override fun stop() {
        exitProcess(0)
    }

    companion object {
        @JvmStatic
        fun main(args: Array) {
            launch(Arg2pIdeApplication::class.java)
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy