Skip to content

Commit c54dff3

Browse files
hansonrhansonr
authored andcommitted
switching to CompilationParticipant 2/2
1 parent 48e1fcd commit c54dff3

Some content is hidden

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

48 files changed

+605
-468
lines changed

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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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/plugin.xml

Lines changed: 10 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,16 @@
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

33-
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-
-->
7616
</plugin>

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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;
@@ -25,9 +25,10 @@ public CorePlugin() {
2525
*/
2626
public void start(BundleContext context) throws Exception {
2727
super.start(context);
28-
if (!InnerHotspotServer.isServerStarted()) {
29-
InnerHotspotServer.getSingletonServer().startServer();
30-
}
28+
System.out.println("Java2Script CorePlugin started");
29+
// if (!InnerHotspotServer.isServerStarted()) {
30+
// InnerHotspotServer.getSingletonServer().startServer();
31+
// }
3132
}
3233

3334
/**
@@ -36,9 +37,9 @@ public void start(BundleContext context) throws Exception {
3637
public void stop(BundleContext context) throws Exception {
3738
super.stop(context);
3839
plugin = null;
39-
if (InnerHotspotServer.isServerStarted()) {
40-
InnerHotspotServer.getSingletonServer().stopServer();
41-
}
40+
// if (InnerHotspotServer.isServerStarted()) {
41+
// InnerHotspotServer.getSingletonServer().stopServer();
42+
// }
4243
}
4344

4445
/**

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)