Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "MoDisco/Components/DiscoverersManager/Documentation/0.9.beta"

(End User Features)
Line 9: Line 9:
 
= End User Features  =
 
= End User Features  =
  
== Adopter Features  ==
+
= Adopter Features  =
  
=== Discoverers declaration API ===
+
== Discoverers declaration API ==
  
 
''TODO wizard documentation''
 
''TODO wizard documentation''
  
==== Developing a new Discoverer ====
+
=== Developing a new Discoverer ===
  
===== Basics concepts  =====
+
==== Basics concepts  ====
  
 
The framework proposes a Java interface ''org.eclipse.modisco.infra.discoverymanager.core.Discoverer<T>'' that every discoverer must implement.  
 
The framework proposes a Java interface ''org.eclipse.modisco.infra.discoverymanager.core.Discoverer<T>'' that every discoverer must implement.  
Line 43: Line 43:
 
The developer is free to annotate directly a Java field or a getter/setter method, or both field and getter/setter with a same id. See java documentation on ''org.eclipse.modisco.infra.discoverymanager.core.annotations.Parameter '' for details about the rules to comply with. Some compilation errors will appear if some of them are violated (project jdt apt processing must be turned on).
 
The developer is free to annotate directly a Java field or a getter/setter method, or both field and getter/setter with a same id. See java documentation on ''org.eclipse.modisco.infra.discoverymanager.core.annotations.Parameter '' for details about the rules to comply with. Some compilation errors will appear if some of them are violated (project jdt apt processing must be turned on).
  
===== The advanced API =====
+
==== The advanced API ====
  
 
TODO classes ''AbstractDiscoverer'' and ''AbstractModelDiscoverer''
 
TODO classes ''AbstractDiscoverer'' and ''AbstractModelDiscoverer''
  
==== Declaring a new Discoverer  ====
+
=== Declaring a new Discoverer  ===
  
=== Discoverers catalog and generic invocation API  ===
+
== Discoverers catalog and generic invocation API  ==
  
 
TODO org.eclipse.modisco.infra.discoverymanager.core.DiscoveryCatalog  
 
TODO org.eclipse.modisco.infra.discoverymanager.core.DiscoveryCatalog  
 
TODO org.eclipse.modisco.infra.discoverymanager.core.DiscovererHandler/ParameterHandler
 
TODO org.eclipse.modisco.infra.discoverymanager.core.DiscovererHandler/ParameterHandler

Revision as of 09:55, 3 November 2010

Work in progress

Features are grouped according to the interested actor :

  • The end user uses existing discoverers through Eclipse workspace features
  • The adopter uses existing discoverers through a dedicated Eclipse/Java API
  • The adopter develop new discoverers through a dedicated Eclipse/Java API

End User Features

Adopter Features

Discoverers declaration API

TODO wizard documentation

Developing a new Discoverer

Basics concepts

The framework proposes a Java interface org.eclipse.modisco.infra.discoverymanager.core.Discoverer<T> that every discoverer must implement.

 public interface Discoverer<T> {
    public boolean isApplicableTo(final T source);
    public IStatus discoverElement(final T source) throws DiscoveryException;
 }
  • isApplicableTo method : Determines if the source object can be handled by the discoverer. Each discoverer has to implement this method with its own criteria to filter the selected object. Such service will be used in some client generic behavior. e.g. for the end user, if the source object is managed by this discoverer, a discoverer menu will be available in the pop-up menu when users click with the contextual button.
  • discoverElement method : Generic method for launching a discovery from a source element.
  • additional discovery parameters values (input or output) should be managed using fields and methods annotated with org.eclipse.modisco.infra.discoverymanager.core.annotations.Parameter annotation.


Annotating your method/field as parameters of the discovery will enable generic description using the catalog API (see below) and so some client generic behavior (e.g. launchconfig feature for end user).

 @Target({ ElementType.METHOD, ElementType.FIELD })
 public @interface Parameter {
   public String name();
   public String description() default "";
   public boolean requiresInputValue() default false;
 }

The developer is free to annotate directly a Java field or a getter/setter method, or both field and getter/setter with a same id. See java documentation on org.eclipse.modisco.infra.discoverymanager.core.annotations.Parameter for details about the rules to comply with. Some compilation errors will appear if some of them are violated (project jdt apt processing must be turned on).

The advanced API

TODO classes AbstractDiscoverer and AbstractModelDiscoverer

Declaring a new Discoverer

Discoverers catalog and generic invocation API

TODO org.eclipse.modisco.infra.discoverymanager.core.DiscoveryCatalog TODO org.eclipse.modisco.infra.discoverymanager.core.DiscovererHandler/ParameterHandler

Back to the top