Class ConstructorScopes


  • public class ConstructorScopes
    extends java.lang.Object
    Encapsulates the creation of constructor scopes.
    • Constructor Detail

      • ConstructorScopes

        public ConstructorScopes()
    • Method Detail

      • createConstructorScope

        public org.eclipse.xtext.scoping.IScope createConstructorScope​(org.eclipse.emf.ecore.EObject context,
                                                                       org.eclipse.emf.ecore.EReference reference,
                                                                       IFeatureScopeSession session,
                                                                       IResolvedTypes resolvedTypes)
        Creates the constructor scope for XConstructorCall. The scope will likely contain descriptions for constructors. If there is not constructor declared, it may contain types.
        Parameters:
        session - the currently available visibilityHelper data
        reference - the reference that will hold the resolved constructor
        resolvedTypes - the currently known resolved types
      • createAnonymousClassConstructorScope

        protected org.eclipse.xtext.scoping.IScope createAnonymousClassConstructorScope​(org.eclipse.xtext.common.types.JvmGenericType anonymousType,
                                                                                        org.eclipse.emf.ecore.EObject context,
                                                                                        IFeatureScopeSession session)
        Custom languages that allow to infer anonymous classes may want to use this helper to access the constructors of those classes.
        Parameters:
        session - subtypes may override and use the given session.
      • createAnonmousClassConstructorDescription

        protected ConstructorDescription createAnonmousClassConstructorDescription​(org.eclipse.xtext.naming.QualifiedName name,
                                                                                   org.eclipse.xtext.common.types.JvmConstructor constructor,
                                                                                   boolean visible)
      • isConstructorCallScope

        public boolean isConstructorCallScope​(org.eclipse.emf.ecore.EReference reference)