mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
obsolete code removed
This commit is contained in:
@@ -41,7 +41,6 @@ public class CompositeBuildTarget extends CompositeGenerator {
|
||||
final String depends, @Nullable String jarPath) {
|
||||
|
||||
final File moduleBaseDir = parameters.getChunk().getBaseDir();
|
||||
final Module containingModule = parameters.getContainingModule();
|
||||
final Target buildTarget = new Target(targetName, depends, targetDescription, null);
|
||||
final BuildConfiguration buildConfiguration = parameters.getBuildConfiguration();
|
||||
|
||||
|
||||
-55
@@ -21,7 +21,6 @@ import com.intellij.compiler.make.ExplodedAndJarBuildGenerator;
|
||||
import com.intellij.compiler.make.MakeUtil;
|
||||
import com.intellij.openapi.compiler.make.*;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.util.SmartList;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -105,58 +104,4 @@ public class DefaultExplodedAndJarBuildGenerator extends ExplodedAndJarBuildGene
|
||||
}
|
||||
|
||||
|
||||
|
||||
@NotNull
|
||||
public ZipFileSet[] generateTagsForJarTarget(@NotNull final BuildInstruction instruction, @NotNull final ExplodedAndJarTargetParameters parameters,
|
||||
final Ref<Boolean> tempDirUsed)
|
||||
throws Exception {
|
||||
final List<ZipFileSet> zipFileSetTags = new SmartList<ZipFileSet>();
|
||||
final String tempDirProperty = BuildProperties.getTempDirForModuleProperty(parameters.getContainingModule().getName());
|
||||
final File moduleBaseDir = parameters.getChunk().getBaseDir();
|
||||
instruction.accept(new BuildInstructionVisitor() {
|
||||
public boolean visitFileCopyInstruction(FileCopyInstruction instruction) throws RuntimeException {
|
||||
if (instruction.isExternalDependencyInstruction()) return true;
|
||||
final File sourceFile = instruction.getFile();
|
||||
final Module instructionModule = instruction.getModule();
|
||||
final String sourceLocation = GenerationUtils.toRelativePath(sourceFile.getPath(), moduleBaseDir, instructionModule,
|
||||
parameters.getGenerationOptions());
|
||||
final ZipFileSet fileSet = new ZipFileSet(sourceLocation, instruction.getOutputRelativePath(), instruction.isDirectory());
|
||||
|
||||
zipFileSetTags.add(fileSet);
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean visitJarAndCopyBuildInstruction(JarAndCopyBuildInstruction instruction) throws RuntimeException {
|
||||
if (instruction.isExternalDependencyInstruction()) return true;
|
||||
tempDirUsed.set(true);
|
||||
final String jarName = new File(instruction.getOutputRelativePath()).getName();
|
||||
final String destJarPath = BuildProperties.propertyRef(tempDirProperty)+"/"+jarName;
|
||||
|
||||
zipFileSetTags.add(new ZipFileSet(destJarPath, instruction.getOutputRelativePath(), false));
|
||||
return true;
|
||||
}
|
||||
|
||||
});
|
||||
return zipFileSetTags.toArray(new ZipFileSet[zipFileSetTags.size()]);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Tag[] generateJarBuildPrepareTags(@NotNull final BuildInstruction instruction, @NotNull final ExplodedAndJarTargetParameters parameters)
|
||||
throws Exception {
|
||||
final List<Tag> prepareTags = new SmartList<Tag>();
|
||||
final String tempDirProperty = BuildProperties.getTempDirForModuleProperty(parameters.getContainingModule().getName());
|
||||
final File moduleBaseDir = parameters.getChunk().getBaseDir();
|
||||
instruction.accept(new BuildInstructionVisitor() {
|
||||
|
||||
public boolean visitJarAndCopyBuildInstruction(JarAndCopyBuildInstruction instruction) throws RuntimeException {
|
||||
if (instruction.isExternalDependencyInstruction()) return true;
|
||||
final String jarName = new File(instruction.getOutputRelativePath()).getName();
|
||||
final String destJarPath = BuildProperties.propertyRef(tempDirProperty)+"/"+jarName;
|
||||
prepareTags.add(generateJarTag(instruction, destJarPath, moduleBaseDir, parameters.getGenerationOptions()));
|
||||
return true;
|
||||
}
|
||||
|
||||
});
|
||||
return prepareTags.toArray(new Tag[prepareTags.size()]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,15 +37,4 @@ public abstract class ExplodedAndJarBuildGenerator {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public ZipFileSet[] generateTagsForJarTarget(@NotNull BuildInstruction instruction, @NotNull ExplodedAndJarTargetParameters parameters,
|
||||
final Ref<Boolean> tempDirUsed) throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Tag[] generateJarBuildPrepareTags(@NotNull BuildInstruction instruction, @NotNull ExplodedAndJarTargetParameters parameters) throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+20
-16
@@ -56,22 +56,7 @@ public abstract class BuildParticipantBase extends BuildParticipant {
|
||||
final ConfigFile[] deploymentDescriptors = getDeploymentDescriptors();
|
||||
ApplicationManager.getApplication().runReadAction(new Runnable() {
|
||||
public void run() {
|
||||
for (ConfigFile descriptor : deploymentDescriptors) {
|
||||
VirtualFile virtualFile = descriptor.getVirtualFile();
|
||||
if (virtualFile != null) {
|
||||
ConfigFileMetaData metaData = descriptor.getMetaData();
|
||||
final File file = VfsUtil.virtualToIoFile(virtualFile);
|
||||
final String fileName;
|
||||
if (metaData.isFileNameFixed()) {
|
||||
fileName = metaData.getFileName();
|
||||
}
|
||||
else {
|
||||
fileName = virtualFile.getName();
|
||||
}
|
||||
instructions.addFileCopyInstruction(file, false, myModule, metaData.getDirectoryPath() + "/" + fileName, null);
|
||||
}
|
||||
|
||||
}
|
||||
registerDescriptorCopyingInstructions(BuildParticipantBase.this.myModule, deploymentDescriptors, instructions);
|
||||
|
||||
|
||||
final CustomConfigFile[] customDescriptors = getCustomDescriptors();
|
||||
@@ -87,6 +72,25 @@ public abstract class BuildParticipantBase extends BuildParticipant {
|
||||
});
|
||||
}
|
||||
|
||||
public static void registerDescriptorCopyingInstructions(Module module, ConfigFile[] deploymentDescriptors, BuildRecipe instructions) {
|
||||
for (ConfigFile descriptor : deploymentDescriptors) {
|
||||
VirtualFile virtualFile = descriptor.getVirtualFile();
|
||||
if (virtualFile != null) {
|
||||
ConfigFileMetaData metaData = descriptor.getMetaData();
|
||||
final File file = VfsUtil.virtualToIoFile(virtualFile);
|
||||
final String fileName;
|
||||
if (metaData.isFileNameFixed()) {
|
||||
fileName = metaData.getFileName();
|
||||
}
|
||||
else {
|
||||
fileName = virtualFile.getName();
|
||||
}
|
||||
instructions.addFileCopyInstruction(file, false, module, metaData.getDirectoryPath() + "/" + fileName, null);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected CustomConfigFile[] getCustomDescriptors() {
|
||||
return CustomConfigFile.EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user