simplified the external tools configuration with a single common file that is always loaded
This commit is contained in:
parent
be52981bcc
commit
1a10fa9d58
7 changed files with 57 additions and 163 deletions
|
@ -156,6 +156,11 @@ public class GUI extends Observable {
|
|||
private static final long serialVersionUID = 1L;
|
||||
private static Logger logger = Logger.getLogger(GUI.class);
|
||||
|
||||
/**
|
||||
* External tools configuration.
|
||||
*/
|
||||
public static final String EXTERNAL_TOOLS_SETTINGS_FILENAME = "/external_tools.config";
|
||||
|
||||
/**
|
||||
* External tools default Win32 settings filename.
|
||||
*/
|
||||
|
@ -2762,7 +2767,7 @@ public class GUI extends Observable {
|
|||
}
|
||||
|
||||
try {
|
||||
InputStream in = GUI.class.getResourceAsStream(filename);
|
||||
InputStream in = GUI.class.getResourceAsStream(EXTERNAL_TOOLS_SETTINGS_FILENAME);
|
||||
if (in == null) {
|
||||
throw new FileNotFoundException(filename + " not found");
|
||||
}
|
||||
|
@ -2770,6 +2775,13 @@ public class GUI extends Observable {
|
|||
settings.load(in);
|
||||
in.close();
|
||||
|
||||
in = GUI.class.getResourceAsStream(filename);
|
||||
if (in == null) {
|
||||
throw new FileNotFoundException(filename + " not found");
|
||||
}
|
||||
settings.load(in);
|
||||
in.close();
|
||||
|
||||
currentExternalToolsSettings = settings;
|
||||
defaultExternalToolsSettings = (Properties) currentExternalToolsSettings.clone();
|
||||
logger.info("External tools default settings: " + filename);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue