[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [hyades-dev] Bug 62382 "Open with>" action in Profiling Monitor view should only show relevant views
|
I guess it's past noon EST, but I would like to describe a problem with
your solution:
It's possible for a view to have interesting data in it even though none
of the related profiling types was enabled. This can happen if other code
writes compatible fragments to the trace data stream. Probekit, for
example, can permit user-written probes to write fragments like this, and
we've demonstrated this feature for populating the statistical view.
There's no reason a probe couldn't populate the execution trace view the
same way.
Bottom line: data can arrive to populate a profiling view WITHOUT anybody
enabling one of the expected profiling types. If that means the user can't
open a view (or it's awkward or confusing to do so), then this design is
incomplete.
A more complete (but heavier-weight) design would add an operation to each
view provider, something to let the menu owner could pass the data set to
the view and ask, "Would you show anything if I opened you?" An
implementer of a view should make this a lightweight operation, returning
true or false after a quick glance at the data.
-- Allan Pratt, apratt@xxxxxxxxxx
Rational software division of IBM
"Curtis D'Entremont" <curtispd@xxxxxxxxxx>
Sent by: hyades-dev-admin@xxxxxxxxxxx
07/19/2004 10:27 AM
Please respond to
hyades-dev
To
hyades-dev@xxxxxxxxxxx
cc
Subject
[hyades-dev] Bug 62382 "Open with>" action in Profiling Monitor view
should only show relevant views
This is required action for any hyades extensions that define their own
trace viewers or profiling types:
For Hyades 3.0.1 we will be including the following usability fix:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=62382
Currently we show all profiling-related viewers when trying to open a
profiling agent or profiling type. The idea is to show only relevant
viewers to reduce complexity. This applies to both the "open with" menu
and the default viewer when double clicking. Thus, we need to declare
which profiling type(s) a viewer applies to.
Here's what you need to do.
If you define your own profiling type, declare a typeDescription extension
for the profiling type that viewers can link to. The type will be the
profiling type id. Here is an example for the memory analysis profiling
type:
<extension
point="org.eclipse.hyades.ui.typeDescriptions">
<typeDescription
name="%memoryType"
type="org.eclipse.hyades.profilingType.memoryHeap"
icon="icons/full/obj16/memleakantype_obj.gif"
extension="trace">
</typeDescription>
</extension>
This will allow viewers to be associated with the profiling type, and the
type will show up in the Trace Associations preference page.
If you define your own viewer, update the type in your analyzerExtension
that you use to define your viewers. For example, here is the one for
Package Statistics:
<extension
point="org.eclipse.hyades.ui.analyzerExtensions">
<analyzerExtension
name="%STR_OPEN_PACKAGE_ST_ACTION"
type="org.eclipse.hyades.profilingType.memoryHeap" <-- (used
to be "Profiler")
icon="./icons/full/cview16/packclass_statistic_view.gif"
isDefault="true"
class=
"org.eclipse.hyades.trace.views.actions.internal.OpenPackageStatisticViewAction"
id=
"org.eclipse.hyades.trace.views.actions.internal.OpenPackageStatisticViewAction"
extension="trace">
</analyzerExtension>
</extension>
If you want your viewer to apply to more than one type, or want to use an
existing viewer for your profiling types, you can use the extensionBinding
extension point. The benefit here is that you don't have to create another
analyzerExtension and duplicate all the strings and icon. Here's an
example linking the Package Statistics viewer to the method coverage
profiling type (a meaningless example):
<extension
point="org.eclipse.hyades.ui.extensionBinding">
<extensionBinding
extensionId=
"org.eclipse.hyades.trace.views.actions.internal.OpenPackageStatisticViewAction"
type="org.eclipse.hyades.profilingType.methodCoverage">
</extensionBinding>
</extension>
I've attached patches on source for hyades 3.0.1 plugins; please use these
to test your changes before the fix goes in. To apply, right click on the
project in your workspace -> Team -> Apply patch. Make sure of the
following:
- Right click->Open with on profiling types will only show viewers
relevant to that profiling type.
- Right click->Open with on profiling agents show all viewers from its
profiling types, and any viewers that were defined directly on the
profiling agent (like statistical view).
- If no profiling types are present (e.g. for perfmon agent, J2EE request
profiler, import profile file - known bug), viewers from all profiling
types are shown, as before.
- Double clicking on a profiling type opens an appropriate viewer for that
type.
- Double clicking on a profiling agent with profiling types opens the
appropriate viewer for the first profiling type listed under it in
alphabetical order.
If you find any problems, please let me know right away.
If there are no issues raised, the fix will go in wednesday at noon EST.
Thanks,
Curtis d'Entremont
Problem Determination Tools
IBM Toronto Lab
Phone: (905) 413-5754
E-Mail: curtispd@xxxxxxxxxx
Attachment:
patches_62382.zip
Description: Zip archive