Author: dennyxu
Date: 2009-02-20 05:33:30 -0500 (Fri, 20 Feb 2009)
New Revision: 13697
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeClassPathInitializer.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/AbstractClasspathContainer.java
Log:
JBIDE-3836: ESB classpath container does not update library after container is changed
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeClassPathInitializer.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeClassPathInitializer.java 2009-02-20
09:15:26 UTC (rev 13696)
+++
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeClassPathInitializer.java 2009-02-20
10:33:30 UTC (rev 13697)
@@ -83,6 +83,7 @@
private boolean isFromServer = false;
private IClasspathEntry[] entries = null;
private List<String> jars;
+ private boolean unbound = false;
public JBossRuntimeClasspathContainer(IPath path, IJavaProject project,
boolean isFromServer) {
@@ -92,6 +93,9 @@
}
public String getDescription() {
+ if(unbound){
+ return JBossFacetCoreMessages.JBoss_Runtime + " [" +
path.segment(path.segmentCount() - 1) + "] (unbound)";
+ }
return JBossFacetCoreMessages.JBoss_Runtime + " [" +
path.segment(path.segmentCount() - 1) + "]";
}
@@ -109,11 +113,13 @@
IRuntime serverRuntime = ServerCore.findRuntime(segment);
if (serverRuntime == null) {
- IStatus status = StatusUtils
- .errorStatus("Can not find the runtime: " + segment);
- ESBProjectCorePlugin.getDefault().getLog().log(status);
+// IStatus status = StatusUtils
+// .errorStatus("Can not find the runtime: " + segment);
+// ESBProjectCorePlugin.getDefault().getLog().log(status);
+ unbound = true;
return new IClasspathEntry[0];
}
+ unbound = false;
String runtimeLocation = serverRuntime.getLocation()
.toOSString();
jars = JBossRuntimeManager.getInstance().getAllRuntimeJars(
@@ -126,7 +132,11 @@
if (jbws != null) {
jars = JBossRuntimeManager.getInstance().getAllRuntimeJars(
jbws);
+ unbound = false;
}
+ else{
+ unbound = true;
+ }
}
if (jars == null)
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/AbstractClasspathContainer.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/AbstractClasspathContainer.java 2009-02-20
09:15:26 UTC (rev 13696)
+++
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/AbstractClasspathContainer.java 2009-02-20
10:33:30 UTC (rev 13697)
@@ -69,9 +69,7 @@
}
public IClasspathEntry[] getClasspathEntries() {
- if (entries == null) {
- entries = computeEntries();
- }
+ entries = computeEntries();
return entries;
}
Show replies by date