- Timestamp:
- 07/24/11 11:52:23 (10 months ago)
- Files:
-
- trunk/current/poseidon/images/bookmark_obj.gif (added)
- trunk/current/poseidon/images/debug/Thumbs.db (modified) (previous)
- trunk/current/poseidon/images/obj16/xpm/arrow.xpm (added)
- trunk/current/poseidon/images/obj16/xpm/bookmark_obj.xpm (added)
- trunk/current/poseidon/images/obj16/xpm/breakpoint.xpm (added)
- trunk/current/poseidon/images/obj16/xpm/breakpoint_unchecked.xpm (added)
- trunk/current/poseidon/images/target.gif (modified) (previous)
- trunk/current/poseidon/poseidon.exe (modified) (previous)
- trunk/current/poseidon/poseidon/controller/ddoc/ddocparser.d (modified) (1 diff)
- trunk/current/poseidon/poseidon/controller/debugcontrol/watch.d (modified) (3 diffs)
- trunk/current/poseidon/poseidon/controller/edititem.d (modified) (7 diffs)
- trunk/current/poseidon/poseidon/controller/editor.d (modified) (2 diffs)
- trunk/current/poseidon/poseidon/globals.d (modified) (2 diffs)
- trunk/current/poseidon/poseidon/model/editorsettings.d (modified) (1 diff)
- trunk/current/poseidon/poseidon/style/dstyle.d (modified) (7 diffs)
- trunk/current/poseidon/poseidon/style/xpm.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/current/poseidon/poseidon/controller/ddoc/ddocparser.d
r288 r292 303 303 } 304 304 } 305 else if( lineText[0..3] == "///" ) 306 { 307 result = std.string.strip( lineText[3..length] ); 308 if( result == "ditto" ) result = getDDOCComment( node.prev, scx ); 309 310 return result; 311 } 312 305 313 } 306 314 } trunk/current/poseidon/poseidon/controller/debugcontrol/watch.d
r290 r292 943 943 this.setControl( table ); 944 944 945 table.handleEvent( null, DWT.Selection, &onSelection ); 945 946 table.handleEvent( null, DWT.DefaultSelection, &onDefaultSelection ); 946 947 } … … 965 966 } 966 967 968 void onSelection( Event e ) 969 { 970 TableItem ti = cast(TableItem) e.item; 971 972 if( e.detail == DWT.CHECK ) 973 { 974 if( ti.getChecked ) 975 { 976 if( sGUI.debuggerDMD.isPipeCreate() ) sGUI.debuggerDMD.write( "bp " ~ std.string.strip( ti.getText( 1 ) ) ~ ":" ~ std.string.strip( ti.getText( 2 ) ) ~ "\n" ); 977 } 978 else 979 { 980 if( sGUI.debuggerDMD.isPipeCreate() ) sGUI.debuggerDMD.write( "dbp " ~ std.string.strip( ti.getText( 1 ) ) ~ ":" ~ std.string.strip( ti.getText( 2 ) ) ~ "\n" ); 981 } 982 983 EditItem eti = sGUI.editor.findEditItem( std.string.strip( ti.getText( 3 ) ) ); 984 if( eti !is null ) 985 { 986 if( eti.scintilla !is null ) 987 { 988 int lineNumber = std.string.atoi( ti.getText( 2 ) ) - 1; 989 uint state = eti.scintilla.markerGet( lineNumber ); 990 if( state & ( 1 << Editor.MARK_DEBUGSYMBOLE ) ) 991 { 992 eti.scintilla.markerDelete( lineNumber, Editor.MARK_DEBUGSYMBOLE ); 993 } 994 else 995 { 996 eti.scintilla.markerAdd( lineNumber, Editor.MARK_DEBUGSYMBOLE ); 997 } 998 } 999 1000 } 1001 } 1002 } 1003 967 1004 public: 968 1005 this( CTabFolder parent ) … … 1000 1037 { 1001 1038 if( sGUI.debuggerDMD.isPipeCreate() ) 1002 sGUI.debuggerDMD.write( "dbp " ~ std.string.strip( ti.getText( 3) ) ~ ":" ~ std.string.strip( ti.getText( 2 ) ) ~ "\n" );1003 1039 sGUI.debuggerDMD.write( "dbp " ~ std.string.strip( ti.getText( 1 ) ) ~ ":" ~ std.string.strip( ti.getText( 2 ) ) ~ "\n" ); 1040 1004 1041 EditItem ei = sGUI.editor.findEditItem( std.string.strip( ti.getText( 3 ) ) ); 1005 1042 if( ei !is null ) ei.deleteAllDebugMarker(); trunk/current/poseidon/poseidon/controller/edititem.d
r289 r292 41 41 private import poseidon.controller.debugcontrol.debugparser; 42 42 private import poseidon.controller.ddoc.ddocparser; 43 private import poseidon.style.xpm; 43 44 private import std.stream, std.string, std.path; 44 45 … … 95 96 96 97 this.handleEvent(null, DWT.Dispose, &onDispose); 97 //scintilla.usePopUp( false ); 98 scintilla.defineMarker( Editor.MARK_SYMBOLE, Scintilla.SC_MARK_CIRCLE, 0x00000000, 0x001BA53E ); 99 scintilla.defineMarker( Editor.MARK_DEBUGSYMBOLE, Scintilla.SC_MARK_SMALLRECT, 0x0000FFFF, 0x000000FF ); 100 scintilla.defineMarker( Editor.MARK_DEBUGRUNSYMBOLE, Scintilla.SC_MARK_ARROW, 0x00FFFF00, 0x000000FF ); 98 99 scintilla.markerDefine( Editor.MARK_SYMBOLE, scintilla.SC_MARK_PIXMAP ); 100 scintilla.call( scintilla.SCI_MARKERDEFINEPIXMAP, Editor.MARK_SYMBOLE, cast(int) XPM.bookmark_xpm ); 101 //scintilla.defineMarker( Editor.MARK_SYMBOLE, Scintilla.SC_MARK_CIRCLE, 0x00000000, 0x001BA53E ); 102 103 scintilla.markerDefine( Editor.MARK_DEBUGRUNSYMBOLE, scintilla.SC_MARK_PIXMAP ); 104 scintilla.call( scintilla.SCI_MARKERDEFINEPIXMAP, Editor.MARK_DEBUGRUNSYMBOLE, cast(int) XPM.arrow_xpm ); 105 //scintilla.defineMarker( Editor.MARK_DEBUGRUNSYMBOLE, Scintilla.SC_MARK_ARROW, 0x00FFFF00, 0x000000FF ); 106 107 scintilla.markerDefine( Editor.MARK_DEBUGSYMBOLE, scintilla.SC_MARK_PIXMAP ); 108 scintilla.call( scintilla.SCI_MARKERDEFINEPIXMAP, Editor.MARK_DEBUGSYMBOLE, cast(int) XPM.breakpoint_xpm ); 109 //scintilla.defineMarker( Editor.MARK_DEBUGSYMBOLE, Scintilla.SC_MARK_SMALLRECT, 0x0000FFFF, 0x000000FF ); 110 101 111 scintilla.defineMarker( Editor.MARK_DEBUGRUNLINE, Scintilla.SC_MARK_ARROW, 0x00FFFF00, 0x000000FF ); 102 112 … … 394 404 setText( Globals.getTranslation( "edit.undo" ) ); 395 405 handleEvent( this, DWT.Selection, delegate(Event e){ 396 sActionMan.actionUndo( e ); 406 EditItem pthis = cast(EditItem) e.cData; 407 pthis._undo(); 397 408 }); 398 409 } … … 403 414 setText( Globals.getTranslation( "edit.redo" ) ); 404 415 handleEvent( this, DWT.Selection, delegate(Event e){ 405 sActionMan.actionRedo( e ); 416 EditItem pthis = cast(EditItem) e.cData; 417 pthis._redo(); 406 418 }); 407 419 } … … 415 427 setText( Globals.getTranslation( "edit.cut" ) ); 416 428 handleEvent( this, DWT.Selection, delegate(Event e){ 417 sActionMan.actionCut( e ); 429 EditItem pthis = cast(EditItem) e.cData; 430 pthis._cut(); 418 431 }); 419 432 } … … 435 448 setText( Globals.getTranslation( "edit.paste" ) ); 436 449 handleEvent( this, DWT.Selection, delegate(Event e){ 437 sActionMan.actionPaste( e ); 450 EditItem pthis = cast(EditItem) e.cData; 451 pthis._copy(); 438 452 }); 439 453 } … … 446 460 setText( Globals.getTranslation( "debug.tooltip_run" ) ); 447 461 handleEvent( this, DWT.Selection, delegate(Event e){ 448 sActionMan.actionDebugExec(e); 462 EditItem pthis = cast(EditItem) e.cData; 463 pthis._paste(); 449 464 }); 450 465 } 451 466 467 with( new MenuItem( popupMenu, DWT.PUSH ) ) 468 { 469 setImage( Globals.getImage( "debug_runtocursor" ) ); 470 setText( Globals.getTranslation( "debug.runtocursor" ) ); 471 handleEvent( this, DWT.Selection, delegate(Event e){ 472 EditItem pthis = cast(EditItem) e.cData; 473 if( pthis.scintilla !is null ) 474 sGUI.debuggerDMD.runToCursor( pthis.getFileName(), pthis.scintilla.getCurrentLineNumber + 1, sGUI.packageExp.getActiveProjectDir ); 475 }); 476 } 477 452 478 with( inMenuItem = new MenuItem( popupMenu, DWT.PUSH ) ) 453 479 { trunk/current/poseidon/poseidon/controller/editor.d
r288 r292 78 78 } 79 79 80 const int MARK_SYMBOLE = 2;81 const int MARK_DEBUGSYMBOLE = 1;80 const int MARK_SYMBOLE = 1; 81 const int MARK_DEBUGSYMBOLE = 2; 82 82 const int MARK_DEBUGRUNSYMBOLE = 3; 83 83 const int MARK_DEBUGRUNLINE = 4; … … 160 160 pthis.checkExternModify(); 161 161 }); 162 163 164 private_method_xpm = getXpm( "images\\obj16\\xpm\\function_private_obj.xpm");165 protected_method_xpm = getXpm( "images\\obj16\\xpm\\function_protected_obj.xpm" );166 public_method_xpm = getXpm( "images\\obj16\\xpm\\function_obj.xpm" );167 private_variable_xpm = getXpm( "images\\obj16\\xpm\\variable_private_obj.xpm" );168 protected_variable_xpm = getXpm( "images\\obj16\\xpm\\variable_protected_obj.xpm" );169 public_variable_xpm = getXpm( "images\\obj16\\xpm\\variable_obj.xpm" );170 class_private_obj_xpm = getXpm( "images\\obj16\\xpm\\class_private_obj.xpm" );171 class_protected_obj_xpm = getXpm( "images\\obj16\\xpm\\class_protected_obj.xpm" );172 class_obj_xpm = getXpm( "images\\obj16\\xpm\\class_obj.xpm" );173 struct_private_obj_xpm = getXpm( "images\\obj16\\xpm\\struct_private_obj.xpm" );174 struct_protected_obj_xpm = getXpm( "images\\obj16\\xpm\\struct_protected_obj.xpm" );175 struct_obj_xpm = getXpm( "images\\obj16\\xpm\\struct_obj.xpm" );176 interface_private_obj_xpm = getXpm( "images\\obj16\\xpm\\interface_private_obj.xpm" );177 interface_protected_obj_xpm = getXpm( "images\\obj16\\xpm\\interface_protected_obj.xpm" );178 interface_obj_xpm = getXpm( "images\\obj16\\xpm\\interface_obj.xpm" );179 union_private_obj_xpm = getXpm( "images\\obj16\\xpm\\union_private_obj.xpm" );180 union_protected_obj_xpm = getXpm( "images\\obj16\\xpm\\union_protected_obj.xpm" );181 union_obj_xpm = getXpm( "images\\obj16\\xpm\\union_obj.xpm" );182 enum_private_obj_xpm = getXpm( "images\\obj16\\xpm\\enum_private_obj.xpm" );183 enum_protected_obj_xpm = getXpm( "images\\obj16\\xpm\\enum_protected_obj.xpm" );184 enum_obj_xpm = getXpm( "images\\obj16\\xpm\\enum_obj.xpm" );185 186 normal_xpm = getXpm( "images\\obj16\\xpm\\normal.xpm" );187 import_xpm = getXpm( "images\\obj16\\xpm\\import.xpm" );188 autoWord_xpm = getXpm( "images\\obj16\\xpm\\autoword.xpm" );189 190 parameter_xpm = getXpm( "images\\obj16\\xpm\\parameter_obj.xpm" );191 enum_member_obj_xpm = getXpm( "images\\obj16\\xpm\\enum_member_obj.xpm" );192 template_obj_xpm = getXpm( "images\\obj16\\xpm\\template_obj.xpm" );193 194 alias_obj_xpm = getXpm( "images\\obj16\\xpm\\alias_obj.xpm" );195 mixin_template_obj_xpm = getXpm( "images\\obj16\\xpm\\mixin_template_obj.xpm" );196 functionpointer_obj_xpm = getXpm( "images\\obj16\\xpm\\functionpointer_obj.xpm" );197 198 template_function_obj_xpm = getXpm( "images\\obj16\\xpm\\template_function_obj.xpm" );199 template_class_obj_xpm = getXpm( "images\\obj16\\xpm\\template_class_obj.xpm" );200 template_struct_obj_xpm = getXpm( "images\\obj16\\xpm\\template_struct_obj.xpm" );201 template_union_obj_xpm = getXpm( "images\\obj16\\xpm\\template_union_obj.xpm" );202 template_interface_obj_xpm = getXpm( "images\\obj16\\xpm\\template_interface_obj.xpm" );203 162 } 204 163 trunk/current/poseidon/poseidon/globals.d
r291 r292 21 21 private import CodeAnalyzer.syntax.nodeHsu; 22 22 23 static public char[] versionNumber = "rev.29 1";23 static public char[] versionNumber = "rev.292"; 24 24 25 25 static public boolean showSplash = true; … … 282 282 images["annotation_remove"] = DWTResourceManager.getImage("debug/annotate_remove.gif"); 283 283 images["annotation_removedoc"] = DWTResourceManager.getImage("debug/annotate_removedoc.gif"); 284 images["warning"] = DWTResourceManager.getImage("debug/warning.gif"); 284 //images["warning"] = DWTResourceManager.getImage("debug/warning.gif"); 285 images["bookmark"] = DWTResourceManager.getImage("bookmark_obj.gif"); 285 286 286 287 images["debug_exc_dis"] = DWTResourceManager.getImage("debug//debug_exc_dis.gif"); trunk/current/poseidon/poseidon/model/editorsettings.d
r289 r292 438 438 439 439 //setup xpm image 440 sc.call( sc.SCI_REGISTERIMAGE, 0, cast(int) private_method_xpm, true );441 sc.call( sc.SCI_REGISTERIMAGE, 1, cast(int) protected_method_xpm, true );442 sc.call( sc.SCI_REGISTERIMAGE, 2, cast(int) public_method_xpm, true );443 sc.call( sc.SCI_REGISTERIMAGE, 3, cast(int) private_variable_xpm, true );444 sc.call( sc.SCI_REGISTERIMAGE, 4, cast(int) protected_variable_xpm, true );445 sc.call( sc.SCI_REGISTERIMAGE, 5, cast(int) public_variable_xpm, true );446 sc.call( sc.SCI_REGISTERIMAGE, 6, cast(int) class_private_obj_xpm, true );447 sc.call( sc.SCI_REGISTERIMAGE, 7, cast(int) class_protected_obj_xpm, true );448 sc.call( sc.SCI_REGISTERIMAGE, 8, cast(int) class_obj_xpm, true );449 sc.call( sc.SCI_REGISTERIMAGE, 9, cast(int) struct_private_obj_xpm, true );450 sc.call( sc.SCI_REGISTERIMAGE,10, cast(int) struct_protected_obj_xpm, true );451 sc.call( sc.SCI_REGISTERIMAGE,11, cast(int) struct_obj_xpm, true );452 sc.call( sc.SCI_REGISTERIMAGE,12, cast(int) interface_private_obj_xpm, true );453 sc.call( sc.SCI_REGISTERIMAGE,13, cast(int) interface_protected_obj_xpm, true );454 sc.call( sc.SCI_REGISTERIMAGE,14, cast(int) interface_obj_xpm, true );455 sc.call( sc.SCI_REGISTERIMAGE,15, cast(int) union_private_obj_xpm, true );456 sc.call( sc.SCI_REGISTERIMAGE,16, cast(int) union_protected_obj_xpm, true );457 sc.call( sc.SCI_REGISTERIMAGE,17, cast(int) union_obj_xpm, true );458 sc.call( sc.SCI_REGISTERIMAGE,18, cast(int) enum_private_obj_xpm, true );459 sc.call( sc.SCI_REGISTERIMAGE,19, cast(int) enum_protected_obj_xpm, true );460 sc.call( sc.SCI_REGISTERIMAGE,20, cast(int) enum_obj_xpm, true );461 462 sc.call( sc.SCI_REGISTERIMAGE,21, cast(int) normal_xpm, true );463 sc.call( sc.SCI_REGISTERIMAGE,22, cast(int) import_xpm, true );464 sc.call( sc.SCI_REGISTERIMAGE,23, cast(int) autoWord_xpm, true );465 466 sc.call( sc.SCI_REGISTERIMAGE,24, cast(int) parameter_xpm, true );467 sc.call( sc.SCI_REGISTERIMAGE,25, cast(int) enum_member_obj_xpm, true );468 sc.call( sc.SCI_REGISTERIMAGE,26, cast(int) template_obj_xpm, true );469 470 sc.call( sc.SCI_REGISTERIMAGE,27, cast(int) alias_obj_xpm, true );471 sc.call( sc.SCI_REGISTERIMAGE,28, cast(int) mixin_template_obj_xpm, true );472 sc.call( sc.SCI_REGISTERIMAGE,29, cast(int) functionpointer_obj_xpm, true );473 474 sc.call( sc.SCI_REGISTERIMAGE,30, cast(int) template_function_obj_xpm, true );475 sc.call( sc.SCI_REGISTERIMAGE,31, cast(int) template_class_obj_xpm, true );476 sc.call( sc.SCI_REGISTERIMAGE,32, cast(int) template_struct_obj_xpm, true );477 sc.call( sc.SCI_REGISTERIMAGE,33, cast(int) template_union_obj_xpm, true );478 sc.call( sc.SCI_REGISTERIMAGE,34, cast(int) template_interface_obj_xpm, true );440 sc.call( sc.SCI_REGISTERIMAGE, 0, cast(int) XPM.private_method_xpm, true ); 441 sc.call( sc.SCI_REGISTERIMAGE, 1, cast(int) XPM.protected_method_xpm, true ); 442 sc.call( sc.SCI_REGISTERIMAGE, 2, cast(int) XPM.public_method_xpm, true ); 443 sc.call( sc.SCI_REGISTERIMAGE, 3, cast(int) XPM.private_variable_xpm, true ); 444 sc.call( sc.SCI_REGISTERIMAGE, 4, cast(int) XPM.protected_variable_xpm, true ); 445 sc.call( sc.SCI_REGISTERIMAGE, 5, cast(int) XPM.public_variable_xpm, true ); 446 sc.call( sc.SCI_REGISTERIMAGE, 6, cast(int) XPM.class_private_obj_xpm, true ); 447 sc.call( sc.SCI_REGISTERIMAGE, 7, cast(int) XPM.class_protected_obj_xpm, true ); 448 sc.call( sc.SCI_REGISTERIMAGE, 8, cast(int) XPM.class_obj_xpm, true ); 449 sc.call( sc.SCI_REGISTERIMAGE, 9, cast(int) XPM.struct_private_obj_xpm, true ); 450 sc.call( sc.SCI_REGISTERIMAGE,10, cast(int) XPM.struct_protected_obj_xpm, true ); 451 sc.call( sc.SCI_REGISTERIMAGE,11, cast(int) XPM.struct_obj_xpm, true ); 452 sc.call( sc.SCI_REGISTERIMAGE,12, cast(int) XPM.interface_private_obj_xpm, true ); 453 sc.call( sc.SCI_REGISTERIMAGE,13, cast(int) XPM.interface_protected_obj_xpm, true ); 454 sc.call( sc.SCI_REGISTERIMAGE,14, cast(int) XPM.interface_obj_xpm, true ); 455 sc.call( sc.SCI_REGISTERIMAGE,15, cast(int) XPM.union_private_obj_xpm, true ); 456 sc.call( sc.SCI_REGISTERIMAGE,16, cast(int) XPM.union_protected_obj_xpm, true ); 457 sc.call( sc.SCI_REGISTERIMAGE,17, cast(int) XPM.union_obj_xpm, true ); 458 sc.call( sc.SCI_REGISTERIMAGE,18, cast(int) XPM.enum_private_obj_xpm, true ); 459 sc.call( sc.SCI_REGISTERIMAGE,19, cast(int) XPM.enum_protected_obj_xpm, true ); 460 sc.call( sc.SCI_REGISTERIMAGE,20, cast(int) XPM.enum_obj_xpm, true ); 461 462 sc.call( sc.SCI_REGISTERIMAGE,21, cast(int) XPM.normal_xpm, true ); 463 sc.call( sc.SCI_REGISTERIMAGE,22, cast(int) XPM.import_xpm, true ); 464 sc.call( sc.SCI_REGISTERIMAGE,23, cast(int) XPM.autoWord_xpm, true ); 465 466 sc.call( sc.SCI_REGISTERIMAGE,24, cast(int) XPM.parameter_xpm, true ); 467 sc.call( sc.SCI_REGISTERIMAGE,25, cast(int) XPM.enum_member_obj_xpm, true ); 468 sc.call( sc.SCI_REGISTERIMAGE,26, cast(int) XPM.template_obj_xpm, true ); 469 470 sc.call( sc.SCI_REGISTERIMAGE,27, cast(int) XPM.alias_obj_xpm, true ); 471 sc.call( sc.SCI_REGISTERIMAGE,28, cast(int) XPM.mixin_template_obj_xpm, true ); 472 sc.call( sc.SCI_REGISTERIMAGE,29, cast(int) XPM.functionpointer_obj_xpm, true ); 473 474 sc.call( sc.SCI_REGISTERIMAGE,30, cast(int) XPM.template_function_obj_xpm, true ); 475 sc.call( sc.SCI_REGISTERIMAGE,31, cast(int) XPM.template_class_obj_xpm, true ); 476 sc.call( sc.SCI_REGISTERIMAGE,32, cast(int) XPM.template_struct_obj_xpm, true ); 477 sc.call( sc.SCI_REGISTERIMAGE,33, cast(int) XPM.template_union_obj_xpm, true ); 478 sc.call( sc.SCI_REGISTERIMAGE,34, cast(int) XPM.template_interface_obj_xpm, true ); 479 479 480 480 //sc.call( sc.SCI_MARKERDEFINEPIXMAP, sc.SC_MARK_PIXMAP, cast(int) debug_obj_xpm, true ); trunk/current/poseidon/poseidon/style/dstyle.d
r291 r292 18 18 private import poseidon.controller.edititem; 19 19 20 /+20 21 21 class Timer : Runnable 22 22 { … … 33 33 void run() 34 34 { 35 MessageBox.showMessage("Live"); 35 36 if( scx !is null ) addAnalyzerNodeLive( scx ); 36 37 } … … 46 47 } 47 48 } 48 +/49 49 50 50 51 /+ … … 190 191 } 191 192 192 /+193 193 private Timer liveTimer; 194 194 … … 202 202 if( liveTimer !is null ) delete liveTimer; 203 203 } 204 +/205 204 206 205 char[][] getKeyWords() … … 246 245 if( Globals.updateParseLiveFull || Globals.updateParseLive ) 247 246 { 248 uint code = cast(uint) e.keyCode;247 //uint code = cast(uint) e.keyCode; 249 248 250 249 if( e.keyCode == DWT.INSERT && e.stateMask & DWT.SHIFT ) 251 250 { 252 251 ScintillaEx scx = cast(ScintillaEx) e.widget; 253 addAnalyzerNodeLive( scx ); 252 if( Globals.updateParseLiveFull ) 253 { 254 liveTimer.stop(); 255 liveTimer.setScintilla( scx ); 256 liveTimer.setInterval( 500 ); 257 } 258 else 259 { 260 addAnalyzerNodeLive( scx ); 261 } 254 262 } 255 263 else if( ( e.keyCode > 31 && e.keyCode < 128 ) || e.keyCode == 8 || e.keyCode == 9 ) … … 257 265 //MessageBox.showMessage( "onKeyUp_SURE" ); 258 266 ScintillaEx scx = cast(ScintillaEx) e.widget; 259 /* 260 liveTimer.stop(); 261 liveTimer.setScintilla( scx ); 262 liveTimer.setInterval( 200 ); 263 */ 264 addAnalyzerNodeLive( scx ); 267 268 if( Globals.updateParseLiveFull ) 269 { 270 liveTimer.stop(); 271 liveTimer.setScintilla( scx ); 272 liveTimer.setInterval( 500 ); 273 } 274 else 275 { 276 addAnalyzerNodeLive( scx ); 277 } 265 278 } 266 279 } trunk/current/poseidon/poseidon/style/xpm.d
r239 r292 1 1 module poseidon.style.xpm; 2 3 2 4 3 private import std.stream; 5 4 6 /* XPM */ 7 static char** private_method_xpm, protected_method_xpm, public_method_xpm, private_variable_xpm, alias_obj_xpm, 8 protected_variable_xpm, public_variable_xpm, class_private_obj_xpm, class_protected_obj_xpm, 9 class_obj_xpm, struct_private_obj_xpm, struct_protected_obj_xpm, struct_obj_xpm, mixin_template_obj_xpm, 10 interface_private_obj_xpm, interface_protected_obj_xpm, interface_obj_xpm, union_private_obj_xpm, 11 union_protected_obj_xpm, union_obj_xpm, enum_private_obj_xpm, enum_protected_obj_xpm, enum_obj_xpm, 12 normal_xpm, import_xpm, autoWord_xpm, parameter_xpm, enum_member_obj_xpm, template_obj_xpm, 13 functionpointer_obj_xpm, template_function_obj_xpm, template_class_obj_xpm, template_struct_obj_xpm, 14 template_union_obj_xpm, template_interface_obj_xpm; 5 class XPM 6 { 7 /* XPM */ 8 static char** private_method_xpm, protected_method_xpm, public_method_xpm, private_variable_xpm, alias_obj_xpm, 9 protected_variable_xpm, public_variable_xpm, class_private_obj_xpm, class_protected_obj_xpm, 10 class_obj_xpm, struct_private_obj_xpm, struct_protected_obj_xpm, struct_obj_xpm, mixin_template_obj_xpm, 11 interface_private_obj_xpm, interface_protected_obj_xpm, interface_obj_xpm, union_private_obj_xpm, 12 union_protected_obj_xpm, union_obj_xpm, enum_private_obj_xpm, enum_protected_obj_xpm, enum_obj_xpm, 13 normal_xpm, import_xpm, autoWord_xpm, parameter_xpm, enum_member_obj_xpm, template_obj_xpm, 14 functionpointer_obj_xpm, template_function_obj_xpm, template_class_obj_xpm, template_struct_obj_xpm, 15 template_union_obj_xpm, template_interface_obj_xpm; 15 16 16 public static char** getXpm( char[] fileName ) 17 { 18 try17 static char** bookmark_xpm, arrow_xpm, breakpoint_xpm; 18 19 static this() 19 20 { 20 scope file = new File( fileName, FileMode.In ); 21 private_method_xpm = getXpm( "images\\obj16\\xpm\\function_private_obj.xpm"); 22 protected_method_xpm = getXpm( "images\\obj16\\xpm\\function_protected_obj.xpm" ); 23 public_method_xpm = getXpm( "images\\obj16\\xpm\\function_obj.xpm" ); 24 private_variable_xpm = getXpm( "images\\obj16\\xpm\\variable_private_obj.xpm" ); 25 protected_variable_xpm = getXpm( "images\\obj16\\xpm\\variable_protected_obj.xpm" ); 26 public_variable_xpm = getXpm( "images\\obj16\\xpm\\variable_obj.xpm" ); 27 class_private_obj_xpm = getXpm( "images\\obj16\\xpm\\class_private_obj.xpm" ); 28 class_protected_obj_xpm = getXpm( "images\\obj16\\xpm\\class_protected_obj.xpm" ); 29 class_obj_xpm = getXpm( "images\\obj16\\xpm\\class_obj.xpm" ); 30 struct_private_obj_xpm = getXpm( "images\\obj16\\xpm\\struct_private_obj.xpm" ); 31 struct_protected_obj_xpm = getXpm( "images\\obj16\\xpm\\struct_protected_obj.xpm" ); 32 struct_obj_xpm = getXpm( "images\\obj16\\xpm\\struct_obj.xpm" ); 33 interface_private_obj_xpm = getXpm( "images\\obj16\\xpm\\interface_private_obj.xpm" ); 34 interface_protected_obj_xpm = getXpm( "images\\obj16\\xpm\\interface_protected_obj.xpm" ); 35 interface_obj_xpm = getXpm( "images\\obj16\\xpm\\interface_obj.xpm" ); 36 union_private_obj_xpm = getXpm( "images\\obj16\\xpm\\union_private_obj.xpm" ); 37 union_protected_obj_xpm = getXpm( "images\\obj16\\xpm\\union_protected_obj.xpm" ); 38 union_obj_xpm = getXpm( "images\\obj16\\xpm\\union_obj.xpm" ); 39 enum_private_obj_xpm = getXpm( "images\\obj16\\xpm\\enum_private_obj.xpm" ); 40 enum_protected_obj_xpm = getXpm( "images\\obj16\\xpm\\enum_protected_obj.xpm" ); 41 enum_obj_xpm = getXpm( "images\\obj16\\xpm\\enum_obj.xpm" ); 42 43 normal_xpm = getXpm( "images\\obj16\\xpm\\normal.xpm" ); 44 import_xpm = getXpm( "images\\obj16\\xpm\\import.xpm" ); 45 autoWord_xpm = getXpm( "images\\obj16\\xpm\\autoword.xpm" ); 21 46 22 if( file.readLine() != "/* XPM */" ) return null; 23 47 parameter_xpm = getXpm( "images\\obj16\\xpm\\parameter_obj.xpm" ); 48 enum_member_obj_xpm = getXpm( "images\\obj16\\xpm\\enum_member_obj.xpm" ); 49 template_obj_xpm = getXpm( "images\\obj16\\xpm\\template_obj.xpm" ); 24 50 25 char[][] data; 26 int countActiveLine; 27 while( !file.eof ) 51 alias_obj_xpm = getXpm( "images\\obj16\\xpm\\alias_obj.xpm" ); 52 mixin_template_obj_xpm = getXpm( "images\\obj16\\xpm\\mixin_template_obj.xpm" ); 53 functionpointer_obj_xpm = getXpm( "images\\obj16\\xpm\\functionpointer_obj.xpm" ); 54 55 template_function_obj_xpm = getXpm( "images\\obj16\\xpm\\template_function_obj.xpm" ); 56 template_class_obj_xpm = getXpm( "images\\obj16\\xpm\\template_class_obj.xpm" ); 57 template_struct_obj_xpm = getXpm( "images\\obj16\\xpm\\template_struct_obj.xpm" ); 58 template_union_obj_xpm = getXpm( "images\\obj16\\xpm\\template_union_obj.xpm" ); 59 template_interface_obj_xpm = getXpm( "images\\obj16\\xpm\\template_interface_obj.xpm" ); 60 61 62 bookmark_xpm = getXpm( "images\\obj16\\xpm\\bookmark_obj.xpm"); 63 arrow_xpm = getXpm( "images\\obj16\\xpm\\arrow.xpm"); 64 breakpoint_xpm = getXpm( "images\\obj16\\xpm\\breakpoint.xpm"); 65 } 66 67 public static char** getXpm( char[] fileName ) 68 { 69 try 28 70 { 29 char[] f = file.readLine(); 30 if( f.length ) 71 scope file = new File( fileName, FileMode.In ); 72 73 if( file.readLine() != "/* XPM */" ) return null; 74 75 76 char[][] data; 77 int countActiveLine; 78 while( !file.eof ) 31 79 { 32 if( f[0] == '"' ) 80 char[] f = file.readLine(); 81 if( f.length ) 33 82 { 34 int rPos = std.string.rfind( f, "\"" ); 83 if( f[0] == '"' ) 84 { 85 int rPos = std.string.rfind( f, "\"" ); 35 86 36 data ~= ( f[1..rPos].dup ); 37 countActiveLine ++; 87 data ~= ( f[1..rPos].dup ); 88 countActiveLine ++; 89 } 38 90 } 39 91 } 92 93 file.close; 94 95 char** result = (new char*[countActiveLine]).ptr; 96 for( int i; i < data.length; ++ i ) 97 { 98 char[] charData = data[i]; 99 *( result + i ) = charData.ptr; 100 } 101 102 return result; 40 103 } 41 42 file.close; 43 44 char** result = (new char*[countActiveLine]).ptr; 45 for( int i; i < data.length; ++ i ) 104 catch 46 105 { 47 char[] charData = data[i]; 48 *( result + i ) = charData.ptr; 106 return null; 49 107 } 50 51 return result;52 }53 catch54 {55 return null;56 108 } 57 109 }
