package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
\r
import java.net.URISyntaxException;\r
-import java.util.HashSet;\r
-import java.util.Set;\r
\r
-import eu.etaxonomy.cdm.model.common.Language;\r
-import eu.etaxonomy.cdm.model.common.Marker;\r
-import eu.etaxonomy.cdm.model.common.Representation;\r
import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
+import eu.etaxonomy.taxeditor.store.StoreUtil;\r
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;\r
import eu.etaxonomy.taxeditor.ui.element.UriWithLabelElement;\r
TermVocabulary entity, int style) {\r
\r
super.createControls(formElement, entity, style);\r
- uri_uriTermSource = formFactory.createUriWithLabelElement(formElement, "URI Term Source", getEntity().getTermSourceUri(), style);\r
+ uri_uriTermSource = formFactory.createUriWithLabelElement(formElement, "Term Source URI", getEntity().getTermSourceUri(), style);\r
}\r
\r
/* (non-Javadoc)\r
@Override\r
public void handleEvent(Object eventSource) {\r
\r
- if (eventSource == text_label) {\r
- getEntity().setLabel(text_label.getText());\r
- getEntity().setTitleCache(null);\r
- } else if (eventSource == text_description) {\r
- \r
- Representation representation = getEntity().getRepresentation(Language.DEFAULT());\r
- representation.setText(text_description.getText());\r
- } else if (eventSource == uri_uri) {\r
- \r
+ handleRepresentation(eventSource);\r
+ \r
+ if (eventSource == uri_uri) {\r
try {\r
getEntity().setUri(uri_uri.getUri());\r
} catch (URISyntaxException e) {\r
- \r
- e.printStackTrace();\r
+ StoreUtil.errorDialog("Not a URI", getClass(), "You have to provide a valid URI");\r
}\r
} else if (eventSource == uri_uriTermSource) {\r
try {\r
getEntity().setTermSourceUri(uri_uriTermSource.getUri());\r
} catch (URISyntaxException e) {\r
- // TODO Auto-generated catch block\r
- e.printStackTrace();\r
+ StoreUtil.errorDialog("Not a URI", getClass(), "You have to provide a valid URI");\r
}\r
}\r
}\r