Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sources/net.sf.j2s.core/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/bin
/site/
19 changes: 10 additions & 9 deletions sources/net.sf.j2s.core/.j2s
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#j2s configuration file

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

#enable the Java2Script transpiler
#j2s.compiler.status=enable

#destination directory for all JavaScript
j2s.site.directory=site

#uncomment j2s.* lines to process:

#a semicolon-separated list of package-level file paths to be excluded
#j2s.excluded.paths=test;testng

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

#a semicolon-separated list of package-level file paths to be excluded
#j2s.excluded.paths=test;testng

#destination directory for all JavaScript
j2s.site.directory=site

3 changes: 1 addition & 2 deletions sources/net.sf.j2s.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Java2Script Core
Bundle-SymbolicName: net.sf.j2s.core;singleton:=true
Bundle-Version: 3.1.1
Bundle-Version: 3.2.1
Bundle-Activator: net.sf.j2s.core.CorePlugin
Bundle-Vendor: j2s.sourceforge.net
Require-Bundle: org.eclipse.core.runtime,
Expand All @@ -11,5 +11,4 @@ Require-Bundle: org.eclipse.core.runtime,
Eclipse-AutoStart: true
Export-Package: net.sf.j2s.core.astvisitors,
net.sf.j2s.core.compiler,
net.sf.j2s.core.hotspot,
net.sf.j2s.core
4 changes: 4 additions & 0 deletions sources/net.sf.j2s.core/doc/Differences.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Notes
=====

update 7/14/2018 -- 3.2.1 removes Java2ScriptJavaBuilder; uses CompilationParticipant instead
-- note that this change requires that the .project builder be set back to org.eclipse.jdt.core.javabuilder

updated 9/5/17 -- merge with net.sf.j2s.java.core

updated 6/5/17 -- reserved package name "window"
Expand Down
80 changes: 11 additions & 69 deletions sources/net.sf.j2s.core/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,76 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>

<!-- =================================================================================== -->
<!-- Extension Point: Extended Compiler -->
<!-- =================================================================================== -->
<extension-point name="Extended Compiler"
id="extendedCompiler"
schema="schema/extendedCompiler.exsd"/>

<!-- =================================================================================== -->
<!-- Extension Point: Extended AST Script Visitor -->
<!-- =================================================================================== -->
<extension-point name="Extended AST Script Visitor"
id="extendedASTScriptVisitor"
schema="schema/extendedASTScriptVisitor.exsd"/>

<extension
id="net.sf.j2s.core.j2scompiler"
name="Java2Script Compiler"
point="net.sf.j2s.core.extendedCompiler">
<extendedCompiler
class="net.sf.j2s.core.compiler.Java2ScriptCompiler"
id="net.sf.j2s.j2scompiler"/>
<!--
<extendedCompiler
class="net.sf.j2s.core.compiler.J2SDependencyCompiler"
id="net.sf.j2s.dependencyCompiler"/>
-->

<extension
point="org.eclipse.jdt.core.compilationParticipant">
<compilationParticipant
class="net.sf.j2s.core.compiler.Java2ScriptCompilationParticipant"
createsProblems="false"
id="Java2Script CompilationParticipant"
modifiesEnvironment="false"
requiredSourceLevel="1.6">
</compilationParticipant>
</extension>

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

<!-- =================================================================================== -->
<!-- Extension: Java Nature -->
<!-- =================================================================================== -->

<extension
point="org.eclipse.core.resources.natures"
id="java2scriptnature"
name="Java2Script Nature">
<runtime>
<run class="net.sf.j2s.core.Java2ScriptProjectNature">
</run>
</runtime>
<builder id="net.sf.j2s.core.java2scriptbuilder"/>
</extension>


<!-- =================================================================================== -->
<!-- Extension: Java Builder -->
<!-- =================================================================================== -->

<extension
point="org.eclipse.core.resources.builders"
id="java2scriptbuilder"
name="Java2Script Builder">
<builder>
<run class="net.sf.j2s.core.builder.Java2ScriptBuilder">
</run>
</builder>
</extension>
<!-- no longer used BH 12/17
<extension
id="InternalASTScriptVisitor"
name="InternalASTScriptVisitor"
point="net.sf.j2s.core.extendedASTScriptVisitor">
<extendedASTScriptVisitor
class="net.sf.j2s.core.compiler.ASTExtendedVisitor"
id="BasicASTScriptVisitor"/>
<extendedASTScriptVisitor
class="net.sf.j2s.core.compiler.SWTExtendedVisitor"
id="SWTASTScriptVisitor"/>
</extension>
-->
</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<meta.section type="since"/>
</appInfo>
<documentation>
Java2Script 3.1.1 M4
Java2Script 3.2.1 M4
</documentation>
</annotation>

Expand Down
23 changes: 16 additions & 7 deletions sources/net.sf.j2s.core/src/net/sf/j2s/core/CorePlugin.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
package net.sf.j2s.core;

import net.sf.j2s.core.hotspot.InnerHotspotServer;
//import net.sf.j2s.core.hotspot.InnerHotspotServer;

import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;

/**
* The main plugin class to be used in the desktop.
*
*/
public class CorePlugin extends Plugin {

//The shared instance.
private static CorePlugin plugin;

/**
* Note that Eclipse must be started with the -clean flag if it is to
* register the bundle version properly. So we use VERSION here instead.
*
*/
public static String VERSION = "3.2.1";

/**
* The constructor.
*/
Expand All @@ -25,9 +33,10 @@ public CorePlugin() {
*/
public void start(BundleContext context) throws Exception {
super.start(context);
if (!InnerHotspotServer.isServerStarted()) {
InnerHotspotServer.getSingletonServer().startServer();
}
System.out.println("net.sf.j2s.core." + context.getBundle().getVersion() + "/" + VERSION + " started");
// if (!InnerHotspotServer.isServerStarted()) {
// InnerHotspotServer.getSingletonServer().startServer();
// }
}

/**
Expand All @@ -36,9 +45,9 @@ public void start(BundleContext context) throws Exception {
public void stop(BundleContext context) throws Exception {
super.stop(context);
plugin = null;
if (InnerHotspotServer.isServerStarted()) {
InnerHotspotServer.getSingletonServer().stopServer();
}
// if (InnerHotspotServer.isServerStarted()) {
// InnerHotspotServer.getSingletonServer().stopServer();
// }
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class Java2ScriptProject {
*/
public static boolean hasJava2ScriptNature(IProject project) {
try {
System.out.println("Java2ScriptProject hasNature " + project.hasNature("net.sf.j2s.java2scriptnature"));
return project.hasNature("net.sf.j2s.java2scriptnature");
} catch (@SuppressWarnings("unused") CoreException e) {
if (ExternalJavaProject.EXTERNAL_PROJECT_NAME.equals(project.getName()))
Expand Down
Loading