This repository has been archived by the owner on Mar 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve GUI state machine API, remove experimental DSL and applicatio…
…n REST support #1 #4 - Store descriptors per state and define getDescriptors in the trait State. - Fix comment about legacy code. - Add State.addTransition. - Remove all the DSL code which was experimental. - Remove all the REST applications/test suites code which was experimental. - Move model into rest.model. - Adapt unit tests.
- Loading branch information
Showing
52 changed files
with
291 additions
and
682 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/scala/de/retest/guistatemachine/api/GuiStateMachineApi.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package de.retest.guistatemachine.api | ||
|
||
trait GuiStateMachineApi { | ||
|
||
/** | ||
* Creates a new [[GuiStateMachine]]. | ||
* @return The new GUI state machine. | ||
*/ | ||
def createStateMachine: GuiStateMachine | ||
|
||
/** | ||
* Removes a persisted [[GuiStateMachine]]. | ||
* @param stateMachine The persisted GUI state machine. | ||
* @return True if it has been persisted before and is no remove. Otherwise, false. | ||
*/ | ||
def removeStateMachine(stateMachine: GuiStateMachine): Boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/scala/de/retest/guistatemachine/api/impl/GuiStateMachineApiImpl.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package de.retest.guistatemachine.api.impl | ||
|
||
import de.retest.guistatemachine.api.GuiStateMachineApi | ||
import de.retest.guistatemachine.api.GuiStateMachine | ||
|
||
import scala.collection.mutable.HashSet | ||
|
||
object GuiStateMachineApiImpl extends GuiStateMachineApi { | ||
// TODO #4 Use Persistence instead of a custom set? | ||
val stateMachines = new HashSet[GuiStateMachine] | ||
|
||
override def createStateMachine: GuiStateMachine = { | ||
val r = new GuiStateMachineImpl | ||
stateMachines += r | ||
r | ||
} | ||
|
||
override def removeStateMachine(stateMachine: GuiStateMachine): Boolean = stateMachines.remove(stateMachine) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/main/scala/de/retest/guistatemachine/dsl/FinalState.scala
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/main/scala/de/retest/guistatemachine/dsl/InitialState.scala
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
50 changes: 0 additions & 50 deletions
50
src/main/scala/de/retest/guistatemachine/dsl/StateMachine.scala
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
src/main/scala/de/retest/guistatemachine/dsl/StateMachines.scala
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
src/main/scala/de/retest/guistatemachine/dsl/Transition.scala
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/main/scala/de/retest/guistatemachine/dsl/UnknownState.scala
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.