unused code removed

This commit is contained in:
nik
2012-07-25 20:21:57 +04:00
parent 4c2852b720
commit dbeee4f6ff
5 changed files with 6 additions and 22 deletions
@@ -148,8 +148,7 @@ public class ArtifactSourceFilesState extends CompositeStorageOwner {
private ArtifactInstructionsBuilder computeInstructions() {
final JpsCompositePackagingElement rootElement = myArtifact.getRootElement();
ArtifactInstructionsBuilderContext context = new ArtifactInstructionsBuilderContextImpl(myProject,
myModel, myRootsIndex, new ProjectPaths(myModel.getProject()));
ArtifactInstructionsBuilderContext context = new ArtifactInstructionsBuilderContextImpl(myModel, myRootsIndex, new ProjectPaths(myModel.getProject()));
final ArtifactInstructionsBuilderImpl instructionsBuilder = new ArtifactInstructionsBuilderImpl(myRootsIndex, myProject.getIgnoredFilePatterns());
final CopyToDirectoryInstructionCreator instructionCreator = new CopyToDirectoryInstructionCreator(instructionsBuilder, myArtifact.getOutputPath());
LayoutElementBuildersRegistry.getInstance().generateInstructions(rootElement, instructionCreator, context);
@@ -42,7 +42,7 @@ public class IncArtifactBuilder extends ProjectLevelBuilder {
affected.add(artifact);
}
}
final Set<JpsArtifact> toBuild = ArtifactSorter.addIncludedArtifacts(affected, context.getProjectDescriptor().project, context.getProjectDescriptor().jpsModel);
final Set<JpsArtifact> toBuild = ArtifactSorter.addIncludedArtifacts(affected);
final ArtifactSorter sorter = new ArtifactSorter(context.getProjectDescriptor().jpsModel);
final Map<JpsArtifact, JpsArtifact> selfIncludingNameMap = sorter.getArtifactToSelfIncludingNameMap();
@@ -24,7 +24,6 @@ import com.intellij.util.graph.GraphGenerator;
import gnu.trove.TIntArrayList;
import gnu.trove.TIntProcedure;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.Project;
import org.jetbrains.jps.model.JpsModel;
import org.jetbrains.jps.model.JpsProject;
import org.jetbrains.jps.model.artifact.JpsArtifact;
@@ -120,17 +119,15 @@ public class ArtifactSorter {
}
@NotNull
public static Set<JpsArtifact> addIncludedArtifacts(@NotNull Collection<JpsArtifact> artifacts, @NotNull Project project, JpsModel model) {
public static Set<JpsArtifact> addIncludedArtifacts(@NotNull Collection<JpsArtifact> artifacts) {
Set<JpsArtifact> result = new HashSet<JpsArtifact>();
for (JpsArtifact artifact : artifacts) {
collectIncludedArtifacts(artifact, project, model, new HashSet<JpsArtifact>(), result, true);
collectIncludedArtifacts(artifact, new HashSet<JpsArtifact>(), result, true);
}
return result;
}
private static void collectIncludedArtifacts(JpsArtifact artifact,
final Project project,
final JpsModel model,
final Set<JpsArtifact> processed,
final Set<JpsArtifact> result,
final boolean withOutputPathOnly) {
@@ -144,7 +141,7 @@ public class ArtifactSorter {
processIncludedArtifacts(artifact, new Consumer<JpsArtifact>() {
@Override
public void consume(JpsArtifact included) {
collectIncludedArtifacts(included, project, model, processed, result, withOutputPathOnly);
collectIncludedArtifacts(included, processed, result, withOutputPathOnly);
}
});
}
@@ -1,7 +1,6 @@
package org.jetbrains.jps.incremental.artifacts.instructions;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.Project;
import org.jetbrains.jps.ProjectPaths;
import org.jetbrains.jps.incremental.ModuleRootsIndex;
import org.jetbrains.jps.model.JpsModel;
@@ -11,8 +10,6 @@ import org.jetbrains.jps.model.JpsProject;
* @author nik
*/
public interface ArtifactInstructionsBuilderContext {
@NotNull
Project getProject();
@NotNull
ProjectPaths getProjectPaths();
@@ -1,7 +1,6 @@
package org.jetbrains.jps.incremental.artifacts.instructions;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.Project;
import org.jetbrains.jps.ProjectPaths;
import org.jetbrains.jps.incremental.ModuleRootsIndex;
import org.jetbrains.jps.model.JpsModel;
@@ -11,14 +10,12 @@ import org.jetbrains.jps.model.JpsProject;
* @author nik
*/
public class ArtifactInstructionsBuilderContextImpl implements ArtifactInstructionsBuilderContext {
private final Project myProject;
private final JpsProject myJpsProject;
private final ModuleRootsIndex myRootsIndex;
private final ProjectPaths myProjectPaths;
private JpsModel myModel;
public ArtifactInstructionsBuilderContextImpl(Project project, JpsModel jpsModel, ModuleRootsIndex rootsIndex, ProjectPaths projectPaths) {
myProject = project;
public ArtifactInstructionsBuilderContextImpl(JpsModel jpsModel, ModuleRootsIndex rootsIndex, ProjectPaths projectPaths) {
myJpsProject = jpsModel.getProject();
myModel = jpsModel;
myRootsIndex = rootsIndex;
@@ -40,12 +37,6 @@ public class ArtifactInstructionsBuilderContextImpl implements ArtifactInstructi
return myModel;
}
@NotNull
@Override
public Project getProject() {
return myProject;
}
@NotNull
@Override
public ProjectPaths getProjectPaths() {