mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
minor performance: removed redundant initializers in java analysis
This commit is contained in:
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -44,10 +44,10 @@ import java.util.*;
|
||||
* @author cdr
|
||||
*/
|
||||
public class RedundantSuppressInspectionBase extends GlobalInspectionTool {
|
||||
private BidirectionalMap<String, QuickFix> myQuickFixes = null;
|
||||
private BidirectionalMap<String, QuickFix> myQuickFixes;
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.codeInspection.RedundantSuppressInspection");
|
||||
|
||||
public boolean IGNORE_ALL = false;
|
||||
public boolean IGNORE_ALL;
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -51,7 +51,7 @@ import java.util.List;
|
||||
public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTool {
|
||||
private static final Logger LOG = Logger.getInstance("#" + StreamApiMigrationInspection.class.getName());
|
||||
|
||||
public boolean REPLACE_TRIVIAL_FOREACH = false;
|
||||
public boolean REPLACE_TRIVIAL_FOREACH;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
|
||||
+7
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -26,9 +26,12 @@ import org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException;
|
||||
import org.jetbrains.org.objectweb.asm.tree.analysis.BasicValue;
|
||||
import org.jetbrains.org.objectweb.asm.tree.analysis.Frame;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.intellij.codeInspection.bytecodeAnalysis.Direction.*;
|
||||
import static com.intellij.codeInspection.bytecodeAnalysis.Direction.In;
|
||||
import static com.intellij.codeInspection.bytecodeAnalysis.Direction.InOut;
|
||||
|
||||
class AbstractValues {
|
||||
static final class ParamValue extends BasicValue {
|
||||
@@ -213,7 +216,7 @@ abstract class Analysis<Res> {
|
||||
final protected List<State>[] computed;
|
||||
final Key aKey;
|
||||
|
||||
Res earlyResult = null;
|
||||
Res earlyResult;
|
||||
|
||||
protected Analysis(RichControlFlow richControlFlow, Direction direction, boolean stable) {
|
||||
this.richControlFlow = richControlFlow;
|
||||
|
||||
+6
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -34,8 +34,9 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.intellij.codeInspection.bytecodeAnalysis.AbstractValues.*;
|
||||
import static com.intellij.codeInspection.bytecodeAnalysis.Direction.InOut;
|
||||
import static com.intellij.codeInspection.bytecodeAnalysis.Direction.Out;
|
||||
import static org.jetbrains.org.objectweb.asm.Opcodes.*;
|
||||
import static com.intellij.codeInspection.bytecodeAnalysis.Direction.*;
|
||||
|
||||
class InOutAnalysis extends Analysis<Result> {
|
||||
|
||||
@@ -47,8 +48,8 @@ class InOutAnalysis extends Analysis<Result> {
|
||||
private final Value inValue;
|
||||
private final int generalizeShift;
|
||||
private Result internalResult;
|
||||
private int id = 0;
|
||||
private int pendingTop = 0;
|
||||
private int id;
|
||||
private int pendingTop;
|
||||
|
||||
protected InOutAnalysis(RichControlFlow richControlFlow, Direction direction, boolean[] resultOrigins, boolean stable, State[] pending) {
|
||||
super(richControlFlow, direction, stable);
|
||||
@@ -273,7 +274,7 @@ class InOutInterpreter extends BasicInterpreter {
|
||||
final boolean[] resultOrigins;
|
||||
final boolean nullAnalysis;
|
||||
|
||||
boolean deReferenced = false;
|
||||
boolean deReferenced;
|
||||
|
||||
InOutInterpreter(Direction direction, InsnList insns, boolean[] resultOrigins) {
|
||||
this.direction = direction;
|
||||
|
||||
+6
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -211,12 +211,12 @@ class NullableMethodInterpreter extends BasicInterpreter implements InterpreterE
|
||||
private final int[] originsMapping;
|
||||
final Key[] keys;
|
||||
|
||||
Constraint constraint = null;
|
||||
int delta = 0;
|
||||
int nullsDelta = 0;
|
||||
Constraint constraint;
|
||||
int delta;
|
||||
int nullsDelta;
|
||||
int notNullInsn = -1;
|
||||
int notNullCall = 0;
|
||||
int notNullNull = 0;
|
||||
int notNullCall;
|
||||
int notNullNull;
|
||||
|
||||
NullableMethodInterpreter(InsnList insns, boolean[] origins, int[] originsMapping) {
|
||||
this.insns = insns;
|
||||
|
||||
+11
-11
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -34,9 +34,9 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.intellij.codeInspection.bytecodeAnalysis.AbstractValues.*;
|
||||
import static com.intellij.codeInspection.bytecodeAnalysis.Direction.In;
|
||||
import static com.intellij.codeInspection.bytecodeAnalysis.PResults.*;
|
||||
import static org.jetbrains.org.objectweb.asm.Opcodes.*;
|
||||
import static com.intellij.codeInspection.bytecodeAnalysis.Direction.*;
|
||||
|
||||
abstract class PResults {
|
||||
// SoP = sum of products
|
||||
@@ -211,9 +211,9 @@ class NonNullInAnalysis extends Analysis<PResult> {
|
||||
}
|
||||
}
|
||||
|
||||
private int id = 0;
|
||||
private Frame<BasicValue> nextFrame = null;
|
||||
private PResult subResult = null;
|
||||
private int id;
|
||||
private Frame<BasicValue> nextFrame;
|
||||
private PResult subResult;
|
||||
|
||||
@NotNull
|
||||
protected Equation analyze() throws AnalyzerException {
|
||||
@@ -383,7 +383,7 @@ class NonNullInAnalysis extends Analysis<PResult> {
|
||||
|
||||
}
|
||||
|
||||
private int pendingTop = 0;
|
||||
private int pendingTop;
|
||||
|
||||
private void pendingPush(PendingAction action) throws AnalyzerException {
|
||||
if (pendingTop >= STEPS_LIMIT) {
|
||||
@@ -437,11 +437,11 @@ class NullableInAnalysis extends Analysis<PResult> {
|
||||
}
|
||||
}
|
||||
|
||||
private int id = 0;
|
||||
private Frame<BasicValue> nextFrame = null;
|
||||
private int id;
|
||||
private Frame<BasicValue> nextFrame;
|
||||
private PResult myResult = Identity;
|
||||
private PResult subResult = Identity;
|
||||
private boolean top = false;
|
||||
private boolean top;
|
||||
|
||||
@NotNull
|
||||
protected Equation analyze() throws AnalyzerException {
|
||||
@@ -573,7 +573,7 @@ class NullableInAnalysis extends Analysis<PResult> {
|
||||
|
||||
}
|
||||
|
||||
private int pendingTop = 0;
|
||||
private int pendingTop;
|
||||
|
||||
private void pendingPush(State state) throws AnalyzerException {
|
||||
if (pendingTop >= STEPS_LIMIT) {
|
||||
@@ -602,7 +602,7 @@ class NullableInAnalysis extends Analysis<PResult> {
|
||||
}
|
||||
|
||||
abstract class NullityInterpreter extends BasicInterpreter {
|
||||
boolean top = false;
|
||||
boolean top;
|
||||
final boolean nullableAnalysis;
|
||||
final int nullityMask;
|
||||
private PResult subResult = Identity;
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -299,8 +299,8 @@ class ParametersUsage extends Interpreter<ParamsValue> {
|
||||
class IParametersUsage extends Interpreter<IParamsValue> {
|
||||
static final IParamsValue val1 = new IParamsValue(0, 1);
|
||||
static final IParamsValue val2 = new IParamsValue(0, 2);
|
||||
int leaking = 0;
|
||||
int nullableLeaking = 0;
|
||||
int leaking;
|
||||
int nullableLeaking;
|
||||
int called = -1;
|
||||
final int rangeStart;
|
||||
final int rangeEnd;
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -47,8 +47,8 @@ import java.awt.*;
|
||||
public class CanBeFinalInspection extends GlobalJavaBatchInspectionTool {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.codeInspection.canBeFinal.CanBeFinalInspection");
|
||||
|
||||
public boolean REPORT_CLASSES = false;
|
||||
public boolean REPORT_METHODS = false;
|
||||
public boolean REPORT_CLASSES;
|
||||
public boolean REPORT_METHODS;
|
||||
public boolean REPORT_FIELDS = true;
|
||||
public static final String DISPLAY_NAME = InspectionsBundle.message("inspection.can.be.final.display.name");
|
||||
@NonNls public static final String SHORT_NAME = "CanBeFinal";
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -63,10 +63,10 @@ import java.util.*;
|
||||
public class DataFlowInspectionBase extends BaseJavaBatchLocalInspectionTool {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.codeInspection.dataFlow.DataFlowInspection");
|
||||
@NonNls private static final String SHORT_NAME = "ConstantConditions";
|
||||
public boolean SUGGEST_NULLABLE_ANNOTATIONS = false;
|
||||
public boolean DONT_REPORT_TRUE_ASSERT_STATEMENTS = false;
|
||||
public boolean TREAT_UNKNOWN_MEMBERS_AS_NULLABLE = false;
|
||||
public boolean IGNORE_ASSERT_STATEMENTS = false;
|
||||
public boolean SUGGEST_NULLABLE_ANNOTATIONS;
|
||||
public boolean DONT_REPORT_TRUE_ASSERT_STATEMENTS;
|
||||
public boolean TREAT_UNKNOWN_MEMBERS_AS_NULLABLE;
|
||||
public boolean IGNORE_ASSERT_STATEMENTS;
|
||||
public boolean REPORT_CONSTANT_REFERENCE_VALUES = true;
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ public class UnusedDeclarationInspectionBase extends GlobalInspectionTool {
|
||||
final List<EntryPoint> myExtensions = ContainerUtil.createLockFreeCopyOnWriteList();
|
||||
final UnusedSymbolLocalInspectionBase myLocalInspectionBase = createUnusedSymbolLocalInspection();
|
||||
|
||||
private Set<RefElement> myProcessedSuspicious = null;
|
||||
private Set<RefElement> myProcessedSuspicious;
|
||||
private int myPhase;
|
||||
private GlobalInspectionContext myContext;
|
||||
private final boolean myEnabledInEditor;
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ import java.util.*;
|
||||
import java.util.List;
|
||||
|
||||
public class DefUseInspectionBase extends BaseJavaBatchLocalInspectionTool {
|
||||
public boolean REPORT_PREFIX_EXPRESSIONS = false;
|
||||
public boolean REPORT_PREFIX_EXPRESSIONS;
|
||||
public boolean REPORT_POSTFIX_EXPRESSIONS = true;
|
||||
public boolean REPORT_REDUNDANT_INITIALIZER = true;
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -44,7 +44,7 @@ public class DeprecationInspection extends BaseJavaBatchLocalInspectionTool {
|
||||
public static final String DISPLAY_NAME = DeprecationUtil.DEPRECATION_DISPLAY_NAME;
|
||||
public static final String IGNORE_METHODS_OF_DEPRECATED_NAME = "IGNORE_METHODS_OF_DEPRECATED";
|
||||
|
||||
public boolean IGNORE_INSIDE_DEPRECATED = false;
|
||||
public boolean IGNORE_INSIDE_DEPRECATED;
|
||||
public boolean IGNORE_ABSTRACT_DEPRECATED_OVERRIDES = true;
|
||||
public boolean IGNORE_IMPORT_STATEMENTS = true;
|
||||
public boolean IGNORE_METHODS_OF_DEPRECATED = true;
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -26,7 +26,7 @@ import javax.swing.*;
|
||||
|
||||
public class DuplicateThrowsInspection extends BaseJavaBatchLocalInspectionTool implements CleanupLocalInspectionTool {
|
||||
@SuppressWarnings("PublicField")
|
||||
public boolean ignoreSubclassing = false;
|
||||
public boolean ignoreSubclassing;
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ public abstract class EntryPointsManagerBase extends EntryPointsManager implemen
|
||||
@NonNls private static final String VERSION_ATTR = "version";
|
||||
@NonNls private static final String ENTRY_POINT_ATTR = "entry_point";
|
||||
private boolean myAddNonJavaEntries = true;
|
||||
private boolean myResolved = false;
|
||||
private boolean myResolved;
|
||||
protected final Project myProject;
|
||||
private long myLastModificationCount = -1;
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -118,7 +118,7 @@ public class InheritorsStatisticalDataSearch {
|
||||
myAllNotAnonymousInheritors = new HashSet<String>();
|
||||
}
|
||||
|
||||
private int myAnonymousInheritorsCount = 0;
|
||||
private int myAnonymousInheritorsCount;
|
||||
|
||||
private Set<String> getAllNotAnonymousInheritors() {
|
||||
return myAllNotAnonymousInheritors;
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -98,7 +98,7 @@ public class Java15APIUsageInspectionBase extends BaseJavaBatchLocalInspectionTo
|
||||
ourDefaultMethods.add("java.util.Iterator#remove()");
|
||||
}
|
||||
|
||||
protected LanguageLevel myEffectiveLanguageLevel = null;
|
||||
protected LanguageLevel myEffectiveLanguageLevel;
|
||||
|
||||
@Nullable
|
||||
private static Set<String> getForbiddenApi(@NotNull LanguageLevel languageLevel) {
|
||||
|
||||
+6
-6
@@ -78,17 +78,17 @@ public class JavaDocLocalInspectionBase extends BaseJavaBatchLocalInspectionTool
|
||||
public Options INNER_CLASS_OPTIONS = new Options("none", "");
|
||||
public Options METHOD_OPTIONS = new Options("none", "@return@param@throws or @exception");
|
||||
public Options FIELD_OPTIONS = new Options("none", "");
|
||||
public boolean IGNORE_DEPRECATED = false;
|
||||
public boolean IGNORE_DEPRECATED;
|
||||
public boolean IGNORE_JAVADOC_PERIOD = true;
|
||||
@SuppressWarnings("unused") @Deprecated
|
||||
public boolean IGNORE_DUPLICATED_THROWS = false;
|
||||
public boolean IGNORE_POINT_TO_ITSELF = false;
|
||||
public boolean IGNORE_DUPLICATED_THROWS;
|
||||
public boolean IGNORE_POINT_TO_ITSELF;
|
||||
|
||||
public String myAdditionalJavadocTags = "";
|
||||
|
||||
private boolean myIgnoreDuplicatedThrows = true;
|
||||
private boolean myIgnoreEmptyDescriptions = false;
|
||||
private boolean myIgnoreSimpleAccessors = false;
|
||||
private boolean myIgnoreEmptyDescriptions;
|
||||
private boolean myIgnoreSimpleAccessors;
|
||||
|
||||
public void setPackageOption(String modifier, String tags) {
|
||||
PACKAGE_OPTIONS.ACCESS_JAVADOC_REQUIRED_FOR = modifier;
|
||||
@@ -451,7 +451,7 @@ public class JavaDocLocalInspectionBase extends BaseJavaBatchLocalInspectionTool
|
||||
private class ProblemHolderImpl implements JavadocHighlightUtil.ProblemHolder {
|
||||
private final InspectionManager myManager;
|
||||
private final boolean myOnTheFly;
|
||||
private List<ProblemDescriptor> myProblems = null;
|
||||
private List<ProblemDescriptor> myProblems;
|
||||
|
||||
private ProblemHolderImpl(InspectionManager manager, boolean onTheFly) {
|
||||
myManager = manager;
|
||||
|
||||
+2
-2
@@ -52,9 +52,9 @@ public class NullableStuffInspectionBase extends BaseJavaBatchLocalInspectionToo
|
||||
@SuppressWarnings({"WeakerAccess"}) public boolean REPORT_NOTNULL_PARAMETER_OVERRIDES_NULLABLE = true;
|
||||
@Deprecated @SuppressWarnings({"WeakerAccess"}) public boolean REPORT_NOT_ANNOTATED_PARAMETER_OVERRIDES_NOTNULL = true;
|
||||
@SuppressWarnings({"WeakerAccess"}) public boolean REPORT_NOT_ANNOTATED_GETTER = true;
|
||||
@SuppressWarnings({"WeakerAccess"}) public boolean IGNORE_EXTERNAL_SUPER_NOTNULL = false;
|
||||
@SuppressWarnings({"WeakerAccess"}) public boolean IGNORE_EXTERNAL_SUPER_NOTNULL;
|
||||
@SuppressWarnings({"WeakerAccess"}) public boolean REQUIRE_NOTNULL_FIELDS_INITIALIZED = true;
|
||||
@SuppressWarnings({"WeakerAccess"}) public boolean REPORT_NOTNULL_PARAMETERS_OVERRIDES_NOT_ANNOTATED = false;
|
||||
@SuppressWarnings({"WeakerAccess"}) public boolean REPORT_NOTNULL_PARAMETERS_OVERRIDES_NOT_ANNOTATED;
|
||||
@Deprecated @SuppressWarnings({"WeakerAccess"}) public boolean REPORT_NOT_ANNOTATED_SETTER_PARAMETER = true;
|
||||
@Deprecated @SuppressWarnings({"WeakerAccess"}) public boolean REPORT_ANNOTATION_NOT_PROPAGATED_TO_OVERRIDERS = true; // remains for test
|
||||
@SuppressWarnings({"WeakerAccess"}) public boolean REPORT_NULLS_PASSED_TO_NON_ANNOTATED_METHOD = true;
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -46,8 +46,8 @@ public class RedundantCastInspection extends GenericsInspectionToolBase {
|
||||
private static final String DISPLAY_NAME = InspectionsBundle.message("inspection.redundant.cast.display.name");
|
||||
@NonNls private static final String SHORT_NAME = "RedundantCast";
|
||||
|
||||
public boolean IGNORE_ANNOTATED_METHODS = false;
|
||||
public boolean IGNORE_SUSPICIOUS_METHOD_CALLS = false;
|
||||
public boolean IGNORE_ANNOTATED_METHODS;
|
||||
public boolean IGNORE_SUSPICIOUS_METHOD_CALLS;
|
||||
|
||||
|
||||
public RedundantCastInspection() {
|
||||
|
||||
+6
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -50,11 +50,11 @@ public class UncheckedWarningLocalInspectionBase extends BaseJavaBatchLocalInspe
|
||||
public static final String DISPLAY_NAME = InspectionsBundle.message("unchecked.warning");
|
||||
@NonNls private static final String ID = "unchecked";
|
||||
private static final Logger LOG = Logger.getInstance("#" + UncheckedWarningLocalInspectionBase.class);
|
||||
public boolean IGNORE_UNCHECKED_ASSIGNMENT = false;
|
||||
public boolean IGNORE_UNCHECKED_GENERICS_ARRAY_CREATION = false;
|
||||
public boolean IGNORE_UNCHECKED_CALL = false;
|
||||
public boolean IGNORE_UNCHECKED_CAST = false;
|
||||
public boolean IGNORE_UNCHECKED_OVERRIDING = false;
|
||||
public boolean IGNORE_UNCHECKED_ASSIGNMENT;
|
||||
public boolean IGNORE_UNCHECKED_GENERICS_ARRAY_CREATION;
|
||||
public boolean IGNORE_UNCHECKED_CALL;
|
||||
public boolean IGNORE_UNCHECKED_CAST;
|
||||
public boolean IGNORE_UNCHECKED_OVERRIDING;
|
||||
|
||||
protected static JCheckBox createSetting(final String cbText,
|
||||
final boolean option,
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ public class VisibilityInspection extends GlobalJavaBatchInspectionTool {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.codeInspection.visibility.VisibilityInspection");
|
||||
public boolean SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS = true;
|
||||
public boolean SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES = true;
|
||||
public boolean SUGGEST_PRIVATE_FOR_INNERS = false;
|
||||
public boolean SUGGEST_PRIVATE_FOR_INNERS;
|
||||
private static final String DISPLAY_NAME = InspectionsBundle.message("inspection.visibility.display.name");
|
||||
@NonNls public static final String SHORT_NAME = "WeakerAccess";
|
||||
private static final String CAN_BE_PRIVATE = InspectionsBundle.message("inspection.visibility.compose.suggestion", VisibilityUtil.toPresentableText(PsiModifier.PRIVATE));
|
||||
|
||||
+7
-7
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -26,13 +26,13 @@ import java.util.LinkedHashSet;
|
||||
* @author peter
|
||||
*/
|
||||
public class JavaClassFindUsagesOptions extends JavaFindUsagesOptions {
|
||||
public boolean isMethodsUsages = false;
|
||||
public boolean isFieldsUsages = false;
|
||||
public boolean isDerivedClasses = false;
|
||||
public boolean isImplementingClasses = false;
|
||||
public boolean isDerivedInterfaces = false;
|
||||
public boolean isMethodsUsages;
|
||||
public boolean isFieldsUsages;
|
||||
public boolean isDerivedClasses;
|
||||
public boolean isImplementingClasses;
|
||||
public boolean isDerivedInterfaces;
|
||||
public boolean isCheckDeepInheritance = true;
|
||||
public boolean isIncludeInherited = false;
|
||||
public boolean isIncludeInherited;
|
||||
|
||||
public JavaClassFindUsagesOptions(@NotNull Project project) {
|
||||
super(project);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -27,7 +27,7 @@ import java.util.LinkedHashSet;
|
||||
* @author peter
|
||||
*/
|
||||
public abstract class JavaFindUsagesOptions extends FindUsagesOptions {
|
||||
public boolean isSkipImportStatements = false;
|
||||
public boolean isSkipImportStatements;
|
||||
|
||||
public JavaFindUsagesOptions(@NotNull Project project) {
|
||||
super(project);
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -26,11 +26,11 @@ import java.util.LinkedHashSet;
|
||||
* @author peter
|
||||
*/
|
||||
public class JavaMethodFindUsagesOptions extends JavaFindUsagesOptions {
|
||||
public boolean isOverridingMethods = false;
|
||||
public boolean isImplementingMethods = false;
|
||||
public boolean isOverridingMethods;
|
||||
public boolean isImplementingMethods;
|
||||
public boolean isCheckDeepInheritance = true;
|
||||
public boolean isIncludeInherited = false;
|
||||
public boolean isIncludeOverloadUsages = false;
|
||||
public boolean isIncludeInherited;
|
||||
public boolean isIncludeOverloadUsages;
|
||||
|
||||
public JavaMethodFindUsagesOptions(@NotNull Project project) {
|
||||
super(project);
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -26,9 +26,9 @@ import java.util.LinkedHashSet;
|
||||
* @author peter
|
||||
*/
|
||||
public class JavaPackageFindUsagesOptions extends JavaFindUsagesOptions {
|
||||
public boolean isClassesUsages = false;
|
||||
public boolean isClassesUsages;
|
||||
public boolean isIncludeSubpackages = true;
|
||||
public boolean isSkipPackageStatements = false;
|
||||
public boolean isSkipPackageStatements;
|
||||
|
||||
public JavaPackageFindUsagesOptions(@NotNull Project project) {
|
||||
super(project);
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -48,8 +48,8 @@ public class InputVariables {
|
||||
private ParametersFolder myFolding;
|
||||
private boolean myFoldingAvailable;
|
||||
|
||||
private Set<PsiField> myUsedInstanceFields = null;
|
||||
private boolean myPassFields = false;
|
||||
private Set<PsiField> myUsedInstanceFields;
|
||||
private boolean myPassFields;
|
||||
|
||||
public InputVariables(final List<? extends PsiVariable> inputVariables,
|
||||
Project project,
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -44,7 +44,7 @@ public class ParametersFolder {
|
||||
private final Set<String> myUsedNames = new HashSet<String>();
|
||||
|
||||
private final Set<PsiVariable> myDeleted = new HashSet<PsiVariable>();
|
||||
private boolean myFoldingSelectedByDefault = false;
|
||||
private boolean myFoldingSelectedByDefault;
|
||||
|
||||
|
||||
public void clear() {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -46,7 +46,7 @@ public class DuplicatesFinder {
|
||||
private final InputVariables myParameters;
|
||||
private final List<? extends PsiVariable> myOutputParameters;
|
||||
private final List<PsiElement> myPatternAsList;
|
||||
private boolean myMultipleExitPoints = false;
|
||||
private boolean myMultipleExitPoints;
|
||||
@Nullable private final ReturnValue myReturnValue;
|
||||
|
||||
public DuplicatesFinder(PsiElement[] pattern,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -51,8 +51,8 @@ public final class Match {
|
||||
private final Map<PsiVariable, List<PsiElement>> myParameterValues = new HashMap<PsiVariable, List<PsiElement>>();
|
||||
private final Map<PsiVariable, ArrayList<PsiElement>> myParameterOccurrences = new HashMap<PsiVariable, ArrayList<PsiElement>>();
|
||||
private final Map<PsiElement, PsiElement> myDeclarationCorrespondence = new HashMap<PsiElement, PsiElement>();
|
||||
private ReturnValue myReturnValue = null;
|
||||
private Ref<PsiExpression> myInstanceExpression = null;
|
||||
private ReturnValue myReturnValue;
|
||||
private Ref<PsiExpression> myInstanceExpression;
|
||||
final Map<PsiVariable, PsiType> myChangedParams = new HashMap<PsiVariable, PsiType>();
|
||||
private final boolean myIgnoreParameterTypes;
|
||||
|
||||
|
||||
@@ -21,24 +21,24 @@ package org.jetbrains.java.generate.config;
|
||||
*/
|
||||
public class Config {
|
||||
|
||||
public boolean useFullyQualifiedName = false;
|
||||
public boolean useFullyQualifiedName;
|
||||
public InsertWhere insertNewMethodOption = InsertWhere.AT_CARET;
|
||||
public DuplicationPolicy whenDuplicatesOption = DuplicationPolicy.ASK;
|
||||
public boolean filterConstantField = true;
|
||||
public boolean filterEnumField = false;
|
||||
public boolean filterTransientModifier = false;
|
||||
public boolean filterEnumField;
|
||||
public boolean filterTransientModifier;
|
||||
public boolean filterStaticModifier = true;
|
||||
public String filterFieldName = null;
|
||||
public String filterMethodName = null;
|
||||
public String filterMethodType = null;
|
||||
public String filterFieldType = null;
|
||||
public String filterFieldName;
|
||||
public String filterMethodName;
|
||||
public String filterMethodType;
|
||||
public String filterFieldType;
|
||||
public boolean filterLoggers = true;
|
||||
public boolean addImplementSerializable = false;
|
||||
public boolean enableMethods = false;
|
||||
public boolean addImplementSerializable;
|
||||
public boolean enableMethods;
|
||||
public boolean jumpToMethod = true; // jump cursor to toString method
|
||||
public int sortElements = 0; // 0 = none, 1 = asc, 2 = desc
|
||||
public int sortElements; // 0 = none, 1 = asc, 2 = desc
|
||||
|
||||
private FilterPattern myPattern = null;
|
||||
private FilterPattern myPattern;
|
||||
|
||||
public boolean isUseFullyQualifiedName() {
|
||||
return useFullyQualifiedName;
|
||||
|
||||
@@ -51,10 +51,10 @@ public class FilterPattern {
|
||||
private boolean transientModifier;
|
||||
private boolean enumField;
|
||||
private boolean loggers;
|
||||
private Pattern methodNamePattern = null;
|
||||
private Pattern methodTypePattern = null;
|
||||
private Pattern fieldNamePattern = null;
|
||||
private Pattern fieldTypePattern = null;
|
||||
private Pattern methodNamePattern;
|
||||
private Pattern methodTypePattern;
|
||||
private Pattern fieldNamePattern;
|
||||
private Pattern fieldTypePattern;
|
||||
|
||||
public boolean fieldMatches(PsiField field) {
|
||||
if (isConstantField() && PsiAdapter.isConstantField(field)) {
|
||||
|
||||
+4
-4
@@ -53,13 +53,13 @@ public class ClassHasNoToStringMethodInspection extends AbstractToStringInspecti
|
||||
/** User options for excluded deprecated classes */
|
||||
public boolean excludeDeprecated = true; // must be public for JDOMSerialization
|
||||
/** User options for excluded enum classes */
|
||||
public boolean excludeEnum = false; // must be public for JDOMSerialization
|
||||
public boolean excludeEnum; // must be public for JDOMSerialization
|
||||
/** User options for excluded abstract classes */
|
||||
public boolean excludeAbstract = false; // must be public for JDOMSerialization
|
||||
public boolean excludeAbstract; // must be public for JDOMSerialization
|
||||
|
||||
public boolean excludeTestCode = false;
|
||||
public boolean excludeTestCode;
|
||||
|
||||
public boolean excludeInnerClasses = false;
|
||||
public boolean excludeInnerClasses;
|
||||
|
||||
public ClassHasNoToStringMethodInspection() {
|
||||
try {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -34,7 +34,7 @@ import java.util.TreeMap;
|
||||
|
||||
public class HyperlinksToClassesOption extends PrintOption {
|
||||
private JCheckBox myCbGenerateHyperlinksToClasses;
|
||||
private boolean isGenerateHyperlinksToClasses = false;
|
||||
private boolean isGenerateHyperlinksToClasses;
|
||||
|
||||
@Nullable
|
||||
public TreeMap<Integer, PsiReference> collectReferences(PsiFile psiFile, Map<PsiFile, PsiFile> filesMap) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -154,7 +154,7 @@ public class AllClassesGetter {
|
||||
int limit = Registry.intValue("ide.completion.variant.limit");
|
||||
|
||||
Processor<PsiClass> processor = new Processor<PsiClass>() {
|
||||
int count = 0;
|
||||
int count;
|
||||
final Set<String> qNames = new THashSet<String>();
|
||||
final boolean pkgContext = JavaCompletionUtil.inSomePackage(context);
|
||||
final String packagePrefix = getPackagePrefix(context, parameters.getOffset());
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2000-2016 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.codeInsight.completion;
|
||||
|
||||
import com.intellij.codeInsight.lookup.LookupElementPresentation;
|
||||
@@ -16,7 +31,7 @@ public class MemberLookupHelper {
|
||||
private final PsiMember myMember;
|
||||
private final boolean myMergedOverloads;
|
||||
@Nullable private final PsiClass myContainingClass;
|
||||
private boolean myShouldImport = false;
|
||||
private boolean myShouldImport;
|
||||
|
||||
public MemberLookupHelper(List<PsiMethod> overloads, PsiClass containingClass, boolean shouldImport) {
|
||||
this(overloads.get(0), containingClass, shouldImport, true);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -30,7 +30,10 @@ import gnu.trove.THashSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
@@ -40,7 +43,7 @@ public abstract class StaticMemberProcessor {
|
||||
private final PsiElement myPosition;
|
||||
private final Project myProject;
|
||||
private final PsiResolveHelper myResolveHelper;
|
||||
private boolean myHintShown = false;
|
||||
private boolean myHintShown;
|
||||
private final boolean myPackagedContext;
|
||||
|
||||
public StaticMemberProcessor(final PsiElement position) {
|
||||
|
||||
+7
-7
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -50,8 +50,8 @@ import java.util.Set;
|
||||
public class JavaCompletionProcessor extends BaseScopeProcessor implements ElementClassHint {
|
||||
|
||||
private final boolean myInJavaDoc;
|
||||
private boolean myStatic = false;
|
||||
private PsiElement myDeclarationHolder = null;
|
||||
private boolean myStatic;
|
||||
private PsiElement myDeclarationHolder;
|
||||
private final Map<CompletionElement, CompletionElement> myResults = new LinkedHashMap<>();
|
||||
private final Set<CompletionElement> mySecondRateResults = ContainerUtil.newIdentityTroveSet();
|
||||
private final Set<String> myShadowedNames = ContainerUtil.newHashSet();
|
||||
@@ -60,10 +60,10 @@ public class JavaCompletionProcessor extends BaseScopeProcessor implements Eleme
|
||||
private final PsiElement myElement;
|
||||
private final PsiElement myScope;
|
||||
private final ElementFilter myFilter;
|
||||
private boolean myMembersFlag = false;
|
||||
private boolean myQualified = false;
|
||||
private PsiType myQualifierType = null;
|
||||
private PsiClass myQualifierClass = null;
|
||||
private boolean myMembersFlag;
|
||||
private boolean myQualified;
|
||||
private PsiType myQualifierType;
|
||||
private PsiClass myQualifierClass;
|
||||
private final Condition<String> myMatcher;
|
||||
private final Options myOptions;
|
||||
private final boolean myAllowStaticWithInstanceQualifier;
|
||||
|
||||
+2
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -27,7 +27,6 @@ import com.intellij.openapi.ui.popup.util.BaseListPopupStep;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.ui.popup.list.ListPopupImpl;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import com.intellij.util.ObjectUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
|
||||
@@ -42,7 +41,7 @@ public class AddMethodQualifierFix implements IntentionAction {
|
||||
private static final boolean UNIT_TEST_MODE = ApplicationManager.getApplication().isUnitTestMode();
|
||||
|
||||
private final SmartPsiElementPointer<PsiMethodCallExpression> myMethodCall;
|
||||
private List<PsiVariable> myCandidates = null;
|
||||
private List<PsiVariable> myCandidates;
|
||||
|
||||
public AddMethodQualifierFix(final PsiMethodCallExpression methodCallExpression) {
|
||||
myMethodCall = SmartPointerManager.getInstance(methodCallExpression.getProject()).createSmartPsiElementPointer(methodCallExpression);
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -102,7 +102,7 @@ public class RenameWrongRefFix implements IntentionAction {
|
||||
class MyScopeProcessor extends BaseScopeProcessor {
|
||||
ArrayList<PsiElement> myResult = new ArrayList<PsiElement>();
|
||||
boolean myFilterMethods;
|
||||
boolean myFilterStatics = false;
|
||||
boolean myFilterStatics;
|
||||
|
||||
MyScopeProcessor(PsiReferenceExpression refExpression) {
|
||||
myFilterMethods = refExpression.getParent() instanceof PsiMethodCallExpression;
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -39,7 +39,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class SurroundWithTryCatchFix implements IntentionAction {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.daemon.impl.quickfix.SurroundWithTryCatchFix");
|
||||
|
||||
private PsiElement myStatement = null;
|
||||
private PsiElement myStatement;
|
||||
|
||||
public SurroundWithTryCatchFix(@NotNull PsiElement element) {
|
||||
final PsiFunctionalExpression functionalExpression = PsiTreeUtil.getParentOfType(element, PsiFunctionalExpression.class, false, PsiStatement.class);
|
||||
|
||||
+2
-2
@@ -30,8 +30,8 @@ class SwitchStatementBranch {
|
||||
new ArrayList<PsiElement>(5);
|
||||
private final List<PsiElement> m_pendingWhiteSpace =
|
||||
new ArrayList<PsiElement>(2);
|
||||
private boolean m_default = false;
|
||||
private boolean m_hasStatements = false;
|
||||
private boolean m_default;
|
||||
private boolean m_hasStatements;
|
||||
|
||||
public void addCaseValue(String labelString) {
|
||||
m_caseValues.add(labelString);
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ import org.jetbrains.annotations.TestOnly;
|
||||
import java.util.List;
|
||||
|
||||
public class AutoFormatTypedHandler extends TypedActionHandlerBase {
|
||||
private static boolean myIsEnabledInTests = false;
|
||||
private static boolean myIsEnabledInTests;
|
||||
|
||||
private static char[] NO_SPACE_AFTER = {
|
||||
'+', '-', '*', '/', '%', '&', '^', '|', '<', '>', '!', '=', ' '
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -38,7 +38,7 @@ import java.util.List;
|
||||
class DeclarationMover extends LineMover {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.editor.actions.moveUpDown.DeclarationMover");
|
||||
private PsiEnumConstant myEnumToInsertSemicolonAfter;
|
||||
private boolean moveEnumConstant = false;
|
||||
private boolean moveEnumConstant;
|
||||
|
||||
@Override
|
||||
public void beforeMove(@NotNull final Editor editor, @NotNull final MoveInfo info, final boolean down) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -46,7 +46,7 @@ import java.util.*;
|
||||
*/
|
||||
public class GenerateDelegateHandler implements LanguageCodeInsightActionHandler {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.generation.GenerateDelegateHandler");
|
||||
private boolean myToCopyJavaDoc = false;
|
||||
private boolean myToCopyJavaDoc;
|
||||
|
||||
@Override
|
||||
public boolean isValidFor(Editor editor, PsiFile file) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -37,9 +37,9 @@ import java.util.List;
|
||||
*/
|
||||
public class GenerateEqualsHandler extends GenerateMembersHandlerBase {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.generation.GenerateEqualsHandler");
|
||||
private PsiField[] myEqualsFields = null;
|
||||
private PsiField[] myHashCodeFields = null;
|
||||
private PsiField[] myNonNullFields = null;
|
||||
private PsiField[] myEqualsFields;
|
||||
private PsiField[] myHashCodeFields;
|
||||
private PsiField[] myNonNullFields;
|
||||
private static final PsiElementClassMember[] DUMMY_RESULT = new PsiElementClassMember[1]; //cannot return empty array, but this result won't be used anyway
|
||||
|
||||
public GenerateEqualsHandler() {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -53,7 +53,7 @@ public abstract class GenerateMembersHandlerBase implements CodeInsightActionHan
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.generation.GenerateMembersHandlerBase");
|
||||
|
||||
private final String myChooserTitle;
|
||||
protected boolean myToCopyJavaDoc = false;
|
||||
protected boolean myToCopyJavaDoc;
|
||||
|
||||
public GenerateMembersHandlerBase(String chooserTitle) {
|
||||
myChooserTitle = chooserTitle;
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -33,7 +33,7 @@ import java.util.Collections;
|
||||
* @author ven
|
||||
*/
|
||||
public class JavaExpressionSurroundDescriptor implements SurroundDescriptor {
|
||||
private Surrounder[] mySurrounders = null;
|
||||
private Surrounder[] mySurrounders;
|
||||
|
||||
private static final Surrounder[] SURROUNDERS = {
|
||||
new JavaWithParenthesesSurrounder(),
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -32,7 +32,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class JavaWithTryCatchSurrounder extends JavaStatementsSurrounder {
|
||||
protected boolean myGenerateFinally = false;
|
||||
protected boolean myGenerateFinally;
|
||||
|
||||
@Override
|
||||
public String getTemplateDescription() {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -40,7 +40,7 @@ public class HighlightImportedElementsHandler extends HighlightUsagesHandlerBase
|
||||
private final PsiElement myTarget;
|
||||
private final PsiImportStatementBase myImportStatement;
|
||||
private final boolean myImportStatic;
|
||||
private Map<PsiMember,List<PsiElement>> myClassReferenceListMap = null;
|
||||
private Map<PsiMember,List<PsiElement>> myClassReferenceListMap;
|
||||
|
||||
public HighlightImportedElementsHandler(Editor editor, PsiFile file, PsiElement target, PsiImportStatementBase importStatement) {
|
||||
super(editor, file);
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -146,7 +146,7 @@ public class AddOnDemandStaticImportAction extends BaseElementAtCaretIntentionAc
|
||||
|
||||
final TIntArrayList expressionToDequalifyOffsets = new TIntArrayList();
|
||||
copy.accept(new JavaRecursiveElementWalkingVisitor() {
|
||||
int delta = 0;
|
||||
int delta;
|
||||
@Override
|
||||
public void visitReferenceElement(PsiJavaCodeReferenceElement expression) {
|
||||
if (isParameterizedReference(expression)) return;
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -44,7 +44,7 @@ import java.util.List;
|
||||
|
||||
public class DeannotateIntentionAction implements IntentionAction, LowPriorityAction {
|
||||
private static final Logger LOG = Logger.getInstance("#" + DeannotateIntentionAction.class.getName());
|
||||
private String myAnnotationName = null;
|
||||
private String myAnnotationName;
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -116,7 +116,7 @@ public class ReplaceCastWithVariableAction extends PsiElementBaseIntentionAction
|
||||
|
||||
scope.accept(
|
||||
new JavaRecursiveElementWalkingVisitor() {
|
||||
private boolean inScope = false;
|
||||
private boolean inScope;
|
||||
|
||||
@Override
|
||||
public void visitElement(PsiElement element) {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -197,7 +197,7 @@ public class InferNullityAnnotationsAction extends BaseAnalysisAction {
|
||||
@Override
|
||||
public void run() {
|
||||
scope.accept(new PsiElementVisitor() {
|
||||
int myFileCount = 0;
|
||||
int myFileCount;
|
||||
|
||||
@Override
|
||||
public void visitFile(final PsiFile file) {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -44,7 +44,7 @@ import java.util.List;
|
||||
public class UnusedReturnValue extends GlobalJavaBatchInspectionTool{
|
||||
private MakeVoidQuickFix myQuickFix;
|
||||
|
||||
public boolean IGNORE_BUILDER_PATTERN = false;
|
||||
public boolean IGNORE_BUILDER_PATTERN;
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -46,7 +46,7 @@ public class CyclicDependenciesBuilder{
|
||||
private final Map<PsiPackage, Map<PsiPackage, Set<PsiFile>>> myBackwardFilesInDependentPackages = new HashMap<PsiPackage, Map<PsiPackage, Set<PsiFile>>>();
|
||||
private final Map<PsiPackage, Set<PsiPackage>> myPackageDependencies = new HashMap<PsiPackage, Set<PsiPackage>>();
|
||||
private HashMap<PsiPackage, Set<List<PsiPackage>>> myCyclicDependencies = new HashMap<PsiPackage, Set<List<PsiPackage>>>();
|
||||
private int myFileCount = 0;
|
||||
private int myFileCount;
|
||||
private final ForwardDependenciesBuilder myForwardBuilder;
|
||||
|
||||
private String myRootNodeNameInUsageView;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -33,7 +33,7 @@ public class CyclicDependenciesUtil{
|
||||
final TIntArrayList sccs = dfstBuilder.getSCCs();
|
||||
final List<Chunk<Node>> chunks = new ArrayList<Chunk<Node>>();
|
||||
sccs.forEach(new TIntProcedure() {
|
||||
int myTNumber = 0;
|
||||
int myTNumber;
|
||||
public boolean execute(int size) {
|
||||
Set<Node> packs = new LinkedHashSet<Node>();
|
||||
for (int j = 0; j < size; j++) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -31,8 +31,8 @@ import java.util.Map;
|
||||
public class DupIconsFinder {
|
||||
|
||||
private static final MultiMap<Integer, String> hashes = new MultiMap<Integer, String>();
|
||||
private static int totalClusters = 0;
|
||||
private static int totalDups = 0;
|
||||
private static int totalClusters;
|
||||
private static int totalDups;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
File root = new File("/Users/max/images/icons");
|
||||
|
||||
@@ -32,15 +32,15 @@ public class JavadocConfiguration {
|
||||
public boolean OPTION_NAVIGATOR = true;
|
||||
public boolean OPTION_INDEX = true;
|
||||
public boolean OPTION_SEPARATE_INDEX = true;
|
||||
public boolean OPTION_DOCUMENT_TAG_USE = false;
|
||||
public boolean OPTION_DOCUMENT_TAG_AUTHOR = false;
|
||||
public boolean OPTION_DOCUMENT_TAG_VERSION = false;
|
||||
public boolean OPTION_DOCUMENT_TAG_USE;
|
||||
public boolean OPTION_DOCUMENT_TAG_AUTHOR;
|
||||
public boolean OPTION_DOCUMENT_TAG_VERSION;
|
||||
public boolean OPTION_DOCUMENT_TAG_DEPRECATED = true;
|
||||
public boolean OPTION_DEPRECATED_LIST = true;
|
||||
public String OTHER_OPTIONS = "";
|
||||
public String HEAP_SIZE;
|
||||
public String LOCALE;
|
||||
public boolean OPEN_IN_BROWSER = true;
|
||||
public boolean OPTION_INCLUDE_LIBS = false;
|
||||
public boolean OPTION_LINK_TO_JDK_DOCS = false;
|
||||
public boolean OPTION_INCLUDE_LIBS;
|
||||
public boolean OPTION_LINK_TO_JDK_DOCS;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -47,7 +47,7 @@ public class JavaImportOptimizer implements ImportOptimizer {
|
||||
if (newImportList == null) return EmptyRunnable.getInstance();
|
||||
|
||||
return new CollectingInfoRunnable() {
|
||||
private int myImportListLengthDiff = 0;
|
||||
private int myImportListLengthDiff;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -71,14 +71,14 @@ public class TreeModelBuilder {
|
||||
private final Map<ScopeType, Map<Module, ModuleNode>> myModuleNodes = new HashMap<ScopeType, Map<Module, ModuleNode>>();
|
||||
private final Map<ScopeType, Map<String, ModuleGroupNode>> myModuleGroupNodes = new HashMap<ScopeType, Map<String, ModuleGroupNode>>();
|
||||
private final Map<ScopeType, Map<OrderEntry, LibraryNode>> myLibraryNodes = new HashMap<ScopeType, Map<OrderEntry, LibraryNode>>();
|
||||
private int myScannedFileCount = 0;
|
||||
private int myTotalFileCount = 0;
|
||||
private int myMarkedFileCount = 0;
|
||||
private GeneralGroupNode myAllLibsNode = null;
|
||||
private int myScannedFileCount;
|
||||
private int myTotalFileCount;
|
||||
private int myMarkedFileCount;
|
||||
private GeneralGroupNode myAllLibsNode;
|
||||
|
||||
private GeneralGroupNode mySourceRoot = null;
|
||||
private GeneralGroupNode myTestRoot = null;
|
||||
private GeneralGroupNode myLibsRoot = null;
|
||||
private GeneralGroupNode mySourceRoot;
|
||||
private GeneralGroupNode myTestRoot;
|
||||
private GeneralGroupNode myLibsRoot;
|
||||
|
||||
public static final String PRODUCTION_NAME = AnalysisScopeBundle.message("package.dependencies.production.node.text");
|
||||
public static final String TEST_NAME = AnalysisScopeBundle.message("package.dependencies.test.node.text");
|
||||
@@ -166,8 +166,8 @@ public class TreeModelBuilder {
|
||||
public void run() {
|
||||
countFiles(project);
|
||||
myFileIndex.iterateContent(new ContentIterator() {
|
||||
PackageDependenciesNode lastParent = null;
|
||||
VirtualFile dir = null;
|
||||
PackageDependenciesNode lastParent;
|
||||
VirtualFile dir;
|
||||
public boolean processFile(VirtualFile fileOrDir) {
|
||||
if (!fileOrDir.isDirectory()) {
|
||||
if (lastParent != null && !Comparing.equal(dir, fileOrDir.getParent())) {
|
||||
@@ -195,7 +195,7 @@ public class TreeModelBuilder {
|
||||
|
||||
private void processFilesRecursively(@NotNull VirtualFile file) {
|
||||
VfsUtilCore.visitChildrenRecursively(file, new VirtualFileVisitor() {
|
||||
private PackageDependenciesNode parent = null;
|
||||
private PackageDependenciesNode parent;
|
||||
|
||||
@Override
|
||||
public boolean visitFile(@NotNull VirtualFile file) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -245,7 +245,7 @@ public abstract class AbstractQualifiedReference<T extends AbstractQualifiedRefe
|
||||
}
|
||||
|
||||
protected abstract static class AbstractQualifiedReferenceResolvingProcessor extends BaseScopeProcessor {
|
||||
private boolean myFound = false;
|
||||
private boolean myFound;
|
||||
private final Set<ResolveResult> myResults = new LinkedHashSet<ResolveResult>();
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,19 +21,19 @@ public class JavaCodeStyleSettings extends CustomCodeStyleSettings {
|
||||
super("JavaCodeStyleSettings", container);
|
||||
}
|
||||
|
||||
public boolean SPACES_WITHIN_ANGLE_BRACKETS = false;
|
||||
public boolean SPACES_WITHIN_ANGLE_BRACKETS;
|
||||
|
||||
//Type arguments
|
||||
public boolean SPACE_AFTER_CLOSING_ANGLE_BRACKET_IN_TYPE_ARGUMENT = false;
|
||||
public boolean SPACE_AFTER_CLOSING_ANGLE_BRACKET_IN_TYPE_ARGUMENT;
|
||||
|
||||
//Type parameters
|
||||
public boolean SPACE_BEFORE_OPENING_ANGLE_BRACKET_IN_TYPE_PARAMETER = false;
|
||||
public boolean SPACE_BEFORE_OPENING_ANGLE_BRACKET_IN_TYPE_PARAMETER;
|
||||
public boolean SPACE_AROUND_TYPE_BOUNDS_IN_TYPE_PARAMETERS = true;
|
||||
|
||||
public boolean DO_NOT_WRAP_AFTER_SINGLE_ANNOTATION = false;
|
||||
public boolean DO_NOT_WRAP_AFTER_SINGLE_ANNOTATION;
|
||||
|
||||
public int ANNOTATION_PARAMETER_WRAP = CommonCodeStyleSettings.DO_NOT_WRAP;
|
||||
public boolean ALIGN_MULTILINE_ANNOTATION_PARAMETERS = false;
|
||||
public boolean ALIGN_MULTILINE_ANNOTATION_PARAMETERS;
|
||||
|
||||
public int BLANK_LINES_AROUND_INITIALIZER = 1;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -31,8 +31,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
public class AssignableFromFilter implements ElementFilter{
|
||||
private PsiType myType = null;
|
||||
private String myClassName = null;
|
||||
private PsiType myType;
|
||||
private String myClassName;
|
||||
|
||||
public AssignableFromFilter(PsiType type){
|
||||
myType = type;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -58,9 +58,9 @@ public abstract class AbstractJavaBlock extends AbstractBlock implements JavaBlo
|
||||
private final Indent myIndent;
|
||||
protected Indent myChildIndent;
|
||||
protected Alignment myChildAlignment;
|
||||
protected boolean myUseChildAttributes = false;
|
||||
protected boolean myUseChildAttributes;
|
||||
@NotNull protected final AlignmentStrategy myAlignmentStrategy;
|
||||
private boolean myIsAfterClassKeyword = false;
|
||||
private boolean myIsAfterClassKeyword;
|
||||
|
||||
protected Alignment myReservedAlignment;
|
||||
protected Alignment myReservedAlignment2;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -42,7 +42,7 @@ public class SyntheticCodeBlock implements Block, JavaBlock{
|
||||
private final TextRange myTextRange;
|
||||
|
||||
private ChildAttributes myChildAttributes;
|
||||
private boolean myIsIncomplete = false;
|
||||
private boolean myIsIncomplete;
|
||||
|
||||
public SyntheticCodeBlock(List<Block> subBlocks,
|
||||
Alignment alignment,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -25,7 +25,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* @author max
|
||||
*/
|
||||
public class SmartIntToIntArrayMap {
|
||||
@Nullable TIntObjectHashMap<TIntArrayList> myMultipleValuesMap = null;
|
||||
@Nullable TIntObjectHashMap<TIntArrayList> myMultipleValuesMap;
|
||||
TIntIntHashMap mySingleValueMap = new TIntIntHashMap(10, 0.9f);
|
||||
|
||||
public int[] keys() {
|
||||
|
||||
@@ -93,7 +93,7 @@ public class PsiCodeFragmentImpl extends PsiFileImpl implements JavaCodeFragment
|
||||
return clone;
|
||||
}
|
||||
|
||||
private FileViewProvider myViewProvider = null;
|
||||
private FileViewProvider myViewProvider;
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -55,7 +55,7 @@ public class SingleClassHierarchyBuilder {
|
||||
private final HierarchyService myHierarchyService;
|
||||
protected final BitSet myProcessedSet = new BitSet();
|
||||
private final ProjectFileIndex myProjectIndex;
|
||||
boolean isInSourceMode = false;
|
||||
boolean isInSourceMode;
|
||||
|
||||
private UnitProcessor(Project project, HierarchyService hierarchyService) {
|
||||
myProject = project;
|
||||
|
||||
@@ -60,9 +60,9 @@ public class JavaRefactoringSettings implements PersistentStateComponent<JavaRef
|
||||
public boolean TYPE_COOK_DROP_CASTS = true;
|
||||
public boolean TYPE_COOK_PRESERVE_RAW_ARRAYS = true;
|
||||
public boolean TYPE_COOK_LEAVE_OBJECT_PARAMETERIZED_TYPES_RAW = true;
|
||||
public boolean TYPE_COOK_EXHAUSTIVE = false;
|
||||
public boolean TYPE_COOK_COOK_OBJECTS = false;
|
||||
public boolean TYPE_COOK_PRODUCE_WILDCARDS = false;
|
||||
public boolean TYPE_COOK_EXHAUSTIVE;
|
||||
public boolean TYPE_COOK_COOK_OBJECTS;
|
||||
public boolean TYPE_COOK_PRODUCE_WILDCARDS;
|
||||
|
||||
public boolean TYPE_MIGRATION_PREVIEW_USAGES = true;
|
||||
|
||||
@@ -85,11 +85,11 @@ public class JavaRefactoringSettings implements PersistentStateComponent<JavaRef
|
||||
public boolean INHERITANCE_TO_DELEGATION_DELEGATE_OTHER;
|
||||
//public boolean REPLACE_CONSTRUCTOR_WITH_FACTORY_PREVIEW_USAGES;
|
||||
public String INTRODUCE_CONSTANT_VISIBILITY;
|
||||
public boolean INTRODUCE_CONSTANT_MOVE_TO_ANOTHER_CLASS = false;
|
||||
public boolean INTRODUCE_CONSTANT_MOVE_TO_ANOTHER_CLASS;
|
||||
public boolean CONVERT_TO_INSTANCE_METHOD_PREVIEW_USAGES = true;
|
||||
|
||||
public Boolean INTRODUCE_LOCAL_CREATE_FINALS = null;
|
||||
public Boolean INTRODUCE_PARAMETER_CREATE_FINALS = null;
|
||||
public Boolean INTRODUCE_LOCAL_CREATE_FINALS;
|
||||
public Boolean INTRODUCE_PARAMETER_CREATE_FINALS;
|
||||
|
||||
public boolean INLINE_CLASS_SEARCH_IN_COMMENTS = true;
|
||||
public boolean INLINE_CLASS_SEARCH_IN_NON_JAVA = true;
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -265,14 +265,14 @@ public class AnonymousToInnerHandler implements RefactoringActionHandler {
|
||||
});
|
||||
}
|
||||
|
||||
private Boolean cachedNeedsThis = null;
|
||||
private Boolean cachedNeedsThis;
|
||||
public boolean needsThis() {
|
||||
if(cachedNeedsThis == null) {
|
||||
|
||||
ElementNeedsThis memberNeedsThis = new ElementNeedsThis(myTargetClass, myAnonClass);
|
||||
myAnonClass.accept(memberNeedsThis);
|
||||
class HasExplicitThis extends JavaRecursiveElementWalkingVisitor {
|
||||
boolean hasExplicitThis = false;
|
||||
boolean hasExplicitThis;
|
||||
@Override public void visitReferenceExpression(PsiReferenceExpression expression) {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -20,11 +20,11 @@
|
||||
*/
|
||||
package com.intellij.refactoring.anonymousToInner;
|
||||
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.PsiVariable;
|
||||
|
||||
public class VariableInfo {
|
||||
public PsiVariable variable;
|
||||
public boolean saveInField = false;
|
||||
public boolean saveInField;
|
||||
public boolean passAsParameter = true;
|
||||
public String parameterName;
|
||||
public String fieldName;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -49,14 +49,14 @@ public class JavaChangeInfoImpl extends UserDataHolderBase implements JavaChange
|
||||
final ParameterInfoImpl[] newParms;
|
||||
ThrownExceptionInfo[] newExceptions;
|
||||
final boolean[] toRemoveParm;
|
||||
boolean isVisibilityChanged = false;
|
||||
boolean isNameChanged = false;
|
||||
boolean isReturnTypeChanged = false;
|
||||
boolean isParameterSetOrOrderChanged = false;
|
||||
boolean isExceptionSetChanged = false;
|
||||
boolean isExceptionSetOrOrderChanged = false;
|
||||
boolean isParameterNamesChanged = false;
|
||||
boolean isParameterTypesChanged = false;
|
||||
boolean isVisibilityChanged;
|
||||
boolean isNameChanged;
|
||||
boolean isReturnTypeChanged;
|
||||
boolean isParameterSetOrOrderChanged;
|
||||
boolean isExceptionSetChanged;
|
||||
boolean isExceptionSetOrOrderChanged;
|
||||
boolean isParameterNamesChanged;
|
||||
boolean isParameterTypesChanged;
|
||||
boolean isPropagationEnabled = true;
|
||||
final boolean wasVararg;
|
||||
final boolean retainsVarargs;
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -128,8 +128,8 @@ public class ExtractMethodProcessor implements MatchProvider {
|
||||
protected PsiStatement myFirstExitStatementCopy;
|
||||
private PsiMethod myExtractedMethod;
|
||||
private PsiMethodCallExpression myMethodCall;
|
||||
protected boolean myNullConditionalCheck = false;
|
||||
protected boolean myNotNullConditionalCheck = false;
|
||||
protected boolean myNullConditionalCheck;
|
||||
protected boolean myNotNullConditionalCheck;
|
||||
private Nullness myNullness;
|
||||
|
||||
public ExtractMethodProcessor(Project project,
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ public class ExtractMethodObjectProcessor extends BaseRefactoringProcessor {
|
||||
private PsiField[] myOutputFields;
|
||||
|
||||
private PsiMethod myInnerMethod;
|
||||
private boolean myMadeStatic = false;
|
||||
private boolean myMadeStatic;
|
||||
private final Set<MethodToMoveUsageInfo> myUsages = new LinkedHashSet<MethodToMoveUsageInfo>();
|
||||
private PsiClass myInnerClass;
|
||||
private boolean myChangeReturnType;
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -25,7 +25,7 @@ import com.intellij.psi.*;
|
||||
import java.util.List;
|
||||
|
||||
class BackpointerUsageVisitor extends JavaRecursiveElementWalkingVisitor {
|
||||
private PsiMember myCause = null;
|
||||
private PsiMember myCause;
|
||||
|
||||
private final List<PsiField> myFields;
|
||||
private final List<PsiClass> myInnerClasses;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -81,7 +81,7 @@ public class ExtractClassProcessor extends FixableUsagesRefactoringProcessor {
|
||||
private final String newClassName;
|
||||
private final String delegateFieldName;
|
||||
private final boolean requiresBackpointer;
|
||||
private boolean delegationRequired = false;
|
||||
private boolean delegationRequired;
|
||||
private final ExtractEnumProcessor myExtractEnumProcessor;
|
||||
private final PsiClass myClass;
|
||||
private boolean extractInnerClass;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -38,8 +38,8 @@ import java.util.Set;
|
||||
class ExtractedClassBuilder {
|
||||
private static final Logger LOGGER = Logger.getInstance("com.siyeh.rpp.extractclass.ExtractedClassBuilder");
|
||||
|
||||
private String className = null;
|
||||
private String packageName = null;
|
||||
private String className;
|
||||
private String packageName;
|
||||
private final List<PsiField> fields = new ArrayList<PsiField>(5);
|
||||
private final List<PsiMethod> methods = new ArrayList<PsiMethod>(5);
|
||||
private final List<PsiClassInitializer> initializers = new ArrayList<PsiClassInitializer>(5);
|
||||
@@ -48,9 +48,9 @@ class ExtractedClassBuilder {
|
||||
private final List<PsiTypeParameter> typeParams = new ArrayList<PsiTypeParameter>();
|
||||
private final List<PsiClass> interfaces = new ArrayList<PsiClass>();
|
||||
|
||||
private boolean requiresBackPointer = false;
|
||||
private String originalClassName = null;
|
||||
private String backPointerName = null;
|
||||
private boolean requiresBackPointer;
|
||||
private String originalClassName;
|
||||
private String backPointerName;
|
||||
private Project myProject;
|
||||
private JavaCodeStyleManager myJavaCodeStyleManager;
|
||||
private Set<PsiField> myFieldsNeedingSetters;
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -228,7 +228,7 @@ public class IntroduceConstantHandler extends BaseExpressionToFieldHandler {
|
||||
}
|
||||
|
||||
private static class IsStaticFinalInitializerExpression extends ClassMemberReferencesVisitor {
|
||||
private PsiElement myElementReference = null;
|
||||
private PsiElement myElementReference;
|
||||
private final PsiExpression myInitializer;
|
||||
|
||||
public IsStaticFinalInitializerExpression(PsiClass aClass, PsiExpression initializer) {
|
||||
|
||||
+2
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -29,7 +29,6 @@ import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.psi.PsiMethod;
|
||||
import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.refactoring.ui.MethodCellRenderer;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.ScrollPaneFactory;
|
||||
import com.intellij.ui.components.JBList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -41,7 +40,7 @@ import java.util.List;
|
||||
public class EnclosingMethodSelectionDialog extends DialogWrapper {
|
||||
private final List<PsiMethod> myEnclosingMethods;
|
||||
|
||||
private JList myEnclosingMethodsList = null;
|
||||
private JList myEnclosingMethodsList;
|
||||
private final JCheckBox myCbReplaceInstanceOf = new JCheckBox(RefactoringBundle.message("use.interface.superclass.in.instanceof"));
|
||||
private static final String REFACTORING_NAME = RefactoringBundle.message("introduce.parameter.title");
|
||||
|
||||
|
||||
+7
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -15,10 +15,12 @@
|
||||
*/
|
||||
package com.intellij.refactoring.introduceParameter;
|
||||
|
||||
import com.intellij.ui.ListCellRendererWrapper;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.LabeledComponent;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.PsiExpression;
|
||||
import com.intellij.psi.PsiLocalVariable;
|
||||
import com.intellij.psi.PsiMethod;
|
||||
import com.intellij.psi.PsiParameter;
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettingsManager;
|
||||
import com.intellij.psi.util.PsiUtil;
|
||||
import com.intellij.refactoring.IntroduceParameterRefactoring;
|
||||
@@ -27,6 +29,7 @@ import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.refactoring.introduce.inplace.KeyboardComboSwitcher;
|
||||
import com.intellij.refactoring.ui.TypeSelectorManager;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.ListCellRendererWrapper;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import gnu.trove.TIntArrayList;
|
||||
|
||||
@@ -40,7 +43,7 @@ import java.awt.event.ItemListener;
|
||||
*/
|
||||
public abstract class InplaceIntroduceParameterUI extends IntroduceParameterSettingsUI {
|
||||
private JComboBox myReplaceFieldsCb;
|
||||
private boolean myHasWriteAccess = false;
|
||||
private boolean myHasWriteAccess;
|
||||
private final Project myProject;
|
||||
private final TypeSelectorManager myTypeSelectorManager;
|
||||
private final PsiExpression[] myOccurrences;
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -60,7 +60,7 @@ public class IntroduceParameterDialog extends RefactoringDialog {
|
||||
private final boolean myMustBeFinal;
|
||||
private final PsiExpression myExpression;
|
||||
private final PsiLocalVariable myLocalVar;
|
||||
protected JCheckBox myCbDeclareFinal = null;
|
||||
protected JCheckBox myCbDeclareFinal;
|
||||
protected JCheckBox myCbCollapseToLambda;
|
||||
|
||||
// private JComponent myParameterNameField = null;
|
||||
@@ -73,7 +73,7 @@ public class IntroduceParameterDialog extends RefactoringDialog {
|
||||
private NameSuggestionsField.DataChanged myParameterNameChangedListener;
|
||||
|
||||
private final IntroduceParameterSettingsPanel myPanel;
|
||||
private boolean myHasWriteAccess = false;
|
||||
private boolean myHasWriteAccess;
|
||||
|
||||
IntroduceParameterDialog(@NotNull Project project,
|
||||
@NotNull List<UsageInfo> classMembersList,
|
||||
|
||||
+2
-2
@@ -304,7 +304,7 @@ public class IntroduceParameterProcessor extends BaseRefactoringProcessor implem
|
||||
}
|
||||
|
||||
public static class AnySupers extends JavaRecursiveElementWalkingVisitor {
|
||||
private boolean myResult = false;
|
||||
private boolean myResult;
|
||||
@Override public void visitSuperExpression(PsiSuperExpression expression) {
|
||||
myResult = true;
|
||||
}
|
||||
@@ -319,7 +319,7 @@ public class IntroduceParameterProcessor extends BaseRefactoringProcessor implem
|
||||
}
|
||||
|
||||
public class AnySameNameVariables extends JavaRecursiveElementWalkingVisitor {
|
||||
private Pair<PsiElement, String> conflict = null;
|
||||
private Pair<PsiElement, String> conflict;
|
||||
|
||||
public Pair<PsiElement, String> getConflict() {
|
||||
return conflict;
|
||||
|
||||
+8
-8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -43,18 +43,18 @@ public abstract class IntroduceParameterSettingsUI {
|
||||
protected final boolean myIsInvokedOnDeclaration;
|
||||
protected final boolean myHasInitializer;
|
||||
|
||||
protected StateRestoringCheckBox myCbDeleteLocalVariable = null;
|
||||
protected StateRestoringCheckBox myCbUseInitializer = null;
|
||||
protected JRadioButton myReplaceFieldsWithGettersNoneRadio = null;
|
||||
protected JRadioButton myReplaceFieldsWithGettersInaccessibleRadio = null;
|
||||
protected JRadioButton myReplaceFieldsWithGettersAllRadio = null;
|
||||
protected StateRestoringCheckBox myCbDeleteLocalVariable;
|
||||
protected StateRestoringCheckBox myCbUseInitializer;
|
||||
protected JRadioButton myReplaceFieldsWithGettersNoneRadio;
|
||||
protected JRadioButton myReplaceFieldsWithGettersInaccessibleRadio;
|
||||
protected JRadioButton myReplaceFieldsWithGettersAllRadio;
|
||||
protected final ButtonGroup myReplaceFieldsWithGettersButtonGroup = new ButtonGroup();
|
||||
protected final PsiParameter[] myParametersToRemove;
|
||||
protected final boolean[] myParametersToRemoveChecked;
|
||||
protected final boolean myIsLocalVariable;
|
||||
|
||||
protected JCheckBox myCbReplaceAllOccurences = null;
|
||||
protected JCheckBox myCbGenerateDelegate = null;
|
||||
protected JCheckBox myCbReplaceAllOccurences;
|
||||
protected JCheckBox myCbGenerateDelegate;
|
||||
|
||||
public IntroduceParameterSettingsUI(PsiLocalVariable onLocalVariable,
|
||||
PsiExpression onExpression,
|
||||
|
||||
+2
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -18,7 +18,6 @@ package com.intellij.refactoring.introduceVariable;
|
||||
import com.intellij.openapi.help.HelpManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.psi.JavaPsiFacade;
|
||||
import com.intellij.psi.PsiExpression;
|
||||
import com.intellij.psi.PsiNameHelper;
|
||||
import com.intellij.psi.PsiType;
|
||||
@@ -48,7 +47,7 @@ class IntroduceVariableDialog extends DialogWrapper implements IntroduceVariable
|
||||
|
||||
private NameSuggestionsField myNameField;
|
||||
private JCheckBox myCbReplaceAll;
|
||||
private StateRestoringCheckBox myCbReplaceWrite = null;
|
||||
private StateRestoringCheckBox myCbReplaceWrite;
|
||||
private JCheckBox myCbFinal;
|
||||
private boolean myCbFinalState;
|
||||
private TypeSelector myTypeSelector;
|
||||
|
||||
+1
-1
@@ -324,7 +324,7 @@ public class JavaIntroduceParameterObjectClassDescriptor extends IntroduceParame
|
||||
|
||||
private final PsiParameter param;
|
||||
|
||||
private PsiField fieldAssigned = null;
|
||||
private PsiField fieldAssigned;
|
||||
|
||||
ParamAssignmentFinder(PsiParameter param) {
|
||||
this.param = param;
|
||||
|
||||
+2
-2
@@ -30,8 +30,8 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
class ParameterObjectBuilder {
|
||||
private String className = null;
|
||||
private String packageName = null;
|
||||
private String className;
|
||||
private String packageName;
|
||||
private final List<ParameterSpec> fields = new ArrayList<ParameterSpec>(5);
|
||||
private final List<PsiTypeParameter> typeParams = new ArrayList<PsiTypeParameter>();
|
||||
private Project myProject;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -60,7 +60,7 @@ public class JavaPullUpHelper implements PullUpHelper<MemberInfo> {
|
||||
private final PsiClass myTargetSuperClass;
|
||||
private final boolean myIsTargetInterface;
|
||||
private final DocCommentPolicy myJavaDocPolicy;
|
||||
private Set<PsiMember> myMembersAfterMove = null;
|
||||
private Set<PsiMember> myMembersAfterMove;
|
||||
private final Set<PsiMember> myMembersToMove;
|
||||
private final Project myProject;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -66,8 +66,8 @@ public class PullUpProcessor extends BaseRefactoringProcessor implements PullUpD
|
||||
private final PsiClass myTargetSuperClass;
|
||||
private final MemberInfo[] myMembersToMove;
|
||||
private final DocCommentPolicy myJavaDocPolicy;
|
||||
private Set<PsiMember> myMembersAfterMove = null;
|
||||
private Set<PsiMember> myMovedMembers = null;
|
||||
private Set<PsiMember> myMembersAfterMove;
|
||||
private Set<PsiMember> myMovedMembers;
|
||||
private final Map<Language, PullUpHelper<MemberInfo>> myProcessors = ContainerUtil.newHashMap();
|
||||
|
||||
public PullUpProcessor(PsiClass sourceClass, PsiClass targetSuperClass, MemberInfo[] membersToMove, DocCommentPolicy javaDocPolicy) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -40,7 +40,7 @@ import java.util.Iterator;
|
||||
public class MigrationMapSet {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.refactoring.migration.MigrationMapSet");
|
||||
|
||||
private ArrayList<MigrationMap> myMaps = null;
|
||||
private ArrayList<MigrationMap> myMaps;
|
||||
@NonNls private static final String MIGRATION_MAP = "migrationMap";
|
||||
@NonNls private static final String ENTRY = "entry";
|
||||
@NonNls private static final String NAME = "name";
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -97,7 +97,7 @@ public class AutocreatingSingleSourceRootMoveDestination extends AutocreatingMov
|
||||
return true;
|
||||
}
|
||||
|
||||
PsiDirectory myTargetDirectory = null;
|
||||
PsiDirectory myTargetDirectory;
|
||||
private PsiDirectory getDirectory() throws IncorrectOperationException {
|
||||
if (myTargetDirectory == null) {
|
||||
myTargetDirectory = RefactoringUtil.createPackageDirectoryInSourceRoot(myPackage, mySourceRoot);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -15,7 +15,10 @@
|
||||
*/
|
||||
package com.intellij.refactoring.move.moveMembers;
|
||||
|
||||
import com.intellij.ide.util.*;
|
||||
import com.intellij.ide.util.ClassFilter;
|
||||
import com.intellij.ide.util.PackageUtil;
|
||||
import com.intellij.ide.util.TreeClassChooser;
|
||||
import com.intellij.ide.util.TreeClassChooserFactory;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.command.CommandProcessor;
|
||||
import com.intellij.openapi.editor.event.DocumentAdapter;
|
||||
@@ -39,7 +42,6 @@ import com.intellij.refactoring.move.MoveDialogBase;
|
||||
import com.intellij.refactoring.ui.JavaVisibilityPanel;
|
||||
import com.intellij.refactoring.ui.MemberSelectionPanel;
|
||||
import com.intellij.refactoring.ui.MemberSelectionTable;
|
||||
import com.intellij.refactoring.ui.RefactoringDialog;
|
||||
import com.intellij.refactoring.util.CommonRefactoringUtil;
|
||||
import com.intellij.refactoring.util.classMembers.MemberInfo;
|
||||
import com.intellij.refactoring.util.classMembers.UsesAndInterfacesDependencyMemberInfoModel;
|
||||
@@ -407,7 +409,7 @@ public class MoveMembersDialog extends MoveDialogBase implements MoveMembersOpti
|
||||
}
|
||||
|
||||
private class MyMemberInfoModel extends UsesAndInterfacesDependencyMemberInfoModel<PsiMember, MemberInfo> {
|
||||
PsiClass myTargetClass = null;
|
||||
PsiClass myTargetClass;
|
||||
public MyMemberInfoModel() {
|
||||
super(mySourceClass, null, false, DEFAULT_CONTAINMENT_VERIFIER);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -20,7 +20,7 @@ import java.util.NoSuchElementException;
|
||||
|
||||
class ArrayIterator<T> implements Iterator<T>{
|
||||
private final T[] contents;
|
||||
private int currentIndex = 0;
|
||||
private int currentIndex;
|
||||
private final Object lock = new Object();
|
||||
|
||||
ArrayIterator(T[] contents){
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -42,7 +42,7 @@ public class TurnRefsToSuperDialog extends RefactoringDialog {
|
||||
@NotNull private final PsiClass mySubClass;
|
||||
private final List mySuperClasses;
|
||||
|
||||
private JList mySuperClassesList = null;
|
||||
private JList mySuperClassesList;
|
||||
private final JCheckBox myCbReplaceInstanceOf = new JCheckBox();
|
||||
|
||||
TurnRefsToSuperDialog(Project project, @NotNull PsiClass subClass, List superClasses) {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -27,7 +27,7 @@ import java.util.*;
|
||||
* @author db
|
||||
*/
|
||||
public class PsiTypeVariableFactory {
|
||||
private int myCurrent = 0;
|
||||
private int myCurrent;
|
||||
private final List<Set<PsiTypeVariable>> myClusters = new LinkedList<Set<PsiTypeVariable>>();
|
||||
private final Map<Integer, Set<PsiTypeVariable>> myVarCluster = new HashMap<Integer, Set<PsiTypeVariable>>();
|
||||
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -481,7 +481,7 @@ public class BindingFactory {
|
||||
|
||||
if (type != null) {
|
||||
class Verifier extends PsiExtendedTypeVisitor<Void> {
|
||||
boolean myFlag = false;
|
||||
boolean myFlag;
|
||||
|
||||
@Override public Void visitTypeVariable(final PsiTypeVariable var) {
|
||||
if (var.getIndex() == index) {
|
||||
@@ -565,7 +565,7 @@ public class BindingFactory {
|
||||
|
||||
public int getWidth() {
|
||||
class MyProcecure implements TObjectProcedure<PsiType> {
|
||||
int width = 0;
|
||||
int width;
|
||||
public boolean execute(PsiType type) {
|
||||
if (substitute(type) != null) width++;
|
||||
return true;
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -50,7 +50,7 @@ public class ResolverTree {
|
||||
private final Project myProject;
|
||||
private final TObjectIntHashMap<PsiTypeVariable> myBindingDegree; //How many times this type variable is bound in the system
|
||||
private final Settings mySettings;
|
||||
private boolean mySolutionFound = false;
|
||||
private boolean mySolutionFound;
|
||||
|
||||
private Set<Constraint> myConstraints;
|
||||
|
||||
@@ -244,7 +244,7 @@ public class ResolverTree {
|
||||
final Map<PsiTypeVariable, Integer> index = new HashMap<PsiTypeVariable, Integer>();
|
||||
|
||||
sccs.forEach(new TIntProcedure() {
|
||||
int myTNumber = 0;
|
||||
int myTNumber;
|
||||
|
||||
@Override
|
||||
public boolean execute(int size) {
|
||||
|
||||
@@ -77,7 +77,7 @@ public class TypeMigrationLabeler {
|
||||
private final LinkedHashMap<TypeMigrationUsageInfo, PsiType> myNewExpressionTypeChange;
|
||||
private final LinkedHashMap<TypeMigrationUsageInfo, PsiClassType> myClassTypeArgumentsChange;
|
||||
|
||||
private TypeMigrationUsageInfo[] myMigratedUsages = null;
|
||||
private TypeMigrationUsageInfo[] myMigratedUsages;
|
||||
|
||||
private TypeMigrationUsageInfo myCurrentRoot;
|
||||
private final Map<TypeMigrationUsageInfo, HashSet<Pair<TypeMigrationUsageInfo, PsiType>>> myRootsTree =
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -22,7 +22,7 @@ import com.intellij.psi.util.PsiUtil;
|
||||
* @author dsl
|
||||
*/
|
||||
public class ElementNeedsThis extends ClassThisReferencesVisitor {
|
||||
private boolean myResult = false;
|
||||
private boolean myResult;
|
||||
private final PsiElement myMember;
|
||||
|
||||
public ElementNeedsThis(PsiClass aClass, PsiElement member) {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -26,7 +26,7 @@ import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
public class InterfaceMemberDependencyGraph<T extends PsiMember, M extends MemberInfoBase<T>> implements MemberDependencyGraph<T, M> {
|
||||
protected HashSet<T> myInterfaceDependencies = null;
|
||||
protected HashSet<T> myInterfaceDependencies;
|
||||
protected HashMap<T,HashSet<T>> myMembersToInterfacesMap = new HashMap<T, HashSet<T>>();
|
||||
protected HashSet<PsiClass> myImplementedInterfaces;
|
||||
protected HashMap<PsiClass,HashSet<T>> myMethodsFromInterfaces;
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -22,7 +22,7 @@ import com.intellij.psi.*;
|
||||
*/
|
||||
public abstract class ClassReferenceScanner {
|
||||
protected PsiClass myClass;
|
||||
private PsiReference[] myReferences = null;
|
||||
private PsiReference[] myReferences;
|
||||
|
||||
public abstract PsiReference[] findReferences();
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user