mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup - utility class is not final
GitOrigin-RevId: 8316dda270250f58e492f0cef0098f317609a084
This commit is contained in:
committed by
intellij-monorepo-bot
parent
62c391d886
commit
19b837415d
+1
-1
@@ -9,7 +9,7 @@ import com.intellij.psi.PsiReference;
|
||||
import com.intellij.psi.impl.source.tree.LazyParseableElement;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class HighlightingPsiUtil {
|
||||
public final class HighlightingPsiUtil {
|
||||
public static boolean hasReferenceInside(@NotNull PsiElement psiElement) {
|
||||
boolean[] result = new boolean[1];
|
||||
psiElement.accept(new PsiRecursiveElementWalkingVisitor(){
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.Map;
|
||||
* @author Michael Baranov
|
||||
*
|
||||
*/
|
||||
public class Microba {
|
||||
public final class Microba {
|
||||
|
||||
private static final UIChangeListener changeListener = new UIChangeListener();
|
||||
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
class InjectedLanguageFragmentSyntaxUtil {
|
||||
final class InjectedLanguageFragmentSyntaxUtil {
|
||||
@Contract(pure = true)
|
||||
static List<HighlightInfo> addSyntaxInjectedFragmentInfo(@NotNull EditorColorsScheme scheme,
|
||||
@NotNull TextRange hostRange,
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import java.util.function.Function;
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
@ApiStatus.Internal
|
||||
public class AnnotationSessionImpl {
|
||||
public final class AnnotationSessionImpl {
|
||||
@ApiStatus.Internal
|
||||
public static <T> T computeWithSession(@NotNull PsiFile psiFile, boolean batchMode, @NotNull Function<? super AnnotationHolderImpl, T> runnable) {
|
||||
AnnotationSession session = com.intellij.codeInsight.daemon.impl.AnnotationSessionImpl.create(psiFile);
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public class InspectionWrapperUtil {
|
||||
public final class InspectionWrapperUtil {
|
||||
public static @NotNull InspectionToolWrapper<?,?> wrapTool(@NotNull InspectionProfileEntry profileEntry) {
|
||||
if (profileEntry instanceof LocalInspectionTool local) {
|
||||
LocalInspectionToolWrapper wrapper = new LocalInspectionToolWrapper(local);
|
||||
|
||||
@@ -1,27 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2023 JetBrains s.r.o.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package com.jetbrains;
|
||||
|
||||
@@ -52,7 +29,7 @@ import java.lang.reflect.InvocationTargetException;
|
||||
* @implNote JBR API is initialized on first access to this class (in static initializer).
|
||||
* Actual implementation is linked on demand, when corresponding service is requested by client.
|
||||
*/
|
||||
public class JBR {
|
||||
public final class JBR {
|
||||
|
||||
private static final ServiceApi api;
|
||||
private static final Exception bootstrapException;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.codeInsight.daemon.impl;
|
||||
|
||||
import com.intellij.openapi.util.Pair;
|
||||
@@ -14,7 +14,7 @@ import java.util.Map;
|
||||
* Methods for storing CPU profiler data for inspection run session and retrieve it later during the next inspection pass
|
||||
* to optimize "run inspection tool-to-warning onscreen" latency
|
||||
*/
|
||||
class InspectionProfilerDataHolder {
|
||||
final class InspectionProfilerDataHolder {
|
||||
/**
|
||||
* after inspections completed, save their latencies (from corresponding {@link InspectionRunner.InspectionContext#holder})
|
||||
* to use later in {@link #sortByLatencies(PsiFile, List, HighlightInfoUpdaterImpl)}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TrustedProjectUtil {
|
||||
public final class TrustedProjectUtil {
|
||||
public static @NotNull List<Integer> findAllIndexesOfSymbol(@NotNull CharSequence charSequence, char character) {
|
||||
List<Integer> result = new ArrayList<>();
|
||||
int firstIndex = 0;
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ package com.intellij.ide.structureView.logical;
|
||||
import com.intellij.ide.structureView.StructureViewTreeElement;
|
||||
import com.intellij.openapi.actionSystem.DataKey;
|
||||
|
||||
public class LogicalStructureDataKeys {
|
||||
public final class LogicalStructureDataKeys {
|
||||
|
||||
public static final DataKey<StructureViewTreeElement> STRUCTURE_TREE_ELEMENT = DataKey.create("structure_tree_element");
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.psi.impl.source.tree.injected;
|
||||
|
||||
import com.intellij.lang.injection.InjectedLanguageManager;
|
||||
@@ -14,7 +14,7 @@ import com.intellij.openapi.project.DumbService;
|
||||
import com.intellij.psi.LanguageInjector;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class InjectedTestUtil {
|
||||
public final class InjectedTestUtil {
|
||||
public static void registerMockInjectedLanguageManager(@NotNull MockApplication application,
|
||||
@NotNull MockProjectEx project,
|
||||
@NotNull PluginDescriptor pluginDescriptor) {
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.stream.Stream;
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
public final class ContainerUtil {
|
||||
@ApiStatus.Internal
|
||||
public static class Options {
|
||||
public static final class Options {
|
||||
@ApiStatus.Internal
|
||||
public static boolean RETURN_REALLY_UNMODIFIABLE_COLLECTION_FROM_METHODS_MARKED_UNMODIFIABLE;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.goide.psi.impl.GoPsiUtil;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
class GoPsiHelper {
|
||||
final class GoPsiHelper {
|
||||
|
||||
private static final Map<String, Integer> ENV_FUNCTIONS = Map.of(
|
||||
"os.getenv", 0,
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class JavaEnvironmentClasses {
|
||||
public final class JavaEnvironmentClasses {
|
||||
public static boolean isDirectMethodCall(String methodName) {
|
||||
return methodName.equals("getenv") || methodName.equals("getEnv");
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.intellij.psi.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
class JavaPsiHelper {
|
||||
final class JavaPsiHelper {
|
||||
/**
|
||||
* Checks that this element environment string
|
||||
*
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import ru.adelf.idea.dotenv.models.KeyUsagePsiElement;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
class KotlinPsiHelper {
|
||||
final class KotlinPsiHelper {
|
||||
/**
|
||||
* Checks that this element environment string
|
||||
*
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.intellij.psi.PsiRecursiveElementWalkingVisitor;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class DotEnvFactory {
|
||||
public final class DotEnvFactory {
|
||||
public static PsiElement createFromText(@NotNull Project project, @NotNull IElementType type, @NotNull String text) {
|
||||
final Ref<PsiElement> ret = new Ref<>();
|
||||
PsiFile dummyFile = createDummyFile(project, text);
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import ru.adelf.idea.dotenv.util.EnvironmentVariablesUtil;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class EnvironmentVariablesApi {
|
||||
public final class EnvironmentVariablesApi {
|
||||
|
||||
public static @NotNull Map<String, String> getAllKeyValues(Project project) {
|
||||
FileBasedIndex fileBasedIndex = FileBasedIndex.getInstance();
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.PsiFileFactory;
|
||||
import ru.adelf.idea.dotenv.DotEnvFileType;
|
||||
|
||||
class DotEnvElementFactory {
|
||||
final class DotEnvElementFactory {
|
||||
static DotEnvProperty createProperty(Project project, String name) {
|
||||
final DotEnvFile file = createFile(project, name);
|
||||
return (DotEnvProperty) file.getFirstChild();
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import ru.adelf.idea.dotenv.api.EnvironmentVariablesProvider;
|
||||
import ru.adelf.idea.dotenv.api.EnvironmentVariablesUsagesProvider;
|
||||
|
||||
public class EnvironmentVariablesProviderUtil {
|
||||
public final class EnvironmentVariablesProviderUtil {
|
||||
private static final ExtensionPointName<EnvironmentVariablesProvider> providersEP
|
||||
= new ExtensionPointName<>("ru.adelf.idea.dotenv.environmentVariablesProvider");
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import java.util.Collection;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class EnvironmentVariablesUtil {
|
||||
public final class EnvironmentVariablesUtil {
|
||||
public static @NotNull EnvironmentKeyValue getKeyValueFromString(@NotNull String s) {
|
||||
int pos = s.indexOf("=");
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.jetbrains.java.decompiler.modules.decompiler.stats.SynchronizedStatem
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class LowBreakHelper {
|
||||
public final class LowBreakHelper {
|
||||
|
||||
public static void lowBreakLabels(Statement root) {
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.java.decompiler.modules.decompiler;
|
||||
|
||||
import org.jetbrains.java.decompiler.code.CodeConstants;
|
||||
@@ -23,7 +23,7 @@ import org.jetbrains.java.decompiler.util.SFormsFastMapDirect;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class StackVarsProcessor {
|
||||
public final class StackVarsProcessor {
|
||||
public static void simplifyStackVars(RootStatement root, StructMethod mt, StructClass cl) {
|
||||
CancellationManager cancellationManager = DecompilerContext.getCancellationManager();
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import java.lang.reflect.Method;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
||||
public class ExceptionUtils {
|
||||
public final class ExceptionUtils {
|
||||
static final String WRAPPED_MARKER = " [wrapped] ";
|
||||
|
||||
protected static String[] CAUSE_METHOD_NAMES = {
|
||||
|
||||
@@ -5,6 +5,6 @@ package org.jetbrains.idea.maven.buildtool;
|
||||
* @deprecated use MavenSyncSpec
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
public class MavenImportSpec {
|
||||
public final class MavenImportSpec {
|
||||
public static final MavenImportSpec IMPLICIT_IMPORT = new MavenImportSpec();
|
||||
}
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import java.io.File;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
public class MavenModulePathMapper {
|
||||
public final class MavenModulePathMapper {
|
||||
public static void resolveModulePaths(Collection<MavenProject> projects,
|
||||
Map<MavenProject, Module> mavenProjectToModule,
|
||||
Map<MavenProject, String> mavenProjectToModuleName,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.codeInsight.navigation;
|
||||
|
||||
import com.intellij.navigation.GotoRelatedItem;
|
||||
@@ -11,7 +11,7 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class DomNavigationUtil {
|
||||
public final class DomNavigationUtil {
|
||||
public static final NotNullFunction<DomElement, Collection<? extends PsiElement>> DEFAULT_DOM_CONVERTOR =
|
||||
o -> ContainerUtil.createMaybeSingletonList(o.getXmlElement());
|
||||
public static final NotNullFunction<DomElement, Collection<? extends GotoRelatedItem>> DOM_GOTO_RELATED_ITEM_PROVIDER = dom -> {
|
||||
|
||||
@@ -31,7 +31,7 @@ import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
// used externally
|
||||
@ApiStatus.NonExtendable
|
||||
public class DomUtil {
|
||||
public final class DomUtil {
|
||||
public static final TypeVariable<Class<GenericValue>> GENERIC_VALUE_TYPE_VARIABLE = GenericValue.class.getTypeParameters()[0];
|
||||
private static final Class<Void> DUMMY = void.class;
|
||||
private static final Key<DomFileElement<?>> FILE_ELEMENT_KEY = Key.create("dom file element");
|
||||
|
||||
Reference in New Issue
Block a user