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.

Bug 189151 - NetBeans Profiler integration should be built-in as it is no more a separate add-on
Summary: NetBeans Profiler integration should be built-in as it is no more a separate ...
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Ide (show other bugs)
Version: 7.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: J Bachorik
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2010-08-03 09:18 UTC by J Bachorik
Modified: 2012-04-05 13:36 UTC (History)
6 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed changes (32.37 KB, patch)
2010-08-04 08:21 UTC, J Bachorik
Details | Diff
Patch with the discussed changes integrated (53.63 KB, patch)
2010-08-05 06:59 UTC, J Bachorik
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description J Bachorik 2010-08-03 09:18:20 UTC
NetBeans Profiler should be seamlessly integrated into the IDE (as it is for eg. debugger). 

Right now, when a user chooses to profile a project the profiler performs "integration" step which requires user's intervention and adds a new profiler-build-impl.xml file. This workflow is a remnant of times when the profiler was a completely standalone addon. 

Nowadays, the profiler is an integral part of the IDE and as such it should work out-of-the-box - no "integration" step should ever be necessary. This can be achieved by modifying appropriate "build-impl.xsl" files for particular project types to include the profiler specific targets the same way they include the debugger specific ones. The affected project types are:
* java.j2seproject
* web.project
* j2ee.ejbjarproject
* j2ee.earproject

There is one catch - the projects "integrated" with the profiler need to be detected and cleaned up so there are no multiple same name targets. This can be easily achieved by checking the "build-impl.xml" file for the presence of the profiler specific targets and removing the "integration" when necessery.

The proposed patch is attached.
Comment 1 Jesse Glick 2010-08-03 21:29:41 UTC
Sounds good. Did you forget to attach the patch?
Comment 2 Tomas Zezula 2010-08-04 06:25:32 UTC
OK, I agree with proposed change.
Should I chang the j2seproject's build-impl.xsl or are you going to do it?
Comment 3 Petr Jiricka 2010-08-04 07:44:08 UTC
BTW, is j2ee.clientproject currently not supported by the profiler?
Comment 4 J Bachorik 2010-08-04 08:21:55 UTC
Created attachment 101186 [details]
Proposed changes

The patch. Should have been added when creating this issue.
Comment 5 Jesse Glick 2010-08-04 12:24:29 UTC
Looks good. BTW did you mean to call isProfilerIntegrated from projectOpened (to check also for PROFILER_INIT)? And will there be similar unintegrate hooks for other project types?
Comment 6 J Bachorik 2010-08-04 14:30:01 UTC
@Petr Jiricka:
No, the appclient project is not supported by profiler.

@Jesse Glick:
No, the check for PROFILER_INIT wouldn't make sense. I only need to know whether the build files were modified by the previous profiler version. 
Probably it would be better to remove the "ProjectUtilities.isProfilerIntegrated(project)" method - any project supported by the profiler will be enabled for profiling by default.
Regarding the unintegration hook - yes, the intention is to provide such a hook for all the currently supported project types.
Comment 7 Tomas Zezula 2010-08-04 20:08:29 UTC
Looks fine to me.
Comment 8 David Konecny 2010-08-05 00:10:10 UTC
Looks OK, thanks.
Comment 9 J Bachorik 2010-08-05 06:59:57 UTC
Created attachment 101220 [details]
Patch with the discussed changes integrated

Implementing the suggested changes.
Comment 10 J Bachorik 2010-08-12 10:45:06 UTC
If there are no outstanding issues I will integrate the proposed changes today.
Comment 11 Quality Engineering 2010-08-14 03:32:12 UTC
Integrated into 'main-golden', will be available in build *201008140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a94a49fd22df
User: Jaroslav Bachorik <yardus@netbeans.org>
Log: #189151: NetBeans Profiler integration should be built-in as it is no more a separate add-on
Comment 12 Jiri Sedlacek 2010-09-06 10:20:48 UTC
Implemented for 6.10.