Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] bug #151005 - Error parser - cannot generate proper marker for file outside of the workspace

Hi all,
 
"innovative ideas" are called for to resolve
https://bugs.eclipse.org/bugs/show_bug.cgi?id=151005 (see there for an
introduction into the problem)
 
Well, here is one:
 
- If the error parser cannot create an IFile object for a given path
then it
attaches the problem marker to the project. That's why the file cannot
be
opened in a simple way from the problems view
- A new marker type could be defined which has an additional attribute
like
"externalLocation" (derived from the standard C/C++ problem marker)
- The error parser could be made to use the the new type, still use the
project
as resource but store the original path of the error in the marker's
externalLocation attribute
- An popup menu object contribution for the new marker type could be
created,
as an analogy of the Delete C/C++ Marker contribution which allows
manually
deleting C/C++ Markers. The new contribution would say: "Open External
File".
An action would be provided to open the external file in an editor and
place
the cursor in the appropriate position.

The main drawback of this is the fact that the user must know or guess
that
while double-clicking does not work, he can still get the file opened
via a
popup menu action. I would have liked to somehow override the default
double-click action for the Problems view but I could not figure out how
to do
this. The current action which is caused by the double-click is
hard-coded into
the ProblemView class and it's framework

Another drawback is that annotiations probably also won't work for the
external
file. I'll have to think about this some more, maybe we can configure
the
CEditors annotation access ...

Anyway I would like opinions on whether this is worth doing in spite of
the
drawbacks, or whether other, more elegant ways of doing this can be
imagined.

 
Thanks,
 
 
Norbert Ploett
 
 


Back to the top