diff --git a/org.talend.core.repository/src/main/java/org/talend/repository/model/actions/CopyObjectAction.java b/org.talend.core.repository/src/main/java/org/talend/repository/model/actions/CopyObjectAction.java index 7762f29151..10fb6da548 100644 --- a/org.talend.core.repository/src/main/java/org/talend/repository/model/actions/CopyObjectAction.java +++ b/org.talend.core.repository/src/main/java/org/talend/repository/model/actions/CopyObjectAction.java @@ -176,8 +176,14 @@ public class CopyObjectAction { List allVersion = factory.getAllVersion(originalItem.getProperty().getId()); if (allVersion.size() == 1) { - copySingleVersionItem(originalItem, path); - + Item curItem = originalItem; + for (IRepositoryViewObject obj : allVersion) { + if (obj.getVersion().equals(originalItem.getProperty().getVersion())) { + curItem = obj.getProperty().getItem(); + break; + } + } + copySingleVersionItem(curItem, path); } else if (allVersion.size() > 1) { PastSelectorDialog dialog = new PastSelectorDialog(Display.getCurrent().getActiveShell(), allVersion, sourceNode); if (dialog.open() == Window.OK) { diff --git a/org.talend.core.runtime/schema/librariesNeeded.exsd b/org.talend.core.runtime/schema/librariesNeeded.exsd index 8a91a9d79d..393871b922 100644 --- a/org.talend.core.runtime/schema/librariesNeeded.exsd +++ b/org.talend.core.runtime/schema/librariesNeeded.exsd @@ -12,13 +12,14 @@ - + - + + @@ -39,9 +40,9 @@ - + - + @@ -49,11 +50,25 @@ - + - + + + + + + + + + + + + + + + @@ -73,9 +88,9 @@ - + - + @@ -83,9 +98,9 @@ - + - + @@ -105,6 +120,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.talend.core.runtime/src/main/java/org/talend/core/model/general/ModuleNeeded.java b/org.talend.core.runtime/src/main/java/org/talend/core/model/general/ModuleNeeded.java index b2ac706450..484b49db63 100644 --- a/org.talend.core.runtime/src/main/java/org/talend/core/model/general/ModuleNeeded.java +++ b/org.talend.core.runtime/src/main/java/org/talend/core/model/general/ModuleNeeded.java @@ -25,6 +25,8 @@ import org.talend.core.runtime.CoreRuntimePlugin; */ public class ModuleNeeded { + private String id; + private String context; private String moduleName; @@ -101,6 +103,10 @@ public class ModuleNeeded { return requiredIf; } + public void setRequiredIf(String requiredIf) { + this.requiredIf = requiredIf; + } + /** * Check if the library is required depends the condition of "required if". Note that if the flag "required=true" in * the xml of component, it will never check in the required_if. @@ -256,6 +262,14 @@ public class ModuleNeeded { this.mrRequired = mrRequired; } + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + @Override public String toString() { if (bundleName == null) { diff --git a/org.talend.core.runtime/src/main/java/org/talend/repository/ui/actions/AContextualAction.java b/org.talend.core.runtime/src/main/java/org/talend/repository/ui/actions/AContextualAction.java index 8f66a5a8de..16721601a2 100644 --- a/org.talend.core.runtime/src/main/java/org/talend/repository/ui/actions/AContextualAction.java +++ b/org.talend.core.runtime/src/main/java/org/talend/repository/ui/actions/AContextualAction.java @@ -508,6 +508,17 @@ public abstract class AContextualAction extends Action implements ITreeContextua return isUnderDBConnection(node.getParent()); } + protected boolean isUnderValidationRuleConnection(IRepositoryNode repNode) { + if (repNode == null) { + return false; + } + if ((repNode.getType() == ENodeType.SYSTEM_FOLDER || repNode.getType() == ENodeType.STABLE_SYSTEM_FOLDER) + && repNode.getProperties(EProperties.CONTENT_TYPE) == ERepositoryObjectType.METADATA_VALIDATION_RULES) { + return true; + } + return isUnderValidationRuleConnection(repNode.getParent()); + } + /** * Display a "Save job" prompt dialog if the job eidtor of the selectedNode is unsaved. */ diff --git a/org.talend.librariesmanager.test/META-INF/MANIFEST.MF b/org.talend.librariesmanager.test/META-INF/MANIFEST.MF index e880315ce8..9e9d809220 100644 --- a/org.talend.librariesmanager.test/META-INF/MANIFEST.MF +++ b/org.talend.librariesmanager.test/META-INF/MANIFEST.MF @@ -1,8 +1,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Test -Bundle-SymbolicName: org.talend.librariesmanager.test +Bundle-SymbolicName: org.talend.librariesmanager.test;singleton:=true Bundle-Version: 1.0.0.qualifier Fragment-Host: org.talend.librariesmanager Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Require-Bundle: org.junit4;bundle-version="4.8.1" +Require-Bundle: org.junit4;bundle-version="4.8.1", + org.talend.testutils diff --git a/org.talend.librariesmanager.test/build.properties b/org.talend.librariesmanager.test/build.properties index 41eb6ade2b..3f78ea4cf8 100644 --- a/org.talend.librariesmanager.test/build.properties +++ b/org.talend.librariesmanager.test/build.properties @@ -1,4 +1,5 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - . + .,\ + fragment.xml diff --git a/org.talend.librariesmanager.test/fragment.xml b/org.talend.librariesmanager.test/fragment.xml new file mode 100644 index 0000000000..f0a1efc75a --- /dev/null +++ b/org.talend.librariesmanager.test/fragment.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.talend.librariesmanager.test/src/org/talend/librariesmanager/model/ExtensionModuleManagerTest.java b/org.talend.librariesmanager.test/src/org/talend/librariesmanager/model/ExtensionModuleManagerTest.java new file mode 100644 index 0000000000..395649256a --- /dev/null +++ b/org.talend.librariesmanager.test/src/org/talend/librariesmanager/model/ExtensionModuleManagerTest.java @@ -0,0 +1,66 @@ +// ============================================================================ +// +// Copyright (C) 2006-2014 Talend Inc. - www.talend.com +// +// This source code is available under agreement available at +// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt +// +// You should have received a copy of the agreement +// along with this program; if not, write to Talend SA +// 9 rue Pages 92150 Suresnes, France +// +// ============================================================================ +package org.talend.librariesmanager.model; + +import static org.junit.Assert.*; + +import java.util.List; + +import junit.framework.Assert; + +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.powermock.modules.junit4.PowerMockRunner; +import org.talend.core.model.general.ModuleNeeded; + +/** + * created by ycbai on 2014-5-8 Detailled comment + * + */ +@RunWith(PowerMockRunner.class) +public class ExtensionModuleManagerTest { + + private ExtensionModuleManager manager; + + @BeforeClass + public void setUp() throws Exception { + manager = ExtensionModuleManager.getInstance(); + } + + @Test + public void testGetModuleNeeded() { + /* + * Get single module from id. + */ + List moduleNeededs = manager.getModuleNeeded("test-jar1"); //$NON-NLS-1$ + Assert.assertTrue(moduleNeededs != null && moduleNeededs.size() > 0 + && "test-jar1.jar".equals(moduleNeededs.get(0).getModuleName())); //$NON-NLS-1$ + + /* + * Get single module from name. + */ + moduleNeededs = manager.getModuleNeeded("test-jar1.jar"); //$NON-NLS-1$ + Assert.assertTrue(moduleNeededs != null && moduleNeededs.size() > 0 && "test-jar1".equals(moduleNeededs.get(0).getId())); //$NON-NLS-1$ + + /* + * Get modules from group. + */ + moduleNeededs = manager.getModuleNeeded("test-jars-group"); //$NON-NLS-1$ + assertNotNull(moduleNeededs); + Assert.assertTrue(moduleNeededs.size() == 3); + Assert.assertTrue("test-jar1".equals(moduleNeededs.get(0).getId())); //$NON-NLS-1$ + Assert.assertTrue("test-jar2".equals(moduleNeededs.get(1).getId())); //$NON-NLS-1$ + Assert.assertTrue("test-jar3".equals(moduleNeededs.get(2).getId())); //$NON-NLS-1$ + } +} diff --git a/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/ExtensionModuleManager.java b/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/ExtensionModuleManager.java new file mode 100644 index 0000000000..d4d4a4e85b --- /dev/null +++ b/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/ExtensionModuleManager.java @@ -0,0 +1,225 @@ +// ============================================================================ +// +// Copyright (C) 2006-2014 Talend Inc. - www.talend.com +// +// This source code is available under agreement available at +// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt +// +// You should have received a copy of the agreement +// along with this program; if not, write to Talend SA +// 9 rue Pages 92150 Suresnes, France +// +// ============================================================================ +package org.talend.librariesmanager.model; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IContributor; +import org.talend.commons.utils.workbench.extensions.ExtensionImplementationProvider; +import org.talend.commons.utils.workbench.extensions.ExtensionPointLimiterImpl; +import org.talend.commons.utils.workbench.extensions.IExtensionPointLimiter; +import org.talend.core.model.general.ModuleNeeded; +import org.talend.designer.core.model.utils.emf.component.IMPORTType; +import org.talend.librariesmanager.i18n.Messages; + +/** + * + * created by ycbai on 2014-5-7 Detailled comment + * + */ +public class ExtensionModuleManager { + + public final static String EXT_ID = "org.talend.core.runtime.librariesNeeded"; //$NON-NLS-1$ + + public final static String MODULE_ELE = "libraryNeeded"; //$NON-NLS-1$ + + public final static String MODULE_GROUP_ELE = "libraryNeededGroup"; //$NON-NLS-1$ + + public final static String LIBRARY_ELE = "library"; //$NON-NLS-1$ + + public final static String GROUP_ELE = "group"; //$NON-NLS-1$ + + public final static String ID_ATTR = "id"; //$NON-NLS-1$ + + public final static String NAME_ATTR = "name"; //$NON-NLS-1$ + + public final static String CONTEXT_ATTR = "context"; //$NON-NLS-1$ + + public final static String MESSAGE_ATTR = "message"; //$NON-NLS-1$ + + public final static String REQUIRED_ATTR = "required"; //$NON-NLS-1$ + + public final static String URIPATH_ATTR = "uripath"; //$NON-NLS-1$ + + public final static String DESC_ATTR = "description"; //$NON-NLS-1$ + + public final static String PATH_SEP = "/"; //$NON-NLS-1$ + + public final static String URIPATH_PREFIX = "platform:/plugin/"; //$NON-NLS-1$ + + public final static String URIPATH_PREFIX_INTERNAL = "platform:/base/plugins/"; //$NON-NLS-1$ + + public final static String DEFAULT_LIB_FOLDER = "lib"; //$NON-NLS-1$ + + private static ExtensionModuleManager manager = new ExtensionModuleManager(); + + private static Map id2moduleMap = new HashMap(); + + private static Map name2moduleMap = new HashMap(); + + private ExtensionModuleManager() { + } + + public static synchronized final ExtensionModuleManager getInstance() { + return manager; + } + + public List getModuleNeeded(String id) { + return getModuleNeeded(id, false); + } + + public List getModuleNeeded(String id, boolean isGroup) { + List importNeedsList = new ArrayList(); + if (id == null) { + return importNeedsList; + } + if (isGroup) { + collectGroupModules(id, importNeedsList); + } else { + collectSingleModule(id, importNeedsList); + } + + return importNeedsList; + } + + public List getModuleNeededForComponent(String context, IMPORTType importType) { + List importNeedsList = new ArrayList(); + String id = null; + boolean isGroup = false; + String module = StringUtils.trimToNull(importType.getMODULE()); + String moduleGroup = StringUtils.trimToNull(importType.getMODULEGROUP()); + if (module != null) { + id = module; + } else if (moduleGroup != null) { + id = moduleGroup; + isGroup = true; + } + List modulesNeeded = getModuleNeeded(id, isGroup); + for (ModuleNeeded moduleNeeded : modulesNeeded) { + String msg = importType.getMESSAGE(); + if (msg == null) { + msg = Messages.getString("modules.required"); //$NON-NLS-1$ + } + moduleNeeded.setContext(context); + moduleNeeded.setInformationMsg(msg); + moduleNeeded.setRequired(importType.isREQUIRED()); + moduleNeeded.setMrRequired(importType.isMRREQUIRED()); + moduleNeeded.setRequiredIf(importType.getREQUIREDIF()); + moduleNeeded.setShow(importType.isSHOW()); + ModulesNeededProvider.initBundleID(importType, moduleNeeded); + importNeedsList.add(moduleNeeded); + } + + return importNeedsList; + } + + private void collectSingleModule(String id, List importNeedsList) { + if (id == null || importNeedsList == null) { + return; + } + IExtensionPointLimiter extensionPoint = new ExtensionPointLimiterImpl(EXT_ID, MODULE_ELE); + List extension = ExtensionImplementationProvider.getInstanceV2(extensionPoint); + // Find the module definition by id first. + ModuleNeeded moduleNeeded = collectModuleAndMap(extension, id2moduleMap, id); + if (moduleNeeded == null) { // If cannot find it then find it by name. + moduleNeeded = collectModuleAndMap(extension, name2moduleMap, id, true); + } + if (moduleNeeded != null) { + importNeedsList.add(moduleNeeded); + } + } + + private ModuleNeeded collectModuleAndMap(List extension, Map moduleMap, String id) { + return collectModuleAndMap(extension, moduleMap, id, false); + } + + private ModuleNeeded collectModuleAndMap(List extension, Map moduleMap, + String id, boolean byName) { + ModuleNeeded moduleNeeded = moduleMap.get(id); + if (moduleNeeded == null) { + for (IConfigurationElement configElement : extension) { + String moduleIdOrName = configElement.getAttribute(ID_ATTR); + if (byName) { + moduleIdOrName = configElement.getAttribute(NAME_ATTR); + } + if (id.equals(moduleIdOrName)) { + moduleNeeded = ModulesNeededProvider.createModuleNeededInstance(configElement); + moduleMap.put(id, moduleNeeded); + break; + } + } + } + + return moduleNeeded; + } + + private void collectGroupModules(String groupId, List importNeedsList) { + if (groupId == null || importNeedsList == null) { + return; + } + IExtensionPointLimiter extensionPoint = new ExtensionPointLimiterImpl(EXT_ID, MODULE_GROUP_ELE); + List extension = ExtensionImplementationProvider.getInstanceV2(extensionPoint); + for (IConfigurationElement configElement : extension) { + String moduleGroupId = configElement.getAttribute(ID_ATTR); + if (groupId.equals(moduleGroupId)) { + IConfigurationElement[] childrenEle = configElement.getChildren(); + for (IConfigurationElement childEle : childrenEle) { + String eleName = childEle.getName(); + if (LIBRARY_ELE.equals(eleName)) { + collectSingleModule(childEle.getAttribute(ID_ATTR), importNeedsList); + } else if (GROUP_ELE.equals(eleName)) { + collectGroupModules(childEle.getAttribute(ID_ATTR), importNeedsList); + } + } + } + } + } + + /** + * If uripath is null we will seek the jar from /lib/${jarName} from the contributor plugin of the lib extension + * point. + *

+ * + * DOC ycbai Comment method "getFormalModulePath". + * + * @param uriPath + * @param current + * @return the formal module path which start with "platform:/plugin/" or "platform:/base/plugins/". + */ + public String getFormalModulePath(String uriPath, IConfigurationElement current) { + StringBuffer expectJarPath = new StringBuffer(); + if (StringUtils.trimToNull(uriPath) == null) { + String jarName = current.getAttribute(NAME_ATTR); + IContributor contributor = current.getContributor(); + expectJarPath.append(URIPATH_PREFIX); + expectJarPath.append(contributor.getName()); + expectJarPath.append(PATH_SEP); + expectJarPath.append(DEFAULT_LIB_FOLDER); + expectJarPath.append(PATH_SEP); + expectJarPath.append(jarName); + } else { + if (!uriPath.startsWith(URIPATH_PREFIX) && !uriPath.startsWith(URIPATH_PREFIX_INTERNAL)) { + expectJarPath.append(URIPATH_PREFIX); + } + expectJarPath.append(uriPath); + } + + return expectJarPath.toString(); + } + +} diff --git a/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/ModulesNeededProvider.java b/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/ModulesNeededProvider.java index ed9ba97298..6788b728f7 100644 --- a/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/ModulesNeededProvider.java +++ b/org.talend.librariesmanager/src/main/java/org/talend/librariesmanager/model/ModulesNeededProvider.java @@ -274,18 +274,7 @@ public class ModulesNeededProvider { EList emfImportList = info.getImportType(); for (int i = 0; i < emfImportList.size(); i++) { IMPORTType importType = (IMPORTType) emfImportList.get(i); - String msg = importType.getMESSAGE(); - if (msg == null) { - msg = Messages.getString("modules.required"); - } - List list = getInstallURL(importType); - ModuleNeeded componentImportNeeds = new ModuleNeeded(key, importType.getMODULE(), msg, - importType.isREQUIRED(), list, importType.getREQUIREDIF()); - initBundleID(importType, componentImportNeeds); - componentImportNeeds.setMrRequired(importType.isMRREQUIRED()); - componentImportNeeds.setShow(importType.isSHOW()); - componentImportNeeds.setModuleLocaion(importType.getUrlPath()); - importNeedsList.add(componentImportNeeds); + collectModuleNeeded(key, importType, importNeedsList); } } } @@ -305,6 +294,37 @@ public class ModulesNeededProvider { } } + public static void collectModuleNeeded(String context, IMPORTType importType, List importNeedsList) { + boolean foundModule = createModuleNeededForComponentFromExtension(context, importType, importNeedsList); + if (!foundModule) { // If cannot find the jar from extension point then do it like before. + createModuleNeededForComponent(context, importType, importNeedsList); + } + } + + private static boolean createModuleNeededForComponentFromExtension(String context, IMPORTType importType, + List importNeedsList) { + List importModuleNeeded = ExtensionModuleManager.getInstance().getModuleNeededForComponent(context, + importType); + importNeedsList.addAll(importModuleNeeded); + + return importModuleNeeded.size() > 0; + } + + public static void createModuleNeededForComponent(String context, IMPORTType importType, List importNeedsList) { + String msg = importType.getMESSAGE(); + if (msg == null) { + msg = Messages.getString("modules.required"); //$NON-NLS-1$ + } + List list = getInstallURL(importType); + ModuleNeeded moduleNeeded = new ModuleNeeded(context, importType.getMODULE(), msg, importType.isREQUIRED(), list, + importType.getREQUIREDIF()); + initBundleID(importType, moduleNeeded); + moduleNeeded.setMrRequired(importType.isMRREQUIRED()); + moduleNeeded.setShow(importType.isSHOW()); + moduleNeeded.setModuleLocaion(importType.getUrlPath()); + importNeedsList.add(moduleNeeded); + } + public static List getInstallURL(IMPORTType importType) { List list = new ArrayList(); EList emfInstall = importType.getURL(); @@ -608,13 +628,16 @@ public class ModulesNeededProvider { * @return */ public static ModuleNeeded createModuleNeededInstance(IConfigurationElement current) { - String context = current.getAttribute("context"); //$NON-NLS-1$ - String name = current.getAttribute("name"); //$NON-NLS-1$ - String message = current.getAttribute("message"); //$NON-NLS-1$ - boolean required = new Boolean(current.getAttribute("required")); //$NON-NLS-1$ - String uripath = current.getAttribute("uripath"); + String id = current.getAttribute(ExtensionModuleManager.ID_ATTR); + String context = current.getAttribute(ExtensionModuleManager.CONTEXT_ATTR); + String name = current.getAttribute(ExtensionModuleManager.NAME_ATTR); + String message = current.getAttribute(ExtensionModuleManager.MESSAGE_ATTR); + boolean required = new Boolean(current.getAttribute(ExtensionModuleManager.REQUIRED_ATTR)); + String uripath = current.getAttribute(ExtensionModuleManager.URIPATH_ATTR); + uripath = ExtensionModuleManager.getInstance().getFormalModulePath(uripath, current); ModuleNeeded module = new ModuleNeeded(context, name, message, required); module.setModuleLocaion(uripath); + module.setId(id); return module; } diff --git a/org.talend.model/model/Component.ecore b/org.talend.model/model/Component.ecore index 05a1d7da9c..b49792c6b8 100644 --- a/org.talend.model/model/Component.ecore +++ b/org.talend.model/model/Component.ecore @@ -881,6 +881,13 @@

+ + +
+
+
+ + @@ -889,6 +896,14 @@
+ + +
+
+
+ + @@ -976,6 +991,13 @@
+ + +
+
+
+ + diff --git a/org.talend.model/model/Component.genmodel b/org.talend.model/model/Component.genmodel index 09e91ad275..d5d46a663d 100644 --- a/org.talend.model/model/Component.genmodel +++ b/org.talend.model/model/Component.genmodel @@ -136,7 +136,9 @@ + + @@ -150,6 +152,7 @@ + diff --git a/org.talend.model/model/Component.xsd b/org.talend.model/model/Component.xsd index ee6958ae95..6604e51041 100644 --- a/org.talend.model/model/Component.xsd +++ b/org.talend.model/model/Component.xsd @@ -197,8 +197,12 @@ - + + + + + @@ -214,6 +218,7 @@ + diff --git a/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/ComponentPackage.java b/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/ComponentPackage.java index ad76f1c387..8806e14b46 100644 --- a/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/ComponentPackage.java +++ b/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/ComponentPackage.java @@ -1217,6 +1217,15 @@ public interface ComponentPackage extends EPackage { */ int IMPORTS_TYPE = 13; + /** + * The feature id for the 'REQUIREDIF' attribute. + * + * + * @generated + * @ordered + */ + int IMPORTS_TYPE__REQUIREDIF = 0; + /** * The feature id for the 'IMPORT' containment reference list. * @@ -1224,7 +1233,16 @@ public interface ComponentPackage extends EPackage { * @generated * @ordered */ - int IMPORTS_TYPE__IMPORT = 0; + int IMPORTS_TYPE__IMPORT = 1; + + /** + * The feature id for the 'IMPORTS' containment reference list. + * + * + * @generated + * @ordered + */ + int IMPORTS_TYPE__IMPORTS = 2; /** * The number of structural features of the 'IMPORTS Type' class. @@ -1233,7 +1251,7 @@ public interface ComponentPackage extends EPackage { * @generated * @ordered */ - int IMPORTS_TYPE_FEATURE_COUNT = 1; + int IMPORTS_TYPE_FEATURE_COUNT = 3; /** * The meta object id for the '{@link org.talend.designer.core.model.utils.emf.component.impl.IMPORTTypeImpl IMPORT Type}' class. @@ -1344,6 +1362,15 @@ public interface ComponentPackage extends EPackage { */ int IMPORT_TYPE__MRREQUIRED = 10; + /** + * The feature id for the 'MODULEGROUP' attribute. + * + * + * @generated + * @ordered + */ + int IMPORT_TYPE__MODULEGROUP = 11; + /** * The number of structural features of the 'IMPORT Type' class. * @@ -1351,7 +1378,7 @@ public interface ComponentPackage extends EPackage { * @generated * @ordered */ - int IMPORT_TYPE_FEATURE_COUNT = 11; + int IMPORT_TYPE_FEATURE_COUNT = 12; /** * The meta object id for the '{@link org.talend.designer.core.model.utils.emf.component.impl.INSTALLTypeImpl INSTALL Type}' class. @@ -3664,6 +3691,17 @@ public interface ComponentPackage extends EPackage { */ EClass getIMPORTSType(); + /** + * Returns the meta object for the attribute '{@link org.talend.designer.core.model.utils.emf.component.IMPORTSType#getREQUIREDIF REQUIREDIF}'. + * + * + * @return the meta object for the attribute 'REQUIREDIF'. + * @see org.talend.designer.core.model.utils.emf.component.IMPORTSType#getREQUIREDIF() + * @see #getIMPORTSType() + * @generated + */ + EAttribute getIMPORTSType_REQUIREDIF(); + /** * Returns the meta object for the containment reference list '{@link org.talend.designer.core.model.utils.emf.component.IMPORTSType#getIMPORT IMPORT}'. * @@ -3675,6 +3713,17 @@ public interface ComponentPackage extends EPackage { */ EReference getIMPORTSType_IMPORT(); + /** + * Returns the meta object for the containment reference list '{@link org.talend.designer.core.model.utils.emf.component.IMPORTSType#getIMPORTS IMPORTS}'. + * + * + * @return the meta object for the containment reference list 'IMPORTS'. + * @see org.talend.designer.core.model.utils.emf.component.IMPORTSType#getIMPORTS() + * @see #getIMPORTSType() + * @generated + */ + EReference getIMPORTSType_IMPORTS(); + /** * Returns the meta object for class '{@link org.talend.designer.core.model.utils.emf.component.IMPORTType IMPORT Type}'. * @@ -3795,6 +3844,17 @@ public interface ComponentPackage extends EPackage { */ EAttribute getIMPORTType_MRREQUIRED(); + /** + * Returns the meta object for the attribute '{@link org.talend.designer.core.model.utils.emf.component.IMPORTType#getMODULEGROUP MODULEGROUP}'. + * + * + * @return the meta object for the attribute 'MODULEGROUP'. + * @see org.talend.designer.core.model.utils.emf.component.IMPORTType#getMODULEGROUP() + * @see #getIMPORTType() + * @generated + */ + EAttribute getIMPORTType_MODULEGROUP(); + /** * Returns the meta object for the attribute '{@link org.talend.designer.core.model.utils.emf.component.IMPORTType#getBundleID Bundle ID}'. * @@ -5851,6 +5911,14 @@ public interface ComponentPackage extends EPackage { */ EClass IMPORTS_TYPE = eINSTANCE.getIMPORTSType(); + /** + * The meta object literal for the 'REQUIREDIF' attribute feature. + * + * + * @generated + */ + EAttribute IMPORTS_TYPE__REQUIREDIF = eINSTANCE.getIMPORTSType_REQUIREDIF(); + /** * The meta object literal for the 'IMPORT' containment reference list feature. * @@ -5859,6 +5927,14 @@ public interface ComponentPackage extends EPackage { */ EReference IMPORTS_TYPE__IMPORT = eINSTANCE.getIMPORTSType_IMPORT(); + /** + * The meta object literal for the 'IMPORTS' containment reference list feature. + * + * + * @generated + */ + EReference IMPORTS_TYPE__IMPORTS = eINSTANCE.getIMPORTSType_IMPORTS(); + /** * The meta object literal for the '{@link org.talend.designer.core.model.utils.emf.component.impl.IMPORTTypeImpl IMPORT Type}' class. * @@ -5949,6 +6025,14 @@ public interface ComponentPackage extends EPackage { */ EAttribute IMPORT_TYPE__MRREQUIRED = eINSTANCE.getIMPORTType_MRREQUIRED(); + /** + * The meta object literal for the 'MODULEGROUP' attribute feature. + * + * + * @generated + */ + EAttribute IMPORT_TYPE__MODULEGROUP = eINSTANCE.getIMPORTType_MODULEGROUP(); + /** * The meta object literal for the 'Bundle ID' attribute feature. * diff --git a/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/IMPORTSType.java b/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/IMPORTSType.java index 33060dad9c..094c47070a 100644 --- a/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/IMPORTSType.java +++ b/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/IMPORTSType.java @@ -17,7 +17,9 @@ import org.eclipse.emf.ecore.EObject; *

* The following features are supported: *

    + *
  • {@link org.talend.designer.core.model.utils.emf.component.IMPORTSType#getREQUIREDIF REQUIREDIF}
  • *
  • {@link org.talend.designer.core.model.utils.emf.component.IMPORTSType#getIMPORT IMPORT}
  • + *
  • {@link org.talend.designer.core.model.utils.emf.component.IMPORTSType#getIMPORTS IMPORTS}
  • *
*

* @@ -26,6 +28,32 @@ import org.eclipse.emf.ecore.EObject; * @generated */ public interface IMPORTSType extends EObject { + /** + * Returns the value of the 'REQUIREDIF' attribute. + * + *

+ * If the meaning of the 'REQUIREDIF' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'REQUIREDIF' attribute. + * @see #setREQUIREDIF(String) + * @see org.talend.designer.core.model.utils.emf.component.ComponentPackage#getIMPORTSType_REQUIREDIF() + * @model extendedMetaData="kind='attribute' name='REQUIRED_IF' namespace='##targetNamespace'" + * @generated + */ + String getREQUIREDIF(); + + /** + * Sets the value of the '{@link org.talend.designer.core.model.utils.emf.component.IMPORTSType#getREQUIREDIF REQUIREDIF}' attribute. + * + * + * @param value the new value of the 'REQUIREDIF' attribute. + * @see #getREQUIREDIF() + * @generated + */ + void setREQUIREDIF(String value); + /** * Returns the value of the 'IMPORT' containment reference list. * The list contents are of type {@link org.talend.designer.core.model.utils.emf.component.IMPORTType}. @@ -43,4 +71,21 @@ public interface IMPORTSType extends EObject { */ EList getIMPORT(); + /** + * Returns the value of the 'IMPORTS' containment reference list. + * The list contents are of type {@link org.talend.designer.core.model.utils.emf.component.IMPORTSType}. + * + *

+ * If the meaning of the 'IMPORTS' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'IMPORTS' containment reference list. + * @see org.talend.designer.core.model.utils.emf.component.ComponentPackage#getIMPORTSType_IMPORTS() + * @model type="org.talend.designer.core.model.utils.emf.component.IMPORTSType" containment="true" + * extendedMetaData="kind='element' name='IMPORTS' namespace='##targetNamespace'" + * @generated + */ + EList getIMPORTS(); + } // IMPORTSType \ No newline at end of file diff --git a/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/IMPORTType.java b/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/IMPORTType.java index 6b469dd4f1..4850568f36 100644 --- a/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/IMPORTType.java +++ b/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/IMPORTType.java @@ -29,6 +29,7 @@ import org.eclipse.emf.ecore.EObject; *
  • {@link org.talend.designer.core.model.utils.emf.component.IMPORTType#getUrlPath Url Path}
  • *
  • {@link org.talend.designer.core.model.utils.emf.component.IMPORTType#getREQUIREDIF REQUIREDIF}
  • *
  • {@link org.talend.designer.core.model.utils.emf.component.IMPORTType#isMRREQUIRED MRREQUIRED}
  • + *
  • {@link org.talend.designer.core.model.utils.emf.component.IMPORTType#getMODULEGROUP MODULEGROUP}
  • * *

    * @@ -341,6 +342,32 @@ public interface IMPORTType extends EObject { */ void setMRREQUIRED(boolean value); + /** + * Returns the value of the 'MODULEGROUP' attribute. + * + *

    + * If the meaning of the 'MODULEGROUP' attribute isn't clear, + * there really should be more of a description here... + *

    + * + * @return the value of the 'MODULEGROUP' attribute. + * @see #setMODULEGROUP(String) + * @see org.talend.designer.core.model.utils.emf.component.ComponentPackage#getIMPORTType_MODULEGROUP() + * @model extendedMetaData="kind='attribute' name='MODULE_GROUP' namespace='##targetNamespace'" + * @generated + */ + String getMODULEGROUP(); + + /** + * Sets the value of the '{@link org.talend.designer.core.model.utils.emf.component.IMPORTType#getMODULEGROUP MODULEGROUP}' attribute. + * + * + * @param value the new value of the 'MODULEGROUP' attribute. + * @see #getMODULEGROUP() + * @generated + */ + void setMODULEGROUP(String value); + /** * Returns the value of the 'Bundle ID' attribute. * diff --git a/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/impl/ComponentPackageImpl.java b/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/impl/ComponentPackageImpl.java index 4c560a6acd..49a7a0b4b7 100644 --- a/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/impl/ComponentPackageImpl.java +++ b/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/impl/ComponentPackageImpl.java @@ -1370,13 +1370,31 @@ public class ComponentPackageImpl extends EPackageImpl implements ComponentPacka return importsTypeEClass; } + /** + * + * + * @generated + */ + public EAttribute getIMPORTSType_REQUIREDIF() { + return (EAttribute)importsTypeEClass.getEStructuralFeatures().get(0); + } + /** * * * @generated */ public EReference getIMPORTSType_IMPORT() { - return (EReference)importsTypeEClass.getEStructuralFeatures().get(0); + return (EReference)importsTypeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getIMPORTSType_IMPORTS() { + return (EReference)importsTypeEClass.getEStructuralFeatures().get(2); } /** @@ -1478,6 +1496,15 @@ public class ComponentPackageImpl extends EPackageImpl implements ComponentPacka return (EAttribute)importTypeEClass.getEStructuralFeatures().get(10); } + /** + * + * + * @generated + */ + public EAttribute getIMPORTType_MODULEGROUP() { + return (EAttribute)importTypeEClass.getEStructuralFeatures().get(11); + } + /** * * @@ -2542,7 +2569,9 @@ public class ComponentPackageImpl extends EPackageImpl implements ComponentPacka createEAttribute(headerTypeEClass, HEADER_TYPE__SUPPORTS_DB_TYPE); importsTypeEClass = createEClass(IMPORTS_TYPE); + createEAttribute(importsTypeEClass, IMPORTS_TYPE__REQUIREDIF); createEReference(importsTypeEClass, IMPORTS_TYPE__IMPORT); + createEReference(importsTypeEClass, IMPORTS_TYPE__IMPORTS); importTypeEClass = createEClass(IMPORT_TYPE); createEReference(importTypeEClass, IMPORT_TYPE__INSTALL); @@ -2556,6 +2585,7 @@ public class ComponentPackageImpl extends EPackageImpl implements ComponentPacka createEAttribute(importTypeEClass, IMPORT_TYPE__URL_PATH); createEAttribute(importTypeEClass, IMPORT_TYPE__REQUIREDIF); createEAttribute(importTypeEClass, IMPORT_TYPE__MRREQUIRED); + createEAttribute(importTypeEClass, IMPORT_TYPE__MODULEGROUP); installTypeEClass = createEClass(INSTALL_TYPE); createEAttribute(installTypeEClass, INSTALL_TYPE__COMMAND); @@ -2831,7 +2861,9 @@ public class ComponentPackageImpl extends EPackageImpl implements ComponentPacka initEAttribute(getHEADERType_SUPPORTS_DB_TYPE(), theXMLTypePackage.getBoolean(), "sUPPORTS_DB_TYPE", "false", 0, 1, HEADERType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(importsTypeEClass, IMPORTSType.class, "IMPORTSType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getIMPORTSType_REQUIREDIF(), ecorePackage.getEString(), "rEQUIREDIF", null, 0, 1, IMPORTSType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getIMPORTSType_IMPORT(), this.getIMPORTType(), null, "iMPORT", null, 0, -1, IMPORTSType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getIMPORTSType_IMPORTS(), this.getIMPORTSType(), null, "iMPORTS", null, 0, -1, IMPORTSType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(importTypeEClass, IMPORTType.class, "IMPORTType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getIMPORTType_INSTALL(), this.getINSTALLType(), null, "iNSTALL", null, 0, -1, IMPORTType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); @@ -2845,6 +2877,7 @@ public class ComponentPackageImpl extends EPackageImpl implements ComponentPacka initEAttribute(getIMPORTType_UrlPath(), theXMLTypePackage.getString(), "urlPath", null, 0, 1, IMPORTType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getIMPORTType_REQUIREDIF(), ecorePackage.getEString(), "rEQUIREDIF", null, 0, 1, IMPORTType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getIMPORTType_MRREQUIRED(), theXMLTypePackage.getBoolean(), "mRREQUIRED", null, 0, 1, IMPORTType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getIMPORTType_MODULEGROUP(), ecorePackage.getEString(), "mODULEGROUP", null, 0, 1, IMPORTType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(installTypeEClass, INSTALLType.class, "INSTALLType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getINSTALLType_COMMAND(), theXMLTypePackage.getString(), "cOMMAND", null, 1, 1, INSTALLType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); @@ -3878,6 +3911,14 @@ public class ComponentPackageImpl extends EPackageImpl implements ComponentPacka "name", "IMPORTS_._type", "kind", "elementOnly" }); + addAnnotation + (getIMPORTSType_REQUIREDIF(), + source, + new String[] { + "kind", "attribute", + "name", "REQUIRED_IF", + "namespace", "##targetNamespace" + }); addAnnotation (getIMPORTSType_IMPORT(), source, @@ -3886,6 +3927,14 @@ public class ComponentPackageImpl extends EPackageImpl implements ComponentPacka "name", "IMPORT", "namespace", "##targetNamespace" }); + addAnnotation + (getIMPORTSType_IMPORTS(), + source, + new String[] { + "kind", "element", + "name", "IMPORTS", + "namespace", "##targetNamespace" + }); addAnnotation (importTypeEClass, source, @@ -3981,6 +4030,14 @@ public class ComponentPackageImpl extends EPackageImpl implements ComponentPacka "name", "MRREQUIRED", "namespace", "##targetNamespace" }); + addAnnotation + (getIMPORTType_MODULEGROUP(), + source, + new String[] { + "kind", "attribute", + "name", "MODULE_GROUP", + "namespace", "##targetNamespace" + }); addAnnotation (installTypeEClass, source, diff --git a/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/impl/IMPORTSTypeImpl.java b/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/impl/IMPORTSTypeImpl.java index 08a7abc3be..5292a2eef3 100644 --- a/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/impl/IMPORTSTypeImpl.java +++ b/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/impl/IMPORTSTypeImpl.java @@ -8,10 +8,12 @@ package org.talend.designer.core.model.utils.emf.component.impl; import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; @@ -26,13 +28,33 @@ import org.talend.designer.core.model.utils.emf.component.IMPORTType; *

    * The following features are implemented: *

      + *
    • {@link org.talend.designer.core.model.utils.emf.component.impl.IMPORTSTypeImpl#getREQUIREDIF REQUIREDIF}
    • *
    • {@link org.talend.designer.core.model.utils.emf.component.impl.IMPORTSTypeImpl#getIMPORT IMPORT}
    • + *
    • {@link org.talend.designer.core.model.utils.emf.component.impl.IMPORTSTypeImpl#getIMPORTS IMPORTS}
    • *
    *

    * * @generated */ public class IMPORTSTypeImpl extends EObjectImpl implements IMPORTSType { + /** + * The default value of the '{@link #getREQUIREDIF() REQUIREDIF}' attribute. + * + * + * @see #getREQUIREDIF() + * @generated + * @ordered + */ + protected static final String REQUIREDIF_EDEFAULT = null; + /** + * The cached value of the '{@link #getREQUIREDIF() REQUIREDIF}' attribute. + * + * + * @see #getREQUIREDIF() + * @generated + * @ordered + */ + protected String rEQUIREDIF = REQUIREDIF_EDEFAULT; /** * The cached value of the '{@link #getIMPORT() IMPORT}' containment reference list. * @@ -43,6 +65,16 @@ public class IMPORTSTypeImpl extends EObjectImpl implements IMPORTSType { */ protected EList iMPORT; + /** + * The cached value of the '{@link #getIMPORTS() IMPORTS}' containment reference list. + * + * + * @see #getIMPORTS() + * @generated + * @ordered + */ + protected EList iMPORTS; + /** * * @@ -62,6 +94,27 @@ public class IMPORTSTypeImpl extends EObjectImpl implements IMPORTSType { return ComponentPackage.Literals.IMPORTS_TYPE; } + /** + * + * + * @generated + */ + public String getREQUIREDIF() { + return rEQUIREDIF; + } + + /** + * + * + * @generated + */ + public void setREQUIREDIF(String newREQUIREDIF) { + String oldREQUIREDIF = rEQUIREDIF; + rEQUIREDIF = newREQUIREDIF; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.IMPORTS_TYPE__REQUIREDIF, oldREQUIREDIF, rEQUIREDIF)); + } + /** * * @@ -74,6 +127,18 @@ public class IMPORTSTypeImpl extends EObjectImpl implements IMPORTSType { return iMPORT; } + /** + * + * + * @generated + */ + public EList getIMPORTS() { + if (iMPORTS == null) { + iMPORTS = new EObjectContainmentEList(IMPORTSType.class, this, ComponentPackage.IMPORTS_TYPE__IMPORTS); + } + return iMPORTS; + } + /** * * @@ -84,6 +149,8 @@ public class IMPORTSTypeImpl extends EObjectImpl implements IMPORTSType { switch (featureID) { case ComponentPackage.IMPORTS_TYPE__IMPORT: return ((InternalEList)getIMPORT()).basicRemove(otherEnd, msgs); + case ComponentPackage.IMPORTS_TYPE__IMPORTS: + return ((InternalEList)getIMPORTS()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -96,8 +163,12 @@ public class IMPORTSTypeImpl extends EObjectImpl implements IMPORTSType { @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { + case ComponentPackage.IMPORTS_TYPE__REQUIREDIF: + return getREQUIREDIF(); case ComponentPackage.IMPORTS_TYPE__IMPORT: return getIMPORT(); + case ComponentPackage.IMPORTS_TYPE__IMPORTS: + return getIMPORTS(); } return super.eGet(featureID, resolve, coreType); } @@ -111,10 +182,17 @@ public class IMPORTSTypeImpl extends EObjectImpl implements IMPORTSType { @Override public void eSet(int featureID, Object newValue) { switch (featureID) { + case ComponentPackage.IMPORTS_TYPE__REQUIREDIF: + setREQUIREDIF((String)newValue); + return; case ComponentPackage.IMPORTS_TYPE__IMPORT: getIMPORT().clear(); getIMPORT().addAll((Collection)newValue); return; + case ComponentPackage.IMPORTS_TYPE__IMPORTS: + getIMPORTS().clear(); + getIMPORTS().addAll((Collection)newValue); + return; } super.eSet(featureID, newValue); } @@ -127,9 +205,15 @@ public class IMPORTSTypeImpl extends EObjectImpl implements IMPORTSType { @Override public void eUnset(int featureID) { switch (featureID) { + case ComponentPackage.IMPORTS_TYPE__REQUIREDIF: + setREQUIREDIF(REQUIREDIF_EDEFAULT); + return; case ComponentPackage.IMPORTS_TYPE__IMPORT: getIMPORT().clear(); return; + case ComponentPackage.IMPORTS_TYPE__IMPORTS: + getIMPORTS().clear(); + return; } super.eUnset(featureID); } @@ -142,10 +226,29 @@ public class IMPORTSTypeImpl extends EObjectImpl implements IMPORTSType { @Override public boolean eIsSet(int featureID) { switch (featureID) { + case ComponentPackage.IMPORTS_TYPE__REQUIREDIF: + return REQUIREDIF_EDEFAULT == null ? rEQUIREDIF != null : !REQUIREDIF_EDEFAULT.equals(rEQUIREDIF); case ComponentPackage.IMPORTS_TYPE__IMPORT: return iMPORT != null && !iMPORT.isEmpty(); + case ComponentPackage.IMPORTS_TYPE__IMPORTS: + return iMPORTS != null && !iMPORTS.isEmpty(); } return super.eIsSet(featureID); } + /** + * + * + * @generated + */ + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (rEQUIREDIF: "); + result.append(rEQUIREDIF); + result.append(')'); + return result.toString(); + } + } //IMPORTSTypeImpl \ No newline at end of file diff --git a/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/impl/IMPORTTypeImpl.java b/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/impl/IMPORTTypeImpl.java index 59d1854e74..9531200fb2 100644 --- a/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/impl/IMPORTTypeImpl.java +++ b/org.talend.model/src/main/java/org/talend/designer/core/model/utils/emf/component/impl/IMPORTTypeImpl.java @@ -45,6 +45,7 @@ import org.talend.designer.core.model.utils.emf.component.INSTALLType; *
  • {@link org.talend.designer.core.model.utils.emf.component.impl.IMPORTTypeImpl#getUrlPath Url Path}
  • *
  • {@link org.talend.designer.core.model.utils.emf.component.impl.IMPORTTypeImpl#getREQUIREDIF REQUIREDIF}
  • *
  • {@link org.talend.designer.core.model.utils.emf.component.impl.IMPORTTypeImpl#isMRREQUIRED MRREQUIRED}
  • + *
  • {@link org.talend.designer.core.model.utils.emf.component.impl.IMPORTTypeImpl#getMODULEGROUP MODULEGROUP}
  • * *

    * @@ -269,6 +270,26 @@ public class IMPORTTypeImpl extends EObjectImpl implements IMPORTType { */ protected boolean mRREQUIRED = MRREQUIRED_EDEFAULT; + /** + * The default value of the '{@link #getMODULEGROUP() MODULEGROUP}' attribute. + * + * + * @see #getMODULEGROUP() + * @generated + * @ordered + */ + protected static final String MODULEGROUP_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMODULEGROUP() MODULEGROUP}' attribute. + * + * + * @see #getMODULEGROUP() + * @generated + * @ordered + */ + protected String mODULEGROUP = MODULEGROUP_EDEFAULT; + /** * * @@ -530,6 +551,27 @@ public class IMPORTTypeImpl extends EObjectImpl implements IMPORTType { eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.IMPORT_TYPE__MRREQUIRED, oldMRREQUIRED, mRREQUIRED)); } + /** + * + * + * @generated + */ + public String getMODULEGROUP() { + return mODULEGROUP; + } + + /** + * + * + * @generated + */ + public void setMODULEGROUP(String newMODULEGROUP) { + String oldMODULEGROUP = mODULEGROUP; + mODULEGROUP = newMODULEGROUP; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.IMPORT_TYPE__MODULEGROUP, oldMODULEGROUP, mODULEGROUP)); + } + /** * * @@ -595,6 +637,8 @@ public class IMPORTTypeImpl extends EObjectImpl implements IMPORTType { return getREQUIREDIF(); case ComponentPackage.IMPORT_TYPE__MRREQUIRED: return isMRREQUIRED() ? Boolean.TRUE : Boolean.FALSE; + case ComponentPackage.IMPORT_TYPE__MODULEGROUP: + return getMODULEGROUP(); } return super.eGet(featureID, resolve, coreType); } @@ -643,6 +687,9 @@ public class IMPORTTypeImpl extends EObjectImpl implements IMPORTType { case ComponentPackage.IMPORT_TYPE__MRREQUIRED: setMRREQUIRED(((Boolean)newValue).booleanValue()); return; + case ComponentPackage.IMPORT_TYPE__MODULEGROUP: + setMODULEGROUP((String)newValue); + return; } super.eSet(featureID, newValue); } @@ -688,6 +735,9 @@ public class IMPORTTypeImpl extends EObjectImpl implements IMPORTType { case ComponentPackage.IMPORT_TYPE__MRREQUIRED: setMRREQUIRED(MRREQUIRED_EDEFAULT); return; + case ComponentPackage.IMPORT_TYPE__MODULEGROUP: + setMODULEGROUP(MODULEGROUP_EDEFAULT); + return; } super.eUnset(featureID); } @@ -722,6 +772,8 @@ public class IMPORTTypeImpl extends EObjectImpl implements IMPORTType { return REQUIREDIF_EDEFAULT == null ? rEQUIREDIF != null : !REQUIREDIF_EDEFAULT.equals(rEQUIREDIF); case ComponentPackage.IMPORT_TYPE__MRREQUIRED: return mRREQUIRED != MRREQUIRED_EDEFAULT; + case ComponentPackage.IMPORT_TYPE__MODULEGROUP: + return MODULEGROUP_EDEFAULT == null ? mODULEGROUP != null : !MODULEGROUP_EDEFAULT.equals(mODULEGROUP); } return super.eIsSet(featureID); } @@ -756,6 +808,8 @@ public class IMPORTTypeImpl extends EObjectImpl implements IMPORTType { result.append(rEQUIREDIF); result.append(", mRREQUIRED: "); result.append(mRREQUIRED); + result.append(", mODULEGROUP: "); + result.append(mODULEGROUP); result.append(')'); return result.toString(); }