/** * This creates a new child for * {@link org.eclipse.jst.j2ee.internal.internal.application.command.CreateChildCommand}. */ public Object createChild(Object object) { // TODO: check that this is what you want. Module child = org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin.getPlugin().getApplicationFactory().createModule(); // TODO: initialize child here... return child; }
public EObject createEMFObject(String nodeName, String readAheadName) { ApplicationFactory fact = ApplicationFactory.eINSTANCE; if (EJB.equals(readAheadName)) return fact.createEjbModule(); else if (WEB.equals(readAheadName)) return fact.createWebModule(); else if (JAVA.equals(readAheadName)) return fact.createJavaClientModule(); else if (CONNECTOR.equals(readAheadName)) return fact.createConnectorModule(); else return fact.createModule(); }
/** * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s * describing all of the children that can be created under this object. <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add(createChildParameter(ApplicationPackage.eINSTANCE.getApplication_SecurityRoles(), CommonFactory.eINSTANCE.createSecurityRole())); newChildDescriptors.add(createChildParameter(ApplicationPackage.eINSTANCE.getApplication_Modules(), ApplicationFactory.eINSTANCE.createModule())); newChildDescriptors.add(createChildParameter(ApplicationPackage.eINSTANCE.getApplication_Modules(), ApplicationFactory.eINSTANCE.createWebModule())); newChildDescriptors.add(createChildParameter(ApplicationPackage.eINSTANCE.getApplication_Modules(), ApplicationFactory.eINSTANCE.createJavaClientModule())); newChildDescriptors.add(createChildParameter(ApplicationPackage.eINSTANCE.getApplication_Modules(), ApplicationFactory.eINSTANCE.createEjbModule())); newChildDescriptors.add(createChildParameter(ApplicationPackage.eINSTANCE.getApplication_Modules(), ApplicationFactory.eINSTANCE.createConnectorModule())); }