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 65197
Collapse All | Expand All

(-)nbbuild/build.xml (+23 lines)
Lines 791-796 Link Here
791
    <antcall target="tryme"/>
791
    <antcall target="tryme"/>
792
  </target>
792
  </target>
793
          
793
          
794
            
795
  <target name="tryme-profile" description="Start IDE in debugger. May only be called from within IDE.">
796
    <nbprofiledirect 
797
        jvmargsprefix="-J" 
798
        jvmargsproperty="profiler.jvmargs" 
799
        jvmproperty="profiler.jdkhome" 
800
        mainclass="org.netbeans.Main"
801
    >
802
      <classpath>
803
        <fileset dir="${netbeans.dest.dir}">
804
          <include name="**/*.jar"/>
805
        </fileset>
806
      </classpath>
807
    </nbprofiledirect>
808
    
809
    <echo message="value1: ${profiler.jvmargs}" />
810
    <echo message="value2: ${profiler.jdkhome}" />
811
812
    <antcall target="tryme">
813
        <param name="tryme.args" value="${profiler.jvmargs} --jdkhome ${profiler.jdkhome}"/>
814
    </antcall>
815
  </target>
816
  
794
  <target name="tryme" depends="init,maybe-build-nozip,tryme-setup-debug-args"
817
  <target name="tryme" depends="init,maybe-build-nozip,tryme-setup-debug-args"
795
          description="Try running the IDE interactively (build it first if needed).
818
          description="Try running the IDE interactively (build it first if needed).
796
It is possible to use -Ddebug.port=3234 -Ddebug.pause=y to start the system in debug mode" 
819
It is possible to use -Ddebug.port=3234 -Ddebug.pause=y to start the system in debug mode" 
(-)nbbuild/templates/projectized.xml (+4 lines)
Lines 97-102 Link Here
97
        <ant dir="${nb_all}/nbbuild" target="tryme-debug"/>
97
        <ant dir="${nb_all}/nbbuild" target="tryme-debug"/>
98
    </target>
98
    </target>
99
    
99
    
100
    <target name="profile" depends="netbeans" >
101
        <ant dir="${nb_all}/nbbuild" target="tryme-profile" />
102
    </target>
103
    
100
    <target name="reload" depends="netbeans">
104
    <target name="reload" depends="netbeans">
101
        <ant dir="${nb_all}/nbbuild" target="tryme">
105
        <ant dir="${nb_all}/nbbuild" target="tryme">
102
            <property name="tryme.debug.args" value="--reload ${cluster}/${module.jar}"/>
106
            <property name="tryme.debug.args" value="--reload ${cluster}/${module.jar}"/>
(-)apisupport/harness/release/build.xml (+4 lines)
Lines 147-152 Link Here
147
    <target name="run" depends="netbeans">
147
    <target name="run" depends="netbeans">
148
        <ant antfile="${harness.dir}/run.xml" target="run"/>
148
        <ant antfile="${harness.dir}/run.xml" target="run"/>
149
    </target>
149
    </target>
150
151
    <target name="profile" depends="netbeans" >
152
        <ant antfile="${harness.dir}/run.xml" target="profile"/>
153
    </target>
150
    
154
    
151
    <target name="debug" depends="netbeans">
155
    <target name="debug" depends="netbeans">
152
        <ant antfile="${harness.dir}/run.xml" target="debug"/>
156
        <ant antfile="${harness.dir}/run.xml" target="debug"/>
(-)apisupport/harness/release/run.xml (+70 lines)
Lines 137-140 Link Here
137
        </antcall>
137
        </antcall>
138
    </target>
138
    </target>
139
139
140
    
141
    <!--
142
    <target name="-profile-init-macrodef-profile">
143
        <macrodef name="resolve">
144
            <attribute name="name"/>
145
            <attribute name="value"/>
146
            <sequential>
147
                <property value="${env.@{value}}" name="@{name}"/>
148
            </sequential>
149
        </macrodef>
150
        <macrodef name="profile">
151
            <attribute name="classname" default="${main.class}"/>
152
            <element name="customize" optional="true"/>
153
            <sequential>
154
                <property environment="env"/>
155
                <resolve value="${profiler.info.pathvar}" name="profiler.current.path"/>
156
                <java jvm="${profiler.info.jvm}" dir="${profiler.info.dir}" classname="@{classname}" fork="true">
157
                    <jvmarg value="${profiler.info.jvmargs.agent}"/>
158
                    <jvmarg line="${profiler.info.jvmargs}"/>
159
                    <env path="${profiler.info.agentpath}:${profiler.current.path}" key="${profiler.info.pathvar}"/>
160
                    <arg line="${application.args}"/>
161
                    <classpath>
162
                        <path path="${run.classpath}"/>
163
                    </classpath>
164
                    <syspropertyset>
165
                        <propertyref prefix="run-sys-prop."/>
166
                        <mapper to="*" from="run-sys-prop.*" type="glob"/>
167
                    </syspropertyset>
168
                    <customize/>
169
                </java>
170
            </sequential>
171
        </macrodef>
172
    </target>
173
    
174
    <target name="-profile-init-check" >
175
        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
176
        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
177
    </target>
178
    -->
179
    <!--
180
    =================
181
    PROFILING SECTION
182
    =================
183
    -->
184
    <target name="profile" description="Profile a project in the IDE.">
185
        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
186
        <nbprofiledirect 
187
            jvmargsprefix="-J" 
188
            jvmargsproperty="profiler.jvmargs" 
189
            jvmproperty="profiler.jdkhome" 
190
            mainclass="org.netbeans.Main"
191
        >
192
            <classpath>
193
                <fileset dir="${netbeans.dest.dir}">
194
                    <include name="**/*.jar"/>
195
                </fileset>
196
                <fileset dir="${cluster}">
197
                    <include name="**/*.jar"/>
198
                </fileset>
199
            </classpath>
200
        </nbprofiledirect>
201
        
202
        <echo message="value1: ${profiler.jvmargs}" />
203
        <echo message="value2: ${profiler.jdkhome}" />
204
        
205
        <antcall target="run">
206
            <param name="run.args" value="${profiler.jvmargs} --jdkhome ${profiler.jdkhome}"/>
207
        </antcall>
208
    </target>
209
    
140
</project>
210
</project>
(-)apisupport/harness/release/suite.xml (+4 lines)
Lines 149-154 Link Here
149
    <target name="debug" depends="build" description="Runs this suite in place in the debugger.">
149
    <target name="debug" depends="build" description="Runs this suite in place in the debugger.">
150
        <ant antfile="${harness.dir}/run.xml" target="debug"/>
150
        <ant antfile="${harness.dir}/run.xml" target="debug"/>
151
    </target>
151
    </target>
152
153
    <target name="profile" depends="build" description="Runs this suite in place in the profiler.">
154
        <ant antfile="${harness.dir}/run.xml" target="profile"/>
155
    </target>
152
    
156
    
153
    <target name="build-jnlp" depends="build" description="Packages this suite as a JNLP application.">
157
    <target name="build-jnlp" depends="build" description="Packages this suite as a JNLP application.">
154
        <ant antfile="${harness.dir}/jnlp.xml" target="build"/>
158
        <ant antfile="${harness.dir}/jnlp.xml" target="build"/>
(-)apisupport/project/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java (+1 lines)
Lines 200-205 Link Here
200
        globalCommands.put(ActionProvider.COMMAND_REBUILD, new String[] {"clean", "netbeans"}); // NOI18N
200
        globalCommands.put(ActionProvider.COMMAND_REBUILD, new String[] {"clean", "netbeans"}); // NOI18N
201
        globalCommands.put(ActionProvider.COMMAND_DEBUG, new String[] {"debug"}); // NOI18N
201
        globalCommands.put(ActionProvider.COMMAND_DEBUG, new String[] {"debug"}); // NOI18N
202
        globalCommands.put(ActionProvider.COMMAND_RUN, new String[] {"reload"}); // NOI18N
202
        globalCommands.put(ActionProvider.COMMAND_RUN, new String[] {"reload"}); // NOI18N
203
        globalCommands.put("profile", new String[] {"profile"}); // NOI18N
203
        globalCommands.put(JavaProjectConstants.COMMAND_JAVADOC, new String[] {"javadoc-nb"}); // NOI18N
204
        globalCommands.put(JavaProjectConstants.COMMAND_JAVADOC, new String[] {"javadoc-nb"}); // NOI18N
204
        if (project.supportsUnitTests()) {
205
        if (project.supportsUnitTests()) {
205
            globalCommands.put(ActionProvider.COMMAND_TEST, new String[] {"test"}); // NOI18N
206
            globalCommands.put(ActionProvider.COMMAND_TEST, new String[] {"test"}); // NOI18N
(-)apisupport/project/src/org/netbeans/modules/apisupport/project/ui/SuiteActions.java (-1 / +4 lines)
Lines 128-133 Link Here
128
            "build-jnlp", // NOI18N
128
            "build-jnlp", // NOI18N
129
            "run-jnlp", // NOI18N
129
            "run-jnlp", // NOI18N
130
            "debug-jnlp", // NOI18N
130
            "debug-jnlp", // NOI18N
131
            "profile" // NOI18N
131
        };
132
        };
132
    }
133
    }
133
    
134
    
Lines 179-187 Link Here
179
                return null;
180
                return null;
180
            }
181
            }
181
            targetNames = new String[] {"debug-jnlp"}; // NOI18N
182
            targetNames = new String[] {"debug-jnlp"}; // NOI18N
183
        } else if (command.equals("profile")) { // NOI18N
184
            targetNames = new String[] {"profile"}; // NOI18N
182
        } else {
185
        } else {
183
            throw new IllegalArgumentException(command);
186
            throw new IllegalArgumentException(command);
184
        }
187
        } 
185
        
188
        
186
        return ActionUtils.runTarget(findBuildXml(project), targetNames, null);
189
        return ActionUtils.runTarget(findBuildXml(project), targetNames, null);
187
    }
190
    }

Return to bug 65197