This commit is contained in:
nik
2012-01-27 13:32:53 +04:00
parent d0cf5ca690
commit a3bb736997
4 changed files with 4 additions and 55 deletions
@@ -966,7 +966,8 @@ public class CompileDriver {
boolean didSomething = false;
final CompilerManager compilerManager = CompilerManager.getInstance(myProject);
GenericCompilerRunner runner = new GenericCompilerRunner(context, myCompilerFilter, compilerManager, isRebuild, onlyCheckStatus);
GenericCompilerRunner runner = new GenericCompilerRunner(context, isRebuild, onlyCheckStatus,
compilerManager.getCompilers(GenericCompiler.class, myCompilerFilter));
try {
didSomething |= generateSources(compilerManager, context, forceCompile, onlyCheckStatus);
@@ -53,14 +53,12 @@ public class GenericCompilerRunner {
private final Project myProject;
public GenericCompilerRunner(CompileContext context,
CompilerFilter compilerFilter,
CompilerManager compilerManager,
boolean forceCompile,
boolean onlyCheckStatus) {
boolean onlyCheckStatus, final GenericCompiler[] compilers) {
myContext = context;
myForceCompile = forceCompile;
myOnlyCheckStatus = onlyCheckStatus;
myCompilers = compilerManager.getCompilers(GenericCompiler.class, compilerFilter);
myCompilers = compilers;
myProject = myContext.getProject();
}
@@ -1,48 +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.openapi.compiler.generic;
import com.intellij.openapi.compiler.CompileContext;
import org.jetbrains.annotations.NotNull;
import java.util.Collections;
import java.util.List;
/**
* @author nik
*/
public abstract class SingleTargetCompilerInstance<Item extends CompileItem<K,S,O>, K,S, O> extends
GenericCompilerInstance<BuildTarget, Item, K, S, O> {
protected SingleTargetCompilerInstance(CompileContext context) {
super(context);
}
@NotNull
@Override
public List<BuildTarget> getAllTargets() {
return Collections.singletonList(BuildTarget.DEFAULT);
}
@NotNull
@Override
public List<BuildTarget> getSelectedTargets() {
return getAllTargets();
}
@Override
public void processObsoleteTarget(@NotNull String targetId, @NotNull List<GenericCompilerCacheState<K, S, O>> obsoleteItems) {
}
}
@@ -16,8 +16,6 @@
package com.intellij.openapi.compiler.generic;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.io.EnumeratorStringDescriptor;
import com.intellij.util.io.KeyDescriptor;
import org.jetbrains.annotations.NotNull;
/**