Skip to content

Commits on Source 2

# VisualVM 1.4.2 sources repository
# VisualVM 1.4.3 sources repository
VisualVM is a visual tool integrating commandline JDK tools and lightweight profiling capabilities. See https://visualvm.github.io for details, downloads and documentation.
......@@ -8,13 +8,13 @@ Use Apache Ant 1.9.9 or above and Oracle JDK 8 to build VisualVM from this repos
## Get the sources
First download or clone (and `git checkout release142`) this repository into directory `visualvm`. There are two project suites included:
First download or clone (and `git checkout release143`) this repository into directory `visualvm`. There are two project suites included:
* visualvm (`visualvm/visualvm`) - suite for the core VisualVM tool
* plugins (`visualvm/plugins`) - suite for the VisualVM plugins available in Plugins Center
## Get the dependencies
Then extract the [NetBeans 9.0 Dev platform and profiler binaries](visualvm/nb90_visualvm_15082018.zip) into directory `visualvm/visualvm` (should create `visualvm/visualvm/netbeans`).
Then extract the [NetBeans 9.0 Dev platform and profiler binaries](visualvm/nb90_visualvm_15052019.zip) into directory `visualvm/visualvm` (should create `visualvm/visualvm/netbeans`).
## Build and run VisualVM tool
......
visualvm (1.4.3-1) unstable; urgency=medium
* Team upload.
* New upstream version 1.4.3.
* Switch to debhelper-compat = 12.
* Declare compliance with Debian Policy 4.4.0.
* Remove empty-binaries-list.patch.
* Fix FTBFS, add ModuleStateSelector.patch.
-- Markus Koschany <apo@debian.org> Sun, 04 Aug 2019 14:51:42 +0200
visualvm (1.4.2-2) unstable; urgency=medium
* Team upload.
......
......@@ -8,12 +8,12 @@ Uploaders:
Build-Depends:
ant,
ant-optional,
debhelper (>= 12),
debhelper-compat (= 12),
default-jdk,
libnb-platform-devel-java (>= 10.0),
libnb-platform18-java (>= 10.0),
libstringtemplate-java
Standards-Version: 4.3.0
Standards-Version: 4.4.0
Vcs-Git: https://salsa.debian.org/java-team/visualvm.git
Vcs-Browser: https://salsa.debian.org/java-team/visualvm
Homepage: https://visualvm.github.io
......
......@@ -8,7 +8,7 @@ Forwarded: not-needed
1 file changed, 16 insertions(+)
diff --git a/visualvm/launcher/visualvm b/visualvm/launcher/visualvm
index e9a2715..418efe8 100644
index e9a2715..1d3a499 100644
--- a/visualvm/launcher/visualvm
+++ b/visualvm/launcher/visualvm
@@ -48,6 +48,8 @@ cd "$progdir"/..
......
From: Markus Koschany <apo@debian.org>
Date: Sun, 4 Aug 2019 15:08:22 +0200
Subject: ModuleStateSelector
---
netbeans/nbbuild/antsrc/org/netbeans/nbbuild/ModuleSelector.java | 5 +++++
.../nbbuild/antsrc/org/netbeans/nbbuild/ModuleStateSelector.java | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/netbeans/nbbuild/antsrc/org/netbeans/nbbuild/ModuleSelector.java b/netbeans/nbbuild/antsrc/org/netbeans/nbbuild/ModuleSelector.java
index 85c4da0..f111638 100644
--- a/netbeans/nbbuild/antsrc/org/netbeans/nbbuild/ModuleSelector.java
+++ b/netbeans/nbbuild/antsrc/org/netbeans/nbbuild/ModuleSelector.java
@@ -61,6 +61,7 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Parameter;
import org.apache.tools.ant.types.selectors.BaseExtendSelector;
+import org.apache.tools.ant.types.Resource;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
@@ -96,6 +97,10 @@ public final class ModuleSelector extends BaseExtendSelector {
}
}
+ public boolean isSelected(Resource res) throws BuildException {
+ return false;
+ }
+
private Boolean checkSelected(File dir, File file) throws BuildException {
if (file.isDirectory()) {
log("Skipping directory: " + file, Project.MSG_VERBOSE);
diff --git a/netbeans/nbbuild/antsrc/org/netbeans/nbbuild/ModuleStateSelector.java b/netbeans/nbbuild/antsrc/org/netbeans/nbbuild/ModuleStateSelector.java
index 288e22f..2bb8df8 100644
--- a/netbeans/nbbuild/antsrc/org/netbeans/nbbuild/ModuleStateSelector.java
+++ b/netbeans/nbbuild/antsrc/org/netbeans/nbbuild/ModuleStateSelector.java
@@ -58,6 +58,7 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Parameter;
import org.apache.tools.ant.types.selectors.BaseExtendSelector;
+import org.apache.tools.ant.types.Resource;
import org.xml.sax.Attributes;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
@@ -88,6 +89,11 @@ public final class ModuleStateSelector extends BaseExtendSelector {
}
return check;
}
+
+ public boolean isSelected(Resource res) throws BuildException {
+ return false;
+ }
+
private Boolean checkSelected(File dir, File file) throws BuildException {
if (file.isDirectory()) {
From: Markus Koschany <apo@debian.org>
Date: Tue, 22 Jan 2019 18:05:11 +0100
Subject: empty-binaries-list
Do not download anything.
Forwarded: not-needed
---
netbeans/nbbuild/external/binaries-list | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/netbeans/nbbuild/external/binaries-list b/netbeans/nbbuild/external/binaries-list
index 0eeb845..e69de29 100644
--- a/netbeans/nbbuild/external/binaries-list
+++ b/netbeans/nbbuild/external/binaries-list
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you 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.
-A7674A6D78B7FEA58AF76B357DAE6EA5E3FDFBE9 apitest-70.jar
-16398550402B27F81CD0D508CEF54B3E47A4A6DA org.apache.rat:apache-rat:0.12
-AB396EE119BFAD809CC9F09950CC22E2BCE2FE35 langtools-9.zip
From: Markus Koschany <apo@debian.org>
Date: Tue, 22 Jan 2019 19:24:33 +0100
Date: Sun, 4 Aug 2019 14:59:33 +0200
Subject: jhall
---
......@@ -7,26 +7,26 @@ Subject: jhall
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/netbeans/nbbuild/build.xml b/netbeans/nbbuild/build.xml
index 8c6e57f..db16c26 100644
index 90c7a1a..825900d 100644
--- a/netbeans/nbbuild/build.xml
+++ b/netbeans/nbbuild/build.xml
@@ -56,6 +56,7 @@
<javac srcdir="antsrc" destdir="${build.ant.classes.dir}" deprecation="true" debug="${build.compiler.debug}" source="1.8" target="1.8">
@@ -75,6 +75,7 @@ made subject to such option by the copyright holder.
<javac srcdir="antsrc" destdir="${build.ant.classes.dir}" deprecation="true" debug="${build.compiler.debug}" source="1.7" target="1.7">
<classpath>
<pathelement location="${ant.core.lib}"/>
+ <pathelement location="/usr/share/java/"/>
</classpath>
<include name="org/netbeans/nbbuild/HgExec.java"/>
<include name="org/netbeans/nbbuild/ValidateHgConfiguration.java"/>
@@ -80,9 +81,9 @@
@@ -98,9 +99,9 @@ made subject to such option by the copyright holder.
<echo message="Bootstrapping NetBeans-specific Ant extensions..."/>
<path id="bootstrap-cp">
<pathelement location="${ant.core.lib}"/>
- <fileset dir="..">
+ <fileset dir="/usr/share/java/">
<!-- For JavaHelp indexing and link checking: -->
- <include name="platform/javahelp/external/jhall*.jar"/>
- <include name="javahelp/external/jhall*.jar"/>
+ <include name="jhall.jar"/>
</fileset>
</path>
<javac srcdir="antsrc" destdir="${build.ant.classes.dir}" deprecation="true" debug="${build.compiler.debug}" source="1.8" target="1.8">
<javac srcdir="antsrc" destdir="${build.ant.classes.dir}" deprecation="true" debug="${build.compiler.debug}" source="1.7" target="1.7">
01-gcc-settings.patch
03-launcher.patch
empty-binaries-list.patch
jhall.patch
sortChildren.patch
jhall.patch
ModuleStateSelector.patch
......@@ -13,7 +13,7 @@ else
endif
NB_PLATFORM_VERSION=18
NB_BUILD_PROPERTIES=-Dpermit.jdk9.builds=true
NB_BUILD_PROPERTIES=-Dpermit.jdk8.builds=true
ABS_TOP_DIR=`pwd -P`
NB_DEST_DIR=$(ABS_TOP_DIR)/netbeans/nbbuild/netbeans_visualvm
......
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: VisualVM Launcher Plug-in
Bundle-SymbolicName: org.eclipse.visualvm.launcher.common;singleton:=true
Bundle-Version: 1.1.2
Bundle-Version: 1.1.3
Bundle-Activator: org.eclipse.visualvm.launcher.Activator
Bundle-Vendor: Oracle Corporation
Require-Bundle: org.eclipse.ui,
......
......@@ -24,6 +24,8 @@
*/
package org.eclipse.visualvm.launcher;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......
......@@ -31,6 +31,8 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
......@@ -66,7 +68,6 @@ public final class VisualVMHelper {
public static void openInVisualVM(long id) throws IOException {
SpecVersion sv = getJavaVersion();
if (sv == null || (sv.major == 1 && sv.minor < 6)) {
try {
final Display d = Display.getDefault();
d.asyncExec(new Runnable() {
public void run() {
......@@ -74,10 +75,6 @@ public final class VisualVMHelper {
MessageDialog.openError(s, "VisualVM requires JDK1.6+ to run", "You are trying to launch VisualVM using an unsupported JDK.\n\nUse 'Window\\Preferences\\Run/Debug\\Launching\\VisualVM Configuration' to set the VisualVM JDK_HOME.");
}
});
} catch (Exception e) {
e.printStackTrace();
}
return;
}
......@@ -91,6 +88,11 @@ public final class VisualVMHelper {
});
}
public static void logException(Exception ex) {
IStatus s = new Status(IStatus.ERROR, Activator.PLUGIN_ID, ex.getLocalizedMessage(), ex);
Activator.getDefault().getLog().log(s);
}
private static SpecVersion getJavaVersion() {
try {
String javaCmd = Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.P_JAVAHOME) + File.separator + "bin" + File.separator + "java";
......@@ -107,7 +109,7 @@ public final class VisualVMHelper {
}
return new SpecVersion(version);
} catch (IOException e) {
e.printStackTrace();
logException(e);
}
return null;
}
......
......@@ -63,13 +63,13 @@ public class LocationPreferencePage
* restore itself.
*/
public void createFieldEditors() {
final boolean isWindows = System.getProperty("os.name").toUpperCase().contains("WIN"); //$NON-NLS-1$ //$NON-NLS-2$
FileFieldEditor ffe = new FileFieldEditor(PreferenceConstants.P_PATH,
PreferencesMessages.LocationPreferencePage_1, getFieldEditorParent()) {
@Override
protected void refreshValidState() {
super.refreshValidState();
if (isValid()) {
boolean isWindows = System.getProperty("os.name").toUpperCase().contains("WIN"); //$NON-NLS-1$ //$NON-NLS-2$
boolean validated = isWindows ? getStringValue().endsWith("visualvm.exe") : getStringValue().endsWith("visualvm"); //$NON-NLS-1$ //$NON-NLS-2$
if (!validated) {
setErrorMessage(PreferencesMessages.LocationPreferencePage_6);
......@@ -90,9 +90,10 @@ public class LocationPreferencePage
protected void refreshValidState() {
super.refreshValidState();
if (isValid()) {
String toolsJarPath = getStringValue() + File.separator + "lib" + File.separator + "tools.jar";
File toolsJarFile = new File(toolsJarPath);
boolean validated = toolsJarFile.exists() && toolsJarFile.isFile();
String javacPath = getStringValue() + File.separator + "bin" + File.separator +
(isWindows ? "javac.exe" : "javac");
File javacFile = new File(javacPath);
boolean validated = javacFile.exists() && javacFile.isFile();
if (!validated) {
setErrorMessage(PreferencesMessages.LocationPreferencePage_7);
}
......
......@@ -2,11 +2,11 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: VisualVM Launcher - Java
Bundle-SymbolicName: org.eclipse.visualvm.launcher.java;singleton:=true
Bundle-Version: 1.1.0
Bundle-Version: 1.1.1
Bundle-Vendor: Oracle Corporation
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.debug.core,
org.eclipse.visualvm.launcher.common;bundle-version="1.0.0"
org.eclipse.visualvm.launcher.common;bundle-version="1.1.3"
Import-Package: org.eclipse.core.runtime,
org.eclipse.jdt.internal.launching,
org.eclipse.jdt.junit.launcher,
......
......@@ -64,11 +64,10 @@ public class VisualVMAppletDelegate extends JavaAppletLaunchConfigurationDelegat
throws CoreException {
try {
VisualVMHelper.openInVisualVM(usedId);
return super.getVMRunner(configuration, mode);
} catch (IOException e) {
e.printStackTrace();
return null;
VisualVMHelper.logException(e);
}
return super.getVMRunner(configuration, mode);
}
}
......@@ -35,10 +35,9 @@ public class VisualVMJUnitDelegate extends JUnitLaunchConfigurationDelegate {
throws CoreException {
try {
VisualVMHelper.openInVisualVM(usedId);
return super.getVMRunner(configuration, mode);
} catch (IOException e) {
e.printStackTrace();
return null;
VisualVMHelper.logException(e);
}
return super.getVMRunner(configuration, mode);
}
}
......@@ -59,11 +59,10 @@ public class VisualVMJavaDelegate extends JavaLaunchDelegate {
throws CoreException {
try {
VisualVMHelper.openInVisualVM(usedId);
return super.getVMRunner(configuration, mode);
} catch (IOException e) {
e.printStackTrace();
return null;
VisualVMHelper.logException(e);
}
return super.getVMRunner(configuration, mode);
}
}
......@@ -2,10 +2,10 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: VisualVM Launcher - PDE
Bundle-SymbolicName: org.eclipse.visualvm.launcher.pde;singleton:=true
Bundle-Version: 1.1.0
Bundle-Version: 1.1.1
Bundle-Vendor: Oracle Corporation
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.visualvm.launcher.common;bundle-version="1.0.0",
Require-Bundle: org.eclipse.visualvm.launcher.common;bundle-version="1.1.3",
org.eclipse.debug.core
Import-Package: org.eclipse.core.runtime,
org.eclipse.jdt.junit.launcher,
......
......@@ -35,10 +35,9 @@ public class VisualVMJUnitPluginDelegate extends JUnitLaunchConfigurationDelegat
throws CoreException {
try {
VisualVMHelper.openInVisualVM(usedId);
return super.getVMRunner(configuration, mode);
} catch (IOException e) {
e.printStackTrace();
return null;
VisualVMHelper.logException(e);
}
return super.getVMRunner(configuration, mode);
}
}