xref: /jEdit/
NameDateSize

..16-Mar-201612 KiB

.codesearch_no_update04-Mar-20140

.idea/25-Jul-20134 KiB

build.properties.sample25-Jul-20132.2 KiB

build.xml25-Jul-201368 KiB

de/25-Jul-20134 KiB

doc/17-Aug-20134 KiB

doclet/25-Jul-20134 KiB

icons/25-Jul-20134 KiB

installer/25-Jul-20134 KiB

ivy.xml25-Jul-20134.5 KiB

ivysettings.xml25-Jul-20132 KiB

jars/25-Jul-20134 KiB

jEdit.iml25-Jul-20131 KiB

keymaps/17-Aug-20134 KiB

macros/25-Jul-20134 KiB

misc/25-Jul-20134 KiB

modes/25-Jul-201312 KiB

net/25-Jul-20134 KiB

org/25-Jul-20134 KiB

package-files/25-Jul-20134 KiB

properties/25-Jul-20134 KiB

README.SRC.txt25-Jul-20139.1 KiB

startup/25-Jul-20134 KiB

test/25-Jul-20134 KiB

README.SRC.txt

1SOURCE CODE NOTES
2
3This file only contains information about compiling from source.
4Scroll to the bottom if you are trying to use an IDE like Eclipse.
5General jEdit documentation can be found in the 'doc' directory.
6
7* Requirements
8
9 For all tasks:
10
11  - Apache Ant. Get it from <http://ant.apache.org>.
12    1.8.2 or newer has to be used.
13  - The Ant Optional package. This is included in the download from ants website,
14    as well as the AntPlugin from the Plugin Manager,
15    but not in some default installs on various *nix systems.
16    There you should get the ant-optional package through your
17    package management system.
18
19 For building jEdit, the API documentation or any of the
20 distribution files except of the source package:
21
22  - A Java compiler of at least version 1.7, such as Oracle's javac
23    which is included in the JDK. Get it from <http://www.java.com/download> or
24    from your package manager - e. g. openjdk-7-jdk.
25
26 For building the API documentation:
27
28  - Sun's javadoc tool, which is included in the JDK.
29    Get it from <http://www.java.com/download> or from your package
30    manager - e. g. sun-java6-jdk.
31
32 For building the windows installer (for the final step):
33
34  - Unicode Inno Setup. Get it from <http://www.jrsoftware.org/isdl.php>
35  - A box running windows or wine, e. g. on *nix. If Inno Setup should be
36    run via wine, a wine version of at least 1.3.10 is required because
37    of a bug in earlier wine versions.
38
39 For building the EXE launcher on Mac OS X:
40
41  - Rosetta. Get it from your installation DVD at "Optional Installs".
42
43 For building the Mac OS X disk image (DMG) for easy distribution
44 (for the final step):
45
46  - A box running Mac OS X
47
48
49* Tasks
50
51 If all necessary tools are installed and set up, you can use ant with a couple of targets.
52 The default target if you just run "ant" is "build", like running "ant build".
53
54 - retrieve                retrieve the dependencies
55  retrieves almost all dependencies needed for building jEdit, only InnoSetup for the
56  windows installer and wine, if InnoSetup should be run on *nix or Mac OS X, have to
57  be installed and configured in build.properties manually.
58
59 - build                   build the jEdit JAR-file with full debug-information
60  builds jEdit in the build-folder, configured in build.properties,
61  with full debug information included.
62
63 - build-exe-launcher      build the EXE launcher
64  builds the EXE launcher in the build-folder, configured in build.properties.
65
66 - run                     run jEdit
67  runs the jEdit-version in the build-folder, configured in build.properties.
68  If there isn't any, it builds it in front of execution.
69
70 - run-debug               run jEdit with debug listening enabled
71  runs the jEdit-version in the build-folder, configured in build.properties.
72  If there isn't any, it builds it in front of execution.
73  The debug listening for this JVM is enabled.
74
75 - test                    run unit tests
76  runs the available unit tests.
77
78 - docs-html               generate HTML docs
79  builds the online help in HTML-format in the build-folder, configured in build.properties.
80
81 - docs-javadoc            generate JavaDoc API docs
82  builds the API documentation in the build-folder, configured in build.properties.
83
84 - docs-pdf-USletter       generate PDF users-guide with US letter paper size
85  builds the User's Guide in PDF-format with US letter page size
86  in the build-folder, configured in build.properties.
87
88 - docs-pdf-a4             generate PDF users-guide with A4 paper size
89  builds the User's Guide in PDF-format with A4 page size
90  in the build-folder, configured in build.properties.
91
92 - dist                    build all distribution files
93  builds all distribution files or prepares the final step for some of them (Win and Mac)
94  in the dist-folder, configured in build.properties.
95
96 - dist-deb                build the DEB Package
97  builds the DEB Debian package in the dist-folder, configured in build.properties.
98
99 - dist-sign-deb-Release   sign the DEB Release file
100  signs the Debian repository metadata
101
102 - dist-java               build the Java-installer
103  builds the Java installer in the dist-folder, configured in build.properties.
104
105 - dist-mac                build the Mac OS X disk image (DMG-file)
106  builds the Mac OS X internet-enabled disk image (DMG-file) if building on a box
107  running Mac OS X. If building on a box running something else, there will be a file
108  called jedit<version_here>-dist-mac-finish.tar.bz2 in the dist-folder,
109  configured in build.properties. Give that to someone running Mac OS X and ask him
110  to extract the archive and to execute "ant dist-mac-finish".
111  The only thing that needs to be installed for this final step is Apache Ant.
112
113 - dist-mac-finish         finish building the Mac OS X disk image (DMG-file) on Mac OS X
114  builds the Mac OS X internet-enabled disk image (DMG-file) in the dist-folder,
115  configured in build.properties if building on a box running Mac OS X.
116  This target is normally only run directly, if someone just has to do
117  the final step that was prepared by "dist-mac" or "dist".
118
119 - dist-manuals            build the PDF-manuals
120  builds the User's Guide in PDF-format with both, USletter and A4 page size
121  in the dist-folder, configured in build.properties.
122
123 - dist-slackware          build the Slackware Package
124  builds the Slackware TGZ package in the dist-folder, configured in build.properties.
125
126 - dist-src                build the src-archive
127  builds the source package in the dist-folder, configured in build.properties.
128
129 - dist-win                build the Windows installer (EXE-file)
130  builds the windows installer in the dist-folder, configured in build.properties,
131  on a box running Windows. If building on a box running something else, there will be
132  a file called jedit<version_here>-dist-win-finish.tar.bz2 in the dist-folder,
133  configured in build.properties. Give that to someone running Windows and ask him
134  to extract the archive and to execute "ant dist-win-finish".
135  The only things that need to be installed for this final step is Apache Ant
136  and Inno Setup. Prior to running "ant dist-win-finish", the helper has to set
137  up the build.properties file with the path to his Inno Setup installation.
138
139 - dist-win-finish         finish building the Windows installer (EXE-file) on Windows or via wine
140  build the windows installer in the dist-folder, configured in build.properties if
141  building on a box running Windows or via wine. This target is normally only run directly, if
142  someone just has to do the final step that was prepared by "dist-win" or "dist".
143
144 - clean                   clean up intermediate files
145  cleans up the temporary files from the build- and dist-folder, configured in build.properties.
146  Leaves the runnable jEdit, and the distribution files in place.
147
148 - clean-all               clean up lib.dir, build.dir and dist.dir completely
149  cleans up all files from the lib-, build- and dist-folder, configured in build.properties,
150  and the folders itself too.
151
152
153
154* Interesting algorithms and tricks
155
156 - org.gjt.sp.jedit.browser.VFSDirectoryEntryTable: a tree table control.
157
158 - org.gjt.sp.jedit.buffer.LineManager: the "gap" optimization allows
159   update operations to be performed in O(1) time in certain
160   circumstances.
161
162 - org.gjt.sp.jedit.buffer.KillRing: uses a hash to speed up comparisons
163   with sets of strings.
164
165 - org.gjt.sp.jedit.search.BoyerMooreSearchMatcher: fast text search.
166
167 - org.gjt.sp.jedit.syntax.TokenMarker: generic tokenizer driven by rules
168   defined in an XML file.
169
170 - org.gjt.sp.jedit.textarea.DisplayManager: the fold visibility map
171   looks like an RLE-compressed bit set but does lookups in O(log n).
172
173 - org.gjt.sp.util.WorkThreadPool: a pool of threads executing requests
174   from a queue, enforcing various concurrency requirements.
175
176
177
178* Tips for Eclipse/NetBeans/IDE users:
179
180A file "jsr305.jar" contains definitions of the annotations 
181used in jEdit source code. It is downloaded automatically by ivy 
182as part of the ant build process, to your lib/compile subfolder.
183If you add that jar to the
184project properties - java build path - libraries, that will
185get rid of the compiler errors on the annotations.
186
187A file "tools.jar" from the JDK is also needed in your 
188java build path. 
189
190The ant build process creates a subfolder called "build" for its work.
191Eclipse does the same and may pick the same folder. 
192It is recommended you check/ensure that a different build
193directory ("Default Ouptut Folder") for Eclipse is used. 
194
195Some of the source directories are only needed for building packages on
196certain platforms. If you add jEdit source to an IDE like Eclipse that tries
197to compile every .java file, you'll get some errors from these directories unless
198you have the right libraries, which are automatically downloaded by ivy.
199However, if you tell Eclipse to exclude these directories, 
200you can still build and run/debug jEdit from source. Follow these steps:
201
202 - Project properties - Java build path
203 - Source - Excluded dirs - Edit - Add multiple
204 - Add these subdirs: net, de, build, test, misc
205 - Default output folder: /build-eclipse
206
207The "eclipse-formatting.xml" file can be used to set the
208code format style to be the same as what is currently used here.
209