/** * Remove all exclusive objects that are in the one group from the other * * @param objects * the object from which objects will be removed * @param sourceObjects * the source of the exclusive group objects */ public static void removeGroups ( final Collection<? extends EObject> objects, final Collection<? extends EObject> sourceObjects ) { removeGroups ( objects, makeGroupIds ( sourceObjects ) ); }
/** * Remove all exclusive objects that are in the one group from the other * * @param objects * the object from which objects will be removed * @param sourceObjects * the source of the exclusive group objects */ public static void removeGroups ( final Collection<? extends EObject> objects, final Collection<? extends EObject> sourceObjects ) { removeGroups ( objects, makeGroupIds ( sourceObjects ) ); }
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 }