Revision e9af789c
Added by Patrick Plitzner over 4 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/InapplicableIfEntityCollectionSection.java | ||
---|---|---|
16 | 16 |
import org.eclipse.jface.wizard.WizardDialog; |
17 | 17 |
|
18 | 18 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
19 |
import eu.etaxonomy.cdm.model.description.Feature; |
|
19 | 20 |
import eu.etaxonomy.cdm.model.description.FeatureState; |
20 | 21 |
import eu.etaxonomy.cdm.model.term.TermNode; |
21 | 22 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
... | ... | |
28 | 29 |
* @date 06.03.2018 |
29 | 30 |
* |
30 | 31 |
*/ |
31 |
public class InapplicableIfEntityCollectionSection extends AbstractEntityCollectionSection<TermNode, FeatureState>{ |
|
32 |
public class InapplicableIfEntityCollectionSection extends AbstractEntityCollectionSection<TermNode<? extends Feature>, FeatureState>{
|
|
32 | 33 |
|
33 | 34 |
public InapplicableIfEntityCollectionSection(CdmFormFactory formFactory, ConversationHolder conversation, |
34 | 35 |
ICdmFormElement parentElement, int style) { |
... | ... | |
39 | 40 |
* {@inheritDoc} |
40 | 41 |
*/ |
41 | 42 |
@Override |
42 |
public Collection<FeatureState> getCollection(TermNode entity) { |
|
43 |
public Collection<FeatureState> getCollection(TermNode <? extends Feature>entity) {
|
|
43 | 44 |
return entity.getInapplicableIf(); |
44 | 45 |
} |
45 | 46 |
|
... | ... | |
57 | 58 |
*/ |
58 | 59 |
@Override |
59 | 60 |
public FeatureState createNewElement() { |
60 |
FeatureStateWizard wizard = new FeatureStateWizard(formFactory, "Inapplicable If");
|
|
61 |
FeatureStateWizard wizard = new FeatureStateWizard("Inapplicable If", getEntity(), formFactory);
|
|
61 | 62 |
WizardDialog dialog = new WizardDialog(getLayoutComposite().getShell(), wizard); |
62 | 63 |
int status = dialog.open(); |
63 | 64 |
if(status == IStatus.OK) { |
Also available in: Unified diff
ref #8475 Filter available feature to only parent features