+
+ @Override
+ public void doSave(IProgressMonitor progressMonitor)
+ {
+ IEditorInput input = getEditorInput();
+ if (input instanceof IPathEditorInput)
+ {
+ IPathEditorInput pathInput = (IPathEditorInput) input;
+ save(pathInput.getPath().toOSString());
+ dirty = false;
+ firePropertyChange(PROP_DIRTY);
+ }
+ }
+
+ @Override
+ public void doSaveAs()
+ {
+ // not allowed
+ }
+
+ @Override
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException
+ {
+ setSite(site);
+ setInput(input);
+ if (input instanceof IPathEditorInput)
+ {
+ IPathEditorInput pathInput = (IPathEditorInput) input;
+ open(pathInput.getPath().toOSString());
+ }
+ }
+
+ @Override
+ public boolean isDirty()
+ {
+ return dirty;
+ }
+
+ @Override
+ public boolean isSaveAsAllowed()
+ {
+ return false;
+ }
+
+ @Override
+ public void update(long address)
+ {
+ dirty = true;
+ firePropertyChange(PROP_DIRTY);
+ }