Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » Populating "Problems" Tab
Populating "Problems" Tab [message #667651] Sat, 30 April 2011 16:12 Go to next message
Timothy Wall is currently offline Timothy WallFriend
Messages: 21
Registered: July 2009
Junior Member
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 #667827 is a reply to message #667651] Mon, 02 May 2011 11:28 Go to previous messageGo to next message
Timothy Wall is currently offline Timothy WallFriend
Messages: 21
Registered: July 2009
Junior Member
I found this message on dltk-dev:
http://dev.eclipse.org/mhonarc/lists/dltk-dev/msg01413.html

Doing so still produces no results (although that may be because I'm not providing a default parser yet).

However, there's apparently some hidden dependency in using the method described, since i'm using the problem reporter from the build context the same way as the ruby code, but still getting no problems appearing in the problems pane.
Re: Populating "Problems" Tab [message #667828 is a reply to message #667651] Mon, 02 May 2011 11:31 Go to previous messageGo to next message
Timothy Wall is currently offline Timothy WallFriend
Messages: 21
Registered: July 2009
Junior Member
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 Go to previous messageGo to next message
Carl Knight is currently offline Carl KnightFriend
Messages: 13
Registered: December 2010
Junior Member
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]

Report message to a moderator

Re: Populating "Problems" Tab [message #690695 is a reply to message #690037] Thu, 30 June 2011 03:15 Go to previous messageGo to next message
Carl Knight is currently offline Carl KnightFriend
Messages: 13
Registered: December 2010
Junior Member
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 #691239 is a reply to message #690695] Fri, 01 July 2011 03:28 Go to previous messageGo to next message
Carl Knight is currently offline Carl KnightFriend
Messages: 13
Registered: December 2010
Junior Member
I've now verified the problem with getProblemMarkerType() returning the wrong type is fixed in CVS HEAD. Problems now appear in the problems view instead of the task view.

- Carl.

[Updated on: Fri, 01 July 2011 03:29]

Report message to a moderator

Re: Populating "Problems" Tab [message #693251 is a reply to message #691239] Wed, 06 July 2011 06:18 Go to previous messageGo to next message
sharath vashisht is currently offline sharath vashishtFriend
Messages: 1
Registered: July 2011
Junior Member
hi carl,

i am also facing the same issue... can u please clarify whether this issue been fixed in dltk 3.0 release.

thanks in advance
Re: Populating "Problems" Tab [message #694138 is a reply to message #693251] Thu, 07 July 2011 21:59 Go to previous messageGo to next message
Carl Knight is currently offline Carl KnightFriend
Messages: 13
Registered: December 2010
Junior Member
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 Go to previous messageGo to next message
Timothy Wall is currently offline Timothy WallFriend
Messages: 21
Registered: July 2009
Junior Member
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]

Report message to a moderator

Re: Populating "Problems" Tab [message #695097 is a reply to message #694577] Mon, 11 July 2011 00:59 Go to previous messageGo to next message
Timothy Wall is currently offline Timothy WallFriend
Messages: 21
Registered: July 2009
Junior Member
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.
Re: Populating "Problems" Tab [message #716492 is a reply to message #695097] Wed, 17 August 2011 14:54 Go to previous message
Timothy Wall is currently offline Timothy WallFriend
Messages: 21
Registered: July 2009
Junior Member
My nature class had defined configure/deconfigure (copied from an older DLTK release or example) which was preventing those functions in ScriptNature from being called. It's those functions which call addBuildSpec().

[Updated on: Wed, 17 August 2011 15:21]

Report message to a moderator

Previous Topic:Tcl Remote debugging
Next Topic:Problem marker displays incorrect Resource for error
Goto Forum:
  


Current Time: Fri Mar 29 00:05:18 GMT 2024

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

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

Back to the top