Package org.eclipse.jface.text.source

Examples of org.eclipse.jface.text.source.AnnotationRulerColumn


  /**
   * Initializes the given line number ruler column from the preference store.
   */
  private void initialize() {
    if (fDelegate == null)
      fDelegate= new AnnotationRulerColumn(VERTICAL_RULER_WIDTH, new DefaultMarkerAnnotationAccess());
    IPreferenceStore store= getPreferenceStore();
    if (store != null && fDelegate instanceof AnnotationRulerColumn) {
      final AnnotationRulerColumn column= (AnnotationRulerColumn) fDelegate;
      // initial set up
      for (Iterator iter2= fAnnotationPreferences.getAnnotationPreferences().iterator(); iter2.hasNext();) {
        AnnotationPreference preference= (AnnotationPreference)iter2.next();
        String key= preference.getVerticalRulerPreferenceKey();
        boolean showAnnotation= true;
        if (key != null && store.contains(key))
          showAnnotation= store.getBoolean(key);
        if (showAnnotation)
          column.addAnnotationType(preference.getAnnotationType());
      }
      column.addAnnotationType(Annotation.TYPE_UNKNOWN);
     
      // link to preference store
      fPropertyListener= new IPropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent event) {
          String property= event.getProperty();
          AnnotationPreference annotationPreference= getVerticalRulerAnnotationPreference(property);
          if (annotationPreference != null && event.getNewValue() instanceof Boolean) {
            Object type= annotationPreference.getAnnotationType();
            if (((Boolean)event.getNewValue()).booleanValue())
              column.addAnnotationType(type);
            else
              column.removeAnnotationType(type);
            column.redraw();
          }
        }
      };
      store.addPropertyChangeListener(fPropertyListener);
    }
View Full Code Here


   * @param ruler the composite ruler that the column will be added
   * @return an annotation ruler column
   * @since 3.2
   */
  protected IVerticalRulerColumn createAnnotationRulerColumn(CompositeRuler ruler) {
    return new AnnotationRulerColumn(VERTICAL_RULER_WIDTH, getAnnotationAccess());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.source.AnnotationRulerColumn

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.