diff --git a/java/compiler/impl/src/com/intellij/compiler/impl/jarr/JarBuildParticipantProvider.java b/java/compiler/impl/src/com/intellij/compiler/impl/jarr/JarBuildParticipantProvider.java deleted file mode 100644 index 7931214acd58..000000000000 --- a/java/compiler/impl/src/com/intellij/compiler/impl/jarr/JarBuildParticipantProvider.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2000-2010 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.compiler.impl.jarr; - -import com.intellij.openapi.compiler.CompileContext; -import com.intellij.openapi.compiler.make.BuildParticipant; -import com.intellij.openapi.compiler.make.BuildParticipantProvider; -import com.intellij.openapi.module.Module; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.roots.CompilerModuleExtension; -import com.intellij.openapi.roots.CompilerProjectExtension; -import com.intellij.openapi.util.registry.Registry; -import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.packaging.artifacts.Artifact; -import com.intellij.packaging.elements.ArtifactRootElement; -import com.intellij.packaging.elements.CompositePackagingElement; -import com.intellij.packaging.elements.PackagingElementFactory; -import com.intellij.packaging.impl.artifacts.ArtifactImpl; -import com.intellij.packaging.impl.artifacts.PlainArtifactType; - -import java.util.Collection; -import java.util.Collections; - -/** - * @author Dmitry Avdeev - */ -public class JarBuildParticipantProvider extends BuildParticipantProvider { - - @Override - public Collection getParticipants(final Module module) { - - if (!Registry.is("jar.build")) return Collections.emptySet(); - - return Collections.singleton(new BuildParticipant() { - @Override - public Artifact createArtifact(CompileContext context) { - - PackagingElementFactory factory = PackagingElementFactory.getInstance(); - ArtifactRootElement root = factory.createArtifactRootElement(); - - CompositePackagingElement classesJar = factory.createArchive(module.getName() + ".jar"); - classesJar.addOrFindChild(factory.createModuleOutput(module)); - String s = CompilerModuleExtension.getInstance(module).getCompilerOutputPathForTests().getPath(); - classesJar.addOrFindChild(factory.createDirectoryCopyWithParentDirectories(s, "")); - root.addOrFindChild(classesJar); - - Project project = module.getProject(); - VirtualFile output = CompilerProjectExtension.getInstance(project).getCompilerOutput(); - String path = output == null ? null : output.getPath() + "/jars"; - return path == null ? null : new ArtifactImpl(module.getName(), PlainArtifactType.getInstance(), false, root, path); - } - }); - } - -} diff --git a/java/compiler/impl/src/com/intellij/compiler/impl/javaCompiler/ModuleChunk.java b/java/compiler/impl/src/com/intellij/compiler/impl/javaCompiler/ModuleChunk.java index 6663b16326eb..b45aef2894c0 100644 --- a/java/compiler/impl/src/com/intellij/compiler/impl/javaCompiler/ModuleChunk.java +++ b/java/compiler/impl/src/com/intellij/compiler/impl/javaCompiler/ModuleChunk.java @@ -33,7 +33,6 @@ import com.intellij.openapi.vfs.VfsUtil; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.pom.java.LanguageLevel; import com.intellij.util.Chunk; -import com.intellij.util.JarClasspathHelper; import com.intellij.util.PathsList; import com.intellij.util.StringBuilderSpinAllocator; import com.intellij.util.containers.ContainerUtil; @@ -215,8 +214,6 @@ public class ModuleChunk extends Chunk { for (final Module module : modules) { Collections.addAll(cpFiles, orderEnumerator(module, exportedOnly, new AfterJdkOrderEntryCondition()).getClassesRoots()); } - cpFiles = JarClasspathHelper.patchFiles(cpFiles, myContext.getProject()); - return cpFiles; } diff --git a/java/execution/impl/src/com/intellij/execution/impl/JarProgramPatcher.java b/java/execution/impl/src/com/intellij/execution/impl/JarProgramPatcher.java deleted file mode 100644 index 033596d689c0..000000000000 --- a/java/execution/impl/src/com/intellij/execution/impl/JarProgramPatcher.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2000-2010 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.execution.impl; - -import com.intellij.execution.Executor; -import com.intellij.execution.configurations.JavaParameters; -import com.intellij.execution.configurations.RunConfiguration; -import com.intellij.execution.configurations.RunProfile; -import com.intellij.execution.runners.JavaProgramPatcher; -import com.intellij.openapi.util.registry.Registry; -import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.util.JarClasspathHelper; -import com.intellij.util.PathsList; - -import java.io.File; -import java.util.List; - -/** - * @author Dmitry Avdeev - */ -public class JarProgramPatcher extends JavaProgramPatcher { - - @Override - public void patchJavaParameters(Executor executor, RunProfile configuration, JavaParameters javaParameters) { - - if (!(configuration instanceof RunConfiguration) || !Registry.is("jar.build")) return; - - String path = JarClasspathHelper.getJarsPath(((RunConfiguration)configuration).getProject()); - if (path == null) return; - - PathsList classPath = javaParameters.getClassPath(); - List pathList = classPath.getPathList(); - for (String s: pathList) { - String name = new File(s).getName(); - VirtualFile jarFile = JarClasspathHelper.getJarFile(path, name); - if (jarFile != null) { - classPath.remove(s); - classPath.add(jarFile); - } - } - } - -} diff --git a/java/java-impl/src/com/intellij/util/JarClasspathHelper.java b/java/java-impl/src/com/intellij/util/JarClasspathHelper.java deleted file mode 100644 index e2387850c6a1..000000000000 --- a/java/java-impl/src/com/intellij/util/JarClasspathHelper.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2000-2010 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.util; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.roots.CompilerProjectExtension; -import com.intellij.openapi.roots.OrderEnumerator; -import com.intellij.openapi.util.registry.Registry; -import com.intellij.openapi.vfs.LocalFileSystem; -import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.util.containers.OrderedSet; -import gnu.trove.TObjectHashingStrategy; -import org.jetbrains.annotations.Nullable; - -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; - -/** - * @author Dmitry Avdeev - */ -public class JarClasspathHelper { - - public static OrderedSet patchFiles(OrderedSet files, Project project) { - if (!Registry.is("jar.build")) { - return files; - } - String path = getJarsPath(project); - final OrderedSet result = new OrderedSet(TObjectHashingStrategy.CANONICAL); - final Collection modulesOutputs = - new HashSet(Arrays.asList(OrderEnumerator.orderEntries(project).withoutLibraries().withoutSdk().getClassesRoots())); - for (VirtualFile file : files) { - VirtualFile jar = getJarFile(path, file.getName()); - if (modulesOutputs.contains(file) && jar != null) { - result.add(jar); - } - else { - result.add(file); - } - } - return result; - } - - @Nullable - public static VirtualFile getJarFile(String path, String moduleName) { - VirtualFile jar = LocalFileSystem.getInstance().refreshAndFindFileByPath(path + "/" + moduleName + ".jar"); - System.out.println(jar); - return jar; - } - - @Nullable - public static String getJarsPath(Project project) { - CompilerProjectExtension extension = CompilerProjectExtension.getInstance(project); - if (extension == null) { - return null; - } - VirtualFile output = extension.getCompilerOutput(); - if (output == null) { - return null; - } - return output.getPath() + "/jars"; - } -} diff --git a/platform/platform-resources-en/src/misc/registry.properties b/platform/platform-resources-en/src/misc/registry.properties index 9ad03449302e..30ae23cae219 100644 --- a/platform/platform-resources-en/src/misc/registry.properties +++ b/platform/platform-resources-en/src/misc/registry.properties @@ -128,7 +128,6 @@ psi.deferIconLoading=true find.search.in.project.files=false structureView.coalesceTime=500 -jar.build=false keymap.show.alias.actions=false frameworks.download.libraries.server.url=http://pluginsrepo-test:8080 diff --git a/resources/src/idea/RichPlatformPlugin.xml b/resources/src/idea/RichPlatformPlugin.xml index b3a6d420724d..1e3e8659b73b 100644 --- a/resources/src/idea/RichPlatformPlugin.xml +++ b/resources/src/idea/RichPlatformPlugin.xml @@ -215,9 +215,6 @@ - - -