/** * Enablement when tab key is pressed - the current selection has to be cover multiple lines. * * @since 3.0 */ protected void updateForTab() { super.update(); if (isEnabled()) { if (!canModifyEditor()) { setEnabled(false); return; } ITextEditor editor= getTextEditor(); if (fOperationTarget == null && editor != null && fOperationCode != -1) fOperationTarget= editor.getAdapter(ITextOperationTarget.class); boolean isEnabled= (fOperationTarget != null && fOperationTarget.canDoOperation(fOperationCode)); setEnabled(isEnabled); } }
/** * Enablement when tab key is pressed - the current selection has to be cover multiple lines. * * @since 3.0 */ protected void updateForTab() { super.update(); if (isEnabled()) { if (!canModifyEditor()) { setEnabled(false); return; } ITextEditor editor= getTextEditor(); if (fOperationTarget == null && editor != null && fOperationCode != -1) fOperationTarget= (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class); boolean isEnabled= (fOperationTarget != null && fOperationTarget.canDoOperation(fOperationCode)); setEnabled(isEnabled); } }
/** * Enablement when tab key is pressed - the current selection has to be cover multiple lines. * * @since 3.0 */ protected void updateForTab() { super.update(); if (isEnabled()) { if (!canModifyEditor()) { setEnabled(false); return; } ITextEditor editor= getTextEditor(); if (fOperationTarget == null && editor != null && fOperationCode != -1) fOperationTarget= editor.getAdapter(ITextOperationTarget.class); boolean isEnabled= (fOperationTarget != null && fOperationTarget.canDoOperation(fOperationCode)); setEnabled(isEnabled); } }
public void update() { super.update(); if (!isEnabled()) return; if (!canModifyEditor()) { setEnabled(false); return; } ITextEditor editor= getTextEditor(); if (fOperationTarget == null && editor != null && fOperationCode != -1) fOperationTarget= (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class); }
@Override public void update() { super.update(); if (!isEnabled()) return; if (!canModifyEditor()) { setEnabled(false); return; } ITextEditor editor= getTextEditor(); if (fOperationTarget == null && editor != null && fOperationCode != -1) fOperationTarget= editor.getAdapter(ITextOperationTarget.class); }
@Override public void update() { super.update(); if (!isEnabled()) return; if (!canModifyEditor()) { setEnabled(false); return; } ITextEditor editor= getTextEditor(); if (fOperationTarget == null && editor != null && fOperationCode != -1) fOperationTarget= editor.getAdapter(ITextOperationTarget.class); }