Project

General

Profile

Revision 160f1cbd

ID160f1cbd1df7d33ce3b44f28f2e4e500560fd463
Parent 8b7ea5be
Child 845a6a70

Added by Patrick Plitzner 12 months ago

ref #6794 Fix compile error

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java
18 18
import org.eclipse.swt.events.SelectionListener;
19 19
import org.eclipse.swt.widgets.Shell;
20 20

  
21
import eu.etaxonomy.cdm.api.service.IFeatureTreeService;
22
import eu.etaxonomy.cdm.model.description.Feature;
21
import eu.etaxonomy.cdm.api.service.ITermTreeService;
23 22
import eu.etaxonomy.cdm.model.term.TermTree;
24 23
import eu.etaxonomy.cdm.model.term.TermType;
25 24
import eu.etaxonomy.taxeditor.l10n.Messages;
......
31 30
 * @created Sep 17, 2010
32 31
 */
33 32
public class FeatureTreeSelectionDialog extends
34
		AbstractFilteredCdmResourceSelectionDialog<TermTree<Feature>> {
33
		AbstractFilteredCdmResourceSelectionDialog<TermTree> {
35 34

  
36 35
    private final TermType termType;
37 36

  
38
    public static TermTree<Feature> select(Shell shell,
39
    		TermTree<Feature> featureTree) {
37
    public static TermTree select(Shell shell,
38
    		TermTree featureTree) {
40 39
        return select(shell, featureTree, null);
41 40

  
42 41
    }
43
	public static TermTree<Feature> select(Shell shell,
44
	        TermTree<Feature> featureTree, TermType termType) {
42
	public static TermTree select(Shell shell,
43
	        TermTree featureTree, TermType termType) {
45 44
		FeatureTreeSelectionDialog dialog = new FeatureTreeSelectionDialog(shell,
46 45
				Messages.FeatureTreeSelectionDialog_CHOOSE_TREE, false, featureTree, termType);
47 46
		return getSelectionFromDialog(dialog);
......
49 48

  
50 49
	protected FeatureTreeSelectionDialog(Shell shell,
51 50
			 String title, boolean multi,
52
			 TermTree<Feature> cdmObject, TermType termType) {
51
			 TermTree cdmObject, TermType termType) {
53 52
		super(shell, title, multi, FeatureTreeSelectionDialog.class.getCanonicalName(), cdmObject);
54 53
		this.termType = termType;
55 54
	}
56 55

  
57 56
	@Override
58
	protected TermTree<Feature> getPersistentObject(UUID uuid) {
59
		return CdmStore.getService(IFeatureTreeService.class).load(uuid);
57
	protected TermTree getPersistentObject(UUID uuid) {
58
		return CdmStore.getService(ITermTreeService.class).load(uuid);
60 59
	}
61 60

  
62 61
	@Override
63 62
	protected void callService(String pattern) {
64
        model = CdmStore.getService(IFeatureTreeService.class).getUuidAndTitleCacheByTermType(TermTree.class, termType, limitOfInitialElements, pattern);
63
        model = CdmStore.getService(ITermTreeService.class).getUuidAndTitleCacheByTermType(TermTree.class, termType, limitOfInitialElements, pattern);
65 64
	}
66 65

  
67 66
	@Override
......
73 72
                InputDialog dialog = new InputDialog(getShell(), Messages.FeatureTreeSelectionDialog_TREE_LABEL, Messages.FeatureTreeSelectionDialog_ENTER_LABEL, null, null);
74 73
                if (dialog.open() == Window.OK) {
75 74
                    // User clicked OK; update the label with the input
76
                	TermTree<Feature> tree = null;
75
                	TermTree tree = null;
77 76
                    if(termType!=null){
78 77
                        tree = TermTree.NewInstance(termType);
79 78
                    }
......
81 80
                        tree = TermTree.NewInstance();
82 81
                    }
83 82
                    tree.setTitleCache(dialog.getValue(), true);
84
                    CdmStore.getService(IFeatureTreeService.class).merge(tree,true);
83
                    CdmStore.getService(ITermTreeService.class).merge(tree,true);
85 84
                    refresh();
86 85
                    setPattern(tree);
87 86
                  }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)