Home > Enterprise >  Code intellisense is not working to JavaFX library in VSCode
Code intellisense is not working to JavaFX library in VSCode

Time:12-30

Code intellisense is only not working for JavaFX in VSCode. I developed a JavaFX application once, and intellisense was working then, but it's not working now.

build.gradle

/*
 * This file was generated by the Gradle 'init' task.
 *
 * This generated file contains a sample Java application project to get you started.
 * For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
 * User Manual available at https://docs.gradle.org/7.3/userguide/building_java_projects.html
 */

plugins {
    // Apply the application plugin to add support for building a CLI application in Java.
    id 'application'
    id "org.openjfx.javafxplugin" version "0.0.13"
}

repositories {
    // Use Maven Central for resolving dependencies.
    mavenCentral()
}

dependencies {
    // Use JUnit Jupiter for testing.
    testImplementation 'org.junit.jupiter:junit-jupiter:5.7.2'

    // This dependency is used by the application.
    implementation 'com.google.guava:guava:30.1.1-jre'

    // https://mvnrepository.com/artifact/org.openjfx/javafx

    implementation "com.github.jengelman.gradle.plugins:shadow:5.1.0"

}

application {
    // Define the main class for the application.
    mainClass = 'nicekeyboard.App'
}

tasks.named('test') {
    // Use JUnit Platform for unit tests.
    useJUnitPlatform()
}

I installed Java pack Extension and gradle extension.

CodePudding user response:

It was solved. There is a solution below.

  1. Installing eclipse plugin and OpenJFX plugin to gradle.
  2. run "gradle eclipse"

Code intellisense needs classpath as Eclipse, so the solution was effective.

  • Related