Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 228241 - Provide ISV documentation for enhancement 166025.
Summary: Provide ISV documentation for enhancement 166025.
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Paul Slauenwhite CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 166025
Blocks:
  Show dependency tree
 
Reported: 2008-04-22 13:51 EDT by Paul Slauenwhite CLA
Modified: 2016-05-05 10:28 EDT (History)
2 users (show)

See Also:


Attachments
Problems with org.eclipse.hyades.test.ui.testNavigatorReferenceTypes (56.00 KB, application/msword)
2008-04-29 09:07 EDT, Alex Bernstein CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Slauenwhite CLA 2008-04-22 13:51:06 EDT
Provide ISV documentation for enhancement 166025.

Enhancement 166025 (Move, Copy, Delete, Rename and Import/Export test assets) provides extension points and public APIs for consuming products to extend various Test Navigator functions.  These extension points and public APIs need to be documented and included as part of our ISV product documentation.

References:

micro conception about copy/paste/delete/remove/rename: https://bugs.eclipse.org/bugs/attachment.cgi?id=87044

how to about this feature: https://bugs.eclipse.org/bugs/attachment.cgi?id=93654
Comment 1 Paul Slauenwhite CLA 2008-04-22 14:46:34 EDT
(In reply to comment #0)

> how to about this feature:
> https://bugs.eclipse.org/bugs/attachment.cgi?id=93654

See:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=166025#c58

Comment 2 Paul Slauenwhite CLA 2008-04-22 14:49:04 EDT
Jerome, please address Alex's questions on the 'how to about this feature' document:

1) It was unclear to me how the cross-matching of different test assets is
done? In other words, there is a
'org.eclipse.hyades.test.ui.testNavigatorReferenceTypes' extension point, but
the document also mentions the
addBidirectionalReference("TestInvoker2TestInvoked", (IReferencerProxyNode)
invokedProxy, "TestInvoked2TestInvoker") method. Who is calling this method?

2) Could not get a clear picture how Export function is addressed. Is this new
behavior plugged into Export wizards? Or is there a utility method that allows
to get all references for a given asset?
Comment 3 Alex Bernstein CLA 2008-04-29 09:07:49 EDT
Created attachment 97966 [details]
Problems with org.eclipse.hyades.test.ui.testNavigatorReferenceTypes
Comment 4 Paul Slauenwhite CLA 2008-05-05 09:32:17 EDT
Required for a consuming product to leverage this function.

Jerome, please address Alex's questions today/tomorrow.
Comment 5 Bozier jerome CLA 2008-05-05 09:49:33 EDT
ok, seeing test navigator inspector snapshot, it seems that your reference have not beeing plugged on the good way. let me explain you the meaning :

theShed --- RptTest2Schedule <--[--]> theShed

mean (from left to right)
you have a reference from theShed, named "RptTest2Schedule", that is implicit, and pointing to "theShed". the opposite reference is explicit

theShed --- Schedule2RptTest [<--]--> theShed

mean :
you have a reference from theShed, named "Schedule2RptTest", that is explicit, and pointing to "theShed". the opposite reference is implicit


(and something real similar for test)

i think the mistake is on the call to addBidirectionalReference.
here's an example of how to use it, inside "DeploymentProxyNode" constructor :

addBidirectionalReference("Deploy2Location", (IReferencerProxyNode) location, "Location2Deploy");

this call will add directly 2 references : "Deploy2Location" from current instance to "location" and opposite one, "Location2Deploy", from location to current instance. 
there is no such call inside "LocationProxyNode" (would duplicate the reference)

now, let's take the call you done :
inside schedule :
addBidirectionalReference("Schedule2RptTest", this, "RptTest2Schedule");
error is on "this". you should put instead the instance of the referenced test
and also, the 2nd call is an error also :
addBidirectionalReference("RptTest2Schedule", this, "Schedule2RptTest");
for exactly the same reason, and also because the first call make both links (schedule to test and test to schedule), so second one is unnecessary
Comment 6 Alex Bernstein CLA 2008-05-05 10:03:15 EDT
>> addBidirectionalReference("Schedule2RptTest", this, "RptTest2Schedule");
>> error is on "this". you should put instead the instance of the referenced test
>> and also, the 2nd call is an error also
>> here's an example of how to use it, inside "DeploymentProxyNode" constructor :
>> 
>> addBidirectionalReference("Deploy2Location", (IReferencerProxyNode) location,
>> "Location2Deploy");

-- Thanks for taking time to reply, Jerome, but I am still not sure I understand it. What does "instance of referenced test" mean? Where/how do I get it? Is there TestNav/TPTP API that I should call to get it?

 Should I make multiple calls to 'addBidirectionalReference' if my schedule contains several references to different tests? Or several references to the same test? 
Comment 7 Bozier jerome CLA 2008-05-05 10:44:45 EDT
ok, let me show you a sample ok code from DeploymentProxyNode, it will explain you clearly :

public DeploymentProxyNode(TPFDeployment deploy, Object parent) {
	super(deploy, parent);
	for (Iterator it = deploy.getArtifacts().iterator(); it.hasNext();) {
		IProxyNode artifact = FileProxyNodeCache.getInstance().getCorrespondingProxy( (CFGArtifact)it.next());
		if(artifact != null) {
			addBidirectionalReference("Deploy2Artifact", (IReferencerProxyNode) artifact, "Artifact2Deploy");  //$NON-NLS-1$//$NON-NLS-2$
		}
	}
	for (Iterator it = deploy.getRefLocations().iterator(); it.hasNext();) {
		IProxyNode location = FileProxyNodeCache.getInstance().getCorrespondingProxy((CFGLocation)it.next());
		if(location != null) {
			addBidirectionalReference("Deploy2Location", (IReferencerProxyNode) location, "Location2Deploy"); //$NON-NLS-1$ //$NON-NLS-2$
		}
	}
}

as you can see, the instance of DeploymentProxyNode put a reference for each of the instance of Artifact that are referenced, and same thing for locations

so, you'll prolly have a code like this in your ScheduleProxyNode constructor :
public SheduleProxyNode(RPTSchedule sched, Object parent) {
	super(sched, parent);
	for (Iterator it = sched.getTests().iterator(); it.hasNext();) {
		IProxyNode test = FileProxyNodeCache.getInstance().getCorrespondingProxy( (RPTTest)it.next());
		if(test != null) {
			addBidirectionalReference("Schedule2RPTTest", (IReferencerProxyNode) test, "Test2Schedule");  //$NON-NLS-1$//$NON-NLS-2$
		}
	}
}


Comment 8 Paul Slauenwhite CLA 2008-05-12 07:46:25 EDT
The translation dates for new documentation have lapsed.  We will refine the documentation with the consuming product under this defect.  Decreasing the severity since the questions that the consuming product has will be addressed under this defect.
Comment 9 Alex Bernstein CLA 2008-05-13 12:42:40 EDT
FileProxyNodeCache cannot be used because it is from internal package.
Comment 10 Paul Slauenwhite CLA 2008-05-21 14:17:14 EDT
Deferring to future as approved by the TPTP PMC (http://dev.eclipse.org/mhonarc/lists/tptp-pmc/msg04926.html).
Comment 11 Paul Slauenwhite CLA 2010-05-20 07:49:49 EDT
No longer required.
Comment 12 Paul Slauenwhite CLA 2010-05-20 09:59:02 EDT
Closing.