Skip to content

Commit 3a64fc8

Browse files
author
jossonsmith
committed
1. Upload one copy of the library that supports dynamic loading of JavaScript.
2. Support JavaScript compressing 3. Update ant build script 4. Remove old *.z.js
1 parent b14a633 commit 3a64fc8

413 files changed

Lines changed: 44965 additions & 32311 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

sources/net.sf.j2s.lib/build.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ bin.includes = META-INF/,\
22
plugin.xml,\
33
j2slib/
44
bin.excludes = .svn/,\
5-
j2slib/.svn/
5+
j2slib/.svn/,\
6+
j2slib/images/
67
source.library.jar = src/
78
jars.compile.order = library.jar
89
src.includes = src/,\

sources/net.sf.j2s.lib/j2s.core.build

Lines changed: 154 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
<property name="j2score.dir" value="../net.sf.j2s.java.core/j2score"/>
1616
<property name="js.src.dir" value="../net.sf.j2s.java.core/bin"/>
17+
<property name="js.swt.dir" value="../net.sf.j2s.java.org.eclipse.swt"/>
18+
<property name="jswt.src.dir" value="${js.swt.dir}/bin"/>
1719
<property name="ajaxcore.dir" value="../net.sf.j2s.ajax/j2sajax"/>
1820
<property name="ajax.src.dir" value="../net.sf.j2s.ajax/bin"/>
1921
<property name="jz.dist.dir" value="j2slib"/>
@@ -57,7 +59,9 @@
5759
<file name="java/util/Comparator.js"/>
5860
<file name="java/lang/Enum.js"/>
5961

62+
<!--
6063
<file name="java/lang/Object.js"/>
64+
-->
6165
<file name="java/lang/Encoding.js"/>
6266
<file name="java/lang/String.js"/>
6367
<file name="java/lang/StringBuffer.js"/>
@@ -125,7 +129,7 @@
125129
</header>
126130
<filelist dir="${js.src.dir}">
127131
<!-- Inner Console : java.lang.System -->
128-
<file name="java/lang/NativeConsole.js"/>
132+
<file name="java/lang/Console.js"/>
129133

130134
<file name="java/lang/ThreadGroup.js"/>
131135
<file name="java/lang/Thread.js"/>
@@ -184,24 +188,164 @@
184188
</concat>
185189
</target>
186190

191+
<!-- - - - - - - - - - - - - - - - - -
192+
target: j2s.pack.core
193+
- - - - - - - - - - - - - - - - - -->
194+
<target name="j2s.pack.core">
195+
<java classname="net.sf.j2s.lib.build.SmartJSCompressor">
196+
<arg value="${current.project.dir}/${j2score.dir}/Class.js"/>
197+
<arg value="${current.project.dir}/${js.src.dir}/java/lang/Class.js"/>
198+
199+
<arg value="no.debug.support=true"/>
200+
<arg value="no.javascript.support=true"/>
201+
<arg value="link.compress=true"/>
202+
203+
<classpath>
204+
<pathelement path="bin"/>
205+
</classpath>
206+
</java>
207+
208+
<java classname="net.sf.j2s.lib.build.SmartJSCompressor">
209+
<arg value="${current.project.dir}/${j2score.dir}/ClassLoader.js"/>
210+
<arg value="${current.project.dir}/${js.src.dir}/java/lang/ClassLoader.js"/>
211+
212+
<arg value="clazz.existed=true"/>
213+
<arg value="no.clazzloader.mode=true"/>
214+
<arg value="link.compress=true"/>
215+
216+
<classpath>
217+
<pathelement path="bin"/>
218+
</classpath>
219+
</java>
220+
221+
<java classname="net.sf.j2s.lib.build.SmartJSCompressor">
222+
<arg value="${current.project.dir}/${j2score.dir}/Console.js"/>
223+
<arg value="${current.project.dir}/${js.src.dir}/java/lang/Console.js"/>
224+
225+
<arg value="no.window.support=false"/>
226+
<arg value="no.system.support=false"/>
227+
<arg value="link.compress=true"/>
228+
229+
<classpath>
230+
<pathelement path="bin"/>
231+
</classpath>
232+
</java>
233+
<concat destfile="${jz.dist.dir}/j2slib.z.js">
234+
<header filtering="no" trimleading="yes">/******************************************************************************
235+
* Copyright (c) 2005-2006 ognize.com and others.
236+
* All rights reserved. This program and the accompanying materials
237+
* are made available under the terms of the Eclipse Public License v1.0
238+
* which accompanies this distribution, and is available at
239+
* http://www.eclipse.org/legal/epl-v10.html
240+
*
241+
* Web:
242+
* http://j2s.sourceforge.net/
243+
* http://sourceforge.net/projects/j2s/
244+
* Contributors:
245+
* ognize.com - initial API and implementation
246+
*****************************************************************************/
247+
/*******
248+
* @author zhou renjian
249+
* @create July 12, 2006
250+
*******/
251+
</header>
252+
<filelist dir="${js.src.dir}">
253+
<file name="java/lang/Class.js"/>
254+
<file name="java/lang/ClassLoader.js"/>
255+
<file name="java/lang/Console.js"/>
256+
</filelist>
257+
</concat>
258+
</target>
259+
260+
<!-- - - - - - - - - - - - - - - - - -
261+
target: j2s.pack.common
262+
- - - - - - - - - - - - - - - - - -->
263+
<target name="j2s.pack.common">
264+
<concat destfile="${jz.dist.dir}/java/j2slib.common.z.js">
265+
<filelist dir="${js.src.dir}">
266+
<file name="java/io/Serializable.js"/>
267+
<file name="java/lang/CharSequence.js"/>
268+
<file name="java/lang/Cloneable.js"/>
269+
<file name="java/lang/Comparable.js"/>
270+
<file name="java/lang/Runnable.js"/>
271+
<file name="java/util/Comparator.js"/>
272+
</filelist>
273+
</concat>
274+
<concat destfile="${jz.dist.dir}/java/j2slib.basic.z.js">
275+
<filelist dir="${js.src.dir}">
276+
<file name="java/lang/Number.js"/>
277+
<file name="java/lang/Integer.js"/>
278+
<file name="java/lang/Long.js"/>
279+
<file name="java/lang/Float.js"/>
280+
<file name="java/lang/Double.js"/>
281+
282+
<file name="java/util/Date.js"/>
283+
284+
<file name="java/util/EventObject.js"/>
285+
<file name="java/util/EventListener.js"/>
286+
<file name="java/util/EventListenerProxy.js"/>
287+
288+
<file name="java/util/Iterator.js"/>
289+
<file name="java/util/ListIterator.js"/>
290+
<file name="java/util/Enumeration.js"/>
291+
<file name="java/util/Collection.js"/>
292+
<file name="java/util/Set.js"/>
293+
<file name="java/util/Map.js"/>
294+
<file name="java/util/List.js"/>
295+
<file name="java/util/RandomAccess.js"/>
296+
</filelist>
297+
</concat>
298+
</target>
299+
300+
<!-- - - - - - - - - - - - - - - - - -
301+
target: j2s.pack.common
302+
- - - - - - - - - - - - - - - - - -->
303+
<target name="j2s.pack.lib" depends="j2s.core.compile, j2s.pack.core, j2s.pack.common">
304+
<copy todir="${jz.dist.dir}">
305+
<fileset dir="${ajax.src.dir}">
306+
<exclude name="**/*.clazz"/>
307+
<exclude name="**/*.class"/>
308+
<exclude name="**/*.swp"/>
309+
<exclude name="**/*.swo"/>
310+
</fileset>
311+
<fileset dir="${js.src.dir}">
312+
<exclude name="**/*.clazz"/>
313+
<exclude name="**/*.class"/>
314+
<exclude name="**/*.swp"/>
315+
<exclude name="**/*.swo"/>
316+
</fileset>
317+
<fileset dir="${jswt.src.dir}">
318+
<exclude name="**/*.clazz"/>
319+
<exclude name="**/*.class"/>
320+
<exclude name="**/*.swp"/>
321+
<exclude name="**/*.swo"/>
322+
</fileset>
323+
</copy>
324+
</target>
325+
187326
<!-- - - - - - - - - - - - - - - - - -
188327
target: j2s.core.compile
189328
- - - - - - - - - - - - - - - - - -->
190-
<target name="j2s.core.compile">
329+
<target name="j2s.core.compile" depends="j2s.pack.core">
191330
<delete file="${ajax.src.dir}/net/sf/j2s/ajax/HttpRequest.js" quiet="true"/>
192-
331+
193332
<java classname="net.sf.j2s.lib.build.RegExCompress">
194333
<arg value="false"/>
195334
<arg value="${current.project.dir}"/>
196335

336+
<!--
197337
<arg value="${j2score.dir}/Class.js"/>
198338
<arg value="${js.src.dir}/java/lang/Class.js"/>
199339
200340
<arg value="${j2score.dir}/ClassExt.js"/>
201341
<arg value="${js.src.dir}/java/lang/ClassExt.js"/>
202342
343+
<arg value="${j2score.dir}/ClassLoader.js"/>
344+
<arg value="${js.src.dir}/java/lang/ClassLoader.js"/>
345+
203346
<arg value="${j2score.dir}/Object.js"/>
204347
<arg value="${js.src.dir}/java/lang/Object.js"/>
348+
-->
205349

206350
<arg value="${j2score.dir}/Enum.js"/>
207351
<arg value="${js.src.dir}/java/lang/Enum.js"/>
@@ -224,21 +368,25 @@
224368
<arg value="${j2score.dir}/Date.js"/>
225369
<arg value="${js.src.dir}/java/util/Date.js"/>
226370

371+
<!--
227372
<arg value="${j2score.dir}/UtilExt.js"/>
228373
<arg value="${js.src.dir}/java/util/UtilExt.js"/>
374+
-->
229375

230376
<arg value="${j2score.dir}/Encoding.js"/>
231377
<arg value="${js.src.dir}/java/lang/Encoding.js"/>
232378

233379
<arg value="${j2score.dir}/String.js"/>
234380
<arg value="${js.src.dir}/java/lang/String.js"/>
235381

236-
<arg value="${j2score.dir}/NativeConsole.js"/>
237-
<arg value="${js.src.dir}/java/lang/NativeConsole.js"/>
382+
<!--
383+
<arg value="${j2score.dir}/Console.js"/>
384+
<arg value="${js.src.dir}/java/lang/Console.js"/>
238385
239386
<arg value="${j2score.dir}/Throwable.js"/>
240387
<arg value="${js.src.dir}/java/lang/Throwable.js"/>
241-
388+
-->
389+
242390
<arg value="${j2score.dir}/Error.js"/>
243391
<arg value="${js.src.dir}/java/lang/Error.js"/>
244392

sources/net.sf.j2s.lib/j2slib/console.css

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)