| 3 | | Trac is a '''minimalistic''' approach to '''web-based''' management of |
| 4 | | '''software projects'''. Its goal is to simplify effective tracking and handling of software issues, enhancements and overall progress. |
| 5 | | |
| 6 | | All aspects of Trac have been designed with the single goal to |
| 7 | | '''help developers write great software''' while '''staying out of the way''' |
| 8 | | and imposing as little as possible on a team's established process and |
| 9 | | culture. |
| 10 | | |
| 11 | | As all Wiki pages, this page is editable, this means that you can |
| 12 | | modify the contents of this page simply by using your |
| 13 | | web-browser. Simply click on the "Edit this page" link at the bottom |
| 14 | | of the page. WikiFormatting will give you a detailed description of |
| 15 | | available Wiki formatting commands. |
| 16 | | |
| 17 | | "[wiki:TracAdmin trac-admin] ''yourenvdir'' initenv" created |
| 18 | | a new Trac environment, containing a default set of wiki pages and some sample |
| 19 | | data. This newly created environment also contains |
| 20 | | [wiki:TracGuide documentation] to help you get started with your project. |
| 21 | | |
| 22 | | You can use [wiki:TracAdmin trac-admin] to configure |
| 23 | | [http://trac.edgewall.org/ Trac] to better fit your project, especially in |
| 24 | | regard to ''components'', ''versions'' and ''milestones''. |
| | 3 | 1. Download |
| | 4 | 2. Quick introduction |
| 39 | | For a complete list of local wiki pages, see TitleIndex. |
| | 14 | |
| | 15 | == Quick introduction == |
| | 16 | |
| | 17 | In Java, variables refer to instances of objects. There's no way to refer to the reference of a variable, in order to indirectly change to what object it refers. ''accesslib'' provides an abstract mechanism for manipulating references (as opposed to manipulating objects). |
| | 18 | |
| | 19 | A quick example: |
| | 20 | |
| | 21 | {{{ |
| | 22 | class Example { |
| | 23 | |
| | 24 | int i; |
| | 25 | |
| | 26 | void manipulate(Accessor a) |
| | 27 | { |
| | 28 | if(a.getType() == String.class) { |
| | 29 | a.setValue("Hello, world!"); |
| | 30 | } else if(a.getType() == Integer.class) { |
| | 31 | a.setValue(new Integer(13)); |
| | 32 | } |
| | 33 | } |
| | 34 | |
| | 35 | void foobar() |
| | 36 | { |
| | 37 | HashMap map = new HashMap(); |
| | 38 | Accessor a = new MapAccessor(map, "my key", String.class); |
| | 39 | manipulate(a); |
| | 40 | |
| | 41 | // Prints "Hello, world!". |
| | 42 | System.out.println(map.get("my key")); |
| | 43 | |
| | 44 | i = 0; |
| | 45 | a = new IAccessor(); |
| | 46 | manipulate(a); |
| | 47 | |
| | 48 | // Prints "13". |
| | 49 | System.out.println(i); |
| | 50 | } |
| | 51 | |
| | 52 | class IAccessor implements Accessor { |
| | 53 | void Class getType() { return Integer.class; } |
| | 54 | void clearValue() { i = 0; } |
| | 55 | Object getValue() { return Integer.valueOf(i); } |
| | 56 | void setValue(Object value) { i = ((Integer)value).intValue(); } |
| | 57 | } |
| | 58 | } |
| | 59 | }}} |