public static Collection<ApplicationModule> makeModules ( final org.eclipse.scada.configuration.infrastructure.World world, final org.eclipse.scada.configuration.infrastructure.EquinoxBase app, final EquinoxApplication implApp ) { final Collection<ApplicationModule> result = new LinkedList<> (); // process application configurations result.addAll ( EcoreUtil.copyAll ( world.getApplicationConfigurations () ) ); ExclusiveGroups.removeGroups ( result, app.getConfigurations () ); result.addAll ( EcoreUtil.copyAll ( app.getConfigurations () ) ); final List<Module> modules = new ArrayList<> (); // process infrastructure configuration final org.eclipse.scada.configuration.infrastructure.ApplicationConfiguration cfg = app.getConfiguration (); // TODO: add a default configuration if ( cfg != null ) { // add configurations ExclusiveGroups.removeGroups ( result, cfg.getConfigurations () ); result.addAll ( EcoreUtil.copyAll ( cfg.getConfigurations () ) ); // process modules modules.addAll ( cfg.getModules () ); } // process direct modules ExclusiveGroups.removeGroups ( result, app.getModules () ); modules.addAll ( app.getModules () ); processModules ( app, implApp, result, modules ); // final check is done in the target model return result; // we don't copy here, since the module handlers might have created actual objects }
/** * This returns the label styled text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object getStyledText ( Object object ) { String label = ( (ApplicationConfiguration)object ).getName (); StyledString styledLabel = new StyledString (); if ( label == null || label.length () == 0 ) { styledLabel.append ( getString ( "_UI_ApplicationConfiguration_type" ), StyledString.Style.QUALIFIER_STYLER ); //$NON-NLS-1$ } else { styledLabel.append ( getString ( "_UI_ApplicationConfiguration_type" ), StyledString.Style.QUALIFIER_STYLER ).append ( " " + label ); //$NON-NLS-1$ //$NON-NLS-2$ } return styledLabel; }
/** * This returns the label styled text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object getStyledText ( Object object ) { String label = ( (ApplicationConfiguration)object ).getName (); StyledString styledLabel = new StyledString (); if ( label == null || label.length () == 0 ) { styledLabel.append ( getString ( "_UI_ApplicationConfiguration_type" ), StyledString.Style.QUALIFIER_STYLER ); //$NON-NLS-1$ } else { styledLabel.append ( getString ( "_UI_ApplicationConfiguration_type" ), StyledString.Style.QUALIFIER_STYLER ).append ( " " + label ); //$NON-NLS-1$ //$NON-NLS-2$ } return styledLabel; }