Community
Participate
Working Groups
The org.eclipse.wst.sse.ui.internal.reconcile.validator.ValidatorStrategy in the reconcile method is calling an internal validation framework method: IValidator iv = v.asIValidator(); This call triggers that validator's plug-in to be activated. Since this is being called on all the disabled validators, it is causing all the validation plug-ins to load. If I provided you with a method, so that you could first tell if the validator was activated, could you make use of it to not call this asIValidator() ?
We'd be happy to.
I have added a public method via bug 262360. I have attached a patch to that bug. (I'll release it as soon as the driver is opened up).
Created attachment 152032 [details] Fix Patch This patch wraps the #asIValidator call in an if statement that first checks to see if the validator is loaded. I noticed there is also a #asV1Validator call, Gary does that need to check to see if the validator is loaded first as well?
Nick and I just discussed this more and realized that we can not just add a check to see if the disabled validator is not loaded and if its not then preced not to call the asIValidator method because then it would not be added to our list of deactivated validators which is then used to create a list of activated validators. What we really need is a ValidationFramework.getDefault().getEnabledValidatorsFor(file) because currentlyt here is only a get DisabledValidatorsFor which we then have to use in conjuction with getValidatorsFor to create our own list of Enabled validators and its this hackish operation which requires the calling of asIValidator. But if there was a getEnabledValidators then the whole situation could be avoided.
Created attachment 167390 [details] patch This patch uses asV1Validator() first to start with the V1 validator. If the V1 validator is null, then it just uses the sourceId. No more invocation of asIValidator to get the V2 validator.
Nitin, can we try to get this in for RC1? This seems to be a pretty bad performance drag if we're activating plug-ins just to assemble a list of validators that shouldn't be run anyway.
Test well.
Fix checked in.