Skip to content

Commit 6c938f2

Browse files
committed
Add component property for the last SRM list
1 parent 8d095a4 commit 6c938f2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

swan-assist/src/main/java/de/fraunhofer/iem/swan/assist/ui/SummaryToolWindow.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import javax.swing.*;
2727
import java.awt.*;
2828
import java.io.File;
29+
import java.util.Objects;
2930

3031
/**
3132
* Tool Window implementation for the Plugin.
@@ -53,14 +54,15 @@ public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindo
5354
toolPanel.add(new JBScrollPane(new MethodListTree(project)), BorderLayout.CENTER);
5455

5556
//If a configuration file was already selected, load it
56-
if(PropertiesComponent.getInstance(project).isValueSet(Constants.CONFIGURATION_FILE)){
57+
if(PropertiesComponent.getInstance(project).isValueSet(Constants.LAST_SRM_LIST)){
5758

58-
File configFile = new File(PropertiesComponent.getInstance(project).getValue(Constants.CONFIGURATION_FILE));
59+
File configFile = new File(Objects.requireNonNull(PropertiesComponent.getInstance(project).getValue(Constants.LAST_SRM_LIST)));
5960

6061
if(configFile.exists()){
62+
6163
MessageBus messageBus = project.getMessageBus();
6264
ConfigurationFileNotifier publisher = messageBus.syncPublisher(ConfigurationFileNotifier.FILE_NOTIFIER_TOPIC);
63-
publisher.loadInitialFile(PropertiesComponent.getInstance(project).getValue(Constants.CONFIGURATION_FILE));
65+
publisher.loadInitialFile(PropertiesComponent.getInstance(project).getValue(Constants.LAST_SRM_LIST));
6466

6567
actionToolbar.updateActionsImmediately();
6668
}

0 commit comments

Comments
 (0)