mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
old packaging compiler removed
This commit is contained in:
-94
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 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.ant;
|
||||
|
||||
import com.intellij.openapi.compiler.make.BuildConfiguration;
|
||||
import com.intellij.openapi.module.Module;
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
*/
|
||||
public class ExplodedAndJarTargetParameters {
|
||||
private final ModuleChunk myChunk;
|
||||
private final Module myContainingModule;
|
||||
private final GenerationOptions myGenerationOptions;
|
||||
private final String myExplodedPathParameter;
|
||||
private final String myJarPathParameter;
|
||||
private final String myBuildExplodedTargetName;
|
||||
private final String myBuildJarTargetName;
|
||||
private final String myExplodedPathProperty;
|
||||
private final String myJarPathProperty;
|
||||
private final BuildConfiguration myBuildConfiguration;
|
||||
|
||||
public ExplodedAndJarTargetParameters(final ModuleChunk chunk, final Module containingModule, final GenerationOptions generationOptions,
|
||||
final BuildConfiguration buildConfiguration, final String explodedPathParameter, final String jarPathParameter,
|
||||
final String buildExplodedTargetName,
|
||||
final String buildJarTargetName,
|
||||
final String explodedPathProperty,
|
||||
final String jarPathProperty) {
|
||||
myBuildConfiguration = buildConfiguration;
|
||||
myChunk = chunk;
|
||||
myContainingModule = containingModule;
|
||||
myGenerationOptions = generationOptions;
|
||||
myExplodedPathParameter = explodedPathParameter;
|
||||
myJarPathParameter = jarPathParameter;
|
||||
myBuildExplodedTargetName = buildExplodedTargetName;
|
||||
myBuildJarTargetName = buildJarTargetName;
|
||||
myExplodedPathProperty = explodedPathProperty;
|
||||
myJarPathProperty = jarPathProperty;
|
||||
}
|
||||
|
||||
public ModuleChunk getChunk() {
|
||||
return myChunk;
|
||||
}
|
||||
|
||||
public GenerationOptions getGenerationOptions() {
|
||||
return myGenerationOptions;
|
||||
}
|
||||
|
||||
public String getExplodedPathParameter() {
|
||||
return myExplodedPathParameter;
|
||||
}
|
||||
|
||||
public String getJarPathParameter() {
|
||||
return myJarPathParameter;
|
||||
}
|
||||
|
||||
public Module getContainingModule() {
|
||||
return myContainingModule;
|
||||
}
|
||||
|
||||
public String getBuildExplodedTargetName() {
|
||||
return myBuildExplodedTargetName;
|
||||
}
|
||||
|
||||
public String getBuildJarTargetName() {
|
||||
return myBuildJarTargetName;
|
||||
}
|
||||
|
||||
public String getExplodedPathProperty() {
|
||||
return myExplodedPathProperty;
|
||||
}
|
||||
|
||||
public String getJarPathProperty() {
|
||||
return myJarPathProperty;
|
||||
}
|
||||
|
||||
public BuildConfiguration getBuildConfiguration() {
|
||||
return myBuildConfiguration;
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 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.openapi.compiler.make;
|
||||
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public abstract class BuildConfiguration {
|
||||
|
||||
@NonNls
|
||||
public abstract String getArchiveExtension();
|
||||
|
||||
@Nullable
|
||||
public abstract String getJarPath();
|
||||
|
||||
@Nullable
|
||||
public abstract String getExplodedPath();
|
||||
|
||||
public abstract boolean isJarEnabled();
|
||||
|
||||
public abstract boolean isExplodedEnabled();
|
||||
|
||||
@Deprecated
|
||||
public boolean willBuildExploded() {
|
||||
return isExplodedEnabled() && getExplodedPath() != null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,13 +15,8 @@
|
||||
*/
|
||||
package com.intellij.openapi.compiler.make;
|
||||
|
||||
import com.intellij.openapi.module.Module;
|
||||
|
||||
public interface BuildInstruction {
|
||||
String getOutputRelativePath();
|
||||
Module getModule();
|
||||
|
||||
boolean accept(BuildInstructionVisitor visitor) throws Exception;
|
||||
|
||||
boolean isExternalDependencyInstruction();
|
||||
}
|
||||
|
||||
-3
@@ -23,7 +23,4 @@ public abstract class BuildInstructionVisitor {
|
||||
public boolean visitFileCopyInstruction(FileCopyInstruction instruction) throws Exception {
|
||||
return visitInstruction(instruction);
|
||||
}
|
||||
public boolean visitJarAndCopyBuildInstruction(JarAndCopyBuildInstruction instruction) throws Exception {
|
||||
return visitFileCopyInstruction(instruction);
|
||||
}
|
||||
}
|
||||
@@ -16,43 +16,13 @@
|
||||
package com.intellij.openapi.compiler.make;
|
||||
|
||||
import com.intellij.openapi.compiler.CompileContext;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.packaging.artifacts.Artifact;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public abstract class BuildParticipant {
|
||||
public static final BuildParticipant[] EMPTY_ARRAY = new BuildParticipant[0];
|
||||
|
||||
public void afterJarCreated(File jarFile, CompileContext context) throws Exception {
|
||||
}
|
||||
|
||||
public void afterExplodedCreated(File outputDir, CompileContext context) throws Exception {
|
||||
}
|
||||
|
||||
public void buildStarted(CompileContext context) {
|
||||
}
|
||||
|
||||
public void buildFinished(CompileContext context) throws Exception {
|
||||
}
|
||||
|
||||
public abstract BuildRecipe getBuildInstructions(final CompileContext context);
|
||||
|
||||
public abstract BuildConfiguration getBuildConfiguration();
|
||||
|
||||
@Nullable
|
||||
public abstract Artifact createArtifact(CompileContext context);
|
||||
|
||||
@Nullable
|
||||
public String getOrCreateTemporaryDirForExploded() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public abstract Module getModule();
|
||||
|
||||
public boolean willBuildExploded() {
|
||||
BuildConfiguration configuration = getBuildConfiguration();
|
||||
return configuration.isExplodedEnabled() && configuration.getExplodedPath() != null;
|
||||
}
|
||||
}
|
||||
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 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.openapi.compiler.make;
|
||||
|
||||
import com.intellij.openapi.module.Module;
|
||||
|
||||
public abstract class BuildParticipantBase extends BuildParticipant {
|
||||
private final Module myModule;
|
||||
|
||||
protected BuildParticipantBase(final Module module) {
|
||||
myModule = module;
|
||||
}
|
||||
|
||||
public Module getModule() {
|
||||
return myModule;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,9 +15,7 @@
|
||||
*/
|
||||
package com.intellij.openapi.compiler.make;
|
||||
|
||||
import com.intellij.openapi.module.Module;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -27,10 +25,5 @@ public interface BuildRecipe {
|
||||
boolean visitInstructions(BuildInstructionVisitor visitor, boolean reverseOrder);
|
||||
boolean visitInstructionsWithExceptions(BuildInstructionVisitor visitor, boolean reverseOrder) throws Exception;
|
||||
|
||||
void addAll(@NotNull BuildRecipe buildRecipe);
|
||||
void addFileCopyInstruction(@NotNull File file,
|
||||
boolean isDirectory,
|
||||
Module module,
|
||||
String outputRelativePath,
|
||||
@Nullable PackagingFileFilter fileFilter);
|
||||
void addFileCopyInstruction(@NotNull File file, boolean isDirectory, String outputRelativePath);
|
||||
}
|
||||
@@ -24,6 +24,4 @@ public interface FileCopyInstruction extends BuildInstruction {
|
||||
|
||||
boolean isDirectory();
|
||||
|
||||
@Nullable
|
||||
PackagingFileFilter getFileFilter();
|
||||
}
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 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.openapi.compiler.make;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public interface JarAndCopyBuildInstruction extends FileCopyInstruction {
|
||||
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 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.openapi.deployment;
|
||||
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.util.InvalidDataException;
|
||||
import com.intellij.openapi.util.JDOMExternalizable;
|
||||
import com.intellij.openapi.util.WriteExternalException;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class ContainerElement implements JDOMExternalizable, Cloneable, ResolvableElement {
|
||||
private final Map<String,String> myAttributes = new LinkedHashMap<String, String>();
|
||||
private final Module myParentModule;
|
||||
@NonNls public static final String URI_ATTRIBUTE = "URI";
|
||||
@NonNls public static final String PACKAGING_METHOD_ATTRIBUTE = "method";
|
||||
@NonNls public static final String ELEMENT_ATTRIBUTE = "attribute";
|
||||
@NonNls public static final String ATTRIBUTE_NAME = "name";
|
||||
@NonNls public static final String ATTRIBUTE_VALUE = "value";
|
||||
|
||||
protected ContainerElement(@NotNull Module parentModule) {
|
||||
myParentModule = parentModule;
|
||||
}
|
||||
|
||||
public abstract String getPresentableName();
|
||||
|
||||
public String getURI() {
|
||||
return getAttribute(URI_ATTRIBUTE);
|
||||
}
|
||||
|
||||
public void setURI(String uri) {
|
||||
setAttribute(URI_ATTRIBUTE, uri);
|
||||
}
|
||||
public PackagingMethod getPackagingMethod() {
|
||||
final String attribute = getAttribute(PACKAGING_METHOD_ATTRIBUTE);
|
||||
return attribute == null ? PackagingMethod.DO_NOT_PACKAGE : PackagingMethod.getDeploymentMethodById(attribute);
|
||||
}
|
||||
public void setPackagingMethod(PackagingMethod method) {
|
||||
setAttribute(PACKAGING_METHOD_ATTRIBUTE, method.getId());
|
||||
}
|
||||
|
||||
public void setAttribute(String name, String value) {
|
||||
myAttributes.put(name, value);
|
||||
}
|
||||
public String getAttribute(String name) {
|
||||
return myAttributes.get(name);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Module getParentModule() {
|
||||
return myParentModule;
|
||||
}
|
||||
|
||||
public void readExternal(Element element) throws InvalidDataException {
|
||||
final List attrs = element.getChildren(ELEMENT_ATTRIBUTE);
|
||||
for (Object attr : attrs) {
|
||||
Element attribute = (Element)attr;
|
||||
final String name = attribute.getAttributeValue(ATTRIBUTE_NAME);
|
||||
final String value = attribute.getAttributeValue(ATTRIBUTE_VALUE);
|
||||
setAttribute(name, value);
|
||||
}
|
||||
}
|
||||
|
||||
public void writeExternal(Element element) throws WriteExternalException {
|
||||
for (Object o : myAttributes.keySet()) {
|
||||
String name = (String)o;
|
||||
String value = getAttribute(name);
|
||||
final Element attr = new Element(ELEMENT_ATTRIBUTE);
|
||||
attr.setAttribute(ATTRIBUTE_NAME, name);
|
||||
attr.setAttribute(ATTRIBUTE_VALUE, value == null ? "" : value);
|
||||
element.addContent(attr);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract boolean equalsIgnoreAttributes(ContainerElement otherElement);
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof ContainerElement)) return false;
|
||||
|
||||
final ContainerElement otherElement = (ContainerElement)o;
|
||||
if (!equalsIgnoreAttributes(otherElement)) return false;
|
||||
return myAttributes.equals(otherElement.myAttributes);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public ContainerElement clone() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,19 +16,12 @@
|
||||
package com.intellij.openapi.deployment;
|
||||
|
||||
import com.intellij.openapi.compiler.CompileContext;
|
||||
import com.intellij.openapi.compiler.CompilerBundle;
|
||||
import com.intellij.openapi.compiler.CompilerMessageCategory;
|
||||
import com.intellij.openapi.compiler.make.BuildRecipe;
|
||||
import com.intellij.openapi.compiler.make.PackagingFileFilter;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.roots.libraries.Library;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.PathUtil;
|
||||
import com.intellij.util.StringBuilderSpinAllocator;
|
||||
import com.intellij.util.descriptors.ConfigFile;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -42,20 +35,6 @@ public abstract class DeploymentUtil {
|
||||
return ServiceManager.getService(DeploymentUtil.class);
|
||||
}
|
||||
|
||||
public abstract boolean addModuleOutputContents(@NotNull CompileContext context,
|
||||
@NotNull BuildRecipe items,
|
||||
@NotNull Module sourceModule,
|
||||
Module targetModule,
|
||||
@NonNls String outputRelativePath,
|
||||
@Nullable @NonNls String possibleBaseOuputPath,
|
||||
@Nullable PackagingFileFilter fileFilter);
|
||||
|
||||
public abstract void addLibraryLink(@NotNull CompileContext context,
|
||||
@NotNull BuildRecipe items,
|
||||
@NotNull LibraryLink libraryLink,
|
||||
@NotNull Module module,
|
||||
String possibleBaseOutputPath);
|
||||
|
||||
public abstract void copyFile(@NotNull File fromFile,
|
||||
@NotNull File toFile,
|
||||
@NotNull CompileContext context,
|
||||
@@ -65,17 +44,7 @@ public abstract class DeploymentUtil {
|
||||
public abstract boolean addItemsRecursively(@NotNull BuildRecipe items,
|
||||
@NotNull File root,
|
||||
Module module,
|
||||
String outputRelativePath,
|
||||
@Nullable PackagingFileFilter fileFilter,
|
||||
@Nullable String possibleBaseOutputPath);
|
||||
|
||||
public static void reportRecursiveCopying(CompileContext context, final String sourceDirPath, String targetDirPath,
|
||||
final String dirTitle, String additionalMessage) {
|
||||
final String message = CompilerBundle.message(
|
||||
"message.text.copy.dirTitle.dirPath.to.targetDirPath.will.lead.to.recursive.copying.additionalMessage", dirTitle,
|
||||
FileUtil.toSystemDependentName(sourceDirPath), FileUtil.toSystemDependentName(targetDirPath), additionalMessage);
|
||||
context.addMessage(CompilerMessageCategory.ERROR, message,null,-1,-1);
|
||||
}
|
||||
String outputRelativePath, @Nullable String possibleBaseOutputPath);
|
||||
|
||||
public static String trimForwardSlashes(@NotNull String path) {
|
||||
while (path.length() != 0 && (path.charAt(0) == '/' || path.charAt(0) == File.separatorChar)) {
|
||||
@@ -84,20 +53,8 @@ public abstract class DeploymentUtil {
|
||||
return path;
|
||||
}
|
||||
|
||||
public static String trimTrailingSlashes(@NotNull String path) {
|
||||
int l = path.length() - 1;
|
||||
while (l >= 0 && (path.charAt(l) == '/' || path.charAt(l) == File.separatorChar)) l--;
|
||||
return path.substring(0, l+1);
|
||||
}
|
||||
|
||||
public abstract void reportDeploymentDescriptorDoesNotExists(ConfigFile descriptor, CompileContext context, Module module);
|
||||
|
||||
public abstract void addJavaModuleOutputs(@NotNull Module module,
|
||||
@NotNull ModuleLink[] containingModules,
|
||||
@NotNull BuildRecipe instructions,
|
||||
@NotNull CompileContext context,
|
||||
String explodedPath, final String linkContainerDescription);
|
||||
|
||||
public static String concatPaths(String... paths) {
|
||||
final StringBuilder builder = new StringBuilder();
|
||||
for (String path : paths) {
|
||||
@@ -119,14 +76,6 @@ public abstract class DeploymentUtil {
|
||||
return path + trimForwardSlashes(name);
|
||||
}
|
||||
|
||||
public static File canonicalRelativePath(File file, final String outputRelativePath) {
|
||||
return new File(PathUtil.getCanonicalPath(appendToPath(file.getPath(),outputRelativePath)));
|
||||
}
|
||||
|
||||
public abstract ModuleLink createModuleLink(@NotNull Module dep, @NotNull Module module);
|
||||
|
||||
public abstract LibraryLink createLibraryLink(Library library, @NotNull Module parentModule);
|
||||
|
||||
public abstract BuildRecipe createBuildRecipe();
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 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.openapi.deployment;
|
||||
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.libraries.Library;
|
||||
import com.intellij.openapi.roots.libraries.LibraryTable;
|
||||
import com.intellij.openapi.roots.libraries.LibraryTablesRegistrar;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author Alexey Kudravtsev
|
||||
*/
|
||||
public abstract class LibraryLink extends ContainerElement {
|
||||
|
||||
@NonNls public static final String MODULE_LEVEL = "module";
|
||||
|
||||
public LibraryLink(Module parentModule) {
|
||||
super(parentModule);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public abstract Library getLibrary();
|
||||
|
||||
public abstract List<String> getUrls();
|
||||
public abstract List<String> getClassesRootUrls();
|
||||
|
||||
public abstract boolean hasDirectoriesOnly();
|
||||
|
||||
@Nullable
|
||||
public abstract String getName();
|
||||
|
||||
public abstract String getLevel();
|
||||
|
||||
@Nullable
|
||||
public static Library findLibrary(String libraryName, String libraryLevel, Project project) {
|
||||
if (libraryName == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
LibraryTable table = findTable(libraryLevel, project);
|
||||
if (table == null) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
return table.getLibraryByName(libraryName);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected static LibraryTable findTable(String libraryLevel, Project project) {
|
||||
if (libraryLevel == null) return null;
|
||||
if (LibraryTablesRegistrar.APPLICATION_LEVEL.equals(libraryLevel)) {
|
||||
return LibraryTablesRegistrar.getInstance().getLibraryTable();
|
||||
}
|
||||
return project == null? null : LibraryTablesRegistrar.getInstance().getLibraryTableByLevel(libraryLevel, project);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 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.openapi.deployment;
|
||||
|
||||
import com.intellij.openapi.module.Module;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
||||
/**
|
||||
* @author Alexey Kudravtsev
|
||||
*/
|
||||
public abstract class ModuleLink extends ContainerElement {
|
||||
|
||||
public ModuleLink(Module parentModule) {
|
||||
super(parentModule);
|
||||
}
|
||||
|
||||
public abstract @Nullable Module getModule();
|
||||
|
||||
public abstract String getName();
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 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.openapi.deployment;
|
||||
|
||||
import com.intellij.openapi.compiler.CompilerBundle;
|
||||
import gnu.trove.THashMap;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class PackagingMethod {
|
||||
public static final PackagingMethod[] EMPTY_ARRAY = new PackagingMethod[0];
|
||||
private final String myId;
|
||||
private final String myDescription;
|
||||
|
||||
private static final Map<String, PackagingMethod> ourRegisteredMethods = new THashMap<String, PackagingMethod>();
|
||||
|
||||
private PackagingMethod(String id, String description) {
|
||||
myId = id;
|
||||
myDescription = description;
|
||||
|
||||
ourRegisteredMethods.put(id, this);
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return myId;
|
||||
}
|
||||
|
||||
public static final PackagingMethod DO_NOT_PACKAGE = new PackagingMethod("0", CompilerBundle.message("packaging.method.name.do.not.package"));
|
||||
public static final PackagingMethod COPY_FILES = new PackagingMethod("1",CompilerBundle.message("packaging.method.name.copy.files"));
|
||||
public static final PackagingMethod COPY_FILES_AND_LINK_VIA_MANIFEST = new PackagingMethod("2",CompilerBundle.message("packaging.method.name.copy.files.and.link.via.manifest"));
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public static final PackagingMethod COPY_CLASSES = new PackagingMethod("3",CompilerBundle.message("packaging.method.name.copy.classes"));
|
||||
public static final PackagingMethod INCLUDE_MODULE_IN_BUILD = new PackagingMethod("4",CompilerBundle.message("packaging.method.name.include.module.in.build"));
|
||||
public static final PackagingMethod JAR_AND_COPY_FILE = new PackagingMethod("5",CompilerBundle.message("packaging.method.name.jar.and.copy.file"));
|
||||
public static final PackagingMethod JAR_AND_COPY_FILE_AND_LINK_VIA_MANIFEST = new PackagingMethod("6",CompilerBundle.message("packaging.method.name.jar.copy.and.link.via.manifest"));
|
||||
|
||||
public static PackagingMethod getDeploymentMethodById(String id) {
|
||||
return ourRegisteredMethods.get(id);
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof PackagingMethod)) return false;
|
||||
|
||||
final PackagingMethod method = (PackagingMethod)o;
|
||||
|
||||
if (!myId.equals(method.myId)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return myId.hashCode();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return CompilerBundle.message("packaging.method.presentation.with.description", myDescription);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 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.openapi.deployment;
|
||||
|
||||
import com.intellij.openapi.roots.ui.configuration.ModulesProvider;
|
||||
import com.intellij.openapi.roots.ui.configuration.FacetsProvider;
|
||||
|
||||
public interface ResolvableElement {
|
||||
boolean resolveElement(ModulesProvider modulesProvider, final FacetsProvider facetsProvider);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 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.openapi.deployment;
|
||||
|
||||
public interface TransactionalEditable {
|
||||
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 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.openapi.deployment;
|
||||
|
||||
public class VerificationException extends Exception {
|
||||
public VerificationException() {
|
||||
}
|
||||
|
||||
public VerificationException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public VerificationException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public VerificationException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package com.intellij.packaging.elements;
|
||||
|
||||
import com.intellij.openapi.compiler.make.PackagingFileFilter;
|
||||
import com.intellij.packaging.elements.PackagingFileFilter;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.intellij.openapi.compiler.make;
|
||||
package com.intellij.packaging.elements;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
Reference in New Issue
Block a user