senny/emacs-eclim

Java Classpath Commands *Feature*

Closed this issue · 14 comments

gopar commented

Be able to edit the classpath file, eclim in VIM already has the ability of doing this. I plan on doing this with my free time or if anyone is faster than me then go right ahead :D

One question I do have is that eclim has this in a different section, so should the project have file just for these type of commands (eclim-java-classpath.el or eclim-classpath.el)? Any info on how to get started would be appreciated

gopar commented

Have a draft of a draft here: master...gopar:issue225

That was fast... Mr, you seem to have quite a lot of free time

I'll take a look of course

gopar commented

Haha some days yes and others not so much. Also its just one command right now. Just wanted to know how you guys would like it structured.

I'm not an elisp expert but I can give it a try

I think classpath-quit could be just kill-buffer so you don't have to have function there.
If you already use switch-to-buffer I think you don't have to use with-current-buffer cause there's no point of it. The answer might be named better, cause right now it's rather not descriptive (especially that there's no question anywhere). In general maybe it's good idea to create major-mode. Take a look how major-mode is created in eclim-problems.el.

Usually that's how review in my team looks like. More or less. 🐼

gopar commented

Scanning over the eclim files. Found these four functions already defined. Should I import them and use them to just grab the input they provide? Or move them to my file? They don't seem to be used anywhere except for one instance in the eclim-debug
Also my "a lot of free time" ends tomorrow for a couple of days :P

If they're about classpath then it's better to move them to the file that suggest that classpath related stuff is there

gopar commented

Hmmm this is weird. I can't find the command for calling NewVarEntry. It looks like it's implemented using vimscript (I think that's what it's called). Is there a way to call functions like that from emacs?

gopar commented

Wanted to give a heads up that I added some more code. Also, since I took the recommendation about creating a major-mode for the buffer, I have no way of finding out what current project the user is in. The reason why I want to know this is to add/delete variables and src directories right from the buffer. But in order to do that I need to know the current project.
I was thinking of creating a variable to hold the project whenever the buffer was created and just pass that around as needed. What do you guys think of that? Or did I overlook some function that would return the current project? I already tried eclim-project-name and some others

Can you show some code? I think I'm better when I can take a look at something

From what I know eclim-project-name should be what you're looking for... but maybe I misunderstood what you wrote.

gopar commented

Oops, forgot to add link. master...gopar:issue225

@gopar you're saying that eclim-project-name is set to nil? We have some problems with it #232

Check this PR. It should fix all issues with eclim-project-name. I hope it'll resolve your problem as well.