Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Use EclipseColorer in own RCP application
Use EclipseColorer in own RCP application [message #908916] Thu, 06 September 2012 08:20 Go to next message
Ricky de Klerck is currently offline Ricky de KlerckFriend
Messages: 295
Registered: January 2011
Senior Member
Hi,

I discovered the EclipseColorer plugin (http://colorer.sourceforge.net/eclipsecolorer/) and I want to use it in my own project so I can achieve SQL syntax coloring. I installed the plugin and i added the net.sf.colorer to my extensions and I have this line of code:

styledTextStatement = new StyledText(this, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL | SWT.MULTI);
styledTextStatement.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
TextColorer textColorer = new TextColorer(new ParserFactory("plugins/net.sf.colorer_0.9.9/colorer/catalog.xml"), new ColorManager());
textColorer.attach(styledTextStatement);
textColorer.chooseFileType(".sql");


But nothing happens? Does anyone know what I'm doing wrong here? And is the part where I construct the ParserFactory the right one? I hope someone has some experience with this plugin.
Re: Use EclipseColorer in own RCP application [message #908929 is a reply to message #908916] Thu, 06 September 2012 08:41 Go to previous message
Ricky de Klerck is currently offline Ricky de KlerckFriend
Messages: 295
Registered: January 2011
Senior Member
I've found it! This code needs to be added too:

textColorer.setCross(true, true);
textColorer.setRegionMapper("default", true);


I only wonder if this works on Mac out of the box..
Previous Topic:StyleRange uppercase
Next Topic:Programmatically import pre-existing project from other workspace
Goto Forum:
  


Current Time: Tue Oct 08 10:18:21 GMT 2024

Powered by FUDForum. Page generated in 0.03644 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top