Changeset 199

Show
Ignore:
Timestamp:
11/09/07 11:11:13 (5 years ago)
Author:
Kuan Hsu
Message:

Open single file support( not complete all ).
Refresh parser by one button click.( modified outline )

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/current/poseidon/CodeAnalyzer/lexical/module_file.d

    r177 r199  
    2020            { 
    2121                // Kuan Hsu 
    22                 auto FileReader reader = new FileReader; 
     22                scope reader = new FileReader; 
    2323                int bom; 
    2424                //char[] tempText; 
  • trunk/current/poseidon/CodeAnalyzer/syntax/attributes.d

    r181 r199  
    129129            static 
    130130            final 
    131                        scope 
     131            scope 
    132132     */ 
    133133    public void parse() 
  • trunk/current/poseidon/CodeAnalyzer/syntax/core.d

    r193 r199  
    9393public ParseNode parse( Token[] tokList )  
    9494{  
    95     auto tokScanner = new TokenScanner(tokList);  
     95    scope tokScanner = new TokenScanner(tokList);  
    9696    return parse( tokScanner );  
    9797} 
     
    155155public CAnalyzerTreeNode parseTextHSU( char[] _text, char[] fileName, bool bAddDModule = true ) 
    156156{ 
    157     auto Module m = new Module; 
     157    scope m = new Module; 
    158158    m.setText( _text ); 
    159159     
  • trunk/current/poseidon/CodeAnalyzer/syntax/nodeHsu.d

    r197 r199  
    342342CAnalyzerTreeNode loadAnalyzerNode( char[] fileName ) 
    343343{ 
    344     auto file = new File( std.path.getName( fileName ) ~ ".ana", FileMode.In ); 
     344    scope file = new File( std.path.getName( fileName ) ~ ".ana", FileMode.In ); 
    345345    file.readLine(); 
    346346 
  • trunk/current/poseidon/poseidon/controller/actionmanager.d

    r198 r199  
    7272    }    
    7373 
    74  
     74    public void actionCloseFile( Event e ) 
     75    { 
     76        sGUI.editor.closeFile( sGUI.editor.getSelectedFileName() ); 
     77    }    
    7578 
    7679    public void actionNewProject(Event e) 
    7780    { 
    78         auto PrjProperty dlg = new PrjProperty(sShell, null); 
     81        scope dlg = new PrjProperty(sShell, null); 
    7982        if(dlg.open() == "OK"){ 
    8083            if(dlg.createNew && dlg.project) 
     
    892895     
    893896    private void execExtTool(ToolEntry entry) { 
    894         auto WaitCursor wc = new WaitCursor(sShell); 
     897        scope WaitCursor wc = new WaitCursor(sShell); 
    895898         
    896899        // keep the old entry 
     
    11191122        try   
    11201123        { 
    1121             sAutoComplete.addProjectParser( files );  
     1124            sAutoComplete.addProjectParser( files ); 
     1125 
     1126            foreach( char[] s ;sGUI.editor.getFileNames() ) 
     1127            { 
     1128                foreach( char[] ss; files ) 
     1129                { 
     1130                    if( std.string.tolower( s ) == std.string.tolower( ss ) ) 
     1131                    { 
     1132                        EditItem ei = sGUI.editor.findEditItem( s ); 
     1133                        if( ei !is null ) 
     1134                        { 
     1135                            sGUI.outline.singleFileToProjectFile( ei ); 
     1136                        } 
     1137                        sGUI.fileList.changeImage( s ); 
     1138                        break; 
     1139                    } 
     1140                } 
     1141            } 
    11221142        } 
    11231143        catch( Exception e )  
  • trunk/current/poseidon/poseidon/controller/bottompanel.d

    r188 r199  
    280280        content = new TextEx(parent, Globals.outputWRAP | DWT.MULTI | DWT.V_SCROLL | DWT.H_SCROLL ); 
    281281        this.setControl(content); 
    282         auto Color color = new Color( display, 0, 0x33, 0x66 ); 
     282        scope color = new Color( display, 0, 0x33, 0x66 ); 
    283283        content.setForeground( color ); 
    284284 
    285         auto Font font = new Font( display, Editor.settings._setting.outputStyle.font, Editor.settings._setting.outputStyle.size, DWT.NORMAL ); 
     285        scope font = new Font( display, Editor.settings._setting.outputStyle.font, Editor.settings._setting.outputStyle.size, DWT.NORMAL ); 
    286286        content.setFont( font ); 
    287287    } 
     
    299299    void setForeColor( int r, int g, int b ) 
    300300    { 
    301         auto Color color = new Color( display, r, g, b ); 
     301        scope color = new Color( display, r, g, b ); 
    302302        content.setForeground( color ); 
    303303    } 
     
    422422        this.setControl(content); 
    423423 
    424         auto Font font = new Font( display, Editor.settings._setting.searchStyle.font, Editor.settings._setting.searchStyle.size, DWT.NORMAL ); 
     424        scope font = new Font( display, Editor.settings._setting.searchStyle.font, Editor.settings._setting.searchStyle.size, DWT.NORMAL ); 
    425425        content.setFont( font );         
    426426    } 
     
    496496        this.setControl(content); 
    497497 
    498         auto Font font = new Font( display, Editor.settings._setting.searchStyle.font, Editor.settings._setting.searchStyle.size, DWT.NORMAL ); 
     498        scope font = new Font( display, Editor.settings._setting.searchStyle.font, Editor.settings._setting.searchStyle.size, DWT.NORMAL ); 
    499499        content.setFont( font );         
    500500    } 
  • trunk/current/poseidon/poseidon/controller/debugcontrol/debugPanel.d

    r189 r199  
    6565 
    6666        content = new Text( parent, DWT.MULTI | DWT.WRAP | DWT.V_SCROLL ); 
    67         scope Font font = new Font( display, Editor.settings._setting.outputStyle.font, Editor.settings._setting.outputStyle.size, DWT.NORMAL ); 
     67        scope font = new Font( display, Editor.settings._setting.outputStyle.font, Editor.settings._setting.outputStyle.size, DWT.NORMAL ); 
    6868        content.setFont( font ); 
    6969        this.setControl( content ); 
  • trunk/current/poseidon/poseidon/controller/debugcontrol/watch.d

    r189 r199  
    147147        table.setLinesVisible( true ); 
    148148 
    149         scope Font font = new Font( getDisplay, "Courier New", 9, DWT.BOLD ); 
     149        scope font = new Font( getDisplay, "Courier New", 9, DWT.BOLD ); 
    150150        tableTree.setFont( font );       
    151151 
     
    304304        setImage( Globals.getImage( "debug_bpview") ); 
    305305        table = new Table( parent, DWT.CHECK ); 
    306         scope Font font = new Font( getDisplay, "Courier New", 9, DWT.BOLD ); 
     306        scope font = new Font( getDisplay, "Courier New", 9, DWT.BOLD ); 
    307307        table.setFont( font );           
    308308        this.setControl( table ); 
     
    447447        table.setLinesVisible( true ); 
    448448         
    449         scope Font font = new Font( getDisplay, "Courier New", 9, DWT.BOLD ); 
     449        scope font = new Font( getDisplay, "Courier New", 9, DWT.BOLD ); 
    450450        table.setFont( font ); 
    451451 
     
    594594        //table.setHeaderVisible( false ); 
    595595        table.setLinesVisible( true ); 
    596         scope Font font = new Font( getDisplay, "Courier New", 9, DWT.BOLD ); 
     596        scope font = new Font( getDisplay, "Courier New", 9, DWT.BOLD ); 
    597597        table.setFont( font ); 
    598598        this.setControl( table ); 
     
    678678        table.setLinesVisible( true ); 
    679679         
    680         scope Font font = new Font( getDisplay, "Courier New", 9, DWT.BOLD ); 
     680        scope font = new Font( getDisplay, "Courier New", 9, DWT.BOLD ); 
    681681        table.setFont( font ); 
    682682 
  • trunk/current/poseidon/poseidon/controller/dialog/aboutbox.d

    r194 r199  
    3737        CLabel label; 
    3838        with(label = new CLabel(top, DWT.CENTER)){ 
    39             setText("Poseidon Editor for D v " ~ Globals.getVersionS()); 
     39            //setText("Poseidon Editor for D v " ~ Globals.getVersionS()); 
     40            setText("Poseidon Editor for D rev.199" ); 
    4041            setForeground(color); 
    4142        } 
  • trunk/current/poseidon/poseidon/controller/dialog/customtool.d

    r82 r199  
    252252     
    253253    private void onBrowseCmd(Event e) { 
    254         auto FileDialog dlg = new FileDialog(this); 
     254        scope dlg = new FileDialog(this); 
    255255        char[][] filter; 
    256256        filter ~= "*.exe;*.com;*.bat"; 
  • trunk/current/poseidon/poseidon/controller/dialog/generaldialog.d

    r198 r199  
    368368                else 
    369369                { 
    370                     auto CFindAllFile dirFiles = new CFindAllFile( dirName ); 
     370                    scope dirFiles = new CFindAllFile( dirName ); 
    371371                    char[][] fs = dirFiles.getFiles(); 
    372372 
     
    376376                } 
    377377 
    378                 auto CFindAllFile stdFiles = new CFindAllFile( filename ); 
     378                scope stdFiles = new CFindAllFile( filename ); 
    379379                char[][] files = stdFiles.getFiles(); 
    380380 
     
    392392                        try 
    393393                        { 
    394                             scope CAnalyzerTreeNode head = syntax.core.parseFileHSU( s ); 
     394                            scope head = syntax.core.parseFileHSU( s ); 
    395395 
    396396                            if( head is null ) 
     
    422422    protected void onEditBrowseDir( Event e ) 
    423423    { 
    424         auto WaitCursor wc = new WaitCursor( shell ); 
    425          
    426         auto DirectoryDialog dlg = new DirectoryDialog(shell, DWT.OPEN); 
     424        scope wc = new WaitCursor( shell ); 
     425         
     426        scope dlg = new DirectoryDialog(shell, DWT.OPEN); 
    427427        dlg.setFilterPath(Globals.recentDir); 
    428428        char[] fullpath = dlg.open(); 
     
    436436    protected void onEditBrowseFile( Event e ) 
    437437    { 
    438         auto WaitCursor wc = new WaitCursor( shell ); 
    439         auto FileDialog dlg; 
     438        scope wc = new WaitCursor( shell ); 
     439        scope FileDialog dlg; 
    440440 
    441441        if( type == 2 ) 
  • trunk/current/poseidon/poseidon/controller/edititem.d

    r198 r199  
    4646    ItemInfo            iteminfo; 
    4747    FILETIME            filetime;       // monitor the file change externally 
    48     //bool                  bFirstLoad = true; 
    4948    private int         lastGoto = -1;      // the last goto line number 
    5049    CAnalyzerTreeNode   fileParser;  
     
    159158        { 
    160159            // auto set/reset modifyChecking flag 
    161             auto AutoModifyProtect amp =  new AutoModifyProtect(_parent); 
     160            scope amp =  new AutoModifyProtect(_parent); 
    162161                  
    163162            switch( promptToSave( getFileName() ) ) 
     
    321320        try 
    322321        { 
    323             auto File file = new File(fn); 
     322            scope file = new File(fn); 
    324323            GetFileTime( file.handle(), &ftCreate, &ftAccess, &ftWrite ); 
    325324        } 
     
    723722 
    724723        /+ 
    725         auto WaitCursor wc = new WaitCursor( _parent ); 
     724        scope wc = new WaitCursor( _parent ); 
    726725        if( !sameAsSelected( findDlg.fop ) || findDlg.fop.bRegexp ) 
    727726        { 
     
    967966        try 
    968967        { 
    969             auto File file = new File( getFileName() ); 
     968            scope file = new File( getFileName() ); 
    970969            FILETIME ftCreate, ftAccess; 
    971970            GetFileTime( file.handle(), &ftCreate, &ftAccess, &filetime ); 
  • trunk/current/poseidon/poseidon/controller/editor.d

    r188 r199  
    237237         
    238238        // auto set/reset modifyChecking flag 
    239         auto AutoModifyProtect amp = new AutoModifyProtect(this);  
     239        scope amp = new AutoModifyProtect(this);  
    240240          
    241241        EditItem[] eisNeedUpdate; 
     
    11361136    public void showSearchDlg() { 
    11371137        char[] selText = getSelText(); 
    1138         auto SearchDlg dlg = new SearchDlg(getShell(), selText); 
     1138        scope dlg = new SearchDlg(getShell(), selText); 
    11391139 
    11401140        dlg.setImageString( "search" ); 
     
    11671167                return; 
    11681168             
    1169             auto WaitCursor wc = new WaitCursor(getShell()); 
     1169            scope wc = new WaitCursor(getShell()); 
    11701170            int action = dlg.action; 
    11711171            doSearch(dlg.fop, action); 
  • trunk/current/poseidon/poseidon/controller/filelist.d

    r189 r199  
    8787        EditItem ei = cast(EditItem) item.getData(); 
    8888         
    89         auto WaitCursor wc = new WaitCursor( getShell( )); 
     89        scope wc = new WaitCursor( getShell( )); 
    9090        char[] path = ei.getFileName(); 
    9191        if( sGUI.editor.isFileOpened( path ) ) 
     
    121121        else 
    122122            tItem.setText( std.path.getBaseName( ei.getFileName() ) ); 
    123          
    124         tItem.setImage( Globals.images["file_obj"] ); 
     123 
     124        if( sGUI.packageExp.isFileInProjects( ei.getFileName() ) ) 
     125            tItem.setImage( Globals.images["project_file"] ); 
     126        else 
     127            tItem.setImage( Globals.images["file_obj"] ); 
     128         
    125129        tItem.setData( ei ); 
    126130 
     
    128132        tis ~= tItem; 
    129133        tree.setSelection( tis ); 
     134    } 
     135 
     136    public void changeImage( char[] fileName ) 
     137    { 
     138        foreach( TreeItem tr; tree.getItems() ) 
     139        { 
     140            EditItem _ei = cast(EditItem) tr.getData(); 
     141            if( _ei.getFileName() == fileName ) 
     142            { 
     143                tr.setImage( Globals.images["project_file"] ); 
     144                return; 
     145            } 
     146        } 
    130147    } 
    131148 
  • trunk/current/poseidon/poseidon/controller/menumanager.d

    r198 r199  
    1818    Menu    projectMenu; 
    1919 
    20     public  MenuItem    undoItem, redoItem, cutItem, copyItem, pasteItem, selectallItem, 
     20    public  MenuItem    saveItem, saveasItem, saveallItem, closefileItem, closeprjItem, closeallprjItem, 
     21                        undoItem, redoItem, cutItem, copyItem, pasteItem,  
     22                        selectallItem, 
    2123                        togglecommentItem, streamcommentItem, boxcommentItem, nestcommentItem, 
    2224                        findItem, findListItem, gotoItem, viewDebugItem, classBrowserItem, 
     
    4547 
    4648 
    47         /// file.newprj 
    48         with(new MenuItem(menu, DWT.PUSH)){ 
    49             //setImage(Globals.getImage("newprj_wiz")); 
     49        /// file.openfile 
     50        with(new MenuItem(menu, DWT.PUSH)){ 
     51            setImage(Globals.getImage("fldr")); 
    5052            //setData(LANG_ID,"file.newprj"); 
    5153            setText( "Open File" ); 
     
    5557        } 
    5658 
     59        /// file.save 
     60        with( saveItem = new MenuItem(menu, DWT.PUSH)){ 
     61            setImage(Globals.getImage("save")); 
     62            //setData(LANG_ID,"file.newprj"); 
     63            setText( "Save File" ); 
     64            handleEvent(this, DWT.Selection, delegate(Event e){ 
     65                sActionMan.actionSave(e); 
     66            }); 
     67        } 
     68 
     69        /// file.saveas 
     70        with( saveasItem = new MenuItem(menu, DWT.PUSH)){ 
     71            setImage(Globals.getImage("save_as")); 
     72            setEnabled( false ); 
     73            //setData(LANG_ID,"file.newprj"); 
     74            setText( "Save As..." ); 
     75            handleEvent(this, DWT.Selection, delegate(Event e){ 
     76                //sActionMan.actionCloseFile(e); 
     77            }); 
     78        } 
     79 
     80        /// file.saveall 
     81        with(saveallItem = new MenuItem(menu, DWT.PUSH)){ 
     82            setImage(Globals.getImage("save_all")); 
     83            //setData(LANG_ID,"file.newprj"); 
     84            setText( "Save all" ); 
     85            handleEvent(this, DWT.Selection, delegate(Event e){ 
     86                sActionMan.actionSaveAll(e); 
     87            }); 
     88        } 
     89         
     90        /// file.closefile 
     91        with( closefileItem = new MenuItem(menu, DWT.PUSH)){ 
     92            setImage(Globals.getImage("close_view")); 
     93            //setData(LANG_ID,"file.newprj"); 
     94            setText( "Close File" ); 
     95            handleEvent(this, DWT.Selection, delegate(Event e){ 
     96                sActionMan.actionCloseFile(e); 
     97            }); 
     98        } 
     99 
     100 
     101        new MenuItem(menu, DWT.SEPARATOR); 
    57102         
    58103        /// file.newprj 
     
    75120 
    76121        /// file.closeprj 
    77         with(new MenuItem(menu, DWT.PUSH)){ 
     122        with(closeprjItem = new MenuItem(menu, DWT.PUSH)){ 
    78123            setImage(Globals.getImage("uninstall_wiz")); 
    79124            setData(LANG_ID,"file.closeprj"); 
     
    84129 
    85130        /// file.closeallprj 
    86         with(new MenuItem(menu, DWT.PUSH)){ 
     131        with(closeallprjItem = new MenuItem(menu, DWT.PUSH)){ 
    87132            //setImage(Globals.getImage("uninstall_wiz")); 
    88133            setData(LANG_ID,"file.closeallprjs"); 
     
    460505        with(new MenuItem(menu, DWT.PUSH)){ 
    461506            setData(LANG_ID,"help.about"); 
     507            setImage(Globals.getImage( "help_view" ) ); 
    462508            handleEvent(this, DWT.Selection, delegate(Event e){ 
    463509                sActionMan.actionAboutBox(e); 
  • trunk/current/poseidon/poseidon/controller/outline.d

    r189 r199  
    126126                    treeItems ~= tItem; 
    127127                    /* 
    128                     auto Font font = new Font( tree.getDisplay(), Editor.settings._setting.outputStyle.font, Editor.settings._setting.outputStyle.size, DWT.NORMAL ); 
     128                    scope font = new Font( tree.getDisplay(), Editor.settings._setting.outputStyle.font, Editor.settings._setting.outputStyle.size, DWT.NORMAL ); 
    129129                    tItem.setFont( font ); 
    130130                    */ 
     
    135135                    treeItems ~= tItem; 
    136136                    /* 
    137                     auto Font font = new Font( tree.getDisplay(), Editor.settings._setting.outputStyle.font, Editor.settings._setting.outputStyle.size, DWT.NORMAL ); 
     137                    scope font = new Font( tree.getDisplay(), Editor.settings._setting.outputStyle.font, Editor.settings._setting.outputStyle.size, DWT.NORMAL ); 
    138138                    tItem.setFont( font ); 
    139139                    */ 
     
    154154            CAnalyzerTreeNode[] leafs = analyzerNode.getAllLeaf(); 
    155155            // 對 DType 排列 
    156             auto CDTypeSort!( CAnalyzerTreeNode ) sortDtypeList = new CDTypeSort!( CAnalyzerTreeNode )( leafs ); 
     156            scope CDTypeSort!( CAnalyzerTreeNode ) sortDtypeList = new CDTypeSort!( CAnalyzerTreeNode )( leafs ); 
    157157            leafs = sortDtypeList.pop(); 
    158158            delete sortDtypeList; 
     
    169169                if( leafs[i].DType != prevDType ) 
    170170                { 
    171                     auto CIdentSort!( CAnalyzerTreeNode ) sortIdentList = new CIdentSort!( CAnalyzerTreeNode )( tempLeafs ); 
     171                    scope CIdentSort!( CAnalyzerTreeNode ) sortIdentList = new CIdentSort!( CAnalyzerTreeNode )( tempLeafs ); 
    172172                    tempLeafs = sortIdentList.pop(); 
    173173                    newLeafs ~= tempLeafs; 
     
    182182                    if( i == leafs.length - 1 ) 
    183183                    { 
    184                         auto CIdentSort!( CAnalyzerTreeNode ) sortIdentList = new CIdentSort!( CAnalyzerTreeNode )( tempLeafs ); 
     184                        scope CIdentSort!( CAnalyzerTreeNode ) sortIdentList = new CIdentSort!( CAnalyzerTreeNode )( tempLeafs ); 
    185185                        tempLeafs = sortIdentList.pop(); 
    186186                        newLeafs ~= tempLeafs; 
     
    229229        int t = l.DType; 
    230230 
    231         if( sGUI.outline.showRetType ) typeDisplayName = " : " ~ l.typeIdentifier; 
     231        if( sGUI.outline.showParamsRetType & 1 ) typeDisplayName = " : " ~ l.typeIdentifier; 
    232232 
    233233        /* 
     
    240240        if( t & ( D_CTOR | D_DTOR  | D_TEMPLATE ) ) 
    241241        { 
    242             if( sGUI.outline.showParams
     242            if( sGUI.outline.showParamsRetType & 2
    243243                title = l.identifier ~ " (" ~ l.parameterString ~ ")" ; 
    244244            else 
     
    247247        else if( t & ( D_STATICCTOR | D_STATICDTOR | D_FUNCTION ) ) 
    248248        { 
    249             if( sGUI.outline.showParams
     249            if( sGUI.outline.showParamsRetType & 2
    250250                title = l.identifier ~ " (" ~ l.parameterString ~ ")" ~ typeDisplayName; 
    251251            else 
     
    294294        { 
    295295            CAnalyzerTreeNode l = cast(CAnalyzerTreeNode) item.getData(); 
    296             auto WaitCursor wc = new WaitCursor( sShell ); 
     296            scope wc = new WaitCursor( sShell ); 
    297297 
    298298            sGUI.editor.setSelectionAndNotify( editItem ); 
     
    311311        void _populate(Object o){ 
    312312            OLItem pthis = cast(OLItem)o; 
    313             pthis.populateTree( sAutoComplete.fileParser ); 
     313            //if( sAutoComplete.fileParser is null ) 
     314                pthis.populateTree( pthis.editItem.fileParser ); 
     315            //else 
     316            //  pthis.populateTree( sAutoComplete.fileParser ); 
    314317        } 
    315318 
     
    373376    private int         searchIndex; 
    374377 
    375     private OLItem[] items; 
    376     private OLItem activeItem; 
    377  
    378     // not used currently 
    379     private boolean showParams = true; 
    380     private boolean showRetType = true; 
    381  
    382      
     378    private OLItem[]    items; 
     379    private OLItem      activeItem; 
     380 
     381    private int         showParamsRetType = 3; 
     382    private ToolItem    tiPR, tiRefresh; 
     383 
     384 
    383385    this(Composite parent, int style) { 
    384386    super(parent, DWT.NONE); 
     
    398400    // Create the CLabel for the top left, which will have an image and text 
    399401    label = new CLabel(this, DWT.NONE); 
    400     label.setImage(Globals.getImage("d")); 
     402    label.setImage(Globals.getImage("outline_co")); 
    401403    label.setAlignment(DWT.LEFT); 
    402404    this.setTopLeft(label); 
     
    441443            if( !quickFind.isDropped() ) 
    442444            { 
    443                 if( e.keyCode == DWT.CR || e.keyCode == DWT.F3
     445                if( e.keyCode == DWT.CR || e.keyCode == DWT.F3 || e.keyCode == DWT.KEYPAD_CR
    444446                { 
    445447                    if( !searchTreeItem() )  
     
    498500    this.setContent( co ); 
    499501 
     502    tiRefresh = new ToolItem(tbCenter, DWT.PUSH); 
     503    tiRefresh.setToolTipText( Globals.getTranslation( "pop.refresh" ) ); 
     504    tiRefresh.setImage(Globals.getImage("refresh")); 
     505    tiRefresh.setDisabledImage(Globals.getImage("refresh_dis")); 
     506    tiRefresh.setEnabled = false; 
     507    tiRefresh.handleEvent(this, DWT.Selection, delegate void(Event e) 
     508    { 
     509        EditItem ei = sGUI.editor.getSelectedEditItemHSU(); 
     510        if( ei !is null ) 
     511        { 
     512            if( !sGUI.packageExp.isFileInProjects( ei.getFileName() ) ) return; 
     513             
     514            OutLine pthis = cast(OutLine) e.cData; 
     515             
     516            OLItem item = pthis.findOLItem( ei ); 
     517            if( item !is null ) // item.reparse(); 
     518            { 
     519                try 
     520                { 
     521                    if( !std.string.icmp( std.path.getExt( ei.getFileName ), "d" ) || 
     522                        !std.string.icmp( std.path.getExt( ei.getFileName ), "di" ) ) ei.updateFileParser( ei.getFileName ); 
     523                         
     524                    item.tree.setEnabled( true ); 
     525                } 
     526                catch( Exception e )  
     527                {  
     528                    /* too many errors */  
     529                    sGUI.outputPanel.setForeColor( 0, 0, 0 ); 
     530                    sGUI.outputPanel.appendString( "File[ " ~ ei.getFileName ~ " ] Parsed Failure.\n" ); 
     531                    item.tree.setEnabled( false ); 
     532                } 
     533                item.reparse(); 
     534                pthis.resetImageCombo(); 
     535            } 
     536            else 
     537            { 
     538                //MessageBox.showMessage( "No Find " ~ ei.getFileName  ); 
     539            } 
     540        } 
     541    }); 
     542 
     543 
    500544    ToolItem tiCollapse = new ToolItem(tbCenter, DWT.PUSH); 
    501545    tiCollapse.setImage(Globals.getImage("collapseall")); 
     
    520564 
    521565     
    522  
    523     with(new ToolItem(tbCenter, DWT.CHECK)){ 
    524         //setData(LANG_ID, "show_params"); 
    525         setToolTipText( Globals.getTranslation( "outln.showparameter" ) ); 
    526         setImage(Globals.getImage("show_params")); 
    527         setSelection(showParams); 
    528         handleEvent(this, DWT.Selection, delegate void(Event e)
     566    //MessageBox.showMessage( std.string.toString( showParamsRetType ) ); 
     567     
     568    tiPR = new ToolItem(tbCenter, DWT.PUSH); 
     569    tiPR.setToolTipText( "Show Params And Return Type" ); 
     570    tiPR.setImage(Globals.getImage( "show_all" )); 
     571    tiPR.handleEvent(this, DWT.Selection, delegate void(Event e) 
     572   
    529573        OutLine pthis = cast(OutLine)e.cData; 
    530         pthis.showParams = (cast(ToolItem)e.widget).getSelection(); 
     574 
     575        if( pthis.showParamsRetType == 0 ) 
     576            pthis.showParamsRetType = 3; 
     577        else 
     578            pthis.showParamsRetType -= 1; 
     579 
     580        switch( pthis.showParamsRetType ) 
     581        { 
     582            case 0: 
     583                pthis.tiPR.setImage(Globals.getImage("show_none")); 
     584                pthis.tiPR.setToolTipText( "Hide Params And Return Type" ); 
     585                break; 
     586            case 1: 
     587                pthis.tiPR.setImage(Globals.getImage("show_rettype")); 
     588                pthis.tiPR.setToolTipText( Globals.getTranslation( "outln.showrettype" ) ); 
     589                break; 
     590            case 2: 
     591                pthis.tiPR.setImage(Globals.getImage("show_params")); 
     592                pthis.tiPR.setToolTipText( Globals.getTranslation( "outln.showparameter" ) ); 
     593                break; 
     594            default: 
     595                pthis.tiPR.setImage(Globals.getImage("show_all")); 
     596                pthis.tiPR.setToolTipText( "Show Params And Return Type" ); 
     597                break; 
     598        } 
     599             
    531600        if( pthis.activeItem ) pthis.activeItem.updateTree(); 
    532         }); 
    533     } 
    534  
    535     with(new ToolItem(tbCenter, DWT.CHECK)){ 
    536         setToolTipText( Globals.getTranslation( "outln.showrettype" ) ); 
    537         setImage(Globals.getImage("show_rettype")); 
    538         setSelection( showRetType ); 
    539         handleEvent(this, DWT.Selection, delegate void(Event e){ 
    540         OutLine pthis = cast(OutLine)e.cData; 
    541         pthis.showRetType = (cast(ToolItem)e.widget).getSelection(); 
    542         if( pthis.activeItem ) pthis.activeItem.updateTree(); 
    543         }); 
    544     }        
    545          
     601    }); 
     602 
    546603    // Create the close button and set it as the top right 
    547604    ToolBar tbClose = new ToolBar(this, DWT.FLAT); 
     
    590647 
    591648        resetImageCombo(); 
     649        if( sGUI.packageExp.isFileInProjects( ei.getFileName() ) ) tiRefresh.setEnabled = true;else  tiRefresh.setEnabled = false; 
    592650    } 
    593651     
     
    610668        // only do reparse when save/load, not modify 
    611669        if( ei.modified() ) return; 
     670        if( !sGUI.packageExp.isFileInProjects( ei.getFileName() ) ) return; 
    612671 
    613672        OLItem item = findOLItem( ei ); 
     
    654713        } 
    655714    } 
     715 
     716    public void singleFileToProjectFile( EditItem ei ) 
     717    { 
     718        OLItem item = findOLItem( ei ); 
     719        if( item !is null ) 
     720        { 
     721            char[] filePath = ei.getFileName; 
     722            CAnalyzerTreeNode fileParser = sAutoComplete.getProjectParser( filePath ); 
     723                 
     724            if( fileParser ) 
     725            { 
     726                sGUI.outputPanel.setForeColor( 0, 0, 0 ); 
     727                sGUI.outputPanel.appendString( "File[ " ~ filePath ~ " ] Parser Loaded.\n" ); 
     728 
     729                ei.fileParser = fileParser; 
     730                item.tree.setEnabled( true ); 
     731                item.reparse(); 
     732 
     733                if( sGUI.editor.getSelectedFileName() == filePath ) 
     734                { 
     735                    removeAllImageComboItems(); 
     736                    quickFind.setEnabled( true ); 
     737                    onCheckImageComboModify(); 
     738                    tiRefresh.setEnabled = true; 
     739                }            
     740            } 
     741        }        
     742    } 
     743     
    656744     
    657745    public void onEditItemDisposed( EditorEvent e ) 
  • trunk/current/poseidon/poseidon/controller/packageexplorer.d

    r194 r199  
    290290        assert( prj ); 
    291291 
    292         auto WaitCursor wc = new WaitCursor( sShell ); 
     292        scope wc = new WaitCursor( sShell ); 
    293293         
    294294        prjArray ~= prj; 
     
    484484                    t.setImage(Globals.getImage( "module_obj" )); 
    485485                    /* 
    486                     auto Font font = new Font( getDisplay, Editor.settings._setting.outputStyle.font, Editor.settings._setting.outputStyle.size, DWT.NORMAL ); 
     486                    scope font = new Font( getDisplay, Editor.settings._setting.outputStyle.font, Editor.settings._setting.outputStyle.size, DWT.NORMAL ); 
    487487                    t.setFont( font ); 
    488488                    */ 
     
    509509                    ItemInfo info = new ItemInfo( ItemInfo.FILE, node.fullPathName, prj, t ); 
    510510                    /* 
    511                     auto Font font = new Font( getDisplay, Editor.settings._setting.outputStyle.font, Editor.settings._setting.outputStyle.size, DWT.NORMAL ); 
     511                    scope font = new Font( getDisplay, Editor.settings._setting.outputStyle.font, Editor.settings._setting.outputStyle.size, DWT.NORMAL ); 
    512512                    t.setFont( font ); 
    513513                    */                       
     
    702702    public char[][] getAllFilesInProjectDir( char[] dir, int type = 0 ) 
    703703    { 
    704         auto CFindAllFile t = new CFindAllFile( dir ); 
     704        scope t = new CFindAllFile( dir ); 
    705705        char[][] files; 
    706706 
     
    765765            if( dlg.zipAll ) 
    766766            { 
    767                 auto CFindAllFile t = new CFindAllFile( activePrj.projectDir ); 
     767                scope t = new CFindAllFile( activePrj.projectDir ); 
    768768                activePrjFiles = t.getFiles(); 
    769769                CompressType = 0; 
     
    884884            ItemInfo info = pThis.getSelection(); 
    885885            if(info && info.isFile()){ 
    886                 auto WaitCursor wc = new WaitCursor(pThis.tree); 
     886                scope wc = new WaitCursor(pThis.tree); 
    887887                pThis.editor.openFile(info.getFileName, info, -1, true); 
    888888            }  
     
    947947        return findInfo(tis, files); 
    948948    } 
     949 
     950    public bool isFileInProjects( char[] file ) 
     951    { 
     952        foreach( char[] f; getProjectsFiles() ) 
     953            if( std.string.tolower( file ) == std.string.tolower( f ) ) return true; 
     954 
     955        return false; 
     956    }    
    949957     
    950958    /** 
     
    10861094            try{ 
    10871095                // create UTF8 file as default, file auto closed 
    1088                 auto File file = new File(fullname, FileMode.OutNew); 
    1089                 auto EndianStream f = new EndianStream(file, std.system.endian); 
     1096                scope file = new File(fullname, FileMode.OutNew); 
     1097                scope f = new EndianStream(file, std.system.endian); 
    10901098                f.writeBOM(BOM.UTF8); 
    10911099            }catch(Exception e) { 
     
    13401348            if( info.isFile() ) 
    13411349            { 
    1342                 scope WaitCursor wc = new WaitCursor(pThis.tree); 
     1350                scope wc = new WaitCursor(pThis.tree); 
    13431351 
    13441352                if( pThis.editor.closeFile( info.getFileName ) ) 
     
    14571465        else 
    14581466        { 
    1459             auto WaitCursor wc = new WaitCursor( getShell() ); 
     1467            scope wc = new WaitCursor( getShell() ); 
    14601468            if( sActionMan.actionResTool( data.getFileName ) ) return; 
    14611469             
     
    14771485        if( data.isFile() && linkEditor ) 
    14781486        { 
    1479             auto WaitCursor wc = new WaitCursor( getShell( )); 
     1487            scope wc = new WaitCursor( getShell( )); 
    14801488             
    14811489            char[] path = data.getFileName(); 
     
    14831491            { 
    14841492                editor.openFile( path, null, -1, false ); 
     1493                EditItem ei = editor.getSelectedEditItemHSU(); 
    14851494                // set the focus back to the tree 
    14861495                tree.forceFocus(); 
     
    15801589        if( activeProject is null ) return; 
    15811590         
    1582         scope PrjProperty dlg = new PrjProperty( getShell(), activeProject ); 
     1591        scope dlg = new PrjProperty( getShell(), activeProject ); 
    15831592        if( dlg.open() == "OK" ) 
    15841593        { 
    1585             scope WaitCursor wc = new WaitCursor( getShell() ); 
     1594            scope wc = new WaitCursor( getShell() ); 
    15861595            refreshProject(); 
    15871596        } 
  • trunk/current/poseidon/poseidon/controller/property/compilerpage.d

    r189 r199  
    193193    private char[] browseDir() 
    194194    { 
    195         scope WaitCursor wc = new WaitCursor(shell); 
    196          
    197         scope DirectoryDialog dlg = new DirectoryDialog( shell, DWT.OPEN ); 
     195        scope wc = new WaitCursor(shell); 
     196         
     197        scope dlg = new DirectoryDialog( shell, DWT.OPEN ); 
    198198        dlg.setFilterPath(Globals.recentDir); 
    199199        return dlg.open(); 
     
    202202    private char[] browseFile() 
    203203    { 
    204         scope WaitCursor wc = new WaitCursor(shell); 
    205  
    206         scope FileDialog dlg = new FileDialog( shell, DWT.OPEN ); 
     204        scope wc = new WaitCursor(shell); 
     205 
     206        scope dlg = new FileDialog( shell, DWT.OPEN ); 
    207207 
    208208        char[][] FileExtensions; 
  • trunk/current/poseidon/poseidon/controller/property/editorpage.d

    r188 r199  
    7171        Editor.settings._setting = this.setting; 
    7272 
    73         auto Font font = new Font( display, fontAStyles[1].font, fontAStyles[1].size, DWT.NORMAL ); 
     73        scope font = new Font( display, fontAStyles[1].font, fontAStyles[1].size, DWT.NORMAL ); 
    7474        sGUI.outputPanel.content.setFont( font ); 
    7575 
  • trunk/current/poseidon/poseidon/controller/property/parserpage.d

    r198 r199  
    310310        if( hasSelect( listDefaultParsers ) ) 
    311311        { 
    312             scope _editDlg dlg = new _editDlg( getShell(), 0, 0, Globals.getTranslation( "diag.title4_1" ), listDefaultParsers.getItem( listDefaultParsers.getFocusIndex() ) ); 
     312            scope dlg = new _editDlg( getShell(), 0, 0, Globals.getTranslation( "diag.title4_1" ), listDefaultParsers.getItem( listDefaultParsers.getFocusIndex() ) ); 
    313313            touchEdit( listDefaultParsers, dlg.open() );  
    314314            setDirty( true ); 
     
    359359    private void onBrowseDirParser( Event e ) 
    360360    { 
    361         auto WaitCursor wc = new WaitCursor(shell); 
    362          
    363         auto DirectoryDialog dlg = new DirectoryDialog( shell, DWT.OPEN ); 
     361        scope wc = new WaitCursor(shell); 
     362         
     363        scope dlg = new DirectoryDialog( shell, DWT.OPEN ); 
    364364        dlg.setFilterPath( Globals.recentDir ); 
    365365        char[] fullpath = std.string.strip( dlg.open() ); 
     
    373373            if( std.file.isdir( txtMakeDefaultParser.getText() ) > 0 ) 
    374374            { 
    375                 scope _editDlg dlg = new _editDlg( getShell(), 0, 0, Globals.getTranslation( "diag.title6" ), txtMakeDefaultParser.getText(), 1 ); 
     375                scope dlg = new _editDlg( getShell(), 0, 0, Globals.getTranslation( "diag.title6" ), txtMakeDefaultParser.getText(), 1 ); 
    376376                dlg.open(); 
    377377            } 
  • trunk/current/poseidon/poseidon/controller/property/prjproperty.d

    r196 r199  
    220220        with( txtComment = new Text( tab1_Comp, DWT.BORDER | DWT.MULTI | DWT.V_SCROLL | DWT.WRAP ) ) 
    221221        { 
    222             auto Color color = new Color( display, 0, 0x66, 0 ); 
     222            scope color = new Color( display, 0, 0x66, 0 ); 
    223223            setForeground( color ); 
    224224            GridData innergridData = new GridData( GridData.FILL, GridData.BEGINNING, true, false, 3, 1 ); 
     
    461461        with( txtExtraCompilerOption = new Text( tab3_Comp, DWT.BORDER | DWT.MULTI | DWT.V_SCROLL | DWT.WRAP ))  
    462462        { 
    463             scope Font font = new Font( display, "Verdana", 8, DWT.NORMAL ); 
     463            scope font = new Font( display, "Verdana", 8, DWT.NORMAL ); 
    464464            setFont( font ); 
    465465            setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true, 4, 1) ); 
     
    521521        with( txtExeArgs = new Text( tab3_Comp, DWT.BORDER | DWT.MULTI | DWT.V_SCROLL | DWT.WRAP ))  
    522522        { 
    523             scope Font font = new Font( display, "Verdana", 8, DWT.NORMAL ); 
     523            scope font = new Font( display, "Verdana", 8, DWT.NORMAL ); 
    524524            setFont( font ); 
    525525            setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true, 4, 1) ); 
     
    563563        { 
    564564            GridData innergridData = new GridData( GridData.FILL, GridData.CENTER, true, false, 1, 5 ); 
    565             scope Font font = new Font( display, "Verdana", 8, DWT.NORMAL ); 
     565            scope font = new Font( display, "Verdana", 8, DWT.NORMAL ); 
    566566            setFont( font ); 
    567567            int ListHeight = getItemHeight() * 11; 
     
    680680    // only when create new project 
    681681    private void onBrowseDir(Event e) { 
    682         auto WaitCursor wc = new WaitCursor(shell); 
    683         auto DirectoryDialog dlg = new DirectoryDialog(shell, DWT.OPEN); 
     682        scope wc = new WaitCursor(shell); 
     683        scope dlg = new DirectoryDialog(shell, DWT.OPEN); 
    684684        dlg.setFilterPath(Globals.recentDir); 
    685685        char[] fullpath = dlg.open(); 
     
    797797        char[] dir = txtDir.getText(); 
    798798        char[] filter = txtFilter.getText(); //fixed to "d", the std.recls refuse "*.d;*.xml"??? 
    799         auto _Dlg dlg = new _Dlg(getShell(), dir, filter); 
     799        scope dlg = new _Dlg(getShell(), dir, filter); 
    800800        char[] result = dlg.open(); 
    801801        if(result) 
     
    10191019    private void onEdit0_0( Event e ) 
    10201020    { 
    1021         scope _editDlg dlg = new _editDlg( getShell(), 1, 2, Globals.getTranslation( "diag.title0" ) ); 
     1021        scope dlg = new _editDlg( getShell(), 1, 2, Globals.getTranslation( "diag.title0" ) ); 
    10221022        touchAdd( listFiles, dlg.open() ); 
    10231023    } 
     
    10291029        if( hasSelect( listFiles ) ) 
    10301030        { 
    1031             scope _editDlg dlg = new _editDlg( getShell(), 2, 2, Globals.getTranslation( "diag.title0_1" ), listFiles.getItem( listFiles.getFocusIndex() ) ); 
     1031            scope dlg = new _editDlg( getShell(), 2, 2, Globals.getTranslation( "diag.title0_1" ), listFiles.getItem( listFiles.getFocusIndex() ) ); 
    10321032            touchEdit( listFiles, dlg.open() ); 
    10331033        } 
     
    10661066    private void onEdit1_0( Event e ) 
    10671067    { 
    1068         scope _editDlg dlg = new _editDlg( getShell(), 0, 0, Globals.getTranslation( "diag.title1" ) ); 
     1068        scope dlg = new _editDlg( getShell(), 0, 0, Globals.getTranslation( "diag.title1" ) ); 
    10691069        touchAdd( listIncludePaths, dlg.open() ); 
    10701070    } 
     
    10761076        if( hasSelect( listIncludePaths ) ) 
    10771077        { 
    1078             scope _editDlg dlg = new _editDlg( getShell(), 0, 0, Globals.getTranslation( "diag.title1_1" ), listIncludePaths.getItem( listIncludePaths.getFocusIndex() ) ); 
     1078            scope dlg = new _editDlg( getShell(), 0, 0, Globals.getTranslation( "diag.title1_1" ), listIncludePaths.getItem( listIncludePaths.getFocusIndex() ) ); 
    10791079            touchEdit( listIncludePaths, dlg.open() );  
    10801080        } 
     
    11151115    private void onEdit2_0( Event e ) 
    11161116    { 
    1117         scope _editDlg dlg = new _editDlg( getShell(), 1, 1, Globals.getTranslation( "diag.title2" ) ); 
     1117        scope dlg = new _editDlg( getShell(), 1, 1, Globals.getTranslation( "diag.title2" ) ); 
    11181118        touchAdd( listLinkLibs, dlg.open() ); 
    11191119    } 
     
    11251125        if( hasSelect( listLinkLibs ) ) 
    11261126        { 
    1127             scope _editDlg dlg = new _editDlg( getShell(), 2, 1, Globals.getTranslation( "diag.title2_1" ), listLinkLibs.getItem( listLinkLibs.getFocusIndex() ) ); 
     1127            scope dlg = new _editDlg( getShell(), 2, 1, Globals.getTranslation( "diag.title2_1" ), listLinkLibs.getItem( listLinkLibs.getFocusIndex() ) ); 
    11281128            touchEdit( listLinkLibs, dlg.open() );  
    11291129        } 
     
    11641164    private void onEdit3_0( Event e ) 
    11651165    { 
    1166         scope _editDlg dlg = new _editDlg( getShell(), -1, 1, "Add Ignore Module..." ); 
     1166        scope dlg = new _editDlg( getShell(), -1, 1, "Add Ignore Module..." ); 
    11671167        touchAdd( listIgnoreModules, dlg.open() ); 
    11681168    } 
     
    11741174        if( hasSelect( listIgnoreModules ) ) 
    11751175        { 
    1176             scope _editDlg dlg = new _editDlg( getShell(), -1, 1, "Edit Ignore Module", listIgnoreModules.getItem( listIgnoreModules.getFocusIndex() ) ); 
     1176            scope dlg = new _editDlg( getShell(), -1, 1, "Edit Ignore Module", listIgnoreModules.getItem( listIgnoreModules.getFocusIndex() ) ); 
    11771177            touchEdit( listIgnoreModules, dlg.open() ); 
    11781178        }        
  • trunk/current/poseidon/poseidon/controller/property/shortcutpage.d

    r188 r199  
    212212        _ShortCut sc = cast(_ShortCut)item.getData(); 
    213213         
    214         auto _Dlg dlg = new _Dlg(getShell(), sc); 
     214        scope dlg = new _Dlg(getShell(), sc); 
    215215        char[] result = dlg.open(); 
    216216        if(result == "OK") { 
  • trunk/current/poseidon/poseidon/controller/toolbarmanager.d

    r195 r199  
    8585        with(tiSaveAll = new ToolItem(toolbar, DWT.PUSH)){ 
    8686            setImage(Globals.getImage("save_all")); 
     87            setDisabledImage(Globals.getImage("save_all_dis")); 
    8788            setData(LANG_ID, "tb.saveall"); 
    8889            handleEvent(null, DWT.Selection, delegate(Event e) { 
     
    330331             
    331332        tiSave.setEnabled(editor.modified()); 
    332  
     333        tiSaveAll.setEnabled( ( editor.getItemCount > 0 ) ? true : false ); 
     334  
    333335        boolean havePrj = packageExp.getProjectCount() > 0; 
    334336        boolean haveDoc = editor.getItemCount()> 0; 
     
    362364        if( sGUI.menuMan ) 
    363365        { 
     366            // file menu 
     367            sGUI.menuMan.saveItem.setEnabled( tiSave.getEnabled() ); 
     368            sGUI.menuMan.saveallItem.setEnabled( tiSaveAll.getEnabled() ); 
     369            sGUI.menuMan.closefileItem.setEnabled( haveDoc ); 
     370 
     371            sGUI.menuMan.closeprjItem.setEnabled( havePrj ); 
     372            sGUI.menuMan.closeallprjItem.setEnabled( havePrj ); 
     373 
    364374            // edit menu 
    365375            sGUI.menuMan.undoItem.setEnabled( tiUndo.getEnabled() ); 
  • trunk/current/poseidon/poseidon/globals.d

    r198 r199  
    109109        images["d"]             = DWTResourceManager.getImage("d.gif"); 
    110110        images["di"]            = DWTResourceManager.getImage("di.gif"); 
     111        images["project_file"]  = DWTResourceManager.getImage("project_file.gif"); 
    111112        images["res"]           = DWTResourceManager.getImage("res.gif"); 
    112113        images["d-icon"]        = DWTResourceManager.getImage("d-icon.gif"); 
     
    139140        images["save"]          = DWTResourceManager.getImage("save.gif"); 
    140141        images["save_all"]      = DWTResourceManager.getImage("save_all.gif"); 
     142        images["save_all_dis"]      = DWTResourceManager.getImage("save_all_dis.gif"); 
    141143        images["save_as"]       = DWTResourceManager.getImage("saveas.gif"); 
    142144        images["save_dis"]      = DWTResourceManager.getImage("save_dis.gif"); 
    143145        images["shift_l_edit"]  = DWTResourceManager.getImage("shift_l_edit.gif"); 
     146 
     147        images["fldr"]          = DWTResourceManager.getImage("fldr_obj.gif"); 
     148 
    144149        images["show_params"]   = DWTResourceManager.getImage("show_params.gif"); 
    145150        images["show_rettype"]  = DWTResourceManager.getImage("show_rettype.gif"); 
     151        images["show_none"]     = DWTResourceManager.getImage("show_nopr.gif"); 
     152        images["show_all"]      = DWTResourceManager.getImage("show_pr.gif"); 
     153         
    146154        images["sort"]          = DWTResourceManager.getImage("sort.gif");       
    147155        images["synced"]        = DWTResourceManager.getImage("synced.gif"); 
     
    186194        images["Bud"]           = DWTResourceManager.getImage("Bud.gif"); 
    187195        images["Bud_dis"]       = DWTResourceManager.getImage("Bud_dis.gif"); 
     196 
     197        images["help_view"]     = DWTResourceManager.getImage("help_view.gif"); 
     198 
    188199 
    189200        images["class_hi"]      = DWTResourceManager.getImage("class_hi.gif"); 
     
    351362            if( std.file.isfile( ini ) ) 
    352363            { 
    353                 scope File file = new File( ini, FileMode.In ); 
     364                scope file = new File( ini, FileMode.In ); 
    354365                while( !file.eof() ) 
    355366                { 
  • trunk/current/poseidon/poseidon/i18n/translation.d

    r164 r199  
    3232        { 
    3333            char[] fn = std.path.join( langdir, s ); 
    34             auto IniLoader ini = new IniLoader(); 
     34            scope ini = new IniLoader(); 
    3535            if(ini.load(fn)) 
    3636            { 
     
    4646        { 
    4747            char[] fn = entry.Path(); 
    48             auto IniLoader ini = new IniLoader(); 
     48            scope ini = new IniLoader(); 
    4949            if(ini.load(fn)) 
    5050            { 
  • trunk/current/poseidon/poseidon/intellisense/autocomplete.d

    r198 r199  
    215215        if( projectName in projectParsers ) 
    216216        { 
     217            /+ 
    217218            foreach( char[] key; projectParsers[projectName].keys ) 
    218219            { 
     
    232233                if( !bMatch ) removeSingleFileParser( key, projectName ); 
    233234            } 
     235            +/ 
    234236 
    235237            foreach( char[] fileName; paths ) 
     
    491493        if( !words.length ) return null; 
    492494 
    493         auto CCharsSort!( char[] ) sortList = new CCharsSort!( char[] )( words ); 
     495        scope CCharsSort!( char[] ) sortList = new CCharsSort!( char[] )( words ); 
    494496        words = sortList.pop(); 
    495497 
     
    984986                    { 
    985987                        char[] name = std.string.replace( moduleName, ".", "\\" ); 
    986                         name = std.path.join( path, name ) ~".d"; 
     988                        name = std.path.join( path, name );// ~".d"; 
    987989                     
    988990                        try 
    989991                        { 
    990                             CAnalyzerTreeNode extraParser = syntax.core.parseFileHSU( name ); 
    991                             projectParsers[projectName][name] = extraParser; 
     992                            CAnalyzerTreeNode extraParser = syntax.core.parseFileHSU( name ~ ".di" ); 
     993                            projectParsers[projectName][name ~ ".di"] = extraParser; 
    992994                            addAnalyzers ~= extraParser; 
    993                             sGUI.outputPanel.appendString( "File[ "~ name ~ " ] Loaded And Parsed.\n" ); 
     995                            sGUI.outputPanel.appendString( "File[ "~ name ~ ".di ] Loaded And Parsed.\n" ); 
    994996                            count ++; 
    995997                            if( count >= countAddImportModule ) break; 
     
    997999                        catch( Exception e ) 
    9981000                        { 
    999                             if( e.toString != "NoExist" ) sGUI.outputPanel.appendString( "      File[ "~ name ~ " ] Parsed Error.\n" ); 
     1001                            try 
     1002                            { 
     1003                                CAnalyzerTreeNode extraParser = syntax.core.parseFileHSU( name ~ ".d" ); 
     1004                                projectParsers[projectName][name ~ ".d"] = extraParser; 
     1005                                addAnalyzers ~= extraParser; 
     1006                                sGUI.outputPanel.appendString( "File[ "~ name ~ ".d ] Loaded And Parsed.\n" ); 
     1007                                count ++; 
     1008                                if( count >= countAddImportModule ) break; 
     1009                            } 
     1010                            catch( Exception e ) 
     1011                            { 
     1012                                if( e.toString != "NoExist" ) sGUI.outputPanel.appendString( "      File[ "~ name ~ " ] Parsed Error.\n" ); 
     1013                            } 
    10001014                        } 
    10011015                    } 
     
    10541068        int[char[]]         importedModuleNameArray; 
    10551069        CAnalyzerTreeNode[] importModules; 
    1056         char[][]          modulesName; 
     1070        //char[][]            modulesName; 
    10571071        CAnalyzerTreeNode   ret; 
    10581072        CAnalyzerTreeNode   activeParser; 
     
    11831197                    foreach( CAnalyzerTreeNode t; importFirst ) 
    11841198                    { 
    1185                         if( _inProjectParser( t.identifier ) ) 
     1199                        if( !( t.identifier in importedModuleNameArray ) ) 
    11861200                        { 
    1187                             insidemodulesName ~= t.identifier; 
    1188                             importedModuleNameArray[t.identifier] = 1; 
     1201                            if( _inProjectParser( t.identifier ) ) 
     1202                            { 
     1203                                insidemodulesName ~= t.identifier; 
     1204                                importedModuleNameArray[t.identifier] = 1; 
     1205                            } 
    11891206                        } 
    11901207                    }                        
     
    12161233            if( insidemodulesName.length ) 
    12171234            { 
    1218                 modulesName.length = 0; 
    1219                 modulesName ~= insidemodulesName; 
    1220                 foreach( char[] s; modulesName ) 
     1235                //modulesName.length = 0; 
     1236                //modulesName ~= insidemodulesName; 
     1237                foreach( char[] s; insidemodulesName ) 
    12211238                { 
    12221239                    CAnalyzerTreeNode a = _getProjectParserByModuleName( s ); 
     
    12351252        { 
    12361253            //sGUI.outputPanel.appendString( "modules.length = " ~ std.string.toString( importModules.length ) ~ "\n" ); 
     1254            /+ 
     1255            foreach( CAnalyzerTreeNode a; importModules ) 
     1256            { 
     1257                foreach( CAnalyzerTreeNode t; a.getAllLeaf() ) 
     1258                { 
     1259                    if( t.DType & D_MODULE ) 
     1260                    { 
     1261                        sGUI.outputPanel.appendString( "modules.name = " ~ t.identifier ~ "\n" ); 
     1262                        break; 
     1263                    } 
     1264                } 
     1265                     
     1266                //sGUI.outputPanel.appendString( "modules.name = " ~ a.identifier ~ "\n" ); 
     1267            } 
     1268            +/ 
     1269                     
    12371270            importedModules = importModules; 
    12381271            return null; 
  • trunk/current/poseidon/poseidon/poseidon.d

    r172 r199  
    4949    pragma( lib, "ole32.lib"); 
    5050    pragma( lib, "uuid.lib"); 
    51     pragma( lib, "phobos.lib"); 
     51    //pragma( lib, "phobos.lib"); 
    5252     
    5353    pragma( lib, "user32_dwt.lib"); 
  • trunk/current/poseidon/poseidon/style/dstyle.d

    r198 r199  
    566566                            enumWords ~= ( t.identifier ~ "?25" ); 
    567567 
    568                         auto CCharsSort!( char[] ) sortList = new CCharsSort!( char[] )( enumWords ); 
     568                        scope CCharsSort!( char[] ) sortList = new CCharsSort!( char[] )( enumWords ); 
    569569                        enumWords = sortList.pop(); 
    570570                        list = std.string.join( enumWords, " " ) ~ list; 
     
    907907            if( words.length ) 
    908908            { 
    909                 auto CCharsSort!( char[] ) sortList = new CCharsSort!( char[] )( words ); 
     909                scope CCharsSort!( char[] ) sortList = new CCharsSort!( char[] )( words ); 
    910910                words = sortList.pop(); 
    911911                list = std.string.join( words, "?22 " ) ~ "?22"; 
  • trunk/current/poseidon/poseidon/style/xpm.d

    r188 r199  
    1616    try 
    1717    { 
    18         auto file = new File( fileName, FileMode.In ); 
     18        scope file = new File( fileName, FileMode.In ); 
    1919 
    2020        if( file.readLine() != "/* XPM */" ) return null; 
  • trunk/current/poseidon/poseidon/util/fileutil.d

    r185 r199  
    4848                case -1: 
    4949                    // ANSI/MBCS should be convert to UTF8 encoding 
    50                     auto char[] buf = new char[cast(int)f.size()]; 
     50                    scope char[] buf = new char[cast(int)f.size()]; 
    5151                    while(!f.eof()) 
    5252                    { 
     
    6464                case BOM.UTF8: 
    6565                    // some time you get -1, set it to UTF8 
    66                     auto char[] buf = new char[cast(int)f.size()]; 
     66                    scope char[] buf = new char[cast(int)f.size()]; 
    6767                    while(!f.eof()) 
    6868                    { 
     
    7373                // UTF16 
    7474                case BOM.UTF16LE, BOM.UTF16BE: 
    75                     auto wchar[] wbuf = new wchar[cast(int)f.size() / wchar.sizeof]; 
     75                    scope wchar[] wbuf = new wchar[cast(int)f.size() / wchar.sizeof]; 
    7676                    while(!f.eof()) 
    7777                    { 
     
    8282                // UFT32 
    8383                case BOM.UTF32LE, BOM.UTF32BE: 
    84                     auto dchar[] dbuf = new dchar[cast(int)f.size() / dchar.sizeof]; 
     84                    scope dchar[] dbuf = new dchar[cast(int)f.size() / dchar.sizeof]; 
    8585                    while(!f.eof()) 
    8686                    {