Minor. Simplified by subclassing from abstract class.
This commit is contained in:
@@ -20,7 +20,7 @@ import com.intellij.diagnostic.PluginException;
|
||||
import com.intellij.ide.plugins.PluginManagerCore;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.compiler.*;
|
||||
import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.components.AbstractProjectComponent;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.io.FileUtilRt;
|
||||
@@ -38,7 +38,7 @@ import java.util.Set;
|
||||
import static org.jetbrains.kotlin.config.CompilerRunnerConstants.INTERNAL_ERROR_PREFIX;
|
||||
import static org.jetbrains.kotlin.config.CompilerRunnerConstants.KOTLIN_COMPILER_NAME;
|
||||
|
||||
public class JetCompilerManager implements ProjectComponent {
|
||||
public class JetCompilerManager extends AbstractProjectComponent {
|
||||
private static final Logger LOG = Logger.getInstance(JetCompilerManager.class);
|
||||
|
||||
// Comes from external make
|
||||
@@ -46,6 +46,7 @@ public class JetCompilerManager implements ProjectComponent {
|
||||
private static final Set<String> FILE_EXTS_WHICH_NEEDS_REFRESH = ContainerUtil.immutableSet(JavaScript.DOT_EXTENSION, ".map");
|
||||
|
||||
public JetCompilerManager(Project project, CompilerManager manager) {
|
||||
super(project);
|
||||
manager.addCompilableFileType(JetFileType.INSTANCE);
|
||||
manager.addCompilationStatusListener(new CompilationStatusListener() {
|
||||
@Override
|
||||
@@ -74,28 +75,6 @@ public class JetCompilerManager implements ProjectComponent {
|
||||
}, project);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void projectOpened() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void projectClosed() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initComponent() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeComponent() {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getComponentName() {
|
||||
return JetCompilerManager.class.getCanonicalName();
|
||||
}
|
||||
|
||||
// Extending PluginException ensures that Exception Analyzer recognizes this as a Kotlin exception
|
||||
private static class KotlinCompilerException extends PluginException {
|
||||
private final String text;
|
||||
|
||||
Reference in New Issue
Block a user