Skip to main content



      Home
Home » Newcomers » Newcomers » Folding & Hoover support
Folding & Hoover support [message #160056] Mon, 10 July 2006 09:30 Go to next message
Eclipse UserFriend
Originally posted by: wolfgang.moestl.softwareag.com

Hi,

I'm struggling with the Hoover support for folded regions.

I’ve set my fProjectionSupport as shown in the docs:

8<==============================================
public void createPartControl(Composite parent) {
super.createPartControl(parent);
ProjectionViewer projectionViewer= (ProjectionViewer) getSourceViewer();
fProjectionSupport= new ProjectionSupport(projectionViewer,
getAnnotationAccess(), getSharedColors());

fProjectionSupport.setHoverControlCreator(new
IInformationControlCreator() {
public IInformationControl createInformationControl(Shell shell) {
return new DefaultInformationControl(shell);
}
});
fProjectionSupport.install();

projectionViewer.doOperation(ProjectionViewer.TOGGLE);
annotationModel = ProjectionViewer.getProjectionAnnotationModel();
}
===============================================>8

The folding itself works, but the hoover text showing the "folded" area
does not show up.
It should come if the mouse stays over a collapsed folding icon, correct?


Second question: is it possible to change the "-" and "+" icons for
folding?

Thanks a lot!

Best regards,
Wolf
Re: Folding & Hoover support [message #161226 is a reply to message #160056] Mon, 17 July 2006 06:02 Go to previous message
Eclipse UserFriend
Wolfgang wrote:

> Hi,
>
> I'm struggling with the Hoover support for folded regions.
>
> I�ve set my fProjectionSupport as shown in the docs:
>
> 8<==============================================
> public void createPartControl(Composite parent) {
> super.createPartControl(parent);
> ProjectionViewer projectionViewer= (ProjectionViewer) getSourceViewer();
> fProjectionSupport= new ProjectionSupport(projectionViewer,
> getAnnotationAccess(), getSharedColors());
> fProjectionSupport.setHoverControlCreator(new
> IInformationControlCreator() {
> public IInformationControl createInformationControl(Shell shell) {
> return new DefaultInformationControl(shell);
> }
> });
> fProjectionSupport.install();
>
> projectionViewer.doOperation(ProjectionViewer.TOGGLE);
> annotationModel = ProjectionViewer.getProjectionAnnotationModel();
> }
> ===============================================>8
>
> The folding itself works, but the hoover text showing the "folded"
> area does not show up. It should come if the mouse stays over a
> collapsed folding icon, correct?

Yes the hover should appear. I suggest to start debugging into
ProjectionAnnotationHover.getHoverInfo(ISourceViewer, ILineRange, int)

>
>
> Second question: is it possible to change the "-" and "+" icons for
> folding?

Yes, simply create your own projection annotations by subclassing
ProjectionAnnotation and overwrite paint(...).

Dani

>
> Thanks a lot!
>
> Best regards,
> Wolf
>
>
Previous Topic:Q on Externalizing strings: What is Eclipse's Mechanism?
Next Topic:eclipse problem
Goto Forum:
  


Current Time: Sat Jul 19 09:30:55 EDT 2025

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

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

Back to the top