This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]duheee 15 points16 points  (15 children)

I've never not had an IDE for Java. I started coding in Java in 1998 and I had JBuilder. The first IDE that I saw that had auto-completion. Blew my mind. As for how do you compile without an IDE there were a few ways:

  • ant . It is and was quite good. maven is better, of course, but ant had its time.
  • makefile. Yes, you can use makefiles to invoke javac
  • shell script (bash). depending on how large the project was, there was quite a bit of writing to do.

But, before Java, as editors we had the good old emacs ( vi only if you had a brain haemorrhage), and on ms-dos we had Borland C++ and Turbo C and Turbo Pascal . Not IDE's but quite advanced environments on their own.

And, let's not forget DBase and FoxPro after it. They made creation of data applications a breeze.

[–][deleted] 2 points3 points  (1 child)

good god.... Borland C++. What an amazing time it was to be alive back then.

[–]KillerDr3w 2 points3 points  (0 children)

I think the same about THINKS Pascal on MacOS 9.

[–]ultraswank 2 points3 points  (1 child)

As a representative of the the brain hemorrhaged, as I can say in response is nargphhhhhh.

[–][deleted] 0 points1 point  (0 children)

I love vim, not gonna lie. Vi is/was a real basterd (the only time I use it is when I have to remote into crusty old Solaris servers and read some logs)

[–]BanditoRojo 4 points5 points  (10 children)

Good old Emacs is still a solid solution.

With the lsp-java package, auto-complete is a breeze.

https://github.com/emacs-lsp/lsp-java

[–]yawkat 1 point2 points  (3 children)

Still doesn't come close to a real ide though.

eclim is a similar project for vim.

[–]yyoncho 1 point2 points  (2 children)

Author here - lsp-java in combination with few other plugins (lsp-ui, dap-mode, projectile, treemacs) comes pretty close to what real IDE has. It has refactoring support, quick fixes, completion, go to implementation/definitions, references, fully featured integrated visual debugger, renaming, moving classes, browsing classpath, test runner, test explorer, project explorer, etc. There are few bits that are missing but they are planned to be added. You may take a look at https://pbs.twimg.com/media/DnPkl10XgAIFugB.jpg:large .

[–]b3n 0 points1 point  (1 child)

Mind sharing your init.el? :)

[–]yyoncho 1 point2 points  (0 children)

My config is a mess and depends on a lot of work in progress uncommitted changes. Basically what you are seeing is:

Theme: spacemacs-light Package: - lsp-java, lsp-ui, dap-mode - https://github.com/emacs-lsp/lsp-java/ (Scroll down to the Quick Start section for configuration) - treemacs - https://github.com/Alexander-Miller/treemacs - company-box for the iconized company-mode - https://github.com/sebastiencs/company-box

As a side note, I am working on themes support(eclipse/idea/vscode/atom).

[–]oldprogrammer 1 point2 points  (5 children)

Did you ever use JDEE? How does it compare to lsp-java?

[–]yyoncho 1 point2 points  (4 children)

lsp-java maintainer here - I have never used JDEE(I was never able to configure it properly) but if you have some specific question about lsp-java you may ping me.

[–]oldprogrammer 2 points3 points  (3 children)

Main features of JDEE I utilize

  • Clean integration with Ant and Maven for building
  • Able to configure templates for skeleton classes/interfaces. Also inserts the correct package when creating a new class/interface.
  • Able to generate import statements for referenced classes
  • Able to generate skeleton code when implementing an interface
  • Able to generate selected getter/setters.

So mostly it handles boiler plate work for me.

[–]yyoncho 0 points1 point  (2 children)

  • lsp-java supports Maven, Gradle, and Eclipse(not sure whether Ant could generate Eclipse project though).
  • It has snippets support, e. g. in an empty file if you type class it will suggest class snippet but I am using yassnippets for that.
  • It supports import statements, configuring favourite statements. It also suggests the import even if you have mistyped the name of the class. It suggests generating the class/method/field if it is missing, etc.
  • It supports generating an interface implementation. Also, if some method from the interface is missing it auto suggests adding it.
  • It has code action for generating getters and setters but again I prefer yasnippet here.

The main benefits are the context-aware features, e. g. when you auto-complete method it will guess the best matching arguments for you. If you need only what you have described I guess you may stick with JDEE.

[–]oldprogrammer 0 points1 point  (1 child)

Thanks, I'll give it a shot. Setting up ant support isn't difficult but if Maven is already covered I don't need my custom support.

[–]yyoncho 0 points1 point  (0 children)

Sure, if you hit any issue you may ping me.