Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #244. Added eclim-run-configuartion. #256

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

Fixes #244. Added eclim-run-configuartion. #256

wants to merge 28 commits into from

Conversation

nloyola
Copy link

@nloyola nloyola commented Oct 30, 2015

Runs a configuration in the compilation buffer.

nloyola and others added 28 commits November 7, 2015 15:41
Runs a configuration in the compilation buffer.
eclim-java-generate-getter generates a getter method for the symbol at point.
Allows moving a top level class or interface from one package to another.
Added eclim-project-setting-set which can assign an Eclim project
setting.
…mode.

Otherwise a bad Eclipse state can cause an Emacs session to get very
unpleasant. I'm not sure exactly what the mechanism is, but basic stuff
like find-file, switch-buffer and *the M-x prompt* (of all things) stop
working with the Eclipse error.

To reproduce, define eclim--project-dir to (error something), then open a
managed Java file not already open. Have the real eclim--project-dir ready;
fortunately, eval-expression still works.

The user can run eclim-mode manually if they want to investigate the error,
or try to do anything that needs project-dir.  I think even printing a
message would still be too unpleasant in that state, hence ignore.
…icator.

When we save, a lot of different messages zip by in the minibuffer and create a
distraction. Instead, a '*' in the modeline right by the error counts that are
about to be updated is discreet but noticeable. Removed an extraneous space.
This version fits my typical compilation-based workflow better than the
problems buffer.

* Fix an errant call to eclim--project-dir.

* Fix the counting of errors/warnings. Errors apparently get 'warning =
":json-false", not nil.

* Store the project-name in the buffer. This allows it to be called from
within itself ("refreshed") easily.

* Bind the standard "g" key to do just that. Otherwise compilation-mode will
happily start a new shell make that confuses eclipse (in my config).

* Use the standard "process status" part of the modeline to display
"refreshing" / results, the latter in red if there are errors.

* The local variables header text is unnecessary if we set it programatically.

* Instead, put the result text at beginning as well and tag with time.

* Try to not reposition the buffer upon refresh if possible.

Note that I don't think we should make compilation-buffer refresh automatically
when we get an updated list, even though it's quite easy. Other compilations
stay unchanged until manually refreshed and uniformity is nice.
…t file.

These are entirely cursor based rather than dependent on position in the
problems-buffer. They are intended to be navigational aids in the absence
of Eclipse's scroll bar indicators, which we can't do in emacs. Otherwise,
errors in long files can be hard to find.
This helps on Macbook. It's consistent with help-mode, for example.
Eclipse changed the relevant option to apply to camelCase only, and when
completing a variable we get a *huge* selection of all classes that begin
with that prefix. Try completing a variable that starts with "re" for example.
Eclimd's sorting is not particularly good, either -- in Eclipse at least we
get the lowercase matches first.

Company-mode's view is that the backend is responsible for ensuring the
prefix matches properly.
This matches the way it works in Eclipse -- complete the open call / type
rather than going for a new identifier. beginning-of-thing does not by itself
cross the open bracket.
Otherwise it's strange to accept a correction, see the buffer save &
refresh, but the error highlight persist. I don't like automatic problem
updates always (tried it!), but in this case I'm actively expecting Eclipse
to fix one.

Minor: remove an extraneous space from Eclim modeline. "Eclim: 0/13" looks
nicer to me than "Eclim : 0/13", and modeline space is precious.
…tion.

Eclipse is much better at it than we can hope to be. For example:
* It imports the return type correctly, which eclim doesn't give us fully
* It imports in the right place syntactically, even when called from
  within a method
* It looks up argument names in javadoc if available [note]
* Is much less fragile

[note] which means that many times the reason we used yasnippet at all
becomes unnecessary, since the javadoc names are something the user
typically wants to keep in overrides. This whole thing started as a quest
to expunge yasnippet which was being used unconditionally.
…sed.

This allows the user to easily set up commands that disable highlights
(e.g.  temporarily, while writing a bunch of new code), globally or
buffer-local (more common in my usage).

Unlike a problem filter, the problem counts remain and the problems are
navigable.

Rename eclim--problems-clear-highlights to indicate it's not private.
I'm using this to help Emacs find the file from stack traces, which are
basename only, via compilation-find-file advice.
And load cl-lib explicitly.
Some files already use cl-lib functions/macros.
- Global variables should be declared
- Use defvar instead of setq for initializing global variable
The file name is passed as argument.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants