}
@Override
- protected ImportDeclaration[] getBuiltinImports(UpdateListener listener) {
+ public ImportDeclaration[] getBuiltinImports(UpdateListener listener) {
if(bundle.getSymbolicName().equals("org.simantics.scl.runtime"))
return DEFAULT_IMPORTS_FOR_STANDARD_LIBRARY;
else
@Override
public boolean isUpdateable() {
try {
- return Files.exists(getPath());
+ Path path = getPath();
+ if(path == null)
+ return false;
+ return Files.exists(path);
} catch (IOException e) {
return false;
}
public void update(String newSourceText) {
try {
Path path = getPath();
+ if(path == null)
+ return;
Files.write(path, newSourceText.getBytes(Charset.forName("UTF-8")));
} catch(IOException e) {
e.printStackTrace();