Parser messages in problems view [message #498363] |
Mon, 16 November 2009 10:45  |
Eclipse User |
|
|
|
I try to create a text editor with IMP, and generally I like the system.
My most serious problem with it is that the error messages of the parser appear only as annotations together with the source, but not in the problems view.
I looked at the "Editor annotation creator" wizard as it seems to be doing what I need, but it uses an undefined extension point, so it doesn't work.
I didn't find any obvious way to create these markers in a programmatic way as I couldn't get any reference
Can you help me how to create the specific markers needed for Problems view?
Thanks for your response,
Zoltán Ujhelyi
|
|
|
Re: Parser messages in problems view [message #501090 is a reply to message #498363] |
Mon, 30 November 2009 17:47   |
Eclipse User |
|
|
|
Hi there,
[Somehow Thunderbird didn't show me this message, even though I've been
checking the newsgroup every so often... sorry!]
Zoltán Ujhelyi wrote:
> I try to create a text editor with IMP, and generally I like the system.
>
> My most serious problem with it is that the error messages of the parser
> appear only as annotations together with the source, but not in the
> problems view.
Generally, the messages found in the Problems view are created by an
incremental builder. Basically, they're just markers (cf. annotations)
placed on workspace resources (usually files).
To see how that's done, look at the method createMarker() on the class
BuilderBase.
Technically, there's nothing preventing your parser (or IMessageHandler
implementation) from doing that, but you have to be careful to delete
old markers before adding new ones when you re-parse.
Hope that helps...
> I looked at the "Editor annotation creator" wizard as it seems to be
> doing what I need, but it uses an undefined extension point, so it
> doesn't work.
>
> I didn't find any obvious way to create these markers in a programmatic
> way as I couldn't get any reference
>
> Can you help me how to create the specific markers needed for Problems
> view?
--
Cheers,
-- Bob
--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center
IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
|
|
|
|
|
|
|
|
|
Re: Parser messages in problems view [message #576879 is a reply to message #498363] |
Mon, 30 November 2009 17:47  |
Eclipse User |
|
|
|
Hi there,
[Somehow Thunderbird didn't show me this message, even though I've been
checking the newsgroup every so often... sorry!]
Zoltán Ujhelyi wrote:
> I try to create a text editor with IMP, and generally I like the system.
>
> My most serious problem with it is that the error messages of the parser
> appear only as annotations together with the source, but not in the
> problems view.
Generally, the messages found in the Problems view are created by an
incremental builder. Basically, they're just markers (cf. annotations)
placed on workspace resources (usually files).
To see how that's done, look at the method createMarker() on the class
BuilderBase.
Technically, there's nothing preventing your parser (or IMessageHandler
implementation) from doing that, but you have to be careful to delete
old markers before adding new ones when you re-parse.
Hope that helps...
> I looked at the "Editor annotation creator" wizard as it seems to be
> doing what I need, but it uses an undefined extension point, so it
> doesn't work.
>
> I didn't find any obvious way to create these markers in a programmatic
> way as I couldn't get any reference
>
> Can you help me how to create the specific markers needed for Problems
> view?
--
Cheers,
-- Bob
--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center
IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
|
|
|
Re: Parser messages in problems view [message #576896 is a reply to message #501090] |
Wed, 02 December 2009 04:18  |
Eclipse User |
|
|
|
Thank you for your answer.
I knew how to create error markers, only I could not find where to do this.
I looked again into the code, and found where to add new MessageHandlers to the system, and there I could solve the problem.
On the other hand, can you tell me, what does (or should) the "Editor annotation creator" extension point do?
Thank you again for your help,
Zoltán Ujhelyi
|
|
|
Re: Parser messages in problems view [message #576920 is a reply to message #501414] |
Wed, 02 December 2009 19:06  |
Eclipse User |
|
|
|
Zoltán Ujhelyi wrote:
> Thank you for your answer.
>
> I knew how to create error markers, only I could not find where to do this.
>
> I looked again into the code, and found where to add new MessageHandlers
> to the system, and there I could solve the problem.
>
> On the other hand, can you tell me, what does (or should) the "Editor
> annotation creator" extension point do?
You don't need one - it's an optional service. It's a relatively general-
purpose hook for you to add other kinds of annotations to your editor,
usually based on the content of the file's AST. I *think* we've used it
to create annotations from "TODO" comments. *I think*.
Hope that helps!
--
Cheers,
-- Bob
--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center
IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
|
|
|
Re: Parser messages in problems view [message #576943 is a reply to message #501596] |
Thu, 03 December 2009 02:59  |
Eclipse User |
|
|
|
Thanks for your quick answer. I think, that extension point could be useful - for similar reasons you listed, but it is not working - only there is a wizard for creating one.
I suggest either removing that wizard or (re-)adding that extension point.
Thanks,
Zoltán
|
|
|
Re: Parser messages in problems view [message #576963 is a reply to message #576943] |
Thu, 03 December 2009 09:09  |
Eclipse User |
|
|
|
Zoltán Ujhelyi wrote:
> Thanks for your quick answer. I think, that extension point could be
> useful - for similar reasons you listed, but it is not working - only
> there is a wizard for creating one.
>
> I suggest either removing that wizard or (re-)adding that extension point.
Hmmm... Can you post a bug report on bugzilla?
--
Cheers,
-- Bob
--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center
IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.32756 seconds