Changeset 2aa064d78a2c1162da70e2413b7c386278a1473d

Show
Ignore:
Timestamp:
06/28/09 23:36:51 (9 months ago)
Author:
mb0 <mb0@…>
git-author:
mb0 <mb0@mb0.org> / 2009-06-15T21:28:28Z+0200
Parents:
b32f7a496c511e07158f0d0752addedc2b378328
Children:
5c182b6e475d5851c54cdb2117f25af21723b62a
git-committer:
mb0 <mb0@mb0.org> / 2009-06-28T23:36:51Z+0200
Message:

axmember and axtype now use axentrytype instead of boolean flags.
the ids of axentries reflect the entry type. the indexer uses the information in findMember to narrow down the results.
added axentrytype constant.
added utility function for entry retrieval
cleaned up axutil.
fixed asdoc type member parsing.
the resolver can now resolve inheritance, variable and function result types.
the builder does not cache parse-controllers per file. it costs way to much memory and the performance loss is negligible.

Files:
1 added
1 removed
28 modified

Legend:

Unmodified
Added
Removed
  • org.axdt.as3/src/org/axdt/as3/imp/builders/AS3Builder.java

    r364575f r2aa064d  
    33import java.util.ArrayList; 
    44import java.util.Arrays; 
    5 import java.util.HashMap; 
    65import java.util.List; 
    76import java.util.Map; 
     
    4241        public static final String PROBLEM_MARKER_ID = AS3Plugin.PLUGIN_ID + ".imp.builder.problem"; 
    4342        public static final Language LANGUAGE = LanguageRegistry.findLanguage(AS3Plugin.LANGUAGE); 
    44         private HashMap<IPath, AS3ParseController> files; 
    4543        private boolean isFullBuild = false; 
    4644        private List<AS3ParseController> astnodes; 
     
    4846        public AS3Builder() { 
    4947                super(); 
    50                 files = new HashMap<IPath, AS3ParseController>(); 
    5148        } 
    5249 
     
    174171        @SuppressWarnings("unchecked") 
    175172        private AS3ParseController getParseController(IFile file) { 
    176                 IPath path = file.getFullPath(); 
    177                 AS3ParseController controller = files.get(path); 
    178                 if (controller == null) { 
    179                         controller = new AS3ParseController(); 
    180                         IAnnotationTypeInfo typeInfo = controller.getAnnotationTypeInfo(); 
    181                         List<List<String>> lists = Arrays.asList(typeInfo.getProblemMarkerTypes()); 
    182                         boolean found = false; 
    183                         for (List<String> list:lists) { 
    184                                 if (list.contains(getErrorMarkerID())) { 
    185                                         found = true; 
    186                                         break; 
    187                                 } 
    188                         } 
    189                         if (!found) typeInfo.addProblemMarkerType(getErrorMarkerID()); 
    190                         MarkerCreator marker = new MarkerCreator(file, controller, PROBLEM_MARKER_ID); 
    191                         IPath relativePath = file.getProjectRelativePath(); 
    192                         try { 
    193                                 ISourceProject sourceProject = ModelFactory.open(file.getProject()); 
    194                                 controller.initialize(relativePath, sourceProject, marker); 
    195                                 files.put(relativePath, controller); 
    196                         } catch (ModelException e) { 
    197                                 getPlugin().logException("Cannot create parse controller", e); 
    198                         } 
     173                AS3ParseController controller = new AS3ParseController(); 
     174                IAnnotationTypeInfo typeInfo = controller.getAnnotationTypeInfo(); 
     175                List<List<String>> lists = Arrays.asList(typeInfo.getProblemMarkerTypes()); 
     176                boolean found = false; 
     177                for (List<String> list:lists) { 
     178                        if (list.contains(getErrorMarkerID())) { 
     179                                found = true; 
     180                                break; 
     181                        } 
     182                } 
     183                if (!found) typeInfo.addProblemMarkerType(getErrorMarkerID()); 
     184                MarkerCreator marker = new MarkerCreator(file, controller, PROBLEM_MARKER_ID); 
     185                IPath relativePath = file.getProjectRelativePath(); 
     186                try { 
     187                        ISourceProject sourceProject = ModelFactory.open(file.getProject()); 
     188                        controller.initialize(relativePath, sourceProject, marker); 
     189                } catch (ModelException e) { 
     190                        getPlugin().logException("Cannot create parse controller", e); 
    199191                } 
    200192                return controller; 
  • org.axdt.as3/src/org/axdt/as3/imp/parser/ResolvingVisitor.java

    r25b5d22 r2aa064d  
    11package org.axdt.as3.imp.parser; 
    22 
     3import java.util.ArrayList; 
     4import java.util.Arrays; 
     5 
    36import lpg.runtime.IAst; 
    47 
    58import org.axdt.as3.AS3Plugin; 
     9import org.axdt.as3.imp.parser.Ast.ASTNode; 
    610import org.axdt.as3.imp.parser.Ast.AssignmentExpression; 
    711import org.axdt.as3.imp.parser.Ast.Block; 
    812import org.axdt.as3.imp.parser.Ast.ClassDefinition; 
    913import org.axdt.as3.imp.parser.Ast.ExpressionStatement; 
     14import org.axdt.as3.imp.parser.Ast.ExtendsList; 
    1015import org.axdt.as3.imp.parser.Ast.FunctionDefinition; 
    1116import org.axdt.as3.imp.parser.Ast.FunctionExpression; 
    1217import org.axdt.as3.imp.parser.Ast.IName; 
     18import org.axdt.as3.imp.parser.Ast.IPostfixExpression; 
     19import org.axdt.as3.imp.parser.Ast.ITypeExpression_allowin; 
     20import org.axdt.as3.imp.parser.Ast.ITypeExpression_noin; 
     21import org.axdt.as3.imp.parser.Ast.Ident; 
    1322import org.axdt.as3.imp.parser.Ast.ImportDirective; 
     23import org.axdt.as3.imp.parser.Ast.Inheritance; 
    1424import org.axdt.as3.imp.parser.Ast.InterfaceDefinition; 
    1525import org.axdt.as3.imp.parser.Ast.Name; 
    1626import org.axdt.as3.imp.parser.Ast.PackageDefinition; 
     27import org.axdt.as3.imp.parser.Ast.ResultType; 
     28import org.axdt.as3.imp.parser.Ast.TypeExpressionList; 
     29import org.axdt.as3.imp.parser.Ast.TypedIdentifier; 
    1730import org.axdt.as3.imp.parser.Ast.VariableBinding; 
    1831import org.axdt.as3.util.AS3Util; 
     32import org.axdt.axdoc.model.AXEntry; 
    1933import org.axdt.axdoc.model.AXIndex; 
    20 import org.axdt.axdoc.model.AXIndexNode; 
     34import org.axdt.axdoc.model.AXRoot; 
    2135import org.axdt.axdoc.util.Index0r; 
    2236import org.axdt.common.preferences.AxdtPreferences; 
     
    2539        private Index0r index0r; 
    2640        private boolean addDebugErrors; 
     41        private ArrayList<AXIndex> importedPackages; 
     42        private ArrayList<AXEntry> importedTypes; 
     43        private String expectedPackageName; 
    2744 
    2845        public ResolvingVisitor(AS3ParseController parseController) { 
     
    3047                addDebugErrors = AS3Plugin.getDefault() != null && AxdtPreferences.doDebug(); 
    3148                index0r = Index0r.getInstance(); 
    32         } 
    33  
     49                expectedPackageName = AS3Util.getExpectedPackageName(getFile()); 
     50                resetImportCache(); 
     51        } 
     52        protected void resetImportCache() { 
     53                importedPackages = new ArrayList<AXIndex>(); 
     54                importedTypes = new ArrayList<AXEntry>(); 
     55                for (AXRoot root:index0r.getRoots()) { 
     56                        // if has toplevel entries 
     57                        if (root.getEntries().size() > 0) { 
     58                                // add as default import 
     59                                importedPackages.add(root); 
     60                        } 
     61                } 
     62                AXIndex[] sameIndexes = index0r.findPackage(expectedPackageName); 
     63                for (AXIndex index:sameIndexes) { 
     64                        importedPackages.add(index); 
     65                } 
     66        } 
     67        protected AXEntry resolveType(String name) { 
     68                for (AXEntry entry:importedTypes) { 
     69                        if (entry.getName().equals(name)) 
     70                                return entry; 
     71                } 
     72                for (AXIndex index:importedPackages) { 
     73                        for (AXEntry entry:index.getTypes()) { 
     74                                if (entry.getName().equals(name)) { 
     75                                        return entry; 
     76                                } 
     77                        } 
     78                } 
     79                return null; 
     80        } 
     81        protected String resolveType(ITypeExpression_noin type) { 
     82                return type instanceof ASTNode ? resolveNode((ASTNode) type) : null; 
     83        } 
     84        protected String resolveType(ITypeExpression_allowin type) { 
     85                return type instanceof ASTNode ? resolveNode((ASTNode) type) : null; 
     86        } 
     87        protected String resolveType(IPostfixExpression type) { 
     88                return type instanceof ASTNode ? resolveNode((ASTNode) type) : null; 
     89        } 
     90        protected String resolveNode(ASTNode type) { 
     91                if (type == null)  
     92                        return null; 
     93                String typeName = type.toString(); 
     94                AXEntry entry = resolveType(typeName); 
     95                if (entry == null) { 
     96                        if (!typeName.equals("*")) 
     97                                emitError((ASTNode)type, "could not resolve type"); 
     98                        return null; 
     99                } 
     100                String id = entry.getId(); 
     101                if (type instanceof Ident) { 
     102                        ((Ident)type).setDeclaration(id); 
     103                } else if (addDebugErrors) { 
     104                        emitError((ASTNode)type, "todo: not expected other than ident"); 
     105                } 
     106                return id; 
     107        } 
     108        protected void resolveTypes(TypeExpressionList list) { 
     109                if (list != null) { 
     110                        for (int i=0; i < list.size();i++) { 
     111                                ITypeExpression_allowin superInterface = list.getTypeExpression_allowinAt(i); 
     112                                resolveNode((ASTNode)superInterface); 
     113                        } 
     114                } 
     115        } 
    34116        @Override 
    35117        public boolean visit(Block n) { 
     
    39121        @Override 
    40122        public boolean visit(PackageDefinition n) { 
    41                 String packageName = AS3Util.getExpectedPackageName(getFile());  
     123                String packageName = AS3Util.getExpectedPackageName(getFile()); 
     124                // is not inside a valid source path 
     125                if (packageName == null) { 
     126                        emitError(n, "file should be inside a configured source path"); 
     127                        return false; 
     128                } 
    42129                // check if name corresponds with folder names 
    43130                if (n.getName() != null) { 
     
    56143                        emitError(n.getLeftIToken(), "package name sould be: "+ packageName); 
    57144                } 
    58                 // TODO check if split[0] is a valid source path 
    59                 return true; 
     145                return true; 
     146        } 
     147        @Override 
     148        public void endVisit(PackageDefinition n) { 
     149                resetImportCache(); 
    60150        } 
    61151        @Override 
     
    69159                                if (findPackage.length>=1) {  
    70160                                        foundDeclaration = true; 
     161                                        importedPackages.addAll(Arrays.asList(findPackage)); 
    71162                                        name.getIdent().setDeclaration(findPackage[0].getId()); 
    72163                                } else if (addDebugErrors) { 
     
    78169                        } 
    79170                } else { 
    80                         AXIndexNode[] findMember = index0r.findMember(name.getQualifier().toString(), name.getIdent().toString()); 
     171                        AXEntry[] findMember = index0r.findMember(name.getQualifier().toString(), name.getIdent().toString()); 
    81172                        if (findMember.length>=1) { 
    82173                                foundDeclaration = true; 
     174                                importedTypes.addAll(Arrays.asList(findMember)); 
    83175                                name.getIdent().setDeclaration(findMember[0].getId()); 
    84176                        } else if (addDebugErrors) { 
     
    101193                return true; 
    102194        } 
    103  
     195        @Override 
     196        public boolean visit(Inheritance n) { 
     197                ClassDefinition parent = (ClassDefinition) n.getParent(); 
     198                ITypeExpression_allowin superClass = n.getExtends(); 
     199                resolveType(superClass); 
     200                resolveTypes(n.getImplements()); 
     201                return false; 
     202        } 
    104203        @Override 
    105204        public boolean visit(InterfaceDefinition n) { 
     
    108207                checkPackageDirectiveName(name); 
    109208                return true; 
     209        } 
     210        @Override 
     211        public boolean visit(ExtendsList n) { 
     212                InterfaceDefinition parent = (InterfaceDefinition) n.getParent(); 
     213                resolveTypes(n.getExtends()); 
     214                return false; 
    110215        } 
    111216        private void checkTypeName(Name name) { 
     
    128233                } 
    129234        } 
    130  
    131         @Override 
    132         public boolean visit(FunctionDefinition n) { 
    133                 return false; 
    134         } 
    135  
    136         @Override 
    137         public boolean visit(FunctionExpression n) { 
    138                 return false; 
    139         } 
    140  
    141         @Override 
    142         public boolean visit(VariableBinding n) { 
    143                 return false; 
    144         } 
    145         @Override 
    146         public boolean visit(AssignmentExpression n) { 
    147                 return false; 
    148         } 
    149         @Override 
    150         public boolean visit(ExpressionStatement n) { 
    151                 return false; 
    152         } 
     235         
     236        public boolean visit(TypedIdentifier n) { 
     237                if (n != null) 
     238                        resolveNode(n.getType()); 
     239                return false; 
     240        } 
     241        public boolean visit(ResultType n) { 
     242                if (n != null) 
     243                        resolveType(n.getType()); 
     244                return false; 
     245        } 
     246 
    153247} 
  • org.axdt.as3/src/org/axdt/as3/util/AS3Util.java

    r69d1ca8 r2aa064d  
    5555                        } 
    5656                } 
    57                 return ""; 
     57                return null; 
    5858        } 
    5959} 
  • org.axdt.axdoc.model/model/AXDoc.ecore

    r2d81bf0 r2aa064d  
    1313      eSuperTypes="#//AXNode"> 
    1414    <eStructuralFeatures xsi:type="ecore:EReference" name="members" upperBound="-1" 
    15         eType="#//AXMember" containment="true" resolveProxies="false" eKeys="#//AXNode/name #//AXMember/function"/> 
     15        eType="#//AXMember" containment="true" resolveProxies="false" eKeys="#//AXNode/name"/> 
    1616  </eClassifiers> 
    1717  <eClassifiers xsi:type="ecore:EClass" name="AXPackage" eSuperTypes="#//AXMemberHolder"> 
     
    2020  </eClassifiers> 
    2121  <eClassifiers xsi:type="ecore:EClass" name="AXType" eSuperTypes="#//AXMemberHolder"> 
    22     <eStructuralFeatures xsi:type="ecore:EAttribute" name="interface" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> 
     22    <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="#//AXEntryType"/> 
    2323  </eClassifiers> 
    2424  <eClassifiers xsi:type="ecore:EClass" name="AXMember" eSuperTypes="#//AXNode"> 
    25     <eStructuralFeatures xsi:type="ecore:EAttribute" name="var" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" 
    26         defaultValueLiteral="true"/> 
    27     <eStructuralFeatures xsi:type="ecore:EAttribute" name="function" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> 
    28     <eStructuralFeatures xsi:type="ecore:EAttribute" name="const" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> 
    29     <eStructuralFeatures xsi:type="ecore:EAttribute" name="static" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> 
    30     <eStructuralFeatures xsi:type="ecore:EAttribute" name="protected" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> 
     25    <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="#//AXEntryType"/> 
    3126  </eClassifiers> 
    3227  <eClassifiers xsi:type="ecore:EEnum" name="AXLevel"> 
     
    9489    <eOperations name="getOrCreateReference" eType="#//AXNode"/> 
    9590    <eOperations name="getReference" eType="#//AXNode"/> 
     91    <eOperations name="getAllEntries" upperBound="-1" eType="#//AXEntry"/> 
     92    <eOperations name="getAllTypes" upperBound="-1" eType="#//AXEntry"/> 
     93    <eOperations name="getAllMembers" upperBound="-1" eType="#//AXEntry"/> 
     94    <eOperations name="localMember" eType="#//AXEntry"> 
     95      <eParameters name="part" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> 
     96    </eOperations> 
     97    <eOperations name="localType" eType="#//AXEntry"> 
     98      <eParameters name="part" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> 
     99    </eOperations> 
     100    <eOperations name="getMembers" upperBound="-1" eType="#//AXEntry"/> 
     101    <eOperations name="getTypes" upperBound="-1" eType="#//AXEntry"/> 
    96102    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> 
    97103    <eStructuralFeatures xsi:type="ecore:EReference" name="entries" upperBound="-1" 
     
    110116    <eLiterals name="METHOD" value="4" literal="m"/> 
    111117    <eLiterals name="PROPERTY" value="5" literal="p"/> 
    112     <eLiterals name="EVENT" value="6" literal="e"/> 
     118    <eLiterals name="CONSTANT" value="6" literal="cp"/> 
     119    <eLiterals name="EVENT" value="7" literal="e"/> 
    113120  </eClassifiers> 
    114121</ecore:EPackage> 
  • org.axdt.axdoc.model/model/AXDocXML.xsd

    r2d81bf0 r2aa064d  
    2424      <xsd:enumeration value="METHOD"/> 
    2525      <xsd:enumeration value="PROPERTY"/> 
     26      <xsd:enumeration value="CONSTANT"/> 
    2627      <xsd:enumeration value="EVENT"/> 
    2728    </xsd:restriction> 
     
    5556    <xsd:complexContent> 
    5657      <xsd:extension base="axdoc:AXMemberHolder"> 
    57         <xsd:attribute name="interface" type="xsd:boolean"/> 
     58        <xsd:attribute name="type" type="axdoc:AXEntryType"/> 
    5859      </xsd:extension> 
    5960    </xsd:complexContent> 
     
    6364    <xsd:complexContent> 
    6465      <xsd:extension base="axdoc:AXNode"> 
    65         <xsd:attribute default="true" name="var" type="xsd:boolean"/> 
    66         <xsd:attribute name="function" type="xsd:boolean"/> 
    67         <xsd:attribute name="const" type="xsd:boolean"/> 
    68         <xsd:attribute name="static" type="xsd:boolean"/> 
    69         <xsd:attribute name="protected" type="xsd:boolean"/> 
     66        <xsd:attribute name="type" type="axdoc:AXEntryType"/> 
    7067      </xsd:extension> 
    7168    </xsd:complexContent> 
  • org.axdt.axdoc.model/src/org/axdt/axdoc/model/AXDocPackage.java

    r2d81bf0 r2aa064d  
    237237 
    238238        /** 
    239          * The feature id for the '<em><b>Interface</b></em>' attribute. 
    240          * <!-- begin-user-doc --> 
    241          * <!-- end-user-doc --> 
    242          * @generated 
    243          * @ordered 
    244          */ 
    245         int AX_TYPE__INTERFACE = AX_MEMBER_HOLDER_FEATURE_COUNT + 0; 
     239         * The feature id for the '<em><b>Type</b></em>' attribute. 
     240         * <!-- begin-user-doc --> 
     241         * <!-- end-user-doc --> 
     242         * @generated 
     243         * @ordered 
     244         */ 
     245        int AX_TYPE__TYPE = AX_MEMBER_HOLDER_FEATURE_COUNT + 0; 
    246246 
    247247        /** 
     
    283283 
    284284        /** 
    285          * The feature id for the '<em><b>Var</b></em>' attribute. 
    286          * <!-- begin-user-doc --> 
    287          * <!-- end-user-doc --> 
    288          * @generated 
    289          * @ordered 
    290          */ 
    291         int AX_MEMBER__VAR = AX_NODE_FEATURE_COUNT + 0; 
    292  
    293         /** 
    294          * The feature id for the '<em><b>Function</b></em>' attribute. 
    295          * <!-- begin-user-doc --> 
    296          * <!-- end-user-doc --> 
    297          * @generated 
    298          * @ordered 
    299          */ 
    300         int AX_MEMBER__FUNCTION = AX_NODE_FEATURE_COUNT + 1; 
    301  
    302         /** 
    303          * The feature id for the '<em><b>Const</b></em>' attribute. 
    304          * <!-- begin-user-doc --> 
    305          * <!-- end-user-doc --> 
    306          * @generated 
    307          * @ordered 
    308          */ 
    309         int AX_MEMBER__CONST = AX_NODE_FEATURE_COUNT + 2; 
    310  
    311         /** 
    312          * The feature id for the '<em><b>Static</b></em>' attribute. 
    313          * <!-- begin-user-doc --> 
    314          * <!-- end-user-doc --> 
    315          * @generated 
    316          * @ordered 
    317          */ 
    318         int AX_MEMBER__STATIC = AX_NODE_FEATURE_COUNT + 3; 
    319  
    320         /** 
    321          * The feature id for the '<em><b>Protected</b></em>' attribute. 
    322          * <!-- begin-user-doc --> 
    323          * <!-- end-user-doc --> 
    324          * @generated 
    325          * @ordered 
    326          */ 
    327         int AX_MEMBER__PROTECTED = AX_NODE_FEATURE_COUNT + 4; 
     285         * The feature id for the '<em><b>Type</b></em>' attribute. 
     286         * <!-- begin-user-doc --> 
     287         * <!-- end-user-doc --> 
     288         * @generated 
     289         * @ordered 
     290         */ 
     291        int AX_MEMBER__TYPE = AX_NODE_FEATURE_COUNT + 0; 
    328292 
    329293        /** 
     
    334298         * @ordered 
    335299         */ 
    336         int AX_MEMBER_FEATURE_COUNT = AX_NODE_FEATURE_COUNT + 5; 
     300        int AX_MEMBER_FEATURE_COUNT = AX_NODE_FEATURE_COUNT + 1; 
    337301 
    338302        /** 
     
    785749 
    786750        /** 
    787          * Returns the meta object for the attribute '{@link org.axdt.axdoc.model.AXType#isInterface <em>Interface</em>}'. 
    788          * <!-- begin-user-doc --> 
    789          * <!-- end-user-doc --> 
    790          * @return the meta object for the attribute '<em>Interface</em>'. 
    791          * @see org.axdt.axdoc.model.AXType#isInterface() 
     751         * Returns the meta object for the attribute '{@link org.axdt.axdoc.model.AXType#getType <em>Type</em>}'. 
     752         * <!-- begin-user-doc --> 
     753         * <!-- end-user-doc --> 
     754         * @return the meta object for the attribute '<em>Type</em>'. 
     755         * @see org.axdt.axdoc.model.AXType#getType() 
    792756         * @see #getAXType() 
    793757         * @generated 
    794758         */ 
    795         EAttribute getAXType_Interface(); 
     759        EAttribute getAXType_Type(); 
    796760 
    797761        /** 
     
    806770 
    807771        /** 
    808          * Returns the meta object for the attribute '{@link org.axdt.axdoc.model.AXMember#isVar <em>Var</em>}'. 
    809          * <!-- begin-user-doc --> 
    810          * <!-- end-user-doc --> 
    811          * @return the meta object for the attribute '<em>Var</em>'. 
    812          * @see org.axdt.axdoc.model.AXMember#isVar() 
     772         * Returns the meta object for the attribute '{@link org.axdt.axdoc.model.AXMember#getType <em>Type</em>}'. 
     773         * <!-- begin-user-doc --> 
     774         * <!-- end-user-doc --> 
     775         * @return the meta object for the attribute '<em>Type</em>'. 
     776         * @see org.axdt.axdoc.model.AXMember#getType() 
    813777         * @see #getAXMember() 
    814778         * @generated 
    815779         */ 
    816         EAttribute getAXMember_Var(); 
    817  
    818         /** 
    819          * Returns the meta object for the attribute '{@link org.axdt.axdoc.model.AXMember#isFunction <em>Function</em>}'. 
    820          * <!-- begin-user-doc --> 
    821          * <!-- end-user-doc --> 
    822          * @return the meta object for the attribute '<em>Function</em>'. 
    823          * @see org.axdt.axdoc.model.AXMember#isFunction() 
    824          * @see #getAXMember() 
    825          * @generated 
    826          */ 
    827         EAttribute getAXMember_Function(); 
    828  
    829         /** 
    830          * Returns the meta object for the attribute '{@link org.axdt.axdoc.model.AXMember#isConst <em>Const</em>}'. 
    831          * <!-- begin-user-doc --> 
    832          * <!-- end-user-doc --> 
    833          * @return the meta object for the attribute '<em>Const</em>'. 
    834          * @see org.axdt.axdoc.model.AXMember#isConst() 
    835          * @see #getAXMember() 
    836          * @generated 
    837          */ 
    838         EAttribute getAXMember_Const(); 
    839  
    840         /** 
    841          * Returns the meta object for the attribute '{@link org.axdt.axdoc.model.AXMember#isStatic <em>Static</em>}'. 
    842          * <!-- begin-user-doc --> 
    843          * <!-- end-user-doc --> 
    844          * @return the meta object for the attribute '<em>Static</em>'. 
    845          * @see org.axdt.axdoc.model.AXMember#isStatic() 
    846          * @see #getAXMember() 
    847          * @generated 
    848          */ 
    849         EAttribute getAXMember_Static(); 
    850  
    851         /** 
    852          * Returns the meta object for the attribute '{@link org.axdt.axdoc.model.AXMember#isProtected <em>Protected</em>}'. 
    853          * <!-- begin-user-doc --> 
    854          * <!-- end-user-doc --> 
    855          * @return the meta object for the attribute '<em>Protected</em>'. 
    856          * @see org.axdt.axdoc.model.AXMember#isProtected() 
    857          * @see #getAXMember() 
    858          * @generated 
    859          */ 
    860         EAttribute getAXMember_Protected(); 
     780        EAttribute getAXMember_Type(); 
    861781 
    862782        /** 
     
    11931113 
    11941114                /** 
    1195                  * The meta object literal for the '<em><b>Interface</b></em>' attribute feature. 
    1196                  * <!-- begin-user-doc --> 
    1197                  * <!-- end-user-doc --> 
    1198                  * @generated 
    1199                  */ 
    1200                 EAttribute AX_TYPE__INTERFACE = eINSTANCE.getAXType_Interface(); 
     1115                 * The meta object literal for the '<em><b>Type</b></em>' attribute feature. 
     1116                 * <!-- begin-user-doc --> 
     1117                 * <!-- end-user-doc --> 
     1118                 * @generated 
     1119                 */ 
     1120                EAttribute AX_TYPE__TYPE = eINSTANCE.getAXType_Type(); 
    12011121 
    12021122                /** 
     
    12111131 
    12121132                /** 
    1213                  * The meta object literal for the '<em><b>Var</b></em>' attribute feature. 
    1214                  * <!-- begin-user-doc --> 
    1215                  * <!-- end-user-doc --> 
    1216                  * @generated 
    1217                  */ 
    1218                 EAttribute AX_MEMBER__VAR = eINSTANCE.getAXMember_Var(); 
    1219  
    1220                 /** 
    1221                  * The meta object literal for the '<em><b>Function</b></em>' attribute feature. 
    1222                  * <!-- begin-user-doc --> 
    1223                  * <!-- end-user-doc --> 
    1224                  * @generated 
    1225                  */ 
    1226                 EAttribute AX_MEMBER__FUNCTION = eINSTANCE.getAXMember_Function(); 
    1227  
    1228                 /** 
    1229                  * The meta object literal for the '<em><b>Const</b></em>' attribute feature. 
    1230                  * <!-- begin-user-doc --> 
    1231                  * <!-- end-user-doc --> 
    1232                  * @generated 
    1233                  */ 
    1234                 EAttribute AX_MEMBER__CONST = eINSTANCE.getAXMember_Const(); 
    1235  
    1236                 /** 
    1237                  * The meta object literal for the '<em><b>Static</b></em>' attribute feature. 
    1238                  * <!-- begin-user-doc --> 
    1239                  * <!-- end-user-doc --> 
    1240                  * @generated 
    1241                  */ 
    1242                 EAttribute AX_MEMBER__STATIC = eINSTANCE.getAXMember_Static(); 
    1243  
    1244                 /** 
    1245                  * The meta object literal for the '<em><b>Protected</b></em>' attribute feature. 
    1246                  * <!-- begin-user-doc --> 
    1247                  * <!-- end-user-doc --> 
    1248                  * @generated 
    1249                  */ 
    1250                 EAttribute AX_MEMBER__PROTECTED = eINSTANCE.getAXMember_Protected(); 
     1133                 * The meta object literal for the '<em><b>Type</b></em>' attribute feature. 
     1134                 * <!-- begin-user-doc --> 
     1135                 * <!-- end-user-doc --> 
     1136                 * @generated 
     1137                 */ 
     1138                EAttribute AX_MEMBER__TYPE = eINSTANCE.getAXMember_Type(); 
    12511139 
    12521140                /** 
  • org.axdt.axdoc.model/src/org/axdt/axdoc/model/AXEntryType.java

    r79dd699 r2aa064d  
    8484 
    8585        /** 
     86         * The '<em><b>CONSTANT</b></em>' literal object. 
     87         * <!-- begin-user-doc --> 
     88         * <!-- end-user-doc --> 
     89         * @see #CONSTANT_VALUE 
     90         * @generated 
     91         * @ordered 
     92         */ 
     93        CONSTANT(6, "CONSTANT", "cp"), /** 
    8694         * The '<em><b>EVENT</b></em>' literal object. 
    8795         * <!-- begin-user-doc --> 
     
    9199         * @ordered 
    92100         */ 
    93         EVENT(6, "EVENT", "e"); 
     101        EVENT(7, "EVENT", "e"); 
    94102 
    95103        /** 
     
    184192 
    185193        /** 
     194         * The '<em><b>CONSTANT</b></em>' literal value. 
     195         * <!-- begin-user-doc --> 
     196         * <p> 
     197         * If the meaning of '<em><b>CONSTANT</b></em>' literal object isn't clear, 
     198         * there really should be more of a description here... 
     199         * </p> 
     200         * <!-- end-user-doc --> 
     201         * @see #CONSTANT 
     202         * @model literal="cp" 
     203         * @generated 
     204         * @ordered 
     205         */ 
     206        public static final int CONSTANT_VALUE = 6; 
     207 
     208        /** 
    186209         * The '<em><b>EVENT</b></em>' literal value. 
    187210         * <!-- begin-user-doc --> 
     
    196219         * @ordered 
    197220         */ 
    198         public static final int EVENT_VALUE = 6; 
     221        public static final int EVENT_VALUE = 7; 
    199222 
    200223        /** 
     
    205228         */ 
    206229        private static final AXEntryType[] VALUES_ARRAY = new AXEntryType[] { NONE, 
    207                         CLASS, INTERFACE, CONSTRUCTOR, METHOD, PROPERTY, EVENT, }; 
     230                        CLASS, INTERFACE, CONSTRUCTOR, METHOD, PROPERTY, CONSTANT, EVENT, }; 
    208231 
    209232        /** 
     
    268291                case PROPERTY_VALUE: 
    269292                        return PROPERTY; 
     293                case CONSTANT_VALUE: 
     294                        return CONSTANT; 
    270295                case EVENT_VALUE: 
    271296                        return EVENT; 
     
    350375 
    351376        public boolean isMember() { 
    352                 return value == METHOD_VALUE || value == PROPERTY_VALUE 
    353                                 || value == CONSTRUCTOR_VALUE; 
     377                return !isType(); 
     378        } 
     379 
     380        public boolean isFunction() { 
     381                return value == METHOD_VALUE || value == CONSTANT_VALUE; 
    354382        } 
    355383 
  • org.axdt.axdoc.model/src/org/axdt/axdoc/model/AXIndexNode.java

    r2d81bf0 r2aa064d  
    160160        AXNode getReference(); 
    161161 
     162        /** 
     163         * <!-- begin-user-doc --> 
     164         * <!-- end-user-doc --> 
     165         * @model kind="operation" 
     166         * @generated 
     167         */ 
     168        EList<AXEntry> getAllEntries(); 
     169 
     170        /** 
     171         * <!-- begin-user-doc --> 
     172         * <!-- end-user-doc --> 
     173         * @model kind="operation" 
     174         * @generated 
     175         */ 
     176        EList<AXEntry> getAllTypes(); 
     177 
     178        /** 
     179         * <!-- begin-user-doc --> 
     180         * <!-- end-user-doc --> 
     181         * @model kind="operation" 
     182         * @generated 
     183         */ 
     184        EList<AXEntry> getAllMembers(); 
     185 
     186        /** 
     187         * <!-- begin-user-doc --> 
     188         * <!-- end-user-doc --> 
     189         * @model 
     190         * @generated 
     191         */ 
     192        AXEntry localMember(String part); 
     193 
     194        /** 
     195         * <!-- begin-user-doc --> 
     196         * <!-- end-user-doc --> 
     197         * @model 
     198         * @generated 
     199         */ 
     200        AXEntry localType(String part); 
     201 
     202        /** 
     203         * <!-- begin-user-doc --> 
     204         * <!-- end-user-doc --> 
     205         * @model kind="operation" 
     206         * @generated 
     207         */ 
     208        EList<AXEntry> getMembers(); 
     209 
     210        /** 
     211         * <!-- begin-user-doc --> 
     212         * <!-- end-user-doc --> 
     213         * @model kind="operation" 
     214         * @generated 
     215         */ 
     216        EList<AXEntry> getTypes(); 
     217 
    162218} // AXIndexNode 
  • org.axdt.axdoc.model/src/org/axdt/axdoc/model/AXMember.java

    r79dd699 r2aa064d  
    1515 * The following features are supported: 
    1616 * <ul> 
    17  *   <li>{@link org.axdt.axdoc.model.AXMember#isVar <em>Var</em>}</li> 
    18  *   <li>{@link org.axdt.axdoc.model.AXMember#isFunction <em>Function</em>}</li> 
    19  *   <li>{@link org.axdt.axdoc.model.AXMember#isConst <em>Const</em>}</li> 
    20  *   <li>{@link org.axdt.axdoc.model.AXMember#isStatic <em>Static</em>}</li> 
    21  *   <li>{@link org.axdt.axdoc.model.AXMember#isProtected <em>Protected</em>}</li> 
     17 *   <li>{@link org.axdt.axdoc.model.AXMember#getType <em>Type</em>}</li> 
    2218 * </ul> 
    2319 * </p> 
     
    3026 
    3127        /** 
    32          * Returns the value of the '<em><b>Var</b></em>' attribute. 
    33          * The default value is <code>"true"</code>. 
     28         * Returns the value of the '<em><b>Type</b></em>' attribute. 
     29         * The literals are from the enumeration {@link org.axdt.axdoc.model.AXEntryType}. 
    3430         * <!-- begin-user-doc --> 
    3531         * <p> 
    36          * If the meaning of the '<em>Var</em>' attribute isn't clear, 
     32         * If the meaning of the '<em>Type</em>' attribute isn't clear, 
    3733         * there really should be more of a description here... 
    3834         * </p> 
    3935         * <!-- end-user-doc --> 
    40          * @return the value of the '<em>Var</em>' attribute. 
    41          * @see #setVar(boolean) 
    42          * @see org.axdt.axdoc.model.AXDocPackage#getAXMember_Var() 
    43          * @model default="true" 
    44          * @generated 
    45          */ 
    46         boolean isVar(); 
    47  
    48         /** 
    49          * Sets the value of the '{@link org.axdt.axdoc.model.AXMember#isVar <em>Var</em>}' attribute. 
    50          * <!-- begin-user-doc --> 
    51          * <!-- end-user-doc --> 
    52          * @param value the new value of the '<em>Var</em>' attribute. 
    53          * @see #isVar() 
    54          * @generated 
    55          */ 
    56         void setVar(boolean value); 
    57  
    58         /** 
    59          * Returns the value of the '<em><b>Function</b></em>' attribute. 
    60          * <!-- begin-user-doc --> 
    61          * <p> 
    62          * If the meaning of the '<em>Function</em>' attribute isn't clear, 
    63          * there really should be more of a description here... 
    64          * </p> 
    65          * <!-- end-user-doc --> 
    66          * @return the value of the '<em>Function</em>' attribute. 
    67          * @see #setFunction(boolean) 
    68          * @see org.axdt.axdoc.model.AXDocPackage#getAXMember_Function() 
     36         * @return the value of the '<em>Type</em>' attribute. 
     37         * @see org.axdt.axdoc.model.AXEntryType 
     38         * @see #setType(AXEntryType) 
     39         * @see org.axdt.axdoc.model.AXDocPackage#getAXMember_Type() 
    6940         * @model 
    7041         * @generated 
    7142         */ 
    72         boolean isFunction(); 
     43        AXEntryType getType(); 
    7344 
    7445        /** 
    75          * Sets the value of the '{@link org.axdt.axdoc.model.AXMember#isFunction <em>Function</em>}' attribute. 
     46         * Sets the value of the '{@link org.axdt.axdoc.model.AXMember#getType <em>Type</em>}' attribute. 
    7647         * <!-- begin-user-doc --> 
    7748         * <!-- end-user-doc --> 
    78          * @param value the new value of the '<em>Function</em>' attribute. 
    79          * @see #isFunction() 
     49         * @param value the new value of the '<em>Type</em>' attribute. 
     50         * @see org.axdt.axdoc.model.AXEntryType 
     51         * @see #getType() 
    8052         * @generated 
    8153         */ 
    82         void setFunction(boolean value); 
    83  
    84         /** 
    85          * Returns the value of the '<em><b>Const</b></em>' attribute. 
    86          * <!-- begin-user-doc --> 
    87          * <p> 
    88          * If the meaning of the '<em>Const</em>' attribute isn't clear, 
    89          * there really should be more of a description here... 
    90          * </p> 
    91          * <!-- end-user-doc --> 
    92          * @return the value of the '<em>Const</em>' attribute. 
    93          * @see #setConst(boolean) 
    94          * @see org.axdt.axdoc.model.AXDocPackage#getAXMember_Const() 
    95          * @model 
    96          * @generated 
    97          */ 
    98         boolean isConst(); 
    99  
    100         /** 
    101          * Sets the value of the '{@link org.axdt.axdoc.model.AXMember#isConst <em>Const</em>}' attribute. 
    102          * <!-- begin-user-doc --> 
    103          * <!-- end-user-doc --> 
    104          * @param value the new value of the '<em>Const</em>' attribute. 
    105          * @see #isConst() 
    106          * @generated 
    107          */ 
    108         void setConst(boolean value); 
    109  
    110         /** 
    111          * Returns the value of the '<em><b>Static</b></em>' attribute. 
    112          * <!-- begin-user-doc --> 
    113          * <p> 
    114          * If the meaning of the '<em>Static</em>' attribute isn't clear, 
    115          * there really should be more of a description here... 
    116          * </p> 
    117          * <!-- end-user-doc --> 
    118          * @return the value of the '<em>Static</em>' attribute. 
    119          * @see #setStatic(boolean) 
    120          * @see org.axdt.axdoc.model.AXDocPackage#getAXMember_Static() 
    121          * @model 
    122          * @generated 
    123          */ 
    124         boolean isStatic(); 
    125  
    126         /** 
    127          * Sets the value of the '{@link org.axdt.axdoc.model.AXMember#isStatic <em>Static</em>}' attribute. 
    128          * <!-- begin-user-doc --> 
    129          * <!-- end-user-doc --> 
    130          * @param value the new value of the '<em>Static</em>' attribute. 
    131          * @see #isStatic() 
    132          * @generated 
    133          */ 
    134         void setStatic(boolean value); 
    135  
    136         /** 
    137          * Returns the value of the '<em><b>Protected</b></em>' attribute. 
    138          * <!-- begin-user-doc --> 
    139          * <p> 
    140          * If the meaning of the '<em>Protected</em>' attribute isn't clear, 
    141          * there really should be more of a description here... 
    142          * </p> 
    143          * <!-- end-user-doc --> 
    144          * @return the value of the '<em>Protected</em>' attribute. 
    145          * @see #setProtected(boolean) 
    146          * @see org.axdt.axdoc.model.AXDocPackage#getAXMember_Protected() 
    147          * @model 
    148          * @generated 
    149          */ 
    150         boolean isProtected(); 
    151  
    152         /** 
    153          * Sets the value of the '{@link org.axdt.axdoc.model.AXMember#isProtected <em>Protected</em>}' attribute. 
    154          * <!-- begin-user-doc --> 
    155          * <!-- end-user-doc --> 
    156          * @param value the new value of the '<em>Protected</em>' attribute. 
    157          * @see #isProtected() 
    158          * @generated 
    159          */ 
    160         void setProtected(boolean value); 
     54        void setType(AXEntryType value); 
    16155} // AXMember 
  • org.axdt.axdoc.model/src/org/axdt/axdoc/model/AXMemberHolder.java

    r79dd699 r2aa064d  
    3737         * @return the value of the '<em>Members</em>' containment reference list. 
    3838         * @see org.axdt.axdoc.model.AXDocPackage#getAXMemberHolder_Members() 
    39          * @model containment="true" keys="name function" 
     39         * @model containment="true" keys="name" 
    4040         * @generated 
    4141         */ 
  • org.axdt.axdoc.model/src/org/axdt/axdoc/model/AXType.java

    r79dd699 r2aa064d  
    1515 * The following features are supported: 
    1616 * <ul> 
    17  *   <li>{@link org.axdt.axdoc.model.AXType#isInterface <em>Interface</em>}</li> 
     17 *   <li>{@link org.axdt.axdoc.model.AXType#getType <em>Type</em>}</li> 
    1818 * </ul> 
    1919 * </p> 
     
    2525public interface AXType extends AXMemberHolder { 
    2626        /** 
    27          * Returns the value of the '<em><b>Interface</b></em>' attribute. 
     27         * Returns the value of the '<em><b>Type</b></em>' attribute. 
     28         * The literals are from the enumeration {@link org.axdt.axdoc.model.AXEntryType}. 
    2829         * <!-- begin-user-doc --> 
    2930         * <p> 
    30          * If the meaning of the '<em>Interface</em>' attribute isn't clear, 
     31         * If the meaning of the '<em>Type</em>' attribute isn't clear, 
    3132         * there really should be more of a description here... 
    3233         * </p> 
    3334         * <!-- end-user-doc --> 
    34          * @return the value of the '<em>Interface</em>' attribute. 
    35          * @see #setInterface(boolean) 
    36          * @see org.axdt.axdoc.model.AXDocPackage#getAXType_Interface() 
     35         * @return the value of the '<em>Type</em>' attribute. 
     36         * @see org.axdt.axdoc.model.AXEntryType 
     37         * @see #setType(AXEntryType) 
     38         * @see org.axdt.axdoc.model.AXDocPackage#getAXType_Type() 
    3739         * @model 
    3840         * @generated 
    3941         */ 
    40         boolean isInterface(); 
     42        AXEntryType getType(); 
    4143 
    4244        /** 
    43          * Sets the value of the '{@link org.axdt.axdoc.model.AXType#isInterface <em>Interface</em>}' attribute. 
     45         * Sets the value of the '{@link org.axdt.axdoc.model.AXType#getType <em>Type</em>}' attribute. 
    4446         * <!-- begin-user-doc --> 
    4547         * <!-- end-user-doc --> 
    46          * @param value the new value of the '<em>Interface</em>' attribute. 
    47          * @see #isInterface() 
     48         * @param value the new value of the '<em>Type</em>' attribute. 
     49         * @see org.axdt.axdoc.model.AXEntryType 
     50         * @see #getType() 
    4851         * @generated 
    4952         */ 
    50         void setInterface(boolean value); 
     53        void setType(AXEntryType value); 
    5154 
    5255} // AXType 
  • org.axdt.axdoc.model/src/org/axdt/axdoc/model/impl/AXDocPackageImpl.java

    r2d81bf0 r2aa064d  
    252252         * @generated 
    253253         */ 
    254         public EAttribute getAXType_Interface() { 
     254        public EAttribute getAXType_Type() { 
    255255                return (EAttribute) axTypeEClass.getEStructuralFeatures().get(0); 
    256256        } 
     
    270270         * @generated 
    271271         */ 
    272         public EAttribute getAXMember_Var() { 
     272        public EAttribute getAXMember_Type() { 
    273273                return (EAttribute) axMemberEClass.getEStructuralFeatures().get(0); 
    274         } 
    275  
    276         /** 
    277          * <!-- begin-user-doc --> 
    278          * <!-- end-user-doc --> 
    279          * @generated 
    280          */ 
    281         public EAttribute getAXMember_Function() { 
    282                 return (EAttribute) axMemberEClass.getEStructuralFeatures().get(1); 
    283         } 
    284  
    285         /** 
    286          * <!-- begin-user-doc --> 
    287          * <!-- end-user-doc --> 
    288          * @generated 
    289          */ 
    290         public EAttribute getAXMember_Const() { 
    291                 return (EAttribute) axMemberEClass.getEStructuralFeatures().get(2); 
    292         } 
    293  
    294         /** 
    295          * <!-- begin-user-doc --> 
    296          * <!-- end-user-doc --> 
    297          * @generated 
    298          */ 
    299         public EAttribute getAXMember_Static() { 
    300                 return (EAttribute) axMemberEClass.getEStructuralFeatures().get(3); 
    301         } 
    302  
    303         /** 
    304          * <!-- begin-user-doc --> 
    305          * <!-- end-user-doc --> 
    306          * @generated 
    307          */ 
    308         public EAttribute getAXMember_Protected() { 
    309                 return (EAttribute) axMemberEClass.getEStructuralFeatures().get(4); 
    310274        } 
    311275 
     
    567531 
    568532                axTypeEClass = createEClass(AX_TYPE); 
    569                 createEAttribute(axTypeEClass, AX_TYPE__INTERFACE); 
     533                createEAttribute(axTypeEClass, AX_TYPE__TYPE); 
    570534 
    571535                axMemberEClass = createEClass(AX_MEMBER); 
    572                 createEAttribute(axMemberEClass, AX_MEMBER__VAR); 
    573                 createEAttribute(axMemberEClass, AX_MEMBER__FUNCTION); 
    574                 createEAttribute(axMemberEClass, AX_MEMBER__CONST); 
    575                 createEAttribute(axMemberEClass, AX_MEMBER__STATIC); 
    576                 createEAttribute(axMemberEClass, AX_MEMBER__PROTECTED); 
     536                createEAttribute(axMemberEClass, AX_MEMBER__TYPE); 
    577537 
    578538                axIndexEClass = createEClass(AX_INDEX); 
     
    662622                                !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 
    663623                getAXMemberHolder_Members().getEKeys().add(this.getAXNode_Name()); 
    664                 getAXMemberHolder_Members().getEKeys().add(this.getAXMember_Function()); 
    665624 
    666625                initEClass(axPackageEClass, AXPackage.class, "AXPackage", !IS_ABSTRACT, 
     
    674633                initEClass(axTypeEClass, AXType.class, "AXType", !IS_ABSTRACT, 
    675634                                !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 
    676                 initEAttribute(getAXType_Interface(), ecorePackage.getEBoolean(), 
    677                                 "interface", null, 0, 1, AXType.class, !IS_TRANSIENT, 
    678                                 !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, 
    679                                 !IS_DERIVED, IS_ORDERED); 
     635                initEAttribute(getAXType_Type(), this.getAXEntryType(), "type", null, 
     636                                0, 1, AXType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, 
     637                                !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 
    680638 
    681639                initEClass(axMemberEClass, AXMember.class, "AXMember", !IS_ABSTRACT, 
    682640                                !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 
    683                 initEAttribute(getAXMember_Var(), ecorePackage.getEBoolean(), "var", 
    684                                 "true", 0, 1, AXMember.class, !IS_TRANSIENT, !IS_VOLATILE, 
     641                initEAttribute(getAXMember_Type(), this.getAXEntryType(), "type", null, 
     642                                0, 1, AXMember.class, !IS_TRANSIENT, !IS_VOLATILE, 
    685643                                IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, 
    686644                                IS_ORDERED); 
    687                 initEAttribute(getAXMember_Function(), ecorePackage.getEBoolean(), 
    688                                 "function", null, 0, 1, AXMember.class, !IS_TRANSIENT, 
    689                                 !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, 
    690                                 !IS_DERIVED, IS_ORDERED); 
    691                 initEAttribute(getAXMember_Const(), ecorePackage.getEBoolean(), 
    692                                 "const", null, 0, 1, AXMember.class, !IS_TRANSIENT, 
    693                                 !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, 
    694                                 !IS_DERIVED, IS_ORDERED); 
    695                 initEAttribute(getAXMember_Static(), ecorePackage.getEBoolean(), 
    696                                 "static", null, 0, 1, AXMember.class, !IS_TRANSIENT, 
    697                                 !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, 
    698                                 !IS_DERIVED, IS_ORDERED); 
    699                 initEAttribute(getAXMember_Protected(), ecorePackage.getEBoolean(), 
    700                                 "protected", null, 0, 1, AXMember.class, !IS_TRANSIENT, 
    701                                 !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, 
    702                                 !IS_DERIVED, IS_ORDERED); 
    703645 
    704646                initEClass(axIndexEClass, AXIndex.class, "AXIndex", !IS_ABSTRACT, 
     
    833775                                1, IS_UNIQUE, IS_ORDERED); 
    834776 
     777                addEOperation(axIndexNodeEClass, this.getAXEntry(), "getAllEntries", 0, 
     778                                -1, IS_UNIQUE, IS_ORDERED); 
     779 
     780                addEOperation(axIndexNodeEClass, this.getAXEntry(), "getAllTypes", 0, 
     781                                -1, IS_UNIQUE, IS_ORDERED); 
     782 
     783                addEOperation(axIndexNodeEClass, this.getAXEntry(), "getAllMembers", 0, 
     784                                -1, IS_UNIQUE, IS_ORDERED); 
     785 
     786                op = addEOperation(axIndexNodeEClass, this.getAXEntry(), "localMember", 
     787                                0, 1, IS_UNIQUE, IS_ORDERED); 
     788                addEParameter(op, ecorePackage.getEString(), "part", 0, 1, IS_UNIQUE, 
     789                                IS_ORDERED); 
     790 
     791                op = addEOperation(axIndexNodeEClass, this.getAXEntry(), "localType", 
     792                                0, 1, IS_UNIQUE, IS_ORDERED); 
     793                addEParameter(op, ecorePackage.getEString(), "part", 0, 1, IS_UNIQUE, 
     794                                IS_ORDERED); 
     795 
     796                addEOperation(axIndexNodeEClass, this.getAXEntry(), "getMembers", 0, 
     797                                -1, IS_UNIQUE, IS_ORDERED); 
     798 
     799                addEOperation(axIndexNodeEClass, this.getAXEntry(), "getTypes", 0, -1, 
     800                                IS_UNIQUE, IS_ORDERED); 
     801 
    835802                // Initialize enums and add enum literals 
    836803                initEEnum(axLevelEEnum, AXLevel.class, "AXLevel"); 
     
    852819                addEEnumLiteral(axEntryTypeEEnum, AXEntryType.METHOD); 
    853820                addEEnumLiteral(axEntryTypeEEnum, AXEntryType.PROPERTY); 
     821                addEEnumLiteral(axEntryTypeEEnum, AXEntryType.CONSTANT); 
    854822                addEEnumLiteral(axEntryTypeEEnum, AXEntryType.EVENT); 
    855823 
  • org.axdt.axdoc.model/src/org/axdt/axdoc/model/impl/AXEntryImpl.java

    r25b5d22 r2aa064d  
    401401                        return null; 
    402402                String url = name; 
     403                if (type != null && type.isFunction()) { 
     404                        url += "()"; 
     405                } 
    403406                AXIndexNode parent = getParent(); 
    404                 if (getRoot() != null && AXRootType.SOURCE.equals(getRoot().getRootType())) { 
     407                if (getRoot() != null 
     408                                && AXRootType.SOURCE.equals(getRoot().getRootType())) { 
    405409                        url += ".as"; 
    406410                } else if (getType().isType()) { 
     
    427431         */ 
    428432        public String getId() { 
    429                 if (id == null && name != null) { 
     433                if (this.id != null) return this.id; 
     434                if (name != null) { 
    430435                        AXIndexNode parent = getParent(); 
    431                         if (parent == null || parent instanceof AXRoot) { 
    432                                 id = name; 
     436                        if (parent == null && parent instanceof AXRoot) { 
     437                                id = "::"+name +"#"+ getType(); 
    433438                        } else { 
    434439                                id = parent.getId(); 
    435440                                id += parent instanceof AXIndex ? "::" : "."; 
    436                                 id += name; 
     441                                id += name +"#"+ getType(); 
    437442                        } 
    438443                } 
     
    475480                                        result = AXDocFactory.eINSTANCE.createAXMember(); 
    476481                                        result.setName(getName()); 
    477                                         if (getType().equals(AXEntryType.METHOD)) 
    478                                                 result.setFunction(true); 
    479                                         else if (getType().equals(AXEntryType.CONSTRUCTOR)) 
    480                                                 result.setConst(true); 
    481                                         else if (getType().equals(AXEntryType.PROPERTY)) 
    482                                                 result.setVar(true); 
     482                                        result.setType(getType()); 
    483483                                        holder.getMembers().add(result); 
    484484                                } 
     
    501501                                        result = AXDocFactory.eINSTANCE.createAXType(); 
    502502                                        result.setName(getName()); 
    503                                         if (getType().equals(AXEntryType.INTERFACE)) { 
    504                                                 result.setInterface(true); 
    505                                         } 
     503                                        result.setType(getType()); 
    506504                                        pack.getTypes().add(result); 
    507505                                } 
  • org.axdt.axdoc.model/src/org/axdt/axdoc/model/impl/AXIndexImpl.java

    r2d81bf0 r2aa064d  
    295295                        result.setName(part); 
    296296                        result.setParent(this); 
     297                } 
     298                return result; 
     299        } 
     300 
     301        protected EList<AXEntry> collectAllEntries(EList<AXEntry> result, 
     302                        boolean filterTypes, boolean filterMembers) { 
     303                super.collectAllEntries(result, filterTypes, filterMembers); 
     304                for (AXIndex index : getIndexes()) { 
     305                        if (index instanceof AXIndexImpl) { 
     306                                ((AXIndexImpl) index).collectAllEntries(result, filterTypes, 
     307                                                filterMembers); 
     308                        } 
    297309                } 
    298310                return result; 
  • org.axdt.axdoc.model/src/org/axdt/axdoc/model/impl/AXIndexNodeImpl.java

    r2d81bf0 r2aa064d  
    264264         * <!-- begin-user-doc --> 
    265265         * <!-- end-user-doc --> 
     266         */ 
     267        public EList<AXEntry> getAllEntries() { 
     268                BasicEList<AXEntry> result = new BasicEList<AXEntry>(); 
     269                return collectAllEntries(result, false, false); 
     270        } 
     271 
     272        /** 
     273         * <!-- begin-user-doc --> 
     274         * <!-- end-user-doc --> 
     275         */ 
     276        public EList<AXEntry> getAllTypes() { 
     277                BasicEList<AXEntry> result = new BasicEList<AXEntry>(); 
     278                return collectAllEntries(result, false, true); 
     279        } 
     280 
     281        /** 
     282         * <!-- begin-user-doc --> 
     283         * <!-- end-user-doc --> 
     284         */ 
     285        public EList<AXEntry> getAllMembers() { 
     286                BasicEList<AXEntry> result = new BasicEList<AXEntry>(); 
     287                return collectAllEntries(result, true, false); 
     288        } 
     289 
     290        /** 
     291         * <!-- begin-user-doc --> 
     292         * <!-- end-user-doc --> 
     293         */ 
     294        public AXEntry localMember(String part) { 
     295                return localEntry(part, true); 
     296        } 
     297 
     298        /** 
     299         * <!-- begin-user-doc --> 
     300         * <!-- end-user-doc --> 
     301         */ 
     302        public AXEntry localType(String part) { 
     303                return localEntry(part, false); 
     304        } 
     305 
     306        /** 
     307         * <!-- begin-user-doc --> 
     308         * <!-- end-user-doc --> 
     309         */ 
     310        public EList<AXEntry> getMembers() { 
     311                BasicEList<AXEntry> result = new BasicEList<AXEntry>(); 
     312                return collectEntries(result, true, false); 
     313        } 
     314 
     315        /** 
     316         * <!-- begin-user-doc --> 
     317         * <!-- end-user-doc --> 
     318         */ 
     319        public EList<AXEntry> getTypes() { 
     320                BasicEList<AXEntry> result = new BasicEList<AXEntry>(); 
     321                return collectEntries(result, false, true); 
     322        } 
     323 
     324        protected EList<AXEntry> collectAllEntries(EList<AXEntry> result, 
     325                        boolean filterTypes, boolean filterMembers) { 
     326                this.collectEntries(result, filterTypes, filterMembers); 
     327                for (AXEntry entry : getEntries()) { 
     328                        if (entry instanceof AXIndexNodeImpl) 
     329                                ((AXIndexNodeImpl) entry).collectAllEntries(result, 
     330                                                filterTypes, filterMembers); 
     331                } 
     332                return result; 
     333        } 
     334 
     335        protected EList<AXEntry> collectEntries(EList<AXEntry> result, 
     336                        boolean filterTypes, boolean filterMembers) { 
     337                for (AXEntry entry : getEntries()) { 
     338                        AXEntryType entryType = entry.getType(); 
     339                        // include entries with undisclosed entry type 
     340                        if (entryType != null) { 
     341                                if (filterTypes && entryType.isType()) { 
     342                                        continue; 
     343                                } 
     344                                if (filterMembers && entryType.isMember()) { 
     345                                        continue; 
     346                                } 
     347                        } 
     348                        result.add(entry); 
     349                } 
     350                return result; 
     351        } 
     352 
     353        /** 
     354         * <!-- begin-user-doc --> 
     355         * <!-- end-user-doc --> 
    266356         * @generated 
    267357         */ 
  • org.axdt.axdoc.model/src/org/axdt/axdoc/model/impl/AXMemberImpl.java

    r79dd699 r2aa064d  
    1010 
    1111import org.axdt.axdoc.model.AXDocPackage; 
     12import org.axdt.axdoc.model.AXEntryType; 
    1213import org.axdt.axdoc.model.AXMember; 
    1314import org.eclipse.emf.common.notify.Notification; 
     
    2223 * The following features are implemented: 
    2324 * <ul> 
    24  *   <li>{@link org.axdt.axdoc.model.impl.AXMemberImpl#isVar <em>Var</em>}</li> 
    25  *   <li>{@link org.axdt.axdoc.model.impl.AXMemberImpl#isFunction <em>Function</em>}</li> 
    26  *   <li>{@link org.axdt.axdoc.model.impl.AXMemberImpl#isConst <em>Const</em>}</li> 
    27  *   <li>{@link org.axdt.axdoc.model.impl.AXMemberImpl#isStatic <em>Static</em>}</li> 
    28  *   <li>{@link org.axdt.axdoc.model.impl.AXMemberImpl#isProtected <em>Protected</em>}</li> 
     25 *   <li>{@link org.axdt.axdoc.model.impl.AXMemberImpl#getType <em>Type</em>}</li> 
    2926 * </ul> 
    3027 * </p> 
     
    3431public class AXMemberImpl extends AXNodeImpl implements AXMember { 
    3532        /** 
    36          * The default value of the '{@link #isVar() <em>Var</em>}' attribute. 
     33         * The default value of the '{@link #getType() <em>Type</em>}' attribute. 
    3734         * <!-- begin-user-doc --> 
    3835         * <!-- end-user-doc --> 
    39          * @see #isVar() 
     36         * @see #getType() 
    4037         * @generated 
    4138         * @ordered 
    4239         */ 
    43         protected static final boolean VAR_EDEFAULT = true; 
     40        protected static final AXEntryType TYPE_EDEFAULT = AXEntryType.NONE; 
    4441        /** 
    45          * The flag representing the value of the '{@link #isVar() <em>Var</em>}' attribute. 
     42         * The cached value of the '{@link #getType() <em>Type</em>}' attribute. 
    4643         * <!-- begin-user-doc --> 
    4744         * <!-- end-user-doc --> 
    48          * @see #isVar() 
     45         * @see #getType() 
    4946         * @generated 
    5047         * @ordered 
    5148         */ 
    52         protected static final int VAR_EFLAG = 1 << 0; 
    53         /** 
    54          * The default value of the '{@link #isFunction() <em>Function</em>}' attribute. 
    55          * <!-- begin-user-doc --> 
    56          * <!-- end-user-doc --> 
    57          * @see #isFunction() 
    58          * @generated 
    59          * @ordered 
    60          */ 
    61         protected static final boolean FUNCTION_EDEFAULT = false; 
    62         /** 
    63          * The flag representing the value of the '{@link #isFunction() <em>Function</em>}' attribute. 
    64          * <!-- begin-user-doc --> 
    65          * <!-- end-user-doc --> 
    66          * @see #isFunction() 
    67          * @generated 
    68          * @ordered 
    69          */ 
    70         protected static final int FUNCTION_EFLAG = 1 << 1; 
    71         /** 
    72          * The default value of the '{@link #isConst() <em>Const</em>}' attribute. 
    73          * <!-- begin-user-doc --> 
    74          * <!-- end-user-doc --> 
    75          * @see #isConst() 
    76          * @generated 
    77          * @ordered 
    78          */ 
    79         protected static final boolean CONST_EDEFAULT = false; 
    80         /** 
    81          * The flag representing the value of the '{@link #isConst() <em>Const</em>}' attribute. 
    82          * <!-- begin-user-doc --> 
    83          * <!-- end-user-doc --> 
    84          * @see #isConst() 
    85          * @generated 
    86          * @ordered 
    87          */ 
    88         protected static final int CONST_EFLAG = 1 << 2; 
    89         /** 
    90          * The default value of the '{@link #isStatic() <em>Static</em>}' attribute. 
    91          * <!-- begin-user-doc --> 
    92          * <!-- end-user-doc --> 
    93          * @see #isStatic() 
    94          * @generated 
    95          * @ordered 
    96          */ 
    97         protected static final boolean STATIC_EDEFAULT = false; 
    98         /** 
    99          * The flag representing the value of the '{@link #isStatic() <em>Static</em>}' attribute. 
    100          * <!-- begin-user-doc --> 
    101          * <!-- end-user-doc --> 
    102          * @see #isStatic() 
    103          * @generated 
    104          * @ordered 
    105          */ 
    106         protected static final int STATIC_EFLAG = 1 << 3; 
    107         /** 
    108          * The default value of the '{@link #isProtected() <em>Protected</em>}' attribute. 
    109          * <!-- begin-user-doc --> 
    110          * <!-- end-user-doc --> 
    111          * @see #isProtected() 
    112          * @generated 
    113          * @ordered 
    114          */ 
    115         protected static final boolean PROTECTED_EDEFAULT = false; 
    116         /** 
    117          * The flag representing the value of the '{@link #isProtected() <em>Protected</em>}' attribute. 
    118          * <!-- begin-user-doc --> 
    119          * <!-- end-user-doc --> 
    120          * @see #isProtected() 
    121          * @generated 
    122          * @ordered 
    123          */ 
    124         protected static final int PROTECTED_EFLAG = 1 << 4; 
     49        protected AXEntryType type = TYPE_EDEFAULT; 
    12550 
    12651        /** 
     
    13156        protected AXMemberImpl() { 
    13257                super(); 
    133                 flags |= VAR_EFLAG; 
    13458        } 
    13559 
     
    14973         * @generated 
    15074         */ 
    151         public boolean isVar() { 
    152                 return (flags & VAR_EFLAG) != 0; 
     75        public AXEntryType getType() { 
     76                return type; 
    15377        } 
    15478 
     
    15882         * @generated 
    15983         */ 
    160         public void setVar(boolean newVar) { 
    161                 boolean oldVar = (flags & VAR_EFLAG) != 0; 
    162                 if (newVar) 
    163                         flags |= VAR_EFLAG; 
    164                 else 
    165                         flags &= ~VAR_EFLAG; 
     84        public void setType(AXEntryType newType) { 
     85                AXEntryType oldType = type; 
     86                type = newType == null ? TYPE_EDEFAULT : newType; 
    16687                if (eNotificationRequired()) 
    16788                        eNotify(new ENotificationImpl(this, Notification.SET, 
    168                                         AXDocPackage.AX_MEMBER__VAR, oldVar, newVar)); 
    169         } 
    170  
    171         /** 
    172          * <!-- begin-user-doc --> 
    173          * <!-- end-user-doc --> 
    174          * @generated 
    175          */ 
    176         public boolean isFunction() { 
    177                 return (flags & FUNCTION_EFLAG) != 0; 
    178         } 
    179  
    180         /** 
    181          * <!-- begin-user-doc --> 
    182          * <!-- end-user-doc --> 
    183          * @generated 
    184          */ 
    185         public void setFunction(boolean newFunction) { 
    186                 boolean oldFunction = (flags & FUNCTION_EFLAG) != 0; 
    187                 if (newFunction) 
    188                         flags |= FUNCTION_EFLAG; 
    189                 else 
    190                         flags &= ~FUNCTION_EFLAG; 
    191                 if (eNotificationRequired()) 
    192                         eNotify(new ENotificationImpl(this, Notification.SET, 
    193                                         AXDocPackage.AX_MEMBER__FUNCTION, oldFunction, newFunction)); 
    194         } 
    195  
    196         /** 
    197          * <!-- begin-user-doc --> 
    198          * <!-- end-user-doc --> 
    199          * @generated 
    200          */ 
    201         public boolean isConst() { 
    202                 return (flags & CONST_EFLAG) != 0; 
    203         } 
    204  
    205         /** 
    206          * <!-- begin-user-doc --> 
    207          * <!-- end-user-doc --> 
    208          * @generated 
    209          */ 
    210         public void setConst(boolean newConst) { 
    211                 boolean oldConst = (flags & CONST_EFLAG) != 0; 
    212                 if (newConst) 
    213                         flags |= CONST_EFLAG; 
    214                 else 
    215                         flags &= ~CONST_EFLAG; 
    216                 if (eNotificationRequired()) 
    217                         eNotify(new ENotificationImpl(this, Notification.SET, 
    218                                         AXDocPackage.AX_MEMBER__CONST, oldConst, newConst)); 
    219         } 
    220  
    221         /** 
    222          * <!-- begin-user-doc --> 
    223          * <!-- end-user-doc --> 
    224          * @generated 
    225          */ 
    226         public boolean isStatic() { 
    227                 return (flags & STATIC_EFLAG) != 0; 
    228         } 
    229  
    230         /** 
    231          * <!-- begin-user-doc --> 
    232          * <!-- end-user-doc --> 
    233          * @generated 
    234          */ 
    235         public void setStatic(boolean newStatic) { 
    236                 boolean oldStatic = (flags & STATIC_EFLAG) != 0; 
    237                 if (newStatic) 
    238                         flags |= STATIC_EFLAG; 
    239                 else 
    240                         flags &= ~STATIC_EFLAG; 
    241                 if (eNotificationRequired()) 
    242                         eNotify(new ENotificationImpl(this, Notification.SET, 
    243                                         AXDocPackage.AX_MEMBER__STATIC, oldStatic, newStatic)); 
    244         } 
    245  
    246         /** 
    247          * <!-- begin-user-doc --> 
    248          * <!-- end-user-doc --> 
    249          * @generated 
    250          */ 
    251         public boolean isProtected() { 
    252                 return (flags & PROTECTED_EFLAG) != 0; 
    253         } 
    254  
    255         /** 
    256          * <!-- begin-user-doc --> 
    257          * <!-- end-user-doc --> 
    258          * @generated 
    259          */ 
    260         public void setProtected(boolean newProtected) { 
    261                 boolean oldProtected = (flags & PROTECTED_EFLAG) != 0; 
    262                 if (newProtected) 
    263                         flags |= PROTECTED_EFLAG; 
    264                 else 
    265                         flags &= ~PROTECTED_EFLAG; 
    266                 if (eNotificationRequired()) 
    267                         eNotify(new ENotificationImpl(this, Notification.SET, 
    268                                         AXDocPackage.AX_MEMBER__PROTECTED, oldProtected, 
    269                                         newProtected)); 
     89                                        AXDocPackage.AX_MEMBER__TYPE, oldType, type)); 
    27090        } 
    27191 
     
    282102                case AXDocPackage.AX_MEMBER__ASDOC: 
    283103                        return getAsdoc(); 
    284                 case AXDocPackage.AX_MEMBER__VAR: 
    285                         return isVar() ? Boolean.TRUE : Boolean.FALSE; 
    286                 case AXDocPackage.AX_MEMBER__FUNCTION: 
    287                         return isFunction() ? Boolean.TRUE : Boolean.FALSE; 
    288                 case AXDocPackage.AX_MEMBER__CONST: 
    289                         return isConst() ? Boolean.TRUE : Boolean.FALSE; 
    290                 case AXDocPackage.AX_MEMBER__STATIC: 
    291                         return isStatic() ? Boolean.TRUE : Boolean.FALSE; 
    292                 case AXDocPackage.AX_MEMBER__PROTECTED: 
    293                         return isProtected() ? Boolean.TRUE : Boolean.FALSE; 
     104                case AXDocPackage.AX_MEMBER__TYPE: 
     105                        return getType(); 
    294106                } 
    295107                return eDynamicGet(featureID, resolve, coreType); 
     
    312124                        getAsdoc().addAll((Collection<? extends String>) newValue); 
    313125                        return; 
    314                 case AXDocPackage.AX_MEMBER__VAR: 
    315                         setVar(((Boolean) newValue).booleanValue()); 
    316                         return; 
    317                 case AXDocPackage.AX_MEMBER__FUNCTION: 
    318                         setFunction(((Boolean) newValue).booleanValue()); 
    319                         return; 
    320                 case AXDocPackage.AX_MEMBER__CONST: 
    321                         setConst(((Boolean) newValue).booleanValue()); 
    322                         return; 
    323                 case AXDocPackage.AX_MEMBER__STATIC: 
    324                         setStatic(((Boolean) newValue).booleanValue()); 
    325                         return; 
    326                 case AXDocPackage.AX_MEMBER__PROTECTED: 
    327                         setProtected(((Boolean) newValue).booleanValue()); 
     126                case AXDocPackage.AX_MEMBER__TYPE: 
     127                        setType((AXEntryType) newValue); 
    328128                        return; 
    329129                } 
     
    345145                        getAsdoc().clear(); 
    346146                        return; 
    347                 case AXDocPackage.AX_MEMBER__VAR: 
    348                         setVar(VAR_EDEFAULT); 
    349                         return; 
    350                 case AXDocPackage.AX_MEMBER__FUNCTION: 
    351                         setFunction(FUNCTION_EDEFAULT); 
    352                         return; 
    353                 case AXDocPackage.AX_MEMBER__CONST: 
    354                         setConst(CONST_EDEFAULT); 
    355                         return; 
    356                 case AXDocPackage.AX_MEMBER__STATIC: 
    357                         setStatic(STATIC_EDEFAULT); 
    358                         return; 
    359                 case AXDocPackage.AX_MEMBER__PROTECTED: 
    360                         setProtected(PROTECTED_EDEFAULT); 
     147                case AXDocPackage.AX_MEMBER__TYPE: 
     148                        setType(TYPE_EDEFAULT); 
    361149                        return; 
    362150                } 
     
    377165                case AXDocPackage.AX_MEMBER__ASDOC: 
    378166                        return asdoc != null && !asdoc.isEmpty(); 
    379                 case AXDocPackage.AX_MEMBER__VAR: 
    380                         return ((flags & VAR_EFLAG) != 0) != VAR_EDEFAULT; 
    381                 case AXDocPackage.AX_MEMBER__FUNCTION: 
    382                         return ((flags & FUNCTION_EFLAG) != 0) != FUNCTION_EDEFAULT; 
    383                 case AXDocPackage.AX_MEMBER__CONST: 
    384                         return ((flags & CONST_EFLAG) != 0) != CONST_EDEFAULT; 
    385                 case AXDocPackage.AX_MEMBER__STATIC: 
    386                         return ((flags & STATIC_EFLAG) != 0) != STATIC_EDEFAULT; 
    387                 case AXDocPackage.AX_MEMBER__PROTECTED: 
    388                         return ((flags & PROTECTED_EFLAG) != 0) != PROTECTED_EDEFAULT; 
     167                case AXDocPackage.AX_MEMBER__TYPE: 
     168                        return type != TYPE_EDEFAULT; 
    389169                } 
    390170                return eDynamicIsSet(featureID); 
     
    402182 
    403183                StringBuffer result = new StringBuffer(super.toString()); 
    404                 result.append(" (var: "); 
    405                 result.append((flags & VAR_EFLAG) != 0); 
    406                 result.append(", function: "); 
    407                 result.append((flags & FUNCTION_EFLAG) != 0); 
    408                 result.append(", const: "); 
    409                 result.append((flags & CONST_EFLAG) != 0); 
    410                 result.append(", static: "); 
    411                 result.append((flags & STATIC_EFLAG) != 0); 
    412                 result.append(", protected: "); 
    413                 result.append((flags & PROTECTED_EFLAG) != 0); 
     184                result.append(" (type: "); 
     185                result.append(type); 
    414186                result.append(')'); 
    415187                return result.toString(); 
  • org.axdt.axdoc.model/src/org/axdt/axdoc/model/impl/AXTypeImpl.java

    r79dd699 r2aa064d  
    1010 
    1111import org.axdt.axdoc.model.AXDocPackage; 
     12import org.axdt.axdoc.model.AXEntryType; 
    1213import org.axdt.axdoc.model.AXMember; 
    1314import org.axdt.axdoc.model.AXType; 
     
    2930 * <ul> 
    3031 *   <li>{@link org.axdt.axdoc.model.impl.AXTypeImpl#getMembers <em>Members</em>}</li> 
    31  *   <li>{@link org.axdt.axdoc.model.impl.AXTypeImpl#isInterface <em>Interface</em>}</li> 
     32 *   <li>{@link org.axdt.axdoc.model.impl.AXTypeImpl#getType <em>Type</em>}</li> 
    3233 * </ul> 
    3334 * </p> 
     
    4748 
    4849        /** 
    49          * The default value of the '{@link #isInterface() <em>Interface</em>}' attribute. 
    50          * <!-- begin-user-doc --> 
    51          * <!-- end-user-doc --> 
    52          * @see #isInterface() 
     50         * The default value of the '{@link #getType() <em>Type</em>}' attribute. 
     51         * <!-- begin-user-doc --> 
     52         * <!-- end-user-doc --> 
     53         * @see #getType() 
    5354         * @generated 
    5455         * @ordered 
    5556         */ 
    56         protected static final boolean INTERFACE_EDEFAULT = false; 
    57  
    58         /** 
    59          * The flag representing the value of the '{@link #isInterface() <em>Interface</em>}' attribute. 
    60          * <!-- begin-user-doc --> 
    61          * <!-- end-user-doc --> 
    62          * @see #isInterface() 
     57        protected static final AXEntryType TYPE_EDEFAULT = AXEntryType.NONE; 
     58 
     59        /** 
     60         * The cached value of the '{@link #getType() <em>Type</em>}' attribute. 
     61         * <!-- begin-user-doc --> 
     62         * <!-- end-user-doc --> 
     63         * @see #getType() 
    6364         * @generated 
    6465         * @ordered 
    6566         */ 
    66         protected static final int INTERFACE_EFLAG = 1 << 0; 
     67        protected AXEntryType type = TYPE_EDEFAULT; 
    6768 
    6869        /** 
     
    103104         * @generated 
    104105         */ 
    105         public boolean isInterface() { 
    106                 return (flags & INTERFACE_EFLAG) != 0; 
    107         } 
    108  
    109         /** 
    110          * <!-- begin-user-doc --> 
    111          * <!-- end-user-doc --> 
    112          * @generated 
    113          */ 
    114         public void setInterface(boolean newInterface) { 
    115                 boolean oldInterface = (flags & INTERFACE_EFLAG) != 0; 
    116                 if (newInterface) 
    117                         flags |= INTERFACE_EFLAG; 
    118                 else 
    119                         flags &= ~INTERFACE_EFLAG; 
     106        public AXEntryType getType() { 
     107                return type; 
     108        } 
     109 
     110        /** 
     111         * <!-- begin-user-doc --> 
     112         * <!-- end-user-doc --> 
     113         * @generated 
     114         */ 
     115        public void setType(AXEntryType newType) { 
     116                AXEntryType oldType = type; 
     117                type = newType == null ? TYPE_EDEFAULT : newType; 
    120118                if (eNotificationRequired()) 
    121119                        eNotify(new ENotificationImpl(this, Notification.SET, 
    122                                         AXDocPackage.AX_TYPE__INTERFACE, oldInterface, newInterface)); 
     120                                        AXDocPackage.AX_TYPE__TYPE, oldType, type)); 
    123121        } 
    124122 
     
    153151                case AXDocPackage.AX_TYPE__MEMBERS: 
    154152                        return getMembers(); 
    155                 case AXDocPackage.AX_TYPE__INTERFACE: 
    156                         return isInterface() ? Boolean.TRUE : Boolean.FALSE; 
     153                case AXDocPackage.AX_TYPE__TYPE: 
     154                        return getType(); 
    157155                } 
    158156                return eDynamicGet(featureID, resolve, coreType); 
     
    179177                        getMembers().addAll((Collection<? extends AXMember>) newValue); 
    180178                        return; 
    181                 case AXDocPackage.AX_TYPE__INTERFACE: 
    182                         setInterface(((Boolean) newValue).booleanValue()); 
     179                case AXDocPackage.AX_TYPE__TYPE: 
     180                        setType((AXEntryType) newValue); 
    183181                        return; 
    184182                } 
     
    203201                        getMembers().clear(); 
    204202                        return; 
    205                 case AXDocPackage.AX_TYPE__INTERFACE: 
    206                         setInterface(INTERFACE_EDEFAULT); 
     203                case AXDocPackage.AX_TYPE__TYPE: 
     204                        setType(TYPE_EDEFAULT); 
    207205                        return; 
    208206                } 
     
    225223                case AXDocPackage.AX_TYPE__MEMBERS: 
    226224                        return members != null && !members.isEmpty(); 
    227                 case AXDocPackage.AX_TYPE__INTERFACE: 
    228                         return ((flags & INTERFACE_EFLAG) != 0) != INTERFACE_EDEFAULT; 
     225                case AXDocPackage.AX_TYPE__TYPE: 
     226                        return type != TYPE_EDEFAULT; 
    229227                } 
    230228                return eDynamicIsSet(featureID); 
     
    242240 
    243241                StringBuffer result = new StringBuffer(super.toString()); 
    244                 result.append(" (interface: "); 
    245                 result.append((flags & INTERFACE_EFLAG) != 0); 
     242                result.append(" (type: "); 
     243                result.append(type); 
    246244                result.append(')'); 
    247245                return result.toString(); 
  • org.axdt.axdoc.model/src/org/axdt/axdoc/model/util/AXUtil.java

    r2d81bf0 r2aa064d  
    33import java.io.ByteArrayInputStream; 
    44import java.io.IOException; 
    5 import java.util.ArrayList; 
    6 import java.util.List; 
    75 
    86import org.axdt.axdoc.model.AXDocFactory; 
    9 import org.axdt.axdoc.model.AXEntry; 
    10 import org.axdt.axdoc.model.AXIndex; 
    11 import org.axdt.axdoc.model.AXMember; 
    127import org.axdt.axdoc.model.AXRoot; 
    13 import org.axdt.axdoc.model.AXType; 
    148import org.eclipse.emf.common.util.URI; 
    159import org.eclipse.emf.ecore.EObject; 
     
    6155                return root; 
    6256        } 
    63         public static AXIndex createPackage(AXRoot root, String name) { 
    64                 if (name == null || name.equals("")) return root; 
    65                 AXIndex current = root; 
    66                 main : for (String part : name.split("\\.")) { 
    67                         for (AXIndex pack : current.getIndexes()) { 
    68                                 if (part.equals(pack.getName())) { 
    69                                         current = pack; 
    70                                         continue main; 
    71                                 } 
    72                         } 
    73                         AXIndex child = factory.createAXIndex(); 
    74                         child.setName(part); 
    75                         current.getIndexes().add(child); 
    76                         //getResource(child, child.fullName()+".axdoc.xml"); 
    77                         current = child; 
    78                 } 
    79                 return current; 
    80         } 
    81         public static AXMember createMember(String name) { 
    82                 AXMember member = factory.createAXMember(); 
    83                 if (name.contains("()")) { 
    84                         name = name.replace("()", ""); 
    85                         member.setFunction(true); 
    86                 } 
    87                 member.setName(name); 
    88                 return member; 
    89         } 
    90         public static AXType createType(String typeName) { 
    91                 AXType type = factory.createAXType(); 
    92                 type.setName(typeName); 
    93                 return type; 
    94         } 
    95         public static List<AXEntry> getAllTypes(AXIndex index) { 
    96                 ArrayList<AXEntry> allTypes = new ArrayList<AXEntry>(); 
    97                 collectAllTypes(index, allTypes); 
    98                 return allTypes; 
    99         } 
    100         public static void collectAllTypes(AXIndex index, List<AXEntry> allTypes) { 
    101                 for (AXEntry e:index.getEntries()) { 
    102                         if (e.getType().isType()) allTypes.add(e); 
    103                 } 
    104                 for (AXIndex p:index.getIndexes()) { 
    105                         collectAllTypes(p, allTypes); 
    106                 } 
    107         } 
    10857} 
  • org.axdt.axdoc.test/src/org/axdt/axdoc/AXDocRegularTest.java

    r87f02d1 r2aa064d  
    1212 
    1313import org.axdt.axdoc.model.AXDocTests; 
    14 import org.axdt.axdoc.model.util.AXDocParserTest; 
    1514import org.axdt.axdoc.model.util.AXDocUtilTest; 
     15import org.axdt.axdoc.util.AXDocParserTest; 
    1616import org.axdt.axdoc.util.Index0rTest; 
    1717 
  • org.axdt.axdoc.test/src/org/axdt/axdoc/model/AXEntryTest.java

    r2d81bf0 r2aa064d  
    109109                assertTrue(ref instanceof AXType); 
    110110                AXType type = (AXType) ref; 
    111                 assertFalse(type.isInterface()); 
     111                assertEquals(AXEntryType.CLASS,type.getType()); 
    112112                assertEquals("Array", type.getName()); 
    113113                assertSame(type, getFixture().getOrCreateReference()); 
     
    119119                assertTrue(ref instanceof AXMember); 
    120120                AXMember member = (AXMember) ref; 
    121                 assertTrue(member.isFunction()); 
     121                assertEquals(AXEntryType.METHOD,member.getType()); 
    122122                assertEquals("toString", member.getName()); 
    123123                assertSame(member, entry.getOrCreateReference()); 
  • org.axdt.axdoc.test/src/org/axdt/axdoc/model/AXIndexNodeTest.java

    r2d81bf0 r2aa064d  
    1010 
    1111import org.axdt.axdoc.model.util.AXUtil; 
     12import org.eclipse.emf.common.util.EList; 
    1213 
    1314/** 
     
    3233 *   <li>{@link org.axdt.axdoc.model.AXIndexNode#getOrCreateReference() <em>Get Or Create Reference</em>}</li> 
    3334 *   <li>{@link org.axdt.axdoc.model.AXIndexNode#getReference() <em>Get Reference</em>}</li> 
     35 *   <li>{@link org.axdt.axdoc.model.AXIndexNode#getAllEntries() <em>Get All Entries</em>}</li> 
     36 *   <li>{@link org.axdt.axdoc.model.AXIndexNode#getAllTypes() <em>Get All Types</em>}</li> 
     37 *   <li>{@link org.axdt.axdoc.model.AXIndexNode#getAllMembers() <em>Get All Members</em>}</li> 
     38 *   <li>{@link org.axdt.axdoc.model.AXIndexNode#localMember(java.lang.String) <em>Local Member</em>}</li> 
     39 *   <li>{@link org.axdt.axdoc.model.AXIndexNode#localType(java.lang.String) <em>Local Type</em>}</li> 
     40 *   <li>{@link org.axdt.axdoc.model.AXIndexNode#getMembers() <em>Get Members</em>}</li> 
     41 *   <li>{@link org.axdt.axdoc.model.AXIndexNode#getTypes() <em>Get Types</em>}</li> 
    3442 * </ul> 
    3543 * </p> 
     
    190198         * Tests the '{@link org.axdt.axdoc.model.AXIndexNode#getOrCreateReference() <em>Get Or Create Reference</em>}' operation. 
    191199         * <!-- begin-user-doc --> 
     200         * should be tested in concrete implementations 
    192201         * <!-- end-user-doc --> 
    193202         * @see org.axdt.axdoc.model.AXIndexNode#getOrCreateReference() 
    194203         */ 
    195         public void testGetOrCreateReference() { 
    196                 // should be tested in concrete implementations 
    197         } 
     204        public abstract void testGetOrCreateReference(); 
    198205 
    199206        /** 
     
    207214        } 
    208215 
     216        /** 
     217         * Tests the '{@link org.axdt.axdoc.model.AXIndexNode#getAllEntries() <em>Get All Entries</em>}' operation. 
     218         * <!-- begin-user-doc --> 
     219         * <!-- end-user-doc --> 
     220         * @see org.axdt.axdoc.model.AXIndexNode#getAllEntries() 
     221         */ 
     222        public void testGetAllEntries() { 
     223                EList<AXEntry> list = getFixture().getAllEntries(); 
     224                assertNotNull(list); 
     225                assertEquals(0, list.size()); 
     226                AXEntry entry = getFixture().createEntry("test1", AXEntryType.METHOD); 
     227                getFixture().createEntry("test2", AXEntryType.PROPERTY); 
     228                assertEquals(2, getFixture().getAllEntries().size()); 
     229                AXEntry second = entry.createEntry("inner_test", AXEntryType.PROPERTY); 
     230                assertEquals(3, getFixture().getAllEntries().size()); 
     231                second.createEntry("third", AXEntryType.CLASS); 
     232                assertEquals(4, getFixture().getAllEntries().size()); 
     233        } 
     234 
     235        /** 
     236         * Tests the '{@link org.axdt.axdoc.model.AXIndexNode#getAllTypes() <em>Get All Types</em>}' operation. 
     237         * <!-- begin-user-doc --> 
     238         * <!-- end-user-doc --> 
     239         * @see org.axdt.axdoc.model.AXIndexNode#getAllTypes() 
     240         */ 
     241        public void testGetAllTypes() { 
     242                AXEntry entry = getFixture().createEntry("class1", AXEntryType.CLASS); 
     243                getFixture().createEntry("interface1", AXEntryType.INTERFACE); 
     244                getFixture().createEntry("method1", AXEntryType.METHOD); 
     245                getFixture().createEntry("prop1", AXEntryType.PROPERTY); 
     246                assertEquals(4, getFixture().getAllEntries().size()); 
     247                assertEquals(2, getFixture().getAllTypes().size()); 
     248                AXEntry second = entry.createEntry("interface2", AXEntryType.INTERFACE); 
     249                assertEquals(3, getFixture().getAllTypes().size()); 
     250                second.createEntry("interface3", AXEntryType.INTERFACE); 
     251                assertEquals(4, getFixture().getAllTypes().size()); 
     252        } 
     253 
     254        /** 
     255         * Tests the '{@link org.axdt.axdoc.model.AXIndexNode#getAllMembers() <em>Get All Members</em>}' operation. 
     256         * <!-- begin-user-doc --> 
     257         * <!-- end-user-doc --> 
     258         * @see org.axdt.axdoc.model.AXIndexNode#getAllMembers() 
     259         */ 
     260        public void testGetAllMembers() { 
     261                // TODO: implement this operation test method 
     262        } 
     263 
     264        /** 
     265         * Tests the '{@link org.axdt.axdoc.model.AXIndexNode#localMember(java.lang.String) <em>Local Member</em>}' operation. 
     266         * <!-- begin-user-doc --> 
     267         * <!-- end-user-doc --> 
     268         * @see org.axdt.axdoc.model.AXIndexNode#localMember(java.lang.String) 
     269         */ 
     270        public void testLocalMember__String() { 
     271                // TODO: implement this operation test method 
     272        } 
     273 
     274        /** 
     275         * Tests the '{@link org.axdt.axdoc.model.AXIndexNode#localType(java.lang.String) <em>Local Type</em>}' operation. 
     276         * <!-- begin-user-doc --> 
     277         * <!-- end-user-doc --> 
     278         * @see org.axdt.axdoc.model.AXIndexNode#localType(java.lang.String) 
     279         */ 
     280        public void testLocalType__String() { 
     281                // TODO: implement this operation test method 
     282        } 
     283 
     284        /** 
     285         * Tests the '{@link org.axdt.axdoc.model.AXIndexNode#getMembers() <em>Get Members</em>}' operation. 
     286         * <!-- begin-user-doc --> 
     287         * <!-- end-user-doc --> 
     288         * @see org.axdt.axdoc.model.AXIndexNode#getMembers() 
     289         */ 
     290        public void testGetMembers() { 
     291                // TODO: implement this operation test method 
     292        } 
     293 
     294        /** 
     295         * Tests the '{@link org.axdt.axdoc.model.AXIndexNode#getTypes() <em>Get Types</em>}' operation. 
     296         * <!-- begin-user-doc --> 
     297         * <!-- end-user-doc --> 
     298         * @see org.axdt.axdoc.model.AXIndexNode#getTypes() 
     299         */ 
     300        public void testGetTypes() { 
     301                // TODO: implement this operation test method 
     302        } 
     303 
    209304} //AXIndexNodeTest 
  • org.axdt.axdoc.test/src/org/axdt/axdoc/model/AXIndexTest.java

    r2d81bf0 r2aa064d  
    138138 
    139139                AXEntry packMember = AXDocFactory.eINSTANCE.createAXEntry(); 
    140                 packMember.setName("method()"); 
     140                packMember.setName("method"); 
    141141                packMember.setType(AXEntryType.METHOD); 
    142142                packMember.setParent(getFixture()); 
     
    150150 
    151151                AXEntry typeMember = AXDocFactory.eINSTANCE.createAXEntry(); 
    152                 typeMember.setName("method()"); 
     152                typeMember.setName("method"); 
    153153                typeMember.setType(AXEntryType.METHOD); 
    154154                typeMember.setParent(type); 
     
    208208        } 
    209209 
     210        @Override 
     211        public void testGetAllEntries() { 
     212                super.testGetAllEntries(); 
     213                assertEquals(4, getFixture().getAllEntries().size()); 
     214                AXIndex index = getFixture().createIndex("index_test"); 
     215                AXEntry entry = index.createEntry("index_entry", AXEntryType.CLASS); 
     216                assertEquals(5, getFixture().getAllEntries().size()); 
     217                entry.createEntry("index_inner_entry", AXEntryType.METHOD); 
     218                assertEquals(6, getFixture().getAllEntries().size()); 
     219        } 
    210220} //AXIndexTest 
  • org.axdt.axdoc.test/src/org/axdt/axdoc/model/AXRootTest.java

    r2d81bf0 r2aa064d  
    132132                AXPackage reference = getFixture().getOrCreateReference(); 
    133133                assertNotNull(reference.eResource()); 
    134                 assertEquals("root-package.axdoc", reference.eResource().getURI().lastSegment()); 
     134                assertEquals("root-package.axdoc", reference.eResource().getURI() 
     135                                .lastSegment()); 
    135136 
    136137                AXIndex index = AXDocFactory.eINSTANCE.createAXIndex(); 
  • org.axdt.axdoc.test/src/org/axdt/axdoc/model/coffeetime/ASDocFormatTest.java

    r87f02d1 r2aa064d  
    1212import org.axdt.axdoc.model.AXLevel; 
    1313import org.axdt.axdoc.model.AXRoot; 
    14 import org.axdt.axdoc.model.util.AXUtil; 
    1514import org.axdt.axdoc.util.AXDocParser; 
    1615import org.axdt.axdoc.util.HtmlLoader; 
     
    5352                // you can specify the documentation url 
    5453                AXRoot doc = parser.parse(url, AXLevel.TYPE, "base"); 
    55                 List<AXEntry> typeList = AXUtil.getAllTypes(doc); 
     54                List<AXEntry> typeList = doc.getAllTypes(); 
    5655                for (AXEntry typeNode:typeList) { 
    5756                        parseType(typeNode); 
  • org.axdt.axdoc.test/src/org/axdt/axdoc/model/util/AXDocUtilTest.java

    r2d81bf0 r2aa064d  
    55import org.axdt.axdoc.TestConstants; 
    66import org.axdt.axdoc.model.AXDocFactory; 
    7 import org.axdt.axdoc.model.AXEntryType; 
    87import org.axdt.axdoc.model.AXIndex; 
    98import org.axdt.axdoc.model.AXPackage; 
     
    1211 
    1312public class AXDocUtilTest extends TestCase implements TestConstants { 
    14         public void testGetAllTypes() throws Exception { 
    15                 AXRoot root = AXUtil.createRoot("name","url","base"); 
    16                 AXIndex pack = root.createPackageIndex("org.axdt.test"); 
    17                 AXIndex pack2 = root.createPackageIndex("org.axdt.foo"); 
    18                  
    19                 pack.createEntry("name", AXEntryType.CLASS); 
    20                 assertEquals(1, AXUtil.getAllTypes(root).size()); 
    21                 pack2.createEntry("name2", AXEntryType.CLASS); 
    22                 assertEquals(2, AXUtil.getAllTypes(root).size()); 
    23         } 
    2413        public void testSerialize() throws Exception { 
    2514                // empty resource 
  • org.axdt.axdoc.test/src/org/axdt/axdoc/util/Index0rTest.java

    r85b4650 r2aa064d  
    3636                index.initialize(root, AXLevel.PACKAGE); 
    3737                assertNotNull(root); 
    38                 // for now it loads the langref packages by itself 
    3938                assertEquals(1, index.roots.size()); 
    4039                assertEquals(0, index.findPackage("foo").length); 
  • org.axdt.axdoc/src/org/axdt/axdoc/util/AXDocParser.java

    r364575f r2aa064d  
    267267                } 
    268268        } 
     269        private AXEntryType parseTypeMemberEntryType(Node detail) throws DOMException, XPathExpressionException { 
     270                String headerText = parseTypeMemberHeader(detail); 
     271                AXEntryType type = getEntryType(headerText); 
     272                return type; 
     273        } 
     274        private AXEntry createTypeMemberEntry(AXEntry typeIndex, AXEntryType entryType, 
     275                        String childCode) { 
     276                String keyword = getKeyword(entryType); 
     277                String mods="", decl, init="",name,type; 
     278                if (!childCode.contains(keyword)) { 
     279                        // might property with getter and/or setter 
     280                        decl = childCode; 
     281                } else { 
     282                        String[] split = childCode.split(keyword,2); 
     283                        mods = split[0].trim(); 
     284                        decl = split[1].trim(); 
     285                } 
     286                if (decl.contains("=")) { 
     287                        // has initializer 
     288                        String[] split = decl.split("=",2); 
     289                        decl = split[0].trim(); 
     290                        init = split[1].trim(); 
     291                } 
     292                if (decl.contains(":")) { 
     293                        String[] split = decl.split(":",2); 
     294                        name = split[0].trim();  
     295                        type = split[1].trim(); 
     296                } else { 
     297                        // might be constructor  
     298                        name = decl.trim(); 
     299                        type = typeIndex.getId(); 
     300                } 
     301                if (name.endsWith("()")) { 
     302                        name = name.substring(0,name.length()-2); 
     303                } 
     304                AXEntry memberIndex = typeIndex.createEntry(name, entryType); 
     305                // create reference 
     306                memberIndex.getOrCreateReference(); 
     307                typeIndex.getEntries().add(memberIndex); 
     308                return memberIndex; 
     309        } 
     310        private String getKeyword(AXEntryType entryType) { 
     311                if (entryType == null) return null; 
     312                switch (entryType.getValue()) { 
     313                case AXEntryType.CONSTRUCTOR_VALUE: 
     314                case AXEntryType.METHOD_VALUE: 
     315                        return "function"; 
     316                case AXEntryType.PROPERTY_VALUE: 
     317                        return "var"; 
     318                case AXEntryType.CONSTANT_VALUE: 
     319                        return "const"; 
     320                default: return null; 
     321                } 
     322        } 
    269323        private void parseTypeMemberInfo(AXEntry typeIndex, Node detail) throws DOMException, XPathExpressionException { 
    270                 String headerType = parseTypeMemberHeader(detail); 
    271                 if ("Example".equals(headerType)) return; 
    272                 // TODO handle events 
    273                 if ("Event".equals(headerType)) return; 
     324                AXEntryType entryType = parseTypeMemberEntryType(detail); 
     325                if (entryType == null) 
     326                        return; 
    274327                Node child = detail.getFirstChild(); 
    275328                // child contains the declaration string 
    276329                String childCode = child.getTextContent().trim(); 
    277330                log(3,"[DDD] found detail: "+ childCode); 
    278                 AXEntry memberIndex = typeIndex.createEntry(childCode, AXEntryType.METHOD); 
    279                 typeIndex.getEntries().add(memberIndex); 
     331                AXEntry memberIndex = createTypeMemberEntry(typeIndex,entryType,childCode); 
    280332                child = child.getNextSibling(); 
    281333                boolean isGetterSetter = child.getNodeType() == Node.TEXT_NODE; 
     
    313365                // or some info spans follow 
    314366                 
     367        } 
     368        private AXEntryType getEntryType(String headerType) { 
     369                if ("method".equals(headerType)) { 
     370                        return AXEntryType.METHOD; 
     371                } else 
     372                if ("property".equals(headerType)) { 
     373                        return AXEntryType.PROPERTY; 
     374                } else 
     375                if ("Constant".equals(headerType)) { 
     376                        return AXEntryType.CONSTANT; 
     377                } else 
     378                if ("Constructor".equals(headerType)) { 
     379                        return AXEntryType.CONSTRUCTOR; 
     380                } 
     381                return null; 
    315382        } 
    316383        private String parseTypeMemberHeader(Node detail) throws DOMException, XPathExpressionException { 
  • org.axdt.axdoc/src/org/axdt/axdoc/util/Index0r.java

    r364575f r2aa064d  
    1111import org.axdt.axdoc.AXDocPlugin; 
    1212import org.axdt.axdoc.model.AXEntry; 
     13import org.axdt.axdoc.model.AXEntryType; 
    1314import org.axdt.axdoc.model.AXIndex; 
    1415import org.axdt.axdoc.model.AXIndexNode; 
     
    6970                return null; 
    7071        } 
    71         public AXIndexNode[] findMember(String qualifier, String name) { 
     72        public AXEntry[] findMember(String qualifier, String name) { 
    7273                ArrayList<AXIndexNode> result = new ArrayList<AXIndexNode>(); 
    7374                for (AXRoot root:roots.values()) { 
     
    7677                        if (qsplit.length > 1) { 
    7778                                for (int i = 0; index != null && i < qsplit.length-1;i++) { 
     79                                        String part = qsplit[0]; 
     80                                        if (part.contains("#")) 
     81                                                part = part.substring(0,part.indexOf("#")); 
    7882                                        index = index.localEntry(qsplit[0], false); 
    7983                                } 
    8084                        } 
    8185                        if (index != null) { 
    82                                 for (AXEntry entry : index.localEntry(qsplit[qsplit.length-1])) { 
    83                                         result.add(entry); 
    84                                 } 
    85                         } 
    86                 } 
    87                 return result.toArray(new AXIndexNode[result.size()]); 
     86                                String part = qsplit[qsplit.length-1]; 
     87                                AXEntryType typeArg = null; 
     88                                if (part.contains("#")) { 
     89                                        String[] split = part.split("#",2); 
     90                                        part = split[0]; 
     91                                        typeArg = AXEntryType.get(split[1]); 
     92                                } 
     93                                for (AXEntry entry : index.localEntry(part)) { 
     94                                        if (typeArg == null || typeArg.equals(entry.getType())) 
     95                                                result.add(entry); 
     96                                } 
     97                        } 
     98                } 
     99                return result.toArray(new AXEntry[result.size()]); 
    88100        } 
    89101        public AXIndex[] findPackage(String name) {