Unified idea.properties

This commit is contained in:
Roman Shevchenko
2012-01-25 20:28:03 +04:00
parent b5bac74941
commit a6a0a2852b
4 changed files with 86 additions and 51 deletions
+36 -34
View File
@@ -1,33 +1,33 @@
# Set up IDEA_PROPERTIES environment variable to specify custom location of this properties file like
# SET IDEA_PROPERTIES=c:\ideaconfig\idea.properties
# before launching idea.
# Set up @@product_uc@@_PROPERTIES environment variable to specify custom location of this properties file like
# SET @@product_uc@@_PROPERTIES=c:\config\idea.properties
# before launching IDE.
# If not specified it is searched according following sequence (first successful is used).
# 1. ${user.home}
# 2. ${idea.home}/bin
# Use ${idea.home} macro to specify location relative to IDEA installation home
# Use ${idea.home} macro to specify location relative to IDE installation home
# Also 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. I.e. c:/idea/system
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to IDEA config folder. Make sure you're using forward slashes
# Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes
#---------------------------------------------------------------------
# idea.config.path=${user.home}/.IdeaIC/config
# idea.config.path=${user.home}/.@@settings_dir@@/config
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to IDEA system folder. Make sure you're using forward slashes
# Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes
#---------------------------------------------------------------------
# idea.system.path=${user.home}/.IdeaIC/system
# idea.system.path=${user.home}/.@@settings_dir@@/system
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to user installed plugins folder. Make sure you're using forward slashes
#---------------------------------------------------------------------
# idea.plugins.path=${user.home}/.IdeaIC/config/plugins
# idea.plugins.path=${user.home}/.@@settings_dir@@/config/plugins
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to IDEA logs folder. Make sure you're using forward slashes.
# Uncomment this option if you want to customize path to IDE logs folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
# idea.log.path=${user.home}/.IdeaIC/system/log
# idea.log.path=${user.home}/.@@settings_dir@@/system/log
#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDE should provide code assistance for.
@@ -37,6 +37,31 @@
#---------------------------------------------------------------------
idea.max.intellisense.filesize=2500
#---------------------------------------------------------------------
# This option controls console cyclic buffer: keeps the console output size not higher than the specified buffer size (Kb).
# Older lines are deleted. In order to disable cycle buffer use idea.cycle.buffer.size=disabled
#---------------------------------------------------------------------
idea.cycle.buffer.size=1024
#---------------------------------------------------------------------
# Configure if a special launcher should be used when running processes from within IDE.
# Using Launcher enables "soft exit" and "thread dump" features
#---------------------------------------------------------------------
idea.no.launcher=false
#---------------------------------------------------------------------
# To avoid too long classpath
#---------------------------------------------------------------------
idea.dynamic.classpath=false
#---------------------------------------------------------------------
# Uncomment this property to prevent IDE from throwing ProcessCanceledException when user activity
# detected. This option is only useful for plugin developers, while debugging PSI related activities
# performed in background error analysis thread.
# DO NOT UNCOMMENT THIS UNLESS YOU'RE DEBUGGING IDE ITSELF. Significant slowdowns and lockups will happen otherwise.
#---------------------------------------------------------------------
#idea.ProcessCanceledException=disabled
#---------------------------------------------------------------------
# There are two possible values of idea.popup.weight property: "heavy" and "medium".
# If you have WM configured as "Focus follows mouse with Auto Raise" then you have to
@@ -62,34 +87,11 @@ sun.java2d.noddraw=true
#---------------------------------------------------------------------
sun.java2d.d3d=false
#---------------------------------------------------------------------
# IDEA copies library jars to prevent their locking. If copying is not desirable, specify "true"
#---------------------------------------------------------------------
idea.jars.nocopy=false
#---------------------------------------------------------------------
# Configure if a special launcher should be used when running processes from within IDEA.
# Using Launcher enables "soft exit" and "thread dump" features
#---------------------------------------------------------------------
idea.no.launcher=false
#---------------------------------------------------------------------
# The VM option value to be used start the JVM in debug mode.
# Some environments define it in a different way (-XXdebug in Oracle VM)
#---------------------------------------------------------------------
idea.xdebug.key=-Xdebug
#---------------------------------------------------------------------
# Workaround for slow scrolling in JDK6
#---------------------------------------------------------------------
swing.bufferPerWindow=false
#---------------------------------------------------------------------
# This option controls console cyclic buffer: keeps the console output size not higher than the specified buffer size (Kb).
# Older lines are deleted. In order to disable cycle buffer use idea.cycle.buffer.size=disabled
#---------------------------------------------------------------------
idea.cycle.buffer.size=1024
#---------------------------------------------------------------------
# Removing this property may lead to editor performance degradation under X Window.
#---------------------------------------------------------------------
+11
View File
@@ -0,0 +1,11 @@
#---------------------------------------------------------------------
# IDE copies library jars to prevent their locking. If copying is not desirable, specify "true"
#---------------------------------------------------------------------
idea.jars.nocopy=false
#---------------------------------------------------------------------
# The VM option value to be used start the JVM in debug mode.
# Some JREs define it in a different way (-XXdebug in Oracle VM)
#---------------------------------------------------------------------
idea.xdebug.key=-Xdebug
+6 -4
View File
@@ -91,14 +91,16 @@ def layoutAll(Map args, String home, String out, Paths _paths = null) {
layout(paths.distAll) {
dir("bin") {
fileset(dir: "${home}/bin") { include(name: "*.*") }
fileset(dir: "${home}/bin") {
include(name: "*.*")
}
}
dir("license") {
fileset(dir: "${home}/license")
}
fileset(file: "${home}/LICENSE.txt")
}
patchPropertiesFile(paths.distAll)
patchPropertiesFile(paths.distAll, args + [appendices: ["$home/build/conf/ideaCE.properties"]])
layoutWin(args, home, paths)
layoutMac(args, home, paths)
@@ -145,8 +147,8 @@ private layoutMac(Map _args, String home, Paths paths) {
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
"""
args."idea.properties.path" = "$home/bin/idea.properties"
"""
args."idea.properties.path" = "${paths.distAll}/bin/idea.properties"
args.mac_no_yjp = true
layoutMacApp(target, home, args)
}
+33 -13
View File
@@ -252,7 +252,6 @@ binding.setVariable("layoutMacApp", { String path, String ch, Map args ->
String version = isEap() ? "EAP $args.buildNumber" : "${p("component.version.major")}.${p("component.version.minor")}"
args.get("idea.properties", [:])["idea.fatal.error.notification"] = isEap() ? "enabled" : "disabled";
String properties = readIdeaProperties(args)
String classPath = classPathLibs.collect {"\$APP_PACKAGE/lib/${it}" }.join(":")
@@ -376,9 +375,12 @@ binding.setVariable("unixVMOptions", { String target, String name ->
binding.setVariable("unixReadme", { String target, String home, Map args ->
String fullName = args.fullName != null ? args.fullName : p("component.names.fullname")
String settings_dir = args.system_selector.replaceFirst("\\d+", "")
copyAndPatchFile("$home/build/Install-Linux-tar.txt", "$target/Install-Linux-tar.txt",
["product_full": fullName, "product": p("component.names.product").toLowerCase(),
"system_selector": args.system_selector, "settings_dir": fullName.replace(" ", "")], "@@")
["product_full": fullName,
"product": p("component.names.product").toLowerCase(),
"system_selector": args.system_selector,
"settings_dir": settings_dir], "@@")
ant.fixcrlf(file: "$target/bin/Install-Linux-tar.txt", eol: "unix")
})
@@ -405,12 +407,24 @@ binding.setVariable("forceDelete", { String dirPath ->
}
})
binding.setVariable("copyPropertiesFile", { String source, String target ->
ant.copy(file: source, tofile: "$target/bin/idea.properties", overwrite: "true")
patchPropertiesFile(target)
})
binding.setVariable("patchPropertiesFile", { String target, Map args = [:] ->
String file = "$target/bin/idea.properties"
if (args.appendices != null) {
ant.concat(destfile: file, append: true) {
args.appendices.each {
fileset(file: it)
}
}
}
String product_uc = args.product_uc != null ? args.product_uc : p("component.names.product").toUpperCase()
String settings_dir = args.system_selector.replaceFirst("\\d+", "")
ant.replace(file: file) {
replacefilter(token: "@@product_uc@@", value: product_uc)
replacefilter(token: "@@settings_dir@@", value: settings_dir)
}
binding.setVariable("patchPropertiesFile", { String target ->
String message = (isEap() ? """
#-----------------------------------------------------------------------
# Change to 'disabled' if you don't want to receive instant visual notifications
@@ -425,7 +439,7 @@ idea.fatal.error.notification=enabled
#-----------------------------------------------------------------------
idea.fatal.error.notification=disabled
""")
ant.echo(file: "$target/bin/idea.properties", append: "true", message: message)
ant.echo(file: file, append: true, message: message)
})
binding.setVariable("zipSources", { String home, String targetDir ->
@@ -458,8 +472,6 @@ binding.setVariable("zipSources", { String home, String targetDir ->
* "idea.properties" : ["idea.max.intellisense.filesize" : 3000,
* "idea.cycle.buffer.size" : null,
* "idea.is.internal" : true ])
layoutMacApp("idea.properties.path" : "/Users/romeo/work/git/IDEA_master/ruby/build/idea.properties")
* @param args
* @return text xml properties description in xml
*/
@@ -508,10 +520,10 @@ private String readIdeaProperties(Map args) {
ideaProperties.each { key, value ->
if (value != null) {
buff.append(
"""
"""
<key>$key</key>
<string>$value</string>
"""
"""
)
}
}
@@ -521,6 +533,10 @@ private String readIdeaProperties(Map args) {
binding.setVariable("buildWinZip", { String zipPath, List paths ->
project.stage(".win.zip")
paths.each {
ant.fixcrlf(file: "$it/bin/idea.properties", eol: "dos")
}
ant.zip(zipfile: zipPath) {
paths.each {
fileset(dir: it)
@@ -566,6 +582,10 @@ binding.setVariable("buildMacZip", { String zipRoot, String zipPath, List paths,
binding.setVariable("buildTarGz", { String tarRoot, String tarPath, List paths ->
project.stage(".tar.gz")
paths.each {
ant.fixcrlf(file: "$it/bin/idea.properties", eol: "dos")
}
ant.tar(tarfile: tarPath) {
paths.each {
tarfileset(dir: it, prefix: tarRoot) {