Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
d102d01
WIP: Merging Ecdar 2.2 simulator into main
Nielswps Jul 12, 2022
a5b558c
WIP: Compiling system with functionalities from Main working (simulat…
Nielswps Jul 13, 2022
e0a5109
WIP: Design updated for simulator and side panes logic/naming updated…
Nielswps Jul 13, 2022
7319c9b
WIP: ProtoBuf messages updated and implementation of these into the G…
Nielswps Jul 13, 2022
260dd22
Minor clean up
Nielswps Jul 13, 2022
e084250
WIP: Spacing for trace and transition headers added
Nielswps Jul 13, 2022
14e6631
WIP: BackendDriver usage for simulation started
Nielswps Jul 14, 2022
8a88c62
WIP: Components can be shown within the simulator
Nielswps Jul 14, 2022
a22f559
ProtoBuf messages updated and no longer used messages commented out o…
Nielswps Jul 15, 2022
4f07556
TestFX added and protos updated
Nielswps Jul 15, 2022
e7d6f93
JUnit5 upgrade
Nielswps Jul 15, 2022
17edbc6
Comment updated in preparation for query implementation in simulator …
Nielswps Aug 9, 2022
7a9a04e
WIP: Toggle for GUI mode added (sizing of toggle not working)
Nielswps Aug 19, 2022
49d216f
WIP: Dialog for initializing simulation added
Nielswps Aug 22, 2022
848fc69
Show tooltip when query was unsuccessful
APaludan Sep 22, 2022
28fb8f7
replacement af >= <= med deres unicode
jhbengtsson Sep 22, 2022
0086c97
Modify getter of query, such that it complies with the backend expect…
EmilieSonne Sep 22, 2022
4ded5e7
Refinement symbol replaced with unicode in dropdown
jhbengtsson Sep 22, 2022
b0028ec
fix typo
APaludan Sep 26, 2022
a1bed78
unittest af getQuery();
jhbengtsson Sep 26, 2022
03aac31
changeRefinementSymbols added to display >= and <= correctly
jhbengtsson Sep 29, 2022
4238fb6
refactoring
APaludan Sep 30, 2022
6297e2e
ikke længere i en funktion men direkte i changelistener
jhbengtsson Oct 3, 2022
4ed3820
Merge pull request #26 from Ecdar-SW5/error-messages
APaludan Oct 3, 2022
568df22
to static metoder på query.java til at replace refinement og unicode …
jhbengtsson Oct 5, 2022
2adb417
Merge pull request #22 from Ecdar-SW5/ValidateChangeQueryText
jhbengtsson Oct 5, 2022
5e25f84
Update QueryPresentation.fxml
WassawRoki Oct 5, 2022
4a95a24
center query icons
APaludan Oct 5, 2022
87e6bc9
Merge pull request #30 from Ecdar-SW5/21-5-width-of-query-symbolicon-…
Ibra4i Oct 5, 2022
baa1b68
When ENTER is pressed, we check if a query type has been selected bef…
EmilieSonne Oct 5, 2022
2b3d396
Simulator merge
Nielswps Oct 11, 2022
8149c93
Simulator (#35)
Nielswps Oct 13, 2022
e46356b
WIP: ''Fix'' to allow for compilation
Nielswps Oct 13, 2022
212d215
Merge remote-tracking branch 'SW5/5-20-simulation-and-debugging' into…
Nielswps Oct 13, 2022
1775466
Merge branch 'Ecdar-SW5-5-20-simulation-and-debugging' into simulator
Nielswps Oct 13, 2022
9a76f3a
Merge pull request #36 from Nielswps/simulator
jhbengtsson Oct 13, 2022
c2634a3
align with condition for disabling action button
EmilieSonne Oct 13, 2022
a824223
Hide generated component tab if there are no generated components (#31)
jhbengtsson Oct 13, 2022
1695dd5
Merge pull request #33 from Ecdar-SW5/19-it-should-not-be-possible-to…
jhbengtsson Oct 14, 2022
d92fe7d
first try
WassawRoki Oct 25, 2022
9dcbd83
Update .gitmodules
APaludan Oct 25, 2022
bcc3fce
send query requests with new grpc protocol
APaludan Oct 25, 2022
a8a9846
more work on grpc protocol
APaludan Oct 27, 2022
f99bd9f
The popup will no longer be place outside the window
WassawRoki Oct 27, 2022
8b8bcbf
WIP: Refactoring of BackendDriver started and almost done (query exec…
Nielswps Oct 27, 2022
b89c943
WIP: Query execution FIXED
Nielswps Oct 28, 2022
852c024
more simulation work
APaludan Oct 28, 2022
e07c6f3
Update QueryPresentation.java
WassawRoki Oct 28, 2022
83aed20
WIP: Minor changes
Nielswps Nov 1, 2022
6bb427a
WIP: Merge started - Backend communication failes due to missing Igno…
Nielswps Nov 1, 2022
011c89c
Moved SimulationHandler
Nielswps Nov 1, 2022
622dbb4
getComponentsInfoBuilder changed to require string instead of query t…
Nielswps Nov 1, 2022
2a4a213
Merge pull request #45 from Nielswps/be_refac-sw5-merge
APaludan Nov 3, 2022
808652d
We might have it
WassawRoki Nov 3, 2022
a8bfef6
Clena up
WassawRoki Nov 3, 2022
a2828cd
WIP - Consume state in failing query
Sigurd00 Nov 3, 2022
a81776c
Merge pull request #43 from Ecdar-SW5/querry-dropdown-scroolable
WassawRoki Nov 3, 2022
050ba26
review fixes
WassawRoki Nov 3, 2022
0b8e3c3
initialize sim
APaludan Nov 3, 2022
e00cfad
det virker en lille smule nu
APaludan Nov 4, 2022
5a8c2e1
Merge pull request #52 from Ecdar-SW5/Visual-part-of-simu
WassawRoki Nov 4, 2022
464e4df
Update SimulationHandler.java
APaludan Nov 4, 2022
aec2144
Now sets failing location for all locations in the response
Sigurd00 Nov 4, 2022
0fe1a53
Merge branch '5-20-simulation-and-debugging' into new-grpc-protocol
jhbengtsson Nov 4, 2022
06a92be
Merge pull request #56 from Ecdar-SW5/new-grpc-protocol
jhbengtsson Nov 4, 2022
bbcc2ee
Variante, nickname sign replacenment
Ibra4i Oct 28, 2022
b8c9e5e
Re-replace unicode to <= and >= before serializing
EmilieSonne Oct 28, 2022
2610d4f
Replace Signes to guard fields
Ibra4i Nov 4, 2022
820e900
lav static class to refactor code (using two methods only)
EmilieSonne Nov 4, 2022
60d9856
Use StringHelper for queries
EmilieSonne Nov 4, 2022
32cb668
Refacorizing Guard/Invarient code
Ibra4i Nov 4, 2022
4282b1a
Ooops!
Ibra4i Nov 4, 2022
3af1435
StringHelperTest
Ibra4i Nov 4, 2022
c6b8485
Parameterized test
EmilieSonne Nov 4, 2022
2c3a197
Parameterized test af convert unicode to symbol
EmilieSonne Nov 4, 2022
629affb
minor fixes for PR
EmilieSonne Nov 4, 2022
02e3d5b
Deleted
Ibra4i Nov 4, 2022
b08d731
Make parameterized tests run with gradle
mads256h Nov 7, 2022
82f2969
Paint locations red on failure response.
Sigurd00 Nov 4, 2022
bcab567
Reset color and failing state on new query.
Sigurd00 Nov 7, 2022
37457e3
displays failure message, still needs component name
Nov 7, 2022
550758a
Fixed java.util.ConcurrentModificationException
Sigurd00 Nov 7, 2022
02e6422
Modified build.gradle, fixes java.lang.illegalAccessError
Nov 7, 2022
9c50f14
Revert "Modified build.gradle, fixes java.lang.illegalAccessError"
Nov 7, 2022
0f6f498
Remove unused imports and fields
Sigurd00 Nov 7, 2022
b1b90bc
QueryPanel Checkmark enabled in View Dropdown
VictorDore Nov 8, 2022
f223e71
Documentation for public methods
Sigurd00 Nov 8, 2022
e30c77a
Change get for each response
Sigurd00 Nov 8, 2022
6b21244
Merge pull request #64 from Ecdar-SW5/querypanel-check
VictorDore Nov 8, 2022
15866b5
Initial work on painting failing actions
Sigurd00 Nov 8, 2022
a39b1af
Refactor observer so it is added in the edge presentation.
Sigurd00 Nov 9, 2022
5a5e6a4
Red replaced by Lime in enabled colors
VictorDore Nov 9, 2022
7552cdf
Merge pull request #67 from Ecdar-SW5/remove-red
VictorDore Nov 9, 2022
1df55c6
Merge pull request #55 from Ecdar-SW5/SignsReplacement
APaludan Nov 10, 2022
dda9acf
Set color back to component color when action doesnt fail. Other cleanup
Sigurd00 Nov 10, 2022
d327874
Fix comment
Sigurd00 Nov 10, 2022
f61d618
cloning
WassawRoki Nov 10, 2022
ae1c02c
bingbong
WassawRoki Nov 10, 2022
5c64f42
Consume correct response
Sigurd00 Nov 10, 2022
64197b5
Keep red color when selecting nails. Keep red color when swapping com…
Sigurd00 Nov 15, 2022
a2533aa
Merge branch 'main' into new-grpc-protocol
APaludan Nov 16, 2022
6abd4a6
fix build error
APaludan Nov 16, 2022
43854b7
fix test
APaludan Nov 16, 2022
639d24b
fix test fr
APaludan Nov 17, 2022
0db2ea2
PR changes
Dolmer1 Nov 17, 2022
791a154
Merge branch 'new-grpc-protocol' of https://github.com/Ecdar-SW5/Ecda…
Dolmer1 Nov 17, 2022
ee8ff14
Merge pull request #73 from Ecdar-SW5/Simu
WassawRoki Nov 17, 2022
36f559f
Update .gitmodules
APaludan Nov 17, 2022
8f0c405
maybe github checks works now?
APaludan Nov 17, 2022
d1b7b94
deleted variable that is never used
Dolmer1 Nov 17, 2022
4a6729c
Merge branch 'new-grpc-protocol' of https://github.com/Ecdar-SW5/Ecda…
Dolmer1 Nov 17, 2022
f2fc61c
Update build.yml
APaludan Nov 17, 2022
c1d0e59
Merge pull request #74 from Ecdar-SW5/APaludan-patch-1
APaludan Nov 17, 2022
caa80a9
Update SimulationTest.java
APaludan Nov 17, 2022
874f4e2
remove unused imports
APaludan Nov 18, 2022
51fd6ec
edit comment
APaludan Nov 18, 2022
36d48e4
Merge pull request #69 from Ecdar-SW5/new-grpc-protocol
APaludan Nov 18, 2022
c83b4ed
Merge branch 'main' into paint-failing-location
Sigurd00 Nov 18, 2022
a13aa70
Merge pull request #61 from Ecdar-SW5/FailureMessage-In-Modal
Sigurd00 Nov 18, 2022
f81f68b
Merge branch 'main' into paint-failing-action
Sigurd00 Nov 18, 2022
44a435d
Merge pull request #58 from Ecdar-SW5/paint-failing-location
Sigurd00 Nov 18, 2022
067f700
Merge branch 'main' into paint-failing-action
Sigurd00 Nov 18, 2022
080597d
small changes after merge
Sigurd00 Nov 18, 2022
f63033a
Update submodule
Sigurd00 Nov 18, 2022
5ed4439
Implemented specific component in consumer
Sigurd00 Nov 21, 2022
57a3759
Merge pull request #65 from Ecdar-SW5/paint-failing-action
Sigurd00 Nov 21, 2022
b325036
Merge branch 'main' into 5-20-simulation-and-debugging
WassawRoki Nov 21, 2022
27a8b93
fixed
WassawRoki Nov 21, 2022
dd6179d
Update Component.java
jhbengtsson Nov 21, 2022
bccc37d
Update SimulatorController.java
jhbengtsson Nov 21, 2022
e3b6a39
Remove unused imports
Sigurd00 Nov 21, 2022
f04ec3a
It works
WassawRoki Nov 21, 2022
ea36ec8
Change build.gradle file. Surely it works now (#66)
Sigurd00 Nov 21, 2022
2ce8dca
reachability check på én location i sim med flere components. mangler…
EmilieSonne Nov 23, 2022
2b66254
Merge pull request #78 from Ecdar-SW5/5-20-simulation-and-debugging
WassawRoki Nov 24, 2022
507c57e
showtoast based in reachability response status
jhbengtsson Nov 24, 2022
369074b
test and refactoring of getLocationReachableQuery, and some minor cha…
EmilieSonne Nov 24, 2022
d114609
showtoast messages changed
jhbengtsson Nov 24, 2022
32dbcb1
Merge pull request #94 from Ecdar-SW5/76-show-reachability-response-a…
jhbengtsson Nov 24, 2022
2f5ddc0
renamed variable
Dolmer1 Nov 24, 2022
02b447e
Improve readability
EmilieSonne Nov 25, 2022
7a169bf
ændret så vi ikke konverterer til string men bruger metoden til at se…
jhbengtsson Nov 25, 2022
2294096
docs
jhbengtsson Nov 25, 2022
a12a403
docs
jhbengtsson Nov 25, 2022
38c47d6
Merge pull request #82 from Ecdar-SW5/reachability_simulation
jhbengtsson Nov 28, 2022
e57fbf7
Reachability: send request with startSimulation query as input (#104)
EmilieSonne Nov 30, 2022
bb2521a
Simulation logic (#81)
EmilieSonne Nov 30, 2022
66913ea
clock names added + formatting
WassawRoki Dec 2, 2022
0fe6ff0
e
WassawRoki Dec 5, 2022
7a5e09a
b
APaludan Dec 5, 2022
381f20a
n
APaludan Dec 5, 2022
8635171
no height limit for trace element
APaludan Dec 5, 2022
7cb2e62
padding
APaludan Dec 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
submodules: recursive

- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 11
java-package: jdk
- name: Cache Gradle packages
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ lib/*.dll
.idea/
/out/

#VsCode
/bin/
.vscode/

### Gradle ###
.gradle
/build/
Expand Down
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "src/main/proto"]
path = src/main/proto
url = https://github.com/Ecdar/Ecdar-ProtoBuf.git
url = https://github.com/Ecdar-SW5/Ecdar-ProtoBuf.git

16 changes: 15 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ javafx {
modules = ['javafx.controls', 'javafx.fxml', 'javafx.swing']
}

run {
mainClassName = 'com.jfxbase/com.jfxbase.sample.Main'
applicationDefaultJvmArgs += [
"--add-opens", "javafx.graphics/javafx.css=ALL-UNNAMED",
"--add-opens", "javafx.base/com.sun.javafx.runtime=ALL-UNNAMED",
"--add-opens", "javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED",
"--add-opens", "javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED",
"--add-opens", "javafx.base/com.sun.javafx.binding=ALL-UNNAMED",
"--add-opens", "javafx.base/com.sun.javafx.event=ALL-UNNAMED",
"--add-opens", "javafx.graphics/com.sun.javafx.stage=ALL-UNNAMED",
"--add-opens", "javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED",
]
}

group 'ecdar'
if (project.hasProperty('ecdarVersion')) {
version = project.ecdarVersion
Expand Down Expand Up @@ -46,7 +60,6 @@ def protocVersion = protobufVersion

dependencies {
implementation fileTree(dir: 'lib', include: ['*.jar'])

implementation 'com.jfoenix:jfoenix:9.0.10'
implementation group: 'de.codecentric.centerdevice', name: 'javafxsvg', version: '1.3.0'
implementation 'org.kordamp.ikonli:ikonli-core:12.3.1'
Expand Down Expand Up @@ -79,6 +92,7 @@ dependencies {
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.8.2'
testImplementation group: 'org.testfx', name: 'testfx-junit', version: '4.0.15-alpha'
testImplementation group: 'org.testfx', name: 'openjfx-monocle', version: 'jdk-12.0.1+2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.8.2'
}


Expand Down
37 changes: 26 additions & 11 deletions src/main/java/ecdar/Ecdar.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import ecdar.abstractions.Project;
import ecdar.backend.BackendDriver;
import ecdar.backend.BackendHelper;
import ecdar.backend.QueryHandler;
import ecdar.backend.SimulationHandler;
import ecdar.code_analysis.CodeAnalysis;
import ecdar.controllers.EcdarController;
import ecdar.presentations.BackgroundThreadPresentation;
Expand Down Expand Up @@ -52,6 +54,8 @@ public class Ecdar extends Application {
public static BooleanProperty shouldRunBackgroundQueries = new SimpleBooleanProperty(true);
private static final BooleanProperty isSplit = new SimpleBooleanProperty(true); //Set to true to ensure correct behaviour at first toggle.
private static BackendDriver backendDriver = new BackendDriver();
private static QueryHandler queryHandler = new QueryHandler(backendDriver);
private static SimulationHandler simulationHandler;
private Stage debugStage;

/**
Expand Down Expand Up @@ -120,6 +124,20 @@ public static Project getProject() {
return project;
}

/**
* Returns the backend driver used to execute queries and handle simulation
* @return BackendDriver
*/
public static BackendDriver getBackendDriver() {
return backendDriver;
}

public static QueryHandler getQueryExecutor() {
return queryHandler;
}

public static SimulationHandler getSimulationHandler() { return simulationHandler; }

public static EcdarPresentation getPresentation() {
return presentation;
}
Expand All @@ -134,8 +152,8 @@ public static void showHelp() {
presentation.showHelp();
}

public static BooleanProperty toggleFilePane() {
return presentation.toggleFilePane();
public static BooleanProperty toggleLeftPane() {
return presentation.toggleLeftPane();
}

/**
Expand All @@ -160,7 +178,7 @@ public static BooleanProperty toggleRunBackgroundQueries() {
}

public static BooleanProperty toggleQueryPane() {
return presentation.toggleQueryPane();
return presentation.toggleRightPane();
}

/**
Expand All @@ -181,14 +199,6 @@ public static BooleanProperty toggleCanvasSplit() {
return isSplit;
}

/**
* Returns the backend driver used to execute queries and handle simulation
* @return BackendDriver
*/
public static BackendDriver getBackendDriver() {
return backendDriver;
}

public static double getDpiScale() {
if (!autoScalingEnabled.getValue())
return 1;
Expand All @@ -207,6 +217,7 @@ public void start(final Stage stage) {

// Load or create new project
project = new Project();
simulationHandler = new SimulationHandler(getBackendDriver());

// Set the title for the application
stage.setTitle("Ecdar " + VERSION);
Expand Down Expand Up @@ -306,6 +317,8 @@ public void start(final Stage stage) {

try {
backendDriver.closeAllBackendConnections();
queryHandler.closeAllBackendConnections();
simulationHandler.closeAllBackendConnections();
} catch (IOException e) {
e.printStackTrace();
}
Expand All @@ -319,6 +332,8 @@ public void start(final Stage stage) {
// to prevent dangling connections and queries
try {
backendDriver.closeAllBackendConnections();
queryHandler.closeAllBackendConnections();
simulationHandler.closeAllBackendConnections();
} catch (IOException e) {
throw new RuntimeException(e);
}
Expand Down
63 changes: 63 additions & 0 deletions src/main/java/ecdar/abstractions/Component.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public class Component extends HighLevelModelObject implements Boxed {

// Verification properties
private final ObservableList<Location> locations = FXCollections.observableArrayList();
private final ObservableList<Location> failingLocations = FXCollections.observableArrayList();
private final ObservableList<DisplayableEdge> edges = FXCollections.observableArrayList();
private final ObservableList<DisplayableEdge> failingEdges = FXCollections.observableArrayList();
private final ObservableList<String> inputStrings = FXCollections.observableArrayList();
private final ObservableList<String> outputStrings = FXCollections.observableArrayList();
private final StringProperty description = new SimpleStringProperty("");
Expand Down Expand Up @@ -486,6 +488,67 @@ public boolean removeLocation(final Location location) {
return locations.remove(location);
}

/**
* Add a failing Edge to the list of failing edges
* and set the edge's failing property to true.
* @param edge the Edge that is failing.
* @return whether adding the Edge to the list was a success
*/
public boolean addFailingEdge(final Edge edge) {
edge.setFailing(true);
return failingEdges.add(edge);
}

/**
* Sets all previous failing edges to not failing
* and removes all previous failing edges from list.
*/
public void removeFailingEdges() {
for (DisplayableEdge edge : failingEdges) {
edge.setFailing(false);
}
failingEdges.removeAll();
}

/**
* Observable list of all failing locations.
* @return Observable list of all failing locations.
*/
public ObservableList<Location> getFailingLocations() {
return failingLocations;
}

/**
* Adds a failing location to the list of failing locations.
* @param locationId the id of the location that is failing.
* @return whether adding the location to the list was a success
*/
public boolean addFailingLocation(final String locationId) {
Location failingLocation = findLocation(locationId);
failingLocation.setFailing(true);
return failingLocations.add(failingLocation);
}

/**
* Sets all previous failing locations to not failing
* and removes all previous failing locations from list.
*/
public void removeFailingLocations() {
for (Location location : failingLocations) {
location.setFailing(false);
}
failingLocations.removeAll();
}

/**
* Observable list of all failing edges.
* @return Observable list of all failing edges.
*/
public ObservableList<DisplayableEdge> getFailingEdges() {
return failingEdges;
}


/**
* Returns all DisplayableEdges of the component (returning a list potentially containing GroupEdges and Edges)
* @return All visual edges of the component
Expand Down
1 change: 0 additions & 1 deletion src/main/java/ecdar/abstractions/ComponentInstance.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import ecdar.Ecdar;
import ecdar.presentations.Grid;
import ecdar.utility.colors.Color;
import com.google.gson.JsonObject;
import javafx.beans.property.*;
import javafx.beans.value.ObservableValue;
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/ecdar/abstractions/Declarations.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package ecdar.abstractions;

import ecdar.utility.colors.Color;
import ecdar.utility.colors.EnabledColor;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import org.apache.commons.lang3.tuple.Triple;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
Expand Down
32 changes: 24 additions & 8 deletions src/main/java/ecdar/abstractions/DisplayableEdge.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
package ecdar.abstractions;

import ecdar.Ecdar;
import ecdar.code_analysis.Nearable;
import ecdar.presentations.Grid;
import ecdar.utility.colors.Color;
import ecdar.utility.helpers.Circular;
import ecdar.utility.helpers.MouseCircular;
import ecdar.utility.helpers.StringHelper;
import javafx.beans.property.*;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;

import java.util.List;
import java.util.UUID;

public abstract class DisplayableEdge implements Nearable {
private final StringProperty id = new SimpleStringProperty("");
Expand Down Expand Up @@ -39,6 +40,8 @@ public abstract class DisplayableEdge implements Nearable {

private final BooleanProperty isHighlighted = new SimpleBooleanProperty(false);

protected final BooleanProperty failing = new SimpleBooleanProperty(false);

public Location getSourceLocation() {
return sourceLocation.get();
}
Expand Down Expand Up @@ -82,7 +85,7 @@ public StringProperty selectProperty() {
}

public String getGuard() {
return guard.get();
return StringHelper.ConvertUnicodeToSymbols(guard.get());
}

public void setGuard(final String guard) {
Expand Down Expand Up @@ -279,12 +282,7 @@ public String getId() {
* Generate and sets a unique id for this location
*/
protected void setId() {
for(int counter = 0; ; counter++) {
if(!Ecdar.getProject().getEdgeIds().contains(String.valueOf(counter))){
id.set(Edge.EDGE + counter);
return;
}
}
id.set(UUID.randomUUID().toString());
}

/**
Expand All @@ -302,4 +300,22 @@ public StringProperty idProperty() {
public abstract List<String> getProperty(final PropertyType propertyType);

public abstract void setProperty(final PropertyType propertyType, final List<String> newProperty);

/**
* Sets the 'failing' property
* @param bool true if the edge is failing.
*/
public abstract void setFailing(final boolean bool);

/**
* Getter for the 'failing' boolean
* @return Whether edge is failing in last query response.
*/
public abstract boolean getFailing();

/**
* The observable boolean property for 'failing' of this.
* @return The observable boolean property for 'failing' of this.
*/
public abstract BooleanProperty failingProperty();
}
1 change: 0 additions & 1 deletion src/main/java/ecdar/abstractions/EcdarSystemEdge.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import ecdar.Ecdar;
import ecdar.controllers.SystemRootController;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
Expand Down
Loading