Java Code Examples for org.eclipse.emf.ecore.ENamedElement#getName()

The following examples show how to use org.eclipse.emf.ecore.ENamedElement#getName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Case_9.java    From xtext-xtend with Eclipse Public License 2.0 6 votes vote down vote up
protected CharSequence _generateTypeRef(final ENamedElement c) {
  CharSequence _xifexpression = null;
  EObject _eContainer = c.eContainer();
  boolean _tripleNotEquals = (_eContainer != null);
  if (_tripleNotEquals) {
    _xifexpression = this.generateTypeRef(c.eContainer());
  } else {
    CharSequence _xifexpression_1 = null;
    boolean _eIsProxy = c.eIsProxy();
    if (_eIsProxy) {
      StringConcatenation _builder = new StringConcatenation();
      String _name = c.getName();
      _builder.append(_name);
      _xifexpression_1 = _builder;
    } else {
      StringConcatenation _builder_1 = new StringConcatenation();
      _xifexpression_1 = _builder_1;
    }
    _xifexpression = _xifexpression_1;
  }
  return _xifexpression;
}
 
Example 2
Source File: SequencerDiagnosticProvider.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public String apply(ENamedElement from) {
	return from == null ? "null" : from.getName();
}
 
Example 3
Source File: UniqueNameUtil.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
public static String uniqueName(ENamedElement element) {
	String name = element.getName();
	if (name == null)
		name = element.eClass().getName();
	return uniqueName(element, name, element2uniqueName);
}
 
Example 4
Source File: UniqueNameUtil.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
public static String uniqueImplName(ENamedElement element) {
	String name = element.getName();
	if (name == null)
		name = element.eClass().getName();
	return uniqueName(element, name + IMPL_NAME_SUFFIX, element2uniqueImplName);
}
 
Example 5
Source File: WrongMetaclass.java    From textuml with Eclipse Public License 1.0 4 votes vote down vote up
public WrongMetaclass(ENamedElement featureName, EClass expectedMetaclass, EClass actualMetaclass) {
    super(Severity.ERROR);
    this.featureName = featureName.getName();
    this.expectedMetaclass = expectedMetaclass.getName();
    this.actualMetaclass = actualMetaclass.getName();
}
 
Example 6
Source File: XtextSpyLabelProvider.java    From dsl-devkit with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Text for ENamedElement.
 * 
 * @param eNamedElement
 *          the ENamedElement
 * @return the name
 */
protected String text(final ENamedElement eNamedElement) {
  return eNamedElement.getName();
}