[
https://issues.jboss.org/browse/JBIDE-9021?page=com.atlassian.jira.plugin...
]
Alexey Kazakov commented on JBIDE-9021:
---------------------------------------
{quote}The code in addNatureToProjectWithValidationSupport seems way more complicated than
it has to be. shouldn't this just be "find highest index of either Java or WST
builder, add builder after that highest index" ?{quote}
To have our CDI/Seam builders/validators worked correctly we need Java, WST validator, Our
Builder in the following order:
Java,WST,CDI/Seam
But we may have any combination in .project when we are trying to add our builder:
1. Java, WST
2. Java
3. Java, CDI
3. WST, Java
4. Java, WST, CDI
5. WST, Java, CDI
6. CDI, Java, WST
...
So we have to check the indexes of all the builders, add missing builders/natures and
re-order existing ones if needed.
{quote}and why do we need to WST builder etc. in here; shouldn't that be done by the
validator nature or facet ?{quote}
Our validation based on WST validation framework. So WST builder runs all our validation.
CDI builder should be declared before WST validation builder in
.project.
-------------------------------------------------------------------------
Key: JBIDE-9021
URL:
https://issues.jboss.org/browse/JBIDE-9021
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: cdi (jsr-299)
Affects Versions: 3.2.0.Final, 3.3.0.M1
Reporter: Alexey Kazakov
Assignee: Alexey Kazakov
Priority: Critical
Fix For: 3.2.1.CR1, 3.3.0.M2
Attachments: jbt-branch.patch, jbt-trunk.patch
EXECUTE: Create any CDI project (don't enable CDI support!)
EXECUTE: If there is no in .project yet then add it there:
{code}
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
{code}
EXECUTE: Enable CDI support for the project.
EXECUTE: Open .project
FAILURE:
{code}
<buildCommand>
<name>org.jboss.tools.cdi.core.cdibuilder</name>
<arguments>
</arguments>
</buildCommand>
{code} is added to the end of <buildSpec> tag.
ASSERT: org.jboss.tools.cdi.core.cdibuilder should be declared after
org.eclipse.jdt.core.javabuilder but before org.eclipse.wst.validation.validationbuilder
This is very important since if we have CDI builder declared after WST validator builder
then CDI validation will be invoked before CDI builder completed building CDI model. It
causes incorrect work of CDI validation.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira