commit
a9ffa47801
@ -56,7 +56,9 @@ public class LunchApp extends Application {
|
||||
List<String> rawParameters = getParameters().getRaw();
|
||||
threadPool.execute(() -> {
|
||||
TextArea textArea = controller.openAssociatedFileAndCreateTextArea(rawParameters);
|
||||
Platform.runLater(() -> updateUIWithNewTextArea(textArea));
|
||||
if (!Objects.isNull(textArea)) {
|
||||
Platform.runLater(() -> updateUIWithNewTextArea(textArea));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,12 +35,12 @@ public class Controller implements ControllerInterface {
|
||||
if (!rawParameters.isEmpty()) {
|
||||
String filePath = rawParameters.get(0);
|
||||
openAssociatedFile(filePath);
|
||||
return null;
|
||||
} else {
|
||||
TextArea textArea = createNewTextArea();
|
||||
configureTextArea(textArea);
|
||||
return textArea;
|
||||
}
|
||||
|
||||
TextArea textArea = createNewTextArea();
|
||||
configureTextArea(textArea);
|
||||
|
||||
return textArea;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user