How to create Marker on elements which are not IResource? [message #510612] |
Wed, 27 January 2010 19:37  |
Eclipse User |
|
|
|
Any tips on how to create the Marker on the element which is not of type IResource, but just any PlatformObject sub-type.
Just like a class can have methods which are not the actual resources, so we can show both IResource and simple platform objects in project explorer, but how to create the markers on the non resource items?
I know JDT does this by creating the marker on "SourceMethod" which is not the actual resource? Any tips will be helpful here.
TIA
|
|
|
|
Re: How to create Marker on elements which are not IResource? [message #510885 is a reply to message #510653] |
Thu, 28 January 2010 19:24   |
Eclipse User |
|
|
|
Thanks Dani,
I see, so the marker is actually set on the IResource of the workbench root, than I wonder, where is the code for showing the "SourceMethod" with the problem marker icon in the project explorer and package explorer, how is that handled? So, do you guys do this manually somewhere? Can you point me to the code?
Also, how does open the problem view double clicks works for you than, because if the marker is not set on the actual IResource, than IDE.openEditor(IWorkbenchPage, IMarker) simply returns null.
|
|
|
Re: How to create Marker on elements which are not IResource? [message #511669 is a reply to message #510885] |
Tue, 02 February 2010 03:46   |
Eclipse User |
|
|
|
MG wrote:
> Thanks Dani,
>
> I see, so the marker is actually set on the IResource of the workbench
> root, than I wonder, where is the code for showing the "SourceMethod"
> with the problem marker icon
JDT does not add errors to non-resources.
> in the project explorer and package explorer, how is that handled? So,
> do you guys do this manually somewhere? Can you point me to the code?
>
> Also, how does open the problem view double clicks works for you than,
> because if the marker is not set on the actual IResource, than
> IDE.openEditor(IWorkbenchPage, IMarker) simply returns null.
This won't work out of the box but if you have your own editor then you
can let it handle the workspace root as input and then fetch the info
from the marker.
Dani
|
|
|
|
Re: How to create Marker on elements which are not IResource? [message #511709 is a reply to message #511700] |
Tue, 02 February 2010 10:51  |
Eclipse User |
|
|
|
MG wrote:
> Hello there,
>
> I can handle the editor open event, no problem, my main concern is
> how, will the marker icon will be shown on my resource in project
> explorer? How will project explorer know, that it needs to show marker
> icon on my domain model element which is not IResource?
It won't.
Dani
|
|
|
Powered by
FUDForum. Page generated in 0.03773 seconds