Project

General

Profile

Revision d455719e

IDd455719e839f670a638280423026754b89a28d46
Parent cc4535d4
Child 4aca5046

Added by Patrick Plitzner about 3 years ago

ref #6694 Set pattern when creating a new feature tree

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/FeatureTreeSelectionDialog.java
15 15

  
16 16
import org.eclipse.core.runtime.IStatus;
17 17
import org.eclipse.jface.dialogs.InputDialog;
18
import org.eclipse.jface.wizard.WizardDialog;
19 18
import org.eclipse.swt.SWT;
20 19
import org.eclipse.swt.widgets.Composite;
21 20
import org.eclipse.swt.widgets.Control;
......
28 27
import eu.etaxonomy.cdm.api.service.IFeatureTreeService;
29 28
import eu.etaxonomy.cdm.model.description.FeatureTree;
30 29
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
31
import eu.etaxonomy.taxeditor.featuretree.FeatureTreeEditorWizard;
32 30
import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
33 31
import eu.etaxonomy.taxeditor.store.CdmStore;
34 32

  
35 33
/**
36
 * <p>FilteredFeatureTreeSelectionDialog class.</p>
37
 *
38 34
 * @author n.hoffmann
39 35
 * @created Sep 17, 2010
40 36
 * @version 1.0
......
42 38
public class FeatureTreeSelectionDialog extends
43 39
		AbstractFilteredCdmResourceSelectionDialog<FeatureTree> {
44 40

  
45
	/**
46
	 * Creates a filtered selection dialog to select a named area.
47
	 *
48
	 * @param shell
49
	 * 				The shell for displaying this widget
50
	 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
51
	 * @param featureTree a {@link eu.etaxonomy.cdm.model.description.FeatureTree} object.
52
	 * @return a {@link eu.etaxonomy.cdm.model.description.FeatureTree} object.
53
	 */
54 41
	public static FeatureTree select(Shell shell, ConversationHolder conversation, FeatureTree featureTree) {
55 42
		FeatureTreeSelectionDialog dialog = new FeatureTreeSelectionDialog(shell, conversation,
56 43
				"Choose a feature tree", false, featureTree);
57 44
		return getSelectionFromDialog(dialog);
58 45
	}
59 46

  
60
	/**
61
	 * <p>Constructor for FilteredFeatureTreeSelectionDialog.</p>
62
	 *
63
	 * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
64
	 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
65
	 * @param title a {@link java.lang.String} object.
66
	 * @param multi a boolean.
67
	 * @param cdmObject a {@link eu.etaxonomy.cdm.model.description.FeatureTree} object.
68
	 */
69 47
	protected FeatureTreeSelectionDialog(Shell shell,
70 48
			ConversationHolder conversation, String title, boolean multi,
71 49
			FeatureTree cdmObject) {
72 50
		super(shell, conversation, title, multi, FeatureTreeSelectionDialog.class.getCanonicalName(), cdmObject);
73 51
	}
74 52

  
75
	/* (non-Javadoc)
76
	 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
77
	 */
78 53
	/** {@inheritDoc} */
79 54
	@Override
80 55
	protected FeatureTree getPersistentObject(UUID uuid) {
81 56
		return CdmStore.getService(IFeatureTreeService.class).load(uuid);
82 57
	}
83 58

  
84
	/* (non-Javadoc)
85
	 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#initModel()
86
	 */
87 59
	/** {@inheritDoc} */
88 60
	@Override
89 61
	protected void initModel() {
......
99 71
		}
100 72
	}
101 73

  
102
	/* (non-Javadoc)
103
	* @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)
104
	*/
105 74
	/** {@inheritDoc} */
106 75
	@Override
107 76
	protected Control createExtendedContentArea(Composite parent) {
......
121 90
				        CdmStore.getService(IFeatureTreeService.class).save(featureTree);
122 91
			            UuidAndTitleCache<FeatureTree> uuidAndTitleCache = new UuidAndTitleCache<FeatureTree>(FeatureTree.class, featureTree.getUuid(),featureTree.getId(), featureTree.getTitleCache());
123 92
			            model.add(uuidAndTitleCache);
93
			            setPattern(featureTree);
124 94
				    }
125 95
				}
126 96
			}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)