Search in sources :

Example 6 with TExportableElement

use of org.eclipse.n4js.ts.types.TExportableElement in project n4js by eclipse.

the class ImportsFactory method addDefaultImport.

private ImportDeclaration addDefaultImport(String name, ImportDeclaration importDeclaration) {
    DefaultImportSpecifier defaultImportSpec = N4JS_FACTORY.createDefaultImportSpecifier();
    TExportableElement importetElement = TYPES_FACTORY.createTExportableElement();
    importetElement.setName(name);
    defaultImportSpec.setImportedElement(importetElement);
    importDeclaration.getImportSpecifiers().add(defaultImportSpec);
    return importDeclaration;
}
Also used : TExportableElement(org.eclipse.n4js.ts.types.TExportableElement) DefaultImportSpecifier(org.eclipse.n4js.n4JS.DefaultImportSpecifier)

Example 7 with TExportableElement

use of org.eclipse.n4js.ts.types.TExportableElement in project n4js by eclipse.

the class NamedImportSpecifierImpl method setImportedElement.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setImportedElement(TExportableElement newImportedElement) {
    TExportableElement oldImportedElement = importedElement;
    importedElement = newImportedElement;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, N4JSPackage.NAMED_IMPORT_SPECIFIER__IMPORTED_ELEMENT, oldImportedElement, importedElement));
}
Also used : TExportableElement(org.eclipse.n4js.ts.types.TExportableElement) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Aggregations

TExportableElement (org.eclipse.n4js.ts.types.TExportableElement)7 EObject (org.eclipse.emf.ecore.EObject)2 NamedImportSpecifier (org.eclipse.n4js.n4JS.NamedImportSpecifier)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 DefaultImportSpecifier (org.eclipse.n4js.n4JS.DefaultImportSpecifier)1 ImportDeclaration (org.eclipse.n4js.n4JS.ImportDeclaration)1 ImportProvidedElement (org.eclipse.n4js.organize.imports.ImportProvidedElement)1 TModule (org.eclipse.n4js.ts.types.TModule)1 TVersionable (org.eclipse.n4js.ts.types.TVersionable)1 QualifiedName (org.eclipse.xtext.naming.QualifiedName)1 IEObjectDescription (org.eclipse.xtext.resource.IEObjectDescription)1 AliasedEObjectDescription (org.eclipse.xtext.resource.impl.AliasedEObjectDescription)1