mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
GitOrigin-RevId: bc781d49df8bed069005e6763f9d664b4add174e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
13068cbbbf
commit
f59aea7665
@@ -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.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.compiler;
|
||||
|
||||
import com.intellij.compiler.impl.*;
|
||||
@@ -541,7 +541,7 @@ public class CompilerManagerImpl extends CompilerManager {
|
||||
return projectBuildDir;
|
||||
}
|
||||
|
||||
private static class CompiledClass implements ClassObject {
|
||||
private static final class CompiledClass implements ClassObject {
|
||||
private final String myPath;
|
||||
private final String myClassName;
|
||||
private final byte[] myBytes;
|
||||
|
||||
@@ -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.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.jps.javac;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@@ -586,7 +586,7 @@ public final class JavacMain {
|
||||
}
|
||||
}
|
||||
|
||||
private static class ContextImpl implements JpsJavacFileManager.Context {
|
||||
private static final class ContextImpl implements JpsJavacFileManager.Context {
|
||||
private final StandardJavaFileManager myStdManager;
|
||||
private final DiagnosticOutputConsumer myOutConsumer;
|
||||
private final OutputFileConsumer myOutputFileSink;
|
||||
|
||||
@@ -1,21 +1,8 @@
|
||||
/*
|
||||
* Copyright 2000-2012 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.
|
||||
*/
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.jps.builders;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Unmodifiable;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -24,18 +11,18 @@ import java.util.Collection;
|
||||
/**
|
||||
* Use methods of this interface to register files produced by a builder in the build system. This will allow other builders to process
|
||||
* generated files and also update the source-to-output mapping. The build system deletes output files corresponding to changed or deleted
|
||||
* source files before the next build starts. Also all output files registered in the mapping are cleared on forced recompilation (rebuild).
|
||||
* source files before the next build starts. Also, all output files registered in the mapping are cleared on forced recompilation (rebuild).
|
||||
*/
|
||||
public interface BuildOutputConsumer {
|
||||
/**
|
||||
* Notifies the build system that {@code outputFile} was produced from {@code sourcePaths}.
|
||||
*/
|
||||
void registerOutputFile(@NotNull File outputFile, @NotNull Collection<String> sourcePaths) throws IOException;
|
||||
void registerOutputFile(@NotNull File outputFile, @NotNull @Unmodifiable Collection<@NotNull String> sourcePaths) throws IOException;
|
||||
|
||||
/**
|
||||
* Notifies the build system that the entire contents of {@code outputDir} was produced from {@code sourcePaths}. Note that
|
||||
* if one of {@code sourcePaths} changes after the build is finished the {@code outputDir} will be deleted completely before
|
||||
* the next build starts so don't use this method if {@code outputDir} contains source files or files produced by other builders.
|
||||
*/
|
||||
void registerOutputDirectory(@NotNull File outputDir, @NotNull Collection<String> sourcePaths) throws IOException;
|
||||
void registerOutputDirectory(@NotNull File outputDir, @NotNull @Unmodifiable Collection<@NotNull String> sourcePaths) throws IOException;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.UserDataHolderBase;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.io.FileUtilRt;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.Unmodifiable;
|
||||
@@ -13,6 +12,7 @@ import org.jetbrains.jps.builders.BuildTarget;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -26,7 +26,7 @@ public class CompiledClass extends UserDataHolderBase{
|
||||
private static final Logger LOG = Logger.getInstance(CompiledClass.class);
|
||||
|
||||
private final @NotNull File myOutputFile;
|
||||
private final @NotNull Collection<File> mySourceFiles;
|
||||
private final @NotNull Collection<File> sourceFiles;
|
||||
private final @Nullable String myClassName;
|
||||
private @NotNull BinaryContent myContent;
|
||||
|
||||
@@ -40,10 +40,10 @@ public class CompiledClass extends UserDataHolderBase{
|
||||
*/
|
||||
public CompiledClass(@NotNull File outputFile, @NotNull Collection<File> sourceFiles, @Nullable String className, @NotNull BinaryContent content) {
|
||||
myOutputFile = outputFile;
|
||||
mySourceFiles = sourceFiles;
|
||||
this.sourceFiles = sourceFiles;
|
||||
myClassName = className;
|
||||
myContent = content;
|
||||
LOG.assertTrue(!mySourceFiles.isEmpty());
|
||||
LOG.assertTrue(!this.sourceFiles.isEmpty());
|
||||
}
|
||||
|
||||
public CompiledClass(@NotNull File outputFile, @NotNull File sourceFile, @Nullable String className, @NotNull BinaryContent content) {
|
||||
@@ -60,11 +60,19 @@ public class CompiledClass extends UserDataHolderBase{
|
||||
}
|
||||
|
||||
public @NotNull Collection<File> getSourceFiles() {
|
||||
return mySourceFiles;
|
||||
return sourceFiles;
|
||||
}
|
||||
|
||||
public @Unmodifiable @NotNull List<String> getSourceFilesPaths() {
|
||||
return ContainerUtil.map(mySourceFiles, file -> file.getPath());
|
||||
if (sourceFiles.isEmpty()) {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
List<String> result = new ArrayList<>(sourceFiles.size());
|
||||
for (File t : sourceFiles) {
|
||||
result.add(t.getPath());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public @Nullable String getClassName() {
|
||||
@@ -108,7 +116,7 @@ public class CompiledClass extends UserDataHolderBase{
|
||||
public String toString() {
|
||||
return "CompiledClass{" +
|
||||
"myOutputFile=" + myOutputFile +
|
||||
", mySourceFiles=" + mySourceFiles +
|
||||
", mySourceFiles=" + sourceFiles +
|
||||
", myIsDirty=" + myIsDirty +
|
||||
'}';
|
||||
}
|
||||
|
||||
+7
-6
@@ -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.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.platform.ijent.community.buildConstants
|
||||
|
||||
/**
|
||||
@@ -9,8 +9,9 @@ package com.intellij.platform.ijent.community.buildConstants
|
||||
* `component>names>script` in `ApplicationInfo.xml`,
|
||||
* `com.intellij.testFramework.common.PlatformPrefix.PREFIX_CANDIDATES`.
|
||||
*/
|
||||
fun isIjentWslFsEnabledByDefaultForProduct(platformPrefix: String?): Boolean =
|
||||
platformPrefix !in IJENT_DISABLED_BY_DEFAULT_IN
|
||||
fun isIjentWslFsEnabledByDefaultForProduct(platformPrefix: String?): Boolean {
|
||||
return platformPrefix !in IJENT_DISABLED_BY_DEFAULT_IN
|
||||
}
|
||||
|
||||
/**
|
||||
* In case of problems in a particular IDE and inability to fix them quickly, add the platform prefix here.
|
||||
@@ -21,11 +22,11 @@ private val IJENT_DISABLED_BY_DEFAULT_IN: Collection<String> = listOf(
|
||||
"Gateway",
|
||||
)
|
||||
|
||||
const val IJENT_BOOT_CLASSPATH_MODULE = "intellij.platform.core.nio.fs"
|
||||
const val IJENT_BOOT_CLASSPATH_MODULE: String = "intellij.platform.core.nio.fs"
|
||||
|
||||
const val IJENT_WSL_FILE_SYSTEM_REGISTRY_KEY = "wsl.use.remote.agent.for.nio.filesystem"
|
||||
const val IJENT_WSL_FILE_SYSTEM_REGISTRY_KEY: String = "wsl.use.remote.agent.for.nio.filesystem"
|
||||
|
||||
const val IJENT_REQUIRED_DEFAULT_NIO_FS_PROVIDER_CLASS = "com.intellij.platform.core.nio.fs.MultiRoutingFileSystemProvider"
|
||||
const val IJENT_REQUIRED_DEFAULT_NIO_FS_PROVIDER_CLASS: String = "com.intellij.platform.core.nio.fs.MultiRoutingFileSystemProvider"
|
||||
|
||||
val MULTI_ROUTING_FILE_SYSTEM_VMOPTIONS: List<String> = listOf(
|
||||
"-Djava.nio.file.spi.DefaultFileSystemProvider=$IJENT_REQUIRED_DEFAULT_NIO_FS_PROVIDER_CLASS",
|
||||
|
||||
@@ -33,7 +33,7 @@ import java.nio.file.Path
|
||||
import kotlin.io.path.invariantSeparatorsPathString
|
||||
|
||||
@Suppress("SpellCheckingInspection")
|
||||
internal class DevKitApplicationPatcher : RunConfigurationExtension() {
|
||||
private class DevKitApplicationPatcher : RunConfigurationExtension() {
|
||||
override fun <T : RunConfigurationBase<*>> updateJavaParameters(
|
||||
configuration: T,
|
||||
javaParameters: JavaParameters,
|
||||
|
||||
Reference in New Issue
Block a user