Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Adding code folding to a ProjectionViewer(How to add code folding feature to a projection viewer)
icon5.gif  Adding code folding to a ProjectionViewer [message #488393] Mon, 28 September 2009 14:13 Go to next message
J. Andres Pizarro is currently offline J. Andres PizarroFriend
Messages: 2
Registered: July 2009
Junior Member
Good evening,
I am trying to add code folding feature to a projection viewer inside a view. But i'm having some problems to understand how does this feature works, so i ask for your help.

What i have is a ProjectionViewer instance, providing it a Document object with a ProjectionAnnotationModel, specifying the positions where the ProjectionAnnotation instances are, that is...


Document doc = new Document(text);
ProjectionModelFactory factory = new ProjectionModelFactory(doc);
m_sourceViewer.setDocument(doc, factory.getAnnotationModel());
m_verticalRuler.setModel(factory.getAnnotationModel());


When the viewer is shown, projection annotation icons are shown, but when i click on them nothing happens.

I also installed a ProjectionSupport object, and I enabled projection in the widget. But still nothing happens...

Can anyone of you give me a hint about what to do next?

Thanks!
Re: Adding code folding to a ProjectionViewer [message #488500 is a reply to message #488393] Mon, 28 September 2009 22:54 Go to previous messageGo to next message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
On Mon, 28 Sep 2009 10:13:50 -0400, J. Andres Pizarro wrote:
> I am trying to add code folding feature to a projection viewer inside a
> view. But i'm having some problems to understand how does this feature
> works, so i ask for your help.

This article may help.
http://www.eclipse.org/articles/Article-Folding-in-Eclipse-T ext-Editors/
folding.html

Regards,
Remy
Re: Adding code folding to a ProjectionViewer [message #488521 is a reply to message #488500] Tue, 29 September 2009 06:16 Go to previous message
J. Andres Pizarro is currently offline J. Andres PizarroFriend
Messages: 2
Registered: July 2009
Junior Member
I followed that tutorial, it explains pretty well what to do, but in the end i don´t see anthin in the ProjectionRulerColumn

These are the steps i follow:

1. Create the projection viewer
2. Provide a Document to the viewer with an ProjectionAnnotationModel wih some ProjectionAnnotations
3. Install ProjectionSupport
4. Enable projection

But nothing happens! Sad

Can anyone help me? Thanks!
Previous Topic:How to update view size when new widgets are added?
Next Topic:Drag and Drop with view does not function
Goto Forum:
  


Current Time: Fri Mar 29 12:36:55 GMT 2024

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

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

Back to the top