* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-
package eu.etaxonomy.taxeditor.annotatedlineeditor.e4.handler;
import javax.inject.Named;
import eu.etaxonomy.taxeditor.l10n.Messages;
/**
- *
* @author pplitzner
* @date 12.09.2017
- *
*/
public class NewObjectHandlerE4 {
nonEmptyInputValidator);
if (dialog.open() != Window.CANCEL) {
- IEntityCreator entityCreator = bulkEditor.getEditorInput().getEntityCreator();
+ IEntityCreator<?> entityCreator = bulkEditor.getEditorInput().getEntityCreator();
Object createdEntity = entityCreator.createEntity(key, dialog.getValue());
if (createdEntity == null){
return;
}
IStructuredSelection selection = new StructuredSelection(createdEntity);
-
bulkEditor.refresh();
-
-
bulkEditor.setFocus();
-
bulkEditor.setSelection(selection);
-
-
}
}
}
\r
import eu.etaxonomy.cdm.api.service.IVocabularyService;\r
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;\r
-import eu.etaxonomy.cdm.model.term.DefinedTermBase;\r
import eu.etaxonomy.cdm.model.common.Marker;\r
import eu.etaxonomy.cdm.model.common.MarkerType;\r
+import eu.etaxonomy.cdm.model.term.DefinedTermBase;\r
import eu.etaxonomy.cdm.model.term.TermBase;\r
import eu.etaxonomy.cdm.model.term.TermVocabulary;\r
import eu.etaxonomy.cdm.persistence.dto.TermDto;\r
/**\r
* @author l.morris\r
* @date 9 Jan 2012\r
- *\r
*/\r
public class TermBasePropertyTester extends PropertyTester {\r
\r
private static final String IS_MODIFIABLE = "isModifiable";\r
\r
-\r
- /* (non-Javadoc)\r
- * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)\r
- */\r
@Override\r
public boolean test(Object receiver, String property, Object[] args,\r
Object expectedValue) {\r
return true;\r
}\r
\r
- TermVocabulary vocabulary = null;\r
+ TermVocabulary<?> vocabulary = null;\r
\r
if(object instanceof DefinedTermBase){\r
- vocabulary = ((DefinedTermBase) object).getVocabulary();\r
+ vocabulary = ((DefinedTermBase<?>) object).getVocabulary();\r
}else if(object instanceof TermVocabulary){\r
- vocabulary = (TermVocabulary) object;\r
+ vocabulary = (TermVocabulary<?>) object;\r
}else if(object instanceof TermDto){\r
vocabulary = CdmStore.getService(IVocabularyService.class).load(((TermDto) object).getVocabularyUuid());\r
}else if(object instanceof TermVocabularyDto){\r
\r
return true;\r
}\r
-\r
}\r