Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » dynamically installing a presentation reconciler
dynamically installing a presentation reconciler [message #107489] Wed, 06 August 2003 13:30 Go to next message
Eclipse User
Originally posted by: lyjr.ifrance.com

Hi,

I have a PresentationReconciler which defines the rules of syntax
highlighting for my editor.

I have associated this PresentationReconciler to the SourceViewer of
my editor using presentationReconciler.install(getSourceViewer())
from my editor class.

The user can choose the colors of syntax highlighting from a
preference page.

My problem is that when the user change a color, the editor does not
apply the change : the editor must be closed and then re-opened.

I've tried to add this code in the handlePreferenceStoreChanged
method of my text editor (which is a TextEditor) :

presentationReconciler.uninstall();
presentationReconciler = new MyPresentationReconciler();
presentationReconciler.install(sourceViewer);

.... but it doesn't work.

I've tried many other things, but without success.

Anyone can help me, please ?
Re: dynamically installing a presentation reconciler [message #697964 is a reply to message #107489] Mon, 18 July 2011 13:29 Go to previous message
Fabrizio  is currently offline Fabrizio
Messages: 1
Registered: July 2011
Junior Member
I, i have solved this issue in this way.
I have reinitialized the SourceViewerConfiguration and reinstalled it in the viewer.

MySourceViewerConfiguration newConf = MySourceViewerConfiguration();

setSourceViewerConfiguration(newConf);

IPresentationReconciler reconciler = newConf.getPresentationReconciler(myViewer);

if(reconciler!=null){
reconciler.install(viewer);
}

I hope this will help you too.
Previous Topic:"Program arguments" greyed out
Next Topic:Making view visible throws IndexOutOfBoundsException
Goto Forum:
  


Current Time: Thu Oct 02 00:38:31 GMT 2014

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

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