Closed letmaik closed 8 years ago
@neothemachine have you activated "Add Validation Builder" for your project with Validation preferences. If you have done that, you should have Validation in your Builders project properties.
If it is this case, if you do Ctrl+S, markers should disappear, no?
The "tern.TernException: TernError: No type found at the given position." is thrown by ternjs when it cannot find type, it's a normal error.
On 27/11/2015 10:59, Angelo wrote:
@neothemachine https://github.com/neothemachine have you activated "Add Validation Builder" for your project with Validation preferences. If you have done that, you should have Validation in your Builders project properties.
That was the problem! Thanks, it works now. Why isn't this enabled by default when a project is converted to a Tern project?
tern doesn't do that, perhaps it's an another plugin which does that, I don't know.
What do you mean by tern doesn't do that? Is my problem the standard behaviour or did some other eclipse plugin remove the validation builder?
On 27/11/2015 11:07, Angelo wrote:
tern doesn't do that, perhaps it's an another plugin which does that, I don't know.
— Reply to this email directly or view it on GitHub https://github.com/angelozerr/tern.java/issues/374#issuecomment-160103939.
What do you mean by tern doesn't do that?
I mean that it doesn't "Add Validation Builder" by default. Tern provides a WTP Validator and it manages validation like other WTP Validator like HTML, XML, etc
After it's the user who decide if he want to validate after a Ctrl+S or not.
If I have understood your problem, you had not "Add Validation Builder" and when you are typing, markers doesn't disappear. So I suppose you have used manual Validation with contextual menu "Validate".
I suggest you that you try your test with HTML editor and you should see that it's the same behaviour than tern. If not, please tell me.
Ok, I understand that. Seems to be how WTP projects behave. But on the other hand, if you have a Java project, it also automatically adds the relevant builders and you don't have to do anything manually. For me the most confusing thing was that in the top menu at "Project", the "Build automatically" was enabled, so I assumed it would validate while I type. It's just a bit user unfriendly I think. Even though the "JavaScript" project behaves the same, why not do the following: When you right-click Configure -> Convert to tern project, then after conversion it checks if the validation builder is already added and if not it asks you in a popup if you want to "validate automatically while typing".
On 27/11/2015 11:25, Angelo wrote:
What do you mean by tern doesn't do that?
I mean that it doesn't "Add Validation Builder" by default. Tern provides a WTP Validator and it manages validation like other WTP Validator like HTML, XML, etc
After it's the user who decide if he want to validate after a Ctrl+S or not.
If I have understood your problem, you had not "Add Validation Builder" and when you are typing, markers doesn't disappear. So I suppose you have used manual Validation with contextual menu "Validate".
I suggest you that you try your test with HTML editor and you should see that it's the same behaviour than tern. If not, please tell me.
— Reply to this email directly or view it on GitHub https://github.com/angelozerr/tern.java/issues/374#issuecomment-160106920.
so I assumed it would validate while I type.
It should do that without "Add Validation Builder".
WTP provides 2 validators :
In your case, I think you had not "Validation Builder", when you are typing, errors should appear (otherwise it's a bug). After you have perhaps do "Validate" in a file with contextual menu, and in this case, it's a "Tern Problem" marker which marks errors (see Problem View). This Tern problem marker is a persitent marker. So if you restart Eclipse, your editor will highlighted with those markers, even if you change content in your editor.
To remove those persitent marker, you must use Validate or remove at hand in the Problem View.
I mean that you have 2 markers kind :
On 27/11/2015 11:53, Angelo wrote:
so I assumed it would validate while I type.
It should do that without "Add Validation Builder".
You're right, I was still messing around with settings and I think I manually did a validation. I didn't know that this is different (permanent) compared to the while-you-type markers. So, I think there's no bug after all, just a bit of unfortunate workflow, which doesn't surprise me in Eclipse ;) I'm closing this now.
I just set up tern on a project and it doesn't delete old markers, no idea why. When I hover over an old marker it throws an exception:
I use the latest 1.1 stable