@Override public boolean isDirty() { return fTextEditor.isDirty(); }
@Override public boolean isDirty() { return fTextEditor.isDirty(); }
public boolean isDirty() { return fTextEditor.isDirty(); }
public void update() { setEnabled(getTextEditor().isDirty()); } }
@Override public void update() { setEnabled(getTextEditor().isDirty()); } }
@Override public void update() { ITextEditor editor= getTextEditor(); setEnabled(editor != null && !editor.isDirty()); }
@Override public void update() { setEnabled(getTextEditor().isDirty()); } }
@Override public void update() { setEnabled(getTextEditor().isDirty()); } }
public void update() { setEnabled(getTextEditor().isDirty()); } }
@Override public void update() { setEnabled(getTextEditor().isDirty()); } }
public void update() { ITextEditor editor= getTextEditor(); setEnabled(editor != null && !editor.isDirty()); }
@Override public void update() { setEnabled((getResource() != null || getEncodingSupport() != null) && !getTextEditor().isDirty()); }
public void update() { setEnabled((getResource() != null || getEncodingSupport() != null) && !getTextEditor().isDirty()); }
@Override public void update() { if (fEncoding == null) { setEnabled(false); return; } ITextEditor editor= getTextEditor(); if (editor == null) { setEnabled(false); return; } // update label fIsDefault= IEncodingActionsConstants.DEFAULT.equals(fEncoding); if (fIsDefault) setText(getDefaultEncodingText(editor, fLabel)); else setText(fLabel); // update enable state if (editor.isDirty()) setEnabled(false); else setEnabled(true); // update checked state String current= getEncoding(editor); if (fIsDefault) setChecked(current == null); else setChecked(fEncoding.equals(current)); }
public void update() { if (fEncoding == null) { setEnabled(false); return; } ITextEditor editor= getTextEditor(); if (editor == null) { setEnabled(false); return; } // update label fIsDefault= IEncodingActionsConstants.DEFAULT.equals(fEncoding); if (fIsDefault) setText(getDefaultEncodingText(editor, fLabel)); else setText(fLabel); // update enable state if (editor.isDirty()) setEnabled(false); else setEnabled(true); // update checked state String current= getEncoding(editor); if (fIsDefault) setChecked(current == null); else setChecked(fEncoding.equals(current)); }
/** * Creates a new text selection navigation location. * * @param part the text editor part * @param initialize a boolean indicating whether to initialize the new instance from the current selection */ public TextSelectionNavigationLocation(ITextEditor part, boolean initialize) { super(part); if (initialize) { ISelection s= part.getSelectionProvider().getSelection(); if(s == null || s.isEmpty()) return; ITextSelection selection= (ITextSelection) s; IDocument document= getDocument(part); Position position= new Position(selection.getOffset(), selection.getLength()); if (installOnDocument(document, position)) { fDocument= document; fPosition= position; if (!part.isDirty()) fSavedPosition= new Position(fPosition.offset, fPosition.length); } } }
/** * Creates a new text selection navigation location. * * @param part the text editor part * @param initialize a boolean indicating whether to initialize the new instance from the current selection */ public TextSelectionNavigationLocation(ITextEditor part, boolean initialize) { super(part); if (initialize) { if (part == null || part.getSelectionProvider() == null) { return; } ISelection s= part.getSelectionProvider().getSelection(); if(s == null || s.isEmpty()) return; ITextSelection selection= (ITextSelection) s; IDocument document= getDocument(part); Position position= new Position(selection.getOffset(), selection.getLength()); if (installOnDocument(document, position)) { fDocument= document; fPosition= position; if (!part.isDirty()) fSavedPosition= new Position(fPosition.offset, fPosition.length); } } }
/** * Creates a new text selection navigation location. * * @param part the text editor part * @param initialize a boolean indicating whether to initialize the new instance from the current selection */ public TextSelectionNavigationLocation(ITextEditor part, boolean initialize) { super(part); if (initialize) { ISelection s= part.getSelectionProvider().getSelection(); if(s == null || s.isEmpty()) return; ITextSelection selection= (ITextSelection) s; if(selection.getOffset() == 0 && selection.getLength() == 0) return; IDocument document= getDocument(part); Position position= new Position(selection.getOffset(), selection.getLength()); if (installOnDocument(document, position)) { fDocument= document; fPosition= position; if (!part.isDirty()) fSavedPosition= new Position(fPosition.offset, fPosition.length); } } }
IDocument document = editor.getDocumentProvider().getDocument(fileEditorInput); if (document != null) if(editor.isDirty()) return new EditorDocument(resourceURI, document); else