14 |
14 |
import eu.etaxonomy.cdm.model.description.Character;
|
15 |
15 |
import eu.etaxonomy.cdm.model.term.DefinedTerm;
|
16 |
16 |
import eu.etaxonomy.cdm.model.term.Representation;
|
17 |
|
import eu.etaxonomy.cdm.model.term.TermNode;
|
18 |
17 |
import eu.etaxonomy.cdm.model.term.TermType;
|
19 |
18 |
import eu.etaxonomy.taxeditor.editor.definedterm.TermBasePropertyTester;
|
20 |
19 |
import eu.etaxonomy.taxeditor.model.ColorResources;
|
... | ... | |
71 |
70 |
Label lblStructure = new Label(formElement.getLayoutComposite(), style);
|
72 |
71 |
lblStructure.setText("Structure");
|
73 |
72 |
Label lblStructureText = new Label(formElement.getLayoutComposite(), style);
|
74 |
|
lblStructureText.setText(getPath(entity.getStructure()));
|
|
73 |
lblStructureText.setText(StoreUtil.getPath(entity.getStructure()));
|
75 |
74 |
lblStructureText.setForeground(ColorResources.getColor(Resources.BLACK));
|
76 |
75 |
Label lblProperty = new Label(formElement.getLayoutComposite(), style);
|
77 |
76 |
lblProperty.setText("Property");
|
78 |
77 |
Label lblPropertyText = new Label(formElement.getLayoutComposite(), style);
|
79 |
78 |
lblPropertyText.setForeground(ColorResources.getColor(Resources.BLACK));
|
80 |
|
lblPropertyText.setText(getPath(entity.getProperty()));
|
|
79 |
lblPropertyText.setText(StoreUtil.getPath(entity.getProperty()));
|
81 |
80 |
|
82 |
81 |
comboStructuralModifier = formFactory.createDefinedTermComboElement(TermType.StructureModifier, formElement, "Structural Modifier", entity.getStructureModifier(), style);
|
83 |
82 |
|
... | ... | |
110 |
109 |
|
111 |
110 |
}
|
112 |
111 |
|
113 |
|
private String getPath(TermNode node){
|
114 |
|
String path = node.getTerm().getLabel();
|
115 |
|
TermNode parent = node.getParent();
|
116 |
|
while(parent != null && parent.getTerm()!=null){
|
117 |
|
path = parent.getTerm().getLabel() + "/" + path;
|
118 |
|
parent = parent.getParent();
|
119 |
|
}
|
120 |
|
return path;
|
121 |
|
}
|
122 |
|
|
123 |
112 |
@Override
|
124 |
113 |
public void setEntity(Character entity) {
|
125 |
114 |
super.setEntity(entity);
|
Move util method to StoreUtil