Class DefaultImportsConfiguration

  • All Implemented Interfaces:
    IImportsConfiguration

    public class DefaultImportsConfiguration
    extends java.lang.Object
    implements IImportsConfiguration
    Language dependent configuration for the 'import' related things.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addInnerTypes​(org.eclipse.xtext.common.types.JvmDeclaredType containerType, org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.common.types.JvmDeclaredType> result)  
      protected java.util.List<org.eclipse.emf.ecore.EObject> findPathToImportSection()  
      protected org.eclipse.xtext.nodemodel.INode findPreviousNode​(org.eclipse.xtext.nodemodel.ICompositeNode node, java.util.List<org.eclipse.emf.ecore.EObject> pathToImportSection)  
      org.eclipse.xtext.common.types.JvmDeclaredType getContextJvmDeclaredType​(org.eclipse.emf.ecore.EObject model)  
      java.util.Set<java.lang.String> getImplicitlyImportedPackages​(org.eclipse.xtext.resource.XtextResource resource)  
      XImportSection getImportSection​(org.eclipse.xtext.resource.XtextResource resource)  
      int getImportSectionOffset​(org.eclipse.xtext.resource.XtextResource resource)  
      java.lang.String getLegacyImportSyntax​(XImportDeclaration importDeclaration)
      Returns the syntax that was used in the import declaration if (and only if) it uses the legacy notation with a '$' as the delimiter for nested types.
      java.lang.Iterable<org.eclipse.xtext.common.types.JvmDeclaredType> getLocallyDefinedTypes​(org.eclipse.xtext.resource.XtextResource resource)  
      java.lang.String getPackageName​(org.eclipse.xtext.resource.XtextResource xtextResource)  
      protected boolean internalFindPathToImportSection​(java.util.LinkedList<org.eclipse.emf.ecore.EObject> pathToImportSection, java.util.Set<org.eclipse.xtext.ParserRule> seenRules, org.eclipse.emf.ecore.EObject ruleOrRuleCall)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultImportsConfiguration

        public DefaultImportsConfiguration()
    • Method Detail

      • getLocallyDefinedTypes

        public java.lang.Iterable<org.eclipse.xtext.common.types.JvmDeclaredType> getLocallyDefinedTypes​(org.eclipse.xtext.resource.XtextResource resource)
        Specified by:
        getLocallyDefinedTypes in interface IImportsConfiguration
      • addInnerTypes

        protected void addInnerTypes​(org.eclipse.xtext.common.types.JvmDeclaredType containerType,
                                     org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.common.types.JvmDeclaredType> result)
      • getLegacyImportSyntax

        public java.lang.String getLegacyImportSyntax​(XImportDeclaration importDeclaration)
        Description copied from interface: IImportsConfiguration
        Returns the syntax that was used in the import declaration if (and only if) it uses the legacy notation with a '$' as the delimiter for nested types. Otherwise the result is null. Also returns null, if no node model is attached.
        Specified by:
        getLegacyImportSyntax in interface IImportsConfiguration
      • findPreviousNode

        protected org.eclipse.xtext.nodemodel.INode findPreviousNode​(org.eclipse.xtext.nodemodel.ICompositeNode node,
                                                                     java.util.List<org.eclipse.emf.ecore.EObject> pathToImportSection)
      • findPathToImportSection

        protected java.util.List<org.eclipse.emf.ecore.EObject> findPathToImportSection()
      • internalFindPathToImportSection

        protected boolean internalFindPathToImportSection​(java.util.LinkedList<org.eclipse.emf.ecore.EObject> pathToImportSection,
                                                          java.util.Set<org.eclipse.xtext.ParserRule> seenRules,
                                                          org.eclipse.emf.ecore.EObject ruleOrRuleCall)
      • getPackageName

        public java.lang.String getPackageName​(org.eclipse.xtext.resource.XtextResource xtextResource)
        Specified by:
        getPackageName in interface IImportsConfiguration