Author: snjeza
Date: 2011-08-03 08:33:05 -0400 (Wed, 03 Aug 2011)
New Revision: 33542
Modified:
trunk/download.jboss.org/jbosstools/examples/nightly/project-examples-3.0...
trunk/download.jboss.org/jbosstools/examples/nightly/project-examples-3.1...
trunk/download.jboss.org/jbosstools/examples/nightly/project-examples-jbd...
trunk/download.jboss.org/jbosstools/examples/project-examples-3.0.xml
trunk/download.jboss.org/jbosstools/examples/project-examples-community-3...
trunk/download.jboss.org/jbosstools/examples/project-examples-jbds30.xml
trunk/download.jboss.org/jbosstools/examples/project-examples-jbds40.xml
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java
Log:
JBIDE-9361 Imported project examples with multiple projects don't have build path set
correctly
Modified:
trunk/download.jboss.org/jbosstools/examples/nightly/project-examples-3.0...
===================================================================
---
trunk/download.jboss.org/jbosstools/examples/nightly/project-examples-3.0... 2011-08-03
11:58:07 UTC (rev 33541)
+++
trunk/download.jboss.org/jbosstools/examples/nightly/project-examples-3.0... 2011-08-03
12:33:05 UTC (rev 33542)
@@ -447,7 +447,7 @@
<fixes>
<fix type="wtpruntime">
<property
name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.43</property>
- <property
name="eclipse-projects">webservice_consumer1</property>
+ <property name="eclipse-projects">webservice_consumer1,
webservice_consumer1_client</property>
<property name="required-components">esb</property>
<property name="description">This project example requires the JBoss
SOA-P 4.3.0 and the runtime name should be "jboss-soa-p.4.3.0
Runtime"</property>
</fix>
Modified:
trunk/download.jboss.org/jbosstools/examples/nightly/project-examples-3.1...
===================================================================
---
trunk/download.jboss.org/jbosstools/examples/nightly/project-examples-3.1... 2011-08-03
11:58:07 UTC (rev 33541)
+++
trunk/download.jboss.org/jbosstools/examples/nightly/project-examples-3.1... 2011-08-03
12:33:05 UTC (rev 33542)
@@ -490,7 +490,7 @@
<fixes>
<fix type="wtpruntime">
<property
name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.50</property>
- <property
name="eclipse-projects">webservice_consumer1</property>
+ <property name="eclipse-projects">webservice_consumer1,
webservice_consumer1_client</property>
<property name="required-components">esb</property>
<property name="description">This project example requires the JBoss
SOA-P 5.0 and the runtime name should be "jboss-soa-p.5.0
Runtime"</property>
</fix>
@@ -709,7 +709,7 @@
<fixes>
<fix type="wtpruntime">
<property
name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.43</property>
- <property
name="eclipse-projects">webservice_consumer1</property>
+ <property name="eclipse-projects">webservice_consumer1,
webservice_consumer1_client</property>
<property name="required-components">esb</property>
<property name="description">This project example requires the JBoss
SOA-P 4.3.0 and the runtime name should be "jboss-soa-p.4.3.0
Runtime"</property>
</fix>
Modified:
trunk/download.jboss.org/jbosstools/examples/nightly/project-examples-jbd...
===================================================================
---
trunk/download.jboss.org/jbosstools/examples/nightly/project-examples-jbd... 2011-08-03
11:58:07 UTC (rev 33541)
+++
trunk/download.jboss.org/jbosstools/examples/nightly/project-examples-jbd... 2011-08-03
12:33:05 UTC (rev 33542)
@@ -84,7 +84,7 @@
<fixes>
<fix type="wtpruntime">
<property
name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.50</property>
- <property
name="eclipse-projects">webservice_consumer1</property>
+ <property name="eclipse-projects">webservice_consumer1,
webservice_consumer1_client</property>
<property name="required-components">esb</property>
<property name="description">This project example requires the JBoss
SOA-P 5.0 and the runtime name should be "jboss-soa-p.5.0
Runtime"</property>
</fix>
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-3.0.xml
===================================================================
---
trunk/download.jboss.org/jbosstools/examples/project-examples-3.0.xml 2011-08-03
11:58:07 UTC (rev 33541)
+++
trunk/download.jboss.org/jbosstools/examples/project-examples-3.0.xml 2011-08-03
12:33:05 UTC (rev 33542)
@@ -361,7 +361,7 @@
<fixes>
<fix type="wtpruntime">
<property
name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.43</property>
- <property
name="eclipse-projects">webservice_consumer1</property>
+ <property name="eclipse-projects">webservice_consumer1,
webservice_consumer1_client</property>
<property name="required-components">esb</property>
<property name="description">This project example requires the JBoss
SOA-P 4.3.0 and the runtime name should be "jboss-soa-p.4.3.0
Runtime"</property>
</fix>
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-community-3...
===================================================================
---
trunk/download.jboss.org/jbosstools/examples/project-examples-community-3... 2011-08-03
11:58:07 UTC (rev 33541)
+++
trunk/download.jboss.org/jbosstools/examples/project-examples-community-3... 2011-08-03
12:33:05 UTC (rev 33542)
@@ -683,7 +683,7 @@
<fixes>
<fix type="wtpruntime">
<property
name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.50,
org.jboss.ide.eclipse.as.runtime.51</property>
- <property
name="eclipse-projects">webservice_consumer1</property>
+ <property
name="eclipse-projects">webservice_consumer1,webservice_consumer1_client</property>
<property name="required-components">esb</property>
<property name="description">This project example requires the JBoss
SOA-P 5.0 and the runtime name should be "jboss-soa-p.5.0
Runtime"</property>
</fix>
@@ -902,7 +902,7 @@
<fixes>
<fix type="wtpruntime">
<property
name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.43</property>
- <property
name="eclipse-projects">webservice_consumer1</property>
+ <property
name="eclipse-projects">webservice_consumer1,webservice_consumer1_client</property>
<property name="required-components">esb</property>
<property name="description">This project example requires the JBoss
SOA-P 4.3.0 and the runtime name should be "jboss-soa-p.4.3.0
Runtime"</property>
</fix>
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-jbds30.xml
===================================================================
---
trunk/download.jboss.org/jbosstools/examples/project-examples-jbds30.xml 2011-08-03
11:58:07 UTC (rev 33541)
+++
trunk/download.jboss.org/jbosstools/examples/project-examples-jbds30.xml 2011-08-03
12:33:05 UTC (rev 33542)
@@ -84,7 +84,7 @@
<fixes>
<fix type="wtpruntime">
<property
name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.50</property>
- <property
name="eclipse-projects">webservice_consumer1</property>
+ <property name="eclipse-projects">webservice_consumer1,
webservice_consumer1_client</property>
<property name="required-components">esb</property>
<property name="description">This project example requires the JBoss
SOA-P 5.0 and the runtime name should be "jboss-soa-p.5.0
Runtime"</property>
</fix>
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-jbds40.xml
===================================================================
---
trunk/download.jboss.org/jbosstools/examples/project-examples-jbds40.xml 2011-08-03
11:58:07 UTC (rev 33541)
+++
trunk/download.jboss.org/jbosstools/examples/project-examples-jbds40.xml 2011-08-03
12:33:05 UTC (rev 33542)
@@ -463,7 +463,7 @@
<fixes>
<fix type="wtpruntime">
<property
name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.43</property>
- <property
name="eclipse-projects">webservice_consumer1</property>
+ <property name="eclipse-projects">webservice_consumer1,
webservice_consumer1_client</property>
<property name="required-components">esb</property>
<property name="description">This project example requires the JBoss
SOA-P 4.3.0 and the runtime name should be "jboss-soa-p.4.3.0
Runtime"</property>
</fix>
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java 2011-08-03
11:58:07 UTC (rev 33541)
+++
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java 2011-08-03
12:33:05 UTC (rev 33542)
@@ -85,6 +85,7 @@
try {
IFacetedProject facetedProject = ProjectFacetsManager.create(eclipseProject);
if (facetedProject == null) {
+ fixNonFacetedEsbProject(project, fix, eclipseProject);
continue;
}
org.eclipse.wst.common.project.facet.core.runtime.IRuntime wtpRuntime =
facetedProject.getPrimaryRuntime();
@@ -97,9 +98,11 @@
wtpRuntime = RuntimeManager.getRuntime(runtime.getId());
facetedProject.addTargetedRuntime(wtpRuntime, monitor);
facetedProject.setPrimaryRuntime(wtpRuntime, monitor);
- fixEsb(eclipseProject, fix, wtpRuntime);
+ fixEsb(eclipseProject, fix, runtime);
}
}
+ } else {
+ fixNonFacetedEsbProject(project, fix, eclipseProject);
}
} catch (CoreException e) {
ProjectExamplesActivator.log(e);
@@ -109,8 +112,16 @@
return ret;
}
+ private void fixNonFacetedEsbProject(Project project, ProjectFix fix,
+ IProject eclipseProject) throws JavaModelException {
+ IRuntime runtime = getBestRuntime(project, fix);
+ if (runtime != null) {
+ fixEsb(eclipseProject, fix, runtime);
+ }
+ }
+
private void fixEsb(IProject eclipseProject,
- ProjectFix fix, org.eclipse.wst.common.project.facet.core.runtime.IRuntime wtpRuntime)
throws JavaModelException {
+ ProjectFix fix, IRuntime runtime) throws JavaModelException {
String required_components = fix.getProperties().get(REQUIRED_COMPONENTS);
if (required_components == null) {
return;
@@ -135,7 +146,6 @@
IClasspathEntry[] entries = javaProject.getRawClasspath();
IClasspathEntry[] newEntries = new IClasspathEntry[entries.length];
boolean changed = false;
- IRuntime runtime = getRuntime(wtpRuntime);
for (int i = 0; i < entries.length; i++) {
IClasspathEntry entry = entries[i];
if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {