Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Duplicate
-
Affects Version/s: 2.5.2.Release
-
Fix Version/s: 2.6.0.Release
-
Component/s: Content Assist
-
Labels:
-
Number of attachments :
Description
Currently, applying a content assist proposal for a method that has a closure argument will do something like this:
myMethodCall null
And the user will have to enter '{', press enter, and then the closure will automatically be terminated with the closing } placed at the correct location.
We could do better here and do something like this (where '|' is the resulting cursor location):
myMethodCall {
|
}
The difficulty will be twofold:
- ensuring that the resulting cursor is placed one indent-level past the indentation of the method call
- ensuring that the closing '{' is also placed at the correct indent level.
Not impossible, but there is currently no mechanism to check this inside of our content assist infrastructure.
Issue Links
- is superceded by
-
GRECLIPSE-1259
Make parameter guessing content assist guess better parameters.
-
-
GRECLIPSE-1262
Auto-add curly brace after closure definition with an argument
-
Closing this bug as a duplicate since the work covered here has been or will be shortly fixed in
GRECLIPSE-1262andGRECLIPSE-1259.Now, for closure arguments, null will never be proposed. Instead, an opeening curly brace will be proposed:
myMethodCall {|And when the user presses enter, the rest of the closure will be filled in:
myMethodCall { | }Just need to add some testing and will close
GRECLIPSE-1259.