This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 145198
Collapse All | Expand All

(-)a/lib.profiler.common/nbproject/project.xml (-1 / +2 lines)
Lines 58-69 Link Here
58
            </module-dependencies>
58
            </module-dependencies>
59
            <friend-packages>
59
            <friend-packages>
60
                <friend>org.netbeans.modules.javafx.profiler</friend>
60
                <friend>org.netbeans.modules.javafx.profiler</friend>
61
                <friend>org.netbeans.modules.javame.profiler</friend>
61
                <friend>org.netbeans.modules.maven.profiler</friend>
62
                <friend>org.netbeans.modules.maven.profiler</friend>
62
                <friend>org.netbeans.modules.profiler</friend>
63
                <friend>org.netbeans.modules.profiler</friend>
63
                <friend>org.netbeans.modules.profiler.attach</friend>
64
                <friend>org.netbeans.modules.profiler.attach</friend>
64
                <friend>org.netbeans.modules.profiler.attach.impl</friend>
65
                <friend>org.netbeans.modules.profiler.attach.impl</friend>
65
                <friend>org.netbeans.modules.profiler.freeform</friend>
66
                <friend>org.netbeans.modules.profiler.freeform</friend>
66
                <friend>org.netbeans.modules.profiler.j2ee</friend>
67
                <friend>org.netbeans.modules.profiler.j2ee</friend>
68
                <friend>org.netbeans.modules.profiler.j2ee.generic</friend>
67
                <friend>org.netbeans.modules.profiler.j2ee.jboss</friend>
69
                <friend>org.netbeans.modules.profiler.j2ee.jboss</friend>
68
                <friend>org.netbeans.modules.profiler.j2ee.sunas</friend>
70
                <friend>org.netbeans.modules.profiler.j2ee.sunas</friend>
69
                <friend>org.netbeans.modules.profiler.j2ee.tomcat</friend>
71
                <friend>org.netbeans.modules.profiler.j2ee.tomcat</friend>
Lines 72-78 Link Here
72
                <friend>org.netbeans.modules.profiler.nbmodule</friend>
74
                <friend>org.netbeans.modules.profiler.nbmodule</friend>
73
                <friend>org.netbeans.modules.profiler.projectsupport</friend>
75
                <friend>org.netbeans.modules.profiler.projectsupport</friend>
74
                <friend>org.netbeans.modules.profiler.utilities</friend>
76
                <friend>org.netbeans.modules.profiler.utilities</friend>
75
                <friend>org.netbeans.modules.javame.profiler</friend>
76
                <package>org.netbeans.lib.profiler.common</package>
77
                <package>org.netbeans.lib.profiler.common</package>
77
                <package>org.netbeans.lib.profiler.common.event</package>
78
                <package>org.netbeans.lib.profiler.common.event</package>
78
                <package>org.netbeans.lib.profiler.common.filters</package>
79
                <package>org.netbeans.lib.profiler.common.filters</package>
(-)a/nbbuild/cluster.properties (-5 / +6 lines)
Lines 52-63 Link Here
52
        nb.cluster.java,\
52
        nb.cluster.java,\
53
        nb.cluster.gsf,\
53
        nb.cluster.gsf,\
54
        nb.cluster.apisupport,\
54
        nb.cluster.apisupport,\
55
	nb.cluster.profiler,\
55
        nb.cluster.nb
56
        nb.cluster.nb
56
57
57
clusters.config.standard.list=\
58
clusters.config.standard.list=\
58
        nb.cluster.xml,\
59
        nb.cluster.xml,\
59
        nb.cluster.enterprise,\
60
        nb.cluster.enterprise,\
60
        nb.cluster.profiler,\
61
        nb.cluster.mobility,\
61
        nb.cluster.mobility,\
62
        nb.cluster.identity,\
62
        nb.cluster.identity,\
63
        nb.cluster.webcommon,\
63
        nb.cluster.webcommon,\
Lines 124-135 Link Here
124
        nb.cluster.websvccommon,\
124
        nb.cluster.websvccommon,\
125
        nb.cluster.gsf,\
125
        nb.cluster.gsf,\
126
        nb.cluster.java,\
126
        nb.cluster.java,\
127
	nb.cluster.profiler,\
127
        nb.cluster.nb
128
        nb.cluster.nb
128
129
129
clusters.config.enterprise.list=\
130
clusters.config.enterprise.list=\
130
        nb.cluster.enterprise,\
131
        nb.cluster.enterprise,\
131
        nb.cluster.gsf,\
132
        nb.cluster.gsf,\
132
        nb.cluster.profiler,\
133
        nb.cluster.webcommon,\
133
        nb.cluster.webcommon,\
134
        ${clusters.config.java.list}
134
        ${clusters.config.java.list}
135
135
Lines 525-530 Link Here
525
        nb.cluster.java,\
525
        nb.cluster.java,\
526
        nb.cluster.ide,\
526
        nb.cluster.ide,\
527
        nb.cluster.gsf,\
527
        nb.cluster.gsf,\
528
        nb.cluster.profiler,\
528
        nb.cluster.platform
529
        nb.cluster.platform
529
nb.cluster.enterprise=\
530
nb.cluster.enterprise=\
530
        api.web.webmodule,\
531
        api.web.webmodule,\
Lines 566-571 Link Here
566
        maven.j2ee,\
567
        maven.j2ee,\
567
        maven.jaxws,\
568
        maven.jaxws,\
568
        maven.samples,\
569
        maven.samples,\
570
	profiler.j2ee,\
569
        projectimport.eclipse.web,\
571
        projectimport.eclipse.web,\
570
        servletjspapi,\
572
        servletjspapi,\
571
        spring.webmvc,\
573
        spring.webmvc,\
Lines 651-658 Link Here
651
        nb.cluster.ide,\
653
        nb.cluster.ide,\
652
        nb.cluster.java,\
654
        nb.cluster.java,\
653
        nb.cluster.platform,\
655
        nb.cluster.platform,\
654
        nb.cluster.gsf,\
656
        nb.cluster.gsf
655
        nb.cluster.enterprise
656
nb.cluster.profiler=\
657
nb.cluster.profiler=\
657
        debugger.jpda.heapwalk,\
658
        debugger.jpda.heapwalk,\
658
        lib.profiler,\
659
        lib.profiler,\
Lines 663-669 Link Here
663
        profiler.attach,\
664
        profiler.attach,\
664
        profiler.attach.impl,\
665
        profiler.attach.impl,\
665
        profiler.freeform,\
666
        profiler.freeform,\
666
        profiler.j2ee,\
667
        profiler.j2ee.generic,\
667
        profiler.j2ee.jboss,\
668
        profiler.j2ee.jboss,\
668
        profiler.j2ee.sunas,\
669
        profiler.j2ee.sunas,\
669
        profiler.j2ee.tomcat,\
670
        profiler.j2ee.tomcat,\
(-)a/profiler.attach/nbproject/project.xml (-1 / +2 lines)
Lines 134-149 Link Here
134
                </dependency>
134
                </dependency>
135
            </module-dependencies>
135
            </module-dependencies>
136
            <friend-packages>
136
            <friend-packages>
137
                <friend>org.netbeans.modules.javafx.profiler</friend>
137
                <friend>org.netbeans.modules.profiler</friend>
138
                <friend>org.netbeans.modules.profiler</friend>
138
                <friend>org.netbeans.modules.profiler.attach.impl</friend>
139
                <friend>org.netbeans.modules.profiler.attach.impl</friend>
139
                <friend>org.netbeans.modules.profiler.attach.spi</friend>
140
                <friend>org.netbeans.modules.profiler.attach.spi</friend>
140
                <friend>org.netbeans.modules.profiler.j2ee</friend>
141
                <friend>org.netbeans.modules.profiler.j2ee</friend>
142
                <friend>org.netbeans.modules.profiler.j2ee.generic</friend>
141
                <friend>org.netbeans.modules.profiler.j2ee.jboss</friend>
143
                <friend>org.netbeans.modules.profiler.j2ee.jboss</friend>
142
                <friend>org.netbeans.modules.profiler.j2ee.sunas</friend>
144
                <friend>org.netbeans.modules.profiler.j2ee.sunas</friend>
143
                <friend>org.netbeans.modules.profiler.j2ee.tomcat</friend>
145
                <friend>org.netbeans.modules.profiler.j2ee.tomcat</friend>
144
                <friend>org.netbeans.modules.profiler.j2ee.weblogic</friend>
146
                <friend>org.netbeans.modules.profiler.j2ee.weblogic</friend>
145
                <friend>org.netbeans.modules.profiler.j2se</friend>
147
                <friend>org.netbeans.modules.profiler.j2se</friend>
146
                <friend>org.netbeans.modules.javafx.profiler</friend>
147
                <package>org.netbeans.modules.profiler.attach</package>
148
                <package>org.netbeans.modules.profiler.attach</package>
148
                <package>org.netbeans.modules.profiler.attach.panels</package>
149
                <package>org.netbeans.modules.profiler.attach.panels</package>
149
                <package>org.netbeans.modules.profiler.attach.panels.components</package>
150
                <package>org.netbeans.modules.profiler.attach.panels.components</package>
(-)a/profiler.j2ee.generic/build.xml (+46 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
5
Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
6
7
8
The contents of this file are subject to the terms of either the GNU
9
General Public License Version 2 only ("GPL") or the Common
10
Development and Distribution License("CDDL") (collectively, the
11
"License"). You may not use this file except in compliance with the
12
License. You can obtain a copy of the License at
13
http://www.netbeans.org/cddl-gplv2.html
14
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
specific language governing permissions and limitations under the
16
License.  When distributing the software, include this License Header
17
Notice in each file and include the License file at
18
nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
19
particular file as subject to the "Classpath" exception as provided
20
by Sun in the GPL Version 2 section of the License file that
21
accompanied this code. If applicable, add the following below the
22
License Header, with the fields enclosed by brackets [] replaced by
23
your own identifying information:
24
"Portions Copyrighted [year] [name of copyright owner]"
25
26
Contributor(s):
27
28
The Original Software is NetBeans. The Initial Developer of the Original
29
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
30
Microsystems, Inc. All Rights Reserved.
31
32
If you wish your version of this file to be governed by only the CDDL
33
or only the GPL Version 2, indicate your decision by adding
34
"[Contributor] elects to include this software in this distribution
35
under the [CDDL or GPL Version 2] license." If you do not indicate a
36
single choice of license, a recipient has the option to distribute
37
your version of this file under either the CDDL, the GPL Version 2 or
38
to extend the choice of license to its licensees as provided above.
39
However, if you add GPL Version 2 code and therefore, elected the GPL
40
Version 2 license, then the option applies only if the new code is
41
made subject to such option by the copyright holder.
42
-->
43
<project basedir="." default="netbeans" name="profiler.j2ee.generic">
44
    <description>Builds, tests, and runs the project org.netbeans.modules.profiler.j2ee.generic</description>
45
    <import file="../nbbuild/templates/projectized.xml"/>
46
</project>
(-)a/profiler.j2ee.generic/manifest.mf (+4 lines)
Line 0 Link Here
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.profiler.j2ee.generic/1
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/profiler/j2ee/generic/Bundle.properties
4
OpenIDE-Module-Specification-Version: 1.6
(-)a/profiler.j2ee.generic/nbproject/project.properties (+42 lines)
Line 0 Link Here
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
#
3
# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
4
#
5
# The contents of this file are subject to the terms of either the GNU
6
# General Public License Version 2 only ("GPL") or the Common
7
# Development and Distribution License("CDDL") (collectively, the
8
# "License"). You may not use this file except in compliance with the
9
# License. You can obtain a copy of the License at
10
# http://www.netbeans.org/cddl-gplv2.html
11
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
12
# specific language governing permissions and limitations under the
13
# License.  When distributing the software, include this License Header
14
# Notice in each file and include the License file at
15
# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
16
# particular file as subject to the "Classpath" exception as provided
17
# by Sun in the GPL Version 2 section of the License file that
18
# accompanied this code. If applicable, add the following below the
19
# License Header, with the fields enclosed by brackets [] replaced by
20
# your own identifying information:
21
# "Portions Copyrighted [year] [name of copyright owner]"
22
#
23
# Contributor(s):
24
#
25
# The Original Software is NetBeans. The Initial Developer of the Original
26
# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
27
# Microsystems, Inc. All Rights Reserved.
28
#
29
# If you wish your version of this file to be governed by only the CDDL
30
# or only the GPL Version 2, indicate your decision by adding
31
# "[Contributor] elects to include this software in this distribution
32
# under the [CDDL or GPL Version 2] license." If you do not indicate a
33
# single choice of license, a recipient has the option to distribute
34
# your version of this file under either the CDDL, the GPL Version 2 or
35
# to extend the choice of license to its licensees as provided above.
36
# However, if you add GPL Version 2 code and therefore, elected the GPL
37
# Version 2 license, then the option applies only if the new code is
38
# made subject to such option by the copyright holder.
39
40
is.eager=true
41
42
javac.source=1.5
(-)a/profiler.j2ee.generic/nbproject/project.xml (+85 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
5
Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
6
7
8
The contents of this file are subject to the terms of either the GNU
9
General Public License Version 2 only ("GPL") or the Common
10
Development and Distribution License("CDDL") (collectively, the
11
"License"). You may not use this file except in compliance with the
12
License. You can obtain a copy of the License at
13
http://www.netbeans.org/cddl-gplv2.html
14
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
specific language governing permissions and limitations under the
16
License.  When distributing the software, include this License Header
17
Notice in each file and include the License file at
18
nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
19
particular file as subject to the "Classpath" exception as provided
20
by Sun in the GPL Version 2 section of the License file that
21
accompanied this code. If applicable, add the following below the
22
License Header, with the fields enclosed by brackets [] replaced by
23
your own identifying information:
24
"Portions Copyrighted [year] [name of copyright owner]"
25
26
Contributor(s):
27
28
The Original Software is NetBeans. The Initial Developer of the Original
29
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
30
Microsystems, Inc. All Rights Reserved.
31
32
If you wish your version of this file to be governed by only the CDDL
33
or only the GPL Version 2, indicate your decision by adding
34
"[Contributor] elects to include this software in this distribution
35
under the [CDDL or GPL Version 2] license." If you do not indicate a
36
single choice of license, a recipient has the option to distribute
37
your version of this file under either the CDDL, the GPL Version 2 or
38
to extend the choice of license to its licensees as provided above.
39
However, if you add GPL Version 2 code and therefore, elected the GPL
40
Version 2 license, then the option applies only if the new code is
41
made subject to such option by the copyright holder.
42
-->
43
<project xmlns="http://www.netbeans.org/ns/project/1">
44
    <type>org.netbeans.modules.apisupport.project</type>
45
    <configuration>
46
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
47
            <code-name-base>org.netbeans.modules.profiler.j2ee.generic</code-name-base>
48
            <module-dependencies>
49
                <dependency>
50
                    <code-name-base>org.netbeans.lib.profiler.common</code-name-base>
51
                    <build-prerequisite/>
52
                    <compile-dependency/>
53
                    <run-dependency>
54
                        <release-version>1</release-version>
55
                        <specification-version>1.1</specification-version>
56
                    </run-dependency>
57
                </dependency>
58
                <dependency>
59
                    <code-name-base>org.netbeans.modules.profiler</code-name-base>
60
                    <build-prerequisite/>
61
                    <compile-dependency/>
62
                    <run-dependency>
63
                        <release-version>1</release-version>
64
                        <specification-version>1.6</specification-version>
65
                    </run-dependency>
66
                </dependency>
67
                <dependency>
68
                    <code-name-base>org.netbeans.modules.profiler.attach</code-name-base>
69
                    <build-prerequisite/>
70
                    <compile-dependency/>
71
                    <run-dependency>
72
                        <release-version>1</release-version>
73
                        <specification-version>1.0</specification-version>
74
                    </run-dependency>
75
                </dependency>
76
                <dependency>
77
                    <code-name-base>org.openide.util</code-name-base>
78
                    <build-prerequisite/>
79
                    <compile-dependency/>
80
                </dependency>
81
            </module-dependencies>
82
            <public-packages/>
83
        </data>
84
    </configuration>
85
</project>
(-)a/profiler.j2ee.generic/src/org/netbeans/modules/profiler/j2ee/generic/Bundle.properties (+67 lines)
Line 0 Link Here
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
#
3
# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
4
#
5
# The contents of this file are subject to the terms of either the GNU
6
# General Public License Version 2 only ("GPL") or the Common
7
# Development and Distribution License("CDDL") (collectively, the
8
# "License"). You may not use this file except in compliance with the
9
# License. You can obtain a copy of the License at
10
# http://www.netbeans.org/cddl-gplv2.html
11
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
12
# specific language governing permissions and limitations under the
13
# License.  When distributing the software, include this License Header
14
# Notice in each file and include the License file at
15
# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
16
# particular file as subject to the "Classpath" exception as provided
17
# by Sun in the GPL Version 2 section of the License file that
18
# accompanied this code. If applicable, add the following below the
19
# License Header, with the fields enclosed by brackets [] replaced by
20
# your own identifying information:
21
# "Portions Copyrighted [year] [name of copyright owner]"
22
#
23
# Contributor(s):
24
#
25
# The Original Software is NetBeans. The Initial Developer of the Original
26
# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
27
# Microsystems, Inc. All Rights Reserved.
28
#
29
# If you wish your version of this file to be governed by only the CDDL
30
# or only the GPL Version 2, indicate your decision by adding
31
# "[Contributor] elects to include this software in this distribution
32
# under the [CDDL or GPL Version 2] license." If you do not indicate a
33
# single choice of license, a recipient has the option to distribute
34
# your version of this file under either the CDDL, the GPL Version 2 or
35
# to extend the choice of license to its licensees as provided above.
36
# However, if you add GPL Version 2 code and therefore, elected the GPL
37
# Version 2 license, then the option applies only if the new code is
38
# made subject to such option by the copyright holder.
39
40
## Resource bundle for package org.netbeans.modules.profiler.
41
42
OpenIDE-Module-Display-Category=Profiling
43
OpenIDE-Module-Name=Java Profiler (Attach - Generic J2EE Server Support)
44
OpenIDE-Module-Long-Description=Add-on for NetBeans Profiler providing support for attaching profiler to a 
45
generic J2EE server.
46
47
GenericWebAppServerIntegrationProvider_GenericWebappServerString=Generic Web/App Server
48
# HTML-formatted
49
GenericWebAppServerIntegrationProvider_PathToJdkDirectory=path to {0} directory
50
# HTML-formatted
51
GenericWebAppServerIntegrationProvider_ManualRemoteStep3Message=If the server is configured to run on a different JVM, set the server to run on {0}. This typically means changing the system/environment variable <code>JAVA_HOME</code> as follows\:<br><code>{1}</code>
52
# HTML-formatted
53
GenericWebAppServerIntegrationProvider_ManualRemoteStep4Message=When starting the server, provide extra startup option to the <code>java</code> command\:<br><code>{0}</code><br>The {1}.
54
# HTML-formatted
55
GenericWebAppServerIntegrationProvider_ManualRemoteStep5Message=The JVM will start, but will not proceed with server execution until you connect the profiler.
56
# HTML-formatted
57
GenericWebAppServerIntegrationProvider_ManualDirectStep1Message=If the server is configured to run on a different JVM, set the server to run on {0}. This typically means the changing system/environment variable <code>JAVA_HOME</code> as follows\:<br><code>{1}</code>
58
# HTML-formatted
59
GenericWebAppServerIntegrationProvider_ManualDirectStep2Message=When starting the server, provide extra startup option to the <code>java</code> command\:<br><code>{0}</code>
60
# HTML-formatted
61
GenericWebAppServerIntegrationProvider_ManualDirectStep3Message=The JVM will start, but will not proceed with server execution until you connect the profiler.
62
# HTML-formatted
63
GenericWebAppServerIntegrationProvider_DynamicWarningMessage=Make sure your IDE is using {0}.
64
# HTML-formatted
65
GenericWebAppServerIntegrationProvider_ManualDynamicStep1Message=Start the server using {0}.
66
# HTML-formatted
67
GenericWebAppServerIntegrationProvider_ManualDynamicStep2Message=When the server is running, click Attach to select the server process to attach to.
(-)a/profiler.j2ee.generic/src/org/netbeans/modules/profiler/j2ee/generic/GenericWebAppServerIntegrationProvider.java (+284 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * Contributor(s):
25
 * The Original Software is NetBeans. The Initial Developer of the Original
26
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
27
 * Microsystems, Inc. All Rights Reserved.
28
 *
29
 * If you wish your version of this file to be governed by only the CDDL
30
 * or only the GPL Version 2, indicate your decision by adding
31
 * "[Contributor] elects to include this software in this distribution
32
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
33
 * single choice of license, a recipient has the option to distribute
34
 * your version of this file under either the CDDL, the GPL Version 2 or
35
 * to extend the choice of license to its licensees as provided above.
36
 * However, if you add GPL Version 2 code and therefore, elected the GPL
37
 * Version 2 license, then the option applies only if the new code is
38
 * made subject to such option by the copyright holder.
39
 */
40
41
package org.netbeans.modules.profiler.j2ee.generic;
42
43
import org.netbeans.lib.profiler.common.AttachSettings;
44
import org.netbeans.lib.profiler.common.integration.IntegrationUtils;
45
import java.text.MessageFormat;
46
import java.util.ResourceBundle;
47
import org.netbeans.modules.profiler.attach.providers.AbstractIntegrationProvider;
48
import org.netbeans.modules.profiler.attach.providers.IntegrationCategorizer;
49
import org.netbeans.modules.profiler.attach.providers.TargetPlatformEnum;
50
import org.netbeans.modules.profiler.attach.spi.IntegrationProvider;
51
import org.netbeans.modules.profiler.attach.wizard.steps.NullWizardStep;
52
import org.netbeans.modules.profiler.attach.wizard.steps.WizardStep;
53
54
55
/**
56
 *
57
 * @author Tomas Hurka
58
 * @author Jaroslav Bachorik
59
 */
60
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.modules.profiler.attach.spi.IntegrationProvider.class)
61
public class GenericWebAppServerIntegrationProvider extends AbstractIntegrationProvider {
62
    //~ Static fields/initializers -----------------------------------------------------------------------------------------------
63
64
    private static final ResourceBundle messages = ResourceBundle.getBundle("org.netbeans.modules.profiler.j2ee.Bundle"); // NOI18N
65
    private static final String GENERIC_WEBAPP_SERVER_STRING = messages.getString("GenericWebAppServerIntegrationProvider_GenericWebappServerString"); // NOI18N
66
    private static final String PATH_TO_JDK_DIRECTORY_STRING = messages.getString("GenericWebAppServerIntegrationProvider_PathToJdkDirectory"); // NOI18N
67
    private static final String MANUAL_REMOTE_STEP3_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualRemoteStep3Message"); // NOI18N
68
    private static final String MANUAL_REMOTE_STEP4_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualRemoteStep4Message"); // NOI18N
69
    private static final String MANUAL_REMOTE_STEP5_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualRemoteStep5Message"); // NOI18N
70
    private static final String MANUAL_DIRECT_STEP1_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualDirectStep1Message"); // NOI18N
71
    private static final String MANUAL_DIRECT_STEP2_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualDirectStep2Message"); // NOI18N
72
    private static final String MANUAL_DIRECT_STEP3_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualDirectStep3Message"); // NOI18N
73
    private static final String MANUAL_DYNAMIC_STEP1_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualDynamicStep1Message"); // NOI18N
74
    private static final String MANUAL_DYNAMIC_STEP2_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualDynamicStep2Message"); // NOI18N
75
    private static final String DYNAMIC_WARNING_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_DynamicWarningMessage"); // NOI18N  
76
    private static final WizardStep NULL_WIZARD_STEP = new NullWizardStep();
77
78
    //~ Methods ------------------------------------------------------------------------------------------------------------------
79
80
    public IntegrationProvider.IntegrationHints getAfterInstallationHints(AttachSettings attachSettings, boolean b) {
81
        return new IntegrationProvider.IntegrationHints();
82
    }
83
84
    public WizardStep getAttachedWizard() {
85
        return NULL_WIZARD_STEP;
86
    }
87
88
    // <editor-fold defaultstate="collapsed" desc="WizardIntegrationProvider implementation">
89
    public IntegrationProvider.IntegrationHints getIntegrationReview(AttachSettings attachSettings) {
90
        return null;
91
    }
92
93
    public IntegrationProvider.IntegrationHints getModificationHints(AttachSettings attachSettings) {
94
        String targetOS = attachSettings.getHostOS();
95
96
        // Remote attach instructions
97
        if (attachSettings.isRemote()) {
98
            return getManualRemoteIntegrationStepsInstructions(targetOS, attachSettings);
99
        }
100
        // Local direct attach
101
        else if (attachSettings.isDirect()) {
102
            return getManualLocalDirectIntegrationStepsInstructions(targetOS, attachSettings);
103
        }
104
        // Local dynamic attach
105
        else {
106
            return getManualLocalDynamicIntegrationStepsInstructions(targetOS, attachSettings);
107
        }
108
    }
109
110
    public String getTitle() {
111
        return GENERIC_WEBAPP_SERVER_STRING;
112
    }
113
114
    public void categorize(IntegrationCategorizer integrationCategorizer) {
115
        integrationCategorizer.addAppserver(this, getAttachWizardPriority());
116
    }
117
118
    public void modify(AttachSettings attachSettings) {
119
    }
120
121
    public void run(AttachSettings attachSettings) {
122
    }
123
124
    public boolean supportsAutomation() {
125
        return false;
126
    }
127
128
    public boolean supportsDirect() {
129
        return true;
130
    }
131
132
    public boolean supportsDynamic() {
133
        return true;
134
    }
135
136
    public boolean supportsDynamicPid() {
137
        return true;
138
    }
139
140
    public boolean supportsLocal() {
141
        return true;
142
    }
143
144
    public boolean supportsManual() {
145
        return true;
146
    }
147
148
    public boolean supportsRemote() {
149
        return true;
150
    }
151
152
    protected int getAttachWizardPriority() {
153
        return 1;
154
    }
155
156
    private IntegrationProvider.IntegrationHints getManualLocalDirectIntegrationStepsInstructions(String targetOS,
157
                                                                                                  AttachSettings attachSettings) {
158
        IntegrationProvider.IntegrationHints instructions = new IntegrationProvider.IntegrationHints();
159
160
        // Step 1
161
        String pathToJDKDirectory = "&lt;"
162
                                    + MessageFormat.format(PATH_TO_JDK_DIRECTORY_STRING,
163
                                                           new Object[] { IntegrationUtils.getJavaPlatformName(getTargetJava()) })
164
                                    + "&gt;"; // NOI18N
165
        instructions.addStep(MessageFormat.format(MANUAL_DIRECT_STEP1_MESSAGE,
166
                                                  new Object[] {
167
                                                      IntegrationUtils.getJavaPlatformName(getTargetJava()),
168
                                                      IntegrationUtils.getExportEnvVariableValueString(targetOS, "JAVA_HOME",
169
                                                                                                       pathToJDKDirectory, true)
170
                                                  })); // NOI18N
171
172
        // Step 2
173
        instructions.addStep(MessageFormat.format(MANUAL_DIRECT_STEP2_MESSAGE,
174
                                                  new Object[] {
175
                                                      IntegrationUtils.getProfilerAgentCommandLineArgs(targetOS, getTargetJava(),
176
                                                                                                       attachSettings.isRemote(),
177
                                                                                                       attachSettings.getPort())
178
                                                  }));
179
180
        // Step 3
181
        instructions.addStep(MANUAL_DIRECT_STEP3_MESSAGE);
182
183
        // Note about spaces in path when starting Profiler agent
184
        if (IntegrationUtils.isWindowsPlatform(targetOS)) {
185
            instructions.addWarning(SPACES_IN_PATH_WARNING_MSG);
186
        }
187
188
        // Note about decreasing CPU profiling overhead
189
        instructions.addHint(REDUCE_OVERHEAD_MSG);
190
191
        // Note about export vs. setenv on UNIXes
192
        if (!IntegrationUtils.isWindowsPlatform(targetOS)) {
193
            instructions.addHint(EXPORT_SETENV_MSG);
194
        }
195
196
        return instructions;
197
    }
198
199
    private IntegrationProvider.IntegrationHints getManualLocalDynamicIntegrationStepsInstructions(String targetOS,
200
                                                                                                   AttachSettings attachSettings) {
201
        IntegrationProvider.IntegrationHints instructions = new IntegrationProvider.IntegrationHints();
202
203
        // Step 1
204
        instructions.addStep(MessageFormat.format(MANUAL_DYNAMIC_STEP1_MESSAGE,
205
                                                  new Object[] { IntegrationUtils.getJavaPlatformName(getTargetJava()) }));
206
        // Step 2
207
        instructions.addStep(MANUAL_DYNAMIC_STEP2_MESSAGE);
208
209
        // Note about spaces in path when starting Profiler agent
210
        if (IntegrationUtils.isWindowsPlatform(targetOS)) {
211
            instructions.addWarning(SPACES_IN_PATH_WARNING_MSG);
212
        }
213
214
        // Note about decreasing CPU profiling overhead
215
        instructions.addHint(REDUCE_OVERHEAD_MSG);
216
217
        // Note about export vs. setenv on UNIXes
218
        if (!IntegrationUtils.isWindowsPlatform(targetOS)) {
219
            instructions.addHint(EXPORT_SETENV_MSG);
220
        }
221
222
        instructions.addWarning(MessageFormat.format(DYNAMIC_WARNING_MESSAGE,
223
                                                     new Object[] {
224
                                                         IntegrationUtils.getJavaPlatformName(getTargetJava()),
225
                                                         IntegrationUtils.getProfilerAgentCommandLineArgs(targetOS,
226
                                                                                                          getTargetJava(),
227
                                                                                                          attachSettings.isRemote(),
228
                                                                                                          attachSettings.getPort())
229
                                                     }));
230
231
        return instructions;
232
    }
233
234
    // </editor-fold>
235
    private IntegrationProvider.IntegrationHints getManualRemoteIntegrationStepsInstructions(String targetOS,
236
                                                                                             AttachSettings attachSettings) {
237
        IntegrationProvider.IntegrationHints instructions = new IntegrationProvider.IntegrationHints();
238
239
        // Step 1
240
        instructions.addStep(getManualRemoteStep1(targetOS));
241
242
        // Step 2
243
        instructions.addStep(getManualRemoteStep2(targetOS));
244
245
        // Step 3
246
        String pathToJDKDirectory = "&lt;"
247
                                    + MessageFormat.format(PATH_TO_JDK_DIRECTORY_STRING,
248
                                                           new Object[] { IntegrationUtils.getJavaPlatformName(getTargetJava()) })
249
                                    + "&gt;"; // NOI18N
250
        instructions.addStep(MessageFormat.format(MANUAL_REMOTE_STEP3_MESSAGE,
251
                                                  new Object[] {
252
                                                      IntegrationUtils.getJavaPlatformName(getTargetJava()),
253
                                                      IntegrationUtils.getExportEnvVariableValueString(targetOS, "JAVA_HOME",
254
                                                                                                       pathToJDKDirectory, true)
255
                                                  })); // NOI18N
256
257
        // Step 4
258
        instructions.addStep(MessageFormat.format(MANUAL_REMOTE_STEP4_MESSAGE,
259
                                                  new Object[] {
260
                                                      IntegrationUtils.getProfilerAgentCommandLineArgs(targetOS, getTargetJava(),
261
                                                                                                       attachSettings.isRemote(),
262
                                                                                                       attachSettings.getPort()),
263
                                                      REMOTE_ABSOLUTE_PATH_HINT
264
                                                  }));
265
266
        // Step 5
267
        instructions.addStep(MANUAL_REMOTE_STEP5_MESSAGE);
268
269
        // Note about spaces in path when starting Profiler agent
270
        if (IntegrationUtils.isWindowsPlatform(targetOS)) {
271
            instructions.addWarning(SPACES_IN_PATH_WARNING_MSG);
272
        }
273
274
        // Note about decreasing CPU profiling overhead
275
        instructions.addHint(REDUCE_OVERHEAD_MSG);
276
277
        // Note about export vs. setenv on UNIXes
278
        if (!IntegrationUtils.isWindowsPlatform(targetOS)) {
279
            instructions.addHint(EXPORT_SETENV_MSG);
280
        }
281
282
        return instructions;
283
    }
284
}
(-)a/profiler.j2ee/src/org/netbeans/modules/profiler/j2ee/Bundle.properties (-21 lines)
Lines 127-153 Link Here
127
WebProjectUtils_CannotFindFilterClassMsg=Cannot find filter class {0} defined in deployment descriptor. Its methods will not be included into root methods.
127
WebProjectUtils_CannotFindFilterClassMsg=Cannot find filter class {0} defined in deployment descriptor. Its methods will not be included into root methods.
128
WebProjectUtils_CannotFindListenerClassMsg=Cannot find listener class {0} defined in deployment descriptor. Its methods will not be included into root methods.
128
WebProjectUtils_CannotFindListenerClassMsg=Cannot find listener class {0} defined in deployment descriptor. Its methods will not be included into root methods.
129
129
130
GenericWebAppServerIntegrationProvider_GenericWebappServerString=Generic Web/App Server
131
# HTML-formatted
132
GenericWebAppServerIntegrationProvider_PathToJdkDirectory=path to {0} directory
133
# HTML-formatted
134
GenericWebAppServerIntegrationProvider_ManualRemoteStep3Message=If the server is configured to run on a different JVM, set the server to run on {0}. This typically means changing the system/environment variable <code>JAVA_HOME</code> as follows\:<br><code>{1}</code>
135
# HTML-formatted
136
GenericWebAppServerIntegrationProvider_ManualRemoteStep4Message=When starting the server, provide extra startup option to the <code>java</code> command\:<br><code>{0}</code><br>The {1}.
137
# HTML-formatted
138
GenericWebAppServerIntegrationProvider_ManualRemoteStep5Message=The JVM will start, but will not proceed with server execution until you connect the profiler.
139
# HTML-formatted
140
GenericWebAppServerIntegrationProvider_ManualDirectStep1Message=If the server is configured to run on a different JVM, set the server to run on {0}. This typically means the changing system/environment variable <code>JAVA_HOME</code> as follows\:<br><code>{1}</code>
141
# HTML-formatted
142
GenericWebAppServerIntegrationProvider_ManualDirectStep2Message=When starting the server, provide extra startup option to the <code>java</code> command\:<br><code>{0}</code>
143
# HTML-formatted
144
GenericWebAppServerIntegrationProvider_ManualDirectStep3Message=The JVM will start, but will not proceed with server execution until you connect the profiler.
145
# HTML-formatted
146
GenericWebAppServerIntegrationProvider_DynamicWarningMessage=Make sure your IDE is using {0}.
147
# HTML-formatted
148
GenericWebAppServerIntegrationProvider_ManualDynamicStep1Message=Start the server using {0}.
149
# HTML-formatted
150
GenericWebAppServerIntegrationProvider_ManualDynamicStep2Message=When the server is running, click Attach to select the server process to attach to.
151
130
152
LoadGenPanel_NoScripts=<No scripts for project>
131
LoadGenPanel_NoScripts=<No scripts for project>
153
LoadGenPanel.scriptsEnabled.text=&LoadGenerator Script
132
LoadGenPanel.scriptsEnabled.text=&LoadGenerator Script
(-)a/profiler.j2ee/src/org/netbeans/modules/profiler/j2ee/GenericWebAppServerIntegrationProvider.java (-284 lines)
Lines 1-284 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * Contributor(s):
25
 * The Original Software is NetBeans. The Initial Developer of the Original
26
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
27
 * Microsystems, Inc. All Rights Reserved.
28
 *
29
 * If you wish your version of this file to be governed by only the CDDL
30
 * or only the GPL Version 2, indicate your decision by adding
31
 * "[Contributor] elects to include this software in this distribution
32
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
33
 * single choice of license, a recipient has the option to distribute
34
 * your version of this file under either the CDDL, the GPL Version 2 or
35
 * to extend the choice of license to its licensees as provided above.
36
 * However, if you add GPL Version 2 code and therefore, elected the GPL
37
 * Version 2 license, then the option applies only if the new code is
38
 * made subject to such option by the copyright holder.
39
 */
40
41
package org.netbeans.modules.profiler.j2ee;
42
43
import org.netbeans.lib.profiler.common.AttachSettings;
44
import org.netbeans.lib.profiler.common.integration.IntegrationUtils;
45
import java.text.MessageFormat;
46
import java.util.ResourceBundle;
47
import org.netbeans.modules.profiler.attach.providers.AbstractIntegrationProvider;
48
import org.netbeans.modules.profiler.attach.providers.IntegrationCategorizer;
49
import org.netbeans.modules.profiler.attach.providers.TargetPlatformEnum;
50
import org.netbeans.modules.profiler.attach.spi.IntegrationProvider;
51
import org.netbeans.modules.profiler.attach.wizard.steps.NullWizardStep;
52
import org.netbeans.modules.profiler.attach.wizard.steps.WizardStep;
53
54
55
/**
56
 *
57
 * @author Tomas Hurka
58
 * @author Jaroslav Bachorik
59
 */
60
@org.openide.util.lookup.ServiceProvider(service=org.netbeans.modules.profiler.attach.spi.IntegrationProvider.class)
61
public class GenericWebAppServerIntegrationProvider extends AbstractIntegrationProvider {
62
    //~ Static fields/initializers -----------------------------------------------------------------------------------------------
63
64
    private static final ResourceBundle messages = ResourceBundle.getBundle("org.netbeans.modules.profiler.j2ee.Bundle"); // NOI18N
65
    private static final String GENERIC_WEBAPP_SERVER_STRING = messages.getString("GenericWebAppServerIntegrationProvider_GenericWebappServerString"); // NOI18N
66
    private static final String PATH_TO_JDK_DIRECTORY_STRING = messages.getString("GenericWebAppServerIntegrationProvider_PathToJdkDirectory"); // NOI18N
67
    private static final String MANUAL_REMOTE_STEP3_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualRemoteStep3Message"); // NOI18N
68
    private static final String MANUAL_REMOTE_STEP4_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualRemoteStep4Message"); // NOI18N
69
    private static final String MANUAL_REMOTE_STEP5_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualRemoteStep5Message"); // NOI18N
70
    private static final String MANUAL_DIRECT_STEP1_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualDirectStep1Message"); // NOI18N
71
    private static final String MANUAL_DIRECT_STEP2_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualDirectStep2Message"); // NOI18N
72
    private static final String MANUAL_DIRECT_STEP3_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualDirectStep3Message"); // NOI18N
73
    private static final String MANUAL_DYNAMIC_STEP1_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualDynamicStep1Message"); // NOI18N
74
    private static final String MANUAL_DYNAMIC_STEP2_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_ManualDynamicStep2Message"); // NOI18N
75
    private static final String DYNAMIC_WARNING_MESSAGE = messages.getString("GenericWebAppServerIntegrationProvider_DynamicWarningMessage"); // NOI18N  
76
    private static final WizardStep NULL_WIZARD_STEP = new NullWizardStep();
77
78
    //~ Methods ------------------------------------------------------------------------------------------------------------------
79
80
    public IntegrationProvider.IntegrationHints getAfterInstallationHints(AttachSettings attachSettings, boolean b) {
81
        return new IntegrationProvider.IntegrationHints();
82
    }
83
84
    public WizardStep getAttachedWizard() {
85
        return NULL_WIZARD_STEP;
86
    }
87
88
    // <editor-fold defaultstate="collapsed" desc="WizardIntegrationProvider implementation">
89
    public IntegrationProvider.IntegrationHints getIntegrationReview(AttachSettings attachSettings) {
90
        return null;
91
    }
92
93
    public IntegrationProvider.IntegrationHints getModificationHints(AttachSettings attachSettings) {
94
        String targetOS = attachSettings.getHostOS();
95
96
        // Remote attach instructions
97
        if (attachSettings.isRemote()) {
98
            return getManualRemoteIntegrationStepsInstructions(targetOS, attachSettings);
99
        }
100
        // Local direct attach
101
        else if (attachSettings.isDirect()) {
102
            return getManualLocalDirectIntegrationStepsInstructions(targetOS, attachSettings);
103
        }
104
        // Local dynamic attach
105
        else {
106
            return getManualLocalDynamicIntegrationStepsInstructions(targetOS, attachSettings);
107
        }
108
    }
109
110
    public String getTitle() {
111
        return GENERIC_WEBAPP_SERVER_STRING;
112
    }
113
114
    public void categorize(IntegrationCategorizer integrationCategorizer) {
115
        integrationCategorizer.addAppserver(this, getAttachWizardPriority());
116
    }
117
118
    public void modify(AttachSettings attachSettings) {
119
    }
120
121
    public void run(AttachSettings attachSettings) {
122
    }
123
124
    public boolean supportsAutomation() {
125
        return false;
126
    }
127
128
    public boolean supportsDirect() {
129
        return true;
130
    }
131
132
    public boolean supportsDynamic() {
133
        return true;
134
    }
135
136
    public boolean supportsDynamicPid() {
137
        return true;
138
    }
139
140
    public boolean supportsLocal() {
141
        return true;
142
    }
143
144
    public boolean supportsManual() {
145
        return true;
146
    }
147
148
    public boolean supportsRemote() {
149
        return true;
150
    }
151
152
    protected int getAttachWizardPriority() {
153
        return 1;
154
    }
155
156
    private IntegrationProvider.IntegrationHints getManualLocalDirectIntegrationStepsInstructions(String targetOS,
157
                                                                                                  AttachSettings attachSettings) {
158
        IntegrationProvider.IntegrationHints instructions = new IntegrationProvider.IntegrationHints();
159
160
        // Step 1
161
        String pathToJDKDirectory = "&lt;"
162
                                    + MessageFormat.format(PATH_TO_JDK_DIRECTORY_STRING,
163
                                                           new Object[] { IntegrationUtils.getJavaPlatformName(getTargetJava()) })
164
                                    + "&gt;"; // NOI18N
165
        instructions.addStep(MessageFormat.format(MANUAL_DIRECT_STEP1_MESSAGE,
166
                                                  new Object[] {
167
                                                      IntegrationUtils.getJavaPlatformName(getTargetJava()),
168
                                                      IntegrationUtils.getExportEnvVariableValueString(targetOS, "JAVA_HOME",
169
                                                                                                       pathToJDKDirectory, true)
170
                                                  })); // NOI18N
171
172
        // Step 2
173
        instructions.addStep(MessageFormat.format(MANUAL_DIRECT_STEP2_MESSAGE,
174
                                                  new Object[] {
175
                                                      IntegrationUtils.getProfilerAgentCommandLineArgs(targetOS, getTargetJava(),
176
                                                                                                       attachSettings.isRemote(),
177
                                                                                                       attachSettings.getPort())
178
                                                  }));
179
180
        // Step 3
181
        instructions.addStep(MANUAL_DIRECT_STEP3_MESSAGE);
182
183
        // Note about spaces in path when starting Profiler agent
184
        if (IntegrationUtils.isWindowsPlatform(targetOS)) {
185
            instructions.addWarning(SPACES_IN_PATH_WARNING_MSG);
186
        }
187
188
        // Note about decreasing CPU profiling overhead
189
        instructions.addHint(REDUCE_OVERHEAD_MSG);
190
191
        // Note about export vs. setenv on UNIXes
192
        if (!IntegrationUtils.isWindowsPlatform(targetOS)) {
193
            instructions.addHint(EXPORT_SETENV_MSG);
194
        }
195
196
        return instructions;
197
    }
198
199
    private IntegrationProvider.IntegrationHints getManualLocalDynamicIntegrationStepsInstructions(String targetOS,
200
                                                                                                   AttachSettings attachSettings) {
201
        IntegrationProvider.IntegrationHints instructions = new IntegrationProvider.IntegrationHints();
202
203
        // Step 1
204
        instructions.addStep(MessageFormat.format(MANUAL_DYNAMIC_STEP1_MESSAGE,
205
                                                  new Object[] { IntegrationUtils.getJavaPlatformName(getTargetJava()) }));
206
        // Step 2
207
        instructions.addStep(MANUAL_DYNAMIC_STEP2_MESSAGE);
208
209
        // Note about spaces in path when starting Profiler agent
210
        if (IntegrationUtils.isWindowsPlatform(targetOS)) {
211
            instructions.addWarning(SPACES_IN_PATH_WARNING_MSG);
212
        }
213
214
        // Note about decreasing CPU profiling overhead
215
        instructions.addHint(REDUCE_OVERHEAD_MSG);
216
217
        // Note about export vs. setenv on UNIXes
218
        if (!IntegrationUtils.isWindowsPlatform(targetOS)) {
219
            instructions.addHint(EXPORT_SETENV_MSG);
220
        }
221
222
        instructions.addWarning(MessageFormat.format(DYNAMIC_WARNING_MESSAGE,
223
                                                     new Object[] {
224
                                                         IntegrationUtils.getJavaPlatformName(getTargetJava()),
225
                                                         IntegrationUtils.getProfilerAgentCommandLineArgs(targetOS,
226
                                                                                                          getTargetJava(),
227
                                                                                                          attachSettings.isRemote(),
228
                                                                                                          attachSettings.getPort())
229
                                                     }));
230
231
        return instructions;
232
    }
233
234
    // </editor-fold>
235
    private IntegrationProvider.IntegrationHints getManualRemoteIntegrationStepsInstructions(String targetOS,
236
                                                                                             AttachSettings attachSettings) {
237
        IntegrationProvider.IntegrationHints instructions = new IntegrationProvider.IntegrationHints();
238
239
        // Step 1
240
        instructions.addStep(getManualRemoteStep1(targetOS));
241
242
        // Step 2
243
        instructions.addStep(getManualRemoteStep2(targetOS));
244
245
        // Step 3
246
        String pathToJDKDirectory = "&lt;"
247
                                    + MessageFormat.format(PATH_TO_JDK_DIRECTORY_STRING,
248
                                                           new Object[] { IntegrationUtils.getJavaPlatformName(getTargetJava()) })
249
                                    + "&gt;"; // NOI18N
250
        instructions.addStep(MessageFormat.format(MANUAL_REMOTE_STEP3_MESSAGE,
251
                                                  new Object[] {
252
                                                      IntegrationUtils.getJavaPlatformName(getTargetJava()),
253
                                                      IntegrationUtils.getExportEnvVariableValueString(targetOS, "JAVA_HOME",
254
                                                                                                       pathToJDKDirectory, true)
255
                                                  })); // NOI18N
256
257
        // Step 4
258
        instructions.addStep(MessageFormat.format(MANUAL_REMOTE_STEP4_MESSAGE,
259
                                                  new Object[] {
260
                                                      IntegrationUtils.getProfilerAgentCommandLineArgs(targetOS, getTargetJava(),
261
                                                                                                       attachSettings.isRemote(),
262
                                                                                                       attachSettings.getPort()),
263
                                                      REMOTE_ABSOLUTE_PATH_HINT
264
                                                  }));
265
266
        // Step 5
267
        instructions.addStep(MANUAL_REMOTE_STEP5_MESSAGE);
268
269
        // Note about spaces in path when starting Profiler agent
270
        if (IntegrationUtils.isWindowsPlatform(targetOS)) {
271
            instructions.addWarning(SPACES_IN_PATH_WARNING_MSG);
272
        }
273
274
        // Note about decreasing CPU profiling overhead
275
        instructions.addHint(REDUCE_OVERHEAD_MSG);
276
277
        // Note about export vs. setenv on UNIXes
278
        if (!IntegrationUtils.isWindowsPlatform(targetOS)) {
279
            instructions.addHint(EXPORT_SETENV_MSG);
280
        }
281
282
        return instructions;
283
    }
284
}
(-)a/profiler/nbproject/project.xml (+1 lines)
Lines 388-393 Link Here
388
                <friend>org.netbeans.modules.maven.profiler</friend>
388
                <friend>org.netbeans.modules.maven.profiler</friend>
389
                <friend>org.netbeans.modules.profiler.freeform</friend>
389
                <friend>org.netbeans.modules.profiler.freeform</friend>
390
                <friend>org.netbeans.modules.profiler.j2ee</friend>
390
                <friend>org.netbeans.modules.profiler.j2ee</friend>
391
                <friend>org.netbeans.modules.profiler.j2ee.generic</friend>
391
                <friend>org.netbeans.modules.profiler.j2ee.jboss</friend>
392
                <friend>org.netbeans.modules.profiler.j2ee.jboss</friend>
392
                <friend>org.netbeans.modules.profiler.j2ee.sunas</friend>
393
                <friend>org.netbeans.modules.profiler.j2ee.sunas</friend>
393
                <friend>org.netbeans.modules.profiler.j2ee.tomcat</friend>
394
                <friend>org.netbeans.modules.profiler.j2ee.tomcat</friend>

Return to bug 145198