First question:
Hi guys! I trying to understand how to make a custom editor in Eclipse using the plugin example with the XML editor. I'm not getting something:
public class XMLPartitionScanner extends RuleBasedPartitionScanner {
public final static String XML_COMMENT = "__xml_comment";
public final static String XML_TAG = "__xml_tag";
public XMLPartitionScanner() {
IToken xmlComment = new Token(XML_COMMENT);
IToken tag = new Token(XML_TAG);
IPredicateRule[] rules = new IPredicateRule[2];
rules[0] = new MultiLineRule("<!--", "-->", xmlComment);
rules[1] = new TagRule(tag);
setPredicateRules(rules);
}
}
What if in my case a single instruction is something like this?
font( arial, bold, 20) ( (v.degree >= 3 ) AND NOT ( v.label == "Roma" ) )\n
where the last char is the \n but the initial char could be any letter in the alphabet? Could I use a regexp in SingleLineRule?
Second question:
Since my text is a list of instruction like the one above, does it make sense to just have two partition? One for the comments and one for the instructions?
Third question:
I've already have my parser created with sableCC. Is it possibile to integrate it with the editor?