use of org.eclipse.ui.texteditor.TextViewerDeleteLineTarget in project xtext-eclipse by eclipse.
the class TextViewerDeleteLineAction method update.
/*
* @see IUpdate#update()
*/
@Override
public void update() {
super.update();
if (!isEnabled())
return;
if (!canModifyViewer()) {
setEnabled(false);
return;
}
ITextViewer viewer = getTextViewer();
if (viewer != null) {
if (fTarget == null) {
fTarget = new TextViewerDeleteLineTarget(viewer);
}
} else {
fTarget = null;
}
setEnabled(fTarget != null);
}
Aggregations