类org.eclipse.jface.text.source.AnnotationRulerColumn源码实例Demo

下面列出了怎么用org.eclipse.jface.text.source.AnnotationRulerColumn的API类实例代码及写法,或者点击链接到github查看源代码。

@Override
protected IVerticalRulerColumn createAnnotationRulerColumn(CompositeRuler ruler) {
	if (!getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_ANNOTATION_ROLL_OVER))
		return super.createAnnotationRulerColumn(ruler);

	AnnotationRulerColumn column= new AnnotationRulerColumn(VERTICAL_RULER_WIDTH, getAnnotationAccess());
	column.setHover(new JavaExpandHover(ruler, getAnnotationAccess(), new IDoubleClickListener() {

		public void doubleClick(DoubleClickEvent event) {
			// for now: just invoke ruler double click action
			triggerAction(ITextEditorActionConstants.RULER_DOUBLE_CLICK);
		}

		private void triggerAction(String actionID) {
			IAction action= getAction(actionID);
			if (action != null) {
				if (action instanceof IUpdate)
					((IUpdate) action).update();
				// hack to propagate line change
				if (action instanceof ISelectionListener) {
					((ISelectionListener)action).selectionChanged(null, null);
				}
				if (action.isEnabled())
					action.run();
			}
		}

	}));

	return column;
}
 
 类所在包
 类方法
 同包方法