views:

41

answers:

1

As you know, If package has a compile error then the package display an error sign. Error sign means Red circle with 'X'.

My package has some other type file. (It is not a Java file.) If user modify the file then My plugin will inspect the file. And should display error sign on the package if the file has wrong information.

How can I display the error sign?

+2  A: 

The way I display errors within my plugin is through the use of Markers.

The following link should help you get started: Mark My Words

I had some problem with implementing them, so if you encounter the same error, feel free to take a look at my previous question: Eclipse Plug-in Development: Creating Problem Marker for a Given Resource

Paul Reisert
Also, check out the FAQ: http://wiki.eclipse.org/FAQ_How_do_I_create_problem_markers_for_my_compiler%3F
Fabian Steeg
Thanks a lot! I will try it.
cnook
Dear All, I tried it. But I cannot get the "Marker" in the "Problem" view (editor also).Exactly my plugin listens PRE_BUILD of resource xml file.Even though every marker.setAttribute() methods executed properly,the Text Editor and Problems View do not show the problem Mark.Please let me know.. Thanks again.
cnook