|
Re: How to add my problem entries to problemview [message #481202 is a reply to message #481198] |
Thu, 20 August 2009 06:55 |
|
If problmes is related with specific resource,
IResource.createMarker("org.eclipse.core.resources.problemmarker ")
creates marker, and it will be displayed on problems view.
Li Junhong wrote:
> Hi All,
>
> In our rcp, before sending a model to the our own analyse engine, we
> need to check if the model is valid. And if we find there are some
> problems or errors defined by us, I want to display them in the problem
> view.
>
> Does problem view support this? How to realize it?
>
> Any comments are welcome. Thanks!!
>
> Li
>
|
|
|
Re: How to add my problem entries to problemview [message #481206 is a reply to message #481198] |
Thu, 20 August 2009 07:01 |
|
If problmes is related with specific resource,
IResource.createMarker("org.eclipse.core.resources.problemmarker ")
creates marker, and it will be displayed on problems view.
You can use some attributes to specify problems, see constants on IMarker.
when you double click the problem in problems view, Related editor will
be opened and be requested show the problem through IGotoMarker.class
adapter. So your editor (or view) has to respond that adapter query, or
just implements that interface.
and implement IGotoMarker#gotoMarker(IMarker marker) which doing
generally sets focus and shows the problem on editor.
Li Junhong wrote:
> Hi All,
>
> In our rcp, before sending a model to the our own analyse engine, we
> need to check if the model is valid. And if we find there are some
> problems or errors defined by us, I want to display them in the problem
> view.
>
> Does problem view support this? How to realize it?
>
> Any comments are welcome. Thanks!!
>
> Li
>
|
|
|
Re: How to add my problem entries to problemview [message #481209 is a reply to message #481206] |
Thu, 20 August 2009 07:26 |
Li Junhong Messages: 1012 Registered: July 2009 |
Senior Member |
|
|
Thanks so much!!
But if my model is only built up in memory and the problems are not
related with specific resource? How can I do that?
Suppose I don't need to locate the problem when I double click the problem
entry.
Jiyul wrote:
> If problmes is related with specific resource,
> IResource.createMarker("org.eclipse.core.resources.problemmarker ")
> creates marker, and it will be displayed on problems view.
> You can use some attributes to specify problems, see constants on IMarker.
> when you double click the problem in problems view, Related editor will
> be opened and be requested show the problem through IGotoMarker.class
> adapter. So your editor (or view) has to respond that adapter query, or
> just implements that interface.
> and implement IGotoMarker#gotoMarker(IMarker marker) which doing
> generally sets focus and shows the problem on editor.
[Updated on: Fri, 21 August 2009 01:45] Report message to a moderator
|
|
|
Re: How to add my problem entries to problemview [message #481438 is a reply to message #481209] |
Fri, 21 August 2009 01:43 |
|
Li Junhong wrote:
> But if my model is only built up in memory and the problems are not
> related with specific resource? How can I do that?
ProblemsView is a marker based view, and IMarker is some kind of
metadata of IResource.class. So I think, there is no way to get what you
want.
How about to make a marker which is related with IProject?
> Suppose I don't need to locate the problem when I double click the
> problem entry.
I can sure your boss and client don't think same with you. :)
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03036 seconds