mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-intentions] IDEA-376348 Fix false positive resulting in generation of red code
GitOrigin-RevId: 83bf865badb4dc8cde4c715ac6d457247acdc171
This commit is contained in:
committed by
intellij-monorepo-bot
parent
719c314f78
commit
a07259351d
+2
@@ -11,6 +11,7 @@ import com.intellij.icons.AllIcons;
|
||||
import com.intellij.java.JavaBundle;
|
||||
import com.intellij.java.syntax.parser.JavaKeywords;
|
||||
import com.intellij.lang.java.JavaLanguage;
|
||||
import com.intellij.lang.jvm.JvmModifier;
|
||||
import com.intellij.modcommand.*;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.DumbAware;
|
||||
@@ -49,6 +50,7 @@ public final class DefineParamsDefaultValueAction extends PsiBasedModCommandActi
|
||||
final PsiElement parent = PsiTreeUtil.getParentOfType(element, PsiMethod.class, PsiClass.class, PsiCodeBlock.class);
|
||||
String message;
|
||||
if (parent instanceof PsiMethod method) {
|
||||
if (!method.hasModifier(JvmModifier.ABSTRACT) && method.getBody() == null) return null;
|
||||
final PsiParameterList parameterList = method.getParameterList();
|
||||
if (parameterList.isEmpty()) return null;
|
||||
final PsiClass containingClass = method.getContainingClass();
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
// "Generate overloaded constructor with default parameter values" "false"
|
||||
|
||||
package com.intellij.openapi.graph.services;
|
||||
|
||||
public final class GraphExportService {
|
||||
|
||||
private vola<caret>tile boo(lean myPrintMode = false;
|
||||
private volatile boolean myExportMode = false;
|
||||
|
||||
private static final GraphExportService INSTANCE = new GraphExportService();
|
||||
|
||||
public static GraphExportService getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
private GraphExportService() {
|
||||
}
|
||||
|
||||
public boolean isPrintMode() {
|
||||
return myPrintMode;
|
||||
}
|
||||
|
||||
public void setPrintMode(boolean printMode) {
|
||||
myPrintMode = printMode;
|
||||
}
|
||||
|
||||
public boolean isExportMode() {
|
||||
return myExportMode;
|
||||
}
|
||||
|
||||
public void setExportMode(boolean exportMode) {
|
||||
myExportMode = exportMode;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user