-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[research task] manage validation with tern #37
Comments
@vrubezhny do you think we could work together about this feature, or could you give me some directive to do that inside Eclipse. My need is about Eclipse Validator. I have started to create a Tern Builder, but it is called just when file is save (and not when user is typing). Is it possible to initialize Tern Validator (which do nothing) and after I will plug then lint.js tern plugin (which is very basic for the moment). If you have not time to do that, could you give me some directive please. Thank's! |
Sorry, removed the topic. It was about Structured Editors. Sometime ago I did this for Java Editor, not sure but I think (due to the fact that JavaScript editor was copied from the Java ones) the same approach should work for you. Not sure though it's easy doable (JavaScript editor is a copy of very-very old Java editor). You can see how I'm hooking up Java Editor with my own reconciler here: This is a class that sets up my own reconciler into each opened Java Editor instance. Then my reconciler is able to do its validation work. |
Many thank's Victor for your information. I will study your code to adapt it to Javascript Editor and tern lint. |
@vrubezhny I have integrate tern lint to validate property of object with tern. You can see Java code at https://github.com/angelozerr/tern.java/tree/master/eclipse/tern.eclipse.ide.ui/src/tern/eclipse/ide/internal/ui/validation and I have used your great classes. Could you tell me about license header if I must add your name or not (I have copy/paste your Java classes and update it). |
IMHO, adding an EPL v.1.0 into header would be enough. Or you can use template that is placed in the header of https://github.com/jbosstools/jbosstools-base/blob/master/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaEditorTracker.java and add your name under the "Contributors" Section as well as an information on what was changed, updated or added by you: /*******************************************************************************
Anyway, I think referencing the EPL, v.1.0 would be good enough. |
BTW, can we remove TernBuilder then? |
thank's @vrubezhny for your answer.
I don't know, my idea was to implement it to manage global validation with tern lint.js. But this tern plugin must be improved again. |
Why not to add your ValidationParticipant instead of creating a builder? Did you tried this? |
No I have not tried, but ValidationParticipant depends on JSDT. My tern validator should work with any JS editor. I would like to provide the same feature for global validation. |
tern lint.js is integrated inside Eclipse IDE (to use it, just select lint.js in the tern plugin project properties). tern lint.js manage just warnings for "Unknow object property". It must improved a lot. Any contributions are welcome! |
I close this issue. I have created https://github.com/angelozerr/tern.lint which contains the tern lint plugin. |
Manage validation with tern. See start of this feature with the tern plugin https://github.com/angelozerr/tern.java/blob/master/core/tern.server.nodejs/node_modules/tern/plugin/lint.js and see demo at https://github.com/angelozerr/tern.java/blob/master/core/tern.core.tests/CodeMirror/codemirror-javascript/demo/tern-lint.html
Here a screenshot of this demo:
Posted this idea on tern ternjs/tern#297 and backet adobe/brackets#7090 (comment)
The text was updated successfully, but these errors were encountered: