system/src/sc/lang/java/IdentifierExpression.java
public void styleNode(IStyleAdapter adapter) {
      if (idTypes == null) {
         // We've been replaced and not started - presumably this is just a copy of our statement so we can style it using the
         // replacedByStatement's information - just need to use this parse node since it's the original one in the source.
         if (replacedByStatement instanceof IdentifierExpression) {
            IdentifierExpression replaced = (IdentifierExpression) replacedByStatement;
            // Currently the Element does not always start it's children expressions... instead the root is started.  Here we could either find
            // the active element that corresponds to this expression and use it for styling or just start this here.  This will require all language
            // elements to be able to resolve their value without being converted so long term maybe the other approach is easier?
            if (!replaced.isStarted())
               ParseUtil.realInitAndStartComponent(replaced);
            replaced.styleExpression((ParentParseNode) parseNode, adapter);
         }
         else
            super.styleNode(adapter);
         return;
      }

      List<IString> idents = getAllIdentifiers();
      int sz = idents.size();

      ParentParseNode ppn;
      if (parseNode instanceof ParseNode) {
         ppn = (ParentParseNode) ((ParseNode) parseNode).value;
      }
      else
         ppn = (ParentParseNode) parseNode;

      styleExpression(ppn, adapter);
   }
/**
    * 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.
    */
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.
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 .
public void styleNode(IStyleAdapter adapter) {
      if (idTypes == null) {
         if (replacedByStatement instanceof IdentifierExpression) {
            IdentifierExpression replaced = (IdentifierExpression) replacedByStatement;
            if (!replaced.isStarted())
               ParseUtil.realInitAndStartComponent(replaced);
            replaced.styleExpression((ParentParseNode) parseNode, adapter);
         }
         else
            super.styleNode(adapter);
         return;
      }
      List<IString> idents = getAllIdentifiers();
      int sz = idents.size();
      ParentParseNode ppn;
      if (parseNode instanceof ParseNode) {
         ppn = (ParentParseNode) ((ParseNode) parseNode).value;
      }
      else
         ppn = (ParentParseNode) parseNode;
      styleExpression(ppn, adapter);
   }
public void styleNode ( IStyleAdapter adapter ) { if ( idTypes == null ) { if ( replacedByStatement instanceof IdentifierExpression ) { IdentifierExpression replaced = ( IdentifierExpression ) replacedByStatement ; if ( ! replaced . isStarted ( ) ) ParseUtil . realInitAndStartComponent ( replaced ) ; replaced . styleExpression ( ( ParentParseNode ) parseNode , adapter ) ; } else super . styleNode ( adapter ) ; return ; } List < IString > idents = getAllIdentifiers ( ) ; int sz = idents . size ( ) ; ParentParseNode ppn ; if ( parseNode instanceof ParseNode ) { ppn = ( ParentParseNode ) ( ( ParseNode ) parseNode ) . value ; } else ppn = ( ParentParseNode ) parseNode ; styleExpression ( ppn , adapter ) ; }
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.
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 .
// We've been replaced and not started - presumably this is just a copy of our statement so we can style it using the // replacedByStatement's information - just need to use this parse node since it's the original one in the source. // Currently the Element does not always start it's children expressions... instead the root is started.  Here we could either find // the active element that corresponds to this expression and use it for styling or just start this here.  This will require all language // elements to be able to resolve their value without being converted so long term maybe the other approach is easier?