Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Problem with adding tooltip for anntation
Problem with adding tooltip for anntation [message #280755] Wed, 09 February 2005 02:18 Go to next message
Eclipse UserFriend
How can i add tooltip for error annotation marker in text editor?

I try this code that shown error marker in proper line, but error marker
have no tooltip.

--skip--
annotationModel.addAnnotation(new MyAnnotation(),new Position(...));
--skip--

class MyAnnotation() extends Annotation
{
public static final String ERROR_ANNOTATION_TYPE=
"org.eclipse.ui.workbench.texteditor.error"; //$NON-NLS-1$

public MyAnnotation()
{
setType(ERROR_ANNOTATION_TYPE);
setText("My annotation error msg");
}
}
Re: Problem with adding tooltip for anntation [message #280807 is a reply to message #280755] Thu, 10 February 2005 06:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

mishaa wrote:

> How can i add tooltip for error annotation marker in text editor?
>
> I try this code that shown error marker in proper line, but error
> marker have no tooltip.

Are you talking about the built-in text editor or about one that you
provide yourself?

Dani

>
> --skip--
> annotationModel.addAnnotation(new MyAnnotation(),new Position(...));
> --skip--
>
> class MyAnnotation() extends Annotation
> {
> public static final String ERROR_ANNOTATION_TYPE=
> "org.eclipse.ui.workbench.texteditor.error"; //$NON-NLS-1$
>
> public MyAnnotation()
> {
> setType(ERROR_ANNOTATION_TYPE);
> setText("My annotation error msg");
> }
> }
>
>
Re: Problem with adding tooltip for anntation [message #280842 is a reply to message #280807] Fri, 11 February 2005 00:13 Go to previous message
Eclipse UserFriend
arker have no tooltip.

> Are you talking about the built-in text editor or about one that you
> provide yourself?

> Dani

About my text editor.


class MyTextEditor extends TextEditor
{
protected ISourceViewer createSourceViewer(Composite parent,
IVerticalRuler ruler, int styles)
{
ISourceViewer viewer= new ProjectionViewer(parent, ruler,
getOverviewRuler(), true, styles);
getSourceViewerDecorationSupport(viewer);
return viewer;
}

....
}
Previous Topic:Programatically passing arguments to ViewPart instances
Next Topic:How can I mix menu contributions by plugin.xml and workbenchAdvisor ?
Goto Forum:
  


Current Time: Tue Jul 15 10:25:06 EDT 2025

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

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

Back to the top