antelope-3.5.1.orig/0000755000175000017500000000000011131616444014163 5ustar drazzibdrazzibantelope-3.5.1.orig/docs/0000755000175000017500000000000011131616442015111 5ustar drazzibdrazzibantelope-3.5.1.orig/docs/manual/0000755000175000017500000000000011131616442016366 5ustar drazzibdrazzibantelope-3.5.1.orig/docs/manual/target_buttons.gif0000644000175000017500000001022511131616374022125 0ustar drazzibdrazzibGIF89aΜcec10cce 罺ތ9r]`^yA 4V]n٥Yr=&#f{xbc7@N'ȢM㍜5ַ#S%jvMhduыف)`gYByni^&_fO9Adq+u 3^xf#]jsh.Dܟ9(o5ͤy)mV)qj9*yjSi$yꩱ3k$Tk;$&f Jέ+WmL$8.b%܎im 챨*Cڷ[B#W3zn"݋/P/"׊s sg#)V\̢g<w|ŒUq3$8r# ߳RLsH̊ά < !Њ ]KNds#9r蕔lV]tbMmDF%ڞ_XZw3M˭n[mAT6#Ok/9xo5؎-ъJt͑nH,&13.:0|z49;4.|2ƾg |k\Vz/~P;Sٗ+=OV=?ԥ.ԧK6ӂMIb]8h-|#9zEW8pm~,`o3nLjB}Oȋa,z< ! e< vh kLC" 1(=%ЊOV6?bBDmT6ə+~"݈hӈ8+HfLWΨAo,*tF(2BHjEБn#%B]C>FR7&!6e-~|$Z*JŲt,9]?! CQ:'RDK_8}e^p,ʬs^ѢY9qrԁhqaF;tkLΔGӹ*v3:MO# ;k[slҎZ&^`*4, q ѕUڳJSS\*0mqUTTL\񈳾2E{;ٶƯjNK~JB0TiKo:Fdj Bmkvd)nbnhmM{n+27mq[RWBν}E+^z:/zm׺V{㫰Wf/~7u{R w=pM+{~0#,a%g7W\ GL(Nu?u/Rq͒Rg)U<,"K- 1F"CjcuV霬.U[^KE[!JtMr/"P VYZe3mY-1'Nܣs=fGg9֍w|3Ī>3 U /fhֱGMRԨN> VcM.,Z@*vM w׫qHqxMlP4u]fo"Q6RM8Cĸeն pUjF q)x<$?u`f{NI. 0d" GЁ|g pb?<8" c|߇HP@A p`|+gy_ȼon[@+`ZM`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)]nfrrcs;jx 8foB#PxcT\΍22Tw!($g0F  }քTuyU5H..aI}hevI`䒇^A$FfĄh%IdE>#qzV^Q^҂*hhyZ$` g-aK`񈒚䒾pPYI] %.`8Pt\$j @Z> [)Uj1eR"F-eJrif^|JRSbߣ\pZ. *V*fR*%ĝ:jL\F"ntjV Eajwg&ZB HמZi5*e|N"R`2""ifS뺾+ƫ+֫+櫾++,,",k:Æh@yM,V^,fn,v~,ȆȎ,ɖɞ,ʊlOʶ˾,Ƭ,֬,K,--&-2k6>-FN-VZfn-v~-fH-ٖٞ-ڦVخ۾-ƭέȶ--m--n-.&.>.F.6V^.,f.v~n...犮馮..Ʈۺ֮n..悗/./&/h6/>NF/n+^d/VK]Z/Z4dMori2x-ooN;(k/Z>m0/_,wm 7?0jNzTms= W,g / նp 0۰ƮRh10ǒOlk0c,d1"qrȂb?p[,3qqz1q+   Ʀ1qg[C0qKr$kqo$wl !#p)r+23:2ž'O2%%C2hl2''s:R00!*/++ױ-qٱg2/k2W3yp 207/˰&3.s473.w,4W&{2/36dzur8)2883;:%35r'7q(o3s=sŒs1r/W2@5zR3[3Chapter1.Introduction

Chapter1.Introduction

Many of the Antelope tasks are now part of the Ant-Contrib project, http://ant-contrib.sourceforge.net. In this version, 3.5.1, the tasks contained in the Antelope distribution are identical to those in Ant-Contrib other than the package name. The Antelope tasks will continue to be distributed as part of the Antelope distribution, but eventually, the package and code base will reside entirely with Ant-Contrib. Additionally, it is likely that the Ant-Contrib tasks that are not part of Antelope will be included in this distribution as well. The intent is to make Ant-Contrib the central location for additional Ant tasks.

Ant was not designed to be a scripting language. It was meant to replace 'make' and has done an outstanding job in doing so. However, in day to day use in building even small-scale applications, Ant is being used in ways never foreseen by its creators. Complete applications are being build using Ant as the coding language. Build files call other build files, which in turn call other build files. Regardless of the original intent, Ant has become a replacement for batch files, shell scripts, perl scripts, and make files.

Ant is also extensible. The API is nicely defined to allow any number of new tasks to be added, and each new release of Ant includes new and useful tasks. The tasks described here help developers to create more robust build files, and to assist in structuring build files more like a programming or scripting language than is possible with the standard issue tasks.

Several of the tasks described in this manual are based on Java language counterparts:

The Assert task is modeled after the Java assertkeyword.

The If task is modeled after the Java if/else construct.

The Try task is modeled after the Java try/catch construct.

The Variable task is modeled after Java variable declaration and assignment.

These tasks have become indispensible for me in daily use. I think you will find that your Ant build files are more robust and better structured through the use of these tasks. I've tried to incorporate real-world examples, in fact, many come from the unit tests for the tasks. If you have a source code distribution, you can look at the unit tests for more examples.

antelope-3.5.1.orig/docs/manual/jedit.gif0000644000175000017500000014760611131616374020176 0ustar drazzibdrazzibGIF89aJBFBRb "bz*r6r2rM]JJJrJbzΆ2z*.*zBBB2"""2RRrZ^Z掲bfzzz:ZBRzJ  ¾*F־NbƶBRrvr22">zΦj> jnjjBbΆƎZ~22bbj*NrƮ֜:::Jfbbb`jjJOJrb~RnZvޮ.jBZ:R&j":z">JjRVR溰"&"2Jήޖ*Bbfb262Rv*Jb^r2rᾺbJnjjjzJjƦr:>jBf澾222:zƖRrr***jjB^ZZZb6z:V.rzƞrrs:^Zz"Bz Z~ *j*j.r"BRQRB^ƾަ*Jrz~z2N:VjrZ2VjzbzƖƾJf~:>:bzbjbۮZz &jrŎƺZb薎Ξ𞞶j,JH*\ȰÇ#JHŋ3jȱǏ CI$R\ɲ˗0cʜI͛8sɳϟ@ JѣH*]InJJիXjʵׯ`ÊKٳhӪ]˶۷pʝin%˷߿ LNQ ,ǍLye7'cvSlsX1ӨO;fjF`3{6#dЭ@Fo| ȋ{|烀ElǠwXΝ{$CjU󃾚CTOa?(`2R! /ThaL0Lt!L|R"9(H%+xɋ0X%3I7X$> $QdiFIzŤWR`)')'xN`c@>#kP4h믋,B ŲBԺ@1\KDDt-+k Ơ``/a,al' 7#,]x1<+ҏ!05vd31"|r1r䒆i9%[:93H#vԸA)G:NJiF7U"MȳПlVfopK~?h"(,Ҩ~FJ餙ҿiWT8v Ѐ`%Tꁰr%leWԊz_*X Vf5P@ ]t֊-"B\DtCrIA? h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(,A>{AB AK0C? ,CCSd84>8Ct=̹C>L@#)@#;8B B͓.A.= d1M A $AOO{T=+E.Ê[>s>E!4SªkPDJ`\Eġk@Of$TXiƙc5t? QFT$mC4d`U|7F;FD3(ȁ;jȉ9fHE$lHmGp$GJÜEkE?3>$\BgĂt/DH,4:#'\ĞHiȡ$JYIȌĥHDJ*qCGcëG {ĮK~Ti'GʐdHL<|H=oDJ,ʻKyʈ|mdEKۓ5̽4,9¼#̞[?tÁH;-̼|:4x͗+͌,;{LLy̭+B˼ILChapter5.Running Antelope

Chapter5.Running Antelope

Option Settings

Either way, Antelope is operated almost identically. To set up Antelope, click on the "Options" button. This will display the following:

Figure5.1.Options Panel

Options Panel


When running Antelope as a stand-alone application, the options "Save all files before running targets" and "Use error parsing" are not available. This is the only difference between the stand-alone and the plugin.

The available options on the "General" tab are:

  • Save all files before running targets This is only available when running as a jEdit plugin. If checked, all files that are currently open for editing in jEdit will be saved before running the selected target. The default setting is checked, that is, do save all files before executing the target.

  • Use error parsing This is only available when running as a jEdit plugin. If checked, output from the target will be passes through the Console plugin error parser and errors will be displayed in the ErrorList plugin. This is useful for tasks such as javac that produce standard error messages. Other tasks may not produce output suitable for error parsing, in which case, the output might be cleaner if this options is turned off. The default setting is checked, that is, do use error parsing.

  • Show performance statistics If checked, Antelope will keep track of the amount of time that each target and task takes to execute. At the end of the build, these times will be sorted from fastest to slowest and displayed following the build output. This can be useful to pinpoint slow and/or inefficient spots in the build process and identify those areas that could benefit from optimization. The default setting is unchecked, that is, do not show performance statistics.

  • Automatically reload build file If checked, Antelope will automatically reload the build file before running a target. That means that all properties will be reset to their original values or reloaded from property files as necessary. Keep in mind that properties set via the "Properties" button and dialog are not applied until the build file is reloaded. The default setting is checked, that is, do automatically reload the build file prior to each build. On the other hand, if there are properties that are loaded via a <property file="filename.props"/> or <loadproperties srcfile="filename"/>, Antelope will watch those files and reload the build file automatically if they change. Changes to such files cause a reload regardless of this setting.

The available options on the "Targets" tab are:

  • Show subtargets There are several common conventions for designating "primary" targets and "subtargets", also referred to as "public" and "private" targets. Primary (or public) targets are those that are invoked directly, while subtargets (or private targets) are generally "helper" targets that are invoked from other targets. Antelope supports three of the most common conventions:

    • One method of distinguishing between primary and subtargets is only giving descriptions to primary targets. Unchecking the "Show targets without descriptions" will cause Antelope to display buttons only for targets that have a description.

    • Another common method to designate subtargets is to use "dot" notation, for example, a "clean" target may have two helper targets, "clean.docs" and "clean.api.docs". Unchecking the "Show targets with dots" will cause Antelope to display a button for the "clean" target but not the "clean.docs" nor the "clean.api.docs" targets.

    • The third method of designating subtargets is to start the names of these targets with a dash, for example, "-clean.docs" and "-clean.api.docs". Unchecking the "Show targets with dash" will cause Antelope to display a button for each such target.

    By default, none of these options are selected. Antelope displays all private targets in italics.

  • Sort target buttons By default, the target buttons are sorted alphabetically by target name. Unchecking this box will cause the target buttons to be displayed in the order that they appear in the build file.

The available options on the "Messages" tab are:

  • Set message level There are five message levels available and are in order of verbosity, "Error" being the least verbose and "Debug" being the most. For general use, "Information" is about right and is the default setting.

The available options on the "General" tab are:

  • Show message events Ant produces messages on various events as it runs a target. Generally, all Ant messages are useful, but these can be adjusted as necessary. Turning off 'Target events' and 'Task events' will generally show all the important information without too much excess output. The default is that 'Build events' and 'Log events' are checked.

The available options on the "Appearance" tab are:

  • Show button text This will turn on or off the display of the text on the control buttons.

  • Show button icon This will turn on or off the display of the icon on the control buttons.

All option settings are stored per build file (except for the Appearance settings), which means that when you close one file and open another, the option settings for the new file will be retrieved and automatically set.

antelope-3.5.1.orig/docs/manual/standalone.gif0000644000175000017500000006343311131616374021222 0ustar drazzibdrazzibGIF89a%$k c$k(k(k(s,s,k,s0s010sΚec kΚcceΜ10cecec4s4{!8{8{8s!<{!<0{!4{)A!A)~Ʌ~:گ(a0ţT%E@JeJSD%6 U2&+VhPít]WlCBY'\ 9AҊᵮ:pK6erxbȮ>^F4/}_EE,a`Ŋ9b`X2c#+Qp|̢R5 gK^ӳZb9H5 pc*#J&k\6 nFy6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)Hɂ+7uَiy[ّDa)w3L eS jIZ8l)pr95lIkYCnpKȖ؎BACɘ٘ cI)v7'WUi}LYP5 hT0a]ɕYy^ɛEi)yl\ʉٙIιmɄpI~i(Sٝm9ٙIչ99yx—xA ) M)yɜx I 艡9!ٚ*-RIz1ڛI2J;ʣYQjNJ&Ij&"ڞ#JZ㉤'yQ ɟeJg=ʦmjZڄҥMniPڧR:.Zٝyy"ʥ#J6)Z7Z3j*njIskuWڥZL*jw: ZESyf髼>JY*{ښ͚Yڤ ڠZʝZZ$ڨ<7=8骮JY睊J飡ʬz)9iԉ*Y ZJyTɮK[ ˣBIhyYt CX)+ۊ`/ 1+3Kw0"Kt:)M(CKEkGI#;v>;PKU ؔVKhR;Z_XcK֨65ik˶mi˔&u|hy{˷} +Kk˸븏 +KkĹ +Kk˺+Kkd˻뻿 +KkNjɫ˼ +˼`׋٫˽ +Kk狾髾˾ +Kk[;antelope-3.5.1.orig/docs/manual/bk03ch20.html0000644000175000017500000001234411131616434020475 0ustar drazzibdrazzibChapter20.AntCallBack

Chapter20.AntCallBack

AntCallBack is identical to the standard 'antcall' task, except that it allows properties set in the called target to be available in the calling target.

To use this task in your build files, include a task definition like this:


    <taskdef name="antcallback" classname="ise.antelope.tasks.AntCallBack"/>
   

Some background may be in order: When the <antcall> task is used, in actuality, a new Ant project is created, and depending on the inheritAll property, it is populated with properties from the original project. Then the requested target in this new project is executed. Any properties set in the new project remain with that project, they do not get "passed back" to the original project. So, for example, if the target in the new project sets a property named "image.directory", there is no reference to that property in the original. Here's an example of what I mean:


    <target name="testCallback" description="Test CallBack">
        <taskdef name="antcallback" classname="ise.antelope.tasks.AntCallBack" classpath="${antelope.home}/build" />
        <antcallback target="-testcb" return="a, b"/>
        <echo>a = ${a}</echo>
        <echo>b = ${b}</echo>
    </target>

    <target name="-testcb">
        <property name="a" value="A"/>
        <property name="b" value="B"/>
    </target>

The output from executing "testCallback" looks like this:

a = A
b = B

Contrast with this output from "antcall":

a = ${a}
b = ${b}

This is an often requested feature for Ant, at least judging from the Ant mailing lists. I assume this is because it allows a more functional programming style than Ant natively supports. The proper Ant way of doing the above is like this:


    <target name="testCallback" description="Test CallBack" depends="-testcb">
        <echo>a = ${a}</echo>
        <echo>b = ${b}</echo>
    </target>

    <target name="-testcb">
        <property name="a" value="A"/>
        <property name="b" value="B"/>
    </target>

This is actually looks cleaner in this situation, and is faster, too. There is significant overhead in using both "antcall" and "antcallback" in that they both require a lot of object instantiation and property copying. That said, many people prefer to use "antcall" and "antcallback" as it better fits their logic and style.

The attributes for AntCallBack are identical to the 'antcall' task, with one additional, optional attibute. This attribute is named "return" and can be either a single property name or a comma separated list of property names.

Table20.1.AntCallBack Attributes

AttributeDescriptionDefaultRequired
returnA comma separated list of property names. Whitespace is allowed, so either "a,b" or "a, b" are acceptable.NoneNo


For other attribute and nested element information and more examples, see the documentation for the "antcall" task in the Ant documentation.

antelope-3.5.1.orig/docs/manual/dependency_tree.gif0000644000175000017500000001522011131616374022216 0ustar drazzibdrazzibGIF89a++{}{{{01ΚecΚcceΜ10cececƾBAB! ?,++@@`H,Ȥrl:ШtJZX@zxL.zn ~fu]    ! " #"#$"$#$$%$&%&&(%((()*)X0 W(\Ȃኆ_D00jc C9 D$e%J0INFU mEp)ͅׯ_+V ٲ̖=&͚k#f K68pNP[s%ŝK{-P믟 lpaGȢŌ1v,F #3,iJ+-zDKKjj'STmY6KjTƪfm ۴5<-Ik:=w 6WQdPf|< P:jh$ %ȴ'9Rk=bPTmBKnL.O UU%U8X`%7rgSZ@gtUO]OwBb 5D1֘FEFYG}Y @g'@"~9BQMr`k])FTEv!-/2X\4r܀M吓S<8c_A%Pa!XGIU^ZLM23dM$hJ>A mĺK+ޢAh0PMʈH%^ʑ-shָ8a#_<~i :CwQCeE| d" ,@()҅#YH Mkp6!Qfg-]`,oVmrbs(;ݘc^_)y+'*Af{o L|wj 8 TAD},.%ET_iUaE艆"JX67:N[ln=[W؏.$/bG*&C-/OV&V_me p< @E#%L#&mv,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hq W;zנ  !y!| x}{:twD^;G 븃  *:J~Źɟhzx{4y[踬٬T(z۩ Jl ׶ p;˼ *Jhh)*ˋ|9KgzuW,Ȼ0!|)h斢6چۮ:0*J  | r/\ Dn4\Aқm;鴬6B1ëkT2nu[ +S-r09'8B/ؚ&ײ+a{k}պ`Č wxluJL̄KƑ'''?|PlێKn,v8gkzF|+;{۳ڿțFۦɳ =)VUvA̯xoPH@ڬ*R@:ެD̬ Oj|W4jΐ,x&K{QKl{BAn,Nhxh\>BL4:xXfUVk_tnjP8wpA{yGD8焞wn軇ny>@>蘞{颞n~ADg>oF.W렮ľnƮȞΎ^ӎmN~ٖ|~m}6..^>l>.>^~nnkkm 5.OoS/N o!+%)/n/Q?[.C9oFKA3/EoCX^Xa`_SUg?]Rrop_Ypikq/r7X1HP^m녿"G-/IOLpygFvG t폏yOP_zjjn~ȟʿThkj]?_Xt͏ylm^@ET.D fNUb/v P%=Cu=zoP00qI2km+L Mͫ1THBt4uUUv66J88Rʳr2-Sx PqzZZۚڛQX|yY R9=*w>_w__?~3H:y`riBy}f[5bرH#%T8a4i@9f;$SIt(|G$z~)HN*kCxQ+ڎsyV'NiѮ'2k\+&}-b0Jj`Y{މ`.Zm'춲[9[1^W61}ujիY6su/= ykݻymvlb[ ˙7wztөW~{v۹w|u&0}zٷw~|׷~e)@S\'8 % Ł< 5ܐC 1E  LT삿+E[@$Ǹn3ȟ~,0"TIl2+&O J') KI ._̃,s1TM-l$2xi,؄7FN+$3= @+:R4Ct,CIa:aTӡTA-QKt"OQ5O;`J51T;UF]u4RZנD])\WmU8-e$d=W(fuVK:w}Q^{͖f ;GvYucsWRvNlWzwO|iW.7VYM #ņCxYMb-5&T=E0MfU2\~emuޙ}蠅>餕^馝 ꪭ묵ޚ뮽>^~垛ޛ ;antelope-3.5.1.orig/docs/manual/bk01ch03.html0000644000175000017500000000506411131616434020475 0ustar drazzibdrazzibChapter3.Installation

Chapter3.Installation

Install Ant

Antelope assumes you already have Ant installed. If you don't, you can get it from http://ant.apache.org. You need to have Ant installed before Antelope will run.

antelope-3.5.1.orig/docs/manual/Target16.gif0000644000175000017500000000160411131616374020457 0ustar drazzibdrazzibGIF89af3̙f3f3ffffff3f3333f333f3f3̙f3̙̙̙̙f̙3̙ffffff3f3333f333f3̙f3̙̙f3̙f3ff̙ffff3f33̙33f333̙f3ffffff3ffff̙fff3fffffff3ffffffffffff3fff3f3f3f3ff33f3ffffff3f3333f333333̙3f3333333f3333f3f3f3ff3f33f33333333f333333333f333f3̙f3f3ffffff3f3333f333f3! ,a H A+)T #^[qp,t() TŽ 24q5+%%KJq`H+X(N#Q1>4 ;antelope-3.5.1.orig/docs/manual/bk02ch06.html0000644000175000017500000000506711131616416020504 0ustar drazzibdrazzibChapter6.Targets

Chapter6.Targets

Like property names, target names should be short and meaningful. A target name should descript the overall intent of the target function. Target names should start with a verb, in mixed case with the first letter lowercase and with the first letter of each internal word capitalized.

Examples:

  • initialize

  • notifyOnFailed

  • runTests

All targets that are likely to be called directly, that is, from the Ant command line, should have the description attribute filled in. This description will be included in the output of the ant -projecthelp command.

Targets that should not be called directly from the command line should start with a hyphen, for example,

-cleanDocDir

antelope-3.5.1.orig/docs/manual/bk02ch02.html0000644000175000017500000000563211131616416020476 0ustar drazzibdrazzibChapter2.File Names

Chapter2.File Names

The default Ant build file is named "build.xml". Any build system beyond the most basic will have multiple build files for various modules of the application. Having them all named "build.xml" quickly leads to confusion of which does what.

Build file names should indicate the main purpose of the file, and should be in the Java style of mixed upper and lower case letters, with the first letter always capitalized. Words should be spelled out rather than abbreviated, unless the abbreviation is the more common reference. Using the main target name works well.

Examples:

  • MasterBuild.xml

  • CreateApplicationJar.xml

  • CreateInstaller.xml

Build files may load properties from a properties file. These property files should be named the same as the build file name, but with a ".properties" extension.

Examples:

  • MasterBuild.properties

  • CreateApplicationJar.properties

  • CreateInstaller.properties

antelope-3.5.1.orig/docs/manual/options.gif0000644000175000017500000001401111131616374020551 0ustar drazzibdrazzibGIF89a ]Ls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XͪVծz` kV=TRTHZ׊e5+TֺU hTjVEB^9W6կMl`6UdX:Gd7Kff9K'x mPG[*ᴅ5:[ru-[SVu}@p:\7խZyٷ=nt5]6nm]rwӕnM0W=/o͋^=o| 6WWx;[ w:%/!0m ׷Sm~9*vC,^#wEo1b GX,0^Xx1 b<ީ _[H62}{U/xySy5Z9 E1d 9gmK6_ ֲٌ[ؽJN2>Ɩqxc8W9}3,/Yc=CݰjN'a͛洧GMPN5L}̪Ԭnh_=Xzo <ed uЎJc;V]kZۮݵ pwZq{& lݦy{-eFu˅';&##t\p78p9e*R|-er|,x5咷;o'Ɨt;]OʛNC]y{>g+9rZ_=VG٩GܵcI:׮w971sEoSm#r;?xcxW)/Ǻњ).ۣ4OQ_zݛ~~xR[g=~{'5~|T/B?Rg~HU'/Gi|m7xV׀' HgǧǁwEX'Xf{\W/(vGhWtx6Ȃ"?/A7'\\`U`6]R{@8EDx?h\Wph6{jV]^B2Xg{Cx#T._(rGQhdDՇq1HtdVF]yHqo(hHg5q6|X^؆8HX假H| ~i芺Hj[(pŘ~o؂ V}xoh}~hUbH"luXUX75&nŎVЇ妏Ǐ('YxU$\FgWr}o׍ᵉuFבSڶk"W{Nhz<z5B膤Ȇx{ t؊sXFx>DAhsLjؒXh)?ٔD Mr7rNŁP=)O94I&ƉI)W\)PٕOY"Xfvhgœln sHgi]_+9v(ȗ`Y kfɐ"lokoIkIojnjnh~ɐy9ӆِuxj9n kiYk ǩkɩ9ϩ\mIȃep&[Yn+ᩐ︄*ŝQX}^3|2~&E萮Sn.R^]6f,R>~^ViN/%nR֭%_׶F^8]L|NRWm֨%50U@nYmb覮>sN )5^vu¼ͬnrގol ^ n!/ ^0Kl.oE#,9'?(?R8:OChapter7.Tasks

Chapter7.Tasks

Avoid use of the "exec" task if possible as this reduces portability.

This is bad as it assumes that the 'tar' utility is installed on the current path:


    <exec executable="tar" dir="${java.tmp.dir}/libraries">
        <arg line="-xzf ${build_dir}/${libraries_tar}"/>
    </exec>

This is good:


    <untar src="${build_dir}/${libraries_tar}" compression="gzip"
        dest="${java.tmp.dir}/libraries"/>

antelope-3.5.1.orig/docs/manual/bk01ch06.html0000644000175000017500000000714011131616434020475 0ustar drazzibdrazzibChapter6.Running Ant Targets

Chapter6.Running Ant Targets

Ant targets are ran by simply clicking the associated button. The button for a running target will show red text. As the target executes, progress will be displayed on the progress bar below the button panel and output will be displayed either on the "Output" tab (in stand-alone mode) or in the Console window (in jEdit). The progress bar will be colored green as each task executes and succeeds, the bar will turn red on a build failure.

Long running targets can be stopped by clicking any of the target buttons. If Antelope is being ran as a jEdit plugin, execution can also be stopped by clicking the "Stop" button on the Console plugin. Depending on what the particular target is set to do, you may need to click the button several times to get execution to stop. An example is the <java> task with the "fork" attribute set to true. Ant starts a separate thread for the java task, so two clicks will be necessary, one to stop the jvm thread and one to stop the Ant thread.

Multiple targets can be selected to run one right after another by selecting the "Multiple targets" checkbox. When this checkbox is checked, the target buttons become checkboxes. Check the targets in the order that you want them to execute. The sequence of execution is displayed along side the target name. In the image below, the "docs-xalan" target will run first, followed by the "dist" target. Once you have selected some targets to run, start them by clicking the "Execute" button. The currently running target will be displayed in the progress bar. Once execution has started, it can be stopped by clicking the "Execute" button a second time. Again, depending on what the particular target is set to do, you may need to click it several times to get execution to stop.

antelope-3.5.1.orig/docs/manual/bk01ch01.html0000644000175000017500000001440211131616434020467 0ustar drazzibdrazzibChapter1.Legalities

Chapter1.Legalities

Per the Apache license (see below):

"This product includes software developed by the Apache Software Foundation (http://www.apache.org/)."

Antelope is licensed under the same Apache license as Ant:

    
The Apache Software License, Version 1.1

Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in
   the documentation and/or other materials provided with the
   distribution.

3. The end-user documentation included with the redistribution, if
   any, must include the following acknowlegement:
      "This product includes software developed by the
       Apache Software Foundation (http://www.apache.org/)."
   Alternately, this acknowlegement may appear in the software itself,
   if and wherever such third-party acknowlegements normally appear.

4. The names "The Jakarta Project", "Ant", and "Apache Software
   Foundation" must not be used to endorse or promote products derived
   from this software without prior written permission. For written
   permission, please contact apache@apache.org.

5. Products derived from this software may not be called "Apache"
   nor may "Apache" appear in their names without prior written
   permission of the Apache Group.

THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
====================================================================

This software consists of voluntary contributions made by many
individuals on behalf of the Apache Software Foundation.  For more
information on the Apache Software Foundation, please see
<http://www.apache.org/>.
    
    

Some of the icons used in Antelope are from Sun's Java Look and Feel Graphics Repository. The following license pertains to those icons:

    
Copyright 2000 by Sun Microsystems, Inc. All
Rights Reserved.

Sun grants you ("Licensee") a non-exclusive,
royalty free, license to use, and redistribute
this software graphics artwork, as individual
graphics or as a collection, as part of software
code or programs that you develop, provided that
i) this copyright notice and license accompany
the software graphics artwork; and ii) you do not
utilize the software graphics artwork in a manner
which is disparaging to Sun. Unless enforcement
is prohibited by applicable law, you may not
modify the graphics, and must use them true to
color and unmodified in every way.

This software graphics artwork is provided "AS
IS," without a warranty of any kind. ALL EXPRESS
OR IMPLIED CONDITIONS, REPRESENTATIONS AND
WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND
ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES
SUFFERED BY LICENSEE AS A RESULT OF USING,
MODIFYING OR DISTRIBUTING THE SOFTWARE GRAPHICS
ARTWORK.

IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED
AND REGARDLESS OF THE THEORY OF LIABILITY,
ARISING OUT OF THE USE OF OR INABILITY TO USE
SOFTWARE GRAPHICS ARTWORK, EVEN IF SUN HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

If any of the above provisions are held to be in
violation of applicable law, void, or
unenforceable in any jurisdiction, then such
provisions are waived to the extent necessary for
this Disclaimer to be otherwise enforceable in
such jurisdiction.
    
    

antelope-3.5.1.orig/docs/manual/bk01ch10.html0000644000175000017500000001307311131616434020472 0ustar drazzibdrazzibChapter10.AntLogger

Chapter10.AntLogger

One of the classes distributed with Antelope is AntLogger, which is useful outside of Antelope. This is a special Ant logger and can be attached to Ant as the default logger on the command line. All Ant log messages are sent to a java.util.logging.Logger, so any number of handlers can be associated for controlling output. Make sure ise.antelope.AntLogger is in the classpath, then run Ant:

ant -logger ise.antelope.AntLogger [other standard Ant options]

Properties

Properties can be set either on the command line or in the build file. All are optional. These properties are read and set at the start of each call to buildStarted

Table10.1.AntLogger Properties

PropertyDescriptionDefault
antlogger.echoIf set to true, output from this logger will be echoed to the original System.out and System.err print streams.false
antlogger.namespaceThe namespace for the logger. See the java.util.logging.Logger API documentation for a discussion of logger namespaces. This should be a dot separated name and should normally be based on the package name or class name of the subsystem, such as org.apache.tools.ant.ise.antelope.Antelope
antlogger.fileIf used, will add a java.util.logging.FileHandler to the current logger. See the java.util.logging.FileHandler API for a discussion of the value pattern. Basically, this is the name of a file, but other things can be done.none
antlogger.file.appendIf set to true and antlogger.file is being used, then output will be appended to an existing file. If false, any existing file will be overwritten.false


Examples:


<property name="antlogger.echo" value="true"/>

- or -

ant -logger ise.antelope.AntLogger -Dantlogger.echo=true [other options]


<property name="antlogger.namespace" value="com.mycompany.package"/>

- or -

ant -logger ise.antelope.AntLogger -Dantlogger.namespace=com.mycompany.package [other options]


<property name="antlogger.file" value="/tmp/output.log"/><br>
<property name="antlogger.file.append" value="true"/><br>

- or -

ant -logger ise.antelope.AntLogger -Dantlogger.file=/tmp/output.log -Dantlogger.file.append=true [other options]

Output

Messages for certain build events are sent at a particular log Level. See java.util.logging.Level for a discussion of the various levels. AntLogger associates build events with log Levels as follows:

Table10.2.AntLogger Error Levels

Level.ERRORBuild failed
Level.WARNINGBuild succeeded
Level.CONFIGBuild started, task started/ended, target started/ended
Level.INFOAll other messages


antelope-3.5.1.orig/docs/manual/bk02ch09.html0000644000175000017500000001040311131616416020475 0ustar drazzibdrazzibChapter9.Example Build File

Chapter9.Example Build File

The following example build file follows these guidelines. This build file would be stored on disk as "MyProject.xml".



<project name="MyProject" default="dist" basedir=".">
    <description>
        simple example build file
    </description>
    
    <!-- set global properties for this build -->
    
    <!-- where the source files are -->
    <property name="src" location="src"/>
    
    <!-- where the compiled classes go -->
    <property name="build" location="build"/>
    
    <!-- where to place the finished jar file -->
    <property name="dist"  location="dist"/>

    <!-- ========== Dist Target ===================================
        The dist target compiles all the source code and creates
        a jar file for distribution.
    -->
    <target name="dist" depends="clean, compile"
        description="generate the distribution" >
        <!-- Create the distribution directory -->
        <mkdir dir="${dist}/lib"/>

        <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar
            file -->
        <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar"
            basedir="${build}"/>
    </target>

    <!-- ========== Init Target ====================================
        This target initializes the build by creating a time stamp
        for use in the jar file name and creating the directory
        to hold the compiled classes.
    -->
    <target name="-init">
        <!-- Create the time stamp -->
        <tstamp/>
      
        <!-- Create the build directory structure used by compile -->
        <mkdir dir="${build}"/>
    </target>

    <!-- ========== Compile Target =================================
        The compile target compiles all files in the source directory
        into the build directory.
    -->
    <target name="compile" depends="-init" 
        description="compile the source " >
        
        <!-- Compile the java code from ${src} into ${build} -->
        <javac srcdir="${src}" destdir="${build}"/>
        
    </target>

    <!-- ========== Clean Target ====================================
        The clean target deletes all files from the build directory
        and the dist directory. 
    -->
    <target name="clean" description="clean up" >
        <!-- Delete the ${build} and ${dist} directory trees -->
        <delete dir="${build}"/>
        <delete dir="${dist}"/>
    </target>
</project>


antelope-3.5.1.orig/docs/manual/bk03ch08.html0000644000175000017500000000705511131616434020506 0ustar drazzibdrazzibChapter8.Unset Task

Chapter8.Unset Task

The Unset task provides easier access to one of the most used use cases of Variable, the ability to unset a property. By design, Ant properties are immutable, but sometimes it is handy to set a property to a new value.

To use this task in your build files, include a task definition like this:


    <taskdef name="unset" classname="ise.antelope.tasks.Unset"/>
   

Table8.1.Unset Task Attributes

AttributeDescriptionDefaultRequired
nameThe name of the property to unset.NoneYes, unless 'file' is used.
fileThe name of a property file. All properties references in the file will be unset. This means you can load a bunch of properties from a file, then unset them all with a single line.NoneYes, unless 'name' is used.


Example:


<project name="unset_example" basedir=".">
    <taskdef resource="ise/antelope/tasks/antlib.xml"/>
    <property name="x" value="6"/>
    <echo>original value = ${x}</echo>
    <unset name="x"/>
    <echo>unset: ${x}</echo>
    <property name="x" value="hello"/>
    <echo>new value = ${x}</echo>
</project>

$ ant -f unset_example.xml
Buildfile: unset_example.xml
     [echo] original value = 6
     [echo] unset: ${x}
     [echo] new value = hello

BUILD SUCCESSFUL
Total time: 0 seconds

antelope-3.5.1.orig/docs/manual/bk03ch16.html0000644000175000017500000001161211131616434020477 0ustar drazzibdrazzibChapter16.Hostname

Chapter16.Hostname

This task shows the hostname or IP address of the local machine.

To use this task in your build files, include a task definition like this:


    <taskdef name="hostname" classname="ise.antelope.tasks.HostnameTask"/>
   

Table16.1.Hostname Task Attributes

AttributeDescriptionDefaultRequired
propertyName of the property to store the hostname or IPhostnameNo
showipIf true, get the IP address of the local machine.falseNo
nicThe specific name of an interface to get the hostname or IP address of.NoneNo
showallGet all names or IP addresses for all network interfaces on the local machine.falseNo
failonerrorShould the build fail if this task fails?falseNo


Examples:


   <description>
      Unit tests for hostname task, not really good as hostname is machine
      dependent, so writing a portable test is hard.
   </description>

   <target name="test1">
      <a:unset name="hostname"/>
      <a:hostname/>
      <echo>hostname: ${hostname}</echo>
      <a:assert name="hostname" exists="true" message="test 1 failed."/>
   </target>

   <target name="test2">
      <a:unset name="localhost"/>
      <a:hostname property="localhost"/>
      <echo>localhost: ${localhost}</echo>
      <a:assert name="localhost" exists="true" message="test 2 failed."/>
   </target>

   <target name="test3">
      <a:unset name="localhost"/>
      <a:hostname property="localhost" showall="yes"/>
      <echo>all interfaces: ${localhost}</echo>
      <a:assert name="localhost" exists="true" message="test 3 failed."/>
   </target>

   <target name="test4">
      <a:unset name="localhost"/>
      <a:hostname property="localhost" showall="yes" showip="yes"/>
      <echo>all interfaces by IP: ${localhost}</echo>
      <a:assert name="localhost" exists="true" message="test 4 failed."/>
   </target>

   <target name="test5">
      <a:unset name="localhost"/>
      <a:hostname property="localhost" nic="lo" showip="yes"/>
      <echo>nic lo: ${localhost}</echo>
      <a:assert name="localhost" value="lo:127.0.0.1" message="test 5 failed."/>
   </target>

Output:

test1:
     [echo] hostname: blackdog

test2:
     [echo] localhost: blackdog

test3:
     [echo] all interfaces: lo:127.0.0.1, eth0:, eth1:blackdog.somewhere.com, eth2:blackdog.wireless.somewhere.com

test4:
     [echo] all interfaces by IP: lo:127.0.0.1, eth0:, eth1:192.168.1.3, eth2:192.168.44.12

test5:
     [echo] nic lo: lo:127.0.0.1

antelope-3.5.1.orig/docs/manual/bk01ch07.html0000644000175000017500000001035311131616434020476 0ustar drazzibdrazzibChapter7.Displaying Ant Properties

Chapter7.Displaying Ant Properties

The "Properties" button displays the current properties and references known to Ant from the current build file and the system environment. This is handy for determining exactly what Ant thinks a specific property value is. "Properties" and "References" are for viewing only, not for editing. The "Properties" shows all properties known to the Ant project: system properties, user properties, and global properties set in the build file. The "References" tab shows all global references known to the Ant project.

Note that in some cases, not all properties can be shown. Some properties may be set "on the fly" during the build, others may be read from properties files. When trying to debug a build file, it may be useful to use the "trace" mode, which attempts to load all properties as they are encountered without actually executing any tasks.

Figure7.1.Displaying Ant Properties

Displaying Ant Properties


The "User" tab is for setting user properties. These are properties that would normally be passed to Ant on the command line. These properties are persistent for the build file, so each time the build file is opened, the user properties will be restored. To enter a new property, click the "New" button to create a blank row in the table. Be sure to "enter" the name and value, that is press the 'Tab' or 'Enter' key or click out of the cell to make sure the name and/or value are stored. To remove a property, empty the corresponding value.

Figure7.2.Displaying User-Defined Properties

Displaying User-Defined Properties


The "Description" tab shows some information about the build file project. The version of Ant that is in use, a list of targets in the build file, and other useful information is shown.

Figure7.3.Displaying Project Description

Displaying Project Description


antelope-3.5.1.orig/docs/manual/tracemode.gif0000644000175000017500000004644511131616374021041 0ustar drazzibdrazzibGIF89a$k k$k(k(s(k,s,k,s0s c01Κec0sΚcceΜ10cecec0{4s4{!4{!8{8{!<{!<)A8s!A)9l߯?99P`> =0?LD? ÅDdEH#A&xG aI2*IܸDL(;($L<EBO( ENFQTQ`9EQPŖTT&SiESXAřVfWXqƹwWp'|*]pQ]EhF i`PJ)`1v:Ƨ1c1j!묲FچᆯprQlp;tt@+-uauqupmwԁqǸ{yznGa/ /0  b"„,,!@, PlqŅdH/RNj\#$l(+ $@y@w5P_u X`VadD?f D`Ya4h6fuk#6'l= _n$]6o(GBǵMŝttSG a /P^zሿ6 ~9TnH/^VQD!b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003115311131616434020477 0ustar drazzibdrazzibChapter5.If Task

Chapter5.If Task

Table of Contents

If

The If task provides a greatly improved "if" capability to Ant projects. This task works in a manner very similar to the Java if keyword. This is useful for performing certain tasks only if a property has a specific value or certain conditions are met.

This task can hold other tasks including the If task. In particular, it can also have a single "else", which gives Ant a Java-like if/else construct, and a single "bool", which can be used for the "if" boolean expression.

To use this task in your build files, include a task definition like this:


    <taskdef name="if" classname="ise.antelope.tasks.IfTask"/>
   

An If task may contain only one 'bool' and one 'else' and may contain a 'break'. The 'bool' element is identical to the ConditionTask, but unlike the ConditionTask, is actually a Task. The 'bool' element can contain all the conditions permitted by the ConditionTask, plus the IsPropertyTrue, IsPropertyFalse, StartsWith, EndsWith, IsGreaterThan, IsLessThan and conditions.

Here is a general outline of the If task:


<if>
    <bool>
        <some condition(s)/>
    </bool>

    some tasks...

    <!-- a break is allowed
    <break/>
    -->

    <else>
        some other tasks...

        <!-- a break is allowed
        <break/>
        -->
    </else>
</if>

Table5.1.If Task Attributes

AttributeDescriptionDefaultRequired
nameThe name of the property to test for.noneYes, unless nested bool is used.
existsTest for existence or non-existence of the property.TrueNo
valueThe value to test for, implies 'exists=true'. If the value for the property in the project is the same as this value, embedded tasks will be executed.noneNo


The If task can hold any number of Ant tasks. If the property value is correct or the "bool" element evaluates to true, these tasks will be executed.

In addition, the If task supports three special nested elements:

  • bool This is very similar to the standard Ant Condition task. All conditions supported by the Condition task are supported by the bool element. This is an optional element and if used, is used to decide if the "if" tasks or the "else" tasks should be executed. If the bool element is not used, then the "name" attribute must be used.

  • else This is very similar to the standard Ant Sequential task. The "else" can hold any number of Ant tasks. These tasks are executed if the "bool" element evaluates to false.

  • break This is very similar to the Java "break" keyword. This is only useful if the If task is nested in another task that understands "break", such as the Switch task. Like the Java "break", when this element is encountered, no subsequent tasks will be executed and control passes outside the If.

In the following example, the antcall task will execute only if the project has a property named test with a value of true.

   
   <if name="test" value="true">
      <antcall target="doUnitTests"/>
   </if>
   

In the next example, the antcall task will execute only if the project has a property named test. In this example, it does not matter what value is assigned to the test property.

    
   <if name="test">
      <antcall target="doUnitTests"/>
   </if>
   

Of course, the same thing could have been done as follows, but the "if" is generally much cleaner.

   
   <antcall target="doUnitTests"/>
   <target name="doUnitTests" if="test">
      ...
   </target>
   

In the next example, the antcall task will execute only if the project does not have a property named test. This is the opposite situation of the previous example.

   
   <if name="test" exists="false">
      <antcall target="doUnitTests"/>
   </if>
   

The next example demonstrates nested 'if' tasks. This example will run the unit tests, and if it is Monday, will publish the accumulated test results.

    
   <tstamp>
      <format property="day" pattern="E" />
   </tstamp>
   <if name="test" value="true">
      <antcall target="doUnitTests"/>
      <if name="day" value="Mon">
         <antcall target="publishTestResults"/>
      </if>
   </if>
   

The next example shows how to use If with Else. Notice that it doesn't matter where the Else is placed inside the If. All tasks in the If that are not in the Else will execute if the property value is correct, otherwise, only those tasks inside the else will execute. The "var" task is discussed here.

    
    <var name="foo" value="bar"/>
    <if name="foo" value="bar">
        <echo>this will happen</echo>
        <else>
            <echo>this won't happen</echo>
        </else>
        <echo>this will happen also</echo>
    </if>

    <if name="foo" value="snarf">
        <echo>this won't happen</echo>
        <else>
            <echo>this 'else' will happen</echo>
            <echo>and so will this</echo>
        </else>
        <echo>this won't happen either</echo>
    </if>
    

The next example shows the "if" and "assert" tasks working together to validate a property before use, and also shows an example of where the "assert" 'failonerror' attribute might be useful. In this example, if the e-mail address is invalid, the e-mail won't be sent and the build won't fail. The "try" task is discussed here.

    
   <if name="email_from" value="buildteam@mycompany.com">
      <property name="valid_email" value="true"/>
   </if>
   <if name="email_from" value="buildsite@mycompany.com">
      <property name="valid_email" value="true"/>
   </if>
   <assert name="valid_email" value="true" failonerror="false">
      <try>
          <mail from="${email_from}" tolist="${email_to}"
              message="New release available"/>
      </try>
   </assert>
   

Here is the same thing, but using only If and Else:

    
   <try>
       <if name="email_from" value="buildteam@mycompany.com">
          <mail from="${email_from}" tolist="${email_to}"
              message="New release available"/>
          <else>
             <if name="email_from" value="buildsite@mycompany.com">
                 <mail from="${email_from}" tolist="${email_to}"
                      message="New release available"/>
             </if>
          </else>
       </if>
   </try>
   

The next example shows how to use the "bool" element:

    
    <if>
        <!-- "if" evaluates this element -->
        <bool>
            <and>
                <available file="build.xml"/>
                <available file="run.xml"/>
            </and>
        </bool>

        <!-- if true, then tasks listed here will execute -->
        <echo>build.xml and run.xml are available</echo>

        <!-- if false, then tasks inside the "else" will execute -->
        <else>
            <echo>didn't find one or both of build.xml and run.xml</echo>
        </else>
    </if>
    

The following example shows the "bool" element again:

    
    <if>
        <bool>
            <equals arg1="${download.dir}" arg2="test.dir"/>
        </bool>

        <fail message="Download and test directories cannot be
            the same! You need to reset to use the production
            property set."/>

        <else>
            <copy file="installer.zip" todir="${download.dir}"/>
        </else>
    </if>
    

The following example is from the unit test for the "Limit" task. It shows the Stopwatch task, the Limit task, and the If task with boolean conditions:

    
  <target name="test2">
    <!-- should not stop 'sleep' task, should print out '_passed_' -->
    <stopwatch name="timer"/>
    <limit maxwait="5">
        <sleep seconds="1"/>
        <echo>_passed_</echo>
    </limit>
    <stopwatch name="timer" action="total"/>
    <if>
        <bool>
            <isgreaterthan arg1="${timer}" arg2="2"/>
        </bool>
        <fail message="Too much time"/>
    </if>
  </target>
    

antelope-3.5.1.orig/docs/manual/bk03ch09.html0000644000175000017500000001434211131616434020504 0ustar drazzibdrazzibChapter9.Variable Task

Chapter9.Variable Task

The Variable task provides a mutable property to Ant and works much like variable assignment in Java. This task is similar to the standard Ant Property task, except that THESE PROPERTIES ARE MUTABLE. While this goes against the standard Ant use of properties, occasionally it is useful to be able to change a property value within the build. In general, use of this task is DISCOURAGED, and the standard Ant Property should be used if possible. Having said that, in real life I use this a lot.

To use this task in your build files, include a task definition like this:


    <taskdef name="var" classname="ise.antelope.tasks.Variable"/>
   

Variables can be set individually or loaded from a standard properties file. A 'feature' of variables is that they can override properties, but properties cannot override variables. So if an already established property exists, its value can be reassigned by use of this task.

Table9.1.Variable Task Attributes

AttributeDescriptionDefaultRequired
nameThe name of the property to set.NoneYes, unless 'file' is used.
valueThe value of the property.""No
fileThe name of a standard properties file to load variables from.NoneNo


In the following example, the property x is first set to "6", then evaluated by the if, and reassigned the value "12". The echo task will print out 12.


    <var name="x" value="6"/>
    <if name="x" value="6">
        <var name="x" value="12"/>
    </if>
    <echo>${x}</echo>   <!-- will print 12 -->

The following shows some more uses of the Variable task. It is especially handy for property appending. Notice a couple of things: the property task can't override a var value, however, if the var value is set to "", then it can as in the case of the format example.


    <var name="x" value="6"/>
    <echo>x = ${x}</echo>   <!-- print: 6 -->

    <var name="x" value="12"/>
    <echo>x = ${x}</echo>   <!-- print: 12 -->

    <var name="x" value="6 + ${x}"/>
    <echo>x = ${x}</echo>   <!-- print: 6 + 12 -->

    <var name="str" value="I "/>
    <var name="str" value="${str} am "/>
    <var name="str" value="${str} a "/>
    <var name="str" value="${str} string."/>
    <echo>${str}</echo>     <!-- print: I am a string. -->

    <var name="x" value="6"/>
    <echo>x = ${x}</echo>   <!-- print: 6 -->

    <property name="x" value="12"/>
    <echo>x = ${x}</echo>   <!-- print: 6 (property can't override) -->

    <var name="x" value="blue"/>
    <tstamp>
        <format property="x" pattern="EEEE"/>
    </tstamp>
    <echo>Today is ${x}.</echo> <!-- print: Today is blue. -->

    <var name="x" value=""/>
    <tstamp>
        <format property="x" pattern="EEEE"/>
    </tstamp>
    <echo>Today is ${x}.</echo> <!-- print: Today is Friday. -->


The next example shows Variable, If, Assert, and Try working together to make sure e-mail is sent from the right address and that if the mail fails to be sent for any reason, the build will not fail.

    
   <var name="valid_email" value="false"/>
   <if name="email_from" value="buildteam@mycompany.com">
      <var name="valid_email" value="true"/>
   </if>
   <if name="email_from" value="buildsite@mycompany.com">
      <var name="valid_email" value="true"/>
   </if>
   <assert name="valid_email" value="true" failonerror="false">
      <try>
         <mail from="${email_from}" tolist="${email_to}"
            message="New release available"/>
      </try>
   </assert>
   

antelope-3.5.1.orig/docs/manual/index.html0000644000175000017500000001570511131616434020374 0ustar drazzibdrazzibAntelope Users Guide antelope-3.5.1.orig/docs/manual/bk03ch11.html0000644000175000017500000000702411131616434020474 0ustar drazzibdrazzibChapter11.Limit

Chapter11.Limit

The Limit task is a task container (that is, it holds other tasks) and sets a time limit on how long the nested tasks are allowed to run. This is useful for unit tests that go awry, hung socket connections, or other potentially long running tasks that need to be shut off without stopping the build.

To use this task in your build files, include a task definition like this:


    <taskdef name="limit" classname="ise.antelope.tasks.Limit"/>
   

Table11.1.Limit Task Attributes

AttributeDescriptionDefaultRequired
maxwaitHow long to wait for nested tasks to finish, this is in seconds.180 seconds (3 minutes)No
failonerrorShould the build fail if the time limit has been exceeded?falseNo


Examples:

Neither the echo nor the fail will happen in this example. The build will continue once the time has expired.


<limit maxwait="3">
   <sleep seconds="10"/>
   <echo>This won't happen...</echo>
   <fail>This won't happen either...</fail>
</limit>

Neither the echo nor the fail will happen in this example. The build will not continue once the time has expired.


<limit maxwait="3" failonerror="true">
   <sleep seconds="10"/>
   <echo>This won't happen...</echo>
   <fail>This won't happen either...</fail>
</limit>

antelope-3.5.1.orig/docs/manual/bk02ch04.html0000644000175000017500000000704711131616416020502 0ustar drazzibdrazzibChapter4.Projects

Chapter4.Projects

To be acceptable to Ant, each build file must have a <project> element as its root element.

A <project> has three attributes. This standard deviates slightly from the Ant standard in that the "name" attribute is required and will be the same as the file name without the ".xml" extension.

Table4.1.Project Attributes

AttributeDescriptionRequired
namethe name of the project. This attribute should be the same as the file name without the .xml extension.Yes
defaultthe default target to use when no target is supplied.Yes
basedirthe base directory from which all path calculations are done. This attribute might be overridden by setting the "basedir" property beforehand. When this is done, it must be omitted in the project tag. If neither the attribute nor the property have been set, the parent directory of the buildfile will be used.No


Ant allows that a description for the project can be provided as a top-level <description> element. This description will be included in the output of the ant -projecthelp command. While this is optional for Ant, the description element is required by this standard.

Example description:

  
    <description>
    This build file is used to build the Foo subproject within 
    the large and complex Bar project.
    </description>

antelope-3.5.1.orig/docs/manual/red_ant.gif0000644000175000017500000000054411131616374020500 0ustar drazzibdrazzibGIF89a|L_q!Created with The GIMP! ?,hpH,Q K"AX "!T  s< DR~`2r#Yp:r bCC mlB!"#$??B%&?'LK()J*V?kpm+,VA;antelope-3.5.1.orig/docs/manual/bk03ch17.html0000644000175000017500000001770311131616434020507 0ustar drazzibdrazzibChapter17.HTTP Post

Chapter17.HTTP Post

The Post task is a companion to the standard Ant "Get" task. This task does a post and does not necessarily expect anything in return. Almost always, there will be some sort of returned data, this can be logged or written to a file if needed.

To use this task in your build files, include a task definition like this:


    <taskdef name="post" classname="ise.antelope.tasks.PostTask"/>
   

Basically, an HTTP POST sends name/value pairs to a web server. A very common usage is for html forms for submitting data. A typical use of this task is to send data to a servlet for updating a web page with the status of a build.

This Post task handles cookies and remembers them across calls. This means that you can post to a login form, receive authentication cookies, then subsequent posts will automatically pass the correct cookies. The cookies are stored in memory only, they are not written to disk and will cease to exist upon completion of the build.

The Post task has three ways of specifying the data to be posted. Nested "prop" elements can be used. A "prop" element represents a single name/value pair. The second way is to specify a property file as an attribute to the Post. All properties from the file will be sent as part of the Post data. The third way is to just type in some defined Ant properties. Is it allowed to use all three ways at once, that is, read some properties from a file, specify others via "prop" elements, and just type in some Ant properties.

Table17.1.Post Task Attributes

AttributeDescriptionDefaultRequired
toThe URL of the remote server to send the post.NoneYes
encodingCharacter encoding for the name/value pairs.UTF-8No
logfileThe name of a file to write any response to. Ignored if wantresponse is set to false.NoneNo
appendShould an existing log file be appended to or overwritten?True, append to an existing file.No
fileA file to read POST data from. All Ant properties contained in this file will be resolved (that is, ${} syntax will be expanded to their values) prior to sending the file contents.NoneNo
maxwaitThe maximum amount of time in seconds to wait for the data to be sent or for a response from the remote server. Setting this to zero means wait forever.180 (3 minutes)No
wantresponseWhether to wait for a response from the remote server or not. In many cases this can greatly improve the performance of the build script as the server response may be large and useless to the script. Use this with caution - while the response from the server may not be required for the client, the server may require that the client accept the response prior to processing the post data.trueNo
propertyIf set and wantresponse, put the response from the remote server into this property.NoneNo
failonerrorWhether the build should fail if the post fails.falseNo


Post supports nested "prop" elements. As an HTTP POST basically sends a list of names and values, the "prop" element represents one name/value pair. A Post may contain any number of "prop" elements.

Table17.2.Prop Attributes

AttributeDescriptionDefaultRequired
nameThe name of a property to post.NoneYes
valueThe value associated with the name.NoneNo


The "value" attribute is not strictly required. This provides a short-cut method in cases where the property data is an already-defined Ant property. Suppose the build file has this property defined:


    <property name="src.dir" value="/home/user/project/src"/>

Then the following are equivalent:


    <prop name="src.dir"/>
    <prop name="src.dir" value="${src.dir}"/>
    <prop name="src.dir" value="/home/user/project/src"/>

Defined Ant properties can be entered directly into the post element. Again, suppose the build file has this property defined:


    <property name="src.dir" value="/home/user/project/src"/>

Then the following are equivalent:


    ${src.dir}
    <prop name="src.dir"/>
    <prop name="src.dir" value="${src.dir}"/>
    <prop name="src.dir" value="/home/user/project/src"/>

I googled for the URL in the following example.


    <property name="test.val" value="here's my test value"/>
    <property name="test.val2" value="second test value"/>
    <post to="http://wwwj.cs.unc.edu:8888/tang/servlet/tangGetPostServlet"
        verbose="true">
        <prop name="prop1" value="val1 ${test.val}"/>
        <prop name="prop2" value="val1 value 2"/>
        <prop name="prop3" value="val got some spaces %funky ^$* chars"/>
        <prop name="prop4" value="&amp; do an ampersand like this &amp;amp; or
        Ant will whine"/>
        <prop name="thanks" value="dude, thanks for the echo server!"/>
        <prop name="test.val"/>
        ${test.val2}
    </post>

Also see the Grep task for additional examples.

antelope-3.5.1.orig/docs/manual/bk03ch24.html0000644000175000017500000002525411131616434020505 0ustar drazzibdrazzibChapter24.Repeat Task

Chapter24.Repeat Task

The Repeat task performs the same subtasks over and over a certain number of times or until a condition is met. Since most tasks are configured when the build file is first loaded and never again, this task may not do what you want.

To use this task in your build files, include a task definition like this:


    <taskdef name="call" classname="ise.antelope.tasks.Repeat"/>
   

Table24.1.Repeat Task Attributes

AttributeDescriptionDefaultRequired
countThe number of times to repeat execution of the nested tasks.1No
intervalHow long to wait between repetitions. If set to 0, only 1 repetition will be performed, this is to avoid a tight loop.0No
unitThe units for interval, allowed values are "milliseconds", "seconds", "minutes", "days", and "weeks"secondsNo
propertyThe name of a property to set upon completion.NoneNo
valueThe value to set for the property to be set upon completion.NoneNo


Here are a number of examples taken from the unit tests for this task:


   <target name="test1a">
      <!-- no count set, verify performs tasks once -->
      <a:var name="count" value="0"/>
      <a:repeat>
         <a:math result="count" operand1="${count}" operand2="1" operation="+"/>
      </a:repeat>
      <a:assert>
         <bool>
            <mathequals arg1="${count}" arg2="1"/>
         </bool>
      </a:assert>
   </target>

   <target name="test1b">
      <!-- count > 1, verify performs tasks correct number of times -->
      <a:var name="count" value="0"/>
      <a:repeat count="3" interval="1">
         <a:math result="count" operand1="${count}" operand2="1" operation="+"/>
      </a:repeat>
      <a:assert message="Expected 3, got ${count}">
         <bool>
            <mathequals arg1="${count}" arg2="3"/>
         </bool>
      </a:assert>
   </target>

   <target name="test1c">
      <!-- count = -1, verify performs tasks indefinitely -->
      <a:var name="count" value="0"/>
      <a:limit maxwait="10">
         <a:repeat count="-1" interval="1">
            <a:math result="count" operand1="${count}" operand2="1" operation="+"/>
         </a:repeat>
      </a:limit>
      <a:assert>
         <bool>
            <and>
               <a:isgreaterthan arg1="${count}" arg2="8"/>
               <a:islessthan arg1="${count}" arg2="12"/>
            </and>
         </bool>
      </a:assert>
   </target>

   <target name="test2a">
      <!-- no interval set, verify performs tasks 10 seconds apart -->
      <a:var name="count" value="0"/>
      <a:stopwatch name="test2a_stopwatch" action="start"/>
      <a:repeat count="2">
         <a:math result="count" operand1="${count}" operand2="1" operation="+"/>
      </a:repeat>
      <a:stopwatch name="test2a_stopwatch" action="total"/>
      <a:assert message="Got ${count}, expected 2">
         <bool>
            <and>
               <a:mathequals arg1="${count}" arg2="2"/>
               <a:islessthan arg1="${test2a_stopwatch}" arg2="11"/>
            </and>
         </bool>
      </a:assert>
   </target>


   <target name="test2b">
      <!-- interval set to other than 10 seconds, verify tasks performed correct
           time apart. -->
      <a:var name="count" value="0"/>
      <a:stopwatch name="test2b_stopwatch" action="start"/>
      <a:repeat count="2" interval="5">
         <a:math result="count" operand1="${count}" operand2="1" operation="+"/>
      </a:repeat>
      <a:stopwatch name="test2b_stopwatch" action="total"/>
      <a:assert>
         <bool>
            <and>
               <a:mathequals arg1="${count}" arg2="2"/>
               <a:islessthan arg1="${test2b_stopwatch}" arg2="6"/>
            </and>
         </bool>
      </a:assert>
   </target>

   <target name="test2c">
      <!-- interval = 0, verify tasks performed just once -->
      <a:var name="count" value="0"/>
      <a:stopwatch name="test2c_stopwatch" action="start"/>
      <a:repeat count="5" interval="0">
         <a:math result="count" operand1="${count}" operand2="1" operation="+" datatype="int"/>
      </a:repeat>
      <a:stopwatch name="test2c_stopwatch" action="total"/>
      <a:assert>
         <bool>
            <and>
               <a:mathequals arg1="${count}" arg2="1"/>
               <a:islessthan arg1="${test2c_stopwatch}" arg2="1"/>
            </and>
         </bool>
      </a:assert>
   </target>

   <target name="test3a">
      <!-- failOnError not set, verify continues to execute tasks even if one fails -->
      <a:var name="count" value="0"/>
      <a:repeat count="3" interval="1">
         <a:math result="count" operand1="${count}" operand2="1" operation="+"/>
         <fail/>
      </a:repeat>
      <a:assert>
         <bool>
            <a:mathequals arg1="${count}" arg2="3"/>
         </bool>
      </a:assert>
   </target>

   <target name="test3b">
      <!-- failOnError set to false, same as 3a -->
      <a:var name="count" value="0"/>
      <a:repeat count="3" interval="1" failonerror="no">
         <a:math result="count" operand1="${count}" operand2="1" operation="+"/>
         <fail/>
      </a:repeat>
      <a:assert>
         <bool>
            <a:mathequals arg1="${count}" arg2="3"/>
         </bool>
      </a:assert>
   </target>

   <target name="test3c">
      <!-- failOnError set to true, verify build fails if subtask fails -->
      <a:var name="count" value="0"/>
      <a:try>
         <a:repeat count="3" interval="1" failonerror="yes">
            <a:math result="count" operand1="${count}" operand2="1" operation="+"/>
            <fail/>
         </a:repeat>
      </a:try>
      <a:assert>
         <bool>
            <a:mathequals arg1="${count}" arg2="1"/>
         </bool>
      </a:assert>
   </target>

   <target name="test4a">
      <!-- property name set, value not set, verify property is set to true when task
           is complete -->
      <a:var name="count" value="0"/>
      <a:repeat count="1" interval="1" property="test4a_property">
         <a:math result="count" operand1="${count}" operand2="1" operation="+"/>
         <fail/>
      </a:repeat>
      <a:assert>
         <bool>
            <istrue value="${test4a_property}"/>
         </bool>
      </a:assert>
   </target>

   <target name="test4b">
      <!-- property ame set, value set to a specific value, verify property is set to
           specific value when task is complete -->
      <a:var name="count" value="0"/>
      <a:repeat count="1" interval="1" property="test4b_property" value="good">
         <a:math result="count" operand1="${count}" operand2="1" operation="+"/>
         <fail/>
      </a:repeat>
      <a:assert name="test4b_property" value="good"/>
   </target>

   <target name="test5">
      <property name="call_count" value="0"/>
      <a:limit seconds="5" failonerror="true">
         <a:repeat count="-1" interval="1">
            <a:until>
               <a:contains property="log_contents" substring="All tests passed 4 times." />
            </a:until>

            <echo>read log</echo>
            <a:new>
               <a:call target="readLog"/>
            </a:new>
            <echo>${call_count} - ${log_contents}</echo>

         </a:repeat>
      </a:limit>
   </target>

   <target name="readLog">
      <a:unset name="log_contents"/>
      <a:new>
         <a:math result="call_count" operand1="${call_count}" operand2="1" operation="+" datatype="int"/>
         <property name="log_contents" value="All tests passed ${call_count} times."/>
      </a:new>
   </target>

antelope-3.5.1.orig/docs/manual/bk03ch10.html0000644000175000017500000000654711131616434020504 0ustar drazzibdrazzibChapter10.Stopwatch

Chapter10.Stopwatch

The Stopwatch task makes it easy to add performance timing to Ant targets. Stopwatches are named so that multiple watches can run simultaneously.

To use this task in your build files, include a task definition like this:


    <taskdef name="stopwatch" classname="ise.antelope.tasks.StopWatchTask"/>
   

Table10.1.Stopwatch Task Attributes

AttributeDescriptionDefaultRequired
nameThe name for the stopwatch. The elapsed time or total time will be stored as an Ant property with this name.NoneYes
actionValid values are "start", "stop", "elapsed", and "total"."start"No


The stopwatch is started with the "start" action. When the action is "elapsed" or "total", the running time of the stopwatch is printed out. Both "stop" and "total" stop the stopwatch and reset it to zero. "elapsed" prints out the current running time of the stopwatch without stopping it.

Example:


<stopwatch name="timer1"/>
<!-- do some tasks here... -->
<stopwatch name="timer1" action="elapsed"/> <!-- print the elapsed time -->
<!-- do some more tasks here... -->
<stopwatch name="timer1" action="total"/> <!-- print out the total time -->

antelope-3.5.1.orig/docs/manual/bk01ch03s03.html0000644000175000017500000001401511131616434021017 0ustar drazzibdrazzibInstalling Antelope as a jEdit Plugin

Installing Antelope as a jEdit Plugin

You can install Antelope in jEdit by using the Plugin Manager. Just follow the instructions for installing any plugin found in the jEdit help system. This section assumes you'll install Antelope into jEdit by hand because Antelope is updated much more frequently than jEdit's Plugin Central. It's really quite easy:

  • Download the Antelope plugin jar file.
  • Copy it to jEdit's jar directory.
  • Check that ANT_HOME is set as an environment variable.
  • Start jEdit.

Note that the Antelope plugin depends on the Console and ErrorList plugins, so you'll need to install those from the Plugin Manager also.

First, download the plugin zip file. Unzip it. The file named Antelope.jar is the plugin jar file.

Second, figure out where to put it. jEdit wants its plugins in one of two places, either $jedit_home/jars or $user_home/.jedit/jars. The best place is $user.home/.jedit/jars.

So where is $user_home? That depends on your operating system.

For Windows 95 and later, it's usually C:\Documents and Settings\yourusername, where yourusername is the name you use to log on to Windows. On my Windows 2000 machine, it's C:\Documents and Settings\danson, so I would copy the jar file into C:\Documents and Settings\danson\.jedit\jars.

For Linux or Unix, $user_home is usually /home/yourusername or /export/home/yourusename. On my Linux box, it's /home/danson, so I would copy the jar file into /home/danson/.jedit/jars.

The third step is letting Antelope know where you have Ant installed. This directory is known as "ANT_HOME". For example, on my Windows 2000 machine, I have Ant installed in c:\apache-ant-1.6.0, so that would be my ANT_HOME. Antelope looks in a few places when it starts:

  • First, it looks for a System property named ANT_HOME. You could set a System property on the command-line to start jEdit (something like java -mx64m -DANT_HOME=c:/apache-ant-1.6.0 -jar jedit.jar) or if you're using Windows, you can set something similar in the jEdit launcher tool (Start - Programs - jEdit - Set jEdit Parameters).
  • Second, it looks for an environment variable named ANT_HOME. This is actually the preferred method, and is recommended in the Ant installation instructions. How you set an environment variable depends on your operating system, on Windows, go to Start - Settings - Control Panel - System - Advanced - Environment Variables. On Linux or Unix, I'll assume you know what to do.
  • If there is no environment variable set, then Antelope looks in the jEdit jars directories. You can copy the files from ANT_HOME/lib to the jEdit jars directory like you did with the Antelope jar file, and jEdit will automatically load them. This wasn't a bad solution with Ant 1.5 as there were only a couple of jars to maintain, but Ant 1.6 comes with about 20 jar files, so it's a bit more cumbersome.
  • If Ant is not found in any of these locations, it will ask you.

Once Ant is found, the location will be stored by Antelope for future use. If you want to change the location, use jEdit's "Plugin" menu, then "Plugin Options", then "Antelope" in the plugin list. If you erase the setting found there, Antelope will follow the same procedure to find Ant next time it is started.

As a plugin, Antelope provides two "dockable" windows. Use jEdit's menu "Utilites, Global Options, Docking" to dock the windows. I find it convenient to dock the "Antelope" window on the right, and the "Ant Output" window on the bottom. The "Antelope" window is where you'll see the buttons to run targets, the "Ant Output" windows is where you'll see any output produced by Ant as it runs. Technically, the "Ant Output" window shows anything written to the system standard output stream, so you may see messages produced by other plugins there also.

To reiterate:

  • Download the Antelope plugin jar file.
  • Copy it to jEdit's jar directory.
  • Check that ANT_HOME is set as an environment variable.
  • Start jEdit. Dock Antelope.

antelope-3.5.1.orig/docs/manual/bk01ch03s02.html0000644000175000017500000000423511131616434021021 0ustar drazzibdrazzibInstalling Antelope as a Stand-Alone Application

Installing Antelope as a Stand-Alone Application

This section assumes you'll install Antelope as a stand-alone application by hand. It's really quite easy:

Download the Antelope application zip file.

Unzip the file.

Change to the AntelopeApp_3.5.1 directory.

Start Antelope by using this command: java -jar AntelopeApp_3.5.1.jar

antelope-3.5.1.orig/docs/manual/description_properties.gif0000644000175000017500000002636311131616374023672 0ustar drazzibdrazzibGIF89aW΄{}{{{ֵJY{Ɣkycikq焎Ƅ}Za絶RaZisƌcecƾBABce!Created with The GIMP! ,WŦմ%% HDP„J40E+bh118d'S\b˖/Y\!ӥL#hsO-:bhѡ.&-鈦.Ju"*ի0jE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qrs\\(qMumw s{}8-؃Mv؅؉_}؋؏ HؑMٕm3=ٗٛy F ڡ- ٣mڧڻVکڭګڱ-ۑ ۳}m)εLk4ۿ -]=еmܼm'2MM5 }A-Ӊ݊=mf׭>]jߊ -͵?@. *#n%),}l2!< G.5^H:ŏŽAΰTnC>E~NJ\|n*g׍岭,3._6–¶{^ˎ>>^hfK.B L>]N*^p^Mm><$^PϠ>6g.Խ8Nm.瘞̾|~ž>Nu^>nƾϯNd,~<.ئ.>]}艹O~=-]<=]},&;=8] ]:}=߬ +m.U/Z֬-cO-6giq/ sowW{]}{Or?U"OybO=/Oo/OoǏɯ˿/Oo׏ٯ;antelope-3.5.1.orig/docs/manual/ant.gif0000644000175000017500000000015111131616374017640 0ustar drazzibdrazzibGIF89a!Created with The GIMP! ,' ֎{ amLY"XܸtM^;antelope-3.5.1.orig/docs/manual/bk02.html0000644000175000017500000000552411131616416020021 0ustar drazzibdrazzibAnt Coding Style Guidelines antelope-3.5.1.orig/docs/manual/bk03.html0000644000175000017500000001645211131616424020023 0ustar drazzibdrazzibAdditional Ant Tasks

Additional Ant Tasks

Dale Anson


antelope-3.5.1.orig/docs/manual/bk03ch21.html0000644000175000017500000000642711131616434020503 0ustar drazzibdrazzibChapter21.Call Task

Chapter21.Call Task

This is the simplest and possibly the most obvious of the "call" type of tasks. It simply calls a target in the current build file and provides exactly the functionality expected by many users of "antcall".

To use this task in your build files, include a task definition like this:


    <taskdef name="call" classname="ise.antelope.tasks.Call"/>
   

There is only one attribute, that is the name of the target to call.

Table21.1.Call Task Attributes

AttributeDescriptionDefaultRequired
targetThe name of a target to execute.NoneYes


There is none of the weird property manipulation done by "ant", "antcall", "antfetch", or "antcallback", and none of the overhead. When you call a target, any properties set in that target are immediately available in the calling target. A simple example should be all that is necessary:


 <target name="test" description="Test Call">
     <call target="called"/>
     <echo>a = ${a}</echo>
     <echo>b = ${b}</echo>
 </target>

 <target name="called">
     <property name="a" value="A"/>
     <property name="b" value="B"/>
 </target>

antelope-3.5.1.orig/docs/manual/bk02ch08.html0000644000175000017500000000672111131616416020504 0ustar drazzibdrazzibChapter8.Comments

Chapter8.Comments

More is better! In particular, write comments for the intended use of properties and targets. The build file itself will tell what is happening, the comments should explain why.

For target comments, use a block comment similar to this example:


<!-- ==================== Dist Target ================================ 

    The "dist" target creates a binary distribution of the application
    in a directory structure ready to be archived in a tar.gz or zip file.
    This target depends on two others:

    * "compile" so that the entire web application (including external
      dependencies) will have been assembled

    * "javadoc" so that the application Javadocs will have been created

    ================================================================== -->

Place target comments immediately above the target element, with a single blank line between the end of the comment and the start of the target.

For other comments, such as for properties or within a target, use the standard xml single line comment like this:


<!-- this is a comment -->

If a comment is longer than a single line, wrap it and indent the second and subsequent lines 4 spaces, for example:


<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file,
    then copy it and the source jar to the ${dist} directory so 
    everything will be ready for moving to the ftp server. -->

Do not put a blank line between a single line comment and the element it is describing, for example:


    <!-- this is where the api documents live -->
    <property name="api_docs" value="${docs_home}/api"/>

antelope-3.5.1.orig/docs/manual/font_dialog.gif0000644000175000017500000001666211131616374021361 0ustar drazzibdrazzibGIF89aIX{}{{{01ΚecΚcceΜ10cececƾBAB!Created with The GIMP! ?,IX@pH,Ȥrl:ШtJZ,1zxL.zn|~VvK  !" "#"%"&%JHp'P$\DÇU(1)0j̸,VIrd 'SXE˗._ȜƋ7cɳgO!,=: QP*i&OFy*%U b녯pɺ5/vmf1aȎ=s,Z]j&<Ə~dB!Eh֑Ԡj)Val1a 1b #&0bG`TԘV]=Ktb"d/`G/۽]3ʈg^{Mc}mcz79#߮5vP@B !hG ⹚JalޔM0h hQ#.TT"Drʎͅuui Ij3r)< 63Yeb0F)ۯGaPo ;ȴWe_=,CI(wDGlӟ(EyEHoE[ђF@uMRTr;k_ ïxF:x8px!W[Z12琉dBC xOSg OMMjf1eXH`#p\H# zuWHFڏz$Ys[Ӥ!3JRpLys\H=Y36oGBRAtS ΤOl.H\q_P$NW)0tpK a( y^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<=\\< < ;$\\,\*'0,-ܺ1\36\8!<>B\D\|HJNP;T|V|Z\`|b<[fܽhٻl\nrܼt\{x\zǾ~|ȳ;Ȅ|ȩȊ\ȡȐܹ<ə[ɖ\ɑɜܸɉʢL\{ʨuʮm;˴3<쿶b˾ܵ[;l|̅T[ZҬ\E{, ۬<ll|̶̻팽Ϛ L;{Ϟk)o]Т /Ћ my]|-х  $#Ҥ{,o+Ҕ2}4]*m8ӂ{=.]wD͸C}JgJmLԩPR=կ\V-Xյ\: ],w NmHh=~n}ͬໝN n^s<N=L=(*.>B  4&7?ӎ4@.9C{6~$JEIPESU~WY>[^]_O>$f} inep~r>|z|~Dr{舞vzk.zJ^~阞>eDNZ^vuNTN4봞J~됔뺾FiNE>3TCȞ-̾B)^BԮޜ~Jٮ>۞Wwu4G߮~wwhbR =K'+M#DX> _ noCGw^?%??a;=r<Ev~£q<wTc9;D;.o=@o>qMYZ_t+grmdGNvgrW ϲ"O7YI;BtQWVj_OoQOfH='uo`?,hPV 2l0I‡'R0Ō7rd#Ȑ"GH$ʔ*k\%L-cҬis̛:w򤗳'РB9j(v?AK)1K3%j*֬Zr+ذbǒ-k,ڴjײm-ܸrҭ[u*/.l0Ċ3\&Sl7s3ТG.m4ԪWn5زgӮm6nz/7s/n8ʗ3o9tϻMڷs;O^ٺyCƳo=I.^x? 8 A( : J8!Zx!j!z!!8"%x")>@;antelope-3.5.1.orig/docs/manual/bk02ch03s02.html0000644000175000017500000000737711131616416021034 0ustar drazzibdrazzibFormatting

Formatting

Four spaces should be used as the unit of indentation.

Do not use tabs instead, use 4 spaces in place of a single tab. Many editors can do this automatically.

Vertically align start and end tags for an element. Indent child elements.

Avoid lines longer than 80 characters, since they're not handled well by many terminals and tools.

Use a single space after a comma.

Group properties by use, for example, group directory definitions together. Insert a single blank line between groups.

Insert two blank lines between targets.

Insert one blank line between tasks within a target.

When an expression will not fit on a single line, break it according to these general principles:

  • Break before an attribute.

  • Break after a space or comma.

  • Prefer higher-level breaks to lower-level breaks.

  • Align the new line with the beginning of the expression at the same level on the previous line.

  • If the above rules lead to confusing code or to code that's squished up against the right margin, just indent 8 spaces instead.

Examples:


    <property name="modules"
        value="libs, junit_tests, images, docs, api_docs, external_libs,
              sources" />
        
    <copy todir="${unit_test_deploy}" overwrite="true">
        <fileset dir="${unit_test_home}">
            <exclude name="**/CVS" />
        </fileset>
    </copy>

This is wrong:


  <target name="test_all" depends="clean,setupApp,
                                    setupTests,setupLogger,
                    startReportServlet,runTests"/>

This is right:


    <target name="test_all" 
        depends="clean, setupApp, setupTests, setupLogger, 
                startReportServlet, runTests"/>

antelope-3.5.1.orig/docs/manual/bk03ch28.html0000644000175000017500000000372711131616434020512 0ustar drazzibdrazzibChapter28.Feedback

Chapter28.Feedback

The preferred way to send bug reports is to use the Issue Tracker at http://antelope.tigris.org .

You can also write to me directly at:

antelope-3.5.1.orig/docs/manual/bk01ch04.html0000644000175000017500000000555511131616434020503 0ustar drazzibdrazzibChapter4.Requirements

Chapter4.Requirements

See the installation instructions for the specific requirements for Antelope. Antelope does require Java 1.5 or later as it makes use of both java.util.logging and java.util.prefs APIs which were introduced in that version.

Due to changes in the jEdit API, Antelope plugin versions prior to 2.60 are for jEdit 4.1, versions 2.60 and later require jEdit 4.2 or later.

Antelope does require Ant 1.5.x or later, which is a separate download. Ant is available from http://ant.apache.org. Antelope has been tested extensively with Ant 1.5.x, and seems to work with no problems with Ant 1.6.x. If your development environment already runs Ant, you have everything you need to run Antelope.

A note about Ant 1.6: With the release of Ant 1.6, the Ant developers have choosen to package the classes that formerly were part of "optional.jar" into a variety of smaller jar files.

antelope-3.5.1.orig/docs/manual/bk01.html0000644000175000017500000001206711131616434020020 0ustar drazzibdrazzibAntelope Users Guide, Version 3.5.1 antelope-3.5.1.orig/docs/manual/bk03ch07.html0000644000175000017500000001572011131616434020503 0ustar drazzibdrazzibChapter7.Try Task

Chapter7.Try Task

The "Try" task works similarly to the try/catch/finally construct in Java. This task is useful when a particular task might fail, but the build should not fail if it does. An example is the "mail" task will fail if the mail server is not available, but the build should not fail if the mail message cannot be delivered.

To use this task in your build files, include a task definition like this:


<taskdef name="try" classname="ise.antelope.tasks.TryTask"/>

A quick example is probably all that is necessary:


 <tempfile property="temp.file" destdir="${java.io.tmpdir}"
     prefix="delete" suffix=".tmp"/>
 <try>
     <!-- use 'get' task to post to the unit test status servlet. It
         would be better to use a post for this, but this shows a good
         use of 'finally'. -->
     <get
         src="http://mycompany.com/servlet/junit?testnum=${test.num}&status="${status}"
         dest="${temp.file}"/>

     <catch>
         <echo>Unit test servlet update failed.</echo>
     </catch>

     <finally>
         <delete file="${temp.file}"/>
     </finally>
 </try>

Unlike the Java "try", neither the "catch" block nor the "finally" block are required. Also, the order does not matter, the "catch" block may be listed first, followed by the "finally", followed by the tasks that may fail.

Table7.1.Try Task Attributes

AttributeDescriptionDefaultRequired
breakIf true and a nested task fails, no other nested tasks will execute. If false, all nested tasks will execute regardless of whether a previous task failed. Note that for each failed task, the 'catch' block (if defined) will execute.trueNo
printstacktraceIf true, the exception stack trace from a failed task will be logged. falseNo
stacktracepropertySpecify a property to store the stack trace of any exception. NoneNo
printmessageIf true, the exception message from a failed task will be logged. If printstacktrace is set to true, this attribute is ignored as the exception message is printed as part of the stack trace.trueNo
messagepropertySpecify a property to store the message line of any exception.NoneNo


The next example shows the "break" attribute set to "no". In this case, the second echo task will execute.


    <target name="test" description="This exercises the Try task.">
        <try break="no">
            <echo>I am trying...</echo>
            <fail message=" and I failed..."/>
            <echo> but I did not die!</echo> <!-- this WILL print -->
        </try>
    </target>
   

This slightly more practical example uses the Variable task coupled with "try" to run a series of tests. All tests will run even if a preceding test fails. The "catch" block logs a message of each failed test.


    <target name="runTests" messageproperty="msg">
        <try catch="testFailed" break="no">
            <var name="testname" value="fileUtilTests"/>
            <antcall target="runFileUtilTests"/>
            <var name="testname" value="imageUtilTests"/>
            <antcall target="runImageUtilTests"/>
            <var name="testname" value="imageConversionTests"/>
            <antcall target="runImageConversionTests"/>

            <catch>
              <!-- log a test failure -->
              <echo file="test.log" append="yes">
                  Test suite ${testname} failed: ${msg}
              </echo>
            </catch>
        </try>
    </target>
    </target>
   

The following example uses a nested Finally to clean up resources:


    <tempfile property="temp.file" destdir="${java.io.tmpdir}"
        prefix="delete" suffix=".tmp"/>
    <try>
        <!-- use 'get' task to post to the unit test status servlet. It
            would be better use use a post for this, but this shows a good
            use of 'finally'. -->
        <get
            src="http://mycompany.com/servlet/junit?testnum=${test.num}&status="${status}"
            dest="${temp.file}"/>

        <catch>
            <echo>Unit test servlet update failed.</echo>
        </catch>

        <finally>
            <delete file="${temp.file}"/>
        </finally>
    </try>

See the post task for a better way to do a post.

antelope-3.5.1.orig/docs/manual/bk03ch02.html0000644000175000017500000001033211131616434020470 0ustar drazzibdrazzibChapter2.License

Chapter2.License

These Ant tasks are licensed under the same Apache license as Ant:

    
The Apache Software License, Version 1.1

Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in
   the documentation and/or other materials provided with the
   distribution.

3. The end-user documentation included with the redistribution, if
   any, must include the following acknowlegement:
      "This product includes software developed by the
       Apache Software Foundation (http://www.apache.org/)."
   Alternately, this acknowlegement may appear in the software itself,
   if and wherever such third-party acknowlegements normally appear.

4. The names "The Jakarta Project", "Ant", and "Apache Software
   Foundation" must not be used to endorse or promote products derived
   from this software without prior written permission. For written
   permission, please contact apache@apache.org.

5. Products derived from this software may not be called "Apache"
   nor may "Apache" appear in their names without prior written
   permission of the Apache Group.

THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
====================================================================

This software consists of voluntary contributions made by many
individuals on behalf of the Apache Software Foundation.  For more
information on the Apache Software Foundation, please see
<http://www.apache.org/>.
    
    

antelope-3.5.1.orig/docs/manual/bk01ch11s02.html0000644000175000017500000001614511131616434021023 0ustar drazzibdrazzibAPI for jEdit Plugin Developers

API for jEdit Plugin Developers

Antelope can be used from other jEdit plugins that may desire to run Ant targets. The public API is described here, plus some examples of how to use this API from other plugins. You can also use this API from a beanshell macro, see the FAQ section.

public static File getBuildFile(View view);

This method returns a reference to the current build file.

public static String[] getTargetList(File buildFile);

This method returns a list of the target names in the given build file.

public static void executeTarget( View view, File buildFile, String target );

This method executes a target. Since the execution is through Antelope, output will be to the Console plugin and errors will be displayed in the ErrorList plugin. The AntelopePlugin will attempt to find an instance of Antelope for the given view, then execute the target. The target must exist in the given build file.

public static void setBuildFile(View view, File buildFile);

This method sets the current build file for the Antelope instance in the given view. Antelope will reload itself to reflect the new build file.

Following are some examples of calling these methods from your plugin. Notice that you do not need the Antelope source or classes to compile or run your plugin, so you do not need to make Antelope a dependency for the PluginManager. The examples only work if Antelope is actually installed as a jEdit plugin and do nothing otherwise. The best place to put these examples is in your plugin's Plugin class. These examples are suitable for copy and paste into your plugin's source code. You will need to import: org.gjt.sp.jedit.EditPlugin, org.gjt.sp.jedit.jEdit, org.gjt.sp.jedit.View, and java.io.File.

This simply returns "true" if Antelope is installed. It is convenient to call this method prior to calling the others.

public static boolean isAntelopeAvailable() {
   EditPlugin ep = jEdit.getPlugin( "ise.antelope.plugin.AntelopePlugin" );
   return ep != null;
}

This method returns a reference to the current build file or null if Antelope is not installed or on any other error.

   public static File getBuildFile(View view) {
      if (view == null){
         return null;
      }
      if ( !isAntelopeAvailable() ) {
         return null;
      }
      EditPlugin ep = jEdit.getPlugin( "ise.antelope.plugin.AntelopePlugin" );
      try {
         Class c = ep.getClass();
         java.lang.reflect.Method m = c.getDeclaredMethod( "getBuildFile",
               new Class[]{View.class} );
         if ( m == null ) {
            return null;
         }
         return (File)m.invoke( null, new Object[]{view} );
      }
      catch ( Throwable e ) {
      }
      return null;
   }

This method returns a list of targets in the given build file or null if Antelope is not installed or on any other error.

   public static String[] getTargetList(File buildFile) {
      if (buildFile == null || !buildFile.exists()){
         return null;
      }
      if ( !isAntelopeAvailable() ) {
         return null;
      }
      EditPlugin ep = jEdit.getPlugin( "ise.antelope.plugin.AntelopePlugin" );
      try {
         Class c = ep.getClass();
         java.lang.reflect.Method m = c.getDeclaredMethod( "getTargetList",
               new Class[]{File.class} );
         if ( m == null ) {
            return null;
         }
         return (String[])m.invoke( null, new Object[]{buildFile} );
      }
      catch ( Throwable e ) {
      }
      return null;
   }

This method will execute an Ant target via Antelope.

   public static void executeAntTarget(View view, File buildFile, String target) {
      if (view == null || buildFile == null || target == null)
         return;
      if ( !isAntelopeAvailable() ) {
         return;
      }
      EditPlugin ep = jEdit.getPlugin( "ise.antelope.plugin.AntelopePlugin" );
      try {
         Class c = ep.getClass();
         java.lang.reflect.Method m = c.getDeclaredMethod( "executeTarget",
               new Class[]{View.class, File.class, String.class} );
         if ( m == null ) {
            return;
         }
         m.invoke( null, new Object[]{view, buildFile, target} );
      }
      catch ( Throwable e ) {
      }
   }

This method will cause Antelope to load the given build file.

   public static void setAntelopeBuildFile(View view, File buildFile) {
      if (buildFile == null || !buildFile.exists()){
         return;
      }
      if ( !isAntelopeAvailable() ) {
         return;
      }
      EditPlugin ep = jEdit.getPlugin( "ise.antelope.plugin.AntelopePlugin" );
      try {
         Class c = ep.getClass();
         java.lang.reflect.Method m = c.getDeclaredMethod( "setBuildFile",
               new Class[]{View.class, File.class} );
         if ( m == null ) {
            return;
         }
         m.invoke( null, new Object[]{view, buildFile} );
      }
      catch ( Throwable e ) {
      }
   }

antelope-3.5.1.orig/docs/manual/bk01ch05s02.html0000644000175000017500000001470611131616434021027 0ustar drazzibdrazzibAntelope as a Stand-Alone Application

Antelope as a Stand-Alone Application

Note: previous releases of Antelope recommended using Ant with the included "run.xml" to start Antelope. This is no longer recommended. If you have Java 1.5 and Ant 1.6 or 1.7, just run the jar file as below, or in Windows and some Linux distributions, you can double click the jar file to start Antelope.

Start Antelope by running:


    cd AntelopeApp_3.5.1
    java -jar AntelopeApp_3.5.1.jar

The first time you run this you will be asked to enter the location of the 'lib' directory of your Ant installation.

You can also install Antelope by hand. Antelope is packaged as a single jar file, Antelope.jar. Several other jar files may be necessary:

  • ant.jar Antelope requires Ant to do anything useful. Ant is available at http://ant.apache.org. Put it in your classpath.

  • (Ant 1.5.x) optional.jar This is an optional library that is distributed with Ant. It has additional Ant tasks that may be useful. Put it in your classpath as required.

  • (Ant 1.6.x) ant-launcher.jar Ant 1.6.0 split the main ant.jar into a number of smaller files to improve performance and managability. For Ant 1.6.x, ant-launcher.jar is the file that is used to actually start Ant. This jar must also be in your classpath.

  • tools.jar This is distributed with the Java Software Development Kit. If your build file makes use of any of the JDK tools (such as javac or javadoc), put this in your classpath.

  • An XML parser This can be one of several publicly available XML parsers. Ant is shipped with the Xerces parser. To use the Xerces parser shipped with Ant, add xercesImpl.jar and xml-api.jar from the ${ant.home}/lib directory to your classpath. If you have Java 1.5, it also comes with a built-in XML parser. See the note about having multiple parsers in your classpath and how to get around this problem.

Unless you are running an older version of Java and/or an older version of Ant, just running the jar file will automatically include all necessary files.

Here is Antelope running as a stand-alone application:

Figure5.2.Antelope as a stand-alone application

Antelope as a stand-alone application


Antelope as a stand-alone application provides a few features not found in the plugin version. In the plugin version, these features are provided by jEdit, so are not duplicated. The additional features are:

  • The "File" menu deals with the build file, providing the ability to create a new build file, open a build file and to save changes to the build file. Antelope provides some basic editing capabilities, but is not intended to be a full-featured editor. You may find other editors more suited to editing build files.

  • Also on the "File" menu is the list of recently opened files. This is handy for choosing a file that was previously opened without using the file chooser.

  • The "Output" menu provides the ability to save the Ant output to a file and to clear the 'Output' window.

  • The "Options" menu provides the ability to set a number of options for the application:

    Figure5.3.Font chooser

    Font chooser


    The same font will be used for both the editor and output window.

    Figure5.4.Editor options

    Editor options


    Figure5.5.Syntax highlighting options

    Syntax highlighting options


    Syntax hightlighting only applies to the editor window, not the output window.

Printing is not available in this version, but is on the feature list for implementation.

antelope-3.5.1.orig/docs/manual/bk01ch12.html0000644000175000017500000001362611131616434020500 0ustar drazzibdrazzibChapter12.Frequently Asked Questions

Chapter12.Frequently Asked Questions

  • When I try to use the <javac> task, I keep getting a "no compiler found" error, but I have JAVA_HOME set correctly. How can I fix this?

    Check two things: (1) make sure JAVA_HOME is really set correctly. Windows JDK installations by default set JAVA_HOME to point to the jre directory under your JDK installation. This is fine for running Java programs, but not for compiling. Set JAVA_HOME up one directory to point to the root of your JDK installation, not the jre directory. (2) make sure JAVA_HOME/bin is in your PATH. This is the directory that contains javac.

    Here are some example settings from my Windows 2000 computer:

    JAVA_HOME = c:\j2sdk1.4.1_02
    PATH = (path to windows,etc);c:\j2sdk1.4.1_02\bin;
    

  • I'd like to assign a key to a target button when running Antelope as a jEdit plugin. Is there anyway I can do this?

    Mark Pollard and I worked out this solution:

    In jEdit, open a new buffer and paste this in:

    jEdit.saveAllBuffers(view, false);
    VFSManager.waitForRequests();
    ise.antelope.plugin.AntelopePlugin plugin =
    jEdit.getPlugin("ise.antelope.plugin.AntelopePlugin");
    plugin.executeTarget(view, plugin.getBuildFile(view), "compile");
    

    Replace 'compile' with the name of the target you want to run. Save it in your ${user.home}/.jedit/macros directory (on my Windows machine, this is c:\Documents and Settings\danson\.jedit\macros, on my Linux box, it's /home/danson/.jedit/macros). Name it whatever you want, but be sure to give it a .bsh extention.

    Depending on your jEdit version, it will either be automatically loaded or use the 'Macros' menu, then 'Rescan macros' item. Then under the 'Utilities' menu -> 'Global Options' -> 'Shortcuts', pick 'Macros' from the drop down box on the right, and assign a key to the macro you just saved.

    If you name your targets consistently across your build files, this will work well for the targets that you run a lot, like 'compile' and 'test'.

  • I get out of memory errors when trying to run my build file in Antelope. How can I avoid this problem?

    If you are starting Antelope with the run.xml file, edit this file and adjust this line:

    <java classname="ise.antelope.app.Antelope" fork="true">
    

    to look like this:

    <java classname="ise.antelope.app.Antelope" fork="true" maxmemory="128m">
    

    Adjust the maxmemory attribute as needed for your build.

    If you are starting Antelope from command-line java, add the -Xmx parameter to the command line like this:

    java -Xmx128m -jar AntelopeApp_3.5.1.jar
    

  • All the buttons disappeared from Antelope. How do I get them back?

    This means that you have an error in your build file and Antelope does not recognize it as valid xml. Usually the the output window will give some indication of the problem. Correct the build file and save it, and the buttons will reappear. (See the next question also.)

  • My build file uses external entities to include standard targets and properties. When I try to open this build file, all the buttons disappear. How do I get them back?

    Antelope version 2.53 and earlier did not support external entities. Upgrade to a version later than 2.53. Also, be sure your external entities are declared correctly. This example is from the Ant FAQ:

    
    <?xml version="1.0"?>
    
    <!DOCTYPE project [
        <!ENTITY common SYSTEM "file:./common.xml">
    ]>
    
    <project name="test" default="test" basedir=".">
    
      <target name="setup">
        ...
      </target>
    
      &common;
    
      ...
    
    </project>
    
    

antelope-3.5.1.orig/docs/manual/bk01ch02.html0000644000175000017500000000753711131616434020503 0ustar drazzibdrazzibChapter2.Introduction

Chapter2.Introduction

Due to changes in the jEdit API, Antelope plugin versions prior to 2.60 are for jEdit 4.1, versions 2.60 and later require jEdit 4.2 or later.

Disclaimer: Typically, the documentation is not quite up-to-date with the software. There may be some discrepancies between the text and pictures in this guide from what you see when you run the application. If you see a problem with this documentation, please post a bug at http://antelope.tigris.org. Thank you!

Antelope is a graphical user interface for running Ant. It provides a set of buttons, one per target, which makes it easy to start a specific Ant operation. Basically, an Ant build file is opened with Antelope and the targets defined in the build file can be executed by clicking a button. Antelope is much more than a thin wrapper around Ant, however.

Antelope can run in two different environments. It can run as a stand-alone GUI application and as a plugin to jEdit (www.jedit.org), an excellent open source editor for programmers.

As a stand-alone application, Antelope provides the ability to create and edit Ant build files, the ability to run build file targets, and can trace target and task execution in a quasi-debug mode. Output from the build process can be captured to a file and/or to screen and performance statistics can be gathered to guide optimization efforts. Several very useful tasks to extend Ant are included.

As a jEdit plugin, Antelope expands the features of the stand-alone application to nicely integrate with the text editor and with the Console and ErrorList plugins. Antelope has an open API that allows other plugins to utilize Antelope's capabilities.

In either mode, Antelope provides property and reference inspection and the ability to set properties that would be passed as parameters to Ant on the command line.

Figure2.1.Introducing Antelope

Introducing Antelope


antelope-3.5.1.orig/docs/manual/bk03ch15.html0000644000175000017500000002341411131616434020501 0ustar drazzibdrazzibChapter15.Math

Chapter15.Math

The Math task provides support for all the basic mathematical operations provided by the java.lang.Math and java.lang.StrictMath classed. It supports int, long, float and double data types. Nesting of operations is supported to allow computation of formulas like (6 + (7.25 * 3.9))/(2 * 3 * 3) or calculating the area of a circle given a radius (I'm sure this comes up often in builds controlled by Ant!).

In addition to the operations provided by the java.lang.Math and java.lang.StrictMath classes, the Math task provides several additional operations: "add", "subtract", "multiply", "divide", and "mod", which duplicate the basic Java mathematical operations "+", "-", "*", "/", and "%", respectively. In fact, either notation can be used, that is, the operation can be set to "add" or "+", depending only on which you feel is more convenient.

To use this task in your build files, include a task definition like this:


    <taskdef name="math" classname="ise.antelope.tasks.MathTask"/>
   

Table15.1.Math Task Attributes

AttributeDescriptionDefaultRequired
resultThe name of the property to hold the result of the operation.NoneYes
datatypeSets the datatype of the calculation. Allowed values are "int", "long", "float", or "double". Optional, if used, will be applied to all numbers in this math operation.doubleNo
strictIf true, use the methods in the java.lang.StrictMath class.falseNo
operationIf used, any nested Ops will be ignored. This is for convenience for simple calculations.NoneNo
operand1A number to use with the operation specified in the 'operation' attribute.NoneDepends on the specific operation.
operand2A number to use with the operation specified in the 'operation' attribute.NoneDepends on the specific operation.


The 'result' property is reusable.

The Math task supports nested "Op" elements. An Op element represents single mathematical operation, such as "min" or "add".

Table15.2.Op Attributes

AttributeDescriptionDefaultRequired
opSet the name of this operation. Allowed values are one of the method names from java.lang.Math or java.lang.StrictMath, or one of "add", "subtract", "multiply", "divide", or "mod" (or "+", "-", "*", "/", or "%", respectively)NoneYes
datatypeSets the datatype of this calculation. Allowed values are "int", "long", "float", or "double". Optional, default is "double". If the parent Math task has a datatype set, this value will be ignored and the datatype specifed in the task will be used."int"No


The Op element supports nested "Op" elements and nested "Num" elements. A Num represents a number. When an Op is nested in another Op, the nested Op is treated as a Num. The nested elements can be any combination of Op or Num as appropriate for the formula being calculated. Most of the operations provided by java.lang.Math and java.lang.StrictMath operate on one or two numbers. The "+", "-", "*", "/", and "%" operations can task any number of nested numbers.

Table15.3.Num Attributes

AttributeDescriptionDefaultRequired
valueSet the value for this number. Must be able to parse to the datatype set by the parent element or the default datatype set by the task. Two special numbers, pi and e, can be represented by PI and E respectively. ("PI" is the ratio of the diameter of a circle to its radius, "E" is Euler's e, the base for natural logrithms.)NoneYes
datatypeSets the datatype of this number. Allowed values are "int", "long", "float", or "double". Optional, default is "double". If the parent Math task has a datatype set, this value will be ignored and the datatype specifed in the task will be used.doubleNo


Some examples:


    <var name="op1" value="12"/>
    <var name="op2" value="6"/>
    <var name="op" value="+"/>

    <!-- demo plus -->
    <math result="result" operand1="${op1}" operation="${op}" operand2="${op2}" datatype="int"/>
    <echo>${op1} ${op} ${op2} = ${result}</echo>
    <assert name="result" value="18"/>

    <!-- demo reusing result -->
    <math result="result" operand1="${result}" operation="${op}" operand2="${op2}" datatype="int"/>
    <echo>${op1} ${op} ${op2} = ${result}</echo>
    <assert name="result" value="24"/>

    <!-- demo minus -->
    <var name="op" value="-"/>
    <math result="result" operand1="${op1}" operation="${op}" operand2="${op2}" datatype="int"/>
    <echo>${op1} ${op} ${op2} = ${result}</echo>
    <assert name="result" value="6"/>

    <!-- demo multiply -->
    <var name="op" value="*"/>
    <math result="result" operand1="${op1}" operation="${op}" operand2="${op2}" datatype="int"/>
    <echo>${op1} ${op} ${op2} = ${result}</echo>
    <assert name="result" value="72"/>

    <!-- demo divide -->
    <var name="op" value="/"/>
    <math result="result" operand1="${op1}" operation="${op}" operand2="${op2}" datatype="int"/>
    <echo>${op1} ${op} ${op2} = ${result}</echo>
    <assert name="result" value="2"/>

    <!-- demo modulo -->
    <var name="op" value="%"/>
    <math result="result" operand1="${op1}" operation="${op}" operand2="${op2}" datatype="int"/>
    <echo>${op1} ${op} ${op2} = ${result}</echo>
    <assert name="result" value="0"/>

    <!-- demo calculating the area of a circle -->
    <!-- first, calculate the radius -->
    <math result="radius">  <!-- defaults to double datatype -->
        <op type="*">
            <num value="1"/>
            <num value="2"/>
            <num value="3"/>
            <num value="4"/>
            <num value="5"/>
        </op>
    </math>
    <echo> 1 * 2 * 3 * 4 * 5 = ${radius}</echo>

    <!-- now calculate the area -->
    <math result="area" precision="float">
        <op type="*">
            <num value="PI"/>
            <op type="pow">
                <num value="${radius}"/>
                <num value="2"/>
            </op>
        </op>
    </math>
    <echo>area = PI * radius ^ 2 = ${area}</echo>

    <!-- demo calculating a random number between 0 and 100 -->
    <math result="result">
        <op op="rint">
            <op op="*">
                <num value="100"/>
                <op op="random"/>
            </op>
        </op>
    </math>
    <echo>a random number between 0 and 100: ${result}</echo>

    <!-- demo another multiplication -->
    <math result="result" operation="multiply" operand1="17" operand2="13"/>
    <echo>${result}</echo>

antelope-3.5.1.orig/docs/manual/bk01ch08.html0000644000175000017500000001174111131616434020501 0ustar drazzibdrazzibChapter8.Editing the Build File

Chapter8.Editing the Build File

Clicking the "Edit" button puts Antelope in 'edit' mode. Antelope will display a tree representing the build file. Clicking on any item in the tree moves the cursor in the editor to that item in the build file.

As a jEdit plugin, clicking the "Edit" button will open the build file in a jEdit buffer.

As a stand-alone application, clicking the "Edit" button opens the "Edit" tab to edit the build file.

When the file is saved (either by saving the buffer in jEdit or by using the File - Save Build File menu item in stand-alone mode), Antelope will immediately reload the build file to pick up any changes and refresh the button panel to reflect those changes.

Note: If the build file has an xml format error, the target buttons will disappear when the file is saved. To make the buttons reappear, correct the error and resave. Usually the output will give some indication of the error in the build file.

Here is Antelope in edit mode:

Figure8.1.Antelope in 'Edit' Mode

Antelope in 'Edit' Mode


Icons:

An Ant Project.

An imported Ant Project.

An Ant Target in the main project file.

An Ant Target in an imported project file.

An Ant Task.

Note the navigation arrows circled in red in the above image. As you click on items in the edit tree, the cursor in the editor panel will move to that item in the build file. The navigation arrows allow you to go back and forward, much like the back and forward buttons on a web browser. Beware that clicking on a target imported from another file will cause that file to be opened in the editor panel.

Figure8.2.Dependency Tree

Dependency Tree


Right clicking on a target in the edit tree shows a dependency tree for that target. A "dependency tree" shows a list of targets that the selected target will by virtue of the targets being listed in the targets' 'depends' attribute, as well as any targets that may be called by <ant> and <antcall> tasks contained in the target. Like the edit tree, clicking on targets in the dependency tree will also move the cursor in the editor panel to the selected item.

Tip: Antelope can open most xml files and display them in the editor and in the tree. If the xml file is not a build file (as determined by the root element being "project"), then the "Run" and "Trace" mode buttons will be disabled.

antelope-3.5.1.orig/docs/manual/bk03ch12.html0000644000175000017500000001225711131616434020501 0ustar drazzibdrazzibChapter12.FileUtils

Chapter12.FileUtils

The FileUtils task provides a number of useful file information functions, such as readability, writability, length, etc. Caution: this task does not follow the standard Ant convention of property immutability.

To use this task in your build files, include a task definition like this:


    <taskdef name="fileutil" classname="ise.antelope.tasks.FileUtilTask"/>
   

Table12.1.FileUtil Task Attributes

AttributeDescriptionDefaultRequired
fileThe file or directory in question.NoneNo, but does nothing without a file.
propertyWhere to store the answer. Caution: this task will overwrite any existing property with this name.NoneNo


Operations as nested elements:

listfiles Create a list of files and/or directories.

Table12.2.listfiles

AttributeDescriptionDefaultRequired
whatWhat to list, valid values are "files", "dirs", or "all".filesNo
separatorThe separator to use between individual items in the list of files., (comma)No
includepathIf true, include the path with the names in the list. If false, include only the names.trueNo


lastmodified Get the "last modified" date/timestamp of a file.

Table12.3.lastmodified

AttributeDescriptionDefaultRequired
formatA format for the last modified timestamp. Must comply with the standards listed in java.text.SimpleDateFormat.No


These operations have no attributes:

  • canread Is the file readable?

  • canwrite Is the file writable?

  • length Finds the length of the file.

  • filecount Find the number of files in the directory.

  • isdirectory Is the file a directory?

  • isfile Is the file a file?

Only one of the operations can be used at once.

Examples: See the Split for several examples.

antelope-3.5.1.orig/docs/manual/bk03ch03.html0000644000175000017500000001111711131616434020473 0ustar drazzibdrazzibChapter3.Installation

Chapter3.Installation

If you are running your build files from Antelope, these tasks are already installed and nothing more needs to be done. The following discusses installing the tasks by hand for use outside of Antelope.

These Ant tasks are packaged as a part of Antelope, which is an application for running Ant build files. They may also be obtained as a separate package. Depending on the distribution you have on hand, copy either antelope.jar or antelope_tasks.jar into your ${ant.home}/lib directory or add it to your classpath. This is the directory where ant.jar and optional.jar are installed for your Ant distribution.

Once installed, each task that you want to use in a build file must be defined in that build file. Since several of the Antelope tasks are dependent on each other, the preferred way to define them is like this:

       
         <taskdef resource="ise.antelope.tasks.antelope.taskdefs
                  classpath="path/to/AntelopeTasks_3.5.1.jar"/>
       
       

This will load all Antelope tasks without further hassle, and will only load the tasks once. It is not good to load the tasks multiple times, this can cause problems with 'ant' and 'antcall' in particular.

If you don't want to load all of the tasks, the documentation for each task explains in detail what you will need to add to your build file to use the individual task. For example, the Assert tasks says:

        To use this task in your build files, include a task definition like this:
        
        <taskdef name="assert" classname="ise.antelope.tasks.Assert"/>
        <property name="ant.enable.asserts" value="true"/>
        
        

Notice that you may name the tasks whatever you want via 'taskdef'. The names listed in the individual task descriptions are those that are set via the preferred method mentioned above.

As of Antelope version 2.64, the 'AntLib' feature of Ant 1.6 is supported, which provides an alternate way of loading optional tasks. If AntelopeTasks_3.5.1.jar is in the core classpath (in ${ant.home}/lib for example) one can use the namespace short-cut to load them:

        
        <project xmlns:antelope="antlib:ise.antelope.tasks">
          <antelope:try messageproperty="failed">
            <fail>This should fail</fail>
            <echo>This will not be reached</echo>
            <antelope:catch>
              <echo>failed is ${failed}</echo>
            </antelope:catch>
          </antelope:try>
        </project>
        
        

Thanks to Peter Reilly of the Ant development team for this pointer and example.

antelope-3.5.1.orig/docs/manual/style.css0000644000175000017500000000323711131616374020251 0ustar drazzibdrazzib .dummy {color: red} ADDRESS, BLOCKQUOTE, BODY, CAPTION, CENTER, DD, DIR, DIV, DL, DT, FORM, LI, MENU, OL, P, PRE, TD, TH, TR, UL { font-family: verdana, tahoma, geneva, sans-serif; font-size: 12px; color: black; } A { cursor: pointer; background: transparent; text-decoration: none; } A:link {color: black; text-decoration: underline} A:visited {color: gray; text-decoration: underline} A:active {color: black;} A:hover {color: gray; background: white} ADDRESS {font-style: italic} BIG {font-size: 19px} BLOCKQUOTE {font-style: italic} BODY {background: white} BUTTON {cursor: auto} CITE {font-style: italic} .computeroutput { font-family: monospace; border: none; padding: none; background: none; } CODE, KBD, PRE, SAMP, TT {font-size: 12px} CODE, PRE { font-family: monospace; } PRE.PROGRAMLISTING { font-family: monospace; border: solid thin; padding: 2em; background: white; } DT {font-weight: bold} H1, H2, H3, H4, H5, H6 { font-weight: bold; font-family: verdana, tahoma, geneva, sans-serif; color: black; margin: 0 0 0 0; } H1 {font-size: 22px} H2 {font-size: 20px} H3 {font-size: 18px} H4 {font-size: 16px} H5 {font-size: 14px} H6 {font-size: 12px} HTML {margin: 0; padding: 0} INPUT {cursor: auto} OL {list-style: decimal} UL {list-style: disc} PRE {margin-left: 0; white-space: pre} SMALL, SUB, SUP {font-size: 10px} TEXTAREA {cursor: text} TABLE { border: solid thin; background: white; cellpadding: 3; cellspacing: 0; } TD { padding: 3; background: white; } TH { font-weight: bold; text-align: center; margin-left: 0; background: #ADD8E6; color: black; } antelope-3.5.1.orig/docs/manual/bk03ch26.html0000644000175000017500000001460511131616434020505 0ustar drazzibdrazzibChapter26.TestCase Task

Chapter26.TestCase Task

Modeled after the TestCase provided by jUnit, this class is an Ant task that looks through the build file that contains this task, calls a 'setUp' target (if it exists), then all targets whose names start with 'test', and last calls a target named 'tearDown' (if it exists). Both 'setUp' and 'tearDown' are optional targets in the build file.

Ant stores targets in a hashtable, so there is no guaranteed order in which the 'test*' targets will be called. If order is important, use the 'depends' attribue of a target to enforce order, and do not name dependent targets with a name starting with 'test'.

Most unit tests will make use of Assert. As the Assert task requires that the property "ant.enable.asserts" be set to true before it will do anything, this task automatically sets this property to true. The Assert task has a "level" attribute. By default, the level is set to "error", so if the Assert fails, the TestCase fails. If the level is set to "warning", the test case will be marked as a warning rather than a failure. If the level is set to "info" or "debug" and the Assert fails, any message associated with the Assert will be written out, but otherwise will be ignored by TestCase.

To use this task in your build files, include a task definition like this:


    <taskdef name="testcase" classname="ise.antelope.tasks.TestCase"/>
   

Table26.1.TestCase Attributes

AttributeDescriptionDefaultRequired
fileThe file containing tests.NoneYes
enabledDetermines if this test should be ran. By using a property for this attribute, it is easy to turn off/on multiple tests.OnNo
assertenabledGenerally tests will use the Assert task. This attribute sets whether asserts should be enabled.YesNo
failonerrorIf true, cause the build to fail. By default, a failed test does not cause the build to fail, so all tests may have the opportunity to run.NoNo
showoutputIf true, show intermediate test resultsYesNo
showsummaryIf true, show a summary of test results at the end of the test run.YesYes


TestCase is most often used in conjunction with the Suite task.


<project name="mathtest" basedir="." default="suite"
   xmlns:a="antlib:ise.antelope.tasks">

   <description>
     Build file to run unit tests for the Math task
   </description>

   <a:suite>
      <a:testcase file="math_basic_tests.xml"/>
      <a:testcase file="math_rules_tests.xml"/>
      <a:testcase file="math_precision_tests.xml"/>
   </a:suite>

</project>

Here is an example build file containing actual tests. The 'setUp' target will execute first, then the two test targets.


<project name="math_precision_tests" basedir="." default="suite"
   xmlns:a="antlib:ise.antelope.tasks">

   <target name="setUp">
      <echo>Running math precision tests.</echo>
   </target>

   <target name="test10">
      <echo>Circle area test</echo>
      <a:math result="pi">
         <a:op op="*">
            <a:num value="PI"/>
            <a:op op="pow">
               <a:num value="1"/>
               <a:num value="2"/>
            </a:op>
         </a:op>
      </a:math>
      <a:assert message="failed circle area test">
         <a:bool>
            <a:startswith string="${pi}" with="3.141592653589793"/>
         </a:bool>
      </a:assert>
   </target>

   <target name="test11">
      <echo>Division by zero test</echo>
      <!-- division by zero -->
      <a:try>
         <a:math result="x">
            <a:op op="/">
               <a:num value="PI"/>
               <a:num value="0"/>
            </a:op>
         </a:math>
         <fail>Division by 0 succeeded: ${x}</fail>
         <catch>
            <assert/>
         </catch>
      </a:try>
   </target>

</project>

antelope-3.5.1.orig/docs/manual/bk02ch05.html0000644000175000017500000000610511131616416020475 0ustar drazzibdrazzibChapter5.Properties

Chapter5.Properties

Property names should be short yet meaningful. The choice of a property name should be mnemonic -- that is, designed to indicate to the casual observer the intent of its use. One-character property names should be avoided. Property names will be all lowercase with underscore separating individual words.

Examples:


    <property name="build_dir" value="build"/>
    <property name="jar_dir" value="${build_dir}/jars"/>
    <property name="lib_home" value="lib"/>

Properties may be defined in a properties file. These property files should be named the same as the build file name, but with a ".properties" extension.

Properties may be "grouped" using the "dot" notation. For example, suppose the documentation for a project is divided into several manuals: the user manual, the installation manual, a technical support manual, and a examples manual, with the source for each manual residing in a separate directory. Then properties might look like this:


    <property name="docs_dir" value="docs"/>
    <property name="docs.user_manual" value="${docs_dir}/user_manual"/>  
    <property name="docs.install_manual" value="${docs_dir}/installation"/>  
    <property name="docs.tech_manual" value="${docs_dir}/techman"/>  
    <property name="docs.examples_manual" value="${docs_dir}/examples"/>

antelope-3.5.1.orig/docs/manual/bk03ch22.html0000644000175000017500000001671111131616434020501 0ustar drazzibdrazzibChapter22.Grep Task

Chapter22.Grep Task

This task uses a regular expression to do pattern matching against a string and store the match in a property. This is useful for extracting a substring, or checking that an html form contains a particular value.

To use this task in your build files, include a task definition like this:


    <taskdef name="grep" classname="ise.antelope.tasks.Find"/>
   

Table22.1.Grep Task Attributes

AttributeDescriptionDefaultRequired
inThe string to perform the regular expression matching onNoneYes
regexThe regular expression. See the Java API documentation for java.util.regex.Pattern for the details of the syntax for this expression.NoneYes
groupThe regular expression group to return in the property.0No
propertyThe name of a property in which to put the matched value.NoneYes
allmatchesA regex may find multiple matches in the input string. If this attribute is set to true, then the property set after the grep will contain all matches. The individual matches can be separated by using the 'separator' attribute (see below). The default is 'false', that is, only return the first match.falseNo
separatorWhen 'allmatches' is set to true and there are multiple matches, this value will be used to separate the individual matches.${line.separator}No
caseinsensitiveEnables case-insensitive matching.falseNo
commentsPermits whitespace and comments in pattern.falseNo
dotallEnables dotall mode.falseNo
multilineEnables multiline mode.falseNo
unicodecaseEnables Unicode-aware case folding.falseNo
canoneqEnables canonical equivalence.falseNo
unixlinesEnables Unix lines mode.falseNo


Examples:


 <target name="test" description="Test grep">
      <grep in="${response}" regex="(account id=)([0-9]+)" group="2" property="AccountId"/>
      <echo>Account Id: ${AccountId} received for ${user}</echo>
 </target>

This example uses the 'unset' and 'post' tasks along with 'grep' to list the download url's for Ant:



    <target name="test">
      <unset name="ant_download_page"/>
      <post to="http://ant.apache.org/bindownload.cgi"
            verbose="no"
            property="ant_download_page"/>
      <grep in="${ant_download_page}"
            regex="select name=&quot;Preferred.*?&lt;/select"
            dotall="yes"
            property="options"/>

      <unset name="urls"/>
      <grep in="${options}"
         regex="&lt;option.*?&gt;(.*?)&lt;/option&gt;"
         group="1"
         allmatches="yes"
         separator="${line.separator}"
         property="urls"/>
      <echo>${urls}</echo>
    </target>

     [echo] http://apache.gr-linux.com
     [echo] http://www.reverse.net/pub/apache
     [echo] http://government-grants.org/mirrors/apache.org
     [echo] http://apache.mirrors.hoobly.com
     [echo] http://apache.mirrormax.net
     [echo] http://www.ibiblio.org/pub/mirrors/apache
     [echo] http://www.mirrormonster.com/apache.org
     [echo] http://apache.towardex.com
     [echo] http://www.axint.net/apache
     [echo] http://apache.tradebit.com/pub
     [echo] http://www.eng.lsu.edu/mirrors/apache
     [echo] http://mirrors.isc.org/pub/apache
     [echo] http://www.theshell.com/pub/apache
     [echo] http://apache.mirrors.redwire.net
     [echo] http://apache.cs.utah.edu
     [echo] http://www.tux.org/pub/net/apache/dist
     [echo] http://linux.cs.lewisu.edu/apache
     [echo] http://apache.roweboat.net
     [echo] http://apache.secsup.org/dist
     [echo] http://www.signal42.com/mirrors/apache
     [echo] http://apache.mirror99.com
     [echo] http://mirrors.xtria.com/apache
     [echo] http://apache.downlod.in
     [echo] http://apache.mirrors.pair.com
     [echo] http://apache.seekmeup.com
     [echo] http://mirrors.combose.com/apache
     [echo] http://www.wmwweb.com/apache
     [echo] http://apache.intissite.com
     [echo] http://apache.oregonstate.edu
     [echo] http://apache.bestwebcover.com
     [echo] http://ftp.wayne.edu/apache
     [echo] http://mirrors.ccs.neu.edu/Apache/dist
     [echo] http://www.ip97.com/apache.org
     [echo] http://apache.mirrors.versehost.com
     [echo] http://mirrors.playboy.com/apache
     [echo] ftp://ftp.ccs.neu.edu/net/mirrors/Apache/dist
     [echo] ftp://apache.mirrors.pair.com
     [echo] ftp://apache.cs.utah.edu/pub/apache.org
     [echo] ftp://apache.mirrors.redwire.net/pub/apache
     [echo] ftp://ftp.oregonstate.edu/pub/apache
     [echo] ftp://ftp.wayne.edu/apache
     [echo] ftp://mirror.sg.depaul.edu/pub/apache
     [echo] ftp://www.ibiblio.org/pub/mirrors/apache
     [echo] ftp://ftp.tux.org/pub/net/apache/dist
     [echo] ftp://www.reverse.net/pub/apache
     [echo] ftp://apache.secsup.org/pub/apache/dist
     [echo] http://www.eu.apache.org/dist (backup)
     [echo] http://www.apache.org/dist (backup)

antelope-3.5.1.orig/docs/manual/multiple_targets.gif0000644000175000017500000001075211131616374022452 0ustar drazzibdrazzibGIF89aΜcec10cce 罺ތ9,v6q`OE0Y%B<ӡKbX-㼛 nw}7&X7ݍ[C{ pxċN_/.9G2Bf2PF9#(uh6Fr c_ ͔$[q饜IeW橥n硋qh#ve^BF FDMEsiZΨ4;jNZB~)d*$mh縕V)b9䖗F'뫾fީi1O& /^vlh,bL-\ n&KRfHlk;駹c<ߔ$54FImRł~,bu٫6j=mn[ wކMv]zwv xVb;x|/sSՇw.S8|Ή5ԓO)|GsEyo,qˍ87O6OyO?3/og~3T>g PlVxɁl3AUm"ohM" ~z&l^hD7t&<8{ڒbX.ӕ/l8^/+)#D$ؑeP"30S"G7++kGbזx}ca\>0OE8n\Ev/*$LV4 N3ct6!㐄[/U0.D!4.& ʹP,Jk̥.J6q^)LղH_1)Lfҙ탦y>jZ D/fdƙ `"?@D0H%0A_yW~ʶʧ|0~ r(*,p-y !qww8~ z0~N~0y+*@.1} ǁv x H(  22H6xx'~v?h`P'(y-2PVT@w8:7>(`{A(qGPWjgr8I( ' Sn!G0yWX 3X7zGq( 0(۰!}l؆(8RxyWY@yHvw7P(}g{7ȋЉ،a8Yn8X#aꨈވXw!^ dgii?׏t!dauPu iSؐ0zqve jWǑhwHx x%h~v0 ᘒ"鑍}3@5`7!)o4yW#ק 9;=?0 Xx{Ϙ{JiZ[[0y(oU <0KC0LP.Tp=on)}9qiHҹfYmOƝ8"OY\ũ8p虞<Hi9yexV @k韻< MzɠHYn鞷⹡8O ٛkDLN I*IE: AIxPEEPdʗpmѢ&J 9 ؤ (r:t MᦋЦi)x:l j2ِM#Ajr::ZzvpQ:ZzȚʺڬ::zؚں:P:z 嚮꺮zꬃ@PJ[ۯڪ[ʰ  Qp{*۱˱k;! ˲0 -'K&[41;?[6B:2kI 4k$[7J˳;oҋr;;ԋۛt,Q< L#;AfĆ ģ[jJģNj;antelope-3.5.1.orig/docs/manual/bk01ch11.html0000644000175000017500000001710711131616434020475 0ustar drazzibdrazzibChapter11.For Developers

Chapter11.For Developers

Embedding Antelope in Other Applications

Antelope has an open API that allows developers to easily embed Antelope into other applications.

The main object to embed is AntelopePanel. AntelopePanel has three constructors:


   public AntelopePanel()

   public AntelopePanel( CommonHelper helper )

   public AntelopePanel( File build_file, CommonHelper helper, boolean use_internal_menu )

The first no-argument constructor is identical to:


   public AntelopePanel( null, null, true )

And the second constructor is identical to:


   public AntelopePanel( null, helper, true )

The third constructor allows the most flexibility:


   public AntelopePanel( File build_file, CommonHelper helper, boolean use_internal_menu )

  • build_file If supplied a build file, the AntelopePanel will open the build file and construct it's button panel from it.
  • helper CommonHelper is an interface and has a number of methods that may be provided by applications wishing to interact with the AntelopePanel. The CommonHelper interface will be covered in more detail below.
  • use_internal_menu This boolean setting tells AntelopePanel whether or not to use it's internal menu. Applications may provide their own, or the default menu provided by AntelopePanel can be used. When Antelope is running as a jEdit plugin, the internal menu is used, when running as a stand-alone application, it is not.

The proper way to have your application interact with AntelopePanel is by writing a class that implements the CommonHelper interface.




package ise.antelope.common;

import java.awt.event.ActionListener;

/**
 * Objects that want to manipulate AntelopePanel must implement this
 * interface.
 */
public interface CommonHelper extends ActionListener {

   /**
    * Event ID for trace event.
    */
   public final static int TRACE_EVENT = 550927;

   /**
    * Event ID for edit event.
    */
   public final static int EDIT_EVENT = 470226;

   /**
    * AntelopePanel will pass the target execution thread to the helper.
    * Implementors of this interface may interrupt the thread to cause
    * AntelopePanel to stop running a target.
    *
    * @param thread  the execution thread
    */
   public void setTargetExecutionThread( Thread thread );

   /**
    * Check if the helper can save before running a target.
    *
    * @return   true if the helper can save files.
    */
   public boolean canSaveBeforeRun();

   /**
    * Tell the helper to save now.
    */
   public void saveBeforeRun();

   /**
    * Tell the helper to clear its error source. This was implemented to
    * support the ErrorList plugin for jEdit, other editors may hava a similar
    * need.
    */
   public void clearErrorSource();

   /**
    * Should the AntelopePanel show its Edit button? Clicking the Edit button
    * should cause AntelopePanel to show the build file in an editor.
    *
    * @return  true if the AntelopePanel should show an edit button.
    */
   public boolean canShowEditButton();

   /**
    * An action that the helper would like to have happen when the
    * Edit button is clicked.
    *
    * @return   The edit button action
    */
   public ActionListener getEditButtonAction();


   /**
    * The action that the helper would like to have happen when the
    * Run button is clicked.
    *
    * @return   The run button action
    */
   public ActionListener getRunButtonAction();

   /**
    * Opens the given file in an editor.
    * @param the file to open.
    */
   public void openFile( java.io.File f );

   /**
    * Generally, the classloader returned by the helper will probably be null,
    * but some apps, like jEdit, use special classloaders. As AntProject needs
    * direct access to the classloader that loads Ant, the helper should pass
    * the classloader via this method.
    *
    * @return   The classloader that loaded Ant.
    */
   public ClassLoader getAntClassLoader();

   /**
    * The Ant installation that the helper uses may not be in the application classpath.
    * AntelopePanel needs to know where the Ant jars are located so it can run Ant
    * properly. Implementers may return null, meaning that the Ant jars are already
    * in the classpath.
    * <p>
    * <strong>WARNING:</strong> this method is likely to change. The helper should
    * not need to provide a list of jars, rather, it should provide an ANT_HOME
    * directory. Antelope should be smart enough to find the jars given the
    * directory, plus should automatically look in the standard Ant library
    * locations.
    * @return a list of the jars used by Ant. The individual list items must be Strings
    * representing the file names of the jar files. Note that other jars may be included,
    * such as custom Ant task libraries.
    */
   public java.util.List getAntJarList();

}

At a minimum, you'll need to include all classes in the ise.antelope.common and ise.library packages.

antelope-3.5.1.orig/docs/manual/bk03ch18.html0000644000175000017500000000351211131616434020501 0ustar drazzibdrazzibChapter18.SSH and SCP

Chapter18.SSH and SCP

The ssh and scp tasks are no longer included in the main Antelope distribution as they are scheduled to be released as part of Ant 1.6.

antelope-3.5.1.orig/docs/manual/Wrench16.gif0000644000175000017500000000100311131616374020450 0ustar drazzibdrazzibJFIFHHC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222"!1"#Q$!A"1Qa ?|s] {)q3'! i$@| 0(&2h߀M7!vjKERrDyRIDϷ!os⎡vfvNqn0bU ?DdIe7lJ '9lqvXqD@A r8o/uߩy|J#b2=7%! úr WXE( Gzkantelope-3.5.1.orig/docs/manual/bk01ch05s03.html0000644000175000017500000000461711131616434021030 0ustar drazzibdrazzibAntelope as a jEdit Plugin

Antelope as a jEdit Plugin

Due to changes in the jEdit API, Antelope plugin versions prior to 2.60 are for jEdit 4.1, versions 2.60 and later require jEdit 4.2 or later.

Here is Antelope running in jEdit:

Figure5.6.Antelope in jEdit

Antelope in jEdit


Errors found by Ant during a build (for example, a compilation error) will be shown in the ErrorList plugin.

antelope-3.5.1.orig/docs/manual/bk01ch13.html0000644000175000017500000000452211131616434020474 0ustar drazzibdrazzibChapter13.Support

Chapter13.Support

Please visit the project web pages at http://antelope.tigris for reporting bugs, user mailing lists, and other technical resources. This is also the location for finding the latest releases. In particular, if you are using Antelope as a jEdit plugin, you will invariably find newer versions on the Antelope project web site than from jEdit's plugin manager.

You can also contact me directly at

antelope-3.5.1.orig/docs/manual/bk02ch01.html0000644000175000017500000000542611131616416020476 0ustar drazzibdrazzibChapter1.Introduction

Chapter1.Introduction

Why Have Code Conventions

Code conventions are important to software developers for a number of reasons:

  • 80% of the lifetime cost of a piece of software goes to maintenance.

  • Hardly any software is maintained for its whole life by the original author.

  • Code conventions improve the readability of the software, allowing engineers to understand new code more quickly and thoroughly.

  • If you ship your source code as a product, you need to make sure it is as well packaged and clean as any other product you create.

These same reasons apply to build engineers maintaining Ant build files.

Keep in mind that these are guidelines, not hard and fast rules. The ultimate goal is readability and maintainability.

These guidelines have been compiled from the Ant user guide, Sun's Java coding style guidelines, example build files from various Jakarta applications, and e-mail messages on the Ant mailing lists.

antelope-3.5.1.orig/docs/manual/bk03ch04.html0000644000175000017500000001766211131616434020507 0ustar drazzibdrazzibChapter4.Assert Task

Chapter4.Assert Task

The Assert task adds an assertion capability to Ant projects. This task works in a manner very similar to the Java assert keyword, and provides a limited "design by contract" facility to Ant. This is very useful for testing build scripts prior to putting them into production.

The Assert task verifies that a given property has a given value and throws a BuildException if the property value is not as expected or the property does not exist.

Also like Java's assert keyword, the Assert task must be 'turned on' using the property ant.enable.asserts. If not set, or is set to false, the Assert task works exactly like the Sequential task. If the Variable task is used to define this property, then it can be turned on and off as needed throughout a build.

This task can hold other tasks including Assert.

The Assert task may contain one 'bool' element. The 'bool' element is identical to the ConditionTask, but unlike the ConditionTask, is actually a Task. The 'bool' element can contain all the conditions permitted by the ConditionTask, plus the IsPropertyTrue, IsPropertyFalse, StartsWith, EndsWith, IsGreaterThan, IsLessThan, DateTimeBefore, DateTimeDifference, MathEquals conditions. See the If task for examples of using these conditionals.

To use this task in your build files, include a task definition like this:


    <taskdef name="assert" classname="ise.antelope.tasks.Assert"/>
    <property name="ant.enable.asserts" value="true"/>

Table4.1.Assert Task Attributes

AttributeDescriptionDefaultRequired
nameThe name of the property to test for.noneYes
existsTest for existence or non-existence of the property.TrueNo
valueThe value to test for, implies 'exists=true'. If the value in the project is different than this value, a BuildException will be thrown and the build will stop.noneNo
executeShould the tasks contained in this task be executed? It may be useful to set this to false when testing build files.TrueNo
failonerrorShould the build halt if the assertion fails? Setting this to false is contrary to the intented use of assertions, but may be useful in certain situations. TrueNo
messageA message to include with the output in the event of this assert failing.noneNo
levelA "level" for the assert, similar to debug levels. Valid values are 'error', 'warning', 'info', 'debug'.errorNo


As stated above, the Assert task may contain a nested "bool" task, otherwise, the Assert task does not support any nested elements apart from Ant tasks. Any valid Ant task may be embedded within the assert task.

The "level" attribute is only (so far) useful when Assert is used in conjunction with the Testcase task. Setting this attribute to "warning", "info", or "debug" will force "failonerror" to false.

In the following example, the first assert task checks that the wait property exists and does not execute the echo and sleep tasks. The second assert task checks that the wait property exists, has a value of 2, and executes the echo task.


     <property name="wait" value="2"/>
     <assert name="wait" execute="false">
        <echo>
            Waiting ${wait} seconds...
            Click the red button to stop waiting.
        </echo>
        <sleep seconds="${wait}"/>
     </assert>
     <assert name="wait" value="2" execute="true">
        <echo>done waiting!</echo>
     </assert>

The next example shows Assert being used in a unit test for the "limit" task:


  <property name="ant.enable.asserts" value="true"/>
  <target name="test2">
    <!-- should not stop 'sleep' task, should print out '_passed_' -->
    <stopwatch name="timer"/>
    <limit maxwait="5">
        <sleep seconds="1"/>
        <echo>_passed_</echo>
    </limit>
    <stopwatch name="timer" action="total"/>
    <assert message="Too much time.">
        <bool>
            <islessthan arg1="${timer}" arg2="2"/>
        </bool>
    </assert>
  </target>

If the ant.enable.asserts property is set to false, then in the above example, the echo, sleep, and echo tasks will all execute.

antelope-3.5.1.orig/docs/manual/options_general.gif0000644000175000017500000001621411131616374022255 0ustar drazzibdrazzibGIF89a`{}{{{ֵJY{Ɣkycikq焎Za}RaZisƌcecƾBAB!Created with The GIMP! ,`ϒ%&&'@a" "DÆ#@1"ŋ*TȨ*@ IrE(O\bE˗.]b8]s0 A( G"]*S3F!ժUkʕ6h+h@F۷n.]suš/_:ֱc0:+Nb<Ccr˔)Ǐ@<BӧH Sbk67p 0;r퀿~OrJOo 3Ѣwgܘq'ӛ\6m֤"O>{tiJԀMՀWm`W Yb%mW]5^:ׇ6c-fbc9ًij4  4XbO> t@@Av=4CUxqG%tzJ4LʹSMSQD%h2TTB%iXYWbJ֦e k*רj!^#VX٬jYf/ٮmگ@i7' @@ H0F۴&A %Tc<$e]BfdЙi]w xYzxJ (6$hOʟQ1耐NZ *xn:!hC\*zXL+p˸4"@' P|2ۑ]n 5]>:esD'fef]D\& y$yd|7%7606Ei bUŀO)*]n_∯"Va֚d0rY}l͌Lj$P=rm C߶  M6NpN;]=%, t dn-Qd۹Jy^|\_} ~x?EݷXrz[ a$cU+]ebb*X  !ALgp' T 4a % @iN)q+x>gRӗ&&LzD=7M$lv'mOjS||t[װxa{ˊ2U cU2ũꍂ)Y*'+̭ 2-b fΈn4`' Zt8Y8`xGB܎ nxA DӐA`x& Bb"f=;oe&G=.W> ?1_bfaa8_>ơdBTfGeHA9C]|HQ("jxBi,aDLJ0trʉRy=PT[&QgJb߶bF -;\*~3Uv@IH?ɑ=9F 4yx")G˨OyQ9YVLyU$R6uZy6Ny6$Pmfyoirju ӝ4^nmɡ\]ʚh--]8v8Z ؇(cn\i>תp~r>\vx综|>~肞Ƅ^-|.t.-ے~甮-gǝ M MF .˝w]yƯކ\N ,WƳTɞ埜c\49 p~L*-.[} ^)>Aםk n~$>C=N0i?^4P=Ů݀,.S~<!TV֫LO~H\pAl~$/_N9fh永@G΍NP;T/VZo\+`_?~[fbȌl?nmrt_xw_~ߵX;oo?^ߺĸ&_R_X^?k_lď_so?y؟/-柉[_tM "8HXhx)9IYiy9b`):JZjzYYJ[k{JK8;L\l|;<( -=M,,\ .y--~<^~/?OZϏx//#0v-|1*$ZEm;zXh9$KJ ϤʕP| ˘4ki3Nh8w'СD'6X4RRB:})ԩTIլ\n vװdu-6ٴlUm ۸t/έݼ| e=X8c827Ȓ+Gl91̚;9-ТK"m:)Ԫ[;\ѵagݵj7ᄄ'n8y3o~9ҧn]5즷s5/o(Y-ݍ8Rv#@dFdJ.dN> eRNIeV^eZne]$pۘdf晶llڛp&眥ighxeQZgL*hGJgK,h> iNJi$Win饃iBjA礊ѩ2H: :4 [ + kH^6>㬱жcs-;RkȸChapter19.AntFetch

Chapter19.AntFetch

AntFetch is identical to the standard 'Ant' task, except that it allows properties from the new project to be set in the original project.

To use this task in your build files, include a task definition like this:


    <taskdef name="antfetch" classname="ise.antelope.tasks.AntFetch"/>
   

Some background may be in order: When the <ant> task is used, in actuality, a new Ant project is created, and depending on the inheritAll property, it is populated with properties from the original project. Then the target in this new project is executed. Any properties set in the new project remain with that project, they do not get "passed back" to the original project. So, for example, if the target in the new project sets a property named "image.directory", there is no reference to that property in the original. Here's an example of what I mean:

Suppose that the "fillImageDirectory" target sets a property named "image.directory" and I call the following:


    <ant dir="${image.project} target="fillImageDirectory"/>
    <echo>${image.directory}</echo>

The output of the echo task will be ${image.directory}, not whatever was set in the "fillImageDirectory" target.

The AntFetch task allows that image.directory property to be set in the original project. The attributes for AntFetch are identical to the 'Ant' task, with one additional, optional attibute. This attribute is named "return" and can be either a single property name or a comma separated list of property names.

Assuming that "fillImageDirectory" actually sets a property named "image.directory", the following example will print out the directory name:


    <antfetch dir="${image.project} target="fillImageDirectory" return="image.directory"/>
    <echo>${image.directory}</echo>

And this one will also print out the thumbnail directory:


    <antfetch dir="${image.project} target="fillImageDirectory" return="image.directory, thumbnail.directory"/>
    <echo>${image.directory}</echo>
    <echo>${thumbnail.directory}</echo>

The attributes for AntFetch are identical to the 'ant' task, with one additional, optional attibute. This attribute is named "return" and can be either a single property name or a comma separated list of property names.

Table19.1.AntFetch Attributes

AttributeDescriptionDefaultRequired
returnA comma separated list of property names. Whitespace is allowed, so either "a,b" or "a, b" are acceptable.NoneNo


For other attribute and nested element information and more examples, see the documentation for the "ant" task in the Ant documentation.

antelope-3.5.1.orig/docs/manual/bk03ch14.html0000644000175000017500000000546311131616434020504 0ustar drazzibdrazzibChapter14.UID

Chapter14.UID

The UID task generates a unique ID. This ID may be either a unique string or integer.

To use this task in your build files, include a task definition like this:


    <taskdef name="uid" classname="ise.antelope.tasks.UIDTask"/>
   

Table14.1.UID Task Attributes

AttributeDescriptionDefaultRequired
nameName of a property to store the unique ID.NoneYes
intIf true, generate a unique integer.falseNo


Examples:


<uid name="uid_1"/>
<echo>uid_1 = ${uid_1}</echo>
<uid name="uid_2" int="yes"/>
<echo>uid_2 = ${uid_2}</echo>


     [echo] uid_1 = -4a1a8b86:10728498757:-7fff
     [echo] uid_2 = 2

antelope-3.5.1.orig/docs/manual/RedTarget16.gif0000644000175000017500000000160411131616374021112 0ustar drazzibdrazzibGIF89af3̙f3f3ffffff3f3333f333f3f3̙f3̙̙̙̙f̙3̙ffffff3f3333f333f3̙f3̙̙f3̙f3ff̙ffff3f33̙33f333̙f3ffffff3ffff̙fff3fffffff3ffffffffffff3fff3f3f3f3ff33f3ffffff3f3333f333333̙3f3333333f3333f3f3f3ff3f33f33333333f333333333f333f3̙f3f3ffffff3f3333f333f3! ,a H A+F(T #Xqp,t() TŽ 24q+%%K#Jq`H+X(N#Q1>4 ;antelope-3.5.1.orig/docs/manual/bk03ch06.html0000644000175000017500000000747411131616434020511 0ustar drazzibdrazzibChapter6.SwitchTask

Chapter6.SwitchTask

The "Switch" task works much like the Java "switch" construct. It supports nested "case" elements, which in turn, support nested "break" elements. There is also a "default" case element, so this should be very natural for Java developers to use.

Table6.1.Switch Task Attributes

AttributeDescriptionDefaultRequired
nameThe name of a property whose value will be used for the switch.NoneYes


Table6.2."case" and "default" Attributes

AttributeDescriptionDefaultRequired
valueThe value of of the property used for the switch. If this value equals the property value, then all tasks in this 'case' will be executed.NoneYes



<property name="foo" value="bar"/>
<switch name="foo">
    <case value="baz">
        <echo>Executing case baz</echo>
        <break/>
    </case>
    <case value="bar">
        <echo>Executing case bar</echo>
        <if name="foo" value="bar">
            <echo>breaking from the if</echo>
            <break/>
        </if>
        <echo>Falling through to case "bat"</echo>
    </case>
    <case value="bat">
        <echo>Executing case bat</echo>
        <break/>
    </case>
    <default>
        <echo>Executing default case</echo>
        <break/>
    </default>
</switch>

antelope-3.5.1.orig/docs/manual/bk03ch13.html0000644000175000017500000003476211131616434020507 0ustar drazzibdrazzibChapter13.StringUtils

Chapter13.StringUtils

The StringUtils task provides a number of useful string manipulation functions, such as converting a string to upper or lower case, trimming white space, finding a substring, etc. Caution: this task does not follow the standard Ant convention of property immutability.

To use this task in your build files, include a task definition like this:


    <taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask"/>
   

Table13.1.StringUtil Task Attributes

AttributeDescriptionDefaultRequired
stringThe string to manipulate.NoneNo
propertyWhere to store the manipulated string. Caution: this task will overwrite any existing property with this name.NoneNo


Operations as nested elements:

Table13.2.indexof, lastindexof: Find the index of or the last index of a substring.

AttributeDescriptionDefaultRequired
stringThe string to find the index of.NoneNo
fromindexWhere to start looking.0No


Table13.3.substring: Get a substring from the string.

AttributeDescriptionDefaultRequired
beginindexStart of substring.0No
endindexEnd of substring.End of string.No


Table13.4.replace: Replace parts of the string.

AttributeDescriptionDefaultRequired
regexPattern to replace.NoneNo
replacementWhat to replace with.NoneNo


Table13.5.sort: Sort items in a string.

AttributeDescriptionDefaultRequired
separatorThe character separating individual items in the string.Any of tab, new line, carriage return, line feed, or space.No


This is useful for sorting a comma separated list or a property value that spans several lines.

Table13.6.messagebox: Put the string in a box for nice display.

AttributeDescriptionDefaultRequired
titleTitle for the message box.NoneNo
width Maximum width in characters for the message box. Lines will be wrapped to fit inside the box. The box will not stretch to this width if the message is less than width - 4 characters wide. 60No


These operations have no attributes:

  • lowercase Converts the string to lowercase.

  • uppercase Converts the string to uppercase.

  • length Finds the length of the string.

  • trim Removes white space from boths ends of the string.

More than one of the operations can be used at once, that is, you can convert a string to lowercase and trim it at the same time. See below for examples.

Examples:

Convert a string to lower case:


   <target name="test1">
      <property name="prop1" value="ABCDE"/>
      <echo>prop1 before = ${prop1}</echo>
      <a:stringutil string="${prop1}" property="prop1">
         <a:lowercase/>
      </a:stringutil>
      <echo>prop1 after = ${prop1}</echo>
      <a:assert message="prop1, expected abcde, got ${prop1}">
         <bool>
            <equals arg1="abcde" arg2="${prop1}"/>
         </bool>
      </a:assert>
   </target>

Convert a string to upper case:


   <target name="test2">
      <property name="prop2" value="abcdefgh"/>
      <echo>prop2 before = ${prop2}</echo>
      <a:stringutil string="${prop2}" property="prop2">
         <a:uppercase/>
      </a:stringutil>
      <echo>prop2 after = ${prop2}</echo>
      <a:assert message="prop2, expected ABCDEFGH, got ${prop2}">
         <bool>
            <equals arg1="ABCDEFGH" arg2="${prop2}"/>
         </bool>
      </a:assert>
   </target>

Convert a string to upper case and trim white space:


   <target name="test3">
      <property name="prop3" value=" abcdefgh "/>
      <echo>prop3 before = ${prop3}</echo>
      <a:stringutil string="${prop3}" property="prop3">
         <a:uppercase/>
         <a:trim/>
      </a:stringutil>
      <echo>prop3 after = ${prop3}</echo>
      <a:assert message="prop3, expected ABCDEFGH, got ${prop3}">
         <bool>
            <equals arg1="ABCDEFGH" arg2="${prop3}"/>
         </bool>
      </a:assert>
   </target>

Convert a string to upper case, trim white space, and find a substring:


   <target name="test4">
      <property name="prop4" value=" abcdefgh "/>
      <echo>prop4 before = ${prop4}</echo>
      <a:stringutil string="${prop4}" property="prop4">
         <a:uppercase/>
         <a:trim/>
         <a:substring beginindex="3"/>
      </a:stringutil>
      <echo>prop4 after = ${prop4}</echo>
      <a:assert message="prop4, expected DEFGH, got ${prop4}">
         <bool>
            <equals arg1="DEFGH" arg2="${prop4}"/>
         </bool>
      </a:assert>
   </target>

Get the length of a string:


   <target name="test7">
      <property name="prop7" value="abcdefgh"/>
      <echo>prop7 before = ${prop7}</echo>
      <a:stringutil string="${prop7}" property="prop7">
         <a:length/>
      </a:stringutil>
      <echo>prop7 length = ${prop7}</echo>
      <a:assert message="prop7, expected 8, got ${prop7}">
         <bool>
            <mathequals arg1="8" arg2="${prop7}"/>
         </bool>
      </a:assert>
   </target>

Sort a list:


   <target name="test12">
      <property name="prop12" value="a,b,c,d,e,f,g,h,a,b,c,d,e,f,g,h"/>
      <echo>prop12 before = ${prop12}</echo>
      <a:stringutil string="${prop12}" property="prop12">
         <a:sort separator=","/>
      </a:stringutil>
      <echo>prop12 sorted = ${prop12}</echo>
      <a:assert message="prop12, expected 'a,a,b,b,c,c,d,d,e,e,f,f,g,g,h,h', got ${prop12}">
         <bool>
            <equals arg1="a,a,b,b,c,c,d,d,e,e,f,f,g,g,h,h" arg2="${prop12}"/>
         </bool>
      </a:assert>
   </target>

Message boxes:


   <target name="test13">
      <property name="prop13" value="Character boundary analysis allows users to interact with characters as they expect to, for example, when moving the cursor around through a text string. Character boundary analysis provides correct navigation of through character strings, regardless of how the character is stored. For example, an accented character might be stored as a base character and a diacritical mark. What users consider to be a character can differ between languages."/>
      <echo>prop13 before = ${prop13}</echo>
      <a:stringutil string="${prop13}" property="prop13">
         <a:messagebox/>
      </a:stringutil>
      <echo>prop13 in messagebox:${line.separator}${prop13}</echo>

      <property name="prop13a" value="Character boundary analysis allows users to interact with characters as they expect to, for example, when moving the cursor around through a text string. Character boundary analysis provides correct navigation of through character strings, regardless of how the character is stored. For example, an accented character might be stored as a base character and a diacritical mark. What users consider to be a character can differ between languages."/>
      <a:stringutil string="${prop13a}" property="prop13a">
         <a:messagebox title="About Character Boundaries"/>
      </a:stringutil>
      <echo>prop13a in messagebox with title:${line.separator}${prop13a}</echo>

   </target>

test13:
     [echo] prop13 before = Character boundary analysis allows users to interact with characters as they expect to, for
example, when moving the cursor around through a text string. Character boundary analysis provides correct navigation of
 through character strings, regardless of how the character is stored. For example, an accented character might be store
d as a base character and a diacritical mark. What users consider to be a character can differ between languages.
     [echo] prop13 in messagebox:
     [echo]
     [echo] +----------------------------------------------------------------------+
     [echo] | Character boundary analysis allows users to interact with characters |
     [echo] | as they expect to, for example, when moving the cursor around        |
     [echo] | through a text string. Character boundary analysis provides correct  |
     [echo] | navigation of through character strings, regardless of how the       |
     [echo] | character is stored. For example, an accented character might        |
     [echo] | be stored as a base character and a diacritical mark. What users     |
     [echo] | consider to be a character can differ between languages.             |
     [echo] +----------------------------------------------------------------------+
     [echo] prop13a in messagebox with title:
     [echo]
     [echo] +----------------------------------------------------------------------+
     [echo] | About Character Boundaries                                           |
     [echo] +----------------------------------------------------------------------+
     [echo] | Character boundary analysis allows users to interact with characters |
     [echo] | as they expect to, for example, when moving the cursor around        |
     [echo] | through a text string. Character boundary analysis provides correct  |
     [echo] | navigation of through character strings, regardless of how the       |
     [echo] | character is stored. For example, an accented character might        |
     [echo] | be stored as a base character and a diacritical mark. What users     |
     [echo] | consider to be a character can differ between languages.             |
     [echo] +----------------------------------------------------------------------+
[antlib:ise.antelope.tasks:testcase] test13 passed.

antelope-3.5.1.orig/docs/manual/bk02ch03.html0000644000175000017500000000455111131616416020476 0ustar drazzibdrazzibChapter3.Build File Structure and Formatting

Chapter3.Build File Structure and Formatting

Build File Structure

Ant build files will be arranged with the project description first, followed by "global" properties, followed by targets. Properties and targets do not need to be sorted, however, the default target specified by the project must be the first target listed.

antelope-3.5.1.orig/docs/manual/bk01ch09.html0000644000175000017500000001304311131616434020477 0ustar drazzibdrazzibChapter9.Tracing Target Execution

Chapter9.Tracing Target Execution

Antelope is put into 'tracing mode' when the "Trace" button is clicked. When in tracing mode, the background of the button panel will be blue. When in tracing mode, clicking the target buttons will not actually execute the target. Instead, the output will show the specific order of execution of tasks performed by the target and targets that the selected target depends on. This is useful for figuring out exactly what a specific target does and the order of operations. To turn off tracing mode, click the "Trace" button a second time.

In general, targets are not parsed below task level, that is, nested task attributes are not displayed. However, two tasks are treated specially as they have a direct bearing on how a target executes. These two tasks are ant and antcall. If the trace encounters the ant task, the buildfile and target attributes will be displayed, the build file loaded, and the target traced in that build file. If the trace encounters an antcall task, the target attribute will be parsed and the target will be traced.

Here is a sample trace:


Tracing target: deploy-all
Legend: <target>[task]

<deploy-all>
<clean>[delete]
<deploy-all>[javac deprecation=on debug=on destdir=build srcdir=src
 includes=ise/ excludes=ise/antelope/plugin/ includejavaruntime=yes source=1.5]
<deploy-all>[copy todir=build]
<deploy-all>[jar jarfile=/usr/local/java/antelope/Antelope]
</deploy-all>

Done tracing target: deploy-all

And a line by line explanation:

Table9.1.Target Trace Example Explanation

Tracing target: deploy-allThe trace is going to trace the deploy-all target.
Legend: <target>[task]Targets shown with angle brackets, tasks with square brackets.
<deploy-all>The trace is starting on the deploy-all target.
<clean>[delete]The deploy-all target depends on the clean target, which performs a 'delete' task.
<deploy-all>[javac deprecation=on debug=on destdir=build srcdir=src includes=ise/ excludes=ise/antelope/plugin/ includejavaruntime=yes source=1.5]The deploy-all target executes a 'javac' task. The parameters for the task are shown.
<deploy-all>[copy todir=build]The deploy-all target executes a 'copy' tasks. Most likely, this tasks has nested includes and/or excludes, which are not shown in the trace.
<deploy-all>[jar jarfile=/usr/local/java/antelope/Antelope]The deploy-all target executes the 'jar' task.
</deploy-all>The trace has reached the end of the deploy-all target.
Done tracing target: deploy-allObviously, the trace is done.


So the 'deploy_all' target first causes the 'clean' target to execute a 'delete' task, then causes the 'compile' target to execute a 'javac' task, and finally causes the 'deploy' target to create a jar file.

Figure9.1.Antelope in 'Trace' Mode

Antelope in 'Trace' Mode


antelope-3.5.1.orig/docs/manual/bk03ch05s02.html0000644000175000017500000002734711131616420021031 0ustar drazzibdrazzibMore Conditions

More Conditions

These conditions are suitable for use in the <bool> element. Unfortunately, they cannot be used in the <condition> task, although all conditions for the <condition> task can be used with the bool and the bool can be used anywhere that <condition> can be used.

IfPropertyTrue

Given a property name, tests whether the value for that property equals "true" (or "yes" or "on").

Table5.2.IfPropertyTrue Attributes

AttributeDescriptionRequired
propertyThe name of a property to test the value of.Yes



<ispropertytrue property="myprop"/>
<ispropertytrue property="${someprop}"/>

IfPropertyFalse

Given a property name, tests whether the value for that property equals "false" (or "no" or "off").

Table5.3.IfPropertyFalse Attributes

AttributeDescriptionRequired
propertyThe name of a property to test the value of.Yes



<ispropertyfalse property="myprop"/>
<ispropertyfalse property="${someprop}"/>

StartsWith

Given a property name, tests whether the value for that property starts with a specified string.

Table5.4.StartsWith Attributes

AttributeDescriptionRequired
stringThe string to test.Yes
withCheck if 'string' starts with this value.Yes



<startswith string="abcdefg" with="abc"/>
<startswith string="${myprop}" with="foo"/>

EndsWith

Given a property name, tests whether the value for that ends with with a specified string.

Table5.5.EndsWith Attributes

AttributeDescriptionRequired
stringThe string to test.Yes
withCheck if 'string' ends with this value.Yes



<endswith string="abcdefg" with="efg"/>
<endswith string="${myprop}" with="bar"/>

IsGreaterThan

Tests whether the first argument is greater than the second argument. Will automatically treat the arguments as numbers if both arguments consists of only the characters 0 through 9 and optionally a decimal point. Otherwise, a String comparison is used.

Table5.6.IsGreaterThan Attributes

AttributeDescriptionRequired
arg1The first argument.Yes
arg2The second argument.Yes



<!-- evaluates to true -->
<isgreaterthan arg1="6.02" arg2="4"/>

<!-- evaluates to false -->
<isgreaterthan arg1="bar" arg2="foo"/>

IsLessThan

Tests whether the first argument is less than the second argument. Will automatically treat the arguments as numbers if both arguments consists of only the characters 0 through 9 and optionally a decimal point. Otherwise, a String comparison is used.

Table5.7.IsLessThan Attributes

AttributeDescriptionRequired
arg1The first argument.Yes
arg2The second argument.Yes



<!-- evaluates to false -->
<islessthan arg1="6.02" arg2="4"/>

<!-- evaluates to true -->
<islessthan arg1="bar" arg2="foo"/>

DateBefore, TimeBefore

Tests whether the first date/time is before the second date/time.

Table5.8.DateBefore, TimeBefore

AttributeDescriptionRequired
datetime1The first date/time.Yes
datetime2The second date/time.Yes
formatThe format of the date/time stamps.Yes
lenientWhether the datetime parser should use lenient parsing, defaults to true.No



   <target name="test1">
      <a:assert>
         <bool>
            <not>
            <datebefore datetime1="2005-09-09 14:58:36" datetime2="2005-07-11 14:58:36" format="yyyy-MM-dd HH:mm:ss"/>
            </not>
         </bool>
      </a:assert>
   </target>

   <target name="test2">
      <a:assert>
         <bool>
            <not>
            <timebefore datetime1="22:58:36" datetime2="10:58:36" format="HH:mm:ss"/>
            </not>
         </bool>
      </a:assert>
   </target>

   <target name="test3">
      <a:assert>
         <bool>
            <timebefore datetime1="2005" datetime2="2030" format="yyyy"/>
         </bool>
      </a:assert>
   </target>

   <target name="test4">
      <a:assert>
         <bool>
            <timebefore datetime1="01:00:00" datetime2="03:00:00" format="hh:mm:ss"/>
         </bool>
      </a:assert>
   </target>

DateDifference, TimeDifference

Tests that the difference between two dates or times is a certain value.

Table5.9.DateDifference, TimeDifference

AttributeDescriptionRequired
datetime1The first date/time.Yes
datetime2The second date/time.Yes
formatThe format of the date/time stamps.Yes
lenientWhether the datetime parser should use lenient parsing, defaults to true.No
valueThe expected difference between the 2 datetimes.No, default is 0
unitSets the unit for the difference between the 2 datetimes. For example, if value is 12 and unit is "hours", then this condition checks that the difference between the 2 datetimes is 12 hours. Valid values are "millisecond", "second", "minute", "hour", "day", "week", "month", "year".Yes



   <target name="test1">
      <a:assert message="Difference between dates is not 60 days.">
         <bool>
            <datedifference datetime1="2005-09-09 14:58:36" datetime2="2005-07-11 14:58:36" format="yyyy-MM-dd HH:mm:ss" value="60" unit="day"/>
         </bool>
      </a:assert>
   </target>

   <target name="test2">
      <a:assert message="Difference between hours is not 12.">
         <bool>
            <timedifference datetime1="22:58:36" datetime2="10:58:36" format="HH:mm:ss" value="12" unit="hour"/>
         </bool>
      </a:assert>
   </target>

   <target name="test3">
      <a:assert message="Difference between years is not 25.">
         <bool>
            <timedifference datetime1="2005" datetime2="2030" format="yyyy" value="25" unit="year"/>
         </bool>
      </a:assert>
   </target>

   <target name="test4">
      <a:assert message="Difference between minutes is not 120.">
         <bool>
            <timedifference datetime1="01:00:00" datetime2="03:00:00" format="hh:mm:ss" value="120" unit="minute"/>
         </bool>
      </a:assert>
   </target>

   <target name="test5">
      <a:assert message="Difference between seconds is not 7200.">
         <bool>
            <timedifference datetime1="01:00:00" datetime2="03:00:00" format="hh:mm:ss" value="7200" unit="second"/>
         </bool>
      </a:assert>
   </target>

antelope-3.5.1.orig/docs/manual/bk03ch25.html0000644000175000017500000001772511131616434020512 0ustar drazzibdrazzibChapter25.Suite Task

Chapter25.Suite Task

Modeled after the TestSuite provided by jUnit, this class is an Ant task that looks through the build file that contains this task, calls a 'setUp' target (if it exists), then executes all nested tasks, and last calls a target named 'tearDown' (if it exists). Both 'setUp' and 'tearDown' are optional targets in the build file. A build file may contain multiple suite tasks, note that each invocation will call 'setUp' and 'tearDown', so you may want to use some conditionals to only have them execute once.

While this task and the associated 'testcase' task work very well, a similar test framework has been created by the Ant development team. You may want to check out that framework as it is likely to be the "standard" Ant test framework. Look for "AntUnit" at http://ant.apache.org.

Typically, the nested tasks are TestCases, although they can be any task as appropriate to your testing. The nested tasks may also be Suites, so you can group your tests easily. Nested tasks are executed in order.

Suite may also hold FileSets. Each file in the FileSet will be treated as a file suitable for use by a TestCase and will be executed as such. This makes it easy to run an entire directory of tests without having to specify a TestCase for each one individually.

To use this task in your build files, include a task definition like this:


    <taskdef name="suite" classname="ise.antelope.tasks.Suite"/>
   

Table25.1.Suite Attributes

AttributeDescriptionDefaultRequired
enabledDetermines if this suite should be ran. By using a property for this attribute, it is easy to turn off/on multiple tests.OnNo
assertenabledGenerally tests will use the Assert task. This attribute sets whether asserts should be enabled.YesNo
showoutputIf true, show intermediate test resultsYesNo
showsummaryIf true, show a summary of test results at the end of the test run.YesYes


In the example below, the "suite" tasks is a top-level task, so will execute automatically. This example does not use 'setUp' or 'tearDown' targets.


<project name="mathtest" basedir="." xmlns:a="antlib:ise.antelope.tasks">
   <description>
     Build file to run unit tests for the Math task
   </description>

   <a:suite>
      <a:testcase file="math_basic_tests.xml"/>
      <a:testcase file="math_rules_tests.xml"/>
      <a:testcase file="math_precision_tests.xml"/>
   </a:suite>

   <!-- alternatively, a fileset could be used:
   <a:suite>
      <fileset dir="${basedir}">
         <include name="math_*.xml"/>
      </fileset>
   </a:suite>
   -->
</project>

$ ant -f mathtest2.xml
Buildfile: mathtest2.xml
 [testcase] +-------------------------------------------+
 [testcase] + mathtest
 [testcase] +-------------------------------------------+

test6:
 [testcase] ERROR: test6 failed: string or property must be set.

test5:
 [testcase] test5 passed.

test4:
 [testcase] test4 passed.

test3:
 [testcase] test3 passed.

test2:
 [testcase] test2 passed.

test1:
 [testcase] test1 passed.
 [testcase] +-------------------------------------------+
 [testcase] + mathtest
 [testcase] +-------------------------------------------+
 [testcase]
 [testcase] ---- Errors ---------------------------------
 [testcase] ERROR: test6 failed: string or property must be set.
 [testcase] ---- Results --------------------------------
 [testcase] Ran 6 out of 6 tests.
 [testcase] Passed: 5
 [testcase] Warning: 0
 [testcase] Failed: 1
 [testcase] +-------------------------------------------+
 [testcase] +-------------------------------------------+
 [testcase] + math_precision_tests
 [testcase] +-------------------------------------------+

test11:
     [echo] Division by zero test
    [a:try] Task 'a:math' in target 'test11' failed, error message is: java.lang.ArithmeticException
 [testcase] ERROR: test11 failed: java.lang.ArithmeticException: / by zero

test10:
     [echo] Circle area test
 [testcase] ERROR: test10 failed: string or property must be set.
 [testcase] +-------------------------------------------+
 [testcase] + math_precision_tests
 [testcase] +-------------------------------------------+
 [testcase]
 [testcase] ---- Errors ---------------------------------
 [testcase] ERROR: test11 failed: java.lang.ArithmeticException: / by zero
 [testcase] ERROR: test10 failed: string or property must be set.
 [testcase] ---- Results --------------------------------
 [testcase] Ran 2 out of 2 tests.
 [testcase] Passed: 0
 [testcase] Warning: 0
 [testcase] Failed: 2
 [testcase] +-------------------------------------------+
 [testcase] +-------------------------------------------+
 [testcase] + math_rules_tests
 [testcase] +-------------------------------------------+

test7.2:
 [testcase] test7.2 passed.

test7.1:
 [testcase] test7.1 passed.

test7.0:
 [testcase] test7.0 passed.

test8.3:
 [testcase] test8.3 passed.

test8.2:
 [testcase] test8.2 passed.

test9:
 [testcase] test9 passed.

test8.1:
 [testcase] test8.1 passed.

test8.0:
 [testcase] test8.0 passed.
 [testcase] +-------------------------------------------+
 [testcase] + math_rules_tests
 [testcase] +-------------------------------------------+
 [testcase] ---- Results --------------------------------
 [testcase] Ran 8 out of 8 tests.
 [testcase] Passed: 8
 [testcase] Warning: 0
 [testcase] Failed: 0
 [testcase] +-------------------------------------------+
    [suite] ++-- Totals -------------------------------++
    [suite] ++ Total Ran 16 out of 16 tests.
    [suite] ++ Total Passed: 13
    [suite] ++ Total Warnings: 0
    [suite] ++ Total Failed: 3
    [suite] ++-----------------------------------------++

BUILD SUCCESSFUL
Total time: 1 second

antelope-3.5.1.orig/docs/manual/editmode.gif0000644000175000017500000010501711131616374020657 0ustar drazzibdrazzibGIF89a  pҾj> 6:jjz:=k2zzzBBB:RJfֆBZBZrzVVRBbfҺrƆNN22B22zzRRR ְBVڢ枚22***RR~j22RnRrΚbƽ&&*Zz &jf fNb"&rBj*BRv:z֯|UUBf:Z*Fz*N233&jJLN2r22b^frb~b^r憦b2RZv2Jzj":z&&RrZrrbfZ~B^BRZݖzFF*>RZBbjrJj*JZ"Bzrr6rJf55Jn.j">֦bfb2Κ**rb]] Xƶcc2Rr*bΎަ2r6zJ:V|Jb:^ *jzΞJj 2rbjBBB^LM"B Z~ֲ.r*j]Zzffz*r2N"6zvr1V:Vb">z,H*\ȰÇ#JHŋ3jȱǏ CIdO\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴK (ᙜJիXjʵׯ`EBMٳhӪ]˶۷J}B͉ݻxeㄯNN5„ϩSx1s,r2.@>=ҧN,Qk0`'/QZޭ?GgFPB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r٥_\ iaXcX Y[n'Tۇ7T>gf9P~ 8HhAω$thiWy:z{cZ*癠VAlq2zs. gT-&h^ gS9kHgQFbV5k׻+¼{K 媥6Z #̰ CSq[1_ܱs! ōdZn&qF$OYHav:Tp4"?#B upjjuTyb:ve=zݶo `V^;[tUtB wGזB;特*gԔktyiUAN uWꀱ~z^^xZG|5SzfHK+GGN׋7N'JUuVӣIv$5I߾ڷ_PMOȆ׸?%zJrS|D)pjiʁ}hn8XS R5}F]a˼}XJ6206!yB!XDn7*+P)9x)|ВAE|q)UWkyF6 rG;z#= HC獊\$#GB2$%+iKb2$';O*##Pb IoR|FIB+_y'Y%Q919 &.չy\&3) t`Ҍ4ikb3&7oVᴦ8YNs38:Nt甧;Iz>O=9}TTAЇ&(BMv^l$PpɔmR%)C0RwbJgK^p?X3LmW)O{ӟ kJ&[ -t*KL_=@ԯ5b+ܠ8,phZVtqu8PM4HӮ^WbSvl_׺f4M%cB6,e+kbgICmhK;ZТ6D6Z*iU+ZGd}lm[v=oc:"].s-8unsK]*(w 7/ypk{[_W/{{_oX%3X0L [85<`/Mhsw%qwE נ$21kl8:1{93Ne,##9J^2'C9R2l'(D2J.4lf3{bF2ml7ys \9Q3lh=#Љ>G/:Ҏ4'm{JcҚ3]#O:KmS:ժ^5[W:ֲ5km[:׺5{_;6mc:^6gC;Ҟ6mkc;6o;7ms;^7=;antelope-3.5.1.orig/docs/manual/bk03ch27.html0000644000175000017500000001225011131616434020500 0ustar drazzibdrazzibChapter27.Performance Monitoring

Chapter27.Performance Monitoring

In addition to the tasks described in this manual, Antelope also ships with a special Ant listener than can keep track of the amount of time that each target and task takes to execute. At the end of the build, these times will be sorted from fastest to slowest and displayed following the build output. This can be useful to pinpoint slow and/or inefficient spots in the build process and identify those areas that could benefit from optimization.

The performance listener can be used outside of Antelope by passing a parameter to the command line for Ant:


    ant -listener ise.antelope.common.AntPerformanceListener target

Following is an example of the results from using the listener. The result format is projectname.targetname for targets and projectname.targetname.taskname for tasks. All times are shown to the nearest millisecond.


[danson@blackdog antelope]$ ant -listener ise.antelope.common.AntPerformanceListener dist
Buildfile: build.xml

init:

clean:
   [delete] Deleting 170 files from /home/danson/apps/antelope/build

compile:
    [javac] Compiling 61 source files to /home/danson/apps/antelope/build

all:

-build_number:

prep_files:
   [delete] Deleting 3 files from /home/danson/apps/antelope/config
     [copy] Copying 3 files to /home/danson/apps/antelope/config

combined:
     [echo] basedir = /home/danson/apps/antelope
      [jar] Building jar: /home/danson/apps/antelope/Antelope_1.208.jar

dist:
   [delete] Deleting 4 files from /home/danson/apps/antelope/dist
      [zip] Building zip: /home/danson/apps/antelope/dist/Antelope_1.208.zip
     [echo] Created zip file.

-zip_docs:
      [zip] Building zip: /home/danson/apps/antelope/dist/Antelope_docs_1.208.zip
     [echo] Zipped docs to Antelope_docs_1.208.zip.

-zip_tasks:
      [jar] Building jar: /tmp/Antelope_tasks_1.208.jar
      [zip] Building zip: /home/danson/apps/antelope/dist/Antelope_tasks_1.208.zip
   [delete] Deleting: /tmp/Antelope_tasks_1.208.jar
     [echo] Zipped tasks to Antelope_tasks_1.208.zip.
     [copy] Copying 1 file to /home/danson/apps/antelope/dist

BUILD SUCCESSFUL
Total time: 8 seconds

-------------- Target Results -----------------------
Antelope.all: 0.000 sec
Antelope.init: 0.011 sec
Antelope.-build_number: 0.014 sec
Antelope.clean: 0.233 sec
Antelope.-zip_tasks: 0.297 sec
Antelope.prep_files: 0.311 sec
Antelope.-zip_docs: 0.546 sec
Antelope.combined: 1.290 sec
Antelope.compile: 1.724 sec
Antelope.dist: 2.162 sec

-------------- Task Results -----------------------
Antelope.init.mkdir: 0.000 sec
Antelope.init.mkdir: 0.001 sec
Antelope.dist.echo: 0.002 sec
Antelope.prep_files.delete: 0.004 sec
Antelope.combined.echo: 0.005 sec
Antelope.dist.delete: 0.006 sec
Antelope.-zip_tasks.echo: 0.007 sec
Antelope.dist.copy: 0.011 sec
Antelope.-build_number.buildnumber: 0.014 sec
Antelope.compile.copy: 0.016 sec
Antelope.prep_files.copy: 0.020 sec
Antelope.prep_files.replace: 0.071 sec
Antelope.-zip_tasks.zip: 0.122 sec
Antelope.-zip_tasks.jar: 0.161 sec
Antelope.prep_files.replace: 0.216 sec
Antelope.clean.delete: 0.233 sec
Antelope.dist.antcall: 0.421 sec
Antelope.-zip_docs.zip: 0.540 sec
Antelope.dist.antcall: 0.685 sec
Antelope.dist.zip: 1.036 sec
Antelope.combined.jar: 1.284 sec
Antelope.compile.javac: 1.708 sec

-------------- Totals -----------------------
Start time: Thu, 5 Dec 2002 17:18:30
Stop time: Thu, 5 Dec 2002 17:18:39
Total time: 8.476 sec

antelope-3.5.1.orig/docs/manual/bk03ch23.html0000644000175000017500000001661611131616434020506 0ustar drazzibdrazzibChapter23.Split Task

Chapter23.Split Task

This task splits a property or file into pieces. This is similar to the "split" utility found on most Unix and Linux distributions.

To use this task in your build files, include a task definition like this:


    <taskdef name="split" classname="ise.antelope.tasks.SplitTask"/>
   

Once a file has been split into smaller pieces, it can be rejoined with the "concat" task that is part of the standard Ant core tasks.

Table23.1.Split Task Attributes

AttributeDescriptionDefaultRequired
prefixThe start of the filename(s) to write the parts to.xNo
bytesHow big, in bytes, to make the individual pieces. In general, use lines for text files, bytes or size for binary files.NoneNo
sizeHow big to make the individual pieces. Like the Unix/Linux split utility, this attribute allows modifiers: b for 512, k for 1K, m for 1 Meg, so 100k is the same as passing 102400 in the bytes attribute. In general, use lines for text files, bytes or size for binary files.NoneNo
linesHow big to make the individual pieces in lines. In general, use lines for text files, bytes or size for binary files.1000No
propertySplit the value of the property into several files.NoneNo
stringSplit this string into several files.NoneNo
fileSplit this file into several files.NoneNo
outputdirDestination for the output files.NoneMaybe. If file is given and output dir is not, will write to the same directory as file, otherwise, this is a required attribute.
failonerrorShould the build stop if this task fails?YesNo


Examples

Split the value of a property into several files:


   <target name="test1" depends="clean">
      <property name="prop1" value="ABCDE"/>
      <a:split property="prop1" bytes="1" outputdir="${out_dir}"/>
      <a:fileutil file="${out_dir}" property="file_count">
         <a:filecount/>
      </a:fileutil>
      <a:assert message="Expected 5 files, got ${file_count}">
         <bool>
            <a:mathequals arg1="5" arg2="${file_count}"/>
         </bool>
      </a:assert>
   </target>

This will result in 5 files named x.0, x.1, x.2, x.3, and x.4, each containing a single character.

This more involved example shows how to split ant.jar into several files each 100000 bytes in size. The files will be names ant.jar.0, ant.jar.1, ..., ant.jar.10. Then the parts are put back together with concat.


   <target name="test2" depends="clean">
      <!-- make sure ant.jar is available -->
      <property name="ant.jar" value="${ant.library.dir}/ant.jar"/>
      <available property="ant.jar.available" file="${ant.jar}"/>

      <a:if name="ant.jar.available" value="true">
         <!-- ant.jar generally runs around 1MB in size, so split into 100000 byte pieces -->
         <a:unset name="piece_size"/>
         <property name="piece_size" value="100000"/>
         <a:split file="${ant.jar}" bytes="${piece_size}" outputdir="${out_dir}" prefix="ant.jar"/>

         <!-- count the parts -->
         <a:fileutil file="${out_dir}" property="file_count">
            <a:filecount/>
         </a:fileutil>

         <!-- calculate how many parts there should be -->
         <a:fileutil file="${ant.jar}" property="ant_size">
            <a:filelength/>
         </a:fileutil>
         <a:math result="split_size">
            <a:op op="ceil">
               <a:op op="/">
                  <a:num value="${ant_size}"/>
                  <a:num value="${piece_size}"/>
               </a:op>
            </a:op>
         </a:math>

         <!-- make sure there are the right number of parts -->
         <a:assert message="Expected ${split_size} files, got ${file_count}">
            <bool>
               <a:mathequals arg1="${split_size}" arg2="${file_count}"/>
            </bool>
         </a:assert>

         <!-- sort the filenames of the parts so concat puts them together in
         the right order-->
         <a:fileutil file="${out_dir}" property="file_list">
            <a:listfiles includepath="no"/>
         </a:fileutil>
         <a:stringutil string="${file_list}" property="file_list">
            <a:sort/>
         </a:stringutil>

         <!-- put them back together -->
         <concat destfile="${out_dir}/ant.jar" binary="true">
            <filelist dir="${out_dir}" files="${file_list}"/>
         </concat>

         <!-- make sure the new file is the identical to the original -->
         <a:assert message="concat did not produce identical file">
            <bool>
               <filesmatch file1="${ant.jar}" file2="${out_dir}/ant.jar"/>
            </bool>
         </a:assert>
      </a:if>
   </target>

antelope-3.5.1.orig/build-plugin.xml0000644000175000017500000003212711072375710017307 0ustar drazzibdrazzib This build file creates Antelope as a jEdit plugin. preparing files ${config.dir} ${build.num} Build aborted by user. antelope-3.5.1.orig/build-tasks.xml0000644000175000017500000002473311021460174017133 0ustar drazzibdrazzib This build file creates a zip file for distributing the Antelope tasks. Main targets: dist - creates a complete zip file for distribution jar - creates a jar file for the tasks Zip file contents: /build.xml /docs /AntelopeTasks_X.X.X.jar /tasks_readme.txt preparing files ${config.dir} ${build.num} antelope-3.5.1.orig/build.xml0000644000175000017500000001766611072373744016033 0ustar drazzibdrazzib Master build file for Antelope, calls other build files to do the actual work: build-plugin.xml, target name is "plugin" build-app.xml, target name is "app" build-source.xml, target name is "source" build-tasks.xml, target name is "tasks" The default target builds Antelope as a jEdit plugin. Call target "all" to build all distribution files, call target "transform-docs" to build the documentation prior to running any of the above. dist.dir = ${dist.dir} antelope-3.5.1.orig/build-app.xml0000644000175000017500000003257611056550364016603 0ustar drazzibdrazzib This build file creates Antelope as an Application. preparing files ${config.dir} ${build.num} init done just a test antelope-3.5.1.orig/run.xml0000644000175000017500000000450010430201212015470 0ustar drazzibdrazzib Instead of separate start scripts for starting Antelope for Windows, Unix, Mac, or whatever, this single Ant build file starts Antelope on all platforms that run Ant. Obviously, Ant must already be installed, but Antelope is pretty much useless without Ant, so this doesn't seem like an unreasonable requirement. To use this file, you need to have a working installation of Ant. Antelope has been tested extensively with Ant version 1.5 and 1.6. To run Antelope, just do "ant -f run.xml". You shouldn't need to adjust the classpath below. antelope-3.5.1.orig/src/0000755000175000017500000000000010637540670014761 5ustar drazzibdrazzibantelope-3.5.1.orig/src/docs/0000755000175000017500000000000011056550146015704 5ustar drazzibdrazzibantelope-3.5.1.orig/src/docs/ChangeLog.txt0000644000175000017500000005653010601266236020304 0ustar drazzibdrazzibAntelope Change Log Version: @buildnum@ 3.4.0: o updated for Ant 1.7. o finally, is fully supported o targets are now sorted in edit mode. 3.2.10: o fixed Trace so it works more or less correctly. o removed use of the Constant Interface Anti-pattern. o rearranged packaging of tasks to better organize typdefs. 3.2.9: Oct 2005 o added Hostname, Split, Repeat, FileUtil, and StringUtil tasks. o some general cleanup. 3.2.6: 11 Jun 2005 o added Grep, Suite, and TestCase Ant tasks. o updated antlib.xml and antelope.taskdefs with missing typedefs 3.2.2: 10 Apr 2005 o various minor updates. o fixed build files, in particular the build-src.xml file so that all the source, images, docs, etc, is actually included. 3.2.0: Looks like I missed a few updates to this file... 23 Dec 2004 o added ability to call the "implicit" target explicitly. The implicit target is the anonymous target that Ant uses to hold top-level tasks like and . Previously, the only way to run the implicit target was to run an explicit target, so Antelope was unable to rerun the implicit target for build files that did not have an explicit target. The button labeled "_implicit_" will run the implicit target. Note that in multi-target mode, the "_implicit_" button does not show, the implicit target will (as usual) be ran before other targets are executed. o Updated the launcher so the run.xml file to start Antelope is no longer required. Just "java -jar Antelope.jar" will start Antelope. o Fixed several other minor bugs, but exactly what they were escapes me at the moment. 3.1.10: 29 Aug 2004 o Fixed error in StopWatchTask that incorrectly showed total time for elapsed time. (Thanks to Wolf Schlegel for pointing this out.) o I've used 'enum' as a variable name for an Enumeration for years, but now Sun has decided that is a key word, so I've replaced all 'enum' with 'en'. (Thanks to Dennis Hofs for pointing this out.) o Fixed issue #21, silently ignore property files not found when the build file is loaded. o Fixed issue #22, caret position is restored properly when build file is saved. o Fixed issue #24, clicking on "Trace" button automatically selects the "Output" tab. 3.1.9: 29 July 2004 o fix for issue #20, imported targets now have buttons. 3.1.8: 23 May 2004 o Completed issue #12, added 'tail' to output window in app. o Completed issue #9, fixed NPE on trace target with non-existant target in antcall. 3.1.7: 19 May 2004 o Completed issue #13, added line number display to app. o Completed issue #14, added option to not sort the target buttons alphabetically. o Completed issue #15, added support for native look and feel to app. o Completed issue #16, added support for wheel mouse in edit window. o Completed issue #9, backward compatibility with Ant 1.5.x. 3.1.6: 5 May 2004 o Fixed a bug in the run.xml file, it was looking for a non-existant 'lib' directory in the classpath. o Fixed a bug that caused the Antelope plugin to delete Ant when the plugin was deleted from jEdit. 3.1.5: o Fixed a number of bugs that broke backwards compatibility with Ant 1.5.x. Antelope should now work well with Ant 1.5.0 and later. Note that Ant 1.4.x and earlier are no longer supported. 3.1.4: o Added ability to assign a jEdit shortcut to rerun the last ran target. o Fixed bug in auto-refresh in multiple target mode. 3.1.3: 12 Apr 2004 o Fixed the threading for running the default target from a jEdit shortcut. 3.1.2: 9 Apr 2004 o Fixed a bug introduced in 3.1.0 that caused a NPE on an fresh install of Antelope as a jEdit plugin. I had added some icons to the button panel, but forgot that the default settings wouldn't be read unless there was a previously opened build file, which isn't the case on a new install. o The default target is now shown with a green color text. o Running the default target can be added as a short cut in jEdit. There's something a bit weird about how this works, no output is displayed until the target is complete, so it looks like nothing is happening, then all of a sudden the entire output is shown. Coincidentally, this specific feature was requested in e-mail yesterday. o Added some new icons to the Edit tree. Private targets have gray target icons, the default target is green, public targets are black target icons. Imported (via the task) are the same colors, except bulls eye on the targets is red. 3.1.0: 30 Mar 2004 o added reload button to control panel. o added "About" tab to propery dialog. o changed text to icons on all buttons in conrol panel. o updated build file to make building the docs while disconnected easier. 3.0.7: o Changed the preferences again. The custom preferences are now used on all platforms and all jvm versions, but the custom preferences no longer are the system default preferences. This means if you ran version 3.0.6 (and 3.0.6 only), you will loose any stored settings, but all settings from any previous version of Antelope are available and will be use. I never felt comfortable about doing that anyway. The point of implementing the custom preferences was to get around an annoying bug in the Unix/Linux implementation of java.util.prefs. If you are still running with a jvm that has that bug (see bugs 4868444 and 4751177 at java.sun.com) and want to get rid of all the annoying messages, add this to your command line when starting Antelope: -Djava.util.prefs.PreferencesFactory=ise.library.UserPreferences This will install Antelope's custom preferences handler as the default system preferences handler. o Added popup in "Edit" mode to property and loadproperties tasks to allow opening of a file designated by the "file" or "srcfile" attributes, respectively, in the editor. o Added auto-reload if property files changed. Property files are those files loaded either by the task with a "file" attribute or by the task. If the property files have changed since the build file was loaded, the build file will be reloaded, which in turn causes the property files to be reloaded. Note that this reload does not depend on the auto-reload option being checked, it happens regardless. 3.0.6: 24 Mar 2004: o More updates to the dependency tree code and the entity includes. o Changed the preferences handling (see the entry dated 22 Jan 2004 below) so that the custom preferences factory is only activated on non-Windows platforms with jvm's earlier than version 1.5. This means that your settings may disappear -- they are not gone, just not readable. If you need to continue to use the custom preferences, start Antelope with this setting on the command line: -Djava.util.prefs.PreferencesFactory=ise.library.UserPreferencesFactory Hopefully this won't change again. 3.0.5: 22 Mar 2004: o Updates to the dependency tree code. o Fixed a bug with included xml (using xml entity includes). The targets of included xml would show up as buttons in "Run" mode, but not in the tree in "Edit" mode. The targets are now in the Edit tree, and the dependency tree works with these targets also. o Added some nice icons to the edit tree to make it easier to pick out imported targets and projects. 3.0.4: 21 Mar 2004: o Fixed a bunch of compiler warnings about deprecated methods. Several deprecated methods were not fixed as they would break Ant 1.5 compatibility. o Adjusted the "Please wait loading Ant" code as it would occasionally hang in jEdit. It still hangs occassionally, it appears to be due to a classloader issue with other plugins loading an xml parser ahead of Ant's parser. Jane might be the culprit. o Right click on a target in "Edit" mode will show a popup of the dependency tree for that target. Clicking a target in the dependency tree moves the cursor to that target. 3.0.3: 15 Mar 2004: o showing 'private' targets in italics in all modes modes. Targets are considered 'private' if: 1. the target name starts with - 2. the target does not have a description 3. there is a . anywhere in the target name 3.0.2: 23 Feb 2004 o changed default for showing targets to "Show all targets". o fixed bug in setting for auto-reload of build file. Now auto-reload is the default, which it should have been all along but wasn't. 21 Feb 2004 o added popup to properties dialog so that right clicking (option clicking) on any of the tables shows the cell value in a scrollable text area. This makes it easier to read and copy long values. 3.0.1: 15 Feb 2004 o Inadvertently dropped the Main-Class attribute from the manifest, so the -jar option didn't work. 26 Jan 2004: o Put Antelope back on jEdit's "Plugins" menu. It had inadvertently been removed in the last release. o Now it is much easier to set up Ant with Antelope and jEdit. This isn't an issue with Antelope as an application as Ant is used to start the application. As a plugin, Antelope looks for Ant like this: 1. check if jEdit loaded ant.jar. This would happen if ant.jar is in the $user.home/.jedit/jars directory. 2. look for ant.jar in the classpath. If found, assume any other jars needed for Ant are already in the classpath. 3. check Antelope's preferences for ANT_HOME 4. check for a System property named ANT_HOME 5. check for an environment variable named ANT_HOME 6. ask the user, then store their choice in Antelope's preferences The preferred method is to set an environment variable for ANT_HOME, this is also recommended by the Ant manual when installing Ant. 22 Jan 2004: o Replaced the default Java Preferences with a custom preferences eliminates the annoying error messages produced on several versions of Linux due to several bugs ( at least bugs 4868444 and 4751177, there may be others) in Sun's implementation of preferences on that platform. You might want to take notice of a couptle of things: First, the new custom preferences are used on all platforms, not just Linux. Second, previously stored preferences are not converted to the new system. If you absolutely must use the old preferences, start Antelope with this setting on the command line: -Djava.util.prefs.PreferencesFactory=java.util.prefs.FileSystemPreferences o Set default for auto reload of build file to 'on', that is, do automatically reload the build file. Of course, this is a saved setting, so you can set Antelope to not load your build file. Note that for the new Ant 1.6 task, this setting applies to all imported build files as well. o Fixed several thread issues with the auto reload with regards to how it interacts with the performance listener and the button panel. o Adjusted the performance listener to work correctly when running in multiple target mode. Previously, only statistics for the last target were displayed, now it accumulates statistics for all targets. o Added Antelope version number to the Properties/Description tab. This will make it easier for users of the jEdit plugin to verify which version of Antelope they are using. o Updates for Ant 1.6. Antelope now works well with all Ant versions 1.5 and later. No regression testing has been done with Ant versions older than 1.5. For Ant 1.6, the new task is support as are top level tasks (that is, tasks that are not in a target). o Fixed the progress bar, bug 877996. This was broke in version 2.75, which was the first release to support Ant 1.6. Changes in the Ant API made the progress not work quite right. Now it works correctly with Ant 1.5.x and Ant 1.6. Also, the progress bar now shows the name of the targe that is running instead of the percentage. This seems more useful, especially as the progress bar itself gives a good visual indication of the progress. o Made a number of small fixes and code refactorings that result in cleaner code and somewhat faster execution. (Note: the sometimes slow start up of Antelope is actually due to Ant, initially loading a project can take as long as 10 seconds on an older machine.) 23 Oct 2003: o Fixed all open bugs: 740496 correct taskdef 786439 Trouble with the xml logger of Ant and the break task 818781 dtd relative folder 820814 antelope shows tasks with empty descriptions. 827162 NullPointer Exception 827914 ant.version property not set on Windows o Added option to automatically reload build file prior to running a target. 27 Sep 2003: o Updated tasks to work with Ant 1.6. o Update plugin code to work with jEdit 4.2. o Removed dependency on CommonControls.jar for plugin. o Refactored build files. 15 May 2003: o Added run.bat and run.sh scripts to make starting stand-alone app easier. o Fixed bug #734867, "Limit Ant Task doesn't fail correctly". o Added support to Assert task. o Added code to Stopwatch task so that the elapsed or total time is stored in a property of the same name as the stopwatch. o Added IsGreaterThan and IsLessThan conditions to If task. Assert task now can use these same conditions. See testcases/limittest.xml for an example. o Went to the new Matrix movie! o Antelope can now parse files that use external entities. Nice! 12 Mar 2003, release version 2.42: o Added ability to run multiple targets. This is so handy, I don't know why I didn't implement it sooner. o Updated build.xml, installPlugin.xml, and run.xml to work much better. Now all distribution files will "run right out of the box", and use the Antelope tasks, too! 10 Mar 2003 o Added find and replace to stand-alone. o Modified Try task to be able to store exception message and/or stack trace in a property. 9 Mar 2003 o A few files were inadvertently left out of the 2.38 build and the start up run.xml file has been cleaned up a bit. The main build file has also been cleaned up, so external dependencies are not required to do a basic build. o Removed the "right click for options" tooltip as right clicking does nothing. 6 Mar 2003, released version 2.38: I'm behind on this, so the details aren't as good as they should be. o Fixed a bug in the editor where switching between build files would cause the old build file to be appended to the new one. o Fixed warning messages about invalid build/xml files. o You can now browse any xml file (well, many xml files) via the "Edit" tree. There is no support for xml files with dtds, which typically build files do not have. o updated "Edit" mode to show a tree of the build file so navigating the file is easier. o added "back" and "next" buttons in "Edit" mode. These work like the back and next buttons in a web browser. o Added some new tasks. The "call" task is particularly useful. o Source distribution now includes the unit tests for the extra Ant tasks. o Updated run.xml so that tools.jar is automatically included in the claspath if it can be found. o Added some public API for running as a jEdit plugin so that other plugins can easily interact with Antelope for running targets. 21 Dec 2002 o the editor is really nice now. The syntax highlighting is configurable, as is the font and many editor options. Documentation is lagging a bit on this, but hopefully the configuration is obvious enough. o added undo, redo, cut, copy, and paste to the editor. o updated the Math task to use any of the methods in java.lang.Math. o removed the ssh and scp tasks to their own distribution package. o changed the 'Options' popup to be a regular dialog with an 'Apply' button. o refactored the property and settings persistence, this works much better now with all properties being saved and restored correctly. o added a StopWatch task for timing of build events. o added "startswith" and "endswith" boolean conditions to the "If" task. 6 Dec 2002 o replaced Antelope editor with an older, MIT licensed version of the jEdit text editor. This makes syntax highlighting configurable and fast. o replaced "Format" menu with "Options" menu to support configuration of syntax highlighting and editor options. 24 Nov 2002 o This is the last 1.xx version. There are a few known bugs that are being pushed to version 2.x for resolution. Version 2 will provide a better editor, a GUI to create build files, and other items related to creating and editing build files. o Added input handler so the Ant 'input' task can be used from within Antelope. o Added progress bar to show percent complete for running target. This is useful for long running targets. The percent is calculated from the total number of tasks that a target will run and makes no assumptions about how long a particular task will take. It could be that there are only two tasks, but the first one takes 2 seconds and the second takes 10 minutes, the progress will show at 50% until the second one is done. o Added ability to gather performance statistics for running target. This should be useful for optimization of build files. o Build file syntax highlighting is very slow in app mode, added menu item under Format menu to turn the syntax colorization on or off. Default is off, which makes for much faster performance. Colorization is a bit flaky when changed from on to off or vice versa. 8 Nov 2002 o Added If, Try, and Variable task. o Now works in multiple views in jEdit. o rewrote docs in docbook format. o improved AntLogger. o rearranged packages for tasks to be in a separate package. o tasks available in separate jar file o added option for display of targets starting with a dash 12 Oct 2002 o Added Assert task. o Fixed several bugs in AntLogger. o Improved tracing ability. o Optimized Antelope editor to make colorizing faster, but this is still really slow on all but the smallest build files. o Added Ant coding standards. o Updated documentation. 23 Sep 2002 o Adjusted AntProject.java to be able to work correctly when using Antelope as a plugin. The jEdit classloader was preventing certain property files in ant.jar from being accessible to AntProject.java. o Moved the config and docs directories inside the src directory. The build file copies them to the proper config and docs directories for distribution. This lets the build file adjust the build number automatically within the config and doc files, which keeps everything at the same displayed build number, and keeps all the source files in the src directory. 22 Sep 2002 o added "User" tab to properties. This tab allows the user to add properties. These properties are treated as if they were passed to Ant on the command line. These properties are persistent for the build file, so each time the build file is opened, the user properties will be restored. o added "New" menu item to stand-alone app. A very basic build file is created, the user needs to fill in the details. 14 Sep 2002 o added 'recent files' menus to both stand-alone and plugin. This will track the last 10 opened build files. o updated tracing to trace 'ant' tasks. o removed references to the classes to link to the ProjectViewer plugin. The source for these classes is still included, but they are not compiled by the default 'compile' target in the supplied build file. 8 Sep 2002 o Fixed the storage of the settings so they actually work correctly. Option settings are stored per build file, plus font settings for the stand-alone and the last build file open are stored and used on application startup. o Changed the "Edit" button to be a "mode" like the trace action. Now when the Edit button is clicked, the panel background turns green to indicate 'edit mode', the build file is loaded for editing (either in the "Edit" tab in the stand-alone app or in a jEdit buffer as a plugin), and clicking on a target button will scroll the build file to the target definition. o Fixed the Trace button to select the "Output" tab when clicked in stand-alone. 6 Sep 2002 O Fixed the abstraction mentioned below so that AntelopePanel and AntelopeOptions really don't depend on compiling AntelopePluginPanel. 5 Sep 2002 o Major rearrangement of package layout. o Abstracted the interaction between AntelopePluginPanel and AntelopePanel so that AntelopePanel no longer depends on compiling AntelopePluginPanel (which depends on ProjectViewer), so the stand-alone application can be compiled without any dependency on jEdit or jEdit plugins. o Added KappaLayout.jar to the distribution zip. This was supposed to be there all along, but has been missing until now. o Adjusted the build file to include a few new targets for compiling the stand-alone, the plugin, and building the distribution zip file. 3 Sep 2002 o Updated tracing to include the actual values of properties and references. o Added font dialog to stand-alone. o Made 'Properties' dialog non-modal. o Fixed a bug where if the build file contained an error, all the buttons would disappear. Now at least the non-target buttons will stay visible and a dialog with the build file error will explain the problem. o Updated the build file to make the zip target better -- the readme, antelope.jar and kappalayout.jar are at the top level, the directory structure for the development files are in directories. 2 Sep 2002 Made a number of modifications to the stand-alone application: o Added ability to save output to a file. o Made output area editable. o Added ability to edit the build file. o Added ability to save modifications to the build file. o Added color coding to the build file editor. o Added help and about menu items. o Added help viewer. o Added icons to the menu items. 1 Sep 2002 o Added 'Trace' button to show exactly what targets and tasks will be executed when a particular target runs. This is useful for tracking down the execution flow in convoluted build files. 29 Aug 2002 o included a file inadvertently left out of the last distribution. This file lets Antelope run without ProjectViewer when run as a jEdit plugin. o Did some optimization in AntelopePanel. It can take as long as 8 - 10 seconds to change build files, it turns out this is in Ant's Project class, so there's not much I can do about it (at least, not without joining the Ant project...) 18 Aug 2002 o Added code to integrate Antelope with ProjectViewer plugin in jEdit. This integration requires the bleeding edge ProjectViewer from CVS. Right click on your build file in ProjectViewer and set it as your build file, and Antelope will be notified and adjust itself accordingly. Antelope will run without ProjectViewer, but won't necessarily compile without it. 17 Aug 2002 o Fixed a problem with option settings not being restored. They were being saved, but the controls were not being set with the stored values on start up. Settings are stored per build file, so each time a build file is opened, the settings for the particular file are set. o Major modifications to AntLogger. This is now very useful outside of Antelope and has several settings that can be adjusted either via Ant command line options or build file properties. See the documentation for details. o Added an "Edit" button when running as a jEdit plugin. This will open the current build file in jEdit for editing. 14 Aug 2002 o Fixed a problem with capturing output from javac when running as a plugin. jEdit diddles with the System print streams, which meant I had to also to be able to catch the output. This caused significant changes to AntLogger, which now only writes to java.util.logging.Logger, there is no more print stream output. Output to a console window is via a java.util.logging.ConsoleHandler. o Added color coding of output when running as a plugin. o Fixed a potention null pointer exception when trying to view the properties. (Why does Java hava a null pointer exception, but not pointers?) o Removed the option panel from jEdit's global plugin properties. There was a problem with trying to maintain two different panels (one on the global menu, one for the options button), so I opted for using the Options button only. This makes the code easier to maintain for stand-alone use. o Cleaned up some dead methods and old comments. o Converted all files to contain the same license. Antelope is licensed under an Apache license. antelope-3.5.1.orig/src/docs/README.TXT0000644000175000017500000000325010013677370017243 0ustar drazzibdrazzibREADME.TXT Antelope @@build.num@@ This is definitely a beta release -- I've adjusted Antelope to work with both jEdit 4.2 (in beta) and Ant 1.6 (also in beta). Things seem to be okay, but as neither jEdit nor Ant are final, Antelope shouldn't be considered final either. I haven't got all the docs up to date yet. Please report bugs at http://antelope.sourceforge.net. Antelope is packaged in 4 files to make it easy to get only what you want: Antelope_@@build.num@@_src.zip -- just the source code AntelopeApp_@@build.num@@.zip -- ready to run application AntelopePlugin_@@build.num@@.zip -- ready to install jEdit plugin AntelopeTasks_@@build.num@@.zip -- ready to use tasks (included with app and plugin) See the appropriate readme file for details of each. Quick Start: To run Antelope: ant -f run.xml Running Antelope: Instead of separate start scripts for starting Antelope for Windows, Unix, Mac, or whatever, run.xml is an Ant build file that starts Antelope on all platforms that run Ant. Obviously, Ant must already be installed, but Antelope is pretty much useless without Ant, so this doesn't seem like an unreasonable requirement. To use run.xml, you need to have a working installation of Ant. Antelope has been tested extensively with Ant version 1.5.x. To run Antelope, just do "ant -f run.xml". The first time you run run.xml, you will be prompted to enter the location of your Ant "lib" directory. This is the directory that contains ant.jar. You can also use command line java: java -jar AntelopeApp_@@build.num@@.jar [build_file] You may pass a build file name on the command line or choose one from the GUI. In this case, ant.jar must be in your classpath. antelope-3.5.1.orig/src/docs/docbook-wrapper.xsl0000644000175000017500000000026711056550146021537 0ustar drazzibdrazzib antelope-3.5.1.orig/src/docs/plugin_readme.txt0000644000175000017500000000157410252643670021271 0ustar drazzibdrazzibplugin_readme.txt AntelopePlugin @@build.num@@ Antelope home page: http://antelope.tigris.org Download binary plugin and/or source at: http://antelope.tigris.org/servlets/ProjectDocumentList Requirements: Java 1.4 or later Ant 1.5 or later jEdit 4.2 or later with Console and ErrorList plugins Installation: 1. Download the plugin, see link above. 2. Unzip, then cd AntelopePlugin_@@build.num@@ 3. copy Antelope.jar to your jEdit jars directory 4. start jEdit The jEdit jars directory on Windows is generally: c:\Documents and Settings\your_user_name\.jedit\jars On Linux/Unix it is generally: /home/your_user_name/.jedit/jars or /export/home/your_user_name/.jedit/jars Building from source: 1. Download the source, see link above. 2. Unzip, then cd AntelopePluginSrc_@@build.num@@ 3. Ensure the location of jedit.jar is set in either build.props or in build.xml. 4. ant antelope-3.5.1.orig/src/docs/index.html0000644000175000017500000000141210013677370017700 0ustar drazzibdrazzib Antelope

Antelope

Antelope is an application that provides a GUI interface to Ant. It can run as either a stand-alone application or as a jEdit plugin.

Antelope user manual

The main project page at SourceForge.

CVS repository (Out of date, not currently maintained on sourceforge.)

This project hosted by:
SourceForge Logo antelope-3.5.1.orig/src/docs/manual/0000755000175000017500000000000011056550356017164 5ustar drazzibdrazzibantelope-3.5.1.orig/src/docs/manual/target_buttons.gif0000644000175000017500000001022510032534072022705 0ustar drazzibdrazzibGIF89aΜcec10cce 罺ތ9r]`^yA 4V]n٥Yr=&#f{xbc7@N'ȢM㍜5ַ#S%jvMhduыف)`gYByni^&_fO9Adq+u 3^xf#]jsh.Dܟ9(o5ͤy)mV)qj9*yjSi$yꩱ3k$Tk;$&f Jέ+WmL$8.b%܎im 챨*Cڷ[B#W3zn"݋/P/"׊s sg#)V\̢g<w|ŒUq3$8r# ߳RLsH̊ά < !Њ ]KNds#9r蕔lV]tbMmDF%ڞ_XZw3M˭n[mAT6#Ok/9xo5؎-ъJt͑nH,&13.:0|z49;4.|2ƾg |k\Vz/~P;Sٗ+=OV=?ԥ.ԧK6ӂMIb]8h-|#9zEW8pm~,`o3nLjB}Oȋa,z< ! e< vh kLC" 1(=%ЊOV6?bBDmT6ə+~"݈hӈ8+HfLWΨAo,*tF(2BHjEБn#%B]C>FR7&!6e-~|$Z*JŲt,9]?! CQ:'RDK_8}e^p,ʬs^ѢY9qrԁhqaF;tkLΔGӹ*v3:MO# ;k[slҎZ&^`*4, q ѕUڳJSS\*0mqUTTL\񈳾2E{;ٶƯjNK~JB0TiKo:Fdj Bmkvd)nbnhmM{n+27mq[RWBν}E+^z:/zm׺V{㫰Wf/~7u{R w=pM+{~0#,a%g7W\ GL(Nu?u/Rq͒Rg)U<,"K- 1F"CjcuV霬.U[^KE[!JtMr/"P VYZe3mY-1'Nܣs=fGg9֍w|3Ī>3 U /fhֱGMRԨN> VcM.,Z@*vM w׫qHqxMlP4u]fo"Q6RM8Cĸeն pUjF q)x<$?u`f{NI. 0d" GЁ|g pb?<8" c|߇HP@A p`|+gy_ȼon[@+`ZM`|LϹ0q T 6 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ʿThkj]?_Xt͏ylm^@ET.D fNUb/v P%=Cu=zoP00qI2km+L Mͫ1THBt4uUUv66J88Rʳr2-Sx PqzZZۚڛQX|yY R9=*w>_w__?~3H:y`riBy}f[5bرH#%T8a4i@9f;$SIt(|G$z~)HN*kCxQ+ڎsyV'NiѮ'2k\+&}-b0Jj`Y{މ`.Zm'춲[9[1^W61}ujիY6su/= ykݻymvlb[ ˙7wztөW~{v۹w|u&0}zٷw~|׷~e)@S\'8 % Ł< 5ܐC 1E  LT삿+E[@$Ǹn3ȟ~,0"TIl2+&O J') KI ._̃,s1TM-l$2xi,؄7FN+$3= @+:R4Ct,CIa:aTӡTA-QKt"OQ5O;`J51T;UF]u4RZנD])\WmU8-e$d=W(fuVK:w}Q^{͖f ;GvYucsWRvNlWzwO|iW.7VYM #ņCxYMb-5&T=E0MfU2\~emuޙ}蠅>餕^馝 ꪭ묵ޚ뮽>^~垛ޛ ;antelope-3.5.1.orig/src/docs/manual/Target16.gif0000644000175000017500000000160410030603270021232 0ustar drazzibdrazzibGIF89af3̙f3f3ffffff3f3333f333f3f3̙f3̙̙̙̙f̙3̙ffffff3f3333f333f3̙f3̙̙f3̙f3ff̙ffff3f33̙33f333̙f3ffffff3ffff̙fff3fffffff3ffffffffffff3fff3f3f3f3ff33f3ffffff3f3333f333333̙3f3333333f3333f3f3f3ff3f33f33333333f333333333f333f3̙f3f3ffffff3f3333f333f3! ,a H A+)T #^[qp,t() TŽ 24q5+%%KJq`H+X(N#Q1>4 ;antelope-3.5.1.orig/src/docs/manual/options.gif0000644000175000017500000001401110013700340021321 0ustar drazzibdrazzibGIF89a ]Lsjmj͜bebqvIU)*LJEA{x7s# %Dh jZm]кs%WghΤ,piXH!@*~\W*բ,ڳoѺ/+ڴ\-Q0bm&H]e<  f@߱.|s?+5Jcc`( ߐ ҕV_}5I?T'`TPC$x`H GN84{ɷ~ֵ@\^8aa(RSA H@8č9V]r2%XY V`[z= i\lJpIy&eg ~"dҎQ֝by"^*Ktjnh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orig/src/docs/manual/docbook-wrapper.xsl0000644000175000017500000000026711056550122023006 0ustar drazzibdrazzib antelope-3.5.1.orig/src/docs/manual/antelope_guide.xml0000644000175000017500000016003511056550356022677 0ustar drazzibdrazzib Antelope Users Guide, Version @buildnum@ DaleAnson @style@ Legalities Per the Apache license (see below): "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Antelope is licensed under the same Apache license as Ant: . ]]> Some of the icons used in Antelope are from Sun's Java Look and Feel Graphics Repository. The following license pertains to those icons: @style@ Introduction Due to changes in the jEdit API, Antelope plugin versions prior to 2.60 are for jEdit 4.1, versions 2.60 and later require jEdit 4.2 or later. Disclaimer: Typically, the documentation is not quite up-to-date with the software. There may be some discrepancies between the text and pictures in this guide from what you see when you run the application. If you see a problem with this documentation, please post a bug at http://antelope.tigris.org. Thank you! Antelope is a graphical user interface for running Ant. It provides a set of buttons, one per target, which makes it easy to start a specific Ant operation. Basically, an Ant build file is opened with Antelope and the targets defined in the build file can be executed by clicking a button. Antelope is much more than a thin wrapper around Ant, however. Antelope can run in two different environments. It can run as a stand-alone GUI application and as a plugin to jEdit (www.jedit.org), an excellent open source editor for programmers. As a stand-alone application, Antelope provides the ability to create and edit Ant build files, the ability to run build file targets, and can trace target and task execution in a quasi-debug mode. Output from the build process can be captured to a file and/or to screen and performance statistics can be gathered to guide optimization efforts. Several very useful tasks to extend Ant are included. As a jEdit plugin, Antelope expands the features of the stand-alone application to nicely integrate with the text editor and with the Console and ErrorList plugins. Antelope has an open API that allows other plugins to utilize Antelope's capabilities. In either mode, Antelope provides property and reference inspection and the ability to set properties that would be passed as parameters to Ant on the command line.

Introducing Antelope
@style@ Installation
@style@ Install Ant Antelope assumes you already have Ant installed. If you don't, you can get it from http://ant.apache.org. You need to have Ant installed before Antelope will run.
@style@ Installing Antelope as a Stand-Alone Application This section assumes you'll install Antelope as a stand-alone application by hand. It's really quite easy: Download the Antelope application zip file. Unzip the file. Change to the AntelopeApp_@buildnum@ directory. Start Antelope by using this command: java -jar AntelopeApp_@buildnum@.jar
@style@ Installing Antelope as a jEdit Plugin You can install Antelope in jEdit by using the Plugin Manager. Just follow the instructions for installing any plugin found in the jEdit help system. This section assumes you'll install Antelope into jEdit by hand because Antelope is updated much more frequently than jEdit's Plugin Central. It's really quite easy: Download the Antelope plugin jar file. Copy it to jEdit's jar directory. Check that ANT_HOME is set as an environment variable. Start jEdit. Note that the Antelope plugin depends on the Console and ErrorList plugins, so you'll need to install those from the Plugin Manager also. First, download the plugin zip file. Unzip it. The file named Antelope.jar is the plugin jar file. Second, figure out where to put it. jEdit wants its plugins in one of two places, either $jedit_home/jars or $user_home/.jedit/jars. The best place is $user.home/.jedit/jars. So where is $user_home? That depends on your operating system. For Windows 95 and later, it's usually C:\Documents and Settings\yourusername, where yourusername is the name you use to log on to Windows. On my Windows 2000 machine, it's C:\Documents and Settings\danson, so I would copy the jar file into C:\Documents and Settings\danson\.jedit\jars. For Linux or Unix, $user_home is usually /home/yourusername or /export/home/yourusename. On my Linux box, it's /home/danson, so I would copy the jar file into /home/danson/.jedit/jars. The third step is letting Antelope know where you have Ant installed. This directory is known as "ANT_HOME". For example, on my Windows 2000 machine, I have Ant installed in c:\apache-ant-1.6.0, so that would be my ANT_HOME. Antelope looks in a few places when it starts: First, it looks for a System property named ANT_HOME. You could set a System property on the command-line to start jEdit (something like java -mx64m -DANT_HOME=c:/apache-ant-1.6.0 -jar jedit.jar) or if you're using Windows, you can set something similar in the jEdit launcher tool (Start - Programs - jEdit - Set jEdit Parameters). Second, it looks for an environment variable named ANT_HOME. This is actually the preferred method, and is recommended in the Ant installation instructions. How you set an environment variable depends on your operating system, on Windows, go to Start - Settings - Control Panel - System - Advanced - Environment Variables. On Linux or Unix, I'll assume you know what to do. If there is no environment variable set, then Antelope looks in the jEdit jars directories. You can copy the files from ANT_HOME/lib to the jEdit jars directory like you did with the Antelope jar file, and jEdit will automatically load them. This wasn't a bad solution with Ant 1.5 as there were only a couple of jars to maintain, but Ant 1.6 comes with about 20 jar files, so it's a bit more cumbersome. If Ant is not found in any of these locations, it will ask you. Once Ant is found, the location will be stored by Antelope for future use. If you want to change the location, use jEdit's "Plugin" menu, then "Plugin Options", then "Antelope" in the plugin list. If you erase the setting found there, Antelope will follow the same procedure to find Ant next time it is started. As a plugin, Antelope provides two "dockable" windows. Use jEdit's menu "Utilites, Global Options, Docking" to dock the windows. I find it convenient to dock the "Antelope" window on the right, and the "Ant Output" window on the bottom. The "Antelope" window is where you'll see the buttons to run targets, the "Ant Output" windows is where you'll see any output produced by Ant as it runs. Technically, the "Ant Output" window shows anything written to the system standard output stream, so you may see messages produced by other plugins there also. To reiterate: Download the Antelope plugin jar file. Copy it to jEdit's jar directory. Check that ANT_HOME is set as an environment variable. Start jEdit. Dock Antelope.
@style@ Requirements See the installation instructions for the specific requirements for Antelope. Antelope does require Java 1.5 or later as it makes use of both java.util.logging and java.util.prefs APIs which were introduced in that version. Due to changes in the jEdit API, Antelope plugin versions prior to 2.60 are for jEdit 4.1, versions 2.60 and later require jEdit 4.2 or later. Antelope does require Ant 1.5.x or later, which is a separate download. Ant is available from http://ant.apache.org. Antelope has been tested extensively with Ant 1.5.x, and seems to work with no problems with Ant 1.6.x. If your development environment already runs Ant, you have everything you need to run Antelope. A note about Ant 1.6: With the release of Ant 1.6, the Ant developers have choosen to package the classes that formerly were part of "optional.jar" into a variety of smaller jar files. @style@ Running Antelope
@style@ Option Settings Either way, Antelope is operated almost identically. To set up Antelope, click on the "Options" button. This will display the following:
Options Panel
When running Antelope as a stand-alone application, the options "Save all files before running targets" and "Use error parsing" are not available. This is the only difference between the stand-alone and the plugin. The available options on the "General" tab are: Save all files before running targets This is only available when running as a jEdit plugin. If checked, all files that are currently open for editing in jEdit will be saved before running the selected target. The default setting is checked, that is, do save all files before executing the target. Use error parsing This is only available when running as a jEdit plugin. If checked, output from the target will be passes through the Console plugin error parser and errors will be displayed in the ErrorList plugin. This is useful for tasks such as javac that produce standard error messages. Other tasks may not produce output suitable for error parsing, in which case, the output might be cleaner if this options is turned off. The default setting is checked, that is, do use error parsing. Show performance statistics If checked, Antelope will keep track of the amount of time that each target and task takes to execute. At the end of the build, these times will be sorted from fastest to slowest and displayed following the build output. This can be useful to pinpoint slow and/or inefficient spots in the build process and identify those areas that could benefit from optimization. The default setting is unchecked, that is, do not show performance statistics. Automatically reload build file If checked, Antelope will automatically reload the build file before running a target. That means that all properties will be reset to their original values or reloaded from property files as necessary. Keep in mind that properties set via the "Properties" button and dialog are not applied until the build file is reloaded. The default setting is checked, that is, do automatically reload the build file prior to each build. On the other hand, if there are properties that are loaded via a <property file="filename.props"/> or <loadproperties srcfile="filename"/>, Antelope will watch those files and reload the build file automatically if they change. Changes to such files cause a reload regardless of this setting. The available options on the "Targets" tab are: Show subtargets There are several common conventions for designating "primary" targets and "subtargets", also referred to as "public" and "private" targets. Primary (or public) targets are those that are invoked directly, while subtargets (or private targets) are generally "helper" targets that are invoked from other targets. Antelope supports three of the most common conventions: One method of distinguishing between primary and subtargets is only giving descriptions to primary targets. Unchecking the "Show targets without descriptions" will cause Antelope to display buttons only for targets that have a description. Another common method to designate subtargets is to use "dot" notation, for example, a "clean" target may have two helper targets, "clean.docs" and "clean.api.docs". Unchecking the "Show targets with dots" will cause Antelope to display a button for the "clean" target but not the "clean.docs" nor the "clean.api.docs" targets. The third method of designating subtargets is to start the names of these targets with a dash, for example, "-clean.docs" and "-clean.api.docs". Unchecking the "Show targets with dash" will cause Antelope to display a button for each such target. By default, none of these options are selected. Antelope displays all private targets in italics. Sort target buttons By default, the target buttons are sorted alphabetically by target name. Unchecking this box will cause the target buttons to be displayed in the order that they appear in the build file. The available options on the "Messages" tab are: Set message level There are five message levels available and are in order of verbosity, "Error" being the least verbose and "Debug" being the most. For general use, "Information" is about right and is the default setting. The available options on the "General" tab are: Show message events Ant produces messages on various events as it runs a target. Generally, all Ant messages are useful, but these can be adjusted as necessary. Turning off 'Target events' and 'Task events' will generally show all the important information without too much excess output. The default is that 'Build events' and 'Log events' are checked. The available options on the "Appearance" tab are: Show button text This will turn on or off the display of the text on the control buttons. Show button icon This will turn on or off the display of the icon on the control buttons. All option settings are stored per build file (except for the Appearance settings), which means that when you close one file and open another, the option settings for the new file will be retrieved and automatically set.
@style@ Antelope as a Stand-Alone Application Note: previous releases of Antelope recommended using Ant with the included "run.xml" to start Antelope. This is no longer recommended. If you have Java 1.5 and Ant 1.6 or 1.7, just run the jar file as below, or in Windows and some Linux distributions, you can double click the jar file to start Antelope. Start Antelope by running: The first time you run this you will be asked to enter the location of the 'lib' directory of your Ant installation. You can also install Antelope by hand. Antelope is packaged as a single jar file, Antelope.jar. Several other jar files may be necessary: ant.jar Antelope requires Ant to do anything useful. Ant is available at http://ant.apache.org. Put it in your classpath. (Ant 1.5.x) optional.jar This is an optional library that is distributed with Ant. It has additional Ant tasks that may be useful. Put it in your classpath as required. (Ant 1.6.x) ant-launcher.jar Ant 1.6.0 split the main ant.jar into a number of smaller files to improve performance and managability. For Ant 1.6.x, ant-launcher.jar is the file that is used to actually start Ant. This jar must also be in your classpath. tools.jar This is distributed with the Java Software Development Kit. If your build file makes use of any of the JDK tools (such as javac or javadoc), put this in your classpath. An XML parser This can be one of several publicly available XML parsers. Ant is shipped with the Xerces parser. To use the Xerces parser shipped with Ant, add xercesImpl.jar and xml-api.jar from the ${ant.home}/lib directory to your classpath. If you have Java 1.5, it also comes with a built-in XML parser. See the note about having multiple parsers in your classpath and how to get around this problem. Unless you are running an older version of Java and/or an older version of Ant, just running the jar file will automatically include all necessary files. Here is Antelope running as a stand-alone application:
Antelope as a stand-alone application
Antelope as a stand-alone application provides a few features not found in the plugin version. In the plugin version, these features are provided by jEdit, so are not duplicated. The additional features are: The "File" menu deals with the build file, providing the ability to create a new build file, open a build file and to save changes to the build file. Antelope provides some basic editing capabilities, but is not intended to be a full-featured editor. You may find other editors more suited to editing build files. Also on the "File" menu is the list of recently opened files. This is handy for choosing a file that was previously opened without using the file chooser. The "Output" menu provides the ability to save the Ant output to a file and to clear the 'Output' window. The "Options" menu provides the ability to set a number of options for the application:
Font chooser
The same font will be used for both the editor and output window.
Editor options
Syntax highlighting options
Syntax hightlighting only applies to the editor window, not the output window.
Printing is not available in this version, but is on the feature list for implementation.
@style@ Antelope as a jEdit Plugin Due to changes in the jEdit API, Antelope plugin versions prior to 2.60 are for jEdit 4.1, versions 2.60 and later require jEdit 4.2 or later. Here is Antelope running in jEdit:
Antelope in jEdit
Errors found by Ant during a build (for example, a compilation error) will be shown in the ErrorList plugin.
@style@ Running Ant Targets Ant targets are ran by simply clicking the associated button. The button for a running target will show red text. As the target executes, progress will be displayed on the progress bar below the button panel and output will be displayed either on the "Output" tab (in stand-alone mode) or in the Console window (in jEdit). The progress bar will be colored green as each task executes and succeeds, the bar will turn red on a build failure. Long running targets can be stopped by clicking any of the target buttons. If Antelope is being ran as a jEdit plugin, execution can also be stopped by clicking the "Stop" button on the Console plugin. Depending on what the particular target is set to do, you may need to click the button several times to get execution to stop. An example is the <java> task with the "fork" attribute set to true. Ant starts a separate thread for the java task, so two clicks will be necessary, one to stop the jvm thread and one to stop the Ant thread. Multiple targets can be selected to run one right after another by selecting the "Multiple targets" checkbox. When this checkbox is checked, the target buttons become checkboxes. Check the targets in the order that you want them to execute. The sequence of execution is displayed along side the target name. In the image below, the "docs-xalan" target will run first, followed by the "dist" target. Once you have selected some targets to run, start them by clicking the "Execute" button. The currently running target will be displayed in the progress bar. Once execution has started, it can be stopped by clicking the "Execute" button a second time. Again, depending on what the particular target is set to do, you may need to click it several times to get execution to stop. @style@ Displaying Ant Properties The "Properties" button displays the current properties and references known to Ant from the current build file and the system environment. This is handy for determining exactly what Ant thinks a specific property value is. "Properties" and "References" are for viewing only, not for editing. The "Properties" shows all properties known to the Ant project: system properties, user properties, and global properties set in the build file. The "References" tab shows all global references known to the Ant project. Note that in some cases, not all properties can be shown. Some properties may be set "on the fly" during the build, others may be read from properties files. When trying to debug a build file, it may be useful to use the "trace" mode, which attempts to load all properties as they are encountered without actually executing any tasks.
Displaying Ant Properties
The "User" tab is for setting user properties. These are properties that would normally be passed to Ant on the command line. These properties are persistent for the build file, so each time the build file is opened, the user properties will be restored. To enter a new property, click the "New" button to create a blank row in the table. Be sure to "enter" the name and value, that is press the 'Tab' or 'Enter' key or click out of the cell to make sure the name and/or value are stored. To remove a property, empty the corresponding value.
Displaying User-Defined Properties
The "Description" tab shows some information about the build file project. The version of Ant that is in use, a list of targets in the build file, and other useful information is shown.
Displaying Project Description
@style@ Editing the Build File Clicking the "Edit" button puts Antelope in 'edit' mode. Antelope will display a tree representing the build file. Clicking on any item in the tree moves the cursor in the editor to that item in the build file. As a jEdit plugin, clicking the "Edit" button will open the build file in a jEdit buffer. As a stand-alone application, clicking the "Edit" button opens the "Edit" tab to edit the build file. When the file is saved (either by saving the buffer in jEdit or by using the File - Save Build File menu item in stand-alone mode), Antelope will immediately reload the build file to pick up any changes and refresh the button panel to reflect those changes. Note: If the build file has an xml format error, the target buttons will disappear when the file is saved. To make the buttons reappear, correct the error and resave. Usually the output will give some indication of the error in the build file. Here is Antelope in edit mode:
Antelope in 'Edit' Mode
Icons: An Ant Project. An imported Ant Project. An Ant Target in the main project file. An Ant Target in an imported project file. An Ant Task. Note the navigation arrows circled in red in the above image. As you click on items in the edit tree, the cursor in the editor panel will move to that item in the build file. The navigation arrows allow you to go back and forward, much like the back and forward buttons on a web browser. Beware that clicking on a target imported from another file will cause that file to be opened in the editor panel.
Dependency Tree
Right clicking on a target in the edit tree shows a dependency tree for that target. A "dependency tree" shows a list of targets that the selected target will by virtue of the targets being listed in the targets' 'depends' attribute, as well as any targets that may be called by <ant> and <antcall> tasks contained in the target. Like the edit tree, clicking on targets in the dependency tree will also move the cursor in the editor panel to the selected item. Tip: Antelope can open most xml files and display them in the editor and in the tree. If the xml file is not a build file (as determined by the root element being "project"), then the "Run" and "Trace" mode buttons will be disabled.
@style@ Tracing Target Execution Antelope is put into 'tracing mode' when the "Trace" button is clicked. When in tracing mode, the background of the button panel will be blue. When in tracing mode, clicking the target buttons will not actually execute the target. Instead, the output will show the specific order of execution of tasks performed by the target and targets that the selected target depends on. This is useful for figuring out exactly what a specific target does and the order of operations. To turn off tracing mode, click the "Trace" button a second time. In general, targets are not parsed below task level, that is, nested task attributes are not displayed. However, two tasks are treated specially as they have a direct bearing on how a target executes. These two tasks are ant and antcall. If the trace encounters the ant task, the buildfile and target attributes will be displayed, the build file loaded, and the target traced in that build file. If the trace encounters an antcall task, the target attribute will be parsed and the target will be traced. Here is a sample trace: [task] [delete] [javac deprecation=on debug=on destdir=build srcdir=src includes=ise/ excludes=ise/antelope/plugin/ includejavaruntime=yes source=1.5] [copy todir=build] [jar jarfile=/usr/local/java/antelope/Antelope] Done tracing target: deploy-all ]]> And a line by line explanation: Target Trace Example Explanation Tracing target: deploy-allThe trace is going to trace the deploy-all target.Legend: <target>[task]Targets shown with angle brackets, tasks with square brackets.<deploy-all>The trace is starting on the deploy-all target.<clean>[delete]The deploy-all target depends on the clean target, which performs a 'delete' task.<deploy-all>[javac deprecation=on debug=on destdir=build srcdir=src includes=ise/ excludes=ise/antelope/plugin/ includejavaruntime=yes source=1.5]The deploy-all target executes a 'javac' task. The parameters for the task are shown.<deploy-all>[copy todir=build]The deploy-all target executes a 'copy' tasks. Most likely, this tasks has nested includes and/or excludes, which are not shown in the trace.<deploy-all>[jar jarfile=/usr/local/java/antelope/Antelope]The deploy-all target executes the 'jar' task.</deploy-all>The trace has reached the end of the deploy-all target.Done tracing target: deploy-allObviously, the trace is done.
So the 'deploy_all' target first causes the 'clean' target to execute a 'delete' task, then causes the 'compile' target to execute a 'javac' task, and finally causes the 'deploy' target to create a jar file.
Antelope in 'Trace' Mode
@style@ AntLogger One of the classes distributed with Antelope is AntLogger, which is useful outside of Antelope. This is a special Ant logger and can be attached to Ant as the default logger on the command line. All Ant log messages are sent to a java.util.logging.Logger, so any number of handlers can be associated for controlling output. Make sure ise.antelope.AntLogger is in the classpath, then run Ant: ant -logger ise.antelope.AntLogger [other standard Ant options] Properties Properties can be set either on the command line or in the build file. All are optional. These properties are read and set at the start of each call to buildStarted AntLogger Properties Property Description Default antlogger.echo If set to true, output from this logger will be echoed to the original System.out and System.err print streams. false antlogger.namespace The namespace for the logger. See the java.util.logging.Logger API documentation for a discussion of logger namespaces. This should be a dot separated name and should normally be based on the package name or class name of the subsystem, such as org.apache.tools.ant. ise.antelope.Antelope antlogger.file If used, will add a java.util.logging.FileHandler to the current logger. See the java.util.logging.FileHandler API for a discussion of the value pattern. Basically, this is the name of a file, but other things can be done. none antlogger.file.append If set to true and antlogger.file is being used, then output will be appended to an existing file. If false, any existing file will be overwritten. false
Examples: ]]> - or - ant -logger ise.antelope.AntLogger -Dantlogger.echo=true [other options] ]]> - or - ant -logger ise.antelope.AntLogger -Dantlogger.namespace=com.mycompany.package [other options]

]]>
- or - ant -logger ise.antelope.AntLogger -Dantlogger.file=/tmp/output.log -Dantlogger.file.append=true [other options] Output Messages for certain build events are sent at a particular log Level. See java.util.logging.Level for a discussion of the various levels. AntLogger associates build events with log Levels as follows: AntLogger Error Levels Level.ERRORBuild failedLevel.WARNINGBuild succeededLevel.CONFIGBuild started, task started/ended, target started/endedLevel.INFOAll other messages
@style@ For Developers
@style@ Embedding Antelope in Other Applications Antelope has an open API that allows developers to easily embed Antelope into other applications. The main object to embed is AntelopePanel. AntelopePanel has three constructors: The first no-argument constructor is identical to: And the second constructor is identical to: The third constructor allows the most flexibility: build_file If supplied a build file, the AntelopePanel will open the build file and construct it's button panel from it. helper CommonHelper is an interface and has a number of methods that may be provided by applications wishing to interact with the AntelopePanel. The CommonHelper interface will be covered in more detail below. use_internal_menu This boolean setting tells AntelopePanel whether or not to use it's internal menu. Applications may provide their own, or the default menu provided by AntelopePanel can be used. When Antelope is running as a jEdit plugin, the internal menu is used, when running as a stand-alone application, it is not. The proper way to have your application interact with AntelopePanel is by writing a class that implements the CommonHelper interface. * WARNING: this method is likely to change. The helper should * not need to provide a list of jars, rather, it should provide an ANT_HOME * directory. Antelope should be smart enough to find the jars given the * directory, plus should automatically look in the standard Ant library * locations. * @return a list of the jars used by Ant. The individual list items must be Strings * representing the file names of the jar files. Note that other jars may be included, * such as custom Ant task libraries. */ public java.util.List getAntJarList(); } ]]> At a minimum, you'll need to include all classes in the ise.antelope.common and ise.library packages.
@style@ API for jEdit Plugin Developers Antelope can be used from other jEdit plugins that may desire to run Ant targets. The public API is described here, plus some examples of how to use this API from other plugins. You can also use this API from a beanshell macro, see the FAQ section. public static File getBuildFile(View view); This method returns a reference to the current build file. public static String[] getTargetList(File buildFile); This method returns a list of the target names in the given build file. public static void executeTarget( View view, File buildFile, String target ); This method executes a target. Since the execution is through Antelope, output will be to the Console plugin and errors will be displayed in the ErrorList plugin. The AntelopePlugin will attempt to find an instance of Antelope for the given view, then execute the target. The target must exist in the given build file. public static void setBuildFile(View view, File buildFile); This method sets the current build file for the Antelope instance in the given view. Antelope will reload itself to reflect the new build file. Following are some examples of calling these methods from your plugin. Notice that you do not need the Antelope source or classes to compile or run your plugin, so you do not need to make Antelope a dependency for the PluginManager. The examples only work if Antelope is actually installed as a jEdit plugin and do nothing otherwise. The best place to put these examples is in your plugin's Plugin class. These examples are suitable for copy and paste into your plugin's source code. You will need to import: org.gjt.sp.jedit.EditPlugin, org.gjt.sp.jedit.jEdit, org.gjt.sp.jedit.View, and java.io.File. This simply returns "true" if Antelope is installed. It is convenient to call this method prior to calling the others. public static boolean isAntelopeAvailable() { EditPlugin ep = jEdit.getPlugin( "ise.antelope.plugin.AntelopePlugin" ); return ep != null; } This method returns a reference to the current build file or null if Antelope is not installed or on any other error. public static File getBuildFile(View view) { if (view == null){ return null; } if ( !isAntelopeAvailable() ) { return null; } EditPlugin ep = jEdit.getPlugin( "ise.antelope.plugin.AntelopePlugin" ); try { Class c = ep.getClass(); java.lang.reflect.Method m = c.getDeclaredMethod( "getBuildFile", new Class[]{View.class} ); if ( m == null ) { return null; } return (File)m.invoke( null, new Object[]{view} ); } catch ( Throwable e ) { } return null; } This method returns a list of targets in the given build file or null if Antelope is not installed or on any other error. public static String[] getTargetList(File buildFile) { if (buildFile == null || !buildFile.exists()){ return null; } if ( !isAntelopeAvailable() ) { return null; } EditPlugin ep = jEdit.getPlugin( "ise.antelope.plugin.AntelopePlugin" ); try { Class c = ep.getClass(); java.lang.reflect.Method m = c.getDeclaredMethod( "getTargetList", new Class[]{File.class} ); if ( m == null ) { return null; } return (String[])m.invoke( null, new Object[]{buildFile} ); } catch ( Throwable e ) { } return null; } This method will execute an Ant target via Antelope. public static void executeAntTarget(View view, File buildFile, String target) { if (view == null || buildFile == null || target == null) return; if ( !isAntelopeAvailable() ) { return; } EditPlugin ep = jEdit.getPlugin( "ise.antelope.plugin.AntelopePlugin" ); try { Class c = ep.getClass(); java.lang.reflect.Method m = c.getDeclaredMethod( "executeTarget", new Class[]{View.class, File.class, String.class} ); if ( m == null ) { return; } m.invoke( null, new Object[]{view, buildFile, target} ); } catch ( Throwable e ) { } } This method will cause Antelope to load the given build file. public static void setAntelopeBuildFile(View view, File buildFile) { if (buildFile == null || !buildFile.exists()){ return; } if ( !isAntelopeAvailable() ) { return; } EditPlugin ep = jEdit.getPlugin( "ise.antelope.plugin.AntelopePlugin" ); try { Class c = ep.getClass(); java.lang.reflect.Method m = c.getDeclaredMethod( "setBuildFile", new Class[]{View.class, File.class} ); if ( m == null ) { return; } m.invoke( null, new Object[]{view, buildFile} ); } catch ( Throwable e ) { } }
@style@ Frequently Asked Questions When I try to use the <javac> task, I keep getting a "no compiler found" error, but I have JAVA_HOME set correctly. How can I fix this? Check two things: (1) make sure JAVA_HOME is really set correctly. Windows JDK installations by default set JAVA_HOME to point to the jre directory under your JDK installation. This is fine for running Java programs, but not for compiling. Set JAVA_HOME up one directory to point to the root of your JDK installation, not the jre directory. (2) make sure JAVA_HOME/bin is in your PATH. This is the directory that contains javac. Here are some example settings from my Windows 2000 computer: JAVA_HOME = c:\j2sdk1.4.1_02 PATH = (path to windows,etc);c:\j2sdk1.4.1_02\bin; I'd like to assign a key to a target button when running Antelope as a jEdit plugin. Is there anyway I can do this? Mark Pollard and I worked out this solution: In jEdit, open a new buffer and paste this in: jEdit.saveAllBuffers(view, false); VFSManager.waitForRequests(); ise.antelope.plugin.AntelopePlugin plugin = jEdit.getPlugin("ise.antelope.plugin.AntelopePlugin"); plugin.executeTarget(view, plugin.getBuildFile(view), "compile"); Replace 'compile' with the name of the target you want to run. Save it in your ${user.home}/.jedit/macros directory (on my Windows machine, this is c:\Documents and Settings\danson\.jedit\macros, on my Linux box, it's /home/danson/.jedit/macros). Name it whatever you want, but be sure to give it a .bsh extention. Depending on your jEdit version, it will either be automatically loaded or use the 'Macros' menu, then 'Rescan macros' item. Then under the 'Utilities' menu -> 'Global Options' -> 'Shortcuts', pick 'Macros' from the drop down box on the right, and assign a key to the macro you just saved. If you name your targets consistently across your build files, this will work well for the targets that you run a lot, like 'compile' and 'test'. I get out of memory errors when trying to run my build file in Antelope. How can I avoid this problem? If you are starting Antelope with the run.xml file, edit this file and adjust this line: <java classname="ise.antelope.app.Antelope" fork="true"> to look like this: <java classname="ise.antelope.app.Antelope" fork="true" maxmemory="128m"> Adjust the maxmemory attribute as needed for your build. If you are starting Antelope from command-line java, add the -Xmx parameter to the command line like this: java -Xmx128m -jar AntelopeApp_@buildnum@.jar All the buttons disappeared from Antelope. How do I get them back? This means that you have an error in your build file and Antelope does not recognize it as valid xml. Usually the the output window will give some indication of the problem. Correct the build file and save it, and the buttons will reappear. (See the next question also.) My build file uses external entities to include standard targets and properties. When I try to open this build file, all the buttons disappear. How do I get them back? Antelope version 2.53 and earlier did not support external entities. Upgrade to a version later than 2.53. Also, be sure your external entities are declared correctly. This example is from the Ant FAQ: ]> ... &common; ... ]]> @style@ Support Please visit the project web pages at http://antelope.tigris for reporting bugs, user mailing lists, and other technical resources. This is also the location for finding the latest releases. In particular, if you are using Antelope as a jEdit plugin, you will invariably find newer versions on the Antelope project web site than from jEdit's plugin manager. You can also contact me directly at danson@germane-software.com antelope-3.5.1.orig/src/docs/manual/syntax_d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2>Ɩqxc8W9}3,/Yc=CݰjN'a͛洧GMPN5L}̪Ԭnh_=Xzo <ed uЎJc;V]kZۮݵ pwZq{& lݦy{-eFu˅';&##t\p78p9e*R|-er|,x5咷;o'Ɨt;]OʛNC]y{>g+9rZ_=VG٩GܵcI:׮w971sEoSm#r;?xcxW)/Ǻњ).ۣ4OQ_zݛ~~xR[g=~{'5~|T/B?Rg~HU'/Gi|m7xV׀' HgǧǁwEX'Xf{\W/(vGhWtx6Ȃ"?/A7'\\`U`6]R{@8EDx?h\Wph6{jV]^B2Xg{Cx#T._(rGQhdDՇq1HtdVF]yHqo(hHg5q6|X^؆8HX假H| ~i芺Hj[(pŘ~o؂ V}xoh}~hUbH"luXUX75&nŎVЇ妏Ǐ('YxU$\FgWr}o׍ᵉuFבSڶk"W{Nhz<z5B膤Ȇx{ t؊sXFx>DAhsLjؒXh)?ٔD Mr7rNŁP=)O94I&ƉI)W\)PٕOY"Xfvhgœln sHgi]_+9v(ȗ`Y kfɐ"lokoIkIojnjnh~ɐy9ӆِuxj9n kiYk ǩkɩ9ϩ\mIȃep&[Yn+ᩐ︄*ŝQX}^3|2~&E萮Sn.R^]6f,R>~^ViN/%nR֭%_׶F^8]L|NRWm֨%50U@nYmb覮>sN )5^vu¼ͬnrގol ^ n!/ ^0Kl.oE#,9'?(?R8:O Ant Coding Style Guidelines

Ant Coding Style Guidelines

Contents

  1. Introduction
  2. File Names
  3. Build File Structure and Formatting
  4. Projects
  5. Properties
  6. Targets
  7. Tasks
  8. Comments
  9. Example Build File


1. Introduction

Why Have Code Conventions

Code conventions are important to software developers for a number of reasons:
  • 80% of the lifetime cost of a piece of software goes to maintenance.
  • Hardly any software is maintained for its whole life by the original author.
  • Code conventions improve the readability of the software, allowing engineers to understand new code more quickly and thoroughly.
  • If you ship your source code as a product, you need to make sure it is as well packaged and clean as any other product you create.

These same reasons apply to build engineers maintaining Ant build files.

Keep in mind that these are guidelines, not hard and fast rules. The ultimate goal is readability and maintainability.

These guidelines have been compiled from the Ant user guide, Sun's Java coding style guidelines, example build files from various Jakarta applications, and e-mail messages on the Ant mailing lists.

Top


2. File Names

The default Ant build file is named "build.xml". Any build system beyond the most basic will have multiple build files for various modules of the application. Having them all named "build.xml" quickly leads to confusion of which does what.

Build file names should indicate the main purpose of the file, and should be in the Java style of mixed upper and lower case letters, with the first letter always capitalized. Words should be spelled out rather than abbreviated, unless the abbreviation is the more common reference. Using the main target name might work well.

Examples:

  • MasterBuild.xml
  • CreateApplicationJar.xml
  • CreateInstaller.xml

Build files may load properties from a properties file. These property files should be named the same as the build file name, but with a ".properties" extension.

Examples:

  • MasterBuild.properties
  • CreateApplicationJar.properties
  • CreateInstaller.properties

Top


3. Build File Structure and Formatting

Structure

Ant build files will be arranged with the project description first, followed by "global" properties, followed by targets. Properties and targets do not need to be sorted, however, the default target specified by the project must be the first target listed.

Formatting

Four spaces should be used as the unit of indentation.

Do not use tabs instead, use 4 spaces in place of a single tab. Many editors can do this automatically.

Vertically align start and end tags for an element. Indent child elements.

Avoid lines longer than 80 characters, since they're not handled well by many terminals and tools.

Use a single space after a comma.

Group properties by use, for example, group directory definitions together. Insert a single blank line between groups.

Insert two blank lines between targets.

Insert one blank line between tasks within a target.

When an expression will not fit on a single line, break it according to these general principles:

  • Break before an attribute.
  • Break after a space or comma.
  • Prefer higher-level breaks to lower-level breaks.
  • Align the new line with the beginning of the expression at the same level on the previous line.
  • If the above rules lead to confusing code or to code that's squished up against the right margin, just indent 8 spaces instead.
Examples:
    <property name="modules"
        value="libs, junit_tests, images, docs, api_docs, external_libs,
              sources" />
        
    <copy todir="${unit_test_deploy}" overwrite="true">
        <fileset dir="${unit_test_home}">
            <exclude name="**/CVS" />
        </fileset>
    </copy>

This is wrong:

  <target name="test_all" depends="clean,setupApp,
                                    setupTests,setupLogger,
                    startReportServlet,runTests"/>

This is right:

                    
    <target name="test_all" 
        depends="clean, setupApp, setupTests, setupLogger, 
                startReportServlet, runTests"/>

Top


4. Projects

To be acceptable to Ant, each build file must have a "project" element as its root element.

A project has three attributes. This standard deviates slightly from the Ant standard in that the "name" attribute is required and will be the same as the file name without the ".xml" extension.

Attribute Description Required
name the name of the project. This attribute should be the same as the file name without the .xml extension. Yes
default the default target to use when no target is supplied. Yes
basedir the base directory from which all path calculations are done. This attribute might be overridden by setting the "basedir" property beforehand. When this is done, it must be omitted in the project tag. If neither the attribute nor the property have been set, the parent directory of the buildfile will be used. No

Ant allows that a description for the project can be provided as a top-level <description> element. This description will be included in the output of the ant -projecthelp command. While this is optional for Ant, the description element is required by this standard.

Example description:

  
<description>
This build file is used to build the Foo subproject within 
the large and complex Bar project.
</description>

Top


5. Properties

Property names should be short yet meaningful. The choice of a property name should be mnemonic -- that is, designed to indicate to the casual observer the intent of its use. One-character property names should be avoided. Property names will be all lowercase with underscore separating individual words.

Examples:

<property name="build_dir" value="build"/>
<property name="jar_dir" value="${build_dir}/jars"/>
<property name="lib_home" value="lib"/>

Properties may be defined in a properties file. These property files should be named the same as the build file name, but with a ".properties" extension.

Properties may be "grouped" using the "dot" notation. For example, suppose the documentation for a project is divided into several manuals: the user manual, the installation manual, a technical support manual, and a examples manual, with the source for each manual residing in a separate directory. Then properties might look like this:

<property name="docs_dir" value="docs"/>
<property name="docs.user_manual" value="${docs_dir}/user_manual"/>  
<property name="docs.install_manual" value="${docs_dir}/installation"/>  
<property name="docs.tech_manual" value="${docs_dir}/techman"/>  
<property name="docs.examples_manual" value="${docs_dir}/examples"/>

Top


6. Targets

Like property names, target names should be short and meaningful. A target name should descript the overall intent of the target function. Target names should start with a verb, in mixed case with the first letter lowercase and with the first letter of each internal word capitalized.

Examples:

  • initialize
  • notifyOnFailed
  • runTests
All targets that are likely to be called directly, that is, from the Ant command line, should have the description attribute filled in. This description will be included in the output of the ant -projecthelp command.

Targets that should not be called directly from the command line should start with a hyphen, for example,

-cleanDocDir.

Top


7. Tasks

Avoid use of the "exec" task if possible as this reduces portability.

This is bad as it assumes that the 'tar' utility is installed on the current path:

    <exec executable="tar" dir="${java.tmp.dir}/libraries">
        <arg line="-xzf ${build_dir}/${libraries_tar}"/>
    </exec>
This is good:
    <untar src="${build_dir}/${libraries_tar}" compression="gzip"
        dest="${java.tmp.dir}/libraries"/>

Top


8. Comments

More is better! In particular, write comments for the intended use of properties and targets. The build file itself will tell what is happening, the comments should explain why.

For target comments, use a block comment similar to this example:

<!-- ==================== Dist Target ================================ 

    The "dist" target creates a binary distribution of the application
    in a directory structure ready to be archived in a tar.gz or zip file.
    This target depends on two others:

    * "compile" so that the entire web application (including external
      dependencies) will have been assembled

    * "javadoc" so that the application Javadocs will have been created

-->
Place target comments immediately above the target element, with a single blank line between the end of the comment and the start of the target.

For other comments, such as for properties or within a target, use the standard xml single line comment like this:

<!-- this is a comment -->

If a comment is longer than a single line, wrap it and indent the second and subsequent lines 4 spaces, for example:

<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file,
    then copy it and the source jar to the ${dist} directory so 
    everything will be ready for moving to the ftp server. -->

Do not put a blank line between a single line comment and the element it is describing, for example:

    <!-- this is where the api documents live -->
    <property name="api_docs" value="${docs_home}/api"/>
Top


9. Example Build File

The following example build file follows these guidelines. This build file would be stored on disk as "MyProject.xml".


<project name="MyProject" default="dist" basedir=".">
    <description>
        simple example build file
    </description>
    
    <!-- set global properties for this build -->
    
    <!-- where the source files are -->
    <property name="src" location="src"/>
    
    <!-- where the compiled classes go -->
    <property name="build" location="build"/>
    
    <!-- where to place the finished jar file -->
    <property name="dist"  location="dist"/>

    <!-- ========== Dist Target ===================================
        The dist target compiles all the source code and creates
        a jar file for distribution.
    -->
    <target name="dist" depends="clean, compile"
        description="generate the distribution" >
        <!-- Create the distribution directory -->
        <mkdir dir="${dist}/lib"/>

        <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar
            file -->
        <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar"
            basedir="${build}"/>
    </target>

    <!-- ========== Init Target ====================================
        This target initializes the build by creating a time stamp
        for use in the jar file name and creating the directory
        to hold the compiled classes.
    -->
    <target name="-init">
        <!-- Create the time stamp -->
        <tstamp/>
      
        <!-- Create the build directory structure used by compile -->
        <mkdir dir="${build}"/>
    </target>

    <!-- ========== Compile Target =================================
        The compile target compiles all files in the source directory
        into the build directory.
    -->
    <target name="compile" depends="-init" 
        description="compile the source " >
        
        <!-- Compile the java code from ${src} into ${build} -->
        <javac srcdir="${src}" destdir="${build}"/>
        
    </target>

    <!-- ========== Clean Target ====================================
        The clean target deletes all files from the build directory
        and the dist directory. 
    -->
    <target name="clean" description="clean up" >
        <!-- Delete the ${build} and ${dist} directory trees -->
        <delete dir="${build}"/>
        <delete dir="${dist}"/>
    </target>
</project>
Top


antelope-3.5.1.orig/src/docs/manual/tracemode.gif0000644000175000017500000004644510032534072021621 0ustar drazzibdrazzibGIF89a$k k$k(k(s(k,s,k,s0s c01Κec0sΚcceΜ10cecec0{4s4{!4{!8{8{!<{!<)A8s!A)9l߯?99P`> =0?LD? ÅDdEH#A&xG aI2*IܸDL(;($L<EBO( ENFQTQ`9EQPŖTT&SiESXAřVfWXqƹwWp'|*]pQ]EhF i`PJ)`1v:Ƨ1c1j!묲FچᆯprQlp;tt@+-uauqupmwԁqǸ{yznGa/ /0  b"„,,!@, PlqŅdH/RNj\#$l(+ $@y@w5P_u X`VadD?f D`Ya4h6fuk#6'l= _n$]6o(GBǵMŝttSG a /P^zሿ6 ~9TnH/^VQD!b),x2x6*#I,;?"YX ?UB_e[V׏YۧfVǩZ\'~'\hf$څCTƠ)Mq TNEUUZ^EAWaV\4+^ypW5cXtC hZՊPn0\ Wu.>]?d(/yCկ& "O9LaXh]#"Ə}ehLU沨f^ 1@Kb@F2e2cD3"MԜ5$eڈ6o6ٛFmiqR2ny7eGy dI 3L3?:AtPB'! UBP4$(v*z\;ͨw7j|ɝ?r~z*IQzB0+eɟXR@%1LۣĦ|t?jP2G9Q N0TcU ipU((Vސ+_ oPuB9!YrxhaK[Oݖ pxࡺv^ k}5"HCT`pXú81a#D!6Ʊc"H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fnЈgDyݝu'M}xGJ,Dyt'[H`4\L4 Nt$goL @ZDѾNJ(9AhqA8gn#Ap€(9$-0bE_ ǑA!PM`V(F Nh E)LæLV1d$S!C*AI`EG9ք;(P UV E+32$-ki[Ȩ).N&NZҷA3//%1ɒ:bFȣ'8 N⏯$}&&=hRI nkܡuw.H6HKD)aqJXp5Ale̬ ػ5C~eKq3#%iLN"Ȣ IZXC_b f@"%S=^45 ȉL, qixF/F)I|Z3Ġ?o P%APp,,̈o эΔ5ߏx9]Nq&5*Qʔ(x,b1r.F3D3юTtG5kTQby!HRs\k]-gҪTЯթtZM6D;),W/Yx9,dA+re+-~ЮV#rwƖ^"_IZf~j[,5.%s[傍j].nq]n+ku55y+ ~6xm_JE{ 2ΗEe_k5*0!N)d p,X pB>aE62,b v1U$<%MH)JGBf&2Lې(<}\ 9r\%BaYI3\h71v~\gъehM'Җjn2MӁ>iUÒύ&UZ3q YӚڭs״5Ql]umʶ6nlkU~-dR]lu;d!3l{nHx$KojGpCw8Hp{/\ 70 ?z*YN._-W̼j.%'Onv-sˁo<8-9;mNCwW%tF׹|xvv縥f-p!0Plu.p |%.FQ0-nBTPF^pigtpyYD0px&rt" p 0 p 0 p ɰ 0 p ٰ 0pP0p1q 1q!1%q)-115q9T=A1EqIMQ1Uq\a1eqimq1uqy}1q1q1o1 ;antelope-3.5.1.orig/src/docs/manual/index.html0000644000175000017500000005055310013677776021201 0ustar drazzibdrazzib Antelope

Antelope

Author: Dale Anson
Version: 1.98

"This product includes software developed by the Apache Software Foundation (http://www.apache.org/)."

Contents

Introduction
Requirements
Support
Running Antelope

Running Ant Targets
Displaying Ant Properties
Editing the Build File
Tracing Ant Targets
The Built-in AntLogger
The 'Assert' Task
The 'If' Task
Ant Coding Style


Introduction

Antelope is a graphical user interface for running Ant. It provides a set of buttons, one per target, which makes it easy to start a specific Ant operation.

Top


Requirements

See the installation instructions below for the specific requirements for Antelope. Antelope does require Java 1.4 or later as it makes use of both java.util.logging and java.util.prefs APIs which were introduced in that version.

Top


Support

Please visit the project web pages at http://antelope.sourceforge.net for reporting bugs, user mailing lists, and other technical resources.

Top


Running Antelope

Antelope can be ran in two ways. Follow these links for installation and starting instructions for each mode.

(Also see the section about running Antelope's AntLogger.)

Either way, Antelope is operated almost identically. To set up Antelope, click on the "Options" button. This will display the following:

When running Antelope as a stand-alone application, the options "Save all files before running targets" and "Use error parsing" are not available. This is the only difference between the stand-alone and the plugin.

The available options are as follows:

  1. Ant build file The current build file name is displayed along with an option to choose a new build file. Antelope is basically useless without a build file, so this is the first step.
  2. Save all files before running targets This is only available when running as a jEdit plugin. If checked, all files that are currently open for editing in jEdit will be saved before running the selected target.
  3. Use error parsing This is only available when running as a jEdit plugin. If checked, output from the target will be passes through the Console plugin error parser and errors will be displayed in the ErrorList plugin. This is useful for tasks such as javac that produce standard error messages. Other tasks may not produce output suitable for error parsing, in which case, the output might be cleaner if this options is turned off.
  4. Show subtargets There are two common methods of designating "primary" targets and "subtargets". Primary targets are those that are invoked directly, while subtargets are generally "helper" targets that are invoked from other targets. One method of distinguishing between primary and subtargets is only giving descriptions to primary targets. Unchecking the "Show targets without descriptions" will cause Antelope to display buttons only for targets that have a description. Another common method to designate subtargets is to use "dot" notation, for example, a "clean" target may have two helper targets, "clean.docs" and "clean.api.docs". Unchecking the "Show targets with dots" will cause Antelope to display a button for the "clean" target but not the "clean.docs" nor the "clean.api.docs" targets.
  5. Set message level There are five message levels available and are in order of verbosity, "Error" being the lease verbose and "Debug" being the most. For general use, "Information" is about right.
  6. Show message events Ant produces messages on various events as it runs a target. Generally, all Ant messages are useful, but these can be adjusted as necessary. Turning off 'Target events' and 'Task events' will generally show all the important information without too much excess output.

Top


Running Ant Targets

Ant targets are ran by simply clicking the associated button. The button for a running target will show red text. Long running targets can be stopped by clicking any of the target buttons. If Antelope is being ran as a jEdit plugin, execution can also be stopped by clicking the "Stop" button on the Console plugin.

Top


Displaying Ant Properties

The "Properties" button displays the current properties and references known to Ant from the current build file and the system environment. This is handy for determining exactly what Ant thinks a specific property value is. "Properties" and "References" are for viewing only, not for editing. The "Properties" shows all properties known to the Ant project: system properties, user properties, and global properties set in the build file. The "References" tab shows all global references known to the Ant project.

The "User" tab is for setting user properties. These are properties that would be passed to Ant on the command line. These properties are persistent for the build file, so each time the build file is opened, the user properties will be restored. To enter a new property, click the "New" button to create a blank row in the table. Be sure to "enter" the name and value, that is press the 'Tab' or 'Enter' key or click out of the cell to make sure the name and/or value are stored. To remove a property, empty the corresponding value.

Top


Editing the Build File

Clicking the "Edit" button puts Antelope in 'edit' mode. Antelope will turn green to indicate edit mode. In this mode, the target buttons don't execute Ant targets, instead, they cause the edit area to scroll to the start of the target. To turn off 'edit' mode, click the "Edit" button again.

As a jEdit plugin, clicking the "Edit" button will open the build file in a jEdit buffer.

As a stand-alone application, clicking the "Edit" button opens the "Edit" tab to edit the build file.

When the file is saved (either by saving the buffer in jEdit or by using the File - Save Build File menu item in stand-alone mode), Antelope will immediately pick up any changes in the build file and recreate the button panel to reflect those changes.

Here is Antelope in edit mode:

Top


Tracing Target Execution

Antelope is put into 'tracing mode' when the "Trace" button is clicked. When in tracing mode, the background of the button panel will be blue. When in tracing mode, the target buttons do not actually execute the target. Instead, the output will show the specific order of execution of tasks performed by the target and targets that the selected target depends on. This is useful for figuring out exactly what a specific target does and the order of operations. To turn off tracing mode, click the "Trace" button a second time.

In general, targets are not parsed below task level, that is, nested task attributes are not displayed. However, two tasks are treated specially as they have a direct bearing on how a target executes. These two tasks are ant and antcall. If the trace encounters the ant task, the buildfile and target attributes will be displayed, the build file loaded, and the target traced in that build file. If the trace encounters an antcall task, the target attribute will be parsed and the target will be traced.

Here is a sample trace:

Tracing target: deploy-all
Legend: <target>[task]

<deploy-all>
<clean>[delete]
<deploy-all>[javac deprecation=on debug=on destdir=build srcdir=src includes=ise/ excludes=ise/antelope/plugin/ includejavaruntime=yes source=1.4]
<deploy-all>[copy todir=build]
<deploy-all>[jar jarfile=/usr/local/java/antelope/Antelope]
</deploy-all>

Done tracing target: deploy-all

And a line by line explanation:

Tracing target: deploy-allThe trace is going to trace the deploy-all target.
Legend: <target>[task]Targets shown with angle brackets, tasks with square brackets.
<deploy-all>The trace is starting on the deploy-all target.
<clean>[delete]The deploy-all target depends on the clean target, which performs a 'delete' task.
<deploy-all>[javac deprecation=on debug=on destdir=build srcdir=src includes=ise/ excludes=ise/antelope/plugin/ includejavaruntime=yes source=1.4]The deploy-all target executes a 'javac' task. The parameters for the task are shown.
<deploy-all>[copy todir=build]The deploy-all target executes a 'copy' tasks. Most likely, this tasks has nested includes and/or excludes, which are not shown in the trace.
<deploy-all>[jar jarfile=/usr/local/java/antelope/Antelope]The deploy-all target executes the 'jar' task.
</deploy-all>The trace has reached the end of the deploy-all target.
Done tracing target: deploy-allObviously, the trace is done.

So the 'deploy_all' target first causes the 'clean' target to execute a 'delete' task, then causes the 'compile' target to execute a 'javac' task, and finally causes the 'deploy' target to create a jar file.

Top


Antelope as a Stand-Alone Application

Antelope is packaged as a single jar file, Antelope.jar. Several other jar files may be necessary:

  • kappalayout.jar This is required for Antelope to run. KappaLayout is a layout manager. This jar file is bundled with the Antelope distribution. Put it in your classpath.
  • ant.jar Antelope requires Ant to do anything useful. Ant is available at http://jakarta.apache.org/ant. Put it in your classpath.
  • optional.jar This is an optional library that is distributed with Ant. It has additional Ant tasks that may be useful. Put it in your classpath as required.
  • tools.jar This is distributed with the Java Software Development Kit. If your build file makes use of any of the JDK tools (such as javac or javadoc), put this in your classpath.
  • An XML parser This can be one of several publicly available XML parsers. Ant is shipped with the Xerces parser. To use the Xerces parser shipped with Ant, add xercesImpl.jar and xml-api.jar from the ${ant.home}/lib directory to your classpath.

The manifest file for Antelope.jar specifies kappaylayout.jar and ant.jar on the classpath, so all that should be necessary to start Antelope is:

java -jar Antelope.jar

If using the optional.jar and/or tools.jar:

java -cp optional.jar:tools.jar -jar Antelope.jar

Here is Antelope running as a stand-alone application:

Antelope as a stand-alone application provides a few features not found in the plugin version. In the plugin version, these features are provided by jEdit, so are not duplicated. The additional features are:

  • The "File" menu deals with the build file, providing the ability to open a build file and to save changes to the build file. Antelope is not intended to be a full-featured editor, so it is assumed that the build file already exists. The editing facilities provided by Antelope are for convenience, and were not designed to create build files from scratch, however, the ability to create a new file is on the feature list for implementation in a future version.
  • Also on the "File" menu is the list of recently opened files. This is handy for choosing a file that was previously opened without using the file chooser.
  • The "Output" menu provides the ability to save the Ant output to a file and to clear the 'Output' window.
  • The "Format" menu provides the ability to set the font for the output and edit windows. The same font is used for both windows. The color coding of the edit and output windows is not adjustable in this version.
Printing is not available in this version, but is also on the feature list for implementation. Top


Antelope as a jEdit Plugin

Antelope is packaged as a single jar file, Antelope.jar. To install Antelope, copy Antelope.jar to ${user.home}/.jedit/jars. Several other jar files are required:

  • kappalayout.jar This is required for Antelope to run. KappaLayout is a layout manager. This jar file is bundled with the Antelope distribution. Copy or link this file to ${user.home}/.jedit/jars.
  • ant.jar Antelope requires Ant to do anything useful. Ant is available at http://jakarta.apache.org/ant. Copy or link this file to ${user.home}/.jedit/jars.
  • optional.jar This is an optional library that is distributed with Ant. It has additional Ant tasks that may be useful. Copy or link this file to ${user.home}/.jedit/jars as required.
  • tools.jar This is distributed with the Java Software Development Kit. If your build file makes use of any of the JDK tools (such as javac or javadoc), you need this in the classpath. The AntelopePlugin asks jEdit to load tools.jar automatically, but depending on your environment (jEdit is running in a plain JRE, for example), this may fail. Copy or link this file to ${user.home}/.jedit/jars if you need it and jEdit can't load it. Antelope will tell you when it can't find a tool from this jar the first time you try to use the tool.
  • Console.jar This is a jEdit plugin and is required. Output from Antelope will be displayed in the Console. Make sure jEdit has this plugin installed.
  • ErrorList.jar This is another jEdit plugin and is required. Errors produced by Ant are displayed by Antelope in the ErrorList plugin. Make sure jEdit has this plugin installed.
  • An XML parser This can be one of several publicly available XML parsers. Ant is shipped with the Xerces parser. To use the Xerces parser shipped with Ant, add xercesImpl.jar and xml-api.jar from the ${ant.home}/lib directory to your classpath. If you have the XML plugin installed, then you already have a version of Xerces installed. Note: There is sometimes a problem with various jEdit plugins and xml parsers. Generally, this is due to a conflict with several similar parsers being in the class path. The simplest way to resolve this issue is to remove ALL xml parsers (xerces, crimson, xml4j, etc) from the ${user.home}/.jedit/jar directory and copy ONE of them to your ${jedit.home}/jars directory. This will ensure that a good parser is in your classpath, that it is loaded before any plugins, and that there will be no conflicts from having multiple parsers. My recommendation is that the latest Xerces jars from http://xml.apache.org/xerces2-j/index.html be used as this is the industry standard Java XML parser.

Here is Antelope running in jEdit:

Top


AntLogger

One of the classes distributed with Antelope is AntLogger, which is useful outside of Antelope. This is a special Ant logger and can be attached to Ant as the default logger on the command line. All Ant log messages are sent to a java.util.logging.Logger, so any number of handlers can be associated for controlling output. Make sure ise.antelope.AntLogger is in the classpath, then run Ant:

ant -logger ise.antelope.AntLogger [other standard Ant options]

Properties
Properties can be set either on the command line or in the build file. All are optional. These properties are read and set at the start of each call to buildStarted

Property Description Default
antlogger.echo If set to true, output from this logger will be echoed to the original System.out and System.err print streams. false
antlogger.namespace The namespace for the logger. See the java.util.logging.Logger API documentation for a discussion of logger namespaces. This should be a dot separated name and should normally be based on the package name or class name of the subsystem, such as org.apache.tools.ant. ise.antelope.Antelope
antlogger.file If used, will add a java.util.logging.FileHandler to the current logger. See the java.util.logging.FileHandler API for a discussion of the value pattern. Basically, this is the name of a file, but other things can be done. none
antlogger.file.append If set to true and antlogger.file is being used, then output will be appended to an existing file. If false, any existing file will be overwritten. false

Examples:

<property name="antlogger.echo" value="true"/>
- or -
ant -logger ise.antelope.AntLogger -Dantlogger.echo=true [other options]

<property name="antlogger.namespace" value="com.mycompany.package"/>
- or -
ant -logger ise.antelope.AntLogger -Dantlogger.namespace=com.mycompany.package [other options]

<property name="antlogger.file" value="/tmp/output.log"/>
<property name="antlogger.file.append" value="true"/>
- or -
ant -logger ise.antelope.AntLogger -Dantlogger.file=/tmp/output.log -Dantlogger.file.append=true [other options]

Output

Messages for certain build events are sent at a particular log Level. See java.util.logging.Level for a discussion of the various levels. AntLogger associates build events with log Levels as follows:

Level.ERRORBuild failed
Level.WARNINGBuild succeeded
Level.CONFIGBuild started, task started/ended, target started/ended
Level.INFOAll other messages
Top antelope-3.5.1.orig/src/docs/manual/red_ant.gif0000644000175000017500000000054410030603064021254 0ustar drazzibdrazzibGIF89a|L_q!Created with The GIMP! ?,hpH,Q K"AX "!T  s< DR~`2r#Yp:r bCC mlB!"#$??B%&?'LK()J*V?kpm+,VA;antelope-3.5.1.orig/src/docs/manual/description_properties.gif0000644000175000017500000002636310032534072024452 0ustar drazzibdrazzibGIF89aW΄{}{{{ֵJY{Ɣkycikq焎Ƅ}Za絶RaZisƌcecƾBABce!Created with The GIMP! ,WŦմ%% HDP„J40E+bh118d'S\b˖/Y\!ӥL#hsO-:bhѡ.&-鈦.Ju"*ի0jEׯ0`+Y2`]-[2f;W]riw߾4j,xÃmPx6"۸!ɘqyΜsMiѧM5׮uȞM{l۲y{ > AN8BVj"vKbI,TҸ-dL7OxQFe/SF{dUEUUedi c暄X3VIڟ#&fkhksm`n73oֳr sujt^]Jow]000 2|j}k;_`>Ѝ >۬. [(8rhyݢ踸,+95Xf#;ᅠɤUB M>~ {f ~ᮗhu1X ȋ|d%v( j:Phl37ʨnN>_Zɑ_tt"M]A RA b93yK҇4h Ђ5 AH)&-qD(I\QnF(.wK^<2NB/z _Jb:(i* Wv"zoU/"b c-3x e(Ӽ.FP) ƈ=76ۙc) h3gLǎɣw Woj0q TU,  O{J+"?z[܀5,(9(eUvPLZ~q.\Nr8ɍ4vsOR rptOj8%e)aamD2=щ8h*&/ܓ:(vqzz(I=j>ǧS@W 5U7H4@ ( @tE,!۲L`BJA85dE存 &Bv"fjC{P_3ZJeV0nF|bDrv"jpFeb\M or潟Uhm>KNZЃ  ad`*Ξ’PP S@)ZҢL)qrom1CN1S$)E h\!s]Jv9zu]f%nnw k8Ͼ"Z)(;7W2fϮ˫h+JaP1iV EM[iS[wm\/V$grU-^&8V)&q0㧂՝M<8Oz.J7g_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#1iY0ɛ~iwtZ)YDɜω9ԉiX)ir)׀Bѩž, "+i*ɟY*X9i] 3 "(j'ʡ{''xY@'.R7*ڠz6\tguT㱢4*XY~\w?*AZZCjdhLA: zEՅҡd~x vawc*$ʢJVAL6{WAp!ڇ~ "zʖ Niݢ Zr0稛yj꩙,wꁬJ$p㙅,j>.J5H! -z~꬧J:Xz̺ڭj 窮Ʈ *Jjʯ +K;ꊰ wẪC Kk˱ !+#K%k')+˲-/j3j ۰& {i? A+CKEkGIK˴MO Q+SKU[B`k8kk<KscSd egblfq s۶tuwr|v뷁 ۷{zm\+f޴O+`;,{+빡۹˹ {+뺱ۺ˺ {+ ۵[[k+Ȼk +;Kkػw+;l+hk꛻˾Kk[{˿ j[ ;,Ll:۸3 4,5716K@« ܻë\MONPSlUR#DF|_β>9jgoqrs\\(qMumw s{}8-؃Mv؅؉_}؋؏ HؑMٕm3=ٗٛy F ڡ- ٣mڧڻVکڭګڱ-ۑ ۳}m)εLk4ۿ -]=еmܼm'2MM5 }A-Ӊ݊=mf׭>]jߊ -͵?@. *#n%),}l2!< G.5^H:ŏŽAΰTnC>E~NJ\|n*g׍岭,3._6–¶{^ˎ>>^hfK.B L>]N*^p^Mm><$^PϠ>6g.Խ8Nm.瘞̾|~ž>Nu^>nƾϯNd,~<.ئ.>]}艹O~=-]<=]},&;=8] ]:}=߬ +m.U/Z֬-cO-6giq/ sowW{]}{Or?U"OybO=/Oo/OoǏɯ˿/Oo׏ٯ;antelope-3.5.1.orig/src/docs/manual/ant.gif0000644000175000017500000000015110030603064020414 0ustar drazzibdrazzibGIF89a!Created with The GIMP! ,' ֎{ amLY"XܸtM^;antelope-3.5.1.orig/src/docs/manual/font_dialog.gif0000644000175000017500000001666210052640650022143 0ustar drazzibdrazzibGIF89aIX{}{{{01ΚecΚcceΜ10cececƾBAB!Created with The GIMP! ?,IX@pH,Ȥrl:ШtJZ,1zxL.zn|~VvK  !" "#"%"&%JHp'P$\DÇU(1)0j̸,VIrd 'SXE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j!z!!8"%x")>@;antelope-3.5.1.orig/src/docs/manual/style.css0000644000175000017500000000323710331172034021027 0ustar drazzibdrazzib .dummy {color: red} ADDRESS, BLOCKQUOTE, BODY, CAPTION, CENTER, DD, DIR, DIV, DL, DT, FORM, LI, MENU, OL, P, PRE, TD, TH, TR, UL { font-family: verdana, tahoma, geneva, sans-serif; font-size: 12px; color: black; } A { cursor: pointer; background: transparent; text-decoration: none; } A:link {color: black; text-decoration: underline} A:visited {color: gray; text-decoration: underline} A:active {color: black;} A:hover {color: gray; background: white} ADDRESS {font-style: italic} BIG {font-size: 19px} BLOCKQUOTE {font-style: italic} BODY {background: white} BUTTON {cursor: auto} CITE {font-style: italic} .computeroutput { font-family: monospace; border: none; padding: none; background: none; } CODE, KBD, PRE, SAMP, TT {font-size: 12px} CODE, PRE { font-family: monospace; } PRE.PROGRAMLISTING { font-family: monospace; border: solid thin; padding: 2em; background: white; } DT {font-weight: bold} H1, H2, H3, H4, H5, H6 { font-weight: bold; font-family: verdana, tahoma, geneva, sans-serif; color: black; margin: 0 0 0 0; } H1 {font-size: 22px} H2 {font-size: 20px} H3 {font-size: 18px} H4 {font-size: 16px} H5 {font-size: 14px} H6 {font-size: 12px} HTML {margin: 0; padding: 0} INPUT {cursor: auto} OL {list-style: decimal} UL {list-style: disc} PRE {margin-left: 0; white-space: pre} SMALL, SUB, SUP {font-size: 10px} TEXTAREA {cursor: text} TABLE { border: solid thin; background: white; cellpadding: 3; cellspacing: 0; } TD { padding: 3; background: white; } TH { font-weight: bold; text-align: center; margin-left: 0; background: #ADD8E6; color: black; } antelope-3.5.1.orig/src/docs/manual/multiple_targets.gif0000644000175000017500000001075210032534072023232 0ustar drazzibdrazzibGIF89aΜcec10cce 罺ތ9,v6q`OE0Y%B<ӡKbX-㼛 nw}7&X7ݍ[C{ pxċN_/.9G2Bf2PF9#(uh6Fr c_ ͔$[q饜IeW橥n硋qh#ve^BF FDMEsiZΨ4;jNZB~)d*$mh縕V)b9䖗F'뫾fީi1O& /^vlh,bL-\ n&KRfHlk;駹c<ߔ$54FImRł~,bu٫6j=mn[ wކMv]zwv xVb;x|/sSՇw.S8|Ή5ԓO)|GsEyo,qˍ87O6OyO?3/og~3T>g PlVxɁl3AUm"ohM" ~z&l^hD7t&<8{ڒbX.ӕ/l8^/+)#D$ؑeP"30S"G7++kGbזx}ca\>0OE8n\Ev/*$LV4 N3ct6!㐄[/U0.D!4.& ʹP,Jk̥.J6q^)LղH_1)Lfҙ탦y>jZ D/fdƙ `"?@D0H%0A_yW~ʶʧ|0~ r(*,p-y !qww8~ z0~N~0y+*@.1} ǁv x H(  22H6xx'~v?h`P'(y-2PVT@w8:7>(`{A(qGPWjgr8I( ' Sn!G0yWX 3X7zGq( 0(۰!}l؆(8RxyWY@yHvw7P(}g{7ȋЉ،a8Yn8X#aꨈވXw!^ dgii?׏t!dauPu iSؐ0zqve jWǑhwHx x%h~v0 ᘒ"鑍}3@5`7!)o4yW#ק 9;=?0 Xx{Ϙ{JiZ[[0y(oU <0KC0LP.Tp=on)}9qiHҹfYmOƝ8"OY\ũ8p虞<Hi9yexV @k韻< MzɠHYn鞷⹡8O ٛkDLN I*IE: AIxPEEPdʗpmѢ&J 9 ؤ (r:t MᦋЦi)x:l j2ِM#Ajr::ZzvpQ:ZzȚʺڬ::zؚں:P:z 嚮꺮zꬃ@PJ[ۯڪ[ʰ  Qp{*۱˱k;! ˲0 -'K&[41;?[6B:2kI 4k$[7J˳;oҋr;;ԋۛt,Q< L#;AfĆ ģ[jJģNj;antelope-3.5.1.orig/src/docs/manual/Wrench16.gif0000644000175000017500000000100310030603064021224 0ustar drazzibdrazzibJFIFHHC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222"!1"#Q$!A"1Qa ?|s] {)q3'! i$@| 0(&2h߀M7!vjKERrDyRIDϷ!os⎡vfvNqn0bU ?DdIe7lJ '9lqvXqD@A r8o/uߩy|J#b2=7%! úr WXE( Gzkantelope-3.5.1.orig/src/docs/manual/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HXhx)9IYiy9b`):JZjzYYJ[k{JK8;L\l|;<( -=M,,\ .y--~<^~/?OZϏx//#0v-|1*$ZEm;zXh9$KJ ϤʕP| ˘4ki3Nh8w'СD'6X4RRB:})ԩTIլ\n vװdu-6ٴlUm ۸t/έݼ| e=X8c827Ȓ+Gl91̚;9-ТK"m:)Ԫ[;\ѵagݵj7ᄄ'n8y3o~9ҧn]5즷s5/o(Y-ݍ8Rv#@dFdJ.dN> eRNIeV^eZne]$pۘdf晶llڛp&眥ighxeQZgL*hGJgK,h> iNJi$Win饃iBjA礊ѩ2H: :4 [ + kH^6>㬱жcs-;Rkȸ Ant Coding Style Guidelines DaleAnson Introduction Why Have Code Conventions Code conventions are important to software developers for a number of reasons: 80% of the lifetime cost of a piece of software goes to maintenance. Hardly any software is maintained for its whole life by the original author. Code conventions improve the readability of the software, allowing engineers to understand new code more quickly and thoroughly. If you ship your source code as a product, you need to make sure it is as well packaged and clean as any other product you create. These same reasons apply to build engineers maintaining Ant build files. Keep in mind that these are guidelines, not hard and fast rules. The ultimate goal is readability and maintainability. These guidelines have been compiled from the Ant user guide, Sun's Java coding style guidelines, example build files from various Jakarta applications, and e-mail messages on the Ant mailing lists. File Names The default Ant build file is named "build.xml". Any build system beyond the most basic will have multiple build files for various modules of the application. Having them all named "build.xml" quickly leads to confusion of which does what. Build file names should indicate the main purpose of the file, and should be in the Java style of mixed upper and lower case letters, with the first letter always capitalized. Words should be spelled out rather than abbreviated, unless the abbreviation is the more common reference. Using the main target name works well. Examples: MasterBuild.xml CreateApplicationJar.xml CreateInstaller.xml Build files may load properties from a properties file. These property files should be named the same as the build file name, but with a ".properties" extension. Examples: MasterBuild.properties CreateApplicationJar.properties CreateInstaller.properties Build File Structure and Formatting

Build File Structure Ant build files will be arranged with the project description first, followed by "global" properties, followed by targets. Properties and targets do not need to be sorted, however, the default target specified by the project must be the first target listed.
Formatting Four spaces should be used as the unit of indentation. Do not use tabs instead, use 4 spaces in place of a single tab. Many editors can do this automatically. Vertically align start and end tags for an element. Indent child elements. Avoid lines longer than 80 characters, since they're not handled well by many terminals and tools. Use a single space after a comma. Group properties by use, for example, group directory definitions together. Insert a single blank line between groups. Insert two blank lines between targets. Insert one blank line between tasks within a target. When an expression will not fit on a single line, break it according to these general principles: Break before an attribute. Break after a space or comma. Prefer higher-level breaks to lower-level breaks. Align the new line with the beginning of the expression at the same level on the previous line. If the above rules lead to confusing code or to code that's squished up against the right margin, just indent 8 spaces instead. Examples: ]]> This is wrong: ]]> This is right: ]]>
Projects To be acceptable to Ant, each build file must have a <project> element as its root element. A <project> has three attributes. This standard deviates slightly from the Ant standard in that the "name" attribute is required and will be the same as the file name without the ".xml" extension. Project Attributes Attribute Description Required name the name of the project. This attribute should be the same as the file name without the .xml extension. Yes default the default target to use when no target is supplied. Yes basedir the base directory from which all path calculations are done. This attribute might be overridden by setting the "basedir" property beforehand. When this is done, it must be omitted in the project tag. If neither the attribute nor the property have been set, the parent directory of the buildfile will be used. No
Ant allows that a description for the project can be provided as a top-level <description> element. This description will be included in the output of the ant -projecthelp command. While this is optional for Ant, the description element is required by this standard. Example description: This build file is used to build the Foo subproject within the large and complex Bar project. ]]>
Properties Property names should be short yet meaningful. The choice of a property name should be mnemonic -- that is, designed to indicate to the casual observer the intent of its use. One-character property names should be avoided. Property names will be all lowercase with underscore separating individual words. Examples: ]]> Properties may be defined in a properties file. These property files should be named the same as the build file name, but with a ".properties" extension. Properties may be "grouped" using the "dot" notation. For example, suppose the documentation for a project is divided into several manuals: the user manual, the installation manual, a technical support manual, and a examples manual, with the source for each manual residing in a separate directory. Then properties might look like this: ]]> Targets Like property names, target names should be short and meaningful. A target name should descript the overall intent of the target function. Target names should start with a verb, in mixed case with the first letter lowercase and with the first letter of each internal word capitalized. Examples: initialize notifyOnFailed runTests All targets that are likely to be called directly, that is, from the Ant command line, should have the description attribute filled in. This description will be included in the output of the ant -projecthelp command. Targets that should not be called directly from the command line should start with a hyphen, for example, -cleanDocDir Tasks Avoid use of the "exec" task if possible as this reduces portability. This is bad as it assumes that the 'tar' utility is installed on the current path: ]]> This is good: ]]> Comments More is better! In particular, write comments for the intended use of properties and targets. The build file itself will tell what is happening, the comments should explain why. For target comments, use a block comment similar to this example: ]]> Place target comments immediately above the target element, with a single blank line between the end of the comment and the start of the target. For other comments, such as for properties or within a target, use the standard xml single line comment like this: ]]> If a comment is longer than a single line, wrap it and indent the second and subsequent lines 4 spaces, for example: ]]> Do not put a blank line between a single line comment and the element it is describing, for example: ]]> Example Build File The following example build file follows these guidelines. This build file would be stored on disk as "MyProject.xml". simple example build file ]]> antelope-3.5.1.orig/src/docs/manual/RedTarget16.gif0000644000175000017500000000160410030603064021666 0ustar drazzibdrazzibGIF89af3̙f3f3ffffff3f3333f333f3f3̙f3̙̙̙̙f̙3̙ffffff3f3333f333f3̙f3̙̙f3̙f3ff̙ffff3f33̙33f333̙f3ffffff3ffff̙fff3fffffff3ffffffffffff3fff3f3f3f3ff33f3ffffff3f3333f333333̙3f3333333f3333f3f3f3ff3f33f33333333f333333333f333f3̙f3f3ffffff3f3333f333f3! ,a H A+F(T #Xqp,t() TŽ 24q+%%K#Jq`H+X(N#Q1>4 ;antelope-3.5.1.orig/src/docs/manual/tasks.xml0000644000175000017500000037470110601266236021043 0ustar drazzibdrazzib Additional Ant Tasks DaleAnson @style@ Introduction Many of the Antelope tasks are now part of the Ant-Contrib project, http://ant-contrib.sourceforge.net. In this version, @buildnum@, the tasks contained in the Antelope distribution are identical to those in Ant-Contrib other than the package name. The Antelope tasks will continue to be distributed as part of the Antelope distribution, but eventually, the package and code base will reside entirely with Ant-Contrib. Additionally, it is likely that the Ant-Contrib tasks that are not part of Antelope will be included in this distribution as well. The intent is to make Ant-Contrib the central location for additional Ant tasks. Ant was not designed to be a scripting language. It was meant to replace 'make' and has done an outstanding job in doing so. However, in day to day use in building even small-scale applications, Ant is being used in ways never foreseen by its creators. Complete applications are being build using Ant as the coding language. Build files call other build files, which in turn call other build files. Regardless of the original intent, Ant has become a replacement for batch files, shell scripts, perl scripts, and make files. Ant is also extensible. The API is nicely defined to allow any number of new tasks to be added, and each new release of Ant includes new and useful tasks. The tasks described here help developers to create more robust build files, and to assist in structuring build files more like a programming or scripting language than is possible with the standard issue tasks. Several of the tasks described in this manual are based on Java language counterparts: The Assert task is modeled after the Java assertkeyword. The If task is modeled after the Java if/else construct. The Try task is modeled after the Java try/catch construct. The Variable task is modeled after Java variable declaration and assignment. These tasks have become indispensible for me in daily use. I think you will find that your Ant build files are more robust and better structured through the use of these tasks. I've tried to incorporate real-world examples, in fact, many come from the unit tests for the tasks. If you have a source code distribution, you can look at the unit tests for more examples. @style@ License These Ant tasks are licensed under the same Apache license as Ant: . ]]> @style@ Installation If you are running your build files from Antelope, these tasks are already installed and nothing more needs to be done. The following discusses installing the tasks by hand for use outside of Antelope. These Ant tasks are packaged as a part of Antelope, which is an application for running Ant build files. They may also be obtained as a separate package. Depending on the distribution you have on hand, copy either antelope.jar or antelope_tasks.jar into your ${ant.home}/lib directory or add it to your classpath. This is the directory where ant.jar and optional.jar are installed for your Ant distribution. Once installed, each task that you want to use in a build file must be defined in that build file. Since several of the Antelope tasks are dependent on each other, the preferred way to define them is like this: ]]> This will load all Antelope tasks without further hassle, and will only load the tasks once. It is not good to load the tasks multiple times, this can cause problems with 'ant' and 'antcall' in particular. If you don't want to load all of the tasks, the documentation for each task explains in detail what you will need to add to your build file to use the individual task. For example, the Assert tasks says: To use this task in your build files, include a task definition like this: ]]> Notice that you may name the tasks whatever you want via 'taskdef'. The names listed in the individual task descriptions are those that are set via the preferred method mentioned above. As of Antelope version 2.64, the 'AntLib' feature of Ant 1.6 is supported, which provides an alternate way of loading optional tasks. If AntelopeTasks_@buildnum@.jar is in the core classpath (in ${ant.home}/lib for example) one can use the namespace short-cut to load them: This should fail This will not be reached failed is ${failed} ]]> Thanks to Peter Reilly of the Ant development team for this pointer and example. @style@ Assert Task The Assert task adds an assertion capability to Ant projects. This task works in a manner very similar to the Java assert keyword, and provides a limited "design by contract" facility to Ant. This is very useful for testing build scripts prior to putting them into production. The Assert task verifies that a given property has a given value and throws a BuildException if the property value is not as expected or the property does not exist. Also like Java's assert keyword, the Assert task must be 'turned on' using the property ant.enable.asserts. If not set, or is set to false, the Assert task works exactly like the Sequential task. If the Variable task is used to define this property, then it can be turned on and off as needed throughout a build. This task can hold other tasks including Assert. The Assert task may contain one 'bool' element. The 'bool' element is identical to the ConditionTask, but unlike the ConditionTask, is actually a Task. The 'bool' element can contain all the conditions permitted by the ConditionTask, plus the IsPropertyTrue, IsPropertyFalse, StartsWith, EndsWith, IsGreaterThan, IsLessThan, DateTimeBefore, DateTimeDifference, MathEquals conditions. See the If task for examples of using these conditionals. To use this task in your build files, include a task definition like this: ]]> Assert Task Attributes Attribute Description Default Required name The name of the property to test for. none Yes exists Test for existence or non-existence of the property. True No value The value to test for, implies 'exists=true'. If the value in the project is different than this value, a BuildException will be thrown and the build will stop. none No execute Should the tasks contained in this task be executed? It may be useful to set this to false when testing build files. True No failonerror Should the build halt if the assertion fails? Setting this to false is contrary to the intented use of assertions, but may be useful in certain situations. True No message A message to include with the output in the event of this assert failing. none No level A "level" for the assert, similar to debug levels. Valid values are 'error', 'warning', 'info', 'debug'. error No
As stated above, the Assert task may contain a nested "bool" task, otherwise, the Assert task does not support any nested elements apart from Ant tasks. Any valid Ant task may be embedded within the assert task. The "level" attribute is only (so far) useful when Assert is used in conjunction with the Testcase task. Setting this attribute to "warning", "info", or "debug" will force "failonerror" to false. In the following example, the first assert task checks that the wait property exists and does not execute the echo and sleep tasks. The second assert task checks that the wait property exists, has a value of 2, and executes the echo task. Waiting ${wait} seconds... Click the red button to stop waiting. done waiting! ]]> The next example shows Assert being used in a unit test for the "limit" task: _passed_ ]]> If the ant.enable.asserts property is set to false, then in the above example, the echo, sleep, and echo tasks will all execute.
@style@ If Task
If The If task provides a greatly improved "if" capability to Ant projects. This task works in a manner very similar to the Java if keyword. This is useful for performing certain tasks only if a property has a specific value or certain conditions are met. This task can hold other tasks including the If task. In particular, it can also have a single "else", which gives Ant a Java-like if/else construct, and a single "bool", which can be used for the "if" boolean expression. To use this task in your build files, include a task definition like this: ]]> An If task may contain only one 'bool' and one 'else' and may contain a 'break'. The 'bool' element is identical to the ConditionTask, but unlike the ConditionTask, is actually a Task. The 'bool' element can contain all the conditions permitted by the ConditionTask, plus the IsPropertyTrue, IsPropertyFalse, StartsWith, EndsWith, IsGreaterThan, IsLessThan and conditions. Here is a general outline of the If task: some tasks... some other tasks... ]]> If Task Attributes Attribute Description Default Required name The name of the property to test for. none Yes, unless nested bool is used. exists Test for existence or non-existence of the property. True No value The value to test for, implies 'exists=true'. If the value for the property in the project is the same as this value, embedded tasks will be executed. none No
The If task can hold any number of Ant tasks. If the property value is correct or the "bool" element evaluates to true, these tasks will be executed. In addition, the If task supports three special nested elements: bool This is very similar to the standard Ant Condition task. All conditions supported by the Condition task are supported by the bool element. This is an optional element and if used, is used to decide if the "if" tasks or the "else" tasks should be executed. If the bool element is not used, then the "name" attribute must be used. else This is very similar to the standard Ant Sequential task. The "else" can hold any number of Ant tasks. These tasks are executed if the "bool" element evaluates to false. break This is very similar to the Java "break" keyword. This is only useful if the If task is nested in another task that understands "break", such as the Switch task. Like the Java "break", when this element is encountered, no subsequent tasks will be executed and control passes outside the If. In the following example, the antcall task will execute only if the project has a property named test with a value of true. ]]> In the next example, the antcall task will execute only if the project has a property named test. In this example, it does not matter what value is assigned to the test property. ]]> Of course, the same thing could have been done as follows, but the "if" is generally much cleaner. ... ]]> In the next example, the antcall task will execute only if the project does not have a property named test. This is the opposite situation of the previous example. ]]> The next example demonstrates nested 'if' tasks. This example will run the unit tests, and if it is Monday, will publish the accumulated test results. ]]> The next example shows how to use If with Else. Notice that it doesn't matter where the Else is placed inside the If. All tasks in the If that are not in the Else will execute if the property value is correct, otherwise, only those tasks inside the else will execute. The "var" task is discussed here. this will happen this won't happen this will happen also this won't happen this 'else' will happen and so will this this won't happen either ]]> The next example shows the "if" and "assert" tasks working together to validate a property before use, and also shows an example of where the "assert" 'failonerror' attribute might be useful. In this example, if the e-mail address is invalid, the e-mail won't be sent and the build won't fail. The "try" task is discussed here. ]]> Here is the same thing, but using only If and Else: ]]> The next example shows how to use the "bool" element: build.xml and run.xml are available didn't find one or both of build.xml and run.xml ]]> The following example shows the "bool" element again: ]]> The following example is from the unit test for the "Limit" task. It shows the Stopwatch task, the Limit task, and the If task with boolean conditions: _passed_ ]]>
More Conditions These conditions are suitable for use in the <bool> element. Unfortunately, they cannot be used in the <condition> task, although all conditions for the <condition> task can be used with the bool and the bool can be used anywhere that <condition> can be used. IfPropertyTrue Given a property name, tests whether the value for that property equals "true" (or "yes" or "on"). IfPropertyTrue Attributes Attribute Description Required property The name of a property to test the value of. Yes
]]> IfPropertyFalse Given a property name, tests whether the value for that property equals "false" (or "no" or "off"). IfPropertyFalse Attributes Attribute Description Required property The name of a property to test the value of. Yes
]]> StartsWith Given a property name, tests whether the value for that property starts with a specified string. StartsWith Attributes Attribute Description Required string The string to test. Yes with Check if 'string' starts with this value. Yes
]]> EndsWith Given a property name, tests whether the value for that ends with with a specified string. EndsWith Attributes Attribute Description Required string The string to test. Yes with Check if 'string' ends with this value. Yes
]]> IsGreaterThan Tests whether the first argument is greater than the second argument. Will automatically treat the arguments as numbers if both arguments consists of only the characters 0 through 9 and optionally a decimal point. Otherwise, a String comparison is used. IsGreaterThan Attributes Attribute Description Required arg1 The first argument. Yes arg2 The second argument. Yes
]]> IsLessThan Tests whether the first argument is less than the second argument. Will automatically treat the arguments as numbers if both arguments consists of only the characters 0 through 9 and optionally a decimal point. Otherwise, a String comparison is used. IsLessThan Attributes Attribute Description Required arg1 The first argument. Yes arg2 The second argument. Yes
]]> DateBefore, TimeBefore Tests whether the first date/time is before the second date/time. DateBefore, TimeBefore Attribute Description Required datetime1 The first date/time. Yes datetime2 The second date/time. Yes format The format of the date/time stamps. Yes lenient Whether the datetime parser should use lenient parsing, defaults to true. No
]]> DateDifference, TimeDifference Tests that the difference between two dates or times is a certain value. DateDifference, TimeDifference Attribute Description Required datetime1 The first date/time. Yes datetime2 The second date/time. Yes format The format of the date/time stamps. Yes lenient Whether the datetime parser should use lenient parsing, defaults to true. No value The expected difference between the 2 datetimes. No, default is 0 unit Sets the unit for the difference between the 2 datetimes. For example, if value is 12 and unit is "hours", then this condition checks that the difference between the 2 datetimes is 12 hours. Valid values are "millisecond", "second", "minute", "hour", "day", "week", "month", "year". Yes
]]>
@style@ SwitchTask The "Switch" task works much like the Java "switch" construct. It supports nested "case" elements, which in turn, support nested "break" elements. There is also a "default" case element, so this should be very natural for Java developers to use. Switch Task Attributes Attribute Description Default Required name The name of a property whose value will be used for the switch. None Yes
"case" and "default" Attributes Attribute Description Default Required value The value of of the property used for the switch. If this value equals the property value, then all tasks in this 'case' will be executed. None Yes
Executing case baz Executing case bar breaking from the if Falling through to case "bat" Executing case bat Executing default case ]]>
@style@ Try Task The "Try" task works similarly to the try/catch/finally construct in Java. This task is useful when a particular task might fail, but the build should not fail if it does. An example is the "mail" task will fail if the mail server is not available, but the build should not fail if the mail message cannot be delivered. To use this task in your build files, include a task definition like this: ]]> A quick example is probably all that is necessary: Unit test servlet update failed. ]]> Unlike the Java "try", neither the "catch" block nor the "finally" block are required. Also, the order does not matter, the "catch" block may be listed first, followed by the "finally", followed by the tasks that may fail. Try Task Attributes Attribute Description Default Required break If true and a nested task fails, no other nested tasks will execute. If false, all nested tasks will execute regardless of whether a previous task failed. Note that for each failed task, the 'catch' block (if defined) will execute. true No printstacktrace If true, the exception stack trace from a failed task will be logged. false No stacktraceproperty Specify a property to store the stack trace of any exception. None No printmessage If true, the exception message from a failed task will be logged. If printstacktrace is set to true, this attribute is ignored as the exception message is printed as part of the stack trace. true No messageproperty Specify a property to store the message line of any exception. None No
The next example shows the "break" attribute set to "no". In this case, the second echo task will execute. I am trying... but I did not die! ]]> This slightly more practical example uses the Variable task coupled with "try" to run a series of tests. All tests will run even if a preceding test fails. The "catch" block logs a message of each failed test. Test suite ${testname} failed: ${msg} ]]> The following example uses a nested Finally to clean up resources: Unit test servlet update failed. ]]> See the post task for a better way to do a post.
@style@ Unset Task The Unset task provides easier access to one of the most used use cases of Variable, the ability to unset a property. By design, Ant properties are immutable, but sometimes it is handy to set a property to a new value. To use this task in your build files, include a task definition like this: ]]> Unset Task Attributes Attribute Description Default Required name The name of the property to unset. None Yes, unless 'file' is used. file The name of a property file. All properties references in the file will be unset. This means you can load a bunch of properties from a file, then unset them all with a single line. None Yes, unless 'name' is used.
Example: original value = ${x} unset: ${x} new value = ${x} $ ant -f unset_example.xml Buildfile: unset_example.xml [echo] original value = 6 [echo] unset: ${x} [echo] new value = hello BUILD SUCCESSFUL Total time: 0 seconds ]]>
@style@ Variable Task The Variable task provides a mutable property to Ant and works much like variable assignment in Java. This task is similar to the standard Ant Property task, except that THESE PROPERTIES ARE MUTABLE. While this goes against the standard Ant use of properties, occasionally it is useful to be able to change a property value within the build. In general, use of this task is DISCOURAGED, and the standard Ant Property should be used if possible. Having said that, in real life I use this a lot. To use this task in your build files, include a task definition like this: ]]> Variables can be set individually or loaded from a standard properties file. A 'feature' of variables is that they can override properties, but properties cannot override variables. So if an already established property exists, its value can be reassigned by use of this task. Variable Task Attributes Attribute Description Default Required name The name of the property to set. None Yes, unless 'file' is used. value The value of the property. "" No file The name of a standard properties file to load variables from. None No
In the following example, the property x is first set to "6", then evaluated by the if, and reassigned the value "12". The echo task will print out 12. ${x} ]]> The following shows some more uses of the Variable task. It is especially handy for property appending. Notice a couple of things: the property task can't override a var value, however, if the var value is set to "", then it can as in the case of the format example. x = ${x} x = ${x} x = ${x} ${str} x = ${x} x = ${x} Today is ${x}. Today is ${x}. ]]> The next example shows Variable, If, Assert, and Try working together to make sure e-mail is sent from the right address and that if the mail fails to be sent for any reason, the build will not fail. ]]>
@style@ Stopwatch The Stopwatch task makes it easy to add performance timing to Ant targets. Stopwatches are named so that multiple watches can run simultaneously. To use this task in your build files, include a task definition like this: ]]> Stopwatch Task Attributes Attribute Description Default Required name The name for the stopwatch. The elapsed time or total time will be stored as an Ant property with this name. None Yes action Valid values are "start", "stop", "elapsed", and "total". "start" No
The stopwatch is started with the "start" action. When the action is "elapsed" or "total", the running time of the stopwatch is printed out. Both "stop" and "total" stop the stopwatch and reset it to zero. "elapsed" prints out the current running time of the stopwatch without stopping it. Example: ]]>
@style@ Limit The Limit task is a task container (that is, it holds other tasks) and sets a time limit on how long the nested tasks are allowed to run. This is useful for unit tests that go awry, hung socket connections, or other potentially long running tasks that need to be shut off without stopping the build. To use this task in your build files, include a task definition like this: ]]> Limit Task Attributes Attribute Description Default Required maxwait How long to wait for nested tasks to finish, this is in seconds. 180 seconds (3 minutes) No failonerror Should the build fail if the time limit has been exceeded? false No
Examples: Neither the echo nor the fail will happen in this example. The build will continue once the time has expired. This won't happen... This won't happen either... ]]> Neither the echo nor the fail will happen in this example. The build will not continue once the time has expired. This won't happen... This won't happen either... ]]>
@style@ FileUtils The FileUtils task provides a number of useful file information functions, such as readability, writability, length, etc. Caution: this task does not follow the standard Ant convention of property immutability. To use this task in your build files, include a task definition like this: ]]> FileUtil Task Attributes Attribute Description Default Required file The file or directory in question. None No, but does nothing without a file. property Where to store the answer. Caution: this task will overwrite any existing property with this name. None No
Operations as nested elements: listfiles Create a list of files and/or directories. listfiles Attribute Description Default Required what What to list, valid values are "files", "dirs", or "all". files No separator The separator to use between individual items in the list of files. , (comma) No includepath If true, include the path with the names in the list. If false, include only the names. true No
lastmodified Get the "last modified" date/timestamp of a file. lastmodified Attribute Description Default Required format A format for the last modified timestamp. Must comply with the standards listed in java.text.SimpleDateFormat. No
These operations have no attributes: canread Is the file readable? canwrite Is the file writable? length Finds the length of the file. filecount Find the number of files in the directory. isdirectory Is the file a directory? isfile Is the file a file? Only one of the operations can be used at once. Examples: See the Split for several examples.
@style@ StringUtils The StringUtils task provides a number of useful string manipulation functions, such as converting a string to upper or lower case, trimming white space, finding a substring, etc. Caution: this task does not follow the standard Ant convention of property immutability. To use this task in your build files, include a task definition like this: ]]> StringUtil Task Attributes Attribute Description Default Required string The string to manipulate. None No property Where to store the manipulated string. Caution: this task will overwrite any existing property with this name. None No
Operations as nested elements: indexof, lastindexof: Find the index of or the last index of a substring. Attribute Description Default Required string The string to find the index of. None No fromindex Where to start looking. 0 No
substring: Get a substring from the string. Attribute Description Default Required beginindex Start of substring. 0 No endindex End of substring. End of string. No
replace: Replace parts of the string. Attribute Description Default Required regex Pattern to replace. None No replacement What to replace with. None No
sort: Sort items in a string. Attribute Description Default Required separator The character separating individual items in the string. Any of tab, new line, carriage return, line feed, or space. No
This is useful for sorting a comma separated list or a property value that spans several lines.
messagebox: Put the string in a box for nice display. Attribute Description Default Required title Title for the message box. None No width Maximum width in characters for the message box. Lines will be wrapped to fit inside the box. The box will not stretch to this width if the message is less than width - 4 characters wide. 60 No
These operations have no attributes: lowercase Converts the string to lowercase. uppercase Converts the string to uppercase. length Finds the length of the string. trim Removes white space from boths ends of the string. More than one of the operations can be used at once, that is, you can convert a string to lowercase and trim it at the same time. See below for examples. Examples: Convert a string to lower case: prop1 before = ${prop1} prop1 after = ${prop1} ]]> Convert a string to upper case: prop2 before = ${prop2} prop2 after = ${prop2} ]]> Convert a string to upper case and trim white space: prop3 before = ${prop3} prop3 after = ${prop3} ]]> Convert a string to upper case, trim white space, and find a substring: prop4 before = ${prop4} prop4 after = ${prop4} ]]> Get the length of a string: prop7 before = ${prop7} prop7 length = ${prop7} ]]> Sort a list: prop12 before = ${prop12} prop12 sorted = ${prop12} ]]> Message boxes: prop13 before = ${prop13} prop13 in messagebox:${line.separator}${prop13} prop13a in messagebox with title:${line.separator}${prop13a} test13: [echo] prop13 before = Character boundary analysis allows users to interact with characters as they expect to, for example, when moving the cursor around through a text string. Character boundary analysis provides correct navigation of through character strings, regardless of how the character is stored. For example, an accented character might be store d as a base character and a diacritical mark. What users consider to be a character can differ between languages. [echo] prop13 in messagebox: [echo] [echo] +----------------------------------------------------------------------+ [echo] | Character boundary analysis allows users to interact with characters | [echo] | as they expect to, for example, when moving the cursor around | [echo] | through a text string. Character boundary analysis provides correct | [echo] | navigation of through character strings, regardless of how the | [echo] | character is stored. For example, an accented character might | [echo] | be stored as a base character and a diacritical mark. What users | [echo] | consider to be a character can differ between languages. | [echo] +----------------------------------------------------------------------+ [echo] prop13a in messagebox with title: [echo] [echo] +----------------------------------------------------------------------+ [echo] | About Character Boundaries | [echo] +----------------------------------------------------------------------+ [echo] | Character boundary analysis allows users to interact with characters | [echo] | as they expect to, for example, when moving the cursor around | [echo] | through a text string. Character boundary analysis provides correct | [echo] | navigation of through character strings, regardless of how the | [echo] | character is stored. For example, an accented character might | [echo] | be stored as a base character and a diacritical mark. What users | [echo] | consider to be a character can differ between languages. | [echo] +----------------------------------------------------------------------+ [antlib:ise.antelope.tasks:testcase] test13 passed. ]]>
@style@ UID The UID task generates a unique ID. This ID may be either a unique string or integer. To use this task in your build files, include a task definition like this: ]]> UID Task Attributes Attribute Description Default Required name Name of a property to store the unique ID. None Yes int If true, generate a unique integer. false No
Examples: uid_1 = ${uid_1} uid_2 = ${uid_2} [echo] uid_1 = -4a1a8b86:10728498757:-7fff [echo] uid_2 = 2 ]]>
@style@ Math The Math task provides support for all the basic mathematical operations provided by the java.lang.Math and java.lang.StrictMath classed. It supports int, long, float and double data types. Nesting of operations is supported to allow computation of formulas like (6 + (7.25 * 3.9))/(2 * 3 * 3) or calculating the area of a circle given a radius (I'm sure this comes up often in builds controlled by Ant!). In addition to the operations provided by the java.lang.Math and java.lang.StrictMath classes, the Math task provides several additional operations: "add", "subtract", "multiply", "divide", and "mod", which duplicate the basic Java mathematical operations "+", "-", "*", "/", and "%", respectively. In fact, either notation can be used, that is, the operation can be set to "add" or "+", depending only on which you feel is more convenient. To use this task in your build files, include a task definition like this: ]]> Math Task Attributes Attribute Description Default Required result The name of the property to hold the result of the operation. None Yes datatype Sets the datatype of the calculation. Allowed values are "int", "long", "float", or "double". Optional, if used, will be applied to all numbers in this math operation. double No strict If true, use the methods in the java.lang.StrictMath class. false No operation If used, any nested Ops will be ignored. This is for convenience for simple calculations. None No operand1 A number to use with the operation specified in the 'operation' attribute. None Depends on the specific operation. operand2 A number to use with the operation specified in the 'operation' attribute. None Depends on the specific operation.
The 'result' property is reusable. The Math task supports nested "Op" elements. An Op element represents single mathematical operation, such as "min" or "add". Op Attributes Attribute Description Default Required op Set the name of this operation. Allowed values are one of the method names from java.lang.Math or java.lang.StrictMath, or one of "add", "subtract", "multiply", "divide", or "mod" (or "+", "-", "*", "/", or "%", respectively) None Yes datatype Sets the datatype of this calculation. Allowed values are "int", "long", "float", or "double". Optional, default is "double". If the parent Math task has a datatype set, this value will be ignored and the datatype specifed in the task will be used. "int" No
The Op element supports nested "Op" elements and nested "Num" elements. A Num represents a number. When an Op is nested in another Op, the nested Op is treated as a Num. The nested elements can be any combination of Op or Num as appropriate for the formula being calculated. Most of the operations provided by java.lang.Math and java.lang.StrictMath operate on one or two numbers. The "+", "-", "*", "/", and "%" operations can task any number of nested numbers. Num Attributes Attribute Description Default Required value Set the value for this number. Must be able to parse to the datatype set by the parent element or the default datatype set by the task. Two special numbers, pi and e, can be represented by PI and E respectively. ("PI" is the ratio of the diameter of a circle to its radius, "E" is Euler's e, the base for natural logrithms.) None Yes datatype Sets the datatype of this number. Allowed values are "int", "long", "float", or "double". Optional, default is "double". If the parent Math task has a datatype set, this value will be ignored and the datatype specifed in the task will be used. double No
Some examples: ${op1} ${op} ${op2} = ${result} ${op1} ${op} ${op2} = ${result} ${op1} ${op} ${op2} = ${result} ${op1} ${op} ${op2} = ${result} ${op1} ${op} ${op2} = ${result} ${op1} ${op} ${op2} = ${result} 1 * 2 * 3 * 4 * 5 = ${radius} area = PI * radius ^ 2 = ${area} a random number between 0 and 100: ${result} ${result} ]]>
@style@ Hostname This task shows the hostname or IP address of the local machine. To use this task in your build files, include a task definition like this: ]]> Hostname Task Attributes Attribute Description Default Required property Name of the property to store the hostname or IP hostname No showip If true, get the IP address of the local machine. false No nic The specific name of an interface to get the hostname or IP address of. None No showall Get all names or IP addresses for all network interfaces on the local machine. false No failonerror Should the build fail if this task fails? false No
Examples: Unit tests for hostname task, not really good as hostname is machine dependent, so writing a portable test is hard. hostname: ${hostname} localhost: ${localhost} all interfaces: ${localhost} all interfaces by IP: ${localhost} nic lo: ${localhost} Output: test1: [echo] hostname: blackdog test2: [echo] localhost: blackdog test3: [echo] all interfaces: lo:127.0.0.1, eth0:, eth1:blackdog.somewhere.com, eth2:blackdog.wireless.somewhere.com test4: [echo] all interfaces by IP: lo:127.0.0.1, eth0:, eth1:192.168.1.3, eth2:192.168.44.12 test5: [echo] nic lo: lo:127.0.0.1 ]]>
@style@ HTTP Post The Post task is a companion to the standard Ant "Get" task. This task does a post and does not necessarily expect anything in return. Almost always, there will be some sort of returned data, this can be logged or written to a file if needed. To use this task in your build files, include a task definition like this: ]]> Basically, an HTTP POST sends name/value pairs to a web server. A very common usage is for html forms for submitting data. A typical use of this task is to send data to a servlet for updating a web page with the status of a build. This Post task handles cookies and remembers them across calls. This means that you can post to a login form, receive authentication cookies, then subsequent posts will automatically pass the correct cookies. The cookies are stored in memory only, they are not written to disk and will cease to exist upon completion of the build. The Post task has three ways of specifying the data to be posted. Nested "prop" elements can be used. A "prop" element represents a single name/value pair. The second way is to specify a property file as an attribute to the Post. All properties from the file will be sent as part of the Post data. The third way is to just type in some defined Ant properties. Is it allowed to use all three ways at once, that is, read some properties from a file, specify others via "prop" elements, and just type in some Ant properties. Post Task Attributes Attribute Description Default Required to The URL of the remote server to send the post. None Yes encoding Character encoding for the name/value pairs. UTF-8 No logfile The name of a file to write any response to. Ignored if wantresponse is set to false. None No append Should an existing log file be appended to or overwritten? True, append to an existing file. No file A file to read POST data from. All Ant properties contained in this file will be resolved (that is, ${} syntax will be expanded to their values) prior to sending the file contents. None No maxwait The maximum amount of time in seconds to wait for the data to be sent or for a response from the remote server. Setting this to zero means wait forever. 180 (3 minutes) No wantresponse Whether to wait for a response from the remote server or not. In many cases this can greatly improve the performance of the build script as the server response may be large and useless to the script. Use this with caution - while the response from the server may not be required for the client, the server may require that the client accept the response prior to processing the post data. true No property If set and wantresponse, put the response from the remote server into this property. None No failonerror Whether the build should fail if the post fails. false No
Post supports nested "prop" elements. As an HTTP POST basically sends a list of names and values, the "prop" element represents one name/value pair. A Post may contain any number of "prop" elements. Prop Attributes Attribute Description Default Required name The name of a property to post. None Yes value The value associated with the name. None No
The "value" attribute is not strictly required. This provides a short-cut method in cases where the property data is an already-defined Ant property. Suppose the build file has this property defined: ]]> Then the following are equivalent: ]]> Defined Ant properties can be entered directly into the post element. Again, suppose the build file has this property defined: ]]> Then the following are equivalent: ]]> I googled for the URL in the following example. ${test.val2} ]]> Also see the Grep task for additional examples.
@style@ SSH and SCP The ssh and scp tasks are no longer included in the main Antelope distribution as they are scheduled to be released as part of Ant 1.6. @style@ AntFetch AntFetch is identical to the standard 'Ant' task, except that it allows properties from the new project to be set in the original project. To use this task in your build files, include a task definition like this: ]]> Some background may be in order: When the <ant> task is used, in actuality, a new Ant project is created, and depending on the inheritAll property, it is populated with properties from the original project. Then the target in this new project is executed. Any properties set in the new project remain with that project, they do not get "passed back" to the original project. So, for example, if the target in the new project sets a property named "image.directory", there is no reference to that property in the original. Here's an example of what I mean: Suppose that the "fillImageDirectory" target sets a property named "image.directory" and I call the following: ${image.directory} ]]> The output of the echo task will be ${image.directory}, not whatever was set in the "fillImageDirectory" target. The AntFetch task allows that image.directory property to be set in the original project. The attributes for AntFetch are identical to the 'Ant' task, with one additional, optional attibute. This attribute is named "return" and can be either a single property name or a comma separated list of property names. Assuming that "fillImageDirectory" actually sets a property named "image.directory", the following example will print out the directory name: ${image.directory} ]]> And this one will also print out the thumbnail directory: ${image.directory} ${thumbnail.directory} ]]> The attributes for AntFetch are identical to the 'ant' task, with one additional, optional attibute. This attribute is named "return" and can be either a single property name or a comma separated list of property names. AntFetch Attributes Attribute Description Default Required return A comma separated list of property names. Whitespace is allowed, so either "a,b" or "a, b" are acceptable. None No
For other attribute and nested element information and more examples, see the documentation for the "ant" task in the Ant documentation.
@style@ AntCallBack AntCallBack is identical to the standard 'antcall' task, except that it allows properties set in the called target to be available in the calling target. To use this task in your build files, include a task definition like this: ]]> Some background may be in order: When the <antcall> task is used, in actuality, a new Ant project is created, and depending on the inheritAll property, it is populated with properties from the original project. Then the requested target in this new project is executed. Any properties set in the new project remain with that project, they do not get "passed back" to the original project. So, for example, if the target in the new project sets a property named "image.directory", there is no reference to that property in the original. Here's an example of what I mean: a = ${a} b = ${b} ]]> The output from executing "testCallback" looks like this: a = A b = B Contrast with this output from "antcall": a = ${a} b = ${b} This is an often requested feature for Ant, at least judging from the Ant mailing lists. I assume this is because it allows a more functional programming style than Ant natively supports. The proper Ant way of doing the above is like this: a = ${a} b = ${b} ]]> This is actually looks cleaner in this situation, and is faster, too. There is significant overhead in using both "antcall" and "antcallback" in that they both require a lot of object instantiation and property copying. That said, many people prefer to use "antcall" and "antcallback" as it better fits their logic and style. The attributes for AntCallBack are identical to the 'antcall' task, with one additional, optional attibute. This attribute is named "return" and can be either a single property name or a comma separated list of property names. AntCallBack Attributes Attribute Description Default Required return A comma separated list of property names. Whitespace is allowed, so either "a,b" or "a, b" are acceptable. None No
For other attribute and nested element information and more examples, see the documentation for the "antcall" task in the Ant documentation.
@style@ Call Task This is the simplest and possibly the most obvious of the "call" type of tasks. It simply calls a target in the current build file and provides exactly the functionality expected by many users of "antcall". To use this task in your build files, include a task definition like this: ]]> There is only one attribute, that is the name of the target to call. Call Task Attributes Attribute Description Default Required target The name of a target to execute. None Yes
There is none of the weird property manipulation done by "ant", "antcall", "antfetch", or "antcallback", and none of the overhead. When you call a target, any properties set in that target are immediately available in the calling target. A simple example should be all that is necessary: a = ${a} b = ${b} ]]>
@style@ Grep Task This task uses a regular expression to do pattern matching against a string and store the match in a property. This is useful for extracting a substring, or checking that an html form contains a particular value. To use this task in your build files, include a task definition like this: ]]> Grep Task Attributes Attribute Description Default Required in The string to perform the regular expression matching on None Yes regex The regular expression. See the Java API documentation for java.util.regex.Pattern for the details of the syntax for this expression. None Yes group The regular expression group to return in the property. 0 No property The name of a property in which to put the matched value. None Yes allmatches A regex may find multiple matches in the input string. If this attribute is set to true, then the property set after the grep will contain all matches. The individual matches can be separated by using the 'separator' attribute (see below). The default is 'false', that is, only return the first match. false No separator When 'allmatches' is set to true and there are multiple matches, this value will be used to separate the individual matches. ${line.separator} No caseinsensitive Enables case-insensitive matching. false No comments Permits whitespace and comments in pattern. false No dotall Enables dotall mode. false No multiline Enables multiline mode. false No unicodecase Enables Unicode-aware case folding. false No canoneq Enables canonical equivalence. false No unixlines Enables Unix lines mode. false No
Examples: Account Id: ${AccountId} received for ${user} ]]> This example uses the 'unset' and 'post' tasks along with 'grep' to list the download url's for Ant: ${urls} [echo] http://apache.gr-linux.com [echo] http://www.reverse.net/pub/apache [echo] http://government-grants.org/mirrors/apache.org [echo] http://apache.mirrors.hoobly.com [echo] http://apache.mirrormax.net [echo] http://www.ibiblio.org/pub/mirrors/apache [echo] http://www.mirrormonster.com/apache.org [echo] http://apache.towardex.com [echo] http://www.axint.net/apache [echo] http://apache.tradebit.com/pub [echo] http://www.eng.lsu.edu/mirrors/apache [echo] http://mirrors.isc.org/pub/apache [echo] http://www.theshell.com/pub/apache [echo] http://apache.mirrors.redwire.net [echo] http://apache.cs.utah.edu [echo] http://www.tux.org/pub/net/apache/dist [echo] http://linux.cs.lewisu.edu/apache [echo] http://apache.roweboat.net [echo] http://apache.secsup.org/dist [echo] http://www.signal42.com/mirrors/apache [echo] http://apache.mirror99.com [echo] http://mirrors.xtria.com/apache [echo] http://apache.downlod.in [echo] http://apache.mirrors.pair.com [echo] http://apache.seekmeup.com [echo] http://mirrors.combose.com/apache [echo] http://www.wmwweb.com/apache [echo] http://apache.intissite.com [echo] http://apache.oregonstate.edu [echo] http://apache.bestwebcover.com [echo] http://ftp.wayne.edu/apache [echo] http://mirrors.ccs.neu.edu/Apache/dist [echo] http://www.ip97.com/apache.org [echo] http://apache.mirrors.versehost.com [echo] http://mirrors.playboy.com/apache [echo] ftp://ftp.ccs.neu.edu/net/mirrors/Apache/dist [echo] ftp://apache.mirrors.pair.com [echo] ftp://apache.cs.utah.edu/pub/apache.org [echo] ftp://apache.mirrors.redwire.net/pub/apache [echo] ftp://ftp.oregonstate.edu/pub/apache [echo] ftp://ftp.wayne.edu/apache [echo] ftp://mirror.sg.depaul.edu/pub/apache [echo] ftp://www.ibiblio.org/pub/mirrors/apache [echo] ftp://ftp.tux.org/pub/net/apache/dist [echo] ftp://www.reverse.net/pub/apache [echo] ftp://apache.secsup.org/pub/apache/dist [echo] http://www.eu.apache.org/dist (backup) [echo] http://www.apache.org/dist (backup) ]]>
@style@ Split Task This task splits a property or file into pieces. This is similar to the "split" utility found on most Unix and Linux distributions. To use this task in your build files, include a task definition like this: ]]> Once a file has been split into smaller pieces, it can be rejoined with the "concat" task that is part of the standard Ant core tasks. Split Task Attributes Attribute Description Default Required prefix The start of the filename(s) to write the parts to. x No bytes How big, in bytes, to make the individual pieces. In general, use lines for text files, bytes or size for binary files. None No size How big to make the individual pieces. Like the Unix/Linux split utility, this attribute allows modifiers: b for 512, k for 1K, m for 1 Meg, so 100k is the same as passing 102400 in the bytes attribute. In general, use lines for text files, bytes or size for binary files. None No lines How big to make the individual pieces in lines. In general, use lines for text files, bytes or size for binary files. 1000 No property Split the value of the property into several files. None No string Split this string into several files. None No file Split this file into several files. None No outputdir Destination for the output files. None Maybe. If file is given and output dir is not, will write to the same directory as file, otherwise, this is a required attribute. failonerror Should the build stop if this task fails? Yes No
Examples Split the value of a property into several files: ]]> This will result in 5 files named x.0, x.1, x.2, x.3, and x.4, each containing a single character. This more involved example shows how to split ant.jar into several files each 100000 bytes in size. The files will be names ant.jar.0, ant.jar.1, ..., ant.jar.10. Then the parts are put back together with concat. ]]>
@style@ Repeat Task The Repeat task performs the same subtasks over and over a certain number of times or until a condition is met. Since most tasks are configured when the build file is first loaded and never again, this task may not do what you want. To use this task in your build files, include a task definition like this: ]]> Repeat Task Attributes Attribute Description Default Required count The number of times to repeat execution of the nested tasks. 1 No interval How long to wait between repetitions. If set to 0, only 1 repetition will be performed, this is to avoid a tight loop. 0 No unit The units for interval, allowed values are "milliseconds", "seconds", "minutes", "days", and "weeks" seconds No property The name of a property to set upon completion. None No value The value to set for the property to be set upon completion. None No
Here are a number of examples taken from the unit tests for this task: read log ${call_count} - ${log_contents} ]]>
@style@ Suite Task Modeled after the TestSuite provided by jUnit, this class is an Ant task that looks through the build file that contains this task, calls a 'setUp' target (if it exists), then executes all nested tasks, and last calls a target named 'tearDown' (if it exists). Both 'setUp' and 'tearDown' are optional targets in the build file. A build file may contain multiple suite tasks, note that each invocation will call 'setUp' and 'tearDown', so you may want to use some conditionals to only have them execute once. While this task and the associated 'testcase' task work very well, a similar test framework has been created by the Ant development team. You may want to check out that framework as it is likely to be the "standard" Ant test framework. Look for "AntUnit" at http://ant.apache.org. Typically, the nested tasks are TestCases, although they can be any task as appropriate to your testing. The nested tasks may also be Suites, so you can group your tests easily. Nested tasks are executed in order. Suite may also hold FileSets. Each file in the FileSet will be treated as a file suitable for use by a TestCase and will be executed as such. This makes it easy to run an entire directory of tests without having to specify a TestCase for each one individually. To use this task in your build files, include a task definition like this: ]]> Suite Attributes Attribute Description Default Required enabled Determines if this suite should be ran. By using a property for this attribute, it is easy to turn off/on multiple tests. On No assertenabled Generally tests will use the Assert task. This attribute sets whether asserts should be enabled. Yes No showoutput If true, show intermediate test results Yes No showsummary If true, show a summary of test results at the end of the test run. Yes Yes
In the example below, the "suite" tasks is a top-level task, so will execute automatically. This example does not use 'setUp' or 'tearDown' targets. Build file to run unit tests for the Math task $ ant -f mathtest2.xml Buildfile: mathtest2.xml [testcase] +-------------------------------------------+ [testcase] + mathtest [testcase] +-------------------------------------------+ test6: [testcase] ERROR: test6 failed: string or property must be set. test5: [testcase] test5 passed. test4: [testcase] test4 passed. test3: [testcase] test3 passed. test2: [testcase] test2 passed. test1: [testcase] test1 passed. [testcase] +-------------------------------------------+ [testcase] + mathtest [testcase] +-------------------------------------------+ [testcase] [testcase] ---- Errors --------------------------------- [testcase] ERROR: test6 failed: string or property must be set. [testcase] ---- Results -------------------------------- [testcase] Ran 6 out of 6 tests. [testcase] Passed: 5 [testcase] Warning: 0 [testcase] Failed: 1 [testcase] +-------------------------------------------+ [testcase] +-------------------------------------------+ [testcase] + math_precision_tests [testcase] +-------------------------------------------+ test11: [echo] Division by zero test [a:try] Task 'a:math' in target 'test11' failed, error message is: java.lang.ArithmeticException [testcase] ERROR: test11 failed: java.lang.ArithmeticException: / by zero test10: [echo] Circle area test [testcase] ERROR: test10 failed: string or property must be set. [testcase] +-------------------------------------------+ [testcase] + math_precision_tests [testcase] +-------------------------------------------+ [testcase] [testcase] ---- Errors --------------------------------- [testcase] ERROR: test11 failed: java.lang.ArithmeticException: / by zero [testcase] ERROR: test10 failed: string or property must be set. [testcase] ---- Results -------------------------------- [testcase] Ran 2 out of 2 tests. [testcase] Passed: 0 [testcase] Warning: 0 [testcase] Failed: 2 [testcase] +-------------------------------------------+ [testcase] +-------------------------------------------+ [testcase] + math_rules_tests [testcase] +-------------------------------------------+ test7.2: [testcase] test7.2 passed. test7.1: [testcase] test7.1 passed. test7.0: [testcase] test7.0 passed. test8.3: [testcase] test8.3 passed. test8.2: [testcase] test8.2 passed. test9: [testcase] test9 passed. test8.1: [testcase] test8.1 passed. test8.0: [testcase] test8.0 passed. [testcase] +-------------------------------------------+ [testcase] + math_rules_tests [testcase] +-------------------------------------------+ [testcase] ---- Results -------------------------------- [testcase] Ran 8 out of 8 tests. [testcase] Passed: 8 [testcase] Warning: 0 [testcase] Failed: 0 [testcase] +-------------------------------------------+ [suite] ++-- Totals -------------------------------++ [suite] ++ Total Ran 16 out of 16 tests. [suite] ++ Total Passed: 13 [suite] ++ Total Warnings: 0 [suite] ++ Total Failed: 3 [suite] ++-----------------------------------------++ BUILD SUCCESSFUL Total time: 1 second ]]>
@style@ TestCase Task Modeled after the TestCase provided by jUnit, this class is an Ant task that looks through the build file that contains this task, calls a 'setUp' target (if it exists), then all targets whose names start with 'test', and last calls a target named 'tearDown' (if it exists). Both 'setUp' and 'tearDown' are optional targets in the build file. Ant stores targets in a hashtable, so there is no guaranteed order in which the 'test*' targets will be called. If order is important, use the 'depends' attribue of a target to enforce order, and do not name dependent targets with a name starting with 'test'. Most unit tests will make use of Assert. As the Assert task requires that the property "ant.enable.asserts" be set to true before it will do anything, this task automatically sets this property to true. The Assert task has a "level" attribute. By default, the level is set to "error", so if the Assert fails, the TestCase fails. If the level is set to "warning", the test case will be marked as a warning rather than a failure. If the level is set to "info" or "debug" and the Assert fails, any message associated with the Assert will be written out, but otherwise will be ignored by TestCase. To use this task in your build files, include a task definition like this: ]]> TestCase Attributes Attribute Description Default Required file The file containing tests. None Yes enabled Determines if this test should be ran. By using a property for this attribute, it is easy to turn off/on multiple tests. On No assertenabled Generally tests will use the Assert task. This attribute sets whether asserts should be enabled. Yes No failonerror If true, cause the build to fail. By default, a failed test does not cause the build to fail, so all tests may have the opportunity to run. No No showoutput If true, show intermediate test results Yes No showsummary If true, show a summary of test results at the end of the test run. Yes Yes
TestCase is most often used in conjunction with the Suite task. Build file to run unit tests for the Math task ]]> Here is an example build file containing actual tests. The 'setUp' target will execute first, then the two test targets. Running math precision tests. Circle area test Division by zero test Division by 0 succeeded: ${x} ]]>
@style@ Performance Monitoring In addition to the tasks described in this manual, Antelope also ships with a special Ant listener than can keep track of the amount of time that each target and task takes to execute. At the end of the build, these times will be sorted from fastest to slowest and displayed following the build output. This can be useful to pinpoint slow and/or inefficient spots in the build process and identify those areas that could benefit from optimization. The performance listener can be used outside of Antelope by passing a parameter to the command line for Ant: Following is an example of the results from using the listener. The result format is projectname.targetname for targets and projectname.targetname.taskname for tasks. All times are shown to the nearest millisecond. @style@ Feedback The preferred way to send bug reports is to use the Issue Tracker at http://antelope.tigris.org . You can also write to me directly at: Dale Anson danson@germane-software.com
antelope-3.5.1.orig/src/docs/manual/editmode.gif0000644000175000017500000010501710032534072021437 0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Mhsw%qwE נ$21kl8:1{93Ne,##9J^2'C9R2l'(D2J.4lf3{bF2ml7ys \9Q3lh=#Љ>G/:Ҏ4'm{JcҚ3]#O:KmS:ժ^5[W:ֲ5km[:׺5{_;6mc:^6gC;Ҟ6mkc;6o;7ms;^7=;antelope-3.5.1.orig/src/docs/manual/tasks.html0000644000175000017500000002225310013677776021213 0ustar drazzibdrazzib Ant Tasks

Extra Ant Tasks

The Assert Task

Antelope includes a special Ant task for adding an assertion capability to Ant projects. This task works in a manner very similar to the Java 'assert' keyword, and provides a limited "design by contract" facility to Ant. This is very useful for testing build scripts prior to putting them into production.

The Assert task verifies that a given property has a given value and throws a BuildException if the property value is not as expected or the property does not exist.

Also like Java's 'assert' keyword, the Assert task must be 'turned on' using the property "ant.enable.asserts". If not set, or is set to false, the Assert task works exactly like the Sequential task.

This task can hold other tasks including Assert.

To use this task in your build files, include a task definition like this:

    <taskdef name="assert" classname="ise.antelope.common.Assert"/>
    <property name="ant.enable.asserts" value="true"/>

Attributes:
AttributeDescriptionDefaultRequired
name The name of the property to test for. none Yes
exists Test for existence or non-existence of the property. True No
value The value to test for, implies 'exists=true'. If the value in the project is different than this value, a BuildException will be thrown and the build will stop. none No
execute Should the tasks contained in this task be executed? It may be useful to set this to false when testing build files. True No
failonerror Should the build halt if the assertion fails? Setting this to false is contrary to the intented use of assertions, but may be useful in certain situations. True No

The assert task does not support any nested elements apart from Ant tasks. Any valid Ant task may be embedded within the assert task.

In the following example, the first 'assert' task checks that the "wait" property exists and does not execute the 'echo' and 'sleep' tasks. The second 'assert' task checks that the "wait" property exists, has a value of 2, and executes the 'echo' task.

     <property name="wait" value="2"/>
     <assert name="wait" execute="false">
        <echo>
            Waiting ${wait} seconds...
            Click the red button to stop waiting.
        </echo>
        <sleep seconds="${wait}"/>
     </assert>
     <assert name="wait" value="2" execute="true">
        <echo>done waiting!</echo>
     </assert>

If the "ant.enable.asserts" property is set to false, then in the above example, the 'echo', 'sleep', and 'echo' tasks will all execute.

Top


The If Task

Antelope includes a special Ant task for adding an "if" capability to Ant projects. This task works in a manner very similar to the Java 'if' keyword. This is useful for performing certain tasks only if a property has a specific value.

This task can hold other tasks including the If task.

To use this task in your build files, include a task definition like this:

    <taskdef name="if" classname="ise.antelope.common.IfTask"/>

Attributes:
AttributeDescriptionDefaultRequired
name The name of the property to test for. none Yes
exists Test for existence or non-existence of the property. True No
value The value to test for, implies 'exists=true'. If the value for the property in the project is the same as this value, embedded tasks will be executed. none No

The If task does not support any nested elements apart from Ant tasks. Any valid Ant task may be embedded within the If task.

In the following example, the 'antcall' task will execute only if the project has a property named "test" with a value of "true".

   <if name="test" value="true">
      <antcall target="doUnitTests"/>
   </if>

In the next example, the 'antcall' task will execute only if the project has a property named "test". In this example, it does not matter what value is assigned to the "test" property.

   <if name="test">
      <antcall target="doUnitTests"/>
   </if>

Of course, the same thing could have been done by:

   <antcall target="doUnitTests"/>
   <target name="doUnitTests" if="test">
   </target>
In the next example, the 'antcall' task will execute only if the project does not have a property named test. This is the opposite situation of the previous example.

   <if name="test" exists="false">
      <antcall target="doUnitTests"/>
   </if>

The next example demonstrates nested 'if' tasks. This example will run the unit tests, and if it is Monday, will run the weekly unit tests.

   <tstamp>
      <format property="day" pattern="E" />
   </tstamp>
   <if name="test" value="true">
      <antcall target="doUnitTests"/>
      <if name="day" value="Mon">
         <antcall target="doWeeklyUnitTests"/>
      </if>
   </if>

The next example shows the "if" and "assert" tasks working together to validate a property before use, and also shows an example of where the "assert" 'failonerror' attribute might be useful. In this example, if the e-mail address is invalid, the e-mail won't be sent and the build won't fail.

   <if name="email_from" value="buildteam@mycompany.com">
      <property name="valid_email" value="true"/>
   </if>
   <if name="email_from" value="buildsite@mycompany.com">
      <property name="valid_email" value="true"/>
   </if>
   <assert name="valid_email" value="true" failonerror="false">
      <mail from="${email_from}" tolist="${email_to}" message="New release available"/>
   </assert>

Top

The Try Task

The "Try" task works similarly to the try/catch construct in Java. This task is useful when a particular task might fail, but the build should not fail if it does. An example is the "mail" task will fail if the mail server is not available, but the build should not fail if the mail message cannot be delivered.

To use this task in your build files, include a task definition like this:

    <taskdef name="try" classname="com.crossgain.antext.TryTask"/>

Attributes:
AttributeDescriptionDefaultRequired
catch The name of a target to execute if a task fails. This is optional. The target must be in the same project. None No

In the following example, the "fail" task will not cause the build to fail because it is contained by a "try". The "testfail" target will execute.

    <target name="test" description="This exercises the Try task.">
        <try catch="testfail">
            <echo>I am trying...</echo>
            <fail message=" and I failed..."/>
            <echo> but I did not die!</echo>
        </try>
    </target>
  
    <target name="testfail">
        <echo>Did testfail</echo>
    </target>

Top

The UserProperty Task

Another task provided by Antelope is the UserProperty task. This works exactly like the standard Ant Property task, except that THESE PROPERTIES ARE MUTABLE. While this goes against the standard Ant use of properties, occasionally it is useful to be able to change a property value with the build. In general, use of this task is DISCOURAGED, and the standard Ant Property should be used if possible.

To use this task in your build files, include a task definition like this:

    <taskdef name="userproperty" classname="ise.antelope.common.UserProperty"/>

For usage information, see the Ant 1.5 documentation for the Property task.

Top

antelope-3.5.1.orig/src/docs/manual/userguide.xml0000644000175000017500000000076310013677776021720 0ustar drazzibdrazzib ]> Antelope Users Guide DaleAnson &guide; &tasks; &codingstyle; antelope-3.5.1.orig/src/docs/users-guide.xsl0000644000175000017500000000304610013677370020674 0ustar drazzibdrazzib "" ul 1 ansi antelope-3.5.1.orig/src/docs/install.txt0000644000175000017500000000064310252643670020120 0ustar drazzibdrazzibAntelope Installation: Make sure Ant is installed correctly and that the Ant startup script is in your path. Unzip the distribution file. It will create a directory named AntelopeApp_@@build.num@@. Change to the AntelopeApp_@@build.num@@ directory. From a command prompt, run: java -jar AntelopeApp_@@build.num@@.jar If your platform supports it, you can also double click on the jar file from a file browser. antelope-3.5.1.orig/src/docs/tasks_readme.txt0000644000175000017500000000057710013677370021121 0ustar drazzibdrazzibtasks_readme.txt AntelopeTasks @@build.num@@ Antelope home page: http://antelope.sourceforge.net Installation: copy the jar file to ${ant.home}/lib Full documentation is in the doc directory, point your browser to doc/manual/bk03.html. Complete source code and test cases are in the src directory. A jar file containing all tasks and ready for use is in the dist directory. antelope-3.5.1.orig/src/docs/license.txt0000644000175000017500000000432210013677370020071 0ustar drazzibdrazziblicense.txt This license pertains to all files in the Antelope distribution except the images, which are from Sun's Java Look and Feel Design Guidelines and are licensed according to those guidelines. Based on the Apache Software License, Version 1.1 Copyright (c) 2002 Dale Anson. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowlegement: "This product includes software developed by Dale Anson, danson@users.sourceforge.net." Alternately, this acknowlegement may appear in the software itself, if and wherever such third-party acknowlegements normally appear. 4. The name "Antelope" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact danson@users.sourceforge.net. 5. Products derived from this software may not be called "Antelope" nor may "Antelope" appear in their names without prior written permission of Dale Anson. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DALE ANSON OR ANY PROJECT CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. antelope-3.5.1.orig/src/docs/install_tasks.txt0000644000175000017500000000066510013677370021330 0ustar drazzibdrazzibAntelope Tasks Installation: Make sure Ant is installed correctly. Locate the directory where Ant is installed. Locate a directory named "lib" in that directory. Unzip the distribution file. It will create a directory named AntelopeTasks_@@build.num@@. Change to the AntelopeTasks_@@build.num@@ directory. In this directory will be a jar file named AntelopeTasks_@@build.num@@.jar. Copy the jar file to Ant's "lib" directory. antelope-3.5.1.orig/src/docs/todo.txt0000644000175000017500000000001210013677370017404 0ustar drazzibdrazzibto do: antelope-3.5.1.orig/src/docs/apache_license.txt0000644000175000017500000000501110013677370021366 0ustar drazzibdrazzib/* * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Ant", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ antelope-3.5.1.orig/src/docs/about.html0000644000175000017500000000046610252643670017714 0ustar drazzibdrazzib About

Antelope @@build.num@@

Author: Dale Anson
Copyright 2002-2005

Build Date: @@tstamp@@

See project pages at http://antelope.tigris.org. antelope-3.5.1.orig/src/docs/src_readme.txt0000644000175000017500000000277710013677370020567 0ustar drazzibdrazzibsrc_readme.txt Antelope @@build.num@@ Antelope home page: http://antelope.sourceforge.net Prerequisites: 1. A working version of Ant 1.5 or later. 2. Java 1.4.0 or later. To build Antelope: (Note: steps 4 and 5 may be skipped if your environment matches a standard jEdit build environment) 1. Download AntelopeSrc_@@build.num@@.zip. 2. jar xf AntelopeSrc_@@build.num@@.zip 3. cd AntelopeSrc_@@build.num@@ 4. Copy build.props.example to build.props 5. Adjust build.props for your machine 6. To build all distribution files: ant all To build just the application distribution file: ant app To build just the plugin distribution file: ant To build just the tasks distribution file: ant tasks To build just the source distribution file: ant source The distribution files will be placed in the "dist" directory. To run Antelope once it's been built: 1. ant run To create the documentation, xalan and docbook must be installed: (skip steps 1 and 2 if you are using Ant 1.6. Ant 1.6 comes with the Trax xslt processor built it.) 1. Download xalan from xml.apache.org. 2. Copy xalan.jar to your ${ant.home}/lib directory. 3. Download docbook from www.docbook.org. Follow the installation instructions. Most Linux distributions already have docbook installed. 4. Edit src/docs/users-guide.xsl to reference the location of your copy of chunkfast.xsl. 5. ant transform-docs To run the unit tests, junit must be installed: 1. Download junit from www.junit.org. 2. Copy junit.jar to the "lib" directory. 3. ant test antelope-3.5.1.orig/src/config/0000755000175000017500000000000011131616342016214 5ustar drazzibdrazzibantelope-3.5.1.orig/src/config/AntelopePlugin.props0000644000175000017500000000543511131616342022236 0ustar drazzibdrazzib#-------------------------------- # Properties for Antelope Plugin #-------------------------------- #-------------------------------------------- # the basic required properties for a plugin #-------------------------------------------- # the name of the plugin plugin.ise.antelope.plugin.AntelopePlugin.name=Antelope # the author of the plugin plugin.ise.antelope.plugin.AntelopePlugin.author=Dale Anson # the version of the plugin plugin.ise.antelope.plugin.AntelopePlugin.version=3.5.1 # dependencies plugin.ise.antelope.plugin.AntelopePlugin.depend.0=jdk 1.5 plugin.ise.antelope.plugin.AntelopePlugin.depend.1=jedit 04.03.15.00 plugin.ise.antelope.plugin.AntelopePlugin.depend.2=plugin console.ConsolePlugin 4.3.7 plugin.ise.antelope.plugin.AntelopePlugin.depend.3=plugin errorlist.ErrorListPlugin 1.7 # title for DockableWindowManager Antelope.title=Antelope Antelope.label=Antelope AntelopeOutput.title=Ant Output AntelopeOutput.label=Ant Output # new setting for jEdit 4.2 plugin.ise.antelope.plugin.AntelopePlugin.activate=defer plugin.ise.antelope.plugin.AntelopePlugin.description=Antelope, runs Ant build files. #----------------------------------- # optional settings for the plugin #----------------------------------- # first page for the plugin documentation plugin.ise.antelope.plugin.AntelopePlugin.docs=manual/index.html #---------------- # menu settings #---------------- # this is the text that will be shown on the jEdit plugin # menu. It is read by jEdit via the createMenuItems method in # plugin class. This line must start with the string passed to # the GUIUtilities.loadMenu method in createMenuItems. Antelope.menu.label=Antelope # this setting describes the submenu. Each menu item is listed in the # order it is shown. The dash is a special character and will cause a # menu separator to be inserted. This line also must start with the string # passed to the GUIUtilities.loadMenu method in createMenuItems. The items # are the action names as set in the actions.xml file. plugin.ise.antelope.plugin.AntelopePlugin.menu=antelope.show - antelope.hide - antelope.toggle - antelope.default antelope.lastran # the next three items are the labels to add to a submenu on # the plugins menu for the AntelopePlugin. The plugins menu will have # a menu item labeled "Antelope" that has a submenu with "Show", "Hide", # and "Toggle". These lines start with the action names set in the # actions.xml file. antelope.show.label=Show antelope.hide.label=Hide antelope.toggle.label=Toggle antelope.default.label=Run Default Target antelope.lastran.label=Rerun last target #----------------------- # option pane settings #----------------------- plugin.ise.antelope.plugin.AntelopePlugin.option-pane=antelope options.antelope.label=Antelope options.antelope.code=new ise.antelope.plugin.AntelopeOptions(view); antelope-3.5.1.orig/src/config/actions.xml0000644000175000017500000000347510037572512020413 0ustar drazzibdrazzib view.getDockableWindowManager().showDockableWindow(ise.antelope.plugin.AntelopePlugin.NAME); view.getDockableWindowManager().hideDockableWindow(ise.antelope.plugin.AntelopePlugin.NAME); view.getDockableWindowManager().toggleDockableWindow(ise.antelope.plugin.AntelopePlugin.NAME); return view.getDockableWindowManager().isDockableWindowVisible(ise.antelope.plugin.AntelopePlugin.NAME); ise.antelope.plugin.AntelopePlugin plugin = jEdit.getPlugin("ise.antelope.plugin.AntelopePlugin"); final View myview = view; SwingUtilities.invokeLater(new Runnable(){ public void run() { plugin.executeDefaultTarget(myview); } }); ise.antelope.plugin.AntelopePlugin plugin = jEdit.getPlugin("ise.antelope.plugin.AntelopePlugin"); final View myview = view; SwingUtilities.invokeLater(new Runnable(){ public void run() { plugin.executeLastRanTargets(myview); } }); antelope-3.5.1.orig/src/config/dockables.xml0000644000175000017500000000113210430201212020645 0ustar drazzibdrazzib jEdit.resetProperty( "plugin.ise.antelope.plugin.AntelopePlugin.jars" ); return new ise.antelope.plugin.AntelopePluginPanel(view, position); antelope-3.5.1.orig/src/config/services.xml0000644000175000017500000000023510430201212020544 0ustar drazzibdrazzib new ise.antelope.plugin.AntelopeShell(); antelope-3.5.1.orig/src/config/description.html0000644000175000017500000000321311056555560021436 0ustar drazzibdrazzib Antelope is a graphical user interface for running Ant. Antelope is a mature application that is in wide use as a front end to Apache Ant. Antelope provides a set of buttons, one per target, which makes it easy to start a specific Ant operation. Basically, an Ant build file is opened with Antelope and the targets defined in the build file can be executed by clicking a button. Antelope is much more than a thin wrapper around Ant, however.

Antelope can run in two different environments. It can run as a stand-alone GUI application and as a plugin to jEdit (www.jedit.org), an excellent open source editor for programmers.

As a stand-alone application, Antelope provides the ability to create and edit Ant build files, the ability to run build file targets, and can trace target and task execution in a quasi-debug mode. Output from the build process can be captured to a file and/or to screen and performance statistics can be gathered to guide optimization efforts. Several very useful tasks to extend Ant are included.

As a jEdit plugin, Antelope expands the features of the stand-alone application to nicely integrate with the text editor and with the Console and ErrorList plugins. Antelope has an open API that allows other plugins to utilize Antelope's capabilities.

In either mode, Antelope provides property and reference inspection and the ability to set properties that would be passed as parameters to Ant on the command line.

The Antelope Project also provides a set of additional tasks that provide functionality not found in the standard tasks distributed with Ant. These tasks are included with the plugin. antelope-3.5.1.orig/src/README.txt0000644000175000017500000000004710012122576016444 0ustar drazzibdrazzib# This is where your source code goes. antelope-3.5.1.orig/src/ise/0000755000175000017500000000000010637540660015540 5ustar drazzibdrazzibantelope-3.5.1.orig/src/ise/library/0000755000175000017500000000000011056520576017204 5ustar drazzibdrazzibantelope-3.5.1.orig/src/ise/library/Nav.java0000644000175000017500000001306210163726476020602 0ustar drazzibdrazzib package ise.library; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.util.*; /** * Provides navigation ability for a client object, has a "back" and "forward" * button to move through a list of objects. * * @author Dale Anson, danson@germane-software.com, August 2002 */ public class Nav extends JToolBar implements ActionListener { /** * Action command to go to the previous item. */ public final static String BACK = "back"; /** * Action command to go to the next item. */ public final static String FORWARD = "forward"; /** * Action command to indicate that it is okay to go back. */ public final static String CAN_GO_BACK = "canGoBack"; /** * Action command to indicate that it is not okay to go back. */ public final static String CANNOT_GO_BACK = "cannotGoBack"; /** * Action command to indicate that it is okay to go forward. */ public final static String CAN_GO_FORWARD = "canGoForward"; /** * Action command to indicate that it is not okay to go forward. */ public final static String CANNOT_GO_FORWARD = "cannotGoForward"; private JButton back, forward; private Stack backStack; private Stack forwardStack; private Object currentNode = null; private Navable client; /** * @param client the client object to provide navigation for */ public Nav( Navable client ) { if ( client == null ) throw new IllegalArgumentException( "client cannot be null" ); this.client = client; setFloatable( false ); putClientProperty( "JToolBar.isRollover", Boolean.TRUE ); // set up the buttons try { back = new JButton(); java.net.URL url = getClass().getClassLoader().getResource( "images/Back16.gif" ); Icon icon = null; if ( url != null ) icon = new ImageIcon( url ); if (icon != null) back.setIcon( icon ); else back.setText("<"); forward = new JButton(); url = getClass().getClassLoader().getResource( "images/Forward16.gif" ); icon = null; if ( url != null ) icon = new ImageIcon( url ); if (icon != null) forward.setIcon( icon ); else forward.setText(">"); back.setMargin( new Insets( 0, 0, 0, 0 ) ); forward.setMargin( new Insets( 0, 0, 0, 0 ) ); back.setActionCommand( BACK ); forward.setActionCommand( FORWARD ); back.addActionListener( this ); forward.addActionListener( this ); add( back ); add( forward ); } catch(Exception e) { e.printStackTrace(); } // set up the history stacks backStack = new Stack(); forwardStack = new Stack(); clearStacks(); } /** * The action handler for this class. Actions can be invoked by calling this * method and passing an ActionEvent with one of the action commands defined * in this class (BACK, FORWARD, etc). * * @param ae the action event to kick a response. */ public void actionPerformed( ActionEvent ae ) { if ( ae.getActionCommand().equals( BACK ) ) { goBack(); } else if ( ae.getActionCommand().equals( FORWARD ) ) { goForward(); } else if ( ae.getActionCommand().equals( CAN_GO_BACK ) ) { back.setEnabled( true ); } else if ( ae.getActionCommand().equals( CANNOT_GO_BACK ) ) { back.setEnabled( false ); } else if ( ae.getActionCommand().equals( CAN_GO_FORWARD ) ) { forward.setEnabled( true ); } else if ( ae.getActionCommand().equals( CANNOT_GO_FORWARD ) ) { forward.setEnabled( false ); } } /** * Clears the history. */ public void clearStacks() { backStack.clear(); forwardStack.clear(); setButtonState(); } /** * Moves to the previous item in the "back" history. */ public void goBack() { if ( !backStack.empty() ) { if ( currentNode != null ) forwardStack.push( currentNode ); currentNode = backStack.pop(); navigate( currentNode ); } setButtonState(); } /** * Moves to the next item in the "forward" history. */ public void goForward() { if ( !forwardStack.empty() ) { if ( currentNode != null ) backStack.push( currentNode ); currentNode = forwardStack.pop(); navigate( currentNode ); } setButtonState(); } /** * Invokes the client to go to the given object. * * @param node where to go */ private void navigate( Object node ) { client.setPosition( node ); } /** * Sets the state of the navigation buttons. */ private void setButtonState() { back.setEnabled( !backStack.empty() ); forward.setEnabled( !forwardStack.empty() ); } /** * Updates the stacks and button state based on the given node. Pushes the * node on to the "back" history, clears the "forward" history. * * @param node an object */ public void update( Object node ) { if ( node != currentNode ) { if ( currentNode != null ) backStack.push( currentNode ); currentNode = node; forwardStack.clear(); } setButtonState(); } } antelope-3.5.1.orig/src/ise/library/FileUtilities.java0000644000175000017500000001307210046754260022622 0ustar drazzibdrazzibpackage ise.library; import java.io.*; /** * Some file copy utilities. These are rock solid. * @author Dale Anson, danson@germane-software.com */ public class FileUtilities { /** * Buffer size for read and write operations. */ public static int BUFFER_SIZE = 8192; /** * Copies one file to another. If destination file exists, it will be * overwritten. * * @param from file to copy * @param to where to put it * @exception Exception most likely an IOException */ public static void copy(File from, File to) throws Exception { copyFile(from, to); } /** * Copies a stream to a file. If destination file exists, it will be * overwritten. The input stream will be closed when this method returns. * * @param from stream to copy from * @param to file to write * @exception Exception most likely an IOException */ public static void copy(InputStream is, File to) throws Exception { copyToFile(is, to); } /** * Copies a stream to a file. If destination file exists, it will be * overwritten. The input stream may be closed when this method returns. * * @param from stream to copy from * @param to file to write * @param close whether to close the input stream when done * @exception Exception most likely an IOException */ public static void copy(InputStream is, boolean close, File to) throws Exception { copyToFile(is, close, to); } /** * Copies a stream to another stream. The input stream will be closed when * this method returns. * * @param from stream to copy from * @param to file to write * @exception Exception most likely an IOException */ public static void copy(InputStream is, OutputStream os) throws Exception { copyToStream(is, os); } /** * Copies a reader to a writer. The reader will be closed when * this method returns. * * @param from Reader to read from * @param to Writer to write to * @exception Exception most likely an IOException */ public static void copy(Reader r, Writer w) throws Exception { copyToWriter(r, w); } /** * Copies one file to another. If destination file exists, it will be * overwritten. * * @param from file to copy * @param to where to put it * @exception Exception most likely an IOException */ public static void copyFile( File from, File to ) throws Exception { if ( !from.exists() ) return ; FileInputStream in = new FileInputStream( from ); FileOutputStream out = new FileOutputStream( to ); byte[] buffer = new byte[ BUFFER_SIZE ]; int bytes_read; while ( true ) { bytes_read = in.read( buffer ); if ( bytes_read == -1 ) break; out.write( buffer, 0, bytes_read ); } out.flush(); out.close(); in.close(); } /** * Copies a stream to a file. If destination file exists, it will be * overwritten. The input stream will be closed when this method returns. * * @param from stream to copy from * @param to file to write * @exception Exception most likely an IOException */ public static void copyToFile( InputStream from, File to ) throws Exception { copyToFile( from, true, to ); } /** * Copies a stream to a file. If destination file exists, it will be * overwritten. The input stream may be closed when this method returns. * * @param from stream to copy from * @param to file to write * @param close whether to close the input stream when done * @exception Exception most likely an IOException */ public static void copyToFile( InputStream from, boolean close, File to ) throws Exception { FileOutputStream out = new FileOutputStream( to ); byte[] buffer = new byte[ BUFFER_SIZE ]; int bytes_read; while ( true ) { bytes_read = from.read( buffer ); if ( bytes_read == -1 ) break; out.write( buffer, 0, bytes_read ); } out.flush(); out.close(); if ( close ) from.close(); } /** * Copies a stream to another stream. The input stream will be closed when * this method returns. * * @param from stream to copy from * @param to file to write * @exception Exception most likely an IOException */ public static void copyToStream( InputStream from, OutputStream to ) throws Exception { byte[] buffer = new byte[ BUFFER_SIZE ]; int bytes_read; while ( true ) { bytes_read = from.read( buffer ); if ( bytes_read == -1 ) break; to.write( buffer, 0, bytes_read ); } to.flush(); from.close(); } /** * Copies a reader to a writer. The reader will be closed when * this method returns. * * @param from Reader to read from * @param to Writer to write to * @exception Exception most likely an IOException */ public static void copyToWriter( Reader from, Writer to ) throws Exception { char[] buffer = new char[ BUFFER_SIZE ]; int chars_read; while ( true ) { chars_read = from.read( buffer ); if ( chars_read == -1 ) break; to.write( buffer, 0, chars_read ); } to.flush(); from.close(); } } antelope-3.5.1.orig/src/ise/library/Os.java0000644000175000017500000003346610252643670020442 0ustar drazzibdrazzib/* * The Apache Software License, Version 1.1 * * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package ise.library; import java.io.*; import java.util.Hashtable; import java.util.Locale; import java.util.Vector; /** * ***** Dale Anson: Modified to not be Ant specific by removing "extends Condition" * and replacing BuildExceptions. Added getEnvironmentValue and associated methods. * ***** * Condition that tests the OS type. * * @author Stefan Bodewig * @author Magesh Umasankar * @since Ant 1.4 * @version $Revision: 123 $ */ public class Os { private static final String OS_NAME = System.getProperty( "os.name" ).toLowerCase( Locale.US ); private static final String OS_ARCH = System.getProperty( "os.arch" ).toLowerCase( Locale.US ); private static final String OS_VERSION = System.getProperty( "os.version" ).toLowerCase( Locale.US ); private static final String PATH_SEP = System.getProperty( "path.separator" ); private String family; private String name; private String version; private String arch; private static Hashtable environment; /** * Default constructor * */ public Os() {} /** * Constructor that sets the family attribute * * @param family a String value */ public Os( String family ) { setFamily( family ); } /** * Sets the desired OS family type * * @param f The OS family type desired
* Possible values:
*

    *
  • dos
  • *
  • mac
  • *
  • netware
  • *
  • os/2
  • *
  • tandem
  • *
  • unix
  • *
  • windows
  • *
  • win9x
  • *
  • z/os
  • *
  • os/400
  • *
*/ public void setFamily( String f ) { family = f.toLowerCase( Locale.US ); } /** * Sets the desired OS name * * @param name The OS name */ public void setName( String name ) { this.name = name.toLowerCase( Locale.US ); } /** * Sets the desired OS architecture * * @param arch The OS architecture */ public void setArch( String arch ) { this.arch = arch.toLowerCase( Locale.US ); } /** * Sets the desired OS version * * @param version The OS version */ public void setVersion( String version ) { this.version = version.toLowerCase( Locale.US ); } /** * Determines if the OS on which Ant is executing matches the type of * that set in setFamily. * @see Os#setFamily(String) */ public boolean eval() { return isOs( family, name, arch, version ); } /** * Determines if the OS on which Ant is executing matches the * given OS family. * @param family the family to check for * @return true if the OS matches * @since 1.5 */ public static boolean isFamily( String family ) { return isOs( family, null, null, null ); } /** * Determines if the OS on which Ant is executing matches the * given OS name. * * @param name the OS name to check for * @return true if the OS matches * @since 1.7 */ public static boolean isName( String name ) { return isOs( null, name, null, null ); } /** * Determines if the OS on which Ant is executing matches the * given OS architecture. * * @param arch the OS architecture to check for * @return true if the OS matches * @since 1.7 */ public static boolean isArch( String arch ) { return isOs( null, null, arch, null ); } /** * Determines if the OS on which Ant is executing matches the * given OS version. * * @param version the OS version to check for * @return true if the OS matches * @since 1.7 */ public static boolean isVersion( String version ) { return isOs( null, null, null, version ); } /** * Determines if the OS on which Ant is executing matches the * given OS family, name, architecture and version * * @param family The OS family * @param name The OS name * @param arch The OS architecture * @param version The OS version * @return true if the OS matches * @since 1.7 */ public static boolean isOs( String family, String name, String arch, String version ) { boolean retValue = false; if ( family != null || name != null || arch != null || version != null ) { boolean isFamily = true; boolean isName = true; boolean isArch = true; boolean isVersion = true; if ( family != null ) { if ( family.equals( "windows" ) ) { isFamily = OS_NAME.indexOf( "windows" ) > -1; } else if ( family.equals( "os/2" ) ) { isFamily = OS_NAME.indexOf( "os/2" ) > -1; } else if ( family.equals( "netware" ) ) { isFamily = OS_NAME.indexOf( "netware" ) > -1; } else if ( family.equals( "dos" ) ) { isFamily = PATH_SEP.equals( ";" ) && !isFamily( "netware" ); } else if ( family.equals( "mac" ) ) { isFamily = OS_NAME.indexOf( "mac" ) > -1; } else if ( family.equals( "tandem" ) ) { isFamily = OS_NAME.indexOf( "nonstop_kernel" ) > -1; } else if ( family.equals( "unix" ) ) { isFamily = PATH_SEP.equals( ":" ) && !isFamily( "openvms" ) && ( !isFamily( "mac" ) || OS_NAME.endsWith( "x" ) ); } else if ( family.equals( "win9x" ) ) { isFamily = isFamily( "windows" ) && ( OS_NAME.indexOf( "95" ) >= 0 || OS_NAME.indexOf( "98" ) >= 0 || OS_NAME.indexOf( "me" ) >= 0 || OS_NAME.indexOf( "ce" ) >= 0 ); } else if ( family.equals( "z/os" ) ) { isFamily = OS_NAME.indexOf( "z/os" ) > -1 || OS_NAME.indexOf( "os/390" ) > -1; } else if ( family.equals( "os/400" ) ) { isFamily = OS_NAME.indexOf( "os/400" ) > -1; } else if ( family.equals( "openvms" ) ) { isFamily = OS_NAME.indexOf( "openvms" ) > -1; } else { /* throw new BuildException( "Don\'t know how to detect os family \"" + family + "\""); */ return false; } } if ( name != null ) { isName = name.equals( OS_NAME ); } if ( arch != null ) { isArch = arch.equals( OS_ARCH ); } if ( version != null ) { isVersion = version.equals( OS_VERSION ); } retValue = isFamily && isName && isArch && isVersion; } return retValue; } /** * Dale Anson: One of the main reasons I borrowed this class from Ant was to * be able to read environment variables. It makes sense to add a method to * easily fetch the value of an environment variable here. * @param name the name of an environment variable. Much of this code was * copied from org.apache.tools.ant.taskdefs.Execute. * @return the value of the environment variable, or null if there is no value * for the given name */ public static String getEnvironmentValue( String name ) { if ( environment != null ) { return ( String ) environment.get( name ); } environment = new Hashtable(); try { String[] env_cmd = getProcEnvCommand(); Process process = Runtime.getRuntime().exec( env_cmd ); InputStream is = new BufferedInputStream( process.getInputStream() ); ByteArrayOutputStream baos = new ByteArrayOutputStream(); FileUtilities.copy( is, baos ); BufferedReader in = new BufferedReader( new StringReader( baos.toString() ) ); // this portion copied from org.apache.tools.ant.taskdefs.Execute // Vector procEnvironment = new Vector(); String var = null; String line, lineSep = System.getProperty( "line.separator" ); while ( ( line = in.readLine() ) != null ) { if ( line.indexOf( '=' ) == -1 ) { // Chunk part of previous env var (UNIX env vars can // contain embedded new lines). if ( var == null ) { var = lineSep + line; } else { var += lineSep + line; } } else { // New env var...append the previous one if we have it. if ( var != null ) { procEnvironment.addElement( var ); } var = line; } } // Since we "look ahead" before adding, there's one last env var. if ( var != null ) { procEnvironment.addElement( var ); } // end copy from Execute // // now split out the names from the values and populate a Hashtable if ( procEnvironment.size() > 0 ) { java.util.Iterator it = procEnvironment.iterator(); while ( it.hasNext() ) { var = ( String ) it.next(); int index = var.indexOf( "=" ); String key = var.substring( 0, index ); String value = var.substring( index + 1 ); environment.put( key, value ); } } } catch ( Exception ignored ) {} return getEnvironmentValue( name ); } /** * Dale Anson: Copied from org.apache.tools.ant.taskdefs.Execute. It's a private method in * that class, so I can't access it directly. */ private static String[] getProcEnvCommand() { if ( Os.isFamily( "os/2" ) ) { // OS/2 - use same mechanism as Windows 2000 String[] cmd = {"cmd", "/c", "set" }; return cmd; } else if ( Os.isFamily( "windows" ) ) { // Determine if we're running under XP/2000/NT or 98/95 if ( !Os.isFamily( "win9x" ) ) { // Windows XP/2000/NT String[] cmd = {"cmd", "/c", "set" }; return cmd; } else { // Windows 98/95 String[] cmd = {"command.com", "/c", "set" }; return cmd; } } else if ( Os.isFamily( "z/os" ) || Os.isFamily( "unix" ) ) { // On most systems one could use: /bin/sh -c env // Some systems have /bin/env, others /usr/bin/env, just try String[] cmd = new String[ 1 ]; if ( new File( "/bin/env" ).canRead() ) { cmd[ 0 ] = "/bin/env"; } else if ( new File( "/usr/bin/env" ).canRead() ) { cmd[ 0 ] = "/usr/bin/env"; } else { // rely on PATH cmd[ 0 ] = "env"; } return cmd; } else if ( Os.isFamily( "netware" ) || Os.isFamily( "os/400" ) ) { // rely on PATH String[] cmd = {"env"}; return cmd; } else if ( Os.isFamily( "openvms" ) ) { String[] cmd = {"show", "logical"}; return cmd; } else { // MAC OS 9 and previous //TODO: I have no idea how to get it, someone must fix it String[] cmd = null; return cmd; } } } antelope-3.5.1.orig/src/ise/library/swingworker/0000755000175000017500000000000011056552166021565 5ustar drazzibdrazzibantelope-3.5.1.orig/src/ise/library/swingworker/AccumulativeRunnable.java0000644000175000017500000001022711056523702026535 0ustar drazzibdrazzib/* * $Id: AccumulativeRunnable.java,v 1.2 2006/09/28 20:20:28 idk Exp $ * * Copyright 2005 Sun Microsystems, Inc. All rights * reserved. Use is subject to license terms. */ //package org.jdesktop.swingworker; package ise.library.swingworker; import java.util.*; import javax.swing.SwingUtilities; /** * An abstract class to be used in the cases where we need {@code Runnable} * to perform some actions on an appendable set of data. * The set of data might be appended after the {@code Runnable} is * sent for the execution. Usually such {@code Runnables} are sent to * the EDT. * *

* Usage example: * *

* Say we want to implement JLabel.setText(String text) which sends * {@code text} string to the JLabel.setTextImpl(String text) on the EDT. * In the event JLabel.setText is called rapidly many times off the EDT * we will get many updates on the EDT but only the last one is important. * (Every next updates overrides the previous one.) * We might want to implement this {@code setText} in a way that only * the last update is delivered. *

* Here is how one can do this using {@code AccumulativeRunnable}: *

 * AccumulativeRunnable doSetTextImpl =
 * new  AccumulativeRunnable() {
 *     @Override
 *     protected void run(List<String> args) {
 *         //set to the last string being passed
 *         setTextImpl(args.get(args.size() - 1);
 *     }
 * }
 * void setText(String text) {
 *     //add text and send for the execution if needed.
 *     doSetTextImpl.add(text);
 * }
 * 
* *

* Say we want want to implement addDirtyRegion(Rectangle rect) * which sends this region to the * handleDirtyRegions(List regions) on the EDT. * addDirtyRegions better be accumulated before handling on the EDT. * *

* Here is how it can be implemented using AccumulativeRunnable: *

 * AccumulativeRunnable doHandleDirtyRegions =
 *     new AccumulativeRunnable() {
 *         @Override
 *         protected void run(List<Rectangle> args) {
 *             handleDirtyRegions(args);
 *         }
 *     };
 *  void addDirtyRegion(Rectangle rect) {
 *      doHandleDirtyRegions.add(rect);
 *  }
 * 
* * @author Igor Kushnirskiy * @version $Revision: 1.2 $ $Date: 2006/09/28 20:20:28 $ * * @param the type this {@code Runnable} accumulates * */ abstract class AccumulativeRunnable implements Runnable { private List arguments = null; /** * Equivalent to {@code Runnable.run} method with the * accumulated arguments to process. * * @param args accumulated arguments to process. */ protected abstract void run(List args); /** * {@inheritDoc} * *

* This implementation calls {@code run(List args)} method * with the list of accumulated arguments. */ public final void run() { run(flush()); } /** * appends arguments and sends this {@code Runnable} for the * execution if needed. *

* This implementation uses {@see #submit} to send this * {@code Runnable} for execution. * @param args the arguments to accumulate */ public final synchronized void add(T... args) { boolean isSubmitted = true; if (arguments == null) { isSubmitted = false; arguments = new ArrayList(); } Collections.addAll(arguments, args); if (!isSubmitted) { submit(); } } /** * Sends this {@code Runnable} for the execution * *

* This method is to be executed only from {@code add} method. * *

* This implementation uses {@code SwingWorker.invokeLater}. */ protected void submit() { SwingUtilities.invokeLater(this); } /** * Returns accumulated arguments and flashes the arguments storage. * * @return accumulated arguments */ private final synchronized List flush() { List list = arguments; arguments = null; return list; } } antelope-3.5.1.orig/src/ise/library/swingworker/SwingPropertyChangeSupport.java0000644000175000017500000000657711056523674030010 0ustar drazzibdrazzib/* * $Id: SwingPropertyChangeSupport.java,v 1.1 2005/06/18 21:27:14 idk Exp $ * * Copyright 2005 Sun Microsystems, Inc. All rights * reserved. Use is subject to license terms. */ //package org.jdesktop.swingworker; package ise.library.swingworker; import java.beans.PropertyChangeSupport; import java.beans.PropertyChangeEvent; import javax.swing.SwingUtilities; /** * This subclass of {@code java.beans.PropertyChangeSupport} is almost * identical in functionality. The only difference is if constructed with * {@code SwingPropertyChangeSupport(sourceBean, true)} it ensures * listeners are only ever notified on the Event Dispatch Thread. * * @author Igor Kushnirskiy * @version $Revision: 1.1 $ $Date: 2005/06/18 21:27:14 $ */ public final class SwingPropertyChangeSupport extends PropertyChangeSupport { /** * Constructs a SwingPropertyChangeSupport object. * * @param sourceBean The bean to be given as the source for any * events. * @throws NullPointerException if {@code sourceBean} is * {@code null} */ public SwingPropertyChangeSupport(Object sourceBean) { this(sourceBean, false); } /** * Constructs a SwingPropertyChangeSupport object. * * @param sourceBean the bean to be given as the source for any events * @param notifyOnEDT whether to notify listeners on the Event * Dispatch Thread only * * @throws NullPointerException if {@code sourceBean} is * {@code null} * @since 1.6 */ public SwingPropertyChangeSupport(Object sourceBean, boolean notifyOnEDT) { super(sourceBean); this.notifyOnEDT = notifyOnEDT; } /** * {@inheritDoc} * *

* If {@see #isNotifyOnEDT} is {@code true} and called off the * Event Dispatch Thread this implementation uses * {@code SwingUtilities.invokeLater} to send out the notification * on the Event Dispatch Thread. This ensures listeners * are only ever notified on the Event Dispatch Thread. * * @since 1.6 */ public void firePropertyChange(final PropertyChangeEvent evt) { if (evt == null) { // danson, I don't see any reason to throw NPE, just return and // be done with it. //throw new NullPointerException(); return; } if (! isNotifyOnEDT() || SwingUtilities.isEventDispatchThread()) { super.firePropertyChange(evt); } else { SwingUtilities.invokeLater( new Runnable() { public void run() { firePropertyChange(evt); } }); } } /** * Returns {@code notifyOnEDT} property. * * @return {@code notifyOnEDT} property * @see #SwingPropertyChangeSupport(Object sourceBean, boolean notifyOnEDT) * @since 1.6 */ public /*final*/ boolean isNotifyOnEDT() { // danson, 'final' is unnecessary return notifyOnEDT; } // Serialization version ID static final long serialVersionUID = 7162625831330845068L; /** * whether to notify listeners on EDT * * @serial * @since 1.6 */ private final boolean notifyOnEDT; } antelope-3.5.1.orig/src/ise/library/swingworker/SwingWorker.java0000644000175000017500000007416411056523662024724 0ustar drazzibdrazzib/* * $Id: SwingWorker.java,v 1.5 2007/03/01 19:55:54 idk Exp $ * * Copyright 2005 Sun Microsystems, Inc. All rights * reserved. Use is subject to license terms. */ //package org.jdesktop.swingworker; package ise.library.swingworker; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.beans.PropertyChangeEvent; import java.util.List; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.*; import java.awt.event.*; import javax.swing.SwingUtilities; import javax.swing.Timer; /** * An abstract class to perform lengthy GUI-interacting tasks in a * dedicated thread. * *

* When writing a multi-threaded application using Swing, there are * two constraints to keep in mind: * (refer to * * How to Use Threads * for more details): *

    *
  • Time-consuming tasks should not be run on the Event * Dispatch Thread. Otherwise the application becomes unresponsive. *
  • *
  • Swing components should be accessed on the Event * Dispatch Thread only. *
  • *
* *

* *

* These constraints mean that a GUI application with time intensive * computing needs at least two threads: 1) a thread to perform the lengthy * task and 2) the Event Dispatch Thread (EDT) for all GUI-related * activities. This involves inter-thread communication which can be * tricky to implement. * *

* {@code SwingWorker} is designed for situations where you need to have a long * running task run in a background thread and provide updates to the UI * either when done, or while processing. * Subclasses of {@code SwingWorker} must implement * the {@see #doInBackground} method to perform the background computation. * * *

* Workflow *

* There are three threads involved in the life cycle of a * {@code SwingWorker} : *

    *
  • *

    * Current thread: The {@link #execute} method is * called on this thread. It schedules {@code SwingWorker} for the execution on a * worker * thread and returns immediately. One can wait for the {@code SwingWorker} to * complete using the {@link #get get} methods. *

  • *

    * Worker thread: The {@link #doInBackground} * method is called on this thread. * This is where all background activities should happen. To notify * {@code PropertyChangeListeners} about bound properties changes use the * {@link #firePropertyChange firePropertyChange} and * {@link #getPropertyChangeSupport} methods. By default there are two bound * properties available: {@code state} and {@code progress}. *

  • *

    * Event Dispatch Thread: All Swing related activities occur * on this thread. {@code SwingWorker} invokes the * {@link #process process} and {@link #done} methods and notifies * any {@code PropertyChangeListeners} on this thread. *

* *

* Often, the Current thread is the Event Dispatch * Thread. * * *

* Before the {@code doInBackground} method is invoked on a worker thread, * {@code SwingWorker} notifies any {@code PropertyChangeListeners} about the * {@code state} property change to {@code StateValue.STARTED}. After the * {@code doInBackground} method is finished the {@code done} method is * executed. Then {@code SwingWorker} notifies any {@code PropertyChangeListeners} * about the {@code state} property change to {@code StateValue.DONE}. * *

* {@code SwingWorker} is only designed to be executed once. Executing a * {@code SwingWorker} more than once will not result in invoking the * {@code doInBackground} method twice. * *

* Sample Usage *

* The following example illustrates the simplest use case. Some * processing is done in the background and when done you update a Swing * component. * *

* Say we want to find the "Meaning of Life" and display the result in * a {@code JLabel}. * *

 *   final JLabel label;
 *   class MeaningOfLifeFinder extends SwingWorker<String, Object> {
 *       {@code @Override}
 *       public String doInBackground() {
 *           return findTheMeaningOfLife();
 *       }
 *
 *       {@code @Override}
 *       protected void done() {
 *           try {
 *               label.setText(get());
 *           } catch (Exception ignore) {
 *           }
 *       }
 *   }
 *
 *   (new MeaningOfLifeFinder()).execute();
 * 
* *

* The next example is useful in situations where you wish to process data * as it is ready on the Event Dispatch Thread. * *

* Now we want to find the first N prime numbers and display the results in a * {@code JTextArea}. While this is computing, we want to update our * progress in a {@code JProgressBar}. Finally, we also want to print * the prime numbers to {@code System.out}. *

 * class PrimeNumbersTask extends
 *         SwingWorker<List<Integer>, Integer> {
 *     PrimeNumbersTask(JTextArea textArea, int numbersToFind) {
 *         //initialize
 *     }
 *
 *     {@code @Override}
 *     public List<Integer> doInBackground() {
 *         while (! enough && ! isCancelled()) {
 *                 number = nextPrimeNumber();
 *                 publish(number);
 *                 setProgress(100 * numbers.size() / numbersToFind);
 *             }
 *         }
 *         return numbers;
 *     }
 *
 *     {@code @Override}
 *     protected void process(List<Integer> chunks) {
 *         for (int number : chunks) {
 *             textArea.append(number + "\n");
 *         }
 *     }
 * }
 *
 * JTextArea textArea = new JTextArea();
 * final JProgressBar progressBar = new JProgressBar(0, 100);
 * PrimeNumbersTask task = new PrimeNumbersTask(textArea, N);
 * task.addPropertyChangeListener(
 *     new PropertyChangeListener() {
 *         public  void propertyChange(PropertyChangeEvent evt) {
 *             if ("progress".equals(evt.getPropertyName())) {
 *                 progressBar.setValue((Integer)evt.getNewValue());
 *             }
 *         }
 *     });
 *
 * task.execute();
 * System.out.println(task.get()); //prints all prime numbers we have got
 * 
* *

* Because {@code SwingWorker} implements {@code Runnable}, a * {@code SwingWorker} can be submitted to an * {@link java.util.concurrent.Executor} for execution. * * @author Igor Kushnirskiy * @version $Revision: 1.5 $ $Date: 2007/03/01 19:55:54 $ * * @param the result type returned by this {@code SwingWorker's} * {@code doInBackground} and {@code get} methods * @param the type used for carrying out intermediate results by this * {@code SwingWorker's} {@code publish} and {@code process} methods * */ public abstract class SwingWorker implements Future, Runnable { /** * number of worker threads. */ private static final int MAX_WORKER_THREADS = 10; /** * current progress. */ private volatile int progress; /** * current state. */ private volatile StateValue state; /** * everything is run inside this FutureTask. Also it is used as * a delegatee for the Future API. */ private final FutureTask future; /** * all propertyChangeSupport goes through this. */ private final PropertyChangeSupport propertyChangeSupport; /** * handler for {@code process} method. */ private AccumulativeRunnable doProcess; /** * handler for progress property change notifications. */ private AccumulativeRunnable doNotifyProgressChange; private static final AccumulativeRunnable doSubmit = new DoSubmitAccumulativeRunnable(); private static ExecutorService executorService = null; /** * Values for the {@code state} bound property. */ public enum StateValue { /** * Initial {@code SwingWorker} state. */ PENDING, /** * {@code SwingWorker} is {@code STARTED} * before invoking {@code doInBackground}. */ STARTED, /** * {@code SwingWorker} is {@code DONE} * after {@code doInBackground} method * is finished. */ DONE }; /** * Constructs this {@code SwingWorker}. */ public SwingWorker() { Callable callable = new Callable() { public T call() throws Exception { // NOPMD setState(StateValue.STARTED); return doInBackground(); } }; future = new FutureTask(callable) { @Override protected void done() { doneEDT(); setState(StateValue.DONE); } }; state = StateValue.PENDING; propertyChangeSupport = new SwingWorkerPropertyChangeSupport(this); doProcess = null; doNotifyProgressChange = null; } /** * Computes a result, or throws an exception if unable to do so. * *

* Note that this method is executed only once. * *

* Note: this method is executed in a background thread. * * * @return the computed result * @throws Exception if unable to compute a result * */ protected abstract T doInBackground() throws Exception ; // NOPMD /** * Sets this {@code Future} to the result of computation unless * it has been canceled. */ public final void run() { future.run(); } /** * Sends data chunks to the {@link #process} method. This method is to be * used from inside the {@code doInBackground} method to deliver * intermediate results * for processing on the Event Dispatch Thread inside the * {@code process} method. * *

* Because the {@code process} method is invoked asynchronously on * the Event Dispatch Thread * multiple invocations to the {@code publish} method * might occur before the {@code process} method is executed. For * performance purposes all these invocations are coalesced into one * invocation with concatenated arguments. * *

* For example: * *

     * publish("1");
     * publish("2", "3");
     * publish("4", "5", "6");
     * 
* * might result in: * *
     * process("1", "2", "3", "4", "5", "6")
     * 
* *

* Sample Usage. This code snippet loads some tabular data and * updates {@code DefaultTableModel} with it. Note that it safe to mutate * the tableModel from inside the {@code process} method because it is * invoked on the Event Dispatch Thread. * *

     * class TableSwingWorker extends
     *         SwingWorker<DefaultTableModel, Object[]> {
     *     private final DefaultTableModel tableModel;
     *
     *     public TableSwingWorker(DefaultTableModel tableModel) {
     *         this.tableModel = tableModel;
     *     }
     *
     *     {@code @Override}
     *     protected DefaultTableModel doInBackground() throws Exception {
     *         for (Object[] row = loadData();
     *                  ! isCancelled() && row != null;
     *                  row = loadData()) {
     *             publish((Object[]) row);
     *         }
     *         return tableModel;
     *     }
     *
     *     {@code @Override}
     *     protected void process(List<Object[]> chunks) {
     *         for (Object[] row : chunks) {
     *             tableModel.addRow(row);
     *         }
     *     }
     * }
     * 
* * @param chunks intermediate results to process * * @see #process * */ protected final void publish(V... chunks) { synchronized (this) { if (doProcess == null) { doProcess = new AccumulativeRunnable() { @Override public void run(List args) { process(args); } @Override protected void submit() { doSubmit.add(this); } }; } } doProcess.add(chunks); } /** * Receives data chunks from the {@code publish} method asynchronously on the * Event Dispatch Thread. * *

* Please refer to the {@link #publish} method for more details. * * @param chunks intermediate results to process * * @see #publish * */ protected void process(List chunks) { } /** * Executed on the Event Dispatch Thread after the {@code doInBackground} * method is finished. The default * implementation does nothing. Subclasses may override this method to * perform completion actions on the Event Dispatch Thread. Note * that you can query status inside the implementation of this method to * determine the result of this task or whether this task has been canceled. * * @see #doInBackground * @see #isCancelled() * @see #get */ protected void done() { } /** * Sets the {@code progress} bound property. * The value should be from 0 to 100. * *

* Because {@code PropertyChangeListener}s are notified asynchronously on * the Event Dispatch Thread multiple invocations to the * {@code setProgress} method might occur before any * {@code PropertyChangeListeners} are invoked. For performance purposes * all these invocations are coalesced into one invocation with the last * invocation argument only. * *

* For example, the following invocations: * *

     * setProgress(1);
     * setProgress(2);
     * setProgress(3);
     * 
* * might result in a single {@code PropertyChangeListener} notification with * the value {@code 3}. * * @param progress the progress value to set * @throws IllegalArgumentException is value not from 0 to 100 */ protected final void setProgress(int progress) { if (progress < 0 || progress > 100) { throw new IllegalArgumentException("the value should be from 0 to 100"); } if (this.progress == progress) { return; } int oldProgress = this.progress; this.progress = progress; if (! getPropertyChangeSupport().hasListeners("progress")) { return; } synchronized (this) { if (doNotifyProgressChange == null) { doNotifyProgressChange = new AccumulativeRunnable() { @Override public void run(List args) { firePropertyChange("progress", args.get(0), args.get(args.size() - 1)); } @Override protected void submit() { doSubmit.add(this); } }; } } doNotifyProgressChange.add(oldProgress, progress); } /** * Returns the {@code progress} bound property. * * @return the progress bound property. */ public final int getProgress() { return progress; } /** * Schedules this {@code SwingWorker} for execution on a worker * thread. There are a number of worker threads available. In the * event all worker threads are busy handling other * {@code SwingWorkers} this {@code SwingWorker} is placed in a waiting * queue. * *

* Note: * {@code SwingWorker} is only designed to be executed once. Executing a * {@code SwingWorker} more than once will not result in invoking the * {@code doInBackground} method twice. */ public final void execute() { getWorkersExecutorService().execute(this); } // Future methods START /** * {@inheritDoc} */ public /*final*/ boolean cancel(boolean mayInterruptIfRunning) { return future.cancel(mayInterruptIfRunning); } /** * {@inheritDoc} */ public final boolean isCancelled() { return future.isCancelled(); } /** * {@inheritDoc} */ public final boolean isDone() { return future.isDone(); } /** * {@inheritDoc} *

* Note: calling {@code get} on the Event Dispatch Thread blocks * all events, including repaints, from being processed until this * {@code SwingWorker} is complete. * *

* When you want the {@code SwingWorker} to block on the Event * Dispatch Thread we recommend that you use a modal dialog. * *

* For example: * *

     * class SwingWorkerCompletionWaiter extends PropertyChangeListener {
     *     private JDialog dialog;
     *
     *     public SwingWorkerCompletionWaiter(JDialog dialog) {
     *         this.dialog = dialog;
     *     }
     *
     *     public void propertyChange(PropertyChangeEvent event) {
     *         if ("state".equals(event.getPropertyName())
     *                 && SwingWorker.StateValue.DONE == event.getNewValue()) {
     *             dialog.setVisible(false);
     *             dialog.dispose();
     *         }
     *     }
     * }
     * JDialog dialog = new JDialog(owner, true);
     * swingWorker.addPropertyChangeListener(
     *     new SwingWorkerCompletionWaiter(dialog));
     * swingWorker.execute();
     * //the dialog will be visible until the SwingWorker is done
     * dialog.setVisible(true);
     * 
*/ public final T get() throws InterruptedException, ExecutionException { return future.get(); } /** * {@inheritDoc} *

* Please refer to {@link #get} for more details. */ public final T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { return future.get(timeout, unit); } // Future methods END // PropertyChangeSupports methods START /** * Adds a {@code PropertyChangeListener} to the listener list. The listener * is registered for all properties. The same listener object may be added * more than once, and will be called as many times as it is added. If * {@code listener} is {@code null}, no exception is thrown and no action is taken. * *

* Note: This is merely a convenience wrapper. All work is delegated to * {@code PropertyChangeSupport} from {@link #getPropertyChangeSupport}. * * @param listener the {@code PropertyChangeListener} to be added */ public final void addPropertyChangeListener(PropertyChangeListener listener) { getPropertyChangeSupport().addPropertyChangeListener(listener); } /** * Removes a {@code PropertyChangeListener} from the listener list. This * removes a {@code PropertyChangeListener} that was registered for all * properties. If {@code listener} was added more than once to the same * event source, it will be notified one less time after being removed. If * {@code listener} is {@code null}, or was never added, no exception is * thrown and no action is taken. * *

* Note: This is merely a convenience wrapper. All work is delegated to * {@code PropertyChangeSupport} from {@link #getPropertyChangeSupport}. * * @param listener the {@code PropertyChangeListener} to be removed */ public final void removePropertyChangeListener(PropertyChangeListener listener) { getPropertyChangeSupport().removePropertyChangeListener(listener); } /** * Reports a bound property update to any registered listeners. No event is * fired if {@code old} and {@code new} are equal and non-null. * *

* This {@code SwingWorker} will be the source for * any generated events. * *

* When called off the Event Dispatch Thread * {@code PropertyChangeListeners} are notified asynchronously on * the Event Dispatch Thread. *

* Note: This is merely a convenience wrapper. All work is delegated to * {@code PropertyChangeSupport} from {@link #getPropertyChangeSupport}. * * * @param propertyName the programmatic name of the property that was * changed * @param oldValue the old value of the property * @param newValue the new value of the property */ public final void firePropertyChange(String propertyName, Object oldValue, Object newValue) { getPropertyChangeSupport().firePropertyChange(propertyName, oldValue, newValue); } /** * Returns the {@code PropertyChangeSupport} for this {@code SwingWorker}. * This method is used when flexible access to bound properties support is * needed. *

* This {@code SwingWorker} will be the source for * any generated events. * *

* Note: The returned {@code PropertyChangeSupport} notifies any * {@code PropertyChangeListener}s asynchronously on the Event Dispatch * Thread in the event that {@code firePropertyChange} or * {@code fireIndexedPropertyChange} are called off the Event Dispatch * Thread. * * @return {@code PropertyChangeSupport} for this {@code SwingWorker} */ public final PropertyChangeSupport getPropertyChangeSupport() { return propertyChangeSupport; } // PropertyChangeSupports methods END /** * Returns the {@code SwingWorker} state bound property. * * @return the current state */ public final StateValue getState() { /* * DONE is a special case * to keep getState and isDone is sync */ if (isDone()) { return StateValue.DONE; } else { return state; } } /** * Sets this {@code SwingWorker} state bound property. * @param the state state to set */ private void setState(StateValue state) { StateValue old = this.state; this.state = state; firePropertyChange("state", old, state); } /** * Invokes {@code done} on the EDT. */ private void doneEDT() { Runnable doDone = new Runnable() { public void run() { done(); } }; if (SwingUtilities.isEventDispatchThread()) { doDone.run(); } else { doSubmit.add(doDone); } } /** * returns workersExecutorService. * * returns the service stored in the appContext or creates it if * necessary. If the last one it triggers autoShutdown thread to * get started. * * @return ExecutorService for the {@code SwingWorkers} * @see #startAutoShutdownThread */ private static synchronized ExecutorService getWorkersExecutorService() { if (executorService == null) { //this creates non-daemon threads. ThreadFactory threadFactory = new ThreadFactory() { final AtomicInteger threadNumber = new AtomicInteger(1); public Thread newThread(final Runnable r) { StringBuilder name = new StringBuilder("SwingWorker-pool-"); name.append(System.identityHashCode(this)); name.append("-thread-"); name.append(threadNumber.getAndIncrement()); Thread t = new Thread(r, name.toString()); if (t.isDaemon()) t.setDaemon(false); if (t.getPriority() != Thread.NORM_PRIORITY) t.setPriority(Thread.NORM_PRIORITY); return t; } }; /* * We want a to have no more than MAX_WORKER_THREADS * running threads. * * We want a worker thread to wait no longer than 1 second * for new tasks before terminating. */ executorService = new ThreadPoolExecutor(0, MAX_WORKER_THREADS, 5L, TimeUnit.SECONDS, new LinkedBlockingQueue(), threadFactory) { private final ReentrantLock pauseLock = new ReentrantLock(); private final Condition unpaused = pauseLock.newCondition(); private boolean isPaused = false; private final ReentrantLock executeLock = new ReentrantLock(); @Override public void execute(Runnable command) { /* * ThreadPoolExecutor first tries to run task * in a corePool. If all threads are busy it * tries to add task to the waiting queue. If it * fails it run task in maximumPool. * * We want corePool to be 0 and * maximumPool to be MAX_WORKER_THREADS * We need to change the order of the execution. * First try corePool then try maximumPool * pool and only then store to the waiting * queue. We can not do that because we would * need access to the private methods. * * Instead we enlarge corePool to * MAX_WORKER_THREADS before the execution and * shrink it back to 0 after. * It does pretty much what we need. * * While we changing the corePoolSize we need * to stop running worker threads from accepting new * tasks. */ //we need atomicity for the execute method. executeLock.lock(); try { pauseLock.lock(); try { isPaused = true; } finally { pauseLock.unlock(); } setCorePoolSize(MAX_WORKER_THREADS); super.execute(command); setCorePoolSize(0); pauseLock.lock(); try { isPaused = false; unpaused.signalAll(); } finally { pauseLock.unlock(); } } finally { executeLock.unlock(); } } @Override protected void afterExecute(Runnable r, Throwable t) { super.afterExecute(r, t); pauseLock.lock(); try { while(isPaused) { unpaused.await(); } } catch(InterruptedException ignore) { } finally { pauseLock.unlock(); } } }; } return executorService; } private static class DoSubmitAccumulativeRunnable extends AccumulativeRunnable implements ActionListener { private final static int DELAY = (int) (1000 / 30); @Override protected void run(List args) { for (Runnable runnable : args) { runnable.run(); } } @Override protected void submit() { Timer timer = new Timer(DELAY, this); timer.setRepeats(false); timer.start(); } public void actionPerformed(ActionEvent event) { run(); } } private class SwingWorkerPropertyChangeSupport extends PropertyChangeSupport { SwingWorkerPropertyChangeSupport(Object source) { super(source); } @Override public void firePropertyChange(final PropertyChangeEvent evt) { if (SwingUtilities.isEventDispatchThread()) { super.firePropertyChange(evt); } else { doSubmit.add( new Runnable() { public void run() { SwingWorkerPropertyChangeSupport.this .firePropertyChange(evt); } }); } } } } antelope-3.5.1.orig/src/ise/library/UserPreferences.java0000644000175000017500000001236310056145552023150 0ustar drazzibdrazzibpackage ise.library; import java.io.*; import java.util.*; import java.util.prefs.*; /** * An implementation of Preferences. There are issues with the default implementation * provided by Java, such as throwing endless exceptions due to invalid assumptions * about file permissions, this implementation does not have those problems. *

* Nodes are named using a / separated naming convention. The preferences are * stored in a tree-like structure, with the root node named "" per the * preferences specification. A node directly below the root node would be * referenced by a / followed by the node name, for example "/node0". Node below * the initial child nodes follow the same convention, so "/node0/child0/kid2" * references a node 3 levels below the root node. *

* To store a value, call one of the various put methods. For example, * to store a username, you might call put("/myapp/userinfo/username", username). * To get the value, call one of the various get methods. For example, * to get the username, you might call get("/myapp/userinfor/username", ""). *

* Nodes are stored in $user.home/.ise_prefs. In this implementation, system nodes * are the same as user nodes. * @author Dale Anson, Jan 2004 */ public class UserPreferences extends AbstractPreferences { private Hashtable root; private Hashtable children; private boolean isRemoved = false; /** * Makes a node with prefs as parent and name as * the name of this node. As per the Preferences spec, if prefs * is null and name is "", this node will be a root node. * @param prefs parent preferences * @param name name for this node */ public UserPreferences( UserPreferences prefs, String name ) { super( prefs, name ); root = new Hashtable(); children = new Hashtable(); try { sync(); } catch ( Exception e ) { e.printStackTrace(); } } protected void putSpi( String key, String value ) { root.put( key, value ); } protected String getSpi( String key ) { return ( String ) root.get( key ); } protected void removeSpi( String key ) { root.remove( key ); } protected void removeNodeSpi() throws BackingStoreException { isRemoved = true; } protected String[] keysSpi() throws BackingStoreException { return ( String[] ) root.keySet().toArray( new String[] {} ); } protected String[] childrenNamesSpi() throws BackingStoreException { return ( String[] ) children.keySet().toArray( new String[] {} ); } protected AbstractPreferences childSpi( String name ) { UserPreferences child = ( UserPreferences ) children.get( name ); if ( child == null || child.isRemoved() ) { try { child = new UserPreferences( this, name ); children.put( name, child ); } catch ( Exception e ) { e.printStackTrace(); child = null; } } return child; } /** * Returns the directory in which this node stores values, creating the directory * and its parents if necessary. * @return the directory in which this node stores values. */ protected File getDirectory() { try { String name = name(); if ( name == null || name.equals( "" ) ) name = "root"; File dir; if ( parent() == null ) dir = UserPreferencesFactory.PREFS_ROOT; else dir = ( ( UserPreferences ) parent() ).getDirectory(); File my_dir = new File( dir, name ); my_dir.mkdirs(); return my_dir; } catch ( Exception e ) { //e.printStackTrace(); return null; } } protected void syncSpi() throws BackingStoreException { // no-op } public void sync() throws BackingStoreException { try { if ( isRemoved() ) { parent().sync(); return ; } if ( root == null ) { root = new Hashtable(); } File f = new File( getDirectory(), "prefs" ); if ( !f.exists() ) return ; ObjectInputStream decoder = new ObjectInputStream( new FileInputStream( f ) ); Hashtable map = ( Hashtable ) decoder.readObject(); decoder.close(); root.putAll( map ); } catch ( Exception e ) { //e.printStackTrace(); } } public void flushSpi() throws BackingStoreException { try { if ( root == null || root.size() == 0 ) { return ; } if ( isRemoved() ) { parent().flush(); return ; } File dir = getDirectory(); if ( dir == null ) throw new BackingStoreException( "Can't open directory." ); File f = new File( dir, "prefs" ); ObjectOutputStream encoder = new ObjectOutputStream( new FileOutputStream( f ) ); encoder.writeObject( root ); encoder.close(); } catch ( BackingStoreException bse ) { throw bse; } catch ( Exception e ) { // ignore } } protected boolean isRemoved() { return isRemoved; } } antelope-3.5.1.orig/src/ise/library/Finder.java0000644000175000017500000000425410337347414021262 0ustar drazzibdrazzibpackage ise.library; import javax.swing.text.JTextComponent; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.util.regex.*; /** * Action to do a find in a text component. Does regular expression searching. * @author Dale Anson */ public class Finder implements ActionListener { private JTextComponent _to_find; private JTextComponent _textarea; private boolean _from_caret; private boolean _wrap; /** * Will search for look_for.getText() in look_in. * If found, will select the found text. * @param look_for a text component that contains some text to look for. The * text may be any string acceptable to java.util.Matcher. * @param look_in the text component in which to find the look_for text. * @param from_caret if true, find from current caret position, otherwise, * from start of document. * @param wrap if true, wrap searching to top of document. */ public Finder(JTextComponent look_for, JTextComponent look_in, boolean from_caret, boolean wrap) { _to_find = look_for; _textarea = look_in; _from_caret = from_caret; _wrap = wrap; } public void actionPerformed( ActionEvent ae ) { String text_to_find = _to_find.getText(); if ( text_to_find == null || text_to_find.length() == 0 ) { return ; } try { String doc = _textarea.getDocument().getText(0, _textarea.getDocument().getLength()); Pattern pattern = Pattern.compile( text_to_find, Pattern.DOTALL ); Matcher matcher = pattern.matcher( doc ); int find_from = _from_caret ? _textarea.getCaretPosition() : 0; if (!matcher.find(find_from) && _wrap) find_from = 0; if ( matcher.find(find_from) ) { int start = matcher.start(); int end = matcher.end(); String found = doc.substring( start, end ); _textarea.setCaretPosition( start ); _textarea.select( start, end ); } } catch ( Exception e ) { e.printStackTrace(); } } } antelope-3.5.1.orig/src/ise/library/KappaLayout.java0000644000175000017500000013440010116145560022273 0ustar drazzibdrazzib// $Id: KappaLayout.java 111 2004-09-04 03:52:16Z danson $ package ise.library; import java.awt.LayoutManager2; import java.awt.Component; import java.awt.Container; import java.awt.Dimension; import java.awt.Insets; import java.awt.Point; import java.awt.Graphics; import java.awt.Color; import java.io.Serializable; import java.util.BitSet; import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; /** * KappaLayout, a Java layout manager.
* Copyright (C) 2000, Dale Anson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*

* KappaLayout -- similar to others, but this one's simpler and easier to use.
* Example use:
* This will put a button on a panel in the top of its cell, stretched to * fill the cell width, with a 3 pixel pad:
* * Panel p = new Panel(new KappaLayout()); * Button b = new Button("OK"); * p.add(b, "0, 0, 1, 2, 2, w, 3"); * *
* The constraints string has this layout:
* "x, y, w, h, a, s, p"
* defined as follows:
*

    *
  • 'x' is the column to put the component, default is 0
    *
  • 'y' is the row to put the component, default is 0
    *
  • 'w' is the width of the component in columns (column span), default is 1. * Can also be R or r, which means the component will span the remaining cells * in the row.
    *
  • 'h' is the height of the component in rows (row span), default is 1. * Can also be R or r, which means the component will span the remaining cells * in the column.
    *
  • 'a' is the alignment within the cell. 'a' can be a value between 0 and 8, * inclusive, (default is 0) and causes the alignment of the component within the cell to follow * this pattern:
    * 8 1 2
    * 7 0 3
    * 6 5 4
    , or
    * 0 horizontal center, vertical center,
    * 1 horizontal center, vertical top,
    * 2 horizontal right, vertical top,
    * 3 horizontal right, vertical center,
    * 4 horizontal right, vertical bottom,
    * 5 horizontal center, vertical bottom,
    * 6 horizontal left, vertical bottom,
    * 7 horizontal left, vertical center,
    * 8 horizontal left, vertical top.
    *

    * By popular request, the alignment constraint can also be represented as:
    * NW N NE
    *  W 0 E
    * SW S SE
    * which are compass directions for alignment within the cell. *

  • 's' is the stretch value. 's' can have these values:
    * 'w' stretch to fill cell width
    * 'h' stretch to fill cell height
    * 'wh' or 'hw' stretch to fill both cell width and cell height
    * '0' (character 'zero') no stretch (default) *
  • 'p' is the amount of padding to put around the component. This much blank * space will be applied on all sides of the component, default is 0. *
* Parameters may be omitted (default values will be used), e.g., * p.add(new Button("OK), "1,4,,,w,");
* which means put the button at column 1, row 4, default 1 column wide, default * 1 row tall, stretch to fit width of column, no padding.
* Spaces in the parameter string are ignored, so these are identical:
* p.add(new Button("OK), "1,4,,,w,");
* p.add(new Button("OK), " 1, 4, , , w");

* Rather than use a constraints string, a Constraints object may be used * directly, similar to how GridBag uses a GridBagConstraint. E.g,
* * Panel p = new Panel();
* KappaLayout tl = new KappaLayout();
* p.setLayout(tl);
* KappaLayout.Constraints con = tl.getConstraint();
* con.x = 1;
* con.y = 2;
* con.w = 2;
* con.h = 2;
* con.s = "wh";
* panel.add(new Button("OK"), con);
* con.x = 3;
* panel.add(new Button("Cancel"), con);
*

* Note that the same Constraints can be reused, thereby reducing the number of * objects created.

* @author Dale Anson * @version $Revision: 111 $ */ public class KappaLayout implements LayoutManager2, Serializable { // overall preferred width of components in container protected int _preferred_width = 0; // overall preferred height of components in container protected int _preferred_height = 0; protected boolean _size_unknown = true; protected int _col_count = 0; // number of columns in the layout protected int _row_count = 0; // number of rows in the layout // storage for component constraints // key is the component, value is a Constraints protected Hashtable _constraints = new Hashtable(); // model of the table -- key is a Point with Point.x // representing the column, Point.y representing the row. As most layouts // are sparse, this is an efficient way to represent the table without // creating excess objects. The value is the dimension of the component. protected Hashtable _table = null; // a Dimension with no width and no height, used repeatedly to represent // empty cells. protected Dimension _0dim = new Dimension( 0, 0 ); // model of the component layout in the table -- key is a Point with Point.x // representing the column, Point.y representing the row. The value is a // reference to the component. protected Hashtable _components = null; // in both _col_widths and _row_heights, if the number is negative, the column or // row will be treated as having a fixed width or height. During layout, the negative // numbers will be treated as positive numbers -- negative width and negative height // being meaningless concepts. protected int[] _col_widths; // stores a width per column which is the widest preferred width of components in each column protected int[] _row_heights; // stores a height per row which is the tallest preferred height of components in each row // storage for columns and rows that want to be the same size. Each element // in these vectors is an int[], with each item in the array being a column // or row number. protected Vector _same_width_cols; protected Vector _same_height_rows; // if true, spread extra space equally between components in both directions, // doesn't stretch the components, just the space between them protected boolean _stretch = false; // by user request, the following are alternate compass directions for // the alignment constraint. Center is still 0. /** * For alignment constraint (a), align component to North in cell. */ public static final int N = 1; // north /** * For alignment constraint (a), align component to NorthEast in cell. */ public static final int NE = 2; // northeast /** * For alignment constraint (a), align component to East in cell. */ public static final int E = 3; // east /** * For alignment constraint (a), align component to SouthEast in cell. */ public static final int SE = 4; // southeast /** * For alignment constraint (a), align component to South in cell. */ public static final int S = 5; // south /** * For alignment constraint (a), align component to SouthWest in cell. */ public static final int SW = 6; // southwest /** * For alignment constraint (a), align component to West in cell. */ public static final int W = 7; // west /** * For alignment constraint (a), align component to NorthWest in cell. */ public static final int NW = 8; // northwest /** * Convenience setting for width (w) or height (h), causes component to use * Remaining cells. */ public static final int R = Integer.MAX_VALUE; /** * Default constructor, no stretching. */ public KappaLayout() { this( false ); } /** * Constructor, allows stretching. * @param s if true, stretches layout to fill container by adding extra space * between components, does not stretch the components, just the space between them. */ public KappaLayout( boolean s ) { _stretch = s; } /** * Useful for debugging a layout. Call after components are showing to make * sure all data is available. * @return a String with lots of useful info about the layout. */ public String toString() { StringBuffer sb = new StringBuffer(); sb.append( "-------------------------------\n" ); sb.append( getClass().getName() + ":\n" ); sb.append( "columns=" + _col_count ); sb.append( ", rows=" + _row_count ); sb.append( ", cells=" + ( _col_count * _row_count ) + "\n" ); sb.append( "preferred width=" + _preferred_width ); sb.append( ", preferred height=" + _preferred_height + "\n" ); if ( _col_widths != null ) { sb.append( "column widths (left to right):" ); for ( int i = 0; i < _col_widths.length; i++ ) sb.append( _col_widths[ i ] + "," ); } if ( _row_heights != null ) { sb.append( "\nrow heights (top to bottom):" ); for ( int i = 0; i < _row_heights.length; i++ ) sb.append( _row_heights[ i ] + "," ); } if ( _constraints != null ) { sb.append( "\ncomponent count=" + _constraints.size() ); sb.append( "\ncomponents (no order):\n" ); Enumeration en = _constraints.keys(); while ( en.hasMoreElements() ) sb.append( en.nextElement() + "\n" ); } sb.append( "-------------------------------\n" ); return sb.toString(); } /** * Required by LayoutManager, simply calls addLayoutComponent(Component, Object). */ public void addLayoutComponent( String n, Component c ) { addLayoutComponent( c, n ); } /** * Required by LayoutManager. */ public void removeLayoutComponent( Component c ) { if (c == null) return; synchronized ( c.getTreeLock() ) { if ( _constraints != null ) { _constraints.remove( c ); if (_components == null) return; Enumeration keys = _components.keys(); while(keys.hasMoreElements()) { Object key = keys.nextElement(); Object value = _constraints.get(key); if (value == null) continue; if (value.equals(c)) { _components.remove(key); break; } } keys = _table.keys(); while(keys.hasMoreElements()) { Object key = keys.nextElement(); Object value = _constraints.get(key); if (value == null) continue; if (value.equals(c)) { _table.remove(key); break; } } _size_unknown = true; calculateDimensions(); } } } /** * Required by LayoutManager. */ public Dimension preferredLayoutSize( Container parent ) { synchronized ( parent.getTreeLock() ) { Dimension dim = new Dimension( 0, 0 ); _size_unknown = true; calculateDimensions(); Insets insets = parent.getInsets(); dim.width = _preferred_width + insets.left + insets.right; dim.height = _preferred_height + insets.top + insets.bottom; return dim; } } /** * Required by LayoutManager. * @return preferredLayoutSize(parent) */ public Dimension minimumLayoutSize( Container parent ) { synchronized ( parent.getTreeLock() ) { return preferredLayoutSize( parent ); } } /** * Required by LayoutManager, does all the real layout work. */ public void layoutContainer( Container parent ) { synchronized ( parent.getTreeLock() ) { Insets insets = parent.getInsets(); int max_width = parent.getSize().width - ( insets.left + insets.right ); int max_height = parent.getSize().height - ( insets.top + insets.bottom ); int x = insets.left; // x and y location to put component in pixels int y = insets.top; int xfill = 0; // how much extra space to put between components int yfill = 0; // when stretching to fill entire container // make sure preferred size is known, a side effect is that countColumns // and countRows are automatically called. calculateDimensions(); // if necessary, calculate the amount of padding to add between the // components to fill the container if ( _stretch ) { if ( max_width > _preferred_width && _col_count > 1 ) { xfill = ( max_width - _preferred_width ) / ( _col_count - 1 ); } if ( max_height > _preferred_height && _row_count > 1 ) { yfill = ( max_height - _preferred_height ) / ( _row_count - 1 ); } } // do the layout. Components are handled by columns, top to bottom, // left to right. i is current column, j is current row. Point cell = new Point(); for ( int i = 0; i < _col_count; i++ ) { cell.x = i; y = insets.top; if ( i > 0 ) { x += Math.abs( _col_widths[ i - 1 ] ); if ( _stretch && i < _col_count ) { x += xfill; } } for ( int j = 0; j < _row_count; j++ ) { cell.y = j; if ( j > 0 ) { y += Math.abs( _row_heights[ j - 1 ] ); if ( _stretch && j < _row_count ) { y += yfill; } } Component c = ( Component ) _components.get( cell ); if ( c != null && c.isVisible() ) { Dimension d = c.getPreferredSize(); Constraints q = ( Constraints ) _constraints.get( c ); // calculate width of spanned columns int sum_cols = 0; if ( q.w == R ) { for ( int n = i; n < _col_count; n++ ) { sum_cols += Math.abs( _col_widths[ n ] ); } } else { for ( int n = i; n < i + q.w; n++ ) { sum_cols += Math.abs( _col_widths[ n ] ); } } // calculate height of spanned rows int sum_rows = 0; if ( q.h == R ) { for ( int n = i; n < _row_count; n++ ) { sum_rows += Math.abs( _row_heights[ n ] ); } } else { for ( int n = j; n < j + q.h; n++ ) { sum_rows += Math.abs( _row_heights[ n ] ); } } // stretch and pad if required if ( q.s.indexOf( "w" ) != -1 ) { d.width = sum_cols - q.p * 2; } if ( q.s.indexOf( "h" ) != -1 ) { d.height = sum_rows - q.p * 2; } // calculate adjustment int x_adj = sum_cols - d.width; // max amount to put component at right edge of spanned cell(s) int y_adj = sum_rows - d.height; // max amount to put component at bottom edge of spanned cell(s) // in each case, add the correction for the cell, then subtract // the correction after applying it. This prevents the corrections // from improperly accumulating across cells. Padding must be handled // explicitly for each case. // Alignment follows this pattern within the spanned cells: // 8 1 2 new pattern: NW N NE // 7 0 3 W 0 E // 6 5 4 SW S SE switch ( q.a ) { case N: // top center x += x_adj / 2 ; y += q.p; c.setBounds( x, y, d.width, d.height ); x -= x_adj / 2; y -= q.p; break; case NE: // top right x += x_adj - q.p; y += q.p; c.setBounds( x, y, d.width, d.height ); x -= x_adj - q.p; y -= q.p; break; case E: // center right x += x_adj - q.p; y += y_adj / 2; c.setBounds( x, y, d.width, d.height ); x -= x_adj - q.p; y -= y_adj / 2; break; case SE: // bottom right x += x_adj - q.p; y += y_adj - q.p; c.setBounds( x, y, d.width, d.height ); x -= x_adj - q.p; y -= y_adj - q.p; break; case S: // bottom center x += x_adj / 2; y += y_adj - q.p; c.setBounds( x, y, d.width, d.height ); x -= x_adj / 2; y -= y_adj - q.p; break; case SW: // bottom left x += q.p; y += y_adj - q.p; c.setBounds( x, y, d.width, d.height ); x -= q.p; y -= y_adj - q.p; break; case W: // center left x += q.p; y += y_adj / 2; c.setBounds( x, y, d.width, d.height ); x -= q.p; y -= y_adj / 2; break; case NW: // top left x += q.p; y += q.p; c.setBounds( x, y, d.width, d.height ); x -= q.p; y -= q.p; break; case 0: // dead center default: x += x_adj / 2; y += y_adj / 2; c.setBounds( x, y, d.width, d.height ); x -= x_adj / 2; y -= y_adj / 2; break; } } } } } } /** * Required by LayoutManager2. Will NOT add component if either component or * constraints are null, or if constraints is not a String or * Kappa/LambdaLayout.Constraint. */ public void addLayoutComponent( Component comp, Object constraint ) { synchronized ( comp.getTreeLock() ) { if ( comp == null ) { throw new IllegalArgumentException( "No component." ); } if ( constraint == null ) { throw new IllegalArgumentException( "No constraint." ); } if ( constraint instanceof Constraints ) { // clone and store a Constraint so user can reuse his original Constraints q = ( Constraints ) constraint; _constraints.put( comp, q.clone() ); // if component is a rigid strut, set the column and/or row size if ( comp instanceof Strut ) { Strut strut = ( Strut ) comp; if ( strut.isRigid() ) { Dimension d = strut.getSize(); if ( d.width > 0 ) { setColumnWidth( q.x, d.width ); } if ( d.height > 0 ) { setRowHeight( q.y, d.height ); } } } _size_unknown = true; // that's all that needs to be done for this case (Constraint and // Component), so return now return ; } // already dealt with Constraint, so check for constraint // String, if not a String, bail out if ( !( constraint instanceof String ) ) throw new IllegalArgumentException( "Illegal constraint object." ); // parse constraint string into tokens. There may be as few as 0 tokens, // or as many as 7. Vector tokens = new Vector(); String token; String c = constraint.toString(); while ( c.length() > 0 ) { int comma = c.indexOf( ',' ); // find a token if ( comma != -1 ) { token = c.substring( 0, comma ); c = c.substring( comma + 1 ); } else { token = c; c = ""; } // clean it up if ( token != null ) token = token.trim(); // if there's something left, store it, otherwise, mark missing // token with -1 (example of constraint string with missing tokens: // "1,1,,,,w", width, height, alignment are missing) if ( token != null && token.length() > 0 ) tokens.addElement( token ); else tokens.addElement( "-1" ); } // turn tokens into a Constraints. Default Constraints values are used // for missing or non-specified values Constraints q = new Constraints(); Enumeration en = tokens.elements(); // get column if ( en.hasMoreElements() ) { token = en.nextElement().toString(); try { q.x = Integer.parseInt( token ); if ( q.x < 0 ) q.x = 0; } catch ( Exception e ) { q.x = 0; } } // get row if ( en.hasMoreElements() ) { token = en.nextElement().toString(); try { q.y = Integer.parseInt( token ); if ( q.y < 0 ) q.y = 0; } catch ( Exception e ) { q.y = 0; } } // get column span (width) if ( en.hasMoreElements() ) { token = en.nextElement().toString(); if ( token.equalsIgnoreCase( "R" ) ) { q.w = R; } else { try { q.w = Integer.parseInt( token ); if ( q.w < 1 ) q.w = 1; } catch ( Exception e ) { q.w = 1; } } } // get row span (height) if ( en.hasMoreElements() ) { token = en.nextElement().toString(); if ( token.equalsIgnoreCase( "R" ) ) { q.h = R; } else { try { q.h = Integer.parseInt( token ); if ( q.h < 1 ) q.h = 1; } catch ( Exception e ) { q.h = 1; } } } // get alignment if ( en.hasMoreElements() ) { token = en.nextElement().toString().trim(); if ( token.equalsIgnoreCase( "N" ) || token.equals( "1" ) ) q.a = N; else if ( token.equalsIgnoreCase( "NE" ) || token.equals( "2" ) ) q.a = NE; else if ( token.equalsIgnoreCase( "E" ) || token.equals( "3" ) ) q.a = E; else if ( token.equalsIgnoreCase( "SE" ) || token.equals( "4" ) ) q.a = SE; else if ( token.equalsIgnoreCase( "S" ) || token.equals( "5" ) ) q.a = S; else if ( token.equalsIgnoreCase( "SW" ) || token.equals( "6" ) ) q.a = SW; else if ( token.equalsIgnoreCase( "W" ) || token.equals( "7" ) ) q.a = W; else if ( token.equalsIgnoreCase( "NW" ) || token.equals( "8" ) ) q.a = NW; else q.a = 0; } // get component stretch if ( en.hasMoreElements() ) { token = en.nextElement().toString().trim().toLowerCase(); if ( token.equals( "w" ) || token.equals( "h" ) || token.equals( "wh" ) || token.equals( "hw" ) ) { q.s = token; } else q.s = "0"; } // get component padding if ( en.hasMoreElements() ) { token = en.nextElement().toString(); try { q.p = Integer.parseInt( token ); if ( q.p < 0 ) q.p = 0; } catch ( Exception e ) { q.p = 0; } } // save the component and its constraints for later use _constraints.put( comp, q ); // if component is a rigid strut, set the column and/or row size if ( comp instanceof Strut ) { Strut strut = ( Strut ) comp; if ( strut.isRigid() ) { Dimension d = strut.getSize(); if ( d.width > 0 ) { setColumnWidth( q.x, d.width ); } if ( d.height > 0 ) { setRowHeight( q.y, d.height ); } } } _size_unknown = true; } } /** * Required by LayoutManager2. * @return preferredLayoutSize(parent) */ public Dimension maximumLayoutSize( Container c ) { synchronized ( c.getTreeLock() ) { return preferredLayoutSize( c ); } } /** * Required by LayoutManager2. * @return 0.5f */ public float getLayoutAlignmentX( Container c ) { return 0.5f; // default to centered. } /** * Required by LayoutManager2. * @return 0.5f */ public float getLayoutAlignmentY( Container c ) { return 0.5f; // default to centered. } /** * Required by LayoutManager2. */ public void invalidateLayout( Container c ) { /* I would think this is the right thing to do, but doing this causes the layout to be wrong every time. Also causes the stretch option to fail. _size_unknown = true; */ } /** * Calculate preferred size and other dimensions. */ protected void calculateDimensions() { if ( !_size_unknown ) return ; _preferred_width = 0; _preferred_height = 0; Dimension dim = null; // count columns and rows countColumns(); countRows(); // set up table and component maps if ( _table == null ) _table = new Hashtable( 23, 0.75f ); else _table.clear(); if ( _components == null ) _components = new Hashtable( 23, 0.75f ); else _components.clear(); // set up storage for max col width and max row height. These arrays // have an entry per column and row and will hold the largest width or // height of components in each column or row respectively. int[] temp; if ( _col_widths != null ) { // if column count has changed, need to preserve existing column widths // in case one or more remaining columns has been set to a fixed width. temp = new int[ _col_widths.length ]; System.arraycopy( _col_widths, 0, temp, 0, _col_widths.length ); _col_widths = new int[ _col_count ]; System.arraycopy( temp, 0, _col_widths, 0, Math.min( temp.length, _col_widths.length ) ); } else { _col_widths = new int[ _col_count ]; } if ( _row_heights != null ) { // if row count has changed, need to preserve existing row heights // in case one or more remaining rows has been set to a fixed height. temp = new int[ _row_heights.length ]; System.arraycopy( _row_heights, 0, temp, 0, _row_heights.length ); _row_heights = new int[ _row_count ]; System.arraycopy( temp, 0, _row_heights, 0, Math.min( temp.length, _row_heights.length ) ); } else { _row_heights = new int[ _row_count ]; } // get the constraints Enumeration en = _constraints.keys(); while ( en.hasMoreElements() ) { Component c = ( Component ) en.nextElement(); Constraints q = ( Constraints ) _constraints.get( c ); if ( q.w == R ) q.w = _col_count - q.x; if ( q.h == R ) q.h = _row_count - q.y; // store the component in its (x, y) location _components.put( new Point( q.x, q.y ), c ); // as components can span columns and rows, store the maximum dimension // of the component that could be in the spanned cells. Note that it // may happen that none of the component is actually in the cell. dim = new Dimension(c.getPreferredSize().width, c.getPreferredSize().height); dim.width += q.p * 2; // adjust for padding if necessary dim.height += q.p * 2; dim.width /= q.w; dim.height /= q.h; for ( int i = q.x; i < q.x + q.w; i++ ) { for ( int j = q.y; j < q.y + q.h; j++ ) { _table.put( new Point( i, j ), dim ); } } } // calculate preferred width int col_width = 0; for ( int i = 0; i < _col_count; i++ ) { for ( int j = 0; j < _row_count; j++ ) { Dimension p = ( Dimension ) _table.get( new Point( i, j ) ); if ( p == null ) p = _0dim; col_width = Math.max( p.width, col_width ); } // store max width of each column if ( _col_widths[ i ] >= 0 ) { _col_widths[ i ] = col_width; _preferred_width += col_width; } else { _preferred_width += Math.abs( _col_widths[ i ] ); } col_width = 0; } // adjust for same width columns if ( _same_width_cols != null ) { en = _same_width_cols.elements(); while ( en.hasMoreElements() ) { int[] same = ( int[] ) en.nextElement(); // find widest column of this group int widest = same[ 0 ]; for ( int i = 0; i < same.length; i++ ) { if ( same[ i ] < _col_widths.length ) widest = Math.max( widest, _col_widths[ same[ i ] ] ); } // now set all columns to this widest width for ( int i = 0; i < same.length; i++ ) { if ( same[ i ] < _col_widths.length ) { _preferred_width += widest - _col_widths[ same[ i ] ]; _col_widths[ same[ i ] ] = widest; } } } } // calculate preferred height int row_height = 0; for ( int j = 0; j < _row_count; j++ ) { for ( int i = 0; i < _col_count; i++ ) { Dimension p = ( Dimension ) _table.get( new Point( i, j ) ); if ( p == null ) p = _0dim; row_height = Math.max( p.height, row_height ); } // store max height of each row if ( _row_heights[ j ] >= 0 ) { _row_heights[ j ] = row_height; _preferred_height += row_height; } else { _preferred_height += Math.abs( _row_heights[ j ] ); } row_height = 0; } // adjust for same height rows if ( _same_height_rows != null ) { en = _same_height_rows.elements(); while ( en.hasMoreElements() ) { int[] same = ( int[] ) en.nextElement(); // find tallest row of this group int tallest = same[ 0 ]; for ( int i = 0; i < same.length; i++ ) { if ( same[ i ] < _row_heights.length ) tallest = Math.max( tallest, _row_heights[ same[ i ] ] ); } // now set all rows to this tallest height for ( int i = 0; i < same.length; i++ ) { if ( same[ i ] < _row_heights.length ) { _preferred_height += tallest - _row_heights[ same[ i ] ]; _row_heights[ same[ i ] ] = tallest; } } } } _size_unknown = false; } /** * Calculate number of columns in table. */ private void countColumns() { _col_count = 0; Hashtable rows = new Hashtable(); // get the constraints Enumeration en = _constraints.elements(); while ( en.hasMoreElements() ) { Constraints q = ( Constraints ) en.nextElement(); // figure out which columns this component spans. The BitSet represents // a row, and for each non-empty column in the row, a bit is set. The // BitSets representing each row are stored in the 'rows' Hashtable. BitSet row = null; String y = String.valueOf( q.y ); if ( !rows.containsKey( y ) ) { row = new BitSet(); rows.put( y, row ); } row = ( BitSet ) rows.get( y ); int last_col = ( q.w == R ? q.x + 1 : q.x + q.w ); for ( int i = q.x; i < last_col; i++ ) row.set( i ); } // calculate the number of columns by going through each BitSet and // counting the number of set bits. The highest bit is the number of // columns. en = rows.elements(); while ( en.hasMoreElements() ) { BitSet row = ( BitSet ) en.nextElement(); for ( int i = 0; i < row.size(); i++ ) { if ( row.get( i ) ) _col_count = Math.max( _col_count, i + 1 ); // add 1 as column index is 0-based } } } /** * Calculate number of rows in table. */ private void countRows() { // this is done exactly in the same manner as countColumns, see the comments // there for details on the counting algorithm _row_count = 0; Hashtable cols = new Hashtable(); Enumeration en = _constraints.elements(); while ( en.hasMoreElements() ) { Constraints q = ( Constraints ) en.nextElement(); BitSet col = null; String x = String.valueOf( q.x ); if ( !cols.containsKey( x ) ) { col = new BitSet(); cols.put( x, col ); } col = ( BitSet ) cols.get( x ); int last_row = ( q.h == R ? q.y + 1 : q.y + q.h ); for ( int i = q.y; i < last_row; i++ ) { col.set( i ); } } en = cols.elements(); while ( en.hasMoreElements() ) { BitSet col = ( BitSet ) en.nextElement(); for ( int i = 0; i < col.size(); i++ ) { if ( col.get( i ) ) { _row_count = Math.max( _row_count, i + 1 ); } } } } /** * Makes two columns be the same width. The actual width will be the larger * of the preferred widths of these columns. * @param column1 column number * @param column2 column number */ public void makeColumnsSameWidth( int column1, int column2 ) { makeColumnsSameWidth( new int[] {column1, column2} ); } /** * Makes several columns be the same width. The actual width will be the largest * preferred width of these columns. * @param columns array of column numbers to make the same width. */ public void makeColumnsSameWidth( int[] columns ) { if ( columns.length <= 1 ) return ; for ( int i = 0; i < columns.length; i++ ) { if ( columns[ i ] < 0 ) throw new IllegalArgumentException( "Column parameter must be greater than 0." ); } if ( _same_width_cols == null ) _same_width_cols = new Vector(); _same_width_cols.addElement( columns ); _size_unknown = true; } /** * Makes all columns be the same width. The actual width will be the largest * preferred width of these columns. */ public void makeColumnsSameWidth() { countColumns(); int[] columns = new int[ _col_count ]; for ( int i = 0; i < _col_count; i++ ) { columns[ i ] = i; } makeColumnsSameWidth( columns ); } /** * Makes two rows be the same height. The actual height will be the larger * of the preferred heights of these rows. * @param row1 row number * @param row2 row number */ public void makeRowsSameHeight( int row1, int row2 ) { makeRowsSameHeight( new int[] {row1, row2} ); } /** * Makes several rows be the same height. The actual height will be the largest * preferred height of these rows. * @param rows array of row numbers to make the same height. */ public void makeRowsSameHeight( int[] rows ) { if ( rows.length <= 1 ) return ; for ( int i = 0; i < rows.length; i++ ) { if ( rows[ i ] < 0 ) throw new IllegalArgumentException( "Row parameter must be greater than 0." ); } if ( _same_height_rows == null ) // laziness pays off now _same_height_rows = new Vector(); _same_height_rows.addElement( rows ); _size_unknown = true; } /** * Makes all rows be the same height. The actual height will be the largest * preferred height of these rows. */ public void makeRowsSameHeight() { countRows(); int[] rows = new int[ _row_count ]; for ( int i = 0; i < rows.length; i++ ) { rows[ i ] = i; } makeRowsSameHeight( rows ); } /** * Sets a column to a specific width. Use care with this method, components * wider than the set width will be truncated. * @param column column number * @param width width in pixels */ public void setColumnWidth( int column, int width ) { if ( column < 0 ) throw new IllegalArgumentException( "Column must be >= 0." ); if ( _col_widths == null ) _col_widths = new int[ column + 1 ]; if ( _col_widths.length <= column ) { int[] tmp = new int[ _col_widths.length ]; System.arraycopy( _col_widths, 0, tmp, 0, _col_widths.length ); _col_widths = new int[ column + 1 ]; System.arraycopy( tmp, 0, _col_widths, 0, tmp.length ); } // store fixed width columns as a negative number _col_widths[ column ] = -1 * width; _size_unknown = true; } /** * Sets a row to a specific height. Use care with this method, components * taller than the set height will be truncated. * @param row row number * @param height height in pixels */ public void setRowHeight( int row, int height ) { if ( row < 0 ) throw new IllegalArgumentException( "Row must be >= 0." ); if ( _row_heights == null ) _row_heights = new int[ row + 1 ]; if ( _row_heights.length <= row ) { int[] tmp = new int[ _row_heights.length ]; System.arraycopy( _row_heights, 0, tmp, 0, _row_heights.length ); _row_heights = new int[ row + 1 ]; System.arraycopy( tmp, 0, _row_heights, 0, tmp.length ); } // store fixed height rows as a negative number _row_heights[ row ] = -1 * height; _size_unknown = true; } /** * Creates a Constraints for direct manipulation. * @return a Constraints object for direct manipulation. */ public static Constraints createConstraint() { return new Constraints(); } /** * Useful for holding an otherwise empty column to a minimum width. * @param desired width of component * @return a component with some width but no height */ public static Component createHorizontalStrut( int width ) { return new Strut( width, 0 ); } /** * Useful for holding a column to a fixed width. * @param desired width of component * @return a component with some width but no height */ public static Component createHorizontalStrut( int width, boolean rigid ) { return new Strut( width, 0, rigid ); } /** * Useful for holding an otherwise empty row to a minimum height. * @param desired height of component * @return a component with some height but no width */ public static Component createVerticalStrut( int height ) { return new Strut( 0, height ); } /** * Useful for holding a row to a fixed height. * @param desired height of component * @return a component with some height but no width */ public static Component createVerticalStrut( int height, boolean rigid ) { return new Strut( 0, height, rigid ); } /** * Useful for setting an otherwise blank cell to a minimum width and height. * @param width desired width of component * @param height desired height of component * @return a component with some height and width */ public static Component createStrut( int width, int height ) { return new Strut( width, height ); } /** * Useful for setting a row and column to a fixed width and height. * @param width desired width of component * @param height desired height of component * @return a component with some height and width */ public static Component createStrut( int width, int height, boolean rigid ) { return new Strut( width, height, rigid ); } /** * Simple component that is invisible. Struts can be either rigid or non- * rigid. While this component could be used with other layout managers, * it special properties are intended for use with KappaLayout. In particular, * when the strut is set to rigid, it will lock the column or row (depends on * the orientation of the strut) to the width or height of the strut. A non- * rigid strut sets a minimum width or height on a column or row, but does * not set a maximum like a rigid strut does. */ public static class Strut extends Component implements Serializable { private Dimension _dim; private boolean _rigid; /** * @param w width * @param h height */ public Strut( int w, int h ) { this( w, h, false ); } /** * @param w width * @param h height * @param rigid rigid */ public Strut( int w, int h, boolean rigid ) { _dim = new Dimension( w, h ); _rigid = rigid; } /** * Overrides getPreferredSize from Component. */ public Dimension getPreferredSize() { return _dim; } /** * Overrides getSize from Component. */ public Dimension getSize() { return _dim; } /** * @returns true if this strut is rigid. */ public boolean isRigid() { return _rigid; } /** * @param rigid if true, this strut will act as a rigid strut */ public void setRigid( boolean rigid ) { _rigid = rigid; } } /** * This class is cloneable so that users may create and reuse a Constraints object * similar to how one would use a GridBagConstraints rather than the string parameters. */ public static class Constraints extends Object implements Cloneable, Serializable { /** * start column */ public int x = 0; /** * start row */ public int y = 0; /** * # columns wide */ public int w = 1; /** * # rows high */ public int h = 1; /** * alignment within cell, see comments in KappaLayout */ public int a = 0; /** * stretch: default is 0 (character zero, no stretch), w = width of cell, h = height of cell, wh = both width and height */ public String s = "0"; /** * padding, same amount of blank space on all four sides of component */ public int p = 0; /** * Plain String representation of this Constraints, suitable for using as a * constraints string if needed. */ public String toString() { StringBuffer sb = new StringBuffer(); sb.append( String.valueOf( x ) + "," ) .append( String.valueOf( y ) + "," ) .append( String.valueOf( w ) + "," ); if ( w == R ) sb.append( "R," ); else sb.append( String.valueOf( w ) + "," ); if ( h == R ) sb.append( "R," ); else sb.append( String.valueOf( h ) + "," ); sb.append( String.valueOf( a ) + "," ) .append( String.valueOf( s ) + "," ) .append( String.valueOf( p ) ) .toString(); return sb.toString(); } /** * @return a clone of this object. */ public Object clone() { try { return super.clone(); } catch ( Exception e ) { return null; } } } /* public Component getDebugPanel() { java.awt.Panel p = new java.awt.Panel() { public Dimension getPreferredSize() { int width = 0; for ( int i = 0; i < _col_widths.length; i++ ) { width += Math.abs(_col_widths[i]); } int height = 0; for ( int i = 0; i < _row_heights.length; i++ ) { height += Math.abs(_row_heights[i]); } return new Dimension(width, height); } public void paint(Graphics g) { g.setColor(Color.black); Dimension d = getPreferredSize(); int x = 0; g.drawLine(x, 0, x, d.height); for ( int i = 0; i < _col_widths.length; i++ ) { x = Math.abs(_col_widths[i]); g.drawLine(x, 0, x, d.height); } g.drawLine(d.width, 0, d.width, d.height); int y = 0; g.drawLine(0, y, d.width, y); for ( int i = 0; i < _row_heights.length; i++ ) { y = Math.abs(_row_heights[i]); g.drawLine(0, y, d.width, y); } g.drawLine(0, d.height, d.width, d.height); } }; return p; } */ } antelope-3.5.1.orig/src/ise/library/ListOpsTest.java0000644000175000017500000000532010046760304022275 0ustar drazzibdrazzibpackage ise.library; import java.util.*; /** * Cheapo unit testing, in the style of junit, but without junit. Add test cases * as needed, then call them from the main method. Be sure to run with -ea option * on command line so assert works: java -ea ise.library.ListOpsTest */ public class ListOpsTest { LinkedHashSet a, b; LinkedHashSet union, intersection, difference, sdifference; TableArray product; public void setup() { a = new LinkedHashSet(); b = new LinkedHashSet(); a.add("1"); a.add("2"); a.add("3"); a.add("a"); a.add("b"); b.add("a"); b.add("b"); b.add("c"); b.add("d"); union = new LinkedHashSet(); union.add("1"); union.add("2"); union.add("3"); union.add("a"); union.add("b"); union.add("c"); union.add("d"); intersection = new LinkedHashSet(); intersection.add("a"); intersection.add("b"); difference = new LinkedHashSet(); difference.add("1"); difference.add("2"); difference.add("3"); sdifference = new LinkedHashSet(); sdifference.add("1"); sdifference.add("2"); sdifference.add("3"); sdifference.add("c"); sdifference.add("d"); product = new TableArray(); } public void testUnion() { assert(SetOps.equals(SetOps.union(a, b), union)); } public void testIntersection() { assert(ListOps.equals(ListOps.intersection(a, b), intersection)); } public void testDifference() { assert(ListOps.equals(ListOps.difference(a, b), difference)); } public void testSymmetricDifference() { assert(ListOps.equals(ListOps.symmetricDifference(a, b), sdifference)); } public void testProduct() { System.out.println(ListOps.product(a, b)); } public void testDuplicates() { ArrayList al = new ArrayList(); al.add("a"); al.add("b"); al.add("a"); al.add("b"); ArrayList bl = new ArrayList(); bl.add("a"); bl.add("b"); assert(ListOps.equals(ListOps.toList(ListOps.toSet(al)), bl)); } public static void main( String[] args ) { ListOpsTest tat = new ListOpsTest(); tat.setup(); tat.testUnion(); System.out.println("union test passed"); tat.testIntersection(); System.out.println("intersection test passed"); tat.testDifference(); System.out.println("difference test passed"); tat.testSymmetricDifference(); System.out.println("symmetric difference passed"); tat.testProduct(); tat.testDuplicates(); System.out.println("duplicates test passed"); System.exit( 0 ); } } antelope-3.5.1.orig/src/ise/library/DropShadowBorder.java0000644000175000017500000001044710046754260023262 0ustar drazzibdrazzibpackage ise.library; import java.awt.*; import javax.swing.border.*; /** * A drop shadow border. Draws a 1 pixel line completely around the component, * and a drop shadow effect on the right and bottom sides. * @author Dale Anson, 25 Feb 2004 * @version $Revision: 91 $ */ public class DropShadowBorder extends AbstractBorder { // the width in pixels of the drop shadow private int _width = 3; // the color of the drop shadow private Color _color = Color.BLACK; /** * Drop shadow with default width of 3 pixels and black color. */ public DropShadowBorder() { this( 3 ); } /** * Drop shadow, default shadow color is black. * @param width the width of the shadow. */ public DropShadowBorder( int width ) { this( width, Color.BLACK ); } /** * Drop shadow, width and color are adjustable. * @param width the width of the shadow. * @param color the color of the shadow. */ public DropShadowBorder( int width, Color color ) { _width = width; _color = color; } /** * This implementation returns a new Insets instance where the top and left are 1, * the bottom and right fields are the border width + 1. * @param c the component for which this border insets value applies * @return a new Insets object initialized as stated above. */ public Insets getBorderInsets( Component c ) { return new Insets( 1, 1, _width + 1, _width + 1 ); } /** * Reinitializes the insets parameter with this DropShadowBorder's * current Insets. * @param c the component for which this border insets value applies * @param insets the object to be reinitialized * @return the given insets object */ public Insets getBorderInsets( Component c, Insets insets ) { insets.top = 1; insets.left = 1; insets.bottom = _width + 1; insets.right = _width + 1; return insets; } /** * This implementation always returns true. * @return true */ public boolean isBorderOpaque() { return true; } /** * Paints the drop shadow border around the given component. * @param c - the component for which this border is being painted * @param g - the paint graphics * @param x - the x position of the painted border * @param y - the y position of the painted border * @param width - the width of the painted border * @param height - the height of the painted border */ public void paintBorder( Component c, Graphics g, int x, int y, int width, int height ) { Color old_color = g.getColor(); int x1, y1, x2, y2; g.setColor( _color ); // outline the component with a 1-pixel wide line g.drawRect( x, y, width - _width - 1, height - _width - 1 ); // draw the drop shadow for ( int i = 0; i <= _width; i++ ) { // bottom shadow x1 = x + _width; y1 = y + height - i; x2 = x + width; y2 = y1; g.drawLine( x1, y1, x2, y2 ); // right shadow x1 = x + width - _width + i; y1 = y + _width; x2 = x1; y2 = y + height; g.drawLine( x1, y1, x2, y2 ); } // fill in the corner rectangles with the background color of the parent // container if ( c.getParent() != null ) { g.setColor( c.getParent().getBackground() ); for ( int i = 0; i <= _width; i++ ) { x1 = x; y1 = y + height - i; x2 = x + _width; y2 = y1; g.drawLine( x1, y1, x2, y2 ); x1 = x + width - _width; y1 = y + i; x2 = x + width ; y2 = y1; g.drawLine( x1, y1, x2, y2 ); } // add some slightly darker colored triangles g.setColor( g.getColor().darker() ); for ( int i = 0; i < _width; i++ ) { // bottom left triangle x1 = x + i + 1; y1 = y + height - _width + i; x2 = x + _width; y2 = y1; g.drawLine( x1, y1, x2, y2 ); // top right triangle x1 = x + width - _width; y1 = y + i + 1; x2 = x1 + i ; y2 = y1; g.drawLine( x1, y1, x2, y2 ); } } g.setColor( old_color ); } } antelope-3.5.1.orig/src/ise/library/UserPreferencesFactory.java0000644000175000017500000000231610032111702024455 0ustar drazzibdrazzibpackage ise.library; import java.util.prefs.PreferencesFactory; import java.util.prefs.Preferences; import java.io.*; /** * This preferences factory only works for a single user and won't be shared * across the jvm, that is, system preferences are the same as user preferences. * Preferences are stored in $user.home/.ise_prefs. */ public class UserPreferencesFactory implements PreferencesFactory { protected static File PREFS_ROOT; /** * System root node. */ private static UserPreferences systemRoot = null; /** * User root node. */ private static UserPreferences userRoot = null; public Preferences systemRoot() { return getSystemRoot(); } public Preferences userRoot() { return getSystemRoot(); } public static Preferences getSystemRoot() { if ( systemRoot == null ) { PREFS_ROOT = new File( System.getProperty( "user.home" ) + File.separator + ".ise_prefs" ); try { PREFS_ROOT.mkdirs(); } catch ( Exception e ) {} systemRoot = new UserPreferences( null, "" ); } return systemRoot; } public static Preferences getUserRoot() { return getSystemRoot(); } } antelope-3.5.1.orig/src/ise/library/DeckPanel.java0000644000175000017500000000153210013677370021673 0ustar drazzibdrazzibpackage ise.library; import java.awt.CardLayout; import java.awt.Component; import javax.swing.JPanel; /** * This panel uses a CardLayout and provides a simple wrapper to the * card layout methods for showing a particular card. * @author Dale Anson, danson@germane-software.com */ public class DeckPanel extends JPanel { private CardLayout _layout; public DeckPanel() { _layout = new CardLayout(); setLayout( _layout ); } public void first() { _layout.first( this ); repaint(); } public void last() { _layout.last( this ); repaint(); } public void next() { _layout.next( this ); repaint(); } public void previous() { _layout.previous( this ); repaint(); } public void show( String name ) { _layout.show( this, name ); repaint(); } } antelope-3.5.1.orig/src/ise/library/FontDialog.java0000644000175000017500000002407610430201212022060 0ustar drazzibdrazzib// $Id: FontDialog.java 150 2006-05-10 04:58:49Z danson $ package ise.library; import javax.swing.*; import javax.swing.border.*; import javax.swing.event.*; import java.awt.*; import java.awt.event.*; import ise.library.*; import java.util.*; /** * A font chooser dialog. Typical usage: *

* * Font f = FontDialog.showFontDialog(parentFrame, defaultFont); * * * Internally, this class creates a single dialog and reuses it on each call to * showFontDialog. This minimizes the number of objects created. * * @author Dale Anson * @version $Revision: 150 $ */ public class FontDialog extends JDialog { /** * Description of the Field */ public boolean didCancel = false; /** * Description of the Field */ private JLabel sample; /** * Description of the Field */ private String font_name = "Serif"; /** * Description of the Field */ private String font_size = "10"; /** * Description of the Field */ private boolean bold_on = false, italic_on = false; /** * Description of the Field */ private JList font_list; /** * Description of the Field */ private JComboBox size_list; /** * Description of the Field */ private JTextField font_selection; /** * Description of the Field */ private JTextField size_selection; /** * Description of the Field */ private static JFrame _parent = null; /** * Description of the Field */ private static FontDialog _fd = null; /** * Constructor for FontDialog * * @param parent */ public FontDialog( JFrame parent ) { this( parent, null ); } /** *Constructor for FontDialog * * @param parent * @param font */ public FontDialog( JFrame parent, Font font ) { super( parent, "Select Font", true ); createUI( font ); } /** * Description of the Method * * @param font */ private void createUI( Font font ) { // main panel JPanel content_pane = new JPanel(); content_pane.setLayout( new KappaLayout() ); content_pane.setBorder( new EmptyBorder( 6, 6, 6, 6 ) ); ListSelectionListener lsl = new ListSelectionListener() { public void valueChanged( ListSelectionEvent e ) { if ( e.getSource().equals( font_list ) ) { font_name = font_list.getSelectedValue().toString(); font_selection.setText( font_name ); } setSample(); } }; ActionListener al = new ActionListener() { public void actionPerformed( ActionEvent ae ) { font_size = size_list.getSelectedItem().toString(); setSample(); } }; // font name selection panel JPanel font_panel = new JPanel(); font_panel.setLayout( new BorderLayout() ); font_panel.setBorder( new TitledBorder( "Font:" ) ); font_selection = new JTextField( font_name ); font_selection.setEditable( false ); font_panel.add( font_selection, BorderLayout.NORTH ); String[] font_names = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); font_list = new JList( font_names ); font_list.setSelectionMode( ListSelectionModel.SINGLE_INTERVAL_SELECTION ); font_list.setSelectedIndex( 0 ); font_list.addListSelectionListener( lsl ); font_panel.add( new JScrollPane( font_list ), BorderLayout.CENTER ); // font size selection panel JPanel size_panel = new JPanel(); size_panel.setLayout( new BorderLayout() ); size_panel.setBorder( new TitledBorder( "Size:" ) ); String[] size_names = {"8", "9", "10", "11", "12", "14", "16", "18", "20", "22", "24", "26", "28", "38", "48", "72"}; size_list = new JComboBox( size_names ); size_list.setEditable( true ); size_list.addActionListener( al ); size_list.setSelectedIndex( 2 ); size_panel.add( new JScrollPane( size_list ), BorderLayout.CENTER ); // font style selection panel JPanel style_panel = new JPanel(); style_panel.setLayout( new KappaLayout() ); style_panel.setBorder( new TitledBorder( "Style:" ) ); final JCheckBox bold_style = new JCheckBox( "Bold" ); bold_style.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { bold_on = bold_style.isSelected(); setSample(); } } ); final JCheckBox italic_style = new JCheckBox( "Italic" ); italic_style.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { italic_on = italic_style.isSelected(); setSample(); } } ); style_panel.add( bold_style, "0, 0, 1, 1, W, wh, 5" ); style_panel.add( italic_style, "0, 1, 1, 1, W, wh, 5" ); // font sample panel JPanel sample_panel = new JPanel(); sample_panel.setLayout( new BorderLayout() ); sample_panel.setBorder( new TitledBorder( "Sample" ) ); sample = new JLabel( "AaBbYyZz", SwingConstants.CENTER ); sample_panel.add( sample, BorderLayout.CENTER ); setSample(); // button panel KappaLayout layout = new KappaLayout(); JPanel btn_panel = new JPanel( layout ); JButton ok_btn = new JButton( "Ok" ); JButton cancel_btn = new JButton( "Cancel" ); ok_btn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { didCancel = false; setVisible( false ); } } ); cancel_btn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { didCancel = true; setVisible( false ); } } ); btn_panel.add( "0,0,1,1,0,w", ok_btn ); btn_panel.add( "1,0", KappaLayout.createHorizontalStrut( 5, true ) ); btn_panel.add( "2,0,1,1,0,w", cancel_btn ); layout.makeColumnsSameWidth( 0, 2 ); // layout main panel content_pane.add( "0, 0, 2, 3, N, wh", font_panel ); content_pane.add( "2, 0, 1, 1", KappaLayout.createHorizontalStrut( 5, true ) ); content_pane.add( "3, 0, 2, 1, N, w", size_panel ); content_pane.add( "3, 1, 2, 2, S, wh", style_panel ); content_pane.add( "0, 3, 1, 1", KappaLayout.createVerticalStrut( 5, true ) ); content_pane.add( "0, 4, 5, 1, 0, wh", sample_panel ); content_pane.add( "5, 4, 1, 1", KappaLayout.createVerticalStrut( 72 ) ); content_pane.add( "0, 5, 1, 1", KappaLayout.createVerticalStrut( 11 ) ); content_pane.add( "0, 6, 5, 1", btn_panel ); // set defaults if possible //System.out.println("FontDialog, font = " + font); if ( font != null ) { String font_family = font.getFamily(); int font_style = font.getStyle(); int font_size = font.getSize(); font_list.setSelectedValue( font_family, true ); size_list.setSelectedItem( String.valueOf( font_size ) ); switch ( font_style ) { case Font.BOLD: bold_style.setSelected( true ); break; case Font.ITALIC: italic_style.setSelected( true ); break; case Font.BOLD + Font.ITALIC: bold_style.setSelected( true ); italic_style.setSelected( true ); break; } } setContentPane( content_pane ); pack(); } /** * Sets the sample text to use the selected font characteristics. */ private void setSample() { SwingUtilities.invokeLater( new Runnable() { public void run() { try { int style = Font.PLAIN; if ( bold_on ) style += Font.BOLD; if ( italic_on ) style += Font.ITALIC; int size = Integer.valueOf( font_size ).intValue(); sample.setFont( new Font( font_name, style, size ) ); } catch ( Exception e ) {} } } ); } /** * @return the currently selected font */ public Font getSelectedFont() { return sample.getFont(); } /** * For static showFontDialog. * * @return true if user selected "Cancel" button. */ public boolean didCancel() { return didCancel; } /** * Convenience method to show a FontDialog. * @return the selected font or null if the user cancelled. */ public static Font showFontDialog() { return showFontDialog( null ); } /** * Convenience method to show a FontDialog. * * @param parent The parent JFrame for the dialog * @return the selected font or null if the user cancelled. */ public static Font showFontDialog( JFrame parent ) { return showFontDialog( parent, null ); } /** * Convenience method to show a FontDialog. * * @param parent the parent frame * @param font the default font * @return the selected font or null if the user cancelled. */ public static Font showFontDialog( JFrame parent, Font default_font ) { if ( parent == null || !parent.equals( _parent ) || _fd == null ) { _fd = new FontDialog( parent, default_font ); } _parent = parent; GUIUtils.center( parent, _fd ); _fd.pack(); _fd.setVisible(true); Font font = _fd.getSelectedFont(); _fd.dispose(); if ( !_fd.didCancel() ) return font; return null; } // for testing /** * The main program for the FontDialog class * * @param args The command line arguments */ public static void main( String[] args ) { JFrame f = new JFrame(); FontDialog fd = new FontDialog( f ); fd.setVisible(true); System.out.println( fd.getSelectedFont() ); System.exit( 0 ); } } antelope-3.5.1.orig/src/ise/library/GUIUtils.java0000644000175000017500000002113510046754260021513 0ustar drazzibdrazzib// $Id: GUIUtils.java 91 2004-05-08 02:42:56Z danson $ /* * Based on the Apache Software License, Version 1.1 * * Copyright (c) 2002 Dale Anson. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by Dale Anson, * danson@users.sourceforge.net." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The name "Antelope" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact danson@users.sourceforge.net. * * 5. Products derived from this software may not be called "Antelope" * nor may "Antelope" appear in their names without prior written * permission of Dale Anson. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL DALE ANSON OR ANY PROJECT * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== */ package ise.library; import java.util.*; import java.awt.*; import java.awt.event.*; /** * Some GUI utility methods that I seem to use over and over, so I put them * here in one place. Could be easily modified to be AWT-only utilities. * * @author Dale Anson * @version $Revision: 91 $ */ public class GUIUtils { /** * Centers you on me. Useful for centering * dialogs on their parent frames. * * @param me Component to use as basis for centering. * @param you Component to center on me. */ public static void center( Component me, Component you ) { Rectangle my = me.getBounds(); Dimension your = you.getSize(); int x = my.x + ( my.width - your.width ) / 2; if ( x < 0 ) x = 0; int y = my.y + ( my.height - your.height ) / 2; if ( y < 0 ) y = 0; you.setLocation( x, y ); } /** * Centers a component on the screen. * * @param me Component to center. */ public static void centerOnScreen( Component me ) { Dimension screen_size = Toolkit.getDefaultToolkit().getScreenSize(); Dimension window_size = me.getSize(); me.setBounds( ( screen_size.width - window_size.width ) / 2, ( screen_size.height - window_size.height ) / 2, window_size.width, window_size.height ); } /** * Expands a component to fill the screen, just like a 'maximize window'. * * @param frame the component to expand */ public static void fillScreen( Component frame ) { String version = System.getProperty( "java.version" ); if ( version.startsWith( "1.4" ) || version.startsWith( "1.5" ) ) { if ( frame instanceof Frame ) { ( ( Frame ) frame ).setExtendedState( Frame.MAXIMIZED_BOTH ); return ; } } Dimension screen_size = Toolkit.getDefaultToolkit().getScreenSize(); frame.setSize( screen_size ); centerOnScreen( frame ); } /** * @param c a Component * @return the Frame containing the component or null if the component * doesn't have a containing Frame. */ public static Frame getRootFrame( Component c ) { Object parent = c.getParent(); while ( parent != null ) { if ( parent instanceof Frame ) return ( Frame ) parent; parent = ( ( Component ) parent ).getParent(); } return null; } /** * This is the only method that relies on Swing. Comment this one out and * this class is AWT-only capable. * * @param c a Component * @return the JFrame containing the component or null if the component * doesn't have a containing JFrame. */ public static javax.swing.JFrame getRootJFrame( Component c ) { Object parent = c.getParent(); while ( parent != null ) { if ( parent instanceof javax.swing.JFrame ) return ( javax.swing.JFrame ) parent; parent = ( ( Component ) parent ).getParent(); } return null; } /** * @param c a Component * @return the Window containing the component or null if the component * doesn't have a containing Window. */ public static Window getRootWindow( Component c ) { Object parent = c.getParent(); while ( parent != null ) { if ( parent instanceof Window ) return ( Window ) parent; parent = ( ( Component ) parent ).getParent(); } return null; } /** * Calculates the best location to show the component based on the given (x, y) * coordinates. The returned point will be as close as possible to the original * point while allowing the entire component to be displayed on screen. This is * useful for showing dialogs and popups. * @param comp the component that will be shown. * @param x the original x-coordinate of the component or of the desired location. * @param y the original y-coordinate of the component or of the desired location. * @return a point as close to the given (x, y) that will allow the entire * component to be shown on the screen. */ public static Point getBestAnchorPoint( Component comp, int x, int y ) { int new_x = x; int new_y = y; Point p = new Point( new_x, new_y ); javax.swing.SwingUtilities.convertPointToScreen( p, comp ); Dimension size = comp.getSize(); Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); boolean move_horizontally = false; boolean move_vertically = false; // calculate new x coordinate. If the component width is less than the // screen width and the right side of the component is off the screen, // move it left. if ( p.x + size.width > screen.width && size.width < screen.width ) { new_x += ( screen.width - p.x - size.width ); move_horizontally = true; } // calculate new y coordinate. If the component height is less than the // screen height and the bottom of the component is off the screen, move // it up. if ( p.y + size.height > screen.height && size.height < screen.height ) { new_y += ( screen.height - p.y - size.height ); move_vertically = true; } // If the component is a popup and it needed to be moved both horizontally // and vertically, the mouse pointer might end up over a menu item, which // will be invoked when the mouse is released. In this case, move the // component to a location that is not under the point. if ( move_horizontally && move_vertically && (comp instanceof javax.swing.JPopupMenu) ) { // first try to move it more left if (x - size.width - 2 > 0) new_x = x - size.width - 2; else if (y - size.height - 2 > 0){ // try to move it up some more new_y = y - size.height - 2; } } return new Point( new_x, new_y ); } /** * Shows the specified popup menu, ensuring it is displayed within * the bounds of the screen. * * @param popup The popup menu * @param comp The component to show it for * @param x The x coordinate * @param y The y coordinate */ public static void showPopupMenu( javax.swing.JPopupMenu popup, Component comp, int x, int y ) { Point p = getBestAnchorPoint( comp, x, y ); popup.show( comp, p.x, p.y ); } } antelope-3.5.1.orig/src/ise/library/Nav2.java0000644000175000017500000001306410325772142020655 0ustar drazzibdrazzib package ise.library; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.util.*; /** * Provides navigation ability for a client object, has a "back" and "forward" * button to move through a list of objects. * * @author Dale Anson, danson@germane-software.com, August 2002 */ public class Nav2 extends JToolBar implements ActionListener { /** * Action command to go to the previous item. */ public final static String BACK = "back"; /** * Action command to go to the next item. */ public final static String FORWARD = "forward"; /** * Action command to indicate that it is okay to go back. */ public final static String CAN_GO_BACK = "canGoBack"; /** * Action command to indicate that it is not okay to go back. */ public final static String CANNOT_GO_BACK = "cannotGoBack"; /** * Action command to indicate that it is okay to go forward. */ public final static String CAN_GO_FORWARD = "canGoForward"; /** * Action command to indicate that it is not okay to go forward. */ public final static String CANNOT_GO_FORWARD = "cannotGoForward"; private JButton back, forward; private Stack backStack; private Stack forwardStack; private Object currentNode = null; private Navable client; /** * @param client the client object to provide navigation for */ public Nav2( Navable client ) { if ( client == null ) throw new IllegalArgumentException( "client cannot be null" ); this.client = client; setFloatable( false ); putClientProperty( "JToolBar.isRollover", Boolean.TRUE ); // set up the buttons try { back = new JButton(); java.net.URL url = getClass().getClassLoader().getResource( "images/Back16.gif" ); Icon icon = null; if ( url != null ) icon = new ImageIcon( url ); if (icon != null) back.setIcon( icon ); else back.setText("<"); forward = new JButton(); url = getClass().getClassLoader().getResource( "images/Forward16.gif" ); icon = null; if ( url != null ) icon = new ImageIcon( url ); if (icon != null) forward.setIcon( icon ); else forward.setText(">"); back.setMargin( new Insets( 0, 0, 0, 0 ) ); forward.setMargin( new Insets( 0, 0, 0, 0 ) ); back.setActionCommand( BACK ); forward.setActionCommand( FORWARD ); back.addActionListener( this ); forward.addActionListener( this ); add( back ); add( forward ); } catch(Exception e) { e.printStackTrace(); } // set up the history stacks backStack = new Stack(); forwardStack = new Stack(); clearStacks(); } /** * The action handler for this class. Actions can be invoked by calling this * method and passing an ActionEvent with one of the action commands defined * in this class (BACK, FORWARD, etc). * * @param ae the action event to kick a response. */ public void actionPerformed( ActionEvent ae ) { if ( ae.getActionCommand().equals( BACK ) ) { goBack(); } else if ( ae.getActionCommand().equals( FORWARD ) ) { goForward(); } else if ( ae.getActionCommand().equals( CAN_GO_BACK ) ) { back.setEnabled( true ); } else if ( ae.getActionCommand().equals( CANNOT_GO_BACK ) ) { back.setEnabled( false ); } else if ( ae.getActionCommand().equals( CAN_GO_FORWARD ) ) { forward.setEnabled( true ); } else if ( ae.getActionCommand().equals( CANNOT_GO_FORWARD ) ) { forward.setEnabled( false ); } } /** * Clears the history. */ public void clearStacks() { backStack.clear(); forwardStack.clear(); setButtonState(); } /** * Moves to the previous item in the "back" history. */ public void goBack() { if ( !backStack.empty() ) { if ( currentNode != null ) forwardStack.push( currentNode ); currentNode = backStack.pop(); navigate( currentNode ); } setButtonState(); } /** * Moves to the next item in the "forward" history. */ public void goForward() { if ( !forwardStack.empty() ) { if ( currentNode != null ) backStack.push( currentNode ); currentNode = forwardStack.pop(); navigate( currentNode ); } setButtonState(); } /** * Invokes the client to go to the given object. * * @param node where to go */ private void navigate( Object node ) { client.setPosition( node ); } /** * Sets the state of the navigation buttons. */ private void setButtonState() { back.setEnabled( !backStack.empty() ); forward.setEnabled( !forwardStack.empty() ); } /** * Updates the stacks and button state based on the given node. Pushes the * node on to the "back" history, clears the "forward" history. * * @param node an object */ public void update( Object node ) { if ( node != currentNode ) { if ( currentNode != null ) backStack.push( currentNode ); currentNode = node; forwardStack.clear(); } setButtonState(); } } antelope-3.5.1.orig/src/ise/library/TableArray.java0000644000175000017500000006574510037573370022114 0ustar drazzibdrazzib package ise.library; import java.awt.Point; import java.util.*; import java.io.Serializable; /** * A table-like storage structure. Items are stored in a two dimensional array and * are accessed by a two-dimensional index. Indexes can be negative or positive, so * calling put(-6, 12, myobject) is legal. This class is particularly nice for sparse * arrays as it minimizes memory usage. *

* Example usage: *

* Populate a table from a ResultSet: *

 * ResultSet rs = stmt.executeQuery("select something from somewhere");
 * int col_count = rs.getMetaData().getColumnCount();
 * int y = 0;
 * TableArray table = new TableArray();
 * while(rs.next()) {
 *    for (int x = 0; x < col_count; x++) {
 *       table.put(x, y, rs.getObject(x));       
 *    }
 *    ++y;
 * }
 * 
*

* Use items from the ResultSet: *

 * String first_name = (String)table.get(1, 0);
 * String last_name = (String)table.get(2, 0);
 * 
* * @author Dale Anson, January 2000 */ public class TableArray implements Map, Serializable, Cloneable { // revision 1.2: // changed from Hashtable, TreeMap sorts itself using the point comparator. private TreeMap table; // the default value for all cells in the table. If the table does not hold // a value for a particular point, this value will be used. private Object _default = null; /** * TableArray with null default value. */ public TableArray() { this( null ); } /** * TableArray with default value. * @param default_value this value will be returned by the various "get" methods * in the event the table does not have a value stored at the requested location. * In other words, all cells in the table are assumed to have this value unless * otherwise set. */ public TableArray( Object default_value ) { table = new TreeMap( new PointComparator() ); _default = default_value; } /** * Set the default value for all cells in the table. If the table does not hold * a value for a particular point, this value will be used. * @param value the new default value, may be null. * @see #getDefaultValue */ public void setDefaultValue( Object value ) { _default = value; } /** * Get the default value for all cells in the table. If the table does not hold * a value for a particular point, this value will be used. * @return the default value, may be null. * @see #setDefaultValue */ public Object getDefaultValue() { return _default; } /** * Store an object at a given location in the table. * @param x column index * @param y row index * @param o the object to store * @return the object that was at that position, if any. Null values are allowed, * putting a null value causes the old value to be removed. */ public Object put( int x, int y, Object o ) { Object old_object = get( x, y ); Point p = new Point( x, y ); if ( o != null && o.equals( getDefaultValue() ) ) remove( p ); else if ( o == null && getDefaultValue() == null ) remove( p ); else table.put( p, o ); return old_object; } /** * Store an object at a given location in the table. * @param x column index * @param y row index * @param o the object to store * @return the object that was at that position, if any. Null values are allowed, * putting a null value causes the old value to be removed. */ public Object put( Object o, int x, int y ) { return put( x, y, o ); } /** * Gets the object from the given location in the table. * @param x column index * @param y row index * @return the object stored at the given (x, y) coordinate or null if there * is no object stored there. */ public Object get( int x, int y ) { Point p = new Point( x, y ); Object o = table.get( p ); if ( o == null ) o = _default; return o; } /** * This class represents a finite set of points in a Cartesian coordinate system. * Since the set is finite, there is a smallest rectangle that bounds the set of * points. (This rectangle has sides parallel to the x- and y-axes.) This method * returns the width of that rectangle. * @return the width of the bounding rectangle */ public int getWidth() { if ( table.size() == 0 ) return 0; return getMaxX() - getMinX() + 1; } /** * Returns the number of columns in the table, same as getWidth. * @see #getWidth * @return getWidth */ public int getColumnCount() { return getWidth(); } /** * This class represents a finite set of points in a Cartesian coordinate system. * Since the set is finite, there is a smallest rectangle that bounds the set of * points. (This rectangle has sides parallel to the x- and y-axes.) This method * returns the height of that rectangle. * @return the height of the bounding rectangle */ public int getHeight() { if ( table.size() == 0 ) return 0; return getMaxY() - getMinY() + 1; } /** * Returns the number of rows in the table, same as getHeight. * @see #getHeight * @return getHeight */ public int getRowCount() { return getHeight(); } /** * See getWidth and getHeight. This method returns the x coordinate of the point * that has the smallest x-coordinate. Beware: there may not actually be an * object stored at (getMinX(), getMinY()). If there are no objects stored in * the array, this method will return 0. * @return the column index of the left side of the bounding rectangle, or * 0 if the table is empty. */ public int getMinX() { if ( table.size() == 0 ) return 0; int smallest_x = 0; Iterator it = table.keySet().iterator(); if ( it.hasNext() ) { Point p = ( Point ) it.next(); smallest_x = p.x; } while ( it.hasNext() ) { Point p = ( Point ) it.next(); if ( p.x < smallest_x ) smallest_x = p.x; } return smallest_x; } /** * See getWidth and getHeight. This method returns the y coordinate of the point * that has the smallest y-coordinate. Beware: there may not actually be an * object stored at (getMinX(), getMinY()). If there are no objects stored in * the array, this method will return 0. * @return the row index of the top side of the bounding rectangle, or 0 if the * table is empty. */ public int getMinY() { // revision 1.3: // think about it -- since I changed the storage container from a Hashtable // to a TreeMap and added a PointComparator to the TreeMap, isn't the // minimum y-coordinate the y-coordinate of the first point in the tree? // Need to check this out, if it's true, then an optimization can be made // here. // -- it is true, new code follows, made similar change to getMaxY. if ( table.size() == 0 ) return 0; Point p = ( Point ) table.firstKey(); return p.y; } /** * See getWidth and getHeight. This method returns the x coordinate of the point * that has the largest x-coordinate. Beware: there may not actually be an * object stored at (getMaxX(), getMaxY()). * @return the column index of the right side of the bounding rectangle. */ public int getMaxX() { if ( table.size() == 0 ) return 0; int largest_x = 0; Iterator it = table.keySet().iterator(); if ( it.hasNext() ) { Point p = ( Point ) it.next(); largest_x = p.x; } while ( it.hasNext() ) { Point p = ( Point ) it.next(); if ( p.x > largest_x ) largest_x = p.x; } return largest_x; } /** * See getWidth and getHeight. This method returns the y coordinate of the point * that has the largest y-coordinate. Beware: there may not actually be an * object stored at (getMaxX(), getMaxY()). * @return the row index of the bottom of the bounding rectangle. */ public int getMaxY() { // revision 1.3: // think about it -- since I changed the storage container from a Hashtable // to a TreeMap and added a PointComparator to the TreeMap, isn't the // maximum y-coordinate the y-coordinate of the last point in the tree? // Need to check this out, if it's true, then an optimization can be made // here. // -- it is true, new code follows, made similar change to getMinY. if ( table.size() == 0 ) return 0; Point p = ( Point ) table.lastKey(); return p.y; } /** * Required by Map interface, removes all items from the table. */ public void clear() { table.clear(); } /** * Required by Map interface, keys for the table are java.awt.Points. * @param key a java.awt.Point * @return true if the table contains the given key. */ public boolean containsKey( Object key ) { return table.containsKey( key ); } /** * Required by Map interface, checks if the given value is in the table. * @param value the object to find * @return true if the value exists in the table. */ public boolean containsValue( Object value ) { return table.containsValue( value ); } /** * Required by Map interface. Returns a set view of the mappings contained in * this table. Each element in the returned set is a Map.Entry. The set is backed * by the table, so changes to the map are reflected in the set, and vice-versa. * If the table is modified while an iteration over the set is in progress, the * results of the iteration are undefined. The set supports element removal, * which removes the corresponding mapping from the table, via the Iterator.remove, * Set.remove, removeAll, retainAll and clear operations. It does not support * the add or addAll operations. * @return a set view of the mappings contained in this map. */ public Set entrySet() { return table.entrySet(); } /** * Required by Map interface, checks if this TableArray is equal to * the given object by comparing data values. */ public boolean equals( Object o ) { if ( o == null ) return false; try { TableArray ta = ( TableArray ) o; if ( ta.size() != size() ) return false; Iterator it = pointIterator(); while ( it.hasNext() ) { Point p = ( Point ) it.next(); if ( !get( p ).equals( ta.get( p ) ) ) return false; } return true; } catch ( ClassCastException cce ) { return false; } } /** * Required by Map interface, returns the value at the given point. * @param key must be a Point */ public Object get( Object key ) { Point p = ( Point ) key; return get( p.x, p.y ); } /** * Returns a List containing the values of a single row. The list may contain nulls. * @return a List containing the values of a single row. If a particular cell is * empty, the List will contain an empty String to represent the value for that * cell. */ public List getRow( int row ) { List list = new ArrayList(); for ( int x = getMinX(); x <= getMaxX(); x++ ) { list.add( get( x, row ) ); } return list; } /** * Inserts the given data into the row. This will overwrite any data already in * the row. If the data is longer than the current row, the row will be extended * to hold all data. If the data is shorter than the current row, the row will be * nulled out. */ public void putRow( int row, List data ) { removeRow( row ); Iterator it = data.iterator(); for ( int x = 0; it.hasNext(); x++ ) { put( x + getMinX(), row, it.next() ); } } /** * Returns a List containing the values of a single column. The list may contain nulls. * @return a List containing the values of a single column. If a particular cell is * empty, the List will contain a null as the value for that * cell. */ public List getColumn( int col ) { List list = new ArrayList(); for ( int y = getMinY(); y <= getMaxY(); y++ ) { list.add( get( col, y ) ); } return list; } /** * Inserts the given data into the column. This will overwrite any data already in * the column. If the data is longer than the current column, the column will be extended * to hold all data. If the data is shorter than the current column, the column will be * nulled out. */ public void putColumn( int col, List data ) { for ( int y = getMinY(); y <= getMaxY(); y++ ) { remove( col, y ); } Iterator it = data.iterator(); for ( int y = getMinY(); it.hasNext(); y++ ) { put( col, y, it.next() ); } } /** * Required by Map interface, returns the hash code for this TableArray. */ public int hashCode() { return table.hashCode(); } /** * Required by Map interface, returns true if the table is empty. * @return true if the table is empty. */ public boolean isEmpty() { return table.isEmpty(); } /** * Required by Map interface. * Returns a set view of the keys contained in this table. The set is backed by * the table, so changes to the table are reflected in the set, and vice-versa. If * the table is modified while an iteration over the set is in progress, the * results of the iteration are undefined. The set supports element removal, * which removes the corresponding mapping from the table, via the Iterator.remove, * Set.remove, removeAll retainAll, and clear operations. It does not support the * add or addAll operations. *

* The returned set is a dense set, that is, the set will contain only those * points in the table that are mapped to a non-null value. * This means that the Set will have TableArray.getSize() Points. * The Set is sorted, see PointComparator for details of the sorting algorithm. *

* If you need access to all points in the table, use the Iterator provided * by the pointIterator method. * * @return a set view of the keys contained in this map. */ public Set keySet() { return table.keySet(); } /** * Same as keySet. * Returns a set view of the keys contained in this table. The set is backed by * the table, so changes to the table are reflected in the set, and vice-versa. If * the table is modified while an iteration over the set is in progress, the * results of the iteration are undefined. The set supports element removal, * which removes the corresponding mapping from the table, via the Iterator.remove, * Set.remove, removeAll retainAll, and clear operations. It does not support the * add or addAll operations. *

* The returned set is a dense set, that is, the set will contain only those * points in the table that are mapped to a non-null value. * This means that the Set will have TableArray.getSize() Points. * The Set is sorted, see PointComparator for details of the sorting algorithm. *

* If you need access to all points in the table, use the Iterator provided * by the pointIterator method. * * @return a set view of the keys contained in this map. */ public Set pointSet() { return keySet(); } /** * Returns an iterator over the points in this table. The points are * returned in ascending order. This is a sparse iterator, that is, it * iterates over all cells that the table contains whether or not there is a * value in that cell or not. */ public Iterator pointIterator() { return new Iterator() { private int min_x = getMinX(); private int min_y = getMinY(); private int max_x = getMaxX(); private int max_y = getMaxY(); private int x = min_x; private int y = min_y; public boolean hasNext() { return x <= max_x && y <= max_y; } public Object next() { if ( hasNext() ) { Point p = new Point( x, y ); // prep for next call ++x; if ( x > max_x ) { x = min_x; ++y; } // return the next point return p; } else throw new NoSuchElementException(); } public void remove() { throw new UnsupportedOperationException(); } }; } /** * Returns an iterator over the objects in this table. The objects are * returned in ascending order by point. This is a sparse iterator, that is, it * iterates over all cells that the table contains whether there is a * value contained in that cell or not. This means that calling the * next method of this iterator may return null. */ public Iterator valueIterator() { return new Iterator() { private int min_x = getMinX(); private int min_y = getMinY(); private int max_x = getMaxX(); private int max_y = getMaxY(); private int x = min_x; private int y = min_y; public boolean hasNext() { return x <= max_x && y <= max_y; } public Object next() { if ( hasNext() ) { // get the point Object o = get( x, y ); // prep for next call x += 1; if ( x > max_x ) { x = min_x; y += 1; } return o; } throw new NoSuchElementException(); } public void remove() { throw new UnsupportedOperationException(); } }; } /** * An iterator over a single column of the table. * @return an iterator over the given column. */ public Iterator columnIterator( int col ) { final int c = col; return new Iterator() { private int min_y = getMinY(); private int max_y = getMaxY(); private int y = min_y; public boolean hasNext() { return y <= max_y; } public Object next() { if ( hasNext() ) { Object o = get( c, y ); y += 1; return o; } throw new NoSuchElementException(); } public void remove() { throw new UnsupportedOperationException(); } }; } /** * Returns an iterator over the values of contained in a single column in the table. * @return an iterator over the given row. */ public Iterator rowIterator( int row ) { final int r = row; return new Iterator() { private int min_x = getMinX(); private int max_x = getMaxX(); private int x = min_x; public boolean hasNext() { return x <= max_x; } public Object next() { if ( hasNext() ) { Object o = get( x, r ); x += 1; return o; } throw new NoSuchElementException(); } public void remove() { throw new UnsupportedOperationException(); } }; } /** * Required by Map interface, stores an object in the table. key * must be a java.awt.Point or a ClassCastException will be thrown. * @param key must be a Point */ public Object put( Object key, Object value ) { return put( ( ( Point ) key ).x, ( ( Point ) key ).y, value ); } /** * Required by Map interface, dumps the given map into this table. Keys in * the map must be java.awt.Points or a ClassCastException will be thrown. */ public void putAll( Map t ) { Iterator it = t.keySet().iterator(); while ( it.hasNext() ) { Point key = ( Point ) it.next(); Object value = t.get( key ); put( key.x, key.y, value ); } } /** * Required by Map interface, removes an object from the table, key * must be a java.awt.Point. * @param key must be a Point. * @return the removed object */ public Object remove( Object key ) { return table.remove( key ); } /** * Removes an item from the table. * @param row row index of item * @param col column index of item * @return the removed item */ public Object remove( int row, int col ) { return remove( new Point( row, col ) ); } /** * Removes a complete row from the table. * @param row the index of the row to remove */ public void removeRow( int row ) { for ( int x = getMinX(); x < getMaxX(); x++ ) { remove( x, row ); } } /** * Removes a complete column from the table. * @param col the index of the column to remove */ public void removeColumn( int col ) { for ( int y = getMinY(); y < getMaxY(); y++ ) { remove( col, y ); } } /** * Required by Map interface. * @return the number of objects stored in this array. Beware: this is not * necessarily the same value as getWidth() * getHeight(). For example, * size() may return 2, while getWidth() * getHeight() could be 100. This just * means there are 98 empty spots in the array. */ public int size() { return table.size(); } /** * Same as size. * @see #size */ public int getSize() { return size(); } /** * Returns the number of cells in the table. As this table allows empty cells, * there may not be an object stored in all cells. This IS the same as * getWidth() * getHeight(). * @see #size * @return the number of cells in the table. */ public int getCellCount() { return getWidth() * getHeight(); } /** * Required by Map interface, retuns a collection of the values of this * table. This is a dense collection, no null values (i.e. empty table cells) * are included. If you need the sparse set (all values, regardless of * whether or not they are null), use the Iterator provided by the * valueIterator method. * @return a collection of the objects stored in the table. */ public Collection values() { return table.values(); } /** * Returns a string showing the coordinates of the bottom left and top right * corners of the bounding rectangle, the width and height of the rectangle, * and the number of objects contained in the table. Note that the table may * have empty cells, so width times the height may not equal the number of * objects in the table. * @return a String showing getMinX, getMinY, getMaxX, getMaxY, getWidth, * getHeight, and getSize, in that order. */ public String toString() { StringBuffer sb = new StringBuffer(); sb.append( "TableArray [(" ).append( getMinX() ).append( "," ).append( getMinY() ).append( "), (" ).append( getMaxX() ).append( "," ).append( getMaxY() ).append( "), w=" ).append( getWidth() ).append( ", h=" ).append( getHeight() ).append( ", size=" ).append( size() ).append( "]" ); if ( size() > 0 ) sb.append( System.getProperty( "line.separator" ) ).append( dataToString() ); else sb.append( "[empty]" ); return sb.toString(); } /** * Returns a string showing just the data from the table. * @return the table data suitable for display. */ public String dataToString() { StringBuffer table_data = new StringBuffer(); String ls = System.getProperty( "line.separator" ); for ( int y = getMinY(); y <= getMaxY(); y++ ) { StringBuffer row = new StringBuffer(); row.append( "[" ); for ( int x = getMinX(); x <= getMaxX(); x++ ) { Object o = get( x, y ); if ( o == null ) o = ""; row.append( o.toString() ); if ( x < getMaxX() ) row.append( "," ); } row.append( "]" ).append( ls ); table_data.append( row ); } return table_data.toString(); } /** * Clone this TableArray. */ public Object clone() { TableArray ta = new TableArray(); Iterator it = keySet().iterator(); while ( it.hasNext() ) { Point p = ( Point ) it.next(); ta.put( p, get( p.x, p.y ) ); } return ta; } /** * Compares two Points by comparing x and y coordinates.
*

    *
  • check for less than: "less than" is defined using the Cartesian * coordinate system such that p1 is less than p2 if and only if * p1.y < p2.y or in the case that p1.y == p2.y, p1 is less than p2 if * and only if p1.x < p2.x. Graphically, this can be pictured as p1 and * p2 being opposite corners of a rectangle, the point on the bottom of * rectangle is less than the point at the top of the rectangle. If it * happens that p1 and p2 form a horizontal line, then p1 is less than * p2 if p1 is to the left of p2.
    *
  • check for equals: "equals" is defined as: Given points p1 and p2, * p1 == p2 if and only if p1.x == p2.x and p1.y == p2.y
    *
  • check for greater than: "greater than" is simply not less than and not equals. *
* This is used by TableArray. * @author Dale Anson, March 2000 */ class PointComparator implements Comparator, Serializable { /** * @param a must be a java.awt.Point * @param b must be a java.awt.Point * @return -1 if a < b, 0 if a == b, 1 if a > b */ public int compare( Object a, Object b ) { // don't worry about ClassCastExceptions, if the objects aren't Points, // this is the wrong place to be anyway. Point p1 = ( Point ) a; Point p2 = ( Point ) b; // check for equality if ( p1.x == p2.x && p1.y == p2.y ) return 0; // check for less than if ( p1.y < p2.y ) return -1; else if ( p1.y == p2.y ) { if ( p1.x < p2.x ) return -1; } // check for greater than -- nothing to check here, the points are not // equal and p1 is not less than p2, therefore p1 must be greater than // p2. return 1; } } } antelope-3.5.1.orig/src/ise/library/Navable.java0000644000175000017500000000102610013677370021413 0ustar drazzibdrazzib package ise.library; /** * Objects implement this interface to be able to work with * Nav to add a navigation (web-browser-like back and forward) ability * to themselves. * @author Dale Anson, danson@germane-software.com */ public interface Navable { /** * Sets the position of the Navable object. Generally, if a Navable * object calls this method on itself, it should immediately call * Nav.update(o). * * @param o The new position value */ public void setPosition( Object o ); } antelope-3.5.1.orig/src/ise/library/PrefsTest.java0000644000175000017500000000237510013677370021772 0ustar drazzibdrazzibpackage ise.library; import java.util.*; import java.util.prefs.*; public class PrefsTest { public static void main ( String[] args ) { try { System.setProperty( "java.util.prefs.PreferencesFactory", "ise.library.UserPreferencesFactory" ); String PREFS_NODE = "/ise/antelope"; Preferences PREFS = Preferences.userRoot().node( PREFS_NODE ); System.out.println( "PREFS = " + PREFS ); PREFS.putLong( "testDate", ( new java.util.Date().getTime() ) ); Preferences prefs = PREFS.node( "testmore/another_node" ); System.out.println( "prefs = " + prefs ); System.out.println( "testLong = " + prefs.getLong( "testLong", -1 ) ); prefs.putLong( "testLong", ( new java.util.Date().getTime() ) ); prefs.flush(); prefs = PREFS; System.out.println( "testDate = " + prefs.getLong( "testDate", -1 ) ); Properties props = System.getProperties(); Iterator keys = props.keySet().iterator(); while ( keys.hasNext() ) { Object key = keys.next(); Object value = props.get( key ); System.out.println( key + " : " + value ); } } catch ( Exception e ) { e.printStackTrace(); } } } antelope-3.5.1.orig/src/ise/library/Log.java0000644000175000017500000000311710601266236020565 0ustar drazzibdrazzibpackage ise.library; import java.io.*; import java.util.Date; /** * Copyright 2003 * * @version $Revision: 152 $ */ public class Log { private static File outfile = new File(System.getProperty("user.home"), "antelope_debug.log"); private static final String LS = System.getProperty("line.separator"); private static boolean canLog = true; //System.getProperty("antelope.log.on") != null; static { System.out.println("Antelope debug log: " + outfile.getAbsolutePath()); } /** * Description of the Method * * @param msg */ public static void log(CharSequence msg) { log(null, msg); } public static void log(Object o, CharSequence msg) { if (!canLog) return; try { FileWriter fw = new FileWriter(outfile, true); if (o != null) fw.write(new Date().toString() + ": " + o.getClass().getName() + ": "); fw.write(msg.toString()); fw.write(LS); fw.flush(); fw.close(); } catch (Exception e) { e.printStackTrace(); } } /** * Description of the Method * * @param t */ public static void log(Throwable t) { log(null, t); } public static void log(Object o, Throwable t) { if (!canLog) return; log(o, getStackTrace(t)); } public static String getStackTrace(Throwable t) { StringWriter sw = new StringWriter(); t.printStackTrace(new PrintWriter(sw)); return sw.toString(); } } antelope-3.5.1.orig/src/ise/library/LambdaLayout.java0000644000175000017500000003221510013677370022425 0ustar drazzibdrazzib// $Id: LambdaLayout.java 6 2004-02-15 22:15:19Z danson $ package ise.library; import java.awt.LayoutManager2; import java.awt.Component; import java.awt.Container; import java.awt.Dimension; import java.awt.Insets; import java.awt.Point; import java.io.Serializable; import java.util.BitSet; import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; /** * LambdaLayout, a Java layout manager.
* Copyright (C) 2001, Dale Anson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*

* LambdaLayout -- based on KappaLayout, but handles stretching of components * differently. From e-mail I've received about KappaLayout, many people are * expecting a different stretching behavior when resizing a Frame. LambdaLayout * has this expected behaviour, in that components with the 's' constraint set to * 'w', 'h', or 'wh'/'hw' will resize as the frame resizes. Like KappaLayout, * LambdaLayout respects the preferred size of components and will not shrink * a component to less than it's preferred size.
* Example use:
* This will put a button on a panel in the top of its cell, stretched to * fill the cell width, with a 3 pixel pad:
* * Panel p = new Panel(new LambdaLayout()); * Button b = new Button("OK"); * p.add(b, "0, 0, 1, 2, 2, w, 3"); * *
* The constraints string has this layout:
* "x, y, w, h, a, s, p"
* defined as follows:
*

    *
  • 'x' is the column to put the component, default is 0
    *
  • 'y' is the row to put the component, default is 0
    *
  • 'w' is the width of the component in columns (column span), default is 1. * Can also be R or r, which means the component will span the remaining cells * in the row.
    *
  • 'h' is the height of the component in rows (row span), default is 1. * Can also be R or r, which means the component will span the remaining cells * in the column.
    *
  • 'a' is the alignment within the cell. 'a' can be a value between 0 and 8, * inclusive, (default is 0) and causes the alignment of the component within the cell to follow * this pattern:
    * 8 1 2
    * 7 0 3
    * 6 5 4
    , or
    * 0 horizontal center, vertical center,
    * 1 horizontal center, vertical top,
    * 2 horizontal right, vertical top,
    * 3 horizontal right, vertical center,
    * 4 horizontal right, vertical bottom,
    * 5 horizontal center, vertical bottom,
    * 6 horizontal left, vertical bottom,
    * 7 horizontal left, vertical center,
    * 8 horizontal left, vertical top.
    *

    * By popular request, the alignment constraint can also be represented as:
    * NW N NE
    *  W 0 E
    * SW S SE
    * which are compass directions for alignment within the cell. *

  • 's' is the stretch value. 's' can have these values:
    * 'w' stretch to fill cell width
    * 'h' stretch to fill cell height
    * 'wh' or 'hw' stretch to fill both cell width and cell height
    * '0' (character 'zero') no stretch (default) *
  • 'p' is the amount of padding to put around the component. This much blank * space will be applied on all sides of the component, default is 0. *
* Parameters may be omitted (default values will be used), e.g., * p.add(new Button("OK), "1,4,,,w,");
* which means put the button at column 1, row 4, default 1 column wide, default * 1 row tall, stretch to fit width of column, no padding.
* Spaces in the parameter string are ignored, so these are identical:
* p.add(new Button("OK), "1,4,,,w,");
* p.add(new Button("OK), " 1, 4, , , w");

* Rather than use a constraints string, a Constraints object may be used * directly, similar to how GridBag uses a GridBagConstraint. E.g,
* * Panel p = new Panel();
* LambdaLayout tl = new LambdaLayout();
* p.setLayout(tl);
* LambdaLayout.Constraints con = tl.getConstraint();
* con.x = 1;
* con.y = 2;
* con.w = 2;
* con.h = 2;
* con.s = "wh";
* panel.add(new Button("OK"), con);
* con.x = 3;
* panel.add(new Button("Cancel"), con);
*

* Note that the same Constraints can be reused, thereby reducing the number of * objects created.

* @author Dale Anson * @version $Revision: 6 $ */ public class LambdaLayout extends KappaLayout implements LayoutManager2, Serializable { /** * Required by LayoutManager, does all the real layout work. This is the only * method in LambdaLayout, all other methods are in KappaLayout. */ public void layoutContainer(Container parent) { synchronized(parent.getTreeLock()) { Insets insets = parent.getInsets(); int max_width = parent.getSize().width - (insets.left + insets.right); int max_height = parent.getSize().height - (insets.top + insets.bottom); int x = insets.left; // x and y location to put component in pixels int y = insets.top; int xfill = 0; // how much extra space to put between components int yfill = 0; // when stretching to fill entire container boolean add_xfill = false; boolean add_yfill = false; // make sure preferred size is known, a side effect is that countColumns // and countRows are automatically called. calculateDimensions(); // if necessary, calculate the amount of padding to add between the // components to fill the container if ( max_width > _preferred_width ) { int pad_divisions = 0; for ( int i = 0; i < _col_count; i++ ) { if ( _col_widths[i] >= 0 ) ++pad_divisions; } if ( pad_divisions > 0 ) xfill = (max_width - _preferred_width) / pad_divisions / 2; } if ( max_height > _preferred_height ) { int pad_divisions = 0; for ( int i = 0; i < _row_count; i++ ) { if ( _row_heights[i] >= 0 ) ++pad_divisions; } if ( pad_divisions > 0 ) yfill = (max_height - _preferred_height) / pad_divisions / 2; } // do the layout. Components are handled by columns, top to bottom, // left to right. Point cell = new Point(); for ( int current_col = 0; current_col < _col_count; current_col++ ) { // adjust x for previous column widths x = insets.left; for ( int n = 0; n < current_col; n++ ) { x += Math.abs(_col_widths[n]); if ( _col_widths[n] > 0 ) x += xfill * 2; } for ( int current_row = 0; current_row < _row_count; current_row++ ) { // adjust y for previous row heights y = insets.top; for ( int n = 0; n < current_row; n++ ) { y += Math.abs(_row_heights[n]); if ( _row_heights[n] > 0 ) { y += yfill * 2; } } cell.x = current_col; cell.y = current_row; Component c = (Component)_components.get(cell); if ( c != null && c.isVisible() ) { Dimension d = c.getPreferredSize(); Constraints q = (Constraints)_constraints.get(c); // calculate width of spanned columns = sum(preferred column // widths) + sum(xfill between columns) int sum_cols = 0; int sum_xfill = xfill * 2; for ( int n = current_col; n < current_col + q.w; n++ ) { sum_cols += Math.abs(_col_widths[n]); } if ( _col_widths[current_col] > 0 ) { for ( int n = current_col; n < current_col + q.w - 1; n++ ) { if ( _col_widths[n] > 0 ) sum_xfill += xfill * 2; } sum_cols += sum_xfill; } // calculate height of spanned rows int sum_rows = 0; int sum_yfill = yfill * 2; for ( int n = current_row; n < current_row + q.h; n++ ) { sum_rows += Math.abs(_row_heights[n]); } if ( _row_heights[current_row] > 0 ) { for ( int n = current_row; n < current_row + q.h - 1; n++ ) { if ( _row_heights[n] > 0 ) sum_yfill += yfill * 2; } sum_rows += sum_yfill; } int x_adj; int y_adj; // stretch if required if ( q.s.indexOf("w") != -1 && _col_widths[current_col] > 0 ) { d.width = sum_cols - q.p * 2; x_adj = q.p * 2; } else { x_adj = sum_cols - d.width; } if ( q.s.indexOf("h") != -1 && _row_heights[current_row] > 0 ) { d.height = sum_rows - q.p * 2; y_adj = q.p * 2; } else { y_adj = sum_rows - d.height; } // in each case, add the adjustment for the cell, then subtract // the correction after applying it. This prevents the corrections // from improperly accumulating across cells. Padding must be handled // explicitly for each case. // Alignment follows this pattern within the spanned cells: // 8 1 2 or NW N NE // 7 0 3 W 0 E // 6 5 4 SW S SE switch ( q.a ) { case N: // top center x += x_adj / 2 ; y += q.p; c.setBounds(x, y, d.width, d.height); x -= x_adj / 2; y -= q.p; break; case NE: // top right x += x_adj - q.p; y += q.p; c.setBounds(x, y, d.width, d.height); x -= x_adj - q.p; y -= q.p; break; case E: // center right x += x_adj - q.p; y += y_adj / 2; c.setBounds(x, y, d.width, d.height); x -= x_adj - q.p; y -= y_adj / 2; break; case SE: // bottom right x += x_adj - q.p; y += y_adj - q.p; c.setBounds(x, y, d.width, d.height); x -= x_adj - q.p; y -= y_adj - q.p; break; case S: // bottom center x += x_adj / 2; y += y_adj - q.p; c.setBounds(x, y, d.width, d.height); x -= x_adj / 2; y -= y_adj - q.p; break; case SW: // bottom left x += q.p; y += y_adj - q.p; c.setBounds(x, y, d.width, d.height); x -= q.p; y -= y_adj - q.p; break; case W: // center left x += q.p; y += y_adj / 2; c.setBounds(x, y, d.width, d.height); x -= q.p; y -= y_adj / 2; break; case NW: // top left x += q.p; y += q.p; c.setBounds(x, y, d.width, d.height); x -= q.p; y -= q.p; break; case 0: // dead center default: x += x_adj / 2; y += y_adj / 2; c.setBounds(x, y, d.width, d.height); x -= x_adj / 2; y -= y_adj / 2; break; } } } } } } } antelope-3.5.1.orig/src/ise/library/PrivilegedAccessor.java0000644000175000017500000002733110331172034023615 0ustar drazzibdrazzibpackage ise.library; import java.lang.reflect.*; /** * a.k.a. The "ObjectMolester"

* * This class is used to access a method or field of an object no matter what * the access modifier of the method or field. The syntax for accessing fields * and methods is out of the ordinary because this class uses reflection to peel * away protection.

* * Here is an example of using this to access a private member. resolveName * is a private method of Class.

 * Class c = Class.class;
 * System.out.println(
 *      PrivilegedAccessor.invokeMethod( c,
 *                                       "resolveName",
 *                                       "/ise/library/PrivilegedAccessor" ) );
 * 
* * @author Charlie Hubbard (chubbard@iss.net) * @author Prashant Dhokte (pdhokte@iss.net) * @author Dale Anson (danson@germane-software.com) * @version $Revision: 138 $ */ public class PrivilegedAccessor { /** * Gets the value of the named field and returns it as an object. * * @param instance the object instance * @param fieldName the name of the field * @return an object representing the value of * the field * @exception IllegalAccessException Description of Exception * @exception NoSuchFieldException Description of Exception */ public static Object getValue(Object instance, String fieldName) throws IllegalAccessException, NoSuchFieldException { Field field = getField(instance.getClass(), fieldName); field.setAccessible(true); return field.get(instance); } /** * Sets the value of the named field. * * @param instance the object instance * @param fieldName the name of the field * @param value the value to set for the field * @exception IllegalAccessException Description of Exception * @exception NoSuchFieldException Description of Exception */ public static void setValue(Object instance, String fieldName, Object value) throws IllegalAccessException, NoSuchFieldException { Field field = getField(instance.getClass(), fieldName); field.setAccessible(true); field.set(instance, value); } /** * Gets the value of the named static field and returns it as an object. * * @param fieldName the name of the field * @param c * @return an object representing the value of * the field * @exception IllegalAccessException Description of Exception * @exception NoSuchFieldException Description of Exception */ public static Object getStaticValue(Class c, String fieldName) throws IllegalAccessException, NoSuchFieldException { Field field = getField(c, fieldName); field.setAccessible(true); return field.get(null); } /** * Calls a method on the given object instance with the given argument. * * @param instance the object instance * @param methodName the name of the method to invoke * @param arg the argument to pass to the method * @return Description of the Returned Value * @exception NoSuchMethodException Description of Exception * @exception IllegalAccessException Description of Exception * @exception InvocationTargetException Description of Exception * @see * PrivilegedAccessor#invokeMethod(Object,String,Object[]) */ public static Object invokeMethod(Object instance, String methodName, Object arg) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { Object[] args = new Object[1]; args[0] = arg; return invokeMethod(instance, methodName, args); } /** * Calls a method on the given object instance with the given arguments. * * @param instance the object instance * @param methodName the name of the method to invoke * @param args an array of objects to pass as * arguments * @return Description of the Returned Value * @exception NoSuchMethodException Description of Exception * @exception IllegalAccessException Description of Exception * @exception InvocationTargetException Description of Exception * @see * PrivilegedAccessor#invokeMethod(Object,String,Object) */ public static Object invokeMethod(Object instance, String methodName, Object[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { //Class[] classTypes = getClassArray( args ); //return getMethod( instance, methodName, classTypes ).invoke( instance, args ); if (args == null) args = new Object[]{}; Class[] classTypes = getClassArray(args); Method[] methods = instance.getClass().getDeclaredMethods(); boolean found = false; for (int i = 0; i < methods.length; i++) { Method method = methods[i]; Class[] paramTypes = method.getParameterTypes(); if (method.getName().equals(methodName) && compare(paramTypes, args)) { method.setAccessible(true); return method.invoke(instance, args); } } StringBuffer sb = new StringBuffer(); sb.append("No method named ").append(methodName).append(" found in ").append(instance.getClass().getName()).append(" with parameters ("); for (int x = 0; x < classTypes.length; x++) { sb.append(classTypes[x].getName()); if (x < classTypes.length - 1) sb.append(", "); } sb.append(")"); throw new NoSuchMethodException(sb.toString()); } /** * Converts the object array to an array of Classes. * * @param args the object array to convert * @return a Class array */ private static Class[] getClassArray(Object[] args) { Class[] classTypes = null; if (args != null) { classTypes = new Class[args.length]; for (int i = 0; i < args.length; i++) { if (args[i] != null) classTypes[i] = args[i].getClass(); } } return classTypes; } /** * @param instance the object instance * @param methodName the * @param classTypes * @return The method value * @exception NoSuchMethodException Description of Exception */ public static Method getMethod(Object instance, String methodName, Class[] classTypes) throws NoSuchMethodException { Method accessMethod = getMethod(instance.getClass(), methodName, classTypes); accessMethod.setAccessible(true); return accessMethod; } /** * Return the named field from the given class. * * @param thisClass * @param fieldName * @return The field value * @exception NoSuchFieldException Description of Exception */ public static Field getField(Class thisClass, String fieldName) throws NoSuchFieldException { if (thisClass == null) throw new NoSuchFieldException("Invalid field : " + fieldName); try { return thisClass.getDeclaredField(fieldName); } catch (NoSuchFieldException e) { return getField(thisClass.getSuperclass(), fieldName); } } /** * Return the named method with a method signature matching classTypes from * the given class. * * @param thisClass * @param methodName * @param classTypes * @return The method value * @exception NoSuchMethodException Description of Exception */ public static Method getMethod(Class thisClass, String methodName, Class[] classTypes) throws NoSuchMethodException { if (thisClass == null) throw new NoSuchMethodException("Invalid method : " + methodName); try { return thisClass.getDeclaredMethod(methodName, classTypes); } catch (NoSuchMethodException e) { return getMethod(thisClass.getSuperclass(), methodName, classTypes); } } /** * Description of the Method * * @param c * @param args * @return Description of the Returned Value */ private static boolean compare(Class[] c, Object[] args) { if (c.length != args.length) { return false; } if (c.length == 0) return true; for (int i = 0; i < args.length; i++) { if (!c[i].isInstance(args[i])) { return false; } } return true; } /** * Creates a new instance of the named class initialized with the given * arguments. * * @param classname the name of the class to * instantiate. * @param args the arguments to pass as parameters * to the constructor of the class. * @return the instantiated object * @exception ClassNotFoundException Description of Exception * @exception InstantiationException Description of Exception * @exception NoSuchMethodException Description of Exception * @exception IllegalAccessException Description of Exception * @exception InvocationTargetException Description of Exception */ public static Object getNewInstance(String classname, Object[] args) throws ClassNotFoundException, InstantiationException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (classname == null) throw new ClassNotFoundException(); return getNewInstance(Class.forName(classname), args); } /** * Gets the newInstance attribute of the PrivilegedAccessor class * * @param c * @param args * @return The newInstance value * @exception ClassNotFoundException Description of Exception * @exception InstantiationException Description of Exception * @exception NoSuchMethodException Description of Exception * @exception IllegalAccessException Description of Exception * @exception InvocationTargetException Description of Exception */ public static Object getNewInstance(Class c, Object[] args) throws ClassNotFoundException, InstantiationException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (c == null) throw new ClassNotFoundException(); if (args == null) args = new Object[]{}; Class[] classTypes = getClassArray(args); Constructor[] constructors = c.getConstructors(); for (int i = 0; i < constructors.length; i++) { Constructor constructor = constructors[i]; Class[] paramTypes = constructor.getParameterTypes(); if (compare(paramTypes, args)) { return constructor.newInstance(args); } } StringBuffer sb = new StringBuffer(); sb.append("No constructor found for ").append(c.getName()).append(" with parameters ("); for (int x = 0; x < classTypes.length; x++) { sb.append(classTypes[x].getName()); if (x < classTypes.length - 1) sb.append(", "); } sb.append(")"); throw new NoSuchMethodException(sb.toString()); } } antelope-3.5.1.orig/src/ise/library/SetOps.java0000644000175000017500000000035110046760304021254 0ustar drazzibdrazzibpackage ise.library; /** * Simply calls ListOps to do any work. ListOps handles both Sets and Lists, * but it seems like it is nice to have a SetOps and a ListOps. * @author Dale Anson */ public class SetOps extends ListOps { } antelope-3.5.1.orig/src/ise/library/ascii/0000755000175000017500000000000010637540656020301 5ustar drazzibdrazzibantelope-3.5.1.orig/src/ise/library/ascii/MessageBox.java0000644000175000017500000002510710331172034023164 0ustar drazzibdrazzib/* Copyright (c) Dale Anson, 2004 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package ise.library.ascii; import java.io.*; import java.text.*; import java.util.*; /** * An ascii text message box. * * @version $Revision: 138 $ */ public class MessageBox { private static String LS = System.getProperty( "line.separator" ); private static int MAX_WIDTH = 60; public static void setMaxWidth(int width) { MAX_WIDTH = width; } public static int getMaxWidth() { return MAX_WIDTH; } /** * Create a box with the given text. * * @param text the message * @return a nicely formatted message box */ public static String box( CharSequence text ) { return box( null, text ); } /** * Create a box with the given text and title. * * @param title title to be placed above the message box * @param text the message * @return a nicely formatted message box */ public static String box( CharSequence title, CharSequence text ) { if ( title == null && text == null ) return ""; if ( title != null && text == null ) { text = title; title = null; } List title_lines = getLines( title ); List text_lines = getLines( text ); int width = Math.max( getWidth( title_lines ), getWidth( text_lines ) ); StringBuffer sb = new StringBuffer(); sb.append( LS ); if ( title_lines != null ) sb.append( boxTitle( title_lines, width ) ); sb.append( boxText( text_lines, width ) ); return sb.toString(); } /** * Gets the width of the widest line in the given list * * @param text * @return The width value */ private static int getWidth( List lines ) { if ( lines == null ) return 0; int width = 0; for ( Iterator it = lines.iterator(); it.hasNext(); ) { width = Math.max( width, ( ( String ) it.next() ).length() ); } return width; } /** * Breaks a single long line into several shorter lines of no more than * MAX_WIDTH characters. * * @param line the line to wrap * @return a list of lines, each of which will be no more than * MAX_WIDTH characters long. */ private static List wrapLine( String line ) { List list = new ArrayList(); if ( line.length() <= MAX_WIDTH ) { list.add( line ); return list; } BreakIterator words = BreakIterator.getWordInstance(); words.setText( line ); StringBuffer sb = new StringBuffer(); int start = words.first(); int first = start; int end = start; for ( end = words.next(); end != BreakIterator.DONE; start = end, end = words.next() ) { sb.append( line.substring( start, end ) ); if ( sb.length() > MAX_WIDTH ) break; } String subline = line.substring( first, end ); if ( subline.startsWith( " " ) && !subline.startsWith( " " ) ) { subline = subline.substring( 1 ); } list.add( subline ); if (line.substring(end).length() > 0) list.addAll( wrapLine( line.substring( end + 1 ) ) ); return list; } /** * Reads the given text and separates each line into an item in the returned * list. Lines longer than MAX_WIDTH will be broken into shorter lines. * * @param text * @return The lines value */ private static List getLines( CharSequence text ) { if ( text == null ) return null; ArrayList lines = new ArrayList(); BufferedReader br = new BufferedReader( new StringReader( text.toString() ) ); String line = null; try { while ( true ) { line = br.readLine(); if ( line == null ) break; line = line.replaceAll( "[\t]", " " ); lines.addAll( wrapLine( line ) ); } } catch ( Exception e ) { //e.printStackTrace(); } return lines; } /** * Get the top of the box * * @param lines * @param width * @return Description of the Returned Value */ private static String boxTitle( List lines, int width ) { return boxText( lines, width, false ); } /** * Get the body of the box * * @param lines * @param width * @return Description of the Returned Value */ private static String boxText( List lines, int width ) { return boxText( lines, width, true ); } /** * Get a box, with or without a bottom * * @param lines lines of text to put in box * @param width pad each line to be this wide * @param withBottom maybe add a bottom line * @return Description of the Returned Value */ private static String boxText( List lines, int width, boolean withBottom ) { String hline = getHR( width + 2 ); StringBuffer sb = new StringBuffer(); // top line sb.append( hline ); // body for ( Iterator it = lines.iterator(); it.hasNext(); ) { String line = ( String ) it.next(); sb.append( "| " ); sb.append( line ); for ( int i = line.length(); i < width; i++ ) { sb.append( " " ); } sb.append( " |" ).append( LS ); } // bottom line if ( withBottom ) sb.append( hline ); return sb.toString(); } /** * Gets a horizontal rule. A horizontal rule looks like this:
* +-------------------------+
* The actual width of the rule will be * width + 2 * * * @param width the number of dashes in the rule * @return a line with a leading + followed by width * dashes, followed by another +. */ private static String getHR( int width ) { StringBuffer sb = new StringBuffer(); sb.append( "+" ); for ( int i = 0; i < width; i++ ) { sb.append( "-" ); } sb.append( "+" ); sb.append( LS ); return sb.toString(); } /** * The main program for the StringBox class * * @param args The command line arguments */ public static void main( String[] args ) { StringBuffer sb = new StringBuffer(); sb.append( "1) jdbc.oracle.whatever:@hoser" ).append( LS ); sb.append( "\tcom.oracle.jdbc.Driver" ).append( LS ); sb.append( "x) Cancel" ); sb.append( "Character boundary analysis allows users to interact with characters as they expect to, for example, when moving the cursor around through a text string. Character boundary analysis provides correct navigation of through character strings, regardless of how the character is stored. For example, an accented character might be stored as a base character and a diacritical mark. What users consider to be a character can differ between languages." ); System.out.println( MessageBox.box( "Select a database:", sb.toString() ) ); sb = new StringBuffer(); sb.append( "-> Error: Something unusual has occured to cause the driver to fail. Please report this exception: Exception: java.sql.SQLException: FATAL: user 'Bulldog' does not exist\n" ); sb.append( "\n" ); sb.append( "Stack Trace:\n" ); sb.append( "\n" ); sb.append( "java.sql.SQLException: FATAL: user 'bulldog' does not exist\n" ); sb.append( "at org.postgresql.Connection.openConnection(Connection.java:241)\n" ); sb.append( "at org.postgresql.Driver.connect(Driver.java:122)\n" ); sb.append( "at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(ctionFactory.java:37)\n" ); sb.append( "at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java 90)\n" ); sb.append( "at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java 771)\n" ); sb.append( "at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java 5)\n" ); sb.append( "at ise.dbconsole.DbConsoleDAO.getConnection(DbConsoleDAO.java:829)\n" ); sb.append( "at ise.dbconsole.DbConsoleDAO.getDbInfo(DbConsoleDAO.java:152)\n" ); sb.append( "at ise.dbconsole.command.DbInfoCommand.execute(DbInfoCommand.java:49\n" ); sb.append( "at ise.dbconsole.command.DbInfoCommand.execute(DbInfoCommand.java:41\n" ); sb.append( "at ise.dbconsole.command.SetupDAOCommand2.createDAO(SetupDAOCommand2.java:163)\n" ); sb.append( "at ise.dbconsole.command.SetupDAOCommand2.setupDAO(SetupDAOCommand2.javaa:145)\n" ); sb.append( "at ise.dbconsole.command.SetupDAOCommand2.execute(SetupDAOCommand2.java:69)\n" ); sb.append( "at ise.dbconsole.command.SetupDAOCommand2.execute(SetupDAOCommand2.java:56)\n" ); sb.append( "at ise.dbconsole.DbConsole.executeCommand(DbConsole.java:521)\n" ); sb.append( "at ise.dbconsole.DbConsole$1.run(DbConsole.java:158)\n" ); sb.append( "End of Stack Trace\n" ); System.out.println( MessageBox.box( "Here's an exception:", sb.toString() ) ); } } antelope-3.5.1.orig/src/ise/library/StopWatch.java0000644000175000017500000001630710325771064021770 0ustar drazzibdrazzib/* * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Ant", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package ise.library; /** * A stopwatch, useful for 'quick and dirty' performance testing. Typical usage: *
 * StopWatch sw = new StopWatch();  // automatically starts
 * // do something here...
 * sw.stop();
 * System.out.println(sw.toString());   // print the total
 * sw.start();  // restart the stopwatch
 * // do some more things...
 * sw.stop();
 * System.out.println(sw.format(sw.elapsed()); // print the time since the last start
 * System.out.println(sw.toString()); // print the cumulative total
 * 
 * 
* @author Dale Anson * @version $Revision: 131 $ */ public class StopWatch { /** an identifying name for this stopwatch */ private String name = ""; /** storage for start time */ private long startTime = 0; /** storage for stop time */ private long stopTime = 0; /** cumulative elapsed time */ private long totalTime = 0; /** is the stopwatch running? */ private boolean running = false; /** * Starts the stopwatch. */ public StopWatch() { this( "" ); } /** * Starts the stopwatch. * @param name an identifying name for this StopWatch */ public StopWatch( String name ) { this.name = name; start(); } /** * Starts/restarts the stopwatch. stop must be called prior * to restart. * * @return the start time, the long returned System.currentTimeMillis(). */ public long start() { if ( !running ) startTime = System.currentTimeMillis(); running = true; return startTime; } /** * Stops the stopwatch. * * @return the stop time, the long returned System.currentTimeMillis(). */ public long stop() { stopTime = System.currentTimeMillis(); if ( running ) { totalTime += stopTime - startTime; } running = false; return stopTime; } /** * Total cumulative elapsed time. Stops the stopwatch. * * @return the total time */ public long total() { stop(); return totalTime; } /** * Elapsed time, difference between the last start time and now. * * @return the elapsed time */ public long elapsed() { return System.currentTimeMillis() - startTime; } /** * @return the name of this StopWatch */ public String getName() { return name; } /** * Formats the given time into decimal seconds. * @return the time formatted as mm:ss.ddd */ public String format( long ms ) { String total = String.valueOf( ms ); String frontpad = "000"; int pad_length = 3 - total.length(); if ( pad_length >= 0 ) total = "0." + frontpad.substring( 0, pad_length ) + total; else { String dec = total.substring( total.length() - 3 ); total = ""; int min = 0, sec = 0; min = ( int ) ( ms / 60000 ); sec = min > 0 ? ( int ) ( ( ms - ( min * 60000 ) ) / 1000 ) : ( int ) ( ms / 1000 ); if ( min > 0 ) { total = String.valueOf( min ) + ":" + ( sec < 10 ? "0" : "" ) + String.valueOf( sec ) + "." + dec; } else { total = String.valueOf( sec ) + "." + dec; } } return total + " sec"; } /** * Returns the total elapsed time of the stopwatch formatted in decimal seconds. * @return [name: mm:ss.ddd] */ public String toString() { StringBuffer sb = new StringBuffer(); sb.append( "[" ); if ( name != null ) sb.append( name ).append( ": " ); sb.append( format( totalTime ) ); sb.append( "]" ); return sb.toString(); } public static void main ( String[] args ) { StopWatch sw = new StopWatch( "test" ); // test the formatter System.out.println( sw.format( 1 ) ); System.out.println( sw.format( 10 ) ); System.out.println( sw.format( 100 ) ); System.out.println( sw.format( 1000 ) ); System.out.println( sw.format( 100000 ) ); System.out.println( sw.format( 1000000 ) ); // test the stopwatch try { System.out.println( "StopWatch: " + sw.getName() ); Thread.currentThread().sleep( 2000 ); sw.stop(); System.out.println( sw.toString() ); sw.start(); Thread.currentThread().sleep( 2000 ); sw.stop(); System.out.println( "elapsed: " + sw.format( sw.elapsed() ) ); System.out.println( "total: " + sw.format( sw.total() ) ); } catch ( Exception e ) { e.printStackTrace(); } } } antelope-3.5.1.orig/src/ise/library/ListOps.java0000644000175000017500000001744410046760304021447 0ustar drazzibdrazzibpackage ise.library; import java.util.*; /** * Set operations for Lists and Sets: *
    *
  • union: a combined set consisting of the unique elements of two sets
  • *
  • intersection: a set containing elements that are members of both sets
  • *
  • symmetric difference: a set containing elements that are in one or the other of, but not both, sets
  • *
  • difference: a set containing the elements of one set minus any elements in the second set
  • *
  • cartesian product: the set of all ordered pairs with the first element of each pair selected from one set and the second element selected from the other. *
* and some utility functions: *
    *
  • isSubset: returns true if all elements of the second set are elements of the first set
  • *
  • equals: returns true if both sets contain the same elements
  • *
  • disjoint: returns true if no elements of either set are contained in the other
  • *
  • toSet: converts a list to a set
  • *
  • toList: converts a set to a list
  • *
* There are some interesting side effects: Suppose you have an ArrayList, a, that * may contain duplicates. Calling toList(toSet(a)) return a new ArrayList sorted * in the same order as a but containing no duplicates. * @author Dale Anson */ public class ListOps { /** * Performs a union of two sets. The elements of the returned set will be * ordered with elements of a first (in their original order), * followed by elements of b, in their original order. * @param a one set * @param b the other set * @return a List containing the elements of both lists with no duplicates. */ public static Set union( Set a, Set b ) { LinkedHashSet union = new LinkedHashSet( a ); union.addAll( b ); return union; } /** * Performs a union of two lists. The elements of the returned list will be * ordered with elements of a first (in their original order), * followed by elements of b, in their original order. * @param a one list * @param b the other list * @return a List containing the elements of both lists with no duplicates. */ public static List union( List a, List b ) { Set union = union( toSet( a ), toSet( b ) ); return new ArrayList( union ); } /** * Finds the intersection of two sets. Ordering is the order that the elements * are in in set a. * @param one set * @param the other set * @return the intersection of the two sets, may be empty, will not be null. */ public static Set intersection( Set a, Set b ) { LinkedHashSet intersection = new LinkedHashSet(); Iterator itr = a.iterator(); while ( itr.hasNext() ) { Object o = itr.next(); if ( b.contains( o ) ) intersection.add( o ); } return intersection; } /** * Finds the intersection of two Lists. Ordering is the order that the elements * are in in List a. * @param one List * @param the other List * @return the intersection of the two List, may be empty, will not be null. */ public static List intersection( List a, List b ) { return toList( intersection( toSet( a ), toSet( b ) ) ); } /** * Finds the difference of set a and set b. * @param a the first set * @param b the other set * @return a set containing the elements of set a that are NOT also * in set b. */ public static Set difference( Set a, Set b ) { LinkedHashSet difference = new LinkedHashSet(); Iterator itr = a.iterator(); while ( itr.hasNext() ) { Object o = itr.next(); if ( !b.contains( o ) ) difference.add( o ); } return difference; } /** * Finds the difference of list a and list b. * @param a the first list * @param b the other list * @return a set containing the elements of list a that are NOT also * in list b. */ public static List difference( List a, List b ) { return toList( difference( toSet( a ), toSet( b ) ) ); } /** * Finds the symmetric difference of set a and set b. * @param a the first set * @param b the other set * @return a set containing the elements of set a that are NOT also * in set b unioned with the elements of set b that * are NOT also in set a. */ public static Set symmetricDifference( Set a, Set b ) { return union( difference( a, b ), difference( b, a ) ); } /** * Finds the symmetric difference of list a and list b. * @param a the first list * @param b the other list * @return a list containing the elements of list a that are NOT also * in list b unioned with the elements of list b that * are NOT also in list a. */ public static List symmetricDifference( List a, List b ) { return toList( symmetricDifference( toSet( a ), toSet( b ) ) ); } /** * Constructs the Cartesian product of two sets. The values in the returned * TableArray are ListOps.Pairs. * @param a one set * @param b the other set * @return the Cartesian product of the two sets. */ public static TableArray product( Set a, Set b ) { TableArray product = new TableArray(); Iterator itra = a.iterator(); for ( int y = 0; itra.hasNext(); y++ ) { Object key = itra.next(); Iterator itrb = b.iterator(); for ( int x = 0; itrb.hasNext(); x++ ) { Object value = itrb.next(); product.put( x, y, new Pair( key, value ) ); } } return product; } /** * Constructs the Cartesian product of two Lists. The values in the returned * TableArray are ListOps.Pairs. * @param a one set * @param b the other set * @return the Cartesian product of the two sets. */ public static TableArray product( List a, List b ) { return product( toSet( a ), toSet( b ) ); } /** * @return true if all elements of b are also in a. */ public static boolean isSubset( Set a, Set b ) { return a.containsAll( b ); } /** * @return true if all elements of b are also in a. */ public static boolean isSubset( List a, List b ) { return isSubset( toSet( a ), toSet( b ) ); } /** * @return true if both sets contain the same elements. */ public static boolean equals( Set a, Set b ) { return isSubset( a, b ) && isSubset( b, a ); } /** * @return true if both Lists contain the same elements. */ public static boolean equals( List a, List b ) { return equals( toSet( a ), toSet( b ) ); } /** * Converts a List to a Set. */ public static Set toSet( List a ) { return new LinkedHashSet( a ); } /** * Converts a Set to a List. */ public static List toList( Set a ) { return new ArrayList( a ); } /** * Used by product, represents an ordered pair. */ public static class Pair { public Object x = null; public Object y = null; public Pair() {} public Pair( Object a, Object b ) { x = a; y = b; } public String toString() { StringBuffer sb = new StringBuffer(); sb.append("("); sb.append(x == null ? "null" : x.toString()); sb.append(","); sb.append(y == null ? "null" : y.toString()); sb.append(")"); return sb.toString(); } } } antelope-3.5.1.orig/src/ise/antelope/0000755000175000017500000000000010637540664017353 5ustar drazzibdrazzibantelope-3.5.1.orig/src/ise/antelope/launcher/0000755000175000017500000000000011056552274021150 5ustar drazzibdrazzibantelope-3.5.1.orig/src/ise/antelope/launcher/FileUtilities.java0000644000175000017500000001310410252644454024564 0ustar drazzibdrazzibpackage ise.antelope.launcher; import java.io.*; /** * Some file copy utilities. These are rock solid. * @author Dale Anson, danson@germane-software.com */ public class FileUtilities { /** * Buffer size for read and write operations. */ public static int BUFFER_SIZE = 8192; /** * Copies one file to another. If destination file exists, it will be * overwritten. * * @param from file to copy * @param to where to put it * @exception Exception most likely an IOException */ public static void copy(File from, File to) throws Exception { copyFile(from, to); } /** * Copies a stream to a file. If destination file exists, it will be * overwritten. The input stream will be closed when this method returns. * * @param from stream to copy from * @param to file to write * @exception Exception most likely an IOException */ public static void copy(InputStream is, File to) throws Exception { copyToFile(is, to); } /** * Copies a stream to a file. If destination file exists, it will be * overwritten. The input stream may be closed when this method returns. * * @param from stream to copy from * @param to file to write * @param close whether to close the input stream when done * @exception Exception most likely an IOException */ public static void copy(InputStream is, boolean close, File to) throws Exception { copyToFile(is, close, to); } /** * Copies a stream to another stream. The input stream will be closed when * this method returns. * * @param from stream to copy from * @param to file to write * @exception Exception most likely an IOException */ public static void copy(InputStream is, OutputStream os) throws Exception { copyToStream(is, os); } /** * Copies a reader to a writer. The reader will be closed when * this method returns. * * @param from Reader to read from * @param to Writer to write to * @exception Exception most likely an IOException */ public static void copy(Reader r, Writer w) throws Exception { copyToWriter(r, w); } /** * Copies one file to another. If destination file exists, it will be * overwritten. * * @param from file to copy * @param to where to put it * @exception Exception most likely an IOException */ public static void copyFile( File from, File to ) throws Exception { if ( !from.exists() ) return ; FileInputStream in = new FileInputStream( from ); FileOutputStream out = new FileOutputStream( to ); byte[] buffer = new byte[ BUFFER_SIZE ]; int bytes_read; while ( true ) { bytes_read = in.read( buffer ); if ( bytes_read == -1 ) break; out.write( buffer, 0, bytes_read ); } out.flush(); out.close(); in.close(); } /** * Copies a stream to a file. If destination file exists, it will be * overwritten. The input stream will be closed when this method returns. * * @param from stream to copy from * @param to file to write * @exception Exception most likely an IOException */ public static void copyToFile( InputStream from, File to ) throws Exception { copyToFile( from, true, to ); } /** * Copies a stream to a file. If destination file exists, it will be * overwritten. The input stream may be closed when this method returns. * * @param from stream to copy from * @param to file to write * @param close whether to close the input stream when done * @exception Exception most likely an IOException */ public static void copyToFile( InputStream from, boolean close, File to ) throws Exception { FileOutputStream out = new FileOutputStream( to ); byte[] buffer = new byte[ BUFFER_SIZE ]; int bytes_read; while ( true ) { bytes_read = from.read( buffer ); if ( bytes_read == -1 ) break; out.write( buffer, 0, bytes_read ); } out.flush(); out.close(); if ( close ) from.close(); } /** * Copies a stream to another stream. The input stream will be closed when * this method returns. * * @param from stream to copy from * @param to file to write * @exception Exception most likely an IOException */ public static void copyToStream( InputStream from, OutputStream to ) throws Exception { byte[] buffer = new byte[ BUFFER_SIZE ]; int bytes_read; while ( true ) { bytes_read = from.read( buffer ); if ( bytes_read == -1 ) break; to.write( buffer, 0, bytes_read ); } to.flush(); from.close(); } /** * Copies a reader to a writer. The reader will be closed when * this method returns. * * @param from Reader to read from * @param to Writer to write to * @exception Exception most likely an IOException */ public static void copyToWriter( Reader from, Writer to ) throws Exception { char[] buffer = new char[ BUFFER_SIZE ]; int chars_read; while ( true ) { chars_read = from.read( buffer ); if ( chars_read == -1 ) break; to.write( buffer, 0, chars_read ); } to.flush(); from.close(); } } antelope-3.5.1.orig/src/ise/antelope/launcher/JarURL.java0000644000175000017500000000000110226275024023072 0ustar drazzibdrazzib antelope-3.5.1.orig/src/ise/antelope/launcher/Os.java0000644000175000017500000003350010252643670022373 0ustar drazzibdrazzib/* * The Apache Software License, Version 1.1 * * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package ise.antelope.launcher; import java.io.*; import java.util.Hashtable; import java.util.Locale; import java.util.Vector; /** * ***** Dale Anson: Modified to not be Ant specific by removing "extends Condition" * and replacing BuildExceptions. Added getEnvironmentValue and associated methods. * ***** * Condition that tests the OS type. * * @author Stefan Bodewig * @author Magesh Umasankar * @since Ant 1.4 * @version $Revision: 123 $ */ public class Os { private static final String OS_NAME = System.getProperty( "os.name" ).toLowerCase( Locale.US ); private static final String OS_ARCH = System.getProperty( "os.arch" ).toLowerCase( Locale.US ); private static final String OS_VERSION = System.getProperty( "os.version" ).toLowerCase( Locale.US ); private static final String PATH_SEP = System.getProperty( "path.separator" ); private String family; private String name; private String version; private String arch; private static Hashtable environment; /** * Default constructor * */ public Os() {} /** * Constructor that sets the family attribute * * @param family a String value */ public Os( String family ) { setFamily( family ); } /** * Sets the desired OS family type * * @param f The OS family type desired
* Possible values:
*
    *
  • dos
  • *
  • mac
  • *
  • netware
  • *
  • os/2
  • *
  • tandem
  • *
  • unix
  • *
  • windows
  • *
  • win9x
  • *
  • z/os
  • *
  • os/400
  • *
*/ public void setFamily( String f ) { family = f.toLowerCase( Locale.US ); } /** * Sets the desired OS name * * @param name The OS name */ public void setName( String name ) { this.name = name.toLowerCase( Locale.US ); } /** * Sets the desired OS architecture * * @param arch The OS architecture */ public void setArch( String arch ) { this.arch = arch.toLowerCase( Locale.US ); } /** * Sets the desired OS version * * @param version The OS version */ public void setVersion( String version ) { this.version = version.toLowerCase( Locale.US ); } /** * Determines if the OS on which Ant is executing matches the type of * that set in setFamily. * @see Os#setFamily(String) */ public boolean eval() { return isOs( family, name, arch, version ); } /** * Determines if the OS on which Ant is executing matches the * given OS family. * @param family the family to check for * @return true if the OS matches * @since 1.5 */ public static boolean isFamily( String family ) { return isOs( family, null, null, null ); } /** * Determines if the OS on which Ant is executing matches the * given OS name. * * @param name the OS name to check for * @return true if the OS matches * @since 1.7 */ public static boolean isName( String name ) { return isOs( null, name, null, null ); } /** * Determines if the OS on which Ant is executing matches the * given OS architecture. * * @param arch the OS architecture to check for * @return true if the OS matches * @since 1.7 */ public static boolean isArch( String arch ) { return isOs( null, null, arch, null ); } /** * Determines if the OS on which Ant is executing matches the * given OS version. * * @param version the OS version to check for * @return true if the OS matches * @since 1.7 */ public static boolean isVersion( String version ) { return isOs( null, null, null, version ); } /** * Determines if the OS on which Ant is executing matches the * given OS family, name, architecture and version * * @param family The OS family * @param name The OS name * @param arch The OS architecture * @param version The OS version * @return true if the OS matches * @since 1.7 */ public static boolean isOs( String family, String name, String arch, String version ) { boolean retValue = false; if ( family != null || name != null || arch != null || version != null ) { boolean isFamily = true; boolean isName = true; boolean isArch = true; boolean isVersion = true; if ( family != null ) { if ( family.equals( "windows" ) ) { isFamily = OS_NAME.indexOf( "windows" ) > -1; } else if ( family.equals( "os/2" ) ) { isFamily = OS_NAME.indexOf( "os/2" ) > -1; } else if ( family.equals( "netware" ) ) { isFamily = OS_NAME.indexOf( "netware" ) > -1; } else if ( family.equals( "dos" ) ) { isFamily = PATH_SEP.equals( ";" ) && !isFamily( "netware" ); } else if ( family.equals( "mac" ) ) { isFamily = OS_NAME.indexOf( "mac" ) > -1; } else if ( family.equals( "tandem" ) ) { isFamily = OS_NAME.indexOf( "nonstop_kernel" ) > -1; } else if ( family.equals( "unix" ) ) { isFamily = PATH_SEP.equals( ":" ) && !isFamily( "openvms" ) && ( !isFamily( "mac" ) || OS_NAME.endsWith( "x" ) ); } else if ( family.equals( "win9x" ) ) { isFamily = isFamily( "windows" ) && ( OS_NAME.indexOf( "95" ) >= 0 || OS_NAME.indexOf( "98" ) >= 0 || OS_NAME.indexOf( "me" ) >= 0 || OS_NAME.indexOf( "ce" ) >= 0 ); } else if ( family.equals( "z/os" ) ) { isFamily = OS_NAME.indexOf( "z/os" ) > -1 || OS_NAME.indexOf( "os/390" ) > -1; } else if ( family.equals( "os/400" ) ) { isFamily = OS_NAME.indexOf( "os/400" ) > -1; } else if ( family.equals( "openvms" ) ) { isFamily = OS_NAME.indexOf( "openvms" ) > -1; } else { /* throw new BuildException( "Don\'t know how to detect os family \"" + family + "\""); */ return false; } } if ( name != null ) { isName = name.equals( OS_NAME ); } if ( arch != null ) { isArch = arch.equals( OS_ARCH ); } if ( version != null ) { isVersion = version.equals( OS_VERSION ); } retValue = isFamily && isName && isArch && isVersion; } return retValue; } /** * Dale Anson: One of the main reasons I borrowed this class from Ant was to * be able to read environment variables. It makes sense to add a method to * easily fetch the value of an environment variable here. * @param name the name of an environment variable. Much of this code was * copied from org.apache.tools.ant.taskdefs.Execute. * @return the value of the environment variable, or null if there is no value * for the given name */ public static String getEnvironmentValue( String name ) { if ( environment != null ) { return ( String ) environment.get( name ); } environment = new Hashtable(); try { String[] env_cmd = getProcEnvCommand(); Process process = Runtime.getRuntime().exec( env_cmd ); InputStream is = new BufferedInputStream( process.getInputStream() ); ByteArrayOutputStream baos = new ByteArrayOutputStream(); FileUtilities.copy( is, baos ); BufferedReader in = new BufferedReader( new StringReader( baos.toString() ) ); // this portion copied from org.apache.tools.ant.taskdefs.Execute // Vector procEnvironment = new Vector(); String var = null; String line, lineSep = System.getProperty( "line.separator" ); while ( ( line = in.readLine() ) != null ) { if ( line.indexOf( '=' ) == -1 ) { // Chunk part of previous env var (UNIX env vars can // contain embedded new lines). if ( var == null ) { var = lineSep + line; } else { var += lineSep + line; } } else { // New env var...append the previous one if we have it. if ( var != null ) { procEnvironment.addElement( var ); } var = line; } } // Since we "look ahead" before adding, there's one last env var. if ( var != null ) { procEnvironment.addElement( var ); } // end copy from Execute // // now split out the names from the values and populate a Hashtable if ( procEnvironment.size() > 0 ) { java.util.Iterator it = procEnvironment.iterator(); while ( it.hasNext() ) { var = ( String ) it.next(); int index = var.indexOf( "=" ); String key = var.substring( 0, index ); String value = var.substring( index + 1 ); environment.put( key, value ); } } } catch ( Exception ignored ) {} return getEnvironmentValue( name ); } /** * Dale Anson: Copied from org.apache.tools.ant.taskdefs.Execute. It's a private method in * that class, so I can't access it directly. */ private static String[] getProcEnvCommand() { if ( Os.isFamily( "os/2" ) ) { // OS/2 - use same mechanism as Windows 2000 String[] cmd = {"cmd", "/c", "set" }; return cmd; } else if ( Os.isFamily( "windows" ) ) { // Determine if we're running under XP/2000/NT or 98/95 if ( !Os.isFamily( "win9x" ) ) { // Windows XP/2000/NT String[] cmd = {"cmd", "/c", "set" }; return cmd; } else { // Windows 98/95 String[] cmd = {"command.com", "/c", "set" }; return cmd; } } else if ( Os.isFamily( "z/os" ) || Os.isFamily( "unix" ) ) { // On most systems one could use: /bin/sh -c env // Some systems have /bin/env, others /usr/bin/env, just try String[] cmd = new String[ 1 ]; if ( new File( "/bin/env" ).canRead() ) { cmd[ 0 ] = "/bin/env"; } else if ( new File( "/usr/bin/env" ).canRead() ) { cmd[ 0 ] = "/usr/bin/env"; } else { // rely on PATH cmd[ 0 ] = "env"; } return cmd; } else if ( Os.isFamily( "netware" ) || Os.isFamily( "os/400" ) ) { // rely on PATH String[] cmd = {"env"}; return cmd; } else if ( Os.isFamily( "openvms" ) ) { String[] cmd = {"show", "logical"}; return cmd; } else { // MAC OS 9 and previous //TODO: I have no idea how to get it, someone must fix it String[] cmd = null; return cmd; } } } antelope-3.5.1.orig/src/ise/antelope/launcher/UserPreferences.java0000644000175000017500000001237510163726476025130 0ustar drazzibdrazzibpackage ise.antelope.launcher; import java.io.*; import java.util.*; import java.util.prefs.*; /** * An implementation of Preferences. There are issues with the default implementation * provided by Java, such as throwing endless exceptions due to invalid assumptions * about file permissions, this implementation does not have those problems. *

* Nodes are named using a / separated naming convention. The preferences are * stored in a tree-like structure, with the root node named "" per the * preferences specification. A node directly below the root node would be * referenced by a / followed by the node name, for example "/node0". Node below * the initial child nodes follow the same convention, so "/node0/child0/kid2" * references a node 3 levels below the root node. *

* To store a value, call one of the various put methods. For example, * to store a username, you might call put("/myapp/userinfo/username", username). * To get the value, call one of the various get methods. For example, * to get the username, you might call get("/myapp/userinfor/username", ""). *

* Nodes are stored in $user.home/.ise_prefs. In this implementation, system nodes * are the same as user nodes. * @author Dale Anson, Jan 2004 */ public class UserPreferences extends AbstractPreferences { private Hashtable root; private Hashtable children; private boolean isRemoved = false; /** * Makes a node with prefs as parent and name as * the name of this node. As per the Preferences spec, if prefs * is null and name is "", this node will be a root node. * @param prefs parent preferences * @param name name for this node */ public UserPreferences( UserPreferences prefs, String name ) { super( prefs, name ); root = new Hashtable(); children = new Hashtable(); try { sync(); } catch ( Exception e ) { e.printStackTrace(); } } protected void putSpi( String key, String value ) { root.put( key, value ); } protected String getSpi( String key ) { return ( String ) root.get( key ); } protected void removeSpi( String key ) { root.remove( key ); } protected void removeNodeSpi() throws BackingStoreException { isRemoved = true; } protected String[] keysSpi() throws BackingStoreException { return ( String[] ) root.keySet().toArray( new String[] {} ); } protected String[] childrenNamesSpi() throws BackingStoreException { return ( String[] ) children.keySet().toArray( new String[] {} ); } protected AbstractPreferences childSpi( String name ) { UserPreferences child = ( UserPreferences ) children.get( name ); if ( child == null || child.isRemoved() ) { try { child = new UserPreferences( this, name ); children.put( name, child ); } catch ( Exception e ) { e.printStackTrace(); child = null; } } return child; } /** * Returns the directory in which this node stores values, creating the directory * and its parents if necessary. * @return the directory in which this node stores values. */ protected File getDirectory() { try { String name = name(); if ( name == null || name.equals( "" ) ) name = "root"; File dir; if ( parent() == null ) dir = UserPreferencesFactory.PREFS_ROOT; else dir = ( ( UserPreferences ) parent() ).getDirectory(); File my_dir = new File( dir, name ); my_dir.mkdirs(); return my_dir; } catch ( Exception e ) { //e.printStackTrace(); return null; } } protected void syncSpi() throws BackingStoreException { // no-op } public void sync() throws BackingStoreException { try { if ( isRemoved() ) { parent().sync(); return ; } if ( root == null ) { root = new Hashtable(); } File f = new File( getDirectory(), "prefs" ); if ( !f.exists() ) return ; ObjectInputStream decoder = new ObjectInputStream( new FileInputStream( f ) ); Hashtable map = ( Hashtable ) decoder.readObject(); decoder.close(); root.putAll( map ); } catch ( Exception e ) { //e.printStackTrace(); } } public void flushSpi() throws BackingStoreException { try { if ( root == null || root.size() == 0 ) { return ; } if ( isRemoved() ) { parent().flush(); return ; } File dir = getDirectory(); if ( dir == null ) throw new BackingStoreException( "Can't open directory." ); File f = new File( dir, "prefs" ); ObjectOutputStream encoder = new ObjectOutputStream( new FileOutputStream( f ) ); encoder.writeObject( root ); encoder.close(); } catch ( BackingStoreException bse ) { throw bse; } catch ( Exception e ) { // ignore } } protected boolean isRemoved() { return isRemoved; } } antelope-3.5.1.orig/src/ise/antelope/launcher/Locator.java0000644000175000017500000002212210430201212023367 0ustar drazzibdrazzib/* * Copyright 2003-2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package ise.antelope.launcher; import java.net.MalformedURLException; import java.net.URL; import java.io.File; import java.io.FilenameFilter; import java.text.CharacterIterator; import java.text.StringCharacterIterator; import java.util.Locale; import javax.swing.JOptionPane; /** * The Locator is a utility class which is used to find certain items * in the environment * danson: modified for Antelope * * @since Ant 1.6 */ public final class Locator { /** * Not instantiable */ private Locator() { } /** * Find the directory or jar file the class has been loaded from. * * @param c the class whose location is required. * @return the file or jar with the class or null if we cannot * determine the location. * * @since Ant 1.6 */ public static File getClassSource(Class c) { String classResource = c.getName().replace('.', '/') + ".class"; return getResourceSource(c.getClassLoader(), classResource); } /** * Find the directory or jar a give resource has been loaded from. * * @param c the classloader to be consulted for the source * @param resource the resource whose location is required. * * @return the file with the resource source or null if * we cannot determine the location. * * @since Ant 1.6 */ public static File getResourceSource(ClassLoader c, String resource) { if (c == null) { c = Locator.class.getClassLoader(); } URL url = null; if (c == null) { url = ClassLoader.getSystemResource(resource); } else { url = c.getResource(resource); } if (url != null) { String u = url.toString(); if (u.startsWith("jar:file:")) { int pling = u.indexOf("!"); String jarName = u.substring(4, pling); return new File(fromURI(jarName)); } else if (u.startsWith("file:")) { int tail = u.indexOf(resource); String dirName = u.substring(0, tail); return new File(fromURI(dirName)); } } return null; } /** * Constructs a file path from a file: URI. * *

Will be an absolute path if the given URI is absolute.

* *

Swallows '%' that are not followed by two characters, * doesn't deal with non-ASCII characters.

* * @param uri the URI designating a file in the local filesystem. * @return the local file system path for the file. * @since Ant 1.6 */ public static String fromURI(String uri) { URL url = null; try { url = new URL(uri); } catch (MalformedURLException emYouEarlEx) { } if (url == null || !("file".equals(url.getProtocol()))) { throw new IllegalArgumentException("Can only handle valid file: URIs"); } StringBuffer buf = new StringBuffer(url.getHost()); if (buf.length() > 0) { buf.insert(0, File.separatorChar).insert(0, File.separatorChar); } String file = url.getFile(); int queryPos = file.indexOf('?'); buf.append((queryPos < 0) ? file : file.substring(0, queryPos)); uri = buf.toString().replace('/', File.separatorChar); if (File.pathSeparatorChar == ';' && uri.startsWith("\\") && uri.length() > 2 && Character.isLetter(uri.charAt(1)) && uri.lastIndexOf(':') > -1) { uri = uri.substring(1); } StringBuffer sb = new StringBuffer(); CharacterIterator iter = new StringCharacterIterator(uri); for (char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) { if (c == '%') { char c1 = iter.next(); if (c1 != CharacterIterator.DONE) { int i1 = Character.digit(c1, 16); char c2 = iter.next(); if (c2 != CharacterIterator.DONE) { int i2 = Character.digit(c2, 16); sb.append((char) ((i1 << 4) + i2)); } } } else { sb.append(c); } } String path = sb.toString(); return path; } /** * Get the File necessary to load the Sun compiler tools. If the classes * are available to this class, then no additional URL is required and * null is returned. This may be because the classes are explicitly in the * class path or provided by the JVM directly * * @return the tools jar as a File if required, null otherwise */ public static File getToolsJar() { // firstly check if the tools jar is already in the classpath boolean toolsJarAvailable = false; try { // just check whether this throws an exception Class.forName("com.sun.tools.javac.Main"); toolsJarAvailable = true; } catch (Exception e) { try { Class.forName("sun.tools.javac.Main"); toolsJarAvailable = true; } catch (Exception e2) { // ignore } } if (toolsJarAvailable) { return null; } // couldn't find compiler - try to find tools.jar // based on java.home setting String javaHome = System.getProperty("java.home"); System.out.println("JAVA_HOME: " + javaHome); if (javaHome.toLowerCase(Locale.US).endsWith("jre")) { javaHome = javaHome.substring(0, javaHome.length() - 4); } File toolsJar = new File(javaHome + "/lib/tools.jar"); if (!toolsJar.exists()) { JOptionPane.showMessageDialog(null, "Unable to locate tools.jar. Expected to find it in \n\n" + toolsJar.getPath(), "tools.jar Not Found", JOptionPane.WARNING_MESSAGE); return null; } return toolsJar; } /** * Get an array of URLs representing all of the jar files in the * given location. If the location is a file, it is returned as the only * element of the array. If the location is a directory, it is scanned for * jar files * * @param location the location to scan for Jars * * @return an array of URLs for all jars in the given location. * * @exception MalformedURLException if the URLs for the jars cannot be * formed */ public static URL[] getLocationURLs(File location) throws MalformedURLException { return getLocationURLs(location, new String[]{".jar"}); } /** * Get an array or URLs representing all of the files of a given set of * extensions in the given location. If the location is a file, it is * returned as the only element of the array. If the location is a * directory, it is scanned for matching files * * @param location the location to scan for files * @param extensions an array of extension that are to match in the * directory search * * @return an array of URLs of matching files * @exception MalformedURLException if the URLs for the files cannot be * formed */ public static URL[] getLocationURLs(File location, final String[] extensions) throws MalformedURLException { URL[] urls = new URL[0]; if (!location.exists()) { return urls; } if (!location.isDirectory()) { urls = new URL[1]; String path = location.getPath(); for (int i = 0; i < extensions.length; ++i) { if (path.toLowerCase().endsWith(extensions[i])) { urls[0] = location.toURL(); break; } } return urls; } File[] matches = location.listFiles( new FilenameFilter() { public boolean accept(File dir, String name) { for (int i = 0; i < extensions.length; ++i) { if (name.toLowerCase().endsWith(extensions[i])) { return true; } } return false; } }); urls = new URL[matches.length]; for (int i = 0; i < matches.length; ++i) { urls[i] = matches[i].toURL(); } return urls; } } antelope-3.5.1.orig/src/ise/antelope/launcher/WhereIsAntDialog.java0000644000175000017500000001240310163726476025151 0ustar drazzibdrazzibpackage ise.antelope.launcher; import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.*; import java.util.prefs.BackingStoreException; import javax.swing.*; import javax.swing.border.*; import javax.swing.event.*; /** * A dialog to allow the user to specify a location for ant. * * @author Dale Anson * @version $Revision: 116 $ */ public class WhereIsAntDialog extends JDialog implements Constants { private JPanel panel = null; private String ant_home; private JButton ok_btn = null; private ArrayList actionListeners = new ArrayList(); /** Constructor for WhereIsAntDialog */ public WhereIsAntDialog() { super(); setModal(true); setTitle("Where is Ant?"); setContentPane(getPanel()); pack(); GUIUtils.centerOnScreen(this); } /** * Gets the panel attribute of the WhereIsAntDialog object * * @return The panel value */ private JPanel getPanel() { if (panel != null) return panel; KappaLayout panel_layout = new KappaLayout(); panel = new JPanel(panel_layout); panel.setBorder(new EmptyBorder(6, 6, 6, 6)); JLabel label = new JLabel("Ant Home
Change or specify the location of Ant:"); // 0123456 // LLLLLLL // TTTTTTB // S // BB ant_home = AntUtils.getAntHome(); final JTextField ant_home_field = new JTextField(25); ant_home_field.setEditable(false); if (ant_home != null) ant_home_field.setText(ant_home); JButton choose_btn = new JButton("Choose..."); ok_btn = new JButton("OK"); JButton cancel_btn = new JButton("Cancel"); panel.add(label, "0, 0, 6, 1, W, , 3"); panel.add(ant_home_field, "0, 1, 6, 1, 0, wh, 3"); panel.add(choose_btn, "6, 1, 1, 1, 0, wh, 3"); panel.add(KappaLayout.createVerticalStrut(21), "0, 2, 1, 2, 0, h, 3"); panel.add(ok_btn, "5, 3, 1, 1, 0, w, 3"); panel.add(cancel_btn, "6, 3, 1, 1, 0, w, 3"); panel_layout.makeColumnsSameWidth(5, 6); choose_btn.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent ae) { if (ant_home == null || ant_home.equals("")) { ant_home = System.getProperty("user.home"); } JFileChooser chooser = new JFileChooser(ant_home); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); chooser.setDialogTitle("Select Ant Home directory"); int rtn = chooser.showOpenDialog(null); if (rtn == JFileChooser.APPROVE_OPTION) { try { File f = chooser.getSelectedFile(); if (!f.exists()) { JOptionPane.showMessageDialog(null, "Directory " + f.toString() + " does not exist.", "Error", JOptionPane.ERROR_MESSAGE); return; } File ant_jar = new File(f.getAbsolutePath(), "ant.jar"); if (!ant_jar.exists()) { ant_jar = new File(f.getAbsolutePath() + File.separator + "lib", "ant.jar"); if (!ant_jar.exists()) { JOptionPane.showMessageDialog(null, "Directory " + f.toString() + " does not appear to contain Ant.", "Error", JOptionPane.ERROR_MESSAGE); return; } } if (f.equals(new File(ant_home))) { return; } ant_home = f.getAbsolutePath(); ant_home_field.setText(ant_home); } catch (Exception e) { } } } } ); ok_btn.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent ae) { try { PREFS.put(ANT_HOME, ant_home); PREFS.flush(); } catch(BackingStoreException e) { } setVisible(false); dispose(); for ( Iterator it = actionListeners.iterator(); it.hasNext(); ) { ActionListener al = (ActionListener)it.next(); al.actionPerformed(ae); } } }); cancel_btn.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent ae) { setVisible(false); } }); return panel; } /** * Gets the antHome attribute of the WhereIsAntDialog object * * @return The antHome value */ public String getAntHome() { return ant_home; } public void addActionListener(ActionListener al) { actionListeners.add(al); } } antelope-3.5.1.orig/src/ise/antelope/launcher/subjar/0000755000175000017500000000000010637540660022436 5ustar drazzibdrazzibantelope-3.5.1.orig/src/ise/antelope/launcher/subjar/SubJarURLConnection.java0000644000175000017500000000706610226275116027076 0ustar drazzibdrazzibpackage ise.antelope.launcher.subjar; import java.io.*; import java.net.*; import java.util.jar.*; /** * A URLConnection used to open a stream to a jar contained within a jar. This * does not recurse, that is, it won't work for a jar in a jar in a jar. What * this does allow is a single jar to be packaged containing other jars and * access those internal jars as if they are on the classpath. * * @author Dale Anson, Jan 2005 * @version $Revision: 121 $ */ public class SubJarURLConnection extends URLConnection { /** * @param url a url with "subjar" as the protocol. The subjar URL is * identical to the standard jar URL, except that jars within jars may * be specified. For example, suppose myapp.jar contains b.jar and * b.jar contains myimage.jpg. Then a URL for myimage.jpg would be:
* * subjar:file://home/username/apps/myapp.jar!/b.jar!/myimage.jpg * */ public SubJarURLConnection(URL url) { super(url); } /** * Description of the Method * * @exception IOException Description of Exception */ public void connect() throws IOException { // no-op } /** * Gets the inputStream attribute of the SubJarURLConnection object * * @return The inputStream value * @exception IOException Description of Exception */ public InputStream getInputStream() throws IOException { // open a stream to the entry in the jar given by the url try { URL url = getURL(); if (url == null) return super.getInputStream(); String urlstring = url.toString().substring(3); String name = urlstring.substring(urlstring.lastIndexOf("!") + 1); if (name.startsWith("/")) name = name.substring(1); urlstring = urlstring.substring(0, urlstring.lastIndexOf("!")); URL jar_url = new URL(urlstring); JarInputStream jis = new JarInputStream(jar_url.openStream()); while (true) { JarEntry je = jis.getNextJarEntry(); if (je == null) return null; if (je.isDirectory()) continue; String je_name = je.getName(); if (je_name.endsWith(".class")) { je_name = je_name.substring(0, je_name.length() - 6); je_name = je_name.replace('/', '.'); } if (je_name.equals(name)) { return jis; } } } catch (Exception e) { e.printStackTrace(); return null; } } /** * Gets the headerField attribute of the SubJarURLConnection object * * @param name * @return The headerField value */ public String getHeaderField(String name) { if (name.equals("content-type")) { String url = getURL().toString().toLowerCase(); if (url.endsWith(".html")) return "text/html"; else if (url.endsWith(".txt")) return "text/plain"; else if (url.endsWith(".rtf")) return "text/rtf"; else if (url.endsWith(".gif")) return "image/gif"; else if (url.endsWith(".jpg") || url.endsWith(".jpeg")) return "image/jpeg"; else return super.getHeaderField(name); } else return super.getHeaderField(name); } } antelope-3.5.1.orig/src/ise/antelope/launcher/subjar/Handler.java0000644000175000017500000000046010226275116024651 0ustar drazzibdrazzibpackage ise.antelope.launcher.subjar; import java.net.*; import java.io.*; public class Handler extends URLStreamHandler { public URLConnection openConnection(URL url) throws IOException { URLConnection c = new SubJarURLConnection(url); c.connect(); return c; } } antelope-3.5.1.orig/src/ise/antelope/launcher/KappaLayout.java0000644000175000017500000013441210325771064024250 0ustar drazzibdrazzib// $Id: KappaLayout.java 131 2005-10-21 03:38:27Z danson $ package ise.antelope.launcher; import java.awt.LayoutManager2; import java.awt.Component; import java.awt.Container; import java.awt.Dimension; import java.awt.Insets; import java.awt.Point; import java.awt.Graphics; import java.awt.Color; import java.io.Serializable; import java.util.BitSet; import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; /** * KappaLayout, a Java layout manager.
* Copyright (C) 2000, Dale Anson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*

* KappaLayout -- similar to others, but this one's simpler and easier to use.
* Example use:
* This will put a button on a panel in the top of its cell, stretched to * fill the cell width, with a 3 pixel pad:
* * Panel p = new Panel(new KappaLayout()); * Button b = new Button("OK"); * p.add(b, "0, 0, 1, 2, 2, w, 3"); * *
* The constraints string has this layout:
* "x, y, w, h, a, s, p"
* defined as follows:
*

    *
  • 'x' is the column to put the component, default is 0
    *
  • 'y' is the row to put the component, default is 0
    *
  • 'w' is the width of the component in columns (column span), default is 1. * Can also be R or r, which means the component will span the remaining cells * in the row.
    *
  • 'h' is the height of the component in rows (row span), default is 1. * Can also be R or r, which means the component will span the remaining cells * in the column.
    *
  • 'a' is the alignment within the cell. 'a' can be a value between 0 and 8, * inclusive, (default is 0) and causes the alignment of the component within the cell to follow * this pattern:
    * 8 1 2
    * 7 0 3
    * 6 5 4
    , or
    * 0 horizontal center, vertical center,
    * 1 horizontal center, vertical top,
    * 2 horizontal right, vertical top,
    * 3 horizontal right, vertical center,
    * 4 horizontal right, vertical bottom,
    * 5 horizontal center, vertical bottom,
    * 6 horizontal left, vertical bottom,
    * 7 horizontal left, vertical center,
    * 8 horizontal left, vertical top.
    *

    * By popular request, the alignment constraint can also be represented as:
    * NW N NE
    *  W 0 E
    * SW S SE
    * which are compass directions for alignment within the cell. *

  • 's' is the stretch value. 's' can have these values:
    * 'w' stretch to fill cell width
    * 'h' stretch to fill cell height
    * 'wh' or 'hw' stretch to fill both cell width and cell height
    * '0' (character 'zero') no stretch (default) *
  • 'p' is the amount of padding to put around the component. This much blank * space will be applied on all sides of the component, default is 0. *
* Parameters may be omitted (default values will be used), e.g., * p.add(new Button("OK), "1,4,,,w,");
* which means put the button at column 1, row 4, default 1 column wide, default * 1 row tall, stretch to fit width of column, no padding.
* Spaces in the parameter string are ignored, so these are identical:
* p.add(new Button("OK), "1,4,,,w,");
* p.add(new Button("OK), " 1, 4, , , w");

* Rather than use a constraints string, a Constraints object may be used * directly, similar to how GridBag uses a GridBagConstraint. E.g,
* * Panel p = new Panel();
* KappaLayout tl = new KappaLayout();
* p.setLayout(tl);
* KappaLayout.Constraints con = tl.getConstraint();
* con.x = 1;
* con.y = 2;
* con.w = 2;
* con.h = 2;
* con.s = "wh";
* panel.add(new Button("OK"), con);
* con.x = 3;
* panel.add(new Button("Cancel"), con);
*

* Note that the same Constraints can be reused, thereby reducing the number of * objects created.

* @author Dale Anson * @version $Revision: 131 $ */ public class KappaLayout implements LayoutManager2, Serializable { // overall preferred width of components in container protected int _preferred_width = 0; // overall preferred height of components in container protected int _preferred_height = 0; protected boolean _size_unknown = true; protected int _col_count = 0; // number of columns in the layout protected int _row_count = 0; // number of rows in the layout // storage for component constraints // key is the component, value is a Constraints protected Hashtable _constraints = new Hashtable(); // model of the table -- key is a Point with Point.x // representing the column, Point.y representing the row. As most layouts // are sparse, this is an efficient way to represent the table without // creating excess objects. The value is the dimension of the component. protected Hashtable _table = null; // a Dimension with no width and no height, used repeatedly to represent // empty cells. protected Dimension _0dim = new Dimension( 0, 0 ); // model of the component layout in the table -- key is a Point with Point.x // representing the column, Point.y representing the row. The value is a // reference to the component. protected Hashtable _components = null; // in both _col_widths and _row_heights, if the number is negative, the column or // row will be treated as having a fixed width or height. During layout, the negative // numbers will be treated as positive numbers -- negative width and negative height // being meaningless concepts. protected int[] _col_widths; // stores a width per column which is the widest preferred width of components in each column protected int[] _row_heights; // stores a height per row which is the tallest preferred height of components in each row // storage for columns and rows that want to be the same size. Each element // in these vectors is an int[], with each item in the array being a column // or row number. protected Vector _same_width_cols; protected Vector _same_height_rows; // if true, spread extra space equally between components in both directions, // doesn't stretch the components, just the space between them protected boolean _stretch = false; // by user request, the following are alternate compass directions for // the alignment constraint. Center is still 0. /** * For alignment constraint (a), align component to North in cell. */ public static final int N = 1; // north /** * For alignment constraint (a), align component to NorthEast in cell. */ public static final int NE = 2; // northeast /** * For alignment constraint (a), align component to East in cell. */ public static final int E = 3; // east /** * For alignment constraint (a), align component to SouthEast in cell. */ public static final int SE = 4; // southeast /** * For alignment constraint (a), align component to South in cell. */ public static final int S = 5; // south /** * For alignment constraint (a), align component to SouthWest in cell. */ public static final int SW = 6; // southwest /** * For alignment constraint (a), align component to West in cell. */ public static final int W = 7; // west /** * For alignment constraint (a), align component to NorthWest in cell. */ public static final int NW = 8; // northwest /** * Convenience setting for width (w) or height (h), causes component to use * Remaining cells. */ public static final int R = Integer.MAX_VALUE; /** * Default constructor, no stretching. */ public KappaLayout() { this( false ); } /** * Constructor, allows stretching. * @param s if true, stretches layout to fill container by adding extra space * between components, does not stretch the components, just the space between them. */ public KappaLayout( boolean s ) { _stretch = s; } /** * Useful for debugging a layout. Call after components are showing to make * sure all data is available. * @return a String with lots of useful info about the layout. */ public String toString() { StringBuffer sb = new StringBuffer(); sb.append( "-------------------------------\n" ); sb.append( getClass().getName() + ":\n" ); sb.append( "columns=" + _col_count ); sb.append( ", rows=" + _row_count ); sb.append( ", cells=" + ( _col_count * _row_count ) + "\n" ); sb.append( "preferred width=" + _preferred_width ); sb.append( ", preferred height=" + _preferred_height + "\n" ); if ( _col_widths != null ) { sb.append( "column widths (left to right):" ); for ( int i = 0; i < _col_widths.length; i++ ) sb.append( _col_widths[ i ] + "," ); } if ( _row_heights != null ) { sb.append( "\nrow heights (top to bottom):" ); for ( int i = 0; i < _row_heights.length; i++ ) sb.append( _row_heights[ i ] + "," ); } if ( _constraints != null ) { sb.append( "\ncomponent count=" + _constraints.size() ); sb.append( "\ncomponents (no order):\n" ); Enumeration en = _constraints.keys(); while ( en.hasMoreElements() ) sb.append( en.nextElement() + "\n" ); } sb.append( "-------------------------------\n" ); return sb.toString(); } /** * Required by LayoutManager, simply calls addLayoutComponent(Component, Object). */ public void addLayoutComponent( String n, Component c ) { addLayoutComponent( c, n ); } /** * Required by LayoutManager. */ public void removeLayoutComponent( Component c ) { if (c == null) return; synchronized ( c.getTreeLock() ) { if ( _constraints != null ) { _constraints.remove( c ); if (_components == null) return; Enumeration keys = _components.keys(); while(keys.hasMoreElements()) { Object key = keys.nextElement(); Object value = _constraints.get(key); if (value == null) continue; if (value.equals(c)) { _components.remove(key); break; } } keys = _table.keys(); while(keys.hasMoreElements()) { Object key = keys.nextElement(); Object value = _constraints.get(key); if (value == null) continue; if (value.equals(c)) { _table.remove(key); break; } } _size_unknown = true; calculateDimensions(); } } } /** * Required by LayoutManager. */ public Dimension preferredLayoutSize( Container parent ) { synchronized ( parent.getTreeLock() ) { Dimension dim = new Dimension( 0, 0 ); _size_unknown = true; calculateDimensions(); Insets insets = parent.getInsets(); dim.width = _preferred_width + insets.left + insets.right; dim.height = _preferred_height + insets.top + insets.bottom; return dim; } } /** * Required by LayoutManager. * @return preferredLayoutSize(parent) */ public Dimension minimumLayoutSize( Container parent ) { synchronized ( parent.getTreeLock() ) { return preferredLayoutSize( parent ); } } /** * Required by LayoutManager, does all the real layout work. */ public void layoutContainer( Container parent ) { synchronized ( parent.getTreeLock() ) { Insets insets = parent.getInsets(); int max_width = parent.getSize().width - ( insets.left + insets.right ); int max_height = parent.getSize().height - ( insets.top + insets.bottom ); int x = insets.left; // x and y location to put component in pixels int y = insets.top; int xfill = 0; // how much extra space to put between components int yfill = 0; // when stretching to fill entire container // make sure preferred size is known, a side effect is that countColumns // and countRows are automatically called. calculateDimensions(); // if necessary, calculate the amount of padding to add between the // components to fill the container if ( _stretch ) { if ( max_width > _preferred_width && _col_count > 1 ) { xfill = ( max_width - _preferred_width ) / ( _col_count - 1 ); } if ( max_height > _preferred_height && _row_count > 1 ) { yfill = ( max_height - _preferred_height ) / ( _row_count - 1 ); } } // do the layout. Components are handled by columns, top to bottom, // left to right. i is current column, j is current row. Point cell = new Point(); for ( int i = 0; i < _col_count; i++ ) { cell.x = i; y = insets.top; if ( i > 0 ) { x += Math.abs( _col_widths[ i - 1 ] ); if ( _stretch && i < _col_count ) { x += xfill; } } for ( int j = 0; j < _row_count; j++ ) { cell.y = j; if ( j > 0 ) { y += Math.abs( _row_heights[ j - 1 ] ); if ( _stretch && j < _row_count ) { y += yfill; } } Component c = ( Component ) _components.get( cell ); if ( c != null && c.isVisible() ) { Dimension d = c.getPreferredSize(); Constraints q = ( Constraints ) _constraints.get( c ); // calculate width of spanned columns int sum_cols = 0; if ( q.w == R ) { for ( int n = i; n < _col_count; n++ ) { sum_cols += Math.abs( _col_widths[ n ] ); } } else { for ( int n = i; n < i + q.w; n++ ) { sum_cols += Math.abs( _col_widths[ n ] ); } } // calculate height of spanned rows int sum_rows = 0; if ( q.h == R ) { for ( int n = i; n < _row_count; n++ ) { sum_rows += Math.abs( _row_heights[ n ] ); } } else { for ( int n = j; n < j + q.h; n++ ) { sum_rows += Math.abs( _row_heights[ n ] ); } } // stretch and pad if required if ( q.s.indexOf( "w" ) != -1 ) { d.width = sum_cols - q.p * 2; } if ( q.s.indexOf( "h" ) != -1 ) { d.height = sum_rows - q.p * 2; } // calculate adjustment int x_adj = sum_cols - d.width; // max amount to put component at right edge of spanned cell(s) int y_adj = sum_rows - d.height; // max amount to put component at bottom edge of spanned cell(s) // in each case, add the correction for the cell, then subtract // the correction after applying it. This prevents the corrections // from improperly accumulating across cells. Padding must be handled // explicitly for each case. // Alignment follows this pattern within the spanned cells: // 8 1 2 new pattern: NW N NE // 7 0 3 W 0 E // 6 5 4 SW S SE switch ( q.a ) { case N: // top center x += x_adj / 2 ; y += q.p; c.setBounds( x, y, d.width, d.height ); x -= x_adj / 2; y -= q.p; break; case NE: // top right x += x_adj - q.p; y += q.p; c.setBounds( x, y, d.width, d.height ); x -= x_adj - q.p; y -= q.p; break; case E: // center right x += x_adj - q.p; y += y_adj / 2; c.setBounds( x, y, d.width, d.height ); x -= x_adj - q.p; y -= y_adj / 2; break; case SE: // bottom right x += x_adj - q.p; y += y_adj - q.p; c.setBounds( x, y, d.width, d.height ); x -= x_adj - q.p; y -= y_adj - q.p; break; case S: // bottom center x += x_adj / 2; y += y_adj - q.p; c.setBounds( x, y, d.width, d.height ); x -= x_adj / 2; y -= y_adj - q.p; break; case SW: // bottom left x += q.p; y += y_adj - q.p; c.setBounds( x, y, d.width, d.height ); x -= q.p; y -= y_adj - q.p; break; case W: // center left x += q.p; y += y_adj / 2; c.setBounds( x, y, d.width, d.height ); x -= q.p; y -= y_adj / 2; break; case NW: // top left x += q.p; y += q.p; c.setBounds( x, y, d.width, d.height ); x -= q.p; y -= q.p; break; case 0: // dead center default: x += x_adj / 2; y += y_adj / 2; c.setBounds( x, y, d.width, d.height ); x -= x_adj / 2; y -= y_adj / 2; break; } } } } } } /** * Required by LayoutManager2. Will NOT add component if either component or * constraints are null, or if constraints is not a String or * Kappa/LambdaLayout.Constraint. */ public void addLayoutComponent( Component comp, Object constraint ) { synchronized ( comp.getTreeLock() ) { if ( comp == null ) { throw new IllegalArgumentException( "No component." ); } if ( constraint == null ) { throw new IllegalArgumentException( "No constraint." ); } if ( constraint instanceof Constraints ) { // clone and store a Constraint so user can reuse his original Constraints q = ( Constraints ) constraint; _constraints.put( comp, q.clone() ); // if component is a rigid strut, set the column and/or row size if ( comp instanceof Strut ) { Strut strut = ( Strut ) comp; if ( strut.isRigid() ) { Dimension d = strut.getSize(); if ( d.width > 0 ) { setColumnWidth( q.x, d.width ); } if ( d.height > 0 ) { setRowHeight( q.y, d.height ); } } } _size_unknown = true; // that's all that needs to be done for this case (Constraint and // Component), so return now return ; } // already dealt with Constraint, so check for constraint // String, if not a String, bail out if ( !( constraint instanceof String ) ) throw new IllegalArgumentException( "Illegal constraint object." ); // parse constraint string into tokens. There may be as few as 0 tokens, // or as many as 7. Vector tokens = new Vector(); String token; String c = constraint.toString(); while ( c.length() > 0 ) { int comma = c.indexOf( ',' ); // find a token if ( comma != -1 ) { token = c.substring( 0, comma ); c = c.substring( comma + 1 ); } else { token = c; c = ""; } // clean it up if ( token != null ) token = token.trim(); // if there's something left, store it, otherwise, mark missing // token with -1 (example of constraint string with missing tokens: // "1,1,,,,w", width, height, alignment are missing) if ( token != null && token.length() > 0 ) tokens.addElement( token ); else tokens.addElement( "-1" ); } // turn tokens into a Constraints. Default Constraints values are used // for missing or non-specified values Constraints q = new Constraints(); Enumeration en = tokens.elements(); // get column if ( en.hasMoreElements() ) { token = en.nextElement().toString(); try { q.x = Integer.parseInt( token ); if ( q.x < 0 ) q.x = 0; } catch ( Exception e ) { q.x = 0; } } // get row if ( en.hasMoreElements() ) { token = en.nextElement().toString(); try { q.y = Integer.parseInt( token ); if ( q.y < 0 ) q.y = 0; } catch ( Exception e ) { q.y = 0; } } // get column span (width) if ( en.hasMoreElements() ) { token = en.nextElement().toString(); if ( token.equalsIgnoreCase( "R" ) ) { q.w = R; } else { try { q.w = Integer.parseInt( token ); if ( q.w < 1 ) q.w = 1; } catch ( Exception e ) { q.w = 1; } } } // get row span (height) if ( en.hasMoreElements() ) { token = en.nextElement().toString(); if ( token.equalsIgnoreCase( "R" ) ) { q.h = R; } else { try { q.h = Integer.parseInt( token ); if ( q.h < 1 ) q.h = 1; } catch ( Exception e ) { q.h = 1; } } } // get alignment if ( en.hasMoreElements() ) { token = en.nextElement().toString().trim(); if ( token.equalsIgnoreCase( "N" ) || token.equals( "1" ) ) q.a = N; else if ( token.equalsIgnoreCase( "NE" ) || token.equals( "2" ) ) q.a = NE; else if ( token.equalsIgnoreCase( "E" ) || token.equals( "3" ) ) q.a = E; else if ( token.equalsIgnoreCase( "SE" ) || token.equals( "4" ) ) q.a = SE; else if ( token.equalsIgnoreCase( "S" ) || token.equals( "5" ) ) q.a = S; else if ( token.equalsIgnoreCase( "SW" ) || token.equals( "6" ) ) q.a = SW; else if ( token.equalsIgnoreCase( "W" ) || token.equals( "7" ) ) q.a = W; else if ( token.equalsIgnoreCase( "NW" ) || token.equals( "8" ) ) q.a = NW; else q.a = 0; } // get component stretch if ( en.hasMoreElements() ) { token = en.nextElement().toString().trim().toLowerCase(); if ( token.equals( "w" ) || token.equals( "h" ) || token.equals( "wh" ) || token.equals( "hw" ) ) { q.s = token; } else q.s = "0"; } // get component padding if ( en.hasMoreElements() ) { token = en.nextElement().toString(); try { q.p = Integer.parseInt( token ); if ( q.p < 0 ) q.p = 0; } catch ( Exception e ) { q.p = 0; } } // save the component and its constraints for later use _constraints.put( comp, q ); // if component is a rigid strut, set the column and/or row size if ( comp instanceof Strut ) { Strut strut = ( Strut ) comp; if ( strut.isRigid() ) { Dimension d = strut.getSize(); if ( d.width > 0 ) { setColumnWidth( q.x, d.width ); } if ( d.height > 0 ) { setRowHeight( q.y, d.height ); } } } _size_unknown = true; } } /** * Required by LayoutManager2. * @return preferredLayoutSize(parent) */ public Dimension maximumLayoutSize( Container c ) { synchronized ( c.getTreeLock() ) { return preferredLayoutSize( c ); } } /** * Required by LayoutManager2. * @return 0.5f */ public float getLayoutAlignmentX( Container c ) { return 0.5f; // default to centered. } /** * Required by LayoutManager2. * @return 0.5f */ public float getLayoutAlignmentY( Container c ) { return 0.5f; // default to centered. } /** * Required by LayoutManager2. */ public void invalidateLayout( Container c ) { /* I would think this is the right thing to do, but doing this causes the layout to be wrong every time. Also causes the stretch option to fail. _size_unknown = true; */ } /** * Calculate preferred size and other dimensions. */ protected void calculateDimensions() { if ( !_size_unknown ) return ; _preferred_width = 0; _preferred_height = 0; Dimension dim = null; // count columns and rows countColumns(); countRows(); // set up table and component maps if ( _table == null ) _table = new Hashtable( 23, 0.75f ); else _table.clear(); if ( _components == null ) _components = new Hashtable( 23, 0.75f ); else _components.clear(); // set up storage for max col width and max row height. These arrays // have an entry per column and row and will hold the largest width or // height of components in each column or row respectively. int[] temp; if ( _col_widths != null ) { // if column count has changed, need to preserve existing column widths // in case one or more remaining columns has been set to a fixed width. temp = new int[ _col_widths.length ]; System.arraycopy( _col_widths, 0, temp, 0, _col_widths.length ); _col_widths = new int[ _col_count ]; System.arraycopy( temp, 0, _col_widths, 0, Math.min( temp.length, _col_widths.length ) ); } else { _col_widths = new int[ _col_count ]; } if ( _row_heights != null ) { // if row count has changed, need to preserve existing row heights // in case one or more remaining rows has been set to a fixed height. temp = new int[ _row_heights.length ]; System.arraycopy( _row_heights, 0, temp, 0, _row_heights.length ); _row_heights = new int[ _row_count ]; System.arraycopy( temp, 0, _row_heights, 0, Math.min( temp.length, _row_heights.length ) ); } else { _row_heights = new int[ _row_count ]; } // get the constraints Enumeration en = _constraints.keys(); while ( en.hasMoreElements() ) { Component c = ( Component ) en.nextElement(); Constraints q = ( Constraints ) _constraints.get( c ); if ( q.w == R ) q.w = _col_count - q.x; if ( q.h == R ) q.h = _row_count - q.y; // store the component in its (x, y) location _components.put( new Point( q.x, q.y ), c ); // as components can span columns and rows, store the maximum dimension // of the component that could be in the spanned cells. Note that it // may happen that none of the component is actually in the cell. dim = new Dimension(c.getPreferredSize().width, c.getPreferredSize().height); dim.width += q.p * 2; // adjust for padding if necessary dim.height += q.p * 2; dim.width /= q.w; dim.height /= q.h; for ( int i = q.x; i < q.x + q.w; i++ ) { for ( int j = q.y; j < q.y + q.h; j++ ) { _table.put( new Point( i, j ), dim ); } } } // calculate preferred width int col_width = 0; for ( int i = 0; i < _col_count; i++ ) { for ( int j = 0; j < _row_count; j++ ) { Dimension p = ( Dimension ) _table.get( new Point( i, j ) ); if ( p == null ) p = _0dim; col_width = Math.max( p.width, col_width ); } // store max width of each column if ( _col_widths[ i ] >= 0 ) { _col_widths[ i ] = col_width; _preferred_width += col_width; } else { _preferred_width += Math.abs( _col_widths[ i ] ); } col_width = 0; } // adjust for same width columns if ( _same_width_cols != null ) { en = _same_width_cols.elements(); while ( en.hasMoreElements() ) { int[] same = ( int[] ) en.nextElement(); // find widest column of this group int widest = same[ 0 ]; for ( int i = 0; i < same.length; i++ ) { if ( same[ i ] < _col_widths.length ) widest = Math.max( widest, _col_widths[ same[ i ] ] ); } // now set all columns to this widest width for ( int i = 0; i < same.length; i++ ) { if ( same[ i ] < _col_widths.length ) { _preferred_width += widest - _col_widths[ same[ i ] ]; _col_widths[ same[ i ] ] = widest; } } } } // calculate preferred height int row_height = 0; for ( int j = 0; j < _row_count; j++ ) { for ( int i = 0; i < _col_count; i++ ) { Dimension p = ( Dimension ) _table.get( new Point( i, j ) ); if ( p == null ) p = _0dim; row_height = Math.max( p.height, row_height ); } // store max height of each row if ( _row_heights[ j ] >= 0 ) { _row_heights[ j ] = row_height; _preferred_height += row_height; } else { _preferred_height += Math.abs( _row_heights[ j ] ); } row_height = 0; } // adjust for same height rows if ( _same_height_rows != null ) { en = _same_height_rows.elements(); while ( en.hasMoreElements() ) { int[] same = ( int[] ) en.nextElement(); // find tallest row of this group int tallest = same[ 0 ]; for ( int i = 0; i < same.length; i++ ) { if ( same[ i ] < _row_heights.length ) tallest = Math.max( tallest, _row_heights[ same[ i ] ] ); } // now set all rows to this tallest height for ( int i = 0; i < same.length; i++ ) { if ( same[ i ] < _row_heights.length ) { _preferred_height += tallest - _row_heights[ same[ i ] ]; _row_heights[ same[ i ] ] = tallest; } } } } _size_unknown = false; } /** * Calculate number of columns in table. */ private void countColumns() { _col_count = 0; Hashtable rows = new Hashtable(); // get the constraints Enumeration en = _constraints.elements(); while ( en.hasMoreElements() ) { Constraints q = ( Constraints ) en.nextElement(); // figure out which columns this component spans. The BitSet represents // a row, and for each non-empty column in the row, a bit is set. The // BitSets representing each row are stored in the 'rows' Hashtable. BitSet row = null; String y = String.valueOf( q.y ); if ( !rows.containsKey( y ) ) { row = new BitSet(); rows.put( y, row ); } row = ( BitSet ) rows.get( y ); int last_col = ( q.w == R ? q.x + 1 : q.x + q.w ); for ( int i = q.x; i < last_col; i++ ) row.set( i ); } // calculate the number of columns by going through each BitSet and // counting the number of set bits. The highest bit is the number of // columns. en = rows.elements(); while ( en.hasMoreElements() ) { BitSet row = ( BitSet ) en.nextElement(); for ( int i = 0; i < row.size(); i++ ) { if ( row.get( i ) ) _col_count = Math.max( _col_count, i + 1 ); // add 1 as column index is 0-based } } } /** * Calculate number of rows in table. */ private void countRows() { // this is done exactly in the same manner as countColumns, see the comments // there for details on the counting algorithm _row_count = 0; Hashtable cols = new Hashtable(); Enumeration en = _constraints.elements(); while ( en.hasMoreElements() ) { Constraints q = ( Constraints ) en.nextElement(); BitSet col = null; String x = String.valueOf( q.x ); if ( !cols.containsKey( x ) ) { col = new BitSet(); cols.put( x, col ); } col = ( BitSet ) cols.get( x ); int last_row = ( q.h == R ? q.y + 1 : q.y + q.h ); for ( int i = q.y; i < last_row; i++ ) { col.set( i ); } } en = cols.elements(); while ( en.hasMoreElements() ) { BitSet col = ( BitSet ) en.nextElement(); for ( int i = 0; i < col.size(); i++ ) { if ( col.get( i ) ) { _row_count = Math.max( _row_count, i + 1 ); } } } } /** * Makes two columns be the same width. The actual width will be the larger * of the preferred widths of these columns. * @param column1 column number * @param column2 column number */ public void makeColumnsSameWidth( int column1, int column2 ) { makeColumnsSameWidth( new int[] {column1, column2} ); } /** * Makes several columns be the same width. The actual width will be the largest * preferred width of these columns. * @param columns array of column numbers to make the same width. */ public void makeColumnsSameWidth( int[] columns ) { if ( columns.length <= 1 ) return ; for ( int i = 0; i < columns.length; i++ ) { if ( columns[ i ] < 0 ) throw new IllegalArgumentException( "Column parameter must be greater than 0." ); } if ( _same_width_cols == null ) _same_width_cols = new Vector(); _same_width_cols.addElement( columns ); _size_unknown = true; } /** * Makes all columns be the same width. The actual width will be the largest * preferred width of these columns. */ public void makeColumnsSameWidth() { countColumns(); int[] columns = new int[ _col_count ]; for ( int i = 0; i < _col_count; i++ ) { columns[ i ] = i; } makeColumnsSameWidth( columns ); } /** * Makes two rows be the same height. The actual height will be the larger * of the preferred heights of these rows. * @param row1 row number * @param row2 row number */ public void makeRowsSameHeight( int row1, int row2 ) { makeRowsSameHeight( new int[] {row1, row2} ); } /** * Makes several rows be the same height. The actual height will be the largest * preferred height of these rows. * @param rows array of row numbers to make the same height. */ public void makeRowsSameHeight( int[] rows ) { if ( rows.length <= 1 ) return ; for ( int i = 0; i < rows.length; i++ ) { if ( rows[ i ] < 0 ) throw new IllegalArgumentException( "Row parameter must be greater than 0." ); } if ( _same_height_rows == null ) // laziness pays off now _same_height_rows = new Vector(); _same_height_rows.addElement( rows ); _size_unknown = true; } /** * Makes all rows be the same height. The actual height will be the largest * preferred height of these rows. */ public void makeRowsSameHeight() { countRows(); int[] rows = new int[ _row_count ]; for ( int i = 0; i < rows.length; i++ ) { rows[ i ] = i; } makeRowsSameHeight( rows ); } /** * Sets a column to a specific width. Use care with this method, components * wider than the set width will be truncated. * @param column column number * @param width width in pixels */ public void setColumnWidth( int column, int width ) { if ( column < 0 ) throw new IllegalArgumentException( "Column must be >= 0." ); if ( _col_widths == null ) _col_widths = new int[ column + 1 ]; if ( _col_widths.length <= column ) { int[] tmp = new int[ _col_widths.length ]; System.arraycopy( _col_widths, 0, tmp, 0, _col_widths.length ); _col_widths = new int[ column + 1 ]; System.arraycopy( tmp, 0, _col_widths, 0, tmp.length ); } // store fixed width columns as a negative number _col_widths[ column ] = -1 * width; _size_unknown = true; } /** * Sets a row to a specific height. Use care with this method, components * taller than the set height will be truncated. * @param row row number * @param height height in pixels */ public void setRowHeight( int row, int height ) { if ( row < 0 ) throw new IllegalArgumentException( "Row must be >= 0." ); if ( _row_heights == null ) _row_heights = new int[ row + 1 ]; if ( _row_heights.length <= row ) { int[] tmp = new int[ _row_heights.length ]; System.arraycopy( _row_heights, 0, tmp, 0, _row_heights.length ); _row_heights = new int[ row + 1 ]; System.arraycopy( tmp, 0, _row_heights, 0, tmp.length ); } // store fixed height rows as a negative number _row_heights[ row ] = -1 * height; _size_unknown = true; } /** * Creates a Constraints for direct manipulation. * @return a Constraints object for direct manipulation. */ public static Constraints createConstraint() { return new Constraints(); } /** * Useful for holding an otherwise empty column to a minimum width. * @param desired width of component * @return a component with some width but no height */ public static Component createHorizontalStrut( int width ) { return new Strut( width, 0 ); } /** * Useful for holding a column to a fixed width. * @param desired width of component * @return a component with some width but no height */ public static Component createHorizontalStrut( int width, boolean rigid ) { return new Strut( width, 0, rigid ); } /** * Useful for holding an otherwise empty row to a minimum height. * @param desired height of component * @return a component with some height but no width */ public static Component createVerticalStrut( int height ) { return new Strut( 0, height ); } /** * Useful for holding a row to a fixed height. * @param desired height of component * @return a component with some height but no width */ public static Component createVerticalStrut( int height, boolean rigid ) { return new Strut( 0, height, rigid ); } /** * Useful for setting an otherwise blank cell to a minimum width and height. * @param width desired width of component * @param height desired height of component * @return a component with some height and width */ public static Component createStrut( int width, int height ) { return new Strut( width, height ); } /** * Useful for setting a row and column to a fixed width and height. * @param width desired width of component * @param height desired height of component * @return a component with some height and width */ public static Component createStrut( int width, int height, boolean rigid ) { return new Strut( width, height, rigid ); } /** * Simple component that is invisible. Struts can be either rigid or non- * rigid. While this component could be used with other layout managers, * it special properties are intended for use with KappaLayout. In particular, * when the strut is set to rigid, it will lock the column or row (depends on * the orientation of the strut) to the width or height of the strut. A non- * rigid strut sets a minimum width or height on a column or row, but does * not set a maximum like a rigid strut does. */ public static class Strut extends Component implements Serializable { private Dimension _dim; private boolean _rigid; /** * @param w width * @param h height */ public Strut( int w, int h ) { this( w, h, false ); } /** * @param w width * @param h height * @param rigid rigid */ public Strut( int w, int h, boolean rigid ) { _dim = new Dimension( w, h ); _rigid = rigid; } /** * Overrides getPreferredSize from Component. */ public Dimension getPreferredSize() { return _dim; } /** * Overrides getSize from Component. */ public Dimension getSize() { return _dim; } /** * @returns true if this strut is rigid. */ public boolean isRigid() { return _rigid; } /** * @param rigid if true, this strut will act as a rigid strut */ public void setRigid( boolean rigid ) { _rigid = rigid; } } /** * This class is cloneable so that users may create and reuse a Constraints object * similar to how one would use a GridBagConstraints rather than the string parameters. */ public static class Constraints extends Object implements Cloneable, Serializable { /** * start column */ public int x = 0; /** * start row */ public int y = 0; /** * # columns wide */ public int w = 1; /** * # rows high */ public int h = 1; /** * alignment within cell, see comments in KappaLayout */ public int a = 0; /** * stretch: default is 0 (character zero, no stretch), w = width of cell, h = height of cell, wh = both width and height */ public String s = "0"; /** * padding, same amount of blank space on all four sides of component */ public int p = 0; /** * Plain String representation of this Constraints, suitable for using as a * constraints string if needed. */ public String toString() { StringBuffer sb = new StringBuffer(); sb.append( String.valueOf( x ) + "," ) .append( String.valueOf( y ) + "," ) .append( String.valueOf( w ) + "," ); if ( w == R ) sb.append( "R," ); else sb.append( String.valueOf( w ) + "," ); if ( h == R ) sb.append( "R," ); else sb.append( String.valueOf( h ) + "," ); sb.append( String.valueOf( a ) + "," ) .append( String.valueOf( s ) + "," ) .append( String.valueOf( p ) ) .toString(); return sb.toString(); } /** * @return a clone of this object. */ public Object clone() { try { return super.clone(); } catch ( Exception e ) { return null; } } } /* public Component getDebugPanel() { java.awt.Panel p = new java.awt.Panel() { public Dimension getPreferredSize() { int width = 0; for ( int i = 0; i < _col_widths.length; i++ ) { width += Math.abs(_col_widths[i]); } int height = 0; for ( int i = 0; i < _row_heights.length; i++ ) { height += Math.abs(_row_heights[i]); } return new Dimension(width, height); } public void paint(Graphics g) { g.setColor(Color.black); Dimension d = getPreferredSize(); int x = 0; g.drawLine(x, 0, x, d.height); for ( int i = 0; i < _col_widths.length; i++ ) { x = Math.abs(_col_widths[i]); g.drawLine(x, 0, x, d.height); } g.drawLine(d.width, 0, d.width, d.height); int y = 0; g.drawLine(0, y, d.width, y); for ( int i = 0; i < _row_heights.length; i++ ) { y = Math.abs(_row_heights[i]); g.drawLine(0, y, d.width, y); } g.drawLine(0, d.height, d.width, d.height); } }; return p; } */ } antelope-3.5.1.orig/src/ise/antelope/launcher/LaunchException.java0000644000175000017500000000213510163726476025112 0ustar drazzibdrazzib/* * Copyright 2003-2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package ise.antelope.launcher; /** * Signals an error condition during launching * danson: modified for Antelope * * @since Ant 1.6 */ public class LaunchException extends Exception { /** * Constructs an exception with the given descriptive message. * * @param message A description of or information about the exception. * Should not be null. */ public LaunchException(String message) { super(message); } } antelope-3.5.1.orig/src/ise/antelope/launcher/Args.java0000644000175000017500000000064710226275024022707 0ustar drazzibdrazzibpackage ise.antelope.launcher; import java.net.URL; public class Args { private URL[] urls; private String[] args; public void setURLs(URL[] urls) { this.urls = urls; } public URL[] getURLs() { return urls; } public void setArgs(String[] args) { this.args = args; } public String[] getArgs() { return args; } } antelope-3.5.1.orig/src/ise/antelope/launcher/UserPreferencesFactory.java0000644000175000017500000000233010163726476026446 0ustar drazzibdrazzibpackage ise.antelope.launcher; import java.util.prefs.PreferencesFactory; import java.util.prefs.Preferences; import java.io.*; /** * This preferences factory only works for a single user and won't be shared * across the jvm, that is, system preferences are the same as user preferences. * Preferences are stored in $user.home/.ise_prefs. */ public class UserPreferencesFactory implements PreferencesFactory { protected static File PREFS_ROOT; /** * System root node. */ private static UserPreferences systemRoot = null; /** * User root node. */ private static UserPreferences userRoot = null; public Preferences systemRoot() { return getSystemRoot(); } public Preferences userRoot() { return getSystemRoot(); } public static Preferences getSystemRoot() { if ( systemRoot == null ) { PREFS_ROOT = new File( System.getProperty( "user.home" ) + File.separator + ".ise_prefs" ); try { PREFS_ROOT.mkdirs(); } catch ( Exception e ) {} systemRoot = new UserPreferences( null, "" ); } return systemRoot; } public static Preferences getUserRoot() { return getSystemRoot(); } } antelope-3.5.1.orig/src/ise/antelope/launcher/CommonHelper.java0000644000175000017500000000677611056552274024423 0ustar drazzibdrazzib package ise.antelope.launcher; import java.awt.event.ActionListener; import ise.library.swingworker.SwingWorker; /** * Objects that want to manipulate AntelopePanel must implement this * interface. * * @version $Revision: 160 $ */ public interface CommonHelper extends ActionListener { /** * Event ID for trace event. */ public final static int TRACE_EVENT = 550927; /** * Event ID for edit event. */ public final static int EDIT_EVENT = 470226; /** * AntelopePanel will pass the target execution thread to the helper. * Implementors of this interface may interrupt the thread to cause * AntelopePanel to stop running a target. * * @param thread the execution thread */ public void setTargetExecutionThread( SwingWorker thread ); /** * Check if the helper can save before running a target. * * @return true if the helper can save files. */ public boolean canSaveBeforeRun(); /** * Tell the helper to save now. */ public void saveBeforeRun(); /** * Tell the helper to clear its error source. This was implemented to * support the ErrorList plugin for jEdit, other editors may hava a similar * need. */ public void clearErrorSource(); /** * Should the AntelopePanel show its Edit button? Clicking the Edit button * should cause AntelopePanel to show the build file in an editor. * * @return true if the AntelopePanel should show an edit button. */ public boolean canShowEditButton(); /** * An action that the helper would like to have happen when the * Edit button is clicked. * * @return The edit button action */ public ActionListener getEditButtonAction(); /** * The action that the helper would like to have happen when the * Run button is clicked. * * @return The run button action */ public ActionListener getRunButtonAction(); /** * The action that the helper would like to have happen when the * Trace button is clicked. * * @return The trace button action */ public ActionListener getTraceButtonAction(); /** * Opens the given file in an editor. * @param the file to open. */ public void openFile( java.io.File f ); /** * Generally, the classloader returned by the helper will probably be null, * but some apps, like jEdit, use special classloaders. As AntProject needs * direct access to the classloader that loads Ant, the helper should pass * the classloader via this method. * * @return The classloader that loaded Ant. */ public ClassLoader getAntClassLoader(); /** * The Ant installation that the helper uses may not be in the application classpath. * AntelopePanel needs to know where the Ant jars are located so it can run Ant * properly. Implementers may return null, meaning that the Ant jars are already * in the classpath. *

* WARNING: this method is likely to change. The helper should * not need to provide a list of jars, rather, it should provide an ANT_HOME * directory. Antelope should be smart enough to find the jars given the * directory, plus should automatically look in the standard Ant library * locations. * @return a list of the jars used by Ant. The individual list items must be Strings * representing the file names of the jar files. Note that other jars may be included, * such as custom Ant task libraries. */ public java.util.List getAntJarList(); } antelope-3.5.1.orig/src/ise/antelope/launcher/AntUtils.java0000644000175000017500000001003510163726476023562 0ustar drazzibdrazzibpackage ise.antelope.launcher; import java.io.*; import java.util.regex.*; public class AntUtils implements Constants { private static double ant_version = 0; /** * Ant has a version number standard of majorversion.minorversion.patchlevel. * This method combines the minorversion and patchlevel into a single number, * and returns a float. For example, the float returned for Ant 1.5.4 would * be 1.54, for 1.6.2, 1.62. * @return the Ant version if possible. The number returned is formatted as * majorversion.minorversionpatchlevel. */ public static double getAntVersion() { if ( ant_version > 0 ) return ant_version; String av = org.apache.tools.ant.Main.getAntVersion(); Pattern p = Pattern.compile( "\\d+[.]\\d+[.]\\d+" ); Matcher m = p.matcher( av ); if ( m.matches() ) { int start = m.start(); int end = m.end(); av = av.substring( start, end - start ); String[] split = av.split( "[.]" ); av = split[ 0 ] + "." + split[ 1 ] + split[ 2 ]; ant_version = Float.parseFloat( av ); return ant_version; } if ( av.indexOf( "1.6" ) > -1 ) return 1.60; if ( av.indexOf( "1.5" ) > -1 ) return 1.50; if ( av.indexOf( "1.4" ) > -1 ) return 1.40; return 1.50; } /** * Returns ANT_HOME as defined by an OS environment variable or System * property. System property is checked first, so it takes precedence, that is, * it can be added on the command line to override an environment setting. *

* Changed to for ANT_HOME first in Antelope's preferences, then System, * then environment. * * @return ANT_HOME or null if not found in preferences, System, or environment. */ public static String getAntHome() { String ant_home = null; try { // first, check stored settings ant_home = PREFS.get( ANT_HOME, null ); if ( ant_home != null ) { File ant_dir = new File( ant_home ); if ( ant_dir.exists() ) { return ant_home; } } // second, check System properties ant_home = System.getProperty( "ANT_HOME" ); if ( ant_home != null ) { File ant_dir = new File( ant_home ); if ( ant_dir.exists() ) { PREFS.put( ANT_HOME, ant_home ); return ant_home; } } // third, check environment ant_home = Os.getEnvironmentValue( "ANT_HOME" ); if ( ant_home != null ) { File ant_dir = new File( ant_home ); if ( ant_dir.exists() ) { PREFS.put( ANT_HOME, ant_home ); return ant_home; } } } catch ( Exception e ) { e.printStackTrace(); } return null; } /** * @return a path containing directories that ant jars are loaded from */ public static String getAntLibDirs() { StringBuffer sb = new StringBuffer(); File ant_lib = new File( getAntHome(), "lib" ); if ( ant_lib.exists() && ant_lib.isDirectory() ) { String[] jars = ant_lib.list( new FilenameFilter() { public boolean accept( File dir, String name ) { return name.endsWith( ".jar" ); } } ); if ( jars.length > 0 ) sb.append( ant_lib.getAbsolutePath() ); } ant_lib = new File( System.getProperty( "user.home" ) + ".ant", "lib" ); if ( ant_lib.exists() && ant_lib.isDirectory() ) { String[] jars = ant_lib.list( new FilenameFilter() { public boolean accept( File dir, String name ) { return name.endsWith( ".jar" ); } } ); if ( jars.length > 0 ) sb.append( File.pathSeparator ).append( ant_lib.getAbsolutePath() ); } return sb.length() > 0 ? sb.toString() : null; } } antelope-3.5.1.orig/src/ise/antelope/launcher/Launcher.java0000644000175000017500000002632110601266236023553 0ustar drazzibdrazzib/* * Copyright 2003-2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package ise.antelope.launcher; import java.net.URL; import java.net.URLClassLoader; import java.net.MalformedURLException; import java.io.File; import java.lang.reflect.Constructor; import java.util.StringTokenizer; import java.util.List; import java.util.ArrayList; import java.util.Iterator; /** * This is a launcher for Ant. * danson: modified to launch Antelope, this code originally came from Ant. * * @since Ant 1.6 */ public class Launcher { /** The Ant Home property */ public static final String ANTHOME_PROPERTY = "ant.home"; /** The Ant Library Directory property */ public static final String ANTLIBDIR_PROPERTY = "ant.library.dir"; /** The location of a per-user library directory */ public static final String USER_LIBDIR = ".ant/lib"; /** The startup class that is to be run */ public static final String MAIN_CLASS = "ise.antelope.app.Antelope"; public static final String MAIN_JAR = "/antelope_app.jar"; public static final String PLUGIN_JAR = "/antelope_plugin.jar"; private static URLClassLoader loader = null; private File jarFile = null; /** * Entry point for starting command line Antelope * * @param args commandline arguments */ public static void main( String[] args ) { try { Launcher launcher = new Launcher(); launcher.runApp( args ); } catch ( LaunchException e ) { System.err.println( e.getMessage() ); System.exit( 1 ); } catch ( Throwable t ) { t.printStackTrace(); System.exit( 1 ); } } public void runApp( String[] args ) throws LaunchException, MalformedURLException { Args myargs = init( args ); URL[] jars = myargs.getURLs(); String[] newArgs = myargs.getArgs(); // now update the class.path property StringBuffer baseClassPath = new StringBuffer( System.getProperty( "java.class.path" ) ); if ( baseClassPath.charAt( baseClassPath.length() - 1 ) == File.pathSeparatorChar ) { baseClassPath.setLength( baseClassPath.length() - 1 ); } for ( int i = 0; i < jars.length; ++i ) { baseClassPath.append( File.pathSeparatorChar ); baseClassPath.append( Locator.fromURI( jars[ i ].toString() ) ); } System.setProperty( "java.class.path", baseClassPath.toString() ); // set up a class loader for the application and start the app SubJarClassLoader loader = new SubJarClassLoader( jars, getClass().getClassLoader() ); Thread.currentThread().setContextClassLoader( loader ); try { URL url = getClass().getResource( MAIN_JAR ); loader.addURL( url ); loader.invokeMainClass( MAIN_CLASS, newArgs ); } catch ( Throwable t ) { t.printStackTrace(); } } public Class loadApp( String[] args, File jar_file ) throws LaunchException, MalformedURLException { //System.out.println("========= Launcher, loadApp"); if (jar_file != null) jarFile = jar_file; Args myargs = init( args ); URL[] jars = myargs.getURLs(); String[] newArgs = myargs.getArgs(); // now update the class.path property StringBuffer baseClassPath = new StringBuffer( System.getProperty( "java.class.path" ) ); if ( baseClassPath.charAt( baseClassPath.length() - 1 ) == File.pathSeparatorChar ) { baseClassPath.setLength( baseClassPath.length() - 1 ); } for ( int i = 0; i < jars.length; ++i ) { baseClassPath.append( File.pathSeparatorChar ); baseClassPath.append( Locator.fromURI( jars[ i ].toString() ) ); } System.setProperty( "java.class.path", baseClassPath.toString() ); // set up a class loader for the application and set the context classloader try { SubJarClassLoader loader = new SubJarClassLoader( jars, getClass().getClassLoader() ); Thread.currentThread().setContextClassLoader( loader ); //System.out.println("========= Launcher, loadApp almost done"); return loader.loadClass( "ise.antelope.common.AntelopePanel", true ); } catch(Exception e) { e.printStackTrace(); return null; } } public Class getAntelopePanelClass() { return getAntelopePanelClass( null ); } public Class getAntelopePanelClass( File jar_file ) { try { jarFile = jar_file; Args myargs = init( new String[] {} ); if ( myargs == null ) return null; SubJarClassLoader loader = new SubJarClassLoader( myargs.getURLs(), getClass().getClassLoader() ); Thread.currentThread().setContextClassLoader( loader ); String filename = jar_file.toString(); filename = filename.replaceAll( "[ ]", "%20" ); filename = filename.replaceAll( "\\\\", "/" ); String jarurl = "subjar:/" + filename + "!" + PLUGIN_JAR; Class c = Class.forName("ise.antelope.launcher.subjar.Handler"); URL url = new URL( jarurl ); loader.addURL( url ); return loader.findClass( "ise.antelope.common.AntelopePanel" ); } catch ( Exception e ) { e.printStackTrace(); return null; } } /** * Run the launcher to launch Antelope * * @param args the command line arguments * * @exception MalformedURLException if the URLs required for the classloader * cannot be created. */ private Args init( String[] args ) throws LaunchException, MalformedURLException { //System.out.println("===== Launcher, init starting"); if (args == null) args = new String[]{}; String antHomeProperty = AntUtils.getAntHome(); File antHome = null; if ( antHomeProperty != null ) { antHome = new File( antHomeProperty ); System.setProperty( ANTHOME_PROPERTY, antHomeProperty ); } System.out.println( "ANT_HOME: " + antHome ); if ( antHome == null || !antHome.exists() ) { /// need to ask user for Ant location WhereIsAntDialog d = new WhereIsAntDialog(); d.setVisible( true ); String ah = d.getAntHome(); if ( ah != null ) antHome = new File( ah ); if ( ah == null || !antHome.exists() ) throw new LaunchException( "Ant home is set incorrectly or " + "Ant could not be located" ); System.setProperty( ANTHOME_PROPERTY, antHome.getAbsolutePath() ); } // app jars File sourceJar = jarFile; if ( sourceJar == null ) { sourceJar = Locator.getClassSource( ise.antelope.launcher.Launcher.class ); } if ( sourceJar == null ) { //System.out.println("===== Launcher, init is returning null, couldn't find sourceJar"); return null; } File jarDir = sourceJar.getParentFile(); ///URL[] appJars = Locator.getLocationURLs( jarDir ); URL[] appJars = Locator.getLocationURLs( sourceJar ); // library jars specified on command line List libPaths = new ArrayList(); List argList = new ArrayList(); String[] newArgs; for ( int i = 0; i < args.length; ++i ) { if ( args[ i ].equals( "-lib" ) ) { if ( i == args.length - 1 ) { throw new LaunchException( "The -lib argument must " + "be followed by a library location" ); } libPaths.add( args[ ++i ] ); } else { argList.add( args[ i ] ); } } if ( libPaths.size() == 0 ) { newArgs = args; } else { newArgs = ( String[] ) argList.toArray( new String[ 0 ] ); } List libPathURLs = new ArrayList(); for ( Iterator i = libPaths.iterator(); i.hasNext(); ) { String libPath = ( String ) i.next(); StringTokenizer myTokenizer = new StringTokenizer( libPath, System.getProperty( "path.separator" ) ); while ( myTokenizer.hasMoreElements() ) { String elementName = myTokenizer.nextToken(); File element = new File( elementName ); if ( elementName.indexOf( "%" ) != -1 && !element.exists() ) { continue; } if ( element.isDirectory() ) { // add any jars in the directory URL[] dirURLs = Locator.getLocationURLs( element ); for ( int j = 0; j < dirURLs.length; ++j ) { libPathURLs.add( dirURLs[ j ] ); } } libPathURLs.add( element.toURL() ); } } URL[] libJars = ( URL[] ) libPathURLs.toArray( new URL[ 0 ] ); // Now try to find JAVA_HOME to load tools.jar File toolsJar = Locator.getToolsJar(); // determine ant library directory for system jars: use property // or default using location of ant-launcher.jar File antLibDir = null; String antLibDirProperty = System.getProperty( ANTLIBDIR_PROPERTY ); if ( antLibDirProperty != null ) { antLibDir = new File( antLibDirProperty ); } if ( ( antLibDir == null ) || !antLibDir.exists() ) { antLibDir = new File( antHome, "lib" ); System.setProperty( ANTLIBDIR_PROPERTY, antLibDir.getAbsolutePath() ); } URL[] systemJars = Locator.getLocationURLs( antLibDir ); // user library jars File userLibDir = new File( System.getProperty( "user.home" ), USER_LIBDIR ); URL[] userJars = Locator.getLocationURLs( userLibDir ); List jarsList = new ArrayList(); for ( int i = 0; i < appJars.length; i++ ) jarsList.add( appJars[ i ] ); for ( int i = 0; i < libJars.length; i++ ) jarsList.add( libJars[ i ] ); for ( int i = 0; i < userJars.length; i++ ) jarsList.add( userJars[ i ] ); for ( int i = 0; i < systemJars.length; i++ ) jarsList.add( systemJars[ i ] ); if ( toolsJar != null ) jarsList.add( toolsJar.toURL() ); URL[] jars = ( URL[] ) jarsList.toArray( new URL[ 0 ] ); Args myargs = new Args(); myargs.setURLs( jars ); myargs.setArgs( newArgs ); //System.out.println("===== Launcher, init complete"); return myargs; } } antelope-3.5.1.orig/src/ise/antelope/launcher/GUIUtils.java0000644000175000017500000002115110163726476023465 0ustar drazzibdrazzib// $Id: GUIUtils.java 116 2004-12-27 14:35:41Z danson $ /* * Based on the Apache Software License, Version 1.1 * * Copyright (c) 2002 Dale Anson. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by Dale Anson, * danson@users.sourceforge.net." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The name "Antelope" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact danson@users.sourceforge.net. * * 5. Products derived from this software may not be called "Antelope" * nor may "Antelope" appear in their names without prior written * permission of Dale Anson. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL DALE ANSON OR ANY PROJECT * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== */ package ise.antelope.launcher; import java.util.*; import java.awt.*; import java.awt.event.*; /** * Some GUI utility methods that I seem to use over and over, so I put them * here in one place. Could be easily modified to be AWT-only utilities. * * @author Dale Anson * @version $Revision: 116 $ */ public class GUIUtils { /** * Centers you on me. Useful for centering * dialogs on their parent frames. * * @param me Component to use as basis for centering. * @param you Component to center on me. */ public static void center( Component me, Component you ) { Rectangle my = me.getBounds(); Dimension your = you.getSize(); int x = my.x + ( my.width - your.width ) / 2; if ( x < 0 ) x = 0; int y = my.y + ( my.height - your.height ) / 2; if ( y < 0 ) y = 0; you.setLocation( x, y ); } /** * Centers a component on the screen. * * @param me Component to center. */ public static void centerOnScreen( Component me ) { Dimension screen_size = Toolkit.getDefaultToolkit().getScreenSize(); Dimension window_size = me.getSize(); me.setBounds( ( screen_size.width - window_size.width ) / 2, ( screen_size.height - window_size.height ) / 2, window_size.width, window_size.height ); } /** * Expands a component to fill the screen, just like a 'maximize window'. * * @param frame the component to expand */ public static void fillScreen( Component frame ) { String version = System.getProperty( "java.version" ); if ( version.startsWith( "1.4" ) || version.startsWith( "1.5" ) ) { if ( frame instanceof Frame ) { ( ( Frame ) frame ).setExtendedState( Frame.MAXIMIZED_BOTH ); return ; } } Dimension screen_size = Toolkit.getDefaultToolkit().getScreenSize(); frame.setSize( screen_size ); centerOnScreen( frame ); } /** * @param c a Component * @return the Frame containing the component or null if the component * doesn't have a containing Frame. */ public static Frame getRootFrame( Component c ) { Object parent = c.getParent(); while ( parent != null ) { if ( parent instanceof Frame ) return ( Frame ) parent; parent = ( ( Component ) parent ).getParent(); } return null; } /** * This is the only method that relies on Swing. Comment this one out and * this class is AWT-only capable. * * @param c a Component * @return the JFrame containing the component or null if the component * doesn't have a containing JFrame. */ public static javax.swing.JFrame getRootJFrame( Component c ) { Object parent = c.getParent(); while ( parent != null ) { if ( parent instanceof javax.swing.JFrame ) return ( javax.swing.JFrame ) parent; parent = ( ( Component ) parent ).getParent(); } return null; } /** * @param c a Component * @return the Window containing the component or null if the component * doesn't have a containing Window. */ public static Window getRootWindow( Component c ) { Object parent = c.getParent(); while ( parent != null ) { if ( parent instanceof Window ) return ( Window ) parent; parent = ( ( Component ) parent ).getParent(); } return null; } /** * Calculates the best location to show the component based on the given (x, y) * coordinates. The returned point will be as close as possible to the original * point while allowing the entire component to be displayed on screen. This is * useful for showing dialogs and popups. * @param comp the component that will be shown. * @param x the original x-coordinate of the component or of the desired location. * @param y the original y-coordinate of the component or of the desired location. * @return a point as close to the given (x, y) that will allow the entire * component to be shown on the screen. */ public static Point getBestAnchorPoint( Component comp, int x, int y ) { int new_x = x; int new_y = y; Point p = new Point( new_x, new_y ); javax.swing.SwingUtilities.convertPointToScreen( p, comp ); Dimension size = comp.getSize(); Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); boolean move_horizontally = false; boolean move_vertically = false; // calculate new x coordinate. If the component width is less than the // screen width and the right side of the component is off the screen, // move it left. if ( p.x + size.width > screen.width && size.width < screen.width ) { new_x += ( screen.width - p.x - size.width ); move_horizontally = true; } // calculate new y coordinate. If the component height is less than the // screen height and the bottom of the component is off the screen, move // it up. if ( p.y + size.height > screen.height && size.height < screen.height ) { new_y += ( screen.height - p.y - size.height ); move_vertically = true; } // If the component is a popup and it needed to be moved both horizontally // and vertically, the mouse pointer might end up over a menu item, which // will be invoked when the mouse is released. In this case, move the // component to a location that is not under the point. if ( move_horizontally && move_vertically && (comp instanceof javax.swing.JPopupMenu) ) { // first try to move it more left if (x - size.width - 2 > 0) new_x = x - size.width - 2; else if (y - size.height - 2 > 0){ // try to move it up some more new_y = y - size.height - 2; } } return new Point( new_x, new_y ); } /** * Shows the specified popup menu, ensuring it is displayed within * the bounds of the screen. * * @param popup The popup menu * @param comp The component to show it for * @param x The x coordinate * @param y The y coordinate */ public static void showPopupMenu( javax.swing.JPopupMenu popup, Component comp, int x, int y ) { Point p = getBestAnchorPoint( comp, x, y ); popup.show( comp, p.x, p.y ); } } antelope-3.5.1.orig/src/ise/antelope/launcher/Constants.java0000644000175000017500000001572310163726476024004 0ustar drazzibdrazzib// $Id: Constants.java 116 2004-12-27 14:35:41Z danson $ /* * Based on the Apache Software License, Version 1.1 * * Copyright (c) 2002 Dale Anson. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by Dale Anson, * danson@users.sourceforge.net." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The name "Antelope" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact danson@users.sourceforge.net. * * 5. Products derived from this software may not be called "Antelope" * nor may "Antelope" appear in their names without prior written * permission of Dale Anson. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL DALE ANSON OR ANY PROJECT * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== */ package ise.antelope.launcher; import java.util.prefs.Preferences; /** * A set of constant values for accessing stored properties. The root of the properties * for Antelope is "/ise/antelope". The last open build file is stored there. In * addition, a node per build file ever opened is stored. The name of the node is the * string value of the hashCode for the build file File object. Within these nodes are * stored the individual settings per build file. */ public interface Constants { public final static String NL = System.getProperty("line.separator"); // preferences node public final static String PREFS_NODE = "/ise/antelope"; public static Preferences PREFS = UserPreferencesFactory.getUserRoot().node(PREFS_NODE); // key for last build file open by Antelope public final static String LAST_OPEN_FILE = "lastOpenFile"; // key for ANT_HOME public final static String ANT_HOME = "ANT_HOME"; // recent file list settings -- // name of the recent list key public final static String RECENT_LIST = "recent_list"; // maximum number of items to be stored in the recent list public final static int MAX_RECENT_SIZE = 10; // an event ID sent when the recent list has changed public final static int RECENT_LIST_CHANGED = 810217; // the font and style settings for Antelope as a stand-alone -- public final static String FONT_FAMILY = "fontFamily"; public final static String FONT_STYLE = "fontStyle"; public final static String FONT_SIZE = "fontSize"; // style keys, append COLOR, BOLD, or ITALIC public final static String COMMENT1 = "comment1"; public final static String COMMENT2 = "comment2"; public final static String KEYWORD1 = "keyword1"; public final static String KEYWORD2 = "keyword2"; public final static String KEYWORD3 = "keyword3"; public final static String LITERAL1 = "literal1"; public final static String LITERAL2 = "literal2"; public final static String LABEL = "label"; public final static String OPERATOR = "operator"; public final static String INVALID = "invalid"; public final static String COLOR = ".color"; public final static String BOLD = ".bold"; public final static String ITALIC = ".italic"; // other text area option keys public final static String SHOW_EOL_MARKER = "show_eol_marker"; public final static String EOL_MARKER_COLOR = "eol_marker_color"; public final static String TAB_SIZE = "tab_size"; public final static String SHOW_BRACKET_HILITE = "show_bracket_hilite"; public final static String BRACKET_HILITE_COLOR = "bracket_hilite_color"; public final static String SHOW_LINE_HILITE = "show_line_hilite"; public final static String LINE_HILITE_COLOR = "line_hilite_color"; public final static String USE_BLOCK_CARET = "use_block_caret"; public final static String CARET_COLOR = "caret_color"; public final static String CARET_BLINKS = "caret_blinks"; public final static String ELECTRIC_SCROLL_HEIGHT = "electric_scroll_height"; public final static String SMART_HOME = "smart_home"; public final static String SELECTION_COLOR = "selection_color"; public final static String USE_NATIVE_LF = "use_native_look_and_feel"; // keys for individual option settings -- public final static String SAVE_BEFORE_RUN = "saveBeforeRun"; public final static String SHOW_ALL_TARGETS = "showAllTargets"; public final static String SHOW_TARGETS_WO_DESC = "showTargetsWODesc"; public final static String SHOW_TARGETS_W_DOTS = "showTargetsWDots"; public final static String SHOW_TARGETS_W_DASH = "showTargetsWDash"; public final static String SORT_TARGETS = "sortTargets"; public final static String MSG_LEVEL = "msgLevel"; public final static String SHOW_BUILD_EVENTS = "showBuildEvents"; public final static String SHOW_TARGET_EVENTS = "showTargetEvents"; public final static String SHOW_TASK_EVENTS = "showTaskEvents"; public final static String SHOW_LOG_MSGS = "showLogMsgs"; public final static String USE_ERROR_PARSING = "useErrorParsing"; public final static String SHOW_PERFORMANCE_OUTPUT = "showPerformanceOutput"; public final static String AUTO_RELOAD = "autoReload"; public final static String SHOW_BUTTON_TEXT = "showButtonText"; public final static String SHOW_BUTTON_ICON = "showButtonIcon"; public final static String MULTIPLE_TARGETS = "multipleTargets"; public final static String TARGET_LIST = "targetList"; // node name for Ant user properties public final static String ANT_USER_PROPS = "ant_user_props"; } antelope-3.5.1.orig/src/ise/antelope/launcher/LambdaLayout.java0000644000175000017500000003223310163726476024401 0ustar drazzibdrazzib// $Id: LambdaLayout.java 116 2004-12-27 14:35:41Z danson $ package ise.antelope.launcher; import java.awt.LayoutManager2; import java.awt.Component; import java.awt.Container; import java.awt.Dimension; import java.awt.Insets; import java.awt.Point; import java.io.Serializable; import java.util.BitSet; import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; /** * LambdaLayout, a Java layout manager.
* Copyright (C) 2001, Dale Anson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*

* LambdaLayout -- based on KappaLayout, but handles stretching of components * differently. From e-mail I've received about KappaLayout, many people are * expecting a different stretching behavior when resizing a Frame. LambdaLayout * has this expected behaviour, in that components with the 's' constraint set to * 'w', 'h', or 'wh'/'hw' will resize as the frame resizes. Like KappaLayout, * LambdaLayout respects the preferred size of components and will not shrink * a component to less than it's preferred size.
* Example use:
* This will put a button on a panel in the top of its cell, stretched to * fill the cell width, with a 3 pixel pad:
* * Panel p = new Panel(new LambdaLayout()); * Button b = new Button("OK"); * p.add(b, "0, 0, 1, 2, 2, w, 3"); * *
* The constraints string has this layout:
* "x, y, w, h, a, s, p"
* defined as follows:
*

    *
  • 'x' is the column to put the component, default is 0
    *
  • 'y' is the row to put the component, default is 0
    *
  • 'w' is the width of the component in columns (column span), default is 1. * Can also be R or r, which means the component will span the remaining cells * in the row.
    *
  • 'h' is the height of the component in rows (row span), default is 1. * Can also be R or r, which means the component will span the remaining cells * in the column.
    *
  • 'a' is the alignment within the cell. 'a' can be a value between 0 and 8, * inclusive, (default is 0) and causes the alignment of the component within the cell to follow * this pattern:
    * 8 1 2
    * 7 0 3
    * 6 5 4
    , or
    * 0 horizontal center, vertical center,
    * 1 horizontal center, vertical top,
    * 2 horizontal right, vertical top,
    * 3 horizontal right, vertical center,
    * 4 horizontal right, vertical bottom,
    * 5 horizontal center, vertical bottom,
    * 6 horizontal left, vertical bottom,
    * 7 horizontal left, vertical center,
    * 8 horizontal left, vertical top.
    *

    * By popular request, the alignment constraint can also be represented as:
    * NW N NE
    *  W 0 E
    * SW S SE
    * which are compass directions for alignment within the cell. *

  • 's' is the stretch value. 's' can have these values:
    * 'w' stretch to fill cell width
    * 'h' stretch to fill cell height
    * 'wh' or 'hw' stretch to fill both cell width and cell height
    * '0' (character 'zero') no stretch (default) *
  • 'p' is the amount of padding to put around the component. This much blank * space will be applied on all sides of the component, default is 0. *
* Parameters may be omitted (default values will be used), e.g., * p.add(new Button("OK), "1,4,,,w,");
* which means put the button at column 1, row 4, default 1 column wide, default * 1 row tall, stretch to fit width of column, no padding.
* Spaces in the parameter string are ignored, so these are identical:
* p.add(new Button("OK), "1,4,,,w,");
* p.add(new Button("OK), " 1, 4, , , w");

* Rather than use a constraints string, a Constraints object may be used * directly, similar to how GridBag uses a GridBagConstraint. E.g,
* * Panel p = new Panel();
* LambdaLayout tl = new LambdaLayout();
* p.setLayout(tl);
* LambdaLayout.Constraints con = tl.getConstraint();
* con.x = 1;
* con.y = 2;
* con.w = 2;
* con.h = 2;
* con.s = "wh";
* panel.add(new Button("OK"), con);
* con.x = 3;
* panel.add(new Button("Cancel"), con);
*

* Note that the same Constraints can be reused, thereby reducing the number of * objects created.

* @author Dale Anson * @version $Revision: 116 $ */ public class LambdaLayout extends KappaLayout implements LayoutManager2, Serializable { /** * Required by LayoutManager, does all the real layout work. This is the only * method in LambdaLayout, all other methods are in KappaLayout. */ public void layoutContainer(Container parent) { synchronized(parent.getTreeLock()) { Insets insets = parent.getInsets(); int max_width = parent.getSize().width - (insets.left + insets.right); int max_height = parent.getSize().height - (insets.top + insets.bottom); int x = insets.left; // x and y location to put component in pixels int y = insets.top; int xfill = 0; // how much extra space to put between components int yfill = 0; // when stretching to fill entire container boolean add_xfill = false; boolean add_yfill = false; // make sure preferred size is known, a side effect is that countColumns // and countRows are automatically called. calculateDimensions(); // if necessary, calculate the amount of padding to add between the // components to fill the container if ( max_width > _preferred_width ) { int pad_divisions = 0; for ( int i = 0; i < _col_count; i++ ) { if ( _col_widths[i] >= 0 ) ++pad_divisions; } if ( pad_divisions > 0 ) xfill = (max_width - _preferred_width) / pad_divisions / 2; } if ( max_height > _preferred_height ) { int pad_divisions = 0; for ( int i = 0; i < _row_count; i++ ) { if ( _row_heights[i] >= 0 ) ++pad_divisions; } if ( pad_divisions > 0 ) yfill = (max_height - _preferred_height) / pad_divisions / 2; } // do the layout. Components are handled by columns, top to bottom, // left to right. Point cell = new Point(); for ( int current_col = 0; current_col < _col_count; current_col++ ) { // adjust x for previous column widths x = insets.left; for ( int n = 0; n < current_col; n++ ) { x += Math.abs(_col_widths[n]); if ( _col_widths[n] > 0 ) x += xfill * 2; } for ( int current_row = 0; current_row < _row_count; current_row++ ) { // adjust y for previous row heights y = insets.top; for ( int n = 0; n < current_row; n++ ) { y += Math.abs(_row_heights[n]); if ( _row_heights[n] > 0 ) { y += yfill * 2; } } cell.x = current_col; cell.y = current_row; Component c = (Component)_components.get(cell); if ( c != null && c.isVisible() ) { Dimension d = c.getPreferredSize(); Constraints q = (Constraints)_constraints.get(c); // calculate width of spanned columns = sum(preferred column // widths) + sum(xfill between columns) int sum_cols = 0; int sum_xfill = xfill * 2; for ( int n = current_col; n < current_col + q.w; n++ ) { sum_cols += Math.abs(_col_widths[n]); } if ( _col_widths[current_col] > 0 ) { for ( int n = current_col; n < current_col + q.w - 1; n++ ) { if ( _col_widths[n] > 0 ) sum_xfill += xfill * 2; } sum_cols += sum_xfill; } // calculate height of spanned rows int sum_rows = 0; int sum_yfill = yfill * 2; for ( int n = current_row; n < current_row + q.h; n++ ) { sum_rows += Math.abs(_row_heights[n]); } if ( _row_heights[current_row] > 0 ) { for ( int n = current_row; n < current_row + q.h - 1; n++ ) { if ( _row_heights[n] > 0 ) sum_yfill += yfill * 2; } sum_rows += sum_yfill; } int x_adj; int y_adj; // stretch if required if ( q.s.indexOf("w") != -1 && _col_widths[current_col] > 0 ) { d.width = sum_cols - q.p * 2; x_adj = q.p * 2; } else { x_adj = sum_cols - d.width; } if ( q.s.indexOf("h") != -1 && _row_heights[current_row] > 0 ) { d.height = sum_rows - q.p * 2; y_adj = q.p * 2; } else { y_adj = sum_rows - d.height; } // in each case, add the adjustment for the cell, then subtract // the correction after applying it. This prevents the corrections // from improperly accumulating across cells. Padding must be handled // explicitly for each case. // Alignment follows this pattern within the spanned cells: // 8 1 2 or NW N NE // 7 0 3 W 0 E // 6 5 4 SW S SE switch ( q.a ) { case N: // top center x += x_adj / 2 ; y += q.p; c.setBounds(x, y, d.width, d.height); x -= x_adj / 2; y -= q.p; break; case NE: // top right x += x_adj - q.p; y += q.p; c.setBounds(x, y, d.width, d.height); x -= x_adj - q.p; y -= q.p; break; case E: // center right x += x_adj - q.p; y += y_adj / 2; c.setBounds(x, y, d.width, d.height); x -= x_adj - q.p; y -= y_adj / 2; break; case SE: // bottom right x += x_adj - q.p; y += y_adj - q.p; c.setBounds(x, y, d.width, d.height); x -= x_adj - q.p; y -= y_adj - q.p; break; case S: // bottom center x += x_adj / 2; y += y_adj - q.p; c.setBounds(x, y, d.width, d.height); x -= x_adj / 2; y -= y_adj - q.p; break; case SW: // bottom left x += q.p; y += y_adj - q.p; c.setBounds(x, y, d.width, d.height); x -= q.p; y -= y_adj - q.p; break; case W: // center left x += q.p; y += y_adj / 2; c.setBounds(x, y, d.width, d.height); x -= q.p; y -= y_adj / 2; break; case NW: // top left x += q.p; y += q.p; c.setBounds(x, y, d.width, d.height); x -= q.p; y -= q.p; break; case 0: // dead center default: x += x_adj / 2; y += y_adj / 2; c.setBounds(x, y, d.width, d.height); x -= x_adj / 2; y -= y_adj / 2; break; } } } } } } } antelope-3.5.1.orig/src/ise/antelope/launcher/SubJarClassLoader.java0000644000175000017500000004154310226275024025316 0ustar drazzibdrazzibpackage ise.antelope.launcher; import java.io.*; import java.net.*; import java.lang.reflect.*; import java.util.*; import java.util.jar.*; /** * A class loader for loading jar files. By allowing "jar" urls, that is, urls * of the form jar:<url>!/{entry}, jars nested inside other jars can be * loaded. *

* Suppose you have a jar named mainjar.jar like this:

*

 *     META-INF/
 *     META-INF/MANIFEST.MF
 *     test/
 *     test/Main.class
 *     subjar.jar
 * 

* Assume that test.Main is set in the manifest file so that executing
* java -jar mainjar.jar
* will execute test.Main. When test.Main is invoked, nothing in subjar.jar is * loaded into a classloader as class files. Now suppose you want to invoke a * class in subjar.jar. Code similar to this in test.Main would do it: *

 * // if subjar.jar has a class specified in the manifest as the main class, then
 * // this code would invoke that class
 * URL url = getClass().getResource("/subjar.jar");
 * SubJarClassLoader cl = new SubJarClassLoader( url );
 * String name = SubJarClassLoader.getMainClassName(url);
 * cl.invokeClass( name, args);    // args defined elsewhere
 *
 * // if you want to get an arbitrary object out of subjar.jar, then this code
 * // would do it
 * String MAIN_CLASS = "test.MyClass";
 * Class mainClass = cl.loadClass(MAIN_CLASS);
 * Object object = mainClass.newInstance();
 * 

* This class loader is not restricted to loading nested jars, jars from any * location can be loaded as long as they are specified with a jar url or file * url format. If a file url is given, then it is assumed that the file is a * jar file and will be treated as such. While the comments throughout this * class say "jar", "zip" is also supported. *

* The motivation for this class loader is I want to be able to use the xml * parser bundled with Ant from within Antelope from within jEdit when the XML * plugin is also loaded. The XML plugin bundles its own parser which may not be * as current as that bundled with Ant. Furthermore, I can now bundle as many * jar files together into a single jar file for distribution and not have to * worry about making sure all the jar files are in the classpath, etc. * * @author Dale Anson, Jan 2005 */ public class SubJarClassLoader extends URLClassLoader { public static final String HANDLER_PKG = "ise.antelope.launcher"; static { String handler_pkgs = System.getProperty("java.protocol.handler.pkgs"); handler_pkgs = handler_pkgs == null ? "" : handler_pkgs; if (handler_pkgs.indexOf(HANDLER_PKG) == -1) { System.setProperty("java.protocol.handler.pkgs", HANDLER_PKG + "|" + handler_pkgs); } //System.out.println("java.protocol.handler.pkgs = " + System.getProperty("java.protocol.handler.pkgs")); } // a list of URLs that this classloader will handle private ArrayList urls; // look up for jar entries, the key is a String of the name of an entry in a // jar file, the value is a URL to a jar file that contains the entry. private HashMap myClassNames = new HashMap(); /** * Creates a new SubJarClassLoader for the specified jar url. * * @param url the url of a jar */ public SubJarClassLoader( URL url ) { this( new URL[] { url } ); } /** * Creates a new SubJarClassLoader for the specified jar urls. * * @param urls the urls of some jars */ public SubJarClassLoader( URL[] urls ) { super( urls ); this.urls = new ArrayList(); this.urls.addAll( Arrays.asList( urls ) ); loadMyClassNames(); } /** * Creates a new SubJarClassLoader for the specified url and sets the parent * classloader. * @param url the url of a jar * @param parent the parent classloader */ public SubJarClassLoader( URL url, ClassLoader parent ) { this( new URL[] {url}, parent ); } /** * Creates a new SubJarClassLoader for the specified urls and sets the parent * classloader. * @param urls the urls of some jars * @param parent the parent classloader */ public SubJarClassLoader( URL[] urls, ClassLoader parent ) { super( urls, parent ); this.urls = new ArrayList(); this.urls.addAll( Arrays.asList( urls ) ); loadMyClassNames(); } /** * Add a URL to be handled by this classloader. The given URL must be to a * jar. * @param url the url of a jar */ public void addURL( URL url ) { if ( urls == null ) urls = new ArrayList(); urls.add( url ); //if ( url.getProtocol().equals( "jar" ) ) loadClassNamesForUrl( url ); } /** * Populates the jar entry lookup by connecting to each url that this * classloader knows about and reading the jar entries. */ private void loadMyClassNames() { for ( Iterator it = urls.iterator(); it.hasNext(); ) { URL url = ( URL ) it.next(); loadClassNamesForUrl( url ); } } /** * Populates the jar entry lookup by connecting to the given url and * reading the jar entries. * @param url the url to connect to */ private void loadClassNamesForUrl( URL url ) { try { if ( url.getProtocol().equals( "jar" ) ) { JarInputStream jis = new JarInputStream( url.openStream() ); try { while ( true ) { JarEntry je = jis.getNextJarEntry(); if ( je == null ) break; if ( je.isDirectory() ) continue; String je_name = je.getName(); if ( je_name.endsWith( ".class" ) ) je_name = je_name.substring( 0, je_name.length() - 6 ); je_name = je_name.replace( '/', '.' ); myClassNames.put( je_name, url ); } } catch ( Exception e ) { jis.close(); e.printStackTrace(); } } else if ( url.getProtocol().equals( "file" ) ) { String urlstring = url.toString(); urlstring = urlstring.replaceAll("[ ]", "%20"); JarFile jf = new JarFile( new File( new URI( urlstring ) ) ); Enumeration en = jf.entries(); while ( en.hasMoreElements() ) { JarEntry je = ( JarEntry ) en.nextElement(); if ( je.isDirectory() ) continue; String je_name = je.getName(); if ( je_name.endsWith( ".class" ) ) je_name = je_name.substring( 0, je_name.length() - 6 ); je_name = je_name.replace( '/', '.' ); myClassNames.put( je_name, url ); } } } catch ( Exception e ) { e.printStackTrace(); } } /** * Convenience method to get the name of the jar file main class. * @param url the URL of a jar file, both "file" and "jar" urls are supported. * @return the name of the main class as specified in the jar manifest, null * if the manifest does not contain a Main-Class attribute. */ public static String getMainClassName( URL url ) throws IOException { if ( url.getProtocol().equals( "jar" ) ) { JarInputStream jis = new JarInputStream( url.openStream() ); Manifest manifest = jis.getManifest(); Attributes attr = manifest.getMainAttributes(); String classname = attr != null ? attr.getValue( Attributes.Name.MAIN_CLASS ) : null; jis.close(); return classname; } else if ( url.getProtocol().equals( "file" ) ) { String filename = url.getFile(); File f = new File( filename ); if ( !f.exists() ) throw new FileNotFoundException( "File " + filename + " referenced by URL " + url + " does not exist." ); JarFile jarfile = new JarFile( f ); Manifest manifest = jarfile.getManifest(); Attributes attr = manifest.getMainAttributes(); String classname = attr != null ? attr.getValue( Attributes.Name.MAIN_CLASS ) : null; return classname; } else return null; } /** * Invokes the application in this jar file given the name of the * main class and an array of arguments. The class must define a * static method "main" which takes an array of String arguemtns * and is of return type "void". * * @param name the name of the main class * @param args the arguments for the application * @exception ClassNotFoundException if the specified class could not * be found * @exception NoSuchMethodException if the specified class does not * contain a "main" method * @exception InvocationTargetException if the application raised an * exception */ public void invokeMainClass( String name, String[] args ) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException { Class c = loadClass( name ); Method m = c.getMethod( "main", new Class[] { args.getClass() } ); m.setAccessible( true ); int mods = m.getModifiers(); if ( m.getReturnType() != void.class || !Modifier.isStatic( mods ) || !Modifier.isPublic( mods ) ) { throw new NoSuchMethodException( "main" ); } try { m.invoke( null, new Object[] { args } ); } catch ( IllegalAccessException e ) { // this should not happen as setAccessible has been set to true } } /** * Same as calling loadClass(classname, false). */ public Class loadClass( String classname ) throws ClassNotFoundException { return loadClass( classname, false ); } /** * Loads the class with the specified name. Unlike the default implementation of * this method in ClassLoader, this method searches for classes in the following * order: *

    *
  1. Invoke findLoadedClass(String) to check if the class has already been * loaded. *
  2. Invoke the findClass(String) method to find the class in our jar file(s). *
  3. Invoke the loadClass method on the parent class loader. If the parent * is null the class loader built-in to the virtual machine is used, instead. *
* If the class was found using the above steps, and the resolve flag is true, * this method will then invoke the resolveClass(Class) method on the resulting * Class object. *

* The reason for looking for a class in our jar file(s) first is so that I * can override any class loaded by a parent class loader with a special class. * In particular, I want to load the xml parser distributed with Ant rather * than any parser that jEdit may have loaded. * * @param classname the name of the class to load * @param resolve if true, then resolve the class */ public Class loadClass( String classname, boolean resolve ) throws ClassNotFoundException { Class c = findLoadedClass( classname ); if ( c != null ) return c; try { c = findClass( classname ); } catch ( ClassNotFoundException e ) { ClassLoader parent = getParent(); if ( parent == null ) parent = getSystemClassLoader(); c = parent.loadClass( classname ); } if ( c != null && resolve ) resolveClass( c ); return c; } /** * Finds the specified class in one of the jar urls. * @param classname the name of the class to find. * @return the class, look in this class loader first, then the parent * class loader. */ public Class findClass( String classname ) throws ClassNotFoundException { byte[] b = loadClassData( classname ); if ( b.length == 0 ) return super.findClass( classname ); try { return defineClass( classname, b, 0, b.length ); } catch ( Exception e ) { throw new ClassNotFoundException( "Not found: " + classname ); } } private byte[] loadClassData( String classname ) { try { InputStream is = getDataInputStream( classname ); if ( is == null ) { return new byte[ 0 ]; } ByteArrayOutputStream baos = new ByteArrayOutputStream(); while ( true ) { int b = is.read(); if ( b == -1 ) break; baos.write( ( byte ) b ); } is.close(); baos.flush(); return baos.toByteArray(); } catch ( Exception e ) { e.printStackTrace(); return new byte[ 0 ]; } } /** * @param name the name of an entry in the jar file * @return a JarInputStream positioned at the start of the data for the * given entry or null if an entry could not be found. */ private InputStream getDataInputStream( String name ) { try { URL url = ( URL ) myClassNames.get( name ); if ( url == null ) return null; if ( url.getProtocol().equals( "jar" ) ) { JarInputStream jis = new JarInputStream( url.openStream() ); while ( true ) { JarEntry je = jis.getNextJarEntry(); if ( je == null ) return null; if ( je.isDirectory() ) continue; String je_name = je.getName(); if ( je_name.endsWith( ".class" ) ) je_name = je_name.substring( 0, je_name.length() - 6 ); je_name = je_name.replace( '/', '.' ); if ( je_name.equals( name ) ) { return jis; } } } else if ( url.getProtocol().equals( "file" ) ) { String filename = url.getFile(); File f = new File( filename ); if ( !f.exists() ) return null; JarFile jarfile = new JarFile( f ); JarEntry je = jarfile.getJarEntry( name ); if ( je == null ) return null; return jarfile.getInputStream( je ); } return null; } catch ( Exception e ) { e.printStackTrace(); return null; } } public URL getResource(String name) { URL url = findResource(name); if (url == null) url = super.getResource(name); return url; } public URL findResource(String name) { try { String lookup = name.replace('/', '.'); URL url = ( URL ) myClassNames.get( lookup ); if ( url == null ) return super.findResource(name); if ( url.getProtocol().equals( "jar" ) ) { JarInputStream jis = new JarInputStream( url.openStream() ); while ( true ) { JarEntry je = jis.getNextJarEntry(); if ( je == null ) return null; if ( je.isDirectory() ) continue; String je_name = je.getName(); if ( je_name.endsWith( ".class" ) ){ je_name = je_name.substring( 0, je_name.length() - 6 ); je_name = je_name.replace( '/', '.' ); } if ( je_name.equals( name ) ) { String urlstring = "sub" + url.toString() + "!/" + name; URL resource_url = new URL(urlstring); return resource_url; } } } else if ( url.getProtocol().equals( "file" ) ) { String filename = url.getFile(); File f = new File( filename ); if ( !f.exists() ) return null; JarFile jarfile = new JarFile( f ); JarEntry je = jarfile.getJarEntry( name ); if ( je == null ) return null; String urlstring = "jar:" + url.toString() + "!/" + name; URL resource_url = new URL(urlstring); return resource_url; } return null; } catch ( Exception e ) { e.printStackTrace(); return null; } } } antelope-3.5.1.orig/src/ise/antelope/app/0000755000175000017500000000000011056552274020127 5ustar drazzibdrazzibantelope-3.5.1.orig/src/ise/antelope/app/StyleEditor.java0000644000175000017500000001340510337347414023243 0ustar drazzibdrazzib/* * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Ant", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package ise.antelope.app; import ise.antelope.common.Constants; import ise.antelope.app.jedit.SyntaxStyle; import ise.library.KappaLayout; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.border.EmptyBorder; /** * Allows the user to select a style for a particular syntax type. * @author Dale Anson, Dec 2002 */ public class StyleEditor extends JDialog { private JCheckBox italic_cb; private JCheckBox bold_cb; private JButton text_color_btn; private JButton ok_btn; private JButton cancel_btn; private SyntaxStyle style = null; public StyleEditor( JDialog parent, SyntaxStyle ss ) { super( parent ); setModal( true ); setResizable( false ); setTitle( "Set Style" ); JPanel pane = new JPanel(); pane.setLayout( new KappaLayout() ); setContentPane( pane ); pane.setBorder( new EmptyBorder( 6, 6, 6, 6 ) ); italic_cb = new JCheckBox( "Italic" ); italic_cb.setSelected( ss.isItalic() ); bold_cb = new JCheckBox( "Bold" ); bold_cb.setSelected( ss.isBold() ); JLabel label = new JLabel( "Text color:" ); text_color_btn = new JButton(); text_color_btn.setBackground( ss.getColor() ); ok_btn = new JButton( "OK" ); cancel_btn = new JButton( "Cancel" ); pane.add( italic_cb, "0, 0, 3, 1, W, , 3" ); pane.add( bold_cb, "0, 1, 3, 1, W, , 3" ); pane.add( label, "0, 2, 2, 1, W, , 3" ); pane.add( text_color_btn, "2, 2, 1, 1, 0, wh, 3" ); pane.add( KappaLayout.createVerticalStrut( 11 ), "0, 3" ); KappaLayout layout = new KappaLayout(); JPanel btn_panel = new JPanel( layout ); btn_panel.add( ok_btn, "0, 0, 1, 1, 0, wh, 3" ); btn_panel.add( cancel_btn, "1, 0, 1, 1, 0, wh, 3" ); layout.makeColumnsSameWidth( 0, 1 ); pane.add( btn_panel, "0, 4, 3, 1, 0, , 6" ); text_color_btn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { Color color = JColorChooser.showDialog( StyleEditor.this, "Pick Color", text_color_btn.getBackground() ); if (color != null) text_color_btn.setBackground( color ); } } ); ok_btn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { style = new SyntaxStyle( text_color_btn.getBackground(), italic_cb.isSelected(), bold_cb.isSelected() ); setVisible( false ); } } ); cancel_btn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { style = null; setVisible( false ); } } ); pack(); Rectangle pb = parent.getBounds(); setLocation( pb.x + pb.width, pb.y ); setVisible( true ); } public SyntaxStyle getStyle() { return style; } } antelope-3.5.1.orig/src/ise/antelope/app/OptionSettings.java0000644000175000017500000001425610337347414023772 0ustar drazzibdrazzibpackage ise.antelope.app; import ise.antelope.app.jedit.JEditTextArea; import ise.antelope.app.jedit.TextAreaPainter; import ise.antelope.app.jedit.InputHandler; import ise.antelope.common.Constants; import java.awt.Color; /** * Bad, Dale, bad. You have another class named OptionSettings in the * ise.antelope.common package. */ public class OptionSettings { private boolean caretBlinks = true; private Color caretColor = Color.black; private int electricScroll = 3; private int tabSize = 4; private boolean useSmartHome = false; private Color selectionColor = new Color( 0xccccff ) ; private Color lineHighlightColor = new Color( 0xe0e0e0 ) ; private boolean showLineHighlight = true; private Color bracketHighlightColor = Color.black; private boolean showBracketHighlight = false; private Color eolMarkerColor = new Color( 0x009999 ) ; private boolean showEolMarker = false; private boolean useNativeLF = false; public boolean getCaretBlinks() { return caretBlinks; } public void setCaretBlinks( boolean b ) { caretBlinks = b; } public Color getCaretColor() { return caretColor; } public void setCaretColor( Color c ) { caretColor = c; } public int getElectricScroll() { return electricScroll; } public void setElectricScroll( int i ) { electricScroll = i; } public int getTabSize() { return tabSize; } public void setTabSize( int i ) { tabSize = i; } public boolean useSmartHome() { return useSmartHome; } public void setUseSmartHome( boolean b ) { useSmartHome = b; } public Color getSelectionColor() { return selectionColor; } public void setSelectionColor( Color c ) { selectionColor = c; } public Color getLineHighlightColor() { return lineHighlightColor; } public void setLineHighlightColor( Color c ) { lineHighlightColor = c; } public boolean showLineHighlight() { return showLineHighlight; } public void setShowLineHighlight( boolean b ) { showLineHighlight = b; } public Color getBracketHighlightColor() { return bracketHighlightColor; } public void setBracketHighlightColor( Color c ) { bracketHighlightColor = c; } public boolean showBracketHighlight() { return showBracketHighlight; } public void setShowBracketHighlight( boolean b ) { showBracketHighlight = b; } public Color getEolMarkerColor() { return eolMarkerColor; } public void setEolMarkerColor( Color c ) { eolMarkerColor = c; } public boolean showEolMarker() { return showEolMarker; } public void setShowEolMarker( boolean b ) { showEolMarker = b; } public void setUseNativeLookAndFeel(boolean b) { useNativeLF = b; } public boolean getUseNativeLookAndFeel() { return useNativeLF; } /** * load default settings from preferences */ public void load() { caretBlinks = Constants.PREFS.getBoolean( Constants.CARET_BLINKS, true ); caretColor = new Color( Constants.PREFS.getInt( Constants.CARET_COLOR, 0 ) ); electricScroll = Constants.PREFS.getInt( Constants.ELECTRIC_SCROLL_HEIGHT, 3 ); useSmartHome = Constants.PREFS.getBoolean( Constants.SMART_HOME, false ); tabSize = Constants.PREFS.getInt( Constants.TAB_SIZE, 4 ); selectionColor = new Color( Constants.PREFS.getInt( Constants.SELECTION_COLOR, 0xccccff ) ); lineHighlightColor = new Color( Constants.PREFS.getInt( Constants.LINE_HILITE_COLOR, 0xe0e0e0 ) ); showLineHighlight = Constants.PREFS.getBoolean( Constants.SHOW_LINE_HILITE, true ); bracketHighlightColor = new Color( Constants.PREFS.getInt( Constants.BRACKET_HILITE_COLOR, 0 ) ); showBracketHighlight = Constants.PREFS.getBoolean( Constants.SHOW_BRACKET_HILITE, false ); eolMarkerColor = new Color( Constants.PREFS.getInt( Constants.EOL_MARKER_COLOR, 0x009999 ) ); showEolMarker = Constants.PREFS.getBoolean( Constants.SHOW_EOL_MARKER, false ); useNativeLF = Constants.PREFS.getBoolean(Constants.USE_NATIVE_LF, false); } /** * save default settings to preferences */ public void save() { Constants.PREFS.putBoolean( Constants.CARET_BLINKS, getCaretBlinks() ); Constants.PREFS.putInt( Constants.CARET_COLOR, getCaretColor().getRGB() ); Constants.PREFS.putInt( Constants.ELECTRIC_SCROLL_HEIGHT, getElectricScroll() ); Constants.PREFS.putBoolean( Constants.SMART_HOME, useSmartHome() ); Constants.PREFS.putInt( Constants.TAB_SIZE, tabSize ); Constants.PREFS.putInt( Constants.SELECTION_COLOR, getSelectionColor().getRGB() ); Constants.PREFS.putInt( Constants.LINE_HILITE_COLOR, getLineHighlightColor().getRGB() ); Constants.PREFS.putBoolean( Constants.SHOW_LINE_HILITE, showLineHighlight() ); Constants.PREFS.putInt( Constants.BRACKET_HILITE_COLOR, getBracketHighlightColor().getRGB() ); Constants.PREFS.putBoolean( Constants.SHOW_BRACKET_HILITE, showBracketHighlight() ); Constants.PREFS.putInt( Constants.EOL_MARKER_COLOR, getEolMarkerColor().getRGB() ); Constants.PREFS.putBoolean( Constants.SHOW_EOL_MARKER, showEolMarker() ); Constants.PREFS.putBoolean( Constants.USE_NATIVE_LF, getUseNativeLookAndFeel()); } /** * Apply the current settings to the give editor. */ public void apply( JEditTextArea editor ) { TextAreaPainter tap = editor.getPainter(); tap.setCaretColor( getCaretColor() ); editor.setElectricScroll( getElectricScroll() ); editor.getDocument().putProperty( javax.swing.text.PlainDocument.tabSizeAttribute, new Integer( tabSize ) ); editor.putClientProperty( InputHandler.SMART_HOME_END_PROPERTY, new Boolean( useSmartHome() ) ); tap.setSelectionColor( getSelectionColor() ); tap.setLineHighlightColor( getLineHighlightColor() ); tap.setLineHighlightEnabled( showLineHighlight() ); tap.setBracketHighlightEnabled( showBracketHighlight() ); tap.setBracketHighlightColor( getBracketHighlightColor() ); tap.setEOLMarkersPainted( showEolMarker() ); tap.setEOLMarkerColor( getEolMarkerColor() ); } } antelope-3.5.1.orig/src/ise/antelope/app/OptionChooser.java0000644000175000017500000002722310337347414023572 0ustar drazzibdrazzibpackage ise.antelope.app; import ise.antelope.common.Constants; import ise.antelope.app.jedit.JEditTextArea; import ise.antelope.app.jedit.TextAreaPainter; import ise.antelope.app.jedit.InputHandler; import ise.library.KappaLayout; import ise.library.GUIUtils; import java.awt.Color; import java.awt.Cursor; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import javax.swing.*; import javax.swing.border.EmptyBorder; /** * Support these option settings, using the values shown here as the defaults: * boolean caretBlinks = true; * Color caretColor = Color.black; * int electricScroll = 3; * boolean useSmartHome = false; * Color selectionColor = new Color( 0xccccff ) ; * Color lineHighlightColor = new Color( 0xe0e0e0 ) ; * boolean showLineHighlight = true; * Color bracketHighlightColor = Color.black; * boolean showBracketHighlight = false; * Color eolMarkerColor = new Color( 0x009999 ) ; * boolean showEolMarker = false; * textArea.setClientProperty(InputHandler.SMART_HOME_END_PROPERTY, true) * * Also supports switching to native look and feel. */ public class OptionChooser extends JDialog { private JFrame parent = null; private JEditTextArea editor; private OptionChooser( JFrame parent, JEditTextArea t ) { super( parent ); this.parent = parent; editor = t; setModal( true ); setResizable( false ); setTitle( "Editor Options" ); KappaLayout layout = new KappaLayout(); JPanel pane = new JPanel( layout ); pane.setBorder( new EmptyBorder( 11, 11, 11, 11 ) ); setContentPane( pane ); final OptionSettings settings = new OptionSettings(); settings.load(); final JCheckBox caretBlinks_cb = new JCheckBox( "Caret blinks" ); final JButton caretColor_btn = new JButton(); final JSpinner tabSize_sp = new JSpinner( new SpinnerNumberModel( 4, 0, 12, 1 ) ); final JSpinner electricScroll_sp = new JSpinner( new SpinnerNumberModel( 3, 0, 10, 1 ) ); final JCheckBox useSmartHome_cb = new JCheckBox( "Use BRIEF-style home/end" ); final JButton selectionColor_btn = new JButton(); final JButton lineHighlightColor_btn = new JButton(); final JCheckBox showLineHighlight_cb = new JCheckBox( "Show line highlight" ); final JButton bracketHighlightColor_btn = new JButton(); final JCheckBox showBracketHighlight_cb = new JCheckBox( "Highlight matching brackets" ); final JButton eolMarkerColor_btn = new JButton(); final JCheckBox showEolMarker_cb = new JCheckBox( "Show end of line marker" ); final JCheckBox useNativeLF_cb = new JCheckBox("Use native look and feel"); caretBlinks_cb.setSelected( settings.getCaretBlinks() ); caretColor_btn.setBackground( settings.getCaretColor() ); useSmartHome_cb.setSelected( settings.useSmartHome() ); selectionColor_btn.setBackground( settings.getSelectionColor() ); lineHighlightColor_btn.setBackground( settings.getLineHighlightColor() ); showLineHighlight_cb.setSelected( settings.showLineHighlight() ); lineHighlightColor_btn.setEnabled( showLineHighlight_cb.isSelected() ); bracketHighlightColor_btn.setBackground( settings.getBracketHighlightColor() ); showBracketHighlight_cb.setSelected( settings.showBracketHighlight() ); bracketHighlightColor_btn.setEnabled( showBracketHighlight_cb.isSelected() ); showEolMarker_cb.setSelected( settings.showEolMarker() ); eolMarkerColor_btn.setBackground( settings.getEolMarkerColor() ); eolMarkerColor_btn.setEnabled( showEolMarker_cb.isSelected() ); useNativeLF_cb.setSelected(settings.getUseNativeLookAndFeel()); pane.add( caretBlinks_cb, "0, 0, 1, 1, W, 0, 3" ); pane.add( new JLabel( "Caret color" ), "0, 1, 1, 1, W, 0, 3" ); pane.add( caretColor_btn, "1, 1, 1, 1, 0, wh, 3" ); pane.add( new JLabel( "Tab size" ), "0, 2, 1, 1, W, 0, 3" ); pane.add( tabSize_sp, "1, 2, 1, 1, 0, wh, 3" ); pane.add( new JLabel( "Electric scroll height" ), "0, 3, 1, 1, W, 0, 3" ); pane.add( electricScroll_sp, "1, 3, 1, 1, 0, wh, 3" ); pane.add( useSmartHome_cb, "0, 4, 1, 1, W, 0, 3" ); pane.add( new JLabel( "Selection color" ), "0, 5, 1, 1, W, 0, 3" ); pane.add( selectionColor_btn, "1, 5, 1, 1, 0, wh, 3" ); pane.add( showLineHighlight_cb, "0, 6, 1, 1, W, 0, 3" ); pane.add( lineHighlightColor_btn, "1, 6, 1, 1, 0, wh, 3" ); pane.add( showBracketHighlight_cb, "0, 7, 1, 1, W, 0, 3" ); pane.add( bracketHighlightColor_btn, "1, 7, 1, 1, 0, wh, 3" ); pane.add( showEolMarker_cb, "0, 8, 1, 1, W, 0, 3" ); pane.add( eolMarkerColor_btn, "1, 8, 1, 1, 0, wh, 3" ); pane.add( useNativeLF_cb, "0, 9, 1, 1, 0, wh, 3" ); layout.makeRowsSameHeight(); KappaLayout kl = new KappaLayout(); JPanel btn_panel = new JPanel( kl ); JButton ok_btn = new JButton( "OK" ); JButton apply_btn = new JButton( "Apply" ); JButton cancel_btn = new JButton( "Cancel" ); btn_panel.add( ok_btn, "0, 0, 1, 1, 0, wh, 3" ); btn_panel.add( apply_btn, "1, 0, 1, 1, 0, wh, 3" ); btn_panel.add( cancel_btn, "2, 0, 1, 1, 0, wh, 3" ); kl.makeColumnsSameWidth(); pane.add( KappaLayout.createVerticalStrut( 17 ), "0, 10" ); pane.add( btn_panel, "0, 11, 2, 1, 0, 0, 6" ); ActionListener al = new ActionListener() { public void actionPerformed( ActionEvent ae ) { JButton btn = ( JButton ) ae.getSource(); Color color = JColorChooser.showDialog( OptionChooser.this, "Pick Color", btn.getBackground() ); if ( color != null ) { btn.setBackground( color ); } } }; caretColor_btn.addActionListener( al ); selectionColor_btn.addActionListener( al ); lineHighlightColor_btn.addActionListener( al ); bracketHighlightColor_btn.addActionListener( al ); eolMarkerColor_btn.addActionListener( al ); showLineHighlight_cb.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { lineHighlightColor_btn.setEnabled( showLineHighlight_cb.isSelected() ); } } ); showBracketHighlight_cb.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { bracketHighlightColor_btn.setEnabled( showBracketHighlight_cb.isSelected() ); } } ); showEolMarker_cb.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { eolMarkerColor_btn.setEnabled( showEolMarker_cb.isSelected() ); } } ); final ActionListener apply_action = new ActionListener() { public void actionPerformed( ActionEvent ae ) { // text area settings TextAreaPainter tap = editor.getPainter(); tap.setCaretColor( caretColor_btn.getBackground() ); editor.setElectricScroll( ( ( Integer ) electricScroll_sp.getValue() ).intValue() ); editor.getDocument().putProperty( javax.swing.text.PlainDocument.tabSizeAttribute, ( Integer ) tabSize_sp.getValue() ); editor.putClientProperty( InputHandler.SMART_HOME_END_PROPERTY, new Boolean( useSmartHome_cb.isSelected() ) ); tap.setSelectionColor( selectionColor_btn.getBackground() ); tap.setLineHighlightColor( lineHighlightColor_btn.getBackground() ); tap.setLineHighlightEnabled( showLineHighlight_cb.isSelected() ); tap.setBracketHighlightEnabled( showBracketHighlight_cb.isSelected() ); tap.setBracketHighlightColor( bracketHighlightColor_btn.getBackground() ); tap.setEOLMarkersPainted( showEolMarker_cb.isSelected() ); tap.setEOLMarkerColor( eolMarkerColor_btn.getBackground() ); // look and feel try { if (useNativeLF_cb.isSelected()) { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } else { UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); } OptionChooser.this.parent.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); SwingUtilities.updateComponentTreeUI(OptionChooser.this.parent); SwingUtilities.updateComponentTreeUI(OptionChooser.this); OptionChooser.this.parent.validate(); OptionChooser.this.validate(); } catch (Exception e) {} finally { OptionChooser.this.parent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } // save settings settings.setCaretColor( caretColor_btn.getBackground( ) ); settings.setUseSmartHome( useSmartHome_cb.isSelected( ) ); settings.setElectricScroll( ( ( Integer ) electricScroll_sp.getValue() ).intValue() ); settings.setTabSize( ( ( Integer ) tabSize_sp.getValue() ).intValue() ); settings.setSelectionColor( selectionColor_btn.getBackground( ) ); settings.setLineHighlightColor( lineHighlightColor_btn.getBackground( ) ); settings.setShowLineHighlight( showLineHighlight_cb.isSelected( ) ); settings.setBracketHighlightColor( bracketHighlightColor_btn.getBackground( ) ); settings.setShowBracketHighlight( showBracketHighlight_cb.isSelected( ) ); settings.setEolMarkerColor( eolMarkerColor_btn.getBackground( ) ); settings.setShowEolMarker( showEolMarker_cb.isSelected( ) ); settings.setUseNativeLookAndFeel(useNativeLF_cb.isSelected()); settings.save(); } }; final ActionListener close_action = new ActionListener() { public void actionPerformed( ActionEvent ae ) { setVisible( false ); dispose(); } }; ActionListener ok_action = new ActionListener() { public void actionPerformed( ActionEvent ae ) { apply_action.actionPerformed( null ); close_action.actionPerformed( null ); } }; ok_btn.addActionListener( ok_action ); apply_btn.addActionListener( apply_action ); cancel_btn.addActionListener( close_action ); pack(); GUIUtils.center( parent, this ); setVisible( true ); } public static OptionChooser showDialog( JFrame parent, JEditTextArea editor ) { OptionChooser c = new OptionChooser( parent, editor ); return c; } } antelope-3.5.1.orig/src/ise/antelope/app/jedit/0000755000175000017500000000000010637540660021226 5ustar drazzibdrazzibantelope-3.5.1.orig/src/ise/antelope/app/jedit/InputHandler.java0000644000175000017500000010000110116145560024446 0ustar drazzibdrazzib/* * InputHandler.java - Manages key bindings and executes actions * Copyright (C) 1999 Slava Pestov * * You may use and modify this package for any purpose. Redistribution is * permitted, in both source and binary form, provided that this notice * remains intact in all source distributions of this package. */ package ise.antelope.app.jedit; import javax.swing.text.*; import javax.swing.JPopupMenu; import java.awt.event.*; import java.awt.Component; import java.util.*; /** * An input handler converts the user's key strokes into concrete actions. * It also takes care of macro recording and action repetition.

* * This class provides all the necessary support code for an input * handler, but doesn't actually do any key binding logic. It is up * to the implementations of this class to do so. * * @author Slava Pestov * @version $Id: InputHandler.java 111 2004-09-04 03:52:16Z danson $ * @see org.gjt.sp.jedit.textarea.DefaultInputHandler */ public abstract class InputHandler extends KeyAdapter { /** * If this client property is set to Boolean.TRUE on the text area, * the home/end keys will support 'smart' BRIEF-like behaviour * (one press = start/end of line, two presses = start/end of * viewscreen, three presses = start/end of document). By default, * this property is not set. */ public static final String SMART_HOME_END_PROPERTY = "InputHandler.homeEnd"; public static final ActionListener BACKSPACE = new backspace(); public static final ActionListener BACKSPACE_WORD = new backspace_word(); public static final ActionListener DELETE = new delete(); public static final ActionListener DELETE_WORD = new delete_word(); public static final ActionListener END = new end( false ); public static final ActionListener DOCUMENT_END = new document_end( false ); public static final ActionListener SELECT_END = new end( true ); public static final ActionListener SELECT_DOC_END = new document_end( true ); public static final ActionListener INSERT_BREAK = new insert_break(); public static final ActionListener INSERT_TAB = new insert_tab(); public static final ActionListener HOME = new home( false ); public static final ActionListener DOCUMENT_HOME = new document_home( false ); public static final ActionListener SELECT_HOME = new home( true ); public static final ActionListener SELECT_DOC_HOME = new document_home( true ); public static final ActionListener NEXT_CHAR = new next_char( false ); public static final ActionListener NEXT_LINE = new next_line( false ); public static final ActionListener NEXT_PAGE = new next_page( false ); public static final ActionListener NEXT_WORD = new next_word( false ); public static final ActionListener SELECT_NEXT_CHAR = new next_char( true ); public static final ActionListener SELECT_NEXT_LINE = new next_line( true ); public static final ActionListener SELECT_NEXT_PAGE = new next_page( true ); public static final ActionListener SELECT_NEXT_WORD = new next_word( true ); public static final ActionListener OVERWRITE = new overwrite(); public static final ActionListener PREV_CHAR = new prev_char( false ); public static final ActionListener PREV_LINE = new prev_line( false ); public static final ActionListener PREV_PAGE = new prev_page( false ); public static final ActionListener PREV_WORD = new prev_word( false ); public static final ActionListener SELECT_PREV_CHAR = new prev_char( true ); public static final ActionListener SELECT_PREV_LINE = new prev_line( true ); public static final ActionListener SELECT_PREV_PAGE = new prev_page( true ); public static final ActionListener SELECT_PREV_WORD = new prev_word( true ); public static final ActionListener REPEAT = new repeat(); public static final ActionListener TOGGLE_RECT = new toggle_rect(); public static final ActionListener UNDO = new undo(); public static final ActionListener REDO = new redo(); public static final ActionListener CUT = new cut(); public static final ActionListener COPY = new copy(); public static final ActionListener PASTE = new paste(); // Default action public static final ActionListener INSERT_CHAR = new insert_char(); private static Hashtable actions; static { actions = new Hashtable(); actions.put( "backspace", BACKSPACE ); actions.put( "backspace-word", BACKSPACE_WORD ); actions.put( "delete", DELETE ); actions.put( "delete-word", DELETE_WORD ); actions.put( "end", END ); actions.put( "select-end", SELECT_END ); actions.put( "document-end", DOCUMENT_END ); actions.put( "select-doc-end", SELECT_DOC_END ); actions.put( "insert-break", INSERT_BREAK ); actions.put( "insert-tab", INSERT_TAB ); actions.put( "home", HOME ); actions.put( "select-home", SELECT_HOME ); actions.put( "document-home", DOCUMENT_HOME ); actions.put( "select-doc-home", SELECT_DOC_HOME ); actions.put( "next-char", NEXT_CHAR ); actions.put( "next-line", NEXT_LINE ); actions.put( "next-page", NEXT_PAGE ); actions.put( "next-word", NEXT_WORD ); actions.put( "select-next-char", SELECT_NEXT_CHAR ); actions.put( "select-next-line", SELECT_NEXT_LINE ); actions.put( "select-next-page", SELECT_NEXT_PAGE ); actions.put( "select-next-word", SELECT_NEXT_WORD ); actions.put( "overwrite", OVERWRITE ); actions.put( "prev-char", PREV_CHAR ); actions.put( "prev-line", PREV_LINE ); actions.put( "prev-page", PREV_PAGE ); actions.put( "prev-word", PREV_WORD ); actions.put( "select-prev-char", SELECT_PREV_CHAR ); actions.put( "select-prev-line", SELECT_PREV_LINE ); actions.put( "select-prev-page", SELECT_PREV_PAGE ); actions.put( "select-prev-word", SELECT_PREV_WORD ); actions.put( "repeat", REPEAT ); actions.put( "toggle-rect", TOGGLE_RECT ); actions.put( "insert-char", INSERT_CHAR ); actions.put( "undo", UNDO ); actions.put( "redo", REDO ); actions.put("cut", CUT); actions.put("copy", COPY); actions.put("paste", PASTE); } /** * Returns a named text area action. * @param name The action name */ public static ActionListener getAction( String name ) { return ( ActionListener ) actions.get( name ); } /** * Returns the name of the specified text area action. * @param listener The action */ public static String getActionName( ActionListener listener ) { Enumeration en = getActions(); while ( en.hasMoreElements() ) { String name = ( String ) en.nextElement(); ActionListener _listener = getAction( name ); if ( _listener == listener ) return name; } return null; } /** * Returns an enumeration of all available actions. */ public static Enumeration getActions() { return actions.keys(); } /** * Adds the default key bindings to this input handler. * This should not be called in the constructor of this * input handler, because applications might load the * key bindings from a file, etc. */ public abstract void addDefaultKeyBindings(); /** * Adds a key binding to this input handler. * @param keyBinding The key binding (the format of this is * input-handler specific) * @param action The action */ public abstract void addKeyBinding( String keyBinding, ActionListener action ); /** * Removes a key binding from this input handler. * @param keyBinding The key binding */ public abstract void removeKeyBinding( String keyBinding ); /** * Removes all key bindings from this input handler. */ public abstract void removeAllKeyBindings(); /** * Grabs the next key typed event and invokes the specified * action with the key as a the action command. * @param action The action */ public void grabNextKeyStroke( ActionListener listener ) { grabAction = listener; } /** * Returns if repeating is enabled. When repeating is enabled, * actions will be executed multiple times. This is usually * invoked with a special key stroke in the input handler. */ public boolean isRepeatEnabled() { return repeat; } /** * Enables repeating. When repeating is enabled, actions will be * executed multiple times. Once repeating is enabled, the input * handler should read a number from the keyboard. */ public void setRepeatEnabled( boolean repeat ) { this.repeat = repeat; } /** * Returns the number of times the next action will be repeated. */ public int getRepeatCount() { return ( repeat ? Math.max( 1, repeatCount ) : 1 ); } /** * Sets the number of times the next action will be repeated. * @param repeatCount The repeat count */ public void setRepeatCount( int repeatCount ) { this.repeatCount = repeatCount; } /** * Returns the macro recorder. If this is non-null, all executed * actions should be forwarded to the recorder. */ public InputHandler.MacroRecorder getMacroRecorder() { return recorder; } /** * Sets the macro recorder. If this is non-null, all executed * actions should be forwarded to the recorder. * @param recorder The macro recorder */ public void setMacroRecorder( InputHandler.MacroRecorder recorder ) { this.recorder = recorder; } /** * Returns a copy of this input handler that shares the same * key bindings. Setting key bindings in the copy will also * set them in the original. */ public abstract InputHandler copy(); /** * Executes the specified action, repeating and recording it as * necessary. * @param listener The action listener * @param source The event source * @param actionCommand The action command */ public void executeAction( ActionListener listener, Object source, String actionCommand ) { // create event ActionEvent evt = new ActionEvent( source, ActionEvent.ACTION_PERFORMED, actionCommand ); // don't do anything if the action is a wrapper // (like EditAction.Wrapper) if ( listener instanceof Wrapper ) { listener.actionPerformed( evt ); return ; } // remember old values, in case action changes them boolean _repeat = repeat; int _repeatCount = getRepeatCount(); // execute the action if ( listener instanceof InputHandler.NonRepeatable ) listener.actionPerformed( evt ); else { for ( int i = 0; i < Math.max( 1, repeatCount ); i++ ) listener.actionPerformed( evt ); } // do recording. Notice that we do no recording whatsoever // for actions that grab keys if ( grabAction == null ) { if ( recorder != null ) { if ( !( listener instanceof InputHandler.NonRecordable ) ) { if ( _repeatCount != 1 ) recorder.actionPerformed( REPEAT, String.valueOf( _repeatCount ) ); recorder.actionPerformed( listener, actionCommand ); } } // If repeat was true originally, clear it // Otherwise it might have been set by the action, etc if ( _repeat ) { repeat = false; repeatCount = 0; } } } /** * Returns the text area that fired the specified event. * @param evt The event */ public static JEditTextArea getTextArea( EventObject evt ) { if ( evt != null ) { Object o = evt.getSource(); if ( o instanceof Component ) { // find the parent text area Component c = ( Component ) o; for ( ;; ) { if ( c instanceof JEditTextArea ) return ( JEditTextArea ) c; else if ( c == null ) break; if ( c instanceof JPopupMenu ) c = ( ( JPopupMenu ) c ) .getInvoker(); else c = c.getParent(); } } } // this shouldn't happen System.err.println( "BUG: getTextArea() returning null" ); System.err.println( "Report this to Slava Pestov " ); return null; } // protected members /** * If a key is being grabbed, this method should be called with * the appropriate key event. It executes the grab action with * the typed character as the parameter. */ protected void handleGrabAction( KeyEvent evt ) { // Clear it *before* it is executed so that executeAction() // resets the repeat count ActionListener _grabAction = grabAction; grabAction = null; executeAction( _grabAction, evt.getSource(), String.valueOf( evt.getKeyChar() ) ); } // protected members protected ActionListener grabAction; protected boolean repeat; protected int repeatCount; protected InputHandler.MacroRecorder recorder; /** * If an action implements this interface, it should not be repeated. * Instead, it will handle the repetition itself. */ public interface NonRepeatable {} /** * If an action implements this interface, it should not be recorded * by the macro recorder. Instead, it will do its own recording. */ public interface NonRecordable {} /** * For use by EditAction.Wrapper only. * @since jEdit 2.2final */ public interface Wrapper {} /** * Macro recorder. */ public interface MacroRecorder { void actionPerformed( ActionListener listener, String actionCommand ); } public static class backspace implements ActionListener { public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); if ( !textArea.isEditable() ) { textArea.getToolkit().beep(); return ; } if ( textArea.getSelectionStart() != textArea.getSelectionEnd() ) { textArea.setSelectedText( "" ); } else { int caret = textArea.getCaretPosition(); if ( caret == 0 ) { textArea.getToolkit().beep(); return ; } try { textArea.getDocument().remove( caret - 1, 1 ); } catch ( BadLocationException bl ) { bl.printStackTrace(); } } } } public static class backspace_word implements ActionListener { public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); int start = textArea.getSelectionStart(); if ( start != textArea.getSelectionEnd() ) { textArea.setSelectedText( "" ); } int line = textArea.getCaretLine(); int lineStart = textArea.getLineStartOffset( line ); int caret = start - lineStart; String lineText = textArea.getLineText( textArea .getCaretLine() ); if ( caret == 0 ) { if ( lineStart == 0 ) { textArea.getToolkit().beep(); return ; } caret--; } else { String noWordSep = ( String ) textArea.getDocument().getProperty( "noWordSep" ); caret = TextUtilities.findWordStart( lineText, caret, noWordSep ); } try { textArea.getDocument().remove( caret + lineStart, start - ( caret + lineStart ) ); } catch ( BadLocationException bl ) { bl.printStackTrace(); } } } public static class delete implements ActionListener { public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); if ( !textArea.isEditable() ) { textArea.getToolkit().beep(); return ; } if ( textArea.getSelectionStart() != textArea.getSelectionEnd() ) { textArea.setSelectedText( "" ); } else { int caret = textArea.getCaretPosition(); if ( caret == textArea.getDocumentLength() ) { textArea.getToolkit().beep(); return ; } try { textArea.getDocument().remove( caret, 1 ); } catch ( BadLocationException bl ) { bl.printStackTrace(); } } } } public static class delete_word implements ActionListener { public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); int start = textArea.getSelectionStart(); if ( start != textArea.getSelectionEnd() ) { textArea.setSelectedText( "" ); } int line = textArea.getCaretLine(); int lineStart = textArea.getLineStartOffset( line ); int caret = start - lineStart; String lineText = textArea.getLineText( textArea .getCaretLine() ); if ( caret == lineText.length() ) { if ( lineStart + caret == textArea.getDocumentLength() ) { textArea.getToolkit().beep(); return ; } caret++; } else { String noWordSep = ( String ) textArea.getDocument().getProperty( "noWordSep" ); caret = TextUtilities.findWordEnd( lineText, caret, noWordSep ); } try { textArea.getDocument().remove( start, ( caret + lineStart ) - start ); } catch ( BadLocationException bl ) { bl.printStackTrace(); } } } public static class end implements ActionListener { private boolean select; public end( boolean select ) { this.select = select; } public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); int caret = textArea.getCaretPosition(); int lastOfLine = textArea.getLineEndOffset( textArea.getCaretLine() ) - 1; int lastVisibleLine = textArea.getFirstLine() + textArea.getVisibleLines(); if ( lastVisibleLine >= textArea.getLineCount() ) { lastVisibleLine = Math.min( textArea.getLineCount() - 1, lastVisibleLine ); } else lastVisibleLine -= ( textArea.getElectricScroll() + 1 ); int lastVisible = textArea.getLineEndOffset( lastVisibleLine ) - 1; int lastDocument = textArea.getDocumentLength(); if ( caret == lastDocument ) { textArea.getToolkit().beep(); return ; } else if ( !Boolean.TRUE.equals( textArea.getClientProperty( SMART_HOME_END_PROPERTY ) ) ) caret = lastOfLine; else if ( caret == lastVisible ) caret = lastDocument; else if ( caret == lastOfLine ) caret = lastVisible; else caret = lastOfLine; if ( select ) textArea.select( textArea.getMarkPosition(), caret ); else textArea.setCaretPosition( caret ); } } public static class document_end implements ActionListener { private boolean select; public document_end( boolean select ) { this.select = select; } public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); if ( select ) textArea.select( textArea.getMarkPosition(), textArea.getDocumentLength() ); else textArea.setCaretPosition( textArea .getDocumentLength() ); } } public static class home implements ActionListener { private boolean select; public home( boolean select ) { this.select = select; } public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); int caret = textArea.getCaretPosition(); int firstLine = textArea.getFirstLine(); int firstOfLine = textArea.getLineStartOffset( textArea.getCaretLine() ); int firstVisibleLine = ( firstLine == 0 ? 0 : firstLine + textArea.getElectricScroll() ); int firstVisible = textArea.getLineStartOffset( firstVisibleLine ); if ( caret == 0 ) { textArea.getToolkit().beep(); return ; } else if ( !Boolean.TRUE.equals( textArea.getClientProperty( SMART_HOME_END_PROPERTY ) ) ) caret = firstOfLine; else if ( caret == firstVisible ) caret = 0; else if ( caret == firstOfLine ) caret = firstVisible; else caret = firstOfLine; if ( select ) textArea.select( textArea.getMarkPosition(), caret ); else textArea.setCaretPosition( caret ); } } public static class document_home implements ActionListener { private boolean select; public document_home( boolean select ) { this.select = select; } public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); if ( select ) textArea.select( textArea.getMarkPosition(), 0 ); else textArea.setCaretPosition( 0 ); } } public static class insert_break implements ActionListener { public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); if ( !textArea.isEditable() ) { textArea.getToolkit().beep(); return ; } textArea.setSelectedText( "\n" ); } } public static class insert_tab implements ActionListener { public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); if ( !textArea.isEditable() ) { textArea.getToolkit().beep(); return ; } textArea.overwriteSetSelectedText( "\t" ); } } public static class next_char implements ActionListener { private boolean select; public next_char( boolean select ) { this.select = select; } public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); int caret = textArea.getCaretPosition(); if ( caret == textArea.getDocumentLength() ) { textArea.getToolkit().beep(); return ; } if ( select ) textArea.select( textArea.getMarkPosition(), caret + 1 ); else textArea.setCaretPosition( caret + 1 ); } } public static class next_line implements ActionListener { private boolean select; public next_line( boolean select ) { this.select = select; } public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); int caret = textArea.getCaretPosition(); int line = textArea.getCaretLine(); if ( line == textArea.getLineCount() - 1 ) { textArea.getToolkit().beep(); return ; } int magic = textArea.getMagicCaretPosition(); if ( magic == -1 ) { magic = textArea.offsetToX( line, caret - textArea.getLineStartOffset( line ) ); } caret = textArea.getLineStartOffset( line + 1 ) + textArea.xToOffset( line + 1, magic ); if ( select ) textArea.select( textArea.getMarkPosition(), caret ); else textArea.setCaretPosition( caret ); textArea.setMagicCaretPosition( magic ); } } public static class next_page implements ActionListener { private boolean select; public next_page( boolean select ) { this.select = select; } public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); int lineCount = textArea.getLineCount(); int firstLine = textArea.getFirstLine(); int visibleLines = textArea.getVisibleLines(); int line = textArea.getCaretLine(); firstLine += visibleLines; if ( firstLine + visibleLines >= lineCount - 1 ) firstLine = lineCount - visibleLines; textArea.setFirstLine( firstLine ); int caret = textArea.getLineStartOffset( Math.min( textArea.getLineCount() - 1, line + visibleLines ) ); if ( select ) textArea.select( textArea.getMarkPosition(), caret ); else textArea.setCaretPosition( caret ); } } public static class next_word implements ActionListener { private boolean select; public next_word( boolean select ) { this.select = select; } public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); int caret = textArea.getCaretPosition(); int line = textArea.getCaretLine(); int lineStart = textArea.getLineStartOffset( line ); caret -= lineStart; String lineText = textArea.getLineText( textArea .getCaretLine() ); if ( caret == lineText.length() ) { if ( lineStart + caret == textArea.getDocumentLength() ) { textArea.getToolkit().beep(); return ; } caret++; } else { String noWordSep = ( String ) textArea.getDocument().getProperty( "noWordSep" ); caret = TextUtilities.findWordEnd( lineText, caret, noWordSep ); } if ( select ) textArea.select( textArea.getMarkPosition(), lineStart + caret ); else textArea.setCaretPosition( lineStart + caret ); } } public static class overwrite implements ActionListener { public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); textArea.setOverwriteEnabled( !textArea.isOverwriteEnabled() ); } } public static class prev_char implements ActionListener { private boolean select; public prev_char( boolean select ) { this.select = select; } public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); int caret = textArea.getCaretPosition(); if ( caret == 0 ) { textArea.getToolkit().beep(); return ; } if ( select ) textArea.select( textArea.getMarkPosition(), caret - 1 ); else textArea.setCaretPosition( caret - 1 ); } } public static class prev_line implements ActionListener { private boolean select; public prev_line( boolean select ) { this.select = select; } public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); int caret = textArea.getCaretPosition(); int line = textArea.getCaretLine(); if ( line == 0 ) { textArea.getToolkit().beep(); return ; } int magic = textArea.getMagicCaretPosition(); if ( magic == -1 ) { magic = textArea.offsetToX( line, caret - textArea.getLineStartOffset( line ) ); } caret = textArea.getLineStartOffset( line - 1 ) + textArea.xToOffset( line - 1, magic ); if ( select ) textArea.select( textArea.getMarkPosition(), caret ); else textArea.setCaretPosition( caret ); textArea.setMagicCaretPosition( magic ); } } public static class prev_page implements ActionListener { private boolean select; public prev_page( boolean select ) { this.select = select; } public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); int firstLine = textArea.getFirstLine(); int visibleLines = textArea.getVisibleLines(); int line = textArea.getCaretLine(); if ( firstLine < visibleLines ) firstLine = visibleLines; textArea.setFirstLine( firstLine - visibleLines ); int caret = textArea.getLineStartOffset( Math.max( 0, line - visibleLines ) ); if ( select ) textArea.select( textArea.getMarkPosition(), caret ); else textArea.setCaretPosition( caret ); } } public static class prev_word implements ActionListener { private boolean select; public prev_word( boolean select ) { this.select = select; } public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); int caret = textArea.getCaretPosition(); int line = textArea.getCaretLine(); int lineStart = textArea.getLineStartOffset( line ); caret -= lineStart; String lineText = textArea.getLineText( textArea .getCaretLine() ); if ( caret == 0 ) { if ( lineStart == 0 ) { textArea.getToolkit().beep(); return ; } caret--; } else { String noWordSep = ( String ) textArea.getDocument().getProperty( "noWordSep" ); caret = TextUtilities.findWordStart( lineText, caret, noWordSep ); } if ( select ) textArea.select( textArea.getMarkPosition(), lineStart + caret ); else textArea.setCaretPosition( lineStart + caret ); } } public static class repeat implements ActionListener, InputHandler.NonRecordable { public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); textArea.getInputHandler().setRepeatEnabled( true ); String actionCommand = evt.getActionCommand(); if ( actionCommand != null ) { textArea.getInputHandler().setRepeatCount( Integer.parseInt( actionCommand ) ); } } } public static class toggle_rect implements ActionListener { public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); textArea.setSelectionRectangular( !textArea.isSelectionRectangular() ); } } public static class insert_char implements ActionListener, InputHandler.NonRepeatable { public void actionPerformed( ActionEvent evt ) { JEditTextArea textArea = getTextArea( evt ); String str = evt.getActionCommand(); int repeatCount = textArea.getInputHandler().getRepeatCount(); if ( textArea.isEditable() ) { StringBuffer buf = new StringBuffer(); for ( int i = 0; i < repeatCount; i++ ) buf.append( str ); textArea.overwriteSetSelectedText( buf.toString() ); } else { textArea.getToolkit().beep(); } } } public static class undo implements ActionListener { public void actionPerformed( ActionEvent ae ) { JEditTextArea textArea = getTextArea( ae ); textArea.undo(); } } public static class redo implements ActionListener { public void actionPerformed( ActionEvent ae ) { JEditTextArea textArea = getTextArea( ae ); textArea.redo(); } } public static class cut implements ActionListener { public void actionPerformed( ActionEvent ae ) { JEditTextArea textArea = getTextArea( ae ); textArea.cut(); } } public static class copy implements ActionListener { public void actionPerformed( ActionEvent ae ) { JEditTextArea textArea = getTextArea( ae ); textArea.copy(); } } public static class paste implements ActionListener { public void actionPerformed( ActionEvent ae ) { JEditTextArea textArea = getTextArea( ae ); textArea.paste(); } } } antelope-3.5.1.orig/src/ise/antelope/app/jedit/TextAreaDefaults.java0000644000175000017500000000446010013736354025275 0ustar drazzibdrazzib/* * TextAreaDefaults.java - Encapsulates default values for various settings * Copyright (C) 1999 Slava Pestov * * You may use and modify this package for any purpose. Redistribution is * permitted, in both source and binary form, provided that this notice * remains intact in all source distributions of this package. */ package ise.antelope.app.jedit; import javax.swing.JPopupMenu; import java.awt.Color; /** * Encapsulates default settings for a text area. This can be passed * to the constructor once the necessary fields have been filled out. * The advantage of doing this over calling lots of set() methods after * creating the text area is that this method is faster. */ public class TextAreaDefaults { private static TextAreaDefaults DEFAULTS; public InputHandler inputHandler; public SyntaxDocument document; public boolean editable; public boolean caretVisible; public boolean caretBlinks; public boolean blockCaret; public int electricScroll; public int cols; public int rows; public SyntaxStyle[] styles; public Color caretColor; public Color selectionColor; public Color lineHighlightColor; public boolean lineHighlight; public Color bracketHighlightColor; public boolean bracketHighlight; public Color eolMarkerColor; public boolean eolMarkers; public boolean paintInvalid; public JPopupMenu popup; /** * Returns a new TextAreaDefaults object with the default values filled * in. */ public static TextAreaDefaults getDefaults() { if(DEFAULTS == null) { DEFAULTS = new TextAreaDefaults(); DEFAULTS.inputHandler = new DefaultInputHandler(); DEFAULTS.inputHandler.addDefaultKeyBindings(); DEFAULTS.document = new SyntaxDocument(); DEFAULTS.editable = true; DEFAULTS.caretVisible = true; DEFAULTS.caretBlinks = true; DEFAULTS.electricScroll = 3; DEFAULTS.cols = 80; DEFAULTS.rows = 25; DEFAULTS.styles = SyntaxUtilities.getDefaultSyntaxStyles(); DEFAULTS.caretColor = Color.red; DEFAULTS.selectionColor = new Color(0xccccff); DEFAULTS.lineHighlightColor = new Color(0xe0e0e0); DEFAULTS.lineHighlight = true; DEFAULTS.bracketHighlightColor = Color.black; DEFAULTS.bracketHighlight = true; DEFAULTS.eolMarkerColor = new Color(0x009999); DEFAULTS.eolMarkers = true; DEFAULTS.paintInvalid = true; } return DEFAULTS; } } antelope-3.5.1.orig/src/ise/antelope/app/jedit/JEditTextArea.java0000644000175000017500000017112110054202512024511 0ustar drazzibdrazzib/* * JEditTextArea.java - jEdit's text component * Copyright (C) 1999 Slava Pestov * * You may use and modify this package for any purpose. Redistribution is * permitted, in both source and binary form, provided that this notice * remains intact in all source distributions of this package. */ package ise.antelope.app.jedit; import javax.swing.event.*; import javax.swing.text.*; import javax.swing.undo.*; import javax.swing.*; import java.awt.datatransfer.*; import java.awt.event.*; import java.awt.*; import java.util.Enumeration; import java.util.Vector; /** * jEdit's text area component. It is more suited for editing program * source code than JEditorPane, because it drops the unnecessary features * (images, variable-width lines, and so on) and adds a whole bunch of * useful goodies such as: *

    *
  • More flexible key binding scheme *
  • Supports macro recorders *
  • Rectangular selection *
  • Bracket highlighting *
  • Syntax highlighting *
  • Command repetition *
  • Block caret can be enabled *
* It is also faster and doesn't have as many problems. It can be used * in other applications; the only other part of jEdit it depends on is * the syntax package.

* * To use it in your app, treat it like any other component, for example: *

JEditTextArea ta = new JEditTextArea();
 * ta.setTokenMarker(new JavaTokenMarker());
 * ta.setText("public class Test {\n"
 *     + "    public static void main(String[] args) {\n"
 *     + "        System.out.println(\"Hello World\");\n"
 *     + "    }\n"
 *     + "}");
* * @author Slava Pestov * @version $Id: JEditTextArea.java 98 2004-05-24 04:10:50Z danson $ */ public class JEditTextArea extends JComponent { /** * Adding components with this name to the text area will place * them left of the horizontal scroll bar. In jEdit, the status * bar is added this way. */ public static String LEFT_OF_SCROLLBAR = "los"; /** * Creates a new JEditTextArea with the default settings. */ public JEditTextArea() { this( TextAreaDefaults.getDefaults() ); } /** * Creates a new JEditTextArea with the specified settings. * @param defaults The default settings */ public JEditTextArea( TextAreaDefaults defaults ) { // Enable the necessary events enableEvents( AWTEvent.KEY_EVENT_MASK ); // Initialize some misc. stuff painter = new TextAreaPainter( this, defaults ); documentHandler = new DocumentHandler(); listenerList = new EventListenerList(); caretEvent = new MutableCaretEvent(); lineSegment = new Segment(); bracketLine = bracketPosition = -1; blink = true; // Initialize the GUI setLayout( new ScrollLayout() ); add( CENTER, painter ); add( RIGHT, vertical = new JScrollBar( JScrollBar.VERTICAL ) ); add( BOTTOM, horizontal = new JScrollBar( JScrollBar.HORIZONTAL ) ); // Add some event listeners vertical.addAdjustmentListener( new AdjustHandler() ); horizontal.addAdjustmentListener( new AdjustHandler() ); painter.addComponentListener( new ComponentHandler() ); painter.addMouseListener( new MouseHandler() ); painter.addMouseMotionListener( new DragHandler() ); painter.addMouseWheelListener(new MouseWheelHandler()); vertical.addMouseWheelListener(new MouseWheelHandler()); addFocusListener( new FocusHandler() ); // Load the defaults setInputHandler( defaults.inputHandler ); setDocument( defaults.document ); editable = defaults.editable; caretVisible = defaults.caretVisible; caretBlinks = defaults.caretBlinks; electricScroll = defaults.electricScroll; popup = defaults.popup; // We don't seem to get the initial focus event? focusedComponent = this; } /** * Returns if this component can be traversed by pressing * the Tab key. This returns true. * @deprecated */ public final boolean isManagingFocus() { return true; } /** * Returns the object responsible for painting this text area. */ public final TextAreaPainter getPainter() { return painter; } /** * Returns the input handler. */ public final InputHandler getInputHandler() { return inputHandler; } /** * Sets the input handler. * @param inputHandler The new input handler */ public void setInputHandler( InputHandler inputHandler ) { this.inputHandler = inputHandler; } /** * Returns true if the caret is blinking, false otherwise. */ public final boolean isCaretBlinkEnabled() { return caretBlinks; } /** * Toggles caret blinking. * @param caretBlinks True if the caret should blink, false otherwise */ public void setCaretBlinkEnabled( boolean caretBlinks ) { this.caretBlinks = caretBlinks; if ( !caretBlinks ) blink = false; painter.invalidateSelectedLines(); } /** * Returns true if the caret is visible, false otherwise. */ public final boolean isCaretVisible() { return ( !caretBlinks || blink ) && caretVisible; } /** * Sets if the caret should be visible. * @param caretVisible True if the caret should be visible, false * otherwise */ public void setCaretVisible( boolean caretVisible ) { this.caretVisible = caretVisible; blink = true; painter.invalidateSelectedLines(); } /** * Blinks the caret. */ public final void blinkCaret() { if ( caretBlinks ) { blink = !blink; painter.invalidateSelectedLines(); } else blink = true; } /** * Returns the number of lines from the top and button of the * text area that are always visible. */ public final int getElectricScroll() { return electricScroll; } /** * Sets the number of lines from the top and bottom of the text * area that are always visible * @param electricScroll The number of lines always visible from * the top or bottom */ public final void setElectricScroll( int electricScroll ) { this.electricScroll = electricScroll; } /** * Updates the state of the scroll bars. This should be called * if the number of lines in the document changes, or when the * size of the text are changes. */ public void updateScrollBars() { if ( vertical != null && visibleLines != 0 ) { vertical.setValues( firstLine, visibleLines, 0, getLineCount() ); vertical.setUnitIncrement( 2 ); vertical.setBlockIncrement( visibleLines ); } int width = painter.getWidth(); if ( horizontal != null && width != 0 ) { horizontal.setValues( -horizontalOffset, width, 0, width * 5 ); horizontal.setUnitIncrement( painter.getFontMetrics() .charWidth( 'w' ) ); horizontal.setBlockIncrement( width / 2 ); } } /** * Returns the line displayed at the text area's origin. */ public final int getFirstLine() { return firstLine; } /** * Sets the line displayed at the text area's origin without * updating the scroll bars. */ public void setFirstLine( int firstLine ) { if ( firstLine == this.firstLine ) return ; int oldFirstLine = this.firstLine; this.firstLine = firstLine; if ( firstLine != vertical.getValue() ) updateScrollBars(); painter.repaint(); } /** * Returns the number of lines visible in this text area. */ public final int getVisibleLines() { return visibleLines; } /** * Recalculates the number of visible lines. This should not * be called directly. */ public final void recalculateVisibleLines() { if ( painter == null ) return ; int height = painter.getHeight(); int lineHeight = painter.getFontMetrics().getHeight(); int oldVisibleLines = visibleLines; visibleLines = height / lineHeight; updateScrollBars(); } /** * Returns the horizontal offset of drawn lines. */ public final int getHorizontalOffset() { return horizontalOffset; } /** * Sets the horizontal offset of drawn lines. This can be used to * implement horizontal scrolling. * @param horizontalOffset offset The new horizontal offset */ public void setHorizontalOffset( int horizontalOffset ) { if ( horizontalOffset == this.horizontalOffset ) return ; this.horizontalOffset = horizontalOffset; if ( horizontalOffset != horizontal.getValue() ) updateScrollBars(); painter.repaint(); } /** * A fast way of changing both the first line and horizontal * offset. * @param firstLine The new first line * @param horizontalOffset The new horizontal offset * @return True if any of the values were changed, false otherwise */ public boolean setOrigin( int firstLine, int horizontalOffset ) { boolean changed = false; int oldFirstLine = this.firstLine; if ( horizontalOffset != this.horizontalOffset ) { this.horizontalOffset = horizontalOffset; changed = true; } if ( firstLine != this.firstLine ) { this.firstLine = firstLine; changed = true; } if ( changed ) { updateScrollBars(); painter.repaint(); } return changed; } /** * Ensures that the caret is visible by scrolling the text area if * necessary. * @return True if scrolling was actually performed, false if the * caret was already visible */ public boolean scrollToCaret() { int line = getCaretLine(); int lineStart = getLineStartOffset( line ); int offset = Math.max( 0, Math.min( getLineLength( line ) - 1, getCaretPosition() - lineStart ) ); return scrollTo( line, offset ); } /** * Ensures that the specified line and offset is visible by scrolling * the text area if necessary. * @param line The line to scroll to * @param offset The offset in the line to scroll to * @return True if scrolling was actually performed, false if the * line and offset was already visible */ public boolean scrollTo( int line, int offset ) { // visibleLines == 0 before the component is realized // we can't do any proper scrolling then, so we have // this hack... if ( visibleLines == 0 ) { setFirstLine( Math.max( 0, line - electricScroll ) ); return true; } int newFirstLine = firstLine; int newHorizontalOffset = horizontalOffset; if ( line < firstLine + electricScroll ) { newFirstLine = Math.max( 0, line - electricScroll ); } else if ( line + electricScroll >= firstLine + visibleLines ) { newFirstLine = ( line - visibleLines ) + electricScroll + 1; if ( newFirstLine + visibleLines >= getLineCount() ) newFirstLine = getLineCount() - visibleLines; if ( newFirstLine < 0 ) newFirstLine = 0; } int x = _offsetToX( line, offset ); int width = painter.getFontMetrics().charWidth( 'w' ); if ( x < 0 ) { newHorizontalOffset = Math.min( 0, horizontalOffset - x + width + 5 ); } else if ( x + width >= painter.getWidth() ) { newHorizontalOffset = horizontalOffset + ( painter.getWidth() - x ) - width - 5; } return setOrigin( newFirstLine, newHorizontalOffset ); } /** * Converts a line index to a y co-ordinate. * @param line The line */ public int lineToY( int line ) { FontMetrics fm = painter.getFontMetrics(); return ( line - firstLine ) * fm.getHeight() - ( fm.getLeading() + fm.getMaxDescent() ); } /** * Converts a y co-ordinate to a line index. * @param y The y co-ordinate */ public int yToLine( int y ) { FontMetrics fm = painter.getFontMetrics(); int height = fm.getHeight(); return Math.max( 0, Math.min( getLineCount() - 1, y / height + firstLine ) ); } /** * Converts an offset in a line into an x co-ordinate. This is a * slow version that can be used any time. * @param line The line * @param offset The offset, from the start of the line */ public final int offsetToX( int line, int offset ) { // don't use cached tokens painter.currentLineTokens = null; return _offsetToX( line, offset ); } /** * Converts an offset in a line into an x co-ordinate. This is a * fast version that should only be used if no changes were made * to the text since the last repaint. * @param line The line * @param offset The offset, from the start of the line */ public int _offsetToX( int line, int offset ) { TokenMarker tokenMarker = getTokenMarker(); /* Use painter's cached info for speed */ FontMetrics fm = painter.getFontMetrics(); getLineText( line, lineSegment ); int segmentOffset = lineSegment.offset; int x = horizontalOffset; /* If syntax coloring is disabled, do simple translation */ if ( tokenMarker == null ) { lineSegment.count = offset; return x + Utilities.getTabbedTextWidth( lineSegment, fm, x, painter, 0 ); } /* If syntax coloring is enabled, we have to do this because * tokens can vary in width */ else { Token tokens; if ( painter.currentLineIndex == line && painter.currentLineTokens != null ) tokens = painter.currentLineTokens; else { painter.currentLineIndex = line; tokens = painter.currentLineTokens = tokenMarker.markTokens( lineSegment, line ); } Toolkit toolkit = painter.getToolkit(); Font defaultFont = painter.getFont(); SyntaxStyle[] styles = painter.getStyles(); for ( ;; ) { byte id = tokens.id; if ( id == Token.END ) { return x; } if ( id == Token.NULL ) fm = painter.getFontMetrics(); else fm = styles[ id ].getFontMetrics( defaultFont ); int length = tokens.length; if ( offset + segmentOffset < lineSegment.offset + length ) { lineSegment.count = offset - ( lineSegment.offset - segmentOffset ); return x + Utilities.getTabbedTextWidth( lineSegment, fm, x, painter, 0 ); } else { lineSegment.count = length; x += Utilities.getTabbedTextWidth( lineSegment, fm, x, painter, 0 ); lineSegment.offset += length; } tokens = tokens.next; } } } /** * Converts an x co-ordinate to an offset within a line. * @param line The line * @param x The x co-ordinate */ public int xToOffset( int line, int x ) { TokenMarker tokenMarker = getTokenMarker(); /* Use painter's cached info for speed */ FontMetrics fm = painter.getFontMetrics(); getLineText( line, lineSegment ); char[] segmentArray = lineSegment.array; int segmentOffset = lineSegment.offset; int segmentCount = lineSegment.count; int width = horizontalOffset; if ( tokenMarker == null ) { for ( int i = 0; i < segmentCount; i++ ) { char c = segmentArray[ i + segmentOffset ]; int charWidth; if ( c == '\t' ) charWidth = ( int ) painter.nextTabStop( width, i ) - width; else charWidth = fm.charWidth( c ); if ( painter.isBlockCaretEnabled() ) { if ( x - charWidth <= width ) return i; } else { if ( x - charWidth / 2 <= width ) return i; } width += charWidth; } return segmentCount; } else { Token tokens; if ( painter.currentLineIndex == line && painter .currentLineTokens != null ) tokens = painter.currentLineTokens; else { painter.currentLineIndex = line; tokens = painter.currentLineTokens = tokenMarker.markTokens( lineSegment, line ); } int offset = 0; Toolkit toolkit = painter.getToolkit(); Font defaultFont = painter.getFont(); SyntaxStyle[] styles = painter.getStyles(); for ( ;; ) { byte id = tokens.id; if ( id == Token.END ) return offset; if ( id == Token.NULL ) fm = painter.getFontMetrics(); else fm = styles[ id ].getFontMetrics( defaultFont ); int length = tokens.length; for ( int i = 0; i < length; i++ ) { char c = segmentArray[ segmentOffset + offset + i ]; int charWidth; if ( c == '\t' ) charWidth = ( int ) painter.nextTabStop( width, offset + i ) - width; else charWidth = fm.charWidth( c ); if ( painter.isBlockCaretEnabled() ) { if ( x - charWidth <= width ) return offset + i; } else { if ( x - charWidth / 2 <= width ) return offset + i; } width += charWidth; } offset += length; tokens = tokens.next; } } } /** * Converts a point to an offset, from the start of the text. * @param x The x co-ordinate of the point * @param y The y co-ordinate of the point */ public int xyToOffset( int x, int y ) { int line = yToLine( y ); int start = getLineStartOffset( line ); return start + xToOffset( line, x ); } /** * Returns the document this text area is editing. */ public final Document getDocument() { return document; } /** * Sets the document this text area is editing. * @param document The document */ public void setDocument( SyntaxDocument document ) { if ( this.document == document ) return ; if ( this.document != null ) this.document.removeDocumentListener( documentHandler ); this.document = document; select( 0, 0 ); updateScrollBars(); painter.repaint(); undoManager = new UndoManager(); document.addUndoableEditListener( undoManager ); documentHandler = new DocumentHandler(); document.addDocumentListener( documentHandler ); undoManager.discardAllEdits(); } private UndoManager undoManager = null; public void undo() { try { if ( undoManager.canUndo() ) undoManager.undo(); } catch ( CannotUndoException e ) { Toolkit.getDefaultToolkit().beep(); } } public void redo() { try { if ( undoManager.canRedo() ) undoManager.redo(); } catch ( CannotRedoException e ) { Toolkit.getDefaultToolkit().beep(); } } public boolean canUndo() { return undoManager.canUndo(); } public boolean canRedo() { return undoManager.canRedo(); } /** * Returns the document's token marker. Equivalent to calling * getDocument().getTokenMarker(). */ public final TokenMarker getTokenMarker() { return document.getTokenMarker(); } /** * Sets the document's token marker. Equivalent to caling * getDocument().setTokenMarker(). * @param tokenMarker The token marker */ public final void setTokenMarker( TokenMarker tokenMarker ) { document.setTokenMarker( tokenMarker ); } /** * Returns the length of the document. Equivalent to calling * getDocument().getLength(). */ public final int getDocumentLength() { return document.getLength(); } /** * Returns the number of lines in the document. */ public final int getLineCount() { return document.getDefaultRootElement().getElementCount(); } /** * Returns the line containing the specified offset. * @param offset The offset */ public final int getLineOfOffset( int offset ) { return document.getDefaultRootElement().getElementIndex( offset ); } /** * Returns the start offset of the specified line. * @param line The line * @return The start offset of the specified line, or -1 if the line is * invalid */ public int getLineStartOffset( int line ) { Element lineElement = document.getDefaultRootElement() .getElement( line ); if ( lineElement == null ) return -1; else return lineElement.getStartOffset(); } /** * Returns the end offset of the specified line. * @param line The line * @return The end offset of the specified line, or -1 if the line is * invalid. */ public int getLineEndOffset( int line ) { Element lineElement = document.getDefaultRootElement() .getElement( line ); if ( lineElement == null ) return -1; else return lineElement.getEndOffset(); } /** * Returns the length of the specified line. * @param line The line */ public int getLineLength( int line ) { Element lineElement = document.getDefaultRootElement() .getElement( line ); if ( lineElement == null ) return -1; else return lineElement.getEndOffset() - lineElement.getStartOffset() - 1; } /** * Returns the entire text of this text area. */ public String getText() { try { return document.getText( 0, document.getLength() ); } catch ( BadLocationException bl ) { bl.printStackTrace(); return null; } } /** * Sets the entire text of this text area. */ public void setText( String text ) { try { document.beginCompoundEdit(); document.remove( 0, document.getLength() ); document.insertString( 0, text, null ); } catch ( BadLocationException bl ) { bl.printStackTrace(); } finally { document.endCompoundEdit(); } } /** * Returns the specified substring of the document. * @param start The start offset * @param len The length of the substring * @return The substring, or null if the offsets are invalid */ public final String getText( int start, int len ) { try { return document.getText( start, len ); } catch ( BadLocationException bl ) { bl.printStackTrace(); return null; } } /** * Copies the specified substring of the document into a segment. * If the offsets are invalid, the segment will contain a null string. * @param start The start offset * @param len The length of the substring * @param segment The segment */ public final void getText( int start, int len, Segment segment ) { try { document.getText( start, len, segment ); } catch ( BadLocationException bl ) { bl.printStackTrace(); segment.offset = segment.count = 0; } } /** * Returns the text on the specified line. * @param lineIndex The line * @return The text, or null if the line is invalid */ public final String getLineText( int lineIndex ) { int start = getLineStartOffset( lineIndex ); return getText( start, getLineEndOffset( lineIndex ) - start - 1 ); } /** * Copies the text on the specified line into a segment. If the line * is invalid, the segment will contain a null string. * @param lineIndex The line */ public final void getLineText( int lineIndex, Segment segment ) { int start = getLineStartOffset( lineIndex ); getText( start, getLineEndOffset( lineIndex ) - start - 1, segment ); } /** * Returns the selection start offset. */ public final int getSelectionStart() { return selectionStart; } /** * Returns the offset where the selection starts on the specified * line. */ public int getSelectionStart( int line ) { if ( line == selectionStartLine ) return selectionStart; else if ( rectSelect ) { Element map = document.getDefaultRootElement(); int start = selectionStart - map.getElement( selectionStartLine ) .getStartOffset(); Element lineElement = map.getElement( line ); int lineStart = lineElement.getStartOffset(); int lineEnd = lineElement.getEndOffset() - 1; return Math.min( lineEnd, lineStart + start ); } else return getLineStartOffset( line ); } /** * Returns the selection start line. */ public final int getSelectionStartLine() { return selectionStartLine; } /** * Sets the selection start. The new selection will be the new * selection start and the old selection end. * @param selectionStart The selection start * @see #select(int,int) */ public final void setSelectionStart( int selectionStart ) { select( selectionStart, selectionEnd ); } /** * Returns the selection end offset. */ public final int getSelectionEnd() { return selectionEnd; } /** * Returns the offset where the selection ends on the specified * line. */ public int getSelectionEnd( int line ) { if ( line == selectionEndLine ) return selectionEnd; else if ( rectSelect ) { Element map = document.getDefaultRootElement(); int end = selectionEnd - map.getElement( selectionEndLine ) .getStartOffset(); Element lineElement = map.getElement( line ); int lineStart = lineElement.getStartOffset(); int lineEnd = lineElement.getEndOffset() - 1; return Math.min( lineEnd, lineStart + end ); } else return getLineEndOffset( line ) - 1; } /** * Returns the selection end line. */ public final int getSelectionEndLine() { return selectionEndLine; } /** * Sets the selection end. The new selection will be the old * selection start and the bew selection end. * @param selectionEnd The selection end * @see #select(int,int) */ public final void setSelectionEnd( int selectionEnd ) { select( selectionStart, selectionEnd ); } /** * Returns the caret position. This will either be the selection * start or the selection end, depending on which direction the * selection was made in. */ public final int getCaretPosition() { return ( biasLeft ? selectionStart : selectionEnd ); } /** * Returns the caret line. */ public final int getCaretLine() { return ( biasLeft ? selectionStartLine : selectionEndLine ); } /** * Returns the mark position. This will be the opposite selection * bound to the caret position. * @see #getCaretPosition() */ public final int getMarkPosition() { return ( biasLeft ? selectionEnd : selectionStart ); } /** * Returns the mark line. */ public final int getMarkLine() { return ( biasLeft ? selectionEndLine : selectionStartLine ); } /** * Sets the caret position. The new selection will consist of the * caret position only (hence no text will be selected) * @param caret The caret position * @see #select(int,int) */ public final void setCaretPosition( int caret ) { select( caret, caret ); } /** * Selects all text in the document. */ public final void selectAll() { select( 0, getDocumentLength() ); } /** * Moves the mark to the caret position. */ public final void selectNone() { select( getCaretPosition(), getCaretPosition() ); } /** * Selects from the start offset to the end offset. This is the * general selection method used by all other selecting methods. * The caret position will be start if start < end, and end * if end > start. * @param start The start offset * @param end The end offset */ public void select( int start, int end ) { int newStart, newEnd; boolean newBias; if ( start <= end ) { newStart = start; newEnd = end; newBias = false; } else { newStart = end; newEnd = start; newBias = true; } if ( newStart < 0 || newEnd > getDocumentLength() ) { throw new IllegalArgumentException( "Bounds out of" + " range: " + newStart + "," + newEnd ); } // If the new position is the same as the old, we don't // do all this crap, however we still do the stuff at // the end (clearing magic position, scrolling) if ( newStart != selectionStart || newEnd != selectionEnd || newBias != biasLeft ) { int newStartLine = getLineOfOffset( newStart ); int newEndLine = getLineOfOffset( newEnd ); if ( painter.isBracketHighlightEnabled() ) { if ( bracketLine != -1 ) painter.invalidateLine( bracketLine ); updateBracketHighlight( end ); if ( bracketLine != -1 ) painter.invalidateLine( bracketLine ); } painter.invalidateLineRange( selectionStartLine, selectionEndLine ); painter.invalidateLineRange( newStartLine, newEndLine ); document.addUndoableEdit( new CaretUndo( selectionStart, selectionEnd ) ); selectionStart = newStart; selectionEnd = newEnd; selectionStartLine = newStartLine; selectionEndLine = newEndLine; biasLeft = newBias; fireCaretEvent(); } // When the user is typing, etc, we don't want the caret // to blink blink = true; caretTimer.restart(); // Disable rectangle select if selection start = selection end if ( selectionStart == selectionEnd ) rectSelect = false; // Clear the `magic' caret position used by up/down magicCaret = -1; scrollToCaret(); } /** * Returns the selected text, or null if no selection is active. */ public final String getSelectedText() { if ( selectionStart == selectionEnd ) return null; if ( rectSelect ) { // Return each row of the selection on a new line Element map = document.getDefaultRootElement(); int start = selectionStart - map.getElement( selectionStartLine ) .getStartOffset(); int end = selectionEnd - map.getElement( selectionEndLine ) .getStartOffset(); // Certain rectangles satisfy this condition... if ( end < start ) { int tmp = end; end = start; start = tmp; } StringBuffer buf = new StringBuffer(); Segment seg = new Segment(); for ( int i = selectionStartLine; i <= selectionEndLine; i++ ) { Element lineElement = map.getElement( i ); int lineStart = lineElement.getStartOffset(); int lineEnd = lineElement.getEndOffset() - 1; int lineLen = lineEnd - lineStart; lineStart = Math.min( lineStart + start, lineEnd ); lineLen = Math.min( end - start, lineEnd - lineStart ); getText( lineStart, lineLen, seg ); buf.append( seg.array, seg.offset, seg.count ); if ( i != selectionEndLine ) buf.append( '\n' ); } return buf.toString(); } else { return getText( selectionStart, selectionEnd - selectionStart ); } } /** * Replaces the selection with the specified text. * @param selectedText The replacement text for the selection */ public void setSelectedText( String selectedText ) { if ( !editable ) { throw new InternalError( "Text component" + " read only" ); } document.beginCompoundEdit(); try { if ( rectSelect ) { Element map = document.getDefaultRootElement(); int start = selectionStart - map.getElement( selectionStartLine ) .getStartOffset(); int end = selectionEnd - map.getElement( selectionEndLine ) .getStartOffset(); // Certain rectangles satisfy this condition... if ( end < start ) { int tmp = end; end = start; start = tmp; } int lastNewline = 0; int currNewline = 0; for ( int i = selectionStartLine; i <= selectionEndLine; i++ ) { Element lineElement = map.getElement( i ); int lineStart = lineElement.getStartOffset(); int lineEnd = lineElement.getEndOffset() - 1; int rectStart = Math.min( lineEnd, lineStart + start ); document.remove( rectStart, Math.min( lineEnd - rectStart, end - start ) ); if ( selectedText == null ) continue; currNewline = selectedText.indexOf( '\n', lastNewline ); if ( currNewline == -1 ) currNewline = selectedText.length(); document.insertString( rectStart, selectedText .substring( lastNewline, currNewline ), null ); lastNewline = Math.min( selectedText.length(), currNewline + 1 ); } if ( selectedText != null && currNewline != selectedText.length() ) { int offset = map.getElement( selectionEndLine ) .getEndOffset() - 1; document.insertString( offset, "\n", null ); document.insertString( offset + 1, selectedText .substring( currNewline + 1 ), null ); } } else { document.remove( selectionStart, selectionEnd - selectionStart ); if ( selectedText != null ) { document.insertString( selectionStart, selectedText, null ); } } } catch ( BadLocationException bl ) { bl.printStackTrace(); throw new InternalError( "Cannot replace" + " selection" ); } // No matter what happends... stops us from leaving document // in a bad state finally { document.endCompoundEdit(); } setCaretPosition( selectionEnd ); } /** * Returns true if this text area is editable, false otherwise. */ public final boolean isEditable() { return editable; } /** * Sets if this component is editable. * @param editable True if this text area should be editable, * false otherwise */ public final void setEditable( boolean editable ) { this.editable = editable; } /** * Returns the right click popup menu. */ public final JPopupMenu getRightClickPopup() { return popup; } /** * Sets the right click popup menu. * @param popup The popup */ public final void setRightClickPopup( JPopupMenu popup ) { this.popup = popup; } /** * Returns the `magic' caret position. This can be used to preserve * the column position when moving up and down lines. */ public final int getMagicCaretPosition() { return magicCaret; } /** * Sets the `magic' caret position. This can be used to preserve * the column position when moving up and down lines. * @param magicCaret The magic caret position */ public final void setMagicCaretPosition( int magicCaret ) { this.magicCaret = magicCaret; } /** * Similar to setSelectedText(), but overstrikes the * appropriate number of characters if overwrite mode is enabled. * @param str The string * @see #setSelectedText(String) * @see #isOverwriteEnabled() */ public void overwriteSetSelectedText( String str ) { // Don't overstrike if there is a selection if ( !overwrite || selectionStart != selectionEnd ) { setSelectedText( str ); return ; } // Don't overstrike if we're on the end of // the line int caret = getCaretPosition(); int caretLineEnd = getLineEndOffset( getCaretLine() ); if ( caretLineEnd - caret <= str.length() ) { setSelectedText( str ); return ; } document.beginCompoundEdit(); try { document.remove( caret, str.length() ); document.insertString( caret, str, null ); } catch ( BadLocationException bl ) { bl.printStackTrace(); } finally { document.endCompoundEdit(); } } /** * Returns true if overwrite mode is enabled, false otherwise. */ public final boolean isOverwriteEnabled() { return overwrite; } /** * Sets if overwrite mode should be enabled. * @param overwrite True if overwrite mode should be enabled, * false otherwise. */ public final void setOverwriteEnabled( boolean overwrite ) { this.overwrite = overwrite; painter.invalidateSelectedLines(); } /** * Returns true if the selection is rectangular, false otherwise. */ public final boolean isSelectionRectangular() { return rectSelect; } /** * Sets if the selection should be rectangular. * @param overwrite True if the selection should be rectangular, * false otherwise. */ public final void setSelectionRectangular( boolean rectSelect ) { this.rectSelect = rectSelect; painter.invalidateSelectedLines(); } /** * Returns the position of the highlighted bracket (the bracket * matching the one before the caret) */ public final int getBracketPosition() { return bracketPosition; } /** * Returns the line of the highlighted bracket (the bracket * matching the one before the caret) */ public final int getBracketLine() { return bracketLine; } /** * Adds a caret change listener to this text area. * @param listener The listener */ public final void addCaretListener( CaretListener listener ) { listenerList.add( CaretListener.class, listener ); } /** * Removes a caret change listener from this text area. * @param listener The listener */ public final void removeCaretListener( CaretListener listener ) { listenerList.remove( CaretListener.class, listener ); } /** * Deletes the selected text from the text area and places it * into the clipboard. */ public void cut() { if ( editable ) { copy(); setSelectedText( "" ); } } /** * Places the selected text into the clipboard. */ public void copy() { if ( selectionStart != selectionEnd ) { Clipboard clipboard = getToolkit().getSystemClipboard(); String selection = getSelectedText(); int repeatCount = inputHandler.getRepeatCount(); StringBuffer buf = new StringBuffer(); for ( int i = 0; i < repeatCount; i++ ) buf.append( selection ); clipboard.setContents( new StringSelection( buf.toString() ), null ); } } /** * Inserts the clipboard contents into the text. */ public void paste() { if ( editable ) { Clipboard clipboard = getToolkit().getSystemClipboard(); try { // The MacOS MRJ doesn't convert \r to \n, // so do it here String selection = ( ( String ) clipboard .getContents( this ).getTransferData( DataFlavor.stringFlavor ) ) .replace( '\r', '\n' ); int repeatCount = inputHandler.getRepeatCount(); StringBuffer buf = new StringBuffer(); for ( int i = 0; i < repeatCount; i++ ) buf.append( selection ); selection = buf.toString(); setSelectedText( selection ); } catch ( Exception e ) { getToolkit().beep(); System.err.println( "Clipboard does not" + " contain a string" ); } } } /** * Called by the AWT when this component is removed from it's parent. * This stops clears the currently focused component. */ public void removeNotify() { super.removeNotify(); if ( focusedComponent == this ) focusedComponent = null; } /** * Forwards key events directly to the input handler. * This is slightly faster than using a KeyListener * because some Swing overhead is avoided. */ public void processKeyEvent( KeyEvent evt ) { if ( inputHandler == null ) return ; switch ( evt.getID() ) { case KeyEvent.KEY_TYPED: inputHandler.keyTyped( evt ); break; case KeyEvent.KEY_PRESSED: inputHandler.keyPressed( evt ); break; case KeyEvent.KEY_RELEASED: inputHandler.keyReleased( evt ); break; } } // protected members protected static String CENTER = "center"; protected static String RIGHT = "right"; protected static String BOTTOM = "bottom"; protected static JEditTextArea focusedComponent; protected static Timer caretTimer; protected TextAreaPainter painter; protected JPopupMenu popup; protected EventListenerList listenerList; protected MutableCaretEvent caretEvent; protected boolean caretBlinks; protected boolean caretVisible; protected boolean blink; protected boolean editable; protected int firstLine; protected int visibleLines; protected int electricScroll; protected int horizontalOffset; protected JScrollBar vertical; protected JScrollBar horizontal; protected boolean scrollBarsInitialized; protected InputHandler inputHandler; protected SyntaxDocument document; protected DocumentHandler documentHandler; protected Segment lineSegment; protected int selectionStart; protected int selectionStartLine; protected int selectionEnd; protected int selectionEndLine; protected boolean biasLeft; protected int bracketPosition; protected int bracketLine; protected int magicCaret; protected boolean overwrite; protected boolean rectSelect; protected void fireCaretEvent() { Object[] listeners = listenerList.getListenerList(); for ( int i = listeners.length - 2; i >= 0; i-- ) { if ( listeners[ i ] == CaretListener.class ) { ( ( CaretListener ) listeners[ i + 1 ] ).caretUpdate( caretEvent ); } } } protected void updateBracketHighlight( int newCaretPosition ) { if ( newCaretPosition == 0 ) { bracketPosition = bracketLine = -1; return ; } try { int offset = TextUtilities.findMatchingBracket( document, newCaretPosition - 1 ); if ( offset != -1 ) { bracketLine = getLineOfOffset( offset ); bracketPosition = offset - getLineStartOffset( bracketLine ); return ; } } catch ( BadLocationException bl ) { bl.printStackTrace(); } bracketLine = bracketPosition = -1; } protected void documentChanged( DocumentEvent evt ) { DocumentEvent.ElementChange ch = evt.getChange( document.getDefaultRootElement() ); int count; if ( ch == null ) count = 0; else count = ch.getChildrenAdded().length - ch.getChildrenRemoved().length; int line = getLineOfOffset( evt.getOffset() ); if ( count == 0 ) { painter.invalidateLine( line ); } // do magic stuff else if ( line < firstLine ) { setFirstLine( firstLine + count ); } // end of magic stuff else { painter.invalidateLineRange( line, firstLine + visibleLines ); updateScrollBars(); } } class ScrollLayout implements LayoutManager { public void addLayoutComponent( String name, Component comp ) { if ( name.equals( CENTER ) ) center = comp; else if ( name.equals( RIGHT ) ) right = comp; else if ( name.equals( BOTTOM ) ) bottom = comp; else if ( name.equals( LEFT_OF_SCROLLBAR ) ) leftOfScrollBar.addElement( comp ); } public void removeLayoutComponent( Component comp ) { if ( center == comp ) center = null; if ( right == comp ) right = null; if ( bottom == comp ) bottom = null; else leftOfScrollBar.removeElement( comp ); } public Dimension preferredLayoutSize( Container parent ) { Dimension dim = new Dimension(); Insets insets = getInsets(); dim.width = insets.left + insets.right; dim.height = insets.top + insets.bottom; Dimension centerPref = center.getPreferredSize(); dim.width += centerPref.width; dim.height += centerPref.height; Dimension rightPref = right.getPreferredSize(); dim.width += rightPref.width; Dimension bottomPref = bottom.getPreferredSize(); dim.height += bottomPref.height; return dim; } public Dimension minimumLayoutSize( Container parent ) { Dimension dim = new Dimension(); Insets insets = getInsets(); dim.width = insets.left + insets.right; dim.height = insets.top + insets.bottom; Dimension centerPref = center.getMinimumSize(); dim.width += centerPref.width; dim.height += centerPref.height; Dimension rightPref = right.getMinimumSize(); dim.width += rightPref.width; Dimension bottomPref = bottom.getMinimumSize(); dim.height += bottomPref.height; return dim; } public void layoutContainer( Container parent ) { Dimension size = parent.getSize(); Insets insets = parent.getInsets(); int itop = insets.top; int ileft = insets.left; int ibottom = insets.bottom; int iright = insets.right; int rightWidth = right.getPreferredSize().width; int bottomHeight = bottom.getPreferredSize().height; int centerWidth = size.width - rightWidth - ileft - iright; int centerHeight = size.height - bottomHeight - itop - ibottom; center.setBounds( ileft, itop, centerWidth, centerHeight ); right.setBounds( ileft + centerWidth, itop, rightWidth, centerHeight ); // Lay out all status components, in order Enumeration status = leftOfScrollBar.elements(); while ( status.hasMoreElements() ) { Component comp = ( Component ) status.nextElement(); Dimension dim = comp.getPreferredSize(); comp.setBounds( ileft, itop + centerHeight, dim.width, bottomHeight ); ileft += dim.width; } bottom.setBounds( ileft, itop + centerHeight, size.width - rightWidth - ileft - iright, bottomHeight ); } // private members private Component center; private Component right; private Component bottom; private Vector leftOfScrollBar = new Vector(); } static class CaretBlinker implements ActionListener { public void actionPerformed( ActionEvent evt ) { if ( focusedComponent != null && focusedComponent.hasFocus() ) focusedComponent.blinkCaret(); } } class MutableCaretEvent extends CaretEvent { MutableCaretEvent() { super( JEditTextArea.this ); } public int getDot() { return getCaretPosition(); } public int getMark() { return getMarkPosition(); } } class AdjustHandler implements AdjustmentListener { public void adjustmentValueChanged( final AdjustmentEvent evt ) { if ( !scrollBarsInitialized ) return ; // If this is not done, mousePressed events accumilate // and the result is that scrolling doesn't stop after // the mouse is released SwingUtilities.invokeLater( new Runnable() { public void run() { if ( evt.getAdjustable() == vertical ) setFirstLine( vertical.getValue() ); else setHorizontalOffset( -horizontal.getValue() ); } } ); } } class ComponentHandler extends ComponentAdapter { public void componentResized( ComponentEvent evt ) { recalculateVisibleLines(); scrollBarsInitialized = true; } } class DocumentHandler implements DocumentListener { public void insertUpdate( DocumentEvent evt ) { documentChanged( evt ); int offset = evt.getOffset(); int length = evt.getLength(); int newStart; int newEnd; if ( selectionStart > offset || ( selectionStart == selectionEnd && selectionStart == offset ) ) newStart = selectionStart + length; else newStart = selectionStart; if ( selectionEnd >= offset ) newEnd = selectionEnd + length; else newEnd = selectionEnd; select( newStart, newEnd ); } public void removeUpdate( DocumentEvent evt ) { documentChanged( evt ); int offset = evt.getOffset(); int length = evt.getLength(); int newStart; int newEnd; if ( selectionStart > offset ) { if ( selectionStart > offset + length ) newStart = selectionStart - length; else newStart = offset; } else newStart = selectionStart; if ( selectionEnd > offset ) { if ( selectionEnd > offset + length ) newEnd = selectionEnd - length; else newEnd = offset; } else newEnd = selectionEnd; select( newStart, newEnd ); } public void changedUpdate( DocumentEvent evt ) { // no-op } } class DragHandler implements MouseMotionListener { public void mouseDragged( MouseEvent evt ) { if ( popup != null && popup.isVisible() ) return ; setSelectionRectangular( ( evt.getModifiers() & InputEvent.CTRL_MASK ) != 0 ); select( getMarkPosition(), xyToOffset( evt.getX(), evt.getY() ) ); } public void mouseMoved( MouseEvent evt ) {} } class FocusHandler implements FocusListener { public void focusGained( FocusEvent evt ) { setCaretVisible( true ); focusedComponent = JEditTextArea.this; } public void focusLost( FocusEvent evt ) { setCaretVisible( false ); focusedComponent = null; } } class MouseHandler extends MouseAdapter { public void mousePressed( MouseEvent evt ) { requestFocus(); // Focus events not fired sometimes? setCaretVisible( true ); focusedComponent = JEditTextArea.this; if ( ( evt.getModifiers() & InputEvent.BUTTON3_MASK ) != 0 && popup != null ) { popup.show( painter, evt.getX(), evt.getY() ); return ; } int line = yToLine( evt.getY() ); int offset = xToOffset( line, evt.getX() ); int dot = getLineStartOffset( line ) + offset; switch ( evt.getClickCount() ) { case 1: doSingleClick( evt, line, offset, dot ); break; case 2: // It uses the bracket matching stuff, so // it can throw a BLE try { doDoubleClick( evt, line, offset, dot ); } catch ( BadLocationException bl ) { bl.printStackTrace(); } break; case 3: doTripleClick( evt, line, offset, dot ); break; } } private void doSingleClick( MouseEvent evt, int line, int offset, int dot ) { if ( ( evt.getModifiers() & InputEvent.SHIFT_MASK ) != 0 ) { rectSelect = ( evt.getModifiers() & InputEvent.CTRL_MASK ) != 0; select( getMarkPosition(), dot ); } else setCaretPosition( dot ); } private void doDoubleClick( MouseEvent evt, int line, int offset, int dot ) throws BadLocationException { // Ignore empty lines if ( getLineLength( line ) == 0 ) return ; try { int bracket = TextUtilities.findMatchingBracket( document, Math.max( 0, dot - 1 ) ); if ( bracket != -1 ) { int mark = getMarkPosition(); // Hack if ( bracket > mark ) { bracket++; mark--; } select( mark, bracket ); return ; } } catch ( BadLocationException bl ) { bl.printStackTrace(); } // Ok, it's not a bracket... select the word String lineText = getLineText( line ); char ch = lineText.charAt( Math.max( 0, offset - 1 ) ); String noWordSep = ( String ) document.getProperty( "noWordSep" ); if ( noWordSep == null ) noWordSep = ""; // If the user clicked on a non-letter char, // we select the surrounding non-letters boolean selectNoLetter = ( !Character .isLetterOrDigit( ch ) && noWordSep.indexOf( ch ) == -1 ); int wordStart = 0; for ( int i = offset - 1; i >= 0; i-- ) { ch = lineText.charAt( i ); if ( selectNoLetter ^ ( !Character .isLetterOrDigit( ch ) && noWordSep.indexOf( ch ) == -1 ) ) { wordStart = i + 1; break; } } int wordEnd = lineText.length(); for ( int i = offset; i < lineText.length(); i++ ) { ch = lineText.charAt( i ); if ( selectNoLetter ^ ( !Character .isLetterOrDigit( ch ) && noWordSep.indexOf( ch ) == -1 ) ) { wordEnd = i; break; } } int lineStart = getLineStartOffset( line ); select( lineStart + wordStart, lineStart + wordEnd ); /* String lineText = getLineText(line); String noWordSep = (String)document.getProperty("noWordSep"); int wordStart = TextUtilities.findWordStart(lineText,offset,noWordSep); int wordEnd = TextUtilities.findWordEnd(lineText,offset,noWordSep); int lineStart = getLineStartOffset(line); select(lineStart + wordStart,lineStart + wordEnd); */ } private void doTripleClick( MouseEvent evt, int line, int offset, int dot ) { select( getLineStartOffset( line ), getLineEndOffset( line ) - 1 ); } } class MouseWheelHandler implements MouseWheelListener { public void mouseWheelMoved(MouseWheelEvent me) { if (me.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL) { int totalScrollAmount = me.getUnitsToScroll() * vertical.getUnitIncrement(); vertical.setValue(vertical.getValue() + totalScrollAmount); } } } class CaretUndo extends AbstractUndoableEdit { private int start; private int end; CaretUndo( int start, int end ) { this.start = start; this.end = end; } public boolean isSignificant() { return false; } public String getPresentationName() { return "caret move"; } public void undo() throws CannotUndoException { super.undo(); select( start, end ); } public void redo() throws CannotRedoException { super.redo(); select( start, end ); } public boolean addEdit( UndoableEdit edit ) { if ( edit instanceof CaretUndo ) { CaretUndo cedit = ( CaretUndo ) edit; start = cedit.start; end = cedit.end; cedit.die(); return true; } else return false; } } static { caretTimer = new Timer( 500, new CaretBlinker() ); caretTimer.setInitialDelay( 500 ); caretTimer.start(); } } antelope-3.5.1.orig/src/ise/antelope/app/jedit/SyntaxStyle.java0000644000175000017500000000706610013736354024404 0ustar drazzibdrazzib/* * SyntaxStyle.java - A simple text style class * Copyright (C) 1999 Slava Pestov * * You may use and modify this package for any purpose. Redistribution is * permitted, in both source and binary form, provided that this notice * remains intact in all source distributions of this package. */ package ise.antelope.app.jedit; import java.awt.*; import java.util.StringTokenizer; /** * A simple text style class. It can specify the color, italic flag, * and bold flag of a run of text. * @author Slava Pestov * @version $Id: SyntaxStyle.java 12 2004-02-16 02:39:39Z danson $ */ public class SyntaxStyle { /** * Creates a new SyntaxStyle. * @param color The text color * @param italic True if the text should be italics * @param bold True if the text should be bold */ public SyntaxStyle( Color color, boolean italic, boolean bold ) { this.color = color; this.italic = italic; this.bold = bold; } /** * Returns the color specified in this style. */ public Color getColor() { return color; } /** * Returns true if no font styles are enabled. */ public boolean isPlain() { return !( bold || italic ); } /** * Returns true if italics is enabled for this style. */ public boolean isItalic() { return italic; } /** * Returns true if boldface is enabled for this style. */ public boolean isBold() { return bold; } /** * Returns the specified font, but with the style's bold and * italic flags applied. */ public Font getStyledFont( Font font ) { if ( font == null ) throw new NullPointerException( "font param must not" + " be null" ); if ( font.equals( lastFont ) ) return lastStyledFont; lastFont = font; lastStyledFont = new Font( font.getFamily(), ( bold ? Font.BOLD : 0 ) | ( italic ? Font.ITALIC : 0 ), font.getSize() ); return lastStyledFont; } /** * Returns the font metrics for the styled font. */ public FontMetrics getFontMetrics( Font font ) { if ( font == null ) throw new NullPointerException( "font param must not" + " be null" ); if ( font.equals( lastFont ) && fontMetrics != null ) return fontMetrics; lastFont = font; lastStyledFont = new Font( font.getFamily(), ( bold ? Font.BOLD : 0 ) | ( italic ? Font.ITALIC : 0 ), font.getSize() ); fontMetrics = Toolkit.getDefaultToolkit().getFontMetrics( lastStyledFont ); return fontMetrics; } /** * Sets the foreground color and font of the specified graphics * context to that specified in this style. * @param gfx The graphics context * @param font The font to add the styles to */ public void setGraphicsFlags( Graphics gfx, Font font ) { Font _font = getStyledFont( font ); gfx.setFont( _font ); gfx.setColor( color ); } /** * Returns a string representation of this object. */ public String toString() { return getClass().getName() + "[color=" + color + ( italic ? ",italic" : "" ) + ( bold ? ",bold" : "" ) + "]"; } // private members private Color color; private boolean italic; private boolean bold; private Font lastFont; private Font lastStyledFont; private FontMetrics fontMetrics; } antelope-3.5.1.orig/src/ise/antelope/app/jedit/SyntaxDocument.java0000644000175000017500000001136010030356522025044 0ustar drazzibdrazzib/* * SyntaxDocument.java - Document that can be tokenized * Copyright (C) 1999 Slava Pestov * * You may use and modify this package for any purpose. Redistribution is * permitted, in both source and binary form, provided that this notice * remains intact in all source distributions of this package. */ package ise.antelope.app.jedit; import javax.swing.event.*; import javax.swing.text.*; import javax.swing.undo.UndoableEdit; /** * A document implementation that can be tokenized by the syntax highlighting * system. * * @author Slava Pestov * @version $Id: SyntaxDocument.java 62 2004-03-25 03:11:13Z danson $ */ public class SyntaxDocument extends PlainDocument { /** * Key for storing the filename representing the contents of this document. */ public static String FILE = "_file_"; /** * Returns the token marker that is to be used to split lines * of this document up into tokens. May return null if this * document is not to be colorized. */ public TokenMarker getTokenMarker() { return tokenMarker; } /** * Sets the token marker that is to be used to split lines of * this document up into tokens. May throw an exception if * this is not supported for this type of document. * @param tm The new token marker */ public void setTokenMarker( TokenMarker tm ) { tokenMarker = tm; if ( tm == null ) return ; tokenMarker.insertLines( 0, getDefaultRootElement() .getElementCount() ); tokenizeLines(); } /** * Reparses the document, by passing all lines to the token * marker. This should be called after the document is first * loaded. */ public void tokenizeLines() { tokenizeLines( 0, getDefaultRootElement().getElementCount() ); } /** * Reparses the document, by passing the specified lines to the * token marker. This should be called after a large quantity of * text is first inserted. * @param start The first line to parse * @param len The number of lines, after the first one to parse */ public void tokenizeLines( int start, int len ) { if ( tokenMarker == null || !tokenMarker.supportsMultilineTokens() ) return ; Segment lineSegment = new Segment(); Element map = getDefaultRootElement(); len += start; try { for ( int i = start; i < len; i++ ) { Element lineElement = map.getElement( i ); int lineStart = lineElement.getStartOffset(); getText( lineStart, lineElement.getEndOffset() - lineStart - 1, lineSegment ); tokenMarker.markTokens( lineSegment, i ); } } catch ( BadLocationException bl ) { bl.printStackTrace(); } } /** * Starts a compound edit that can be undone in one operation. * Subclasses that implement undo should override this method; * this class has no undo functionality so this method is * empty. */ public void beginCompoundEdit() {} /** * Ends a compound edit that can be undone in one operation. * Subclasses that implement undo should override this method; * this class has no undo functionality so this method is * empty. */ public void endCompoundEdit() {} /** * Adds an undoable edit to this document's undo list. The edit * should be ignored if something is currently being undone. * @param edit The undoable edit * * @since jEdit 2.2pre1 */ public void addUndoableEdit( UndoableEdit edit ) {} // protected members protected TokenMarker tokenMarker; /** * We overwrite this method to update the token marker * state immediately so that any event listeners get a * consistent token marker. */ protected void fireInsertUpdate( DocumentEvent evt ) { if ( tokenMarker != null ) { DocumentEvent.ElementChange ch = evt.getChange( getDefaultRootElement() ); if ( ch != null ) { tokenMarker.insertLines( ch.getIndex() + 1, ch.getChildrenAdded().length - ch.getChildrenRemoved().length ); } } super.fireInsertUpdate( evt ); } /** * We overwrite this method to update the token marker * state immediately so that any event listeners get a * consistent token marker. */ protected void fireRemoveUpdate( DocumentEvent evt ) { if ( tokenMarker != null ) { DocumentEvent.ElementChange ch = evt.getChange( getDefaultRootElement() ); if ( ch != null ) { tokenMarker.deleteLines( ch.getIndex() + 1, ch.getChildrenRemoved().length - ch.getChildrenAdded().length ); } } super.fireRemoveUpdate( evt ); } } antelope-3.5.1.orig/src/ise/antelope/app/jedit/TextUtilities.java0000644000175000017500000001075510013736354024714 0ustar drazzibdrazzib/* * TextUtilities.java - Utility functions used by the text area classes * Copyright (C) 1999 Slava Pestov * * You may use and modify this package for any purpose. Redistribution is * permitted, in both source and binary form, provided that this notice * remains intact in all source distributions of this package. */ package ise.antelope.app.jedit; import javax.swing.text.*; /** * Class with several utility functions used by the text area component. * @author Slava Pestov * @version $Id: TextUtilities.java 12 2004-02-16 02:39:39Z danson $ */ public class TextUtilities { /** * Returns the offset of the bracket matching the one at the * specified offset of the document, or -1 if the bracket is * unmatched (or if the character is not a bracket). * @param doc The document * @param offset The offset * @exception BadLocationException If an out-of-bounds access * was attempted on the document text */ public static int findMatchingBracket(Document doc, int offset) throws BadLocationException { if(doc.getLength() == 0) return -1; char c = doc.getText(offset,1).charAt(0); char cprime; // c` - corresponding character boolean direction; // true = back, false = forward switch(c) { case '(': cprime = ')'; direction = false; break; case ')': cprime = '('; direction = true; break; case '[': cprime = ']'; direction = false; break; case ']': cprime = '['; direction = true; break; case '{': cprime = '}'; direction = false; break; case '}': cprime = '{'; direction = true; break; // danson, added next two lines for xml bracket matching case '<': cprime = '>'; direction = false; break; case '>': cprime = '<'; direction = true; break; default: return -1; } int count; // How to merge these two cases is left as an exercise // for the reader. // Go back or forward if(direction) { // Count is 1 initially because we have already // `found' one closing bracket count = 1; // Get text[0,offset-1]; String text = doc.getText(0,offset); // Scan backwards for(int i = offset - 1; i >= 0; i--) { // If text[i] == c, we have found another // closing bracket, therefore we will need // two opening brackets to complete the // match. char x = text.charAt(i); if(x == c) count++; // If text[i] == cprime, we have found a // opening bracket, so we return i if // --count == 0 else if(x == cprime) { if(--count == 0) return i; } } } else { // Count is 1 initially because we have already // `found' one opening bracket count = 1; // So we don't have to + 1 in every loop offset++; // Number of characters to check int len = doc.getLength() - offset; // Get text[offset+1,len]; String text = doc.getText(offset,len); // Scan forwards for(int i = 0; i < len; i++) { // If text[i] == c, we have found another // opening bracket, therefore we will need // two closing brackets to complete the // match. char x = text.charAt(i); if(x == c) count++; // If text[i] == cprime, we have found an // closing bracket, so we return i if // --count == 0 else if(x == cprime) { if(--count == 0) return i + offset; } } } // Nothing found return -1; } /** * Locates the start of the word at the specified position. * @param line The text * @param pos The position */ public static int findWordStart(String line, int pos, String noWordSep) { char ch = line.charAt(pos - 1); if(noWordSep == null) noWordSep = ""; boolean selectNoLetter = (!Character.isLetterOrDigit(ch) && noWordSep.indexOf(ch) == -1); int wordStart = 0; for(int i = pos - 1; i >= 0; i--) { ch = line.charAt(i); if(selectNoLetter ^ (!Character.isLetterOrDigit(ch) && noWordSep.indexOf(ch) == -1)) { wordStart = i + 1; break; } } return wordStart; } /** * Locates the end of the word at the specified position. * @param line The text * @param pos The position */ public static int findWordEnd(String line, int pos, String noWordSep) { char ch = line.charAt(pos); if(noWordSep == null) noWordSep = ""; boolean selectNoLetter = (!Character.isLetterOrDigit(ch) && noWordSep.indexOf(ch) == -1); int wordEnd = line.length(); for(int i = pos; i < line.length(); i++) { ch = line.charAt(i); if(selectNoLetter ^ (!Character.isLetterOrDigit(ch) && noWordSep.indexOf(ch) == -1)) { wordEnd = i; break; } } return wordEnd; } } antelope-3.5.1.orig/src/ise/antelope/app/jedit/TokenMarker.java0000644000175000017500000002202210013736354024304 0ustar drazzibdrazzib/* * TokenMarker.java - Generic token marker * Copyright (C) 1998, 1999 Slava Pestov * * You may use and modify this package for any purpose. Redistribution is * permitted, in both source and binary form, provided that this notice * remains intact in all source distributions of this package. */ package ise.antelope.app.jedit; import javax.swing.text.Segment; import java.util.*; /** * A token marker that splits lines of text into tokens. Each token carries * a length field and an indentification tag that can be mapped to a color * for painting that token.

* * For performance reasons, the linked list of tokens is reused after each * line is tokenized. Therefore, the return value of markTokens * should only be used for immediate painting. Notably, it cannot be * cached. * * @author Slava Pestov * @version $Id: TokenMarker.java 12 2004-02-16 02:39:39Z danson $ * * @see org.gjt.sp.jedit.syntax.Token */ public abstract class TokenMarker { /** * A wrapper for the lower-level markTokensImpl method * that is called to split a line up into tokens. * @param line The line * @param lineIndex The line number */ public Token markTokens(Segment line, int lineIndex) { if(lineIndex >= length) { throw new IllegalArgumentException("Tokenizing invalid line: " + lineIndex); } lastToken = null; LineInfo info = lineInfo[lineIndex]; LineInfo prev; if(lineIndex == 0) prev = null; else prev = lineInfo[lineIndex - 1]; byte oldToken = info.token; byte token = markTokensImpl(prev == null ? Token.NULL : prev.token,line,lineIndex); info.token = token; /* * This is a foul hack. It stops nextLineRequested * from being cleared if the same line is marked twice. * * Why is this necessary? It's all JEditTextArea's fault. * When something is inserted into the text, firing a * document event, the insertUpdate() method shifts the * caret (if necessary) by the amount inserted. * * All caret movement is handled by the select() method, * which eventually pipes the new position to scrollTo() * and calls repaint(). * * Note that at this point in time, the new line hasn't * yet been painted; the caret is moved first. * * scrollTo() calls offsetToX(), which tokenizes the line * unless it is being called on the last line painted * (in which case it uses the text area's painter cached * token list). What scrollTo() does next is irrelevant. * * After scrollTo() has done it's job, repaint() is * called, and eventually we end up in paintLine(), whose * job is to paint the changed line. It, too, calls * markTokens(). * * The problem was that if the line started a multiline * token, the first markTokens() (done in offsetToX()) * would set nextLineRequested (because the line end * token had changed) but the second would clear it * (because the line was the same that time) and therefore * paintLine() would never know that it needed to repaint * subsequent lines. * * This bug took me ages to track down, that's why I wrote * all the relevant info down so that others wouldn't * duplicate it. */ if(!(lastLine == lineIndex && nextLineRequested)) nextLineRequested = (oldToken != token); lastLine = lineIndex; addToken(0,Token.END); return firstToken; } /** * An abstract method that splits a line up into tokens. It * should parse the line, and call addToken() to * add syntax tokens to the token list. Then, it should return * the initial token type for the next line.

* * For example if the current line contains the start of a * multiline comment that doesn't end on that line, this method * should return the comment token type so that it continues on * the next line. * * @param token The initial token type for this line * @param line The line to be tokenized * @param lineIndex The index of the line in the document, * starting at 0 * @return The initial token type for the next line */ protected abstract byte markTokensImpl(byte token, Segment line, int lineIndex); /** * Returns if the token marker supports tokens that span multiple * lines. If this is true, the object using this token marker is * required to pass all lines in the document to the * markTokens() method (in turn).

* * The default implementation returns true; it should be overridden * to return false on simpler token markers for increased speed. */ public boolean supportsMultilineTokens() { return true; } /** * Informs the token marker that lines have been inserted into * the document. This inserts a gap in the lineInfo * array. * @param index The first line number * @param lines The number of lines */ public void insertLines(int index, int lines) { if(lines <= 0) return; length += lines; ensureCapacity(length); int len = index + lines; System.arraycopy(lineInfo,index,lineInfo,len, lineInfo.length - len); for(int i = index + lines - 1; i >= index; i--) { lineInfo[i] = new LineInfo(); } } /** * Informs the token marker that line have been deleted from * the document. This removes the lines in question from the * lineInfo array. * @param index The first line number * @param lines The number of lines */ public void deleteLines(int index, int lines) { if (lines <= 0) return; int len = index + lines; length -= lines; System.arraycopy(lineInfo,len,lineInfo, index,lineInfo.length - len); } /** * Returns the number of lines in this token marker. */ public int getLineCount() { return length; } /** * Returns true if the next line should be repainted. This * will return true after a line has been tokenized that starts * a multiline token that continues onto the next line. */ public boolean isNextLineRequested() { return nextLineRequested; } // protected members /** * The first token in the list. This should be used as the return * value from markTokens(). */ protected Token firstToken; /** * The last token in the list. New tokens are added here. * This should be set to null before a new line is to be tokenized. */ protected Token lastToken; /** * An array for storing information about lines. It is enlarged and * shrunk automatically by the insertLines() and * deleteLines() methods. */ protected LineInfo[] lineInfo; /** * The number of lines in the model being tokenized. This can be * less than the length of the lineInfo array. */ protected int length; /** * The last tokenized line. */ protected int lastLine; /** * True if the next line should be painted. */ protected boolean nextLineRequested; /** * Creates a new TokenMarker. This DOES NOT create * a lineInfo array; an initial call to insertLines() * does that. */ protected TokenMarker() { lastLine = -1; } /** * Ensures that the lineInfo array can contain the * specified index. This enlarges it if necessary. No action is * taken if the array is large enough already.

* * It should be unnecessary to call this under normal * circumstances; insertLine() should take care of * enlarging the line info array automatically. * * @param index The array index */ protected void ensureCapacity(int index) { if(lineInfo == null) lineInfo = new LineInfo[index + 1]; else if(lineInfo.length <= index) { LineInfo[] lineInfoN = new LineInfo[(index + 1) * 2]; System.arraycopy(lineInfo,0,lineInfoN,0, lineInfo.length); lineInfo = lineInfoN; } } /** * Adds a token to the token list. * @param length The length of the token * @param id The id of the token */ protected void addToken(int length, byte id) { if(id >= Token.INTERNAL_FIRST && id <= Token.INTERNAL_LAST) throw new InternalError("Invalid id: " + id); if(length == 0 && id != Token.END) return; if(firstToken == null) { firstToken = new Token(length,id); lastToken = firstToken; } else if(lastToken == null) { lastToken = firstToken; firstToken.length = length; firstToken.id = id; } else if(lastToken.next == null) { lastToken.next = new Token(length,id); lastToken = lastToken.next; } else { lastToken = lastToken.next; lastToken.length = length; lastToken.id = id; } } /** * Inner class for storing information about tokenized lines. */ public class LineInfo { /** * Creates a new LineInfo object with token = Token.NULL * and obj = null. */ public LineInfo() { } /** * Creates a new LineInfo object with the specified * parameters. */ public LineInfo(byte token, Object obj) { this.token = token; this.obj = obj; } /** * The id of the last token of the line. */ public byte token; /** * This is for use by the token marker implementations * themselves. It can be used to store anything that * is an object and that needs to exist on a per-line * basis. */ public Object obj; } } antelope-3.5.1.orig/src/ise/antelope/app/jedit/KeywordMap.java0000644000175000017500000000643110013736354024152 0ustar drazzibdrazzib/* * KeywordMap.java - Fast keyword->id map * Copyright (C) 1998, 1999 Slava Pestov * Copyright (C) 1999 Mike Dillon * * You may use and modify this package for any purpose. Redistribution is * permitted, in both source and binary form, provided that this notice * remains intact in all source distributions of this package. */ package ise.antelope.app.jedit; import javax.swing.text.Segment; /** * A KeywordMap is similar to a hashtable in that it maps keys * to values. However, the `keys' are Swing segments. This allows lookups of * text substrings without the overhead of creating a new string object. *

* This class is used by CTokenMarker to map keywords to ids. * * @author Slava Pestov, Mike Dillon * @version $Id: KeywordMap.java 12 2004-02-16 02:39:39Z danson $ */ public class KeywordMap { /** * Creates a new KeywordMap. * @param ignoreCase True if keys are case insensitive */ public KeywordMap(boolean ignoreCase) { this(ignoreCase, 52); this.ignoreCase = ignoreCase; } /** * Creates a new KeywordMap. * @param ignoreCase True if the keys are case insensitive * @param mapLength The number of `buckets' to create. * A value of 52 will give good performance for most maps. */ public KeywordMap(boolean ignoreCase, int mapLength) { this.mapLength = mapLength; this.ignoreCase = ignoreCase; map = new Keyword[mapLength]; } /** * Looks up a key. * @param text The text segment * @param offset The offset of the substring within the text segment * @param length The length of the substring */ public byte lookup(Segment text, int offset, int length) { if(length == 0) return Token.NULL; Keyword k = map[getSegmentMapKey(text, offset, length)]; while(k != null) { if(length != k.keyword.length) { k = k.next; continue; } if(SyntaxUtilities.regionMatches(ignoreCase,text,offset, k.keyword)) return k.id; k = k.next; } return Token.NULL; } /** * Adds a key-value mapping. * @param keyword The key * @Param id The value */ public void add(String keyword, byte id) { int key = getStringMapKey(keyword); map[key] = new Keyword(keyword.toCharArray(),id,map[key]); } /** * Returns true if the keyword map is set to be case insensitive, * false otherwise. */ public boolean getIgnoreCase() { return ignoreCase; } /** * Sets if the keyword map should be case insensitive. * @param ignoreCase True if the keyword map should be case * insensitive, false otherwise */ public void setIgnoreCase(boolean ignoreCase) { this.ignoreCase = ignoreCase; } // protected members protected int mapLength; protected int getStringMapKey(String s) { return (Character.toUpperCase(s.charAt(0)) + Character.toUpperCase(s.charAt(s.length()-1))) % mapLength; } protected int getSegmentMapKey(Segment s, int off, int len) { return (Character.toUpperCase(s.array[off]) + Character.toUpperCase(s.array[off + len - 1])) % mapLength; } // private members class Keyword { public Keyword(char[] keyword, byte id, Keyword next) { this.keyword = keyword; this.id = id; this.next = next; } public char[] keyword; public byte id; public Keyword next; } private Keyword[] map; private boolean ignoreCase; } antelope-3.5.1.orig/src/ise/antelope/app/jedit/DefaultInputHandler.java0000644000175000017500000002076510013736354026000 0ustar drazzibdrazzib/* * DefaultInputHandler.java - Default implementation of an input handler * Copyright (C) 1999 Slava Pestov * * You may use and modify this package for any purpose. Redistribution is * permitted, in both source and binary form, provided that this notice * remains intact in all source distributions of this package. */ package ise.antelope.app.jedit; import javax.swing.KeyStroke; import java.awt.event.*; import java.awt.Toolkit; import java.util.Hashtable; import java.util.StringTokenizer; /** * The default input handler. It maps sequences of keystrokes into actions * and inserts key typed events into the text area. * @author Slava Pestov * @version $Id: DefaultInputHandler.java 12 2004-02-16 02:39:39Z danson $ */ public class DefaultInputHandler extends InputHandler { /** * Creates a new input handler with no key bindings defined. */ public DefaultInputHandler() { bindings = currentBindings = new Hashtable(); } /** * Sets up the default key bindings. */ public void addDefaultKeyBindings() { addKeyBinding("BACK_SPACE",BACKSPACE); addKeyBinding("C+BACK_SPACE",BACKSPACE_WORD); addKeyBinding("DELETE",DELETE); addKeyBinding("C+DELETE",DELETE_WORD); addKeyBinding("ENTER",INSERT_BREAK); addKeyBinding("TAB",INSERT_TAB); addKeyBinding("INSERT",OVERWRITE); addKeyBinding("C+\\",TOGGLE_RECT); addKeyBinding("HOME",HOME); addKeyBinding("END",END); addKeyBinding("S+HOME",SELECT_HOME); addKeyBinding("S+END",SELECT_END); addKeyBinding("C+HOME",DOCUMENT_HOME); addKeyBinding("C+END",DOCUMENT_END); addKeyBinding("CS+HOME",SELECT_DOC_HOME); addKeyBinding("CS+END",SELECT_DOC_END); addKeyBinding("PAGE_UP",PREV_PAGE); addKeyBinding("PAGE_DOWN",NEXT_PAGE); addKeyBinding("S+PAGE_UP",SELECT_PREV_PAGE); addKeyBinding("S+PAGE_DOWN",SELECT_NEXT_PAGE); addKeyBinding("LEFT",PREV_CHAR); addKeyBinding("S+LEFT",SELECT_PREV_CHAR); addKeyBinding("C+LEFT",PREV_WORD); addKeyBinding("CS+LEFT",SELECT_PREV_WORD); addKeyBinding("RIGHT",NEXT_CHAR); addKeyBinding("S+RIGHT",SELECT_NEXT_CHAR); addKeyBinding("C+RIGHT",NEXT_WORD); addKeyBinding("CS+RIGHT",SELECT_NEXT_WORD); addKeyBinding("UP",PREV_LINE); addKeyBinding("S+UP",SELECT_PREV_LINE); addKeyBinding("DOWN",NEXT_LINE); addKeyBinding("S+DOWN",SELECT_NEXT_LINE); addKeyBinding("C+ENTER",REPEAT); addKeyBinding("C+Z", UNDO); addKeyBinding("C+Y", REDO); addKeyBinding("C+X", CUT); addKeyBinding("C+C", COPY); addKeyBinding("C+V", PASTE); } /** * Adds a key binding to this input handler. The key binding is * a list of white space separated key strokes of the form * [modifiers+]key where modifier is C for Control, A for Alt, * or S for Shift, and key is either a character (a-z) or a field * name in the KeyEvent class prefixed with VK_ (e.g., BACK_SPACE) * @param keyBinding The key binding * @param action The action */ public void addKeyBinding(String keyBinding, ActionListener action) { Hashtable current = bindings; StringTokenizer st = new StringTokenizer(keyBinding); while(st.hasMoreTokens()) { KeyStroke keyStroke = parseKeyStroke(st.nextToken()); if(keyStroke == null) return; if(st.hasMoreTokens()) { Object o = current.get(keyStroke); if(o instanceof Hashtable) current = (Hashtable)o; else { o = new Hashtable(); current.put(keyStroke,o); current = (Hashtable)o; } } else current.put(keyStroke,action); } } /** * Removes a key binding from this input handler. This is not yet * implemented. * @param keyBinding The key binding */ public void removeKeyBinding(String keyBinding) { throw new InternalError("Not yet implemented"); } /** * Removes all key bindings from this input handler. */ public void removeAllKeyBindings() { bindings.clear(); } /** * Returns a copy of this input handler that shares the same * key bindings. Setting key bindings in the copy will also * set them in the original. */ public InputHandler copy() { return new DefaultInputHandler(this); } /** * Handle a key pressed event. This will look up the binding for * the key stroke and execute it. */ public void keyPressed(KeyEvent evt) { int keyCode = evt.getKeyCode(); int modifiers = evt.getModifiers(); if(keyCode == KeyEvent.VK_CONTROL || keyCode == KeyEvent.VK_SHIFT || keyCode == KeyEvent.VK_ALT || keyCode == KeyEvent.VK_META) return; if((modifiers & ~KeyEvent.SHIFT_MASK) != 0 || evt.isActionKey() || keyCode == KeyEvent.VK_BACK_SPACE || keyCode == KeyEvent.VK_DELETE || keyCode == KeyEvent.VK_ENTER || keyCode == KeyEvent.VK_TAB || keyCode == KeyEvent.VK_ESCAPE) { if(grabAction != null) { handleGrabAction(evt); return; } KeyStroke keyStroke = KeyStroke.getKeyStroke(keyCode, modifiers); Object o = currentBindings.get(keyStroke); if(o == null) { // Don't beep if the user presses some // key we don't know about unless a // prefix is active. Otherwise it will // beep when caps lock is pressed, etc. if(currentBindings != bindings) { Toolkit.getDefaultToolkit().beep(); // F10 should be passed on, but C+e F10 // shouldn't repeatCount = 0; repeat = false; evt.consume(); } currentBindings = bindings; return; } else if(o instanceof ActionListener) { currentBindings = bindings; executeAction(((ActionListener)o), evt.getSource(),null); evt.consume(); return; } else if(o instanceof Hashtable) { currentBindings = (Hashtable)o; evt.consume(); return; } } } /** * Handle a key typed event. This inserts the key into the text area. */ public void keyTyped(KeyEvent evt) { int modifiers = evt.getModifiers(); char c = evt.getKeyChar(); if(c != KeyEvent.CHAR_UNDEFINED && (modifiers & KeyEvent.ALT_MASK) == 0) { if(c >= 0x20 && c != 0x7f) { KeyStroke keyStroke = KeyStroke.getKeyStroke( Character.toUpperCase(c)); Object o = currentBindings.get(keyStroke); if(o instanceof Hashtable) { currentBindings = (Hashtable)o; return; } else if(o instanceof ActionListener) { currentBindings = bindings; executeAction((ActionListener)o, evt.getSource(), String.valueOf(c)); return; } currentBindings = bindings; if(grabAction != null) { handleGrabAction(evt); return; } // 0-9 adds another 'digit' to the repeat number if(repeat && Character.isDigit(c)) { repeatCount *= 10; repeatCount += (c - '0'); return; } executeAction(INSERT_CHAR,evt.getSource(), String.valueOf(evt.getKeyChar())); repeatCount = 0; repeat = false; } } } /** * Converts a string to a keystroke. The string should be of the * form modifiers+shortcut where modifiers * is any combination of A for Alt, C for Control, S for Shift * or M for Meta, and shortcut is either a single character, * or a keycode name from the KeyEvent class, without * the VK_ prefix. * @param keyStroke A string description of the key stroke */ public static KeyStroke parseKeyStroke(String keyStroke) { if(keyStroke == null) return null; int modifiers = 0; int index = keyStroke.indexOf('+'); if(index != -1) { for(int i = 0; i < index; i++) { switch(Character.toUpperCase(keyStroke .charAt(i))) { case 'A': modifiers |= InputEvent.ALT_MASK; break; case 'C': modifiers |= InputEvent.CTRL_MASK; break; case 'M': modifiers |= InputEvent.META_MASK; break; case 'S': modifiers |= InputEvent.SHIFT_MASK; break; } } } String key = keyStroke.substring(index + 1); if(key.length() == 1) { char ch = Character.toUpperCase(key.charAt(0)); if(modifiers == 0) return KeyStroke.getKeyStroke(ch); else return KeyStroke.getKeyStroke(ch,modifiers); } else if(key.length() == 0) { System.err.println("Invalid key stroke: " + keyStroke); return null; } else { int ch; try { ch = KeyEvent.class.getField("VK_".concat(key)) .getInt(null); } catch(Exception e) { System.err.println("Invalid key stroke: " + keyStroke); return null; } return KeyStroke.getKeyStroke(ch,modifiers); } } // private members private Hashtable bindings; private Hashtable currentBindings; private DefaultInputHandler(DefaultInputHandler copy) { bindings = currentBindings = copy.bindings; } } antelope-3.5.1.orig/src/ise/antelope/app/jedit/TextAreaPainter.java0000644000175000017500000004114010054202512025111 0ustar drazzibdrazzib/* * TextAreaPainter.java - Paints the text area * Copyright (C) 1999 Slava Pestov * * You may use and modify this package for any purpose. Redistribution is * permitted, in both source and binary form, provided that this notice * remains intact in all source distributions of this package. */ package ise.antelope.app.jedit; import javax.swing.ToolTipManager; import javax.swing.text.*; import javax.swing.JComponent; import java.awt.event.MouseEvent; import java.awt.*; /** * The text area repaint manager. It performs double buffering and paints * lines of text. * @author Slava Pestov * @version $Id: TextAreaPainter.java 98 2004-05-24 04:10:50Z danson $ */ public class TextAreaPainter extends JComponent implements TabExpander { /** * Creates a new repaint manager. This should be not be called * directly. */ public TextAreaPainter(JEditTextArea textArea, TextAreaDefaults defaults) { this.textArea = textArea; setAutoscrolls(true); setDoubleBuffered(true); setOpaque(true); ToolTipManager.sharedInstance().registerComponent(this); currentLine = new Segment(); currentLineIndex = -1; setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR)); setFont(new Font("Monospaced",Font.PLAIN,14)); setForeground(Color.black); setBackground(Color.white); blockCaret = defaults.blockCaret; styles = defaults.styles; cols = defaults.cols; rows = defaults.rows; caretColor = defaults.caretColor; selectionColor = defaults.selectionColor; lineHighlightColor = defaults.lineHighlightColor; lineHighlight = defaults.lineHighlight; bracketHighlightColor = defaults.bracketHighlightColor; bracketHighlight = defaults.bracketHighlight; paintInvalid = defaults.paintInvalid; eolMarkerColor = defaults.eolMarkerColor; eolMarkers = defaults.eolMarkers; } /** * Returns if this component can be traversed by pressing the * Tab key. This returns false. * @deprecated */ public final boolean isManagingFocus() { return false; } /** * Returns the syntax styles used to paint colorized text. Entry n * will be used to paint tokens with id = n. * @see org.gjt.sp.jedit.syntax.Token */ public final SyntaxStyle[] getStyles() { return styles; } /** * Sets the syntax styles used to paint colorized text. Entry n * will be used to paint tokens with id = n. * @param styles The syntax styles * @see org.gjt.sp.jedit.syntax.Token */ public final void setStyles(SyntaxStyle[] styles) { this.styles = styles; repaint(); } /** * Returns the caret color. */ public final Color getCaretColor() { return caretColor; } /** * Sets the caret color. * @param caretColor The caret color */ public final void setCaretColor(Color caretColor) { this.caretColor = caretColor; invalidateSelectedLines(); } /** * Returns the selection color. */ public final Color getSelectionColor() { return selectionColor; } /** * Sets the selection color. * @param selectionColor The selection color */ public final void setSelectionColor(Color selectionColor) { this.selectionColor = selectionColor; invalidateSelectedLines(); } /** * Returns the line highlight color. */ public final Color getLineHighlightColor() { return lineHighlightColor; } /** * Sets the line highlight color. * @param lineHighlightColor The line highlight color */ public final void setLineHighlightColor(Color lineHighlightColor) { this.lineHighlightColor = lineHighlightColor; invalidateSelectedLines(); } /** * Returns true if line highlight is enabled, false otherwise. */ public final boolean isLineHighlightEnabled() { return lineHighlight; } /** * Enables or disables current line highlighting. * @param lineHighlight True if current line highlight should be enabled, * false otherwise */ public final void setLineHighlightEnabled(boolean lineHighlight) { this.lineHighlight = lineHighlight; invalidateSelectedLines(); } /** * Returns the bracket highlight color. */ public final Color getBracketHighlightColor() { return bracketHighlightColor; } /** * Sets the bracket highlight color. * @param bracketHighlightColor The bracket highlight color */ public final void setBracketHighlightColor(Color bracketHighlightColor) { this.bracketHighlightColor = bracketHighlightColor; invalidateLine(textArea.getBracketLine()); } /** * Returns true if bracket highlighting is enabled, false otherwise. * When bracket highlighting is enabled, the bracket matching the * one before the caret (if any) is highlighted. */ public final boolean isBracketHighlightEnabled() { return bracketHighlight; } /** * Enables or disables bracket highlighting. * When bracket highlighting is enabled, the bracket matching the * one before the caret (if any) is highlighted. * @param bracketHighlight True if bracket highlighting should be * enabled, false otherwise */ public final void setBracketHighlightEnabled(boolean bracketHighlight) { this.bracketHighlight = bracketHighlight; invalidateLine(textArea.getBracketLine()); } /** * Returns true if the caret should be drawn as a block, false otherwise. */ public final boolean isBlockCaretEnabled() { return blockCaret; } /** * Sets if the caret should be drawn as a block, false otherwise. * @param blockCaret True if the caret should be drawn as a block, * false otherwise. */ public final void setBlockCaretEnabled(boolean blockCaret) { this.blockCaret = blockCaret; invalidateSelectedLines(); } /** * Returns the EOL marker color. */ public final Color getEOLMarkerColor() { return eolMarkerColor; } /** * Sets the EOL marker color. * @param eolMarkerColor The EOL marker color */ public final void setEOLMarkerColor(Color eolMarkerColor) { this.eolMarkerColor = eolMarkerColor; repaint(); } /** * Returns true if EOL markers are drawn, false otherwise. */ public final boolean getEOLMarkersPainted() { return eolMarkers; } /** * Sets if EOL markers are to be drawn. * @param eolMarkers True if EOL markers should be drawn, false otherwise */ public final void setEOLMarkersPainted(boolean eolMarkers) { this.eolMarkers = eolMarkers; repaint(); } /** * Returns true if invalid lines are painted as red tildes (~), * false otherwise. */ public boolean getInvalidLinesPainted() { return paintInvalid; } /** * Sets if invalid lines are to be painted as red tildes. * @param paintInvalid True if invalid lines should be drawn, false otherwise */ public void setInvalidLinesPainted(boolean paintInvalid) { this.paintInvalid = paintInvalid; } /** * Adds a custom highlight painter. * @param highlight The highlight */ public void addCustomHighlight(Highlight highlight) { highlight.init(textArea,highlights); highlights = highlight; } /** * Highlight interface. */ public interface Highlight { /** * Called after the highlight painter has been added. * @param textArea The text area * @param next The painter this one should delegate to */ void init(JEditTextArea textArea, Highlight next); /** * This should paint the highlight and delgate to the * next highlight painter. * @param gfx The graphics context * @param line The line number * @param y The y co-ordinate of the line */ void paintHighlight(Graphics gfx, int line, int y); /** * Returns the tool tip to display at the specified * location. If this highlighter doesn't know what to * display, it should delegate to the next highlight * painter. * @param evt The mouse event */ String getToolTipText(MouseEvent evt); } /** * Returns the tool tip to display at the specified location. * @param evt The mouse event */ public String getToolTipText(MouseEvent evt) { if(highlights != null) return highlights.getToolTipText(evt); else return null; } /** * Returns the font metrics used by this component. */ public FontMetrics getFontMetrics() { return fm; } /** * Sets the font for this component. This is overridden to update the * cached font metrics and to recalculate which lines are visible. * @param font The font */ public void setFont(Font font) { super.setFont(font); fm = Toolkit.getDefaultToolkit().getFontMetrics(font); textArea.recalculateVisibleLines(); } /** * Repaints the text. * @param g The graphics context */ public void paint(Graphics gfx) { tabSize = fm.charWidth(' ') * ((Integer)textArea .getDocument().getProperty( PlainDocument.tabSizeAttribute)).intValue(); Rectangle clipRect = gfx.getClipBounds(); gfx.setColor(getBackground()); gfx.fillRect(clipRect.x,clipRect.y,clipRect.width,clipRect.height); // We don't use yToLine() here because that method doesn't // return lines past the end of the document int height = fm.getHeight(); int firstLine = textArea.getFirstLine(); int firstInvalid = firstLine + clipRect.y / height; // Because the clipRect's height is usually an even multiple // of the font height, we subtract 1 from it, otherwise one // too many lines will always be painted. int lastInvalid = firstLine + (clipRect.y + clipRect.height - 1) / height; try { TokenMarker tokenMarker = ((SyntaxDocument)textArea.getDocument()).getTokenMarker(); int x = textArea.getHorizontalOffset(); for(int line = firstInvalid; line <= lastInvalid; line++) { paintLine(gfx,tokenMarker,line,x); } if(tokenMarker != null && tokenMarker.isNextLineRequested()) { int h = clipRect.y + clipRect.height; repaint(0,h,getWidth(),getHeight() - h); } } catch(Exception e) { System.err.println("Error repainting line" + " range {" + firstInvalid + "," + lastInvalid + "}:"); e.printStackTrace(); } } /** * Marks a line as needing a repaint. * @param line The line to invalidate */ public final void invalidateLine(int line) { repaint(0,textArea.lineToY(line) + fm.getMaxDescent() + fm.getLeading(), getWidth(),fm.getHeight()); } /** * Marks a range of lines as needing a repaint. * @param firstLine The first line to invalidate * @param lastLine The last line to invalidate */ public final void invalidateLineRange(int firstLine, int lastLine) { repaint(0,textArea.lineToY(firstLine) + fm.getMaxDescent() + fm.getLeading(), getWidth(),(lastLine - firstLine + 1) * fm.getHeight()); } /** * Repaints the lines containing the selection. */ public final void invalidateSelectedLines() { invalidateLineRange(textArea.getSelectionStartLine(), textArea.getSelectionEndLine()); } /** * Implementation of TabExpander interface. Returns next tab stop after * a specified point. * @param x The x co-ordinate * @param tabOffset Ignored * @return The next tab stop after x */ public float nextTabStop(float x, int tabOffset) { int offset = textArea.getHorizontalOffset(); int ntabs = ((int)x - offset) / tabSize; return (ntabs + 1) * tabSize + offset; } /** * Returns the painter's preferred size. */ public Dimension getPreferredSize() { Dimension dim = new Dimension(); dim.width = fm.charWidth('w') * cols; dim.height = fm.getHeight() * rows; return dim; } /** * Returns the painter's minimum size. */ public Dimension getMinimumSize() { return getPreferredSize(); } // package-private members int currentLineIndex; Token currentLineTokens; Segment currentLine; // protected members protected JEditTextArea textArea; protected SyntaxStyle[] styles; protected Color caretColor; protected Color selectionColor; protected Color lineHighlightColor; protected Color bracketHighlightColor; protected Color eolMarkerColor; protected boolean blockCaret; protected boolean lineHighlight; protected boolean bracketHighlight; protected boolean paintInvalid; protected boolean eolMarkers; protected int cols; protected int rows; protected int tabSize; protected FontMetrics fm; protected Highlight highlights; protected void paintLine(Graphics gfx, TokenMarker tokenMarker, int line, int x) { Font defaultFont = getFont(); Color defaultColor = getForeground(); currentLineIndex = line; int y = textArea.lineToY(line); if(line < 0 || line >= textArea.getLineCount()) { if(paintInvalid) { paintHighlight(gfx,line,y); styles[Token.INVALID].setGraphicsFlags(gfx,defaultFont); gfx.drawString("~",0,y + fm.getHeight()); } } else if(tokenMarker == null) { paintPlainLine(gfx,line,defaultFont,defaultColor,x,y); } else { paintSyntaxLine(gfx,tokenMarker,line,defaultFont, defaultColor,x,y); } } protected void paintPlainLine(Graphics gfx, int line, Font defaultFont, Color defaultColor, int x, int y) { paintHighlight(gfx,line,y); textArea.getLineText(line,currentLine); gfx.setFont(defaultFont); gfx.setColor(defaultColor); y += fm.getHeight(); x = Utilities.drawTabbedText(currentLine,x,y,gfx,this,0); if(eolMarkers) { gfx.setColor(eolMarkerColor); gfx.drawString(".",x,y); } } protected void paintSyntaxLine(Graphics gfx, TokenMarker tokenMarker, int line, Font defaultFont, Color defaultColor, int x, int y) { textArea.getLineText(currentLineIndex,currentLine); currentLineTokens = tokenMarker.markTokens(currentLine, currentLineIndex); paintHighlight(gfx,line,y); gfx.setFont(defaultFont); gfx.setColor(defaultColor); y += fm.getHeight(); x = SyntaxUtilities.paintSyntaxLine(currentLine, currentLineTokens,styles,this,gfx,x,y); if(eolMarkers) { gfx.setColor(eolMarkerColor); gfx.drawString(".",x,y); } } protected void paintHighlight(Graphics gfx, int line, int y) { if(line >= textArea.getSelectionStartLine() && line <= textArea.getSelectionEndLine()) paintLineHighlight(gfx,line,y); if(highlights != null) highlights.paintHighlight(gfx,line,y); if(bracketHighlight && line == textArea.getBracketLine()) paintBracketHighlight(gfx,line,y); if(line == textArea.getCaretLine()) paintCaret(gfx,line,y); } protected void paintLineHighlight(Graphics gfx, int line, int y) { int height = fm.getHeight(); y += fm.getLeading() + fm.getMaxDescent(); int selectionStart = textArea.getSelectionStart(); int selectionEnd = textArea.getSelectionEnd(); if(selectionStart == selectionEnd) { if(lineHighlight) { gfx.setColor(lineHighlightColor); gfx.fillRect(0,y,getWidth(),height); } } else { gfx.setColor(selectionColor); int selectionStartLine = textArea.getSelectionStartLine(); int selectionEndLine = textArea.getSelectionEndLine(); int lineStart = textArea.getLineStartOffset(line); int x1, x2; if(textArea.isSelectionRectangular()) { int lineLen = textArea.getLineLength(line); x1 = textArea._offsetToX(line,Math.min(lineLen, selectionStart - textArea.getLineStartOffset( selectionStartLine))); x2 = textArea._offsetToX(line,Math.min(lineLen, selectionEnd - textArea.getLineStartOffset( selectionEndLine))); if(x1 == x2) x2++; } else if(selectionStartLine == selectionEndLine) { x1 = textArea._offsetToX(line, selectionStart - lineStart); x2 = textArea._offsetToX(line, selectionEnd - lineStart); } else if(line == selectionStartLine) { x1 = textArea._offsetToX(line, selectionStart - lineStart); x2 = getWidth(); } else if(line == selectionEndLine) { x1 = 0; x2 = textArea._offsetToX(line, selectionEnd - lineStart); } else { x1 = 0; x2 = getWidth(); } // "inlined" min/max() gfx.fillRect(x1 > x2 ? x2 : x1,y,x1 > x2 ? (x1 - x2) : (x2 - x1),height); } } protected void paintBracketHighlight(Graphics gfx, int line, int y) { int position = textArea.getBracketPosition(); if(position == -1) return; y += fm.getLeading() + fm.getMaxDescent(); int x = textArea._offsetToX(line,position); gfx.setColor(bracketHighlightColor); // Hack!!! Since there is no fast way to get the character // from the bracket matching routine, we use ( since all // brackets probably have the same width anyway gfx.drawRect(x,y,fm.charWidth('(') - 1, fm.getHeight() - 1); } protected void paintCaret(Graphics gfx, int line, int y) { if(textArea.isCaretVisible()) { int offset = textArea.getCaretPosition() - textArea.getLineStartOffset(line); int caretX = textArea._offsetToX(line,offset); int caretWidth = ((blockCaret || textArea.isOverwriteEnabled()) ? fm.charWidth('w') : 1); y += fm.getLeading() + fm.getMaxDescent(); int height = fm.getHeight(); gfx.setColor(caretColor); if(textArea.isOverwriteEnabled()) { gfx.fillRect(caretX,y + height - 1, caretWidth,1); } else { gfx.drawRect(caretX,y,caretWidth - 1,height - 1); } } } } antelope-3.5.1.orig/src/ise/antelope/app/jedit/FindAndReplace.java0000644000175000017500000003025210054202512024652 0ustar drazzibdrazzib/* * FindAndReplace.java - for jEdit's text component * Copyright (C) 2002 Dale Anson * * You may use and modify this package for any purpose. Redistribution is * permitted, in both source and binary form, provided that this notice * remains intact in all source distributions of this package. */ package ise.antelope.app.jedit; import java.awt.*; import java.awt.event.*; import java.util.regex.*; import javax.swing.*; import javax.swing.event.*; import ise.library.*; /** * A panel/dialog for doing find and replace on a JEditTextArea. * * @author Dale Anson, danson@germane-software.com * @version $Revision: 98 $ */ public class FindAndReplace extends JDialog { public final static int FIND = 0; public final static int REPLACE = 1; private int type = FIND; private JEditTextArea textarea = null; private JTextField to_find = null; /** * Constructor for FindAndReplace * * @param textarea * @param parent Description of the Parameter */ public FindAndReplace( JFrame parent, JEditTextArea textarea ) { this( parent, FIND, textarea ); } /** * Constructor for FindAndReplace * * @param type * @param parent Description of the Parameter * @param ta Description of the Parameter */ public FindAndReplace( JFrame parent, int type, JEditTextArea ta ) { super( parent, "Find", true ); if ( type != FIND && type != REPLACE ) { throw new IllegalArgumentException( "invalid type, must be FIND or REPLACE" ); } this.type = type; this.textarea = ta; if (type == FIND) { setContentPane(getFindPanel()); } else { setContentPane(getReplacePanel()); } pack(); to_find.requestFocus(); } private JPanel getFindPanel() { JPanel panel = new JPanel(); KappaLayout layout = new KappaLayout(); panel.setLayout( layout ); panel.setBorder( new javax.swing.border.EmptyBorder( 11, 11, 11, 11 ) ); JLabel find_label = new JLabel( "Find:" ); to_find = new JTextField( 20 ); JButton find_btn = new JButton( "Find" ); JButton find_next_btn = new JButton( "Find Next" ); JButton cancel_btn = new JButton( "Close" ); final JCheckBox wrap_cb = new JCheckBox( "Wrap search" ); wrap_cb.setSelected(true); panel.add( find_label, "0, 0, 1, 1, SW, w, 3" ); panel.add( to_find, "0, 1, 1, 1, N, w, 3" ); panel.add( wrap_cb, "0, 2, 1, 1, 0, w, 3" ); JPanel btn_panel = new JPanel( new KappaLayout() ); btn_panel.add( find_btn, "0, 0, 1, 1, 0, w, 3" ); btn_panel.add( find_next_btn, "0, 1, 1, 1, 0, w, 3" ); btn_panel.add( cancel_btn, "0, 2, 1, 1, 0, w, 3" ); panel.add( btn_panel, "1, 0, 1, 3, 0, h, 5" ); find_btn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { String text_to_find = to_find.getText(); if ( text_to_find == null || text_to_find.length() == 0 ) { return ; } try { String doc = textarea.getText(); Pattern pattern = Pattern.compile( text_to_find, Pattern.DOTALL ); Matcher matcher = pattern.matcher( doc ); if ( matcher.find() ) { int start = matcher.start(); int end = matcher.end(); String found = doc.substring( start, end ); textarea.setCaretPosition( start ); textarea.scrollToCaret(); textarea.select( start, end ); } } catch ( Exception e ) { e.printStackTrace(); } } } ); find_next_btn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { String text_to_find = to_find.getText(); if ( text_to_find == null || text_to_find.length() == 0 ) { return ; } try { int initial_caret = textarea.getCaretPosition(); int caret = initial_caret; String doc = textarea.getText(); Pattern pattern = Pattern.compile( text_to_find, Pattern.DOTALL ); Matcher matcher = pattern.matcher( doc ); if (!matcher.find(caret) && wrap_cb.isSelected()) caret = 0; if ( matcher.find(caret) ) { int start = matcher.start(); int end = matcher.end(); String found = doc.substring( start, end ); textarea.setCaretPosition( start ); textarea.select( start, end ); } } catch ( Exception e ) { e.printStackTrace(); } } } ); cancel_btn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { setVisible( false ); dispose(); } } ); return panel; } private JPanel getReplacePanel() { JPanel panel = new JPanel(); KappaLayout layout = new KappaLayout(); panel.setLayout( layout ); panel.setBorder( new javax.swing.border.EmptyBorder( 11, 11, 11, 11 ) ); JLabel find_label = new JLabel( "Find:" ); to_find = new JTextField( 20 ); JButton find_btn = new JButton( "Find" ); JButton find_next_btn = new JButton( "Find Next" ); JLabel replace_label = new JLabel("Replace:"); final JTextField replace_with = new JTextField(); JButton replace_btn = new JButton("Replace"); JButton replace_all_btn = new JButton("Replace All"); JButton cancel_btn = new JButton( "Close" ); final JCheckBox wrap_cb = new JCheckBox( "Wrap search" ); wrap_cb.setSelected(true); panel.add( find_label, "0, 0, 1, 1, SW, w, 3" ); panel.add( to_find, "0, 1, 1, 1, N, w, 3" ); panel.add( replace_label, "0, 2, 1, 1, SW, w, 3"); panel.add( replace_with, "0, 3, 1, 1, N, w, 3"); panel.add( wrap_cb, "0, 4, 1, 1, 0, w, 3" ); JPanel btn_panel = new JPanel( new KappaLayout() ); btn_panel.add( find_btn, "0, 0, 1, 1, 0, w, 3" ); btn_panel.add( find_next_btn, "0, 1, 1, 1, 0, w, 3" ); btn_panel.add( replace_btn, "0, 2, 1, 1, 0, w, 3" ); btn_panel.add( replace_all_btn, "0, 3, 1, 1, 0, w, 3" ); btn_panel.add( cancel_btn, "0, 4, 1, 1, 0, w, 3" ); panel.add( btn_panel, "1, 0, 1, 5, 0, h, 5" ); find_btn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { String text_to_find = to_find.getText(); if ( text_to_find == null || text_to_find.length() == 0 ) { return ; } try { String doc = textarea.getText(); Pattern pattern = Pattern.compile( text_to_find, Pattern.DOTALL ); Matcher matcher = pattern.matcher( doc ); if ( matcher.find() ) { int start = matcher.start(); int end = matcher.end(); String found = doc.substring( start, end ); textarea.setCaretPosition( start ); textarea.scrollToCaret(); textarea.select( start, end ); } } catch ( Exception e ) { e.printStackTrace(); } } } ); find_next_btn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { String text_to_find = to_find.getText(); if ( text_to_find == null || text_to_find.length() == 0 ) { return ; } try { int initial_caret = textarea.getCaretPosition(); int caret = initial_caret; String doc = textarea.getText(); Pattern pattern = Pattern.compile( text_to_find, Pattern.DOTALL ); Matcher matcher = pattern.matcher( doc ); if ( matcher.find() ) { boolean done = false; while ( !done ) { matcher = pattern.matcher( doc ); while ( matcher.find() ) { int start = matcher.start(); int end = matcher.end(); if ( start < caret ) { continue; } caret = end; String found = doc.substring( start, end ); textarea.setCaretPosition( start ); textarea.scrollToCaret(); textarea.select( start, end ); done = true; break; } if ( wrap_cb.isSelected() ) { caret = 0; } else { break; } } } } catch ( Exception e ) { e.printStackTrace(); } } } ); replace_btn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { textarea.setSelectedText(replace_with.getText()); } } ); replace_all_btn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { String text_to_find = to_find.getText(); if ( text_to_find == null || text_to_find.length() == 0 ) { return ; } try { String doc = textarea.getText(); Pattern pattern = Pattern.compile( text_to_find, Pattern.DOTALL ); Matcher matcher = pattern.matcher( doc ); while ( matcher.find() ) { int start = matcher.start(); int end = matcher.end(); String found = doc.substring( start, end ); textarea.setCaretPosition( start ); textarea.scrollToCaret(); textarea.select( start, end ); textarea.setSelectedText(replace_with.getText()); } } catch ( Exception e ) { e.printStackTrace(); } } } ); cancel_btn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent ae ) { setVisible( false ); dispose(); } } ); return panel; } } antelope-3.5.1.orig/src/ise/antelope/app/jedit/XMLTokenMarker.java0000644000175000017500000001377110013736354024700 0ustar drazzibdrazzib/* * XMLTokenMarker.java - XML token marker * Copyright (C) 1998, 1999 Slava Pestov * Copyright (C) 2001 Tom Bradford * * You may use and modify this package for any purpose. Redistribution is * permitted, in both source and binary form, provided that this notice * remains intact in all source distributions of this package. */ package ise.antelope.app.jedit; import javax.swing.text.Segment; /** * XML Token Marker Rewrite * * @author Tom Bradford * @version $Id: XMLTokenMarker.java 12 2004-02-16 02:39:39Z danson $ */ public class XMLTokenMarker extends TokenMarker { public XMLTokenMarker() { } public byte markTokensImpl(byte token, Segment line, int lineIndex) { char[] array = line.array; int offset = line.offset; int lastOffset = offset; int length = line.count + offset; // Ugly hack to handle multi-line tags boolean sk1 = token == Token.KEYWORD1; for ( int i = offset; i < length; i++ ) { int ip1 = i+1; char c = array[i]; switch ( token ) { case Token.NULL: // text switch ( c ) { case '<': addToken(i-lastOffset, token); lastOffset = i; if ( SyntaxUtilities.regionMatches(false, line, ip1, "!--") ) { i += 3; token = Token.COMMENT1; } else if ( array[ip1] == '!' ) { i += 1; token = Token.COMMENT2; } else if ( array[ip1] == '?' ) { i += 1; token = Token.KEYWORD3; } else token = Token.KEYWORD1; break; case '&': addToken(i - lastOffset, token); lastOffset = i; token = Token.LABEL; break; } break; case Token.KEYWORD1: // tag switch ( c ) { case '>': addToken(ip1-lastOffset, token); lastOffset = ip1; token = Token.NULL; sk1 = false; break; case ' ': case '\t': addToken(i-lastOffset, token); lastOffset = i; token = Token.KEYWORD2; sk1 = false; break; default: if ( sk1 ) { token = Token.KEYWORD2; sk1 = false; } break; } break; case Token.KEYWORD2: // attribute switch ( c ) { case '>': addToken(ip1-lastOffset, token); lastOffset = ip1; token = Token.NULL; break; case '/': addToken(i-lastOffset, token); lastOffset = i; token = Token.KEYWORD1; break; case '=': addToken(i-lastOffset, token); lastOffset = i; token = Token.OPERATOR; } break; case Token.OPERATOR: // equal for attribute switch ( c ) { case '\"': case '\'': addToken(i-lastOffset, token); lastOffset = i; if ( c == '\"' ) token = Token.LITERAL1; else token = Token.LITERAL2; break; } break; case Token.LITERAL1: case Token.LITERAL2: // strings if ( ( token == Token.LITERAL1 && c == '\"' ) || ( token == Token.LITERAL2 && c == '\'' ) ) { addToken(ip1-lastOffset, token); lastOffset = ip1; token = Token.KEYWORD1; } break; case Token.LABEL: // entity if ( c == ';' ) { addToken(ip1-lastOffset, token); lastOffset = ip1; token = Token.NULL; break; } break; case Token.COMMENT1: // Inside a comment if ( SyntaxUtilities.regionMatches(false, line, i, "-->") ) { addToken((i+3)-lastOffset, token); lastOffset = i+3; token = Token.NULL; } break; case Token.COMMENT2: // Inside a declaration if ( SyntaxUtilities.regionMatches(false, line, i, ">") ) { addToken(ip1-lastOffset, token); lastOffset = ip1; token = Token.NULL; } break; case Token.KEYWORD3: // Inside a processor instruction if ( SyntaxUtilities.regionMatches(false, line, i, "?>") ) { addToken((i+2)-lastOffset, token); lastOffset = i+2; token = Token.NULL; } break; default: throw new InternalError("Invalid state: " + token); } } switch ( token ) { case Token.LABEL: addToken(length-lastOffset, Token.INVALID); token = Token.NULL; break; default: addToken(length-lastOffset, token); break; } return token; } } antelope-3.5.1.orig/src/ise/antelope/app/jedit/SyntaxUtilities.java0000644000175000017500000001120210013736354025242 0ustar drazzibdrazzib/* * SyntaxUtilities.java - Utility functions used by syntax colorizing * Copyright (C) 1999 Slava Pestov * * You may use and modify this package for any purpose. Redistribution is * permitted, in both source and binary form, provided that this notice * remains intact in all source distributions of this package. */ package ise.antelope.app.jedit; import javax.swing.text.*; import java.awt.*; /** * Class with several utility functions used by jEdit's syntax colorizing * subsystem. * * @author Slava Pestov * @version $Id: SyntaxUtilities.java 12 2004-02-16 02:39:39Z danson $ */ public class SyntaxUtilities { /** * Checks if a subregion of a Segment is equal to a * string. * @param ignoreCase True if case should be ignored, false otherwise * @param text The segment * @param offset The offset into the segment * @param match The string to match */ public static boolean regionMatches(boolean ignoreCase, Segment text, int offset, String match) { int length = offset + match.length(); char[] textArray = text.array; if(length > text.offset + text.count) return false; for(int i = offset, j = 0; i < length; i++, j++) { char c1 = textArray[i]; char c2 = match.charAt(j); if(ignoreCase) { c1 = Character.toUpperCase(c1); c2 = Character.toUpperCase(c2); } if(c1 != c2) return false; } return true; } /** * Checks if a subregion of a Segment is equal to a * character array. * @param ignoreCase True if case should be ignored, false otherwise * @param text The segment * @param offset The offset into the segment * @param match The character array to match */ public static boolean regionMatches(boolean ignoreCase, Segment text, int offset, char[] match) { int length = offset + match.length; char[] textArray = text.array; if(length > text.offset + text.count) return false; for(int i = offset, j = 0; i < length; i++, j++) { char c1 = textArray[i]; char c2 = match[j]; if(ignoreCase) { c1 = Character.toUpperCase(c1); c2 = Character.toUpperCase(c2); } if(c1 != c2) return false; } return true; } /** * Returns the default style table. This can be passed to the * setStyles() method of SyntaxDocument * to use the default syntax styles. */ public static SyntaxStyle[] getDefaultSyntaxStyles() { SyntaxStyle[] styles = new SyntaxStyle[Token.ID_COUNT]; styles[Token.COMMENT1] = new SyntaxStyle(new Color( 0, 153, 51 ),true,false); //