Skip to content

Commit

Permalink
Didnt come up with anything better than stash and reset
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorFilimonov committed Oct 9, 2024
1 parent 2235480 commit a0104e2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,3 @@ the following classifiers are supported: `win`, `linux`, `mac`, `win-x86`, `linu
## License

The Automata Constructor is licensed under the Apache-2.0 license, as detailed in the [LICENSE](LICENSE) file.


Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class HellingsAlgoController(
it.rightSide.size == 1 && it.rightSide[0] is Terminal && it.rightSide[0].getSymbol() == transition.propetiesText
}
productions.forEach {
val newHellingsTransition = HellingsTransition(it.leftSide, transition.source,
val newHellingsTransition = HellingsTransition(
it.leftSide, transition.source,
transition.target, SimpleBooleanProperty(false)
)
currentTransitions.add(newHellingsTransition)
Expand All @@ -52,7 +53,8 @@ class HellingsAlgoController(
}
if (grammar.productions.any { it.leftSide == grammar.initialNonterminal && it.rightSide.isEmpty() }) {
openedAutomaton.vertices.forEach {
val newHellingsTransition = HellingsTransition(grammar.initialNonterminal, it, it,
val newHellingsTransition = HellingsTransition(
grammar.initialNonterminal, it, it,
SimpleBooleanProperty(false)
)
currentTransitions.add(newHellingsTransition)
Expand All @@ -66,10 +68,12 @@ class HellingsAlgoController(
val allTransitions = observableListOf<HellingsTransition>()
prepareForExecution(currentTransitions, allTransitions)

val hellingsAlgoExecutionWindow = find<HellingsAlgoExecutionView>(mapOf(
HellingsAlgoExecutionView::currentTransitions to currentTransitions,
HellingsAlgoExecutionView::allTransitions to allTransitions
)).apply { title = I18N.messages.getString("HellingsAlgorithm.Execution.Title") }
val hellingsAlgoExecutionWindow = find<HellingsAlgoExecutionView>(
mapOf(
HellingsAlgoExecutionView::currentTransitions to currentTransitions,
HellingsAlgoExecutionView::allTransitions to allTransitions
)
).apply { title = I18N.messages.getString("HellingsAlgorithm.Execution.Title") }
hellingsAlgoExecutionWindow.openWindow()
find<CFGView>(mapOf(CFGView::grammar to grammar)).apply {
title = I18N.messages.getString("CFGView.Title")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
package automaton.constructor.view

import automaton.constructor.model.element.AutomatonVertex
import automaton.constructor.model.element.BuildingBlock
import automaton.constructor.model.module.hasProblems
import automaton.constructor.model.module.hasProblemsBinding
import automaton.constructor.utils.I18N
import automaton.constructor.utils.Setting
import automaton.constructor.utils.SettingGroup
import javafx.beans.property.SimpleIntegerProperty
import javafx.beans.property.SimpleStringProperty
import javafx.scene.control.CheckBox
import javafx.scene.control.TextField
import javafx.scene.paint.Color
import tornadofx.*

open class AutomatonBasicVertexView(val vertex: AutomatonVertex) : AutomatonElementView(vertex) {
Expand Down
8 changes: 6 additions & 2 deletions src/main/kotlin/automaton/constructor/view/AutomatonView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,18 @@ class AutomatonView(val automaton: Automaton, automatonViewContext: AutomatonVie
label {
isWrapText = true
layoutXProperty().bind(this@AutomatonView.widthProperty() - widthProperty() - 10.0)
maxWidthProperty().bind(this@AutomatonView.widthProperty() - settingsEditor.widthProperty() - 20.0)
val tabWidth = 700.0
maxWidthProperty().bind(this@AutomatonView.widthProperty() - tabWidth - 20.0)
maxHeight = 30.0
font = Font.font(16.0)
textProperty().bind(automaton.descriptionBinding)
visibleWhen(automaton.isOutputOfTransformationProperty.booleanBinding { it == null })
}
label {
layoutXProperty().bind(this@AutomatonView.widthProperty() - widthProperty() - 10.0)
layoutYProperty().bind(this@AutomatonView.heightProperty() - heightProperty())
layoutYProperty().bind(this@AutomatonView.heightProperty() - heightProperty() - 45.0)
val buttonsWidth = 700.0
maxWidthProperty().bind(this@AutomatonView.widthProperty() - buttonsWidth - 20.0)
font = Font.font(16.0)
textFill = Color.DARKRED
textAlignment = TextAlignment.RIGHT
Expand Down

0 comments on commit a0104e2

Please sign in to comment.