Author: max.andersen(a)jboss.com
Date: 2009-06-15 07:23:29 -0400 (Mon, 15 Jun 2009)
New Revision: 15948
Added:
trunk/profiler/
trunk/profiler/features/
trunk/profiler/features/org.jboss.tools.profiler.feature/
trunk/profiler/features/org.jboss.tools.profiler.feature/.project
trunk/profiler/features/org.jboss.tools.profiler.feature/build.properties
trunk/profiler/features/org.jboss.tools.profiler.feature/feature.xml
trunk/profiler/plugins/
trunk/profiler/plugins/org.jboss.tools.profiler.ui/
trunk/profiler/plugins/org.jboss.tools.profiler.ui/.classpath
trunk/profiler/plugins/org.jboss.tools.profiler.ui/.project
trunk/profiler/plugins/org.jboss.tools.profiler.ui/META-INF/
trunk/profiler/plugins/org.jboss.tools.profiler.ui/META-INF/MANIFEST.MF
trunk/profiler/plugins/org.jboss.tools.profiler.ui/build.properties
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/JBossORG-EULA.txt
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/README.txt
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/concurrent.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/copyright.txt
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/ejb3-persistence.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/javassist.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-common.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-ejb3x.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-ant.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-client.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-client.properties
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-connectors.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-embedded.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-plugins.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-test.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler.properties
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler.sar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-remoting.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jbossall-client.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/lgpl.html
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/log4j.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/log4j.xml
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/servlet.jar
trunk/profiler/plugins/org.jboss.tools.profiler.ui/plugin.xml
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/JBossProfilerUiPlugin.java
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/Messages.java
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/JBossProfilerLaunchDelegate.java
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/JBossProfilerLauncherConstants.java
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/LaunchListener.java
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/LaunchTabGroupJUnit.java
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/LaunchUtils.java
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/Messages.java
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/messages.properties
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/BaseBlock.java
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/BaseLaunchConfigurationTab.java
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/JBossProfilerTab.java
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/JarBlock.java
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/LaunchTabGroup.java
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/PropertiesBlock.java
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/messages.properties
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/util/
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/util/FileNameFilter.java
trunk/profiler/tests/
Log:
https://jira.jboss.org/jira/browse/JBIDE-249
JBoss Profiler support
Added: trunk/profiler/features/org.jboss.tools.profiler.feature/.project
===================================================================
--- trunk/profiler/features/org.jboss.tools.profiler.feature/.project
(rev 0)
+++ trunk/profiler/features/org.jboss.tools.profiler.feature/.project 2009-06-15 11:23:29
UTC (rev 15948)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.profiler.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/profiler/features/org.jboss.tools.profiler.feature/build.properties
===================================================================
--- trunk/profiler/features/org.jboss.tools.profiler.feature/build.properties
(rev 0)
+++ trunk/profiler/features/org.jboss.tools.profiler.feature/build.properties 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1 @@
+bin.includes = feature.xml
Added: trunk/profiler/features/org.jboss.tools.profiler.feature/feature.xml
===================================================================
--- trunk/profiler/features/org.jboss.tools.profiler.feature/feature.xml
(rev 0)
+++ trunk/profiler/features/org.jboss.tools.profiler.feature/feature.xml 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.profiler.feature"
+ label="JBoss Profiler"
+ version="1.0.0.qualifier"
+ provider-name="JBoss by Red Hat">
+
+ <description
url="http://www.example.com/description">
+ [Enter Feature Description here.]
+ </description>
+
+ <copyright
url="http://www.example.com/copyright">
+ [Enter Copyright Description here.]
+ </copyright>
+
+ <license
url="http://www.example.com/license">
+ [Enter License Description here.]
+ </license>
+
+ <requires>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.debug.ui" version="3.5.0"
match="greaterOrEqual"/>
+ <import plugin="org.eclipse.core.variables"
version="3.2.200" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.ui.ide" version="3.5.0"
match="greaterOrEqual"/>
+ <import plugin="org.eclipse.core.filesystem" version="1.2.0"
match="greaterOrEqual"/>
+ <import plugin="org.eclipse.jdt.debug.ui" version="3.4.0"
match="greaterOrEqual"/>
+ <import plugin="org.eclipse.jdt.junit" version="3.5.0"
match="greaterOrEqual"/>
+ <import plugin="org.eclipse.jdt.launching" version="3.5.0"
match="greaterOrEqual"/>
+ </requires>
+
+ <plugin
+ id="org.jboss.tools.profiler.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/.classpath
===================================================================
--- trunk/profiler/plugins/org.jboss.tools.profiler.ui/.classpath
(rev 0)
+++ trunk/profiler/plugins/org.jboss.tools.profiler.ui/.classpath 2009-06-15 11:23:29 UTC
(rev 15948)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/.project
===================================================================
--- trunk/profiler/plugins/org.jboss.tools.profiler.ui/.project
(rev 0)
+++ trunk/profiler/plugins/org.jboss.tools.profiler.ui/.project 2009-06-15 11:23:29 UTC
(rev 15948)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.profiler.ui</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/profiler/plugins/org.jboss.tools.profiler.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/profiler/plugins/org.jboss.tools.profiler.ui/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/profiler/plugins/org.jboss.tools.profiler.ui/META-INF/MANIFEST.MF 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: JBoss Profiler
+Bundle-SymbolicName: org.jboss.tools.profiler.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.profiler.internal.ui.JBossProfilerUiPlugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.debug.ui;bundle-version="3.5.0",
+ org.eclipse.core.variables;bundle-version="3.2.200",
+ org.eclipse.ui.ide;bundle-version="3.5.0",
+ org.eclipse.core.filesystem;bundle-version="1.2.0",
+ org.eclipse.jdt.debug.ui;bundle-version="3.4.0",
+ org.eclipse.jdt.junit;bundle-version="3.5.0",
+ org.eclipse.jdt.launching;bundle-version="3.5.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.jboss.tools.profiler.internal.ui,
+ org.jboss.tools.profiler.internal.ui.launch,
+ org.jboss.tools.profiler.internal.ui.launchtabs,
+ org.jboss.tools.profiler.internal.ui.util
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/build.properties
===================================================================
--- trunk/profiler/plugins/org.jboss.tools.profiler.ui/build.properties
(rev 0)
+++ trunk/profiler/plugins/org.jboss.tools.profiler.ui/build.properties 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ embedded/
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/JBossORG-EULA.txt
===================================================================
--- trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/JBossORG-EULA.txt
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/JBossORG-EULA.txt 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,107 @@
+LICENSE AGREEMENT
+JBOSS(r)
+
+This License Agreement governs the use of the Software Packages and any updates to the
Software
+Packages, regardless of the delivery mechanism. Each Software Package is a collective
work
+under U.S. Copyright Law. Subject to the following terms, Red Hat, Inc. ("Red
Hat") grants to
+the user ("Client") a license to the applicable collective work(s) pursuant to
the
+GNU Lesser General Public License v. 2.1 except for the following Software Packages:
+(a) JBoss Portal Forums and JBoss Transactions JTS, each of which is licensed pursuant to
the
+GNU General Public License v.2;
+
+(b) JBoss Rules, which is licensed pursuant to the Apache License v.2.0;
+
+(c) an optional download for JBoss Cache for the Berkeley DB for Java database, which is
licensed under the
+(open source) Sleepycat License (if Client does not wish to use the open source version
of this database,
+it may purchase a license from Sleepycat Software);
+
+and (d) the BPEL extension for JBoss jBPM, which is licensed under the Common Public
License v.1,
+and, pursuant to the OASIS BPEL4WS standard, requires parties wishing to redistribute to
enter various
+royalty-free patent licenses.
+
+Each of the foregoing licenses is available at
http://www.opensource.org/licenses/index.php.
+
+1. The Software. "Software Packages" refer to the various software modules
that are created and made available
+for distribution by the
JBoss.org open source community at
http://www.jboss.org. Each
of the Software Packages
+may be comprised of hundreds of software components. The end user license agreement for
each component is located in
+the component's source code. With the exception of certain image files identified in
Section 2 below,
+the license terms for the components permit Client to copy, modify, and redistribute the
component,
+in both source code and binary code forms. This agreement does not limit Client's
rights under,
+or grant Client rights that supersede, the license terms of any particular component.
+
+2. Intellectual Property Rights. The Software Packages are owned by Red Hat and others
and are protected under copyright
+and other laws. Title to the Software Packages and any component, or to any copy,
modification, or merged portion shall
+remain with the aforementioned, subject to the applicable license. The "JBoss"
trademark, "Red Hat" trademark, the
+individual Software Package trademarks, and the "Shadowman" logo are registered
trademarks of Red Hat and its affiliates
+in the U.S. and other countries. This agreement permits Client to distribute unmodified
copies of the Software Packages
+using the Red Hat trademarks that Red Hat has inserted in the Software Packages on the
condition that Client follows Red Hat's
+trademark guidelines for those trademarks located at
http://www.redhat.com/about/corporate/trademark/. Client must abide by
+these trademark guidelines when distributing the Software Packages, regardless of whether
the Software Packages have been modified.
+If Client modifies the Software Packages, then Client must replace all Red Hat trademarks
and logos identified at
+http://www.jboss.com/company/logos, unless a separate agreement with Red Hat is executed
or other permission granted.
+Merely deleting the files containing the Red Hat trademarks may corrupt the Software
Packages.
+
+3. Limited Warranty. Except as specifically stated in this Paragraph 3 or a license for
a particular
+component, to the maximum extent permitted under applicable law, the Software Packages
and the
+components are provided and licensed "as is" without warranty of any kind,
expressed or implied,
+including the implied warranties of merchantability, non-infringement or fitness for a
particular purpose.
+Red Hat warrants that the media on which Software Packages may be furnished will be free
from defects in
+materials and manufacture under normal use for a period of 30 days from the date of
delivery to Client.
+Red Hat does not warrant that the functions contained in the Software Packages will meet
Client's requirements
+or that the operation of the Software Packages will be entirely error free or appear
precisely as described
+in the accompanying documentation. This warranty extends only to the party that purchases
the Services
+pertaining to the Software Packages from Red Hat or a Red Hat authorized distributor.
+
+4. Limitation of Remedies and Liability. To the maximum extent permitted by applicable
law, the remedies
+described below are accepted by Client as its only remedies. Red Hat's entire
liability, and Client's
+exclusive remedies, shall be: If the Software media is defective, Client may return it
within 30 days of
+delivery along with a copy of Client's payment receipt and Red Hat, at its option,
will replace it or
+refund the money paid by Client for the Software. To the maximum extent permitted by
applicable law,
+Red Hat or any Red Hat authorized dealer will not be liable to Client for any incidental
or consequential
+damages, including lost profits or lost savings arising out of the use or inability to
use the Software,
+even if Red Hat or such dealer has been advised of the possibility of such damages. In
no event shall
+Red Hat's liability under this agreement exceed the amount that Client paid to Red
Hat under this
+Agreement during the twelve months preceding the action.
+
+5. Export Control. As required by U.S. law, Client represents and warrants that it:
+(a) understands that the Software Packages are subject to export controls under the
+U.S. Commerce Department's Export Administration Regulations ("EAR");
+
+(b) is not located in a prohibited destination country under the EAR or U.S. sanctions
regulations
+(currently Cuba, Iran, Iraq, Libya, North Korea, Sudan and Syria);
+
+(c) will not export, re-export, or transfer the Software Packages to any prohibited
destination, entity,
+or individual without the necessary export license(s) or authorizations(s) from the U.S.
Government;
+
+(d) will not use or transfer the Software Packages for use in any sensitive nuclear,
chemical or
+biological weapons, or missile technology end-uses unless authorized by the U.S.
Government by
+regulation or specific license;
+
+(e) understands and agrees that if it is in the United States and exports or transfers
the Software
+Packages to eligible end users, it will, as required by EAR Section 740.17(e), submit
semi-annual
+reports to the Commerce Department's Bureau of Industry & Security (BIS), which
include the name and
+address (including country) of each transferee;
+
+and (f) understands that countries other than the United States may restrict the import,
use, or
+export of encryption products and that it shall be solely responsible for compliance with
any such
+import, use, or export restrictions.
+
+6. Third Party Programs. Red Hat may distribute third party software programs with the
Software Packages
+that are not part of the Software Packages and which Client must install separately.
These third party
+programs are subject to their own license terms. The license terms either accompany the
programs or
+can be viewed at
http://www.redhat.com/licenses/. If Client does not agree to abide by
the applicable
+license terms for such programs, then Client may not install them. If Client wishes to
install the programs
+on more than one system or transfer the programs to another party, then Client must
contact the licensor
+of the programs.
+
+7. General. If any provision of this agreement is held to be unenforceable, that shall
not affect the
+enforceability of the remaining provisions. This License Agreement shall be governed by
the laws of the
+State of North Carolina and of the United States, without regard to any conflict of laws
provisions,
+except that the United Nations Convention on the International Sale of Goods shall not
apply.
+
+Copyright 2006 Red Hat, Inc. All rights reserved.
+"JBoss" and the JBoss logo are registered trademarks of Red Hat, Inc.
+All other trademarks are the property of their respective owners.
+
+ Page 1 of 1 18 October 2006
+
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/README.txt
===================================================================
--- trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/README.txt
(rev 0)
+++ trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/README.txt 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,84 @@
+JBoss Profiler 2
+================
+
+JBoss Profiler 2 is a 100% pure Java profiler capable of profiling
+Java Enterprise 5 applications.
+
+Overview:
+---------
+ * 100% Pure Java
+
+ * Integration with JBoss Enterprise Middleware Suite (JEMS)
+
+ * Access through multiple protocols using JBoss Remoting
+ x Socket
+ x Remote Method Invocation (RMI)
+ x Hyper Text Transport Protocol (HTTP)
+
+ * Reports
+ x Overview
+ x Packages
+ x Classes
+ x Methods
+ x Hotspots
+ x Caller
+ x Wait time
+ x PerThread
+ x PerClass
+
+ * Able to specify method visibility
+ x Global
+ x Package
+ x Class
+
+ * Component identification
+ x Plain Old Java Object (POJO)
+ x java.lang.Throwable
+ x Enterprise JavaBean: Entity
+ x Enterprise JavaBean: Session
+ x Enterprise JavaBean: Message
+ x Servlet
+ x Servlet filter
+ x JavaServer Pages
+ x JMX MBean
+ x JavaServer Faces Converter
+ x JavaServer Faces Managed Bean
+ x RMI: Remote
+ x RMI: Server
+ x CORBA: Object
+ x CORBA: Servant
+ x 3rd party plugins
+
+ * Compare snapshots
+
+ * Client
+ x Ant integration
+ x Command line
+
+
+JBoss Profiler 2 was designed to run on the JBoss Application Server 4.2 and JBoss
Application Server 5.0
+releases or any other Java applications using Java Runtime Environment 5 or higher.
+
+User guide:
+-----------
+See the user's guide for more information about installation, configuration and
running
+the profiler.
+
+The JBoss Profiler 2 user guide is located in JBossProfiler2-UsersGuide.pdf.
+
+Developer guide:
+----------------
+See the developer guide for more information about extending the profiler with new
+functionality.
+
+The JBoss Profiler 2 developer guide is located in JBossProfiler2-DevelopersGuide.pdf.
+
+
+Development:
+------------
+Home :
http://www.jboss.org/jbossprofiler/
+Download :
http://www.jboss.org/jbossprofiler/downloads/
+Forum :
http://www.jboss.org/index.html?module=bb&op=viewforum&f=199
+Issue tracking:
http://jira.jboss.com/jira/browse/JBPROFILER
+AnonSVN :
http://anonsvn.jboss.org/repos/jbossprofiler/branches/JBossProfiler2
+Developer SVN :
https://svn.jboss.org/repos/jbossprofiler/branches/JBossProfiler2
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/concurrent.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/concurrent.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/copyright.txt
===================================================================
--- trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/copyright.txt
(rev 0)
+++ trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/copyright.txt 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,4 @@
+Authors:
+--------
+Jesper Pedersen <jesper.pedersen(a)jboss.org>
+
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/ejb3-persistence.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/ejb3-persistence.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/javassist.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/javassist.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-common.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-common.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-ejb3x.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-ejb3x.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-ant.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-ant.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-client.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-client.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-client.properties
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-client.properties
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-client.properties 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,7 @@
+protocol=socket
+host=localhost
+port=5400
+threshold=1.0
+savelocation=.
+plugin.1=org.jboss.profiler.plugins.Hibernate
+plugin.2=org.jboss.profiler.plugins.Seam
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-connectors.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-connectors.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-embedded.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-embedded.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-plugins.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-plugins.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-test.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler-test.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler.properties
===================================================================
--- trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler.properties
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler.properties 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,23 @@
+enable=yes
+cpu=yes
+memory=yes
+includes=org.jboss.profiler.*
+excludes=*
+visibility=private
+save=yes
+startup=yes
+repository=no
+remote=no
+store=memory
+location=.
+host=localhost
+port=5400
+ejb=yes
+servlet=yes
+jsf=yes
+jmx=yes
+rmi=yes
+corba=yes
+plugin.1=org.jboss.profiler.plugins.Hibernate
+plugin.2=org.jboss.profiler.plugins.Seam
+savelocation=C:/Users/max/runtime-New_configuration/test
\ No newline at end of file
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler.sar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-profiler.sar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-remoting.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jboss-remoting.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jbossall-client.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/jbossall-client.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/lgpl.html
===================================================================
--- trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/lgpl.html
(rev 0)
+++ trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/lgpl.html 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,350 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
+ <title>Appendix A. GNU Lesser General Public
License</title><meta name="generator" content="DocBook XSL
Stylesheets V1.69.1a"></head><body bgcolor="white"
text="black" link="#0000FF" vlink="#840084"
alink="#0000FF"><div class="appendix"
lang="en"><div class="titlepage"><div><div><h1
class="title"><a name="lgpl"></a>GNU Lesser General
Public License</h1></div><div><p
class="releaseinfo">This is the first released version of the Lesser GPL. It
also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.</p></div><div><p
class="copyright">Copyright © 1991, 1999 Free Software Foundation,
Inc.</p></div><div><div class="legalnotice"><a
name="gpl-legalnotice"></a><p>
+ </p><div
class="address"><p>Free Software Foundation, Inc.<br>
+ <span
class="street">51 Franklin Street, Fifth Floor</span>,<br>
+ <span class="city">Boston</span>,<br>
+ <span class="state">MA</span><br>
+ <span
class="postcode">02110-1301</span><br>
+ <span class="country">USA</span><br>
+ </p></div><p>
+ </p><p>Everyone is permitted to copy and distribute verbatim
+ copies of this license document, but changing it is not
+ allowed.</p></div></div><div><p
class="pubdate">Version 2.1, February
1999</p></div></div></div>
+<div class="section" lang="en"><div
class="titlepage"><div><div><h2 class="title"
style="clear: both"><a
name="lgpl-1"></a>Preamble</h2></div></div></div><p>The
licenses for most software are designed to take away your
+ freedom to share and change it. By contrast, the GNU General Public
+ Licenses are intended to guarantee your freedom to share and change
+ free software--to make sure the software is free for all its
users.</p><p>This license, the Lesser General Public License, applies to some
+ specially designated software packages--typically libraries--of the
+ Free Software Foundation and other authors who decide to use it. You
+ can use it too, but we suggest you first think carefully about whether
+ this license or the ordinary General Public License is the better
+ strategy to use in any particular case, based on the explanations
below.</p><p>When we speak of free software, we are referring to freedom of
use,
+ not price. Our General Public Licenses are designed to make sure that
+ you have the freedom to distribute copies of free software (and charge
+ for this service if you wish); that you receive source code or can get
+ it if you want it; that you can change the software and use pieces of
+ it in new free programs; and that you are informed that you can do
+ these things.</p><p>To protect your rights, we need to make restrictions
that forbid
+ distributors to deny you these rights or to ask you to surrender these
+ rights. These restrictions translate to certain responsibilities for
+ you if you distribute copies of the library or if you modify
it.</p><p>For example, if you distribute copies of the library, whether
gratis
+ or for a fee, you must give the recipients all the rights that we gave
+ you. You must make sure that they, too, receive or can get the source
+ code. If you link other code with the library, you must provide
+ complete object files to the recipients, so that they can relink them
+ with the library after making changes to the library and recompiling
+ it. And you must show them these terms so they know their
rights.</p><p>We protect your rights with a two-step method:
+ </p><div class="orderedlist"><ol
type="1"><li><p>we copyright the library,
and</p></li><li><p>we offer you this license, which gives you
legal
+ permission to copy, distribute and/or modify the
library.</p></li></ol></div><p>
+ </p><p>To protect each distributor, we want to make it very clear that
+ there is no warranty for the free library. Also, if the library is
+ modified by someone else and passed on, the recipients should know
+ that what they have is not the original version, so that the original
+ author's reputation will not be affected by problems that might be
+ introduced by others.</p><p>Finally, software patents pose a constant
threat to the existence of
+ any free program. We wish to make sure that a company cannot
+ effectively restrict the users of a free program by obtaining a
+ restrictive license from a patent holder. Therefore, we insist that
+ any patent license obtained for a version of the library must be
+ consistent with the full freedom of use specified in this
license.</p><p>Most GNU software, including some libraries, is covered by the
+ ordinary GNU General Public License. This license, the GNU Lesser
+ General Public License, applies to certain designated libraries, and
+ is quite different from the ordinary General Public License. We use
+ this license for certain libraries in order to permit linking those
+ libraries into non-free programs.</p><p>When a program is linked with a
library, whether statically or using
+ a shared library, the combination of the two is legally speaking a
+ combined work, a derivative of the original library. The ordinary
+ General Public License therefore permits such linking only if the
+ entire combination fits its criteria of freedom. The Lesser General
+ Public License permits more lax criteria for linking other code with
+ the library.</p><p>We call this license the <span
class="emphasis"><em>Lesser</em></span> General Public
License because it
+ does Less to protect the user's freedom than the ordinary General
+ Public License. It also provides other free software developers Less
+ of an advantage over competing non-free programs. These disadvantages
+ are the reason we use the ordinary General Public License for many
+ libraries. However, the Lesser license provides advantages in certain
+ special circumstances.</p><p>For example, on rare occasions, there may be
a special need to
+ encourage the widest possible use of a certain library, so that it becomes
+ a de-facto standard. To achieve this, non-free programs must be
+ allowed to use the library. A more frequent case is that a free
+ library does the same job as widely used non-free libraries. In this
+ case, there is little to gain by limiting the free library to free
+ software only, so we use the Lesser General Public License.</p><p>In
other cases, permission to use a particular library in non-free
+ programs enables a greater number of people to use a large body of
+ free software. For example, permission to use the GNU C Library in
+ non-free programs enables many more people to use the whole GNU
+ operating system, as well as its variant, the GNU/Linux operating
+ system.</p><p>Although the Lesser General Public License is Less
protective of the
+ users' freedom, it does ensure that the user of a program that is
+ linked with the Library has the freedom and the wherewithal to run
+ that program using a modified version of the Library.</p><p>The precise
terms and conditions for copying, distribution and
+ modification follow. Pay close attention to the difference between a
+ “<span class="quote">work based on the
library</span>” and a “<span class="quote">work
that uses the library</span>”. The
+ former contains code derived from the library, whereas the latter must
+ be combined with the library in order to run.</p></div><div
class="section" lang="en"><div
class="titlepage"><div><div><h2 class="title"
style="clear: both"><a name="lgpl-2"></a>TERMS AND
CONDITIONS FOR COPYING, DISTRIBUTION AND
MODIFICATION</h2></div></div></div><div
class="section" lang="en"><div
class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-0"></a>Section
0</h3></div></div></div><p>This License Agreement applies to
any software library or other
+ program which contains a notice placed by the copyright holder or
+ other authorized party saying it may be distributed under the terms of
+ this Lesser General Public License (also called “<span
class="quote">this License</span>”).
+ Each licensee is addressed as “<span
class="quote">you</span>”.</p><p>A
“<span class="quote">library</span>” means a
collection of software functions and/or data
+ prepared so as to be conveniently linked with application programs
+ (which use some of those functions and data) to form
executables.</p><p>The “<span
class="quote">Library</span>”, below, refers to any such
software library or work
+ which has been distributed under these terms. A “<span
class="quote">work based on the
+ Library</span>” means either the Library or any derivative work
under
+ copyright law: that is to say, a work containing the Library or a
+ portion of it, either verbatim or with modifications and/or translated
+ straightforwardly into another language. (Hereinafter, translation is
+ included without limitation in the term “<span
class="quote">modification</span>”.)</p><p>“<span
class="quote">Source code</span>” for a work means the
preferred form of the work for
+ making modifications to it. For a library, complete source code means
+ all the source code for all modules it contains, plus any associated
+ interface definition files, plus the scripts used to control compilation
+ and installation of the library.</p><p>Activities other than copying,
distribution and modification are not
+ covered by this License; they are outside its scope. The act of
+ running a program using the Library is not restricted, and output from
+ such a program is covered only if its contents constitute a work based
+ on the Library (independent of the use of the Library in a tool for
+ writing it). Whether that is true depends on what the Library does
+ and what the program that uses the Library does.</p></div><div
class="section" lang="en"><div
class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-1"></a>Section
1</h3></div></div></div><p>You may copy and distribute
verbatim copies of the Library's
+ complete source code as you receive it, in any medium, provided that
+ you conspicuously and appropriately publish on each copy an
+ appropriate copyright notice and disclaimer of warranty; keep intact
+ all the notices that refer to this License and to the absence of any
+ warranty; and distribute a copy of this License along with the
+ Library.</p><p>You may charge a fee for the physical act of
transferring a copy,
+ and you may at your option offer warranty protection in exchange for a
+ fee.</p></div><div class="section"
lang="en"><div class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-2"></a>Section
2</h3></div></div></div><p>You may modify your copy or
copies of the Library or any portion
+ of it, thus forming a work based on the Library, and copy and
+ distribute such modifications or work under the terms of <a
href="#lgpl-2-1" title="Section 1">Section 1</a>
+ above, provided that you also meet all of these conditions:
+ </p><div class="orderedlist"><ol
type="a"><li><p>The modified work must itself be a software
library.</p></li><li><p>You must cause the files modified to carry
prominent notices
+ stating that you changed the files and the date of any
change.</p></li><li><p>You must cause the whole of the work to be
licensed at no
+ charge to all third parties under the terms of this
License.</p></li><li><p><a
name="lgpl-2-2-d"></a>If a facility in the modified Library refers to a
function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.</p><p>(For example, a function in a
library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, <a href="#lgpl-2-2-d">Subsection 2d</a>
requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square
roots.)</p></li></ol></div><p>
+ </p><p>These requirements apply to the modified work as a whole. If
+ identifiable sections of that work are not derived from the Library,
+ and can be reasonably considered independent and separate works in
+ themselves, then this License, and its terms, do not apply to those
+ sections when you distribute them as separate works. But when you
+ distribute the same sections as part of a whole which is a work based
+ on the Library, the distribution of the whole must be on the terms of
+ this License, whose permissions for other licensees extend to the
+ entire whole, and thus to each and every part regardless of who wrote
+ it.</p><p>Thus, it is not the intent of this section to claim rights or
contest
+ your rights to work written entirely by you; rather, the intent is to
+ exercise the right to control the distribution of derivative or
+ collective works based on the Library.</p><p>In addition, mere
aggregation of another work not based on the Library
+ with the Library (or with a work based on the Library) on a volume of
+ a storage or distribution medium does not bring the other work under
+ the scope of this License.</p></div><div class="section"
lang="en"><div class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-3"></a>Section
3</h3></div></div></div><p>You may opt to apply the terms of
the ordinary GNU General Public
+ License instead of this License to a given copy of the Library. To do
+ this, you must alter all the notices that refer to this License, so
+ that they refer to the ordinary GNU General Public License, version 2,
+ instead of to this License. (If a newer version than version 2 of the
+ ordinary GNU General Public License has appeared, then you can specify
+ that version instead if you wish.) Do not make any other change in
+ these notices.</p><p>Once this change is made in a given copy, it is
irreversible for
+ that copy, so the ordinary GNU General Public License applies to all
+ subsequent copies and derivative works made from that copy.</p><p>This
option is useful when you wish to copy part of the code of
+ the Library into a program that is not a library.</p></div><div
class="section" lang="en"><div
class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-4"></a>Section
4</h3></div></div></div><p>You may copy and distribute the
Library (or a portion or
+ derivative of it, under <a href="#lgpl-2-2" title="Section
2">Section 2</a>) in object code or executable form
+ under the terms of <a href="#lgpl-2-1" title="Section
1">Sections 1</a> and <a href="#lgpl-2-2" title="Section
2">2</a> above provided that you accompany
+ it with the complete corresponding machine-readable source code, which
+ must be distributed under the terms of <a href="#lgpl-2-1"
title="Section 1">Sections 1</a> and <a href="#lgpl-2-2"
title="Section 2">2</a> above on a
+ medium customarily used for software interchange.</p><p>If distribution
of object code is made by offering access to copy
+ from a designated place, then offering equivalent access to copy the
+ source code from the same place satisfies the requirement to
+ distribute the source code, even though third parties are not
+ compelled to copy the source along with the object
code.</p></div><div class="section"
lang="en"><div class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-5"></a>Section
5</h3></div></div></div><p>A program that contains no
derivative of any portion of the
+ Library, but is designed to work with the Library by being compiled or
+ linked with it, is called a “<span class="quote">work
that uses the Library</span>”. Such a
+ work, in isolation, is not a derivative work of the Library, and
+ therefore falls outside the scope of this License.</p><p>However,
linking a “<span class="quote">work that uses the
Library</span>” with the Library
+ creates an executable that is a derivative of the Library (because it
+ contains portions of the Library), rather than a “<span
class="quote">work that uses the
+ library</span>”. The executable is therefore covered by this
License.
+ <a href="#lgpl-2-6" title="Section 6">Section 6</a>
states terms for distribution of such executables.</p><p>When a
“<span class="quote">work that uses the
Library</span>” uses material from a header file
+ that is part of the Library, the object code for the work may be a
+ derivative work of the Library even though the source code is not.
+ Whether this is true is especially significant if the work can be
+ linked without the Library, or if the work is itself a library. The
+ threshold for this to be true is not precisely defined by law.</p><p>If
such an object file uses only numerical parameters, data
+ structure layouts and accessors, and small macros and small inline
+ functions (ten lines or less in length), then the use of the object
+ file is unrestricted, regardless of whether it is legally a derivative
+ work. (Executables containing this object code plus portions of the
+ Library will still fall under <a href="#lgpl-2-6" title="Section
6">Section 6</a>.)</p><p>Otherwise, if the work is a derivative
of the Library, you may
+ distribute the object code for the work under the terms of <a
href="#lgpl-2-6" title="Section 6">Section 6</a>.
+ Any executables containing that work also fall under <a
href="#lgpl-2-6" title="Section 6">Section 6</a>,
+ whether or not they are linked directly with the Library
itself.</p></div><div class="section"
lang="en"><div class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-6"></a>Section
6</h3></div></div></div><p>As an exception to the Sections
above, you may also combine or
+ link a “<span class="quote">work that uses the
Library</span>” with the Library to produce a
+ work containing portions of the Library, and distribute that work
+ under terms of your choice, provided that the terms permit
+ modification of the work for the customer's own use and reverse
+ engineering for debugging such modifications.</p><p>You must give
prominent notice with each copy of the work that the
+ Library is used in it and that the Library and its use are covered by
+ this License. You must supply a copy of this License. If the work
+ during execution displays copyright notices, you must include the
+ copyright notice for the Library among them, as well as a reference
+ directing the user to the copy of this License. Also, you must do one
+ of these things:
+ </p><div class="orderedlist"><ol
type="a"><li><p><a
name="lgpl-2-6-a"></a>Accompany the work with the complete
corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ <a href="#lgpl-2-1" title="Section 1">Sections 1</a>
and <a href="#lgpl-2-2" title="Section 2">2</a> above);
and, if the work is an executable linked
+ with the Library, with the complete machine-readable “<span
class="quote">work that
+ uses the Library</span>”, as object code and/or source code, so that
the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)</p></li><li><p>Use a
suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made
with.</p></li><li><p>Accompany the work with a written offer,
valid for at
+ least three years, to give the same user the materials
+ specified in <a href="#lgpl-2-6-a">Subsection 6a</a>, above, for
a charge no more
+ than the cost of performing this
distribution.</p></li><li><p>If distribution of the work is made
by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.</p></li><li><p>Verify
that the user has already received a copy of these
+ materials or that you have already sent this user a
copy.</p></li></ol></div><p>
+ </p><p>For an executable, the required form of the “<span
class="quote">work that uses the
+ Library</span>” must include any data and utility programs needed
for
+ reproducing the executable from it. However, as a special exception,
+ the materials to be distributed need not include anything that is
+ normally distributed (in either source or binary form) with the major
+ components (compiler, kernel, and so on) of the operating system on
+ which the executable runs, unless that component itself accompanies
+ the executable.</p><p>It may happen that this requirement contradicts
the license
+ restrictions of other proprietary libraries that do not normally
+ accompany the operating system. Such a contradiction means you cannot
+ use both them and the Library together in an executable that you
+ distribute.</p></div><div class="section"
lang="en"><div class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-7"></a>Section
7</h3></div></div></div><p>You may place library facilities
that are a work based on the
+ Library side-by-side in a single library together with other library
+ facilities not covered by this License, and distribute such a combined
+ library, provided that the separate distribution of the work based on
+ the Library and of the other library facilities is otherwise
+ permitted, and provided that you do these two things:
+ </p><div class="orderedlist"><ol
type="a"><li><p>Accompany the combined library with a copy of the
same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.</p></li><li><p>Give prominent notice with the
combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same
work.</p></li></ol></div><p>
+ </p></div><div class="section"
lang="en"><div class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-8"></a>Section
8</h3></div></div></div><p>You may not copy, modify,
sublicense, link with, or distribute
+ the Library except as expressly provided under this License. Any
+ attempt otherwise to copy, modify, sublicense, link with, or
+ distribute the Library is void, and will automatically terminate your
+ rights under this License. However, parties who have received copies,
+ or rights, from you under this License will not have their licenses
+ terminated so long as such parties remain in full
compliance.</p></div><div class="section"
lang="en"><div class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-9"></a>Section
9</h3></div></div></div><p>You are not required to accept
this License, since you have not
+ signed it. However, nothing else grants you permission to modify or
+ distribute the Library or its derivative works. These actions are
+ prohibited by law if you do not accept this License. Therefore, by
+ modifying or distributing the Library (or any work based on the
+ Library), you indicate your acceptance of this License to do so, and
+ all its terms and conditions for copying, distributing or modifying
+ the Library or works based on it.</p></div><div
class="section" lang="en"><div
class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-10"></a>Section
10</h3></div></div></div><p>Each time you redistribute the
Library (or any work based on the
+ Library), the recipient automatically receives a license from the
+ original licensor to copy, distribute, link with or modify the Library
+ subject to these terms and conditions. You may not impose any further
+ restrictions on the recipients' exercise of the rights granted herein.
+ You are not responsible for enforcing compliance by third parties with
+ this License.</p></div><div class="section"
lang="en"><div class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-11"></a>Section
11</h3></div></div></div><p>If, as a consequence of a court
judgment or allegation of patent
+ infringement or for any other reason (not limited to patent issues),
+ conditions are imposed on you (whether by court order, agreement or
+ otherwise) that contradict the conditions of this License, they do not
+ excuse you from the conditions of this License. If you cannot
+ distribute so as to satisfy simultaneously your obligations under this
+ License and any other pertinent obligations, then as a consequence you
+ may not distribute the Library at all. For example, if a patent
+ license would not permit royalty-free redistribution of the Library by
+ all those who receive copies directly or indirectly through you, then
+ the only way you could satisfy both it and this License would be to
+ refrain entirely from distribution of the Library.</p><p>If any portion
of this section is held invalid or unenforceable under any
+ particular circumstance, the balance of the section is intended to apply,
+ and the section as a whole is intended to apply in other
circumstances.</p><p>It is not the purpose of this section to induce you to
infringe any
+ patents or other property right claims or to contest validity of any
+ such claims; this section has the sole purpose of protecting the
+ integrity of the free software distribution system which is
+ implemented by public license practices. Many people have made
+ generous contributions to the wide range of software distributed
+ through that system in reliance on consistent application of that
+ system; it is up to the author/donor to decide if he or she is willing
+ to distribute software through any other system and a licensee cannot
+ impose that choice.</p><p>This section is intended to make thoroughly
clear what is believed to
+ be a consequence of the rest of this License.</p></div><div
class="section" lang="en"><div
class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-12"></a>Section
12</h3></div></div></div><p>If the distribution and/or use
of the Library is restricted in
+ certain countries either by patents or by copyrighted interfaces, the
+ original copyright holder who places the Library under this License may add
+ an explicit geographical distribution limitation excluding those countries,
+ so that distribution is permitted only in or among countries not thus
+ excluded. In such case, this License incorporates the limitation as if
+ written in the body of this License.</p></div><div
class="section" lang="en"><div
class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-13"></a>Section
13</h3></div></div></div><p>The Free Software Foundation may
publish revised and/or new
+ versions of the Lesser General Public License from time to time.
+ Such new versions will be similar in spirit to the present version,
+ but may differ in detail to address new problems or
concerns.</p><p>Each version is given a distinguishing version number. If the
Library
+ specifies a version number of this License which applies to it and
+ “<span class="quote">any later
version</span>”, you have the option of following the terms and
+ conditions either of that version or of any later version published by
+ the Free Software Foundation. If the Library does not specify a
+ license version number, you may choose any version ever published by
+ the Free Software Foundation.</p></div><div
class="section" lang="en"><div
class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-14"></a>Section
14</h3></div></div></div><p>If you wish to incorporate parts
of the Library into other free
+ programs whose distribution conditions are incompatible with these,
+ write to the author to ask for permission. For software which is
+ copyrighted by the Free Software Foundation, write to the Free
+ Software Foundation; we sometimes make exceptions for this. Our
+ decision will be guided by the two goals of preserving the free status
+ of all derivatives of our free software and of promoting the sharing
+ and reuse of software generally.</p></div><div
class="section" lang="en"><div
class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-15"></a>NO WARRANTY
Section 15</h3></div></div></div><p>BECAUSE THE LIBRARY IS
LICENSED FREE OF CHARGE, THERE IS NO
+ WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+ OTHER PARTIES PROVIDE THE LIBRARY “<span class="quote">AS
IS</span>” WITHOUT WARRANTY OF ANY
+ KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+ LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+ THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.</p></div><div class="section"
lang="en"><div class="titlepage"><div><div><h3
class="title"><a name="lgpl-2-16"></a>Section
16</h3></div></div></div><p>IN NO EVENT UNLESS REQUIRED BY
APPLICABLE LAW OR AGREED TO IN
+ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+ AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+ FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+ CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+ LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+ RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ DAMAGES.</p><p>END OF TERMS AND
CONDITIONS</p></div></div><div class="section"
lang="en"><div class="titlepage"><div><div><h2
class="title" style="clear: both"><a
name="lgpl-3"></a>How to Apply These Terms to Your New
Libraries</h2></div></div></div><p>If you develop a new
library, and you want it to be of the greatest
+ possible use to the public, we recommend making it free software that
+ everyone can redistribute and change. You can do so by permitting
+ redistribution under these terms (or, alternatively, under the terms of the
+ ordinary General Public License).</p><p>To apply these terms, attach the
following notices to the library. It is
+ safest to attach them to the start of each source file to most effectively
+ convey the exclusion of warranty; and each file should have at least the
+ “<span class="quote">copyright</span>” line
and a pointer to where the full notice is found.</p><p><one line to
give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of
author></p><p>This library is free software; you can redistribute it
and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later
version.</p><p>This library is distributed in the hope that it will be
useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.</p><p>You should have
received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA</p><p>Also add information on how to contact you by electronic and paper
mail.</p><p>You should also get your employer (if you work as a programmer) or
your
+ school, if any, to sign a “<span class="quote">copyright
disclaimer</span>” for the library, if
+ necessary. Here is a sample; alter the names:</p><p>Yoyodyne, Inc.,
hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random
Hacker.</p><p><signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice</p><p>That's all there is to
it!</p></div></div></body></html>
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/log4j.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/log4j.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/log4j.xml
===================================================================
--- trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/log4j.xml
(rev 0)
+++ trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/log4j.xml 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/">
+ <appender name="console"
class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%c]
%m%n"/>
+ </layout>
+ </appender>
+
+ <root>
+ <priority value ="info" />
+ <appender-ref ref="console" />
+ </root>
+
+</log4j:configuration>
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/servlet.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/embedded/servlet.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/profiler/plugins/org.jboss.tools.profiler.ui/plugin.xml
===================================================================
--- trunk/profiler/plugins/org.jboss.tools.profiler.ui/plugin.xml
(rev 0)
+++ trunk/profiler/plugins/org.jboss.tools.profiler.ui/plugin.xml 2009-06-15 11:23:29 UTC
(rev 15948)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.debug.core.launchDelegates">
+ <launchDelegate
+
delegate="org.jboss.tools.profiler.internal.ui.launch.JBossProfilerLaunchDelegate"
+ id="org.jboss.tools.profiler.core.JBossProfilerDelgate"
+ modes="profile"
+ name="JBoss Profiler"
+ type="org.eclipse.jdt.launching.localJavaApplication">
+ </launchDelegate>
+ <launchDelegate
+
delegate="org.jboss.tools.profiler.internal.ui.launch.JBossProfilerLaunchDelegate"
+ id="org.jboss.tools.profiler.core.JBossProfilerDelgateJUnit"
+ modes="profile"
+ name="JBoss Profiler"
+ type="org.eclipse.jdt.junit.launchconfig">
+ </launchDelegate>
+ </extension>
+
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTabs">
+ <tab
+
class="org.jboss.tools.profiler.internal.ui.launchtabs.JBossProfilerTab"
+
group="org.eclipse.jdt.debug.ui.launchConfigurationTabGroup.localJavaApplication"
+ id="org.jboss.tools.profiler.ui.jbossprofilertab"
+ name="JBoss Profiler">
+ <placement
+ after="org.eclipse.jdt.debug.ui.javaMainTab">
+ </placement>
+ <!--<associatedDelegate
+
delegate="org.jboss.tools.profiler.core.JBossProfilerDelgate">
+ </associatedDelegate>-->
+ </tab>
+ </extension>
+
+
+
+</plugin>
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/JBossProfilerUiPlugin.java
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/JBossProfilerUiPlugin.java
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/JBossProfilerUiPlugin.java 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,178 @@
+
+package org.jboss.tools.profiler.internal.ui;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.tools.profiler.internal.ui.launch.LaunchListener;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class JBossProfilerUiPlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.profiler.internal.ui";
//$NON-NLS-1$
+
+ // The shared instance
+ private static JBossProfilerUiPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public JBossProfilerUiPlugin() {
+ }
+
+
+ public static String getPluginId() {
+ return getDefault().getBundle().getSymbolicName();
+ }
+
+ // Launches listener
+ private LaunchListener launchListener;
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ public LaunchListener getLaunchListener() {
+ if (launchListener == null)
+ launchListener = new LaunchListener();
+ return launchListener;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ if (launchListener != null)
+ launchListener.shutdown();
+
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static JBossProfilerUiPlugin getDefault() {
+ return plugin;
+ }
+
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window = getActiveWorkbenchWindow();
+ if (window != null) {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ public static IWorkspace getWorkspace() {
+ return ResourcesPlugin.getWorkspace();
+ }
+
+ /**
+ * Logs the specified status with this plug-in's log.
+ *
+ * @param status status to log
+ */
+ public void log(IStatus status) {
+ getLog().log(status);
+ }
+
+
+ /**
+ * Logs an internal info with the specified message.
+ *
+ * @param message the error message to log
+ */
+ public void log(String message) {
+ log(new Status(IStatus.INFO, getPluginId(), 0, message, null) );
+ }
+
+ /**
+ * Logs an internal error with the specified message.
+ *
+ * @param message the error message to log
+ */
+ public void logErrorMessage(String message, Throwable t) {
+ logMessage(IStatus.ERROR, message, t);
+ }
+
+ public void logMessage(int lvl, String message, Throwable t) {
+ if(t==null) {
+ log(message);
+ } else {
+ log(new MultiStatus(getPluginId(), lvl , new IStatus[] { throwableToStatus(t) },
message, null));
+ }
+ }
+
+ public static IStatus throwableToStatus(Throwable t, int code) {
+ List<IStatus> causes = new ArrayList<IStatus>();
+ Throwable temp = t;
+ while(temp!=null && temp.getCause()!=temp) {
+ causes.add(new Status(IStatus.ERROR, getPluginId(), code,
temp.getMessage()==null?temp.toString() + ":" +
Messages.JBossProfilerUiPlugin_no_message:temp.toString(), temp) ); //$NON-NLS-1$
+ temp = temp.getCause();
+ }
+ String msg = Messages.JBossProfilerUiPlugin_no_message;
+ if(t!=null && t.getMessage()!=null) {
+ msg = t.toString();
+ }
+
+ if(causes.isEmpty()) {
+ return new Status(IStatus.ERROR, getPluginId(), code, msg, t);
+ } else {
+ return new MultiStatus(getPluginId(), code,causes.toArray(new
IStatus[causes.size()]), msg, t);
+ }
+
+ }
+
+ public static IStatus throwableToStatus(Throwable t) {
+ return throwableToStatus(t, 150);
+ }
+
+ public void logErrorMessage(String message, Throwable t[]) {
+ IStatus[] children = new IStatus[t.length];
+ for (int i = 0; i < t.length; i++) {
+ Throwable throwable = t[i];
+ children[i] = throwableToStatus(throwable);
+ }
+
+ IStatus s = new MultiStatus(getPluginId(), 0,children, message, null);
+ log(s);
+ }
+
+ /**
+ * Logs an internal error with the specified throwable
+ *
+ * @param e the exception to be logged
+ */
+ public void log(Throwable e) {
+ log(new Status(IStatus.ERROR, getPluginId(), 150, "Internal Error", e) );
//$NON-NLS-1$
+ }
+
+}
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/Messages.java
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/Messages.java
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/Messages.java 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,33 @@
+package org.jboss.tools.profiler.internal.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.jboss.tools.profiler.internal.ui.messages"; //$NON-NLS-1$
+ public static String BaseBlock_cannot_open_directory;
+ public static String BaseBlock_cannot_open_file;
+ public static String BaseBlock_choose_a_directory;
+ public static String BaseBlock_choose_location_relative_to_ws;
+ public static String BaseBlock_directory_not_found;
+ public static String BaseBlock_file_not_found;
+ public static String BaseBlock_filesystem;
+ public static String BaseBlock_open_directory;
+ public static String BaseBlock_open_file;
+ public static String BaseBlock_select_directory;
+ public static String BaseBlock_select_file;
+ public static String BaseBlock_select_properties_file;
+ public static String BaseBlock_the_is_not_specified;
+ public static String BaseBlock_variables;
+ public static String BaseBlock_workspace;
+ public static String JBossProfilerUiPlugin_no_message;
+ public static String LaunchUtils_probem_finding_embedded_runtime;
+ public static String LaunchUtils_problem_finding_embedded_agent_runtime;
+ public static String LaunchUtils_problem_finding_embedded_client;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/JBossProfilerLaunchDelegate.java
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/JBossProfilerLaunchDelegate.java
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/JBossProfilerLaunchDelegate.java 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,122 @@
+package org.jboss.tools.profiler.internal.ui.launch;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.IVMRunner;
+import org.eclipse.jdt.launching.JavaLaunchDelegate;
+import org.jboss.tools.profiler.internal.ui.JBossProfilerUiPlugin;
+
+public class JBossProfilerLaunchDelegate extends JavaLaunchDelegate {
+
+ IProcess profiledProcess = null;
+
+ @Override
+ public String getVMArguments(ILaunchConfiguration configuration)
+ throws CoreException {
+ String vmArguments = super.getVMArguments(configuration);
+
+ String agentJar = LaunchUtils.getAgentJar(configuration);
+
+ String propertiesFile = getPropertiesFiles(configuration);
+
+ return "-javaagent:" + agentJar + " -Djboss-profiler.properties="
+ propertiesFile + " " + vmArguments;
+
+ }
+
+ private String getPropertiesFiles(ILaunchConfiguration configuration) throws
CoreException {
+
+ if(configuration.getAttribute(JBossProfilerLauncherConstants.GENERATE_PROPERTIES,
true)) {
+ try {
+ File temp = File.createTempFile("jboss-profiler", "properties");
+ Properties p = new Properties();
+ p.setProperty("enable",
Boolean.toString(configuration.getAttribute(JBossProfilerLauncherConstants.ENABLE_ON_STARTUP,
true)));
+ p.setProperty("save",
Boolean.toString(configuration.getAttribute(JBossProfilerLauncherConstants.SAVE_ON_EXIT,
true)));
+
+ p.setProperty("host", "localhost");
+ p.setProperty("port", "5400");
+
+ p.setProperty("savelocation",
+ LaunchUtils.getSaveLocation(configuration));
+
+ p.setProperty("remote", "no");
+
+ p.setProperty("cpu", "yes");
+ p.setProperty("memory", "yes");
+ p.setProperty("includes", "*");
+ p.setProperty("excludes", "");
+ //p.setProperty("visibility", "private");
+
+ p.setProperty("startup", "yes");
+ p.setProperty("repository", "no");
+
+ p.setProperty("store", "memory");
+ p.setProperty("location", ".");
+ p.setProperty("ejb", "yes");
+ p.setProperty("servlet", "yes");
+ p.setProperty("jsf", "yes");
+ p.setProperty("jmx", "yes");
+ p.setProperty("rmi", "yes");
+ p.setProperty("corba", "yes");
+ p.setProperty("plugin.1",
"org.jboss.profiler.plugins.Hibernate");
+ p.setProperty("plugin.2", "org.jboss.profiler.plugins.Seam");
+ FileOutputStream fos = null;
+ try {
+ fos = new FileOutputStream(temp);
+ p.store(fos, "");
+ } finally {
+ if(fos!=null) {
+ fos.close();
+ }
+ }
+
+ return temp.getAbsolutePath();
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR,
JBossProfilerUiPlugin.getPluginId(),
Messages.JBossProfilerLaunchDelegate_error_writing_temporary_properties));
+ }
+ } else {
+ return
getSubstitutedString(configuration.getAttribute(JBossProfilerLauncherConstants.PROPERTIES_FILE,
""));
+ }
+ }
+
+
+ private static String getSubstitutedString(String text) throws CoreException {
+ if (text == null)
+ return ""; //$NON-NLS-1$
+ IStringVariableManager mgr = VariablesPlugin.getDefault().getStringVariableManager();
+ return mgr.performStringSubstitution(text);
+ }
+
+ @Override
+ public IVMRunner getVMRunner(ILaunchConfiguration configuration, String mode)
+ throws CoreException {
+ IVMInstall vm = verifyVMInstall(configuration);
+ IVMRunner runner = vm.getVMRunner(ILaunchManager.RUN_MODE);
+ return runner;
+ }
+
+ @Override
+ public void launch(ILaunchConfiguration configuration, String mode,
+ ILaunch launch, IProgressMonitor monitor) throws CoreException {
+
+
+ JBossProfilerUiPlugin.getDefault().getLaunchListener().manage(launch);
+
+ super.launch(configuration, mode, launch, monitor);
+
+ }
+
+}
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/JBossProfilerLauncherConstants.java
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/JBossProfilerLauncherConstants.java
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/JBossProfilerLauncherConstants.java 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,13 @@
+package org.jboss.tools.profiler.internal.ui.launch;
+
+public interface JBossProfilerLauncherConstants {
+
+ String PROFILER_JAR = "jboss.profiler.jar";
+ String USE_EMBEDDED_JAR = "jboss.profiler.use_embedded_jar";
+ String GENERATE_PROPERTIES = "jboss.profiler.generate_properties";
+ String PROPERTIES_FILE = "jboss.profiler.properties_file";
+ String ENABLE_ON_STARTUP = "jboss.profiler.settings.enable";
+ String SAVE_ON_EXIT = "jboss.profiler.settings.save";
+ String SAVE_LOCATION = "jboss.profiler.settings.savelocation";
+
+}
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/LaunchListener.java
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/LaunchListener.java
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/LaunchListener.java 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,280 @@
+package org.jboss.tools.profiler.internal.ui.launch;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IDebugEventSetListener;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchListener;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.Launch;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.IVMRunner;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jdt.launching.VMRunnerConfiguration;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.browser.IWebBrowser;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+import org.jboss.tools.profiler.internal.ui.JBossProfilerUiPlugin;
+
+public class LaunchListener implements ILaunchListener, IDebugEventSetListener {
+ private List<ILaunch> managedLaunches;
+
+ public LaunchListener() {
+ managedLaunches = new ArrayList<ILaunch>();
+ }
+
+ public void manage(ILaunch launch) {
+ if (managedLaunches.size() == 0)
+ hookListener(true);
+ if (!managedLaunches.contains(launch))
+ managedLaunches.add(launch);
+ }
+
+ /**
+ * @see
org.eclipse.debug.core.ILaunchesListener#launchesRemoved(org.eclipse.debug.core.ILaunch)
+ */
+ public void launchRemoved(ILaunch launch) {
+ update(launch, true);
+ }
+
+ /**
+ * @see
org.eclipse.debug.core.ILaunchesListener#launchesAdded(org.eclipse.debug.core.ILaunch)
+ */
+ public void launchAdded(ILaunch launch) {
+ }
+
+ /**
+ * @see
org.eclipse.debug.core.ILaunchesListener#launchesChanged(org.eclipse.debug.core.ILaunch)
+ */
+ public void launchChanged(ILaunch launch) {
+ }
+
+ private void update(ILaunch launch, boolean remove) {
+ if (managedLaunches.contains(launch)) {
+ if (remove || launch.isTerminated()) {
+ managedLaunches.remove(launch);
+ if (managedLaunches.size() == 0) {
+ hookListener(false);
+ }
+ }
+ }
+ }
+
+ private void hookListener(boolean add) {
+ DebugPlugin debugPlugin = DebugPlugin.getDefault();
+ ILaunchManager launchManager = debugPlugin.getLaunchManager();
+ if (add) {
+ launchManager.addLaunchListener(this);
+ debugPlugin.addDebugEventListener(this);
+ } else {
+ launchManager.removeLaunchListener(this);
+ debugPlugin.removeDebugEventListener(this);
+ }
+ }
+
+ public void shutdown() {
+ hookListener(false);
+ }
+
+ /**
+ * @see
org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent)
+ */
+ public void handleDebugEvents(DebugEvent[] events) {
+ for (int i = 0; i < events.length; i++) {
+ DebugEvent event = events[i];
+ Object source = event.getSource();
+ if (source instanceof IProcess
+ && event.getKind() == DebugEvent.TERMINATE) {
+ IProcess process = (IProcess) source;
+ ILaunch launch = process.getLaunch();
+ if (launch != null) {
+ try {
+ launchTerminated(launch, process.getExitValue());
+ } catch (DebugException e) {
+ // ignore
+ }
+ }
+ }
+ }
+ }
+
+ private void launchTerminated(final ILaunch launch, int returnValue) {
+ if (managedLaunches.contains(launch)) {
+ update(launch, true);
+
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+
+ File log = getMostRecentLogFile(launch
+ .getLaunchConfiguration());
+ if (log != null && log.exists()) {
+
+ boolean open = MessageDialog
+ .openQuestion(
+ JBossProfilerUiPlugin
+ .getActiveWorkbenchShell(),
+ "JBoss Profiler",
+ "Launch with JBoss Profiler completed. \nDo you want to generate and open
the latest snapshot generated ?");
+ if (open) {
+ File generateReport = generateReport(log, launch
+ .getLaunchConfiguration());
+ if (generateReport != null) {
+ openInEditor(new File(generateReport,
+ "index.html"));
+ } // else something went wrong generating the
+ // report. Failing gracefully
+ // and expect the error log or generation to show
+ // possible cause.
+ }
+ }
+
+ }
+
+ });
+ }
+ }
+
+ private void openInEditor(File u) {
+
+ // TODO: should put this in a job ...
+ int count = 0;
+ while (!u.exists() && count <= 10) {
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e) {
+ // ignore
+ }
+ }
+
+ IWorkbenchBrowserSupport support = PlatformUI.getWorkbench()
+ .getBrowserSupport();
+ IWebBrowser browser;
+ try {
+ browser = support.createBrowser(null);
+ } catch (PartInitException e) {
+ JBossProfilerUiPlugin.getDefault().logErrorMessage(
+ "Could not create browser.", e);
+ return;
+ }
+
+ try {
+ browser.openURL(u.toURL());
+ } catch (PartInitException e) {
+ JBossProfilerUiPlugin.getDefault().logErrorMessage(
+ "Could not open browser.", e);
+ } catch (MalformedURLException e) {
+ JBossProfilerUiPlugin.getDefault().logErrorMessage(
+ "Could not open browser.", e);
+ }
+ }
+
+ private File generateReport(File log, ILaunchConfiguration configuration) {
+ IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();
+ if (vmInstall != null) {
+ IVMRunner vmRunner = vmInstall.getVMRunner(ILaunchManager.RUN_MODE);
+ if (vmRunner != null) {
+ String[] classPath = null;
+ try {
+ classPath = new String[] { LaunchUtils
+ .getProfilerClientJar(configuration) };
+
+ if (classPath != null) {
+ VMRunnerConfiguration vmConfig = new VMRunnerConfiguration(
+ "org.jboss.profiler.client.cmd.Client",
+ classPath);
+ File destDir = new File(log.getParent(), log.getName()
+ + "-report");
+ vmConfig.setProgramArguments(new String[] { "load",
+ log.getAbsolutePath(),
+ destDir.getAbsolutePath() });
+
+ ILaunch launch = new Launch(null,
+ ILaunchManager.RUN_MODE, null);
+
+ vmRunner.run(vmConfig, launch, null);
+
+ return destDir;
+ }
+ } catch (CoreException e) {
+ JBossProfilerUiPlugin.getDefault().logErrorMessage(
+ "Problem generating snapshot report", e);
+ }
+ }
+
+ }
+ return null;
+ }
+
+ /**
+ * Returns latest .jps file for Profile Launch Configuration.
+ *
+ * @returns log file or null
+ */
+ static File getMostRecentLogFile(ILaunchConfiguration configuration) {
+ File latest = null;
+ File saveLocation;
+ try {
+ saveLocation = new File(LaunchUtils.getSaveLocation(configuration));
+ } catch (CoreException e) {
+ JBossProfilerUiPlugin.getDefault().logErrorMessage(
+ "Could not get save location from "
+ + configuration.getName(), e);
+ return null;
+ }
+
+ refreshWorkspace(saveLocation);
+ File[] children = saveLocation.listFiles(new FilenameFilter() {
+
+ public boolean accept(File dir, String name) {
+ return name.endsWith(".jps");
+ }
+ });
+ if (children != null) {
+ for (int i = 0; i < children.length; i++) {
+ if (!children[i].isDirectory()) { //$NON-NLS-1$
+ if (latest == null
+ || latest.lastModified() < children[i]
+ .lastModified())
+ latest = children[i];
+ }
+ }
+ }
+ return latest;
+ }
+
+ /**
+ * Refresh the save location to make sure it is shown in the UI.
+ *
+ * @param saveLocation
+ */
+ private static void refreshWorkspace(File saveLocation) {
+ IContainer[] findContainersForLocationURI = JBossProfilerUiPlugin
+ .getWorkspace().getRoot().findContainersForLocationURI(
+ saveLocation.toURI());
+ for (int i = 0; i < findContainersForLocationURI.length; i++) {
+ IContainer iContainer = findContainersForLocationURI[i];
+ try {
+ iContainer.refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (CoreException e) {
+ // ignore since the refresh is just to make sure Eclipse knows
+ // about the newly generated file.
+ }
+ }
+ }
+
+}
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/LaunchTabGroupJUnit.java
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/LaunchTabGroupJUnit.java
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/LaunchTabGroupJUnit.java 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,31 @@
+package org.jboss.tools.profiler.internal.ui.launch;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.EnvironmentTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
+import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
+import org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab;
+import org.eclipse.jdt.debug.ui.launchConfigurations.JavaJRETab;
+import org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationTab;
+import org.jboss.tools.profiler.internal.ui.launchtabs.JBossProfilerTab;
+
+public class LaunchTabGroupJUnit extends AbstractLaunchConfigurationTabGroup {
+
+ public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+ ILaunchConfigurationTab[] tabs= new ILaunchConfigurationTab[] {
+ new JUnitLaunchConfigurationTab(),
+ new JavaArgumentsTab(),
+ new JBossProfilerTab(),
+ new JavaClasspathTab(),
+ new JavaJRETab(),
+ new SourceLookupTab(),
+ new EnvironmentTab(),
+ new CommonTab()
+ };
+ setTabs(tabs);
+ }
+
+}
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/LaunchUtils.java
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/LaunchUtils.java
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/LaunchUtils.java 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,65 @@
+package org.jboss.tools.profiler.internal.ui.launch;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.jboss.tools.profiler.internal.ui.JBossProfilerUiPlugin;
+import org.jboss.tools.profiler.internal.ui.Messages;
+
+public class LaunchUtils {
+
+ static public String getProfilerRuntime(ILaunchConfiguration configuration)
+ throws CoreException {
+ String agentJar = null;
+ if(configuration.getAttribute(JBossProfilerLauncherConstants.USE_EMBEDDED_JAR, true))
{
+ URL entry =
JBossProfilerUiPlugin.getDefault().getBundle().getEntry("/embedded");
+ File urlFile = null;
+ try {
+ URL fileURL = FileLocator.toFileURL(entry);
+ urlFile = new File(fileURL.getPath());
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR,
JBossProfilerUiPlugin.getPluginId(),
Messages.LaunchUtils_probem_finding_embedded_runtime));
+ }
+ agentJar = urlFile.getAbsolutePath();
+ } else {
+ agentJar =
getSubstitutedString(configuration.getAttribute(JBossProfilerLauncherConstants.PROFILER_JAR,
(String)null));
+ }
+ return agentJar;
+ }
+
+ static public String getProfilerClientJar(ILaunchConfiguration configuration) throws
CoreException {
+ try {
+ return new File(getProfilerRuntime(configuration),
"jboss-profiler-client.jar").getAbsolutePath();
+ } catch (CoreException e) {
+ throw new CoreException(new Status(IStatus.ERROR, JBossProfilerUiPlugin.getPluginId(),
Messages.LaunchUtils_problem_finding_embedded_client));
+ }
+ }
+
+ static public String getAgentJar(ILaunchConfiguration configuration) throws
CoreException {
+ try {
+ return new File(getProfilerRuntime(configuration),
"jboss-profiler.jar").getAbsolutePath();
+ } catch (CoreException e) {
+ throw new CoreException(new Status(IStatus.ERROR, JBossProfilerUiPlugin.getPluginId(),
Messages.LaunchUtils_problem_finding_embedded_agent_runtime));
+ }
+ }
+
+ public static String getSaveLocation(ILaunchConfiguration configuration) throws
CoreException {
+ return
getSubstitutedString(configuration.getAttribute(JBossProfilerLauncherConstants.SAVE_LOCATION,
"."));
+ }
+
+ private static String getSubstitutedString(String text) throws CoreException {
+ if (text == null)
+ return ""; //$NON-NLS-1$
+ IStringVariableManager mgr = VariablesPlugin.getDefault().getStringVariableManager();
+ return mgr.performStringSubstitution(text);
+ }
+
+}
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/Messages.java
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/Messages.java
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/Messages.java 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,15 @@
+package org.jboss.tools.profiler.internal.ui.launch;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.jboss.tools.profiler.internal.ui.launch.messages"; //$NON-NLS-1$
+ public static String JBossProfilerLaunchDelegate_error_writing_temporary_properties;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/messages.properties
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/messages.properties
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launch/messages.properties 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1 @@
+JBossProfilerLaunchDelegate_error_writing_temporary_properties=Error while writing
temporary jboss-profiler.properties
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/BaseBlock.java
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/BaseBlock.java
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/BaseBlock.java 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,395 @@
+package org.jboss.tools.profiler.internal.ui.launchtabs;
+
+import java.io.File;
+
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.ui.StringVariableSelectionDialog;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.layout.PixelConverter;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.program.Program;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.ContainerSelectionDialog;
+import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
+import org.eclipse.ui.dialogs.ISelectionStatusValidator;
+import org.eclipse.ui.model.WorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.jboss.tools.profiler.internal.ui.JBossProfilerUiPlugin;
+import org.jboss.tools.profiler.internal.ui.Messages;
+import org.jboss.tools.profiler.internal.ui.util.FileNameFilter;
+
+public abstract class BaseBlock {
+
+ protected BaseLaunchConfigurationTab fTab;
+
+ private Button fVariablesButton;
+ private Button fFileSystemButton;
+ private Button fWorkspaceButton;
+
+ protected Text fLocationText;
+
+ protected Listener fListener = new Listener();
+
+ protected Link fLocationLink;
+
+ class Listener extends SelectionAdapter implements ModifyListener {
+ public void widgetSelected(SelectionEvent e) {
+ Object source = e.getSource();
+ if (source == fFileSystemButton) {
+ handleBrowseFileSystem();
+ } else if (source == fWorkspaceButton) {
+ handleBrowseWorkspace();
+ } else if (source == fVariablesButton) {
+ handleInsertVariable();
+ } else {
+ fTab.updateLaunchConfigurationDialog();
+ }
+ }
+
+ public void modifyText(ModifyEvent e) {
+ fTab.updateLaunchConfigurationDialog();
+ }
+ }
+
+ public BaseBlock(BaseLaunchConfigurationTab tab) {
+ fTab = tab;
+ }
+
+ protected void createText(Composite parent, String text, int indent) {
+ fLocationLink = new Link(parent, SWT.NONE);
+ fLocationLink.setText("<a>" + text + "</a>");
//$NON-NLS-1$ //$NON-NLS-2$
+ if (indent > 0) {
+ GridData gd = new GridData();
+ gd.horizontalIndent = indent;
+ fLocationLink.setLayoutData(gd);
+ }
+
+ fLocationText = new Text(parent, SWT.SINGLE | SWT.BORDER);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.widthHint = 400;
+ fLocationText.setLayoutData(gd);
+ fLocationText.addModifyListener(fListener);
+
+ fLocationLink.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ try {
+ String path = VariablesPlugin.getDefault()
+ .getStringVariableManager()
+ .performStringSubstitution(getLocation(), false);
+ File f = new File(path);
+ if (f.exists())
+ Program.launch(f.getCanonicalPath());
+ else
+ MessageDialog.openWarning(JBossProfilerUiPlugin
+ .getActiveWorkbenchShell(),
+ isFile() ? Messages.BaseBlock_open_file : Messages.BaseBlock_open_directory,
+ isFile() ? Messages.BaseBlock_file_not_found
+ : Messages.BaseBlock_directory_not_found);
+ } catch (Exception ex) {
+ MessageDialog
+ .openWarning(
+ JBossProfilerUiPlugin
+ .getActiveWorkbenchShell(),
+ isFile() ? Messages.BaseBlock_open_file : Messages.BaseBlock_open_directory,
+ isFile() ? Messages.BaseBlock_cannot_open_file
+ : Messages.BaseBlock_cannot_open_directory);
+ }
+ }
+ });
+
+ }
+
+ /**
+ * Sets width and height hint for the button control. <b>Note:</b> This is
a
+ * NOP if the button's layout data is not an instance of
+ * <code>GridData</code>.
+ *
+ * @param the
+ * button for which to set the dimension hint
+ */
+ public static void setButtonDimensionHint(Button button) {
+ Dialog.applyDialogFont(button);
+ Assert.isNotNull(button);
+ Object gd = button.getLayoutData();
+ if (gd instanceof GridData) {
+ ((GridData) gd).widthHint = getButtonWidthHint(button);
+ }
+ }
+
+ /**
+ * Returns a width hint for a button control.
+ */
+ public static int getButtonWidthHint(Button button) {
+ if (button.getFont().equals(JFaceResources.getDefaultFont()))
+ button.setFont(JFaceResources.getDialogFont());
+ PixelConverter converter = new PixelConverter(button);
+ int widthHint = converter
+ .convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+ return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT,
+ true).x);
+ }
+
+ protected void createButtons(Composite parent, String[] buttonLabels) {
+ fWorkspaceButton = createButton(parent, buttonLabels[0]);
+ fFileSystemButton = createButton(parent, buttonLabels[1]);
+ fVariablesButton = createButton(parent, buttonLabels[2]);
+ }
+
+ protected Button createButton(Composite parent, String text) {
+ Button button = new Button(parent, SWT.PUSH);
+ button.setText(text);
+ button.setLayoutData(new GridData());
+ button.addSelectionListener(fListener);
+ setButtonDimensionHint(button);
+ return button;
+ }
+
+ protected String[] getFileFilter() {
+ return new String[] { "*.*" };
+ }
+
+ protected void handleBrowseFileSystem() {
+ if (isFile()) {
+ FileDialog dialog = new FileDialog(fTab.getControl().getShell());
+ dialog.setFilterExtensions(getFileFilter()); //$NON-NLS-1$
+ dialog.setFilterPath(getLocation());
+ dialog.setText(Messages.BaseBlock_select_properties_file);
+ String res = dialog.open();
+ if (res != null) {
+ fLocationText.setText(res);
+ }
+ } else {
+ DirectoryDialog dialog = new DirectoryDialog(fTab.getControl()
+ .getShell());
+ dialog.setFilterPath(getLocation());
+ dialog.setText(Messages.BaseBlock_select_directory);
+ dialog.setMessage(Messages.BaseBlock_choose_a_directory);
+ String result = dialog.open();
+ if (result != null)
+ fLocationText.setText(result);
+ }
+ }
+
+ protected IFile getFile() {
+ if (!isFile())
+ return null;
+
+ String path = getLocation();
+ if (path.length() > 0) {
+ IResource res = null;
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ if (path.startsWith("${workspace_loc:")) { //$NON-NLS-1$
+ IStringVariableManager manager = VariablesPlugin.getDefault()
+ .getStringVariableManager();
+ try {
+ path = manager.performStringSubstitution(path, false);
+ IPath uriPath = new Path(path).makeAbsolute();
+ IFile[] containers = root.findFilesForLocationURI(URIUtil
+ .toURI(uriPath));
+ if (containers.length > 0)
+ res = containers[0];
+ } catch (CoreException e) {
+ // ignore
+ }
+ } else {
+ res = root.findMember(path);
+ }
+ if (res instanceof IFile) {
+ return (IFile) res;
+ }
+ }
+ return null;
+ }
+
+ protected void handleBrowseWorkspace() {
+ if (isFile()) {
+ ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(
+ fTab.getControl().getShell(), new WorkbenchLabelProvider(),
+ new WorkbenchContentProvider());
+
+ IFile file = getFile();
+ if (file != null)
+ dialog.setInitialSelection(file);
+ dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
+ dialog.addFilter(new FileNameFilter(getFileFilter())); //$NON-NLS-1$
+ dialog.setAllowMultiple(false);
+ dialog.setTitle(Messages.BaseBlock_select_file);
+ dialog.setMessage("");
+ dialog.setValidator(new ISelectionStatusValidator() {
+ public IStatus validate(Object[] selection) {
+ if (selection.length > 0 && selection[0] instanceof IFile)
+ return new Status(IStatus.OK, JBossProfilerUiPlugin
+ .getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+
+ return new Status(IStatus.ERROR, JBossProfilerUiPlugin
+ .getPluginId(), IStatus.ERROR, "", null); //$NON-NLS-1$
+ }
+ });
+ if (dialog.open() == Window.OK) {
+ file = (IFile) dialog.getFirstResult();
+ fLocationText
+ .setText("${workspace_loc:" + file.getFullPath().makeRelative() +
"}"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ } else {
+ ContainerSelectionDialog dialog = new ContainerSelectionDialog(fTab
+ .getControl().getShell(), getContainer(), true,
+ Messages.BaseBlock_choose_location_relative_to_ws);
+ if (dialog.open() == Window.OK) {
+ Object[] result = dialog.getResult();
+ if (result.length == 0)
+ return;
+ IPath path = (IPath) result[0];
+ fLocationText
+ .setText("${workspace_loc:" + path.makeRelative().toString() +
"}"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ }
+
+ /**
+ * Returns the selected workspace container,or <code>null</code>
+ */
+ protected IContainer getContainer() {
+ String path = getLocation();
+ if (path.length() > 0) {
+ IResource res = null;
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ if (path.startsWith("${workspace_loc:")) { //$NON-NLS-1$
+ IStringVariableManager manager = VariablesPlugin.getDefault()
+ .getStringVariableManager();
+ try {
+ path = manager.performStringSubstitution(path, false);
+ IPath uriPath = new Path(path).makeAbsolute();
+ IContainer[] containers = root
+ .findContainersForLocationURI(URIUtil
+ .toURI(uriPath));
+ if (containers.length > 0) {
+ res = containers[0];
+ }
+ } catch (CoreException e) {
+ // ignore
+ }
+ } else {
+ res = root.findMember(path);
+ }
+ if (res instanceof IContainer) {
+ return (IContainer) res;
+ }
+ }
+ return ResourcesPlugin.getWorkspace().getRoot();
+ }
+
+ private void handleInsertVariable() {
+ StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(
+ fTab.getControl().getShell());
+ if (dialog.open() == Window.OK)
+ fLocationText.insert(dialog.getVariableExpression());
+ }
+
+ protected String getLocation() {
+ return fLocationText.getText().trim();
+ }
+
+ protected void setLocation(String t) {
+ fLocationText.setText(t);
+ }
+
+ public String validate() {
+ return (fLocationText == null || (fLocationText.isEnabled() && getLocation()
+ .length() == 0)) ? NLS.bind(Messages.BaseBlock_the_is_not_specified,
+ getName()) : null;
+ }
+
+ protected abstract String getName();
+
+ /**
+ * @return true if the block edits a file, false otherwise (i.e. directory)
+ */
+ protected abstract boolean isFile();
+
+ int count;
+ protected void enableBrowseSection(boolean enabled) {
+ System.out.println("enableBS: " + enabled + " " + count++ +
"th time"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ fLocationLink.setEnabled(enabled);
+ fLocationText.setEnabled(enabled);
+ fFileSystemButton.setEnabled(enabled);
+ fWorkspaceButton.setEnabled(enabled);
+ fVariablesButton.setEnabled(enabled);
+ }
+
+ public void createControl(Composite parent) {
+
+ Composite group = createComposite(parent, parent.getFont(), 3, 3,
GridData.FILL_HORIZONTAL, 0, 0);
+
+ createText(group, getName(), 0);
+
+ //new Label(group, SWT.None);
+ //new Label(group, SWT.None);
+
+ Composite comp = createComposite(group, parent.getFont(), 4, 3, GridData.FILL_BOTH, 0,
0);
+
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 1;
+ new Label(comp, SWT.NONE).setLayoutData(gd);
+ // buttons
+ createButtons(comp, new String[] {Messages.BaseBlock_workspace,
Messages.BaseBlock_filesystem, Messages.BaseBlock_variables});
+
+ }
+
+ public static Composite createComposite(Composite parent, Font font,
+ int columns, int hspan, int fill, int marginwidth, int marginheight) {
+ Composite g = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(columns, false);
+
+ layout.marginWidth = marginwidth;
+ layout.marginHeight = marginheight;
+ g.setLayout(layout);
+ g.setFont(font);
+ GridData gd = new GridData(fill);
+ gd.horizontalSpan = hspan;
+ g.setLayoutData(gd);
+ return g;
+ }
+
+ public static Text createSingleText(Composite parent, int hspan) {
+ Text t = new Text(parent, SWT.SINGLE | SWT.BORDER);
+ t.setFont(parent.getFont());
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = hspan;
+ t.setLayoutData(gd);
+ return t;
+ }
+
+
+
+}
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/BaseLaunchConfigurationTab.java
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/BaseLaunchConfigurationTab.java
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/BaseLaunchConfigurationTab.java 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,11 @@
+package org.jboss.tools.profiler.internal.ui.launchtabs;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+
+public abstract class BaseLaunchConfigurationTab extends AbstractLaunchConfigurationTab
{
+
+ @Override
+ public void updateLaunchConfigurationDialog() {
+ super.updateLaunchConfigurationDialog();
+ }
+}
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/JBossProfilerTab.java
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/JBossProfilerTab.java
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/JBossProfilerTab.java 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,92 @@
+package org.jboss.tools.profiler.internal.ui.launchtabs;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.jboss.tools.profiler.internal.ui.JBossProfilerUiPlugin;
+
+public class JBossProfilerTab extends BaseLaunchConfigurationTab {
+
+ private JarBlock jarBlock;
+ private PropertiesBlock propertiesBlock;
+
+ public void createControl(Composite parent) {
+
+ // initializeDialogUnits(parent);
+ final ScrolledComposite sc = new ScrolledComposite(parent, SWT.H_SCROLL
+ | SWT.V_SCROLL);
+ sc.setExpandHorizontal(true);
+ sc.setExpandVertical(true);
+
+ setControl(sc);
+ Composite container = new Composite(sc, SWT.NULL);
+ sc.setContent(container);
+ GridLayout layout = new GridLayout();
+
+ container.setLayout(layout);
+ layout.numColumns = 1;
+ layout.verticalSpacing = 10;
+
+ propertiesBlock = new PropertiesBlock(this);
+ propertiesBlock.createControl(container);
+
+ jarBlock = new JarBlock(this);
+ jarBlock.createControl(container);
+
+
+ }
+
+
+ public String getName() {
+ return "JBoss Profiler";
+ }
+
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ try {
+ jarBlock.initializeFrom(configuration);
+ propertiesBlock.initializeFrom(configuration);
+
+ } catch (CoreException e) {
+ JBossProfilerUiPlugin.getDefault().logErrorMessage("Error while initializing from
" + configuration.getName(), e);
+ }
+ }
+
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ jarBlock.performApply(configuration);
+ propertiesBlock.performApply(configuration);
+ }
+
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ jarBlock.setDefaults(configuration);
+ propertiesBlock.setDefaults(configuration);
+ }
+
+
+ @Override
+ public boolean isValid(ILaunchConfiguration configuration) {
+ //System.out.println("isValid");
+ propertiesBlock.validate();
+ jarBlock.validate();
+ return super.isValid(configuration);
+ }
+
+ public static Group createGroup(Composite parent, String text, int columns,
+ int hspan, int fill) {
+ Group g = new Group(parent, SWT.NONE);
+ g.setLayout(new GridLayout(columns, false));
+ g.setText(text);
+ g.setFont(parent.getFont());
+ GridData gd = new GridData(fill);
+ gd.horizontalSpan = hspan;
+ g.setLayoutData(gd);
+ return g;
+ }
+
+
+}
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/JarBlock.java
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/JarBlock.java
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/JarBlock.java 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,104 @@
+package org.jboss.tools.profiler.internal.ui.launchtabs;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.jboss.tools.profiler.internal.ui.launch.JBossProfilerLauncherConstants;
+
+public class JarBlock extends BaseBlock {
+
+ private Button fUseDefaultDirButton;
+ private Button fUseOtherDirButton;
+
+ public JarBlock(BaseLaunchConfigurationTab tab) {
+ super(tab);
+ }
+
+ public void createControl(Composite parent) {
+
+ Group group = new Group(parent, SWT.NONE);
+ group.setText(getName());
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ group.setLayout(layout);
+ group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ // default choice
+
+ fUseDefaultDirButton = new Button(group, SWT.RADIO);
+ fUseDefaultDirButton.setText("Default:");
+ fUseDefaultDirButton.addSelectionListener(fListener);
+
+ Text fWorkingDirText = createSingleText(group, 2);
+ fWorkingDirText.addModifyListener(fListener);
+ fWorkingDirText.setEnabled(false);
+ fWorkingDirText.setText("<embedded JBoss Profiler>");
+
+ // user enter choice
+ fUseOtherDirButton = new Button(group, SWT.RADIO);
+ fUseOtherDirButton.setText("Other:");
+ fUseOtherDirButton.addSelectionListener(fListener);
+
+ createText(group, "Location:", 0);
+
+ //new Label(group, SWT.None);
+ //new Label(group, SWT.None);
+
+ Composite comp = createComposite(group, parent.getFont(), 4, 3, GridData.FILL_BOTH, 0,
0);
+
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 1;
+ new Label(comp, SWT.NONE).setLayoutData(gd);
+ // buttons
+ createButtons(comp, new String[] {"Workspace...", "Filesystem...",
"Variables..."});
+
+ }
+
+ public void performApply(ILaunchConfigurationWorkingCopy config) {
+ config.setAttribute(JBossProfilerLauncherConstants.PROFILER_JAR, getLocation());
+ config.setAttribute(JBossProfilerLauncherConstants.USE_EMBEDDED_JAR,
fUseDefaultDirButton.getSelection());
+
+ }
+
+ public void initializeFrom(ILaunchConfiguration configuration) throws CoreException {
+ fLocationText.setText(configuration.getAttribute(JBossProfilerLauncherConstants.PROFILER_JAR,
""));
+ boolean useEmbedded =
configuration.getAttribute(JBossProfilerLauncherConstants.USE_EMBEDDED_JAR, true);
+ fUseDefaultDirButton.setSelection(useEmbedded);
+ fUseOtherDirButton.setSelection(!useEmbedded);
+
+ }
+
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+
+ }
+
+ protected String getName() {
+ return "JBoss Profiler runtime";
+ }
+
+ @Override
+ protected String[] getFileFilter() {
+ return new String[] { "*.jar" };
+ }
+
+ protected boolean isFile() {
+ return false;
+ }
+
+
+ @Override
+ public String validate() {
+ if(fUseDefaultDirButton.getSelection()) {
+ return null;
+ }
+ return super.validate();
+ }
+}
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/LaunchTabGroup.java
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/LaunchTabGroup.java
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/LaunchTabGroup.java 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,31 @@
+package org.jboss.tools.profiler.internal.ui.launchtabs;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.EnvironmentTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
+import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
+import org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab;
+import org.eclipse.jdt.debug.ui.launchConfigurations.JavaJRETab;
+import org.eclipse.jdt.debug.ui.launchConfigurations.JavaMainTab;
+
+public class LaunchTabGroup extends AbstractLaunchConfigurationTabGroup {
+
+ public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+ ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
+ new JavaMainTab(),
+ new JavaArgumentsTab(),
+ new JBossProfilerTab(),
+ new JavaJRETab(),
+ new JavaClasspathTab(),
+ new SourceLookupTab(),
+ new EnvironmentTab(),
+ new CommonTab()
+ };
+ setTabs(tabs);
+
+ }
+
+}
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/PropertiesBlock.java
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/PropertiesBlock.java
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/launchtabs/PropertiesBlock.java 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,183 @@
+package org.jboss.tools.profiler.internal.ui.launchtabs;
+
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.jboss.tools.profiler.internal.ui.launch.JBossProfilerLauncherConstants;
+
+public class PropertiesBlock extends BaseBlock {
+
+ private Button fGenerateFileButton;
+ private Button fUseTemplateButton;
+ private Button saveOnExit;
+ private Button enable;
+ private BaseBlock saveLocation;
+
+ public PropertiesBlock(BaseLaunchConfigurationTab tab) {
+ super(tab);
+ }
+
+ public void createControl(Composite parent) {
+ Group group = new Group(parent, SWT.NONE);
+ group.setText("Configuration File");
+ group.setLayout(new GridLayout(2, false));
+ group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ fGenerateFileButton = new Button(group, SWT.RADIO);
+ fGenerateFileButton.setText("Generate a configuration file with the following
settings:");
+ GridData gd = new GridData();
+ gd.horizontalSpan = 2;
+ fGenerateFileButton.setLayoutData(gd);
+ fGenerateFileButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ updateGenerateSettings(fGenerateFileButton.getSelection());
+ fTab.updateLaunchConfigurationDialog();
+ }
+ });
+
+ Composite c = new Composite(group, SWT.None);
+ GridLayout layout = new GridLayout(3,false);
+ c.setLayout(layout);
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.horizontalSpan = 2;
+ c.setLayoutData(gd);
+
+ enable = new Button(c, SWT.CHECK);
+ enable.setText("Enable profiler on start");
+ gd = new GridData();
+ gd.horizontalSpan = 3;
+ enable.setLayoutData(gd);
+
+ saveOnExit = new Button(c, SWT.CHECK);
+ saveOnExit.setText("Save snapshot on exit");
+ gd = new GridData();
+ gd.horizontalSpan = 3;
+ saveOnExit.setLayoutData(gd);
+
+ saveLocation = new BaseBlock(fTab) {
+ @Override
+ protected String getName() {
+ return "Save snapshot location:";
+ }
+
+
+
+ @Override
+ protected boolean isFile() {
+ return false;
+ }
+ };
+
+ saveLocation.createControl(c);
+
+ fUseTemplateButton = new Button(group, SWT.RADIO);
+ fUseTemplateButton.setText("Use an existing jboss-profiler.properties");
+ fUseTemplateButton.addSelectionListener(fListener);
+ gd = new GridData();
+ gd.horizontalSpan = 2;
+ fUseTemplateButton.setLayoutData(gd);
+
+ createText(group, "Location:", 20);
+
+ Composite buttons = new Composite(group, SWT.NONE);
+ layout = new GridLayout(4, false);
+ layout.marginHeight = layout.marginWidth = 0;
+ buttons.setLayout(layout);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ buttons.setLayoutData(gd);
+
+ Label label = new Label(buttons, SWT.NONE);
+ label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ createButtons(buttons, new String[] {"Workspace...","File
system...","Variables..."});
+
+ }
+
+ public void initializeFrom(ILaunchConfiguration configuration) throws CoreException {
+ boolean generateDefault =
configuration.getAttribute(JBossProfilerLauncherConstants.GENERATE_PROPERTIES, true);
+ fGenerateFileButton.setSelection(generateDefault);
+
+ updateGenerateSettings(generateDefault);
+
+ fUseTemplateButton.setSelection(!generateDefault);
+ fLocationText.setText(configuration.getAttribute(JBossProfilerLauncherConstants.PROPERTIES_FILE,
""));
+ enableBrowseSection(!generateDefault);
+
+ enable.setSelection(configuration.getAttribute(JBossProfilerLauncherConstants.ENABLE_ON_STARTUP,
true));
+ saveOnExit.setSelection(configuration.getAttribute(JBossProfilerLauncherConstants.SAVE_ON_EXIT,
true));
+
+ saveLocation.setLocation(configuration.getAttribute(JBossProfilerLauncherConstants.SAVE_LOCATION,
"."));
+
+ }
+
+ private void updateGenerateSettings(boolean generateEnabled) {
+ enable.setEnabled(generateEnabled);
+ saveOnExit.setEnabled(generateEnabled);
+ saveLocation.enableBrowseSection(generateEnabled);
+ }
+
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ configuration.setAttribute(JBossProfilerLauncherConstants.GENERATE_PROPERTIES,
fGenerateFileButton.getSelection());
+ configuration.setAttribute(JBossProfilerLauncherConstants.ENABLE_ON_STARTUP,
enable.getSelection());
+ configuration.setAttribute(JBossProfilerLauncherConstants.SAVE_ON_EXIT,
saveOnExit.getSelection());
+ configuration.setAttribute(JBossProfilerLauncherConstants.SAVE_LOCATION,
saveLocation.getLocation());
+ configuration.setAttribute(JBossProfilerLauncherConstants.PROPERTIES_FILE,
getLocation()==""?null:getLocation());
+
+ }
+
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ configuration.setAttribute(JBossProfilerLauncherConstants.GENERATE_PROPERTIES, true);
+ configuration.setAttribute(JBossProfilerLauncherConstants.PROPERTIES_FILE,
(String)null);
+
+
+
+ }
+
+ protected String getName() {
+ return "Properties";
+ }
+
+ protected boolean isFile() {
+ return true;
+ }
+
+
+
+ @Override
+ protected String[] getFileFilter() {
+ return new String[] {"*.properties"};
+ }
+
+ protected String getLocation() {
+ String path = fLocationText.getText().trim();
+ IStringVariableManager manager =
VariablesPlugin.getDefault().getStringVariableManager();
+ try {
+ return manager.performStringSubstitution(path, false);
+ } catch (CoreException e) {
+ return path;
+ }
+ }
+
+
+ public String validate() {
+
+ if (fGenerateFileButton.getSelection())
+ return null;
+ return super.validate();
+ }
+
+}
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/messages.properties
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/messages.properties
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/messages.properties 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,19 @@
+BaseBlock_cannot_open_directory=The specified directory could not be opened
+BaseBlock_cannot_open_file=The specified file could not be opened
+BaseBlock_choose_a_directory=Choose a directory
+BaseBlock_choose_location_relative_to_ws=Choose a location relative to the workspace:
+BaseBlock_directory_not_found=Directory not found
+BaseBlock_file_not_found=File not found
+BaseBlock_filesystem=Filesystem...
+BaseBlock_open_directory=Open directory
+BaseBlock_open_file=Open file
+BaseBlock_select_directory=Select directory
+BaseBlock_select_file=Select File
+BaseBlock_select_properties_file=Select properties file for JBoss Profiler
+BaseBlock_the_is_not_specified=The {0} is not specified
+BaseBlock_variables=Variables...
+BaseBlock_workspace=Workspace...
+JBossProfilerUiPlugin_no_message=<No Message>
+LaunchUtils_probem_finding_embedded_runtime=Problem finding embedded runtime
+LaunchUtils_problem_finding_embedded_agent_runtime=Problem finding embedded agent
runtime
+LaunchUtils_problem_finding_embedded_client=Problem finding embedded client runtime
Added:
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/util/FileNameFilter.java
===================================================================
---
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/util/FileNameFilter.java
(rev 0)
+++
trunk/profiler/plugins/org.jboss.tools.profiler.ui/src/org/jboss/tools/profiler/internal/ui/util/FileNameFilter.java 2009-06-15
11:23:29 UTC (rev 15948)
@@ -0,0 +1,45 @@
+package org.jboss.tools.profiler.internal.ui.util;
+
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+public class FileNameFilter extends ViewerFilter {
+
+ private String[] validFilters;
+
+ public FileNameFilter(String[] strings) {
+ validFilters = strings;
+ }
+
+ public boolean select(Viewer viewer, Object parent, Object element) {
+ if (element instanceof IFile) {
+ String name = ((IFile) element).getName();
+ for (String filter : validFilters) {
+ if(filter.contains("*.")) {
+ return name.endsWith(filter.substring(filter.indexOf("*.")+1));
+ } else {
+ return validFilters.equals(name);
+ }
+ }
+ }
+
+ if (element instanceof IProject && !((IProject) element).isOpen())
+ return false;
+
+ if (element instanceof IContainer) { // i.e. IProject, IFolder
+ try {
+ IResource[] resources = ((IContainer) element).members();
+ for (int i = 0; i < resources.length; i++) {
+ if (select(viewer, parent, resources[i]))
+ return true;
+ }
+ } catch (CoreException e) {
+ //ignore
+ }
+ }
+ return false;
+ }
+
+}