summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Stryker2013-04-30 06:22:56 (EDT)
committerRob Stryker2013-04-30 06:22:56 (EDT)
commit14a2cb5288b2eb20223d1d98c9a756ce997773a8 (patch)
tree3df652527ea6b901caf35e46fce9510a5d96bf34
parent3b9f70b8c677778cf3747b3b23a7aad8cd7e1c86 (diff)
downloadwebtools.javaee-14a2cb5288b2eb20223d1d98c9a756ce997773a8.zip
webtools.javaee-14a2cb5288b2eb20223d1d98c9a756ce997773a8.tar.gz
webtools.javaee-14a2cb5288b2eb20223d1d98c9a756ce997773a8.tar.bz2
[400967] update ui for deploy-name in add/remove module wizard
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableFactory.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableFactory.java b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableFactory.java
index 6a03672..afdb89e 100644
--- a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableFactory.java
+++ b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableFactory.java
@@ -37,6 +37,7 @@ import org.eclipse.wst.common.componentcore.internal.flat.IChildModuleReference;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModule2;
import org.eclipse.wst.server.core.internal.Module;
import org.eclipse.wst.server.core.internal.ModuleFactory;
import org.eclipse.wst.server.core.internal.ServerPlugin;
@@ -123,7 +124,15 @@ public class J2EEDeployableFactory extends ProjectModuleFactoryDelegate implemen
if (canHandleProject(component.getProject())) {
String type = JavaEEProjectUtilities.getJ2EEProjectType(component.getProject());
String version = J2EEProjectUtilities.getJ2EEProjectVersion(component.getProject());
- IModule module = createModule(component.getName(), component.getName(), type, version, component.getProject());
+ Map<String, String> props = new HashMap<String, String>();
+ String componentName = component.getName();
+ String deployedName = component.getDeployedName();
+ props.put(IModule2.PROP_DEPLOY_NAME, component.getDeployedName());
+ if (componentName != null && deployedName != null && !componentName.equals(deployedName)) {
+ // Only set the display name if the deploy name and the module name are different.
+ props.put(IModule2.PROP_DISPLAY_NAME, componentName + "(" + deployedName + ")"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+ IModule module = createModule(component.getName(), component.getName(), type, version, component.getProject(), props);
FlatComponentDeployable moduleDelegate = createModuleDelegate(component.getProject(), component);
moduleDelegates.put(module, moduleDelegate);
projectModules.add(module);