public static void addStartBundle ( final Profile profile, final String name ) { if ( name == null ) { // no name return; } for ( final StartBundle bundle : profile.getStart () ) { if ( name.equals ( bundle.getName () ) ) { // already added return; } } final StartBundle sb = ProfileFactory.eINSTANCE.createStartBundle (); sb.setName ( name ); profile.getStart ().add ( sb ); }
public static void addStartBundle ( final Profile profile, final String name ) { if ( name == null ) { // no name return; } for ( final StartBundle bundle : profile.getStart () ) { if ( name.equals ( bundle.getName () ) ) { // already added return; } } final StartBundle sb = ProfileFactory.eINSTANCE.createStartBundle (); sb.setName ( name ); profile.getStart ().add ( sb ); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void collectNewChildDescriptors ( Collection<Object> newChildDescriptors, Object object ) { super.collectNewChildDescriptors ( newChildDescriptors, object ); newChildDescriptors.add ( createChildParameter ( ProfilePackage.Literals.PROFILE__START, ProfileFactory.eINSTANCE.createStartBundle () ) ); newChildDescriptors.add ( createChildParameter ( ProfilePackage.Literals.PROFILE__SETBSL, ProfileFactory.eINSTANCE.createBundleStartLevel () ) ); newChildDescriptors.add ( createChildParameter ( ProfilePackage.Literals.PROFILE__PROPERTY, ProfileFactory.eINSTANCE.createSystemProperty () ) ); newChildDescriptors.add ( createChildParameter ( ProfilePackage.Literals.PROFILE__PROFILE, ProfileFactory.eINSTANCE.createSubProfile () ) ); }