diff options
author | 2021-08-03 18:42:39 +0900 | |
---|---|---|
committer | 2021-08-06 19:32:38 +0900 | |
commit | be4f78978faba3d3ceb88df02a7f93a2e09ff1e0 (patch) | |
tree | 1f3f1a96251ac4f655c8a96fc33d5d4ee779cd06 /rba.tool.editor/src/rba/tool/editor/validation/RBADiagnostician.java | |
parent | 71ca7c6cab863767ef30c8bd05b2bbfda8731cb5 (diff) |
Initial commit
Bug-AGL: SPEC-4033
Signed-off-by: Kenji Hosokawa <khosokawa@jp.adit-jv.com>
Diffstat (limited to 'rba.tool.editor/src/rba/tool/editor/validation/RBADiagnostician.java')
-rw-r--r-- | rba.tool.editor/src/rba/tool/editor/validation/RBADiagnostician.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/rba.tool.editor/src/rba/tool/editor/validation/RBADiagnostician.java b/rba.tool.editor/src/rba/tool/editor/validation/RBADiagnostician.java new file mode 100644 index 0000000..de1685e --- /dev/null +++ b/rba.tool.editor/src/rba/tool/editor/validation/RBADiagnostician.java @@ -0,0 +1,22 @@ +package rba.tool.editor.validation; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.Diagnostician; + +import rba.core.NamedElement; +import rba.core.RBACorePackage; + +public class RBADiagnostician extends Diagnostician { + + @Override + public String getObjectLabel(EObject eObject) { + + EClass eClass = eObject.eClass(); + if (RBACorePackage.Literals.NAMED_ELEMENT.isSuperTypeOf(eClass)) { + return ((NamedElement)eObject).getName(); + } else { + return eClass.getName(); + } + } +} |