This api was introduced to fix defect
https://bugs.eclipse.org/bugs/show_bug.cgi?id=110615. Take a look at all
the comments in this defect and especially my last comment on how
this api solved the JSP performance problem. Long term there could be a
better solution on resolving this problem, but I do not see any issues
by exposing the build type being performed if the validator would like
to make use of it.
Lawrence Mandel <lmandel@xxxxxxxxxx> Sent by: wtp-dev-bounces@xxxxxxxxxxx
09/27/2005 08:28 PM
Please respond to "General
discussion of project-wide or architectural issues."
"General discussion of
project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>
Re: [wtp-dev] Validation component api
As we discussed back in July, I don't think it is correct to expose the
type of build to the validators themselves. In fact I don't see the need
for validators to know how they were invoked (builder, manually, some other
mechanism) at all. This information should be contained within the validation
framework. By exposing this information it sounds like the JSP validator
is trying to work around some performance problem. Can you explain how
the JSP validator benefits from knowing the type of build and why this
benefit cannot be realized without exposing this information?
Vijay Bhadriraju <vbhadrir@xxxxxxxxxx>
Sent by: wtp-dev-bounces@xxxxxxxxxxx
09/27/2005 05:12 PM
Please respond to
"General discussion of project-wide or architectural issues."
[wtp-dev] Validation component
Api Requirement and Implementation
We got a new requirement today for the validation framework to expose the
kind of build that is presently occurring to the validator. The JSP validator
was the validator that raised this requirement so it can better handle
the situation when an empty uri list is being passed in through the IValidationContext::getURIs()
to the validator and the JSP Validator wanted to take an appropriate action
based on the build kind that was occurring.
To satisfy this api requirement we have added an new api on IValidationContext
getBuildKind(). This api returns
the kind of build that the BuildManager passes to the ValidationBuilder.
Now any validator that wants to take an action on a particular kind of
build (INCREMENTAL_BUILD or FULL_BUILD or AUTO_BUILD or CLEAN_BUILD) can
Api change effecting existing clients
Any implementer's of IValidationContext need to implement this additional
method and can just return 0 if they are not interested in knowing the
build kind. Users of default implementation of the IValidationContext i.e
WorkbenchContext will need not have to do anything and just use the api
if they need it in for their validator.