Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] Special actions for special marker types in the problems view

Hi folks,
 
first of all, please redirect me if this is not the best list to ask my
question. It is my first post here.
 
This is actually an issue that appeared in the CDT, and I am trying to
come up with a strategy to resolve
https://bugs.eclipse.org/bugs/show_bug.cgi?id=151005 
C compilers may generate error messages for files which are not
workspace resources. The CDT error parser generates problem markers for
them using the project which was being compiled. Therefore the standard
"Go To" action (or, double click) in the Problems view fails: A project
cannot be opened in an editor. We would still like to get the file
opened, in which the error occurred.

Here is a resolution strategy I would like to put up for discussion:

1) For errors in workspace-external files the CDT defines an extra
marker type. The new marker type carries extra attributes which hold
information about the external location of the file which contains the
error. The CDT error parser generates markers of this type when an error
in a workspace-external file is reported by the compiler.

2) For the new marker type a new action is contributed which will
evaluate the extra information and open the workspace-external file.
This is possible even today by making a popupMenu objectContribution and
thus augmenting the problem marker's context menu.

Now here is my issue: The Problems view's standard action upon a double
click is to open the workspace file that is referenced in the marker.
This action cannot be changed. It is all hard-coded in the
ProblemView's framework.
I would suggest to have the openAction marker-type specific so that the
default would be implemented in ActionOpenMarker as it is now, but that
for certain marker types a different action could be contributed.
I am of course also open for other suggestions to solve my problem.

Some specific questions of mine are:

- Is there an elegant solution I did not think of so far?
- Are there other, similar requests. Solutions already under way?
- Should I file a bugzilla enhancement request on this? For which
component?

Thanks for your opinions, advice, ...



Norbert Ploett


Back to the top