Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.0alpha
-
Fix Version/s: 2.0.1Release
-
Component/s: Content Assist
-
Labels:None
-
Number of attachments :
Description
Several interesting suggestions from the mailing list:
—
- WISH: selecting one word in the java editor marks all occurrence of this word with a highlight color. Would be nice to have this also in the groovy editor
- WISH: static attribute definitions are shown in the java content assistance at the top of the content assistance list in the groovy content assistance list not.
- A lot of trouble with the content assistance. I tried to reproduce them in isolated tests, but there it functions like advertised. It seems it depends on the project, so there must be problems with big projects (thousands of classes, like ours). Here the problem areas:
- Is an attribute "ex" of type class "Example" in a base class declared, so the attribute "ex" is not proposed in the content assistance of the derived class and all the methods from the class ex are underlined as unknown.
- static attribute declarations in base classes are often missing in the content assistance list.
- a private attribute with public accessors methods: Only the accessors methods are shown in the list, the private attribute is often missing, sometimes it is showing
- We have a lot ' Problems During Content Assist' messages also when no content assistance is requested
- A class as a method parameter: In the method, accessing attributes in the parameter class, the parameters aren't showing up in the list
- Organize imports, if functioning, it added the imports before the package declaration
Hope you can improve the content assistance, especially for large projects.
—
These should be separated into multiple bugs. But, I just wanted to put this on the issue tracker.
Here's my response:
—
Hi Marcel,
Thanks for the feedback. And for the specific problems you've found.
I'll raise some bugs for this, but just some comments below.
> - WISH: selecting one word in the java editor marks all occurrence of this
> word with a highlight color. Would be nice to have this also in the groovy
> editor
Yes. I've dabbled with this before, thinking that it would be easy to
implement, but it turns out to be quite a bit more difficult to
implement than I had thought. I don't think I raised a bug for this
yet, but I will.
> - WISH: static attribute definitions are shown in the java content
> assistance at the top of the content assistance list in the groovy content
> assistance list not.
Shouldn't be hard to do and this would probably make sense.
> - A lot of trouble with the content assistance. I tried to reproduce them in
> isolated tests, but there it functions like advertised. It seems it depends
> on the project, so there must be problems with big projects (thousands of
> classes, like ours). Here the problem areas:
Hmmm...this could have something to do with AST transforms. Is this
something that you cold check? Are the locations where content assist
is broken affected by a transform?
If not, then I would need some help to narrow this down (which I can
see that you have already tried unsuccessfully to do).
> - Is an attribute "ex" of type class "Example" in a base class declared,
> so the attribute "ex" is not proposed in the content assistance of the
> derived class and all the methods from the class ex are underlined as
> unknown.
> - static attribute declarations in base classes are often missing in the
> content assistance list.
> - a private attribute with public accessors methods: Only the accessors
> methods are shown in the list, the private attribute is often missing,
> sometimes it is showing
What version of Groovy-Eclipse are you using? I have made some fixes
in these areas since the 2.0 release. Perhaps you can try this again
on the latest snapshot.
> - We have a lot ' Problems During Content Assist' messages also when no
> content assistance is requested
This is interesting. Is there anything in the error log? What is the
stack trace?
> - A class as a method parameter: In the method, accessing attributes in
> the parameter class, the parameters aren't showing up in the list
This has been fixed since 2.0.
> - Organize imports, if functioning, it added the imports before the package
> declaration
This problem occurs when there is a non-recoverable syntax error in
the source code. Because the groovy parser is based on antlr, the
error recovery is not particularly good. We have addressed some of
the problems, and we know we need to address more. We'll do this as
it comes up. So, perhaps you could include the syntax error in your
file that is causing the import statements to be added above the
package declaration.