Skip to content

Commit 8ee6014

Browse files
committed
Upgraded to latest JsInterops
1 parent fbc6af2 commit 8ee6014

File tree

6 files changed

+22
-12
lines changed

6 files changed

+22
-12
lines changed

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
<plugin>
110110
<groupId>net.ltgt.gwt.maven</groupId>
111111
<artifactId>gwt-maven-plugin</artifactId>
112-
<version>1.0-rc-2</version>
112+
<version>1.0-rc-4</version>
113113
<extensions>true</extensions>
114114
<configuration>
115115
<devMode>false</devMode>
@@ -118,23 +118,23 @@
118118
<arg>-runStyle</arg>
119119
<arg>Manual:1</arg>
120120
<arg>-XjsInteropMode</arg>
121-
<arg>JS</arg>
121+
<arg>JS_RC</arg>
122122
</testArgs>
123123
<startupUrls>
124124
<startupUrl>processingjsgwtsample/index.html</startupUrl>
125125
</startupUrls>
126126
<compilerArgs>
127127
<compilerArg>-XjsInteropMode</compilerArg>
128-
<compilerArg>JS</compilerArg>
128+
<compilerArg>JS_RC</compilerArg>
129129
</compilerArgs>
130130
<devmodeArgs>
131131
<arg>-XjsInteropMode</arg>
132-
<arg>JS</arg>
132+
<arg>JS_RC</arg>
133133
<devmodeArg>-incremental</devmodeArg>
134134
</devmodeArgs>
135135
<codeserverArgs>
136136
<arg>-XjsInteropMode</arg>
137-
<arg>JS</arg>
137+
<arg>JS_RC</arg>
138138
<arg>-incremental</arg>
139139
</codeserverArgs>
140140
<moduleName>${gwt.module}</moduleName>

processingjs-gwt-sample/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
<dependency>
4949
<groupId>com.google.gwt</groupId>
5050
<artifactId>gwt-dev</artifactId>
51-
<scope>provided</scope>
5251
</dependency>
5352
<dependency>
5453
<groupId>com.github.timeu.gwt-libs.processingjs-gwt</groupId>

processingjs-gwt-sample/src/main/java/sample/client/SampleEntryPoint.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,19 @@
1919
import com.github.timeu.gwtlibs.processingjsgwt.client.ProcessingInstance;
2020
import com.google.gwt.core.client.EntryPoint;
2121
import com.google.gwt.core.client.GWT;
22-
import com.google.gwt.core.client.js.JsType;
2322
import com.google.gwt.resources.client.ClientBundle;
2423
import com.google.gwt.resources.client.ExternalTextResource;
2524
import com.google.gwt.user.client.ui.RootPanel;
25+
import jsinterop.annotations.JsPackage;
26+
import jsinterop.annotations.JsType;
2627

2728
/**
2829
* Initializes the application. Nothing to see here: everything interesting
2930
* happens in the presenters.
3031
*/
3132
public class SampleEntryPoint implements EntryPoint {
3233

33-
@JsType
34+
@JsType(isNative = true)
3435
public interface MyCustomInstance extends ProcessingInstance {
3536
String testMethod(String msg);
3637
}

processingjs-gwt/processingjs-gwt.iml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3+
<component name="FacetManager">
4+
<facet type="gwt" name="GWT">
5+
<configuration>
6+
<setting name="compilerMaxHeapSize" value="1024" />
7+
<setting name="gwtScriptOutputStyle" value="DETAILED" />
8+
<setting name="gwtSdkUrl" value="file://" />
9+
</configuration>
10+
</facet>
11+
</component>
312
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
413
<output url="file://$MODULE_DIR$/target/classes" />
514
<output-test url="file://$MODULE_DIR$/target/test-classes" />

processingjs-gwt/src/main/java/com/github/timeu/gwtlibs/processingjsgwt/client/ProcessingInstance.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
package com.github.timeu.gwtlibs.processingjsgwt.client;
22

3-
import com.google.gwt.core.client.js.JsType;
43

4+
import jsinterop.annotations.JsPackage;
5+
import jsinterop.annotations.JsType;
56

67
/**
78
* ProcessingInstance is the base class that is used to interface with the ProcessingJS sketch.
89
* Every ProcessingJS sketch has some default methods (draw, setup, etc)
910
* Users should create their own custom interface extending ProcessingInstance and define the API methods
1011
* similar to draw and size. The custom interface must be annotated with {@link @JsType}
1112
*/
12-
@JsType
13+
@JsType(isNative = true,namespace = JsPackage.GLOBAL,name="Processing")
1314
public interface ProcessingInstance {
1415

1516
/**

processingjs-gwt/src/test/java/com/github/timeu/gwtlibs/processingjsgwt/client/ProcessingTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.github.timeu.gwtlibs.processingjsgwt.client;
22

3-
import com.google.gwt.core.client.js.JsType;
43
import com.google.gwt.junit.client.GWTTestCase;
54
import com.google.gwt.user.client.ui.RootPanel;
5+
import jsinterop.annotations.JsType;
66

77

88
/**
@@ -11,7 +11,7 @@
1111

1212
public class ProcessingTest extends GWTTestCase {
1313

14-
@JsType
14+
@JsType(isNative = true)
1515
public interface MyProcessingInstance extends ProcessingInstance {
1616
String testMethod(String msg);
1717
}

0 commit comments

Comments
 (0)