As mentioned in this PR, we should clean-up the UI class `scala.tools.eclipse.ui.ScalaCompletionProposal`. In particular, all non-UI specific behavior should be extracted, and tests should be created for the logic that performs the text replacement when a completion proposal is selected
It's really important we do the clean-up before adding any further logic to the completion proposal engine.
It's really important we do the clean-up before adding any further logic to the completion proposal engine.
Leave a comment
on 2013-10-10 11:54 *
By Mirco Dotta
Summary changed from Extract all non-UI specific from class scala.tools.eclipse.completions.ScalaCompletions to Extract all non-UI specific logic from class scala.tools.eclipse.completions.ScalaCompletions
on 2013-10-15 14:39 *
By Mirco Dotta
Summary changed from Extract all non-UI specific logic from class scala.tools.eclipse.completions.ScalaCompletions to Extract all non-UI specific logic from class scala.tools.eclipse.ui.ScalaCompletionProposal
on 2013-10-15 14:39 *
By Mirco Dotta
Description changed from As mentioned [[url:https://... to As mentioned [[url:https://...
Split up last mixed UI/Non UI parts in ScalaCompletionProposal
The logic that computes the text that should be inserted into the
document is now completely independent from the UI which means it is
possible to test the behavior of the code with our test suite.
The only functional change this introduces is that the method
editor.selectAndReveal
is no longer implicitly called by
EditorUtils.applyChangesToFileWhileKeepSelection
It is not necessary to call this method because there is no selection
kept after a code completion, only the position of the cursor needs to
be tracked, which is already done by
EditorUtils.applyChangesToFile
Fixes #1001912
Branch: master
Commit: scala-ide:1cdd7ed078
The logic that computes the text that should be inserted into the
document is now completely independent from the UI which means it is
possible to test the behavior of the code with our test suite.
The only functional change this introduces is that the method
editor.selectAndReveal
is no longer implicitly called by
EditorUtils.applyChangesToFileWhileKeepSelection
It is not necessary to call this method because there is no selection
kept after a code completion, only the position of the cursor needs to
be tracked, which is already done by
EditorUtils.applyChangesToFile
Fixes #1001912
Branch: master
Commit: scala-ide:1cdd7ed078
No file chosen
You have an empty file field. Please select or remove it.
Name | Size |
---|