kelemen / netbeans-gradle-project

This project is a NetBeans plugin able to open Gradle based Java projects. The implementation is based on Geertjan Wielenga's plugin.
173 stars 57 forks source link

autocomplete not working inside jsp files #423

Open FRe34 opened 5 years ago

FRe34 commented 5 years ago

i have the same problem No autocompletion support for JSPs. Workaround: add WEB-INF to sourceSets.main.java.srcDir except i can't solve mine

as the title says .auto complete is not working inside jsp files. even after i add src/main/webapp/WEB-INF directory to the sourceSets . i have seen some people who has the same problem and they solved it by doing so , my build.gradle file

apply plugin: 'war' 
apply from: 'https://raw.github.com/gretty-gradle-plugin/gretty/master/pluginScripts/gretty.plugin'

repositories {
    mavenCentral()
    jcenter()
}

dependencies {

    compile group: 'javax.servlet', name: 'jstl', version: '1.2'
    compile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
    compile group: 'org.springframework', name: 'spring-webmvc', version: '5.1.0.RELEASE'
    compile group: 'org.hibernate', name: 'hibernate-validator', version: '5.1.3.Final'
}

if (project.hasProperty('evaluatingIDE') && project.property('evaluatingIDE') == 'NetBeans') {
    sourceSets.main.java.srcDir(webAppDir.toString()+'/WEB-INF')
}

and this is my directory tree

src
├── main
│   ├── java
│   │   └── com
│   │       └── fre34
│   │           └── spring_mvc_test
│   │               ├── config
│   │               │   ├── MyAppInitilizer.java
│   │               │   ├── RootConfig.java
│   │               │   └── WebConfig.java
│   │               ├── user
│   │               │   └── User.java
│   │               └── web
│   │                   └── UserController.java
│   ├── resources
│   └── webapp
│       └── WEB-INF
│           └── views
│               └── newjsp.jsp
└── test
├── java
└── resources

environment info gradle plugin v2.0.2 gradle javaee support plugin v1.0.3

Product Version: Apache NetBeans IDE 10.0 (Build incubator-netbeans-release-380-on-20181217)
Updates: Updates available to version , NetBeans 8.2 Patch 2
Java: 1.8.0_191; OpenJDK 64-Bit Server VM 25.191-b12
Runtime: OpenJDK Runtime Environment 1.8.0_191-8u191-b12-0ubuntu0.16.04.1-b12
System: Linux version 4.4.0-21-generic running on amd64; UTF-8; en_US (nb)
kelemen commented 5 years ago

I don't intend that this plugin directly provides support for EE. That is, this is intended to be a core support, and other support should be added by separate plugins, like the EE plugin.