You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An issue I keep running into in the Groovy editor is that static imports get mangled when using content assist or pasting a block of code that modifies the imports. I have a small example below that should demonstrate the issue. When trying to add "@TypeChecked" using content assist, the static import is cut off, resulting in compiler errors. (I am using 2.9.2 in MarsSR2.)
Before (cursor is after TypeCh and content assist is used to complete):
import staticorg.mockito.Mockito.mockimportorg.junit.Test@TypeChfinalclassWeakReferenceSetTests {
@TestvoidtestAddAndEmpty() {
WeakReferenceSet set =newWeakReferenceSet()
assert set.empty
set << mock(ConcreteType)
assert!set.empty
}
}
After (notice the ".mock" has been removed from the static import):
import staticorg.mockito.Mockitoimportgroovy.transform.TypeChecked;
importorg.junit.Test@TypeCheckedfinalclassWeakReferenceSetTests
{
@TestvoidtestAddAndEmpty() {
WeakReferenceSet set =newWeakReferenceSet()
assert set.empty
set << mock(ConcreteType)
assert!set.empty
}
}
Also, the import keystroke (Ctrl-Shift-M) does not seem to be working for Groovy files. Is this supposed to work or is it unimplemented?
The text was updated successfully, but these errors were encountered:
An issue I keep running into in the Groovy editor is that static imports get mangled when using content assist or pasting a block of code that modifies the imports. I have a small example below that should demonstrate the issue. When trying to add "@TypeChecked" using content assist, the static import is cut off, resulting in compiler errors. (I am using 2.9.2 in MarsSR2.)
Before (cursor is after TypeCh and content assist is used to complete):
After (notice the ".mock" has been removed from the static import):
Also, the import keystroke (Ctrl-Shift-M) does not seem to be working for Groovy files. Is this supposed to work or is it unimplemented?
The text was updated successfully, but these errors were encountered: