Skip to content
Snippets Groups Projects
Commit 4f138526 authored by Simon Spinner's avatar Simon Spinner
Browse files

Remove obsolete code.

parent 85a4cc27
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,6 @@ import tools.descartes.prisma.core.impl.CDOModelRepository;
import tools.descartes.prisma.model.scope.DelegatedObject;
import tools.descartes.prisma.model.scope.ScopeConfiguration;
import tools.descartes.prisma.model.skeleton.ModelSkeleton;
import tools.descartes.prisma.model.skeleton.SkeletonFactory;
public class GenericAgent implements IApplication {
......@@ -132,61 +131,6 @@ public class GenericAgent implements IApplication {
}
private void loadTemplates(GenericAgentController agent, String[] files, String delegationModel) {
ModelSkeleton skeleton = SkeletonFactory.eINSTANCE.createModelSkeleton();
// Set<EObject> roots = new HashSet<>();
// ResourceSet set = new ResourceSetImpl();
// // IMPORTANT: Always provide full paths to EMF so that
// cross-references
// // are resolved correctly.
// for (String currentFile : files) {
// Resource res = set.getResource(URI.createFileURI(new
// File(currentFile).getAbsolutePath()), true);
// roots.add(res.getContents().get(0));
// }
//
// // Initialize the delegation settings of the agent
// if (delegationModel != null) {
// Resource res = set.getResource(URI.createFileURI(new
// File(delegationModel).getAbsolutePath()), true);
// final DelegatedElementRepository delegationRepository =
// (DelegatedElementRepository) res.getContents()
// .get(0);
// DelegationProvider provider = new
// GenericDelegationProvider(delegationRepository);
// agent.setDelegationProvider(provider);
// }
//
// // IMPORTANT: Resolve all proxy references
// EcoreUtil.resolveAll(set);
// Map<EObject, Collection<Setting>> unresolved =
// EcoreUtil.UnresolvedProxyCrossReferencer.find(set);
// for (EObject problemObject : unresolved.keySet()) {
// Collection<Setting> unresolvedSettings =
// unresolved.get(problemObject);
// for (Setting curSetting : unresolvedSettings) {
// System.out.println("Unresolved proxy: " +
// curSetting.getEStructuralFeature());
// }
// }
//
// // Make a copy of all loaded elements
// EcoreUtil.Copier copier = new EcoreUtil.Copier();
// Collection<EObject> copiedRoots = copier.copyAll(roots);
// copier.copyReferences();
//
// // Now integrate the copies into the model skeleton
// for (EObject curRoot : copiedRoots) {
// integrateIntoSkeleton(skeleton, curRoot);
// }
//
// replacePublicResources(agent, skeleton);
//
// // Store skeleton into repository
// agent.apply(skeleton);
}
private GenericAgentConfiguration loadConfiguration(String configurationPath) {
ResourceSet set = new ResourceSetImpl();
Resource res = set.getResource(URI.createFileURI(new File(configurationPath).getAbsolutePath()), true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment