use of org.eclipse.n4js.n4JS.ExportDeclaration in project n4js by eclipse.
the class N4ClassDeclarationImpl method isToplevel.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isToplevel() {
EObject _eContainer = this.eContainer();
if ((_eContainer instanceof ExportDeclaration)) {
EObject _eContainer_1 = this.eContainer().eContainer();
return (_eContainer_1 instanceof Script);
}
EObject _eContainer_2 = this.eContainer();
return (_eContainer_2 instanceof Script);
}
use of org.eclipse.n4js.n4JS.ExportDeclaration in project n4js by eclipse.
the class N4ClassDeclarationImpl method getExportedName.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getExportedName() {
boolean _isExported = this.isExported();
if (_isExported) {
EObject _eContainer = this.eContainer();
final ExportDeclaration exportDecl = ((ExportDeclaration) _eContainer);
boolean _isDefaultExport = exportDecl.isDefaultExport();
if (_isDefaultExport) {
return "default";
}
final ExportableElement me = this;
String _switchResult = null;
boolean _matched = false;
if (me instanceof NamedElement) {
_matched = true;
_switchResult = ((NamedElement) me).getName();
}
if (!_matched) {
if (me instanceof IdentifiableElement) {
_matched = true;
_switchResult = ((IdentifiableElement) me).getName();
}
}
return _switchResult;
}
return null;
}
use of org.eclipse.n4js.n4JS.ExportDeclaration in project n4js by eclipse.
the class ExportedVariableStatementImpl method getAllAnnotations.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Annotation> getAllAnnotations() {
final BasicEList<Annotation> result = XcoreCollectionLiterals.<Annotation>newBasicEList();
final EObject parent = this.eContainer();
if ((parent instanceof ExportDeclaration)) {
EList<Annotation> _annotations = ((ExportDeclaration) parent).getAnnotations();
Iterables.<Annotation>addAll(result, _annotations);
}
EList<Annotation> _annotations_1 = this.getAnnotations();
Iterables.<Annotation>addAll(result, _annotations_1);
return result;
}
use of org.eclipse.n4js.n4JS.ExportDeclaration in project n4js by eclipse.
the class ExportedVariableStatementImpl method isToplevel.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isToplevel() {
EObject _eContainer = this.eContainer();
if ((_eContainer instanceof ExportDeclaration)) {
EObject _eContainer_1 = this.eContainer().eContainer();
return (_eContainer_1 instanceof Script);
}
EObject _eContainer_2 = this.eContainer();
return (_eContainer_2 instanceof Script);
}
use of org.eclipse.n4js.n4JS.ExportDeclaration in project n4js by eclipse.
the class ExportableElementImpl method isToplevel.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isToplevel() {
EObject _eContainer = this.eContainer();
if ((_eContainer instanceof ExportDeclaration)) {
EObject _eContainer_1 = this.eContainer().eContainer();
return (_eContainer_1 instanceof Script);
}
EObject _eContainer_2 = this.eContainer();
return (_eContainer_2 instanceof Script);
}
Aggregations