Skip to content

Commit 57e8272

Browse files
committed
Implemented GH-229 - Settings migration from another VisualVM userdir
1 parent 534ef3e commit 57e8272

File tree

7 files changed

+1125
-1
lines changed

7 files changed

+1125
-1
lines changed

visualvm/build.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
<copy file="launcher/visualvm" todir="${build.launcher.dir}/bin/"/>
8282
<copy file="launcher/visualvm.conf" todir="${build.launcher.dir}/etc/"/>
8383
<copy file="launcher/visualvm.icns" todir="${build.launcher.dir}/etc/"/>
84+
<copy file="launcher/visualvm.import" todir="${build.launcher.dir}/etc/"/>
8485
<echo message="${app.name}" file="${build.launcher.dir}/etc/${app.name}.clusters"/>
8586
<echo message="&#10;" file="${build.launcher.dir}/etc/${app.name}.clusters" append="true"/>
8687
<echo message="${zip.platform.clusters.bare}" file="${build.launcher.dir}/etc/${app.name}.clusters" append="true"/>

visualvm/launcher/visualvm.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ visualvm_default_cachedir="${DEFAULT_CACHEDIR_ROOT}/dev"
5858
# (can be overridden by explicit command line switches)
5959
#
6060

61-
visualvm_default_options="-J-client -J-Xms24m -J-Xmx768m -J-Dnetbeans.accept_license_class=org.graalvm.visualvm.modules.startup.AcceptLicense -J-Dsun.jvmstat.perdata.syncWaitMs=10000 -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.d3d=false -J-Dorg.netbeans.core.TimeableEventQueue.quantum=360000 -J-Dpolyglot.js.nashorn-compat=true -J-Dsun.misc.URLClassPath.disableJarChecking=true -J--add-exports=java.desktop/sun.awt=ALL-UNNAMED -J--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor.event=ALL-UNNAMED -J--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED -J--add-exports=java.desktop/sun.swing=ALL-UNNAMED -J--add-exports=jdk.attach/sun.tools.attach=ALL-UNNAMED -J--add-opens=java.base/java.net=ALL-UNNAMED -J--add-opens=java.base/java.lang.ref=ALL-UNNAMED -J--add-opens=java.base/java.lang=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED -J-XX:+IgnoreUnrecognizedVMOptions -J-Dnetbeans.logger.console=true -J-ea"
61+
visualvm_default_options="-J-client -J-Xms24m -J-Xmx768m -J-Dnetbeans.accept_license_class=org.graalvm.visualvm.modules.startup.AcceptLicense -J-Dnetbeans.importclass=org.graalvm.visualvm.modules.startup.ImportSettings -J-Dsun.jvmstat.perdata.syncWaitMs=10000 -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.d3d=false -J-Dorg.netbeans.core.TimeableEventQueue.quantum=360000 -J-Dpolyglot.js.nashorn-compat=true -J-Dsun.misc.URLClassPath.disableJarChecking=true -J--add-exports=java.desktop/sun.awt=ALL-UNNAMED -J--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor.event=ALL-UNNAMED -J--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED -J--add-exports=java.desktop/sun.swing=ALL-UNNAMED -J--add-exports=jdk.attach/sun.tools.attach=ALL-UNNAMED -J--add-opens=java.base/java.net=ALL-UNNAMED -J--add-opens=java.base/java.lang.ref=ALL-UNNAMED -J--add-opens=java.base/java.lang=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED -J-XX:+IgnoreUnrecognizedVMOptions -J-Dnetbeans.logger.console=true -J-ea"
6262
# for development purposes you may wish to append: -J-Dnetbeans.logger.console=true -J-ea
6363

6464
# Default location of JDK:

visualvm/launcher/visualvm.import

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#
2+
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
3+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
#
5+
# This code is free software; you can redistribute it and/or modify it
6+
# under the terms of the GNU General Public License version 2 only, as
7+
# published by the Free Software Foundation. Oracle designates this
8+
# particular file as subject to the "Classpath" exception as provided
9+
# by Oracle in the LICENSE file that accompanied this code.
10+
#
11+
# This code is distributed in the hope that it will be useful, but WITHOUT
12+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
# version 2 for more details (a copy is included in the LICENSE file that
15+
# accompanied this code).
16+
#
17+
# You should have received a copy of the GNU General Public License version
18+
# 2 along with this work; if not, write to the Free Software Foundation,
19+
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
#
21+
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
# or visit www.oracle.com if you need additional information or have any
23+
# questions.
24+
25+
# persistent storage
26+
include repository/.*
27+
# preferences
28+
include config/Preferences/.*
29+
# toolbars
30+
include config/Toolbars/.*
31+
# window system
32+
include config/Windows2Local/.*

visualvm/startup/src/org/graalvm/visualvm/modules/startup/Bundle.properties

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,21 @@ OpenIDE-Module-Short-Description=VisualVM startup Module
5555
VisualVMStartup_ErrorStartupCaption=Error Starting VisualVM
5656
VisualVMStartup_IncorrectVersionMsg=<html><br><b>You are running VisualVM using an unsupported Java version: {0}.</b><br><br>Please use JDK 8 to JDK 15 to run VisualVM. For information<br>about requirements and setup visit https://visualvm.github.io.<br><br><hr><i>Java: {1}<br>JVM: {2}<br>Location: {3}</i><br><br></html>
5757
VisualVMStartup_JreMsg=<html><br><b>You are running VisualVM using Java Runtime Environment (JRE).</b><br><br>Please use Java Development Kit (JDK) to run VisualVM. For information<br>about requirements and setup visit https://visualvm.github.io.<br><br><hr><i>Java: {0}<br>JVM: {1}<br>Location: {2}</i><br><br></html>
58+
59+
ImportSettings_Caption=Import Settings
60+
61+
ImportPanel_Msg1=<nobr><b>Existing VisualVM settings are available on this system.</b></nobr><br><br><nobr>Select the settings directory to import:</nobr>
62+
ImportPanel_Msg2=<nobr>Click <b>Import</b> to start VisualVM with the imported settings.</nobr><br><nobr>Click <b>Skip</b> to start VisualVM with the default settings.</nobr>
63+
ImportPanel_OptionLatestRelease=(latest release)
64+
ImportPanel_OptionRecentlyUsed=(recently used)
65+
ImportPanel_OptionSelectCustom=select custom...
66+
ImportPanel_OptionSelectCustomTooltip=Select custom settings directory after clicking the Import button
67+
ImportPanel_ProgressText=Importing settings...
68+
ImportPanel_ImportButton=Import
69+
ImportPanel_SkipButton=Skip
70+
ImportPanel_OpenButton=Open
71+
ImportPanel_ImportButtonTooltip=Import selected settings directory
72+
ImportPanel_OpenButtonTooltip=Open selected directory
73+
ImportPanel_CustomDirCaption=Select Custom Settings Directory To Import
74+
ImportPanel_SettingsFilter=VisualVM Settings Directory
75+
ImportPanel_ImportFailed=Failed to import selected settings:

0 commit comments

Comments
 (0)