Folding & Hoover support [message #160056] |
Mon, 10 July 2006 09:30  |
Eclipse User |
|
|
|
Originally posted by: wolfgang.moestl.softwareag.com
Hi,
I'm struggling with the Hoover support for folded regions.
Ive 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  |
Eclipse User |
|
|
|
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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.07242 seconds