Author: snjeza
Date: 2008-07-13 09:26:41 -0400 (Sun, 13 Jul 2008)
New Revision: 9129
Added:
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/.classpath
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/.project
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/META-INF/
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/META-INF/MANIFEST.MF
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/build.properties
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/plugin.properties
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/plugin.xml
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/src/
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/src/org/
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/src/org/jboss/
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/src/org/jboss/tools/
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/src/org/jboss/tools/eclipse/
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/src/org/jboss/tools/eclipse/as/
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/src/org/jboss/tools/eclipse/as/tptp/
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/src/org/jboss/tools/eclipse/as/tptp/PICollectorFiltration.java
Log:
JBIDE-2093 TPTP profiling not available on "JBoss, a division of
RedHat"-servers
Added: trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/.classpath
===================================================================
--- trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/.classpath
(rev 0)
+++ trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/.classpath 2008-07-13 13:26:41 UTC
(rev 9129)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/.project
===================================================================
--- trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/.project
(rev 0)
+++ trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/.project 2008-07-13 13:26:41 UTC
(rev 9129)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.eclipse.as.tptp</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/META-INF/MANIFEST.MF
===================================================================
--- trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/META-INF/MANIFEST.MF 2008-07-13
13:26:41 UTC (rev 9129)
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %BundleName
+Bundle-Vendor: %BundleVendor
+Bundle-SymbolicName: org.jboss.tools.eclipse.as.tptp; singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.debug.ui,
+ org.eclipse.hyades.trace.ui,
+ org.eclipse.tptp.platform.jvmti.client,
+ org.eclipse.tptp.platform.execution,
+ org.eclipse.tptp.platform.profile.server.core,
+ org.eclipse.tptp.platform.instrumentation.ui;bundle-version="4.3.100"
+Bundle-ActivationPolicy: lazy
+Eclipse-LazyStart: true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Added: trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/build.properties
===================================================================
--- trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/build.properties
(rev 0)
+++ trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/build.properties 2008-07-13
13:26:41 UTC (rev 9129)
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
Added: trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/plugin.properties
===================================================================
--- trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/plugin.properties
(rev 0)
+++ trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/plugin.properties 2008-07-13
13:26:41 UTC (rev 9129)
@@ -0,0 +1,2 @@
+BundleName=TPTP Profile On JBoss Server
+BundleVendor=RedHat, Inc.
\ No newline at end of file
Added: trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/plugin.xml
===================================================================
--- trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/plugin.xml
(rev 0)
+++ trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/plugin.xml 2008-07-13 13:26:41 UTC
(rev 9129)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <!-- Make the associations between the launch configurations and the data
collectors -->
+ <extension
+ point="org.eclipse.hyades.trace.ui.launchConfigMechanismAssociator">
+
+ <!-- JBoss Server -->
+ <association
+ launchConfigID =
"org.jboss.ide.eclipse.as.core.server.startupConfiguration">
+
+ <mechanism mechanismID = "org.eclipse.tptp.trace.ui.jvmpiMechanism">
+ <configuration
+ launchDelegate =
"org.eclipse.tptp.trace.ui.internal.launcher.deleg.application.PIAttachLauncherDelegate"
+ configurationId = "org.eclipse.tptp.trace.ui.jvmpiConfiguration"
+ associatedAgent = "org.eclipse.tptp.trace.ui.jvmpiAgent"
+ filter =
"org.eclipse.tptp.platform.profile.server.core.internal.PICollectorFiltration">
+ </configuration>
+ </mechanism>
+
+ <mechanism mechanismID =
"org.eclipse.tptp.trace.jvmti.jvmtiMechanism">
+ <configuration
+ launchDelegate =
"org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIAttachLauncherDelegate"
+ configurationId = "org.eclipse.tptp.trace.jvmti.tiConfiguration"
+ associatedAgent = "org.eclipse.tptp.platform.jvmti.TIAgent"
+ filter =
"org.eclipse.tptp.platform.profile.server.core.internal.TICollectorFiltration">
+ </configuration>
+ </mechanism>
+ </association>
+ <association
launchConfigID="org.jboss.ide.eclipse.as.core.server.startupConfiguration">
+ <mechanism
mechanismID="org.eclipse.tptp.platform.instrumentation.ui.instrumentCollector">
+ <configuration
+
associatedAgent="org.eclipse.tptp.platform.instrumentation.ui.instrumentAgent"
+
configurationId="org.eclipse.tptp.platform.instrumentation.ui.instrumentCollectorConfiguration"
+
filter="org.jboss.tools.eclipse.as.tptp.PICollectorFiltration"
+
launchDelegate="org.eclipse.tptp.platform.instrumentation.ui.internal.launcher.deleg.application.InstrumentLauncherDelegate"/>
+ </mechanism>
+ </association>
+ </extension>
+</plugin>
Added:
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/src/org/jboss/tools/eclipse/as/tptp/PICollectorFiltration.java
===================================================================
---
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/src/org/jboss/tools/eclipse/as/tptp/PICollectorFiltration.java
(rev 0)
+++
trunk/tptp/plugins/org.jboss.tools.eclipse.as.tptp/src/org/jboss/tools/eclipse/as/tptp/PICollectorFiltration.java 2008-07-13
13:26:41 UTC (rev 9129)
@@ -0,0 +1,36 @@
+/**********************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Qingwu Lin (linqingw(a)cn.ibm.com)
+ *
+ * IBM - Initial API and implementation
+ **********************************************************************/
+package org.jboss.tools.eclipse.as.tptp;
+
+import org.eclipse.debug.core.ILaunchConfiguration;
+import
org.eclipse.tptp.trace.ui.internal.launcher.deleg.application.PIDelegateHelper.JVMVersionDetector;
+import org.eclipse.tptp.trace.ui.provisional.launcher.ICollectorFiltration;
+
+/**
+ * This filtration class is used to filter the JVMPI data collector if the
+ * targeted host uses JRE 1.6 or greater.
+ *
+ */
+public class PICollectorFiltration implements ICollectorFiltration
+{
+
+ public boolean include(String id, ILaunchConfiguration configuration, Object context)
+ {
+ boolean isInclude;
+ JVMVersionDetector jvmVersionDetector = new JVMVersionDetector(configuration);
+ String version = jvmVersionDetector.retrieveVersionOutput();
+ isInclude = version.indexOf("1.3") >0 || version.indexOf("1.4")
>0 || version.indexOf("1.5") >0;
+ return isInclude;
+ }
+}
+