Code Monkey home page Code Monkey logo

Comments (4)

laurentpetit avatar laurentpetit commented on July 30, 2024

ninjudd: As far as java completion goes, I didn't consider tackling instance method completion because the instance type is unknown when you are typing the method. That's why ns-java-methods only returns static method names.

(Imported from another issue)

from clojure-complete.

laurentpetit avatar laurentpetit commented on July 30, 2024

trptcolin: For REPLy's needs, instance method completion for imported classes would be awesome. I've had it on my to-do list for awhile. Your ns-java-methods change seems right to me as well - it might already work after dropping that in.

(Imported from another issue)

from clojure-complete.

laurentpetit avatar laurentpetit commented on July 30, 2024

kotarak:As for the method completion: It could be limited to methods of import'd classes. That would be better than nothing and have a certain probability of matching.

(Imported from another issue)

from clojure-complete.

laurentpetit avatar laurentpetit commented on July 30, 2024

@ninjudd , @trptcolin , @kotarak : Indeed the fundamental problem is that the completions one would like to get are hard to get right, because there's not enough context. In my particular case of hacking Counterclockwise in Clojure, it's especially harder to work with the Eclipse API from Clojure code than from Java code where I'm accustomed to "discover API via code-completion as you go" - style.

So for this particular function, having only the prefix and the current namespace as context are far from ideal.

But I agree with Meikel and Colin that having, for a start, instance method completion for classes imported in the current namespace is better than nothing !

In the future, we may have to think about ways to gather more "context" for this style of completion : for example IDEs could try to be "smart" by "sneaking" the types of the input/output objects passed to functions during tests.

Another idea, stolen from Enclojure : give the context by having the prefix include the class imported name (or any class fully qualified name) : "String/toS" would then resolve to ".toString"

from clojure-complete.

Related Issues (16)

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.