Examples of SingleLineRule


Examples of org.eclipse.jface.text.rules.SingleLineRule

        IToken ATToken = new Token( provider.getAttribute( SchemaTextAttributeProvider.ATTRIBUTETYPE_ATTRIBUTE ) );
        IToken OCToken = new Token( provider.getAttribute( SchemaTextAttributeProvider.OBJECTCLASS_ATTRIBUTE ) );
        IToken oid = new Token( provider.getAttribute( SchemaTextAttributeProvider.OID_ATTRIBUTE ) );

        // Rules for Strings
        rules.add( new SingleLineRule( "\"", "\"", string, '\0', true ) ); //$NON-NLS-1$ //$NON-NLS-2$
        rules.add( new SingleLineRule( "'", "'", string, '\0', true ) ); //$NON-NLS-1$ //$NON-NLS-2$
        // Generic rule for whitespaces
        rules.add( new WhitespaceRule( new IWhitespaceDetector()
        {
            /**
             * Indicates if the given character is a whitespace
View Full Code Here

Examples of org.eclipse.jface.text.rules.SingleLineRule

            .getAttribute( ACITextAttributeProvider.AUTHENTICATIONLEVEL_ATTRIBUTE ) );
        IToken itemOrUserFirst = new Token( provider.getAttribute( ACITextAttributeProvider.ITEMORUSERFIRST_ATTRIBUTE ) );
        IToken user = new Token( provider.getAttribute( ACITextAttributeProvider.USER_ATTRIBUTE ) );

        // Rules for Strings
        rules.add( new SingleLineRule( "\"", "\"", string, '\0', true ) ); //$NON-NLS-1$ //$NON-NLS-2$
        rules.add( new SingleLineRule( "'", "'", string, '\0', true ) ); //$NON-NLS-1$ //$NON-NLS-2$
        // Generic rule for whitespaces
        rules.add( new WhitespaceRule( new IWhitespaceDetector()
        {
            /**
             * Indicates if the given character is a whitespace
View Full Code Here

Examples of org.eclipse.jface.text.rules.SingleLineRule

        new MultiLineRule("***(", ")", commentToken),
        keyModRule,
        keyModEltRule,
        keyStatRule,
        keyAttrRule,
        new SingleLineRule("\"", "\"", stringToken),
        new SingleLineRule("'", " ", stringToken)
        new EndOfLineRule("***", commentToken),
        new EndOfLineRule("---", commentToken),     
        new WhitespaceRule(new WhitespaceDetector())

    });
View Full Code Here

Examples of org.eclipse.jface.text.rules.SingleLineRule

    // Add rule for processing instructions
        keyModRule,
        keyModEltRule,
        keyStatRule,
        keyAttrRule,
        new SingleLineRule("\"", "\"", stringToken),
        new SingleLineRule("'", " ", stringToken),
        new MultiLineRule("***(", ") ", commentToken),
        new EndOfLineRule("***", commentToken),
        new EndOfLineRule("---", commentToken),     
        new WhitespaceRule(new WhitespaceDetector())

View Full Code Here

Examples of org.eclipse.jface.text.rules.SingleLineRule

    IToken defaultText = new Token(new TextAttribute(provider.getColor(JsonColorProvider.DEFAULT)));
    IToken nullValue = new Token(new TextAttribute(provider.getColor(JsonColorProvider.NULL)));
   
    List<IRule> rules= new LinkedList<IRule>();
   
    rules.add(new SingleLineRule(":\"", "\"", value, '\\'));
    rules.add(new SingleLineRule("\"", "\"", string, '\\')); //$NON-NLS-2$ //$NON-NLS-1$
    WordRule wordRule= new WordRule(new JsonWordDetector(), defaultText);
    wordRule.addWord("null", nullValue);
    rules.add(wordRule);
    rules.add(new WhitespaceRule(new JsonWhitespaceDetector()));
   
View Full Code Here

Examples of org.eclipse.jface.text.rules.SingleLineRule

        // CheckStyle:MagicNumber| OFF
        IRule[] rules = new IRule[3];
        // CheckStyle:MagicNumber| ON

        // Add rule for double quotes
        rules[0] = new SingleLineRule("\"", "\"", string, '\\');
        // Add a rule for single quotes
        rules[1] = new SingleLineRule("'", "'", string, '\\');
        // Add generic whitespace rule.
        rules[2] = new WhitespaceRule(new XMLWhitespaceDetector());

        setRules(rules);
    }
View Full Code Here

Examples of org.eclipse.jface.text.rules.SingleLineRule

        IToken procInstr = new Token(new TextAttribute(manager
                .getColor(IXMLColorConstants.PROC_INSTR)));

        IRule[] rules = new IRule[2];
        // Add rule for processing instructions
        rules[0] = new SingleLineRule("<?", "?>", procInstr);
        // Add generic whitespace rule.
        rules[1] = new WhitespaceRule(new XMLWhitespaceDetector());

        setRules(rules);
    }
View Full Code Here

Examples of org.eclipse.jface.text.rules.SingleLineRule

      ruleListe.add(new EndOfLineRule (s, comment));
    }
//    ruleListe.add(new EndOfLineRule ("--", comment));
//    ruleListe.add(new EndOfLineRule("//",comment));
    ruleListe.add(new MultiLineRule("/*","*/",comment,(char)0,true));
    ruleListe.add(new SingleLineRule("\"", "\"", string));
    ruleListe.add(new SingleLineRule("'", "'", string));
    ruleListe.add(new WhitespaceRule(new QVTWhitespaceDetector()));
    ruleListe.add(wr);
    IRule[] rules = new IRule[ruleListe.size()];
    for (int i=0; i<ruleListe.size();i++)
    {
View Full Code Here

Examples of org.eclipse.jface.text.rules.SingleLineRule

    IToken string  = colorProvider.getToken(HTMLPlugin.PREF_COLOR_JSSTRING);
    IToken comment = colorProvider.getToken(HTMLPlugin.PREF_COLOR_JSCOMMENT);
    IToken keyword = colorProvider.getToken(HTMLPlugin.PREF_COLOR_JSKEYWORD);
   
    List<IRule> rules = new ArrayList<IRule>();
    rules.add(new SingleLineRule("\"", "\"", string, '\\'));
    rules.add(new SingleLineRule("'", "'", string, '\\'));
    rules.add(new EndOfLineRule("//", comment));
   
    WordRule wordRule = new WordRule(new JavaWordDetector(), normal);
    for(int i=0;i<KEYWORDS.length;i++){
      wordRule.addWord(KEYWORDS[i], keyword);
View Full Code Here

Examples of org.eclipse.jface.text.rules.SingleLineRule

  protected List<IRule> createRules(ColorProvider colorProvider) {
    IToken tag = colorProvider.getToken(HTMLPlugin.PREF_COLOR_TAG);
    IToken comment = colorProvider.getToken(HTMLPlugin.PREF_COLOR_JSCOMMENT);
   
    List<IRule> rules = super.createRules(colorProvider);
    rules.add(new SingleLineRule("<script", ">", tag));
    rules.add(new SingleLineRule("</script", ">", tag));
    rules.add(new MultiLineRule("/*", "*/", comment));
   
    return rules;
  }
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.