@Override protected boolean isIncluded(Annotation annotation) { AnnotationPreference preference = EditorsUI.getAnnotationPreferenceLookup().getAnnotationPreference(annotation); if (preference != null && preference.getVerticalRulerPreferenceValue()) { return annotation.getText() != null; } return false; }
public SelectQuickFixRulerAction( ResourceBundle bundle, String prefix, ITextEditor editor, IVerticalRulerInfo ruler) { super(bundle, prefix, editor, ruler); mTextEditor = editor; mAnnotationPreferenceLookup = EditorsUI.getAnnotationPreferenceLookup(); mStore = InstallOptionsPlugin.getDefault().getCombinedPreferenceStore(); PlatformUI.getWorkbench() .getHelpSystem() .setHelp(this, "installoptions_quickfix_context"); // $NON-NLS-1$ }
public JavaSelectAnnotationRulerAction( ResourceBundle bundle, String prefix, ITextEditor editor, IVerticalRulerInfo ruler) { super(bundle, prefix, editor, ruler); fBundle = bundle; fTextEditor = editor; fAnnotationPreferenceLookup = EditorsUI.getAnnotationPreferenceLookup(); fStore = JavaPlugin.getDefault().getCombinedPreferenceStore(); PlatformUI.getWorkbench() .getHelpSystem() .setHelp(this, IJavaHelpContextIds.JAVA_SELECT_MARKER_RULER_ACTION); }
private void initialize() { final IPreferenceStore store = EditorsUI.getPreferenceStore(); if (store == null) { return; } AnnotationPreferenceLookup lookup = EditorsUI.getAnnotationPreferenceLookup(); final AnnotationPreference commentedPref = lookup.getAnnotationPreference(CommentAnnotation.COMMENT_ANNOTATION_ID); updateCommentedColor(commentedPref, store); fDispatcher = new PropertyEventDispatcher(store); if (commentedPref != null) { fDispatcher.addPropertyChangeListener( commentedPref.getColorPreferenceKey(), new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { updateCommentedColor(commentedPref, store); } }); } }