Upgraded to cdmlib-3.0.9, working on error warning for unsavable editor
authorn.hoffmann <n.hoffmann@localhost>
Wed, 28 Sep 2011 10:54:10 +0000 (10:54 +0000)
committern.hoffmann <n.hoffmann@localhost>
Wed, 28 Sep 2011 10:54:10 +0000 (10:54 +0000)
eu.etaxonomy.taxeditor.cdmlib/.classpath
eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.cdmlib/build.properties
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/IMultiPageTaxonEditorPage.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/MultiPageTaxonEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/SimpleSelectionProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/TaxonNameEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/AbstractGroupedContainer.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/AbstractFilteredCdmResourceSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmViewPart.java

index a2035c4a4ba843ab033173b6f31995f85fbb83a5..4143a5c44367878cdc596395f03fadf377d46832 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.8-SNAPSHOT.jar"/>\r
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/activation-1.1.jar" sourcepath="lib/activation-1.1src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/antlr-2.7.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/aopalliance-1.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/asm-attrs.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/asm.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/aspectjrt-1.6.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/aspectjweaver-1.6.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/avalon-framework-4.2.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/batik-all-1.7.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/c3p0-0.9.1.jar" sourcepath="lib/c3p0-0.9.1src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/cglib-2.1.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.7.0.jar" sourcepath="lib/commons-beanutils-1.7.0src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.jar" sourcepath="lib/commons-collections-3.2src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-dbcp-1.2.2.jar" sourcepath="lib/commons-dbcp-1.2.2src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-io-1.4.jar" sourcepath="lib/commons-io-1.4src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-lang-2.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.0.4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/commons-pool-1.3.jar" sourcepath="lib/commons-pool-1.3src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/dozer-5.3.0.jar" sourcepath="lib/dozer-5.3.0src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/ehcache-1.2.3.jar" sourcepath="lib/ehcache-1.2.3src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/ejb3-persistence.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/ezmorph-1.0.4.jar" sourcepath="lib/ezmorph-1.0.4src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/fop.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/google-api-translate-java-0.92.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/h2-1.1.115.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-annotations-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-annotations-3.4.0-SNAPSHOTsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-commons-annotations-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-commons-annotations-3.4.0-SNAPSHOTsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-core-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-core-3.4.0-SNAPSHOTsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-envers-3.4.0-SNAPSHOTsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-3.1.0.GA.jar" sourcepath="lib/hibernate-search-3.1.0.GAsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-tools-3.2.0.ga.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-4.0.0.CR1.jar" sourcepath="lib/hibernate-validator-4.0.0.CR1src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/hsqldb.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/httpclient-4.0.1.jar" sourcepath="lib/httpclient-4.0.1src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/httpcore-4.0.1.jar" sourcepath="lib/httpcore-4.0.1src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/javassist.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-api-2.1.6.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxb-impl-2.1.6.jar" sourcepath="lib/jaxb-impl-2.1.6src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jaxen-1.1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jdbc-1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jdbc2_0-stdext.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jdom.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/joda-time-1.5.jar" sourcepath="lib/joda-time-1.5src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/joda-time-hibernate-1.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/json-lib-2.2.3-jdk15.jar" sourcepath="lib/json-lib-2.2.3-jdk15src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jsr250-api-1.0.jar" sourcepath="lib/jsr250-api-1.0src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jta.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/jtds-1.2.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/junit-4.8.1.jar" sourcepath="lib/junit-4.8.1src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.14.jar" sourcepath="lib/log4j-1.2.14src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lsid-client-1.1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lsid-server-1.1.2.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-core-2.4.0.jar" sourcepath="lib/lucene-core-2.4.0src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/lucene-spellchecker-2.4.0.jar" sourcepath="lib/lucene-spellchecker-2.4.0src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/mail-1.4.jar" sourcepath="lib/mail-1.4src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/msbase-2000.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/mssqlserver-2000.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/msutil-2000.3.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-5.0.5.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/odfdom-0.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/opencsv-1.8.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.apache.commons.codec-1.3.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.eclipse.equinox.common-3.6.0.v20100503.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.eclipse.osgi-3.6.2.R36x_v20110210.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aop-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.aop-3.0.4.RELEASEsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.asm-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.asm-3.0.4.RELEASEsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aspects-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.aspects-3.0.4.RELEASEsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.beans-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.beans-3.0.4.RELEASEsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.context-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.context-3.0.4.RELEASEsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.context.support-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.context.support-3.0.4.RELEASEsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.core-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.core-3.0.4.RELEASEsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.expression-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.expression-3.0.4.RELEASEsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.jdbc-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.jdbc-3.0.4.RELEASEsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.orm-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.orm-3.0.4.RELEASEsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.oxm-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.oxm-3.0.4.RELEASEsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.transaction-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.transaction-3.0.4.RELEASEsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.web-3.0.4.RELEASEsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web.servlet-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.web.servlet-3.0.4.RELEASEsrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/poi-3.1-FINAL.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/postgresql-8.2-504.jdbc4.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/sanselan-0.97-incubator.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/saxon9he.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/serializer-2.7.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/servlet-2.5.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/servlet-api-2.5.jar" sourcepath="lib/servlet-api-2.5src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.5.2.jar" sourcepath="lib/slf4j-api-1.5.2src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/slf4j-log4j12-1.5.2.jar" sourcepath="lib/slf4j-log4j12-1.5.2src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-modules-cache-0.7.jar" sourcepath="lib/spring-modules-cache-0.7src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-modules-lucene-0.8a.jar" sourcepath="lib/spring-modules-lucene-0.8asrc.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-security-config-3.0.5.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/spring-security-core-3.0.5.RELEASE.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/wsdl4j-1.6.1.jar" sourcepath="lib/wsdl4j-1.6.1src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xalan-2.7.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xercesImpl-2.7.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xercesImpl.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xml-apis-1.3.04.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xml-apis-ext-1.3.04.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xml-apis.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xml-resolver-1.2.jar" sourcepath="lib/xml-resolver-1.2src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xmlgraphics-commons-1.3.1.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xom-1.0.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xsltc.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/xstream-1.3.1.jar" sourcepath="lib/xstream-1.3.1src.zip"/>\r
-       <classpathentry exported="true" kind="lib" path="lib/yjp-controller-api-redist-8.0.1.jar"/>\r
-       <classpathentry kind="output" path="target/classes"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.0.9-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.0.9-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.0.9-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.0.9-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.0.9-SNAPSHOT.jar" sourcepath="/Users/n.hoffmann/.m2/repository/eu/etaxonomy/cdmlib-persistence/3.0.9-SNAPSHOT/cdmlib-persistence-3.0.9-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.0.9-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.0.9-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.0.9-SNAPSHOT.jar"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry exported="true" kind="lib" path="lib/activation-1.1.jar" sourcepath="lib/activation-1.1src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/antlr-2.7.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/aopalliance-1.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/asm-attrs.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/asm.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/aspectjrt-1.6.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/aspectjweaver-1.6.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/avalon-framework-4.2.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/batik-all-1.7.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/c3p0-0.9.1.jar" sourcepath="lib/c3p0-0.9.1src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/cglib-2.1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.7.0.jar" sourcepath="lib/commons-beanutils-1.7.0src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.jar" sourcepath="lib/commons-collections-3.2src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-dbcp-1.2.2.jar" sourcepath="lib/commons-dbcp-1.2.2src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-io-1.4.jar" sourcepath="lib/commons-io-1.4src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-lang-2.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.0.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-pool-1.3.jar" sourcepath="lib/commons-pool-1.3src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/dozer-5.3.0.jar" sourcepath="lib/dozer-5.3.0src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/ehcache-1.2.3.jar" sourcepath="lib/ehcache-1.2.3src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/ejb3-persistence.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/ezmorph-1.0.4.jar" sourcepath="lib/ezmorph-1.0.4src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/fop.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/google-api-translate-java-0.92.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/h2-1.1.115.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-annotations-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-annotations-3.4.0-SNAPSHOTsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-commons-annotations-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-commons-annotations-3.4.0-SNAPSHOTsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-core-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-core-3.4.0-SNAPSHOTsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-3.4.0-SNAPSHOT.jar" sourcepath="lib/hibernate-envers-3.4.0-SNAPSHOTsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-search-3.1.0.GA.jar" sourcepath="lib/hibernate-search-3.1.0.GAsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-tools-3.2.0.ga.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-4.0.0.CR1.jar" sourcepath="lib/hibernate-validator-4.0.0.CR1src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/hsqldb.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/httpclient-4.0.1.jar" sourcepath="lib/httpclient-4.0.1src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/httpcore-4.0.1.jar" sourcepath="lib/httpcore-4.0.1src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/javassist.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-api-2.1.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxb-impl-2.1.6.jar" sourcepath="lib/jaxb-impl-2.1.6src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/jaxen-1.1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jdbc-1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jdbc2_0-stdext.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jdom.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/joda-time-1.5.jar" sourcepath="lib/joda-time-1.5src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/joda-time-hibernate-1.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/json-lib-2.2.3-jdk15.jar" sourcepath="lib/json-lib-2.2.3-jdk15src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/jsr250-api-1.0.jar" sourcepath="lib/jsr250-api-1.0src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/jta.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jtds-1.2.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/junit-4.8.1.jar" sourcepath="lib/junit-4.8.1src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.14.jar" sourcepath="lib/log4j-1.2.14src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/lsid-client-1.1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lsid-server-1.1.2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-core-2.4.0.jar" sourcepath="lib/lucene-core-2.4.0src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/lucene-spellchecker-2.4.0.jar" sourcepath="lib/lucene-spellchecker-2.4.0src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/mail-1.4.jar" sourcepath="lib/mail-1.4src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/msbase-2000.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/mssqlserver-2000.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/msutil-2000.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-5.0.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/odfdom-0.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/opencsv-1.8.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.apache.commons.codec-1.3.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.eclipse.equinox.common-3.6.0.v20100503.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.eclipse.osgi-3.6.2.R36x_v20110210.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aop-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.aop-3.0.4.RELEASEsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.asm-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.asm-3.0.4.RELEASEsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.aspects-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.aspects-3.0.4.RELEASEsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.beans-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.beans-3.0.4.RELEASEsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.context-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.context-3.0.4.RELEASEsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.context.support-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.context.support-3.0.4.RELEASEsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.core-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.core-3.0.4.RELEASEsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.expression-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.expression-3.0.4.RELEASEsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.jdbc-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.jdbc-3.0.4.RELEASEsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.orm-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.orm-3.0.4.RELEASEsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.oxm-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.oxm-3.0.4.RELEASEsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.transaction-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.transaction-3.0.4.RELEASEsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.web-3.0.4.RELEASEsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.springframework.web.servlet-3.0.4.RELEASE.jar" sourcepath="lib/org.springframework.web.servlet-3.0.4.RELEASEsrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/poi-3.1-FINAL.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/postgresql-8.2-504.jdbc4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/sanselan-0.97-incubator.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/saxon9he.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/serializer-2.7.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/servlet-2.5.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/servlet-api-2.5.jar" sourcepath="lib/servlet-api-2.5src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.5.2.jar" sourcepath="lib/slf4j-api-1.5.2src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/slf4j-log4j12-1.5.2.jar" sourcepath="lib/slf4j-log4j12-1.5.2src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-modules-cache-0.7.jar" sourcepath="lib/spring-modules-cache-0.7src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-modules-lucene-0.8a.jar" sourcepath="lib/spring-modules-lucene-0.8asrc.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-security-config-3.0.5.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/spring-security-core-3.0.5.RELEASE.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/wsdl4j-1.6.1.jar" sourcepath="lib/wsdl4j-1.6.1src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/xalan-2.7.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xercesImpl-2.7.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xercesImpl.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xml-apis-1.3.04.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xml-apis-ext-1.3.04.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xml-apis.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xml-resolver-1.2.jar" sourcepath="lib/xml-resolver-1.2src.zip"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlgraphics-commons-1.3.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xom-1.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xsltc.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xstream-1.3.1.jar" sourcepath="lib/xstream-1.3.1src.zip"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
index 3af41c70a28571ea44b7b78455c303856f6d9d48..1873366cdef8130adf573a0146428e5f4acfa01c 100644 (file)
@@ -875,12 +875,11 @@ Bundle-ClassPath: .,
  lib/xom-1.0.jar,
  lib/xsltc.jar,
  lib/xstream-1.3.1.jar,
- lib/yjp-controller-api-redist-8.0.1.jar,
- lib/cdmlib-commons-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-ext-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-io-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-model-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-persistence-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-print-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-remote-3.0.8-SNAPSHOT.jar,
- lib/cdmlib-services-3.0.8-SNAPSHOT.jar
+ lib/cdmlib-commons-3.0.9-SNAPSHOT.jar,
+ lib/cdmlib-ext-3.0.9-SNAPSHOT.jar,
+ lib/cdmlib-io-3.0.9-SNAPSHOT.jar,
+ lib/cdmlib-model-3.0.9-SNAPSHOT.jar,
+ lib/cdmlib-persistence-3.0.9-SNAPSHOT.jar,
+ lib/cdmlib-print-3.0.9-SNAPSHOT.jar,
+ lib/cdmlib-remote-3.0.9-SNAPSHOT.jar,
+ lib/cdmlib-services-3.0.9-SNAPSHOT.jar
index 615794618dc958d2855866b14cca0e4f655f3380..055ad2e2ae0f29ad5eaea51c5fa0d3035dfeb61f 100644 (file)
@@ -122,15 +122,14 @@ bin.includes = META-INF/,\
                lib/xom-1.0.jar,\\r
                lib/xsltc.jar,\\r
                lib/xstream-1.3.1.jar,\\r
-               lib/yjp-controller-api-redist-8.0.1.jar,\\r
-               lib/cdmlib-commons-3.0.8-SNAPSHOT.jar,\\r
-               lib/cdmlib-ext-3.0.8-SNAPSHOT.jar,\\r
-               lib/cdmlib-io-3.0.8-SNAPSHOT.jar,\\r
-               lib/cdmlib-model-3.0.8-SNAPSHOT.jar,\\r
-               lib/cdmlib-persistence-3.0.8-SNAPSHOT.jar,\\r
-               lib/cdmlib-print-3.0.8-SNAPSHOT.jar,\\r
-               lib/cdmlib-remote-3.0.8-SNAPSHOT.jar,\\r
-               lib/cdmlib-services-3.0.8-SNAPSHOT.jar\r
+               lib/cdmlib-commons-3.0.9-SNAPSHOT.jar,\\r
+               lib/cdmlib-ext-3.0.9-SNAPSHOT.jar,\\r
+               lib/cdmlib-io-3.0.9-SNAPSHOT.jar,\\r
+               lib/cdmlib-model-3.0.9-SNAPSHOT.jar,\\r
+               lib/cdmlib-persistence-3.0.9-SNAPSHOT.jar,\\r
+               lib/cdmlib-print-3.0.9-SNAPSHOT.jar,\\r
+               lib/cdmlib-remote-3.0.9-SNAPSHOT.jar,\\r
+               lib/cdmlib-services-3.0.9-SNAPSHOT.jar\r
 jars.compile.order = cdmLibrary.jar\r
 src.includes = lib/\r
 jre.compilation.profile = J2SE-1.6\r
index eba2a062e40f9a5770b655672d0611ea9584f4ad..b243adfdd15642037e7f8ff6c622882796f153d7 100644 (file)
@@ -43,5 +43,16 @@ public interface IMultiPageTaxonEditorPage extends IEditorPart {
         * @return a boolean.
         */
        public boolean isRedrawing();
+
+       /**
+        * 
+        * @param enabled
+        */
+       public void setEnabled(boolean enabled);
+
+       /**
+        * 
+        */
+       void setDisabled();
        
 }
index 7725380804b367cb7985b5598d9c0d2eb5583d41..3621107b92f8835dcc57daad413901f9e5de1522 100644 (file)
@@ -17,6 +17,7 @@ import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.commands.operations.UndoContext;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IEditorSite;
@@ -132,12 +133,24 @@ public class MultiPageTaxonEditor extends FormEditor implements IConversationEna
                        
                        this.setDirty(false);
                        monitor.worked(1);
+               }catch(Exception e){
+                       EditorUtil.errorDialog("An error occurred while saving", getClass(), "An error occurred while saving the editor. Please close and reopen the taxon again.", e);
+                       disableEditor();
                }finally{
                        monitor.done();
                }
        }
 
 
+       private void disableEditor() {
+               for(IMultiPageTaxonEditorPage editorPage : getPages()){
+                       editorPage.setDisabled();
+               }
+               setDirty(false);
+               getSite().getSelectionProvider().setSelection(new StructuredSelection());
+               getSite().setSelectionProvider(null);
+       }
+
        private void setDirty(boolean dirty) {
                this.dirty = dirty;
                firePropertyChange(PROP_DIRTY);
index 4af6db9b54fbf20ca5c15591f9544ea9a9fe2808..31ac83f1e1aa1e68529bb651acdc6b9d4a352334 100644 (file)
@@ -56,8 +56,9 @@ public class SimpleSelectionProvider implements ISelectionProvider {
         * @return a {@link org.eclipse.jface.viewers.ISelection} object.
         */
        public ISelection getSelection() {
-               if (selection != null)
+               if (selection != null){
                        return selection;
+               }
                // TODO we have to return an empty selection to avoid NPE
                // I don't really understand why this was not the case before
                return new StructuredSelection();
index 37b99454db074d2f364026a7a36dc14884051b3c..8499008725edae40d637ca4521f0d6e9b621a89a 100644 (file)
@@ -21,12 +21,16 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.SWT;
 import org.eclipse.swt.dnd.DND;
 import org.eclipse.swt.dnd.DropTarget;
 import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorSite;
@@ -94,7 +98,7 @@ public class TaxonNameEditor extends EditorPart implements
        private ManagedForm managedForm;
        private ScrolledForm scrolledForm;
        private Composite parent;
-       private ISelectionProvider provider;
+       private ISelectionProvider selectionProvider;
 
        private final MultiPageTaxonEditor editor;
 
@@ -186,7 +190,7 @@ public class TaxonNameEditor extends EditorPart implements
                        public boolean setInput(Object input) {
                                if (input instanceof AbstractGroupedContainer) {
                                        selection = ((AbstractGroupedContainer) input).getData();
-                                       provider.setSelection(new StructuredSelection(selection));
+                                       getSite().getSelectionProvider().setSelection(new StructuredSelection(selection));
                                }
                                return super.setInput(input);
                        }
@@ -489,8 +493,8 @@ public class TaxonNameEditor extends EditorPart implements
                setSite(site);
                setInput(input);
 
-               provider = new SimpleSelectionProvider();
-               getSite().setSelectionProvider(provider);
+               selectionProvider = new SimpleSelectionProvider();
+               getSite().setSelectionProvider(selectionProvider);
        }
 
        /**
@@ -891,4 +895,59 @@ public class TaxonNameEditor extends EditorPart implements
                }
                return getAcceptedNameContainer();
        }
+
+       @Override
+       public void setDisabled(){
+               setEnabled(false);
+               
+               // coloring the widgets
+               
+               // TODO move this to resources and make configurable via Preferences
+               Color disabledColor = Display.getDefault().getSystemColor(SWT.COLOR_RED);
+               
+               for(AbstractGroupedContainer groupedContainer : getGroupedContainers()){
+                       groupedContainer.setBackground(disabledColor);
+               }
+               getControl().setBackground(disabledColor);
+       }
+       
+       @Override
+       public void setEnabled(boolean enabled) {
+               for(AbstractGroupedContainer groupedContainer : getGroupedContainers()){
+                       groupedContainer.setEnabled(getManagedForm().setInput(selection));
+               }
+               
+               // send an empty selection to the current provider
+               selectionProvider.setSelection(new StructuredSelection());
+               
+               // decide on the new selection provider
+               
+               ISelectionProvider newSelectionProvider = enabled ? selectionProvider : new ISelectionProvider() {
+                       
+                       @Override
+                       public void setSelection(ISelection selection) {
+                               
+                       }
+                       
+                       @Override
+                       public void removeSelectionChangedListener(
+                                       ISelectionChangedListener listener) {
+                               
+                       }
+                       
+                       @Override
+                       public ISelection getSelection() {
+                               return null;
+                       }
+                       
+                       @Override
+                       public void addSelectionChangedListener(ISelectionChangedListener listener) {
+                               
+                       }
+               };
+               
+               getSite().setSelectionProvider(newSelectionProvider);
+               
+               System.out.println("SELECTION PROVIDER" + getSite().getSelectionProvider());
+       }
 }
index 23c64f27ca3e9fea18dc53e337d9a43909e8ae09..1dc71498542c09b5686e4b4dd157873c21fa1277 100644 (file)
@@ -67,44 +67,46 @@ import eu.etaxonomy.taxeditor.parser.ParseHandler;
 import eu.etaxonomy.taxeditor.preference.Resources;
 
 /**
- * Formats <code>GroupedComposite</code> with cosmetic and layout properties specific to the
- * Editor. This should be used to maintain a consistent look and feel for all Editor
- * freetext area components, such as DescriptionElementComposite.
+ * Formats <code>GroupedComposite</code> with cosmetic and layout properties
+ * specific to the Editor. This should be used to maintain a consistent look and
+ * feel for all Editor freetext area components, such as
+ * DescriptionElementComposite.
  * <p>
- * Requires an <code>IManagedForm</code>, whose <code>input</code> is set to the contents
- * of {@link #getData()} when the <code>GroupedComposite</code> gets focus, i.e. to
- * populate the property sheet with the data.
+ * Requires an <code>IManagedForm</code>, whose <code>input</code> is set to the
+ * contents of {@link #getData()} when the <code>GroupedComposite</code> gets
+ * focus, i.e. to populate the property sheet with the data.
  * </p>
  * <p>
- * The <code>IManagedForm</code> is also required to have a <code>Taxon</code> in its
- * own <code>getData()</code>.
+ * The <code>IManagedForm</code> is also required to have a <code>Taxon</code>
+ * in its own <code>getData()</code>.
  * </p>
  * <p>
- * The <code>IManagedForm</code> can also used for drawing borders by calling the method
- * <code>createBorderSupport()</code>.
+ * The <code>IManagedForm</code> can also used for drawing borders by calling
+ * the method <code>createBorderSupport()</code>.
  * </p>
- *
+ * 
  * @author p.ciardelli
  * @author n.hoffmann
  * @created 02.06.2008
  * @version 1.0
  */
-abstract public class AbstractGroupedContainer<T extends TaxonBase> implements IFormPart, IContainerConstants, IElementHasDetails {    
+abstract public class AbstractGroupedContainer<T extends TaxonBase> implements
+               IFormPart, IContainerConstants, IElementHasDetails {
 
        protected ParseHandler parseHandler;
-       
+
        private FocusListener nameCompositeFocusListener;
        private ModifyListener nameCompositeModifyListener;
 
        protected NameViewer nameViewer;
-       
+
        private AbstractGroup group;
-       
+
        private Label nonEditableInfoLabel;
        private DefaultToolTip nonEditableInfoHover;
-       
+
        private static AbstractGroupedContainer selection;
-       
+
        private FocusListener focusListener;
        private LineBreakListener lineBreakListener;
 
@@ -114,108 +116,126 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
 
        private Color backgroundColor;
        private boolean isDirty;
-       
-       
+
        /**
-        * <p>Constructor for AbstractGroupedContainer.</p>
-        *
-        * @param editor a {@link eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor} object.
-        * @param group a {@link eu.etaxonomy.taxeditor.editor.name.container.AbstractGroup} object.
-        * @param taxonBase a T object.
-        * @param <T> a T object.
+        * <p>
+        * Constructor for AbstractGroupedContainer.
+        * </p>
+        * 
+        * @param editor
+        *            a {@link eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor}
+        *            object.
+        * @param group
+        *            a
+        *            {@link eu.etaxonomy.taxeditor.editor.name.container.AbstractGroup}
+        *            object.
+        * @param taxonBase
+        *            a T object.
+        * @param <T>
+        *            a T object.
         */
-       public AbstractGroupedContainer(T taxonBase){
+       public AbstractGroupedContainer(T taxonBase) {
                setData(taxonBase);
                parseHandler = ParseHandler.NewInstance(taxonBase.getName());
        }
-       
-       public void createContent(){
+
+       public void createContent() {
                createControl();
-               
+
                createTextViewer();
                createLineWrapSupport();
                createLineBreakListener();
 
                setMenu(getEditor().getMenu());
-               
-               setDraggableControl(new Control[]{getControl(), getNameViewer().getRulerControl()});
-               
+
+               setDraggableControl(new Control[] { getControl(),
+                               getNameViewer().getRulerControl() });
+
                createEmptyViewerPrompt(EMPTY_NAME_PROMPT);
-               
-               
+
                initializeComposite();
-               
+
                createListener();
 
-               isFreeTextEnabled();
+               enableFreeText();
        }
 
-       
-       
        /**
-        * <p>createListener</p>
+        * <p>
+        * createListener
+        * </p>
         */
-       protected void createListener(){
-               nameCompositeModifyListener = new ModifyListener(){
-                       
+       protected void createListener() {
+               nameCompositeModifyListener = new ModifyListener() {
+
                        public void modifyText(ModifyEvent e) {
                                // mark the composite dirty
                                setDirty(true);
                                // parse the text
                                String text = nameViewer.getTextWidget().getText();
-                               
+
                                NonViralName name = parseHandler.parse(text);
                                getTaxonBase().setName(name);
                                getTaxonBase().setTitleCache((getTaxonBase().generateTitle()));
-                               
+
                                // show errors resulting from parsing
                                calculateAnnotations();
-                               // store the position of the cursor                             
+                               // store the position of the cursor
                                storeCursor();
                                // notify selection listener
                                setDelayedSelection();
                        }
                };
-               nameCompositeFocusListener = new FocusAdapter(){
-
-                       /* (non-Javadoc)
-                        * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+               nameCompositeFocusListener = new FocusAdapter() {
+
+                       /*
+                        * (non-Javadoc)
+                        * 
+                        * @see
+                        * org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt
+                        * .events.FocusEvent)
                         */
                        @Override
                        public void focusLost(FocusEvent e) {
                                super.focusLost(e);
 
                                persistName();
-                       }               
+                       }
                };
-               
+
                addListener();
        }
-       
-       private void addListener(){
-               getNameViewer().getTextWidget().addModifyListener(nameCompositeModifyListener);
-               getNameViewer().getTextWidget().addFocusListener(nameCompositeFocusListener);
+
+       private void addListener() {
+               getNameViewer().getTextWidget().addModifyListener(
+                               nameCompositeModifyListener);
+               getNameViewer().getTextWidget().addFocusListener(
+                               nameCompositeFocusListener);
        }
-       
-       private void removeListener(){
-               getNameViewer().getTextWidget().removeModifyListener(nameCompositeModifyListener);
-               getNameViewer().getTextWidget().removeFocusListener(nameCompositeFocusListener);
+
+       private void removeListener() {
+               getNameViewer().getTextWidget().removeModifyListener(
+                               nameCompositeModifyListener);
+               getNameViewer().getTextWidget().removeFocusListener(
+                               nameCompositeFocusListener);
        }
-               
+
        /**
         * Initialize the composite specific code
         */
        protected abstract void initializeComposite();
-       
+
        /**
-        * <p>getEmptyTextPrompt</p>
-        *
+        * <p>
+        * getEmptyTextPrompt
+        * </p>
+        * 
         * @return a {@link java.lang.String} object.
         */
        protected String getEmptyTextPrompt() {
                return EMPTY_NAME_PROMPT;
        }
-       
+
        /**
         * 
         */
@@ -224,45 +244,49 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
                if (name == null) {
                        return;
                }
-               
-               ILabelImageStrategy strategy = LabelImageProvider.getLabelStrategy(name);
+
+               ILabelImageStrategy strategy = LabelImageProvider
+                               .getLabelStrategy(name);
                LabelImageProvider labelProvider = new LabelImageProvider(strategy);
-               
+
                Set<NameRelationship> nameRelations = name.getNameRelations();
                if (nameRelations.size() == 0) {
                        return;
                }
-//             for (NameRelationship nameRelation : nameRelations) {
-//                     String typeLabel = null;
-//                     TaxonNameBase<?, ?> relatedName = null; 
-//
-//                     if (name.equals(nameRelation.getFromName())) {
-//                             typeLabel = labelProvider.getNameRelationTypeLabel( 
-//                                                             nameRelation.getType());
-//                             relatedName = nameRelation.getToName();
-//                     } else {
-//                             typeLabel = labelProvider.getNameRelationTypeInverseLabel( 
-//                                                             nameRelation.getType());
-//                             relatedName = nameRelation.getFromName();
-//                     }
-//                     
-//                     setNonEditableInfo(typeLabel + " " + NameHelper.getDisplayName(relatedName));
-//             }
-       }
-               
+               // for (NameRelationship nameRelation : nameRelations) {
+               // String typeLabel = null;
+               // TaxonNameBase<?, ?> relatedName = null;
+               //
+               // if (name.equals(nameRelation.getFromName())) {
+               // typeLabel = labelProvider.getNameRelationTypeLabel(
+               // nameRelation.getType());
+               // relatedName = nameRelation.getToName();
+               // } else {
+               // typeLabel = labelProvider.getNameRelationTypeInverseLabel(
+               // nameRelation.getType());
+               // relatedName = nameRelation.getFromName();
+               // }
+               //
+               // setNonEditableInfo(typeLabel + " " +
+               // NameHelper.getDisplayName(relatedName));
+               // }
+       }
+
        /**
-        * <p>initTextViewer</p>
+        * <p>
+        * initTextViewer
+        * </p>
         */
        protected void initTextViewer() {
-               
-//             showNameRelations();
-               
+
+               // showNameRelations();
+
                updateIndent();
-               
+
                updateIcon();
-               
+
                String text = NameHelper.getDisplayNameWithRef(getData());
-               
+
                if (text.length() == 0) {
                        initEmptyText();
                } else {
@@ -271,9 +295,11 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
                }
                calculateAnnotations();
        }
-       
+
        /**
-        * <p>calculateErrors</p>
+        * <p>
+        * calculateErrors
+        * </p>
         */
        synchronized protected void calculateAnnotations() {
                getNameViewer().clearAnnotations();
@@ -284,21 +310,25 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
         * 
         */
        public void showAnnotations() {
-               
-               if(getName().hasProblem()){
+
+               if (getName().hasProblem()) {
                        showParsingProblems();
                }
-               
-               if(!isNameParsable()){
-                       getNameViewer().addAnnotation(
-                                       new EditorAnnotation(EditorAnnotationType.WARNING, 0, "This name may only be edited in the details view."));
+
+               if (!isNameParsable()) {
+                       getNameViewer()
+                                       .addAnnotation(
+                                                       new EditorAnnotation(EditorAnnotationType.WARNING,
+                                                                       0,
+                                                                       "This name may only be edited in the details view."));
                }
-               
-               if(isNameUsedMultipleTimes()){
-                       getNameViewer().addAnnotation(new EditorAnnotation(EditorAnnotationType.WARNING, 0, "This taxons name is used multiple times."));
+
+               if (isNameUsedMultipleTimes()) {
+                       getNameViewer().addAnnotation(
+                                       new EditorAnnotation(EditorAnnotationType.WARNING, 0,
+                                                       "This taxons name is used multiple times."));
                }
-               
-               
+
        }
 
        /**
@@ -306,78 +336,84 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
         */
        private void showParsingProblems() {
                String text = getNameViewer().getTextWidget().getText();
-               
+
                List<ParserProblem> parsingProblems = getName().getParsingProblems();
-               
+
                for (ParserProblem problem : parsingProblems) {
-                       getNameViewer().addAnnotation(new EditorAnnotation(problem), getParsingProblemPosition());
-               }       
+                       getNameViewer().addAnnotation(new EditorAnnotation(problem),
+                                       getParsingProblemPosition());
+               }
        }
-       
-       private Position getParsingProblemPosition(){
+
+       private Position getParsingProblemPosition() {
                String text = getNameViewer().getTextWidget().getText();
-               
+
                if (getName().hasProblem() && text.length() > 0) {
                        int start = getName().getProblemStarts();
                        int length = getName().getProblemEnds() - start;
-                       
+
                        if (start == -1 || getName().getProblemEnds() == -1) {
                                return null;
                        }
-                       
+
                        // Don't let squigglies try to draw beyond the end of the text
                        if (text.length() < start + length) {
                                length = text.length() - start;
                        }
-                       
+
                        return new Position(start, length);
                }
                return null;
        }
 
        /**
-        * <p>handleSplitText</p>
-        *
-        * @param text a {@link java.lang.String} object.
+        * <p>
+        * handleSplitText
+        * </p>
+        * 
+        * @param text
+        *            a {@link java.lang.String} object.
         */
        protected void handleSplitText(String text) {
                // Create a synonym in a new homotypic group using text as name
-               TaxonNameBase synonymName = ParseHandler.parseReferencedName(text, null);
-               
-               EditorUtil.executeOperation(new CreateSynonymInNewGroupOperation
-                               ("New Heterotypic Synonym", getEditor().getUndoContext(), getEditor().getTaxon(), synonymName, getEditor()));
+               TaxonNameBase synonymName = ParseHandler
+                               .parseReferencedName(text, null);
+
+               EditorUtil.executeOperation(new CreateSynonymInNewGroupOperation(
+                               "New Heterotypic Synonym", getEditor().getUndoContext(),
+                               getEditor().getTaxon(), synonymName, getEditor()));
        }
 
        /**
         * Refreshes the display with latest data from the model.
-        *
+        * 
         * Note: Will not parse the text and not calculate errors!
         */
        public void refresh() {
-//             showNameRelations();
-               
+               // showNameRelations();
+
                String text = NameHelper.getDisplayNameWithRef(getTaxonBase());
-               
-               if(getNameViewer().getTextWidget() == null){
+
+               if (getNameViewer().getTextWidget() == null) {
                        // we might get here via dnd. Look slike it can be ignored
                        return;
                }
-               
+
                if (text.length() == 0) {
                        initEmptyText();
-               } else if(! getNameViewer().getTextWidget().getText().equals(text)) {
+               } else if (!getNameViewer().getTextWidget().getText().equals(text)) {
                        removeListener();
                        getNameViewer().getTextWidget().setText(text);
                        addListener();
                }
-               
+
                updateNonEditableInfo();
-               
+
                updateIcon();
-//             placeCursor();
+               // placeCursor();
                updateIndent();
-               
-               isFreeTextEnabled();
+
+               enableFreeText();
        }
 
        /**
@@ -385,77 +421,65 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
         */
        protected abstract void updateIcon();
 
-       
        protected abstract void updateIndent();
 
-
        /**
-        * <p>updateNonEditableInfo</p>
+        * <p>
+        * updateNonEditableInfo
+        * </p>
         */
        protected abstract void updateNonEditableInfo();
-       
+
        /**
         * 
         */
-       private void isFreeTextEnabled() {
-               // Decide whether editing of freetext is allowed or not.
-               if (freetextEditingAllowed()) {
-                       
-                       // set editable
-                       getNameViewer().getTextWidget().setEditable(true);
-                       
-                       // restore foreground font color again
-                       getNameViewer().getTextWidget().setForeground(control.getForeground());
-               } else {
-                       // set non-editable
-                       getNameViewer().getTextWidget().setEditable(false);
-                       
-                       // grey out text as a non-editable indicator
-                       getNameViewer().getTextWidget().setForeground(EditorUtil.getColor(Resources.COLOR_DISABLED_EDITOR));
-               }
+       private void enableFreeText() {
+               setEnabled(isFreetextEditingAllowed());
        }
-       
 
        /**
-        * Checks whether the freetext should be editable based on specific empty fields.
+        * Checks whether the freetext should be editable based on specific empty
+        * fields.
+        * 
         * @return
         */
-       private boolean freetextEditingAllowed() {
-               NonViralName name = (NonViralName) HibernateProxyHelper.deproxy(getName());
+       private boolean isFreetextEditingAllowed() {
+               NonViralName name = (NonViralName) HibernateProxyHelper
+                               .deproxy(getName());
                boolean enableFreetext = true;
 
                enableFreetext |= isNameUsedMultipleTimes();
                enableFreetext &= isNameParsable();
-               
+
                return enableFreetext;
        }
-       
-       private boolean isNameUsedMultipleTimes(){
-               if(getName().getTaxonBases().size() > 1){
+
+       private boolean isNameUsedMultipleTimes() {
+               if (getName().getTaxonBases().size() > 1) {
                        return true;
                }
                return false;
        }
-       
-       private boolean isNameParsable(){
+
+       private boolean isNameParsable() {
                TaxonNameBase name = getName();
-               
-               boolean isParsable = true; 
-               isParsable &= CdmUtils.isEmpty(name.getAppendedPhrase()); //taxonFieldsEmpty();
-               
-               if(name instanceof NonViralName){
+
+               boolean isParsable = true;
+               isParsable &= CdmUtils.isEmpty(name.getAppendedPhrase()); // taxonFieldsEmpty();
+
+               if (name instanceof NonViralName) {
                        NonViralName nonViralName = (NonViralName) name;
-                       isParsable &= ! nonViralName.isProtectedAuthorshipCache();
-                       isParsable &= ! nonViralName.isProtectedNameCache();
+                       isParsable &= !nonViralName.isProtectedAuthorshipCache();
+                       isParsable &= !nonViralName.isProtectedNameCache();
                }
-               
+
                return isParsable;
        }
 
        /**
         * Parse the text and calculate errors
         */
-       public void parseAndCalculateAnnotations(){
+       public void parseAndCalculateAnnotations() {
                removeListener();
                String unparsedNameString = getNameViewer().getTextWidget().getText();
                parseHandler.parse(unparsedNameString);
@@ -464,96 +488,114 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
        }
 
        /**
-        * <p>getTaxonBase</p>
-        *
+        * <p>
+        * getTaxonBase
+        * </p>
+        * 
         * @return the taxonBase
         */
        public T getTaxonBase() {
                return getData();
        }
-       
+
        /**
-        * <p>getName</p>
-        *
+        * <p>
+        * getName
+        * </p>
+        * 
         * @return a {@link eu.etaxonomy.cdm.model.name.TaxonNameBase} object.
         */
-       public TaxonNameBase getName(){
-               return (TaxonNameBase) HibernateProxyHelper.deproxy(getTaxonBase().getName());
+       public TaxonNameBase getName() {
+               return (TaxonNameBase) HibernateProxyHelper.deproxy(getTaxonBase()
+                               .getName());
        }
 
        /**
-        * <p>persistName</p>
+        * <p>
+        * persistName
+        * </p>
         */
-       public void persistName(){
-               if(isDirty()){
+       public void persistName() {
+               if (isDirty()) {
                        getNameViewer().getTextWidget().setEnabled(false);
-                       final String unparsedNameString = getNameViewer().getTextWidget().getText();
-//                     Job job = new Job("Persisting Name"){
-//
-//                             @Override
-//                             protected IStatus run(IProgressMonitor monitor) {
-//                                     
-                                       final NonViralName name = parseHandler.parseAndResolveDuplicates(unparsedNameString);
-//                                     
-//                                     Display.getDefault().asyncExec(new Runnable(){
-//                                             public void run() {
-                                                       getTaxonBase().setName(name);
-                                                       getTaxonBase().setTitleCache((getTaxonBase().generateTitle()));
-                                                       setDirty(false);
-                                                       getNameViewer().getTextWidget().setEnabled(true);                                                       
-//                                             };
-//                                     });
-//                                     
-//                                     
-//                                     return Status.OK_STATUS;
-//                             }
-//                             
-//                     };
-//                     
-//                     job.setPriority(Job.DECORATE);
-//                     job.schedule();
+                       final String unparsedNameString = getNameViewer().getTextWidget()
+                                       .getText();
+                       // Job job = new Job("Persisting Name"){
+                       //
+                       // @Override
+                       // protected IStatus run(IProgressMonitor monitor) {
+                       //
+                       final NonViralName name = parseHandler
+                                       .parseAndResolveDuplicates(unparsedNameString);
+                       //
+                       // Display.getDefault().asyncExec(new Runnable(){
+                       // public void run() {
+                       getTaxonBase().setName(name);
+                       getTaxonBase().setTitleCache((getTaxonBase().generateTitle()));
+                       setDirty(false);
+                       getNameViewer().getTextWidget().setEnabled(true);
+                       // };
+                       // });
+                       //
+                       //
+                       // return Status.OK_STATUS;
+                       // }
+                       //
+                       // };
+                       //
+                       // job.setPriority(Job.DECORATE);
+                       // job.schedule();
                }
        }
-       
+
        /**
-        * <p>Getter for the field <code>group</code>.</p>
-        *
-        * @return a {@link eu.etaxonomy.taxeditor.editor.name.container.AbstractGroup} object.
+        * <p>
+        * Getter for the field <code>group</code>.
+        * </p>
+        * 
+        * @return a
+        *         {@link eu.etaxonomy.taxeditor.editor.name.container.AbstractGroup}
+        *         object.
         */
-       public AbstractGroup getGroup(){
-               if(group == null){
+       public AbstractGroup getGroup() {
+               if (group == null) {
                        throw new IllegalStateException("Group shall not be null.");
                }
                return group;
        }
-       
+
        /**
-        * <p>remove</p>
+        * <p>
+        * remove
+        * </p>
         */
-       public void remove(){
+       public void remove() {
                getGroup().remove(this);
        }
-               
+
        /**
-        * <p>createControl</p>
+        * <p>
+        * createControl
+        * </p>
         */
        protected void createControl() {
-               control = getEditor().getToolkit().createComposite(getGroup().getControl());
-               
+               control = getEditor().getToolkit().createComposite(
+                               getGroup().getControl());
+
                control.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
                TableWrapLayout layout = new TableWrapLayout();
                layout.leftMargin = 0;
                layout.rightMargin = 0;
                layout.topMargin = 5;
                layout.bottomMargin = 5;
-               
+
                layout.verticalSpacing = 0;
                layout.horizontalSpacing = 0;
-               
+
                control.setLayout(layout);
-               
+
        }
-       
+
        /**
         * @return
         */
@@ -562,42 +604,52 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
        }
 
        /**
-        * <p>Getter for the field <code>control</code>.</p>
-        *
+        * <p>
+        * Getter for the field <code>control</code>.
+        * </p>
+        * 
         * @return a {@link org.eclipse.swt.widgets.Composite} object.
         */
-       public Composite getControl(){
+       public Composite getControl() {
                return control;
        }
-       
+
        /**
-        * <p>createLineWrapSupport</p>
+        * <p>
+        * createLineWrapSupport
+        * </p>
         */
        protected void createLineWrapSupport() {
                new LineWrapSupport(getNameViewer(), getEditor().getManagedForm());
        }
-       
-       
+
        /**
-        * <p>createTextViewer</p>
+        * <p>
+        * createTextViewer
+        * </p>
         */
        protected void createTextViewer() {
                nameViewer = new NameViewer(control);
-               
+
                focusListener = new FocusAdapter() {
                        @Override
                        public void focusGained(FocusEvent e) {
-                               for(AbstractGroupedContainer container : getEditor().getGroupedContainers()){
+                               if(!enabled){
+                                       return;
+                               }
+                               for (AbstractGroupedContainer container : getEditor()
+                                               .getGroupedContainers()) {
                                        container.colorSelected(NOT_SELECTED);
                                }
-                               getEditor().getManagedForm().setInput(AbstractGroupedContainer.this);
+                               getEditor().getManagedForm().setInput(
+                                               AbstractGroupedContainer.this);
                                placeCursor();
                                colorSelected(SELECTED_FOCUS);
                        }
                };
                nameViewer.getTextWidget().addFocusListener(focusListener);
-               
-//             
+
+               //
                MouseAdapter mouseListener = new MouseAdapter() {
                        @Override
                        public void mouseDown(MouseEvent e) {
@@ -608,20 +660,26 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
                nameViewer.getRulerControl().addMouseListener(mouseListener);
                nameViewer.getTextWidget().addMouseListener(mouseListener);
        }
-       
+
        /**
-        * <p>setIcon</p>
-        *
-        * @param icon a {@link org.eclipse.swt.graphics.Image} object.
+        * <p>
+        * setIcon
+        * </p>
+        * 
+        * @param icon
+        *            a {@link org.eclipse.swt.graphics.Image} object.
         */
        public void setIcon(Image icon) {
                getNameViewer().setIcon(icon);
        }
-       
+
        /**
-        * <p>setIndent</p>
-        *
-        * @param indent a int.
+        * <p>
+        * setIndent
+        * </p>
+        * 
+        * @param indent
+        *            a int.
         */
        public void setIndent(int indent) {
                if (control.getLayout() instanceof TableWrapLayout) {
@@ -631,36 +689,44 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
                        control.setLayout(layout);
                        control.layout();
                } else {
-                       new RuntimeException("Couldn't indent - composite's layout must be TableWrapLayout.");
+                       new RuntimeException(
+                                       "Couldn't indent - composite's layout must be TableWrapLayout.");
                }
-       }       
-       
+       }
+
        /**
-        * <p>setSelected</p>
+        * <p>
+        * setSelected
+        * </p>
         */
        public void setSelected() {
                getNameViewer().getTextWidget().setFocus();
        }
-       
+
        /**
-        * <p>isSelected</p>
-        *
+        * <p>
+        * isSelected
+        * </p>
+        * 
         * @return a boolean.
         */
-       public boolean isSelected(){
+       public boolean isSelected() {
                return getEditor().getSelectedContainer() == this;
        }
-       
+
        /**
-        * <p>colorSelected</p>
-        *
-        * @param mode a int.
+        * <p>
+        * colorSelected
+        * </p>
+        * 
+        * @param mode
+        *            a int.
         */
-       public void colorSelected(int mode){
-               if(!control.isDisposed()){
+       public void colorSelected(int mode) {
+               if (!control.isDisposed()) {
                        String colorString = null;
-                       
-                       switch(mode){
+
+                       switch (mode) {
                        case SELECTED_FOCUS:
                                colorString = Resources.COLOR_CONTROL_SELECTED_FOCUS;
                                break;
@@ -670,91 +736,107 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
                        default:
                                colorString = Resources.COLOR_COMPOSITE_BACKGROUND;
                        }
-                       
+
                        backgroundColor = EditorUtil.getColor(colorString);
-                       
+
                        setBackground(backgroundColor);
                }
        }
 
-       
        /**
-        * <p>setDelayedSelection</p>
+        * <p>
+        * setDelayedSelection
+        * </p>
         */
-       protected void setDelayedSelection(){
-               //TODO this might be done better
-               // this is the quickest solution i could come up with and it improves performance
+       protected void setDelayedSelection() {
+               // TODO this might be done better
+               // this is the quickest solution i could come up with and it improves
+               // performance
                // please reimplement if you know better.
                selection = this;
-               
+
                // start timer
                Display display = Display.getCurrent();
                Runnable runnable = new Runnable() {
-                       
+
                        public void run() {
                                getEditor().getManagedForm().setInput(selection);
                        }
                };
                display.timerExec(1000, runnable);
-               
+
        }
-       
+
        /**
-        * <p>setBackground</p>
-        *
-        * @param color a {@link org.eclipse.swt.graphics.Color} object.
+        * <p>
+        * setBackground
+        * </p>
+        * 
+        * @param color
+        *            a {@link org.eclipse.swt.graphics.Color} object.
         */
        public void setBackground(Color color) {
                control.setBackground(color);
-               
-               for(Control child : control.getChildren()){
+
+               for (Control child : control.getChildren()) {
                        child.setBackground(color);
                }
-               
+
                getNameViewer().setBackground(color);
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.swt.widgets.Control#setFont(org.eclipse.swt.graphics.Font)
+       /*
+        * (non-Javadoc)
+        * 
+        * @see
+        * org.eclipse.swt.widgets.Control#setFont(org.eclipse.swt.graphics.Font)
         */
        /**
-        * <p>setFont</p>
-        *
-        * @param font a {@link org.eclipse.swt.graphics.Font} object.
+        * <p>
+        * setFont
+        * </p>
+        * 
+        * @param font
+        *            a {@link org.eclipse.swt.graphics.Font} object.
         */
        public void setFont(Font font) {
                getNameViewer().getTextWidget().setFont(font);
        }
-       
+
        /**
-        * <p>Getter for the field <code>nameViewer</code>.</p>
-        *
-        * @return a {@link eu.etaxonomy.taxeditor.editor.name.container.NameViewer} object.
+        * <p>
+        * Getter for the field <code>nameViewer</code>.
+        * </p>
+        * 
+        * @return a {@link eu.etaxonomy.taxeditor.editor.name.container.NameViewer}
+        *         object.
         */
        public NameViewer getNameViewer() {
-               if (nameViewer == null){
-                       throw new RuntimeException("The Name Viewer is corrupt for Name Container: " + getTaxonBase().getName().getTitleCache());
+               if (nameViewer == null) {
+                       throw new RuntimeException(
+                                       "The Name Viewer is corrupt for Name Container: "
+                                                       + getTaxonBase().getName().getTitleCache());
                }
                return nameViewer;
        }
-       
+
        /**
         * If <code>textViewer</code> has already been set, it will show a
-        * <code>prompt</code> along the lines of "Click here to start entering data"
-        * when empty.
-        *
-        * @param prompt a {@link java.lang.String} object.
+        * <code>prompt</code> along the lines of
+        * "Click here to start entering data" when empty.
+        * 
+        * @param prompt
+        *            a {@link java.lang.String} object.
         */
        public void createEmptyViewerPrompt(final String prompt) {
-               
+
                Assert.isNotNull(getNameViewer());
-                
+
                final StyledText textControl = getNameViewer().getTextWidget();
                final IDocument document = getNameViewer().getDocument();
-               
+
                setFocusListener(new FocusListener() {
 
-                       
                        public void focusGained(FocusEvent e) {
                                if (document.get().equals(prompt)) {
                                        textControl.setFont(getViewerFont());
@@ -762,44 +844,51 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
                                }
                        }
 
-                       
                        public void focusLost(FocusEvent e) {
                                if (document.getLength() == 0) {
                                        initEmptyText();
                                }
                        }
-                       
+
                });
                textControl.addFocusListener(getFocusListener());
-               
+
                if (document.getLength() == 0) {
-                       textControl.setFont(EditorUtil.getFont(Resources.FONT_DEFAULT_PROMPT));
+                       textControl.setFont(EditorUtil
+                                       .getFont(Resources.FONT_DEFAULT_PROMPT));
                        document.set(prompt);
                }
        }
-       
+
        /**
-        * <p>getViewerFont</p>
-        *
+        * <p>
+        * getViewerFont
+        * </p>
+        * 
         * @return a {@link org.eclipse.swt.graphics.Font} object.
         */
        abstract protected Font getViewerFont();
 
        /**
-        * <p>initEmptyText</p>
+        * <p>
+        * initEmptyText
+        * </p>
         */
        protected void initEmptyText() {
                Font defaultFont = EditorUtil.getFont(Resources.FONT_DEFAULT_PROMPT);
                getNameViewer().getTextWidget().setFont(defaultFont);
-               
+
                getNameViewer().getDocument().set(getEmptyTextPrompt());
                placeCursor();
        }
 
        /**
-        * <p>Setter for the field <code>focusListener</code>.</p>
-        *
-        * @param focusListener a {@link org.eclipse.swt.events.FocusListener} object.
+        * <p>
+        * Setter for the field <code>focusListener</code>.
+        * </p>
+        * 
+        * @param focusListener
+        *            a {@link org.eclipse.swt.events.FocusListener} object.
         */
        protected void setFocusListener(FocusListener focusListener) {
                this.focusListener = focusListener;
@@ -810,52 +899,66 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
        }
 
        /**
-        * <p>setDirty</p>
-        *
-        * @param isDirty a boolean.
+        * <p>
+        * setDirty
+        * </p>
+        * 
+        * @param isDirty
+        *            a boolean.
         */
        public void setDirty(boolean isDirty) {
-               if(isDirty){
+               if (isDirty) {
                        getEditor().getManagedForm().dirtyStateChanged();
                }
                this.isDirty = isDirty;
        }
-       
+
        /**
-        * <p>isDirty</p>
-        *
+        * <p>
+        * isDirty
+        * </p>
+        * 
         * @return a boolean.
         */
-       public boolean isDirty(){
+       public boolean isDirty() {
                return isDirty;
        }
-       
+
        /**
-        * <p>setMenu</p>
-        *
-        * @param menu a {@link org.eclipse.swt.widgets.Menu} object.
+        * <p>
+        * setMenu
+        * </p>
+        * 
+        * @param menu
+        *            a {@link org.eclipse.swt.widgets.Menu} object.
         */
-       public void setMenu (Menu menu) {
+       public void setMenu(Menu menu) {
                control.setMenu(menu);
-               
+
                getNameViewer().setMenu(menu);
        }
-       
+
        private Control[] draggableControls;
-       
+
        /**
-        * <p>setDraggableControl</p>
-        *
-        * @param controls an array of {@link org.eclipse.swt.widgets.Control} objects.
+        * <p>
+        * setDraggableControl
+        * </p>
+        * 
+        * @param controls
+        *            an array of {@link org.eclipse.swt.widgets.Control} objects.
         */
        protected void setDraggableControl(Control[] controls) {
                draggableControls = controls;
        }
-       
+
        /**
-        * <p>setIsDraggable</p>
-        *
-        * @param draggable a boolean.
+        * <p>
+        * setIsDraggable
+        * </p>
+        * 
+        * @param draggable
+        *            a boolean.
         */
        public void setIsDraggable(boolean draggable) {
 
@@ -865,26 +968,28 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
                                throw new NullPointerException(
                                                "Draggable controls must be set to add draggability");
                        }
-                       
-                       Transfer[] types = new Transfer[] { CdmDataTransfer.getInstance() };                    
+
+                       Transfer[] types = new Transfer[] { CdmDataTransfer.getInstance() };
                        int operations = DND.DROP_MOVE;
 
-                       for(Control draggableControl : draggableControls){
-                               DragSource dragSource = new DragSource(draggableControl, operations);
+                       for (Control draggableControl : draggableControls) {
+                               DragSource dragSource = new DragSource(draggableControl,
+                                               operations);
                                dragSource.setTransfer(types);
-                               
+
                                dragSource.addDragListener(new NameEditorDragListener(this));
-                               dragSource.setDragSourceEffect(new NameEditorDragSourceEffect(control));
+                               dragSource.setDragSourceEffect(new NameEditorDragSourceEffect(
+                                               control));
                        }
-               } 
+               }
        }
 
        private String nonEditableText;
 
        ControlListener nonEditableResizeListener = new ControlAdapter() {
-               
+
                int width = 0;
-               
+
                @Override
                public void controlResized(ControlEvent e) {
                        if (nonEditableInfoLabel.getBounds().width == width) {
@@ -892,9 +997,8 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
                        }
                        width = nonEditableInfoLabel.getBounds().width;
                        if (nonEditableInfoLabel.getBounds().width > 0) {
-                               nonEditableInfoLabel.setText(
-                                               Dialog.shortenText(nonEditableText.toUpperCase(), 
-                                               nonEditableInfoLabel));
+                               nonEditableInfoLabel.setText(Dialog.shortenText(
+                                               nonEditableText.toUpperCase(), nonEditableInfoLabel));
                        }
                }
        };
@@ -904,102 +1008,115 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
        private LabelEllipsisListener nonEditableLabelEllipsisListener;
 
        private T data;
-                       
+
+       private boolean enabled;
+
        /**
         * nonEditableInfo is a label displayed underneath a GroupedComposite's
-        * input field. For instance, NameComposites display things like name relations,
-        * sec. references, etc. here.
-        *
-        * @param info the text to display in the label
-        * @param append whether the string should be appended to text that is already shown in the label
+        * input field. For instance, NameComposites display things like name
+        * relations, sec. references, etc. here.
+        * 
+        * @param info
+        *            the text to display in the label
+        * @param append
+        *            whether the string should be appended to text that is already
+        *            shown in the label
         */
        public void setNonEditableInfo(String info, boolean append) {
-               // TODO non editable info should only be drawn once, when everything else is drawn
+               // TODO non editable info should only be drawn once, when everything
+               // else is drawn
                info = info.toUpperCase();
-               
-               if(append){
+
+               if (append) {
                        nonEditableText += ", " + info;
                        nonEditableHoverText += "\n" + info;
-               }else{
+               } else {
                        nonEditableText = info;
                        nonEditableHoverText = info;
                }
-               
+
                if (nonEditableInfoLabel == null) {
-                       nonEditableInfoLabel = getEditor().getToolkit().createLabel(control, "");
-                       TableWrapData layoutData = new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP);
-                       // Set indent to viewer ruler's width 
+                       nonEditableInfoLabel = getEditor().getToolkit().createLabel(
+                                       control, "");
+                       TableWrapData layoutData = new TableWrapData(
+                                       TableWrapData.FILL_GRAB, TableWrapData.TOP);
+                       // Set indent to viewer ruler's width
                        if (getNameViewer().getRulerControl() != null) {
                                // TODO right justify
                                layoutData.indent = NameViewer.RULER_WIDTH;
                        }
                        nonEditableInfoLabel.setLayoutData(layoutData);
-                       
 
-                       
-                       nonEditableLabelEllipsisListener = new LabelEllipsisListener(nonEditableInfoLabel) {
+                       nonEditableLabelEllipsisListener = new LabelEllipsisListener(
+                                       nonEditableInfoLabel) {
                                @Override
                                public String getLabelText() {
                                        return nonEditableText.toUpperCase();
                                }
-                       }; 
-                       nonEditableInfoLabel.addControlListener(nonEditableLabelEllipsisListener);
-                       
+                       };
+                       nonEditableInfoLabel
+                                       .addControlListener(nonEditableLabelEllipsisListener);
+
                        nonEditableInfoHover = new DefaultToolTip(nonEditableInfoLabel);
                        nonEditableInfoHover.setRespectDisplayBounds(true);
-                       
-               } 
+
+               }
                nonEditableInfoHover.setText(nonEditableHoverText);
                nonEditableInfoLabel.setText(nonEditableText);
-               
+
                calculateAnnotations();
        }
-       
+
        /**
-        * <p>Getter for the field <code>data</code>.</p>
-        *
+        * <p>
+        * Getter for the field <code>data</code>.
+        * </p>
+        * 
         * @return a T object.
         */
-       public T getData(){
+       public T getData() {
                return data;
        }
-       
+
        /**
-        * <p>Setter for the field <code>data</code>.</p>
-        *
-        * @param data a T object.
+        * <p>
+        * Setter for the field <code>data</code>.
+        * </p>
+        * 
+        * @param data
+        *            a T object.
         */
-       public void setData(T data){
-               this.data =  (T) HibernateProxyHelper.deproxy(data);
+       public void setData(T data) {
+               this.data = (T) HibernateProxyHelper.deproxy(data);
        }
 
        /**
         * If the user hitting carriage return should cause something to happen -
-        * i.e. the creation of a new composite - call this method and override
-        * the method handleSplitText().
+        * i.e. the creation of a new composite - call this method and override the
+        * method handleSplitText().
         */
        protected void createLineBreakListener() {
                lineBreakListener = new LineBreakListener() {
                        @Override
                        public void handleSplitText(String text) {
-                               AbstractGroupedContainer.this.handleSplitText(text);    
+                               AbstractGroupedContainer.this.handleSplitText(text);
                        }
                };
-               
+
                getNameViewer().getTextWidget().addVerifyListener(lineBreakListener);
        }
-               
+
        abstract class LabelEllipsisListener extends ControlAdapter {
-               
+
                private final Label label;
                int width = 0;
 
                LabelEllipsisListener(Label label) {
                        this.label = label;
                }
-               
+
                abstract public String getLabelText();
-               
+
                @Override
                public void controlResized(ControlEvent e) {
                        if (label.getBounds().width == width) {
@@ -1013,80 +1130,90 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
        }
 
        /**
-        * <p>storeCursor</p>
+        * <p>
+        * storeCursor
+        * </p>
         */
        public void storeCursor() {
                this.cursorPosition = getNameViewer().getCursorPosition();
        }
-       
+
        /**
         * Puts the cursor to the position it was last seen on or to the end of line
         * if no former position is known.
         */
-       public void placeCursor(){
-               if(cursorPosition == 0){
+       public void placeCursor() {
+               if (cursorPosition == 0) {
                        getNameViewer().setCursorToEOL();
-               }else{
+               } else {
                        getNameViewer().setCursorPosition(cursorPosition);
                }
        }
 
-
-
        /**
-        * <p>Setter for the field <code>group</code>.</p>
-        *
-        * @param group a {@link eu.etaxonomy.taxeditor.editor.name.container.AbstractGroup} object.
+        * <p>
+        * Setter for the field <code>group</code>.
+        * </p>
+        * 
+        * @param group
+        *            a
+        *            {@link eu.etaxonomy.taxeditor.editor.name.container.AbstractGroup}
+        *            object.
         */
        public void setGroup(AbstractGroup group) {
                this.group = group;
        }
 
-
-
        /**
-        * <p>restoreColor</p>
+        * <p>
+        * restoreColor
+        * </p>
         */
        public void restoreColor() {
                setBackground(backgroundColor);
        }
-       
-
 
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.forms.IFormPart#initialize(org.eclipse.ui.forms.IManagedForm)
+       /*
+        * (non-Javadoc)
+        * 
+        * @see
+        * org.eclipse.ui.forms.IFormPart#initialize(org.eclipse.ui.forms.IManagedForm
+        * )
         */
        @Override
        public void initialize(IManagedForm form) {
                // TODO Auto-generated method stub
-               
-       }
 
+       }
 
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.ui.forms.IFormPart#dispose()
         */
        @Override
        public void dispose() {
-               if(getControl() != null){
+               if (getControl() != null) {
                        setMenu(null);
                        getControl().dispose();
                }
        }
 
-
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.ui.forms.IFormPart#commit(boolean)
         */
        @Override
        public void commit(boolean onSave) {
-               if(isDirty()){
+               if (isDirty()) {
                        persistName();
                }
        }
 
-
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.ui.forms.IFormPart#setFormInput(java.lang.Object)
         */
        @Override
@@ -1095,8 +1222,9 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
                return false;
        }
 
-
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.ui.forms.IFormPart#setFocus()
         */
        @Override
@@ -1104,8 +1232,9 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
                getNameViewer().getControl().setFocus();
        }
 
-
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
+        * 
         * @see org.eclipse.ui.forms.IFormPart#isStale()
         */
        @Override
@@ -1113,4 +1242,16 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
                // TODO Auto-generated method stub
                return false;
        }
-} 
+       
+       public void setEnabled(boolean enabled) {
+               this.enabled = enabled;
+               Color color = enabled ? control.getForeground() : EditorUtil.getColor(Resources.COLOR_DISABLED_EDITOR);
+                               
+               getNameViewer().getTextWidget().setEditable(enabled);
+               getNameViewer().getTextWidget().setForeground(color);
+       }
+       
+       public boolean getEnabled(){
+               return enabled;
+       }
+}
index 38cd1c5b7d076e10dc66d215463bea3def3bddd2..330be274dc772a81a19697c636d4ee2088034756 100644 (file)
@@ -471,7 +471,7 @@ public abstract class AbstractFilteredCdmResourceSelectionDialog<T extends ICdmB
 //                                     addObjectToModel(teamOrPerson);
                                        refresh();
                                        setPattern(entity);
-                                       conversation.bind();
+                                       getConversationHolder().bind();
                                }
                        }
                };
index dc0815a357853e05eb457d2a959d25cfa6a87804..e84c11ea886f383b00742cd6557d55bfb5e14973 100644 (file)
@@ -12,6 +12,7 @@ package eu.etaxonomy.taxeditor.view;
 
 import org.eclipse.jface.viewers.ISelection;
 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.custom.SashForm;
@@ -42,6 +43,8 @@ public abstract class AbstractCdmViewPart extends ViewPart implements ISelection
        
        protected ISelectionService selectionService;
 
+       public static IStructuredSelection EMPTY_SELECTION = new StructuredSelection();
+       
        protected IWorkbenchPart part;
        
     private PageBook pageBook;