mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -32,7 +32,6 @@ import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.PsiReference;
|
||||
import com.intellij.util.Function;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -316,7 +315,7 @@ public class TemplateBuilderImpl implements TemplateBuilder {
|
||||
final RangeMarker key = wrapElement(element);
|
||||
myAlwaysStopAtMap.put(key, alwaysStopAt ? Boolean.TRUE : Boolean.FALSE);
|
||||
myVariableNamesMap.put(key, varName);
|
||||
mySkipOnStartMap.put(key, Boolean.valueOf(skipOnStart));
|
||||
mySkipOnStartMap.put(key, skipOnStart);
|
||||
replaceElement(key, expression);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,27 +20,22 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.PsiManager;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class DisposedPsiManagerCheck {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.execution.impl.DisposedPsiManagerCheck");
|
||||
private final Throwable myAllocationPlace;
|
||||
private final Project myProject;
|
||||
|
||||
public DisposedPsiManagerCheck(final Project project) {
|
||||
public DisposedPsiManagerCheck(@NotNull Project project) {
|
||||
myProject = project;
|
||||
myAllocationPlace = new Throwable();
|
||||
}
|
||||
|
||||
public void performCheck() {
|
||||
final PsiManager psiManager = PsiManager.getInstance(myProject);
|
||||
if (psiManager == null)
|
||||
log("Is null");
|
||||
else if (psiManager.isDisposed())
|
||||
log("Disposed");
|
||||
}
|
||||
|
||||
private void log(@NonNls final String message) {
|
||||
LOG.error(message + "\n" + StringUtil.getThrowableText(myAllocationPlace));
|
||||
if (psiManager.isDisposed()) {
|
||||
LOG.error("Disposed" + "\n" + StringUtil.getThrowableText(myAllocationPlace));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,12 +101,7 @@ public class ConsoleViewContentType {
|
||||
}
|
||||
|
||||
public static synchronized ConsoleViewContentType getConsoleViewType(final Key processOutputType) {
|
||||
if (ourRegisteredTypes.containsKey(processOutputType)) {
|
||||
return ourRegisteredTypes.get(processOutputType);
|
||||
}
|
||||
else {
|
||||
return SYSTEM_OUTPUT;
|
||||
}
|
||||
return ourRegisteredTypes.getOrDefault(processOutputType, SYSTEM_OUTPUT);
|
||||
}
|
||||
|
||||
public static synchronized Collection<ConsoleViewContentType> getRegisteredTypes() {
|
||||
|
||||
Reference in New Issue
Block a user