Author: rob.stryker(a)jboss.com
Date: 2009-12-17 17:29:09 -0500 (Thu, 17 Dec 2009)
New Revision: 19456
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/OverrideAddComponentToEnterpriseApplicationDataModelProvider.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/EarModuleDependenciesPropertyPage.java
Log:
JBIDE-5519 - override the stupid ear operation
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/EarModuleDependenciesPropertyPage.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/EarModuleDependenciesPropertyPage.java 2009-12-17
22:20:39 UTC (rev 19455)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/EarModuleDependenciesPropertyPage.java 2009-12-17
22:29:09 UTC (rev 19456)
@@ -49,6 +49,6 @@
// }
protected IDataModelProvider getAddReferenceDataModelProvider(IVirtualComponent
component) {
- return new AddComponentToEnterpriseApplicationDataModelProvider();
+ return new OverrideAddComponentToEnterpriseApplicationDataModelProvider();
}
}
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/OverrideAddComponentToEnterpriseApplicationDataModelProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/OverrideAddComponentToEnterpriseApplicationDataModelProvider.java
(rev 0)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/impl/OverrideAddComponentToEnterpriseApplicationDataModelProvider.java 2009-12-17
22:29:09 UTC (rev 19456)
@@ -0,0 +1,30 @@
+package org.jboss.ide.eclipse.as.wtp.ui.propertypage.impl;
+
+import java.util.Map;
+
+import
org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationDataModelProvider;
+import
org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationOp;
+import
org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
+
+public class OverrideAddComponentToEnterpriseApplicationDataModelProvider
+ extends AddComponentToEnterpriseApplicationDataModelProvider {
+
+ public IDataModelOperation getDefaultOperation() {
+ return new OverrideAddComponentToEnterpriseApplicationOp(model);
+ }
+
+ public static class OverrideAddComponentToEnterpriseApplicationOp
+ extends AddComponentToEnterpriseApplicationOp {
+ public OverrideAddComponentToEnterpriseApplicationOp(IDataModel model) {
+ super(model);
+ }
+ protected String getArchiveName(IVirtualComponent comp) {
+ Map map = (Map)
model.getProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP);
+ String uri = (String) map.get(comp);
+ return uri == null ? "" : uri; //$NON-NLS-1$
+ }
+ }
+}
Show replies by date