mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
BAZEL-2160 cleanup
GitOrigin-RevId: 7d96e5f37c28adf8651a57ebc23b295da9b4f24d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b24bd9b6b2
commit
cea2e2e7be
+5
-2
@@ -1,4 +1,6 @@
|
||||
// Copyright 2000-2021 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.
|
||||
@file:Suppress("ReplacePutWithAssignment", "ReplaceGetOrSet")
|
||||
|
||||
package com.intellij.compiler
|
||||
|
||||
import com.intellij.openapi.components.PersistentStateComponent
|
||||
@@ -22,8 +24,9 @@ internal class ExternalCompilerConfigurationStorage(private val project: Project
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun getInstance(project: Project): ExternalCompilerConfigurationStorage =
|
||||
project.getService(ExternalCompilerConfigurationStorage::class.java)
|
||||
fun getInstance(project: Project): ExternalCompilerConfigurationStorage {
|
||||
return project.getService(ExternalCompilerConfigurationStorage::class.java)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getState(): Element {
|
||||
|
||||
+6
-5
@@ -13,13 +13,14 @@ import org.jetbrains.jps.model.java.compiler.JpsJavaCompilerOptions;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings("LightServiceMigrationCode")
|
||||
@State(name = "JavacSettings", storages = @Storage("compiler.xml"))
|
||||
public class JavacConfiguration implements PersistentStateComponent<JpsJavaCompilerOptions> {
|
||||
public final class JavacConfiguration implements PersistentStateComponent<JpsJavaCompilerOptions> {
|
||||
private final JpsJavaCompilerOptions mySettings = new JpsJavaCompilerOptions();
|
||||
private final Project myProject;
|
||||
private final Project project;
|
||||
|
||||
public JavacConfiguration(Project project) {
|
||||
myProject = project;
|
||||
public JavacConfiguration(@NotNull Project project) {
|
||||
this.project = project;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -27,7 +28,7 @@ public class JavacConfiguration implements PersistentStateComponent<JpsJavaCompi
|
||||
final JpsJavaCompilerOptions state = new JpsJavaCompilerOptions();
|
||||
XmlSerializerUtil.copyBean(mySettings, state);
|
||||
state.ADDITIONAL_OPTIONS_OVERRIDE = new HashMap<>(state.ADDITIONAL_OPTIONS_OVERRIDE); // copyBean copies by reference, we need a map clone here
|
||||
final PathMacroManager macros = PathMacroManager.getInstance(myProject);
|
||||
final PathMacroManager macros = PathMacroManager.getInstance(project);
|
||||
state.ADDITIONAL_OPTIONS_STRING = macros.collapsePathsRecursively(state.ADDITIONAL_OPTIONS_STRING);
|
||||
for (Map.Entry<String, String> entry : state.ADDITIONAL_OPTIONS_OVERRIDE.entrySet()) {
|
||||
entry.setValue(macros.collapsePathsRecursively(entry.getValue()));
|
||||
|
||||
Reference in New Issue
Block a user