Skip to content

Commit

Permalink
Upgrade to IDEA 2024.2 and IntelliJ Platform 2.0.1
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Filotto <[email protected]>
  • Loading branch information
davsclaus and essobedo committed Sep 6, 2024
1 parent df30e3f commit 18e8360
Show file tree
Hide file tree
Showing 557 changed files with 139 additions and 162 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
version: [2023.1.7, 2023.2.7, 2023.3.7, 2024.1.6]
version: [2023.2.7, 2023.3.8, 2024.1.6, 2024.2.1]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
14 changes: 3 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
out/**
target
*.iml
*.ipr
*.iws
.idea
.idea/**
.DS_Store
workspace/**
/camel-idea-plugin.iml
test-system/**
buildingtools/build/**
/.sandbox/
**/build/
**/out/
/.gradle/*
build
.gradle
.intellijPlatform
9 changes: 0 additions & 9 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion build-all.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

for v in "2023.1.7" "2023.2.7" "2023.3.7" "2024.1.6"; do
for v in "2023.2.7" "2023.3.8" "2024.1.6" "2024.2.1"; do
./build.sh $v
done
159 changes: 118 additions & 41 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,63 +14,140 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.jetbrains.intellij.platform.gradle.TestFrameworkType

allprojects {
apply plugin: 'checkstyle'
plugins {
id 'org.jetbrains.intellij.platform' version '2.0.1'
}

checkstyle {
toolVersion = '10.11.0'
configDirectory = file("$rootProject.projectDir/config/checkstyle")
}
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'checkstyle'

group = 'com.github.camel-tooling'
version = '1.2.11'
checkstyle {
toolVersion = '10.11.0'
configDirectory = file("$rootProject.projectDir/config/checkstyle")
}

subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'

repositories {
mavenLocal()
maven {
url = 'https://repo.maven.apache.org/maven2'
mavenContent {
releasesOnly()
}
group = 'com.github.camel-tooling'
version = '1.2.11'

repositories {
mavenLocal()
maven {
url = 'https://repo.maven.apache.org/maven2'
mavenContent {
releasesOnly()
}
maven {
url "https://repository.apache.org/snapshots/"
mavenContent {
snapshotsOnly()
}
}
maven {
url "https://repository.apache.org/snapshots/"
mavenContent {
snapshotsOnly()
}
}
intellijPlatform {
defaultRepositories()
}
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

sourceCompatibility = '17'
sourceCompatibility = '17'

publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
}

test {
afterTest { desc, result ->
logger.quiet "Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}"
}
test {
afterTest { desc, result ->
logger.quiet "Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}"
}
}

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}

tasks.withType(Test).configureEach {
jvmArgs = [
// avoid JBUIScale "Must be precomputed" error, because IDE is not started (LoadingState.APP_STARTED.isOccurred is false)
'-Djava.awt.headless=true'
]
}

intellijPlatform {
pluginConfiguration {
// to support IDEA 2023.2 onwards
// http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html
ideaVersion {
sinceBuild = "232"
untilBuild = "242.*"
}
}
pluginVerification {
ides {
ide "2023.2"
ide "2023.3"
ide "2024.1"
ide "2024.2"
}
}
// publishing {
// def authenticationToken = "$System.env.INTELLIJ_TOKEN"
// token = authenticationToken
// }
}

tasks.withType(Test).configureEach {
jvmArgs = [
// avoid JBUIScale "Must be precomputed" error, because IDE is not started (LoadingState.APP_STARTED.isOccurred is false)
'-Djava.awt.headless=true'
]
dependencies {
intellijPlatform {
create(project.hasProperty('intellij_type') ? project.intellij_type : 'IC', ideaVersion)
pluginVerifier()
instrumentationTools()
bundledPlugins 'com.intellij.java', 'com.intellij.java-i18n', 'com.intellij.properties', 'org.jetbrains.plugins.yaml', 'org.jetbrains.idea.maven', 'com.intellij.gradle'
testFramework TestFrameworkType.Plugin.Java.INSTANCE
}
implementation "org.apache.camel:camel-catalog:${camelVersion}"
implementation "org.apache.camel:camel-tooling-maven:${camelVersion}"
implementation "org.apache.camel:camel-util:${camelVersion}"
implementation "org.apache.camel:camel-util-json:${camelVersion}"
implementation "org.apache.camel:camel-tooling-model:${camelVersion}"
implementation "org.apache.camel:camel-management-api:${camelVersion}"
implementation "org.apache.camel.springboot:camel-catalog-provider-springboot:${camelVersion}"
implementation "org.apache.camel.karaf:camel-catalog-provider-karaf:${camelKarafVersion}"
implementation "org.apache.camel.quarkus:camel-quarkus-catalog:${camelQuarkusVersion}"
implementation "org.apache.camel.kamelets:camel-kamelets:${camelKameletVersion}"
// Needed to avoid conflicts with the version of the maven resolver used by IntelliJ
implementation "org.apache.maven.resolver:maven-resolver-api:${mavenResolverVersion}"
implementation "org.apache.maven.resolver:maven-resolver-impl:${mavenResolverVersion}"
implementation "io.github.classgraph:classgraph:4.8.175"
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.2"
implementation "io.fabric8:kubernetes-model-apiextensions:6.13.3"

testImplementation "org.apache.camel:camel-core:${camelVersion}"
testImplementation "org.apache.camel.springboot:camel-spring-boot:${camelVersion}"
testImplementation "org.apache.camel.springboot:camel-file-starter:${camelVersion}"
testImplementation 'org.jboss.shrinkwrap:shrinkwrap-depchain:1.2.6'
testImplementation 'org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-depchain:3.3.1'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation 'org.opentest4j:opentest4j:1.3.0'
testImplementation "org.apache.camel:camel-jsonpath:${camelVersion}"
testImplementation 'junit:junit:4.13.2'
}

description = 'Apache Camel IDE :: IDEA Plugin'

tasks.withType(org.jetbrains.intellij.platform.gradle.tasks.RunIdeTask) {
jvmArgs = [
// Allow to have access to the PSI Structure...
'-Didea.is.internal=true'
]
}
87 changes: 0 additions & 87 deletions camel-idea-plugin/build.gradle

This file was deleted.

6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ camelVersion = 4.7.0
camelQuarkusVersion = 3.13.0
camelKameletVersion = 4.7.0
camelKarafVersion = 3.22.2
ideaVersion=2024.1.6
mavenResolverVersion=1.9.20
ideaVersion=2024.2.1
mavenResolverVersion=1.9.20

org.jetbrains.intellij.platform.downloadSources=true
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ Importing the project into IntelliJ as plug-in only require you choose ìmport f
#### <a name="runningwithpreviousversion"></a>Running the plug-in with a previous versions of IDEA

The plugin is tested with `IDEA 2024.1.6` or newer, but if you want to try with an older version you can follow this guide
The plugin is tested with `IDEA 2024.2` or newer, but if you want to try with an older version you can follow this guide

> - Follow the guide [build from source](#buildingfromsource)
> - Change the attribute `<idea-version since-build="231"/>` in `camel-idea-plugin/src/main/resources/META-INF/plugin.xml` to match the version. please see [document](http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html) for build number description
> - Change the attribute `<idea-version since-build="232"/>` in `camel-idea-plugin/src/main/resources/META-INF/plugin.xml` to match the version. please see [document](http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html) for build number description
> - Build the source with `./gradlew build`
> - The new plugin zip file `camel-idea-plugin-<version>-SNAPSHOT.jar` is located in `camel-idea-plugin/build/libs`
> - Install the plugin from disk in IDEA preferences
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class CamelBeanMethodReference extends PsiPolyVariantReferenceBase<PsiEle

@NotNull
@Override
public ResolveResult @NotNull [] multiResolve(boolean b) {
public ResolveResult[] multiResolve(boolean b) {
List<ResolveResult> results = new ArrayList<>();

final PsiMethod[] methodsByName = getPsiClass().findMethodsByName(methodNameOnly, true);
Expand All @@ -73,7 +73,7 @@ public class CamelBeanMethodReference extends PsiPolyVariantReferenceBase<PsiEle

@NotNull
@Override
public Object @NotNull [] getVariants() {
public Object[] getVariants() {
return new Object[0];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
*/
public abstract class CamelPsiReferenceProvider extends PsiReferenceProvider {

@NotNull
@Override
public PsiReference @NotNull [] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context) {
public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context) {
if (!element.getProject().getService(CamelService.class).isCamelProject()) {
return PsiReference.EMPTY_ARRAY;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ public void setContext(CamelDebuggerContext context) {
this.currentContext = context;
}

@NotNull
@Override
public XBreakpointHandler<?>@NotNull[] getBreakpointHandlers() {
public XBreakpointHandler<?>[] getBreakpointHandlers() {
List<XBreakpointHandler<?>> breakpointHandlers = new ArrayList<>();
final Collection<XDebugProcess> values = debugProcesses.values();
for (XDebugProcess value : values) {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<change-notes><![CDATA[
v.1.2.11
<ul>
<li>Bug fixes</li>
<li>IDEA 2024.2 supported</li>
</ul>
]]>
</change-notes>
Expand Down
File renamed without changes
File renamed without changes
Loading

0 comments on commit 18e8360

Please sign in to comment.