Examples of TextAttribute


Examples of org.eclipse.jface.text.TextAttribute

   * @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

Examples of org.eclipse.jface.text.TextAttribute

        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

Examples of org.eclipse.jface.text.TextAttribute

        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

Examples of org.eclipse.jface.text.TextAttribute

  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

Examples of org.eclipse.jface.text.TextAttribute

    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

Examples of org.eclipse.jface.text.TextAttribute

    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);

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

    return reconciler;
View Full Code Here

Examples of org.eclipse.jface.text.TextAttribute

     * Construct a new XMLScanner.
     * @param manager The ColorManager associated with this XMLScanner.
     */
    public XMLScanner(ColorManager manager) {
        IToken procInstr =
                new Token(new TextAttribute(
                        manager.getColor(XMLColorConstants.PROC_INSTR)));

        IRule[] rules = new IRule[2];
        //Add rule for processing instructions
        rules[0] = new SingleLineRule("<?", "?>", procInstr); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

Examples of org.eclipse.jface.text.TextAttribute

    // Add generic whitespace rule.
    rules[0] = new WhitespaceRule(new WhitespaceDetector());

    setRules(rules);
        setDefaultReturnToken(new Token(new TextAttribute(manager.getTextColor())));
  }
View Full Code Here

Examples of org.eclipse.jface.text.TextAttribute

import org.eclipse.jface.text.rules.WhitespaceRule;

public class SentenceScanner extends RuleBasedScanner {

  public SentenceScanner(ColorManager manager) {
    IToken string = new Token(new TextAttribute(manager.getStringColor()));
        final Token terminals = new Token(new TextAttribute(manager.getTerminalsColor()));
        Token template = new Token(new TextAttribute(manager.getTemplateColor()));
        Token keyword = new Token(new TextAttribute(manager.getKeywordsColor()));
        Token others = new Token(new TextAttribute(manager.getOtherColor()));

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

    // Add rule for double quotes
    rules.add(new SingleLineRule("\"", "\"", string, '\\'));
View Full Code Here

Examples of org.eclipse.jface.text.TextAttribute

import org.eclipse.jface.text.rules.WhitespaceRule;

public class XMLTagScanner extends RuleBasedScanner {

    public XMLTagScanner(ColorManager manager) {
        IToken string = new Token(new TextAttribute(manager.getColor(IXMLColorConstants.STRING)));

        IRule[] rules = new IRule[3];

        // Add rule for double quotes
        rules[0] = new SingleLineRule("\"", "\"", string, '\\');
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.