Package org.eclipse.ui.internal.texteditor.rulers

Examples of org.eclipse.ui.internal.texteditor.rulers.RulerColumnTarget


   * @param editor the editor to check
   * @return <code>true</code> if this contribution targets the passed editor
   */
  public boolean matchesEditor(ITextEditor editor) {
    Assert.isLegal(editor != null);
    RulerColumnTarget target= getTarget();

    IWorkbenchPartSite site= editor.getSite();
    if (site != null && target.matchesEditorId(site.getId()))
      return true;
   
    if (target.matchesClass(editor.getClass()))
      return true;

    IContentType contentType= getContentType(editor);
    return contentType != null && target.matchesContentType(contentType);

  }
View Full Code Here


    if (targetContentTypes.length + targetEditors.length + targetClasses.length == 0) {
      helper.fail(RulerColumnMessages.RulerColumnDescriptor_missing_target_msg);
      fTarget= null; // dummy
    } else {
      RulerColumnTarget combined= null;
      for (int i= 0; i < targetEditors.length; i++) {
        IConfigurationElement targetEditor= targetEditors[i];
        RulerColumnTarget target= RulerColumnTarget.createEditorIdTarget(new ExtensionPointHelper(targetEditor, log).getNonNullAttribute(ID));
        combined= RulerColumnTarget.createOrTarget(combined, target);
      }
      for (int i= 0; i < targetContentTypes.length; i++) {
        IConfigurationElement targetContentType= targetContentTypes[i];
        RulerColumnTarget target= RulerColumnTarget.createContentTypeTarget(new ExtensionPointHelper(targetContentType, log).getNonNullAttribute(ID));
        combined= RulerColumnTarget.createOrTarget(combined, target);
      }
      for (int i= 0; i < targetClasses.length; i++) {
        IConfigurationElement targetClass= targetClasses[i];
        RulerColumnTarget target= RulerColumnTarget.createClassTarget(new ExtensionPointHelper(targetClass, log).getNonNullAttribute(CLASS));
        combined= RulerColumnTarget.createOrTarget(combined, target);
      }
      fTarget= combined;
    }
View Full Code Here

    if (targetContentTypes.length + targetEditors.length + targetClasses.length == 0) {
      helper.fail(RulerColumnMessages.RulerColumnDescriptor_missing_target_msg);
      fTarget= null; // dummy
    } else {
      RulerColumnTarget combined= null;
      for (int i= 0; i < targetEditors.length; i++) {
        IConfigurationElement targetEditor= targetEditors[i];
        RulerColumnTarget target= RulerColumnTarget.createEditorIdTarget(new ExtensionPointHelper(targetEditor).getNonNullAttribute(ID));
        combined= RulerColumnTarget.createOrTarget(combined, target);
      }
      for (int i= 0; i < targetContentTypes.length; i++) {
        IConfigurationElement targetContentType= targetContentTypes[i];
        RulerColumnTarget target= RulerColumnTarget.createContentTypeTarget(new ExtensionPointHelper(targetContentType).getNonNullAttribute(ID));
        combined= RulerColumnTarget.createOrTarget(combined, target);
      }
      for (int i= 0; i < targetClasses.length; i++) {
        IConfigurationElement targetClass= targetClasses[i];
        RulerColumnTarget target= RulerColumnTarget.createClassTarget(new ExtensionPointHelper(targetClass).getNonNullAttribute(CLASS));
        combined= RulerColumnTarget.createOrTarget(combined, target);
      }
      fTarget= combined;
    }
View Full Code Here

   * @param editor the editor to check
   * @return <code>true</code> if this contribution targets the passed editor
   */
  public boolean matchesEditor(ITextEditor editor) {
    Assert.isLegal(editor != null);
    RulerColumnTarget target= getTarget();

    IWorkbenchPartSite site= editor.getSite();
    if (site != null && target.matchesEditorId(site.getId()))
      return true;

    if (target.matchesClass(editor.getClass()))
      return true;

    IContentType contentType= getContentType(editor);
    return contentType != null && target.matchesContentType(contentType);

  }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.internal.texteditor.rulers.RulerColumnTarget

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.