Package org.eclipse.jface.text

Examples of org.eclipse.jface.text.TextAttribute


    private static final String[] MVEL_CONSTANTS = { "false", "true", "null", "nil", "empty", "this"  };


    public DRLScanner() {

        IToken keyword = new Token(new TextAttribute(KEYWORD_COLOR, null, SWT.BOLD));
        IToken comment= new Token(new TextAttribute(COMMENT_COLOR));
        IToken string = new Token(new TextAttribute(STRING_COLOR));
        IToken other = new Token(null);

        List<IRule> rules = new ArrayList<IRule>();

        rules.add(new EndOfLineRule("//", comment));
View Full Code Here


    }

    protected XMLTagScanner getXMLTagScanner() {
        if (tagScanner == null) {
            tagScanner = new XMLTagScanner(colorManager);
            tagScanner.setDefaultReturnToken(new Token(new TextAttribute(colorManager
                    .getColor(IXMLColorConstants.TAG))));
        }
        return tagScanner;
    }
View Full Code Here

        dr = new DefaultDamagerRepairer(getXMLScanner());
        reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
        reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);

        NonRuleBasedDamagerRepairer ndr = new NonRuleBasedDamagerRepairer(new TextAttribute(
                colorManager.getColor(IXMLColorConstants.XML_COMMENT)));
        reconciler.setDamager(ndr, XMLPartitionScanner.XML_COMMENT);
        reconciler.setRepairer(ndr, XMLPartitionScanner.XML_COMMENT);

        return reconciler;
View Full Code Here

    }

    protected XMLScanner getXMLScanner() {
        if (scanner == null) {
            scanner = new XMLScanner(colorManager);
            scanner.setDefaultReturnToken(new Token(new TextAttribute(colorManager
                    .getColor(IXMLColorConstants.DEFAULT))));
        }
        return scanner;
    }
View Full Code Here

    dr= new DefaultDamagerRepairer(JConsolePlugin.getDefault().getJavaDocScanner());
    reconciler.setDamager(dr, JavaPartitionScanner.JAVA_DOC);
    reconciler.setRepairer(dr, JavaPartitionScanner.JAVA_DOC);

    dr= new DefaultDamagerRepairer(new SingleTokenScanner(new TextAttribute(provider.getColor(JavaColorProvider.MULTI_LINE_COMMENT))));
    reconciler.setDamager(dr, JavaPartitionScanner.JAVA_MULTILINE_COMMENT);
    reconciler.setRepairer(dr, JavaPartitionScanner.JAVA_MULTILINE_COMMENT);

    return reconciler;
  }
View Full Code Here

   * @param provider the color provider
   */
   public JavaDocScanner(JavaColorProvider provider) {
    super();

    IToken keyword= new Token(new TextAttribute(provider.getColor(JavaColorProvider.JAVADOC_KEYWORD)));
    IToken tag= new Token(new TextAttribute(provider.getColor(JavaColorProvider.JAVADOC_TAG)));
    IToken link= new Token(new TextAttribute(provider.getColor(JavaColorProvider.JAVADOC_LINK)));

    List list= new ArrayList();

    // Add rule for tags.
    list.add(new SingleLineRule("<", ">", tag)); //$NON-NLS-2$ //$NON-NLS-1$
View Full Code Here

        reconciler.setDamager(dr, DRLPartionScanner.RULE_PART_CONTENT);
        reconciler.setRepairer(dr, DRLPartionScanner.RULE_PART_CONTENT);

        //finally, inside a multi line comment.
        dr = new DefaultDamagerRepairer(new SingleTokenScanner(
                new TextAttribute(ColorManager.getInstance().getColor(
                        ColorManager.SINGLE_LINE_COMMENT))));
        reconciler.setDamager(dr, DRLPartionScanner.RULE_COMMENT);
        reconciler.setRepairer(dr, DRLPartionScanner.RULE_COMMENT);

        return reconciler;
View Full Code Here

        StringConverter.asRGB(service.getStringPreference(FregePreferencesConstants.P_ERRORCOLOR),
            display.getSystemColor(SWT.COLOR_RED).getRGB()));
    Color spcColor = new Color (display,
        StringConverter.asRGB(service.getStringPreference(FregePreferencesConstants.P_SPECIALCOLOR),
            display.getSystemColor(SWT.COLOR_DARK_MAGENTA).getRGB()));
    commentAttribute = new TextAttribute(commColor, null, SWT.NORMAL);
    docuAttribute    = new TextAttribute(docuColor, null, SWT.ITALIC);
    normalAttribute  = null; // new TextAttribute(display.getSystemColor(SWT.COLOR_BLACK), null, SWT.NORMAL);
    keywordAttribute = new TextAttribute(keywdColor, null, SWT.BOLD);
    literalAttribute = new TextAttribute(litColor, null, SWT.NORMAL);
    errorAttribute   = new TextAttribute(errColor, null, SWT.NORMAL);
    specialAttribute = new TextAttribute(spcColor, null, SWT.BOLD);
   
    identAttribute   = new TextAttribute(varidColor, null, SWT.NORMAL);
    impAttribute     = new TextAttribute(importColor, null, italic ? SWT.ITALIC : SWT.NORMAL);
    iopAttribute     = new TextAttribute(importColor, null, SWT.NORMAL);
    nsAttribute      = new TextAttribute(tconColor,  null, boldns ? SWT.BOLD : SWT.NORMAL);
    typeAttribute   = new TextAttribute(tconColor,  null, SWT.NORMAL);
    itypeAttribute   = new TextAttribute(tconColor,  null, italic ? SWT.ITALIC : SWT.NORMAL);
    conAttribute     = new TextAttribute(dconColor,  null, SWT.NORMAL);
    iconAttribute    = new TextAttribute(dconColor,  null, italic ? SWT.ITALIC : SWT.NORMAL);
  }
View Full Code Here

  protected XMLScanner getXMLScanner() {
    if (scanner == null) {
      scanner = new XMLScanner(colorManager);
      scanner.setDefaultReturnToken(
        new Token(
          new TextAttribute(
            colorManager.getColor(XMLColorConstants.DEFAULT))));
    }
    return scanner;
  }
View Full Code Here

    protected XMLTagScanner getXMLTagScanner() {
    if (tagScanner == null) {
      tagScanner = new XMLTagScanner(colorManager);
      tagScanner.setDefaultReturnToken(
        new Token(
          new TextAttribute(
            colorManager.getColor(XMLColorConstants.TAG))));
    }
    return tagScanner;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.TextAttribute

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.