Junit Model discoverer [message #690358] |
Wed, 29 June 2011 12:28 |
saurav sarkar Messages: 428 Registered: July 2009 |
Senior Member |
|
|
Hi All,
I have couple of questions regarding MoDisco.
(a) Is there any Junit Model discoverer available or being thought of ? I feel it can be a kind of extension over Java Model discoverer.
(b) In Java Model discoverer.Under one Method Decalaration can i see what other method calls are happening within that specific method alongwith the parameters ?
cheers,
Saurav
My Blog http://codifyit.blogspot.com/
Follow me: http://twitter.com/sauravs
|
|
|
|
|
|
|
|
Re: Junit Model discoverer [message #693806 is a reply to message #693354] |
Thu, 07 July 2011 08:36 |
Nicolas Bros Messages: 49 Registered: July 2009 |
Member |
|
|
The discovery framework was improved, and it is now much simpler to write discoverers than with the old framework.
If you want to migrate the JUnit discoverer to the new framework, you should:
- add a dependency to org.eclipse.modisco.infra.discovery.core (for the discoverer definition) instead of the old org.eclipse.gmt.modisco.infra.discoverymanager, and another dependency to org.eclipse.modisco.infra.discovery.ui for registering the discoverer in the UI
- extend org.eclipse.modisco.infra.discovery.core.AbstractModelDiscoverer<T> instead of DefaultDiscoverer. "T" is the source of the discovery, for example IFile or IProject
- define the discoverer parameters as methods or fields annotated with the "@Parameter" annotations, instead of the old DiscoveryParameter
- implement the methods isApplicableTo and basicDiscoverElement
- in basicDiscoverElement, define a default target with "setDefaultTargetURI", in case the user leaves the target URI blank
- still in basicDiscoverElement, create a Resource with "createTargetModel()", put the discovered elements in it, and call setTargetModel(resource) with this resource.
- remove the code that opens a model browser from the discoverer : this is now handled by the discovery framework
- register the discoverer with the extension point "org.eclipse.modisco.infra.discovery.core.discoverer"
- register the discoverer in the MoDisco context menu with the extension point "org.eclipse.modisco.infra.discovery.ui.discoverer"
- the discovery framework is designed so that the core and UI parts can be separated. So, the discoverer should preferably be put in a "core" plug-in, and the extension that registers it in a "UI" plug-in
The reference documentation for the discovery framework is:
http://wiki.eclipse.org/MoDisco/Components/DiscoverersManager/Documentation/0.9#Adopter_Features
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04283 seconds