JBoss Tools SVN: r21924 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-05 15:30:56 -0400 (Wed, 05 May 2010)
New Revision: 21924
Modified:
branches/modular_build/build/build.xml
Log:
add plugin.id method and tests; refactor feature.id tests; reorg file; add hook to run external per-component build.xml (eg., for Drools)
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-05 18:24:41 UTC (rev 21923)
+++ branches/modular_build/build/build.xml 2010-05-05 19:30:56 UTC (rev 21924)
@@ -454,6 +454,17 @@
<property name="COMPONENT" value="@{COMPONENT}" />
</ant>
+ <!-- optional extra instructions to do before a maven build -->
+ <if>
+ <available file="${WORKINGDIR}/(a){COMPONENT}/build.xml" type="file" />
+ <then>
+ <echo>Run custom @{COMPONENT}/build.xml</echo>
+ <ant antfile="${WORKINGDIR}/(a){COMPONENT}/build.xml">
+ <property name="COMPONENT" value="@{COMPONENT}" />
+ </ant>
+ </then>
+ </if>
+
<antcall target="mvn">
<param name="COMPONENT" value="@{COMPONENT}" />
</antcall>
@@ -860,83 +871,57 @@
</target>
<target name="get.feature.id">
- <propertyregex property="feature.jarfile"
- defaultvalue="${featureJar}"
- input="${featureJar}"
- regexp=".+/features/[^/]+/target/([^/]+feature.+\.jar)"
+ <antcallback target="get.artifact.id" return="artifact.id">
+ <param name="regexp.path" value=".+/features/[^/]+/target/([^/]+feature.+\.jar)" />
+ <param name="artifactJar" value="${featureJar}" />
+ </antcallback>
+ <var name="feature.id" value="${artifact.id}" />
+ </target>
+
+ <target name="get.plugin.id">
+ <antcallback target="get.artifact.id" return="artifact.id">
+ <param name="regexp.path" value=".+/plugins/([^/]+.+\.jar)" />
+ <param name="artifactJar" value="${pluginJar}" />
+ </antcallback>
+ <var name="plugin.id" value="${artifact.id}" />
+ </target>
+
+ <target name="get.artifact.id">
+ <!-- for a feature: regexp=".+/features/[^/]+/target/([^/]+feature.+\.jar)"
+ for a plugin: regexp=".+/plugins/([^/]+.+\.jar)" -->
+ <property name="regexp.path" value=".+/plugins/([^/]+.+\.jar)" />
+
+ <propertyregex property="artifact.jarfile"
+ defaultvalue="${artifactJar}"
+ input="${artifactJar}"
+ regexp="${regexp.path}"
replace="\1"
override="true"
/>
- <propertyregex property="feature.id"
- defaultvalue="${feature.jarfile}"
- input="${feature.jarfile}"
- regexp="([^_]+)_(\d+\.\d+\.\d+\..+)\.jar"
+ <propertyregex property="artifact.id"
+ defaultvalue="${artifact.jarfile}"
+ input="${artifact.jarfile}"
+ regexp="([^_]+)_(\d+\.\d+\.\d+.+)\.jar"
replace="\1"
override="true"
/>
- <propertyregex property="feature.id"
- defaultvalue="${feature.id}"
- input="${feature.id}"
- regexp="([^_]+)-(\d+\.\d+\.\d+\..+)\.jar"
+ <propertyregex property="artifact.id"
+ defaultvalue="${artifact.id}"
+ input="${artifact.id}"
+ regexp="([^_]+)-(\d+\.\d+\.\d+.+)\.jar"
replace="\1"
override="true"
/>
- <propertyregex property="feature.id"
- defaultvalue="${feature.id}"
- input="${feature.id}"
- regexp="([^_]+)-(\d+\.\d+\.\d+-SNAPSHOT)\.jar"
+ <propertyregex property="artifact.id"
+ defaultvalue="${artifact.id}"
+ input="${artifact.id}"
+ regexp="([^_]+)-(\d+\.\d+\.\d+.SNAPSHOT)\.jar"
replace="\1"
override="true"
/>
- <var name="featureJar" unset="true" />
+ <var name="artifactJar" unset="true" />
</target>
-
- <!-- single test, runs faster -->
- <target name="test.get.feature.id.vpe">
- <antcall target="test.get.feature.id">
- <param name="COMPONENTS" value="vpe" />
- </antcall>
- </target>
-
- <!-- test all feature.id fetches -->
- <target name="test.get.feature.id" depends="init, test.expected.values">
- <for param="COMPONENT" list="${COMPONENTS}" delimiter=";,
- ">
- <sequential>
- <for param="featureJar" delimiter=", ">
- <!-- list="org.jboss.tools.xulrunner.feature, org.jboss.tools.vpe.feature" -->
- <path>
- <fileset dir="${basedir}/@{COMPONENT}" includes="**/features/**/target/*.jar" />
- </path>
- <sequential>
- <echo level="info">Test @{featureJar}</echo>
- <antcallback target="get.feature.id" return="feature.id">
- <property name="featureJar" value="@{featureJar}" />
- </antcallback>
- <var name="featureJar.path" unset="true" />
- <propertyregex override="true"
- property="feature.id.expected.name"
- defaultvalue="@{featureJar}"
- input="@{featureJar}"
- regexp="${basedir}\/(.+)"
- replace="get.feature.id.expected.\1"
- />
- <!-- <echo><property name="get.feature.id.expected.@{featureJar}" value="${feature.id}"/> </echo> -->
-
- <propertycopy name="feature.id.expected" from="${feature.id.expected.name}" />
- <assert failonerror="true" message="Expected: ${feature.id.expected}; got: ${feature.id}">
- <bool>
- <equals arg1="${feature.id.expected}" arg2="${feature.id}" />
- </bool>
- </assert>
- <var name="feature.id.expected" unset="true" />
- </sequential>
- </for>
- </sequential>
- </for>
- </target>
-
<!-- TODO: figure out why this fails with error:
insecure -e option not allowed.
This account is restricted by rssh.
@@ -1016,176 +1001,311 @@
/>
<!-- expected values for test.get.feature.id -->
- <property name="get.feature.id.expected.tests/features/org.jboss.tools.test.feature/target/org.jboss.tools.test.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.tests/features/org.jboss.tools.test.feature/target/org.jboss.tools.test.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.test.feature"
/>
- <property name="get.feature.id.expected.common/features/org.jboss.tools.common.all.feature/target/org.jboss.tools.common.all.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.common/features/org.jboss.tools.common.all.feature/target/org.jboss.tools.common.all.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.common.all.feature"
/>
- <property name="get.feature.id.expected.common/features/org.jboss.tools.common.all.tests.feature/target/org.jboss.tools.common.all.tests.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.common/features/org.jboss.tools.common.all.tests.feature/target/org.jboss.tools.common.all.tests.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.common.all.tests.feature"
/>
- <property name="get.feature.id.expected.common/features/org.jboss.tools.common.core.feature/target/org.jboss.tools.common.core.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.common/features/org.jboss.tools.common.core.feature/target/org.jboss.tools.common.core.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.common.core.feature"
/>
- <property name="get.feature.id.expected.common/features/org.jboss.tools.common.feature/target/org.jboss.tools.common.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.common/features/org.jboss.tools.common.feature/target/org.jboss.tools.common.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.common.feature"
/>
- <property name="get.feature.id.expected.common/features/org.jboss.tools.common.text.ext.feature/target/org.jboss.tools.common.text.ext.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.common/features/org.jboss.tools.common.text.ext.feature/target/org.jboss.tools.common.text.ext.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.common.text.ext.feature"
/>
- <property name="get.feature.id.expected.common/features/org.jboss.tools.common.ui.feature/target/org.jboss.tools.common.ui.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.common/features/org.jboss.tools.common.ui.feature/target/org.jboss.tools.common.ui.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.common.ui.feature"
/>
- <property name="get.feature.id.expected.common/features/org.jboss.tools.common.verification.feature/target/org.jboss.tools.common.verification.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.common/features/org.jboss.tools.common.verification.feature/target/org.jboss.tools.common.verification.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.common.verification.feature"
/>
- <property name="get.feature.id.expected.flow/features/org.jboss.tools.flow.common.feature/target/org.jboss.tools.flow.common.feature-4.0.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.flow/features/org.jboss.tools.flow.common.feature/target/org.jboss.tools.flow.common.feature-4.0.0-SNAPSHOT.jar"
value="org.jboss.tools.flow.common.feature"
/>
- <property name="get.feature.id.expected.jbpm/features/org.jboss.tools.flow.jpdl4.feature/target/org.jboss.tools.flow.jpdl4.feature-4.0.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.jbpm/features/org.jboss.tools.flow.jpdl4.feature/target/org.jboss.tools.flow.jpdl4.feature-4.0.0-SNAPSHOT.jar"
value="org.jboss.tools.flow.jpdl4.feature"
/>
- <property name="get.feature.id.expected.jbpm/features/org.jboss.tools.jbpm.common.feature/target/org.jboss.tools.jbpm.common.feature-4.3.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.jbpm/features/org.jboss.tools.jbpm.common.feature/target/org.jboss.tools.jbpm.common.feature-4.3.0-SNAPSHOT.jar"
value="org.jboss.tools.jbpm.common.feature"
/>
- <property name="get.feature.id.expected.jbpm/features/org.jboss.tools.jbpm.convert.feature/target/org.jboss.tools.jbpm.convert.feature-1.0.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.jbpm/features/org.jboss.tools.jbpm.convert.feature/target/org.jboss.tools.jbpm.convert.feature-1.0.0-SNAPSHOT.jar"
value="org.jboss.tools.jbpm.convert.feature"
/>
- <property name="get.feature.id.expected.jbpm/features/org.jboss.tools.jbpm3.feature/target/org.jboss.tools.jbpm3.feature-3.2.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.jbpm/features/org.jboss.tools.jbpm3.feature/target/org.jboss.tools.jbpm3.feature-3.2.0-SNAPSHOT.jar"
value="org.jboss.tools.jbpm3.feature"
/>
- <property name="get.feature.id.expected.jbpm/features/org.jboss.tools.jbpm3.tests.feature/target/org.jboss.tools.jbpm3.tests.feature-3.2.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.jbpm/features/org.jboss.tools.jbpm3.tests.feature/target/org.jboss.tools.jbpm3.tests.feature-3.2.0-SNAPSHOT.jar"
value="org.jboss.tools.jbpm3.tests.feature"
/>
- <property name="get.feature.id.expected.jbpm/features/org.jboss.tools.jbpm4.feature/target/org.jboss.tools.jbpm4.feature-4.0.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.jbpm/features/org.jboss.tools.jbpm4.feature/target/org.jboss.tools.jbpm4.feature-4.0.0-SNAPSHOT.jar"
value="org.jboss.tools.jbpm4.feature"
/>
- <property name="get.feature.id.expected.jbpm/features/org.jboss.tools.jbpm4.tests.feature/target/org.jboss.tools.jbpm4.tests.feature-4.3.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.jbpm/features/org.jboss.tools.jbpm4.tests.feature/target/org.jboss.tools.jbpm4.tests.feature-4.3.0-SNAPSHOT.jar"
value="org.jboss.tools.jbpm4.tests.feature"
/>
- <property name="get.feature.id.expected.jbpm/features/org.jbpm.gd.jpdl.feature/target/org.jbpm.gd.jpdl.feature-3.2.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.jbpm/features/org.jbpm.gd.jpdl.feature/target/org.jbpm.gd.jpdl.feature-3.2.0-SNAPSHOT.jar"
value="org.jbpm.gd.jpdl.feature"
/>
- <property name="get.feature.id.expected.jmx/features/org.jboss.tools.jmx.feature/target/org.jboss.tools.jmx.feature-1.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.jmx/features/org.jboss.tools.jmx.feature/target/org.jboss.tools.jmx.feature-1.1.0-SNAPSHOT.jar"
value="org.jboss.tools.jmx.feature"
/>
- <property name="get.feature.id.expected.jmx/features/org.jboss.tools.jmx.tests.feature/target/org.jboss.tools.jmx.tests.feature-1.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.jmx/features/org.jboss.tools.jmx.tests.feature/target/org.jboss.tools.jmx.tests.feature-1.1.0-SNAPSHOT.jar"
value="org.jboss.tools.jmx.tests.feature"
/>
- <property name="get.feature.id.expected.archives/features/org.jboss.ide.eclipse.archives.feature/target/org.jboss.ide.eclipse.archives.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.archives/features/org.jboss.ide.eclipse.archives.feature/target/org.jboss.ide.eclipse.archives.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.ide.eclipse.archives.feature"
/>
- <property name="get.feature.id.expected.archives/features/org.jboss.ide.eclipse.archives.test.feature/target/org.jboss.ide.eclipse.archives.test.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.archives/features/org.jboss.ide.eclipse.archives.test.feature/target/org.jboss.ide.eclipse.archives.test.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.ide.eclipse.archives.test.feature"
/>
- <property name="get.feature.id.expected.as/features/org.jboss.ide.eclipse.as.test.feature/target/org.jboss.ide.eclipse.as.test.feature-2.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.as/features/org.jboss.ide.eclipse.as.test.feature/target/org.jboss.ide.eclipse.as.test.feature-2.1.0-SNAPSHOT.jar"
value="org.jboss.ide.eclipse.as.test.feature"
/>
- <property name="get.feature.id.expected.bpel/features/org.jboss.tools.bpel.feature/target/org.jboss.tools.bpel.feature-1.0.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.bpel/features/org.jboss.tools.bpel.feature/target/org.jboss.tools.bpel.feature-1.0.0-SNAPSHOT.jar"
value="org.jboss.tools.bpel.feature"
/>
- <property name="get.feature.id.expected.bpel/features/org.jboss.tools.bpel.tests.feature/target/org.jboss.tools.bpel.tests.feature-1.0.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.bpel/features/org.jboss.tools.bpel.tests.feature/target/org.jboss.tools.bpel.tests.feature-1.0.0-SNAPSHOT.jar"
value="org.jboss.tools.bpel.tests.feature"
/>
- <property name="get.feature.id.expected.smooks/features/org.jboss.tools.smooks.feature/target/org.jboss.tools.smooks.feature-1.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.smooks/features/org.jboss.tools.smooks.feature/target/org.jboss.tools.smooks.feature-1.1.0-SNAPSHOT.jar"
value="org.jboss.tools.smooks.feature"
/>
- <property name="get.feature.id.expected.smooks/features/org.jboss.tools.smooks.test.feature/target/org.jboss.tools.smooks.test.feature-1.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.smooks/features/org.jboss.tools.smooks.test.feature/target/org.jboss.tools.smooks.test.feature-1.1.0-SNAPSHOT.jar"
value="org.jboss.tools.smooks.test.feature"
/>
- <property name="get.feature.id.expected.freemarker/features/org.jboss.ide.eclipse.freemarker.feature/target/org.jboss.ide.eclipse.freemarker.feature-1.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.freemarker/features/org.jboss.ide.eclipse.freemarker.feature/target/org.jboss.ide.eclipse.freemarker.feature-1.1.0-SNAPSHOT.jar"
value="org.jboss.ide.eclipse.freemarker.feature"
/>
- <property name="get.feature.id.expected.freemarker/features/org.jboss.ide.eclipse.freemarker.test.feature/target/org.jboss.ide.eclipse.freemarker.test.feature-1.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.freemarker/features/org.jboss.ide.eclipse.freemarker.test.feature/target/org.jboss.ide.eclipse.freemarker.test.feature-1.1.0-SNAPSHOT.jar"
value="org.jboss.ide.eclipse.freemarker.test.feature"
/>
- <property name="get.feature.id.expected.profiler/features/org.jboss.tools.profiler.feature/target/org.jboss.tools.profiler.feature-1.0.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.profiler/features/org.jboss.tools.profiler.feature/target/org.jboss.tools.profiler.feature-1.0.0-SNAPSHOT.jar"
value="org.jboss.tools.profiler.feature"
/>
- <property name="get.feature.id.expected.portlet/features/org.jboss.tools.portlet.feature/target/org.jboss.tools.portlet.feature-1.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.portlet/features/org.jboss.tools.portlet.feature/target/org.jboss.tools.portlet.feature-1.1.0-SNAPSHOT.jar"
value="org.jboss.tools.portlet.feature"
/>
- <property name="get.feature.id.expected.portlet/features/org.jboss.tools.portlet.test.feature/target/org.jboss.tools.portlet.test.feature-1.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.portlet/features/org.jboss.tools.portlet.test.feature/target/org.jboss.tools.portlet.test.feature-1.1.0-SNAPSHOT.jar"
value="org.jboss.tools.portlet.test.feature"
/>
- <property name="get.feature.id.expected.jst/features/org.jboss.tools.jst.feature/target/org.jboss.tools.jst.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.jst/features/org.jboss.tools.jst.feature/target/org.jboss.tools.jst.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.jst.feature"
/>
- <property name="get.feature.id.expected.jst/features/org.jboss.tools.jst.web.tiles.feature/target/org.jboss.tools.jst.web.tiles.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.jst/features/org.jboss.tools.jst.web.tiles.feature/target/org.jboss.tools.jst.web.tiles.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.jst.web.tiles.feature"
/>
- <property name="get.feature.id.expected.vpe/features/org.jboss.tools.vpe.feature/target/org.jboss.tools.vpe.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.vpe/features/org.jboss.tools.vpe.feature/target/org.jboss.tools.vpe.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.vpe.feature"
/>
- <property name="get.feature.id.expected.vpe/features/org.jboss.tools.xulrunner.feature/target/org.jboss.tools.xulrunner.feature-1.9.1.2.jar"
+ <property name="get.artifact.id.expected.vpe/features/org.jboss.tools.xulrunner.feature/target/org.jboss.tools.xulrunner.feature-1.9.1.2.jar"
value="org.jboss.tools.xulrunner.feature"
/>
- <property name="get.feature.id.expected.jsf/features/org.jboss.tools.jsf.feature/target/org.jboss.tools.jsf.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.jsf/features/org.jboss.tools.jsf.feature/target/org.jboss.tools.jsf.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.jsf.feature"
/>
- <property name="get.feature.id.expected.jsf/features/org.jboss.tools.richfaces.feature/target/org.jboss.tools.richfaces.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.jsf/features/org.jboss.tools.richfaces.feature/target/org.jboss.tools.richfaces.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.richfaces.feature"
/>
- <property name="get.feature.id.expected.esb/features/org.jboss.tools.esb.feature/target/org.jboss.tools.esb.feature-1.3.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.esb/features/org.jboss.tools.esb.feature/target/org.jboss.tools.esb.feature-1.3.0-SNAPSHOT.jar"
value="org.jboss.tools.esb.feature"
/>
- <property name="get.feature.id.expected.esb/features/org.jboss.tools.esb.test.feature/target/org.jboss.tools.esb.test.feature-1.3.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.esb/features/org.jboss.tools.esb.test.feature/target/org.jboss.tools.esb.test.feature-1.3.0-SNAPSHOT.jar"
value="org.jboss.tools.esb.test.feature"
/>
- <property name="get.feature.id.expected.tptp/features/org.jboss.tools.tptp.feature/target/org.jboss.tools.tptp.feature-1.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.tptp/features/org.jboss.tools.tptp.feature/target/org.jboss.tools.tptp.feature-1.1.0-SNAPSHOT.jar"
value="org.jboss.tools.tptp.feature"
/>
- <property name="get.feature.id.expected.ws/features/org.jboss.tools.ws.feature/target/org.jboss.tools.ws.feature-1.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.ws/features/org.jboss.tools.ws.feature/target/org.jboss.tools.ws.feature-1.1.0-SNAPSHOT.jar"
value="org.jboss.tools.ws.feature"
/>
- <property name="get.feature.id.expected.cdi/features/org.jboss.tools.cdi.feature/target/org.jboss.tools.cdi.feature-1.0.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.cdi/features/org.jboss.tools.cdi.feature/target/org.jboss.tools.cdi.feature-1.0.0-SNAPSHOT.jar"
value="org.jboss.tools.cdi.feature"
/>
- <property name="get.feature.id.expected.struts/features/org.jboss.tools.struts.feature/target/org.jboss.tools.struts.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.struts/features/org.jboss.tools.struts.feature/target/org.jboss.tools.struts.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.struts.feature"
/>
- <property name="get.feature.id.expected.hibernatetools/features/org.hibernate.eclipse.feature/target/org.hibernate.eclipse.feature-3.3.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.hibernatetools/features/org.hibernate.eclipse.feature/target/org.hibernate.eclipse.feature-3.3.0-SNAPSHOT.jar"
value="org.hibernate.eclipse.feature"
/>
- <property name="get.feature.id.expected.hibernatetools/features/org.hibernate.eclipse.test.feature/target/org.hibernate.eclipse.test.feature-3.3.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.hibernatetools/features/org.hibernate.eclipse.test.feature/target/org.hibernate.eclipse.test.feature-3.3.0-SNAPSHOT.jar"
value="org.hibernate.eclipse.test.feature"
/>
- <property name="get.feature.id.expected.seam/features/org.jboss.tools.seam.feature/target/org.jboss.tools.seam.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.seam/features/org.jboss.tools.seam.feature/target/org.jboss.tools.seam.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.seam.feature"
/>
- <property name="get.feature.id.expected.seam/features/org.jboss.tools.seam.test.feature/target/org.jboss.tools.seam.test.feature-3.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.seam/features/org.jboss.tools.seam.test.feature/target/org.jboss.tools.seam.test.feature-3.1.0-SNAPSHOT.jar"
value="org.jboss.tools.seam.test.feature"
/>
- <property name="get.feature.id.expected.examples/features/org.jboss.tools.community.project.examples.feature/target/org.jboss.tools.community.project.examples.feature-1.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.examples/features/org.jboss.tools.community.project.examples.feature/target/org.jboss.tools.community.project.examples.feature-1.1.0-SNAPSHOT.jar"
value="org.jboss.tools.community.project.examples.feature"
/>
- <property name="get.feature.id.expected.examples/features/org.jboss.tools.project.examples.feature/target/org.jboss.tools.project.examples.feature-1.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.examples/features/org.jboss.tools.project.examples.feature/target/org.jboss.tools.project.examples.feature-1.1.0-SNAPSHOT.jar"
value="org.jboss.tools.project.examples.feature"
/>
- <property name="get.feature.id.expected.examples/features/org.jboss.tools.project.examples.test.feature/target/org.jboss.tools.project.examples.test.feature-1.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.examples/features/org.jboss.tools.project.examples.test.feature/target/org.jboss.tools.project.examples.test.feature-1.1.0-SNAPSHOT.jar"
value="org.jboss.tools.project.examples.test.feature"
/>
- <property name="get.feature.id.expected.birt/features/org.jboss.tools.birt.feature/target/org.jboss.tools.birt.feature-1.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.birt/features/org.jboss.tools.birt.feature/target/org.jboss.tools.birt.feature-1.1.0-SNAPSHOT.jar"
value="org.jboss.tools.birt.feature"
/>
- <property name="get.feature.id.expected.birt/features/org.jboss.tools.birt.test.feature/target/org.jboss.tools.birt.test.feature-1.1.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.birt/features/org.jboss.tools.birt.test.feature/target/org.jboss.tools.birt.test.feature-1.1.0-SNAPSHOT.jar"
value="org.jboss.tools.birt.test.feature"
/>
- <property name="get.feature.id.expected.maven/features/org.jboss.tools.maven.feature/target/org.jboss.tools.maven.feature-1.0.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.maven/features/org.jboss.tools.maven.feature/target/org.jboss.tools.maven.feature-1.0.0-SNAPSHOT.jar"
value="org.jboss.tools.maven.feature"
/>
- <property name="get.feature.id.expected.maven/features/org.jboss.tools.maven.seam.feature/target/org.jboss.tools.maven.seam.feature-1.0.0-SNAPSHOT.jar"
+ <property name="get.artifact.id.expected.maven/features/org.jboss.tools.maven.seam.feature/target/org.jboss.tools.maven.seam.feature-1.0.0-SNAPSHOT.jar"
value="org.jboss.tools.maven.seam.feature"
/>
+ <property name="get.artifact.id.expected.as/features/org.jboss.ide.eclipse.as.feature/target/org.jboss.ide.eclipse.as.feature-2.1.0-SNAPSHOT.jar"
+ value="org.jboss.ide.eclipse.as.feature"
+ />
+ <property name="get.artifact.id.expected.xulrunner/features/org.mozilla.xpcom.feature/target/org.mozilla.xpcom.feature-1.9.1.2a.jar"
+ value="org.mozilla.xpcom.feature"
+ />
+ <property name="get.artifact.id.expected.xulrunner/features/org.mozilla.xulrunner.feature/target/org.mozilla.xulrunner.feature-1.9.1.2.jar"
+ value="org.mozilla.xulrunner.feature"
+ />
+
+ <!-- expected values for test.get.plugin.id -->
+ <property name="get.artifact.id.expected.drools/plugins/org.eclipse.webdav_3.0.101.jar"
+ value="org.eclipse.webdav"
+ />
+ <property name="get.artifact.id.expected.drools/plugins/org.guvnor.tools_5.1.0.SNAPSHOT.jar"
+ value="org.guvnor.tools"
+ />
+ <property name="get.artifact.id.expected.drools/plugins/org.drools.eclipse_5.1.0.SNAPSHOT.jar"
+ value="org.drools.eclipse"
+ />
+ <property name="get.artifact.id.expected.drools/plugins/org.drools.eclipse.task_5.1.0.SNAPSHOT.jar"
+ value="org.drools.eclipse.task"
+ />
+
</target>
<target name="test.all">
<antcall target="test.get.sources.build.all" />
<antcall target="test.get.sources" />
+ <antcall target="test.get.feature.id" />
+ <antcall target="test.get.plugin.id.drools" />
</target>
+ <!-- simpler tests, run faster -->
+ <target name="test.get.feature.id.vpe">
+ <antcall target="test.get.feature.id">
+ <param name="COMPONENTS" value="vpe" />
+ </antcall>
+ </target>
+ <target name="test.get.plugin.id.drools">
+ <antcall target="test.get.plugin.id">
+ <param name="COMPONENTS" value="drools" />
+ </antcall>
+ </target>
+
+ <!-- test all feature.id fetches -->
+ <target name="test.get.feature.id" depends="init, test.expected.values">
+ <for param="COMPONENT" list="${COMPONENTS}" delimiter=";,
+ ">
+ <sequential>
+ <echo level="warn">Test feature.ids for @{COMPONENT}</echo>
+ <for param="artifactJar" delimiter=", ">
+ <path>
+ <fileset dir="${basedir}/@{COMPONENT}" includes="**/features/**/target/*.jar" />
+ </path>
+ <sequential>
+ <echo level="info">Test @{artifactJar}</echo>
+ <antcallback target="get.artifact.id" return="artifact.id">
+ <property name="artifactJar" value="@{artifactJar}" />
+ <param name="regexp.path" value=".+/features/[^/]+/target/([^/]+feature.+\.jar)" />
+ </antcallback>
+ <propertyregex override="true"
+ property="artifact.id.expected.name"
+ defaultvalue="@{artifactJar}"
+ input="@{artifactJar}"
+ regexp="${basedir}\/(.+)"
+ replace="get.artifact.id.expected.\1"
+ />
+ <!-- <echo><property name="get.artifact.id.expected.@{artifactJar}" value="${artifact.id}"/> </echo> -->
+ <propertycopy name="artifact.id.expected" from="${artifact.id.expected.name}" />
+ <assert failonerror="true" message="Expected: ${artifact.id.expected}; got: ${artifact.id}">
+ <bool>
+ <equals arg1="${artifact.id.expected}" arg2="${artifact.id}" />
+ </bool>
+ </assert>
+ <var name="artifact.id.expected" unset="true" />
+ </sequential>
+ </for>
+ </sequential>
+ </for>
+ </target>
+
+ <!-- test all plugin.id fetches -->
+ <target name="test.get.plugin.id" depends="init, test.expected.values">
+ <for param="COMPONENT" list="${COMPONENTS}" delimiter=";,
+ ">
+ <sequential>
+ <echo level="warn">Test plugin.ids for @{COMPONENT}</echo>
+ <for param="artifactJar" delimiter=", ">
+ <path>
+ <fileset dir="${basedir}/@{COMPONENT}" includes="**/plugins/*.jar" excludes="**/target/**" />
+ </path>
+ <sequential>
+ <echo level="info">[1] Test @{artifactJar}</echo>
+ <antcallback target="get.artifact.id" return="artifact.id">
+ <property name="artifactJar" value="@{artifactJar}" />
+ <property name="regexp.path" value=".+/plugins/([^/]+.+\.jar)" />
+ </antcallback>
+ <propertyregex override="true"
+ property="artifact.id.expected.name"
+ defaultvalue="@{artifactJar}"
+ input="@{artifactJar}"
+ regexp="${basedir}\/(.+)"
+ replace="get.artifact.id.expected.\1"
+ />
+ <!-- <echo><property name="get.artifact.id.expected.@{artifactJar}" value="${artifact.id}"/> </echo> -->
+ <propertycopy name="artifact.id.expected" from="${artifact.id.expected.name}" />
+ <assert failonerror="true" message="Expected: ${artifact.id.expected}; got: ${artifact.id}">
+ <bool>
+ <equals arg1="${artifact.id.expected}" arg2="${artifact.id}" />
+ </bool>
+ </assert>
+ <var name="artifact.id.expected" unset="true" />
+ <var name="artifact.id" unset="true" />
+
+ <echo level="info">[2] Test @{artifactJar}</echo>
+ <antcallback target="get.plugin.id" return="plugin.id">
+ <property name="artifactJar" value="@{artifactJar}" />
+ <property name="regexp.path" value=".+/plugins/([^/]+.+\.jar)" />
+ </antcallback>
+ <propertyregex override="true"
+ property="artifact.id.expected.name"
+ defaultvalue="@{artifactJar}"
+ input="@{artifactJar}"
+ regexp="${basedir}\/(.+)"
+ replace="get.artifact.id.expected.\1"
+ />
+ <!-- <echo><property name="get.artifact.id.expected.@{artifactJar}" value="${artifact.id}"/> </echo> -->
+ <propertycopy name="artifact.id.expected" from="${artifact.id.expected.name}" />
+ <assert failonerror="true" message="Expected: ${artifact.id.expected}; got: ${plugin.id}">
+ <bool>
+ <equals arg1="${artifact.id.expected}" arg2="${plugin.id}" />
+ </bool>
+ </assert>
+ <var name="artifact.id.expected" unset="true" />
+ <var name="artifact.id" unset="true" />
+ </sequential>
+ </for>
+ </sequential>
+ </for>
+ </target>
+
<target name="test.get.sources.build.all"
depends="init, test.expected.values"
description="verify get.sources works to fetch, then update; verify all components will be built"
14 years
JBoss Tools SVN: r21923 - in trunk/drools/docs/reference/en-US: images/debugging_rules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-05-05 14:24:41 -0400 (Wed, 05 May 2010)
New Revision: 21923
Modified:
trunk/drools/docs/reference/en-US/debugging_rules.xml
trunk/drools/docs/reference/en-US/images/debugging_rules/debugging_rules1.png
Log:
TOOLSDOC-65-drools ref guide should mention which file to open/use - done
Modified: trunk/drools/docs/reference/en-US/debugging_rules.xml
===================================================================
--- trunk/drools/docs/reference/en-US/debugging_rules.xml 2010-05-05 18:20:19 UTC (rev 21922)
+++ trunk/drools/docs/reference/en-US/debugging_rules.xml 2010-05-05 18:24:41 UTC (rev 21923)
@@ -1,137 +1,141 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="debugging_rules" xreflabel="debugging_rules">
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Drools Tools</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Debugging rules</title>
-
- <para>This chapter describes how to debug rules during the execution of your Drools application.</para>
-
- <section id="creating_breakpoints">
- <title>Creating Breakpoints</title>
-
- <para>At first, we'll focus on how to add
- breakpoints in the consequences of your rules.</para>
-
- <para>Whenever such a breakpoint is uncounted
- during the execution of the rules, the execution is halted. It's possible then inspect the
- variables known at that point and use any of the default debugging actions to decide what
- should happen next (step over, continue, etc). To inspect
- the content of the working memory and agenda the Debug views can be used.</para>
-
- <para>You can add/remove rule breakpoints in <emphasis>
- <property>.drl</property>
- </emphasis> files in two ways, similar to adding breakpoints to Java files:</para>
-
- <itemizedlist>
- <listitem>
- <para>Double-click the ruler in the <property>Rule editor</property> at the line
- where you want to add a breakpoint.</para>
- <tip>
- <title>Tip:</title>
- <para>Note that rule breakpoints can only be created in the consequence of a
- rule. Double-clicking on a line where no breakpoint is allowed will do
- nothing.</para>
- </tip>
- <para>A breakpoint can be removed by double-clicking the ruler once more. </para>
- </listitem>
-
- <listitem>
- <para>Right-click the ruler. Select <emphasis>
- <property>Toggle Breakpoint</property>
- </emphasis> action in the appeared popup menu. Clicking the action will add a
- breakpoint at the selected line or remove it if there is one already.</para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>Adding Breakpoints</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/debugging_rules/debugging_rules1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The <property>Debug perspective</property> contains a <property>Breakpoints
- view</property> which can be used to see all defined breakpoints, get their
- properties, enable/disable or remove them, etc. You can switch to it by navigating to <emphasis>
- <property>Window > Perspective > Others > Debug</property>.</emphasis></para>
- </section>
-
- <section id="debugging">
- <title>Debugging</title>
-
- <para>Drools breakpoints are only enabled if you debug your application as a Drools
- Application. To do this you should perform one of the actions:</para>
-
- <itemizedlist>
- <listitem>
- <para>Select the main class of your application. Right click it and select <emphasis>
- <property>Debug As > Drools Application</property>.</emphasis></para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>Debugging Drools Application</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/debugging_rules/debugging_rules2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Alternatively, you can also go to <emphasis>
- <property>Debug As > Debug Configuration</property>
- </emphasis> to open a new dialog for creating, managing and running debug
- configurations.</para>
-
- <para>Select the <emphasis>
- <property>Drools Application</property>
- </emphasis> item in the left tree and click the <emphasis>
- <property>New launch configuration</property>
- </emphasis> button (leftmost icon in the toolbar above the tree). This will
- create a new configuration and already fill in some of the properties (like the
- Project and Main class) based on main class you selected in the beginning. All
- properties shown here are the same as any standard Java program.</para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>New Debug Configuration</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/debugging_rules/debugging_rules3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <tip>
- <title>Tip:</title>
- <para>Remember to change the name of your debug configuration to something meaningful.</para>
- </tip>
-
- <para>Next
- click the <emphasis>
- <property>Debug</property>
- </emphasis> button on the bottom to start debugging your application. </para>
-
- <para>After enabling the debugging, the application starts executing and will halt if
- any breakpoint is encountered. This can be a Drools rule breakpoint, or any other
- standard Java breakpoint. Whenever a Drools rule breakpoint is encountered, the
- corresponding <emphasis>
- <property>.drl</property></emphasis> file is opened and the active line is highlighted. The Variables view
- also contains all rule parameters and their value. You can then use the default Java
- debug actions to decide what to do next (resume, terminate, step over, etc.). The debug
- views can also be used to determine the contents of the working memory and agenda at
- that time as well (you don't have to select a working memory now, the current executing
- working memory is automatically shown).</para>
-
-
- </section>
-</chapter>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="debugging_rules" xreflabel="debugging_rules">
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Drools Tools</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Debugging rules</title>
+
+ <para>This chapter describes how to debug rules during the execution of your Drools application.</para>
+
+ <section id="creating_breakpoints">
+ <title>Creating Breakpoints</title>
+
+ <para>At first, we'll focus on how to add
+ breakpoints in the consequences of your rules.</para>
+
+ <para>Whenever such a breakpoint is uncounted
+ during the execution of the rules, the execution is halted. It's possible then inspect the
+ variables known at that point and use any of the default debugging actions to decide what
+ should happen next (step over, continue, etc). To inspect
+ the content of the working memory and agenda the Debug views can be used.</para>
+
+ <para>To create breakpoints in the Package Explorer view or Navigator view of the Drools perspective, double-click the selected
+ <property>.drl</property> file to open it in the editor. In the example below we opened <property>Sample.drl</property> file.
+ </para>
+
+ <para>You can add/remove rule breakpoints in the <emphasis>
+ <property>.drl</property>
+ </emphasis> files in two ways, similar to adding breakpoints to Java files:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Double-click the ruler in the <property>Rule editor</property> at the line
+ where you want to add a breakpoint.</para>
+ <tip>
+ <title>Tip:</title>
+ <para>Note that rule breakpoints can only be created in the consequence of a
+ rule. Double-clicking on a line where no breakpoint is allowed will do
+ nothing.</para>
+ </tip>
+ <para>A breakpoint can be removed by double-clicking the ruler once more. </para>
+ </listitem>
+
+ <listitem>
+ <para>Right-click the ruler. Select <emphasis>
+ <property>Toggle Breakpoint</property>
+ </emphasis> action in the appeared popup menu. Clicking the action will add a
+ breakpoint at the selected line or remove it if there is one already.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Adding Breakpoints</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/debugging_rules/debugging_rules1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <property>Debug perspective</property> contains a <property>Breakpoints
+ view</property> which can be used to see all defined breakpoints, get their
+ properties, enable/disable or remove them, etc. You can switch to it by navigating to <emphasis>
+ <property>Window > Perspective > Others > Debug</property>.</emphasis></para>
+ </section>
+
+ <section id="debugging">
+ <title>Debugging</title>
+
+ <para>Drools breakpoints are only enabled if you debug your application as a Drools
+ Application. To do this you should perform one of the actions:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Select the main class of your application. Right click it and select <emphasis>
+ <property>Debug As > Drools Application</property>.</emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Debugging Drools Application</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/debugging_rules/debugging_rules2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Alternatively, you can also go to <emphasis>
+ <property>Debug As > Debug Configuration</property>
+ </emphasis> to open a new dialog for creating, managing and running debug
+ configurations.</para>
+
+ <para>Select the <emphasis>
+ <property>Drools Application</property>
+ </emphasis> item in the left tree and click the <emphasis>
+ <property>New launch configuration</property>
+ </emphasis> button (leftmost icon in the toolbar above the tree). This will
+ create a new configuration and already fill in some of the properties (like the
+ Project and Main class) based on main class you selected in the beginning. All
+ properties shown here are the same as any standard Java program.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>New Debug Configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/debugging_rules/debugging_rules3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Tip:</title>
+ <para>Remember to change the name of your debug configuration to something meaningful.</para>
+ </tip>
+
+ <para>Next
+ click the <emphasis>
+ <property>Debug</property>
+ </emphasis> button on the bottom to start debugging your application. </para>
+
+ <para>After enabling the debugging, the application starts executing and will halt if
+ any breakpoint is encountered. This can be a Drools rule breakpoint, or any other
+ standard Java breakpoint. Whenever a Drools rule breakpoint is encountered, the
+ corresponding <emphasis>
+ <property>.drl</property></emphasis> file is opened and the active line is highlighted. The Variables view
+ also contains all rule parameters and their value. You can then use the default Java
+ debug actions to decide what to do next (resume, terminate, step over, etc.). The debug
+ views can also be used to determine the contents of the working memory and agenda at
+ that time as well (you don't have to select a working memory now, the current executing
+ working memory is automatically shown).</para>
+
+
+ </section>
+</chapter>
\ No newline at end of file
Modified: trunk/drools/docs/reference/en-US/images/debugging_rules/debugging_rules1.png
===================================================================
(Binary files differ)
14 years
JBoss Tools SVN: r21922 - trunk/jmx/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-05-05 14:20:19 -0400 (Wed, 05 May 2010)
New Revision: 21922
Modified:
trunk/jmx/docs/reference/en-US/introduction.xml
Log:
TOOLSDOC-68-Broken "IntsallingJBossTools" in jmx ref guide - fixed
Modified: trunk/jmx/docs/reference/en-US/introduction.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/introduction.xml 2010-05-05 18:02:28 UTC (rev 21921)
+++ trunk/jmx/docs/reference/en-US/introduction.xml 2010-05-05 18:20:19 UTC (rev 21922)
@@ -1,133 +1,133 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<chapter id="intruduction" xreflabel="introduction">
- <?dbhtml filename="introduction.html"?>
-
- <title>Introduction</title>
- <para><property>JBoss Tools</property>' JMX project is a fork of <ulink
- url="http://code.google.com/p/eclipse-jmx/">eclipse-jmx</ulink>, a project by Jeff Mesnil.
- It was forked with permission. </para>
-
- <section>
- <title>What is JMX?</title>
- <para>
-The Java Management Extensions (JMX) technology is a standard part of the Java Platform, Standard Edition (Java SE platform). The JMX technology was added to the platform in the Java 2 Platform, Standard Edition (J2SE) 5.0 release.
-</para>
- <para>
-The JMX technology provides a simple, standard way of managing resources such as applications, devices, and services. Because the JMX technology is dynamic, you can use it to monitor and manage resources as they are created, installed and implemented. You can also use the JMX technology to monitor and manage the Java Virtual Machine (Java VM).
-</para>
- <para>
-The JMX specification defines the architecture, design patterns, APIs, and services in the Java programming language for management and monitoring of applications and networks.
-</para>
- <para>
-Using the JMX technology, a given resource is instrumented by one or more Java objects known as Managed Beans, or MBeans. These MBeans are registered in a core-managed object server, known as an MBean server. The MBean server acts as a management agent and can run on most devices that have been enabled for the Java programming language.
-</para>
-
- <para>
-The specifications define JMX agents that you use to manage any resources that have been correctly configured for management. A JMX agent consists of an MBean server, in which MBeans are registered, and a set of services for handling the MBeans. In this way, JMX agents directly control resources and make them available to remote management applications.
-</para>
- <para>
-The way in which resources are instrumented is completely independent from the management infrastructure. Resources can therefore be rendered manageable regardless of how their management applications are implemented.
-</para>
- <para>
-The JMX technology defines standard connectors (known as JMX connectors) that enable you to access JMX agents from remote management applications. JMX connectors using different protocols provide the same management interface. Consequently, a management application can manage resources transparently, regardless of the communication protocol used. JMX agents can also be used by systems or applications that are not compliant with the JMX specification, as long as those systems or applications support JMX agents.
-</para>
-<ulink
- url="http://java.sun.com/docs/books/tutorial/jmx/overview/index.html">Read more about JMX</ulink>.
- </section>
-
- <section>
- <title>What is JMX Tools?</title>
- <para><property>JBoss JMX Tools</property> allow to setup multiple JMX connections and provide view
- for exploring the JMX tree and execute operations directly from Eclipse.</para>
-
- <para>This chapter covers the basics of working with <property>JMX plugin</property>, which is
- used to manage Java applications through JMX and its RMI Connector.</para>
-
- <figure>
- <title>JMX Tools</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/eclipse-jmx_0.2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section><title>Key Features of JMX Tools</title>
- <para>For a start, we propose you to look through the table of main features of JMX Tools:</para>
- <table>
-
- <title>Key Functionality for JMX Tools</title>
- <tgroup cols="3">
-
- <colspec colnum="1" align="left" colwidth="2*"/>
- <colspec colnum="2" colwidth="4*"/>
- <colspec colnum="3" align="left" colwidth="2*"/>
-
- <thead>
- <row>
- <entry>Feature</entry>
- <entry>Benefit</entry>
- <entry>Chapter</entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry><para>MBean Explorer</para></entry>
- <entry><para>MBean Explorer is a useful view with a text filter that displays domains, mbeans, attributes, and operations inside a connection.</para></entry>
- <entry>
- <link linkend="mbean_explorer">MBean Explorer</link>
- </entry>
- </row>
-
- <row>
- <entry><para>MBean Editor</para></entry>
- <entry><para>MBean Editor is a multi-page editor to manage MBeans.</para></entry>
- <entry>
- <link linkend="mbean_editor">MBean Editor</link>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </section>
-
- <section>
- <title>Requirements and Installation</title>
- <section>
- <title> Requirements</title>
- <para>Requirements to use <property>JMX Tools</property> are the following:</para>
-
- <itemizedlist>
- <listitem>
- <para><property>JMX Tools</property> is developed on Eclipse 3.4.x milestones</para>
- </listitem>
- <listitem>
- <para><property>JMX Tools</property> requires that Eclipse is run on a JDK 1.5.0 or above
- (due to dependencies on JMX packages which were introduced in Java 1.5.0)</para>
- </listitem>
- </itemizedlist>
- </section>
- <section>
- <title>Installation</title>
- <para>Here, we are going to explain how to install the <property>JMX plugin</property> into
- Eclipse.</para>
-
- <para><property>JMX Tools</property> is one module of the <property>JBoss Tools</property>
- project. <property>JMX Tools</property> has no dependency on any other part of <property>JBoss
- Tools</property>, and can be downloaded standalone. Even though the <property>JMX
- Tools</property> have no dependencies, other plugins, such as <property>AS Tools</property>,
- do depend on the JMX Tooling and even extend it. </para>
-
- <para>You can find the <property>JBoss Tools</property> plugins over at the <ulink
- url="http://labs.jboss.com/tools/download.html">download pages</ulink>. The only
- package you'll need to get is the JMX Tooling, however the <property>AS
- Tools</property> would give you a more full experience when using JMX with JBoss Servers.
- You can find further download and installation instructions on the JBoss Wiki in the <ulink
- url="http://labs.jboss.com/wiki/InstallingJBossTools">InstallingJBossTools</ulink>
- section.</para>
- </section>
- </section>
-</chapter>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="intruduction" xreflabel="introduction">
+ <?dbhtml filename="introduction.html"?>
+
+ <title>Introduction</title>
+ <para><property>JBoss Tools</property>' JMX project is a fork of <ulink
+ url="http://code.google.com/p/eclipse-jmx/">eclipse-jmx</ulink>, a project by Jeff Mesnil.
+ It was forked with permission. </para>
+
+ <section>
+ <title>What is JMX?</title>
+ <para>
+The Java Management Extensions (JMX) technology is a standard part of the Java Platform, Standard Edition (Java SE platform). The JMX technology was added to the platform in the Java 2 Platform, Standard Edition (J2SE) 5.0 release.
+</para>
+ <para>
+The JMX technology provides a simple, standard way of managing resources such as applications, devices, and services. Because the JMX technology is dynamic, you can use it to monitor and manage resources as they are created, installed and implemented. You can also use the JMX technology to monitor and manage the Java Virtual Machine (Java VM).
+</para>
+ <para>
+The JMX specification defines the architecture, design patterns, APIs, and services in the Java programming language for management and monitoring of applications and networks.
+</para>
+ <para>
+Using the JMX technology, a given resource is instrumented by one or more Java objects known as Managed Beans, or MBeans. These MBeans are registered in a core-managed object server, known as an MBean server. The MBean server acts as a management agent and can run on most devices that have been enabled for the Java programming language.
+</para>
+
+ <para>
+The specifications define JMX agents that you use to manage any resources that have been correctly configured for management. A JMX agent consists of an MBean server, in which MBeans are registered, and a set of services for handling the MBeans. In this way, JMX agents directly control resources and make them available to remote management applications.
+</para>
+ <para>
+The way in which resources are instrumented is completely independent from the management infrastructure. Resources can therefore be rendered manageable regardless of how their management applications are implemented.
+</para>
+ <para>
+The JMX technology defines standard connectors (known as JMX connectors) that enable you to access JMX agents from remote management applications. JMX connectors using different protocols provide the same management interface. Consequently, a management application can manage resources transparently, regardless of the communication protocol used. JMX agents can also be used by systems or applications that are not compliant with the JMX specification, as long as those systems or applications support JMX agents.
+</para>
+<ulink
+ url="http://java.sun.com/docs/books/tutorial/jmx/overview/index.html">Read more about JMX</ulink>.
+ </section>
+
+ <section>
+ <title>What is JMX Tools?</title>
+ <para><property>JBoss JMX Tools</property> allow to setup multiple JMX connections and provide view
+ for exploring the JMX tree and execute operations directly from Eclipse.</para>
+
+ <para>This chapter covers the basics of working with <property>JMX plugin</property>, which is
+ used to manage Java applications through JMX and its RMI Connector.</para>
+
+ <figure>
+ <title>JMX Tools</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/eclipse-jmx_0.2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section><title>Key Features of JMX Tools</title>
+ <para>For a start, we propose you to look through the table of main features of JMX Tools:</para>
+ <table>
+
+ <title>Key Functionality for JMX Tools</title>
+ <tgroup cols="3">
+
+ <colspec colnum="1" align="left" colwidth="2*"/>
+ <colspec colnum="2" colwidth="4*"/>
+ <colspec colnum="3" align="left" colwidth="2*"/>
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ <entry>Chapter</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry><para>MBean Explorer</para></entry>
+ <entry><para>MBean Explorer is a useful view with a text filter that displays domains, mbeans, attributes, and operations inside a connection.</para></entry>
+ <entry>
+ <link linkend="mbean_explorer">MBean Explorer</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry><para>MBean Editor</para></entry>
+ <entry><para>MBean Editor is a multi-page editor to manage MBeans.</para></entry>
+ <entry>
+ <link linkend="mbean_editor">MBean Editor</link>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Requirements and Installation</title>
+ <section>
+ <title> Requirements</title>
+ <para>Requirements to use <property>JMX Tools</property> are the following:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><property>JMX Tools</property> is developed on Eclipse 3.4.x milestones</para>
+ </listitem>
+ <listitem>
+ <para><property>JMX Tools</property> requires that Eclipse is run on a JDK 1.5.0 or above
+ (due to dependencies on JMX packages which were introduced in Java 1.5.0)</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section>
+ <title>Installation</title>
+ <para>Here, we are going to explain how to install the <property>JMX plugin</property> into
+ Eclipse.</para>
+
+ <para><property>JMX Tools</property> is one module of the <property>JBoss Tools</property>
+ project. <property>JMX Tools</property> has no dependency on any other part of <property>JBoss
+ Tools</property>, and can be downloaded standalone. Even though the <property>JMX
+ Tools</property> have no dependencies, other plugins, such as <property>AS Tools</property>,
+ do depend on the JMX Tooling and even extend it. </para>
+
+ <para>You can find the <property>JBoss Tools</property> plugins over at the <ulink
+ url="http://labs.jboss.com/tools/download.html">download pages</ulink>. The only
+ package you'll need to get is the JMX Tooling, however the <property>AS
+ Tools</property> would give you a more full experience when using JMX with JBoss Servers.
+ You can find further download and installation instructions on the JBoss Wiki in the <ulink
+ url="http://www.jboss.org/tools/download/installation">InstallingJBossTools</ulink>
+ section.</para>
+ </section>
+ </section>
+</chapter>
\ No newline at end of file
14 years
JBoss Tools SVN: r21921 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-05 14:02:28 -0400 (Wed, 05 May 2010)
New Revision: 21921
Modified:
branches/modular_build/build/build.xml
Log:
improve update site generation
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-05 17:33:20 UTC (rev 21920)
+++ branches/modular_build/build/build.xml 2010-05-05 18:02:28 UTC (rev 21921)
@@ -286,8 +286,16 @@
</sequential>
</macrodef>
+ <!-- only reset the file if we don't already have a value for COMPONENTS.to.build; thus when called later for "site" component build, append instead of overwriting -->
+ <if>
+ <not>
+ <isset property="COMPONENTS.to.build" />
+ </not>
+ <then>
+ <echo file="build.cfg" message="COMPONENTS.to.build = " />
+ </then>
+ </if>
<!-- check for each component dir in ${WORKINGDIR}; if not found, fetch -->
- <echo file="build.cfg" message="COMPONENTS.to.build = " />
<if>
<and>
<isset property="COMPONENT" />
@@ -402,6 +410,7 @@
</testsuite>
</echo>
<property name="no.tests.run" value="true" />
+ <property name="no.builds.run" value="true" />
</then>
<else>
<echo level="warning">The following components' sources have changed and will be built:
@@ -517,7 +526,7 @@
rm -fr /tmp/.X3-lock
fi
/usr/bin/Xvfb :3 -ac 2>&1 1>/dev/null &
-DISPLAY=:3 /opt/maven3/bin/mvn $*
+DISPLAY=:3 /opt/maven3/bin/mvn $*
kill -9 `cat /tmp/.X3-lock`
rm -fr /tmp/.X3-lock
</echo>
@@ -645,43 +654,51 @@
<!-- Used to build the overall update site for all components; requires a custom site.xml (generated from category.*.xml) and previously checked in pom.xml -->
<target name="create.overall.update.site" depends="init">
- <property name="update.site.path" value="site" />
+ <if>
+ <isset property="no.builds.run" />
+ <then>
+ <echo>All components up to date: nothing to do!
+To force a build of unchanged components, use -Dbuild.if.sources.unchanged=true</echo>
+ </then>
+ <else>
+ <property name="update.site.path" value="site" />
- <!-- Clean up from last time, then fetch fresh sources (checkout or update) -->
- <!-- TODO: don't overwrite the build.cfg file the second time we call get.sources -->
- <delete dir="${WORKINGDIR}/${update.site.path}/target" quiet="true" />
- <antcall target="get.sources">
- <param name="COMPONENT" value="site" />
- </antcall>
+ <!-- Clean up from last time, then fetch fresh sources (checkout or update) -->
+ <delete dir="${WORKINGDIR}/${update.site.path}/target" quiet="true" />
+ <antcall target="get.sources">
+ <param name="COMPONENT" value="site" />
+ </antcall>
- <!-- Get correct version of site.xml + resolve variables -->
- <loadfile property="site.xml.transformed"
- srcfile="${WORKINGDIR}/${update.site.path}/category.${product.id}.xml"
- >
- <filterchain>
- <expandproperties />
- </filterchain>
- </loadfile>
- <echo file="${WORKINGDIR}/${update.site.path}/site.xml" message="${site.xml.transformed}" />
- <var name="site.xml.transformed" unset="true" />
+ <!-- Get correct version of site.xml + resolve variables -->
+ <loadfile property="site.xml.transformed"
+ srcfile="${WORKINGDIR}/${update.site.path}/category.${product.id}.xml"
+ >
+ <filterchain>
+ <expandproperties />
+ </filterchain>
+ </loadfile>
+ <echo file="${WORKINGDIR}/${update.site.path}/site.xml" message="${site.xml.transformed}" />
+ <var name="site.xml.transformed" unset="true" />
- <!-- Build update site -->
- <antcall target="build.update.site">
- <param name="COMPONENTS.to.build" value="site" />
- <param name="update.site.path" value="${update.site.path}" />
- </antcall>
+ <!-- Build update site -->
+ <antcall target="build.update.site">
+ <param name="COMPONENTS.to.build" value="site" />
+ <param name="update.site.path" value="${update.site.path}" />
+ </antcall>
- <!-- Copy overall site into workspace so it can be archived by Hudson -->
- <if>
- <not>
- <equals arg1="${basedir}" arg2="${WORKINGDIR}" />
- </not>
- <then>
- <mkdir dir="${basedir}/${update.site.path}/target" />
- <copy todir="${basedir}/${update.site.path}/target" overwrite="true">
- <fileset dir="${WORKINGDIR}/${update.site.path}/target/site" />
- </copy>
- </then>
+ <!-- Copy overall site into workspace so it can be archived by Hudson -->
+ <if>
+ <not>
+ <equals arg1="${basedir}" arg2="${WORKINGDIR}" />
+ </not>
+ <then>
+ <mkdir dir="${basedir}/${update.site.path}/target" />
+ <copy todir="${basedir}/${update.site.path}/target" overwrite="true">
+ <fileset dir="${WORKINGDIR}/${update.site.path}/target/site" />
+ </copy>
+ </then>
+ </if>
+ </else>
</if>
</target>
@@ -700,6 +717,7 @@
/>
</else>
</if>
+ <delete file="${destinationZip}" quiet="true" />
<if>
<equals arg1="${COMPONENTS.to.build}" arg2="site" />
@@ -724,32 +742,56 @@
<!-- Delete pointless site.zip -->
<delete file="${WORKINGDIR}/${update.site.path}/target/site.zip" />
- <!-- Create real update site zip, including web UI -->
- <copy todir="${WORKINGDIR}/${update.site.path}/target/site">
- <fileset dir="${WORKINGDIR}/${update.site.path}" includes="web/*, index.html" />
- </copy>
- <zip destfile="${destinationZip}" basedir="${WORKINGDIR}/${update.site.path}/target/site" update="false" />
-
- <!-- Copy zip into workspace so it can be archived by Hudson -->
<if>
- <not>
- <equals arg1="${basedir}" arg2="${WORKINGDIR}" />
- </not>
+ <and>
+ <available file="${WORKINGDIR}/${update.site.path}/target/site/plugins" type="dir" />
+ <available file="${WORKINGDIR}/${update.site.path}/target/site/features" type="dir" />
+ </and>
<then>
- <mkdir dir="${basedir}/${update.site.path}/target" />
- <copy todir="${basedir}/${update.site.path}/target"
- flatten="true"
- preservelastmodified="true"
- overwrite="true"
- >
- <fileset dir="${WORKINGDIR}/${update.site.path}/target" includes="*Update*.zip" />
+ <!-- Create real update site zip, including web UI -->
+ <copy todir="${WORKINGDIR}/${update.site.path}/target/site">
+ <fileset dir="${WORKINGDIR}/${update.site.path}" includes="web/*, index.html" />
</copy>
+ <zip destfile="${destinationZip}"
+ basedir="${WORKINGDIR}/${update.site.path}/target/site"
+ update="false"
+ />
+
+ <!-- Copy zip into workspace so it can be archived by Hudson -->
+ <if>
+ <not>
+ <equals arg1="${basedir}" arg2="${WORKINGDIR}" />
+ </not>
+ <then>
+ <mkdir dir="${basedir}/${update.site.path}/target" />
+ <copy todir="${basedir}/${update.site.path}/target"
+ flatten="true"
+ preservelastmodified="true"
+ overwrite="true"
+ >
+ <fileset dir="${WORKINGDIR}/${update.site.path}/target" includes="*Update*.zip" />
+ </copy>
+ </then>
+ </if>
</then>
+ <else>
+ <if>
+ <equals arg1="${update.site.path}" arg2="site" />
+ <then>
+ <fail>Overall update site zip is empty!</fail>
+ </then>
+ <else>
+ <echo level="info">Update site zip for ${COMPONENTS.to.build} is empty!</echo>
+ </else>
+ </if>
+ </else>
</if>
</target>
<!-- Used to build the update site of a component; requires a site.xml and pom.xml be generated first -->
- <target name="create.update.site" depends="init, genPomXml, genSiteXml">
+ <target name="create.update.site" depends="init">
+ <antcall target="genPomXml" />
+ <antcall target="genSiteXml" />
<antcall target="build.update.site">
<param name="COMPONENTS.to.build" value="${COMPONENT}" />
<param name="update.site.path" value="${COMPONENT}/site" />
14 years
JBoss Tools SVN: r21918 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2010-05-05 13:22:47 -0400 (Wed, 05 May 2010)
New Revision: 21918
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2QuickFixProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5930
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2QuickFixProcessor.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2QuickFixProcessor.java 2010-05-05 17:02:38 UTC (rev 21917)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2QuickFixProcessor.java 2010-05-05 17:22:47 UTC (rev 21918)
@@ -61,7 +61,7 @@
return new ICompletionProposal[] { proposal };
} else if (type
.equals(IJSF2ValidationComponent.JSF2_COMPOSITE_COMPONENT_TYPE)) {
- ICompletionProposal proposal = new JSF2CompositeAttrsProposal(
+ ICompletionProposal proposal = new JSF2CompositeComponentProposal(
resource, compPath, retriveAttrsFromContext(context));
return new ICompletionProposal[] { proposal };
} else if (type.equals(IJSF2ValidationComponent.JSF2_URI_TYPE)) {
14 years
JBoss Tools SVN: r21917 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-05-05 13:02:38 -0400 (Wed, 05 May 2010)
New Revision: 21917
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6255
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-05 16:53:31 UTC (rev 21916)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-05 17:02:38 UTC (rev 21917)
@@ -208,11 +208,11 @@
ContextValidationHelper validationHelper, ValidatorManager manager,
IReporter reporter) throws ValidationException {
init(project, validationHelper, manager, reporter);
- displaySubtask(CDIValidationMessages.VALIDATING_PROJECT, new String[]{projectName});
- removeAllMessagesFromResource(cdiProject.getNature().getProject());
if(cdiProject == null) {
return OK_STATUS;
}
+ displaySubtask(CDIValidationMessages.VALIDATING_PROJECT, new String[]{projectName});
+ removeAllMessagesFromResource(cdiProject.getNature().getProject());
IBean[] beans = cdiProject.getBeans();
for (IBean bean : beans) {
validateBean(bean);
14 years
JBoss Tools SVN: r21916 - in trunk/jsf: plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action and 18 other directories.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2010-05-05 12:53:31 -0400 (Wed, 05 May 2010)
New Revision: 21916
Added:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2AbstractProposal.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeAttrsProposal.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeComponentProposal.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ResourcesFolderProposal.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AbstractValidationComponent.java
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.classpath
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.project
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/.jsdtscope
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.jdt.core.prefs
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.common.component
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/JavaSource/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/JavaSource/demo/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/JavaSource/demo/Person.java
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/JavaSource/resources.properties
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/META-INF/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/classes/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/classes/demo/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/classes/demo/Person.class
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/classes/resources.properties
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/faces-config.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/lib/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/lib/jbide2550.jar
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/web.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/index.jsp
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/pages/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/pages/greeting.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/pages/inputname.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/templates/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/templates/common.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/ant/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/ant/build.properties
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/ant/build.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsValidatorTest.java
Removed:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeAttrs.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeComponent.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2ResourcesFolder.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2SourceValidator.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ComponentResolutionGenerator.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2QuickFixProcessor.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AttrTempComponent.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2CompositeTempComponent.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2URITempComponent.java
trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5930 fixed
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2SourceValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2SourceValidator.java 2010-05-05 16:29:29 UTC (rev 21915)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2SourceValidator.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -26,16 +26,12 @@
import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
import org.eclipse.wst.validation.internal.provisional.core.IValidator;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
import org.jboss.tools.jsf.web.validation.jsf2.components.IJSF2ValidationComponent;
import org.jboss.tools.jsf.web.validation.jsf2.components.JSF2AttrTempComponent;
import org.jboss.tools.jsf.web.validation.jsf2.components.JSF2CompositeTempComponent;
import org.jboss.tools.jsf.web.validation.jsf2.components.JSF2URITempComponent;
import org.jboss.tools.jsf.web.validation.jsf2.util.JSF2ComponentModelManager;
import org.jboss.tools.jsf.web.validation.jsf2.util.JSF2ResourceUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
/**
*
@@ -94,34 +90,6 @@
public void validate(IRegion dirtyRegion, IValidationContext helper,
IReporter reporter) {
- if (document != null) {
- Element element = findNodeFromRegion(dirtyRegion);
- if (element == null) {
- return;
- }
- if (helper instanceof IncrementalHelper) {
- IncrementalHelper incrementalHelper = (IncrementalHelper) helper;
- IProject project = incrementalHelper.getProject();
- if (project == null) {
- return;
- }
- String[] uris = helper.getURIs();
- if (uris == null || uris.length < 1) {
- return;
- }
- String filePath = uris[0];
- if (filePath == null) {
- return;
- }
- filePath = filePath.substring(filePath.indexOf('/') + 1);
- IResource resource = project.findMember(filePath
- .substring(filePath.indexOf('/') + 1));
- if (resource instanceof IFile) {
- reportProblems(reporter, JSF2XMLValidator
- .getValidationComponents(element, (IFile) resource));
- }
- }
- }
}
private void reportProblems(IReporter reporter,
@@ -207,31 +175,4 @@
}
- private Element findNodeFromRegion(IRegion region) {
- int offset = region.getOffset();
- Element[] elements = new Element[1];
- findElementAttOffSet(offset, document.getDocumentElement(), elements);
- return elements[0];
- }
-
- private void findElementAttOffSet(int offSet, Node scanEl,
- Element[] returnEl) {
- if (scanEl instanceof IDOMElement) {
- if (isElementAttOffset(offSet, (IDOMElement) scanEl)) {
- returnEl[0] = (IDOMElement) scanEl;
- return;
- }
- NodeList childNodes = scanEl.getChildNodes();
- if (childNodes != null) {
- for (int i = 0; i < childNodes.getLength(); i++) {
- findElementAttOffSet(offSet, childNodes.item(i), returnEl);
- }
- }
- }
- }
-
- private boolean isElementAttOffset(int offSet, IDOMElement element) {
- return element.getStartOffset() == offSet;
- }
-
}
\ No newline at end of file
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeAttrs.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeAttrs.java 2010-05-05 16:29:29 UTC (rev 21915)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeAttrs.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.jsf.web.validation.jsf2.action;
-
-import java.util.Map;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jdt.internal.ui.JavaPluginImages;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.IMarkerResolution;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.wst.validation.ValidationFramework;
-import org.eclipse.wst.validation.internal.provisional.core.IValidatorJob;
-import org.jboss.tools.jsf.JSFModelPlugin;
-import org.jboss.tools.jsf.messages.JSFUIMessages;
-import org.jboss.tools.jsf.web.validation.jsf2.JSF2XMLValidator;
-import org.jboss.tools.jsf.web.validation.jsf2.components.IJSF2ValidationComponent;
-import org.jboss.tools.jsf.web.validation.jsf2.util.JSF2ResourceUtil;
-
-/**
- *
- * @author yzhishko
- *
- */
-
-@SuppressWarnings("restriction")
-public class CreateJSF2CompositeAttrs implements IMarkerResolution,
- ICompletionProposal {
-
- private String componentPath = null;
- private IResource validateResource = null;
- private String[] attrs = null;
-
- public CreateJSF2CompositeAttrs() {
- }
-
- public CreateJSF2CompositeAttrs(IResource validateResource,
- String compPath, String[] attrs) {
- this.validateResource = validateResource;
- this.componentPath = compPath;
- this.attrs = attrs;
- }
-
- public String getLabel() {
- return JSFUIMessages.Create_JSF_2_Interface_Attr;
- }
-
- @SuppressWarnings("unchecked")
- public void run(final IMarker marker) {
- try {
- if (marker != null) {
- validateResource = marker.getResource();
- Map attrsMap = marker.getAttributes();
- Object object = attrsMap
- .get(JSF2ResourceUtil.COMPONENT_RESOURCE_PATH_KEY);
- componentPath = (String) object;
- attrs = new String[] { (String) marker
- .getAttribute(IJSF2ValidationComponent.JSF2_ATTR_NAME_KEY) };
- }
- final IFile createdFile = JSF2ResourceUtil
- .createCompositeComponentFile(
- validateResource.getProject(), new Path(
- componentPath), attrs);
- validateResource.getProject().deleteMarkers(
- JSF2XMLValidator.JSF2_PROBLEM_ID, false, 1);
- if (createdFile != null) {
- IDE.openEditor(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage(),
- createdFile);
- }
- Job validateJob = new Job("JSF 2 Components Validator") { //$NON-NLS-1$
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- ValidationFramework.getDefault()
- .validate(
- new IProject[] { validateResource
- .getProject() }, false, false,
- new NullProgressMonitor());
- } catch (CoreException e) {
- return new Status(IStatus.CANCEL,
- JSFModelPlugin.PLUGIN_ID, "Cancel"); //$NON-NLS-1$
- }
- return IValidatorJob.OK_STATUS;
- }
- };
- validateJob.schedule(500);
- } catch (CoreException e) {
- JSFModelPlugin.getPluginLog().logError(e);
- }
- }
-
- public void apply(IDocument document) {
- run(null);
- }
-
- public String getAdditionalProposalInfo() {
- return null;
- }
-
- public IContextInformation getContextInformation() {
- return null;
- }
-
- public String getDisplayString() {
- return JSFUIMessages.Create_JSF_2_Interface_Attr;
- }
-
- public Image getImage() {
- return JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_ADD);
- }
-
- public Point getSelection(IDocument document) {
- return null;
- }
-
-}
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeComponent.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeComponent.java 2010-05-05 16:29:29 UTC (rev 21915)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeComponent.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.jsf.web.validation.jsf2.action;
-
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jdt.internal.ui.JavaPluginImages;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.IMarkerResolution;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.wst.validation.ValidationFramework;
-import org.eclipse.wst.validation.internal.provisional.core.IValidatorJob;
-import org.jboss.tools.jsf.JSFModelPlugin;
-import org.jboss.tools.jsf.messages.JSFUIMessages;
-import org.jboss.tools.jsf.web.validation.jsf2.JSF2XMLValidator;
-import org.jboss.tools.jsf.web.validation.jsf2.components.IJSF2ValidationComponent;
-import org.jboss.tools.jsf.web.validation.jsf2.util.JSF2ResourceUtil;
-
-/**
- *
- * @author yzhishko
- *
- */
-
-@SuppressWarnings("restriction")
-public class CreateJSF2CompositeComponent implements IMarkerResolution,
- ICompletionProposal {
-
- private String componentPath = null;
- private IResource validateResource = null;
- private String[] attrs = null;
-
- public CreateJSF2CompositeComponent() {
- }
-
- public CreateJSF2CompositeComponent(IResource validateResource,
- String compPath, String[] attrs) {
- this.validateResource = validateResource;
- this.componentPath = compPath;
- this.attrs = attrs;
- }
-
- public String getLabel() {
- return JSFUIMessages.Create_JSF_2_Composite_Component;
- }
-
- @SuppressWarnings("unchecked")
- public void run(final IMarker marker) {
- try {
- if (marker != null) {
- validateResource = marker.getResource();
- Map attrsMap = marker.getAttributes();
- Object object = attrsMap
- .get(JSF2ResourceUtil.COMPONENT_RESOURCE_PATH_KEY);
- componentPath = (String) object;
- attrs = getAttributes(marker);
- }
- final IFile createdFile = JSF2ResourceUtil
- .createCompositeComponentFile(
- validateResource.getProject(), new Path(
- componentPath), attrs);
- validateResource.getProject().deleteMarkers(JSF2XMLValidator.JSF2_PROBLEM_ID,
- false, 1);
- if (createdFile != null) {
- IDE.openEditor(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage(),
- createdFile);
- }
- Job validateJob = new Job("JSF 2 Components Validator") { //$NON-NLS-1$
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- ValidationFramework.getDefault()
- .validate(
- new IProject[] { validateResource
- .getProject() }, false, false,
- new NullProgressMonitor());
- } catch (CoreException e) {
- return new Status(IStatus.CANCEL,
- JSFModelPlugin.PLUGIN_ID, "Cancel"); //$NON-NLS-1$
- }
- return IValidatorJob.OK_STATUS;
- }
- };
- validateJob.schedule(500);
- } catch (CoreException e) {
- JSFModelPlugin.getPluginLog().logError(e);
- }
- }
-
- @SuppressWarnings("unchecked")
- private String[] getAttributes(IMarker marker) throws CoreException {
- Map attrsMap = marker.getAttributes();
- if (attrsMap != null) {
- Set<String> set = new HashSet<String>(0);
- Set<Entry> entries = attrsMap.entrySet();
- for (Entry entry : entries) {
- String key = (String) entry.getKey();
- if (key.startsWith(IJSF2ValidationComponent.JSF2_ATTR_NAME_KEY)) {
- set.add((String) entry.getValue());
- }
- }
- return set.toArray(new String[0]);
- }
- return null;
- }
-
- public void apply(IDocument document) {
- run(null);
- }
-
- public String getAdditionalProposalInfo() {
- return null;
- }
-
- public IContextInformation getContextInformation() {
- return null;
- }
-
- public String getDisplayString() {
- return JSFUIMessages.Create_JSF_2_Composite_Component;
- }
-
- public Image getImage() {
- return JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_ADD);
- }
-
- public Point getSelection(IDocument document) {
- return null;
- }
-
-}
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2ResourcesFolder.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2ResourcesFolder.java 2010-05-05 16:29:29 UTC (rev 21915)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2ResourcesFolder.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.jsf.web.validation.jsf2.action;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jdt.internal.ui.JavaPluginImages;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.IMarkerResolution;
-import org.eclipse.wst.validation.ValidationFramework;
-import org.eclipse.wst.validation.internal.provisional.core.IValidatorJob;
-import org.jboss.tools.jsf.JSFModelPlugin;
-import org.jboss.tools.jsf.messages.JSFUIMessages;
-import org.jboss.tools.jsf.web.validation.jsf2.JSF2XMLValidator;
-import org.jboss.tools.jsf.web.validation.jsf2.components.IJSF2ValidationComponent;
-import org.jboss.tools.jsf.web.validation.jsf2.util.JSF2ResourceUtil;
-
-/**
- *
- * @author yzhishko
- *
- */
-
-@SuppressWarnings("restriction")
-public class CreateJSF2ResourcesFolder implements IMarkerResolution,
- ICompletionProposal {
-
- private String componentPath = null;
- private IResource validateResource = null;
-
- public String getLabel() {
- return JSFUIMessages.Create_JSF_2_Resources_Folder;
- }
-
- public CreateJSF2ResourcesFolder() {
- }
-
- public CreateJSF2ResourcesFolder(IResource validateResource, String compPath) {
- this.componentPath = compPath;
- this.validateResource = validateResource;
- }
-
- public void run(final IMarker marker) {
- try {
- if (marker != null) {
- componentPath = (String) marker
- .getAttribute(IJSF2ValidationComponent.JSF2_URI_NAME_KEY);
- validateResource = marker.getResource();
- }
- JSF2ResourceUtil.createResourcesFolderByNameSpace(validateResource
- .getProject(), componentPath);
- validateResource.getProject().deleteMarkers(
- JSF2XMLValidator.JSF2_PROBLEM_ID, false, 1);
- Job validateJob = new Job("JSF 2 Components Validator") { //$NON-NLS-1$
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- ValidationFramework.getDefault()
- .validate(
- new IProject[] { validateResource
- .getProject() }, false, false,
- new NullProgressMonitor());
- } catch (CoreException e) {
- return new Status(IStatus.CANCEL,
- JSFModelPlugin.PLUGIN_ID, "Cancel"); //$NON-NLS-1$
- }
- return IValidatorJob.OK_STATUS;
- }
- };
- validateJob.schedule(500);
- } catch (CoreException e) {
- JSFModelPlugin.getPluginLog().logError(e);
- }
- }
-
- public void apply(IDocument document) {
- run(null);
- }
-
- public String getAdditionalProposalInfo() {
- return null;
- }
-
- public IContextInformation getContextInformation() {
- return null;
- }
-
- public String getDisplayString() {
- return JSFUIMessages.Create_JSF_2_Resources_Folder;
- }
-
- public Image getImage() {
- return JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_ADD);
- }
-
- public Point getSelection(IDocument document) {
- return null;
- }
-
-}
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2AbstractProposal.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2AbstractProposal.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2AbstractProposal.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,88 @@
+package org.jboss.tools.jsf.web.validation.jsf2.action;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jdt.internal.ui.JavaPluginImages;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.IMarkerResolution;
+import org.eclipse.wst.validation.ValidationFramework;
+import org.eclipse.wst.validation.internal.provisional.core.IValidatorJob;
+import org.jboss.tools.jsf.JSFModelPlugin;
+
+@SuppressWarnings("restriction")
+public abstract class JSF2AbstractProposal implements IMarkerResolution,
+ ICompletionProposal {
+
+ protected JSF2AbstractProposal() {
+
+ }
+
+ protected JSF2AbstractProposal(IResource resource) {
+ validateResource = resource;
+ }
+
+ protected IResource validateResource = null;
+
+ public String getLabel() {
+ return getDisplayString();
+ }
+
+ public final void run(IMarker marker) {
+ try {
+ runWithMarker(marker);
+ Job validateJob = new Job("JSF 2 Components Validator") { //$NON-NLS-1$
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ if (validateResource != null) {
+ ValidationFramework.getDefault().validate(
+ new IProject[] { validateResource
+ .getProject() }, false, false,
+ new NullProgressMonitor());
+ }
+ } catch (CoreException e) {
+ return new Status(IStatus.CANCEL,
+ JSFModelPlugin.PLUGIN_ID, "Cancel"); //$NON-NLS-1$
+ }
+ return IValidatorJob.OK_STATUS;
+ }
+ };
+ validateJob.schedule(500);
+ } catch (CoreException e) {
+ JSFModelPlugin.getPluginLog().logError(e);
+ }
+ }
+
+ public void apply(IDocument document) {
+ run(null);
+ }
+
+ public String getAdditionalProposalInfo() {
+ return null;
+ }
+
+ public IContextInformation getContextInformation() {
+ return null;
+ }
+
+ public Image getImage() {
+ return JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_ADD);
+ }
+
+ public Point getSelection(IDocument document) {
+ return null;
+ }
+
+ protected abstract void runWithMarker(IMarker marker) throws CoreException;
+}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ComponentResolutionGenerator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ComponentResolutionGenerator.java 2010-05-05 16:29:29 UTC (rev 21915)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ComponentResolutionGenerator.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -40,14 +40,14 @@
if (fixType != null) {
if (fixType
.equals(IJSF2ValidationComponent.JSF2_COMPOSITE_COMPONENT_TYPE)) {
- return new IMarkerResolution[] { new CreateJSF2CompositeComponent() };
+ return new IMarkerResolution[] { new JSF2CompositeComponentProposal() };
}
if (fixType
.equals(IJSF2ValidationComponent.JSF2_FIXABLE_ATTR_TYPE)) {
- return new IMarkerResolution[] { new CreateJSF2CompositeAttrs() };
+ return new IMarkerResolution[] { new JSF2CompositeAttrsProposal() };
}
if (fixType.equals(IJSF2ValidationComponent.JSF2_URI_TYPE)) {
- return new IMarkerResolution[] { new CreateJSF2ResourcesFolder() };
+ return new IMarkerResolution[] { new JSF2ResourcesFolderProposal() };
}
}
} catch (CoreException e) {
Copied: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeAttrsProposal.java (from rev 21901, trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeAttrs.java)
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeAttrsProposal.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeAttrsProposal.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jsf.web.validation.jsf2.action;
+
+import java.util.Map;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.jboss.tools.jsf.messages.JSFUIMessages;
+import org.jboss.tools.jsf.web.validation.jsf2.JSF2XMLValidator;
+import org.jboss.tools.jsf.web.validation.jsf2.components.IJSF2ValidationComponent;
+import org.jboss.tools.jsf.web.validation.jsf2.util.JSF2ResourceUtil;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class JSF2CompositeAttrsProposal extends JSF2AbstractProposal {
+
+ private String componentPath = null;
+ private String[] attrs = null;
+
+ public JSF2CompositeAttrsProposal() {
+ super();
+ }
+
+ public JSF2CompositeAttrsProposal(IResource validateResource,
+ String compPath, String[] attrs) {
+ super(validateResource);
+ this.componentPath = compPath;
+ this.attrs = attrs;
+ }
+
+ public String getDisplayString() {
+ return JSFUIMessages.Create_JSF_2_Interface_Attr;
+ }
+
+ @Override
+ protected void runWithMarker(IMarker marker) throws CoreException {
+ if (marker != null) {
+ validateResource = marker.getResource();
+ Map<?, ?> attrsMap = marker.getAttributes();
+ Object object = attrsMap
+ .get(JSF2ResourceUtil.COMPONENT_RESOURCE_PATH_KEY);
+ componentPath = (String) object;
+ attrs = new String[] { (String) marker
+ .getAttribute(IJSF2ValidationComponent.JSF2_ATTR_NAME_KEY) };
+ }
+ final IFile createdFile = JSF2ResourceUtil
+ .createCompositeComponentFile(validateResource.getProject(),
+ new Path(componentPath), attrs);
+ validateResource.getProject().deleteMarkers(
+ JSF2XMLValidator.JSF2_PROBLEM_ID, false, 1);
+ if (createdFile != null) {
+ IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+ .getActivePage(), createdFile);
+ }
+ }
+
+}
Copied: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeComponentProposal.java (from rev 21901, trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2CompositeComponent.java)
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeComponentProposal.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeComponentProposal.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jsf.web.validation.jsf2.action;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.jboss.tools.jsf.messages.JSFUIMessages;
+import org.jboss.tools.jsf.web.validation.jsf2.JSF2XMLValidator;
+import org.jboss.tools.jsf.web.validation.jsf2.components.IJSF2ValidationComponent;
+import org.jboss.tools.jsf.web.validation.jsf2.util.JSF2ResourceUtil;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class JSF2CompositeComponentProposal extends JSF2AbstractProposal {
+
+ private String componentPath = null;
+ private String[] attrs = null;
+
+ public JSF2CompositeComponentProposal() {
+ super();
+ }
+
+ public JSF2CompositeComponentProposal(IResource validateResource,
+ String compPath, String[] attrs) {
+ super(validateResource);
+ this.componentPath = compPath;
+ this.attrs = attrs;
+ }
+
+ @SuppressWarnings("unchecked")
+ private String[] getAttributes(IMarker marker) throws CoreException {
+ Map attrsMap = marker.getAttributes();
+ if (attrsMap != null) {
+ Set<String> set = new HashSet<String>(0);
+ Set<Entry> entries = attrsMap.entrySet();
+ for (Entry entry : entries) {
+ String key = (String) entry.getKey();
+ if (key.startsWith(IJSF2ValidationComponent.JSF2_ATTR_NAME_KEY)) {
+ set.add((String) entry.getValue());
+ }
+ }
+ return set.toArray(new String[0]);
+ }
+ return null;
+ }
+
+ public String getDisplayString() {
+ return JSFUIMessages.Create_JSF_2_Composite_Component;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ protected void runWithMarker(IMarker marker) throws CoreException {
+ if (marker != null) {
+ validateResource = marker.getResource();
+ Map attrsMap = marker.getAttributes();
+ Object object = attrsMap
+ .get(JSF2ResourceUtil.COMPONENT_RESOURCE_PATH_KEY);
+ componentPath = (String) object;
+ attrs = getAttributes(marker);
+ }
+ final IFile createdFile = JSF2ResourceUtil
+ .createCompositeComponentFile(validateResource.getProject(),
+ new Path(componentPath), attrs);
+ validateResource.getProject().deleteMarkers(
+ JSF2XMLValidator.JSF2_PROBLEM_ID, false, 1);
+ if (createdFile != null) {
+ IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+ .getActivePage(), createdFile);
+ }
+
+ }
+
+}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2QuickFixProcessor.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2QuickFixProcessor.java 2010-05-05 16:29:29 UTC (rev 21915)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2QuickFixProcessor.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -56,18 +56,18 @@
if (type.equals(IJSF2ValidationComponent.JSF2_FIXABLE_ATTR_TYPE)) {
String[] attrs = new String[] { (String) context
.getAttribute(IJSF2ValidationComponent.JSF2_ATTR_NAME_KEY) };
- ICompletionProposal proposal = new CreateJSF2CompositeAttrs(
+ ICompletionProposal proposal = new JSF2CompositeAttrsProposal(
resource, compPath, attrs);
return new ICompletionProposal[] { proposal };
} else if (type
.equals(IJSF2ValidationComponent.JSF2_COMPOSITE_COMPONENT_TYPE)) {
- ICompletionProposal proposal = new CreateJSF2CompositeAttrs(
+ ICompletionProposal proposal = new JSF2CompositeAttrsProposal(
resource, compPath, retriveAttrsFromContext(context));
return new ICompletionProposal[] { proposal };
} else if (type.equals(IJSF2ValidationComponent.JSF2_URI_TYPE)) {
String uriPath = (String) context
.getAttribute(IJSF2ValidationComponent.JSF2_URI_NAME_KEY);
- ICompletionProposal proposal = new CreateJSF2ResourcesFolder(
+ ICompletionProposal proposal = new JSF2ResourcesFolderProposal(
resource, uriPath);
return new ICompletionProposal[] { proposal };
}
Copied: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ResourcesFolderProposal.java (from rev 21901, trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/CreateJSF2ResourcesFolder.java)
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ResourcesFolderProposal.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ResourcesFolderProposal.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jsf.web.validation.jsf2.action;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.jsf.messages.JSFUIMessages;
+import org.jboss.tools.jsf.web.validation.jsf2.JSF2XMLValidator;
+import org.jboss.tools.jsf.web.validation.jsf2.components.IJSF2ValidationComponent;
+import org.jboss.tools.jsf.web.validation.jsf2.util.JSF2ResourceUtil;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class JSF2ResourcesFolderProposal extends JSF2AbstractProposal {
+
+ private String componentPath = null;
+
+ public JSF2ResourcesFolderProposal() {
+ super();
+ }
+
+ public JSF2ResourcesFolderProposal(IResource validateResource, String compPath) {
+ super(validateResource);
+ this.componentPath = compPath;
+ }
+
+ public String getDisplayString() {
+ return JSFUIMessages.Create_JSF_2_Resources_Folder;
+ }
+
+ @Override
+ protected void runWithMarker(IMarker marker) throws CoreException {
+ if (marker != null) {
+ componentPath = (String) marker
+ .getAttribute(IJSF2ValidationComponent.JSF2_URI_NAME_KEY);
+ validateResource = marker.getResource();
+ }
+ JSF2ResourceUtil.createResourcesFolderByNameSpace(validateResource
+ .getProject(), componentPath);
+ validateResource.getProject().deleteMarkers(
+ JSF2XMLValidator.JSF2_PROBLEM_ID, false, 1);
+ }
+
+}
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AbstractValidationComponent.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AbstractValidationComponent.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AbstractValidationComponent.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,51 @@
+package org.jboss.tools.jsf.web.validation.jsf2.components;
+
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+public abstract class JSF2AbstractValidationComponent implements
+ IJSF2ValidationComponent {
+
+ private int length;
+ private int startOffSet;
+ private int line;
+ private Object[] messageParams;
+
+ public int getLength() {
+ return length;
+ }
+
+ public void setLength(int length) {
+ this.length = length;
+ }
+
+ public int getLine() {
+ return line;
+ }
+
+ public void setLine(int lineNumber) {
+ this.line = lineNumber;
+ }
+
+ public int getStartOffSet() {
+ return startOffSet;
+ }
+
+ public void setStartOffSet(int startOffSet) {
+ this.startOffSet = startOffSet;
+ }
+
+ public Object[] getMessageParams() {
+ return messageParams;
+ }
+
+ public int getSeverity() {
+ return IMessage.NORMAL_SEVERITY;
+ }
+
+ public abstract void createValidationMessage();
+
+ public void createMessageParams() {
+ this.messageParams = new Object[] { this };
+ }
+
+}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AttrTempComponent.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AttrTempComponent.java 2010-05-05 16:29:29 UTC (rev 21915)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AttrTempComponent.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -12,8 +12,6 @@
package org.jboss.tools.jsf.web.validation.jsf2.components;
import java.text.MessageFormat;
-
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.xml.core.internal.document.ElementImpl;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
import org.jboss.tools.jsf.messages.JSFUIMessages;
@@ -26,13 +24,9 @@
*/
@SuppressWarnings("restriction")
-public class JSF2AttrTempComponent implements IJSF2ValidationComponent {
+public class JSF2AttrTempComponent extends JSF2AbstractValidationComponent {
- private int length;
- private int startOffSet;
- private int line;
private String validationMessage = ""; //$NON-NLS-1$
- private Object[] messageParams;
private String type = JSF2_UNFIXABLE_ATTR_TYPE;
private ElementImpl parentEl;
private IDOMAttr attr;
@@ -43,31 +37,7 @@
this.parentEl = parentEl;
}
- public int getLength() {
- return length;
- }
-
- void setLength(int length) {
- this.length = length;
- }
-
- public int getLine() {
- return line;
- }
-
- void setLine(int lineNumber) {
- this.line = lineNumber;
- }
-
- public int getStartOffSet() {
- return startOffSet;
- }
-
- void setStartOffSet(int startOffSet) {
- this.startOffSet = startOffSet;
- }
-
- void createValidationMessage() {
+ public void createValidationMessage() {
String nodeName = parentEl.getLocalName();
this.validationMessage = MessageFormat.format(
JSFUIMessages.Missing_JSF_2_Component_Attr, attr.getName(),
@@ -78,15 +48,7 @@
return validationMessage;
}
- void createMessageParams() {
- this.messageParams = new Object[] { this };
- }
-
- public Object[] getMessageParams() {
- return messageParams;
- }
-
- void setType(String type) {
+ public void setType(String type) {
this.type = type;
}
@@ -109,8 +71,4 @@
return componentResLocation;
}
- public int getSeverity() {
- return IMessage.NORMAL_SEVERITY;
- }
-
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2CompositeTempComponent.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2CompositeTempComponent.java 2010-05-05 16:29:29 UTC (rev 21915)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2CompositeTempComponent.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -14,7 +14,6 @@
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.xml.core.internal.document.ElementImpl;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
import org.jboss.tools.jsf.messages.JSFUIMessages;
@@ -24,16 +23,13 @@
/**
*
* @author yzhishko
- *
+ *
*/
@SuppressWarnings("restriction")
-public class JSF2CompositeTempComponent implements IJSF2ValidationComponent {
- private int length;
- private int startOffSet;
- private int line;
+public class JSF2CompositeTempComponent extends JSF2AbstractValidationComponent {
+
private String validationMessage = ""; //$NON-NLS-1$
- private Object[] messageParams;
private List<String> attrNames = new ArrayList<String>(0);
private ElementImpl element;
private String componentResLoc;
@@ -42,31 +38,7 @@
this.element = element;
}
- public int getLength() {
- return length;
- }
-
- void setLength(int length) {
- this.length = length;
- }
-
- public int getLine() {
- return line;
- }
-
- void setLine(int lineNumber) {
- this.line = lineNumber;
- }
-
- public int getStartOffSet() {
- return startOffSet;
- }
-
- void setStartOffSet(int startOffSet) {
- this.startOffSet = startOffSet;
- }
-
- void createValidationMessage() {
+ public void createValidationMessage() {
String nodeName = element.getLocalName();
this.validationMessage = MessageFormat.format(
JSFUIMessages.Missing_JSF_2_Composite_Component, nodeName);
@@ -76,7 +48,8 @@
return validationMessage;
}
- void createMessageParams() {
+ @Override
+ public void createMessageParams() {
NamedNodeMap attrsMap = element.getAttributes();
if (attrsMap != null && attrsMap.getLength() != 0) {
for (int i = 0; i < attrsMap.getLength(); i++) {
@@ -84,13 +57,9 @@
attrNames.add(attr.getName());
}
}
- this.messageParams = new Object[] { this };
+ super.createMessageParams();
}
- public Object[] getMessageParams() {
- return messageParams;
- }
-
public String[] getAttrNames() {
return attrNames.toArray(new String[0]);
}
@@ -110,8 +79,4 @@
return componentResLoc;
}
- public int getSeverity() {
- return IMessage.NORMAL_SEVERITY;
- }
-
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2URITempComponent.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2URITempComponent.java 2010-05-05 16:29:29 UTC (rev 21915)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2URITempComponent.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -12,7 +12,6 @@
package org.jboss.tools.jsf.web.validation.jsf2.components;
import java.text.MessageFormat;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.jboss.tools.jsf.messages.JSFUIMessages;
import org.jboss.tools.jsf.web.validation.jsf2.util.JSF2ResourceUtil;
@@ -22,44 +21,16 @@
*
*/
-public class JSF2URITempComponent implements IJSF2ValidationComponent {
+public class JSF2URITempComponent extends JSF2AbstractValidationComponent {
- private int length;
- private int startOffSet;
- private int line;
private String validationMessage = ""; //$NON-NLS-1$
- private Object[] messageParams;
private String URI;
public JSF2URITempComponent(String URI) {
this.URI = URI;
}
- public int getLength() {
- return length;
- }
-
- void setLength(int length) {
- this.length = length;
- }
-
- public int getLine() {
- return line;
- }
-
- void setLine(int lineNumber) {
- this.line = lineNumber;
- }
-
- public int getStartOffSet() {
- return startOffSet;
- }
-
- void setStartOffSet(int startOffSet) {
- this.startOffSet = startOffSet;
- }
-
- void createValidationMessage() {
+ public void createValidationMessage() {
String mesParam = "/resources" + URI.replaceAll(JSF2ResourceUtil.JSF2_URI_PREFIX, ""); //$NON-NLS-1$ //$NON-NLS-2$
this.validationMessage = MessageFormat.format(
JSFUIMessages.Missing_JSF_2_Resources_Folder, mesParam);
@@ -69,14 +40,6 @@
return validationMessage;
}
- public Object[] getMessageParams() {
- return messageParams;
- }
-
- void createMessageParams() {
- messageParams = new Object[] { this };
- }
-
public String getType() {
return JSF2_URI_TYPE;
}
@@ -85,10 +48,6 @@
return ""; //$NON-NLS-1$
}
- public int getSeverity() {
- return IMessage.NORMAL_SEVERITY;
- }
-
public String getURI() {
return URI;
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF 2010-05-05 16:29:29 UTC (rev 21915)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF 2010-05-05 16:53:31 UTC (rev 21916)
@@ -21,7 +21,8 @@
org.jboss.tools.jst.web.ui,
org.jboss.tools.common.model.ui,
org.eclipse.ui.ide,
- org.eclipse.ltk.core.refactoring;bundle-version="3.5.0"
+ org.eclipse.ltk.core.refactoring;bundle-version="3.5.0",
+ org.eclipse.wst.validation;bundle-version="1.2.104"
Bundle-Activator: org.jboss.tools.jsf.plugin.JsfTestPlugin
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.classpath
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.classpath (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.classpath 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="JavaSource"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.web"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.5.0_16">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
+</classpath>
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.project
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.project (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.project 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>JSF2ComponentsValidator</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.jboss.tools.jsf.jsfnature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ </natures>
+</projectDescription>
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/.jsdtscope
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/.jsdtscope (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/.jsdtscope 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.jdt.core.prefs 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,7 @@
+#Wed May 05 14:06:47 EEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.common.component 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="JSF2ComponentsValidator">
+<wb-resource deploy-path="/" source-path="/WebContent"/>
+<wb-resource deploy-path="/WEB-INF/classes" source-path="/JavaSource"/>
+<property name="java-output-path" value="/JSF2TestProject/WebContent/WEB-INF/classes"/>
+<property name="context-root" value="JSF2ComponentsValidator"/>
+</wb-module>
+</project-modules>
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.common.project.facet.core.xml 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="Apache Tomcat v6.0"/>
+ <fixed facet="jst.java"/>
+ <fixed facet="jst.web"/>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="jst.web" version="2.5"/>
+</faceted-project>
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.jsdt.ui.superType.container 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.settings/org.eclipse.wst.jsdt.ui.superType.name 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/JavaSource/demo/Person.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/JavaSource/demo/Person.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/JavaSource/demo/Person.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package demo;
+
+/**
+ * Created by JBoss Tools
+ */
+public class Person {
+ private String name;
+
+ public Person() {
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/JavaSource/resources.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/JavaSource/resources.properties (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/JavaSource/resources.properties 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,2 @@
+prompt=Your Name\:
+greeting=Hello
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/META-INF/MANIFEST.MF 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/classes/demo/Person.class
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/classes/demo/Person.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/classes/resources.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/classes/resources.properties (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/classes/resources.properties 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,2 @@
+prompt=Your Name\:
+greeting=Hello
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/faces-config.xml 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+ <managed-bean>
+ <managed-bean-name>person</managed-bean-name>
+ <managed-bean-class>demo.Person</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>name</property-name>
+ <value/>
+ </managed-property>
+ </managed-bean>
+ <navigation-rule>
+ <from-view-id>/pages/inputname.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>greeting</from-outcome>
+ <to-view-id>/pages/greeting.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ <locale-config/>
+ </application>
+ <factory/>
+ <lifecycle/>
+</faces-config>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/lib/jbide2550.jar
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/lib/jbide2550.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/WEB-INF/web.xml 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
+ <description>Facelets StarterKit</description>
+ <display-name>JSF2ComponentsValidator</display-name>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/index.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/index.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/index.jsp 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,7 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head></head>
+ <body>
+ <jsp:forward page="pages/inputname.jsf" />
+ </body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/pages/greeting.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/pages/greeting.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/pages/greeting.xhtml 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <f:loadBundle basename="resources" var="msg" />
+ <ui:composition template="/templates/common.xhtml">
+ <ui:define name="pageTitle">Greeting to User</ui:define>
+ <ui:define name="pageHeader">Greeting Page</ui:define>
+ <ui:define name="body">
+ #{msg.greeting} #{person.name}!
+ </ui:define>
+ </ui:composition>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/pages/inputname.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/pages/inputname.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/pages/inputname.xhtml 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core">
+
+<f:loadBundle basename="resources" var="msg" />
+
+<ui:composition template="/templates/common.xhtml"
+ xmlns:jar="http://java.sun.com/jsf/composite/jarPage"
+ xmlns:jar1="http://java.sun.com/jsf/composite/jarPage1">
+
+ <ui:define name="pageTitle">Input User Name</ui:define>
+
+ <ui:define name="pageHeader">Facelets Hello Application</ui:define>
+
+ <ui:define name="body">
+
+ <form>
+ <jar:echo1 echo="Hello" />
+ <jar:echo echo="Hello" />
+ <jar:echo anknownAttr="1" echo="Hello" />
+ <jar1:echo echo="Hello" />
+ </form>
+
+ </ui:define>
+</ui:composition>
+</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/templates/common.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/templates/common.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/WebContent/templates/common.xhtml 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,65 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <f:loadBundle basename="resources" var="msg" />
+ <head>
+ <title><ui:insert name="pageTitle">Page Title</ui:insert></title>
+ <style type="text/css">
+ body {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 14px;
+ }
+ .header {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 18px;
+ }
+ .bottom {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 9px;
+ text-align: center;
+ vertical-align: middle;
+ color: #8E969D;
+ }
+ </style>
+ </head>
+
+<body bgcolor="#ffffff">
+<table style="border:1px solid #CAD6E0" align="center" cellpadding="0" cellspacing="0" border="0" width="400">
+<tbody>
+
+ <tr>
+ <td class="header" height="42" align="center" valign="middle" width="100%" bgcolor="#E4EBEB">
+ <ui:insert name="pageHeader">Page Header</ui:insert>
+ </td>
+ </tr>
+ <tr>
+ <td height="1" width="100%" bgcolor="#CAD6E0"></td>
+ </tr>
+
+ <tr>
+ <td width="100%" colspan="2">
+ <table width="100%" style="height:150px" align="left" cellpadding="0" cellspacing="0" border="0">
+ <tbody>
+ <tr>
+ <td align="center" width="100%" valign="middle">
+
+ <ui:insert name="body">Page Body</ui:insert>
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2" valign="bottom" height="1" width="100%" bgcolor="#CAD6E0"></td>
+ </tr>
+</tbody>
+</table>
+</body>
+
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/ant/build.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/ant/build.properties (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/ant/build.properties 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,3 @@
+#
+#Wed May 05 14:06:46 EEST 2010
+classpath.external=
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/ant/build.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/ant/build.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/ant/build.xml 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,87 @@
+<project name="JSF2TestProject" basedir="../" default="deploy">
+
+ <!-- Project settings -->
+ <property name="project.distname" value="JSF2TestProject"/>
+
+ <!-- Local system paths -->
+ <property file="${basedir}/ant/build.properties"/>
+ <property name="webroot.dir" value="${basedir}/WebContent"/>
+ <property name="webinf.dir" value="${webroot.dir}/WEB-INF"/>
+ <property name="build.dir" value="build"/>
+
+
+ <!-- classpath for JSF 1.0 -->
+ <path id="compile.classpath">
+ <pathelement path ="${webinf.dir}/lib/commons-beanutils.jar"/>
+ <pathelement path ="${webinf.dir}/lib/commons-collections.jar"/>
+ <pathelement path ="${webinf.dir}/lib/commons-digester.jar"/>
+ <pathelement path ="${webinf.dir}/lib/commons-logging.jar"/>
+ <pathelement path ="${webinf.dir}/lib/jsf-api.jar"/>
+ <pathelement path ="${webinf.dir}/lib/jsf-impl.jar"/>
+ <pathelement path ="${webinf.dir}/lib/jstl.jar"/>
+ <pathelement path ="${webinf.dir}/lib/standard.jar"/>
+ <pathelement path ="${webinf.dir}/classes"/>
+ <pathelement path ="${classpath.external}"/>
+ <pathelement path ="${classpath}"/>
+ </path>
+
+ <!-- define your folder for deployment -->
+ <property name="deploy.dir" value="deploy"/>
+
+ <!-- Check timestamp on files -->
+ <target name="prepare">
+ <tstamp/>
+ </target>
+
+ <!-- Copy any resource or configuration files -->
+ <target name="resources">
+ <copy todir="${webinf.dir}/classes" includeEmptyDirs="no">
+ <fileset dir="JavaSource">
+ <patternset>
+ <include name="**/*.conf"/>
+ <include name="**/*.properties"/>
+ <include name="**/*.xml"/>
+ </patternset>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- Normal build of application -->
+ <target name="compile" depends="prepare,resources">
+ <javac srcdir="JavaSource" destdir="${webinf.dir}/classes">
+ <classpath refid="compile.classpath"/>
+ </javac>
+ </target>
+
+ <!-- Remove classes directory for clean build -->
+ <target name="clean"
+ description="Prepare for clean build">
+ <delete dir="${webinf.dir}/classes"/>
+ <mkdir dir="${webinf.dir}/classes"/>
+ </target>
+
+ <!-- Build entire project -->
+ <target name="build" depends="prepare,compile"/>
+ <target name="rebuild" depends="clean,prepare,compile"/>
+
+ <!-- Create binary distribution -->
+ <target name="war" depends="build">
+ <mkdir dir="${build.dir}"/>
+ <war
+ basedir="${webroot.dir}"
+ warfile="${build.dir}/${project.distname}.war"
+ webxml="${webinf.dir}/web.xml">
+ <exclude name="WEB-INF/${build.dir}/**"/>
+ <exclude name="WEB-INF/src/**"/>
+ <exclude name="WEB-INF/web.xml"/>
+ </war>
+
+ </target>
+
+ <target name="deploy" depends="war">
+ <delete file="${deploy.dir}/${project.distname}.war"/>
+ <delete dir="${deploy.dir}/${project.distname}"/>
+ <copy file="${build.dir}/${project.distname}.war" todir="${deploy.dir}"/>
+ </target>
+
+</project>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2010-05-05 16:29:29 UTC (rev 21915)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -7,7 +7,7 @@
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.jsf.test;
import junit.extensions.TestSetup;
@@ -17,33 +17,44 @@
import org.eclipse.jdt.internal.core.JavaModelManager;
import org.jboss.tools.jsf.model.pv.test.JSFPromptingProviderTest;
import org.jboss.tools.jsf.test.refactoring.ELVariableRefactoringTest;
+import org.jboss.tools.jsf.test.validation.JSF2ComponentsValidatorTest;
import org.jboss.tools.test.util.ProjectImportTestSetup;
public class JsfAllTests {
-// public static final String PLUGIN_ID = "org.jboss.tools.jsf";
+ // public static final String PLUGIN_ID = "org.jboss.tools.jsf";
public static Test suite() {
- TestSuite suite = new TestSuite("Test model loading for JSF projects");
- TestSuite old = new TestSuite("Tests are using JSFKickStartOldFormat");
+ TestSuite suite = new TestSuite("Test model loading for JSF projects"); //$NON-NLS-1$
+ TestSuite old = new TestSuite("Tests are using JSFKickStartOldFormat"); //$NON-NLS-1$
old.addTestSuite(JSFModelTest.class);
old.addTestSuite(ModelFormat_2_0_0_Test.class);
old.addTestSuite(JSFBeansTest.class);
- suite.addTest(new ProjectImportTestSetup(old,"org.jboss.tools.jsf.test","projects/JSFKickStartOldFormat","JSFKickStartOldFormat"));
- suite.addTest(new ProjectImportTestSetup(new TestSuite(JSFPromptingProviderTest.class),"org.jboss.tools.jsf.test", JSFPromptingProviderTest.TEST_PROJECT_PATH, JSFPromptingProviderTest.TEST_PROJECT_NAME));
-
- suite.addTest(new ProjectImportTestSetup(new TestSuite(ELVariableRefactoringTest.class),
- "org.jboss.tools.jsf.test",
- new String[]{"projects/JSFKickStartOldFormat"},
- new String[]{"JSFKickStartOldFormat"}));
+ suite.addTest(new ProjectImportTestSetup(old,
+ "org.jboss.tools.jsf.test", "projects/JSFKickStartOldFormat", //$NON-NLS-1$ //$NON-NLS-2$
+ "JSFKickStartOldFormat")); //$NON-NLS-1$
+ suite.addTest(new ProjectImportTestSetup(new TestSuite(
+ JSFPromptingProviderTest.class),
+ "org.jboss.tools.jsf.test", //$NON-NLS-1$
+ JSFPromptingProviderTest.TEST_PROJECT_PATH,
+ JSFPromptingProviderTest.TEST_PROJECT_NAME));
+
+ suite.addTest(new ProjectImportTestSetup(new TestSuite(
+ ELVariableRefactoringTest.class), "org.jboss.tools.jsf.test", //$NON-NLS-1$
+ new String[] { "projects/JSFKickStartOldFormat" }, //$NON-NLS-1$
+ new String[] { "JSFKickStartOldFormat" })); //$NON-NLS-1$
+ suite.addTest(new ProjectImportTestSetup(new TestSuite(
+ JSF2ComponentsValidatorTest.class), "org.jboss.tools.jsf.test", //$NON-NLS-1$
+ new String[] { "projects/JSF2ComponentsValidator" }, //$NON-NLS-1$
+ new String[] { "JSF2ComponentsValidator" })); //$NON-NLS-1$
return new DisableJavaIndexingSetup(suite);
}
-
+
public static class DisableJavaIndexingSetup extends TestSetup {
public DisableJavaIndexingSetup(Test test) {
super(test);
}
-
+
@Override
protected void setUp() throws Exception {
JavaModelManager.getIndexManager().disable();
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsValidatorTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsValidatorTest.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsValidatorTest.java 2010-05-05 16:53:31 UTC (rev 21916)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jsf.test.validation;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.validation.ValidationFramework;
+import org.jboss.tools.test.util.ProjectImportTestSetup;
+
+import junit.framework.TestCase;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class JSF2ComponentsValidatorTest extends TestCase {
+
+ private static String projectName = "JSF2ComponentsValidator"; //$NON-NLS-1$
+ private static IProject project;
+
+ public JSF2ComponentsValidatorTest() {
+ super("JSF 2 Components Validator Test"); //$NON-NLS-1$
+ }
+
+ protected void setUp() throws Exception {
+ project = ProjectImportTestSetup.loadProject(projectName);
+ project.build(IncrementalProjectBuilder.FULL_BUILD,
+ new NullProgressMonitor());
+ }
+
+ public void testJSF2ComponentsValidator() throws Exception {
+ ValidationFramework.getDefault().validate(new IProject[] { project },
+ false, false, new NullProgressMonitor());
+ IResource resource = project
+ .findMember("/WebContent/pages/inputname.xhtml"); //$NON-NLS-1$
+ assertNotNull(resource);
+ IMarker[] markers = resource.findMarkers(
+ "org.jboss.tools.jsf.jsf2problemmarker", false, 1); //$NON-NLS-1$
+ assertNotNull(markers);
+ assertTrue(markers.length == 4);
+ assertTrue(isMarkerExist(markers,
+ "Composite component \"echo\" was not found in a project resources directory")); //$NON-NLS-1$
+ assertTrue(isMarkerExist(markers,
+ "Attribute \"anknownAttr\" is not defined for \"echo\" composite component")); //$NON-NLS-1$
+ assertTrue(isMarkerExist(
+ markers,
+ "Resources folder \"/resources/jarPage1\" is missing in a project root directory")); //$NON-NLS-1$
+ assertTrue(isMarkerExist(markers,
+ "Composite component \"echo1\" was not found in a project resources directory")); //$NON-NLS-1$
+ }
+
+ private boolean isMarkerExist(IMarker[] markers, String markerMesssage)
+ throws CoreException {
+ for (int i = 0; i < markers.length; i++) {
+ if (markerMesssage.equals((String) markers[i]
+ .getAttribute("message"))) { //$NON-NLS-1$
+ return true;
+ }
+ }
+ return false;
+ }
+
+}
14 years
JBoss Tools SVN: r21915 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-05 12:29:29 -0400 (Wed, 05 May 2010)
New Revision: 21915
Modified:
branches/modular_build/build/build.xml
Log:
add more default flags per http://www.sonatype.com/people/2009/01/maven-continuous-integration-best-... advice
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-05 16:27:58 UTC (rev 21914)
+++ branches/modular_build/build/build.xml 2010-05-05 16:29:29 UTC (rev 21915)
@@ -104,7 +104,7 @@
<antcall target="mvn">
<param name="COMPONENT" value="purge" />
<param name="MAVEN_DIR" value="${WORKINGDIR}/purge/site" />
- <param name="MAVEN_FLAGS" value="dependency:purge-local-repository -q -B -fae" />
+ <param name="MAVEN_FLAGS" value="dependency:purge-local-repository -e -U -q -B -fae" />
<param name="noXvfb" value="true" />
</antcall>
<delete dir="${WORKINGDIR}/purge" includeemptydirs="true" quiet="true" />
@@ -707,7 +707,7 @@
<!-- Call maven to generate pom.xml, then build site from site.xml -->
<antcall target="run.build">
<param name="COMPONENTS.to.build" value="${COMPONENTS.to.build}" />
- <param name="MAVEN_FLAGS" value="verify -q -B -fae -Dmaven.test.skip" />
+ <param name="MAVEN_FLAGS" value="verify -e -q -B -fae -Dmaven.test.skip" />
<param name="noXvfb" value="true" />
</antcall>
</then>
@@ -715,7 +715,7 @@
<!-- Or just call maven to build site -->
<antcall target="mvn">
<param name="MAVEN_DIR" value="${WORKINGDIR}/${update.site.path}" />
- <param name="MAVEN_FLAGS" value="verify -q -B -fae -Dmaven.test.skip" />
+ <param name="MAVEN_FLAGS" value="verify -e -q -B -fae -Dmaven.test.skip" />
<param name="noXvfb" value="true" />
</antcall>
</else>
14 years