[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [orion-dev] Extending syntax checker
|
Hi Karol,
You're right: the syntax checker stuff in syntaxchecker.js is hardcoded, and we need a generic story (see [1]).
In the meantime, you can use IProblemProvider to show your errors. Once you have something that can produce a list of errors for your file, you can use some code like this:
serviceRegistry.getService("IProblemProvider").then(function(problemService) {
problemService._setProblems(errors);
});
Every element in the "errors" array should have these properties:
line {Number}
character {Number}
reason {String}
This should be enough to make your errors appear in the ruler alongside problematic lines.
Mark
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=345953
Karol Gusak ---05/13/2011 06:07:04 PM---Hi, the IEditorSyntaxChecker extension point looks very hardcoded.
From: Karol Gusak <karol@xxxxxxxx>
To: Orion developer discussions <orion-dev@xxxxxxxxxxx>
Date: 05/13/2011 06:07 PM
Subject: [orion-dev] Extending syntax checker
Sent by: orion-dev-bounces@xxxxxxxxxxx
Hi,
the IEditorSyntaxChecker extension point looks very hardcoded.
However, I noticed that IProblemSolver is also available. For
developing a plugin which validates syntax for some language, could I
use the IProblemSolver, and ignore the IEditorSyntaxChecker? Is it a
problem? I just want to mark problematic lines of code and show an
error messages for them.
Regards,
Karol
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev
