Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Commit

Permalink
Fix updating UI bug
Browse files Browse the repository at this point in the history
Signed-off-by: Nassirou NAMBIEMA <[email protected]>
  • Loading branch information
Nassirou NAMBIEMA committed Jan 29, 2020
1 parent ec7db3a commit f2c5312
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ public class ModificationScriptEditor extends BorderPane

private Service<String> scriptUpdateService;

private AppStorageListener appStorageListener;

public ModificationScriptEditor(AbstractScript abstractScript, Scene scene, GseContext context) {
this.abstractScript = abstractScript;
this.context = context;
Expand All @@ -119,7 +121,7 @@ public ModificationScriptEditor(AbstractScript abstractScript, Scene scene, GseC

codeEditor = getCodeEditor();

AppStorageListener l = eventList ->
appStorageListener = eventList ->
eventList.getEvents().forEach(nodeEvent ->
Platform.runLater(() -> {
boolean nodeEventEqualsAbstractScript = nodeEvent.getId().equals(abstractScript.getId());
Expand All @@ -137,7 +139,7 @@ public ModificationScriptEditor(AbstractScript abstractScript, Scene scene, GseC
}
}));

abstractScript.getFileSystem().getEventBus().addListener(l);
abstractScript.getFileSystem().getEventBus().addListener(appStorageListener);
//Adding autocompletion keywords suggestions depending the context
List<String> suggestions = new ArrayList<>();
List<AutoCompletionWordsProvider> completionWordsProviderExtensions = findCompletionWordsProviderExtensions(abstractScript);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<slf4j.version>1.7.22</slf4j.version>
<tiwulfx.version>2.0</tiwulfx.version>

<powsyblafs.version>3.1.0</powsyblafs.version>
<powsyblafs.version>3.2.0-SNAPSHOT</powsyblafs.version>
<powsyblcore.version>3.1.0</powsyblcore.version>

</properties>
Expand Down

0 comments on commit f2c5312

Please sign in to comment.