From 888b09d5220bb50e5163bb5fcd966d059a4dafec Mon Sep 17 00:00:00 2001 From: Alexey Pegov Date: Wed, 30 Sep 2009 18:46:58 +0400 Subject: [PATCH] absolute paths for project by defaukt, module paths are still relative for deps which are outside module dir but inside project --- .../com/intellij/compiler/ant/ChunkBuild.java | 4 +- .../ant/CompileModuleChunkTarget.java | 3 +- .../compiler/ant/CompilerExcludes.java | 4 +- .../LibraryDefinitionsGeneratorFactory.java | 4 +- .../compiler/ant/LibraryPatterns.java | 4 +- .../compiler/ant/ModuleChunkClasspath.java | 3 +- .../compiler/ant/ModuleChunkSourcepath.java | 19 +++++---- .../ant/MultipleFileProjectBuild.java | 4 +- .../ArtifactAntGenerationContextImpl.java | 6 +-- .../ant/j2ee/CompositeBuildTarget.java | 6 +-- .../DefaultExplodedAndJarBuildGenerator.java | 2 +- .../compiler/ant/GenerationUtils.java | 18 ++++----- .../intellij/compiler/ant/ModuleChunk.java | 4 -- .../ProjectFromSourcesBuilder.java | 3 -- .../JavaContentEntriesEditor.java | 39 +----------------- .../ui/configuration/ModulesConfigurator.form | 40 ++----------------- .../ui/configuration/ProjectConfigurable.java | 17 +------- .../ide/util/projectWizard/ModuleBuilder.java | 2 - .../com/intellij/openapi/module/Module.java | 16 -------- .../impl/ModulePathMacroManager.java | 5 ++- .../impl/stores/ModuleStoreImpl.java | 5 --- .../openapi/module/impl/ModuleImpl.java | 7 ---- .../impl/ProjectPathMacroManager.java | 3 +- .../stores/BaseFileConfigurableStoreImpl.java | 26 ------------ .../components/impl/stores/IModuleStore.java | 3 -- .../components/impl/stores/IProjectStore.java | 5 --- .../impl/stores/ProjectStoreImpl.java | 2 +- .../openapi/project/ex/ProjectEx.java | 3 -- .../openapi/project/impl/ProjectImpl.java | 8 ---- .../src/messages/ProjectBundle.properties | 6 +-- .../src/com/intellij/mock/MockProject.java | 7 ---- .../com/intellij/mock/MockProjectStore.java | 9 ----- .../maven/importing/MavenProjectImporter.java | 3 -- .../importing/MavenRootModelAdapter.java | 1 - .../idea/maven/StructureImportingTest.java | 21 ---------- 35 files changed, 43 insertions(+), 269 deletions(-) diff --git a/java/compiler/impl/src/com/intellij/compiler/ant/ChunkBuild.java b/java/compiler/impl/src/com/intellij/compiler/ant/ChunkBuild.java index a6776dc578c1..01c816457284 100644 --- a/java/compiler/impl/src/com/intellij/compiler/ant/ChunkBuild.java +++ b/java/compiler/impl/src/com/intellij/compiler/ant/ChunkBuild.java @@ -36,13 +36,13 @@ public class ChunkBuild extends CompositeGenerator{ final String outputPathUrl = chunk.getOutputDirUrl(); String location = outputPathUrl != null? - GenerationUtils.toRelativePath(VirtualFileManager.extractPath(outputPathUrl), chunkBaseDir, BuildProperties.getModuleChunkBasedirProperty(chunk), genOptions, !chunk.isSavePathsRelative()) : + GenerationUtils.toRelativePath(VirtualFileManager.extractPath(outputPathUrl), chunkBaseDir, BuildProperties.getModuleChunkBasedirProperty(chunk), genOptions) : CompilerBundle.message("value.undefined"); add(new Property(BuildProperties.getOutputPathProperty(chunk.getName()), location), 1); final String testOutputPathUrl = chunk.getTestsOutputDirUrl(); if (testOutputPathUrl != null) { - location = GenerationUtils.toRelativePath(VirtualFileManager.extractPath(testOutputPathUrl), chunkBaseDir, BuildProperties.getModuleChunkBasedirProperty(chunk), genOptions, !chunk.isSavePathsRelative()); + location = GenerationUtils.toRelativePath(VirtualFileManager.extractPath(testOutputPathUrl), chunkBaseDir, BuildProperties.getModuleChunkBasedirProperty(chunk), genOptions); } add(new Property(BuildProperties.getOutputPathForTestsProperty(chunk.getName()), location)); diff --git a/java/compiler/impl/src/com/intellij/compiler/ant/CompileModuleChunkTarget.java b/java/compiler/impl/src/com/intellij/compiler/ant/CompileModuleChunkTarget.java index 3e4f6f3f9216..e858a696538e 100644 --- a/java/compiler/impl/src/com/intellij/compiler/ant/CompileModuleChunkTarget.java +++ b/java/compiler/impl/src/com/intellij/compiler/ant/CompileModuleChunkTarget.java @@ -177,8 +177,7 @@ public class CompileModuleChunkTarget extends CompositeGenerator { composite.add(copy); } final FileSet fileSet = new FileSet( - GenerationUtils.toRelativePath(root, baseDir, BuildProperties.getModuleChunkBasedirProperty(chunk), genOptions, - !chunk.isSavePathsRelative())); + GenerationUtils.toRelativePath(root, baseDir, BuildProperties.getModuleChunkBasedirProperty(chunk), genOptions)); fileSet.add(resourcePatternsPatternSet); fileSet.add(filesSelector); if (excludes != null) { diff --git a/java/compiler/impl/src/com/intellij/compiler/ant/CompilerExcludes.java b/java/compiler/impl/src/com/intellij/compiler/ant/CompilerExcludes.java index f4abcd68caba..0f55aef755c1 100644 --- a/java/compiler/impl/src/com/intellij/compiler/ant/CompilerExcludes.java +++ b/java/compiler/impl/src/com/intellij/compiler/ant/CompilerExcludes.java @@ -6,7 +6,6 @@ import com.intellij.compiler.ant.taskdefs.Exclude; import com.intellij.compiler.ant.taskdefs.PatternSet; import com.intellij.openapi.compiler.options.ExcludeEntryDescription; import com.intellij.openapi.project.Project; -import com.intellij.openapi.project.ex.ProjectEx; import java.io.IOException; import java.io.PrintWriter; @@ -24,10 +23,9 @@ public class CompilerExcludes extends Generator { compilerConfiguration.getExcludedEntriesConfiguration().getExcludeEntryDescriptions(); myPatternSet = new PatternSet(BuildProperties.PROPERTY_COMPILER_EXCLUDES); for (final ExcludeEntryDescription entry : excludeEntryDescriptions) { - final boolean relative = project instanceof ProjectEx && ((ProjectEx)project).isSavePathsRelative(); final String path = GenerationUtils .toRelativePath(entry.getVirtualFile(), BuildProperties.getProjectBaseDir(project), BuildProperties.getProjectBaseDirProperty(), - genOptions, !relative); + genOptions); if (path == null) { // entry is invalid, skip it continue; diff --git a/java/compiler/impl/src/com/intellij/compiler/ant/LibraryDefinitionsGeneratorFactory.java b/java/compiler/impl/src/com/intellij/compiler/ant/LibraryDefinitionsGeneratorFactory.java index 8ffd25914a6b..7684f283bf46 100644 --- a/java/compiler/impl/src/com/intellij/compiler/ant/LibraryDefinitionsGeneratorFactory.java +++ b/java/compiler/impl/src/com/intellij/compiler/ant/LibraryDefinitionsGeneratorFactory.java @@ -111,7 +111,7 @@ public class LibraryDefinitionsGeneratorFactory { TreeSet visitedPaths = new TreeSet(); for (final VirtualFile file : files) { final String path = GenerationUtils - .toRelativePath(file, baseDir, BuildProperties.getProjectBaseDirProperty(), genOptions, !project.isSavePathsRelative()); + .toRelativePath(file, baseDir, BuildProperties.getProjectBaseDirProperty(), genOptions); visitedPaths.add(path); } for (final String path : visitedPaths) { @@ -123,7 +123,7 @@ public class LibraryDefinitionsGeneratorFactory { for (String url : urls) { File file = fileFromUrl(url); final String path = GenerationUtils - .toRelativePath(file.getPath(), baseDir, BuildProperties.getProjectBaseDirProperty(), genOptions, !project.isSavePathsRelative()); + .toRelativePath(file.getPath(), baseDir, BuildProperties.getProjectBaseDirProperty(), genOptions); if (url.startsWith(JarFileSystem.PROTOCOL_PREFIX)) { libraryPath.add(new PathElement(path)); } diff --git a/java/compiler/impl/src/com/intellij/compiler/ant/LibraryPatterns.java b/java/compiler/impl/src/com/intellij/compiler/ant/LibraryPatterns.java index e82d1896e574..8a64e06aa188 100644 --- a/java/compiler/impl/src/com/intellij/compiler/ant/LibraryPatterns.java +++ b/java/compiler/impl/src/com/intellij/compiler/ant/LibraryPatterns.java @@ -4,7 +4,6 @@ import com.intellij.compiler.ant.taskdefs.Include; import com.intellij.compiler.ant.taskdefs.PatternSet; import com.intellij.openapi.fileTypes.*; import com.intellij.openapi.project.Project; -import com.intellij.openapi.project.ex.ProjectEx; import java.io.IOException; import java.io.PrintWriter; @@ -31,10 +30,9 @@ public class LibraryPatterns extends Generator { final List matchers = FileTypeManager.getInstance().getAssociations(type); for (FileNameMatcher m : matchers) { if (m instanceof ExactFileNameMatcher) { - final boolean relative = project instanceof ProjectEx && ((ProjectEx)project).isSavePathsRelative(); final String path = GenerationUtils .toRelativePath(m.getPresentableString(), BuildProperties.getProjectBaseDir(project), BuildProperties.getProjectBaseDirProperty(), - genOptions, !relative); + genOptions); myPatternSet.add(new Include(path)); } else { diff --git a/java/compiler/impl/src/com/intellij/compiler/ant/ModuleChunkClasspath.java b/java/compiler/impl/src/com/intellij/compiler/ant/ModuleChunkClasspath.java index e236e619802d..f267f94b50a0 100644 --- a/java/compiler/impl/src/com/intellij/compiler/ant/ModuleChunkClasspath.java +++ b/java/compiler/impl/src/com/intellij/compiler/ant/ModuleChunkClasspath.java @@ -147,8 +147,7 @@ public class ModuleChunkClasspath extends Path { else { final String path = VirtualFileManager.extractPath(url); pathItems.add(new PathElementItem( - GenerationUtils.toRelativePath(path, chunk.getBaseDir(), moduleChunkBasedirProperty, genOptions, - !chunk.isSavePathsRelative()))); + GenerationUtils.toRelativePath(path, chunk.getBaseDir(), moduleChunkBasedirProperty, genOptions))); } } } diff --git a/java/compiler/impl/src/com/intellij/compiler/ant/ModuleChunkSourcepath.java b/java/compiler/impl/src/com/intellij/compiler/ant/ModuleChunkSourcepath.java index 51ac3cdb101e..969b3a93772b 100644 --- a/java/compiler/impl/src/com/intellij/compiler/ant/ModuleChunkSourcepath.java +++ b/java/compiler/impl/src/com/intellij/compiler/ant/ModuleChunkSourcepath.java @@ -5,18 +5,17 @@ package com.intellij.compiler.ant; import com.intellij.compiler.ant.taskdefs.*; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.openapi.vfs.LocalFileSystem; -import com.intellij.openapi.vfs.VfsUtil; -import com.intellij.openapi.module.Module; -import com.intellij.openapi.roots.ModuleRootManager; -import com.intellij.openapi.roots.ModuleFileIndex; -import com.intellij.openapi.roots.ContentEntry; import com.intellij.openapi.fileTypes.FileTypeManager; +import com.intellij.openapi.module.Module; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.roots.ContentEntry; +import com.intellij.openapi.roots.ModuleFileIndex; +import com.intellij.openapi.roots.ModuleRootManager; +import com.intellij.openapi.vfs.VfsUtil; +import com.intellij.openapi.vfs.VirtualFile; -import java.util.List; import java.util.ArrayList; +import java.util.List; /** * @author Eugene Zhuravlev @@ -61,7 +60,7 @@ public class ModuleChunkSourcepath extends CompositeGenerator{ final VirtualFile dirSetRoot = getDirSetRoot(contentEntry); final String dirSetRootRelativeToBasedir = GenerationUtils - .toRelativePath(dirSetRoot, chunk.getBaseDir(), moduleChunkBasedirProperty, genOptions, !module.isSavePathsRelative()); + .toRelativePath(dirSetRoot, chunk.getBaseDir(), moduleChunkBasedirProperty, genOptions); final DirSet sourcesDirSet = new DirSet(dirSetRootRelativeToBasedir); final DirSet testSourcesDirSet = new DirSet(dirSetRootRelativeToBasedir); diff --git a/java/compiler/impl/src/com/intellij/compiler/ant/MultipleFileProjectBuild.java b/java/compiler/impl/src/com/intellij/compiler/ant/MultipleFileProjectBuild.java index 0b130d4195c8..113ad81b35ba 100644 --- a/java/compiler/impl/src/com/intellij/compiler/ant/MultipleFileProjectBuild.java +++ b/java/compiler/impl/src/com/intellij/compiler/ant/MultipleFileProjectBuild.java @@ -1,7 +1,6 @@ package com.intellij.compiler.ant; import com.intellij.compiler.ant.taskdefs.Import; -import com.intellij.openapi.module.Module; import com.intellij.openapi.project.Project; import java.io.File; @@ -20,8 +19,7 @@ public class MultipleFileProjectBuild extends ProjectBuild{ final String chunkBuildFile = BuildProperties.getModuleChunkBaseDir(chunk).getPath() + File.separator + BuildProperties.getModuleChunkBuildFileName(chunk) + ".xml"; final File projectBaseDir = BuildProperties.getProjectBaseDir(myProject); final String pathToFile = GenerationUtils.toRelativePath( - chunkBuildFile, projectBaseDir, BuildProperties.getProjectBaseDirProperty(), genOptions, !chunk.isSavePathsRelative() - ); + chunkBuildFile, projectBaseDir, BuildProperties.getProjectBaseDirProperty(), genOptions); return new Import(pathToFile); } diff --git a/java/compiler/impl/src/com/intellij/compiler/ant/artifacts/ArtifactAntGenerationContextImpl.java b/java/compiler/impl/src/com/intellij/compiler/ant/artifacts/ArtifactAntGenerationContextImpl.java index 065a19fe7cb3..d567c2b43fe3 100644 --- a/java/compiler/impl/src/com/intellij/compiler/ant/artifacts/ArtifactAntGenerationContextImpl.java +++ b/java/compiler/impl/src/com/intellij/compiler/ant/artifacts/ArtifactAntGenerationContextImpl.java @@ -4,10 +4,9 @@ import com.intellij.compiler.ant.BuildProperties; import com.intellij.compiler.ant.GenerationOptions; import com.intellij.compiler.ant.GenerationUtils; import com.intellij.compiler.ant.Generator; -import com.intellij.compiler.ant.taskdefs.Property; import com.intellij.compiler.ant.taskdefs.Mkdir; +import com.intellij.compiler.ant.taskdefs.Property; import com.intellij.openapi.project.Project; -import com.intellij.openapi.project.ex.ProjectEx; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VfsUtil; import com.intellij.packaging.artifacts.Artifact; @@ -80,8 +79,7 @@ public class ArtifactAntGenerationContextImpl implements ArtifactAntGenerationCo } public String getSubstitutedPath(String path) { - return GenerationUtils.toRelativePath(path, VfsUtil.virtualToIoFile(myProject.getBaseDir()), BuildProperties.getProjectBaseDirProperty(), myGenerationOptions, - ((ProjectEx)myProject).isSavePathsRelative()); + return GenerationUtils.toRelativePath(path, VfsUtil.virtualToIoFile(myProject.getBaseDir()), BuildProperties.getProjectBaseDirProperty(), myGenerationOptions); } public void runBeforeCurrentArtifact(Generator generator) { diff --git a/java/compiler/impl/src/com/intellij/compiler/ant/j2ee/CompositeBuildTarget.java b/java/compiler/impl/src/com/intellij/compiler/ant/j2ee/CompositeBuildTarget.java index c698c68ec930..c99d8d744d9a 100644 --- a/java/compiler/impl/src/com/intellij/compiler/ant/j2ee/CompositeBuildTarget.java +++ b/java/compiler/impl/src/com/intellij/compiler/ant/j2ee/CompositeBuildTarget.java @@ -38,7 +38,7 @@ public class CompositeBuildTarget extends CompositeGenerator { final String explodedPath = buildConfiguration.getExplodedPath(); if (explodedPath != null) { String location = GenerationUtils.toRelativePath(VirtualFileManager.extractPath(explodedPath), moduleBaseDir, baseDirProperty, - parameters.getGenerationOptions(), !containingModule.isSavePathsRelative()); + parameters.getGenerationOptions()); add(new Property(parameters.getExplodedPathProperty(), location)); } @@ -53,7 +53,7 @@ public class CompositeBuildTarget extends CompositeGenerator { if (jarPath != null) { String location = GenerationUtils.toRelativePath(VirtualFileManager.extractPath(jarPath), moduleBaseDir, baseDirProperty, - parameters.getGenerationOptions(), !containingModule.isSavePathsRelative()); + parameters.getGenerationOptions()); add(new Property(parameters.getJarPathProperty(), location)); final AntCall antCall = new AntCall(parameters.getBuildJarTargetName()); @@ -67,4 +67,4 @@ public class CompositeBuildTarget extends CompositeGenerator { protected static String getJarPath(BuildConfiguration buildConfiguration){ return buildConfiguration.isJarEnabled() ? buildConfiguration.getJarPath() : null; } -} \ No newline at end of file +} diff --git a/java/compiler/impl/src/com/intellij/compiler/ant/j2ee/DefaultExplodedAndJarBuildGenerator.java b/java/compiler/impl/src/com/intellij/compiler/ant/j2ee/DefaultExplodedAndJarBuildGenerator.java index 6bae058414ef..4d4b250ac837 100644 --- a/java/compiler/impl/src/com/intellij/compiler/ant/j2ee/DefaultExplodedAndJarBuildGenerator.java +++ b/java/compiler/impl/src/com/intellij/compiler/ant/j2ee/DefaultExplodedAndJarBuildGenerator.java @@ -39,7 +39,7 @@ public class DefaultExplodedAndJarBuildGenerator extends ExplodedAndJarBuildGene final String baseDirProperty = BuildProperties.getModuleBasedirProperty(instruction.getModule()); final String sourceLocation = GenerationUtils.toRelativePath(sourceFile.getPath(), moduleBaseDir, baseDirProperty, - parameters.getGenerationOptions(), !parameters.getContainingModule().isSavePathsRelative()); + parameters.getGenerationOptions()); final Copy copy; if (instruction.isDirectory()) { diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/GenerationUtils.java b/java/compiler/openapi/src/com/intellij/compiler/ant/GenerationUtils.java index 121bf40dc7d0..e9db6dc547d4 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/GenerationUtils.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/GenerationUtils.java @@ -48,17 +48,15 @@ public class GenerationUtils { public static String toRelativePath(final VirtualFile file, final ModuleChunk chunk, final GenerationOptions genOptions) { final Module module = chunk.getModules()[0]; final File moduleBaseDir = chunk.getBaseDir(); - return toRelativePath(file, moduleBaseDir, BuildProperties.getModuleBasedirProperty(module), genOptions, - !chunk.isSavePathsRelative()); + return toRelativePath(file, moduleBaseDir, BuildProperties.getModuleBasedirProperty(module), genOptions); } public static String toRelativePath(final String file, final File baseDir, final Module module, final GenerationOptions genOptions) { - return toRelativePath(file, baseDir, BuildProperties.getModuleBasedirProperty(module), genOptions, !module.isSavePathsRelative()); + return toRelativePath(file, baseDir, BuildProperties.getModuleBasedirProperty(module), genOptions); } public static String toRelativePath(final String path, final ModuleChunk chunk, final GenerationOptions genOptions) { - return GenerationUtils.toRelativePath(path, chunk.getBaseDir(), BuildProperties.getModuleChunkBasedirProperty(chunk), genOptions, - !chunk.isSavePathsRelative()); + return toRelativePath(path, chunk.getBaseDir(), BuildProperties.getModuleChunkBasedirProperty(chunk), genOptions); } /** @@ -76,20 +74,18 @@ public class GenerationUtils { public static String toRelativePath(final VirtualFile file, final File baseDir, final String baseDirPropertyName, - final GenerationOptions genOptions, - final boolean useAbsolutePathsForOuterPaths) { + final GenerationOptions genOptions) { final String localPath = PathUtil.getLocalPath(file); if (localPath == null) { return null; } - return toRelativePath(localPath, baseDir, baseDirPropertyName, genOptions, useAbsolutePathsForOuterPaths); + return toRelativePath(localPath, baseDir, baseDirPropertyName, genOptions); } public static String toRelativePath(String path, File baseDir, @NonNls final String baseDirPropertyName, - GenerationOptions genOptions, - boolean useAbsolutePathsForOuterPaths) { + GenerationOptions genOptions) { path = normalizePath(path); final String substitutedPath = genOptions.subsitutePathWithMacros(path); if (!substitutedPath.equals(path)) { @@ -107,7 +103,7 @@ public class GenerationUtils { } final String relativepath = FileUtil.getRelativePath(base, new File(path)); if (relativepath != null) { - final boolean shouldUseAbsolutePath = useAbsolutePathsForOuterPaths && relativepath.indexOf("..") >= 0; + final boolean shouldUseAbsolutePath = relativepath.indexOf("..") >= 0; if (!shouldUseAbsolutePath) { final String _relativePath = relativepath.replace(File.separatorChar, '/'); final String root = BuildProperties.propertyRef(baseDirPropertyName); diff --git a/java/compiler/openapi/src/com/intellij/compiler/ant/ModuleChunk.java b/java/compiler/openapi/src/com/intellij/compiler/ant/ModuleChunk.java index 14043f94602e..df88ae2004fd 100644 --- a/java/compiler/openapi/src/com/intellij/compiler/ant/ModuleChunk.java +++ b/java/compiler/openapi/src/com/intellij/compiler/ant/ModuleChunk.java @@ -87,10 +87,6 @@ public class ModuleChunk { return CompilerModuleExtension.getInstance(myMainModule).getCompilerOutputUrlForTests(); } - public boolean isSavePathsRelative() { - return myMainModule.isSavePathsRelative(); - } - public boolean isJdkInherited() { return ModuleRootManager.getInstance(myMainModule).isSdkInherited(); } diff --git a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectFromSourcesBuilder.java b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectFromSourcesBuilder.java index f597d1e0d665..ff3404814ef1 100644 --- a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectFromSourcesBuilder.java +++ b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectFromSourcesBuilder.java @@ -188,9 +188,6 @@ public class ProjectFromSourcesBuilder extends ProjectBuilder implements SourceP updater.updateModule(descriptor, module, modifiableModel); } modifiableModel.commit(); - - module.setSavePathsRelative(true); // default setting - return module; } diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JavaContentEntriesEditor.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JavaContentEntriesEditor.java index ab32841ed0cf..ab6e80152f6d 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JavaContentEntriesEditor.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JavaContentEntriesEditor.java @@ -2,6 +2,7 @@ package com.intellij.openapi.roots.ui.configuration; import com.intellij.Patches; import com.intellij.ide.util.JavaUtil; +import com.intellij.openapi.module.Module; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.progress.ProgressManager; import com.intellij.openapi.progress.util.ProgressWindow; @@ -14,20 +15,16 @@ import com.intellij.openapi.util.Pair; import com.intellij.openapi.vfs.LocalFileSystem; import com.intellij.openapi.vfs.VfsUtil; import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.openapi.module.Module; -import com.intellij.openapi.options.ConfigurationException; import com.intellij.util.concurrency.SwingWorker; import javax.swing.*; +import java.awt.*; import java.io.File; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.awt.*; public class JavaContentEntriesEditor extends CommonContentEntriesEditor { - private JRadioButton myRbRelativePaths; - public JavaContentEntriesEditor(Project project, String moduleName, ModifiableRootModel model, ModulesProvider modulesProvider) { super(project, moduleName, model, modulesProvider); } @@ -121,38 +118,6 @@ public class JavaContentEntriesEditor extends CommonContentEntriesEditor { protected JPanel createBottomControl(Module module) { final JPanel innerPanel = new JPanel(new GridBagLayout()); innerPanel.setBorder(BorderFactory.createEmptyBorder(6, 0, 0, 6)); - myRbRelativePaths = new JRadioButton(ProjectBundle.message("module.paths.outside.module.dir.relative.radio")); - final JRadioButton rbAbsolutePaths = new JRadioButton(ProjectBundle.message("module.paths.outside.module.dir.absolute.radio")); - ButtonGroup buttonGroup = new ButtonGroup(); - buttonGroup.add(myRbRelativePaths); - buttonGroup.add(rbAbsolutePaths); - innerPanel.add(new JLabel(ProjectBundle.message("module.paths.outside.module.dir.label")), - new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), - 0, 0)); - innerPanel.add(rbAbsolutePaths, - new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), - 0, 0)); - innerPanel.add(myRbRelativePaths, - new GridBagConstraints(2, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), - 0, 0)); - if (module.isSavePathsRelative()) { - myRbRelativePaths.setSelected(true); - } - else { - rbAbsolutePaths.setSelected(true); - } return innerPanel; } - - @Override - public boolean isModified() { - if (super.isModified()) return true; - final Module selfModule = getModule(); - return selfModule != null && myRbRelativePaths != null && selfModule.isSavePathsRelative() != myRbRelativePaths.isSelected(); - } - - public void apply() throws ConfigurationException { - final Module module = getModule(); - module.setSavePathsRelative(myRbRelativePaths.isSelected()); - } } diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModulesConfigurator.form b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModulesConfigurator.form index 33ddf4ce95fc..292c1f6c81c6 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModulesConfigurator.form +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModulesConfigurator.form @@ -1,16 +1,16 @@
- + - + - + @@ -47,40 +47,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java index 083a4432f208..c5900552e1c4 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java @@ -11,7 +11,6 @@ import com.intellij.openapi.fileChooser.FileChooserDescriptor; import com.intellij.openapi.options.ConfigurationException; import com.intellij.openapi.project.Project; import com.intellij.openapi.project.ProjectBundle; -import com.intellij.openapi.project.ex.ProjectEx; import com.intellij.openapi.roots.CompilerProjectExtension; import com.intellij.openapi.roots.LanguageLevelProjectExtension; import com.intellij.openapi.roots.ModifiableRootModel; @@ -56,9 +55,6 @@ public class ProjectConfigurable extends NamedConfigurable implements D private boolean myStartModuleWizardOnShow; private LanguageLevelCombo myLanguageLevelCombo; private ProjectJdkConfigurable myProjectJdkConfigurable; - private JRadioButton myRbRelativePaths; - - private JRadioButton myRbAbsolutePaths; private FieldPanel myProjectCompilerOutput; @@ -98,16 +94,6 @@ public class ProjectConfigurable extends NamedConfigurable implements D myPanel = new MyJPanel(); myPanel.setPreferredSize(new Dimension(700, 500)); - myRbRelativePaths.setText(ProjectBundle.message("module.paths.outside.module.dir.relative.radio")); - myRbAbsolutePaths.setText(ProjectBundle.message("module.paths.outside.module.dir.absolute.radio")); - - if (((ProjectEx)myProject).isSavePathsRelative()) { - myRbRelativePaths.setSelected(true); - } - else { - myRbAbsolutePaths.setSelected(true); - } - myProjectJdkConfigurable = new ProjectJdkConfigurable(myProject, model); myPanel.add(myProjectJdkConfigurable.createComponent(), new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, @@ -215,7 +201,6 @@ public class ProjectConfigurable extends NamedConfigurable implements D final LanguageLevel newLevel = (LanguageLevel)myLanguageLevelCombo.getSelectedItem(); LanguageLevelProjectExtension.getInstance(myProject).setLanguageLevel(newLevel); - ((ProjectEx)myProject).setSavePathsRelative(myRbRelativePaths.isSelected()); try { myProjectJdkConfigurable.apply(); } @@ -264,7 +249,7 @@ public class ProjectConfigurable extends NamedConfigurable implements D if (!Comparing.strEqual(FileUtil.toSystemIndependentName(VfsUtil.urlToPath(compilerOutput)), FileUtil.toSystemIndependentName(myProjectCompilerOutput.getText()))) return true; if (myProjectJdkConfigurable.isModified()) return true; - return ((ProjectEx)myProject).isSavePathsRelative() != myRbRelativePaths.isSelected(); + return false; } private void createUIComponents() { diff --git a/platform/lang-api/src/com/intellij/ide/util/projectWizard/ModuleBuilder.java b/platform/lang-api/src/com/intellij/ide/util/projectWizard/ModuleBuilder.java index 2403044ec144..9627c2eb8645 100644 --- a/platform/lang-api/src/com/intellij/ide/util/projectWizard/ModuleBuilder.java +++ b/platform/lang-api/src/com/intellij/ide/util/projectWizard/ModuleBuilder.java @@ -129,8 +129,6 @@ public abstract class ModuleBuilder extends ProjectBuilder{ } modifiableModel.commit(); - module.setSavePathsRelative(true); // default setting - return module; } diff --git a/platform/lang-api/src/com/intellij/openapi/module/Module.java b/platform/lang-api/src/com/intellij/openapi/module/Module.java index 1081a29397e7..ee031b3c8abe 100644 --- a/platform/lang-api/src/com/intellij/openapi/module/Module.java +++ b/platform/lang-api/src/com/intellij/openapi/module/Module.java @@ -81,22 +81,6 @@ public interface Module extends ComponentManager, AreaInstance, Disposable { boolean isLoaded(); - /** - * Returns the value of the option "Use absolute/relative paths for files outside - * the module file directory" for this module. - * - * @return true if relative paths are used, false if absolute paths are used. - */ - boolean isSavePathsRelative(); - - /** - * Sets the value of the option "Use absolute/relative paths for files outside - * the module file directory" for this module. - * - * @param b true if relative paths are used, false if absolute paths are used. - */ - void setSavePathsRelative(boolean b); - /** * Sets a custom option for this module. * diff --git a/platform/lang-impl/src/com/intellij/openapi/components/impl/ModulePathMacroManager.java b/platform/lang-impl/src/com/intellij/openapi/components/impl/ModulePathMacroManager.java index 261b7c4d43ba..f84b865fc673 100644 --- a/platform/lang-impl/src/com/intellij/openapi/components/impl/ModulePathMacroManager.java +++ b/platform/lang-impl/src/com/intellij/openapi/components/impl/ModulePathMacroManager.java @@ -14,13 +14,14 @@ import org.jetbrains.annotations.Nullable; import java.io.File; -public class ModulePathMacroManager extends BasePathMacroManager { +public class ModulePathMacroManager extends BasePathMacroManager /*ProjectPathMacroManager*/ { private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.components.impl.ModulePathMacroManager"); private final Module myModule; public ModulePathMacroManager(final Module module) { + //super((ProjectEx) module.getProject()); myModule = module; } @@ -35,7 +36,7 @@ public class ModulePathMacroManager extends BasePathMacroManager { ReplacePathToMacroMap result = new ReplacePathToMacroMap(); getModuleHomeReplacements(result, false); result.putAll(super.getReplacePathMap()); - getModuleHomeReplacements(result, myModule.isSavePathsRelative()); + getModuleHomeReplacements(result, true); // TODO: change to false and remove previous call to this method to save ABSOLUTE paths return result; } diff --git a/platform/lang-impl/src/com/intellij/openapi/components/impl/stores/ModuleStoreImpl.java b/platform/lang-impl/src/com/intellij/openapi/components/impl/stores/ModuleStoreImpl.java index 56c447912085..ee64cb2ceaf1 100644 --- a/platform/lang-impl/src/com/intellij/openapi/components/impl/stores/ModuleStoreImpl.java +++ b/platform/lang-impl/src/com/intellij/openapi/components/impl/stores/ModuleStoreImpl.java @@ -169,11 +169,6 @@ public class ModuleStoreImpl extends BaseFileConfigurableStoreImpl implements IM return storage.getFileName(); } - public void setSavePathsRelative(final boolean b) { - super.setSavePathsRelative(b); - setOption(RELATIVE_PATHS_OPTION, String.valueOf(b)); - } - public void setOption(final String optionName, final String optionValue) { try { getMainStorageData().setOption(optionName, optionValue); diff --git a/platform/lang-impl/src/com/intellij/openapi/module/impl/ModuleImpl.java b/platform/lang-impl/src/com/intellij/openapi/module/impl/ModuleImpl.java index b84e70854f25..1d3930f393a7 100644 --- a/platform/lang-impl/src/com/intellij/openapi/module/impl/ModuleImpl.java +++ b/platform/lang-impl/src/com/intellij/openapi/module/impl/ModuleImpl.java @@ -207,10 +207,6 @@ public class ModuleImpl extends ComponentManagerImpl implements Module { return isModuleAdded; } - public boolean isSavePathsRelative() { - return getStateStore().isSavePathsRelative(); - } - public void moduleAdded() { isModuleAdded = true; for (ModuleComponent component : getComponents(ModuleComponent.class)) { @@ -350,7 +346,4 @@ public class ModuleImpl extends ComponentManagerImpl implements Module { } - public void setSavePathsRelative(final boolean b) { - getStateStore().setSavePathsRelative(b); - } } diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/ProjectPathMacroManager.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/ProjectPathMacroManager.java index c73a6f9c5d60..d384412b8973 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/ProjectPathMacroManager.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/ProjectPathMacroManager.java @@ -28,9 +28,8 @@ public class ProjectPathMacroManager extends BasePathMacroManager { public ReplacePathToMacroMap getReplacePathMap() { ReplacePathToMacroMap result = new ReplacePathToMacroMap(); - getProjectHomeReplacements(result, false); result.putAll(super.getReplacePathMap()); - getProjectHomeReplacements(result, myProject.getStateStore().isSavePathsRelative()); + getProjectHomeReplacements(result, false); return result; } diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/BaseFileConfigurableStoreImpl.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/BaseFileConfigurableStoreImpl.java index 066fb139179b..e8e943029a7c 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/BaseFileConfigurableStoreImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/BaseFileConfigurableStoreImpl.java @@ -18,7 +18,6 @@ import java.util.Set; abstract class BaseFileConfigurableStoreImpl extends ComponentStoreImpl { private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.components.impl.stores.BaseFileConfigurableStoreImpl"); - @NonNls protected static final String RELATIVE_PATHS_OPTION = "relativePaths"; @NonNls protected static final String VERSION_OPTION = "version"; @NonNls public static final String ATTRIBUTE_NAME = "name"; private final ComponentManager myComponentManager; @@ -56,10 +55,7 @@ abstract class BaseFileConfigurableStoreImpl extends ComponentStoreImpl { protected void load(@NotNull final Element rootElement) throws IOException { super.load(rootElement); - final String rel = rootElement.getAttributeValue(RELATIVE_PATHS_OPTION); - if (rel != null) mySavePathsRelative = Boolean.parseBoolean(rel); final String v = rootElement.getAttributeValue(VERSION_OPTION); - if (v != null) { myVersion = Integer.parseInt(v); } @@ -71,10 +67,7 @@ abstract class BaseFileConfigurableStoreImpl extends ComponentStoreImpl { @NotNull protected Element save() { final Element root = super.save(); - - root.setAttribute(RELATIVE_PATHS_OPTION, String.valueOf(mySavePathsRelative)); root.setAttribute(VERSION_OPTION, Integer.toString(myVersion)); - return root; } @@ -110,25 +103,6 @@ abstract class BaseFileConfigurableStoreImpl extends ComponentStoreImpl { getMainStorageData(); //load it } - public boolean isSavePathsRelative() { - try { - return getMainStorageData().mySavePathsRelative; - } - catch (StateStorage.StateStorageException e) { - LOG.error(e); - return false; - } - } - - public void setSavePathsRelative(boolean b) { - try { - getMainStorageData().mySavePathsRelative = b; - } - catch (StateStorage.StateStorageException e) { - LOG.error(e); - } - } - public BaseStorageData getMainStorageData() throws StateStorage.StateStorageException { return (BaseStorageData) getMainStorage().getStorageData(); } diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IModuleStore.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IModuleStore.java index 7d01ff0dadc1..2f284e2812b5 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IModuleStore.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IModuleStore.java @@ -5,7 +5,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; public interface IModuleStore extends IComponentStore { - boolean isSavePathsRelative(); void setModuleFilePath(final String filePath); @@ -18,8 +17,6 @@ public interface IModuleStore extends IComponentStore { @NotNull String getModuleFileName(); - void setSavePathsRelative(final boolean b); - void setOption(final String optionName, final String optionValue); void clearOption(final String optionName); diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java index f436fcf9fa18..a54f382a10c8 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java @@ -19,13 +19,8 @@ public interface IProjectStore extends IComponentStore { boolean checkVersion(); - @SuppressWarnings({"EmptyMethod"}) - boolean isSavePathsRelative(); - void setProjectFilePath(final String filePath); - void setSavePathsRelative(final boolean b); - @Nullable VirtualFile getProjectBaseDir(); diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java index a3d33bf4945d..d346bf4ef495 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java @@ -414,7 +414,7 @@ class ProjectStoreImpl extends BaseFileConfigurableStoreImpl implements IProject @Override protected int computeHash() { - return super.computeHash() + (((ProjectEx)myProject).isSavePathsRelative() ? 1 : 0); + return super.computeHash(); } } diff --git a/platform/platform-impl/src/com/intellij/openapi/project/ex/ProjectEx.java b/platform/platform-impl/src/com/intellij/openapi/project/ex/ProjectEx.java index 5e3b21ce75d7..5a38b0bb01bf 100644 --- a/platform/platform-impl/src/com/intellij/openapi/project/ex/ProjectEx.java +++ b/platform/platform-impl/src/com/intellij/openapi/project/ex/ProjectEx.java @@ -5,9 +5,6 @@ import com.intellij.openapi.project.Project; import org.jetbrains.annotations.NotNull; public interface ProjectEx extends Project { - boolean isSavePathsRelative(); - - void setSavePathsRelative(boolean b); @NotNull IProjectStore getStateStore(); diff --git a/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java b/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java index eb866524db55..eac007a67caf 100644 --- a/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectImpl.java @@ -139,14 +139,6 @@ public class ProjectImpl extends ComponentManagerImpl implements ProjectEx { return (IProjectStore)super.getStateStore(); } - public boolean isSavePathsRelative() { - return getStateStore().isSavePathsRelative(); - } - - public void setSavePathsRelative(boolean b) { - getStateStore().setSavePathsRelative(b); - } - public boolean isOpen() { return ProjectManagerEx.getInstanceEx().isProjectOpened(this); } diff --git a/platform/platform-resources-en/src/messages/ProjectBundle.properties b/platform/platform-resources-en/src/messages/ProjectBundle.properties index f1147461d660..d8dea76de1b5 100644 --- a/platform/platform-resources-en/src/messages/ProjectBundle.properties +++ b/platform/platform-resources-en/src/messages/ProjectBundle.properties @@ -108,9 +108,6 @@ project.language.level.reload.title=Language Level Changed project.root.change.loading.progress=Loading Files... library.global.settings=Global libraries module.paths.title=Sources -module.paths.outside.module.dir.relative.radio=Relative -module.paths.outside.module.dir.absolute.radio=Absolute -module.paths.outside.module.dir.label=References to resources outside module file directory: module.paths.output.title=Select Output Path module.paths.test.output.title=Select Test Output Path module.paths.exclude.output.checkbox=Exclude output paths @@ -163,7 +160,6 @@ module.libraries.javadoc.attach.button=Attach D&ocumentation... module.libraries.attach.sources.button=Attach &Sources... module.libraries.attach.classes.button=Attach &Classes... module.libraries.add.button=&Add Library... -module.paths.outside.project.dir.label=References to resources outside project file directory: module.module.language.level=&Language level (effective on project reload): module.circular.dependency.warning=There {1, choice, 1#is circular dependency|2#are circular dependencies} between modules: {0} module.add.error.message=Error adding module to project: {0} @@ -491,4 +487,4 @@ external.annotations.in.code.option=Add in &code external.annotations.external.option=Add &externally project.new.wizard.import.footnote=Import from external model is available from New Project Wizard only loading.components.for=Loading components for ''{0}'' -initializing.components=Initializing components \ No newline at end of file +initializing.components=Initializing components diff --git a/platform/testFramework/src/com/intellij/mock/MockProject.java b/platform/testFramework/src/com/intellij/mock/MockProject.java index f1c341cf9b48..429d9a9fd9b5 100644 --- a/platform/testFramework/src/com/intellij/mock/MockProject.java +++ b/platform/testFramework/src/com/intellij/mock/MockProject.java @@ -19,13 +19,6 @@ public class MockProject extends MockComponentManager implements ProjectEx { super(ApplicationManager.getApplication() != null ? ApplicationManager.getApplication().getPicoContainer() : null); } - public boolean isSavePathsRelative() { - return false; - } - - public void setSavePathsRelative(boolean b) { - } - public boolean isDefault() { return false; } diff --git a/platform/testFramework/src/com/intellij/mock/MockProjectStore.java b/platform/testFramework/src/com/intellij/mock/MockProjectStore.java index a65c9790b901..25130e7c1125 100644 --- a/platform/testFramework/src/com/intellij/mock/MockProjectStore.java +++ b/platform/testFramework/src/com/intellij/mock/MockProjectStore.java @@ -29,19 +29,10 @@ public class MockProjectStore implements IProjectStore { throw new UnsupportedOperationException("Method checkVersion is not yet implemented in " + getClass().getName()); } - @SuppressWarnings({"EmptyMethod"}) - public boolean isSavePathsRelative() { - throw new UnsupportedOperationException("Method isSavePathsRelative is not yet implemented in " + getClass().getName()); - } - public void setProjectFilePath(final String filePath) { throw new UnsupportedOperationException("Method setProjectFilePath is not yet implemented in " + getClass().getName()); } - public void setSavePathsRelative(final boolean b) { - throw new UnsupportedOperationException("Method setSavePathsRelative is not yet implemented in " + getClass().getName()); - } - @Nullable public VirtualFile getProjectBaseDir() { throw new UnsupportedOperationException("Method getProjectBaseDir is not yet implemented in " + getClass().getName()); diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/importing/MavenProjectImporter.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/importing/MavenProjectImporter.java index 9ff53acf7093..aa83401597fe 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/importing/MavenProjectImporter.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/importing/MavenProjectImporter.java @@ -7,7 +7,6 @@ import com.intellij.openapi.module.ModifiableModuleModel; import com.intellij.openapi.module.Module; import com.intellij.openapi.module.StdModuleTypes; import com.intellij.openapi.project.Project; -import com.intellij.openapi.project.ex.ProjectEx; import com.intellij.openapi.roots.LibraryOrderEntry; import com.intellij.openapi.roots.ModifiableRootModel; import com.intellij.openapi.roots.ModuleRootModel; @@ -326,8 +325,6 @@ public class MavenProjectImporter { private void configSettings() { MavenUtil.invokeAndWaitWriteAction(myProject, new Runnable() { public void run() { - ((ProjectEx)myProject).setSavePathsRelative(true); - String level = calcTargetLevel(); if (level == null) return; diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/importing/MavenRootModelAdapter.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/importing/MavenRootModelAdapter.java index 34d89adc737e..5db94174ebd7 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/importing/MavenRootModelAdapter.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/importing/MavenRootModelAdapter.java @@ -41,7 +41,6 @@ public class MavenRootModelAdapter { myRootModel.inheritSdk(); } if (newlyCreatedModule) { - myRootModel.getModule().setSavePathsRelative(true); getCompilerExtension().setExcludeOutput(true); } } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/StructureImportingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/StructureImportingTest.java index 711e2ccb0ce3..e8b62b882d41 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/StructureImportingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/StructureImportingTest.java @@ -1,7 +1,6 @@ package org.jetbrains.idea.maven; import com.intellij.compiler.impl.javaCompiler.javac.JavacSettings; -import com.intellij.openapi.project.ex.ProjectEx; import com.intellij.openapi.projectRoots.Sdk; import com.intellij.openapi.roots.LanguageLevelModuleExtension; import com.intellij.openapi.roots.ModuleRootManager; @@ -13,24 +12,6 @@ import java.io.File; import java.util.List; public class StructureImportingTest extends MavenImportingTestCase { - public void testUsingRelativePathForTheProject() throws Exception { - assertFalse(((ProjectEx)myProject).isSavePathsRelative()); - - importProject("test" + - "project" + - "1"); - - assertTrue(((ProjectEx)myProject).isSavePathsRelative()); - } - - public void testUsingRelativePathForModules() throws Exception { - importProject("test" + - "project" + - "1"); - - assertTrue(getModule("project").isSavePathsRelative()); - } - public void testInheritProjectJdkForModules() throws Exception { importProject("test" + "project" + @@ -44,11 +25,9 @@ public class StructureImportingTest extends MavenImportingTestCase { "project" + "1"); - getModule("project").setSavePathsRelative(false); Sdk sdk = setupJdkForModule("project"); importProject(); - assertFalse(getModule("project").isSavePathsRelative()); assertFalse(ModuleRootManager.getInstance(getModule("project")).isSdkInherited()); assertEquals(sdk, ModuleRootManager.getInstance(getModule("project")).getSdk()); }