Eclipse projects that are created by importing a project example are defined using the includedProjects element (the project example name and the name of the created eclipse project don't have to be the same). The ProjectExamplesFix class uses the includedProjects list. The project example name is used only if the includedProjects element doesn't exist.
Now, the project example engine will dynamically add included projects for a project example of the maven and mavenArchetype type.
The project example engine uses the Maven API to calculate included projects after importing a project example.
If a dynamic project needs to be used in /project/fixes/fix/property@name=eclipseProjects, you can use a syntax like $
{project[N]}
. $
{project[0]} will be replaced with the first project in the includedProjects list, for instance.
If a fix is related to all included Eclipse projects, you don't have to add the eclipseProjects property.
The following are some examples:
...
<fix type="wtpruntime">
<property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.eap.60</property>
<property name="description">This project example requires JBoss AS 7.0</property>
<property name="eclipse-projects">${project[1]}, ${project[2]}, ${project[3]} </property>
<property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
</fix>
...
...
<fix type="wtpruntime">
<property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.eap.60</property>
<property name="description">This project example requires JBoss AS 7.0</property>
<property name="eclipse-projects">${project[0]}
-ejb, $
{project[0]}-web, ${project[0]}
-ear </property>
<property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
</fix>
...
The following fix will be applied to all created Eclipse projects:
...
<fix type="wtpruntime">
<property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.eap.60</property>
<property name="description">This project example requires JBoss AS 7.0</property>
<property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
</fix>
...
The same syntax can be used for a cheatsheet. You could, for instance, define a cheatsheet in the root of an archetype as follows:
...
<welcome type="cheatsheets" url="/$
{project[0]}
/cheatsheet.xml"/>
...
Eclipse projects that are created by importing a project example are defined using the includedProjects element (the project example name and the name of the created eclipse project don't have to be the same). The ProjectExamplesFix class uses the includedProjects list. The project example name is used only if the includedProjects element doesn't exist.
Now, the project example engine will dynamically add included projects for a project example of the maven and mavenArchetype type.
{project[N]}The project example engine uses the Maven API to calculate included projects after importing a project example.
If a dynamic project needs to be used in /project/fixes/fix/property@name=eclipseProjects, you can use a syntax like $
. $
{project[0]} will be replaced with the first project in the includedProjects list, for instance.If a fix is related to all included Eclipse projects, you don't have to add the eclipseProjects property.
The following are some examples:
...
<fix type="wtpruntime">
<property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.eap.60</property>
<property name="description">This project example requires JBoss AS 7.0</property>
<property name="eclipse-projects">${project[1]}, ${project[2]}, ${project[3]} </property>
<property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
</fix>
...
...
<fix type="wtpruntime">
<property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.eap.60</property>
<property name="description">This project example requires JBoss AS 7.0</property>
<property name="eclipse-projects">${project[0]}
-ejb, $
{project[0]}-web, ${project[0]}-ear </property>
<property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
</fix>
...
The following fix will be applied to all created Eclipse projects:
...
<fix type="wtpruntime">
<property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.eap.60</property>
<property name="description">This project example requires JBoss AS 7.0</property>
<property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
</fix>
...
The same syntax can be used for a cheatsheet. You could, for instance, define a cheatsheet in the root of an archetype as follows:
{project[0]}...
<welcome type="cheatsheets" url="/$
/cheatsheet.xml"/>
...