use of org.eclipse.jface.text.IMarkRegionTarget in project eclipse.platform.text by eclipse.
the class MarkAction method run.
@Override
public void run() {
ITextEditor editor = getTextEditor();
if (editor == null)
return;
IMarkRegionTarget target = editor.getAdapter(IMarkRegionTarget.class);
if (target == null)
return;
switch(fType) {
case SET_MARK:
target.setMarkAtCursor(true);
break;
case CLEAR_MARK:
target.setMarkAtCursor(false);
break;
case SWAP_MARK:
target.swapMarkAndCursor();
break;
}
}
Aggregations