本文整理汇总了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();
}
示例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;
}
}
示例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;
}
}
示例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;
}
示例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;
}
示例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();
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例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();
}
示例13: updateData
public void updateData(WizardContext context) {
StorageScheme format =
FILE_BASED.equals(myStorageFormatCombo.getSelectedItem()) ? StorageScheme.DEFAULT : StorageScheme.DIRECTORY_BASED;
context.setProjectStorageFormat(format);
setDefaultFormat(isDefault());
}