Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2018-08-30 18:40:28 -0400
committerJeff Johnston2018-08-31 13:48:22 -0400
commitd3b17fe579879895200a3beef65abdee04a7378b (patch)
tree41246652fe9dfcb7f6af1f09ab3f4c943277de8e
parent0f40eba8f2d12cc33f8bc7e2aabccdd412eb1a59 (diff)
downloadorg.eclipse.linuxtools-d3b17fe579879895200a3beef65abdee04a7378b.tar.gz
org.eclipse.linuxtools-d3b17fe579879895200a3beef65abdee04a7378b.tar.xz
org.eclipse.linuxtools-d3b17fe579879895200a3beef65abdee04a7378b.zip
Bug 538432 - NoStackTrace in PerfCore.getPerfVersion
- expose getProject() method in PerfCore - change getPerfVersion() in PerfCore to issue warning instead of error when perf is missing - add check in initializeFrom() method in PerfOptionsTab to set the error message for the option page if perf is missing Change-Id: Id920b9cf0e938a0ceef518ebc2f873fb8f2c36c2 Reviewed-on: https://git.eclipse.org/r/128400 Tested-by: CI Bot Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java8
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfOptionsTab.java7
2 files changed, 13 insertions, 2 deletions
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java
index 5f21f87659..bc3e529af2 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java
@@ -121,7 +121,7 @@ public class PerfCore {
}
- private static IProject getProject(ILaunchConfiguration config){
+ public static IProject getProject(ILaunchConfiguration config){
if(config == null){
return null;
} else {
@@ -217,8 +217,12 @@ public class PerfCore {
try {
p = RuntimeProcessFactory.getFactory().exec(new String [] {PerfPlugin.PERF_COMMAND, "--version"}, project); //$NON-NLS-1$
} catch (IOException e) {
- logException(e);
+ // Issue warning to avoid AERI reports whenever user is missing perf
+ Status status = new Status(IStatus.WARNING, PerfPlugin.PLUGIN_ID,
+ e.getMessage());
+ PerfPlugin.getDefault().getLog().log(status);
}
+
if (p == null) {
return null;
}
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfOptionsTab.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfOptionsTab.java
index 64483958fb..40f1d7ba1a 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfOptionsTab.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfOptionsTab.java
@@ -284,8 +284,15 @@ public class PerfOptionsTab extends AbstractLaunchConfigurationTab {
// Keep track of the last configuration loaded
lastConfig = config;
+
PerfVersion perfVersion = PerfCore.getPerfVersion(config);
+ if (perfVersion == null) {
+ setErrorMessage(Messages.PerfLaunchConfigDelegate_perf_not_found);
+ } else {
+ setErrorMessage(null);
+ }
+
try {
if (perfVersion != null && multiplexEventsVersion.isNewer(perfVersion)) {

Back to the top