import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.term.TermNode;
import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
}
return style;
}
+
+ public static String getPath(TermNode node){
+ String path = node.getTerm().getLabel();
+ TermNode parent = node.getParent();
+ while(parent != null && parent.getTerm()!=null){
+ path = parent.getTerm().getLabel() + "/" + path;
+ parent = parent.getParent();
+ }
+ return path;
+ }
}
import eu.etaxonomy.cdm.model.description.Character;
import eu.etaxonomy.cdm.model.term.DefinedTerm;
import eu.etaxonomy.cdm.model.term.Representation;
-import eu.etaxonomy.cdm.model.term.TermNode;
import eu.etaxonomy.cdm.model.term.TermType;
import eu.etaxonomy.taxeditor.editor.definedterm.TermBasePropertyTester;
import eu.etaxonomy.taxeditor.model.ColorResources;
Label lblStructure = new Label(formElement.getLayoutComposite(), style);
lblStructure.setText("Structure");
Label lblStructureText = new Label(formElement.getLayoutComposite(), style);
- lblStructureText.setText(getPath(entity.getStructure()));
+ lblStructureText.setText(StoreUtil.getPath(entity.getStructure()));
lblStructureText.setForeground(ColorResources.getColor(Resources.BLACK));
Label lblProperty = new Label(formElement.getLayoutComposite(), style);
lblProperty.setText("Property");
Label lblPropertyText = new Label(formElement.getLayoutComposite(), style);
lblPropertyText.setForeground(ColorResources.getColor(Resources.BLACK));
- lblPropertyText.setText(getPath(entity.getProperty()));
+ lblPropertyText.setText(StoreUtil.getPath(entity.getProperty()));
comboStructuralModifier = formFactory.createDefinedTermComboElement(TermType.StructureModifier, formElement, "Structural Modifier", entity.getStructureModifier(), style);
}
- private String getPath(TermNode node){
- String path = node.getTerm().getLabel();
- TermNode parent = node.getParent();
- while(parent != null && parent.getTerm()!=null){
- path = parent.getTerm().getLabel() + "/" + path;
- parent = parent.getParent();
- }
- return path;
- }
-
@Override
public void setEntity(Character entity) {
super.setEntity(entity);