Populating "Problems" Tab [message #667651] |
Sat, 30 April 2011 16:12  |
Eclipse User |
|
|
|
I've got my editor using DefaultProblem to generate problem markers in my custom language source. The markers show up properly within the edited code (for now I'm running an external validator when the file is saved to find the errors).
How do I make those problems appear in the Problems pane/tab? I'm using the CVS 2.0 branch for reference (ruby and JS), but I can't figure out how to hook up the Problems tab to show the errors in my "currently selected" project element.
|
|
|
|
Re: Populating "Problems" Tab [message #667828 is a reply to message #667651] |
Mon, 02 May 2011 11:31   |
Eclipse User |
|
|
|
I'm using the buildParticipant extension point to run a code validator (at the moment whenever the file is saved). As the validator produces errors/warnings, I create instances of DefaultProblem and pass them on to the build context problem reporter. Apparently that's not sufficient to propagate them to the problems pane.
Perhaps there's a requirement to have some sort of parse tree in place, or something else that needs to be set in the build context?
|
|
|
Re: Populating "Problems" Tab [message #690037 is a reply to message #667651] |
Tue, 28 June 2011 20:42   |
Eclipse User |
|
|
|
Our IDE has been using the DLTK 2.0. Because of some bugs in 2.0 that are fixed in 3.0 we have finally moved to the DLTK 3.0
In our DLTK 2.0 based IDE the problems tab is populated fine. In the new "experimental" DLTK 3.0 branch of the same, the problems tab is not getting populated - even though none of that code has changed.
Does anyone have a definitive fix or can tell me what we NOW have to do that we did not previously have to do to get this working again?
From my investigation here is what I can see:
1. The build context passed to my build participant has the errors set on it. i.e. It is getting populated.
2. The errors are reported for the unit. i.e. SourceModuleDocumentProvider.SourceModuleAnnotationModel reportProblems method is called. Everything seems fine there, and in the end the fireModelChanged() method is called.
Beyond that I'm not sure where I should be looking so if anyone knows, tell me.
Thanks.
- Carl.
[Updated on: Tue, 28 June 2011 21:30] by Moderator Report message to a moderator
|
|
|
Re: Populating "Problems" Tab [message #690695 is a reply to message #690037] |
Thu, 30 June 2011 03:15   |
Eclipse User |
|
|
|
There appears to be a bug in the DLTK 3.0. The problems, even though their severity is ProblemSeverity.Error or ProblemSeverity.Warning are being reported as Tasks because (I believe) of this code in DefaultProblemFactory:
public class DefaultProblemFactory implements IProblemFactory {
public String getMarkerType(IProblem problem) {
if (problem.getID() instanceof IProblemIdentifierExtension) {
return ((IProblemIdentifierExtension) problem.getID())
.getMarkerType();
}
return problem.isTask() ? getTaskMarkerType() : getProblemMarkerType();
}
protected String getProblemMarkerType() {
return DefaultProblem.MARKER_TYPE_TASK;
}
protected String getTaskMarkerType() {
return DefaultProblem.MARKER_TYPE_TASK;
}
public IMarker createMarker(IResource resource, IProblem problem)
throws CoreException {
final String markerType = getMarkerType(problem);
return resource.createMarker(markerType);
}
The method getProblemMarkerType() is returning DefaultProblem.MARKER_TYPE_TASK. I believe it should return DefaultProblem.MARKER_TYPE_PROBLEM.
The problems reported appear in the markers view and the tasks view, but not the problems view. I've informed the DLTK devs and hope for a fix soon.
- Carl.
|
|
|
|
|
Re: Populating "Problems" Tab [message #694138 is a reply to message #693251] |
Thu, 07 July 2011 21:59   |
Eclipse User |
|
|
|
Hi Sharath,
It's fixed in the CVS head. Alex has said he will be doing a maintenance release via update site but I've seen nothing yet.
Regardless, the CVS repository you want is org.eclipse.dltk using :pserver: protocol and user name "anonymous".
From there you can build the DLTK 3.0 and use the update site project to give yourself everything you need. That's what I've done for now while I wait for Alex to make the next maintenance/RC release.
Regards,
- Carl.
|
|
|
Re: Populating "Problems" Tab [message #694577 is a reply to message #690037] |
Fri, 08 July 2011 21:51   |
Eclipse User |
|
|
|
I've tracked down the SourceModuleAnnotationModel usage, and it appears to be creating ProblemAnnotations, but still nothing shows up in the problems view (still using dltk 2.0, since I haven't been able to get 3.0 to build/install on my eclipse 3.6 yet).
I have been using the problem reporter provided to the build participant's IBuildContext parameter. Is there something else that needs to be created/activated?
[Updated on: Sun, 10 July 2011 13:07] by Moderator Report message to a moderator
|
|
|
Re: Populating "Problems" Tab [message #695097 is a reply to message #694577] |
Mon, 11 July 2011 00:59   |
Eclipse User |
|
|
|
The cause of the problem is in the .project file generated for my language. The <buildSpec> was empty, which caused the build manager to generate a builder name "xxx.builder", not find it, and use a MissingBuilder. I copied the buildSpec from a ruby project into the .project file, and the errors started showing up.
When I create a new project, the buildSpec is still empty, so something still needs to be done to set the buildSpec to use a buildCommand entry with org.eclipse.dltk.core.scriptbuilder instead of the auto-generated value.
|
|
|
|
Powered by
FUDForum. Page generated in 0.09608 seconds