Java 类com.intellij.util.text.UniqueNameGenerator 实例源码

项目:intellij-ce-playground    文件:MigrationMapSet.java   
public void saveMaps() throws IOException{
  File dir = getMapDirectory();
  if (dir == null) {
    return;
  }

  File[] files = getMapFiles();

  @NonNls String[] filePaths = new String[myMaps.size()];
  Document[] documents = new Document[myMaps.size()];

  UniqueNameGenerator namesProvider = new UniqueNameGenerator();
  for(int i = 0; i < myMaps.size(); i++){
    MigrationMap map = myMaps.get(i);

    filePaths[i] = dir + File.separator + namesProvider.generateUniqueName(FileUtil.sanitizeFileName(map.getName(), false)) + ".xml";
    documents[i] = saveMap(map);
  }

  JDOMUtil.updateFileSet(files, filePaths, documents, CodeStyleSettingsManager.getSettings(null).getLineSeparator());
}
项目:intellij-ce-playground    文件:RemoteServerListConfigurable.java   
@Override
public void actionPerformed(AnActionEvent e) {
  String name = UniqueNameGenerator.generateUniqueName(myServerType.getPresentableName(), new Condition<String>() {
    @Override
    public boolean value(String s) {
      for (NamedConfigurable<RemoteServer<?>> configurable : getConfiguredServers()) {
        if (configurable.getDisplayName().equals(s)) {
          return false;
        }
      }
      return true;
    }
  });
  MyNode node = addServerNode(myServersManager.createServer(myServerType, name), true);
  selectNodeInTree(node);
}
项目:intellij-ce-playground    文件:FacetBasedDetectedFrameworkDescription.java   
protected void doSetup(ModifiableModelsProvider modifiableModelsProvider, final Module module) {
  final ModifiableFacetModel model = modifiableModelsProvider.getFacetModifiableModel(module);
  final String name = UniqueNameGenerator.generateUniqueName(myFacetType.getDefaultFacetName(), new Condition<String>() {
    @Override
    public boolean value(String s) {
      return FacetManager.getInstance(module).findFacet(myFacetType.getId(), s) == null;
    }
  });
  final F facet = FacetManager.getInstance(module).createFacet(myFacetType, name, myConfiguration,
                                                               findUnderlyingFacet(module));
  model.addFacet(facet);
  modifiableModelsProvider.commitFacetModifiableModel(module, model);
  final ModifiableRootModel rootModel = modifiableModelsProvider.getModuleModifiableModel(module);
  myDetector.setupFacet(facet, rootModel);
  modifiableModelsProvider.commitModuleModifiableModel(rootModel);
}
项目:tools-idea    文件:RemoteServerListConfigurable.java   
@Override
public void actionPerformed(AnActionEvent e) {
  String name = UniqueNameGenerator.generateUniqueName(myServerType.getPresentableName(), new Condition<String>() {
    @Override
    public boolean value(String s) {
      for (NamedConfigurable<RemoteServer<?>> configurable : getConfiguredServers()) {
        if (configurable.getDisplayName().equals(s)) {
          return false;
        }
      }
      return true;
    }
  });
  MyNode node = addServerNode(myServersManager.createServer(myServerType, name), true);
  selectNodeInTree(node);
}
项目:tools-idea    文件:FacetBasedDetectedFrameworkDescription.java   
protected void doSetup(ModifiableModelsProvider modifiableModelsProvider, final Module module) {
  final ModifiableFacetModel model = modifiableModelsProvider.getFacetModifiableModel(module);
  final String name = UniqueNameGenerator.generateUniqueName(myFacetType.getDefaultFacetName(), new Condition<String>() {
    @Override
    public boolean value(String s) {
      return FacetManager.getInstance(module).findFacet(myFacetType.getId(), s) == null;
    }
  });
  final F facet = FacetManager.getInstance(module).createFacet(myFacetType, name, myConfiguration,
                                                               findUnderlyingFacet(module));
  model.addFacet(facet);
  modifiableModelsProvider.commitFacetModifiableModel(module, model);
  final ModifiableRootModel rootModel = modifiableModelsProvider.getModuleModifiableModel(module);
  myDetector.setupFacet(facet, rootModel);
  modifiableModelsProvider.commitModuleModifiableModel(rootModel);
}
项目:consulo    文件:RemoteServerListConfigurable.java   
@Override
public void actionPerformed(AnActionEvent e) {
  String name = UniqueNameGenerator.generateUniqueName(myServerType.getPresentableName(), new Condition<String>() {
    @Override
    public boolean value(String s) {
      for (NamedConfigurable<RemoteServer<?>> configurable : getConfiguredServers()) {
        if (configurable.getDisplayName().equals(s)) {
          return false;
        }
      }
      return true;
    }
  });
  MyNode node = addServerNode(myServersManager.createServer(myServerType, name), true);
  selectNodeInTree(node);
}
项目:consulo    文件:SchemesManagerImpl.java   
@Nonnull
private String checkFileNameIsFree(@Nonnull String subPath, @Nonnull String schemeName) {
  for (Named scheme : mySchemes) {
    if (scheme instanceof ExternalizableScheme) {
      String name = ((ExternalizableScheme)scheme).getExternalInfo().getCurrentFileName();
      if (name != null &&
          !schemeName.equals(scheme.getName()) &&
          subPath.length() == (name.length() + mySchemeExtension.length()) &&
          subPath.startsWith(name) &&
          subPath.endsWith(mySchemeExtension)) {
        return UniqueNameGenerator.generateUniqueName(FileUtil.sanitizeName(schemeName), collectAllFileNames());
      }
    }
  }
  return subPath;
}
项目:consulo    文件:AbstractSchemesManager.java   
@Override
public void addNewScheme(@Nonnull T scheme, boolean replaceExisting) {
  int toReplace = -1;
  for (int i = 0; i < mySchemes.size(); i++) {
    T existingScheme = mySchemes.get(i);
    if (existingScheme.getName().equals(scheme.getName())) {
      toReplace = i;
      break;
    }
  }
  if (toReplace == -1) {
    mySchemes.add(scheme);
  }
  else if (replaceExisting || !(scheme instanceof ExternalizableScheme)) {
    mySchemes.set(toReplace, scheme);
  }
  else {
    //noinspection unchecked
    renameScheme((ExternalizableScheme)scheme, UniqueNameGenerator.generateUniqueName(scheme.getName(), collectExistingNames(mySchemes)));
    mySchemes.add(scheme);
  }
  schemeAdded(scheme);
  checkCurrentScheme(scheme);
}
项目:intellij-ce-playground    文件:GenerateMembersUtil.java   
public static PsiParameter[] overriddenParameters(PsiParameter[] parameters,
                                                  @NotNull JVMElementFactory factory,
                                                  @NotNull JavaCodeStyleManager codeStyleManager,
                                                  @NotNull PsiSubstitutor substitutor,
                                                  PsiElement target) {
  PsiParameter[] result = new PsiParameter[parameters.length];
  UniqueNameGenerator generator = new UniqueNameGenerator();

  for (int i = 0; i < parameters.length; i++) {
    PsiParameter parameter = parameters[i];
    final PsiType parameterType = parameter.getType();
    final PsiType substituted = substituteType(substitutor, parameterType, (PsiMethod)parameter.getDeclarationScope());
    String paramName = parameter.getName();
    boolean isBaseNameGenerated = true;
    final boolean isSubstituted = substituted.equals(parameterType);
    if (!isSubstituted && isBaseNameGenerated(codeStyleManager, TypeConversionUtil.erasure(parameterType), paramName)) {
      isBaseNameGenerated = false;
    }

    if (paramName == null ||
        isBaseNameGenerated && !isSubstituted && isBaseNameGenerated(codeStyleManager, parameterType, paramName) ||
        !factory.isValidParameterName(paramName)) {
      String[] names = codeStyleManager.suggestVariableName(VariableKind.PARAMETER, null, null, substituted).names;
      if (names.length > 0) {
        paramName = generator.generateUniqueName(names[0]);
      }
      else {
        paramName = generator.generateUniqueName("p");
      }
    }
    else if (!generator.value(paramName)) {
      paramName = generator.generateUniqueName(paramName);
    }
    generator.addExistingName(paramName);
    result[i] = factory.createParameter(paramName, substituted, target);
  }
  return result;
}
项目:intellij-ce-playground    文件:LibrariesContainerFactory.java   
private static String getUniqueLibraryName(final String baseName, final LibraryTable.ModifiableModel model) {
  return UniqueNameGenerator.generateUniqueName(baseName, "", "", " (", ")", new Condition<String>() {
    @Override
    public boolean value(String s) {
      return model.getLibraryByName(s) == null;
    }
  });
}
项目:intellij-ce-playground    文件:MainConfigurationStateSplitter.java   
@Override
public final List<Pair<Element, String>> splitState(@NotNull Element state) {
  UniqueNameGenerator generator = new UniqueNameGenerator();
  List<Pair<Element, String>> result = new SmartList<Pair<Element, String>>();
  for (Iterator<Element> iterator = state.getChildren(getSubStateTagName()).iterator(); iterator.hasNext(); ) {
    Element element = iterator.next();
    iterator.remove();
    result.add(createItem(getSubStateFileName(element), generator, element));
  }
  if (!JDOMUtil.isEmpty(state)) {
    result.add(createItem(getComponentStateFileName(), generator, state));
  }
  return result;
}
项目:intellij-ce-playground    文件:StateSplitterEx.java   
@NotNull
protected static List<Pair<Element, String>> splitState(@NotNull Element state, @NotNull String attributeName) {
  UniqueNameGenerator generator = new UniqueNameGenerator();
  List<Pair<Element, String>> result = new SmartList<Pair<Element, String>>();
  for (Element subState : state.getChildren()) {
    result.add(createItem(generator, subState, attributeName));
  }
  return result;
}
项目:intellij-ce-playground    文件:CloudConfigurableBase.java   
private String generateServerName() {
  return UniqueNameGenerator.generateUniqueName(myCloudType.getPresentableName(), new Condition<String>() {

    @Override
    public boolean value(String s) {
      for (RemoteServer<?> server : RemoteServersManager.getInstance().getServers()) {
        if (server.getName().equals(s)) {
          return false;
        }
      }
      return true;
    }
  });
}
项目:intellij-ce-playground    文件:CloudAccountSelectionEditor.java   
private static String generateServerName(ServerType<?> cloudType) {
  return UniqueNameGenerator.generateUniqueName(cloudType.getPresentableName(), new Condition<String>() {

    @Override
    public boolean value(String s) {
      for (RemoteServer<?> server : RemoteServersManager.getInstance().getServers()) {
        if (server.getName().equals(s)) {
          return false;
        }
      }
      return true;
    }
  });
}
项目:intellij-ce-playground    文件:SaveSchemeDialog.java   
public SaveSchemeDialog(@NotNull Component parent, String title, @NotNull List<String> existingNames, @NotNull String selectedName) {
  super(parent, false);
  myExistingNames = existingNames;
  setTitle(title);
  mySchemeName.setText(UniqueNameGenerator.generateUniqueName(selectedName + " copy", existingNames));
  init();
}
项目:intellij-ce-playground    文件:ShelveChangesManager.java   
@NotNull
private File generateUniqueSchemePatchDir(@NotNull final String defaultName, boolean createResourceDirectory) {
  ignoreShelfDirectoryIfFirstShelf();
  String uniqueName = UniqueNameGenerator
    .generateUniqueName(shortenAndSanitize(defaultName), mySchemeManager.getAllSchemeNames());
  File dir = new File(myFileProcessor.getBaseDir(), uniqueName);
  if (createResourceDirectory && !dir.exists()) {
    //noinspection ResultOfMethodCallIgnored
    dir.mkdirs();
  }
  return dir;
}
项目:intellij    文件:ExportRunConfigurationTableModel.java   
ExportRunConfigurationTableModel(List<RunConfiguration> configurations) {
  enabled = new Boolean[configurations.size()];
  names = new String[configurations.size()];
  paths = new String[configurations.size()];

  UniqueNameGenerator nameGenerator = new UniqueNameGenerator();
  for (int i = 0; i < configurations.size(); i++) {
    RunConfiguration config = configurations.get(i);
    enabled[i] = false;
    names[i] = config.getName();
    paths[i] =
        nameGenerator.generateUniqueName(FileUtil.sanitizeFileName(config.getName()), "", ".xml");
  }
}
项目:FileTemplatesVariable    文件:PerProjectTemplateManager.java   
@Override
public List<Pair<Element, String>> splitState(Element e) {
    final UniqueNameGenerator generator = new UniqueNameGenerator();
    final List<Pair<Element, String>> result = new ArrayList<Pair<Element, String>>();
    result.add(new Pair<Element, String>(e, generator.generateUniqueName("template_variable_settings") + ".xml"));
    return result;
}
项目:tools-idea    文件:GenerateMembersUtil.java   
private static void substituteParameters(@NotNull JVMElementFactory factory,
                                         @NotNull JavaCodeStyleManager codeStyleManager,
                                         @NotNull PsiParameterList sourceParameterList,
                                         @NotNull PsiParameterList targetParameterList,
                                         @NotNull PsiSubstitutor substitutor, PsiElement target) {
  PsiParameter[] parameters = sourceParameterList.getParameters();
  UniqueNameGenerator generator = new UniqueNameGenerator();

  for (PsiParameter parameter : parameters) {
    final PsiType parameterType = parameter.getType();
    final PsiType substituted = substituteType(substitutor, parameterType, (PsiMethod)parameter.getDeclarationScope());
    @NonNls String paramName = parameter.getName();
    boolean isBaseNameGenerated = true;
    final boolean isSubstituted = substituted.equals(parameterType);
    if (!isSubstituted && isBaseNameGenerated(codeStyleManager, TypeConversionUtil.erasure(parameterType), paramName)) {
      isBaseNameGenerated = false;
    }

    if (paramName == null ||
        isBaseNameGenerated && !isSubstituted && isBaseNameGenerated(codeStyleManager, parameterType, paramName) ||
        !factory.isValidParameterName(paramName)) {
      String[] names = codeStyleManager.suggestVariableName(VariableKind.PARAMETER, null, null, substituted).names;
      if (names.length > 0) {
        paramName = generator.generateUniqueName(names[0]);
      }
      else {
        paramName = generator.generateUniqueName("p");
      }
    }
    else if (!generator.value(paramName)) {
      paramName = generator.generateUniqueName(paramName);
    }
    generator.addExistingName(paramName);
    final PsiParameter newParameter = factory.createParameter(paramName, substituted, target);
    copyOrReplaceModifierList(parameter, newParameter);
    targetParameterList.add(newParameter);
  }
}
项目:tools-idea    文件:LibrariesContainerFactory.java   
private static String getUniqueLibraryName(final String baseName, final LibraryTable.ModifiableModel model) {
  return UniqueNameGenerator.generateUniqueName(baseName, "", "", " (", ")", new Condition<String>() {
    @Override
    public boolean value(String s) {
      return model.getLibraryByName(s) == null;
    }
  });
}
项目:tools-idea    文件:ArtifactManagerStateSplitter.java   
public List<Pair<Element, String>> splitState(Element e) {
  final UniqueNameGenerator generator = new UniqueNameGenerator();

  List<Pair<Element, String>> result = new ArrayList<Pair<Element, String>>();

  for (Element element : JDOMUtil.getElements(e)) {
    final String name = generator.generateUniqueName(FileUtil.sanitizeFileName(element.getAttributeValue(ArtifactState.NAME_ATTRIBUTE))) + ".xml";
    result.add(new Pair<Element, String>(element, name));
  }

  return result;
}
项目:tools-idea    文件:ProjectDictionarySplitter.java   
public List<Pair<Element, String>> splitState(Element e) {
  final UniqueNameGenerator generator = new UniqueNameGenerator();

  List<Pair<Element, String>> result = new ArrayList<Pair<Element, String>>();
  for (Element element : JDOMUtil.getElements(e)) {
    final String name = generator.generateUniqueName(FileUtil.sanitizeFileName(element.getAttributeValue(DictionaryState.NAME_ATTRIBUTE))) + ".xml";

    result.add(new Pair<Element, String>(element, name));
  }
  return result;
}
项目:tools-idea    文件:ProjectLibraryTable.java   
@Override
public List<Pair<Element, String>> splitState(Element e) {
  final UniqueNameGenerator generator = new UniqueNameGenerator();

  List<Pair<Element, String>> result = new ArrayList<Pair<Element, String>>();

  final List list = e.getChildren();
  for (final Object o : list) {
    Element library = (Element)o;
    @NonNls final String name = generator.generateUniqueName(FileUtil.sanitizeFileName(library.getAttributeValue(LibraryImpl.LIBRARY_NAME_ATTR))) + ".xml";
    result.add(new Pair<Element, String>(library, name));
  }

  return result;
}
项目:tools-idea    文件:ProjectRunConfigurationManager.java   
@Override
public List<Pair<Element, String>> splitState(Element e) {
  final UniqueNameGenerator generator = new UniqueNameGenerator();

  List<Pair<Element, String>> result = new ArrayList<Pair<Element, String>>();

  final List list = e.getChildren();
  for (final Object o : list) {
    Element library = (Element)o;
    final String name = generator.generateUniqueName(FileUtil.sanitizeFileName(library.getAttributeValue(RunManagerImpl.NAME_ATTR))) + ".xml";
    result.add(new Pair<Element, String>(library, name));
  }

  return result;
}
项目:consulo    文件:MainConfigurationStateSplitter.java   
@Override
public final List<Pair<Element, String>> splitState(@Nonnull Element state) {
  UniqueNameGenerator generator = new UniqueNameGenerator();
  List<Pair<Element, String>> result = new SmartList<Pair<Element, String>>();
  for (Iterator<Element> iterator = state.getChildren(getSubStateTagName()).iterator(); iterator.hasNext(); ) {
    Element element = iterator.next();
    iterator.remove();
    result.add(createItem(getSubStateFileName(element), generator, element));
  }
  if (!JDOMUtil.isEmpty(state)) {
    result.add(createItem(getComponentStateFileName(), generator, state));
  }
  return result;
}
项目:consulo    文件:StateSplitterEx.java   
@Nonnull
protected static List<Pair<Element, String>> splitState(@Nonnull Element state, @Nonnull String attributeName) {
  UniqueNameGenerator generator = new UniqueNameGenerator();
  List<Pair<Element, String>> result = new SmartList<Pair<Element, String>>();
  for (Element subState : state.getChildren()) {
    result.add(createItem(generator, subState, attributeName));
  }
  return result;
}
项目:consulo    文件:SaveSchemeDialog.java   
public SaveSchemeDialog(@Nonnull Component parent, String title, @Nonnull List<String> existingNames, @Nonnull String selectedName) {
  super(parent, false);
  myExistingNames = existingNames;
  setTitle(title);
  mySchemeName.setText(UniqueNameGenerator.generateUniqueName(selectedName + " copy", existingNames));
  init();
}
项目:consulo    文件:ShelveChangesManager.java   
@Nonnull
private File generateUniqueSchemePatchDir(@Nonnull final String defaultName, boolean createResourceDirectory) {
  ignoreShelfDirectoryIfFirstShelf();
  String uniqueName = UniqueNameGenerator.generateUniqueName(shortenAndSanitize(defaultName), mySchemeManager.getAllSchemeNames());
  File dir = new File(myFileProcessor.getBaseDir(), uniqueName);
  if (createResourceDirectory && !dir.exists()) {
    //noinspection ResultOfMethodCallIgnored
    dir.mkdirs();
  }
  return dir;
}
项目:consulo    文件:LibrariesContainerFactory.java   
private static String getUniqueLibraryName(final String baseName, final LibraryTable.ModifiableModel model) {
  return UniqueNameGenerator.generateUniqueName(baseName, "", "", " (", ")", new Condition<String>() {
    @Override
    public boolean value(String s) {
      return model.getLibraryByName(s) == null;
    }
  });
}
项目:consulo-java    文件:MigrationMapSet.java   
public void saveMaps() throws IOException
{
    File dir = getMapDirectory();
    if(dir == null)
    {
        return;
    }

    File[] files = getMapFiles(dir);

    @NonNls String[] filePaths = new String[myMaps.size()];
    Document[] documents = new Document[myMaps.size()];

    UniqueNameGenerator namesProvider = new UniqueNameGenerator();
    for(int i = 0; i < myMaps.size(); i++)
    {
        MigrationMap map = myMaps.get(i);

        filePaths[i] = dir + File.separator + namesProvider.generateUniqueName(map.getFileName()) + ".xml";
        documents[i] = saveMap(map);
    }

    JDOMUtil.updateFileSet(files, filePaths, documents, CodeStyleSettingsManager.getSettings(null).getLineSeparator());

    if(!myDeletedMaps.isEmpty())
    {
        FileUtil.writeToFile(new File(dir, "deleted.txt"), StringUtil.join(myDeletedMaps, "\n"));
    }
}
项目:intellij-ce-playground    文件:ArtifactBuilderTestCase.java   
public JpsArtifact addArtifact(LayoutElementTestUtil.LayoutElementCreator root) {
  Set<String> usedNames = getArtifactNames();
  final String name = UniqueNameGenerator.generateUniqueName("a", usedNames);
  return addArtifact(name, root);
}
项目:intellij-ce-playground    文件:StateSplitterEx.java   
@NotNull
protected static Pair<Element, String> createItem(@NotNull UniqueNameGenerator generator, @NotNull Element element, @NotNull String attributeName) {
  return createItem(element.getAttributeValue(attributeName), generator, element);
}
项目:intellij-ce-playground    文件:StateSplitterEx.java   
@NotNull
protected static Pair<Element, String> createItem(@NotNull String fileName, @NotNull UniqueNameGenerator generator, @NotNull Element element) {
  return Pair.create(element, generator.generateUniqueName(FileUtil.sanitizeFileName(fileName)) + ".xml");
}
项目:intellij-ce-playground    文件:DownloadableFileDescriptionImpl.java   
@NotNull
@Override
public String generateFileName(@NotNull Condition<String> validator) {
  return UniqueNameGenerator.generateUniqueName("", myFileName, myFileExtension, "_", "", validator);
}
项目:tools-idea    文件:ArtifactBuilderTestCase.java   
public JpsArtifact addArtifact(LayoutElementTestUtil.LayoutElementCreator root) {
  Set<String> usedNames = getArtifactNames();
  final String name = UniqueNameGenerator.generateUniqueName("a", usedNames);
  return addArtifact(name, root);
}
项目:tools-idea    文件:SchemesManagerImpl.java   
private static String createUniqueFileName(final Collection<String> strings, final String schemeName) {
  return UniqueNameGenerator.generateUniqueName(schemeName, strings);
}
项目:tools-idea    文件:SchemesManagerImpl.java   
@NotNull
public Collection<SharedScheme<E>> loadSharedSchemes(Collection<T> currentSchemeList) {
  Collection<String> names = new HashSet<String>(getAllSchemeNames(currentSchemeList));

  final StreamProvider[] providers = ((ApplicationImpl)ApplicationManager.getApplication()).getStateStore().getStateStorageManager()
      .getStreamProviders(RoamingType.GLOBAL);
  final HashMap<String, SharedScheme<E>> result = new HashMap<String, SharedScheme<E>>();
  if (providers != null) {
    for (StreamProvider provider : providers) {
      if (provider.isEnabled()) {
        String[] paths = provider.listSubFiles(myFileSpec);
        for (String subpath : paths) {
          try {
            final Document subDocument = StorageUtil.loadDocument(provider.loadContent(getFileFullPath(subpath), RoamingType.GLOBAL));
            if (subDocument != null) {
              SharedSchemeData original = unwrap(subDocument);
              final E scheme = myProcessor.readScheme(original.original);
              if (!alreadyShared(subpath, currentSchemeList)) {
                String schemeName = original.name;
                String uniqueName = UniqueNameGenerator.generateUniqueName("[shared] " + schemeName, names);
                renameScheme(scheme, uniqueName);
                schemeName = uniqueName;
                scheme.getExternalInfo().setOriginalPath(getFileFullPath(subpath));
                scheme.getExternalInfo().setIsImported(true);
                result.put(schemeName,
                           new SharedScheme<E>(original.user == null ? "unknown" : original.user, original.description, scheme));
              }
            }
          }
          catch (Exception e) {
            LOG.debug("Cannot load data from IDEAServer: " + e.getLocalizedMessage());
          }
        }
      }
    }
  }

  for (SharedScheme<E> t : result.values()) {
    myProcessor.initScheme(t.getScheme());
  }

  return result.values();

}
项目:tools-idea    文件:AbstractSchemesManager.java   
private String generateUniqueName(final T scheme) {
  return UniqueNameGenerator.generateUniqueName(UniqueFileNamesProvider.convertName(scheme.getName()), collectExistingNames(mySchemes));
}
项目:tools-idea    文件:DownloadableFileDescriptionImpl.java   
@NotNull
@Override
public String generateFileName(@NotNull Condition<String> validator) {
  return UniqueNameGenerator.generateUniqueName("", myFileName, myFileExtension, "_", "", validator);
}
项目:consulo    文件:StateSplitterEx.java   
@Nonnull
protected static Pair<Element, String> createItem(@Nonnull UniqueNameGenerator generator, @Nonnull Element element, @Nonnull String attributeName) {
  return createItem(element.getAttributeValue(attributeName), generator, element);
}