Package sc.lang.java

Class TypedMethodExpression

    • Field Detail

      • typedIdentifier

        public java.lang.String typedIdentifier
      • typeArguments

        public java.util.List<JavaType> typeArguments
    • Constructor Detail

      • TypedMethodExpression

        public TypedMethodExpression()
    • Method Detail

      • styleNode

        public void styleNode​(IStyleAdapter adapter)
        Description copied from class: IdentifierExpression
        Styling for identifier expressions is complicated because the information we need to do the styling is at this level, but the elements we are styling are buried down in the parse-tree of this node. So far this is the only problematic case for Java so we are living with it but adding some features at the parselets level would help. One problem is that the parseNode for the IdentifierExpression may be expression, optExpression or exprStatement. We optionally need to 'drill down' to get the parse-node for the IdentifierExpression, then wrap the output with any parse nodes we skipped before or after. To handle this at the parselet level, we could skip those levels automatically. Another problem is that the path name is split into the first name, then "." followed by each subsequent name so there's an extra bump in the hierarchy to deal with the second and subsequent path-names. We could add a method called - childStyleHandler which is called for each child parse node that produces an array value (in this case, the identifiers array). It would return null for parse nodes which are ignored in styling or 'member' or 'staticMember' as necessary for each segment in the identifiers array. That method would be passed the current parent parse node, the child-index, and the current parse-node so it could go back into the identifier expression and find the right style for that segment of the path-name. It could probaby just unmap the value array and deal with the hierarchy skip so maybe we don't need that much context in that method.
        Specified by:
        styleNode in interface ISemanticNode
        Overrides:
        styleNode in class IdentifierExpression
      • transformTemplate

        public int transformTemplate​(int ix,
                                     boolean statefulContext)
        Description copied from class: JavaSemanticNode
        A pass over the semantic node tree to convert template statements into layer cake statements.
        Overrides:
        transformTemplate in class IdentifierExpression
      • applyPartialValue

        public boolean applyPartialValue​(java.lang.Object value)
        Description copied from class: JavaSemanticNode
        When Parser.enablePartialValues is set, and we do not complete parsing the input we'll have a set of errors which represent model fragments. In some cases, it would be nice to put the model together as well as possible for code hinting. This method can append fragments onto it... if so return true.
        Overrides:
        applyPartialValue in class IdentifierExpression