Skip to content

Commit

Permalink
maintaining stvs
Browse files Browse the repository at this point in the history
  • Loading branch information
wadoon committed Feb 23, 2025
1 parent 13e44a5 commit 5c2d32a
Show file tree
Hide file tree
Showing 16 changed files with 11 additions and 1,190 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package edu.kit.iti.formal.stvs.logic.examples
import java.net.URL

/**
* This class represents an loadoable example.
* This class represents a loadoable example.
*
*
* You should derive this to add a new example to the system.
Expand All @@ -30,9 +30,9 @@ data class Example(
var description: String,

/**
* The name of the html page to loaded.
* The name of the HTML page to load.
*
* @return a String if there is one html page or null.
* @return a String if there is one HTML page or null.
*/
var htmlHelp: String?,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import edu.kit.iti.formal.stvs.model.StvsRootModel
import edu.kit.iti.formal.stvs.model.config.GlobalConfig
import edu.kit.iti.formal.stvs.model.config.History
import edu.kit.iti.formal.stvs.view.common.AlertFactory
import edu.kit.iti.formal.stvs.view.menu.StvsRibbonController
import edu.kit.iti.formal.stvs.view.menu.StvsToolbarController
import javafx.application.Platform
import javafx.beans.property.BooleanProperty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ import edu.kit.iti.formal.stvs.model.code.*
import edu.kit.iti.formal.stvs.model.code.ParsedCode.Companion.parseCode
import edu.kit.iti.formal.stvs.model.config.GlobalConfig
import edu.kit.iti.formal.stvs.view.*
import edu.kit.iti.formal.stvs.view.editor.EditorPane
import javafx.application.Platform
import javafx.beans.value.ChangeListener
import javafx.beans.value.ObservableValue
import javafx.concurrent.Task
import javafx.event.ActionEvent
import javafx.event.Event
import javafx.event.EventHandler
import javafx.scene.control.*
Expand All @@ -22,9 +18,7 @@ import org.kordamp.ikonli.fontawesome5.FontAwesomeSolid
import org.kordamp.ikonli.javafx.FontIcon
import java.time.Duration
import java.util.*
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
import java.util.function.Consumer

/**
* Created by csicar on 09.01.17. Some parts are inspired by examples of the used library:
Expand Down Expand Up @@ -182,7 +176,7 @@ class EditorPaneController(val code: Code, private val globalConfig: GlobalConfi
// different character count than this CodeArea.
spansBuilder.add(
getStyleClassesFor(token, syntaxErrors),
token!!.text.replace("\\r".toRegex(), "").length
token.text.replace("\\r".toRegex(), "").length
)
}
return spansBuilder.create()
Expand Down Expand Up @@ -228,13 +222,4 @@ class EditorPaneController(val code: Code, private val globalConfig: GlobalConfi
private fun handleTextChange(highlighting: StyleSpans<Collection<String>>) {
view.setStyleSpans(highlighting)
}

private inner class ShowLineNumbersListener : ChangeListener<Boolean> {
override fun changed(
observableValue: ObservableValue<out Boolean>,
oldValue: Boolean, newValue: Boolean
) {
view.setShowLineNumbers(newValue)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import javafx.beans.property.IntegerProperty
import javafx.beans.property.LongProperty
import javafx.beans.property.ObjectProperty
import javafx.beans.property.StringProperty
import javafx.collections.FXCollections
import javafx.scene.control.*
import javafx.scene.control.Alert.AlertType
import javafx.util.Callback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,25 @@ import javafx.scene.layout.GridPane
import javafx.scene.text.Text

/**
*
*
* The view for a config dialog. Includes numerous text fields, checkboxes and number text fields
* that match the fields of a [edu.kit.iti.formal.stvs.model.config.GlobalConfig].
*
*
*
*
* Created by csicar on 11.01.17.
*
*
* @author Carsten Csiky
*/
class ConfigDialogPane : DialogPane() {
val nuxmvFilename: FileSelectionField = FileSelectionField()
val z3Path: FileSelectionField = FileSelectionField()
val getetaCommand: TextField = TextField()
val maxLineRollout: PositiveIntegerInputField = PositiveIntegerInputField()
val verificationTimeout: PositiveIntegerInputField = PositiveIntegerInputField()
val simulationTimeout: PositiveIntegerInputField = PositiveIntegerInputField()
val editorFontSize: PositiveIntegerInputField = PositiveIntegerInputField()
val editorFontFamily: TextField = TextField()
val showLineNumbers: CheckBox = CheckBox()
val uiLanguage: ComboBox<String?> = ComboBox()
val okButtonType: ButtonType = ButtonType("Save", ButtonBar.ButtonData.OK_DONE)

/**
*
*
* Creates the view for a config dialog.
*
*
*
*
* Text fields and checkboxes have to be initialized from a
* [edu.kit.iti.formal.stvs.model.config.GlobalConfig] model. For that, use the
* [ConfigDialogManager].
Expand All @@ -53,7 +38,6 @@ class ConfigDialogPane : DialogPane() {
init {
this.buttonTypes.addAll(okButtonType, ButtonType.CANCEL)


val grid = GridPane()
grid.hgap = 10.0
grid.vgap = 10.0
Expand All @@ -71,27 +55,12 @@ class ConfigDialogPane : DialogPane() {
grid.add(Label("Editor Font Family"), 0, 3)
grid.add(editorFontFamily, 1, 3)

grid.add(Label("Show Line Numbers"), 0, 4)
grid.add(showLineNumbers, 1, 4)

grid.add(Label("User Interface Language"), 0, 5)
grid.add(uiLanguage, 1, 5)


grid.add(Label("Path to NuXmv Executable"), 0, 6)
grid.add(nuxmvFilename, 1, 6)


grid.add(Label("Path to Z3"), 0, 7)
grid.add(z3Path, 1, 7)

grid.add(Label("GeTeTa Command"), 0, 9)
grid.add(getetaCommand, 1, 9)
val getetaCommandDescription =
Text("Use \${code} and \${spec} for code and specification" + " filename substitution.")
getetaCommandDescription.style = "-fx-font-style: italic"
grid.add(getetaCommandDescription, 0, 10, 2, 1)

grid.add(Label("Maximum Number of Rollouts per Line"), 0, 11)
grid.add(maxLineRollout, 1, 11)
this.content = grid
Expand Down

This file was deleted.

Loading

0 comments on commit 5c2d32a

Please sign in to comment.