Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313692 - Deprecated TestUIUtil.getExplicitDependencies(IFile) method's replacement is internal API.
Summary: Deprecated TestUIUtil.getExplicitDependencies(IFile) method's replacement is ...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Paul Slauenwhite CLA
QA Contact: Kathy Chan CLA
URL:
Whiteboard: adopter
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-20 06:51 EDT by Paul Slauenwhite CLA
Modified: 2016-05-05 11:08 EDT (History)
3 users (show)

See Also:
jerome.bozier: review+


Attachments
Patch. (14.76 KB, patch)
2010-05-21 16:03 EDT, Paul Slauenwhite CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Slauenwhite CLA 2010-05-20 06:51:01 EDT
Deprecated TestUIUtil.getExplicitDependencies(IFile) method's replacement is internal API.

The replacements (org.eclipse.hyades.test.ui.navigator.EObjectProxyNode.getReferenceTypes() and org.eclipse.hyades.test.ui.internal.navigator.proxy.reference.ReferenceTypeRegistry.isExplicit(String)) require use of an internal API.
Comment 1 Paul Slauenwhite CLA 2010-05-20 06:52:09 EDT
We can:

1) Remove the deprecation of org.eclipse.hyades.test.ui.util.TestUIUtil.getExplicitDependencies(IFile).  Note, this method causes proxies to be resolved for all test assets below the workspace root.  As such, this method may be long running.

2) Implement a new method to suit your needs.

Alex, what are your requirements?
Comment 2 Alex Bernstein CLA 2010-05-20 09:00:40 EDT
I need two APIs :

1) Get all dependencies for a file A from files that are referenced by A. This is done today by TestUIUtil.getExplicitDependencies(IFile) which is deprecated.

2) Get all dependencies for file A for files that reference A.

Both methods need to take a progress monitor, or execute in some context where progress reporting is possible.
Comment 3 Alex Bernstein CLA 2010-05-21 11:11:05 EDT
As a potential improvement in efficiency of parsing workspaces,  I suggest that both methods take lists of IFile's instead of single IFile.
Comment 4 Paul Slauenwhite CLA 2010-05-21 16:03:13 EDT
Created attachment 169556 [details]
Patch.
Comment 5 Paul Slauenwhite CLA 2010-05-21 16:05:20 EDT
We were able to consolidate the requirements to one streamlined method (org.eclipse.hyades.test.ui.util.TestUIUtil.getReferences(List<IFile>, boolean, IProgressMonitor)). 

Jerome, please review and refactor the existing Test Navigator test code to use this new method.

Requires a new test case.

The attached patch is checked in to CVS (HEAD).
Comment 6 Paul Slauenwhite CLA 2010-05-24 11:42:15 EDT
(In reply to comment #5)
> We were able to consolidate the requirements to one streamlined method
> (org.eclipse.hyades.test.ui.util.TestUIUtil.getReferences(List<IFile>, boolean,
> IProgressMonitor)). 
> 
> Jerome, please review and refactor the existing Test Navigator test code to use
> this new method.

Added two new context menus on test asset proxies in the Test Navigator:

Example >> Inspector >> Show Implicit References
Example >> Inspector >> Show Explicit References

> Requires a new test case.

Added four new automated test cases (including sample files) to /org.eclipse.hyades.test.ui.navigator.tests/junit_plugin/Test.UI.TestUIUtilTest.testsuite.

The above test/code/files are checked in to CVS (HEAD).
Comment 7 Paul Slauenwhite CLA 2010-05-24 16:22:06 EDT
Verified in TPTP-4.7.0-201005222133.

Closing.
Comment 8 Paul Slauenwhite CLA 2010-05-28 06:11:26 EDT
Jerome, could you please review this patch.
Comment 9 Bozier jerome CLA 2010-05-28 06:51:49 EDT
patch looks good