mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 11:50:54 +07:00
[JPS model] API cleanup: remove unused API which was deprecated for a long time (IDEA-259329)
GitOrigin-RevId: d21be8d63a974d9709cff6b275cbc508cf7a0b12
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ff0251e724
commit
84cc732603
@@ -2,7 +2,6 @@
|
||||
package org.jetbrains.jps.model.java;
|
||||
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jps.model.module.JpsModuleSourceRootType;
|
||||
|
||||
import java.util.Set;
|
||||
@@ -12,13 +11,4 @@ public final class JavaModuleSourceRootTypes {
|
||||
public static final Set<JavaResourceRootType> RESOURCES = ContainerUtil.newHashSet(JavaResourceRootType.RESOURCE, JavaResourceRootType.TEST_RESOURCE);
|
||||
public static final Set<? extends JpsModuleSourceRootType<?>> PRODUCTION = ContainerUtil.newHashSet(JavaSourceRootType.SOURCE, JavaResourceRootType.RESOURCE);
|
||||
public static final Set<? extends JpsModuleSourceRootType<?>> TESTS = ContainerUtil.newHashSet(JavaSourceRootType.TEST_SOURCE, JavaResourceRootType.TEST_RESOURCE);
|
||||
|
||||
/**
|
||||
* @deprecated in order to check that a source root is a java-specific tests root, use {@link #TESTS} set, for arbitrary roots use
|
||||
* {@link JpsModuleSourceRootType#isForTests()} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean isTestSourceOrResource(@Nullable JpsModuleSourceRootType<?> type) {
|
||||
return JavaSourceRootType.TEST_SOURCE.equals(type) || JavaResourceRootType.TEST_RESOURCE.equals(type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,34 +1,17 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.jps.model.java;
|
||||
|
||||
import java.util.Objects;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jps.model.JpsSimpleElement;
|
||||
import org.jetbrains.jps.model.ex.JpsElementBase;
|
||||
|
||||
public class JavaSourceRootProperties extends JpsElementBase<JavaSourceRootProperties> implements JpsSimpleElement<JavaSourceRootProperties> {
|
||||
import java.util.Objects;
|
||||
|
||||
public class JavaSourceRootProperties extends JpsElementBase<JavaSourceRootProperties> {
|
||||
private String myPackagePrefix = "";
|
||||
private boolean myForGeneratedSources;
|
||||
|
||||
/**
|
||||
* @deprecated do not call this method directly, use {@link JpsJavaExtensionService#createSourceRootProperties(String)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public JavaSourceRootProperties() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated do not call this method directly, use {@link JpsJavaExtensionService#createSourceRootProperties(String)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public JavaSourceRootProperties(@NotNull String packagePrefix) {
|
||||
myPackagePrefix = packagePrefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated do not call this method directly, use {@link JpsJavaExtensionService#createSourceRootProperties(String, boolean)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.Internal
|
||||
public JavaSourceRootProperties(@NotNull String packagePrefix, boolean forGeneratedSources) {
|
||||
myPackagePrefix = packagePrefix;
|
||||
myForGeneratedSources = forGeneratedSources;
|
||||
@@ -73,23 +56,4 @@ public class JavaSourceRootProperties extends JpsElementBase<JavaSourceRootPrope
|
||||
setPackagePrefix(modified.myPackagePrefix);
|
||||
setForGeneratedSources(modified.myForGeneratedSources);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setPackagePrefix(String)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
@Override
|
||||
public void setData(@NotNull JavaSourceRootProperties data) {
|
||||
applyChanges(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #getPackagePrefix()} instead
|
||||
*/
|
||||
@Deprecated
|
||||
@NotNull
|
||||
@Override
|
||||
public JavaSourceRootProperties getData() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jps.model.JpsElementChildRole;
|
||||
import org.jetbrains.jps.model.JpsElementFactory;
|
||||
import org.jetbrains.jps.model.JpsGlobal;
|
||||
@@ -57,15 +56,6 @@ public final class JpsGlobalLoader extends JpsLoaderBase {
|
||||
return loadPathVariables(model.getGlobal(), optionsDir);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link JpsModelSerializationDataService#getPathVariableValue(JpsGlobal, String)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
@Nullable
|
||||
public static String getPathVariable(JpsGlobal global, String name) {
|
||||
return JpsModelSerializationDataService.getPathVariableValue(global, name);
|
||||
}
|
||||
|
||||
private void load(@NotNull Path optionsDir) {
|
||||
Path defaultConfigFile = optionsDir.resolve("other.xml");
|
||||
LOG.debug("Loading config from " + optionsDir.toAbsolutePath());
|
||||
|
||||
@@ -16,14 +16,6 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public final class JpsModelSerializationDataService {
|
||||
/**
|
||||
* @deprecated use {@link #computeAllPathVariables(JpsGlobal)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
@NotNull
|
||||
public static Map<String, String> getAllPathVariables(JpsGlobal global) {
|
||||
return computeAllPathVariables(global);
|
||||
}
|
||||
|
||||
public static Map<String, String> computeAllPathVariables(JpsGlobal global) {
|
||||
Map<String, String> pathVariables = new HashMap<>(PathMacroUtil.getGlobalSystemMacros(false));
|
||||
|
||||
@@ -26,23 +26,9 @@ public interface JpsPathVariablesConfiguration extends JpsElement {
|
||||
|
||||
void removePathVariable(@NotNull String name);
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #getUserVariableValue(String)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
@Nullable
|
||||
String getPathVariable(@NotNull String name);
|
||||
|
||||
@Nullable
|
||||
String getUserVariableValue(@NotNull String name);
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #getAllUserVariables()} instead
|
||||
*/
|
||||
@Deprecated
|
||||
@NotNull
|
||||
Map<String, String> getAllVariables();
|
||||
|
||||
@NotNull
|
||||
Map<String, String> getAllUserVariables();
|
||||
}
|
||||
|
||||
@@ -55,24 +55,12 @@ public class JpsPathVariablesConfigurationImpl extends JpsElementBase<JpsPathVar
|
||||
myPathVariables.remove(name);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getPathVariable(@NotNull String name) {
|
||||
return getUserVariableValue(name);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getUserVariableValue(@NotNull String name) {
|
||||
return myPathVariables.get(name);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Map<String, String> getAllVariables() {
|
||||
return getAllUserVariables();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Map<String, String> getAllUserVariables() {
|
||||
|
||||
Reference in New Issue
Block a user