当前位置: 首页>>代码示例>>Java>>正文


Java StorageScheme.DEFAULT属性代码示例

本文整理汇总了Java中com.intellij.openapi.components.StorageScheme.DEFAULT属性的典型用法代码示例。如果您正苦于以下问题:Java StorageScheme.DEFAULT属性的具体用法?Java StorageScheme.DEFAULT怎么用?Java StorageScheme.DEFAULT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.intellij.openapi.components.StorageScheme的用法示例。


在下文中一共展示了StorageScheme.DEFAULT属性的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ConversionContextImpl

public ConversionContextImpl(String projectPath) throws CannotConvertException {
  myProjectFile = new File(projectPath);

  File modulesFile;
  if (myProjectFile.isDirectory()) {
    myStorageScheme = StorageScheme.DIRECTORY_BASED;
    myProjectBaseDir = myProjectFile;
    mySettingsBaseDir = new File(myProjectBaseDir.getAbsolutePath(), Project.DIRECTORY_STORE_FOLDER);
    modulesFile = new File(mySettingsBaseDir, "modules.xml");
    myWorkspaceFile = new File(mySettingsBaseDir, "workspace.xml");
  }
  else {
    myStorageScheme = StorageScheme.DEFAULT;
    myProjectBaseDir = myProjectFile.getParentFile();
    modulesFile = myProjectFile;
    myWorkspaceFile = new File(StringUtil.trimEnd(projectPath, ProjectFileType.DOT_DEFAULT_EXTENSION) + WorkspaceFileType.DOT_DEFAULT_EXTENSION);
  }

  myModuleFiles = modulesFile.exists() ? findModuleFiles(JDomConvertingUtil.loadDocument(modulesFile).getRootElement()) : new File[0];
  myPerformedConversionIds = loadPerformedConversionIds();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:ConversionContextImpl.java

示例2: createProjectSettings

@Override
@Nullable
public ComponentManagerSettingsImpl createProjectSettings(@NotNull final String fileName) {
  try {
    File file;
    if (myStorageScheme == StorageScheme.DEFAULT) {
      file = myProjectFile;
    }
    else {
      file = new File(mySettingsBaseDir, fileName);
    }
    return new ComponentManagerSettingsImpl(file, this);
  }
  catch (CannotConvertException e) {
    LOG.info(e);
    return null;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:ConversionContextImpl.java

示例3: createProjectSettings

@Nullable
private ComponentManagerSettingsImpl createProjectSettings(final String fileName) {
  try {
    File file;
    if (myStorageScheme == StorageScheme.DEFAULT) {
      file = myProjectFile;
    }
    else {
      file = new File(mySettingsBaseDir, fileName);
    }
    return new ComponentManagerSettingsImpl(file, this);
  }
  catch (CannotConvertException e) {
    LOG.info(e);
    return null;
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:ConversionContextImpl.java

示例4: getRunManagerSettings

@Override
public RunManagerSettingsImpl getRunManagerSettings() throws CannotConvertException {
  if (myRunManagerSettings == null) {
    if (myStorageScheme == StorageScheme.DEFAULT) {
      myRunManagerSettings = new RunManagerSettingsImpl(myWorkspaceFile, myProjectFile, null, this);
    }
    else {
      final File[] files = new File(mySettingsBaseDir, "runConfigurations").listFiles(new FileFilter() {
        @Override
        public boolean accept(File file) {
          return !file.isDirectory() && file.getName().endsWith(".xml");
        }
      });
      myRunManagerSettings = new RunManagerSettingsImpl(myWorkspaceFile, null, files, this);
    }
  }
  return myRunManagerSettings;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:ConversionContextImpl.java

示例5: getProjectLibrariesSettings

@Override
public ProjectLibrariesSettingsImpl getProjectLibrariesSettings() throws CannotConvertException {
  if (myProjectLibrariesSettings == null) {
    if (myStorageScheme == StorageScheme.DEFAULT) {
      myProjectLibrariesSettings = new ProjectLibrariesSettingsImpl(myProjectFile, null, this);
    }
    else {
      final File librariesDir = new File(mySettingsBaseDir, "libraries");
      final File[] files = librariesDir.exists() ? librariesDir.listFiles(new FileFilter() {
        @Override
        public boolean accept(File file) {
          return !file.isDirectory() && file.getName().endsWith(".xml");
        }
      }) : ArrayUtil.EMPTY_FILE_ARRAY;
      myProjectLibrariesSettings = new ProjectLibrariesSettingsImpl(null, files, this);
    }
  }
  return myProjectLibrariesSettings;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:ConversionContextImpl.java

示例6: getNewProjectFilePath

@NotNull
public String getNewProjectFilePath() {
  if (myWizardContext.getProjectStorageFormat() == StorageScheme.DEFAULT) {
    return myWizardContext.getProjectFileDirectory() + File.separator + myWizardContext.getProjectName() + ProjectFileType.DOT_DEFAULT_EXTENSION;
  }
  else {
    return myWizardContext.getProjectFileDirectory();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:AbstractProjectWizard.java

示例7: getAllProjectFiles

public Set<File> getAllProjectFiles() {
  final HashSet<File> files = new HashSet<File>(Arrays.asList(myModuleFiles));
  if (myStorageScheme == StorageScheme.DEFAULT) {
    files.add(myProjectFile);
    files.add(myWorkspaceFile);
  }
  else {
    addFilesRecursively(mySettingsBaseDir, files);
  }
  return files;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ConversionContextImpl.java

示例8: getRunManagerSettings

@Override
public RunManagerSettingsImpl getRunManagerSettings() throws CannotConvertException {
  if (myRunManagerSettings == null) {
    if (myStorageScheme == StorageScheme.DEFAULT) {
      myRunManagerSettings = new RunManagerSettingsImpl(myWorkspaceFile, myProjectFile, null, this);
    }
    else {
      final File[] files = new File(mySettingsBaseDir, "runConfigurations").listFiles(FileFilters.filesWithExtension("xml"));
      myRunManagerSettings = new RunManagerSettingsImpl(myWorkspaceFile, null, files, this);
    }
  }
  return myRunManagerSettings;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:ConversionContextImpl.java

示例9: getProjectLibrariesSettings

@Override
public ProjectLibrariesSettingsImpl getProjectLibrariesSettings() throws CannotConvertException {
  if (myProjectLibrariesSettings == null) {
    myProjectLibrariesSettings = myStorageScheme == StorageScheme.DEFAULT
                                 ? new ProjectLibrariesSettingsImpl(myProjectFile, null, this)
                                 : new ProjectLibrariesSettingsImpl(null, getSettingsXmlFiles("libraries"), this);
  }
  return myProjectLibrariesSettings;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ConversionContextImpl.java

示例10: getArtifactsSettings

@Override
public ArtifactsSettingsImpl getArtifactsSettings() throws CannotConvertException {
  if (myArtifactsSettings == null) {
    myArtifactsSettings = myStorageScheme == StorageScheme.DEFAULT
                          ? new ArtifactsSettingsImpl(myProjectFile, null, this)
                          : new ArtifactsSettingsImpl(null, getSettingsXmlFiles("artifacts"), this);
  }
  return myArtifactsSettings;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ConversionContextImpl.java

示例11: isConversionNeeded

public boolean isConversionNeeded() throws CannotConvertException {
  if (myContext.isConversionAlreadyPerformed(myProvider)) return false;
  
  myProcessProjectFile = myContext.getStorageScheme() == StorageScheme.DEFAULT && myProjectFileConverter != null
                         && myProjectFileConverter.isConversionNeeded(myContext.getProjectSettings());

  myProcessWorkspaceFile = myWorkspaceConverter != null && myContext.getWorkspaceFile().exists()
                           && myWorkspaceConverter.isConversionNeeded(myContext.getWorkspaceSettings());

  myModulesFilesToProcess.clear();
  if (myModuleFileConverter != null) {
    for (File moduleFile : myContext.getModuleFiles()) {
      if (moduleFile.exists() && myModuleFileConverter.isConversionNeeded(myContext.getModuleSettings(moduleFile))) {
        myModulesFilesToProcess.add(moduleFile);
      }
    }
  }

  myProcessRunConfigurations = myRunConfigurationsConverter != null
                               && myRunConfigurationsConverter.isConversionNeeded(myContext.getRunManagerSettings());

  myProcessProjectLibraries = myProjectLibrariesConverter != null
                               && myProjectLibrariesConverter.isConversionNeeded(myContext.getProjectLibrariesSettings());

  myArtifacts = myArtifactsConverter != null
                && myArtifactsConverter.isConversionNeeded(myContext.getArtifactsSettings());

  return myProcessProjectFile ||
         myProcessWorkspaceFile ||
         myProcessRunConfigurations ||
         myProcessProjectLibraries ||
         !myModulesFilesToProcess.isEmpty() ||
         myConverter.isConversionNeeded();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:ConversionRunner.java

示例12: isConversionNeeded

public boolean isConversionNeeded() throws CannotConvertException {
  if (myContext.isConversionAlreadyPerformed(myProvider)) return false;
  
  myProcessProjectFile = myContext.getStorageScheme() == StorageScheme.DEFAULT && myProjectFileConverter != null
                         && myProjectFileConverter.isConversionNeeded(myContext.getProjectSettings());

  myProcessWorkspaceFile = myWorkspaceConverter != null && myContext.getWorkspaceFile().exists()
                           && myWorkspaceConverter.isConversionNeeded(myContext.getWorkspaceSettings());

  myModulesFilesToProcess.clear();
  if (myModuleFileConverter != null) {
    for (File moduleFile : myContext.getModuleFiles()) {
      if (moduleFile.exists() && myModuleFileConverter.isConversionNeeded(myContext.getModuleSettings(moduleFile))) {
        myModulesFilesToProcess.add(moduleFile);
      }
    }
  }

  myProcessRunConfigurations = myRunConfigurationsConverter != null
                               && myRunConfigurationsConverter.isConversionNeeded(myContext.getRunManagerSettings());

  myProcessProjectLibraries = myProjectLibrariesConverter != null
                               && myProjectLibrariesConverter.isConversionNeeded(myContext.getProjectLibrariesSettings());

  return myProcessProjectFile ||
         myProcessWorkspaceFile ||
         myProcessRunConfigurations ||
         myProcessProjectLibraries ||
         !myModulesFilesToProcess.isEmpty() ||
         myConverter.isConversionNeeded();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:31,代码来源:ConversionRunner.java

示例13: updateData

public void updateData(WizardContext context) {
  StorageScheme format =
    FILE_BASED.equals(myStorageFormatCombo.getSelectedItem()) ? StorageScheme.DEFAULT : StorageScheme.DIRECTORY_BASED;
  context.setProjectStorageFormat(format);
  setDefaultFormat(isDefault());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ProjectFormatPanel.java


注:本文中的com.intellij.openapi.components.StorageScheme.DEFAULT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。