import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
import org.eclipse.jface.util.LocalSelectionTransfer;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.ModifyEvent;
import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
+import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
*
*/
public class DescriptiveDataSetEditor implements IE4SavablePart, IConversationEnabled, ICdmEntitySessionEnabled,
-IPartContentHasDetails, IDirtyMarkable {
+IPartContentHasDetails, IPartContentHasSupplementalData, IDirtyMarkable {
private DescriptiveDataSetComposite composite;
}
};
composite.getRankMin().addSelectionChangedListener(event->dirty.setDirty(true));
+ composite.getRankMin().setText("Select min rank...");
composite.getRankMax().addSelectionChangedListener(event->dirty.setDirty(true));
+ composite.getRankMin().setText("Select max rank...");
composite.getBtnRemoveRankMin().addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
}
});
- composite.getFeatureTreeEditorComposite().init(null, null, e->selectionService.setSelection(e.getSelection()), this, null);
+ composite.getFeatureTreeEditorComposite().init("Character Tree", null, null, e->selectionService.setSelection(e.getSelection()), this, null);
//add drag'n'drop support
Transfer[] transfers = new Transfer[] {LocalSelectionTransfer.getTransfer()};
if(taxonSubtreeFilter!=null){
composite.getTaxonNodeTree().setInput(taxonSubtreeFilter);
}
-
composite.getTxt_label().addModifyListener(labelModifyListener);
+ composite.getTxt_label().addFocusListener(new FocusAdapter() {
+ @Override
+ public void focusGained(FocusEvent e) {
+ super.focusGained(e);
+ selectionService.setSelection(new StructuredSelection(descriptiveDataSet));
+ }
+ });
+ selectionService.setSelection(new StructuredSelection(descriptiveDataSet));
}
public void addTaxonNode(TaxonNodeDto taxonNodeDto){