Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to create error marker on file in order to block the debug launch
How to create error marker on file in order to block the debug launch [message #1833240] Wed, 07 October 2020 12:39 Go to next message
vincent lorenzo is currently offline vincent lorenzoFriend
Messages: 171
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hello everybody,
I created custom error IMarker for specific error on files of Eclipse plugins project.
Now I would like these markers will take into account to block the launch of the Eclipse runtime.

If I create my marker with the type IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER all is fine for me, the MesssageDialog indicating errors appears when I try to launch a runtime.

But creating a new marker as subtype of JAVA_MODEL_PROBLEM_MARKER (using dedicated extension point), the standart launch config ignores these markers.

After investigations, I found the problem comes this method:
org.eclipse.pde.launching.AbstractPDELaunchConfiguration.isLaunchProblem(IMarker)
where the marker type is checked with
marker.getType().equals(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER)
and not with
marker.isSubtypeOf(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER)
(patching with this solution, its works for me! )

So I have 2 questions:
1. Is it an error in the implementation of AbstractPDELaunchConfiguration ?
2. Is there another way to get the expected result : blocking the standard launch configuration with custom error marker ?

Thank you very much.
/Vincent
Re: How to create error marker on file in order to block the debug launch [message #1833441 is a reply to message #1833240] Tue, 13 October 2020 11:01 Go to previous message
vincent lorenzo is currently offline vincent lorenzoFriend
Messages: 171
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hello, I open this bug :
567833: AbstractPDELaunchConfiguration ignores subtype of java marker
https://bugs.eclipse.org/bugs/show_bug.cgi?id=567833

and provides a patch here: https://git.eclipse.org/r/c/pde/eclipse.pde.ui/+/170693
Previous Topic:Null analysis seems to ignore short-circuiting
Next Topic:MyEclipse Related Java Projects
Goto Forum:
  


Current Time: Wed Apr 21 21:56:06 GMT 2021

Powered by FUDForum. Page generated in 0.01618 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top