Git Product home page Git Product logo

Comments (5)

testforstephen avatar testforstephen commented on July 18, 2024 1

The lightweight mode ("java.server.launchMode": "LightWeight") can satisfy your need. It can provide reference navigation between your own source code, but it doesn't cover the dependencies.

from eclipse.jdt.ls.

snjeza avatar snjeza commented on July 18, 2024

@ethan-vanderheijden Could you attach a project example?

from eclipse.jdt.ls.

ethan-vanderheijden avatar ethan-vanderheijden commented on July 18, 2024
my_project
│   pom.xml
│   
└───src
    └───main
        └───java
            └───my_package
                    Foo.java

Foo.java and pom.xml can both be empty. Disable "java.import.maven.enabled" and run "Java: Clean Java Language Server Workspace". Then, open up Foo.java and you should see the yellow squiggle saying this is a non-project file.

You can force the project to be imported as a standard project in two ways:

  • rename "pom.xml" to anything else
  • create a java file at the project root

If it is supposed to fall back on the standard importer when the maven/gradle importer is disabled, I think the fix is as simple as checking if maven/gradle is disabled here:

return container.append(MavenProjectImporter.POM_FILE).toFile().exists()
|| container.append(GradleProjectImporter.BUILD_GRADLE_DESCRIPTOR).toFile().exists()
|| container.append(GradleProjectImporter.SETTINGS_GRADLE_DESCRIPTOR).toFile().exists()
|| container.append(GradleProjectImporter.BUILD_GRADLE_KTS_DESCRIPTOR).toFile().exists()
|| container.append(GradleProjectImporter.SETTINGS_GRADLE_KTS_DESCRIPTOR).toFile().exists();

from eclipse.jdt.ls.

testforstephen avatar testforstephen commented on July 18, 2024

I don't think this is a typical scenario. The question is why you want to use InvisibleProjectImporter to import your project instead of Maven importer?

from eclipse.jdt.ls.

ethan-vanderheijden avatar ethan-vanderheijden commented on July 18, 2024

We don't support Maven projects in our environment, and I was caught a little off guard when disabling Maven turned everything into non-project files. At first, I thought that falling back to the invisible project importer would allow some language features (e.g. resolving references between files) to start working again, but in retrospect, this doesn't make much sense. After all, if I turn off Maven projects, I should expect that they aren't supported.

from eclipse.jdt.ls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.