Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.acrolinx:acrolinx-sidebar-demo-java:0.10.0'
}
dependencies {
implementation("com.github.acrolinx:acrolinx-sidebar-demo-java:0.10.0")
}
<dependency>
<groupId>com.github.acrolinx</groupId>
<artifactId>acrolinx-sidebar-demo-java</artifactId>
<version>0.10.0</version>
</dependency>
libraryDependencies += "com.github.acrolinx" % "acrolinx-sidebar-demo-java" % "0.10.0"
:dependencies [[com.github.acrolinx/acrolinx-sidebar-demo-java "0.10.0"]]
This is a showcase for integrating the Acrolinx Sidebar into different Java UI framework-based applications (JFX, Swing, and SWT).
See: Build With Acrolinx
The Acrolinx Sidebar is designed to show up beside the window where you edit your content. You use it for checking, reviewing, and correcting your content. To get an impression what the Sidebar looks like in existing integrations, have a look at Sidebar Quick Start.
Please contact Acrolinx SDK support for consulting and getting your integration certified.
This sample works with a test license on an internal Acrolinx URL. This license is only meant for demonstration and developing purposes. Once you finished your integration, you'll have to get a license for your integration from Acrolinx.
Before you start developing your own integration, you might benefit from looking into:
./gradlew build
on an UNIX system, or
gradlew build
on a Windows computer.
Build the project first, then run:
./gradlew sidebar-demo-jfx:run
./gradlew sidebar-demo-swing:run
./gradlew sidebar-demo-swt:run
This project uses the Gradle plugin for JavaFX. Please have a look at the OpenJFX documentation.
To be able to connect to Acrolinx, you might have to enable CORS on the Java VM:
java -Dsun.net.http.allowRestrictedHeaders=true ...
Or via code:
System.setProperty("sun.net.http.allowRestrictedHeaders", "true");
Cross-Origin Resource Sharing, must be enabled on the Acrolinx Platform as well.