Vim shows less validation errors and suggested fixes than in eclipse itself

14 views
Skip to first unread message

artemave

unread,
Sep 7, 2011, 9:54:24 AM9/7/11
to eclim-user
I am evaluating eclim at the moment. One odd thing is that compared to
eclipse gui, not all validation errors are shown in vim upon :w and
not all suggested fixes are listed upon :JavaCorrect. Any ideas why?

Eric Van Dewoestine

unread,
Sep 7, 2011, 10:06:36 AM9/7/11
to eclim...@googlegroups.com

For the validation errors, can you give me an example along with a
test file that exhibits the behavior?

As for :JavaCorrect results, eclim currently filters out corrections
that that change a file other than the current one because applying a
correction can't be done the typical way in eclim since eclipse's
correction proposal code is very heavily tied to the UI. As a work
around eclim simply replaces the current file's content with the
toString result of the proposal chosen, which causes problems if the
proposals content is intended for a different file.

--
eric

Tom

unread,
Sep 7, 2011, 10:11:10 AM9/7/11
to eclim-user


On Sep 7, 4:06 pm, Eric Van Dewoestine <ervan...@gmail.com> wrote:
>
> As for :JavaCorrect results, eclim currently filters out corrections
> that that change a file other than the current one because applying a
> correction can't be done the typical way in eclim since eclipse's
> correction proposal code is very heavily tied to the UI. As a work
> around eclim simply replaces the current file's content with the
> toString result of the proposal chosen, which causes problems if the
> proposals content is intended for a different file.

Why not let Eclipse do the corrections then and return the list of
affected
files to the client editor which can reload them?

Eric Van Dewoestine

unread,
Sep 7, 2011, 10:28:17 AM9/7/11
to eclim...@googlegroups.com

Because the eclipse correction code is heavily dependent on the
eclipse gui, where as eclim's primary focus is on a headless eclipse
instance where the vast majority of gui components are not setup.
That's not to say it can't be done, just that it's not as trivial as
it sounds. For other features I've already mocked out some of the
required gui components to appease eclipse and the same can probably
be done to get applying of code corrections working, it just hasn't
been a priority as it is a very time consuming job to step through the
eclipse code to see what components it depends on and then figure out
how to get those components setup properly.

What you've described is exactly what I do for refactoring support,
but luckily the eclipse refactoring code doesn't depend on the UI.

--
eric

Reply all
Reply to author
Forward
0 new messages