You know what? I wasn't satisfied with someone else doing all the
work. :-) If you want to change some of the more challenging colors,
add the following to ClojuredevPlugin's static variables in
clojuredev.ClojuredevPlugin.java : [code]
public static Color[] allColors = new Color[] {
new Color(Display.getDefault(), 0x00, 0xCC, 0x00),
new Color(Display.getDefault(), 0x00, 0x88, 0xAA),
new Color(Display.getDefault(), 0x66, 0x00, 0xAA),
new Color(Display.getDefault(), 0x00, 0x77, 0x00),
new Color(Display.getDefault(), 0x77, 0xEE, 0x00),
new Color(Display.getDefault(), 0xFF, 0x88, 0x00)
};
[/code]
And to the beginning of the body of stop() in the same file : [code]
for(Color c : allColors)
{
c.dispose();
}
[/code]
Then change the array initializer for the variable parenLevelTokens in
the file
clojuredev.utils.editors.antlrbased.AntlrBasedTokenScanner.java to
read as follows : [code]
private IToken[] parenLevelTokens = new IToken[] {
new org.eclipse.jface.text.rules.Token(new TextAttribute
(Display.getDefault().getSystemColor(SWT.COLOR_RED))),
new org.eclipse.jface.text.rules.Token(new TextAttribute
(ClojuredevPlugin.allColors[0])),
new org.eclipse.jface.text.rules.Token(new TextAttribute
(Display.getDefault().getSystemColor(SWT.COLOR_GRAY))),
new org.eclipse.jface.text.rules.Token(new TextAttribute
(Display.getDefault().getSystemColor(SWT.COLOR_MAGENTA))),
new org.eclipse.jface.text.rules.Token(new TextAttribute
(ClojuredevPlugin.allColors[1])),
new org.eclipse.jface.text.rules.Token(new TextAttribute
(ClojuredevPlugin.allColors[2])),
new org.eclipse.jface.text.rules.Token(new TextAttribute
(ClojuredevPlugin.allColors[3])),
new org.eclipse.jface.text.rules.Token(new TextAttribute
(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY))),
new org.eclipse.jface.text.rules.Token(new TextAttribute
(ClojuredevPlugin.allColors[4])),
new org.eclipse.jface.text.rules.Token(new TextAttribute
(Display.getDefault().getSystemColor(SWT.COLOR_DARK_BLUE))),
new org.eclipse.jface.text.rules.Token(new TextAttribute
(ClojuredevPlugin.allColors[5])),
new org.eclipse.jface.text.rules.Token(new TextAttribute
(Display.getDefault().getSystemColor(SWT.COLOR_DARK_CYAN)))
};
[/code]
That should change Rainbow-Paren to work as more of a rainbow and less
of a "dark grayish streak." Plus, the non-system colors are taken
care of by dispose() called when the plugin calls stop() . It isn't
perfect, but it seems to work -- not sure about memory, but that
should do the trick. I have next to no experience with patches, so
sorry this post is so shoddy.
On Jan 20, 10:47 pm, Laurent PETIT <
laurent.pe...@gmail.com> wrote:
> Hello,
>
> 2009/1/21 T. Ettinger <
tommy.ettin...@gmail.com>
> ...
>
> read more »