Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Extending Eclipse monitoring, profiling, and testing functions
Previous Page Home Next Page

Working with the Navigator Extension sample

This sample demonstrates the extending of navigators for the Eclipse Test and Performance Tools Platform, or TPTP (e.g. Profiling Monitor, Log Navigator) to contribute additional content to the navigators. This can include new items, both top-level and children of existing items, and context menu contributions to both new and existing items.

If you have not already done so, create the example by File > New > Example... > Navigator Extension Sample.

The sample contains code that implements a simple extension to the Profiling Monitor navigator. A new action "Add Sample Item" is contributed to the context menu of every existing type containing data (i.e., Monitor, Node, Process, and Agent). This action creates a new item under the selected one, which contains the same data as its parent. The sample items can be viewed with the Memory Statistics view, and are non-persistent (they cannot be saved).

The following procedure outlines the steps needed to view the contributions to the Profiling Monitor navigator made by this sample extension:

  1. Launch an instance of a runtime workbench by selecting Run > Run ... > select Eclipse Application > New > Run.
  2. Switch to the Profiling Monitor navigator view in the Profiling and Logging perspective.
  3. Populate the Profiling Monitor view by either profiling an application or importing a profiling file. The navigator should contain a Monitor, Node, Process, and an Agent. If you do not see all of those types, change the display to the distributed layout.
  4. Right-click on either the Monitor, Node, Process, or Agent. Note the presence of the Add Sample Item at the top of the context menu. Select it. Note the presence of a new Sample Item under the selected one.
  5. Right-click on the newly created item. Note the Delete action is enabled, but the Save action is disabled. The sample items are non-persistent; however extensions can add saving functionality as desired.
  6. Delete the sample item. This removes the item from the navigator view.
  7. Right click on the profiling type. Note the absence of the Add Sample Item in the context menu. Extensions can selectively contribute actions to specific items at runtime.

Related Tasks:
Profiling an application
Importing profiling resources
Opening the Profiling and Logging perspective
Using the Profiling Monitor view
Using the Memory Statistics view


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire