예제 #1
0
 private Language createLanguage() {
   LanguageDescriptor d = new LanguageDescriptor();
   String uuid = UUID.randomUUID().toString();
   d.setNamespace(uuid);
   d.setId(ModuleId.fromString(uuid));
   return TestLanguage.newInstance(d, OWNER);
 }
 protected Solution addSolution(String name, VirtualFile[] roots) {
   SolutionDescriptor sd = new SolutionDescriptor();
   sd.setNamespace(name);
   sd.setId(ModuleId.foreign(name));
   addModelRoots(sd, roots);
   return StubSolution.newInstance(sd, this);
 }
예제 #3
0
 private Solution createSolution() {
   SolutionDescriptor d = new SolutionDescriptor();
   String uuid = UUID.randomUUID().toString();
   d.setNamespace(uuid);
   d.setId(ModuleId.fromString(uuid));
   return StubSolution.newInstance(d, OWNER);
 }
 protected void removeSolution(String name) {
   ModuleReference ref = new ModuleReference(null, ModuleId.foreign(name));
   MPSModuleRepository repository = MPSModuleRepository.getInstance();
   IModule m = ModuleRepositoryFacade.getInstance().getModule(ref);
   if (m == null) {
     return;
   }
   repository.unregisterModule(m, this);
 }