Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338702 - [Discovery] specify initial value for Parameters
Summary: [Discovery] specify initial value for Parameters
Status: CLOSED FIXED
Alias: None
Product: MoDisco
Classification: Modeling
Component: Infrastructure (show other bugs)
Version: 0.9.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 0.9.0 M6   Edit
Assignee: Nicolas Bros CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-02 11:50 EST by Nicolas Bros CLA
Modified: 2011-08-18 07:53 EDT (History)
3 users (show)

See Also:
nicolas.bros: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Bros CLA 2011-03-02 11:50:32 EST
There should be a way to specify the initial value of a discoverer parameter.

This can be specified with an additional annotation on a method that returns the initial value, like this for example:

@ParameterInitialValue(name="MY_PARAM")
public boolean getMyParamInitialValue(IProject source) {
    return true;
}

The initialization method takes the source as a parameter because we want to be able to initialize a parameter based on the selected source.
Comment 1 Nicolas Bros CLA 2011-03-04 06:28:55 EST
Committed in revision 4020.
Comment 2 Fabien Giquel CLA 2011-03-07 12:33:01 EST
Hi Nicolas,

can you add some short presentation of the @ParameterInitialValue annotation in component documentation in "advanced API" section ? Thanks.
Moreover some minimal test of IDiscoveryManager.hasInitialValue/getInitialValue will be welcome.
Comment 3 Nicolas Bros CLA 2011-03-09 07:54:19 EST
I added the documentation:
http://wiki.eclipse.org/MoDisco/Components/DiscoverersManager/Documentation/0.9.beta#initial_values
and unit tests.
Comment 4 Hugo Bruneliere CLA 2011-08-18 07:53:10 EDT
Upgrade done.