if (editor instanceof AnnotatedLineEditor) {
- ISelection selection = HandlerUtil.getActiveMenuSelection(event);
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof TextSelection) {
// Get current line
(LineAnnotationModel) provider.getAnnotationModel(input);
IDocument document = provider.getDocument(input);
- ISelection selection = HandlerUtil.getActiveMenuSelection(event);
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof TextSelection) {
Annotation annotation = null;
.getActiveEditor();
IStructuredSelection selection = (IStructuredSelection) HandlerUtil
- .getActiveMenuSelection(event);
+ .getCurrentSelection(event);
if (selection.getFirstElement() instanceof PolytomousKeyNode) {
try {
.getActiveEditor();
IStructuredSelection selection = (IStructuredSelection) HandlerUtil
- .getActiveMenuSelection(event);
+ .getCurrentSelection(event);
if (selection.getFirstElement() instanceof PolytomousKeyNode) {
try {
}
// Get synonym from selection
- StructuredSelection selection = (StructuredSelection) HandlerUtil.getActiveMenuSelection(event);
+ StructuredSelection selection = (StructuredSelection) HandlerUtil.getCurrentSelection(event);
if (!(selection.getFirstElement() instanceof Synonym)) {
logger.error("Selection does not contain a Synonym");
return null;
public Object execute(ExecutionEvent event) throws ExecutionException {
TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(
Page.NAME);
- ISelection menuSelection = HandlerUtil.getActiveMenuSelection(event);
+ ISelection menuSelection = HandlerUtil.getCurrentSelection(event);
Object selecteObject = ((StructuredSelection) menuSelection).getFirstElement();
TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(
Page.NAME);
- IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getActiveMenuSelection(event);
+ IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
TaxonBase selectedTaxonBase = (TaxonBase) selection.getFirstElement();
TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(
Page.NAME);
- IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getActiveMenuSelection(event);
+ IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
TaxonBase selectedTaxonBase = (TaxonBase) selection.getFirstElement();
public Object execute(ExecutionEvent event) throws ExecutionException {
MultiPageTaxonEditor editor = EditorUtil.getActiveMultiPageTaxonEditor();
- ISelection selection = HandlerUtil.getActiveMenuSelection(event);
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
if(selection instanceof IStructuredSelection){
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
TaxonDescription description = null;
- ISelection selection = HandlerUtil.getActiveMenuSelection(event);
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof ITreeSelection) {
TreePath[] paths = ((ITreeSelection) selection).getPaths();
Object firstSegment = paths[0].getFirstSegment();
<definition
id="isTaxonNode">
<with
- variable="activeMenuSelection">
+ variable="selection">
<iterate>
<instanceof
value="eu.etaxonomy.cdm.model.taxon.TaxonNode">
<definition
id="isTaxonomicTree">
<with
- variable="activeMenuSelection">
+ variable="selection">
<iterate>
<instanceof
value="eu.etaxonomy.cdm.model.taxon.TaxonomicTree">
<definition
id="isSynonymNode">
<with
- variable="activeMenuSelection">
+ variable="selection">
<iterate>
<instanceof
value="eu.etaxonomy.cdm.model.taxon.Synonym">
<definition
id="isCompatible">
<with
- variable="activeMenuSelection">
+ variable="selection">
<test
property="eu.etaxonomy.taxeditor.datasource.propertyTester.isCompatible">
</test>
<definition
id="isModifiable">
<with
- variable="activeMenuSelection">
+ variable="selection">
<test
property="eu.etaxonomy.taxeditor.store.termEditor.propertyTester.isModifiable">
</test>
TaxonInteraction entity, int style) {
taxonSelection = formFactory
.createSelectionElement(Taxon.class,
- getConversationHolder(), this, null,
+ getConversationHolder(), this, "Taxon",
entity.getTaxon2(), EntitySelectionElement.NOTHING,
SWT.WRAP);
* @return a {@link eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer} object.
*/
protected CdmMetaDataAwareDataSourceContainer getSelectedDataSourceContainer(ExecutionEvent event){
- ISelection menuSelection = HandlerUtil.getActiveMenuSelection(event);
+ ISelection menuSelection = HandlerUtil.getCurrentSelection(event);
CdmMetaDataAwareDataSourceContainer container = (CdmMetaDataAwareDataSourceContainer) ((StructuredSelection) menuSelection).getFirstElement();
return container;
}