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
Answertopia.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 Application Context Extension sample

This sample demonstrates how to extend application context support for Trace UI artifacts (statistical views, graphical views, and filter support dialogs).

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

The "application context" system lets the profiling views display data using the proper terms no matter what kind of data was collected. For example, the Java term "method," the C term "function," and the Fortran term "procedure" all mean to the same thing. If you collect data from a C program, you want to display the data using C terms and syntax. The application context system lets you do that.

This sample builds a plug-in that registers an application context formatter for the "C/C++" context. It provides terms that the views can use in table headers and other places, and it provides a syntax formatter for displaying namespace names (using the C++ separator "::" instead of the Java separator ".").

The sample contains code for simple extensions to the context sensitive support. The Package, Class, and Method structure used in Java are replaced by C/C++ structures in various locations, such as in the view header, formatting, and filter dialog.

The sample contains the following elements which contribute to the context sensitive extension available in TPTP:

plugin.xml: Contains the extension point for the C/C++ context definition, the C/C++ context provider declaration, as well as C/C++ context open source action.

org.eclipse.tptp.context.sample.clanguage.CContextProvider: This is the context formatter that is declared in plugin.xml, which mainly describes a format provider in a C/C++ context for the TPTP profiling view attribute replacement.

org.eclipse.tptp.context.sample.clanguage.ContextOpenSourceProviderSample: This is a C/C++ context sensitive open source action provider.

org.eclipse.tptp.context.sample.clanguage.*Formatter: Various formatters are available from the context provider when querying for C/C++ context sensitive label and formatter support.

The following procedure outlines the steps needed to view the contributions to the TPTP views made by this sample extension:

  1. Launch an instance of a runtime workbench by selecting Run > Run As > Eclipse Application.
  2. Switch to the Profiling Monitor navigator view in the Profiling perspective.
  3. Populate the Profiling Monitor view by importing a C/C++ context profiling file. The navigator should contain a Project, Monitor, Node, Process, and Agent.
  4. Open any TPTP profiling view, e.g. Memory Statistic view, Execution Statistic view. Note that the column headers and their content are formatted. Note also that attributes are formatted to C/C++ in view filter dialogs.
  5. Note: If you choose to import the context profiling file included in this example you will only be able to see Execution Statistics data as this is the only type contained in the file. The other TPTP profiling views are expected to be empty.

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