Example #1
0
 public String saveFile() throws IOException {
   if (_editingFile == null) {
     return saveAsFile(Settings.isMac());
   } else {
     ImagePath.remove(_srcBundlePath);
     writeSrcFile();
     return getCurrentShortFilename();
   }
 }
Example #2
0
 private void saveAsBundle(String bundlePath, String current) throws IOException {
   // TODO allow other file types
   bundlePath = FileManager.slashify(bundlePath, true);
   if (_srcBundlePath != null) {
     FileManager.xcopy(_srcBundlePath, bundlePath, current);
   }
   if (_srcBundleTemp) {
     FileManager.deleteTempDir(_srcBundlePath);
     _srcBundleTemp = false;
   }
   ImagePath.remove(_srcBundlePath);
   setSrcBundle(bundlePath);
   _editingFile = createSourceFile(bundlePath, "." + Settings.TypeEndings.get(sikuliContentType));
   Debug.log(3, "IDE: saveAsBundle: " + getSrcBundle());
   writeSrcFile();
   reparse();
 }