* @created Jan 24, 2011
* @version 1.0
*/
-public class ConceptViewPart extends AbstractCdmEditorViewPart
+public class ConceptViewPart extends AbstractCdmEditorViewPart
implements IPartContentHasDetails, IPartContentHasSupplementalData{
public static final String ID = "eu.etaxonomy.taxeditor.editor.view.concept"; //$NON-NLS-1$
showEmptyPage();
return;
}
-
+
if (part instanceof DetailsViewPart || part instanceof SupplementalDataViewPart) {
// do not show empty page as these views are also used to edit the
// description selected in this view
}
}
-
+
@Override
protected String createPartTitle(Object selectedObject) {
if(selectedObject instanceof TaxonEditorInput){
Control control = viewer.getControl();
Menu menu = menuManager.createContextMenu(control);
+ menuManager.setRemoveAllWhenShown(true);
control.setMenu(menu);
}
public ConceptRelationViewer(Composite parent) {
super(parent);
- }
-
+ }
+
@Override
public ISelection getSelection() {
ISelection selection = super.getSelection();
Object firstElement = ((IStructuredSelection) selection).getFirstElement();
TaxonRelationship taxonRelationship = ((Entry<TaxonRelationship, Taxon>)firstElement).getKey();
return new StructuredSelection(taxonRelationship);
-
+
}
return selection;
}
-
+
@Override
public void setSelection(ISelection selection) {
super.setSelection(selection);
Control control = viewer.getControl();
Menu menu = menuMgr.createContextMenu(control);
+ menuMgr.setRemoveAllWhenShown(true);
control.setMenu(menu);
}
((BulkEditor) part).forceDirty();
IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection();
((BulkEditor) part).changed(selection.getFirstElement());
-
+
}
super.changed(object);
}