Changeset 291

Show
Ignore:
Timestamp:
07/10/11 08:17:24 (11 months ago)
Author:
Kuan Hsu
Message:

Fixed jump_to_defintion and mousedwell doesn't work in "with" block

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/current/poseidon/poseidon/globals.d

    r290 r291  
    2121    private import CodeAnalyzer.syntax.nodeHsu; 
    2222 
    23     static public char[]    versionNumber = "rev.290"; 
     23    static public char[]    versionNumber = "rev.291"; 
    2424     
    2525    static public boolean showSplash = true; 
  • trunk/current/poseidon/poseidon/style/dstyle.d

    r287 r291  
    564564 
    565565            originalFunctionNode = functionHeadNode; 
    566          
    567             performAnalyzer( currentWords, typedWord, functionHeadNode, listToolTip, bFunctionToolTip ); 
     566 
     567            // modified when in "with" block, currentword not with element but global element 
     568            if( !performAnalyzer( currentWords, typedWord, functionHeadNode, listToolTip, bFunctionToolTip ) ) 
     569            { 
     570                if( withName.length ) performAnalyzer( currentWords[1..length], typedWord, functionHeadNode, listToolTip, bFunctionToolTip ); 
     571            } 
    568572 
    569573            // Remove Template Parameters Associative arrays 
     
    30003004            while( semiChar != ';' &&  semiChar != '}' && semiChar != '{' ) 
    30013005            { 
    3002                 if( !isComment( sc, semiPos ) ) 
     3006                /+ 
     3007                 
     3008                /* 
     3009 
     3010                */ 
     3011                this() 
     3012                { 
     3013                } 
     3014                will get "/this", so -> if( !isComment( sc, semiPos ) ) -> if( !isComment( sc, semiPos - 1 ) ) 
     3015                +/ 
     3016                if( !isComment( sc, semiPos - 1 ) ) 
    30033017                { 
    30043018                    if( types != 0 )   
     
    30173031                    if( --semiPos < 0 ) break; 
    30183032            } 
     3033            // sGUI.outputPanel.appendLine( "semiWord: " ~ semiWord ); 
    30193034 
    30203035            char[][] splitSemiWord = splitBySpace( semiWord ); 
     
    40134028            } 
    40144029             
    4015          
    40164030            CAnalyzerTreeNode easyNode = performAnalyzer( currentWords, typedWord, functionHeadNode, listToolTip, bFunctionToolTip, true ); 
    40174031            if( easyNode !is null ) 
     
    40294043                    } 
    40304044            } 
     4045            else 
     4046            { 
     4047                // modified when in "with" block, currentword not with element but global element 
     4048                if( withName.length ) 
     4049                { 
     4050                    easyNode = performAnalyzer( currentWords[1..length], typedWord, functionHeadNode, listToolTip, bFunctionToolTip, true ); 
     4051                    if( easyNode !is null ) 
     4052                    { 
     4053                        resultNode = easyNode; 
     4054                        lineNum = easyNode.lineNumber; 
     4055                        while( !( easyNode.DType & D_MAINROOT ) ) 
     4056                            easyNode = easyNode.getRoot; 
     4057 
     4058                        if( easyNode.getLeafCount ) 
     4059                            if( easyNode.getLeaf( 0 ).DType & D_MODULE ) 
     4060                            { 
     4061                                fileFullPath =  easyNode.getLeaf( 0 ).typeIdentifier; 
     4062                                moduleName = easyNode.getLeaf( 0 ).identifier; 
     4063                            } 
     4064                    } 
     4065                } 
     4066            } 
    40314067        } 
    40324068        else