mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
+3
-3
@@ -127,7 +127,7 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
|
||||
|
||||
@Override
|
||||
public boolean suitableForFile(@NotNull PsiFile file) {
|
||||
// both PsiJavaFile and PsiCodeFragment
|
||||
// both PsiJavaFile and PsiCodeFragment must match
|
||||
return file instanceof PsiImportHolder && !InjectedLanguageManager.getInstance(file.getProject()).isInjectedFragment(file);
|
||||
}
|
||||
|
||||
@@ -1126,7 +1126,7 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
|
||||
if (owner instanceof PsiClass) {
|
||||
final PsiClass outerClass = (PsiClass)owner;
|
||||
if (!InheritanceUtil.hasEnclosingInstanceInScope(outerClass, ref, false, false)) {
|
||||
myHolder.add(HighlightClassUtil.reportIllegalEnclosingUsage(ref, aClass, (PsiClass)owner, ref));
|
||||
myHolder.add(HighlightClassUtil.reportIllegalEnclosingUsage(ref, null, (PsiClass)owner, ref));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1552,7 +1552,7 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
|
||||
if (thenExpression != null && elseExpression != null) {
|
||||
final PsiType conditionalType = expression.getType();
|
||||
if (conditionalType != null) {
|
||||
final PsiExpression[] sides = new PsiExpression[] {thenExpression, elseExpression};
|
||||
final PsiExpression[] sides = {thenExpression, elseExpression};
|
||||
for (PsiExpression side : sides) {
|
||||
final PsiType sideType = side.getType();
|
||||
if (sideType != null && !TypeConversionUtil.isAssignable(conditionalType, sideType)) {
|
||||
|
||||
@@ -213,7 +213,7 @@ public class BlockSupportImpl extends BlockSupport {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static PsiFileImpl getFileCopy(PsiFileImpl originalFile, FileViewProvider providerCopy) {
|
||||
public static PsiFileImpl getFileCopy(@NotNull PsiFileImpl originalFile, @NotNull FileViewProvider providerCopy) {
|
||||
FileViewProvider viewProvider = originalFile.getViewProvider();
|
||||
Language language = originalFile.getLanguage();
|
||||
|
||||
|
||||
+4
-4
@@ -248,7 +248,7 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzerEx implements Pers
|
||||
|
||||
Collections.sort(passes, new Comparator<TextEditorHighlightingPass>() {
|
||||
@Override
|
||||
public int compare(TextEditorHighlightingPass o1, TextEditorHighlightingPass o2) {
|
||||
public int compare(@NotNull TextEditorHighlightingPass o1, @NotNull TextEditorHighlightingPass o2) {
|
||||
if (o1 instanceof GeneralHighlightingPass) return -1;
|
||||
if (o2 instanceof GeneralHighlightingPass) return 1;
|
||||
return 0;
|
||||
@@ -371,9 +371,9 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzerEx implements Pers
|
||||
|
||||
@TestOnly
|
||||
public void cleanupAfterTest() {
|
||||
if (!myProject.isOpen()) return;
|
||||
setUpdateByTimerEnabled(false);
|
||||
waitForTermination();
|
||||
if (myProject.isOpen()) {
|
||||
prepareForTest();
|
||||
}
|
||||
}
|
||||
|
||||
void waitForTermination() {
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ public class PassExecutorService implements Disposable {
|
||||
mySubmittedPasses.clear();
|
||||
}
|
||||
|
||||
public void submitPasses(@NotNull Map<FileEditor, HighlightingPass[]> passesMap, @NotNull DaemonProgressIndicator updateProgress) {
|
||||
void submitPasses(@NotNull Map<FileEditor, HighlightingPass[]> passesMap, @NotNull DaemonProgressIndicator updateProgress) {
|
||||
if (isDisposed()) return;
|
||||
|
||||
// null keys are ok
|
||||
|
||||
Reference in New Issue
Block a user