Browse Source

Allow loading of partially (syntactically) correct properties files in GUI.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@453 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 18 years ago
parent
commit
b75a481807
  1. 5
      prism/src/prism/Prism.java
  2. 2
      prism/src/userinterface/properties/computation/LoadPropertiesThread.java

5
prism/src/prism/Prism.java

@ -668,6 +668,9 @@ public class Prism implements PrismSettingsListener
// but if its null, we just create a blank one for you.
public PropertiesFile parsePropertiesFile(ModulesFile mf, File file) throws FileNotFoundException, ParseException, PrismException
{ return parsePropertiesFile(mf, file, true); }
public PropertiesFile parsePropertiesFile(ModulesFile mf, File file, boolean tidy) throws FileNotFoundException, ParseException, PrismException
{
FileInputStream strProperties;
PrismParser prismParser;
@ -700,7 +703,7 @@ public class Prism implements PrismSettingsListener
throw new ParseException("Concurrency error in parser");
}
propertiesFile.tidyUp();
if (tidy) propertiesFile.tidyUp();
return propertiesFile;
}

2
prism/src/userinterface/properties/computation/LoadPropertiesThread.java

@ -80,7 +80,7 @@ public class LoadPropertiesThread extends Thread
// do parsing
try {
props = pri.parsePropertiesFile(mf, file);
props = pri.parsePropertiesFile(mf, file, false);
}
//If there was a problem with the loading, notify the interface.
catch (FileNotFoundException e) {

Loading…
Cancel
Save