+++ /dev/null
-/**\r
-* Copyright (C) 2009 EDIT\r
-* European Distributed Institute of Taxonomy \r
-* http://www.e-taxonomy.eu\r
-* \r
-* The contents of this file are subject to the Mozilla Public License Version 1.1\r
-* See LICENSE.TXT at the top of this package for the full license terms.\r
-*/\r
-\r
-package eu.etaxonomy.taxeditor.propertysheet.type;\r
-\r
-import java.util.Set;\r
-import java.util.Vector;\r
-\r
-import org.apache.log4j.Logger;\r
-import org.eclipse.ui.views.properties.IPropertyDescriptor;\r
-import org.eclipse.ui.views.properties.IPropertySource;\r
-import org.eclipse.ui.views.properties.PropertyDescriptor;\r
-\r
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
-import eu.etaxonomy.taxeditor.propertysheet.name.NameRelationsPropertyDescriptor;\r
-\r
-/**\r
- * @author p.ciardelli\r
- * @created 11.02.2009\r
- * @version 1.0\r
- */\r
-public class TypePropertySource implements IPropertySource {\r
- private static Logger logger = Logger.getLogger(TypePropertySource.class);\r
- \r
- /**\r
- * The name whose types are being displayed.\r
- */\r
- private TaxonNameBase name;\r
- \r
- /**\r
- * If this is a property with a parent, the parent's property ID\r
- */\r
- private String parentid;\r
- \r
- /**\r
- * Property unique keys\r
- */\r
- public static final String P_ID_NAMETYPES = "nametypes";\r
-\r
- /**\r
- * Property display keys\r
- * Note: for an explanation of the sorting prefixes ("04:"), \r
- * @see eu.etaxonomy.taxeditor.propertysheet.CustomSortPropertySheetEntry\r
- */\r
- public static final String P_NAMETYPES = "00:Name Types"; \r
- \r
- protected static final String[] TOP_LEVEL_PROPERTIES = new String[] {\r
- P_ID_NAMETYPES};\r
- \r
- protected Vector<PropertyDescriptor> descriptors = new Vector<PropertyDescriptor>();\r
- \r
- public TypePropertySource(TaxonNameBase name, String f) {\r
- this.name = name;\r
- \r
- addDescriptor(P_ID_NAMETYPES);\r
- }\r
- \r
- \r
- /**\r
- * \r
- */\r
- private void addDescriptor(String id) {\r
- // Name relations, listed in custom property descriptor\r
- if (id.equals(P_ID_NAMETYPES)) {\r
- descriptors.addElement(\r
- new TypePropertyDescriptor(P_ID_NAMETYPES, P_NAMETYPES, name) {\r
- protected void saveTypes(Set set) {\r
- setPropertyValue(P_ID_NAMETYPES, set);\r
- }\r
- }\r
- );\r
- };\r
- }\r
-\r
-\r
- /* (non-Javadoc)\r
- * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()\r
- */\r
- @Override\r
- public Object getEditableValue() {\r
- // TODO Auto-generated method stub\r
- return null;\r
- }\r
-\r
- /* (non-Javadoc)\r
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()\r
- */\r
- @Override\r
- public IPropertyDescriptor[] getPropertyDescriptors() {\r
- return (IPropertyDescriptor[]) descriptors.toArray(\r
- new IPropertyDescriptor[descriptors.size()]);\r
- }\r
-\r
- /* (non-Javadoc)\r
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)\r
- */\r
- @Override\r
- public Object getPropertyValue(Object id) {\r
- // TODO Auto-generated method stub\r
- return null;\r
- }\r
-\r
- /* (non-Javadoc)\r
- * @see org.eclipse.ui.views.properties.IPropertySource#isPropertySet(java.lang.Object)\r
- */\r
- @Override\r
- public boolean isPropertySet(Object id) {\r
- // TODO Auto-generated method stub\r
- return false;\r
- }\r
-\r
- /* (non-Javadoc)\r
- * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)\r
- */\r
- @Override\r
- public void resetPropertyValue(Object id) {\r
- // TODO Auto-generated method stub\r
-\r
- }\r
-\r
- /* (non-Javadoc)\r
- * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)\r
- */\r
- @Override\r
- public void setPropertyValue(Object id, Object value) {\r
- // TODO Auto-generated method stub\r
-\r
- }\r
-}\r