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

Add a class for the action

The class that was specified in the markup must be created to take care of the invocation of the plug-in. Create a class named org.eclipse.hyades.demo.analyzerview.ViewAction1 that extends org.eclipse.jface.action.Action. Right-click on ViewAction1 in the Package Explorer view. Click Source > Override/Implement Methods.... Choose the Action run() method. Click OK.

The method run() in ViewAction1 will be invoked when a user clicks on the analyzer's Open With option. A plug-in developer may decide to put code in run() to invoke the view class. However, let's test what has been written so far to make sure everything is working.

Launch the Runtime Workbench in Debug mode, then go to the Profiling and Logging perspective. Import a Profiling File or profile something briefly. Right-click on a monitor in the Profiling Monitor view, go to Open With: the option Demo Analyzer View should be available. Put a breakpoint on the ViewAction1 run() method. Clicking on the Demo Analyzer View menu item should invoke the ViewAction1 run() method.

context menu showing Demo Analyzer View
Figure 1: Demo Analyzer View in the Runtime Workbench

Related tasks
Adding a view to the Profiling and Logging Perspective
Creating the plug-in
Add a class for the view


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