Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » IProblemReporter and DLTKProblemReporter - clearMarkers missing and/or deprecated?
IProblemReporter and DLTKProblemReporter - clearMarkers missing and/or deprecated? [message #31422] Tue, 23 September 2008 19:37 Go to next message
Charles Doucette is currently offline Charles Doucette
Messages: 125
Registered: July 2009
Senior Member
I am configuring a new development machine for myself.
In the process, I downloaded and installed the latest 1.0 integration build
rather than the 0.95 release build.
In the process, I noticed some differences:

IProblemReporter no longer declares the method clearMarkers.
The only class that implements that method is DLTKProblemReporter, but that
class is deprecated.

If I want to make sure that the problems view is cleared before parsing (or
at least before doing any semantic checking), how can I accomplish that? If
I can't count on a clearMarkers method (because it is deprecated) - must I
make a copy of the current implementation in my own class?

Thanks,
Chuck
Re: IProblemReporter and DLTKProblemReporter - clearMarkers missing and/or deprecated? [message #31457 is a reply to message #31422] Wed, 24 September 2008 04:29 Go to previous message
Alex Panchenko is currently offline Alex Panchenko
Messages: 342
Registered: July 2009
Senior Member
Hi Chuck,

Now it works automatically:
- files are automatically built (=parsed) in background
- previous markers are removed before parsing
- new markers are created after the build

Your code should not think about markers, it just report problems. If
file is saved on disk problems are reported as markers during build, if
file is not saved then problems are reported as annotations in the editor.

For semantic checking you should use
org.eclipse.dltk.validators.core.buildParticipant extension point:

<extension
point="org.eclipse.dltk.validators.core.buildParticipant">
<buildParticipant
class="YourFactoryClass"
id="YourId"
nature="YourNature">
</buildParticipant>
</extension>

public class YourFactoryClass extends AbstractBuildParticipantType {
public YourFactoryClass() {
super(ID, NAME);
}
protected IBuildParticipant createBuildParticipant(IScriptProject project) {
//TODO return instance configured for the specified project
}
}

For example you can look at RubyTodoParserType.

Regards,
Alex


Chuck Doucette wrote:
> I am configuring a new development machine for myself.
> In the process, I downloaded and installed the latest 1.0 integration build
> rather than the 0.95 release build.
> In the process, I noticed some differences:
>
> IProblemReporter no longer declares the method clearMarkers.
> The only class that implements that method is DLTKProblemReporter, but that
> class is deprecated.
>
> If I want to make sure that the problems view is cleared before parsing (or
> at least before doing any semantic checking), how can I accomplish that? If
> I can't count on a clearMarkers method (because it is deprecated) - must I
> make a copy of the current implementation in my own class?
>
> Thanks,
> Chuck
Previous Topic:[BUILD] R0.95-R
Next Topic:CompletionProposal.METHOD_REF fails - but KEYWORD succeeds - why?
Goto Forum:
  


Current Time: Thu Oct 23 17:53:38 GMT 2014

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

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