[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] Suggestion: org.eclipse.core.resources.IMarker.PROBLEMmultLoc and org.eclipse.core.resources.IMarker.PROBLEMmultLocMultResource

Bob,

For information on creating/managing markers see

http://eclipse.org/articles/Article-Mark%20My%20Words/Mark%20My%20Words.html

In general you are free to add new marker types which have additional
attributes and then implement editors, viewers, ... which interpret these
new attributes.  By default the UI shows all "problem" markers.  Since the
marker type system is hierarchal, your marker can be a subtype of
IMarker.PROBLEM and it would show up for free.

Hope that helps.
Jeff

BTW, this kind of question would be great in the newsgroup as it is
interesting to a wide range of people and many users of eclipse (i.e.,
people using eclipse to implement their tools) hang out there and do not
track the development forums.


I hope to develop some tools which will identify conflicts between
information located at two parts of an XML document (I won't do this for
arbitrary XML documents, but for a series of XML vocabularies that are
important for application development using XML, such as XML Schema, XSLT,
WSDL and so on).

I would like to create a marker which is a variant of a PROBLEM marker, and
then have it show up in the "Task List", and then, if the user double
clicks on it, I would like my tool to be given 2 (or maybe more than 2)
locations within the resource that contained the conflict, so I can display
the sections of the document that conflict with each other (perhaps side by
side (one next to the other), or on top of each other).

I think of this as org.eclipse.core.resource.IMarker.PROBLEMmultLoc because
multiple locations in a single resource contribute to the problem.  If the
problem gets fixed, the marker should disappear from both (or all) the
locations in the resource.

In a few cases, the conflict will be between a location L1 in resource R!
and a location L2 in resource R2.  Therefore, another variant would be
org.eclipse.core.resources.IMarker.PROBLEMmultLocMultResource, which
contains additional properties.  I would also expect to have
org.eclipse.core.resources.IMarker.PROBLEMmultLocMultResourceAdjusted.  If
a resource was opened and it had been persisted with a
PROBLEMmultLocMultResource but now the second resource is gone or the
second Loc in that resource is gone, I would want Eclipse to convert he
original PROBLEMmultLocMultResource into a
PROBLEMmultLocMultResourceAdjusted, adding properties so I could see which
of the multiple locations cannot be reached anymore.

Here are my questions:

Is there an example program that shows how to create problem markers?  How
to remove problem markers?  How to get an event if a problem which is on
the task list is selected?  How to walk through all problem markers that
happen to have the same location (since it is possible that the fix the
user is doing is going to fix numerous problems)?

Is there a variant of org.eclipse.compare.contentmergeviewer which allows
the user to look at the left content, look at the right content, push a
button to indicate that they will make the fix by changing the content on
the left (or push another button if they will change the content on the
right), and will then bring to the top the editor window for the location
they chose the change (which they had just seen in either left or right)
while also opening another viewer positioned at the content the user
doesn't intend to change (but which the new text must be compatible with)?
(I think having such a variant would be a tremendous aid).

Are there other people reading this list who would make use of the proposed
org.eclipse.core.resource,IMarker.PROBLEMmultLoc if it was provided in
Release 2.0 ?

Would this be much easier if a PROBLEMmultLoc had exactly 2 locations, not
2 or more?

Thanks,
Bob Schloss

IBM Watson Research



_______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/eclipse-dev