@Override public void update() { super.update(); if (!isEnabled()) return; if (!canModifyEditor()) { setEnabled(false); return; } ITextEditor editor= getTextEditor(); setEnabled(editor.isEditable()); }
public void update() { super.update(); if (!isEnabled()) return; if (!canModifyEditor()) { setEnabled(false); return; } ITextEditor editor= getTextEditor(); setEnabled(editor.isEditable()); }
@Override public void update() { super.update(); if (!isEnabled()) return; if (!canModifyEditor()) { setEnabled(false); return; } ITextEditor editor= getTextEditor(); setEnabled(editor.isEditable()); }
@Override public void run() { ITextEditor editor= getTextEditor(); if (editor == null) return; if (!validateEditorInputState()) return; IDocument document= getDocument(editor); if (document == null) return; ITextSelection selection= getSelection(editor); if (selection == null) return; int startLine= selection.getStartLine(); int endLine= selection.getEndLine(); try { int caretOffset= joinLines(document, startLine, endLine); if (caretOffset > -1) editor.selectAndReveal(caretOffset, 0); } catch (BadLocationException e) { // should not happen } }
public void run() { ITextEditor editor= getTextEditor(); if (editor == null) return; if (!validateEditorInputState()) return; IDocument document= getDocument(editor); if (document == null) return; ITextSelection selection= getSelection(editor); if (selection == null) return; int startLine= selection.getStartLine(); int endLine= selection.getEndLine(); try { int caretOffset= joinLines(document, startLine, endLine); if (caretOffset > -1) editor.selectAndReveal(caretOffset, 0); } catch (BadLocationException e) { // should not happen } }
@Override public void run() { ITextEditor editor= getTextEditor(); if (editor == null) return; if (!validateEditorInputState()) return; IDocument document= getDocument(editor); if (document == null) return; ITextSelection selection= getSelection(editor); if (selection == null) return; int startLine= selection.getStartLine(); int endLine= selection.getEndLine(); try { int caretOffset= joinLines(document, startLine, endLine); if (caretOffset > -1) editor.selectAndReveal(caretOffset, 0); } catch (BadLocationException e) { // should not happen } }