Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/valueconverter/TableQualifiedNameProvider.java')
-rw-r--r--org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/valueconverter/TableQualifiedNameProvider.java47
1 files changed, 8 insertions, 39 deletions
diff --git a/org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/valueconverter/TableQualifiedNameProvider.java b/org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/valueconverter/TableQualifiedNameProvider.java
index 9b9645a..f3a1c8e 100644
--- a/org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/valueconverter/TableQualifiedNameProvider.java
+++ b/org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/valueconverter/TableQualifiedNameProvider.java
@@ -11,58 +11,27 @@
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
*/
- package org.eclipse.osbp.xtext.table.valueconverter;
-
-import java.util.List;
+package org.eclipse.osbp.xtext.table.valueconverter;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.xtext.naming.IQualifiedNameConverter;
import org.eclipse.xtext.naming.QualifiedName;
-import org.eclipse.xtext.nodemodel.INode;
-import org.eclipse.xtext.nodemodel.util.NodeModelUtils;
import org.eclipse.xtext.xbase.scoping.XbaseQualifiedNameProvider;
-import com.google.inject.Inject;
-
-import org.eclipse.osbp.xtext.table.Table;
-import org.eclipse.osbp.xtext.table.TablePackage;
-
@SuppressWarnings("restriction")
public class TableQualifiedNameProvider extends XbaseQualifiedNameProvider {
- @Inject
- private IQualifiedNameConverter qualifiedNameConverter;
-
@Override
public QualifiedName getFullyQualifiedName(EObject obj) {
if (obj == null) {
return QualifiedName.create("");
}
- if (obj instanceof Table) {
- Table table = (Table) obj;
- if (table.getName() == null) {
- return null;
- }
- return qualifiedNameConverter.toQualifiedName(table.getName());
- }
+ // if (obj instanceof Table) {
+ // Table table = (Table) obj;
+ // if (table.getName() == null) {
+ // return null;
+ // }
+ // return qualifiedNameConverter.toQualifiedName(table.getName());
+ // }
return super.getFullyQualifiedName(obj);
}
-
- // this method evaluates the cross referenced name of an object without causing cyclic lazy linking errors
- private String getCrossReferenceName(EObject obj, EStructuralFeature feature) {
- List<INode> nodes = NodeModelUtils.findNodesForFeature(obj, feature);
- if (nodes.size() == 0) {
- return null;
- }
- return NodeModelUtils.getTokenText(nodes.get(0));
- }
-
- private String getPackageName(EObject obj) {
- EObject o = obj.eContainer();
- while(!(o instanceof TablePackage)) {
- o = o.eContainer();
- }
- return ((TablePackage)o).getName();
- }
}

Back to the top