Changeset 199
- Timestamp:
- 11/09/07 11:11:13 (5 years ago)
- Files:
-
- trunk/current/poseidon/CodeAnalyzer/lexical/module_file.d (modified) (1 diff)
- trunk/current/poseidon/CodeAnalyzer/syntax/attributes.d (modified) (1 diff)
- trunk/current/poseidon/CodeAnalyzer/syntax/core.d (modified) (2 diffs)
- trunk/current/poseidon/CodeAnalyzer/syntax/nodeHsu.d (modified) (1 diff)
- trunk/current/poseidon/images/help_view.gif (added)
- trunk/current/poseidon/images/project_file.gif (added)
- trunk/current/poseidon/images/show_nopr.gif (added)
- trunk/current/poseidon/images/show_pr.gif (added)
- trunk/current/poseidon/images/show_rettype.gif (modified) (previous)
- trunk/current/poseidon/poseidon.exe (modified) (previous)
- trunk/current/poseidon/poseidon/controller/actionmanager.d (modified) (3 diffs)
- trunk/current/poseidon/poseidon/controller/bottompanel.d (modified) (4 diffs)
- trunk/current/poseidon/poseidon/controller/debugcontrol/debugPanel.d (modified) (1 diff)
- trunk/current/poseidon/poseidon/controller/debugcontrol/watch.d (modified) (5 diffs)
- trunk/current/poseidon/poseidon/controller/dialog/aboutbox.d (modified) (1 diff)
- trunk/current/poseidon/poseidon/controller/dialog/customtool.d (modified) (1 diff)
- trunk/current/poseidon/poseidon/controller/dialog/generaldialog.d (modified) (5 diffs)
- trunk/current/poseidon/poseidon/controller/edititem.d (modified) (5 diffs)
- trunk/current/poseidon/poseidon/controller/editor.d (modified) (3 diffs)
- trunk/current/poseidon/poseidon/controller/filelist.d (modified) (3 diffs)
- trunk/current/poseidon/poseidon/controller/menumanager.d (modified) (6 diffs)
- trunk/current/poseidon/poseidon/controller/outline.d (modified) (18 diffs)
- trunk/current/poseidon/poseidon/controller/packageexplorer.d (modified) (13 diffs)
- trunk/current/poseidon/poseidon/controller/property/compilerpage.d (modified) (2 diffs)
- trunk/current/poseidon/poseidon/controller/property/editorpage.d (modified) (1 diff)
- trunk/current/poseidon/poseidon/controller/property/parserpage.d (modified) (3 diffs)
- trunk/current/poseidon/poseidon/controller/property/prjproperty.d (modified) (14 diffs)
- trunk/current/poseidon/poseidon/controller/property/shortcutpage.d (modified) (1 diff)
- trunk/current/poseidon/poseidon/controller/toolbarmanager.d (modified) (3 diffs)
- trunk/current/poseidon/poseidon/globals.d (modified) (4 diffs)
- trunk/current/poseidon/poseidon/i18n/translation.d (modified) (2 diffs)
- trunk/current/poseidon/poseidon/intellisense/autocomplete.d (modified) (9 diffs)
- trunk/current/poseidon/poseidon/poseidon.d (modified) (1 diff)
- trunk/current/poseidon/poseidon/style/dstyle.d (modified) (2 diffs)
- trunk/current/poseidon/poseidon/style/xpm.d (modified) (1 diff)
- trunk/current/poseidon/poseidon/util/fileutil.d (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/current/poseidon/CodeAnalyzer/lexical/module_file.d
r177 r199 20 20 { 21 21 // Kuan Hsu 22 auto FileReaderreader = new FileReader;22 scope reader = new FileReader; 23 23 int bom; 24 24 //char[] tempText; trunk/current/poseidon/CodeAnalyzer/syntax/attributes.d
r181 r199 129 129 static 130 130 final 131 scope131 scope 132 132 */ 133 133 public void parse() trunk/current/poseidon/CodeAnalyzer/syntax/core.d
r193 r199 93 93 public ParseNode parse( Token[] tokList ) 94 94 { 95 autotokScanner = new TokenScanner(tokList);95 scope tokScanner = new TokenScanner(tokList); 96 96 return parse( tokScanner ); 97 97 } … … 155 155 public CAnalyzerTreeNode parseTextHSU( char[] _text, char[] fileName, bool bAddDModule = true ) 156 156 { 157 auto Module m = new Module;157 scope m = new Module; 158 158 m.setText( _text ); 159 159 trunk/current/poseidon/CodeAnalyzer/syntax/nodeHsu.d
r197 r199 342 342 CAnalyzerTreeNode loadAnalyzerNode( char[] fileName ) 343 343 { 344 autofile = new File( std.path.getName( fileName ) ~ ".ana", FileMode.In );344 scope file = new File( std.path.getName( fileName ) ~ ".ana", FileMode.In ); 345 345 file.readLine(); 346 346 trunk/current/poseidon/poseidon/controller/actionmanager.d
r198 r199 72 72 } 73 73 74 74 public void actionCloseFile( Event e ) 75 { 76 sGUI.editor.closeFile( sGUI.editor.getSelectedFileName() ); 77 } 75 78 76 79 public void actionNewProject(Event e) 77 80 { 78 auto PrjPropertydlg = new PrjProperty(sShell, null);81 scope dlg = new PrjProperty(sShell, null); 79 82 if(dlg.open() == "OK"){ 80 83 if(dlg.createNew && dlg.project) … … 892 895 893 896 private void execExtTool(ToolEntry entry) { 894 autoWaitCursor wc = new WaitCursor(sShell);897 scope WaitCursor wc = new WaitCursor(sShell); 895 898 896 899 // keep the old entry … … 1119 1122 try 1120 1123 { 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 } 1122 1142 } 1123 1143 catch( Exception e ) trunk/current/poseidon/poseidon/controller/bottompanel.d
r188 r199 280 280 content = new TextEx(parent, Globals.outputWRAP | DWT.MULTI | DWT.V_SCROLL | DWT.H_SCROLL ); 281 281 this.setControl(content); 282 auto Colorcolor = new Color( display, 0, 0x33, 0x66 );282 scope color = new Color( display, 0, 0x33, 0x66 ); 283 283 content.setForeground( color ); 284 284 285 auto Fontfont = 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 ); 286 286 content.setFont( font ); 287 287 } … … 299 299 void setForeColor( int r, int g, int b ) 300 300 { 301 auto Colorcolor = new Color( display, r, g, b );301 scope color = new Color( display, r, g, b ); 302 302 content.setForeground( color ); 303 303 } … … 422 422 this.setControl(content); 423 423 424 auto Fontfont = 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 ); 425 425 content.setFont( font ); 426 426 } … … 496 496 this.setControl(content); 497 497 498 auto Fontfont = 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 ); 499 499 content.setFont( font ); 500 500 } trunk/current/poseidon/poseidon/controller/debugcontrol/debugPanel.d
r189 r199 65 65 66 66 content = new Text( parent, DWT.MULTI | DWT.WRAP | DWT.V_SCROLL ); 67 scope Fontfont = 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 ); 68 68 content.setFont( font ); 69 69 this.setControl( content ); trunk/current/poseidon/poseidon/controller/debugcontrol/watch.d
r189 r199 147 147 table.setLinesVisible( true ); 148 148 149 scope Fontfont = new Font( getDisplay, "Courier New", 9, DWT.BOLD );149 scope font = new Font( getDisplay, "Courier New", 9, DWT.BOLD ); 150 150 tableTree.setFont( font ); 151 151 … … 304 304 setImage( Globals.getImage( "debug_bpview") ); 305 305 table = new Table( parent, DWT.CHECK ); 306 scope Fontfont = new Font( getDisplay, "Courier New", 9, DWT.BOLD );306 scope font = new Font( getDisplay, "Courier New", 9, DWT.BOLD ); 307 307 table.setFont( font ); 308 308 this.setControl( table ); … … 447 447 table.setLinesVisible( true ); 448 448 449 scope Fontfont = new Font( getDisplay, "Courier New", 9, DWT.BOLD );449 scope font = new Font( getDisplay, "Courier New", 9, DWT.BOLD ); 450 450 table.setFont( font ); 451 451 … … 594 594 //table.setHeaderVisible( false ); 595 595 table.setLinesVisible( true ); 596 scope Fontfont = new Font( getDisplay, "Courier New", 9, DWT.BOLD );596 scope font = new Font( getDisplay, "Courier New", 9, DWT.BOLD ); 597 597 table.setFont( font ); 598 598 this.setControl( table ); … … 678 678 table.setLinesVisible( true ); 679 679 680 scope Fontfont = new Font( getDisplay, "Courier New", 9, DWT.BOLD );680 scope font = new Font( getDisplay, "Courier New", 9, DWT.BOLD ); 681 681 table.setFont( font ); 682 682 trunk/current/poseidon/poseidon/controller/dialog/aboutbox.d
r194 r199 37 37 CLabel label; 38 38 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" ); 40 41 setForeground(color); 41 42 } trunk/current/poseidon/poseidon/controller/dialog/customtool.d
r82 r199 252 252 253 253 private void onBrowseCmd(Event e) { 254 auto FileDialogdlg = new FileDialog(this);254 scope dlg = new FileDialog(this); 255 255 char[][] filter; 256 256 filter ~= "*.exe;*.com;*.bat"; trunk/current/poseidon/poseidon/controller/dialog/generaldialog.d
r198 r199 368 368 else 369 369 { 370 auto CFindAllFile dirFiles = new CFindAllFile( dirName );370 scope dirFiles = new CFindAllFile( dirName ); 371 371 char[][] fs = dirFiles.getFiles(); 372 372 … … 376 376 } 377 377 378 auto CFindAllFile stdFiles = new CFindAllFile( filename );378 scope stdFiles = new CFindAllFile( filename ); 379 379 char[][] files = stdFiles.getFiles(); 380 380 … … 392 392 try 393 393 { 394 scope CAnalyzerTreeNodehead = syntax.core.parseFileHSU( s );394 scope head = syntax.core.parseFileHSU( s ); 395 395 396 396 if( head is null ) … … 422 422 protected void onEditBrowseDir( Event e ) 423 423 { 424 auto WaitCursorwc = new WaitCursor( shell );425 426 auto DirectoryDialogdlg = new DirectoryDialog(shell, DWT.OPEN);424 scope wc = new WaitCursor( shell ); 425 426 scope dlg = new DirectoryDialog(shell, DWT.OPEN); 427 427 dlg.setFilterPath(Globals.recentDir); 428 428 char[] fullpath = dlg.open(); … … 436 436 protected void onEditBrowseFile( Event e ) 437 437 { 438 auto WaitCursorwc = new WaitCursor( shell );439 autoFileDialog dlg;438 scope wc = new WaitCursor( shell ); 439 scope FileDialog dlg; 440 440 441 441 if( type == 2 ) trunk/current/poseidon/poseidon/controller/edititem.d
r198 r199 46 46 ItemInfo iteminfo; 47 47 FILETIME filetime; // monitor the file change externally 48 //bool bFirstLoad = true;49 48 private int lastGoto = -1; // the last goto line number 50 49 CAnalyzerTreeNode fileParser; … … 159 158 { 160 159 // auto set/reset modifyChecking flag 161 auto AutoModifyProtectamp = new AutoModifyProtect(_parent);160 scope amp = new AutoModifyProtect(_parent); 162 161 163 162 switch( promptToSave( getFileName() ) ) … … 321 320 try 322 321 { 323 auto File file = new File(fn);322 scope file = new File(fn); 324 323 GetFileTime( file.handle(), &ftCreate, &ftAccess, &ftWrite ); 325 324 } … … 723 722 724 723 /+ 725 auto WaitCursorwc = new WaitCursor( _parent );724 scope wc = new WaitCursor( _parent ); 726 725 if( !sameAsSelected( findDlg.fop ) || findDlg.fop.bRegexp ) 727 726 { … … 967 966 try 968 967 { 969 auto File file = new File( getFileName() );968 scope file = new File( getFileName() ); 970 969 FILETIME ftCreate, ftAccess; 971 970 GetFileTime( file.handle(), &ftCreate, &ftAccess, &filetime ); trunk/current/poseidon/poseidon/controller/editor.d
r188 r199 237 237 238 238 // auto set/reset modifyChecking flag 239 auto AutoModifyProtectamp = new AutoModifyProtect(this);239 scope amp = new AutoModifyProtect(this); 240 240 241 241 EditItem[] eisNeedUpdate; … … 1136 1136 public void showSearchDlg() { 1137 1137 char[] selText = getSelText(); 1138 auto SearchDlgdlg = new SearchDlg(getShell(), selText);1138 scope dlg = new SearchDlg(getShell(), selText); 1139 1139 1140 1140 dlg.setImageString( "search" ); … … 1167 1167 return; 1168 1168 1169 auto WaitCursorwc = new WaitCursor(getShell());1169 scope wc = new WaitCursor(getShell()); 1170 1170 int action = dlg.action; 1171 1171 doSearch(dlg.fop, action); trunk/current/poseidon/poseidon/controller/filelist.d
r189 r199 87 87 EditItem ei = cast(EditItem) item.getData(); 88 88 89 auto WaitCursorwc = new WaitCursor( getShell( ));89 scope wc = new WaitCursor( getShell( )); 90 90 char[] path = ei.getFileName(); 91 91 if( sGUI.editor.isFileOpened( path ) ) … … 121 121 else 122 122 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 125 129 tItem.setData( ei ); 126 130 … … 128 132 tis ~= tItem; 129 133 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 } 130 147 } 131 148 trunk/current/poseidon/poseidon/controller/menumanager.d
r198 r199 18 18 Menu projectMenu; 19 19 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, 21 23 togglecommentItem, streamcommentItem, boxcommentItem, nestcommentItem, 22 24 findItem, findListItem, gotoItem, viewDebugItem, classBrowserItem, … … 45 47 46 48 47 /// file. newprj48 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")); 50 52 //setData(LANG_ID,"file.newprj"); 51 53 setText( "Open File" ); … … 55 57 } 56 58 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); 57 102 58 103 /// file.newprj … … 75 120 76 121 /// file.closeprj 77 with( new MenuItem(menu, DWT.PUSH)){122 with(closeprjItem = new MenuItem(menu, DWT.PUSH)){ 78 123 setImage(Globals.getImage("uninstall_wiz")); 79 124 setData(LANG_ID,"file.closeprj"); … … 84 129 85 130 /// file.closeallprj 86 with( new MenuItem(menu, DWT.PUSH)){131 with(closeallprjItem = new MenuItem(menu, DWT.PUSH)){ 87 132 //setImage(Globals.getImage("uninstall_wiz")); 88 133 setData(LANG_ID,"file.closeallprjs"); … … 460 505 with(new MenuItem(menu, DWT.PUSH)){ 461 506 setData(LANG_ID,"help.about"); 507 setImage(Globals.getImage( "help_view" ) ); 462 508 handleEvent(this, DWT.Selection, delegate(Event e){ 463 509 sActionMan.actionAboutBox(e); trunk/current/poseidon/poseidon/controller/outline.d
r189 r199 126 126 treeItems ~= tItem; 127 127 /* 128 auto Fontfont = 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 ); 129 129 tItem.setFont( font ); 130 130 */ … … 135 135 treeItems ~= tItem; 136 136 /* 137 auto Fontfont = 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 ); 138 138 tItem.setFont( font ); 139 139 */ … … 154 154 CAnalyzerTreeNode[] leafs = analyzerNode.getAllLeaf(); 155 155 // 對 DType 排列 156 autoCDTypeSort!( CAnalyzerTreeNode ) sortDtypeList = new CDTypeSort!( CAnalyzerTreeNode )( leafs );156 scope CDTypeSort!( CAnalyzerTreeNode ) sortDtypeList = new CDTypeSort!( CAnalyzerTreeNode )( leafs ); 157 157 leafs = sortDtypeList.pop(); 158 158 delete sortDtypeList; … … 169 169 if( leafs[i].DType != prevDType ) 170 170 { 171 autoCIdentSort!( CAnalyzerTreeNode ) sortIdentList = new CIdentSort!( CAnalyzerTreeNode )( tempLeafs );171 scope CIdentSort!( CAnalyzerTreeNode ) sortIdentList = new CIdentSort!( CAnalyzerTreeNode )( tempLeafs ); 172 172 tempLeafs = sortIdentList.pop(); 173 173 newLeafs ~= tempLeafs; … … 182 182 if( i == leafs.length - 1 ) 183 183 { 184 autoCIdentSort!( CAnalyzerTreeNode ) sortIdentList = new CIdentSort!( CAnalyzerTreeNode )( tempLeafs );184 scope CIdentSort!( CAnalyzerTreeNode ) sortIdentList = new CIdentSort!( CAnalyzerTreeNode )( tempLeafs ); 185 185 tempLeafs = sortIdentList.pop(); 186 186 newLeafs ~= tempLeafs; … … 229 229 int t = l.DType; 230 230 231 if( sGUI.outline.show RetType) typeDisplayName = " : " ~ l.typeIdentifier;231 if( sGUI.outline.showParamsRetType & 1 ) typeDisplayName = " : " ~ l.typeIdentifier; 232 232 233 233 /* … … 240 240 if( t & ( D_CTOR | D_DTOR | D_TEMPLATE ) ) 241 241 { 242 if( sGUI.outline.showParams )242 if( sGUI.outline.showParamsRetType & 2 ) 243 243 title = l.identifier ~ " (" ~ l.parameterString ~ ")" ; 244 244 else … … 247 247 else if( t & ( D_STATICCTOR | D_STATICDTOR | D_FUNCTION ) ) 248 248 { 249 if( sGUI.outline.showParams )249 if( sGUI.outline.showParamsRetType & 2 ) 250 250 title = l.identifier ~ " (" ~ l.parameterString ~ ")" ~ typeDisplayName; 251 251 else … … 294 294 { 295 295 CAnalyzerTreeNode l = cast(CAnalyzerTreeNode) item.getData(); 296 auto WaitCursorwc = new WaitCursor( sShell );296 scope wc = new WaitCursor( sShell ); 297 297 298 298 sGUI.editor.setSelectionAndNotify( editItem ); … … 311 311 void _populate(Object o){ 312 312 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 ); 314 317 } 315 318 … … 373 376 private int searchIndex; 374 377 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 383 385 this(Composite parent, int style) { 384 386 super(parent, DWT.NONE); … … 398 400 // Create the CLabel for the top left, which will have an image and text 399 401 label = new CLabel(this, DWT.NONE); 400 label.setImage(Globals.getImage(" d"));402 label.setImage(Globals.getImage("outline_co")); 401 403 label.setAlignment(DWT.LEFT); 402 404 this.setTopLeft(label); … … 441 443 if( !quickFind.isDropped() ) 442 444 { 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 ) 444 446 { 445 447 if( !searchTreeItem() ) … … 498 500 this.setContent( co ); 499 501 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 500 544 ToolItem tiCollapse = new ToolItem(tbCenter, DWT.PUSH); 501 545 tiCollapse.setImage(Globals.getImage("collapseall")); … … 520 564 521 565 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 { 529 573 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 531 600 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 546 603 // Create the close button and set it as the top right 547 604 ToolBar tbClose = new ToolBar(this, DWT.FLAT); … … 590 647 591 648 resetImageCombo(); 649 if( sGUI.packageExp.isFileInProjects( ei.getFileName() ) ) tiRefresh.setEnabled = true;else tiRefresh.setEnabled = false; 592 650 } 593 651 … … 610 668 // only do reparse when save/load, not modify 611 669 if( ei.modified() ) return; 670 if( !sGUI.packageExp.isFileInProjects( ei.getFileName() ) ) return; 612 671 613 672 OLItem item = findOLItem( ei ); … … 654 713 } 655 714 } 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 656 744 657 745 public void onEditItemDisposed( EditorEvent e ) trunk/current/poseidon/poseidon/controller/packageexplorer.d
r194 r199 290 290 assert( prj ); 291 291 292 auto WaitCursorwc = new WaitCursor( sShell );292 scope wc = new WaitCursor( sShell ); 293 293 294 294 prjArray ~= prj; … … 484 484 t.setImage(Globals.getImage( "module_obj" )); 485 485 /* 486 auto Fontfont = 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 ); 487 487 t.setFont( font ); 488 488 */ … … 509 509 ItemInfo info = new ItemInfo( ItemInfo.FILE, node.fullPathName, prj, t ); 510 510 /* 511 auto Fontfont = 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 ); 512 512 t.setFont( font ); 513 513 */ … … 702 702 public char[][] getAllFilesInProjectDir( char[] dir, int type = 0 ) 703 703 { 704 auto CFindAllFile t = new CFindAllFile( dir );704 scope t = new CFindAllFile( dir ); 705 705 char[][] files; 706 706 … … 765 765 if( dlg.zipAll ) 766 766 { 767 auto CFindAllFile t = new CFindAllFile( activePrj.projectDir );767 scope t = new CFindAllFile( activePrj.projectDir ); 768 768 activePrjFiles = t.getFiles(); 769 769 CompressType = 0; … … 884 884 ItemInfo info = pThis.getSelection(); 885 885 if(info && info.isFile()){ 886 auto WaitCursorwc = new WaitCursor(pThis.tree);886 scope wc = new WaitCursor(pThis.tree); 887 887 pThis.editor.openFile(info.getFileName, info, -1, true); 888 888 } … … 947 947 return findInfo(tis, files); 948 948 } 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 } 949 957 950 958 /** … … 1086 1094 try{ 1087 1095 // create UTF8 file as default, file auto closed 1088 auto File file = new File(fullname, FileMode.OutNew);1089 auto EndianStreamf = new EndianStream(file, std.system.endian);1096 scope file = new File(fullname, FileMode.OutNew); 1097 scope f = new EndianStream(file, std.system.endian); 1090 1098 f.writeBOM(BOM.UTF8); 1091 1099 }catch(Exception e) { … … 1340 1348 if( info.isFile() ) 1341 1349 { 1342 scope WaitCursorwc = new WaitCursor(pThis.tree);1350 scope wc = new WaitCursor(pThis.tree); 1343 1351 1344 1352 if( pThis.editor.closeFile( info.getFileName ) ) … … 1457 1465 else 1458 1466 { 1459 auto WaitCursorwc = new WaitCursor( getShell() );1467 scope wc = new WaitCursor( getShell() ); 1460 1468 if( sActionMan.actionResTool( data.getFileName ) ) return; 1461 1469 … … 1477 1485 if( data.isFile() && linkEditor ) 1478 1486 { 1479 auto WaitCursorwc = new WaitCursor( getShell( ));1487 scope wc = new WaitCursor( getShell( )); 1480 1488 1481 1489 char[] path = data.getFileName(); … … 1483 1491 { 1484 1492 editor.openFile( path, null, -1, false ); 1493 EditItem ei = editor.getSelectedEditItemHSU(); 1485 1494 // set the focus back to the tree 1486 1495 tree.forceFocus(); … … 1580 1589 if( activeProject is null ) return; 1581 1590 1582 scope PrjPropertydlg = new PrjProperty( getShell(), activeProject );1591 scope dlg = new PrjProperty( getShell(), activeProject ); 1583 1592 if( dlg.open() == "OK" ) 1584 1593 { 1585 scope WaitCursorwc = new WaitCursor( getShell() );1594 scope wc = new WaitCursor( getShell() ); 1586 1595 refreshProject(); 1587 1596 } trunk/current/poseidon/poseidon/controller/property/compilerpage.d
r189 r199 193 193 private char[] browseDir() 194 194 { 195 scope WaitCursorwc = new WaitCursor(shell);196 197 scope DirectoryDialogdlg = new DirectoryDialog( shell, DWT.OPEN );195 scope wc = new WaitCursor(shell); 196 197 scope dlg = new DirectoryDialog( shell, DWT.OPEN ); 198 198 dlg.setFilterPath(Globals.recentDir); 199 199 return dlg.open(); … … 202 202 private char[] browseFile() 203 203 { 204 scope WaitCursorwc = new WaitCursor(shell);205 206 scope FileDialogdlg = new FileDialog( shell, DWT.OPEN );204 scope wc = new WaitCursor(shell); 205 206 scope dlg = new FileDialog( shell, DWT.OPEN ); 207 207 208 208 char[][] FileExtensions; trunk/current/poseidon/poseidon/controller/property/editorpage.d
r188 r199 71 71 Editor.settings._setting = this.setting; 72 72 73 auto Fontfont = 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 ); 74 74 sGUI.outputPanel.content.setFont( font ); 75 75 trunk/current/poseidon/poseidon/controller/property/parserpage.d
r198 r199 310 310 if( hasSelect( listDefaultParsers ) ) 311 311 { 312 scope _editDlgdlg = 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() ) ); 313 313 touchEdit( listDefaultParsers, dlg.open() ); 314 314 setDirty( true ); … … 359 359 private void onBrowseDirParser( Event e ) 360 360 { 361 auto WaitCursorwc = new WaitCursor(shell);362 363 auto DirectoryDialogdlg = new DirectoryDialog( shell, DWT.OPEN );361 scope wc = new WaitCursor(shell); 362 363 scope dlg = new DirectoryDialog( shell, DWT.OPEN ); 364 364 dlg.setFilterPath( Globals.recentDir ); 365 365 char[] fullpath = std.string.strip( dlg.open() ); … … 373 373 if( std.file.isdir( txtMakeDefaultParser.getText() ) > 0 ) 374 374 { 375 scope _editDlgdlg = 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 ); 376 376 dlg.open(); 377 377 } trunk/current/poseidon/poseidon/controller/property/prjproperty.d
r196 r199 220 220 with( txtComment = new Text( tab1_Comp, DWT.BORDER | DWT.MULTI | DWT.V_SCROLL | DWT.WRAP ) ) 221 221 { 222 auto Colorcolor = new Color( display, 0, 0x66, 0 );222 scope color = new Color( display, 0, 0x66, 0 ); 223 223 setForeground( color ); 224 224 GridData innergridData = new GridData( GridData.FILL, GridData.BEGINNING, true, false, 3, 1 ); … … 461 461 with( txtExtraCompilerOption = new Text( tab3_Comp, DWT.BORDER | DWT.MULTI | DWT.V_SCROLL | DWT.WRAP )) 462 462 { 463 scope Fontfont = new Font( display, "Verdana", 8, DWT.NORMAL );463 scope font = new Font( display, "Verdana", 8, DWT.NORMAL ); 464 464 setFont( font ); 465 465 setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true, 4, 1) ); … … 521 521 with( txtExeArgs = new Text( tab3_Comp, DWT.BORDER | DWT.MULTI | DWT.V_SCROLL | DWT.WRAP )) 522 522 { 523 scope Fontfont = new Font( display, "Verdana", 8, DWT.NORMAL );523 scope font = new Font( display, "Verdana", 8, DWT.NORMAL ); 524 524 setFont( font ); 525 525 setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true, 4, 1) ); … … 563 563 { 564 564 GridData innergridData = new GridData( GridData.FILL, GridData.CENTER, true, false, 1, 5 ); 565 scope Fontfont = new Font( display, "Verdana", 8, DWT.NORMAL );565 scope font = new Font( display, "Verdana", 8, DWT.NORMAL ); 566 566 setFont( font ); 567 567 int ListHeight = getItemHeight() * 11; … … 680 680 // only when create new project 681 681 private void onBrowseDir(Event e) { 682 auto WaitCursorwc = new WaitCursor(shell);683 auto DirectoryDialogdlg = new DirectoryDialog(shell, DWT.OPEN);682 scope wc = new WaitCursor(shell); 683 scope dlg = new DirectoryDialog(shell, DWT.OPEN); 684 684 dlg.setFilterPath(Globals.recentDir); 685 685 char[] fullpath = dlg.open(); … … 797 797 char[] dir = txtDir.getText(); 798 798 char[] filter = txtFilter.getText(); //fixed to "d", the std.recls refuse "*.d;*.xml"??? 799 auto _Dlgdlg = new _Dlg(getShell(), dir, filter);799 scope dlg = new _Dlg(getShell(), dir, filter); 800 800 char[] result = dlg.open(); 801 801 if(result) … … 1019 1019 private void onEdit0_0( Event e ) 1020 1020 { 1021 scope _editDlgdlg = new _editDlg( getShell(), 1, 2, Globals.getTranslation( "diag.title0" ) );1021 scope dlg = new _editDlg( getShell(), 1, 2, Globals.getTranslation( "diag.title0" ) ); 1022 1022 touchAdd( listFiles, dlg.open() ); 1023 1023 } … … 1029 1029 if( hasSelect( listFiles ) ) 1030 1030 { 1031 scope _editDlgdlg = 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() ) ); 1032 1032 touchEdit( listFiles, dlg.open() ); 1033 1033 } … … 1066 1066 private void onEdit1_0( Event e ) 1067 1067 { 1068 scope _editDlgdlg = new _editDlg( getShell(), 0, 0, Globals.getTranslation( "diag.title1" ) );1068 scope dlg = new _editDlg( getShell(), 0, 0, Globals.getTranslation( "diag.title1" ) ); 1069 1069 touchAdd( listIncludePaths, dlg.open() ); 1070 1070 } … … 1076 1076 if( hasSelect( listIncludePaths ) ) 1077 1077 { 1078 scope _editDlgdlg = 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() ) ); 1079 1079 touchEdit( listIncludePaths, dlg.open() ); 1080 1080 } … … 1115 1115 private void onEdit2_0( Event e ) 1116 1116 { 1117 scope _editDlgdlg = new _editDlg( getShell(), 1, 1, Globals.getTranslation( "diag.title2" ) );1117 scope dlg = new _editDlg( getShell(), 1, 1, Globals.getTranslation( "diag.title2" ) ); 1118 1118 touchAdd( listLinkLibs, dlg.open() ); 1119 1119 } … … 1125 1125 if( hasSelect( listLinkLibs ) ) 1126 1126 { 1127 scope _editDlgdlg = 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() ) ); 1128 1128 touchEdit( listLinkLibs, dlg.open() ); 1129 1129 } … … 1164 1164 private void onEdit3_0( Event e ) 1165 1165 { 1166 scope _editDlgdlg = new _editDlg( getShell(), -1, 1, "Add Ignore Module..." );1166 scope dlg = new _editDlg( getShell(), -1, 1, "Add Ignore Module..." ); 1167 1167 touchAdd( listIgnoreModules, dlg.open() ); 1168 1168 } … … 1174 1174 if( hasSelect( listIgnoreModules ) ) 1175 1175 { 1176 scope _editDlgdlg = 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() ) ); 1177 1177 touchEdit( listIgnoreModules, dlg.open() ); 1178 1178 } trunk/current/poseidon/poseidon/controller/property/shortcutpage.d
r188 r199 212 212 _ShortCut sc = cast(_ShortCut)item.getData(); 213 213 214 auto _Dlgdlg = new _Dlg(getShell(), sc);214 scope dlg = new _Dlg(getShell(), sc); 215 215 char[] result = dlg.open(); 216 216 if(result == "OK") { trunk/current/poseidon/poseidon/controller/toolbarmanager.d
r195 r199 85 85 with(tiSaveAll = new ToolItem(toolbar, DWT.PUSH)){ 86 86 setImage(Globals.getImage("save_all")); 87 setDisabledImage(Globals.getImage("save_all_dis")); 87 88 setData(LANG_ID, "tb.saveall"); 88 89 handleEvent(null, DWT.Selection, delegate(Event e) { … … 330 331 331 332 tiSave.setEnabled(editor.modified()); 332 333 tiSaveAll.setEnabled( ( editor.getItemCount > 0 ) ? true : false ); 334 333 335 boolean havePrj = packageExp.getProjectCount() > 0; 334 336 boolean haveDoc = editor.getItemCount()> 0; … … 362 364 if( sGUI.menuMan ) 363 365 { 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 364 374 // edit menu 365 375 sGUI.menuMan.undoItem.setEnabled( tiUndo.getEnabled() ); trunk/current/poseidon/poseidon/globals.d
r198 r199 109 109 images["d"] = DWTResourceManager.getImage("d.gif"); 110 110 images["di"] = DWTResourceManager.getImage("di.gif"); 111 images["project_file"] = DWTResourceManager.getImage("project_file.gif"); 111 112 images["res"] = DWTResourceManager.getImage("res.gif"); 112 113 images["d-icon"] = DWTResourceManager.getImage("d-icon.gif"); … … 139 140 images["save"] = DWTResourceManager.getImage("save.gif"); 140 141 images["save_all"] = DWTResourceManager.getImage("save_all.gif"); 142 images["save_all_dis"] = DWTResourceManager.getImage("save_all_dis.gif"); 141 143 images["save_as"] = DWTResourceManager.getImage("saveas.gif"); 142 144 images["save_dis"] = DWTResourceManager.getImage("save_dis.gif"); 143 145 images["shift_l_edit"] = DWTResourceManager.getImage("shift_l_edit.gif"); 146 147 images["fldr"] = DWTResourceManager.getImage("fldr_obj.gif"); 148 144 149 images["show_params"] = DWTResourceManager.getImage("show_params.gif"); 145 150 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 146 154 images["sort"] = DWTResourceManager.getImage("sort.gif"); 147 155 images["synced"] = DWTResourceManager.getImage("synced.gif"); … … 186 194 images["Bud"] = DWTResourceManager.getImage("Bud.gif"); 187 195 images["Bud_dis"] = DWTResourceManager.getImage("Bud_dis.gif"); 196 197 images["help_view"] = DWTResourceManager.getImage("help_view.gif"); 198 188 199 189 200 images["class_hi"] = DWTResourceManager.getImage("class_hi.gif"); … … 351 362 if( std.file.isfile( ini ) ) 352 363 { 353 scope Filefile = new File( ini, FileMode.In );364 scope file = new File( ini, FileMode.In ); 354 365 while( !file.eof() ) 355 366 { trunk/current/poseidon/poseidon/i18n/translation.d
r164 r199 32 32 { 33 33 char[] fn = std.path.join( langdir, s ); 34 auto IniLoaderini = new IniLoader();34 scope ini = new IniLoader(); 35 35 if(ini.load(fn)) 36 36 { … … 46 46 { 47 47 char[] fn = entry.Path(); 48 auto IniLoaderini = new IniLoader();48 scope ini = new IniLoader(); 49 49 if(ini.load(fn)) 50 50 { trunk/current/poseidon/poseidon/intellisense/autocomplete.d
r198 r199 215 215 if( projectName in projectParsers ) 216 216 { 217 /+ 217 218 foreach( char[] key; projectParsers[projectName].keys ) 218 219 { … … 232 233 if( !bMatch ) removeSingleFileParser( key, projectName ); 233 234 } 235 +/ 234 236 235 237 foreach( char[] fileName; paths ) … … 491 493 if( !words.length ) return null; 492 494 493 autoCCharsSort!( char[] ) sortList = new CCharsSort!( char[] )( words );495 scope CCharsSort!( char[] ) sortList = new CCharsSort!( char[] )( words ); 494 496 words = sortList.pop(); 495 497 … … 984 986 { 985 987 char[] name = std.string.replace( moduleName, ".", "\\" ); 986 name = std.path.join( path, name ) ~".d";988 name = std.path.join( path, name );// ~".d"; 987 989 988 990 try 989 991 { 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; 992 994 addAnalyzers ~= extraParser; 993 sGUI.outputPanel.appendString( "File[ "~ name ~ " ] Loaded And Parsed.\n" );995 sGUI.outputPanel.appendString( "File[ "~ name ~ ".di ] Loaded And Parsed.\n" ); 994 996 count ++; 995 997 if( count >= countAddImportModule ) break; … … 997 999 catch( Exception e ) 998 1000 { 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 } 1000 1014 } 1001 1015 } … … 1054 1068 int[char[]] importedModuleNameArray; 1055 1069 CAnalyzerTreeNode[] importModules; 1056 char[][] modulesName;1070 //char[][] modulesName; 1057 1071 CAnalyzerTreeNode ret; 1058 1072 CAnalyzerTreeNode activeParser; … … 1183 1197 foreach( CAnalyzerTreeNode t; importFirst ) 1184 1198 { 1185 if( _inProjectParser( t.identifier) )1199 if( !( t.identifier in importedModuleNameArray ) ) 1186 1200 { 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 } 1189 1206 } 1190 1207 } … … 1216 1233 if( insidemodulesName.length ) 1217 1234 { 1218 modulesName.length = 0;1219 modulesName ~= insidemodulesName;1220 foreach( char[] s; modulesName )1235 //modulesName.length = 0; 1236 //modulesName ~= insidemodulesName; 1237 foreach( char[] s; insidemodulesName ) 1221 1238 { 1222 1239 CAnalyzerTreeNode a = _getProjectParserByModuleName( s ); … … 1235 1252 { 1236 1253 //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 1237 1270 importedModules = importModules; 1238 1271 return null; trunk/current/poseidon/poseidon/poseidon.d
r172 r199 49 49 pragma( lib, "ole32.lib"); 50 50 pragma( lib, "uuid.lib"); 51 pragma( lib, "phobos.lib");51 //pragma( lib, "phobos.lib"); 52 52 53 53 pragma( lib, "user32_dwt.lib"); trunk/current/poseidon/poseidon/style/dstyle.d
r198 r199 566 566 enumWords ~= ( t.identifier ~ "?25" ); 567 567 568 autoCCharsSort!( char[] ) sortList = new CCharsSort!( char[] )( enumWords );568 scope CCharsSort!( char[] ) sortList = new CCharsSort!( char[] )( enumWords ); 569 569 enumWords = sortList.pop(); 570 570 list = std.string.join( enumWords, " " ) ~ list; … … 907 907 if( words.length ) 908 908 { 909 autoCCharsSort!( char[] ) sortList = new CCharsSort!( char[] )( words );909 scope CCharsSort!( char[] ) sortList = new CCharsSort!( char[] )( words ); 910 910 words = sortList.pop(); 911 911 list = std.string.join( words, "?22 " ) ~ "?22"; trunk/current/poseidon/poseidon/style/xpm.d
r188 r199 16 16 try 17 17 { 18 autofile = new File( fileName, FileMode.In );18 scope file = new File( fileName, FileMode.In ); 19 19 20 20 if( file.readLine() != "/* XPM */" ) return null; trunk/current/poseidon/poseidon/util/fileutil.d
r185 r199 48 48 case -1: 49 49 // ANSI/MBCS should be convert to UTF8 encoding 50 autochar[] buf = new char[cast(int)f.size()];50 scope char[] buf = new char[cast(int)f.size()]; 51 51 while(!f.eof()) 52 52 { … … 64 64 case BOM.UTF8: 65 65 // some time you get -1, set it to UTF8 66 autochar[] buf = new char[cast(int)f.size()];66 scope char[] buf = new char[cast(int)f.size()]; 67 67 while(!f.eof()) 68 68 { … … 73 73 // UTF16 74 74 case BOM.UTF16LE, BOM.UTF16BE: 75 autowchar[] wbuf = new wchar[cast(int)f.size() / wchar.sizeof];75 scope wchar[] wbuf = new wchar[cast(int)f.size() / wchar.sizeof]; 76 76 while(!f.eof()) 77 77 { … … 82 82 // UFT32 83 83 case BOM.UTF32LE, BOM.UTF32BE: 84 autodchar[] dbuf = new dchar[cast(int)f.size() / dchar.sizeof];84 scope dchar[] dbuf = new dchar[cast(int)f.size() / dchar.sizeof]; 85 85 while(!f.eof()) 86 86 {
