Community
Participate
Working Groups
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
(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
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?
Created attachment 97966 [details] Problems with org.eclipse.hyades.test.ui.testNavigatorReferenceTypes
Required for a consuming product to leverage this function. Jerome, please address Alex's questions today/tomorrow.
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
>> 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?
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$ } } }
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.
FileProxyNodeCache cannot be used because it is from internal package.
Deferring to future as approved by the TPTP PMC (http://dev.eclipse.org/mhonarc/lists/tptp-pmc/msg04926.html).
No longer required.
Closing.