Skip to content

Commit 822aef5

Browse files
author
sebastigurin
committed
initial plugin contribution
1 parent d90d5c8 commit 822aef5

126 files changed

Lines changed: 4683 additions & 0 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.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Manifest-Version: 1.0
2+
Bundle-ManifestVersion: 2
3+
Bundle-Name: net.sf.j2s.doc.user-guide
4+
Bundle-SymbolicName: net.sf.j2s.doc.user-guide;singleton:=true
5+
Bundle-Version: 1.0.0.qualifier
6+
Bundle-Activator: net.sf.j2s.doc.Activator
7+
Require-Bundle: org.eclipse.ui,
8+
org.eclipse.core.runtime
9+
Bundle-ActivationPolicy: lazy
10+
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
11+
Bundle-Vendor: Sebastián Gurin @ Java2Script
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Java2Script user guide
2+
3+
Written in Docbook. With support for eclipse help format,
4+
toc.xml automatic generation from docbook. See j2s-user-guide/build.xml
5+
6+
This project is an eclipse plugin that contains the sources of the guide, and
7+
also the eclipse help extension that "publish" the guide in eclipse help system.
8+
9+
@author: Sebastián Gurin.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source.. = src/
2+
output.. = bin/
3+
bin.includes = META-INF/,\
4+
.
97.5 KB
Binary file not shown.
2.96 MB
Binary file not shown.

incubator/net.sf.j2s.doc.user-guide/html/app-fdl.html

Lines changed: 443 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Appendix&nbsp;A.&nbsp;J2S Java Emulation API</title><meta content="DocBook XSL Stylesheets V1.75.2" name="generator"><link rel="home" href="index.html" title="Java2Script User's Guide"><link rel="up" href="index.html" title="Java2Script User's Guide"><link rel="prev" href="ch11s05.html" title="Exporting the plugin"><link rel="next" href="java-runtime-emulation-api.html" title="Java Runtime Emulation API"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="appendix" title="Appendix&nbsp;A.&nbsp;J2S Java Emulation API"><div class="titlepage"><div><div><h2 class="title"><a name="app-java-emulation-api"></a>Appendix&nbsp;A.&nbsp;J2S Java Emulation API</h2></div></div></div><div class="epigraph"><p>
2+
Any sufficiently advanced technology is indistinguishable from magic.
3+
</p><div class="attribution"><span>&mdash;<span class="attribution">Arthur C. Clarke</span></span></div></div><p>In this section we will examine Java2Script support for java emulation. When you include the j2slib.z.js script in your html documents
4+
Java2Script provides 2 types of APIs: </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p title="Java Language API"><b>Java Language API.&nbsp;</b>. As we have seen in .js generated files, the object <code class="code">Clazz</code> contains
5+
methods for that emulates the java language leting the javascript programmer to declare java elements like package, classes, methods and so on.
6+
</p></li><li class="listitem"><p title="Java Runtime API"><b>Java Runtime API.&nbsp;</b>. As we have seen in the html files generated by Java2Script when we run a J2S application,
7+
the <code class="code">ClazzLoader</code> object contains an API for configuring the java runtime, for example, leting the javascript programmer configure the
8+
"java classpath", loading a set of classes and executing some java code when those classes are available.
9+
</p></li></ul></div><p>In this chapter we try to document the relevant API functions of this two javascript objects.</p><div class="section" title="Java Language Emulation API"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="java-language-emulation-api"></a>Java Language Emulation API</h2></div></div></div><p>When including the script j2slib.z.js, there will be available the object Clazz that contains functions for "doing java" in javascript.
10+
We have already examine this kind of JavaScript code generated by J2S in <a class="xref" href="chap-java-to-js-translation.html#examining-generated-js-files" title="Examining generated javascript files">the section called &ldquo;Examining generated javascript files&rdquo;</a>. </p><p>a lot of documentation is at http://j2s.sourceforge.net/articles/oop-in-js-by-j2s.html.
11+
TODO: include that in this section???</p><h3><a name="N107A5"></a>Clazz.defineMethod = function (clazzThis, funName, funBody, funParams)</h3><p>define a java method. the doc says:</p><pre class="programlisting">
12+
/*
13+
* Define method for the class with the given method name and method
14+
* body and method parameter signature.
15+
*
16+
* @param clazzThis host class in which the method to be defined
17+
* @param funName method name
18+
* @param funBody function object, e.g function () { ... }
19+
* @param funParams paramether signature, e.g ["string", "number"]
20+
* @return method of the given name. The method may be funBody or a wrapper
21+
* of the given funBody.
22+
*/
23+
/* public */
24+
Clazz.defineMethod = function (clazzThis, funName, funBody, funParams)
25+
26+
example defining an instance method:
27+
TODO
28+
29+
example defining a class method:
30+
TODO
31+
</pre></div></div></body></html>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Java2Script User's Guide</title><meta content="DocBook XSL Stylesheets V1.75.2" name="generator"><meta name="description" content="This document is for Java programmers who want to start programming its web applications in Java language using Java to JavaScript compiler Java2Script ."><link rel="home" href="index.html" title="Java2Script User's Guide"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><h1>Java2Script User's Guide</h1><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="chap-about-this-document.html">1. About this document</a></span></dt><dt><span class="chapter"><a href="chap-intro.html">2. Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="chap-intro.html#sec-what-is-java2script">What is Java2Script?</a></span></dt><dt><span class="section"><a href="sect-demos.html">Demonstrations</a></span></dt><dt><span class="section"><a href="comparing-j2s-with-similar-techs.html">Comparing Java2Script to other similar technologies</a></span></dt></dl></dd><dt><span class="chapter"><a href="chap-getting-started.html">3. Getting Started</a></span></dt><dd><dl><dt><span class="section"><a href="chap-getting-started.html#sec-simple-j2s-app">A simple Java2Script application</a></span></dt><dt><span class="section"><a href="configuring-j2s-app-launcher.html">Configuring your Java2Script application launcher.</a></span></dt></dl></dd><dt><span class="chapter"><a href="chap-java-to-js-translation.html">4. Code Translation</a></span></dt><dd><dl><dt><span class="section"><a href="chap-java-to-js-translation.html#examining-generated-js-files">Examining generated javascript files</a></span></dt><dt><span class="section"><a href="executing-java-from-html.html">Doing java in HTML documents</a></span></dt><dt><span class="section"><a href="chap-java-to-js-translation-sec-types.html">Types</a></span></dt><dt><span class="section"><a href="chap-java-to-js-translation-sec-exceptions.html">Exceptions</a></span></dt></dl></dd><dt><span class="chapter"><a href="chap-j2s-plugin.html">5. The J2S plugin</a></span></dt><dd><dl><dt><span class="section"><a href="chap-j2s-plugin.html#chap-j2s-plugin-sec-project">Java2Script project</a></span></dt><dt><span class="section"><a href="chap-j2s-plugin-sec-compiler.html">J2S Java to JavaScript compiler</a></span></dt><dd><dl><dt><span class="section"><a href="chap-j2s-plugin-sec-compiler.html#N103B9">Compiler configuration</a></span></dt></dl></dd><dt><span class="section"><a href="rer.html">Application launching</a></span></dt><dd><dl><dt><span class="section"><a href="rer.html#lk">Using templates</a></span></dt></dl></dd><dt><span class="section"><a href="ch05s04.html">Debugging</a></span></dt><dd><dl><dt><span class="section"><a href="ch05s04.html#N103D5">JavaScript ClassLoader and Hotspot</a></span></dt></dl></dd><dt><span class="section"><a href="ch05s05.html">Command line API</a></span></dt></dl></dd><dt><span class="chapter"><a href="chap-java-support.html">6. Java Support</a></span></dt><dd><dl><dt><span class="section"><a href="chap-java-support.html#N1043C">Using unsupported java classes</a></span></dt><dt><span class="section"><a href="ch06s02.html">JRE Emulation Reference</a></span></dt><dt><span class="section"><a href="java-packages-lang.html">Package java.lang</a></span></dt><dd><dl><dt><span class="section"><a href="java-packages-lang.html#java-packages-lang-annotation">Package java.lang.annotation</a></span></dt><dt><span class="section"><a href="java-packages-lang.html#java-packages-lang-reflect">Package java.lang.reflect</a></span></dt></dl></dd><dt><span class="section"><a href="java-packages-io.html">Package java.io</a></span></dt><dt><span class="section"><a href="java-packages-util.html">Package java.util</a></span></dt><dt><span class="section"><a href="java-packages-util-regex.html">Package java.util</a></span></dt></dl></dd><dt><span class="chapter"><a href="chap-integrated-libs.html">7. Integrated Java libraries</a></span></dt><dd><dl><dt><span class="section"><a href="chap-integrated-libs.html#N104CE">Java2Script SWT</a></span></dt><dt><span class="section"><a href="ch07s02.html">Java2Script AJAX</a></span></dt></dl></dd><dt><span class="chapter"><a href="using-j2s-compiler-directives.html">8. Customizing output code with @j2s JavaDoc tags and annotations</a></span></dt><dd><dl><dt><span class="section"><a href="using-j2s-compiler-directives.html#N104F9">Using @j2s tags in JavaDoc</a></span></dt><dt><span class="section"><a href="section-writing-native-js-code-with-j2snative.html">Writing native JavaScript code with @j2sNative</a></span></dt><dt><span class="section"><a href="ch08s03.html">Using real Java annotations instead JavaDoc for @j2s</a></span></dt></dl></dd><dt><span class="chapter"><a href="working-with-native-code.html">9. Working With native code</a></span></dt><dd><dl><dt><span class="section"><a href="working-with-native-code.html#N105A4">Native Objects</a></span></dt><dt><span class="section"><a href="ch09s02.html">Accessing native JavaScript objects from Java</a></span></dt><dt><span class="section"><a href="ch09s03.html">Native objects mode support</a></span></dt></dl></dd><dt><span class="chapter"><a href="chap-client-server-comunicacion.html">10. Client - Server communication</a></span></dt><dd><dl><dt><span class="section"><a href="chap-client-server-comunicacion.html#N105E0">ajax</a></span></dt><dt><span class="section"><a href="ch10s02.html">Simple RPC</a></span></dt><dt><span class="section"><a href="ch10s03.html">Simple pipe / commet</a></span></dt></dl></dd><dt><span class="chapter"><a href="chap-j2s-sources.html">11. Getting started with Java2Script sources</a></span></dt><dd><dl><dt><span class="section"><a href="chap-j2s-sources.html#N1060B">Getting Java2Script sources</a></span></dt><dd><dl><dt><span class="section"><a href="chap-j2s-sources.html#N10612">Install Eclipse 3.6 and Java2Script plugin</a></span></dt><dt><span class="section"><a href="chap-j2s-sources.html#N10627">Install SVN support</a></span></dt><dt><span class="section"><a href="chap-j2s-sources.html#N10652">Import Java2Script sources</a></span></dt></dl></dd><dt><span class="section"><a href="section-j2s-sources-organization.html">Source organization</a></span></dt><dt><span class="section"><a href="ch11s03.html">Building the sources</a></span></dt><dt><span class="section"><a href="ch11s04.html">Running and debugging</a></span></dt><dt><span class="section"><a href="ch11s05.html">Exporting the plugin</a></span></dt></dl></dd><dt><span class="appendix"><a href="app-java-emulation-api.html">A. J2S Java Emulation API</a></span></dt><dd><dl><dt><span class="section"><a href="app-java-emulation-api.html#java-language-emulation-api">Java Language Emulation API</a></span></dt><dt><span class="section"><a href="java-runtime-emulation-api.html">Java Runtime Emulation API</a></span></dt></dl></dd><dt><span class="appendix"><a href="app-fdl.html">B. GNU Free Documentation License</a></span></dt></dl></div><div class="list-of-figures"><p><b>List of Figures</b></p><dl><dt>2.1. <a href="chap-intro.html#N1009F">Comparing Java2Script and Java JDK roles</a></dt><dt>2.2. <a href="chap-intro.html#N100C2">Java2Script architecture diagram</a></dt><dt>3.1. <a href="chap-getting-started.html#N10197">Creating a new Java2Script application project</a></dt><dt>3.2. <a href="chap-getting-started.html#N101C2">Launch a Java2Script application</a></dt><dt>3.3. <a href="chap-getting-started.html#N101CC">Launch a Java2Script application - the J2S Console view</a></dt><dt>3.4. <a href="configuring-j2s-app-launcher.html#N101FA">Launch a Java2Script application - the J2S Console view</a></dt><dt>3.5. <a href="configuring-j2s-app-launcher.html#N10213">Launch a Java2Script application - the J2S Console view</a></dt><dt>3.6. <a href="configuring-j2s-app-launcher.html#N10232">Launch a Java2Script application - the J2S Console view</a></dt><dt>4.1. <a href="chap-java-to-js-translation.html#N10265">Concepts from both languages and what J2S takes from both worlds</a></dt><dt>4.2. <a href="executing-java-from-html.html#N10331">A clean J2S Application launcher configuration</a></dt><dt>5.1. <a href="ch05s04.html#N103E5">Debug As... Java2Script application context menu</a></dt><dt>5.2. <a href="ch05s04.html#N103EF">HotSpot debugging the application - first screenshot</a></dt><dt>5.3. <a href="ch05s04.html#N10401">HotSpot debugging the application - application change notification</a></dt><dt>5.4. <a href="ch05s04.html#N1040B">HotSpot debugging the application - changes were applied</a></dt><dt>8.1. <a href="using-j2s-compiler-directives.html#N1051C">@j2s annotations eclipse auto completion menu</a></dt><dt>11.1. <a href="chap-j2s-sources.html#N10634">Installing Eclipse Marketplace client</a></dt><dt>11.2. <a href="chap-j2s-sources.html#N1063E">Open Eclipse Marketplace</a></dt><dt>11.3. <a href="chap-j2s-sources.html#N10648">search for subclipse</a></dt><dt>11.4. <a href="chap-j2s-sources.html#N10657">Import sources from SVN repository</a></dt><dt>11.5. <a href="chap-j2s-sources.html#N10672">Import sources from SVN repository</a></dt><dt>11.6. <a href="chap-j2s-sources.html#N1068D">Import sources from SVN repository</a></dt><dt>11.7. <a href="chap-j2s-sources.html#N10697">Import sources from SVN repository</a></dt><dt>11.8. <a href="section-j2s-sources-organization.html#N106E7">Packing j2slib</a></dt><dt>11.9. <a href="ch11s03.html#N10738">Running the Java2Script Eclipse plugin</a></dt><dt>11.10. <a href="ch11s04.html#N1075F">Running the Java2Script Eclipse plugin</a></dt><dt>11.11. <a href="ch11s04.html#N1076B">A breakpoint in some Java to JavaScript compiler class:</a></dt></dl></div></body></html>

0 commit comments

Comments
 (0)