From f75f9e88fd1722e883dd5ce9f0d9846b70831f4c Mon Sep 17 00:00:00 2001 From: jploski Date: Mon, 6 Feb 2012 17:51:03 +0100 Subject: [PATCH] Bringing Git repo to compilable state --- .project | 11 + ANTLR/.classpath | 0 ANTLR/.gitignore | 1 + ANTLR/.project | 0 ANTLR/AddTokenTypes.java | 0 ANTLR/AddTokenTypes.txt | 0 ANTLR/Adder.java | 0 ANTLR/Bin/.classpath | 20 - ANTLR/Bin/.project | 24 - ANTLR/Bin/AddTokenTypes.class | Bin 1172 -> 0 bytes ANTLR/Bin/AddTokenTypes.txt | 32 - ANTLR/Bin/Adder$PerlLexer.class | Bin 2167 -> 0 bytes ANTLR/Bin/Adder.class | Bin 1388 -> 0 bytes ANTLR/Bin/PerlBaseLexer.class | Bin 12989 -> 0 bytes ANTLR/Bin/PerlDebugValue.class | Bin 2717 -> 0 bytes ANTLR/Bin/PerlDebugVar.class | Bin 3012 -> 0 bytes ANTLR/Bin/PerlParser.class | Bin 1237 -> 0 bytes ANTLR/Bin/PerlParserSimple.class | Bin 14320 -> 0 bytes ANTLR/Bin/PerlVarParser$PerlLexer.class | Bin 2199 -> 0 bytes ANTLR/Bin/PerlVarParser.class | Bin 1948 -> 0 bytes ANTLR/Bin/test.dat | 18 - ANTLR/Bin/var_new.dat | 162 --- ANTLR/Bin/vars.dat | 79 -- ANTLR/PerlBaseLexer.java | 0 ANTLR/PerlDebugValue.java | 0 ANTLR/PerlDebugVar.java | 0 ANTLR/PerlParser.java | 0 ANTLR/PerlParserSimple.java | 0 ANTLR/PerlVarParser.java | 0 ANTLR/add.g | 0 ANTLR/modes/catalog | 0 ANTLR/modes/catalog.dtd | 0 ANTLR/modes/perl.xml | 0 ANTLR/modes/xmode.dtd | 0 ANTLR/test.dat | 0 ANTLR/var_new.dat | 0 ANTLR/vars.dat | 0 CVSROOT/syncmail2.1 | 0 org.epic.debug/.gitignore | 1 + org.epic.debug/error.dat | 127 -- org.epic.debug/icons/expression_view.gif | Bin org.epic.debug/icons/run.gif | Bin .../org/epic/debug/PerlBreakpointManager.java | 150 --- .../src/org/epic/debug/PerlDebugThread.java | 194 --- .../src/org/epic/debug/db/PerlDB.java | 714 ---------- .../epic/debug/varparser/PerlDebugValue.java | 143 -- .../epic/debug/varparser/PerlDebugVar.java | 171 --- .../epic/debug/varparser/TokenVarParser.java | 251 ---- org.epic.debug/test.dat | 80 -- org.epic.debug/test.txt | 3 - org.epic.debug/vars.dat | 71 - org.epic.feature.main/.gitignore | 1 + org.epic.perleditor-test/.gitignore | 1 + .../epic/debug/varparser/DebugTargetStub.java | 128 -- .../debug/varparser/TestTokenVarParser.java | 60 - org.epic.perleditor-test/test.in/Tool.pm | 0 org.epic.perleditor/.gitignore | 1 + .../icons/mark_occurrences_disabled.gif | Bin .../perlutils/perltidy/Perl/Tidy.pm | 4 +- .../src/org/epic/core/parser/.gitignore | 28 + .../actions/AbstractOpenDeclaration.java | 1158 ++++++++--------- .../actions/ToggleMarkOccurrencesAction.java | 0 org.epic.regexp/.gitignore | 1 + 63 files changed, 626 insertions(+), 3008 deletions(-) create mode 100644 .project mode change 100755 => 100644 ANTLR/.classpath create mode 100644 ANTLR/.gitignore mode change 100755 => 100644 ANTLR/.project mode change 100755 => 100644 ANTLR/AddTokenTypes.java mode change 100755 => 100644 ANTLR/AddTokenTypes.txt mode change 100755 => 100644 ANTLR/Adder.java delete mode 100755 ANTLR/Bin/.classpath delete mode 100755 ANTLR/Bin/.project delete mode 100755 ANTLR/Bin/AddTokenTypes.class delete mode 100755 ANTLR/Bin/AddTokenTypes.txt delete mode 100755 ANTLR/Bin/Adder$PerlLexer.class delete mode 100755 ANTLR/Bin/Adder.class delete mode 100755 ANTLR/Bin/PerlBaseLexer.class delete mode 100755 ANTLR/Bin/PerlDebugValue.class delete mode 100755 ANTLR/Bin/PerlDebugVar.class delete mode 100755 ANTLR/Bin/PerlParser.class delete mode 100755 ANTLR/Bin/PerlParserSimple.class delete mode 100755 ANTLR/Bin/PerlVarParser$PerlLexer.class delete mode 100755 ANTLR/Bin/PerlVarParser.class delete mode 100755 ANTLR/Bin/test.dat delete mode 100755 ANTLR/Bin/var_new.dat delete mode 100755 ANTLR/Bin/vars.dat mode change 100755 => 100644 ANTLR/PerlBaseLexer.java mode change 100755 => 100644 ANTLR/PerlDebugValue.java mode change 100755 => 100644 ANTLR/PerlDebugVar.java mode change 100755 => 100644 ANTLR/PerlParser.java mode change 100755 => 100644 ANTLR/PerlParserSimple.java mode change 100755 => 100644 ANTLR/PerlVarParser.java mode change 100755 => 100644 ANTLR/add.g mode change 100755 => 100644 ANTLR/modes/catalog mode change 100755 => 100644 ANTLR/modes/catalog.dtd mode change 100755 => 100644 ANTLR/modes/perl.xml mode change 100755 => 100644 ANTLR/modes/xmode.dtd mode change 100755 => 100644 ANTLR/test.dat mode change 100755 => 100644 ANTLR/var_new.dat mode change 100755 => 100644 ANTLR/vars.dat mode change 100755 => 100644 CVSROOT/syncmail2.1 create mode 100644 org.epic.debug/.gitignore delete mode 100644 org.epic.debug/error.dat mode change 100755 => 100644 org.epic.debug/icons/expression_view.gif mode change 100755 => 100644 org.epic.debug/icons/run.gif delete mode 100644 org.epic.debug/src/org/epic/debug/PerlBreakpointManager.java delete mode 100644 org.epic.debug/src/org/epic/debug/PerlDebugThread.java delete mode 100644 org.epic.debug/src/org/epic/debug/db/PerlDB.java delete mode 100644 org.epic.debug/src/org/epic/debug/varparser/PerlDebugValue.java delete mode 100644 org.epic.debug/src/org/epic/debug/varparser/PerlDebugVar.java delete mode 100644 org.epic.debug/src/org/epic/debug/varparser/TokenVarParser.java delete mode 100644 org.epic.debug/test.dat delete mode 100755 org.epic.debug/test.txt delete mode 100755 org.epic.debug/vars.dat create mode 100644 org.epic.feature.main/.gitignore create mode 100644 org.epic.perleditor-test/.gitignore delete mode 100644 org.epic.perleditor-test/src/org/epic/debug/varparser/DebugTargetStub.java delete mode 100644 org.epic.perleditor-test/src/org/epic/debug/varparser/TestTokenVarParser.java mode change 100755 => 100644 org.epic.perleditor-test/test.in/Tool.pm create mode 100644 org.epic.perleditor/.gitignore mode change 100755 => 100644 org.epic.perleditor/icons/mark_occurrences_disabled.gif create mode 100644 org.epic.perleditor/src/org/epic/core/parser/.gitignore mode change 100755 => 100644 org.epic.perleditor/src/org/epic/perleditor/actions/ToggleMarkOccurrencesAction.java create mode 100644 org.epic.regexp/.gitignore diff --git a/.project b/.project new file mode 100644 index 00000000..cce7e22c --- /dev/null +++ b/.project @@ -0,0 +1,11 @@ + + + epic-ide + + + + + + + + diff --git a/ANTLR/.classpath b/ANTLR/.classpath old mode 100755 new mode 100644 diff --git a/ANTLR/.gitignore b/ANTLR/.gitignore new file mode 100644 index 00000000..a9d00d83 --- /dev/null +++ b/ANTLR/.gitignore @@ -0,0 +1 @@ +/Bin diff --git a/ANTLR/.project b/ANTLR/.project old mode 100755 new mode 100644 diff --git a/ANTLR/AddTokenTypes.java b/ANTLR/AddTokenTypes.java old mode 100755 new mode 100644 diff --git a/ANTLR/AddTokenTypes.txt b/ANTLR/AddTokenTypes.txt old mode 100755 new mode 100644 diff --git a/ANTLR/Adder.java b/ANTLR/Adder.java old mode 100755 new mode 100644 diff --git a/ANTLR/Bin/.classpath b/ANTLR/Bin/.classpath deleted file mode 100755 index 0b45f919..00000000 --- a/ANTLR/Bin/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/ANTLR/Bin/.project b/ANTLR/Bin/.project deleted file mode 100755 index ef4e6ef4..00000000 --- a/ANTLR/Bin/.project +++ /dev/null @@ -1,24 +0,0 @@ - - - ANTLR - - - org.epic.perleditor - - - - org.antlr.eclipse.core.antlrbuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - org.antlr.eclipse.core.antlrnature - - diff --git a/ANTLR/Bin/AddTokenTypes.class b/ANTLR/Bin/AddTokenTypes.class deleted file mode 100755 index 62affb5d36a78c063024f5c0f30ac051ab87f8df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1172 zcmZY7S#R1v5C`ztkZ?l?kb|71_m$B5z7~4{E5@d_Y0HyE6I3-tP&K4dzgi#q0s5h; z{@1nWRDIju?9S|r*FS%K|3L}bCreO49v=tOPoqij?epj~MM6;NWcYR17!M~O8t(g( z(a|hL2|)?vwgd^CVoWEev*Bd+W;i|@C5UuV#p&C27?$2u6qNG~X-jV&S`w7$NWU`=BypzentfZ%Ln)m3Q^->-T_=soah*7l5tNR~#LmKo zYpO7I4pYR-yr87h?>3dEOBGPtS3T*;z>NY$L3ztDl@o-1AiY2zTE=~GOgYhPC3M-c z&|^nBrX3BpA}AGw99QR*1uZzXURAJCul1^mu5gudLbs>AI=2y>Ttk=AjM`Yo78(xy zLAR-oZlKRz-~0PfY8b;0Jj-e8?M-xes0N|*eXH&0$QBAj?Zjhm AddTokenTypes.txt$ -Add // output token vocab name -ARRAY_NAME=4 -SCALAR_NAME=5 -HASH_NAME=6 -MODULE_NAME=7 -ARRAY_REF=8 -SCALAR_REF=9 -HASH_REF=10 -CODE_REF=11 -REF=12 -NUMBER=13 -SEPARATOR=14 -INDENT_START=15 -INDENT_END=16 -FILE_HANDLE=17 -FILE_NO=18 -NL=19 -EQ=20 -PAREN_OP=21 -PAREN_CL=22 -ADR=23 -REF_SYMB=24 -PURE_NAME=25 -STRING=26 -KEY_ASSIGN=27 -FILE_REF=28 -PREFIXED_NAME=29 -PURE_NAME_CHAR=30 -FIRST_PURE_NAME_CHAR=31 -WS=32 -CHAR_ESC=33 diff --git a/ANTLR/Bin/Adder$PerlLexer.class b/ANTLR/Bin/Adder$PerlLexer.class deleted file mode 100755 index 206c955d4077ea20869966758cce6be7f4c8c0c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2167 zcma)7-%lJ>6#nkAuE{PxdJ zzn~6p!4qh{mdi=EdrrD`T5d`=1|iU-wqs^VhNe1!SbnzP=1p5bqy)75gp*4-Iq49h zA)oO~PYN8#UzfJIC36df`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YQ92DYpoQm5wVMbf*8FA@m~ycs^Ujy{4&`fgj0YoDp+GQk58a!koRPE1dR@@T{) z)QfJ*uL;E~x`f2csF-A!cO2nQ+B^sZflU0PD~_OxUcUNufxaK;rB$PwK|7td===y}Lf?hQ SWZi`)sL-yH{Q%vbBJl@6vQ7^G diff --git a/ANTLR/Bin/PerlBaseLexer.class b/ANTLR/Bin/PerlBaseLexer.class deleted file mode 100755 index 01aae4f03ca8dcca37560813c0c02d3989383f75..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12989 zcmcIr34D~*wf~>{O)`_o1O`ZueF*}|$Sy>-07(cC2uVoT!WM>P2!UimlL<>*5XGf+ zY4uqZtp$}f6JDON$SGH}|{up6{Of zKj++Y&pqGx%<%^whK1pBsUW2!)KHrnYz!5KHia785J8th`x5Tmqv%OVY-V4WLoL8rRBriO-4I8qR<;$MLj2vSe%EDUW3 z)iw(Jb%rQE%*o3_;VOa8=_-o^E7y@p;o9Ja;K-&(P3=g#Ymy+jBBEDP7K&7i67(-L zE3T}stqoO1YU;y{BWvo`*N)7siIC((`q3x6J?4bgxdPAR%G#Q6O=OC|%E(+OaOKrk zg#>;7DGN8wqJZkwovgyvRi!mm8bSc}dXQAh6B9jPHf29E`z8$c-6Z%+!k<5XI3Uor9=A zBbu!jzKRR%0Js+}&?1uH)ygjRA=y05^TB7H$|#6-=I+J<4I#~og;?Z63OebR%PE>l zZd-1d#+pdYhEQQmB-9YpTS}JruoTOZ$ZRt5L1ltq~+NMkqM$7YBaF@)9J4Lz^PD;~?UU zOo!U;pz6K(n<_)=?VT*>Wi%A$Wn!al)N`ta5HZf@d_H_j%gKcXDxok(BQ40x^C5yJ z-MfJk*Uic)n^jSiGdJIdO()^-| zJoesXdT*vI>T;%Ynp;fAts2Xm{PK#Nva*7iMLyhS`hP?>RTt78!AOs`v=g^$FLj4T zIk$NF0>Ux!+htz)v0gzwZMfOAf7-T!;u0Tro8G%EptY5Nn%38c^NT5tdyKB`)#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yZH7bqopf;?!b8Dsr#MM0@nYxogF~{ diff --git a/ANTLR/Bin/PerlParser.class b/ANTLR/Bin/PerlParser.class deleted file mode 100755 index 4269b9800a9402e541f40fabb1b68fe780fbae85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1237 zcmZ{iU2hUm5Qg8wXIZudTcOob3R){Hw&0C1!T1?e5@MRtka*{oo|d)CE;%fwKgt^u zO%pHt0sbiCoZSOhTrN25%+7h{-FfHtpP#=F#Q`2OXh&SwN2VBakpyGN&f~5%9N9dH zC_`%a-W<1ta0LTvGbEl_j^#aP*sOF+$FoKK#J%Ls>&f{!7tMCH#}Iqto^c&XtZ0Zq z(-B7^g$Q(pOviHghsp4iixczI<_zl{w{O}#Q&=)q$(T2=#teFAE~&||;;Bvy8zH?( z-z7snOjflg<>aKC{G#%%C%8G3%4N-#thvJwxA_&PPrlJel`b|>=>V`J0Y!%LR7Wu3 z?!XlMtnG{@Ue_}{-VCZsvbs#|#xluJRNuAa5<^<>kt;l9$nLbsG4Hz<mdBMdy6+Wb(*1MF+4ph`ZO;-bM&P(4E#H1)yE|7fL38=!UFiRkmUmb5Q3cj)l5 z`Nc$;jE(_d^dsNtq~(&kKxc}gV_Lr`{p&`paE-JP{ejhQ6i2W|=bHa+o9^Y1MiCjx zm4bR?af>3liFIuFd>yx`GUD@divNz{2vwzx+BG&q@p~jJ2Mzl^J|C3N@M(pYqPG=U^s2W>1`_=4v9lBlo#A!lbZ&Z34#KKTHLid^?&S{j4EU#Uf~5eZ5I QEgz%%&vAuesQXoozh(`~(*OVf diff --git a/ANTLR/Bin/PerlParserSimple.class b/ANTLR/Bin/PerlParserSimple.class deleted file mode 100755 index 84cd7576acc5391cc0400d611598623ad7e6d547..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14320 zcmd5@d3;pW^*`snBr^#Q7$zYQKtMqVK@vq&8Za72FoBT7Y!E=gkPIP^&B=rUu2rln zD7aUPpq98)3kU(l1vlJL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LSjiP*OG@Wi8O|z_H@cDZTt+2*Ymo*NbyT{WSE1S-g~K z{LH3lFe=3HlavGsTIVR}P^8$75H;!KsGLuF()&wDD=Vsis^q@p*IEn3F2ZLuj?f~$ z8~3t^m#c)dT%~x)RYFg$vWQ=VLl*J!EQ@%#O1R5a7V+Iq_Qlr;Cz_mHm4u5Q3AMgk zp!ezhutjv)vhrY&$*{lFNeARj*8VI_`M zp;9X6Y`M9KiTwq;9Y1YLWxBLnKW6G_h><^Pa?dStfS^_+m0?%a$@!-!t`oLo+ zz;hMwtWSsse`d{Uv9ZvuN diff --git a/ANTLR/Bin/PerlVarParser$PerlLexer.class b/ANTLR/Bin/PerlVarParser$PerlLexer.class deleted file mode 100755 index aaa2b98ad849aac52bb82605b557a862cab2f5ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2199 zcma)7O;a3I6g>|n4AW`C@DWI&F(0BrLl_B~L?I+X_?ToMBZCAmMw*!iH0kLXdwNo^ zaqY?~tK1q>mQ^XsjS_(>t+HHYp=;MJU0V4AmgjXhGbA-sISXFD``$hGzI)ES{QmFH zzoH%&;0bi5rEAZdZrXH9((O{al-!hV6hfd$ZAZND65AaVM8_ za?&AGLq6k~o)kEmzaedNOXlVZ_X(0R9nW?X+(>6gosN}VmmcXtNuY5!Yg>-xjR@3t z_sk1K#tJ#9;|LmJs6(@kXz%rJNGagxbO=@3M@M5&^?n^OXo`t9bsPmxmXi~=%k{Tv)lUhFTxF}K#)twCFHKSn~x9L$V6m`5G#F!=f z)fkzrk|*;~%<)#C%m%7TEbTI8C|4cxxD&$%Sm5&v^$Y63&eIyPL{<2Z6!`(KDDJXX ziwee8;tfUWznr+1v*zpK9zNFa5tapxJx_y$##+~Vs`a%@q3mYmgyr|@a}Cz7k|w!H$C2)sZI()sV(|w~Wg12C z31e1963$VE5rDHnQ}cmenwkz=>y%#om1^}@YL#o0b{$RN`?wq6s(!KhCx}O$p!G*? z>d?l&$2bqc01=$0%Nex$C!hl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;d@`KVcCYSjI1!b~d1~ kL%S5xjzFq!7~^-cqN}(?c_Og6X9Q(9e5#)5 \ No newline at end of file diff --git a/ANTLR/Bin/var_new.dat b/ANTLR/Bin/var_new.dat deleted file mode 100755 index 0e4b96b5..00000000 --- a/ANTLR/Bin/var_new.dat +++ /dev/null @@ -1,162 +0,0 @@ - -$/ = ' -' -FileHandle(stderr) => fileno(2) -%SIG = ( - 'ABRT' => undef - 'ALRM' => undef - 'BREAK' => undef - 'BUS' => CODE(0x1c0a92c) - -> &CODE(0x1c0a92c) in ??? - 'CHLD' => undef - 'CLD' => undef - 'CONT' => undef - 'FPE' => undef - 'HUP' => undef - 'ILL' => undef - 'INT' => CODE(0x1be75f0) - -> &DB::catch in 0 - 'KILL' => undef - 'NUM05' => undef - 'NUM06' => undef - 'NUM07' => undef - 'NUM10' => undef - 'NUM12' => undef - 'NUM16' => undef - 'NUM17' => undef - 'NUM18' => undef - 'NUM19' => undef - 'NUM24' => undef - 'PIPE' => undef - 'QUIT' => undef - 'SEGV' => CODE(0x1c0a92c) - -> REUSED_ADDRESS - 'STOP' => undef - 'TERM' => undef - '__DIE__' => CODE(0x1c0f868) - -> &DB::dbdie in 0 - '__WARN__' => CODE(0x1c0f6c4) - -> &DB::dbwarn in 0 -) -$^L = "\cL" -$^ = 'GEN0_TOP' -$$ = 948 -$\ = '' -$- = 0 -@- = ( - 0 empty slot - 1 empty slot - 2 empty slot -) -$! = 'Bad file descriptor' -$^X = 'C:\\Perl\\bin\\perl.exe' -$^UNICODE = 0 -$^V = "\cE\cH\cB" -$= = 60 -$2 = '' -$^WARNING_BITS = "\c@\c@\c@\c@\c@\c@\c@\c@\c@\c@\c@\c@" -FileHandle(stdin) => fileno(0) -@INC = ( - 0 'C:/Perl/lib' - 1 'C:/Perl/site/lib' - 2 '.' -) -%INC = ( - 'Carp.pm' => 'C:/Perl/lib/Carp.pm' - 'Carp/Heavy.pm' => 'C:/Perl/lib/Carp/Heavy.pm' - 'Class/Struct.pm' => 'C:/Perl/lib/Class/Struct.pm' - 'Config.pm' => 'C:/Perl/lib/Config.pm' - 'Devel/Peek.pm' => 'C:/Perl/lib/Devel/Peek.pm' - 'Errno.pm' => 'C:/Perl/lib/Errno.pm' - 'Exporter.pm' => 'C:/Perl/lib/Exporter.pm' - 'Exporter/Heavy.pm' => 'C:/Perl/lib/Exporter/Heavy.pm' - 'IO.pm' => 'C:/Perl/lib/IO.pm' - 'IO/Handle.pm' => 'C:/Perl/lib/IO/Handle.pm' - 'IO/Socket.pm' => 'C:/Perl/lib/IO/Socket.pm' - 'IO/Socket/INET.pm' => 'C:/Perl/lib/IO/Socket/INET.pm' - 'IO/Socket/UNIX.pm' => 'C:/Perl/lib/IO/Socket/UNIX.pm' - 'SelectSaver.pm' => 'C:/Perl/lib/SelectSaver.pm' - 'Socket.pm' => 'C:/Perl/lib/Socket.pm' - 'Symbol.pm' => 'C:/Perl/lib/Symbol.pm' - 'Term/Cap.pm' => 'C:/Perl/lib/Term/Cap.pm' - 'Term/ReadLine.pm' => 'C:/Perl/lib/Term/ReadLine.pm' - 'Time/localtime.pm' => 'C:/Perl/lib/Time/localtime.pm' - 'Time/tm.pm' => 'C:/Perl/lib/Time/tm.pm' - 'XSLoader.pm' => 'C:/Perl/lib/XSLoader.pm' - 'dumpvar.pl' => 'C:/Perl/lib/dumpvar.pl' - 'perl5db.pl' => 'C:/Perl/lib/perl5db.pl' - 'strict.pm' => 'C:/Perl/lib/strict.pm' - 'vars.pm' => 'C:/Perl/lib/vars.pm' - 'warnings.pm' => 'C:/Perl/lib/warnings.pm' - 'warnings/register.pm' => 'C:/Perl/lib/warnings/register.pm' -) -$? = 0 -$: = ' --' -$0 = 'F:\\eclipse_2.1\\eclipse\\runtime-workspace\\test\\bbc.pl' -$^S = 1 -$@ = '' -$] = 5.008002 -$^D = 0 -FileHandle(STDERR) => fileno(2) -$, = '' -$" = ' ' -$^F = 2 -FileHandle(stdout) => fileno(1) -$| = 1 -$^A = '' -$~ = 'GEN0' -$^TAINT = 0 -$^O = 'MSWin32' -$% = 0 -@_ = ( - 0 0 - 1 '_' - 2 *main::_ - 3 0 - 4 '-1' -) -$+ = '' -@+ = ( - 0 empty slot - 1 empty slot - 2 empty slot -) -FileHandle(STDIN) => fileno(0) -$1 = 'main' -$< = 0 -%ENV = ( - 'ALLUSERSPROFILE' => 'C:\\Dokumente und Einstellungen\\All Users' - 'APPDATA' => 'C:\\Dokumente und Einstellungen\\ST\\Anwendungsdaten' - 'COMMONPROGRAMFILES' => 'C:\\Programme\\Gemeinsame Dateien' - 'COMPUTERNAME' => 'PC-WIN1' - 'COMSPEC' => 'C:\\WINNT\\system32\\cmd.exe' - 'HOMEDRIVE' => 'C:' - 'HOMEPATH' => '\\' - 'LOGONSERVER' => '\\\\PC-WIN1' - 'NUMBER_OF_PROCESSORS' => 1 - 'OS' => 'Windows_NT' - 'OS2LIBPATH' => 'C:\\WINNT\\system32\\os2\\dll;' - 'PATH' => 'c:\\programme\\imagemagick-5.5.7-q8;C:\\Perl\\bin\\;C:\\WINNT\\system32;C:\\WINNT;C:\\WINNT\\System32\\Wbem' - 'PATHEXT' => '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH' - 'PERLDB_OPTS' => 'RemotePort=localhost:4444' - 'PERLDB_PIDS' => 948 - 'PROCESSOR_ARCHITECTURE' => 'x86' - 'PROCESSOR_IDENTIFIER' => 'x86 Family 6 Model 4 Stepping 2, AuthenticAMD' - 'PROCESSOR_LEVEL' => 6 - 'PROCESSOR_REVISION' => 0402 - 'PROGRAMFILES' => 'C:\\Programme' - 'SYSTEMDRIVE' => 'C:' - 'SYSTEMROOT' => 'C:\\WINNT' - 'TEMP' => 'C:\\DOKUME~1\\ST\\LOKALE~1\\Temp' - 'TMP' => 'C:\\DOKUME~1\\ST\\LOKALE~1\\Temp' - 'USERDOMAIN' => 'PC-WIN1' - 'USERNAME' => 'ST' - 'USERPROFILE' => 'C:\\Dokumente und Einstellungen\\ST' - 'WINDIR' => 'C:\\WINNT' -) -$^E = '' -$^H = 256 -FileHandle(STDOUT) => fileno(1) -$^W = 0 - diff --git a/ANTLR/Bin/vars.dat b/ANTLR/Bin/vars.dat deleted file mode 100755 index 17e8bb08..00000000 --- a/ANTLR/Bin/vars.dat +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - -@asd = ( - 0 SCALAR(0x1e20814) - -> 'hallo' -) - -@timeSlots = ( - 0 HASH(0x1d299b8) - 'Chanel' => 'BBC7' - 'Days' => HASH(0x15db76c) - 'Friday' => 1 - 'Monday' => 2 - 'Thursday' => 3 - 'Tuesday' => 4 - 'Wednesday' => 5 - 'Operation' => 'Copy' - 'Prefix' => 'r7_1' - 'Time' => '10:00' - 1 HASH(0x1d29988) - 'Chanel' => 'BBC7' - 'Days' => HASH(0x15db76c) - -> REUSED_ADDRESS - 'Operation' => 'Copy' - 'Prefix' => 'r7_1' - 'Time' => '11:00' -) - - -$ab = ARRAY(0x1e20808) - 0 SCALAR(0x1e20814) - -> 'hallo' -$? = 0 -$0 = 'bbc.pl' - - -%day_groups_weekends = ( - 'Saturday' => 1 - 'Sunday' => 1 - '__WARN__' => CODE(0x1b7ca2c) - -> &DB::dbwarn in 0 -) - - - -$tm = Time::tm=ARRAY(0x1df6b04) - 0 30 - 1 58 - 2 16 - 3 7 - 4 5 - 5 103 - 6 6 - 7 157 - 8 1 - -@a = ( - 0 REF(0x1a54ebc) - -> Time::tm=ARRAY(0x1df6b04) - -> REUSED_ADDRESS - 1 Time::tm=ARRAY(0x1df6b04) - -> REUSED_ADDRESS -) - -FileHandle(stdout) => fileno(1) - -@a = ( - 0 REF(0x1a5b6cc) - -> Time::tm=ARRAY(0x1d354b4) - -> REUSED_ADDRESS - 1 *main::STDIN - FileHandle({*main::STDIN}) => fileno(0) -) \ No newline at end of file diff --git a/ANTLR/PerlBaseLexer.java b/ANTLR/PerlBaseLexer.java old mode 100755 new mode 100644 diff --git a/ANTLR/PerlDebugValue.java b/ANTLR/PerlDebugValue.java old mode 100755 new mode 100644 diff --git a/ANTLR/PerlDebugVar.java b/ANTLR/PerlDebugVar.java old mode 100755 new mode 100644 diff --git a/ANTLR/PerlParser.java b/ANTLR/PerlParser.java old mode 100755 new mode 100644 diff --git a/ANTLR/PerlParserSimple.java b/ANTLR/PerlParserSimple.java old mode 100755 new mode 100644 diff --git a/ANTLR/PerlVarParser.java b/ANTLR/PerlVarParser.java old mode 100755 new mode 100644 diff --git a/ANTLR/add.g b/ANTLR/add.g old mode 100755 new mode 100644 diff --git a/ANTLR/modes/catalog b/ANTLR/modes/catalog old mode 100755 new mode 100644 diff --git a/ANTLR/modes/catalog.dtd b/ANTLR/modes/catalog.dtd old mode 100755 new mode 100644 diff --git a/ANTLR/modes/perl.xml b/ANTLR/modes/perl.xml old mode 100755 new mode 100644 diff --git a/ANTLR/modes/xmode.dtd b/ANTLR/modes/xmode.dtd old mode 100755 new mode 100644 diff --git a/ANTLR/test.dat b/ANTLR/test.dat old mode 100755 new mode 100644 diff --git a/ANTLR/var_new.dat b/ANTLR/var_new.dat old mode 100755 new mode 100644 diff --git a/ANTLR/vars.dat b/ANTLR/vars.dat old mode 100755 new mode 100644 diff --git a/CVSROOT/syncmail2.1 b/CVSROOT/syncmail2.1 old mode 100755 new mode 100644 diff --git a/org.epic.debug/.gitignore b/org.epic.debug/.gitignore new file mode 100644 index 00000000..5e56e040 --- /dev/null +++ b/org.epic.debug/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/org.epic.debug/error.dat b/org.epic.debug/error.dat deleted file mode 100644 index 49900178..00000000 --- a/org.epic.debug/error.dat +++ /dev/null @@ -1,127 +0,0 @@ -$? = 0 -FileHandle(STDOUT) => fileno(1) -$@ = '' -$^D = 0 -$^E = '' -FileHandle(STDIN) => fileno(0) -$^H = 256 -$^O = 'MSWin32' -$^S = 1 -$^W = 0 -$^X = 'C:\\Tools\\Perl\\bin\\perl.exe' -%SIG = ( -'ABRT' => undef -'ALRM' => undef -'BREAK' => undef -'BUS' => CODE(0x1b59f8c) --> &CODE(0x1b59f8c) in ??? -'CHLD' => undef -'CLD' => undef -'CONT' => undef -'FPE' => undef -'ILL' => undef -'INT' => CODE(0x1b74f7c) --> &DB::catch in 0 -'KILL' => undef -'NUM01' => undef -'NUM05' => undef -'NUM06' => undef -'NUM07' => undef -'NUM10' => undef -'NUM12' => undef -'NUM16' => undef -'NUM17' => undef -'NUM18' => undef -'NUM19' => undef -'NUM24' => undef -'PIPE' => undef -'QUIT' => undef -'SEGV' => CODE(0x1b59f8c) --> REUSED_ADDRESS -'STOP' => undef -'TERM' => undef -'__DIE__' => '' -'__WARN__' => '' -) -$! = 'Invalid argument' -$" = ' ' -$$ = 3084 -FileHandle(stdout) => fileno(1) -$, = '' -$/ = ' -' -$0 = 'mkxmlwarn.pl' -$1 = 'main' -$2 = '' -FileHandle(STDERR) => fileno(2) -$< = 0 -$? = 0 -$@ = '' -$\ = '' -FileHandle(stderr) => fileno(2) -@INC = ( -0 'C:/Tools/Perl/lib' -1 'C:/Tools/Perl/site/lib' -2 '.' -) -%INC = ( -'Carp.pm' => 'C:/Tools/Perl/lib/Carp.pm' -'Carp/Heavy.pm' => 'C:/Tools/Perl/lib/Carp/Heavy.pm' -'Devel/Peek.pm' => 'C:/Tools/Perl/lib/Devel/Peek.pm' -'Exporter.pm' => 'C:/Tools/Perl/lib/Exporter.pm' -'Term/Cap.pm' => 'C:/Tools/Perl/lib/Term/Cap.pm' -'Term/ReadLine.pm' => 'C:/Tools/Perl/lib/Term/ReadLine.pm' -'XSLoader.pm' => 'C:/Tools/Perl/lib/XSLoader.pm' -'dumpvar.pl' => 'C:/Tools/Perl/lib/dumpvar.pl' -'perl5db.pl' => 'C:/Tools/Perl/lib/perl5db.pl' -) -@_ = ( -0 0 -1 '_' -2 -) -%ENV = ( -'ALLUSERSPROFILE' => 'C:\\Dokumente und Einstellungen\\All Users' -'APPDATA' => 'C:\\Dokumente und Einstellungen\\mab\\Anwendungsdaten' -'CLASSPATH' => '.;' -'COMMANDER_PATH' => 'C:\\Tools\\WinCmd' -'COMMONPROGRAMFILES' => 'C:\\Programme\\Gemeinsame Dateien' -'COMPUTERNAME' => 'DEFIANT' -'COMSPEC' => 'C:\\WINDOWS\\system32\\cmd.exe' -'HOMEDRIVE' => 'C:' -'HOMEPATH' => '\\Dokumente und Einstellungen\\mab' -'JAVA_HOME' => 'C:\\Programme\\Entwicklung\\j2sdk1.4.1_05' -'LOGONSERVER' => '\\\\DEFIANT' -'NUMBER_OF_PROCESSORS' => 1 -'OS' => 'Windows_NT' -'PATH' => 'C:\\Programme\\Oracle\\OraHome\\bin;c:\\Programme\\Entwicklung\\j2 -sdk1.4.1_05\\bin;C:\\Programme\\Oracle\\jre\\1.3.1\\bin;C:\\Programme\\Oracle\\j -re\\1.1.8\\bin;C:\\Tools\\Perl\\bin\\;C:\\Programme\\Tools\\Tcl\\bin;C:\\Tools\\ -Perl\\bin\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\system32\\WBEM;C:\\Pr -ogramme\\Entwicklung\\JBuilder35\\jdk1.2.2\\jre\\bin;c:\\bat;c:\\Tools\\Packer;c -:\\tools;c:\\tools\\cygwin\\bin;c:\\tools\\openssl\\bin;c:\\Programme\\kommunika -tion\\edonkey2000;c:\\Programme\\Datenbank\\mysql\\db\\bin;C:\\Programme\\Entwic -klung\\Subversion;c:\\tools\\php;C:\\Programme\\Kommunikation\\Apache\\Apache2\\ -bin;C:\\Programme\\Support Tools\\;C:\\Programme\\ATI Technologies\\ATI Control -Panel;C:\\Programme\\Entwicklung\\CVS-Server;p:\\exe\\vc60d;p:\\exe\\vc60c;P:\\t -hirdparty\\win32\\bin;c:\\Tools\\mico\\bin;c:\\Programme\\Tools\\jEdit 4.2pre6' -'PATHEXT' => '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.tcl' -'PROCESSOR_ARCHITECTURE' => 'x86' -'PROCESSOR_IDENTIFIER' => 'x86 Family 6 Model 6 Stepping 2, AuthenticAMD' -'PROCESSOR_LEVEL' => 6 -'PROCESSOR_REVISION' => 0602 -'PROGRAMFILES' => 'C:\\Programme' -'PROMPT' => '$P$G' -'SESSIONNAME' => 'Console' -'SYSTEMDRIVE' => 'C:' -'SYSTEMROOT' => 'C:\\WINDOWS' -'TEMP' => 'C:\\DOKUME~1\\mab\\LOKALE~1\\Temp' -'TMP' => 'C:\\DOKUME~1\\mab\\LOKALE~1\\Temp' -'USERDOMAIN' => 'DEFIANT' -'USERNAME' => 'mab' -'USERPROFILE' => 'C:\\Dokumente und Einstellungen\\mab' -'WF_RESOURCES' => 'C:\\Programme\\Oracle\\OraHome\\WF\\RES\\WFus.RES' -'WINDIR' => 'C:\\WINDOWS' -) -FileHandle(stdin) => fileno(0) -$| = 1 \ No newline at end of file diff --git a/org.epic.debug/icons/expression_view.gif b/org.epic.debug/icons/expression_view.gif old mode 100755 new mode 100644 diff --git a/org.epic.debug/icons/run.gif b/org.epic.debug/icons/run.gif old mode 100755 new mode 100644 diff --git a/org.epic.debug/src/org/epic/debug/PerlBreakpointManager.java b/org.epic.debug/src/org/epic/debug/PerlBreakpointManager.java deleted file mode 100644 index ec6d6301..00000000 --- a/org.epic.debug/src/org/epic/debug/PerlBreakpointManager.java +++ /dev/null @@ -1,150 +0,0 @@ -package org.epic.debug; - -import java.util.*; - -import org.eclipse.core.resources.IMarkerDelta; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.IBreakpointListener; -import org.eclipse.debug.core.model.IBreakpoint; -import org.epic.debug.db.PerlDB; - -/** - * @author ruehl - */ -public class PerlBreakpointManager implements IBreakpointListener -{ - private final Set debuggers; - - public PerlBreakpointManager() - { - debuggers = new HashSet(); - DebugPlugin.getDefault().getBreakpointManager() - .addBreakpointListener(this); - } - - public void addDebugger(PerlDB db) - { - debuggers.add(db); - - IBreakpoint[] bps = DebugPlugin.getDefault().getBreakpointManager() - .getBreakpoints(PerlDebugPlugin.getUniqueIdentifier()); - - for (int i = 0; i < bps.length; i++) - { - PerlBreakpoint bp = (PerlBreakpoint) bps[i]; - - try - { - if (bp.isEnabled()) - { - db.addBreakpoint(bp); - bp.addDebugger(db); - } - } - catch (CoreException e) - { - PerlDebugPlugin.log(e); - } - } - } - - public void breakpointAdded(IBreakpoint fBreakpoint) - { - if (!(fBreakpoint instanceof PerlBreakpoint)) return; - - PerlBreakpoint bp = (PerlBreakpoint) fBreakpoint; - - try - { - if (!bp.isEnabled()) return; - } - catch (CoreException e) - { - PerlDebugPlugin.log(e); - return; - } - - for (Iterator i = debuggers.iterator(); i.hasNext();) - { - PerlDB db = (PerlDB) i.next(); - try - { - db.addBreakpoint(bp); - bp.addDebugger(db); - } - catch (CoreException e) - { - PerlDebugPlugin.log(e); - } - } - } - - public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) - { - if (!(breakpoint instanceof PerlBreakpoint)) return; - - PerlBreakpoint bp = (PerlBreakpoint) breakpoint; - PerlDB[] debuggers = bp.getDebuggers(); - - for (int i = 0; i < debuggers.length; i++) - { - PerlDB db = debuggers[i]; - try - { - db.removeBreakpoint(bp); - bp.removeDebugger(db); - } - catch (CoreException e) - { - PerlDebugPlugin.log(e); - } - } - } - - public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) - { - if (!(breakpoint instanceof PerlLineBreakpoint)) return; - - boolean enabledOld = ((Boolean) delta - .getAttribute(IBreakpoint.ENABLED)).booleanValue(); - boolean enabledNew = false; - try - { - enabledNew = ((Boolean) breakpoint.getMarker().getAttribute( - IBreakpoint.ENABLED)).booleanValue(); - } - catch (CoreException e) - { - PerlDebugPlugin.log(e); - return; - } - if (enabledOld != enabledNew) - { - if (enabledNew) this.breakpointAdded(breakpoint); - else this.breakpointRemoved(breakpoint, delta); - } - } - - public void dispose() - { - DebugPlugin.getDefault().getBreakpointManager() - .removeBreakpointListener(this); - } - - public Set getDebuggers() - { - return Collections.unmodifiableSet(debuggers); - } - - public void removeDebugger(PerlDB db) - { - debuggers.remove(db); - - IBreakpoint[] bps = DebugPlugin.getDefault().getBreakpointManager() - .getBreakpoints(PerlDebugPlugin.getUniqueIdentifier()); - - for (int i = 0; i < bps.length; i++) - ((PerlBreakpoint) bps[i]).removeDebugger(db); - } -} diff --git a/org.epic.debug/src/org/epic/debug/PerlDebugThread.java b/org.epic.debug/src/org/epic/debug/PerlDebugThread.java deleted file mode 100644 index 7280c6d6..00000000 --- a/org.epic.debug/src/org/epic/debug/PerlDebugThread.java +++ /dev/null @@ -1,194 +0,0 @@ -package org.epic.debug; - -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.model.DebugElement; -import org.eclipse.debug.core.model.IBreakpoint; -import org.eclipse.debug.core.model.IDebugTarget; -import org.eclipse.debug.core.model.IStackFrame; -import org.eclipse.debug.core.model.IThread; -import org.epic.debug.db.PerlDB; - -/** - * @author ruehl - */ -public class PerlDebugThread extends DebugElement implements IThread -{ - private String mName; - private IDebugTarget mDebugTarget; - private ILaunch mLaunch; - private PerlDB mPerlDB; - - private IStackFrame[] mFrames; - private final static IBreakpoint[] mNoBreakpoints = new IBreakpoint[1]; - - public PerlDebugThread( - String name, - ILaunch launch, - IDebugTarget debugTarget, - PerlDB fPerlDB) - { - super(debugTarget); - - mName = name; - mDebugTarget = debugTarget; - mLaunch = launch; - mFrames = null; - mPerlDB = fPerlDB; - fireCreationEvent(); - } - - public IStackFrame[] getStackFrames() throws DebugException - { - return mFrames; - } - - public void setStackFrames(IStackFrame[] fFrames) - { - mFrames = fFrames; - } - - public boolean hasStackFrames() throws DebugException - { - return mFrames != null ? (mFrames[0] != null) && isSuspended() : false; - } - - public int getPriority() throws DebugException - { - return 0; - } - - public IStackFrame getTopStackFrame() throws DebugException - { - return mFrames != null ? mFrames[0] : null; - } - - - public String getName() throws DebugException - { - if (isSuspended()) return ("" + mName); - else if (!isTerminated()) return ("" + mName); - - return mName; - } - - public IBreakpoint[] getBreakpoints() - { - return mNoBreakpoints; - } - - public String getModelIdentifier() - { - return PerlDebugPlugin.getUniqueIdentifier(); - } - - public IDebugTarget getDebugTarget() - { - return mDebugTarget; - } - - public ILaunch getLaunch() - { - return mLaunch; - } - - public boolean canResume() - { - return mPerlDB.canResume(this); - } - - public boolean canSuspend() - { - return mPerlDB.canSuspend(this); - } - - public boolean isSuspended() - { - return mPerlDB.isSuspended(this); - } - - public void resume() throws DebugException - { - mPerlDB.resume(this); - } - - public void suspend() throws DebugException - { - mPerlDB.suspend(this); - } - - public boolean canStepInto() - { - return mPerlDB.canStepInto(this); - } - - public boolean canStepOver() - { - return mPerlDB.canStepOver(this); - } - - public boolean canStepReturn() - { - return mPerlDB.canStepReturn(this); - } - - public boolean isStepping() - { - return mPerlDB.isStepping(this); - } - - public void stepInto() throws DebugException - { - mPerlDB.stepInto(this); - } - - public void stepOver() throws DebugException - { - mPerlDB.stepOver(this); - } - - public void stepReturn() throws DebugException - { - mPerlDB.stepReturn(this); - } - - public boolean canTerminate() - { - return mPerlDB.canTerminate(this); - } - - public boolean isTerminated() - { - return mPerlDB.isTerminated(this); - } - - public void terminate() throws DebugException - { - mPerlDB.terminate(); - } - - public Object getAdapter(Class adapter) - { - if (adapter == PerlDebugThread.class) - { - return this; - } - if (adapter == IStackFrame.class) - { - try - { - return getTopStackFrame(); - } - catch (DebugException e) - { - // do nothing if not able to get frame - } - } - return super.getAdapter(adapter); - } - - public PerlDB getPerlDB() - { - return mPerlDB; - } -} diff --git a/org.epic.debug/src/org/epic/debug/db/PerlDB.java b/org.epic.debug/src/org/epic/debug/db/PerlDB.java deleted file mode 100644 index f885172f..00000000 --- a/org.epic.debug/src/org/epic/debug/db/PerlDB.java +++ /dev/null @@ -1,714 +0,0 @@ -package org.epic.debug.db; - -import gnu.regexp.REMatch; - -import java.io.*; -import java.util.*; - -import org.eclipse.core.runtime.*; -import org.eclipse.debug.core.*; -import org.eclipse.debug.core.model.*; -import org.epic.debug.*; -import org.epic.debug.db.DebuggerInterface.Command; -import org.epic.debug.ui.action.ShowLocalVariableActionDelegate; -import org.epic.debug.util.DebuggerProxy2; -import org.epic.perleditor.PerlEditorPlugin; - -/** - * @author ruehl - */ -public class PerlDB implements IDebugElement -{ - private static boolean canDisplayLocalVars = true; - - private final RE re = new RE(); - - private final PerlDebugThread thread; - - private final DebuggerInterface db; - private final BreakpointMap activeBreakpoints; - private final BreakpointMap pendingBreakpoints; - - private IPPosition startIP; - private boolean terminated; - private DebugTarget target; - private DebuggerInterface.Command currentCommand; - - private final DebuggerInterface.IListener commandListener = - new DebuggerInterface.IListener() { - - public void commandFinished(Command cmd) - { - PerlDB.this.commandFinished(cmd); - } - - public void sessionTerminated() - { - PerlDB.this.sessionTerminated(); - } }; - - public PerlDB(DebugTarget target) throws CoreException - { - this.target = target; - - pendingBreakpoints = new BreakpointMap(); - activeBreakpoints = new BreakpointMap(); - - thread = new PerlDebugThread("Main Thread", target.getLaunch(), target, this); - - BufferedReader in = target.getDebugReadStream(); - PrintWriter out = target.getDebugWriteStream(); - - if (PerlEditorPlugin.getDefault().getDebugConsolePreference()) - { - DebuggerProxy2 p = new DebuggerProxy2(in, out, getLaunch()); - getLaunch().addProcess(p); - in = p.getDebugIn(); - out = p.getDebugOut(); - } - - db = createDebuggerInterface(in, out); - } - - public void init( - final String ioHost, - final int ioPort, - final int errorPort) throws DebugException - { - if (db == null) return; - - // This method is separate from the constructor because - // callbacks to our DebugTarget may occur during its execution. - // By having it execute after the constructor, we ensure that - // DebugTarget.perlDB has been assigned before any such callbacks. - - if (ioHost != null) // relevant for remote debugging only - { - redirectIO(ioHost, ioPort); - redirectError(ioHost, errorPort); - } - - if (target.getPathMapper().requiresEffectiveIncPath()) - target.getPathMapper().setEffectiveIncPath(getEffectiveIncPath()); - - PerlDebugPlugin.getPerlBreakPointManager().addDebugger(this); - target.perlDBstarted(this); - updateStackFrames(); - - if (isBreakPointReached()) - fireDebugEvent(DebugEvent.SUSPEND, DebugEvent.BREAKPOINT); - else - { - fireDebugEvent(DebugEvent.SUSPEND, DebugEvent.STEP_END); - if (!PerlEditorPlugin.getDefault().getSuspendAtFirstPreference()) - resume(thread); - } - } - - public boolean addBreakpoint(PerlBreakpoint bp) - throws CoreException - { - return addBreakpoint(bp, false); - } - - public boolean addBreakpoint(PerlBreakpoint bp, boolean isPending) - throws CoreException - { - try - { - boolean isValid = setBreakpoint(bp, isPending); - if (!isValid) bp.setInvalidBreakpointPosition(true); - return isValid; - } - catch (IOException e) - { - throwDebugException(e); - return false; - } - } - - public boolean canResume(IDebugElement dest) - { - return isSuspended(dest); - } - - public boolean canStepInto(IDebugElement dest) - { - return isSuspended(dest); - } - - public boolean canStepOver(IDebugElement dest) - { - return isSuspended(dest); - } - - public boolean canStepReturn(IDebugElement dest) - { - return isSuspended(dest); - } - - public boolean canSuspend(IDebugElement dest) - { - return false; - } - - public boolean canTerminate() - { - return canTerminate(null); - } - - public boolean canTerminate(IDebugElement dest) - { - return !isTerminated(); - } - - public String evaluateStatement(String text) - throws CoreException - { - return evaluateStatement(text, true); - } - - public String evaluateStatement(String text, boolean updateVars) - throws CoreException - { - try - { - String output = db.eval(text); - if (updateVars) updateStackFrames(); - return output; - } - catch (IOException e) { throwDebugException(e); return null; } - } - - public Object getAdapter(Class adapter) - { - if (adapter == this.getClass()) return this; - else return null; - } - - public IDebugTarget getDebugTarget() - { - return target; - } - - public ILaunch getLaunch() - { - return target.getLaunch(); - } - - public String getModelIdentifier() - { - return target.getModelIdentifier(); - } - - public IThread[] getThreads() - { - return new IThread[] { thread }; - } - - public boolean isStepping(IDebugElement dest) - { - return - !terminated && - !db.isSuspended() && - currentCommand != null && - currentCommand.isStepCommand(); - } - - public boolean isSuspended(IDebugElement dest) - { - return !terminated && currentCommand == null; - } - - public boolean isTerminated() - { - return isTerminated(null); - } - - public boolean isTerminated(IDebugElement dest) - { - return terminated; - } - - public void redirectError(String host, int port) throws DebugException - { - try - { - db.redirectError(host, port); - } - catch (IOException e) - { - throwDebugException(e); - } - } - - public void redirectIO(String host, int port) throws DebugException - { - try - { - db.redirectIO(host, port); - } - catch (IOException e) - { - throwDebugException(e); - } - } - - public void removeBreakpoint(PerlBreakpoint bp) throws CoreException - { - if (pendingBreakpoints.remove(bp)) return; - if (!(bp instanceof PerlLineBreakpoint)) return; - - try - { - IPath dbPath = getDebuggerPath(bp.getResourcePath()); - - if (dbPath != null) - { - db.switchToFile(dbPath); - db.removeLineBreakpoint( - ((PerlLineBreakpoint) bp).getLineNumber()); - } - else - { - PerlDebugPlugin.errorDialog( - "Could not remove breakpoint. Reason: unknown " + - "remote mapping of local path " + bp.getResourcePath()); - } - } - catch (IOException e) - { - throwDebugException(e); - } - } - - public void resume(IDebugElement dest) throws DebugException - { - try - { - fireDebugEvent(DebugEvent.RESUME, DebugEvent.CLIENT_REQUEST); - startIP = db.getCurrentIP(); - currentCommand = db.asyncResume(); - } - catch (IOException e) - { - throwDebugException(e); - } - } - - public void shutdown() - { - abortSession(); - } - - public void stepInto(IDebugElement dest) throws DebugException - { - try - { - fireDebugEvent(DebugEvent.RESUME, DebugEvent.STEP_INTO); - startIP = db.getCurrentIP(); - currentCommand = db.asyncStepInto(); - } - catch (IOException e) - { - throwDebugException(e); - } - } - - public void stepOver(IDebugElement dest) throws DebugException - { - try - { - fireDebugEvent(DebugEvent.RESUME, DebugEvent.STEP_OVER); - startIP = db.getCurrentIP(); - currentCommand = db.asyncStepOver(); - } - catch (IOException e) - { - throwDebugException(e); - } - } - - public void stepReturn(IDebugElement dest) throws DebugException - { - try - { - fireDebugEvent(DebugEvent.RESUME, DebugEvent.STEP_RETURN); - startIP = db.getCurrentIP(); - currentCommand = db.asyncStepReturn(); - } - catch (IOException e) - { - throwDebugException(e); - } - } - - public void suspend(IDebugElement dest) - { - // TODO implement it - } - - public void terminate() - { - abortSession(); - } - - public static void updateVariablesView() - { - if (ShowLocalVariableActionDelegate.getPreferenceValue() && - !canDisplayLocalVars) - { - PerlDebugPlugin.errorDialog( - "Error displaying Local Variables\n" + - "Install PadWalker on your Perl system or disable " + - "displaying of local variables"); - } - - Set debuggers = PerlDebugPlugin.getPerlBreakPointManager().getDebuggers(); - Iterator iterator = debuggers.iterator(); - - while (iterator.hasNext()) - { - PerlDB db = (PerlDB) iterator.next(); - try - { - ((StackFrame) db.thread.getStackFrames()[0]).computeDisplayedVars(); - } - catch (DebugException e) - { - PerlDebugPlugin.log(e); - } - db.fireDebugEvent(DebugEvent.EVALUATION, DebugEvent.UNSPECIFIED); - } - } - - private void abortSession() - { - if (!terminated) - { - terminated = true; - if (db != null) db.dispose(); // db == null when createDebuggerInterface fails - PerlDebugPlugin.getPerlBreakPointManager().removeDebugger(this); - target.debugSessionTerminated(); - } - } - - private void commandFinished(Command cmd) - { - try - { - currentCommand = null; - if (isTerminated()) return; - - IPPosition endIP = maybeSkipStringEval(cmd); - - updateStackFrames(); - - switch (cmd.getType()) - { - case DebuggerInterface.CMD_STEP_INTO: - case DebuggerInterface.CMD_STEP_OVER: - case DebuggerInterface.CMD_STEP_RETURN: - fireDebugEvent(DebugEvent.SUSPEND, - isBreakPointReached() - ? DebugEvent.BREAKPOINT - : DebugEvent.STEP_END); - break; - case DebuggerInterface.CMD_RESUME: - if (isBreakPointReached()) - { - fireDebugEvent(DebugEvent.SUSPEND, DebugEvent.BREAKPOINT); - } - else - { - // We hit a "source file load" breakpoint. - // Insert pending line breakpoints and continue. - if (startIP != null && !endIP.getPath().equals(startIP.getPath())) - insertPendingBreakpoints(); - - resume(thread); - } - break; - } - } - catch (IOException e) - { - try { throwDebugException(e); } - catch (CoreException _e) { PerlDebugPlugin.log(_e); } - } - catch (CoreException e) - { - PerlDebugPlugin.log(e); - } - } - - private DebuggerInterface createDebuggerInterface( - BufferedReader in, PrintWriter out) throws DebugException - { - try - { - return new DebuggerInterface( - in, - out, - commandListener); - } - catch (IOException e) - { - fireDebugEvent(DebugEvent.TERMINATE, DebugEvent.UNSPECIFIED); - terminated = true; - - // Probably an @INC problem at this point; - // let's not complain too loudly - //throwDebugException(e); - return null; - } - } - - private void fireDebugEvent(int kind, int detail) - { - DebugEvent event = new DebugEvent(thread, kind, detail); - DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] { event }); - } - - private IPath getDebuggerPath(IPath epicPath) - { - return target.getPathMapper().getDebuggerPath(epicPath, db); - } - - private List getEffectiveIncPath() throws DebugException - { - try - { - List ret = new ArrayList(); - String output = db.eval( - ";{foreach $t(@INC) {print $DB::OUT $t.\"\\n\";}}"); - - StringTokenizer s = new StringTokenizer(output, "\r\n"); - while (s.hasMoreTokens()) ret.add(new Path(s.nextToken())); - return ret; - } - catch (IOException e) { throwDebugException(e); return null; } - } - - private IPath getEpicPath(IPath dbPath) - { - return target.getPathMapper().getEpicPath(dbPath); - } - - private boolean insertPendingBreakpoints() throws CoreException - { - try - { - IPPosition pos = db.getCurrentIP(); - IPath epicPath = getEpicPath(pos.getPath()); - if (epicPath == null) - { - unresolvedDebuggerPath(pos.getPath()); - return false; - } - - Set bps = pendingBreakpoints.getBreakpoints(epicPath); - if (bps.isEmpty()) return false; - - for (Iterator i = bps.iterator(); i.hasNext();) - { - PerlBreakpoint bp = ((PerlBreakpoint) i.next()); - if (!addBreakpoint(bp, true)) - bp.setInvalidBreakpointPosition(true); - } - - bps.clear(); - - return true; - } - catch (IOException e) - { - throwDebugException(e); - return false; - } - } - - private boolean isBreakPointReached() throws DebugException - { - try - { - IPPosition pos = db.getCurrentIP(); - if (pos == null) return false; - - IPath epicPath = getEpicPath(pos.getPath()); - if (epicPath == null) - { - unresolvedDebuggerPath(pos.getPath()); - return false; - } - - // XXX: this breaks if new breakpoint types are installed! - PerlLineBreakpoint bp = (PerlLineBreakpoint) - activeBreakpoints.getBreakpoint(epicPath, pos.getLine()); - - return bp != null; - } - catch (IOException e) - { - throwDebugException(e); - return false; - } - // TODO: reimplement debugging reg-exps here see ToggleBreakpointAdapter) - } - - private IPPosition maybeSkipStringEval(Command cmd) throws IOException - { - // We currently do not support stepping into variable eval - // expressions, e.g. eval $str; - // We detect an attempt to step into such an expression by - // comparing the IP before and after the current step command. - // If they are both equal, we step out of the eval expression - // automatically to skip over it - - IPPosition endIP = db.getCurrentIP(); - if (cmd.isStepCommand()) - { - while (!isTerminated() && endIP.equals(startIP)) - { - db.stepOver(); - endIP = db.getCurrentIP(); - } - } - return endIP; - } - - - - private void sessionTerminated() - { - terminate(); - } - - private boolean setBreakpoint(PerlBreakpoint bp, boolean isPending) - throws IOException - { - IPath dbPath = getDebuggerPath(bp.getResourcePath()); - if (dbPath == null) - { - unresolvedEpicPath(bp.getResourcePath()); - return false; - } - - if (!isPending) - { - boolean success = db.switchToFile(dbPath); - if (!success) - { - pendingBreakpoints.add(bp); - db.setLoadBreakpoint(dbPath); - return true; - } - } - - if (!(bp instanceof PerlLineBreakpoint)) return false; - - try - { - PerlLineBreakpoint lbp = (PerlLineBreakpoint) bp; - String condition = lbp.isConditionEnabled() ? lbp.getCondition() : null; - - if (condition != null) - { - condition = condition.replaceAll("\\n\\r", " "); - condition = condition.replaceAll("\\r", " "); - condition = condition.replaceAll("\\n", " "); - } - - if (db.setLineBreakpoint(lbp.getLineNumber(), condition)) - { - activeBreakpoints.add(bp); - bp.addInstallation(this); - return true; - } - else return false; - } - catch (CoreException e) - { - PerlDebugPlugin.log(e); - return false; - } - } - - private void throwDebugException(IOException e) throws DebugException - { - throw new DebugException(new Status( - IStatus.ERROR, - PerlDebugPlugin.getUniqueIdentifier(), - IStatus.OK, - "An error occurred during communication with the debugger process", - e)); - } - - private void updateStackFrames() throws DebugException - { - try - { - IPPosition currentIP = db.getCurrentIP(); - if (currentIP == null) return; // debugger terminated? - - String stackTrace = db.getStackTrace(); - REMatch[] matches = re.STACK_TRACE.getAllMatches(stackTrace); - - IStackFrame[] previousFrames = thread.getStackFrames(); - StackFrame previousTopFrame = - previousFrames != null - ? (StackFrame) previousFrames[0] - : null; - - StackFrame[] frames = new StackFrame[matches.length + 1]; - frames[0] = new StackFrame( - thread, - currentIP.getPath(), - currentIP.getLine(), - getEpicPath(currentIP.getPath()), - db, - previousTopFrame); - - for (int pos = 0; pos < matches.length; ++pos) - { - IPath dbPath = new Path(matches[pos].toString(3)); - - frames[pos + 1] = new StackFrame( - thread, - dbPath, - Integer.parseInt(matches[pos].toString(4)), - getEpicPath(dbPath), - matches[pos].toString(1), - matches[pos].toString(2)); - } - - thread.setStackFrames(frames); - } - catch (IOException e) - { - throwDebugException(e); - } - } - - private void unresolvedDebuggerPath(IPath dbPath) - { - PerlDebugPlugin.log(new Status( - IStatus.WARNING, - PerlDebugPlugin.getUniqueIdentifier(), - IStatus.OK, - "Could not map remote path " + dbPath + - " to a local path. Some breakpoints may be ignored.", - null)); - } - - private void unresolvedEpicPath(IPath epicPath) - { - PerlDebugPlugin.log(new Status( - IStatus.WARNING, - PerlDebugPlugin.getUniqueIdentifier(), - IStatus.OK, - "Could not map local path " + epicPath + - " to a remote path. Some breakpoints may be ignored.", - null)); - } -} \ No newline at end of file diff --git a/org.epic.debug/src/org/epic/debug/varparser/PerlDebugValue.java b/org.epic.debug/src/org/epic/debug/varparser/PerlDebugValue.java deleted file mode 100644 index f86736a1..00000000 --- a/org.epic.debug/src/org/epic/debug/varparser/PerlDebugValue.java +++ /dev/null @@ -1,143 +0,0 @@ -package org.epic.debug.varparser; - -import java.util.*; - -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.model.*; -import org.epic.debug.PerlDebugPlugin; - -public class PerlDebugValue extends DebugElement implements IValue -{ - private static final IVariable[] NO_VARS = new IVariable[0]; - - public static final int CONTENT_HAS_CHANGED = 1; - public static final int VALUE_HAS_CHANGED = 2; - public static final int VALUE_UNCHANGED = 0; - - private final List vars; - private final String value; - private final String type; - - public PerlDebugValue(IDebugTarget parent, String type, String value) - { - this(parent, type, value, NO_VARS); - } - - public PerlDebugValue( - IDebugTarget parent, - String type, - String value, - IVariable[] vars) - { - super(parent); - - this.type = type; - this.value = value; - this.vars = new ArrayList(Arrays.asList(vars)); - } - - public void addVar(PerlDebugVar var) - { - vars.add(var); - } - - public int calculateChangeFlags(PerlDebugValue previous) - { - int ret = 0; - try - { - if ((value == null && previous.getValueString() != null) - || !value.equals(previous.getValueString())) - { - ret = VALUE_HAS_CHANGED; - } - - if ((type == null && previous.type != null) - || (type != null && !type.equals(previous.type))) - { - ret = VALUE_HAS_CHANGED; - } - - int countOld = previous.vars.size(); - int countNew = vars.size(); - - if (countOld != countNew) ret |= CONTENT_HAS_CHANGED; - - for (int newPos = 0; newPos < countNew; ++newPos) - { - boolean found = false; - PerlDebugVar varNew = (PerlDebugVar) vars.get(newPos); - - for (int oldPos = 0; oldPos < countOld && !found; ++oldPos) - { - PerlDebugVar varOld = (PerlDebugVar) previous.vars.get(oldPos); - if (varOld.getName().equals(varNew.getName())) - { - found = true; - if (varNew.calculateChangeFlags(varOld)) - ret |= CONTENT_HAS_CHANGED; - } - } - - if (!found) - { - varNew.setChangeFlags(VALUE_HAS_CHANGED, true); - ret |= CONTENT_HAS_CHANGED; - } - } - return ret; - } - catch (DebugException e) - { - PerlDebugPlugin.log(e); - return VALUE_UNCHANGED; - } - } - - public String getModelIdentifier() - { - return getDebugTarget().getModelIdentifier(); - } - - public String getReferenceTypeName() throws DebugException - { - return type; - } - - public String getValueString() throws DebugException - { - return value; - } - - public IVariable[] getVariables() throws DebugException - { - return (IVariable[]) vars.toArray(new IVariable[vars.size()]); - } - - public boolean hasVariables() throws DebugException - { - return !vars.isEmpty(); - } - - public boolean isAllocated() throws DebugException - { - return true; - } - - public String toString() - { - return - "T" + (type != null ? type : "") + "{" + value + - "} with " + vars.size() + " vars"; - } - - void setChangeFlags(int value, boolean recurse) - { - Iterator i = vars.iterator(); - - while (i.hasNext()) - { - ((PerlDebugVar) i.next()).setChangeFlags(value, recurse); - } - } -} diff --git a/org.epic.debug/src/org/epic/debug/varparser/PerlDebugVar.java b/org.epic.debug/src/org/epic/debug/varparser/PerlDebugVar.java deleted file mode 100644 index 04320839..00000000 --- a/org.epic.debug/src/org/epic/debug/varparser/PerlDebugVar.java +++ /dev/null @@ -1,171 +0,0 @@ -package org.epic.debug.varparser; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.model.*; -import org.epic.debug.PerlDebugPlugin; - -public class PerlDebugVar extends DebugElement implements IVariable -{ - public static final int LOCAL_SCOPE = 1; - public static final int GLOBAL_SCOPE = 2; - - private final String name; - private final int scope; - - private PerlDebugValue value; - private int hasChanged; - private boolean special; - private boolean visited; - private boolean isSet; - - public PerlDebugVar( - IDebugTarget parent, - int scope, - String name, - PerlDebugValue value) - { - super(parent); - - this.scope = scope; - this.name = name; - this.value = value; - this.hasChanged = PerlDebugValue.VALUE_UNCHANGED; - } - - public boolean calculateChangeFlags(PerlDebugVar oldVar) - { - if (oldVar.visited) return false; - oldVar.visited = true; - - try - { - if (!getName().equals(oldVar.getName())) return false; - - int ret = value.calculateChangeFlags(oldVar.getPdValue()); - - setChangeFlags(ret, false); - - return ret != PerlDebugValue.VALUE_UNCHANGED; - } - catch (DebugException e) - { - PerlDebugPlugin.log(new Status( - IStatus.ERROR, - PerlDebugPlugin.getUniqueIdentifier(), - IStatus.OK, - "PerlDebugVar.calculateChangeFlags failed", - e)); - return false; - } - } - - public String getModelIdentifier() - { - return getDebugTarget().getModelIdentifier(); - } - - public String getName() throws DebugException - { - return name; - } - - public PerlDebugValue getPdValue() - { - return (PerlDebugValue) value; - } - - public String getReferenceTypeName() throws DebugException - { - IValue value = getValue(); - return value != null ? value.getReferenceTypeName() : null; - } - - public IValue getValue() throws DebugException - { - return value; - } - - public boolean hasContentChanged() throws DebugException - { - return (hasChanged & PerlDebugValue.CONTENT_HAS_CHANGED) > 0; - } - - public boolean hasValueChanged() throws DebugException - { - return (hasChanged & PerlDebugValue.VALUE_HAS_CHANGED) > 0; - } - - public boolean isGlobalScope() - { - return scope == GLOBAL_SCOPE; - } - - public boolean isLocalScope() - { - return scope == LOCAL_SCOPE; - } - - public boolean isSpecial() - { - return special; - } - - public boolean matches(PerlDebugVar var) - { - if (!var.name.equals(name)) return false; - if (var.scope != scope) return false; - - return true; - } - - public void setChangeFlags(int flags, boolean recurse) - { - if (isSet == true) return; - else isSet = true; - - hasChanged = flags; - - if (recurse) value.setChangeFlags(flags, recurse); - } - - public void setSpecial() - { - special = true; - } - - public void setValue(String expression) throws DebugException - { - } - - public void setValue(IValue value) throws DebugException - { - this.value = (PerlDebugValue) value; - } - - public boolean supportsValueModification() - { - return false; - } - - public String toString() - { - return name + " = " + value; - } - - public boolean verifyValue(String expression) throws DebugException - { - return false; - } - - public boolean verifyValue(PerlDebugValue value) throws DebugException - { - return false; - } - - public boolean verifyValue(IValue fVal) - { - return false; - } -} diff --git a/org.epic.debug/src/org/epic/debug/varparser/TokenVarParser.java b/org.epic.debug/src/org/epic/debug/varparser/TokenVarParser.java deleted file mode 100644 index a959e413..00000000 --- a/org.epic.debug/src/org/epic/debug/varparser/TokenVarParser.java +++ /dev/null @@ -1,251 +0,0 @@ -package org.epic.debug.varparser; - -import java.util.*; - -import org.eclipse.core.runtime.*; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.model.IDebugTarget; -import org.epic.debug.PerlDebugPlugin; - -public class TokenVarParser -{ - private final IDebugTarget target; - private final Stack varStack; - private final HashMap varMap; - private final ILog log; - - private int scope; - private int pos; - private List vars; - private char[] chars; - - public TokenVarParser(IDebugTarget target, ILog log) - { - this.target = target; - this.log = log; - this.varStack = new Stack(); - this.varMap = new HashMap(); - } - - public List parseVars(String text, int scope) - { - return parseVars(text, scope, new ArrayList()); - } - - public List parseVars(String text, int scope, List vars) - { - reset(text, scope, vars); - readVars(); - - return vars; - } - - private void addVar(String name, String value) - { - PerlDebugVar var = new PerlDebugVar( - target, scope, name, new PerlDebugValue(target, " ", value)); - - if (!varStack.empty()) - { - ((PerlDebugVar) varStack.peek()).getPdValue().addVar(var); - } - varStack.push(var); - - int pos = value.indexOf(')'); - if (pos > 0) - { - varMap.put(value.substring(0, pos + 1), var); - } - } - - private void linkVar(String name, String value) throws ParseException - { - try - { - PerlDebugVar referencedVar = (PerlDebugVar) this.varMap.get(value); - PerlDebugValue val; - - if (referencedVar == null && - value.startsWith("REF") && - value.indexOf("-> ") != -1) - { - // we might have something like "REF(0x8429efc)-> HASH(0x824f0bc)" - value = value.substring(value.indexOf("-> ")+3); - referencedVar = (PerlDebugVar) this.varMap.get(value); - } - - if (referencedVar != null) - { - PerlDebugValue referencedVal = referencedVar.getPdValue(); - val = new PerlDebugValue( - target, " ", referencedVal.getValueString()); - } - else - { - log.log(new Status( - IStatus.WARNING, - PerlDebugPlugin.getUniqueIdentifier(), - IStatus.OK, - "Unresolved reference {" + value + "} for variable {" + name + "}. " + - "Contents of the Variables view may be inaccurate. ", - null)); - - val = new PerlDebugValue(target, " ", ""); - } - - PerlDebugVar var = new PerlDebugVar(target, scope, name, val); - - if (!varStack.empty()) - { - ((PerlDebugVar) varStack.peek()).getPdValue().addVar(var); - } - varStack.push(var); - } - catch (DebugException e) - { - throw new ParseException( - "linkVar failed for name={" + name + "}, value={" + value + "}", - true, e); - } - } - - private String readString() throws ParseException - { - if (chars[pos] != 'S') - throw new ParseException("expected token S missing @" + pos, true); - - try - { - pos++; - String temp = new String(chars, pos, 8); - int length = Integer.parseInt(temp, 16); - pos += 8; - temp = new String(chars, pos, length); - pos += length; - return temp; - } - catch (Exception e) // NumberFormatException, IndexOutOfBoundsException - { - throw new ParseException("could not parse string @" + pos, true, e); - } - } - - private String readStrings() throws ParseException - { - StringBuffer buf = new StringBuffer(readString()); - - while (pos < chars.length && chars[pos] == 'S') - buf.append(readString()); - - return buf.toString(); - } - - private boolean readVar() throws ParseException - { - if (pos >= chars.length) throw new ParseException( - "unexpected end of stream", false); - - if (chars[pos] == 'E') return false; - if (chars[pos] != 'N') - { - throw new ParseException( - "expected token N missing @" + pos, true); - } - - pos++; - String name = readString(); - String value = readStrings(); - - if (chars[pos] == 'R') - { - pos++; - linkVar(name, value); - } - else - { - addVar(name, value); - } - - if (chars[pos] == 'I') - { - pos++; - readVars(); - } - PerlDebugVar var = (PerlDebugVar) varStack.pop(); - if (varStack.empty()) vars.add(var); - if (chars[pos] == 'O') - { - pos++; - return false; - } - return true; - } - - private void readVars() - { - for (;;) - { - boolean hasErrors = false; - - try { if (!readVar()) break; } - catch (ParseException e) - { - if (!hasErrors) - { - hasErrors = true; - log.log(new Status( - IStatus.ERROR, - PerlDebugPlugin.getUniqueIdentifier(), - IStatus.OK, - "An error occurred while parsing debugger variables; " + - "contents of the Variables view may be inaccurate. " + - "Failure caused by string: {" + String.valueOf(chars) + "}", - e)); - } - if (e.canRecover()) recover(); - else break; - } - } - } - - private void recover() - { - // this recovery algorithm is simplistic and will not recover - // well from parsing errors encountered in nested variables - while ( - pos < chars.length && - chars[pos] != 'N' && - chars[pos] != 'E') pos++; - } - - private void reset(String text, int scope, List vars) - { - this.varMap.clear(); - this.varStack.clear(); - this.chars = text.toCharArray(); - this.scope = scope; - this.vars = vars; - this.pos = 0; - } - - private static class ParseException extends Exception - { - private final boolean canRecover; - - public ParseException(String msg, boolean canRecover) - { - this(msg, canRecover, null); - } - - public ParseException(String msg, boolean canRecover, Throwable cause) - { - super(msg, cause); - this.canRecover = canRecover; - } - - public boolean canRecover() - { - return canRecover; - } - } -} \ No newline at end of file diff --git a/org.epic.debug/test.dat b/org.epic.debug/test.dat deleted file mode 100644 index f6b0a0b9..00000000 --- a/org.epic.debug/test.dat +++ /dev/null @@ -1,80 +0,0 @@ -FileHandle(stderr) => fileno(2) -%SIG = ( - 'ABRT' => undef - 'ALRM' => undef - 'BREAK' => undef - 'BUS' => CODE(0x1c1d4d4) - -> &DB::diesignal in 0 - 'CHLD' => undef - 'CLD' => undef - 'CONT' => undef - 'FPE' => undef - 'HUP' => undef - 'ILL' => undef - 'INT' => CODE(0x1bf9bb8) - -> &DB::catch in 0 - 'KILL' => undef - 'NUM05' => undef - 'NUM06' => undef - 'NUM07' => undef - 'NUM10' => undef - 'NUM12' => undef - 'NUM16' => undef - 'NUM17' => undef - 'NUM18' => undef - 'NUM19' => undef - 'NUM24' => undef - 'PIPE' => undef - 'QUIT' => undef - 'SEGV' => CODE(0x1c1d4d4) - -> &DB::diesignal in 0 - 'STOP' => undef - 'TERM' => undef - '__DIE__' => CODE(0x1c22428) - -> &DB::dbdie in 0 - '__WARN__' => CODE(0x1c22284) - -> &DB::dbwarn in 0 -) -@products = ( - 0 ' -' - 1 ' -' - 2 ' -' - 3 ' -' - 4 ' -' - 5 ' -' - 6 ' -' - 7 ' -' - 8 ' -' - 9 ' -' - 10 ' -' - 11 ' -' - 12 ' -' - 13 ' -' - 14 ' -' - 15 ' -' - 16 ' -' - 17 ' -' - 18 "AsicsLaufschuhe Herren/Adidasdfdfdf NAME convert - convert an image or sequence of images

SYNOPSIS
convert [ options ... ] input_file output_file

DESCRIPTION
Convert converts an input file using one image format to an output file
with a differing image format. In addition, various types of image pro-
cessing can be performed on the converted image during the conversion
process. Convert recognizes the image formats listed in ImageMagick(1).

EXAMPLES
To make a thumbnail of a JPEG image, use:

convert -size 120x120 cockatoo.jpg -resize 120x120
+profile \"*\" thumbnail.jpg

In this example, '-size 120x120' gives a hint to the JPEG decoder that
the image is going to be downscaled to 120x120, allowing it to run
faster by avoiding returning full-resolution images to ImageMagick for
the subsequent resizing operation. The output image. It will be
scaled so its largest dimension is 120 pixels. The that might be
Manual page convert(1) line 1

[ALT]alter preis 1000,0 €[/ALT]150,006\c@6,5\c@7\c@7,5\c@8\c@8,5\c@9\c@9,5\c@10\c@10,5\c@11\c@11,5\c@12\c@12,5\c@13\c@13,5\c@14C:/Programme/ShopCms/temp/Foundatinplusgr.HerrnTN342_1552_390x195.jpg\cJ" - 19 "AAAALaufschuhe Damen/AsicsBla Bla BlaLong
description10,008\c@10C:/Programme/ShopCms/temp/Kayano_X_Women_gro__390x195.jpg\cJ" - 20 "7777777Laufschuhe Damen/AsicsBla Bla BlaLong
description
[ROT]Alter Preis[/ROT]
[ROTS]50,00 €[/ROTS]10,008\c@10C:/Programme/ShopCms/temp/taper_222x157.jpg\cJ" - 21 "7777778Laufschuhe Damen/AsicsBla Bla BlaLong
description
[ROT]Alter Preis[/ROT]
[ROTS]50,00 €[/ROTS]10,008\c@10C:/Programme/ShopCms/temp/taper_222x157.jpg" -) -$^L = "\cL" diff --git a/org.epic.debug/test.txt b/org.epic.debug/test.txt deleted file mode 100755 index 3cee692d..00000000 --- a/org.epic.debug/test.txt +++ /dev/null @@ -1,3 +0,0 @@ - @perfNumber = ( - empty array - ) \ No newline at end of file diff --git a/org.epic.debug/vars.dat b/org.epic.debug/vars.dat deleted file mode 100755 index 883bf368..00000000 --- a/org.epic.debug/vars.dat +++ /dev/null @@ -1,71 +0,0 @@ -@asd = ( - 0 SCALAR(0x1e20814) - -> 'hallo' -) - -@timeSlots = ( - 0 HASH(0x1d299b8) - 'Chanel' => 'BBC7' - 'Days' => HASH(0x15db76c) - 'Friday' => 1 - 'Monday' => 2 - 'Thursday' => 3 - 'Tuesday' => 4 - 'Wednesday' => 5 - 'Operation' => 'Copy' - 'Prefix' => 'r7_1' - 'Time' => '10:00' - 1 HASH(0x1d29988) - 'Chanel' => 'BBC7' - 'Days' => HASH(0x15db76c) - -> REUSED_ADDRESS - 'Operation' => 'Copy' - 'Prefix' => 'r7_1' - 'Time' => '11:00' -) - - -$ab = ARRAY(0x1e20808) - 0 SCALAR(0x1e20814) - -> 'hallo' -$? = 0 -$0 = 'bbc.pl' - - -%day_groups_weekends = ( - 'Saturday' => 1 - 'Sunday' => 1 - '__WARN__' => CODE(0x1b7ca2c) - -> &DB::dbwarn in 0 -) - - - -$tm = Time::tm=ARRAY(0x1df6b04) - 0 30 - 1 58 - 2 16 - 3 7 - 4 5 - 5 103 - 6 6 - 7 157 - 8 1 - -@a = ( - 0 REF(0x1a54ebc) - -> Time::tm=ARRAY(0x1df6b04) - -> REUSED_ADDRESS - 1 Time::tm=ARRAY(0x1df6b04) - -> REUSED_ADDRESS -) - -FileHandle(stdout) => fileno(1) - -@a = ( - 0 REF(0x1a5b6cc) - -> Time::tm=ARRAY(0x1d354b4) - -> REUSED_ADDRESS - 1 *main::STDIN - FileHandle({*main::STDIN}) => fileno(0) -) \ No newline at end of file diff --git a/org.epic.feature.main/.gitignore b/org.epic.feature.main/.gitignore new file mode 100644 index 00000000..5e56e040 --- /dev/null +++ b/org.epic.feature.main/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/org.epic.perleditor-test/.gitignore b/org.epic.perleditor-test/.gitignore new file mode 100644 index 00000000..5e56e040 --- /dev/null +++ b/org.epic.perleditor-test/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/org.epic.perleditor-test/src/org/epic/debug/varparser/DebugTargetStub.java b/org.epic.perleditor-test/src/org/epic/debug/varparser/DebugTargetStub.java deleted file mode 100644 index acd66fec..00000000 --- a/org.epic.perleditor-test/src/org/epic/debug/varparser/DebugTargetStub.java +++ /dev/null @@ -1,128 +0,0 @@ -package org.epic.debug.varparser; - -import org.eclipse.core.resources.IMarkerDelta; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.model.*; - -class DebugTargetStub implements IDebugTarget -{ - public IProcess getProcess() - { - return null; - } - - public IThread[] getThreads() throws DebugException - { - return null; - } - - public boolean hasThreads() throws DebugException - { - return false; - } - - public String getName() throws DebugException - { - return "DebugTargetStub"; - } - - public boolean supportsBreakpoint(IBreakpoint breakpoint) - { - return false; - } - - public String getModelIdentifier() - { - return "org.epic.debug"; - } - - public IDebugTarget getDebugTarget() - { - return null; - } - - public ILaunch getLaunch() - { - return null; - } - - public Object getAdapter(Class adapter) - { - return null; - } - - public boolean canTerminate() - { - return false; - } - - public boolean isTerminated() - { - return false; - } - - public void terminate() throws DebugException - { - } - - public boolean canResume() - { - return false; - } - - public boolean canSuspend() - { - return false; - } - - public boolean isSuspended() - { - return false; - } - - public void resume() throws DebugException - { - } - - public void suspend() throws DebugException - { - } - - public void breakpointAdded(IBreakpoint breakpoint) - { - } - - public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) - { - } - - public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) - { - } - - public boolean canDisconnect() - { - return false; - } - - public void disconnect() throws DebugException - { - } - - public boolean isDisconnected() - { - return false; - } - - public boolean supportsStorageRetrieval() - { - return false; - } - - public IMemoryBlock getMemoryBlock(long startAddress, long length) - throws DebugException - { - return null; - } -} diff --git a/org.epic.perleditor-test/src/org/epic/debug/varparser/TestTokenVarParser.java b/org.epic.perleditor-test/src/org/epic/debug/varparser/TestTokenVarParser.java deleted file mode 100644 index 6d104ad9..00000000 --- a/org.epic.perleditor-test/src/org/epic/debug/varparser/TestTokenVarParser.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.epic.debug.varparser; - -import java.io.PrintWriter; -import java.io.StringWriter; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.debug.core.model.IVariable; -import org.epic.perl.editor.test.BaseTestCase; -import org.epic.perl.editor.test.Log; - -public class TestTokenVarParser extends BaseTestCase -{ - public void testAll() throws Exception - { - assertOk("test.in/TestTokenVarParser1.txt"); - assertOk("test.in/TestTokenVarParser2.txt"); - assertOk("test.in/TestTokenVarParser3.txt"); - } - - private void dumpVar(PerlDebugVar var, int indent, PrintWriter pw) - throws Exception - { - for (int i = 0; i < indent; i++) pw.print(' '); - pw.println(var.toString()); - - if (var.getPdValue().hasVariables()) - { - IVariable[] vars = var.getPdValue().getVariables(); - for (int i = 0; i < vars.length; i++) - dumpVar((PerlDebugVar) vars[i], indent+1, pw); - } - } - - private void assertOk(String inputFile) throws Exception - { - DebugTargetStub targetStub = new DebugTargetStub(); - TokenVarParser p = new TokenVarParser(targetStub, new Log()); - - List vars = p.parseVars( - readFile(inputFile), PerlDebugVar.LOCAL_SCOPE); - - StringWriter actual = new StringWriter(); - PrintWriter pw = new PrintWriter(actual); - - for (Iterator i = vars.iterator(); i.hasNext();) - { - dumpVar((PerlDebugVar) i.next(), 0, pw); - } - pw.close(); - - //System.err.println(actual); - - String expected = - readFile(inputFile.substring(0, inputFile.length()-4) - + "-expected.txt"); - - assertEquals(expected, actual.toString()); - } -} diff --git a/org.epic.perleditor-test/test.in/Tool.pm b/org.epic.perleditor-test/test.in/Tool.pm old mode 100755 new mode 100644 diff --git a/org.epic.perleditor/.gitignore b/org.epic.perleditor/.gitignore new file mode 100644 index 00000000..5e56e040 --- /dev/null +++ b/org.epic.perleditor/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/org.epic.perleditor/icons/mark_occurrences_disabled.gif b/org.epic.perleditor/icons/mark_occurrences_disabled.gif old mode 100755 new mode 100644 diff --git a/org.epic.perleditor/perlutils/perltidy/Perl/Tidy.pm b/org.epic.perleditor/perlutils/perltidy/Perl/Tidy.pm index f576704c..9a7e5813 100644 --- a/org.epic.perleditor/perlutils/perltidy/Perl/Tidy.pm +++ b/org.epic.perleditor/perlutils/perltidy/Perl/Tidy.pm @@ -65,7 +65,7 @@ use IO::File; use File::Basename; BEGIN { - ( $VERSION = q($Id$) ) =~ s/^.*\s+(\d+)\/(\d+)\/(\d+).*$/$1$2$3/; # all one line for MakeMaker + ( $VERSION = q($Id: Tidy.pm,v 1.73 2007/12/05 17:51:17 perltidy Exp $) ) =~ s/^.*\s+(\d+)\/(\d+)\/(\d+).*$/$1$2$3/; # all one line for MakeMaker } sub streamhandle { @@ -8517,7 +8517,7 @@ sub set_white_space_flag { # /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/ # Examples: # *VERSION = \'1.01'; - # ( $VERSION ) = '$Revision$ ' =~ /\$Revision:\s+([^\s]+)/; + # ( $VERSION ) = '$Revision: 1.73 $ ' =~ /\$Revision:\s+([^\s]+)/; # We will pass such a line straight through without breaking # it unless -npvl is used diff --git a/org.epic.perleditor/src/org/epic/core/parser/.gitignore b/org.epic.perleditor/src/org/epic/core/parser/.gitignore new file mode 100644 index 00000000..cfa5c3b4 --- /dev/null +++ b/org.epic.perleditor/src/org/epic/core/parser/.gitignore @@ -0,0 +1,28 @@ +/LexExpectHereDocEnd.java +/LexExpectHereDocEnd.smap +/LexExpectHereDocEndTokenTypes.java +/LexExpectHereDocEndTokenTypes.txt +/LexExpectString.java +/LexExpectString.smap +/LexExpectStringEnd.java +/LexExpectStringEnd.smap +/LexExpectStringEndTokenTypes.java +/LexExpectStringEndTokenTypes.txt +/LexExpectStringSuffix.java +/LexExpectStringSuffix.smap +/LexExpectStringSuffixTokenTypes.java +/LexExpectStringSuffixTokenTypes.txt +/LexExpectStringTokenTypes.java +/LexExpectStringTokenTypes.txt +/LexExpectSubstExpr.java +/LexExpectSubstExpr.smap +/LexExpectSubstExprTokenTypes.java +/LexExpectSubstExprTokenTypes.txt +/PODLexer.java +/PODLexer.smap +/PODLexerTokenTypes.java +/PODLexerTokenTypes.txt +/PerlLexer.java +/PerlLexer.smap +/PerlTokenTypes.java +/PerlTokenTypes.txt diff --git a/org.epic.perleditor/src/org/epic/perleditor/actions/AbstractOpenDeclaration.java b/org.epic.perleditor/src/org/epic/perleditor/actions/AbstractOpenDeclaration.java index 94125fc0..4709f98c 100644 --- a/org.epic.perleditor/src/org/epic/perleditor/actions/AbstractOpenDeclaration.java +++ b/org.epic.perleditor/src/org/epic/perleditor/actions/AbstractOpenDeclaration.java @@ -1,148 +1,148 @@ -package org.epic.perleditor.actions; - -import java.io.*; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.*; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.text.*; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.*; -import org.eclipse.ui.part.FileEditorInput; -import org.epic.core.PerlCore; -import org.epic.core.PerlProject; -import org.epic.core.model.*; -import org.epic.core.model.Package; -import org.epic.core.util.FileUtilities; -import org.epic.perleditor.PerlEditorPlugin; -import org.epic.perleditor.editors.*; -import org.epic.perleditor.editors.perl.SourceParser; - -/** - * Base class for implementations which attempt to find and open - * declaration of a selected syntactic element or, if no selection - * exists, of the element over whose invocation the caret is located. - * This class implements the following search heuristics: - * - *
    - *
  1. If a "target module" can be extracted from the selected element's - * name (according to {@link #getTargetModule}), - * only the referenced module is searched. This assumes the common case - * and does not take into account that one may actually define - * elements belonging to any package anywhere (with multiple - * packages in a single module file). - *
  2. - *
  3. Otherwise, search the active editor's source text.
  4. - *
  5. Then search in modules referenced by 'use'.
  6. - *
  7. Finally, search recursively in files and/or modules - * included by 'require' (only 'require's followed by - * barewords or quoted strings are considered).
  8. - *
- * - * The search heuristics used here will, of course, fail in many circumstances, - * especially when applied to elements such as method invocations in OO Perl - * code. This has to be considered a known (and extremely difficult to overcome) - * limitation. - * - * If the declaration is found in an external file (i.e. not in the active - * editor), an attempt is made to open this file in the editor. However, - * this currently only works with module files that are located in the workspace. - * For other files, a result object indicating failure will be returned (for now). - * - * @author LeO (original implementation) - * @author jploski (complete rewrite) - */ -abstract class AbstractOpenDeclaration -{ - private static final String REQUIRE_REG_EXPR = "^[\\s]*require\\s+(\\S+)"; - private final OpenDeclarationAction action; - - //~ Constructors - - public AbstractOpenDeclaration(OpenDeclarationAction action) - { - this.action = action; - } - - //~ Methods - - /** - * Runs the action using the given selection within the editor. - */ - public Result run(ITextSelection selection) - { - return runWithSearchString(getSearchString(selection)); - } - - /** - * Runs the action based on the current selection in the editor. - */ - public Result run() - { - return runWithSearchString(getSearchString( - (ITextSelection) getEditor().getSelectionProvider().getSelection())); - } - - /** - * @return the region where the element's declaration was found, - * or null if not found - */ - protected abstract IRegion findDeclaration(SourceFile sourceFile, String searchString) - throws CoreException; - - /** - * @return if {@link #getTargetModule} returns non-null, - * the local name of the searched for element within - * the target module (this method is not called otherwise) - */ - protected abstract String getLocalSearchString(String searchString); - - /** - * Returns the name of the element whose declaration should be located. - *

- * If the supplied selection's length is 0, the offset is treated as - * the caret position and the enclosing partition is used to find - * the element's name - * - * @return selected element's name or null if none is selected - */ - protected abstract String getSearchString(ITextSelection selection); - - /** - * @return name of the target module in which to search for the - * declaration of the requested element if it can be deduced - * from searchString; null if the search should - * proceed through modules from the \@INC path and 'require's - */ - protected abstract String getTargetModule(String searchString); - - protected void messageBox(String title, String message) - { - Shell shell; - shell = PerlEditorPlugin.getWorkbenchWindow().getShell(); - MessageDialog.openInformation(shell, title, message); - } - - /** - * @param searchString - * name of the element whose declaration we are looking for - * @throws CoreException - */ - private Result runWithSearchString(String searchString) - { - try { return _runWithSearchString(searchString); } - catch (CoreException e) - { - getLog().log(e.getStatus()); - return new Result(Result.EXCEPTION, null, null, null); - } - } - - private Result _runWithSearchString(String searchString) throws CoreException +package org.epic.perleditor.actions; + +import java.io.*; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.*; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.text.*; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.*; +import org.eclipse.ui.part.FileEditorInput; +import org.epic.core.PerlCore; +import org.epic.core.PerlProject; +import org.epic.core.model.*; +import org.epic.core.model.Package; +import org.epic.core.util.FileUtilities; +import org.epic.perleditor.PerlEditorPlugin; +import org.epic.perleditor.editors.*; +import org.epic.perleditor.editors.perl.SourceParser; + +/** + * Base class for implementations which attempt to find and open + * declaration of a selected syntactic element or, if no selection + * exists, of the element over whose invocation the caret is located. + * This class implements the following search heuristics: + * + *

    + *
  1. If a "target module" can be extracted from the selected element's + * name (according to {@link #getTargetModule}), + * only the referenced module is searched. This assumes the common case + * and does not take into account that one may actually define + * elements belonging to any package anywhere (with multiple + * packages in a single module file). + *
  2. + *
  3. Otherwise, search the active editor's source text.
  4. + *
  5. Then search in modules referenced by 'use'.
  6. + *
  7. Finally, search recursively in files and/or modules + * included by 'require' (only 'require's followed by + * barewords or quoted strings are considered).
  8. + *
+ * + * The search heuristics used here will, of course, fail in many circumstances, + * especially when applied to elements such as method invocations in OO Perl + * code. This has to be considered a known (and extremely difficult to overcome) + * limitation. + * + * If the declaration is found in an external file (i.e. not in the active + * editor), an attempt is made to open this file in the editor. However, + * this currently only works with module files that are located in the workspace. + * For other files, a result object indicating failure will be returned (for now). + * + * @author LeO (original implementation) + * @author jploski (complete rewrite) + */ +abstract class AbstractOpenDeclaration +{ + private static final String REQUIRE_REG_EXPR = "^[\\s]*require\\s+(\\S+)"; + private final OpenDeclarationAction action; + + //~ Constructors + + public AbstractOpenDeclaration(OpenDeclarationAction action) + { + this.action = action; + } + + //~ Methods + + /** + * Runs the action using the given selection within the editor. + */ + public Result run(ITextSelection selection) + { + return runWithSearchString(getSearchString(selection)); + } + + /** + * Runs the action based on the current selection in the editor. + */ + public Result run() + { + return runWithSearchString(getSearchString( + (ITextSelection) getEditor().getSelectionProvider().getSelection())); + } + + /** + * @return the region where the element's declaration was found, + * or null if not found + */ + protected abstract IRegion findDeclaration(SourceFile sourceFile, String searchString) + throws CoreException; + + /** + * @return if {@link #getTargetModule} returns non-null, + * the local name of the searched for element within + * the target module (this method is not called otherwise) + */ + protected abstract String getLocalSearchString(String searchString); + + /** + * Returns the name of the element whose declaration should be located. + *

+ * If the supplied selection's length is 0, the offset is treated as + * the caret position and the enclosing partition is used to find + * the element's name + * + * @return selected element's name or null if none is selected + */ + protected abstract String getSearchString(ITextSelection selection); + + /** + * @return name of the target module in which to search for the + * declaration of the requested element if it can be deduced + * from searchString; null if the search should + * proceed through modules from the \@INC path and 'require's + */ + protected abstract String getTargetModule(String searchString); + + protected void messageBox(String title, String message) + { + Shell shell; + shell = PerlEditorPlugin.getWorkbenchWindow().getShell(); + MessageDialog.openInformation(shell, title, message); + } + + /** + * @param searchString + * name of the element whose declaration we are looking for + * @throws CoreException + */ + private Result runWithSearchString(String searchString) + { + try { return _runWithSearchString(searchString); } + catch (CoreException e) + { + getLog().log(e.getStatus()); + return new Result(Result.EXCEPTION, null, null, null); + } + } + + private Result _runWithSearchString(String searchString) throws CoreException { if (searchString == null) return Result.invalidSearch(); @@ -161,16 +161,16 @@ private Result _runWithSearchString(String searchString) throws CoreException } if (targetModule != null) - { - String localSearchString = getLocalSearchString(searchString); - File moduleFile = findModuleFile(targetModule); - - if (moduleFile != null) - { - Result res = searchModuleFile(moduleFile, localSearchString); - if (res.isFound()) return res; - } - else return Result.moduleNotFound(targetModule); + { + String localSearchString = getLocalSearchString(searchString); + File moduleFile = findModuleFile(targetModule); + + if (moduleFile != null) + { + Result res = searchModuleFile(moduleFile, localSearchString); + if (res.isFound()) return res; + } + else return Result.moduleNotFound(targetModule); } else { @@ -254,80 +254,80 @@ private Result searchInUsedModules(String searchString, String[] usedModules) th private File findModuleFile(String moduleName) throws CoreException { if (moduleName.length() == 0) return null; - - String fileSep = File.separatorChar == '\\' ? "\\\\" : File.separator; - String modulePath = moduleName.replaceAll("::", fileSep) + ".pm"; - List dirs = getProject().getEffectiveIncPath(); - - for (Iterator i = dirs.iterator(); i.hasNext();) - { - File dir = (File) i.next(); - if (".".equals(dir.getName())) dir = getCurrentDir(); - File f = new File(dir, modulePath); - if (f.exists() && f.isFile()) return f; - } - return null; - } - - /** - * @param fromDir directory for resolving relative paths in 'require's - * @param source source document for fromFile - * @return an array with files 'required' by the given source text; - * due to the regexp-based nature of the search only those - * 'require's which use string literals or barewords are considered - * @throws CoreException - */ - private File[] findRequiredFiles(File fromDir, IDocument source) throws CoreException - { - String text = source.get(); - List elems = - SourceParser.getElements(text, REQUIRE_REG_EXPR, "", "", true); - List requiredFiles = new ArrayList(); - - for (Iterator i = elems.iterator(); i.hasNext();) - { - ISourceElement elem = (ISourceElement) i.next(); - String elemText = elem.getName(); - - if (elemText.indexOf("\"") != -1 || - elemText.indexOf("'") != -1) - { - // require 'some/literal/path.pm'; - - Matcher m = Pattern.compile("['\"]([^'\"]*?)['\"]").matcher(elemText); - if (m.find()) - { - File requiredFile = new File(fromDir, m.group(1)); - if (requiredFile.isFile()) requiredFiles.add(requiredFile); - } - } - else - { - // require Some::Module; - - Matcher m = Pattern.compile("([A-Za-z0-9:]+)").matcher(elemText); - if (m.find()) - { - File moduleFile = findModuleFile(m.group(1)); - if (moduleFile != null) requiredFiles.add(moduleFile); - } - } - } - return (File[]) requiredFiles.toArray(new File[requiredFiles.size()]); - } - - /** - * @return names of modules referenced by 'use' statements from - * the given source text - */ - private String[] findUsedModules(SourceFile sourceFile) throws CoreException - { - List names = new ArrayList(); - for (Iterator j = sourceFile.getPackages().iterator(); j.hasNext();) - { - Package pkg = (Package) j.next(); - for (Iterator i = pkg.getUses().iterator(); i.hasNext();) - names.add(((ISourceElement) i.next()).getName()); + + String fileSep = File.separatorChar == '\\' ? "\\\\" : File.separator; + String modulePath = moduleName.replaceAll("::", fileSep) + ".pm"; + List dirs = getProject().getEffectiveIncPath(); + + for (Iterator i = dirs.iterator(); i.hasNext();) + { + File dir = (File) i.next(); + if (".".equals(dir.getName())) dir = getCurrentDir(); + File f = new File(dir, modulePath); + if (f.exists() && f.isFile()) return f; + } + return null; + } + + /** + * @param fromDir directory for resolving relative paths in 'require's + * @param source source document for fromFile + * @return an array with files 'required' by the given source text; + * due to the regexp-based nature of the search only those + * 'require's which use string literals or barewords are considered + * @throws CoreException + */ + private File[] findRequiredFiles(File fromDir, IDocument source) throws CoreException + { + String text = source.get(); + List elems = + SourceParser.getElements(text, REQUIRE_REG_EXPR, "", "", true); + List requiredFiles = new ArrayList(); + + for (Iterator i = elems.iterator(); i.hasNext();) + { + ISourceElement elem = (ISourceElement) i.next(); + String elemText = elem.getName(); + + if (elemText.indexOf("\"") != -1 || + elemText.indexOf("'") != -1) + { + // require 'some/literal/path.pm'; + + Matcher m = Pattern.compile("['\"]([^'\"]*?)['\"]").matcher(elemText); + if (m.find()) + { + File requiredFile = new File(fromDir, m.group(1)); + if (requiredFile.isFile()) requiredFiles.add(requiredFile); + } + } + else + { + // require Some::Module; + + Matcher m = Pattern.compile("([A-Za-z0-9:]+)").matcher(elemText); + if (m.find()) + { + File moduleFile = findModuleFile(m.group(1)); + if (moduleFile != null) requiredFiles.add(moduleFile); + } + } + } + return (File[]) requiredFiles.toArray(new File[requiredFiles.size()]); + } + + /** + * @return names of modules referenced by 'use' statements from + * the given source text + */ + private String[] findUsedModules(SourceFile sourceFile) throws CoreException + { + List names = new ArrayList(); + for (Iterator j = sourceFile.getPackages().iterator(); j.hasNext();) + { + Package pkg = (Package) j.next(); + for (Iterator i = pkg.getUses().iterator(); i.hasNext();) + names.add(((ISourceElement) i.next()).getName()); } return (String[]) names.toArray(new String[names.size()]); } @@ -372,354 +372,354 @@ private String[] findParents(SourceFile sourceFile) throws CoreException /** * @return the script's parent directory, if the action is executing - * on a .pl script (to simulate the @INC entry used when actually - * executing or compiling the script); '.' otherwise - */ - private File getCurrentDir() - { - IEditorInput input = getEditor().getEditorInput(); - if (!(input instanceof IFileEditorInput)) return new File("."); - - IPath scriptFilePath = ((IFileEditorInput) input).getFile().getLocation(); - if (scriptFilePath == null) return new File("."); - - String ext = scriptFilePath.getFileExtension(); - if (ext == null || !ext.toLowerCase().equals("pm")) // not a module = script - { - return scriptFilePath.toFile().getParentFile(); - } - else return new File("."); - } - - private PerlEditor getEditor() - { - return action.getEditor(); - } - - private ILog getLog() - { - return action.getLog(); - } - - /** - * @return project with the edited source file from which - * OpenDeclaration was invoked - */ - private PerlProject getProject() - { - IEditorInput input = getEditor().getEditorInput(); - IResource resource = (IResource) ((IAdaptable) input) - .getAdapter(IResource.class); - - return PerlCore.create(resource.getProject()); - } - - /** - * @return edited source document of the editor from which - * OpenDeclaration was invoked - */ - protected IDocument getSourceDocument() - { - return getSourceDocument(getEditor()); - } - - /** - * @return document for the given source file, partitioned by PerlPartitioner - */ - private IDocument getSourceDocument(File file) throws IOException - { - StringWriter sw = new StringWriter(); - BufferedReader r = null; - - try - { - r = new BufferedReader(new InputStreamReader( - new FileInputStream(file), "ISO-8859-1")); // TODO use which encoding? - - char[] buf = new char[4096]; - int bread; - while ((bread = r.read(buf)) > 0) sw.write(buf, 0, bread); - IDocument doc = new Document(sw.toString()); - new PerlPartitioner(getLog(), doc); - return doc; - } - finally - { - if (r != null) try { r.close(); } catch (IOException e) { } - } - } - - /** - * @return edited source document in the given editor - */ - private IDocument getSourceDocument(PerlEditor editor) - { - return editor.getDocumentProvider().getDocument(editor.getEditorInput()); - } - - /** - * Searches the given editor for a declaration of the given element. - * If found, the declaration is highlighted. - * - * @return an object indicating if the declaration was found - */ - private Result searchEditor(PerlEditor editor, String searchString) - throws CoreException - { - SourceFile sourceFile = editor.getSourceFile(); - sourceFile.parse(); - IRegion match = findDeclaration(sourceFile, searchString); - - if (match != null) - { - editor.getSite().getPage().activate(editor); - editor.selectAndReveal(match.getOffset(), match.getLength()); - return Result.found(); - } - else return Result.notFound(searchString); - } - - /** - * Searches a module file for a declaration of the given element. - * The file is read from disk and might be external to the workspace. - * - * @return an object indicating if the declaration was found - */ - private Result searchExternalFile(File moduleFile, String searchString) - throws CoreException - { - try - { - SourceFile sourceFile = new SourceFile( - getLog(), getSourceDocument(moduleFile)); - sourceFile.parse(); - - IRegion match = findDeclaration(sourceFile, searchString); - return match != null ? Result.found() : Result.notFound(searchString); - } - catch (IOException e) - { - getLog().log(new Status( - IStatus.ERROR, - PerlEditorPlugin.getPluginId(), - IStatus.OK, - "Could not read module file " + moduleFile.getAbsolutePath(), - e)); - return Result.exception(); - } - } - - /** - * @param fromDir directory for resolving relative paths in 'require's - * @param source document in which to look for 'require' statements; - * the search continues recursively in these required files - * @param visitedFiles - * a set of already visited files (used to prevent endless loops) - * @return an object indicating whether the element's declaration was found - * in some file - * @throws IOException - * @throws CoreException - */ - private Result searchInRequires( - String searchString, - File fromDir, - IDocument source, - Set visitedFiles) throws CoreException - { - File[] requiredFiles = findRequiredFiles(fromDir, source); - - for (int i = 0; i < requiredFiles.length; i++) - { - if (!visitedFiles.contains(requiredFiles[i])) - { - visitedFiles.add(requiredFiles[i]); - Result res = searchModuleFile(requiredFiles[i], searchString); - - if (res.isFound()) return res; - else - { - try - { - res = searchInRequires( - searchString, - requiredFiles[i].getParentFile(), - getSourceDocument(requiredFiles[i]), - visitedFiles); - - if (res.isFound()) return res; - } - catch (IOException e) - { - getLog().log(new Status( - IStatus.ERROR, - PerlEditorPlugin.getPluginId(), - IStatus.OK, - "Could not read module file " + requiredFiles[i].getAbsolutePath(), - e)); - return Result.exception(); - } - } - } - } - return Result.notFound(searchString); - } - - /** - * Searches the given module file for a declaration of the given element. - * The search first occurs in already open editors containing that file. - * If the declaration is found, an attempt is made to open it in an editor, - * if not possible, displays a message about the file's location. - * - * @return true if the declaration was found; false otherwise - */ - private Result searchModuleFile(File moduleFile, String searchString) - throws CoreException - { - IPath path = Path.fromOSString(moduleFile.getAbsolutePath()); - IFile fileInWorkspace = getProject().getProject() - .getWorkspace().getRoot().getFileForLocation(path); - - if (fileInWorkspace != null) - return searchModuleFile(moduleFile, fileInWorkspace, searchString); - else - { - Result res = searchExternalFile(moduleFile, searchString); - if (res.isFound()) - { - IFileEditorInput input = FileUtilities.getFileEditorInput(path); - PerlEditor newEditor = (PerlEditor) - getEditor().getSite().getPage().openEditor( - input, - getEditor().getSite().getId()); - - return searchEditor(newEditor, searchString); - } - else return res; - } - } - - /** - * Just like {@link #searchModuleFile(File, String)}, but takes into account - * that the module file to be searched is contained in the workspace. - */ - private Result searchModuleFile( - File moduleFile, - IFile fileInWorkspace, - String searchString) throws CoreException - { - IWorkbenchPage page = getEditor().getSite().getPage(); - IEditorPart editor = page.findEditor(new FileEditorInput(fileInWorkspace)); - - if (editor instanceof PerlEditor) - { - return searchEditor((PerlEditor) editor, searchString); - } - else - { - Result res = searchExternalFile(moduleFile, searchString); - if (!res.isFound()) return res; - - try - { - FileEditorInput input = new FileEditorInput(fileInWorkspace); - PerlEditor newEditor = (PerlEditor) - getEditor().getSite().getPage().openEditor( - input, - getEditor().getSite().getId()); - - return searchEditor(newEditor, searchString); - } - catch (PartInitException e) - { - getLog().log(new Status( - IStatus.ERROR, - PerlEditorPlugin.getPluginId(), - IStatus.OK, - "Problems encountered while opening editor for " + - moduleFile.getAbsolutePath(), - e)); - return Result.exception(); - } - } - } - - /** - * Used to report the result of the open declaration action. - */ - public static class Result - { - /** - * Declaration of the requested element was found successfully. - */ - public static final int FOUND = 0; - - /** - * Declaration of the requested element could not be found - * using the implemented search algorithm. - */ - public static final int NOT_FOUND = 1; - - /** - * The target module in which the search was to be performed - * could not be located. - */ - public static final int MODULE_NOT_FOUND = 2; - - /** - * No search was performed because no string was selected. - */ - public static final int INVALID_SEARCH = 3; - - /** - * An exception occurred and was logged during the search. - */ - public static final int EXCEPTION = 4; - - public final int statusCode; - public final String searchString; - public final String targetModule; - public final File moduleFile; - - private Result( - int statusCode, - String searchString, - String targetModule, - File moduleFile) - { - this.statusCode = statusCode; - this.searchString = searchString; - this.targetModule = targetModule; - this.moduleFile = moduleFile; - } - - public boolean isFound() - { - return statusCode == FOUND; - } - - public static Result exception() - { - return new Result(EXCEPTION, null, null, null); - } - - public static Result found() - { - return new Result(FOUND, null, null, null); - } - - public static Result invalidSearch() - { - return new Result(INVALID_SEARCH, null, null, null); - } - - public static Result moduleNotFound(String targetModule) - { - return new Result(MODULE_NOT_FOUND, null, targetModule, null); - } - - public static Result notFound(String searchString) - { - return new Result(NOT_FOUND, searchString, null, null); - } - } + * on a .pl script (to simulate the @INC entry used when actually + * executing or compiling the script); '.' otherwise + */ + private File getCurrentDir() + { + IEditorInput input = getEditor().getEditorInput(); + if (!(input instanceof IFileEditorInput)) return new File("."); + + IPath scriptFilePath = ((IFileEditorInput) input).getFile().getLocation(); + if (scriptFilePath == null) return new File("."); + + String ext = scriptFilePath.getFileExtension(); + if (ext == null || !ext.toLowerCase().equals("pm")) // not a module = script + { + return scriptFilePath.toFile().getParentFile(); + } + else return new File("."); + } + + private PerlEditor getEditor() + { + return action.getEditor(); + } + + private ILog getLog() + { + return action.getLog(); + } + + /** + * @return project with the edited source file from which + * OpenDeclaration was invoked + */ + private PerlProject getProject() + { + IEditorInput input = getEditor().getEditorInput(); + IResource resource = (IResource) ((IAdaptable) input) + .getAdapter(IResource.class); + + return PerlCore.create(resource.getProject()); + } + + /** + * @return edited source document of the editor from which + * OpenDeclaration was invoked + */ + protected IDocument getSourceDocument() + { + return getSourceDocument(getEditor()); + } + + /** + * @return document for the given source file, partitioned by PerlPartitioner + */ + private IDocument getSourceDocument(File file) throws IOException + { + StringWriter sw = new StringWriter(); + BufferedReader r = null; + + try + { + r = new BufferedReader(new InputStreamReader( + new FileInputStream(file), "ISO-8859-1")); // TODO use which encoding? + + char[] buf = new char[4096]; + int bread; + while ((bread = r.read(buf)) > 0) sw.write(buf, 0, bread); + IDocument doc = new Document(sw.toString()); + new PerlPartitioner(getLog(), doc); + return doc; + } + finally + { + if (r != null) try { r.close(); } catch (IOException e) { } + } + } + + /** + * @return edited source document in the given editor + */ + private IDocument getSourceDocument(PerlEditor editor) + { + return editor.getDocumentProvider().getDocument(editor.getEditorInput()); + } + + /** + * Searches the given editor for a declaration of the given element. + * If found, the declaration is highlighted. + * + * @return an object indicating if the declaration was found + */ + private Result searchEditor(PerlEditor editor, String searchString) + throws CoreException + { + SourceFile sourceFile = editor.getSourceFile(); + sourceFile.parse(); + IRegion match = findDeclaration(sourceFile, searchString); + + if (match != null) + { + editor.getSite().getPage().activate(editor); + editor.selectAndReveal(match.getOffset(), match.getLength()); + return Result.found(); + } + else return Result.notFound(searchString); + } + + /** + * Searches a module file for a declaration of the given element. + * The file is read from disk and might be external to the workspace. + * + * @return an object indicating if the declaration was found + */ + private Result searchExternalFile(File moduleFile, String searchString) + throws CoreException + { + try + { + SourceFile sourceFile = new SourceFile( + getLog(), getSourceDocument(moduleFile)); + sourceFile.parse(); + + IRegion match = findDeclaration(sourceFile, searchString); + return match != null ? Result.found() : Result.notFound(searchString); + } + catch (IOException e) + { + getLog().log(new Status( + IStatus.ERROR, + PerlEditorPlugin.getPluginId(), + IStatus.OK, + "Could not read module file " + moduleFile.getAbsolutePath(), + e)); + return Result.exception(); + } + } + + /** + * @param fromDir directory for resolving relative paths in 'require's + * @param source document in which to look for 'require' statements; + * the search continues recursively in these required files + * @param visitedFiles + * a set of already visited files (used to prevent endless loops) + * @return an object indicating whether the element's declaration was found + * in some file + * @throws IOException + * @throws CoreException + */ + private Result searchInRequires( + String searchString, + File fromDir, + IDocument source, + Set visitedFiles) throws CoreException + { + File[] requiredFiles = findRequiredFiles(fromDir, source); + + for (int i = 0; i < requiredFiles.length; i++) + { + if (!visitedFiles.contains(requiredFiles[i])) + { + visitedFiles.add(requiredFiles[i]); + Result res = searchModuleFile(requiredFiles[i], searchString); + + if (res.isFound()) return res; + else + { + try + { + res = searchInRequires( + searchString, + requiredFiles[i].getParentFile(), + getSourceDocument(requiredFiles[i]), + visitedFiles); + + if (res.isFound()) return res; + } + catch (IOException e) + { + getLog().log(new Status( + IStatus.ERROR, + PerlEditorPlugin.getPluginId(), + IStatus.OK, + "Could not read module file " + requiredFiles[i].getAbsolutePath(), + e)); + return Result.exception(); + } + } + } + } + return Result.notFound(searchString); + } + + /** + * Searches the given module file for a declaration of the given element. + * The search first occurs in already open editors containing that file. + * If the declaration is found, an attempt is made to open it in an editor, + * if not possible, displays a message about the file's location. + * + * @return true if the declaration was found; false otherwise + */ + private Result searchModuleFile(File moduleFile, String searchString) + throws CoreException + { + IPath path = Path.fromOSString(moduleFile.getAbsolutePath()); + IFile fileInWorkspace = getProject().getProject() + .getWorkspace().getRoot().getFileForLocation(path); + + if (fileInWorkspace != null) + return searchModuleFile(moduleFile, fileInWorkspace, searchString); + else + { + Result res = searchExternalFile(moduleFile, searchString); + if (res.isFound()) + { + IFileEditorInput input = FileUtilities.getFileEditorInput(path); + PerlEditor newEditor = (PerlEditor) + getEditor().getSite().getPage().openEditor( + input, + getEditor().getSite().getId()); + + return searchEditor(newEditor, searchString); + } + else return res; + } + } + + /** + * Just like {@link #searchModuleFile(File, String)}, but takes into account + * that the module file to be searched is contained in the workspace. + */ + private Result searchModuleFile( + File moduleFile, + IFile fileInWorkspace, + String searchString) throws CoreException + { + IWorkbenchPage page = getEditor().getSite().getPage(); + IEditorPart editor = page.findEditor(new FileEditorInput(fileInWorkspace)); + + if (editor instanceof PerlEditor) + { + return searchEditor((PerlEditor) editor, searchString); + } + else + { + Result res = searchExternalFile(moduleFile, searchString); + if (!res.isFound()) return res; + + try + { + FileEditorInput input = new FileEditorInput(fileInWorkspace); + PerlEditor newEditor = (PerlEditor) + getEditor().getSite().getPage().openEditor( + input, + getEditor().getSite().getId()); + + return searchEditor(newEditor, searchString); + } + catch (PartInitException e) + { + getLog().log(new Status( + IStatus.ERROR, + PerlEditorPlugin.getPluginId(), + IStatus.OK, + "Problems encountered while opening editor for " + + moduleFile.getAbsolutePath(), + e)); + return Result.exception(); + } + } + } + + /** + * Used to report the result of the open declaration action. + */ + public static class Result + { + /** + * Declaration of the requested element was found successfully. + */ + public static final int FOUND = 0; + + /** + * Declaration of the requested element could not be found + * using the implemented search algorithm. + */ + public static final int NOT_FOUND = 1; + + /** + * The target module in which the search was to be performed + * could not be located. + */ + public static final int MODULE_NOT_FOUND = 2; + + /** + * No search was performed because no string was selected. + */ + public static final int INVALID_SEARCH = 3; + + /** + * An exception occurred and was logged during the search. + */ + public static final int EXCEPTION = 4; + + public final int statusCode; + public final String searchString; + public final String targetModule; + public final File moduleFile; + + private Result( + int statusCode, + String searchString, + String targetModule, + File moduleFile) + { + this.statusCode = statusCode; + this.searchString = searchString; + this.targetModule = targetModule; + this.moduleFile = moduleFile; + } + + public boolean isFound() + { + return statusCode == FOUND; + } + + public static Result exception() + { + return new Result(EXCEPTION, null, null, null); + } + + public static Result found() + { + return new Result(FOUND, null, null, null); + } + + public static Result invalidSearch() + { + return new Result(INVALID_SEARCH, null, null, null); + } + + public static Result moduleNotFound(String targetModule) + { + return new Result(MODULE_NOT_FOUND, null, targetModule, null); + } + + public static Result notFound(String searchString) + { + return new Result(NOT_FOUND, searchString, null, null); + } + } } \ No newline at end of file diff --git a/org.epic.perleditor/src/org/epic/perleditor/actions/ToggleMarkOccurrencesAction.java b/org.epic.perleditor/src/org/epic/perleditor/actions/ToggleMarkOccurrencesAction.java old mode 100755 new mode 100644 diff --git a/org.epic.regexp/.gitignore b/org.epic.regexp/.gitignore new file mode 100644 index 00000000..5e56e040 --- /dev/null +++ b/org.epic.regexp/.gitignore @@ -0,0 +1 @@ +/bin