mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 15:52:01 +07:00
OPENIDE #153 Help -> Edit Custom Properties: idea in file name
(cherry picked from commit 2e474f259f)
This commit is contained in:
@@ -46,7 +46,7 @@ Using OpenIDE **File | Open**, select the `<IDEA_HOME>` directory.
|
||||
|
||||
Note that it is important to use the variant of JetBrains Runtime **without JCEF**.
|
||||
So, if for some reason `jbr-17` SDK points to an installation of JetBrains Runtime with JCEF, you need to change it:
|
||||
ensure that OpenIDE is running in internal mode (by adding `idea.is.internal=true` to `idea.properties` file), navigate to `jbr-17`
|
||||
ensure that OpenIDE is running in internal mode (by adding `idea.is.internal=true` to `openide.properties` file), navigate to `jbr-17`
|
||||
item in Project Structure | SDKs, click on 'Browse' button, choose 'Download...' item and select version 17 and vendor 'JetBrains Runtime'.
|
||||
|
||||
### Building the OpenIDE Application Source Code
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
# Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
#
|
||||
# Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project(https://openide.ru).
|
||||
# Any modifications are available on the same license terms as the original source code.
|
||||
|
||||
# Use ${idea.home.path} macro to specify location relative to IDE installation home.
|
||||
# Use ${xxx} where xxx is any Java property (including defined in previous lines of this file) to refer to its value.
|
||||
# Note for Windows users: please make sure you're using forward slashes: C:/dir1/dir2.
|
||||
@@ -1,4 +1,7 @@
|
||||
// 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.
|
||||
//
|
||||
// Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project(https://openide.ru).
|
||||
// Any modifications are available on the same license terms as the original source code.
|
||||
package com.intellij.execution;
|
||||
|
||||
import com.intellij.execution.util.ExecutionErrorDialog;
|
||||
@@ -171,7 +174,7 @@ public final class JavaExecutionUtil {
|
||||
if (res == null) {
|
||||
String message = "agent not used since the agent path contains spaces: " + agentContainingDir;
|
||||
if (agentPathPropertyKey != null) {
|
||||
message += "\nOne can move the agent libraries to a directory with no spaces in path and specify its path in idea.properties as " +
|
||||
message += "\nOne can move the agent libraries to a directory with no spaces in path and specify its path in openide.properties as " +
|
||||
agentPathPropertyKey + "=<path>";
|
||||
}
|
||||
LOG.info(message);
|
||||
|
||||
@@ -269,7 +269,7 @@ impl RemoteDevLaunchConfiguration {
|
||||
// let default_properties = self.default.get_properties_file();
|
||||
|
||||
// TODO: use IDE-specific properties file
|
||||
let dist_properties_path = self.default.ide_home.join("bin").join("idea.properties");
|
||||
let dist_properties_path = self.default.ide_home.join("bin").join("openide.properties");
|
||||
let dist_properties_file = File::open(dist_properties_path).context("Failed to open IDE properties file")?;
|
||||
|
||||
for l in BufReader::new(dist_properties_file).lines() {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
//
|
||||
// Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project(https://openide.ru).
|
||||
// Any modifications are available on the same license terms as the original source code.
|
||||
use std::{env, fs, thread, time};
|
||||
use std::collections::HashMap;
|
||||
use std::fmt::{Debug, Formatter};
|
||||
@@ -230,7 +232,7 @@ fn layout_launcher(
|
||||
// ├── bin/
|
||||
// │ └── xplat-launcher | remote-dev-server
|
||||
// │ └── xplat64.vmoptions
|
||||
// │ └── idea.properties
|
||||
// │ └── openide.properties
|
||||
// ├── lib/
|
||||
// │ └── app.jar
|
||||
// │ └── boot-linux.jar
|
||||
@@ -246,7 +248,7 @@ fn layout_launcher(
|
||||
layout_launcher_impl(
|
||||
&dist_root,
|
||||
vec![
|
||||
"bin/idea.properties",
|
||||
"bin/openide.properties",
|
||||
"lib/boot-linux.jar"
|
||||
],
|
||||
vec![
|
||||
@@ -278,7 +280,7 @@ fn layout_launcher(
|
||||
// ├── bin/
|
||||
// │ └── remote-dev-server [::RemoteDev]
|
||||
// │ └── xplat.vmoptions
|
||||
// │ └── idea.properties
|
||||
// │ └── openide.properties
|
||||
// ├── MacOS/
|
||||
// │ └── xplat-launcher [::Standard]
|
||||
// ├── Resources/
|
||||
@@ -299,7 +301,7 @@ fn layout_launcher(
|
||||
layout_launcher_impl(
|
||||
&dist_root,
|
||||
vec![
|
||||
"bin/idea.properties",
|
||||
"bin/openide.properties",
|
||||
"lib/boot-macos.jar"
|
||||
],
|
||||
vec![
|
||||
@@ -331,7 +333,7 @@ fn layout_launcher(
|
||||
// ├── bin/
|
||||
// │ └── xplat64.exe | remote-dev-server.exe
|
||||
// │ └── xplat64.exe.vmoptions
|
||||
// │ └── idea.properties
|
||||
// │ └── openide.properties
|
||||
// ├── lib/
|
||||
// │ └── app.jar
|
||||
// │ └── boot-windows.jar
|
||||
@@ -347,7 +349,7 @@ fn layout_launcher(
|
||||
layout_launcher_impl(
|
||||
&dist_root,
|
||||
vec![
|
||||
"bin\\idea.properties",
|
||||
"bin\\openide.properties",
|
||||
"lib\\boot-windows.jar"
|
||||
],
|
||||
vec![
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project (https://openide.ru).
|
||||
// Any modifications are available on the same license terms as the original source code.
|
||||
package helpers
|
||||
|
||||
import (
|
||||
@@ -131,7 +133,7 @@ func (ide *IDE) GetProperties() (collectedOptions map[string]string) {
|
||||
possibleIdeaOptionsFile = strings.Replace(possibleIdeaOptionsFile, "{ideaPackage}", ideaPackage, -1)
|
||||
possibleIdeaOptionsFile = os.ExpandEnv(possibleIdeaOptionsFile)
|
||||
if FileExists(possibleIdeaOptionsFile) {
|
||||
logger.DebugLogger.Println("found idea.properties file at: \"" + possibleIdeaOptionsFile + "\"")
|
||||
logger.DebugLogger.Println("found openide.properties file at: \"" + possibleIdeaOptionsFile + "\"")
|
||||
fillIdePropertiesMap(possibleIdeaOptionsFile, collectedOptions)
|
||||
} else {
|
||||
logger.DebugLogger.Println("Checked " + possibleIdeaPropertiesFileLocation + ". There is no \"" + possibleIdeaOptionsFile + "\" file.")
|
||||
@@ -158,7 +160,7 @@ func GetIdeProperties(ideaBinary string) (collectedOptions map[string]string) {
|
||||
possibleIdeaOptionsFile = strings.Replace(possibleIdeaOptionsFile, "{ideaPackage}", ideaPackage, -1)
|
||||
possibleIdeaOptionsFile = os.ExpandEnv(possibleIdeaOptionsFile)
|
||||
if FileExists(possibleIdeaOptionsFile) {
|
||||
logger.DebugLogger.Println("found idea.properties file at: \"" + possibleIdeaOptionsFile + "\"")
|
||||
logger.DebugLogger.Println("found openide.properties file at: \"" + possibleIdeaOptionsFile + "\"")
|
||||
fillIdePropertiesMap(possibleIdeaOptionsFile, collectedOptions)
|
||||
} else {
|
||||
logger.DebugLogger.Println("Checked " + possibleIdeaPropertiesFileLocation + ". There is no \"" + possibleIdeaOptionsFile + "\" file.")
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project (https://openide.ru).
|
||||
// Any modifications are available on the same license terms as the original source code.
|
||||
package helpers
|
||||
|
||||
import (
|
||||
@@ -74,9 +76,9 @@ var (
|
||||
"windows": "/product-info.json",
|
||||
}
|
||||
possibleIdeaPropertiesFileLocations = map[string][]string{
|
||||
"darwin": {"${IDE_BasefileName}_PROPERTIES", UserHomeDir() + "/Library/Application Support/JetBrains/{dataDirectoryName}/idea.properties", UserHomeDir() + "/idea.properties", "{ideaPackage}/Contents/bin/idea.properties"},
|
||||
"linux": {"${IDE_BasefileName}_PROPERTIES", UserHomeDir() + "/.config/JetBrains/{dataDirectoryName}/idea.properties", UserHomeDir() + "/idea.properties", "{ideaPackage}/bin/idea.properties"},
|
||||
"windows": {"${IDE_BasefileName}_PROPERTIES", defaultSystemDirLocation[runtime.GOOS] + "/idea.properties", UserHomeDir() + "/idea.properties", "{ideaPackage}/bin/idea.properties"},
|
||||
"darwin": {"${IDE_BasefileName}_PROPERTIES", UserHomeDir() + "/Library/Application Support/JetBrains/{dataDirectoryName}/openide.properties", UserHomeDir() + "/openide.properties", "{ideaPackage}/Contents/bin/openide.properties"},
|
||||
"linux": {"${IDE_BasefileName}_PROPERTIES", UserHomeDir() + "/.config/JetBrains/{dataDirectoryName}/openide.properties", UserHomeDir() + "/openide.properties", "{ideaPackage}/bin/openide.properties"},
|
||||
"windows": {"${IDE_BasefileName}_PROPERTIES", defaultSystemDirLocation[runtime.GOOS] + "/openide.properties", UserHomeDir() + "/openide.properties", "{ideaPackage}/bin/openide.properties"},
|
||||
}
|
||||
IdeRuntimeBinaryRelatedToInstallationPath = map[string]string{
|
||||
"darwin": "/Contents/jbr/Contents/Home/bin/java",
|
||||
|
||||
@@ -33,7 +33,7 @@ INSTALLATION INSTRUCTIONS
|
||||
|
||||
1. Open a console and cd into ~/.config/@@product_vendor@@/@@system_selector@@
|
||||
|
||||
2. Create a file idea.properties and set the idea.system.path and idea.config.path variables, for example:
|
||||
2. Create a file openide.properties and set the idea.system.path and idea.config.path variables, for example:
|
||||
|
||||
idea.system.path=~/custom/system
|
||||
idea.config.path=~/custom/config
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
//
|
||||
// Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project(https://openide.ru).
|
||||
// Any modifications are available on the same license terms as the original source code.
|
||||
package org.jetbrains.intellij.build
|
||||
|
||||
import com.intellij.platform.buildData.productInfo.CustomProperty
|
||||
@@ -250,7 +253,7 @@ abstract class ProductProperties {
|
||||
var forbiddenClassFileSubPathExceptions: PersistentList<String> = persistentListOf()
|
||||
|
||||
/**
|
||||
* Paths to files, the content of which should be appended to the 'idea.properties' file.
|
||||
* Paths to files, the content of which should be appended to the 'openide.properties' file.
|
||||
*/
|
||||
var additionalIDEPropertiesFilePaths: List<Path> = emptyList()
|
||||
|
||||
@@ -318,7 +321,7 @@ abstract class ProductProperties {
|
||||
/**
|
||||
* A prefix for names of environment variables used by product distributions
|
||||
* to allow users to customize location of the product runtime (`<PRODUCT>_JDK` variable),
|
||||
* *.vmoptions file (`<PRODUCT>_VM_OPTIONS`), `idea.properties` file (`<PRODUCT>_PROPERTIES`).
|
||||
* *.vmoptions file (`<PRODUCT>_VM_OPTIONS`), `openide.properties` file (`<PRODUCT>_PROPERTIES`).
|
||||
*/
|
||||
open fun getEnvironmentVariableBaseName(appInfo: ApplicationInfoProperties): String = appInfo.launcherName.uppercase().replace('-', '_')
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
//
|
||||
// Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project(https://openide.ru).
|
||||
// Any modifications are available on the same license terms as the original source code.
|
||||
@file:Suppress("ReplacePutWithAssignment")
|
||||
|
||||
package org.jetbrains.intellij.build.dev
|
||||
@@ -46,7 +49,7 @@ fun getIdeSystemProperties(runDir: Path): VmProperties {
|
||||
val result = LinkedHashMap<String, String>()
|
||||
|
||||
val properties = Properties()
|
||||
properties.load(Files.newInputStream(runDir.resolve("bin/idea.properties")))
|
||||
properties.load(Files.newInputStream(runDir.resolve("bin/openide.properties")))
|
||||
for (property in properties) {
|
||||
result.put(property.key.toString(), property.value.toString())
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ import java.util.zip.Deflater
|
||||
import kotlin.io.path.listDirectoryEntries
|
||||
import kotlin.io.path.relativeTo
|
||||
|
||||
internal const val PROPERTIES_FILE_NAME: String = "idea.properties"
|
||||
internal const val PROPERTIES_FILE_NAME: String = "openide.properties"
|
||||
|
||||
internal class BuildTasksImpl(private val context: BuildContextImpl) : BuildTasks {
|
||||
override suspend fun buildDistributions() {
|
||||
@@ -154,7 +154,7 @@ val SUPPORTED_DISTRIBUTIONS: List<SupportedDistribution> = listOf(
|
||||
)
|
||||
|
||||
fun createIdeaPropertyFile(context: BuildContext): CharSequence {
|
||||
val builder = StringBuilder(Files.readString(context.paths.communityHomeDir.resolve("bin/idea.properties")))
|
||||
val builder = StringBuilder(Files.readString(context.paths.communityHomeDir.resolve("bin/openide.properties")))
|
||||
for (it in context.productProperties.additionalIDEPropertiesFilePaths) {
|
||||
builder.append('\n').append(Files.readString(it))
|
||||
}
|
||||
@@ -949,9 +949,9 @@ private fun crossPlatformZip(
|
||||
out.entryToDir(winX64DistDir.resolve("bin/${executableName}.bat"), "bin")
|
||||
out.entryToDir(linuxX64DistDir.resolve("bin/${executableName}.sh"), "bin", executableFileUnixMode)
|
||||
|
||||
out.entryToDir(winX64DistDir.resolve("bin/idea.properties"), "bin/win")
|
||||
out.entryToDir(macArm64DistDir.resolve("bin/idea.properties"), "bin/mac")
|
||||
out.entryToDir(linuxX64DistDir.resolve("bin/idea.properties"), "bin/linux")
|
||||
out.entryToDir(winX64DistDir.resolve("bin/openide.properties"), "bin/win")
|
||||
out.entryToDir(macArm64DistDir.resolve("bin/openide.properties"), "bin/mac")
|
||||
out.entryToDir(linuxX64DistDir.resolve("bin/openide.properties"), "bin/linux")
|
||||
|
||||
out.entryToDir(winX64DistDir.resolve("bin/${executableName}64.exe.vmoptions"), "bin/win")
|
||||
out.entryToDir(macArm64DistDir.resolve("bin/${executableName}.vmoptions"), "bin/mac")
|
||||
@@ -974,7 +974,7 @@ private fun crossPlatformZip(
|
||||
relPath != "${executableName}.bat" &&
|
||||
relPath != executableName &&
|
||||
relPath != "${executableName}.sh" &&
|
||||
relPath != "idea.properties" &&
|
||||
relPath != "openide.properties" &&
|
||||
!relPath.endsWith(".vmoptions") &&
|
||||
!relPath.startsWith("repair") &&
|
||||
!relPath.startsWith("restart") &&
|
||||
@@ -987,7 +987,7 @@ private fun crossPlatformZip(
|
||||
}, binEntryCustomizer)
|
||||
}
|
||||
|
||||
out.dir(context.paths.distAllDir, prefix = "", fileFilter = { _, relPath -> relPath != "bin/idea.properties" }, entryCustomizer)
|
||||
out.dir(context.paths.distAllDir, prefix = "", fileFilter = { _, relPath -> relPath != "bin/openide.properties" }, entryCustomizer)
|
||||
|
||||
// not extracted into product properties because it (hopefully) will become obsolete soon
|
||||
val productFilter = when {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
//
|
||||
// Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project(https://openide.ru).
|
||||
// Any modifications are available on the same license terms as the original source code.
|
||||
package org.jetbrains.intellij.build.impl
|
||||
|
||||
import com.intellij.diagnostic.COROUTINE_DUMP_HEADER
|
||||
@@ -174,7 +177,7 @@ class CompilationContextImpl private constructor(
|
||||
System.setProperty("jps.new.storage.cache.size.mb", "96")
|
||||
}
|
||||
|
||||
check(sequenceOf("platform/build-scripts", "bin/idea.properties", "build.txt").all {
|
||||
check(sequenceOf("platform/build-scripts", "bin/openide.properties", "build.txt").all {
|
||||
Files.exists(COMMUNITY_ROOT.communityRoot.resolve(it))
|
||||
}) {
|
||||
"communityHome ($COMMUNITY_ROOT) doesn't point to a directory containing IntelliJ Community sources"
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
//
|
||||
// Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project(https://openide.ru).
|
||||
// Any modifications are available on the same license terms as the original source code.
|
||||
package org.jetbrains.intellij.build.impl
|
||||
|
||||
import com.intellij.openapi.util.io.FileUtilRt
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"envVarBaseName": {
|
||||
"description": "A prefix for names of environment variables used by product distributions to allow users to customize location of the product runtime (`<PRODUCT>_JDK` variable), *.vmoptions file (`<PRODUCT>_VM_OPTIONS`), `idea.properties` file (`<PRODUCT>_PROPERTIES`).",
|
||||
"description": "A prefix for names of environment variables used by product distributions to allow users to customize location of the product runtime (`<PRODUCT>_JDK` variable), *.vmoptions file (`<PRODUCT>_VM_OPTIONS`), `openide.properties` file (`<PRODUCT>_PROPERTIES`).",
|
||||
"type": "string"
|
||||
},
|
||||
"dataDirectoryName": {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// Copyright 2000-2023 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.
|
||||
//
|
||||
// Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project(https://openide.ru).
|
||||
// Any modifications are available on the same license terms as the original source code.
|
||||
package com.intellij.ide.actions
|
||||
|
||||
import com.intellij.CommonBundle
|
||||
@@ -160,7 +163,7 @@ class EditCustomPropertiesAction : EditCustomSettingsAction() {
|
||||
|
||||
override fun file(): Path? = file.value
|
||||
override fun template(): String =
|
||||
"# custom ${ApplicationNamesInfo.getInstance().fullProductName} properties (expand/override 'bin${File.separator}idea.properties')\n\n"
|
||||
"# custom ${ApplicationNamesInfo.getInstance().fullProductName} properties (expand/override 'bin${File.separator}openide.properties')\n\n"
|
||||
|
||||
class AccessExtension : NonProjectFileWritingAccessExtension {
|
||||
override fun isWritable(file: VirtualFile): Boolean =
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
//
|
||||
// Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project(https://openide.ru).
|
||||
// Any modifications are available on the same license terms as the original source code.
|
||||
package com.intellij.openapi.application;
|
||||
|
||||
import com.intellij.openapi.util.SystemInfoRt;
|
||||
@@ -22,7 +25,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
public final class PathManager {
|
||||
public static final String PROPERTIES_FILE = "idea.properties.file";
|
||||
public static final String PROPERTIES_FILE_NAME = "idea.properties";
|
||||
public static final String PROPERTIES_FILE_NAME = "openide.properties";
|
||||
public static final String PROPERTY_HOME_PATH = "idea.home.path";
|
||||
public static final String PROPERTY_CONFIG_PATH = "idea.config.path";
|
||||
public static final String PROPERTY_SYSTEM_PATH = "idea.system.path";
|
||||
@@ -441,7 +444,7 @@ public final class PathManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the path to the directory where custom idea.properties and *.vmoptions files are stored.
|
||||
* Return the path to the directory where custom openide.properties and *.vmoptions files are stored.
|
||||
*/
|
||||
public static @Nullable String getCustomOptionsDirectory() {
|
||||
// do not use getConfigPath() here - as it may be not yet defined
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
#
|
||||
# Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project(https://openide.ru).
|
||||
# Any modifications are available on the same license terms as the original source code.
|
||||
none.vcs.presentation=<none>
|
||||
vcs.command.name.add=Add
|
||||
vcs.command.name.remove=Remove
|
||||
@@ -1007,7 +1011,7 @@ multiple.file.merge.dialog.title.can.t.show.merge.dialog=Cannot Show Merge Dialo
|
||||
text.commit.message.truncated.by.ide.name={0}\n\n... The commit message is too long and was truncated by {1}\u2026
|
||||
label.project.vcs.root.mapping=<Project>
|
||||
label.relative.project.path.presentation=<Project>/{0}
|
||||
file.content.too.big.to.load.increase.property.suggestion=Cannot show the contents of ''{0}''.\nThe file is bigger than {1}.\n\nYou can override this restriction by increasing the {2} property in the ''idea.properties'' file.
|
||||
file.content.too.big.to.load.increase.property.suggestion=Cannot show the contents of ''{0}''.\nThe file is bigger than {1}.\n\nYou can override this restriction by increasing the {2} property in the ''openide.properties'' file.
|
||||
error.date.before.must.be.a.valid.date=Date Before must be a valid date
|
||||
error.date.after.must.be.a.valid.date=Date After must be a valid date
|
||||
error.change.from.must.be.a.valid.number=Change From must be a valid number
|
||||
|
||||
Reference in New Issue
Block a user