Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to add marker in the task view ?
How to add marker in the task view ? [message #287218] Mon, 27 June 2005 12:17 Go to next message
Eclipse UserFriend
Hello,

I have read the "Make my words" article on Eclipse corner. I try to add
marker in the task view. I want to add marker on files, but I don't know
how to add marker on. Have you got code sample with use of markers or
web site to help me ?

Best regards,
Re: How to add marker in the task view ? [message #287366 is a reply to message #287218] Wed, 29 June 2005 05:39 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I can add marker on a resource, but they don't appear in task view. How
to do that ? Have you got any code sample with use of task view ?

Sandrine Soudant a écrit :
> Hello,
>
> I have read the "Make my words" article on Eclipse corner. I try to add
> marker in the task view. I want to add marker on files, but I don't know
> how to add marker on. Have you got code sample with use of markers or
> web site to help me ?
>
> Best regards,
>
Re: How to add marker in the task view ? [message #287370 is a reply to message #287366] Wed, 29 June 2005 06:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hcs33.egon.gyaloglo.hu

Hi,

Maybe your marker type is not enabled to show in the Tasks view. See
'Filters...' in the menu of this view and enable your marker type in the
list.

HTH,
Regards,
Csaba

Sandrine Soudant wrote:
> Hi,
>
> I can add marker on a resource, but they don't appear in task view. How
> to do that ? Have you got any code sample with use of task view ?
>
> Sandrine Soudant a
Re: How to add marker in the task view ? [message #287372 is a reply to message #287370] Wed, 29 June 2005 07:05 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I create a IMarker on a file. On the workbench, in the 'Filters...' page
I use default properties. Does I miss to do something ?

Thanks for your help.

" Horv������������������
Re: How to add marker in the task view ? [message #287387 is a reply to message #287372] Wed, 29 June 2005 09:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hcs33.egon.gyaloglo.hu

Hi,

How do you create your marker? Is it a standard type or you define your own
marker type using the 'org.eclipse.core.resources.markers' extension point?

If you define your own marker type it should have a name (defined in your
plugin.xml file). When running your plugin, in the runtime workbench select
the Tasks view and select Filters... . You should see your marker type in it
(in the 'Show items of type' table). If the checkbox of your marker type is
not selected, select it. Also select 'on any resource' and your marker
should be displayed in the Tasks view.
Afaik if you extended the problem marker, you have to use the Problems view
instead of Tasks but the steps above are the same in this view as well.

The 'Platform Plugin Developer Guide' > 'Programmer's Guide' > 'Resources
Overview' > 'Resource markers' in the Eclipse SDK Help contains some useful
information about markers and their correct usage. You should read it if you
haven't done it yet.

HTH,
Regards,
Csaba

Sandrine Soudant wrote:
> Hi,
>
> I create a IMarker on a file. On the workbench, in the 'Filters...' page
> I use default properties. Does I miss to do something ?
>
> Thanks for your help.
>
> "Horv????????????????????????????????????" a
Re: How to add marker in the task view ? [message #287438 is a reply to message #287366] Wed, 29 June 2005 19:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

This is a FAQ. Use MarkerUtilities to create your markers. It goes
through the necessary undocumented mumbo-jumbo to make it work.

Bob

Sandrine Soudant wrote:
> Hi,
>
> I can add marker on a resource, but they don't appear in task view. How
> to do that ? Have you got any code sample with use of task view ?
>
> Sandrine Soudant a écrit :
>
>> Hello,
>>
>> I have read the "Make my words" article on Eclipse corner. I try to
>> add marker in the task view. I want to add marker on files, but I
>> don't know how to add marker on. Have you got code sample with use of
>> markers or web site to help me ?
>>
>> Best regards,
>>
>
Re: How to add marker in the task view ? [message #287458 is a reply to message #287387] Thu, 30 June 2005 05:59 Go to previous message
Eclipse UserFriend
Hi,

Now, it works. Thanks for your efficiently support.

In the plugin.xml, I have :
<extension id="marker" name="StateMachineMarker"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.core.resources.problemmarker"/>
<super type="org.eclipse.core.resources.textmarker"/>
<persistent value="true"/>
</extension>

I delete all markers on this resource.
resource.deleteMarkers(null, true, IResource.DEPTH_INFINITE);

I create a marker with the next code :
IMarker marker = resource.createMarker("sm4Eclipse_3_0.editor.marker");
marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_HIGH);
marker.setAttribute(IMarker.MESSAGE, "my error message");

I display the precedent marker with :
IWorkbenchPage activePage = window.getActivePage();
if (activePage != null)
MarkerViewUtil.showMarker(activePage, marker, true);

My error was that I don't create the marker with the good identifier.

Thanks for your support.

" Horv������������������
Previous Topic:Views and changing Focus
Next Topic:TreeViewer refresh without collapsing the opened leaves
Goto Forum:
  


Current Time: Tue Nov 04 06:13:43 EST 2025

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

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

Back to the top