@NotNull
 @Override
 public Module createModule(@NotNull ModifiableModuleModel moduleModel)
     throws InvalidDataException, IOException, ModuleWithNameAlreadyExists, JDOMException,
         ConfigurationException {
   final String path = getContentEntryPath();
   unzip(path, true);
   Module module = ImportImlMode.setUpLoader(getModuleFilePath()).createModule(moduleModel);
   if (myProjectMode) {
     moduleModel.renameModule(module, module.getProject().getName());
   }
   return module;
 }
Пример #2
0
 @Override
 public void setDisplayName(String name) {
   name = name.trim();
   final ModifiableModuleModel modifiableModuleModel = myConfigurator.getModuleModel();
   if (StringUtil.isEmpty(name)) return; // empty string comes on double click on module node
   if (Comparing.strEqual(name, myModuleName)) return; // nothing changed
   try {
     modifiableModuleModel.renameModule(myModule, name);
   } catch (ModuleWithNameAlreadyExistsException ignored) {
   }
   myConfigurator.moduleRenamed(myModule, myModuleName, name);
   myModuleName = name;
   myConfigurator.setModified(!Comparing.strEqual(myModuleName, myModule.getName()));
   myContext.getDaemonAnalyzer().queueUpdateForAllElementsWithErrors();
 }