Skip to content

Commit

Permalink
j2cl port
Browse files Browse the repository at this point in the history
  • Loading branch information
treblereel committed Jun 15, 2022
1 parent 2257ee9 commit c9f82ab
Show file tree
Hide file tree
Showing 2,852 changed files with 141,728 additions and 150,640 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ private static void injectJsYamlResources() {
.setWindow(ScriptInjector.TOP_WINDOW)
.inject();
}
}
}
137 changes: 31 additions & 106 deletions packages/serverless-workflow-diagram-editor/appformer-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,21 @@

<properties>
<sonar.skip>true</sonar.skip>
<version.com.google.gwt.gwtmockito>1.1.9</version.com.google.gwt.gwtmockito>
<version.gwtproject>202203291</version.gwtproject>
</properties>

<dependencyManagement>
<dependencies>

<dependency>
<groupId>org.treblereel.gwt.gwtproject</groupId>
<artifactId>gwt-bom</artifactId>
<version>${version.gwtproject}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<!-- appformer internal modules -->
<dependency>
<groupId>org.kie.kogito.stunner.serverless.editor</groupId>
Expand Down Expand Up @@ -240,126 +251,28 @@
<version>${project.version}</version>
</dependency>

<!-- 3rd-party dependencies -->
<dependency>
<groupId>org.kie.kogito.stunner.serverless.editor</groupId>
<artifactId>errai-cdi-client</artifactId>
<groupId>org.kie.kogito.stunner.serverless.editor.legacy</groupId>
<artifactId>compat</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>${version.javax.enterprise}</version>
<exclusions>
<exclusion>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>${version.org.eclipse.jgit}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit.http.server</artifactId>
<version>${version.org.eclipse.jgit}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- GWT and GWT Extensions -->
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${version.com.google.gwt}</version>
</dependency>

<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${version.com.google.gwt}</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.google.jsinterop</groupId>
<artifactId>base</artifactId>
<version>${version.com.google.jsinterop.base}</version>
</dependency>

<dependency>
<groupId>com.allen-sauer.gwt.dnd</groupId>
<artifactId>gwt-dnd</artifactId>
<version>${version.com.allen-sauer.gwt.dnd}</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</exclusion>
</exclusions>
<groupId>org.treblereel.j2cl.processors</groupId>
<artifactId>annotations</artifactId>
<version>${org.treblereel.j2cl.processors.version}</version>
</dependency>

<dependency>
<groupId>org.scannotation</groupId>
<artifactId>scannotation</artifactId>
<version>${version.org.scannotation}</version>
<exclusions>
<!-- Uses old javassist groupId so Maven is not able to exclude this itself. All UF modules have to use
org.javassist:javassist instead of this one. -->
<exclusion>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.google.gwt.gwtmockito</groupId>
<artifactId>gwtmockito</artifactId>
<version>${version.com.google.gwt.gwtmockito}</version>
<exclusions>
<exclusion>
<groupId>org.mortbay.jasper</groupId>
<artifactId>apache-el</artifactId>
</exclusion>
</exclusions>
<groupId>org.treblereel.j2cl.processors</groupId>
<artifactId>processors</artifactId>
<version>${org.treblereel.j2cl.processors.version}</version>
</dependency>

<!-- Byteman -->
Expand Down Expand Up @@ -470,6 +383,18 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.google.gwt.gwtmockito</groupId>
<artifactId>gwtmockito</artifactId>
<version>${version.com.google.gwt.gwtmockito}</version>
<exclusions>
<exclusion>
<groupId>org.mortbay.jasper</groupId>
<artifactId>apache-el</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@

<dependencies>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<groupId>io.crysknife</groupId>
<artifactId>crysknife-annotations</artifactId>
</dependency>

<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<groupId>com.google.jsinterop</groupId>
<artifactId>jsinterop-annotations</artifactId>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,8 @@

<dependencies>
<dependency>
<groupId>org.kie.kogito.stunner.serverless.editor</groupId>
<artifactId>errai-ioc</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.2_spec</artifactId>
</exclusion>
</exclusions>
<groupId>io.crysknife</groupId>
<artifactId>crysknife-core</artifactId>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
Expand All @@ -50,34 +43,25 @@
<dependency>
<groupId>com.google.elemental2</groupId>
<artifactId>elemental2-dom</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.elemental2</groupId>
<artifactId>elemental2-promise</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.jsinterop</groupId>
<artifactId>jsinterop-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito.stunner.serverless.editor</groupId>
<artifactId>appformer-client-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<artifactId>uberfire-api</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito.stunner.serverless.editor</groupId>
<artifactId>uberfire-api</artifactId>
<scope>provided</scope>
<artifactId>appformer-client-api</artifactId>
</dependency>

<!-- Test dependencies -->

<dependency>
<groupId>com.google.gwt.gwtmockito</groupId>
<artifactId>gwtmockito</artifactId>
Expand All @@ -87,14 +71,16 @@
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>

</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Alternative;
import javax.enterprise.inject.Specializes;

import org.appformer.client.context.Channel;
import org.appformer.client.context.EditorContextProvider;
Expand All @@ -29,6 +30,7 @@

@Alternative
@ApplicationScoped
@Specializes
public class KogitoEditorContextProviderImpl implements EditorContextProvider {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.appformer.kogito.bridge.client.context.interop;

import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;

Expand All @@ -24,7 +25,7 @@
* Provide access to the editorContext object
*
*/
@JsType(isNative = true, namespace = "window", name = "envelope")
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "envelope")
public class EditorContextWrapper {

@JsProperty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

import java.util.Optional;

import io.crysknife.client.ioc.Disposer;
import org.appformer.kogito.bridge.client.guided.tour.service.GuidedTourService;
import org.jboss.errai.ioc.client.api.Disposer;

/**
* {@link GuidedTourObserver} implementation must events and notifies the {@link GuidedTourBridge}.
Expand All @@ -46,6 +46,7 @@ protected void setMonitorBridge(final GuidedTourBridge bridge) {

@SuppressWarnings("unchecked")
protected void dispose() {
selfDisposer.dispose((T) this);
if(selfDisposer != null)
selfDisposer.dispose((T) this);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.List;

import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.enterprise.context.Dependent;

import elemental2.dom.Attr;
import elemental2.dom.DomGlobal;
Expand All @@ -31,17 +31,16 @@
import elemental2.dom.NamedNodeMap;
import org.appformer.kogito.bridge.client.guided.tour.GuidedTourObserver;
import org.appformer.kogito.bridge.client.guided.tour.service.api.UserInteraction;
import org.jboss.errai.ioc.client.api.Disposer;

import static com.google.gwt.dom.client.BrowserEvents.CLICK;
import static org.gwtproject.dom.client.BrowserEvents.CLICK;

@Dependent
public class GlobalHTMLObserver extends GuidedTourObserver<GlobalHTMLObserver> {

final EventListener CLICK_LISTENER = this::onHTMLElementEvent;

@Inject
public GlobalHTMLObserver(final Disposer<GlobalHTMLObserver> selfDisposer) {
super(selfDisposer);
public GlobalHTMLObserver() {
super(null);
}

@PostConstruct
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@

package org.appformer.kogito.bridge.client.guided.tour.service;

import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import org.appformer.kogito.bridge.client.guided.tour.service.api.Tutorial;
import org.appformer.kogito.bridge.client.guided.tour.service.api.UserInteraction;

@JsType(isNative = true, namespace = "window", name = "envelope")
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "envelope")
public class GuidedTourServiceNativeEnvelope {

public native void refresh(final UserInteraction userInteraction);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@

package org.appformer.kogito.bridge.client.guided.tour.service.api;

import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;

/**
* Native class defined into the Guided Tour component.
*/
@JsType(isNative = true)
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public interface Mode {
// empty
}
Loading

0 comments on commit c9f82ab

Please sign in to comment.