Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 80440

Summary: Ability to add property information to items in the method statistics view.
Product: z_Archived Reporter: Ashish Patel <ashishp>
Component: TPTPAssignee: Eugene Chan <ewchan>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P1 CC: analexee, celek, curtispd, dskeen, ewchan, jkubasta, martin.boag, mmings, paulslau, who
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: All   
OS: All   
URL: http://www.eclipse.org/tptp/groups/Architecture/documents/features/hf_80440.html
Whiteboard: closed460
Bug Depends on:    
Bug Blocks: 146268, 166692    
Attachments:
Description Flags
FDD
none
patch
none
patch of sample none

Description Ashish Patel CLA 2004-12-07 19:02:24 EST
In the method statistics view we are attempting to display SQL statements 
inline with the database calls.  

For example, if the method name is "executeQuery()", we want to 
display "executeQuery(): SQL_STATMENT" where SQL_STATEMENT is the actual query 
text used in that SQL query.

For instance 
executeQuery(): SELECT I.PRODUCT FROM MYTABLE WHERE ID = 0

However there is too much information to display right in the table, which is 
why I would like to see a place to store property information.  This way, the 
SQL_STATEMENT is the property information for the method name "executeQuery()".

In the UI, if you were to hover over the method name "executeQuery()" the user 
would see a tooltip that would say there is property information for this item 
in the statistics table.  Similar to eclipse they can press F2 to see these 
properties.  [ you can recreate this by opening some java code and hovering 
over a method name ].  When you press F2 a hovering textbox will appear and 
show the actual SQL text.

To make this more generic, I think that any item added to the statistics tables 
should be able to set property information -hence generically enabling this 
feature.

This feature would be a great enhancement for the product we are shipping that 
is based on hyades 3.0.2.
Comment 1 Martin Boag CLA 2004-12-09 04:22:54 EST
I would like to recommend that this method context data should not be appended 
to the method name. The Hyades trace model group have been working to add 
support for typed and summarized context string representation of method 
parameters and return data.

Please refer to section "2.3      Method call parameter and return data 
reporting" in the document at

http://dev.eclipse.org/viewcvs/indextools.cgi/~checkout~/hyades-
home/docs/components/data_models/trace_model/html/Hyades%20Trace%20Model%
20Requirements%20and%20Solutions.htm#_Toc85538422

This feature has been fully implemented in Hyades 3.2 i1 under bugzilla 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=74475.

However there is already an initial implementation in Hyades 3.01 as noted in 
the requirements document that will be sufficient for storing a SQL statement 
string with a method as we have here.

The missing part that will limit products based on Hyades 3.0.1 / 3.0.2 is 
that no view support for this model extension has yet been implemented.

I agree with Ashish that this method parameter / return data should be 
accessible via the tool tips on all trace model viewers.
Comment 2 Ashish Patel CLA 2004-12-09 12:44:26 EST
Further notes:

It would be ideal that this property support also be present in the UML2 
sequence diagram (as per my example in the feature report - if they see a 
method "executeQuery()" on the UML diagram the user can hover over it and press 
F2 to see the property information).
Comment 3 Eugene Chan CLA 2005-04-22 17:29:00 EDT
Raise feature to P2 per Eric Labadie's request.
Comment 4 Ruth Lee CLA 2005-07-12 11:12:16 EDT
Deferring from 4.1 as per the official 4.1 enhancement plan.
http://eclipse.org/tptp/home/project_info/featureplans/features.php?source=All&project=All&release=4.1&file=TPTPFeatures_4.1.xml
Comment 5 Ruth Lee CLA 2005-07-12 11:14:08 EDT
Deferring from 4.1 as per the official 4.1 enhancement plan.
http://eclipse.org/tptp/home/project_info/featureplans/features.php?source=All&project=All&release=4.1&file=TPTPFeatures_4.1.xml
Comment 6 Ruth Lee CLA 2005-07-12 11:14:55 EDT
Deferring from 4.1 as per the official 4.1 enhancement plan.
http://eclipse.org/tptp/home/project_info/featureplans/features.php?source=All&project=All&release=4.1&file=TPTPFeatures_4.1.xml
Comment 7 Curtis d'Entremont CLA 2005-07-12 13:25:49 EDT
Setting to next release.
Comment 8 Eugene Chan CLA 2006-01-25 15:05:43 EST
Setting target to future so it doesn't show up in 4.2 feature query.
Comment 9 Christophe Elek CLA 2007-09-18 11:33:42 EDT
I am also interested in such an enhancement.
It seems commercial products like IBM one use the transaction property...
If there is a good reason one should use transaction name instead let me know :)
If you can point us to where we need to change the code, let us know too :)
Comment 10 jkubasta CLA 2007-10-10 15:43:02 EDT
Eugene, did we ever size the work required to implement this?
Comment 11 jkubasta CLA 2007-10-25 16:50:32 EDT
Created attachment 81198 [details]
FDD
Comment 12 Paul Slauenwhite CLA 2007-11-06 12:55:47 EST
Approved by the AG for TPTP 4.5 with the following comments:

-What hover content will the extender be able to display?  Is there a predefined structure to the content?  
-Will TPTP implement this extension point?
-What the organization of the extension point?
-Is the hover help going to be a formatted dialog/popup or flyover?
-The design, test, and documentation sizings appear low given a new extension point and UI changes.
-What is required under the build and infrastructure sizing?
Comment 13 Eugene Chan CLA 2008-03-06 16:33:31 EST
Created attachment 91802 [details]
patch
Comment 14 Eugene Chan CLA 2008-03-06 16:35:18 EST
I have created an extension point that adopter can contribute with extending on an abstract class.

extension point example
   <extension
         point="org.eclipse.tptp.platform.common.ui.TableCellLabelProviders">
      <tableCellLabelProvider
            class="org.eclipse.tptp.platform.samples.tablecelllabelprovider.TableCellLabelProvider"
            id="org.eclipse.tptp.platform.samples.tablecelllabelprovider.TableCellLabelProvider"
            name="SampleTableCellLabelProvider">
      </tableCellLabelProvider>
   </extension>

where class org.eclipse.tptp.platform.samples.tablecelllabelprovider.TableCellLabelProvider extends 
public abstract class TableCellLabelProvider {
	
	/**
	 * Given a cell element and column ID of a table in table viewer, return a
	 * custom hover text string content for the table cell.
	 *  
	 * @param element element of row selection in table 
	 * @param columnID column ID as listed in <code>IContextAttributes</code>.
	 * @return hover text string content
	 */
	public abstract String getColumnHoverText(Object element,String columnID);
	
	/**
	 * Return an array of column ID supported by this provider.
	 * 
	 * @return String array of support column ID as listed in <code>IContextAttributes</code>.
	 */
	public abstract String[] getSupportColumnKeys();
}

Statistic table viewers are updated to adopt the new provider.  
Return string of getColumnHoverText in the provider will be displayed in the hover text dialog whenever user hover its pointer in a table cell that is supported by the provider. If there are multiple providers for a single column, their contributions will be append together with newline between them.
Comment 15 Eugene Chan CLA 2008-03-10 12:39:05 EDT
Patch submitted to HEAD.

I am working on an example in org.eclipse.tptp.platform.examples.isv to demo how to use the new extension point.
Comment 16 Eugene Chan CLA 2008-03-10 13:25:10 EDT
Created attachment 92059 [details]
patch of sample 

Example project for extension point is checked into HEAD. Patch attached.
Comment 17 Eugene Chan CLA 2008-03-10 15:16:49 EDT
Documentation for sample is added:

/org.eclipse.tptp.platform.doc.isv/samples/scell_label_extension.html (new)
/org.eclipse.tptp.platform.doc.isv/platformisv_toc.xml (modified)
/org.eclipse.tptp.platform.examples.isv/plugin.xml (modified)
Comment 18 Eugene Chan CLA 2008-03-10 15:20:40 EDT
Feature completed.
Comment 19 Paul Slauenwhite CLA 2009-06-30 13:26:57 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.
Comment 20 Paul Slauenwhite CLA 2009-06-30 13:50:45 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.