Skip to content

Commit 63e329b

Browse files
authored
Merge pull request #31 from BobHanson/newbuilder
Newbuilder
2 parents 48e1fcd + bbee773 commit 63e329b

Some content is hidden

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

52 files changed

+645
-487
lines changed

sources/net.sf.j2s.core/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/bin
2+
/site/

sources/net.sf.j2s.core/.j2s

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
#j2s configuration file
22

3-
#uncomment j2s.* lines to process
3+
#enable the Java2Script transpiler -- comment out to disable
4+
j2s.compiler.status=enable
45

5-
#enable the Java2Script transpiler
6-
#j2s.compiler.status=enable
6+
7+
#destination directory for all JavaScript
8+
j2s.site.directory=site
9+
10+
#uncomment j2s.* lines to process:
11+
12+
#a semicolon-separated list of package-level file paths to be excluded
13+
#j2s.excluded.paths=test;testng
714

815
#output file name for logging methods declared - delete the file to regenerate a listing
916
#j2s.log.methods.declared=methodsDeclared.csv
@@ -16,9 +23,3 @@
1623
#output will be comma-separated: called method,caller class
1724
#j2s.log.all.calls=true
1825

19-
#a semicolon-separated list of package-level file paths to be excluded
20-
#j2s.excluded.paths=test;testng
21-
22-
#destination directory for all JavaScript
23-
j2s.site.directory=site
24-

sources/net.sf.j2s.core/META-INF/MANIFEST.MF

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: Java2Script Core
44
Bundle-SymbolicName: net.sf.j2s.core;singleton:=true
5-
Bundle-Version: 3.1.1
5+
Bundle-Version: 3.2.1
66
Bundle-Activator: net.sf.j2s.core.CorePlugin
77
Bundle-Vendor: j2s.sourceforge.net
88
Require-Bundle: org.eclipse.core.runtime,
@@ -11,5 +11,4 @@ Require-Bundle: org.eclipse.core.runtime,
1111
Eclipse-AutoStart: true
1212
Export-Package: net.sf.j2s.core.astvisitors,
1313
net.sf.j2s.core.compiler,
14-
net.sf.j2s.core.hotspot,
1514
net.sf.j2s.core

sources/net.sf.j2s.core/doc/Differences.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Notes
22
=====
3+
4+
update 7/14/2018 -- 3.2.1 removes Java2ScriptJavaBuilder; uses CompilationParticipant instead
5+
-- note that this change requires that the .project builder be set back to org.eclipse.jdt.core.javabuilder
6+
37
updated 9/5/17 -- merge with net.sf.j2s.java.core
48

59
updated 6/5/17 -- reserved package name "window"

sources/net.sf.j2s.core/plugin.xml

Lines changed: 11 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,18 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<?eclipse version="3.0"?>
33
<plugin>
4-
5-
<!-- =================================================================================== -->
6-
<!-- Extension Point: Extended Compiler -->
7-
<!-- =================================================================================== -->
8-
<extension-point name="Extended Compiler"
9-
id="extendedCompiler"
10-
schema="schema/extendedCompiler.exsd"/>
11-
12-
<!-- =================================================================================== -->
13-
<!-- Extension Point: Extended AST Script Visitor -->
14-
<!-- =================================================================================== -->
15-
<extension-point name="Extended AST Script Visitor"
16-
id="extendedASTScriptVisitor"
17-
schema="schema/extendedASTScriptVisitor.exsd"/>
18-
19-
<extension
20-
id="net.sf.j2s.core.j2scompiler"
21-
name="Java2Script Compiler"
22-
point="net.sf.j2s.core.extendedCompiler">
23-
<extendedCompiler
24-
class="net.sf.j2s.core.compiler.Java2ScriptCompiler"
25-
id="net.sf.j2s.j2scompiler"/>
26-
<!--
27-
<extendedCompiler
28-
class="net.sf.j2s.core.compiler.J2SDependencyCompiler"
29-
id="net.sf.j2s.dependencyCompiler"/>
30-
-->
4+
5+
<extension
6+
point="org.eclipse.jdt.core.compilationParticipant">
7+
<compilationParticipant
8+
class="net.sf.j2s.core.compiler.Java2ScriptCompilationParticipant"
9+
createsProblems="false"
10+
id="Java2Script CompilationParticipant"
11+
modifiesEnvironment="false"
12+
requiredSourceLevel="1.6">
13+
</compilationParticipant>
3114
</extension>
3215

16+
<!-- 3.2.1 now does not use a special builder. This is just for legacy code -->
3317

34-
<!-- =================================================================================== -->
35-
<!-- Extension: Java Nature -->
36-
<!-- =================================================================================== -->
37-
38-
<extension
39-
point="org.eclipse.core.resources.natures"
40-
id="java2scriptnature"
41-
name="Java2Script Nature">
42-
<runtime>
43-
<run class="net.sf.j2s.core.Java2ScriptProjectNature">
44-
</run>
45-
</runtime>
46-
<builder id="net.sf.j2s.core.java2scriptbuilder"/>
47-
</extension>
48-
49-
50-
<!-- =================================================================================== -->
51-
<!-- Extension: Java Builder -->
52-
<!-- =================================================================================== -->
53-
54-
<extension
55-
point="org.eclipse.core.resources.builders"
56-
id="java2scriptbuilder"
57-
name="Java2Script Builder">
58-
<builder>
59-
<run class="net.sf.j2s.core.builder.Java2ScriptBuilder">
60-
</run>
61-
</builder>
62-
</extension>
63-
<!-- no longer used BH 12/17
64-
<extension
65-
id="InternalASTScriptVisitor"
66-
name="InternalASTScriptVisitor"
67-
point="net.sf.j2s.core.extendedASTScriptVisitor">
68-
<extendedASTScriptVisitor
69-
class="net.sf.j2s.core.compiler.ASTExtendedVisitor"
70-
id="BasicASTScriptVisitor"/>
71-
<extendedASTScriptVisitor
72-
class="net.sf.j2s.core.compiler.SWTExtendedVisitor"
73-
id="SWTASTScriptVisitor"/>
74-
</extension>
75-
-->
7618
</plugin>

sources/net.sf.j2s.core/schema/extendedASTScriptVisitor.exsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<meta.section type="since"/>
7070
</appInfo>
7171
<documentation>
72-
Java2Script 3.1.1 M4
72+
Java2Script 3.2.1 M4
7373
</documentation>
7474
</annotation>
7575

sources/net.sf.j2s.core/src/net/sf/j2s/core/CorePlugin.java

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
package net.sf.j2s.core;
22

3-
import net.sf.j2s.core.hotspot.InnerHotspotServer;
3+
//import net.sf.j2s.core.hotspot.InnerHotspotServer;
44

55
import org.eclipse.core.runtime.Plugin;
66
import org.osgi.framework.BundleContext;
77

88
/**
99
* The main plugin class to be used in the desktop.
10+
*
1011
*/
1112
public class CorePlugin extends Plugin {
1213

1314
//The shared instance.
1415
private static CorePlugin plugin;
1516

17+
/**
18+
* Note that Eclipse must be started with the -clean flag if it is to
19+
* register the bundle version properly. So we use VERSION here instead.
20+
*
21+
*/
22+
public static String VERSION = "3.2.1";
23+
1624
/**
1725
* The constructor.
1826
*/
@@ -25,9 +33,10 @@ public CorePlugin() {
2533
*/
2634
public void start(BundleContext context) throws Exception {
2735
super.start(context);
28-
if (!InnerHotspotServer.isServerStarted()) {
29-
InnerHotspotServer.getSingletonServer().startServer();
30-
}
36+
System.out.println("net.sf.j2s.core." + context.getBundle().getVersion() + "/" + VERSION + " started");
37+
// if (!InnerHotspotServer.isServerStarted()) {
38+
// InnerHotspotServer.getSingletonServer().startServer();
39+
// }
3140
}
3241

3342
/**
@@ -36,9 +45,9 @@ public void start(BundleContext context) throws Exception {
3645
public void stop(BundleContext context) throws Exception {
3746
super.stop(context);
3847
plugin = null;
39-
if (InnerHotspotServer.isServerStarted()) {
40-
InnerHotspotServer.getSingletonServer().stopServer();
41-
}
48+
// if (InnerHotspotServer.isServerStarted()) {
49+
// InnerHotspotServer.getSingletonServer().stopServer();
50+
// }
4251
}
4352

4453
/**

sources/net.sf.j2s.core/src/net/sf/j2s/core/Java2ScriptProject.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public class Java2ScriptProject {
3131
*/
3232
public static boolean hasJava2ScriptNature(IProject project) {
3333
try {
34+
System.out.println("Java2ScriptProject hasNature " + project.hasNature("net.sf.j2s.java2scriptnature"));
3435
return project.hasNature("net.sf.j2s.java2scriptnature");
3536
} catch (@SuppressWarnings("unused") CoreException e) {
3637
if (ExternalJavaProject.EXTERNAL_PROJECT_NAME.equals(project.getName()))

0 commit comments

Comments
 (0)