jdaugherty opened a new issue, #202:
URL: https://github.com/apache/grails-intellij-plugin/issues/202
141.712.1
Invoke GenerateMissingTestMethods intention for the AddressController class
```
package test0
class AddressController {
def scaffold = true
def index() {}
}
```
Its test class is as follows (all defaults):
```
package test0
import grails.test.mixin.TestFor
import spock.lang.Specification
/**
* See the API for {@link grails.test.mixin.web.ControllerUnitTestMixin} for
usage instructions
*/
@TestFor(AddressController)
class AddressControllerSpec extends Specification {
def setup() {
}
def cleanup() {
}
void "test something"() {
}
}
```
Incorrect method 'def ""() {
}'
com.intellij.util.IncorrectOperationException: Incorrect method 'def ""() {
}'
<details>
<summary> **at**
com.intellij.psi.impl.PsiJavaParserFacadeImpl.a(PsiJavaParserFacadeImpl.java:402)</summary>
```
at
com.intellij.psi.impl.PsiJavaParserFacadeImpl.createMethodFromText(PsiJavaParserFacadeImpl.java:221)
at
com.intellij.psi.impl.PsiElementFactoryImpl.createMethodFromText(PsiElementFactoryImpl.java:725)
at
com.intellij.psi.impl.PsiJavaParserFacadeImpl.createMethodFromText(PsiJavaParserFacadeImpl.java:230)
at
com.intellij.testIntegration.createTest.JavaTestGenerator.addTestMethods(JavaTestGenerator.java:189)
at
com.intellij.testIntegration.createTest.GenerateMissedTestsAction$2.run(GenerateMissedTestsAction.java:109)
at
com.intellij.openapi.command.WriteCommandAction$4.run(WriteCommandAction.java:176)
at
com.intellij.openapi.command.WriteCommandAction$Simple.run(WriteCommandAction.java:166)
at com.intellij.openapi.application.RunResult.run(RunResult.java:38)
at
com.intellij.openapi.command.WriteCommandAction$2$1.run(WriteCommandAction.java:114)
at
com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:937)
at
com.intellij.openapi.command.WriteCommandAction$2.run(WriteCommandAction.java:111)
at
com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:117)
at
com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)
at
com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:108)
at
com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:80)
at
com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:173)
at
com.intellij.testIntegration.createTest.GenerateMissedTestsAction.a(GenerateMissedTestsAction.java:106)
at
com.intellij.testIntegration.createTest.GenerateMissedTestsAction.invoke(GenerateMissedTestsAction.java:81)
at
com.intellij.codeInsight.intention.PsiElementBaseIntentionAction.invoke(PsiElementBaseIntentionAction.java:42)
at
com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.invoke(IntentionActionWrapper.java:61)
at
com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler$2.run(ShowIntentionActionsHandler.java:181)
at
com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:124)
at
com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)
at
com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)
at
com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseActionAndInvoke(ShowIntentionActionsHandler.java:200)
at
com.intellij.codeInsight.intention.impl.IntentionListStep$2$1.run(IntentionListStep.java:260)
at
com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:332)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:749)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:702)
at java.awt.EventQueue$3.run(EventQueue.java:696)
at java.security.AccessController.doPrivileged(Native Method)
at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:719)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:734)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:569)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.AssertionError: Unexpected tokens
at
com.intellij.lang.java.parser.JavaParserUtil.parseFragment(JavaParserUtil.java:213)
at
com.intellij.psi.impl.source.tree.JavaElementType$JavaDummyElementType.parseContents(JavaElementType.java:274)
at
com.intellij.psi.impl.source.tree.LazyParseableElement.f(LazyParseableElement.java:172)
at
com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:212)
at
com.intellij.psi.impl.source.JavaDummyElement.getFirstChildNode(JavaDummyElement.java:69)
at
com.intellij.psi.impl.PsiJavaParserFacadeImpl.createMethodFromText(PsiJavaParserFacadeImpl.java:219)
... 43 more
```
</details>
---
*Imported from
[IDEA-139368](https://youtrack.jetbrains.com/issue/IDEA-139368) · Type:
Exception · Votes: 1*
*Comments, attachments, dates and reporter are not part of the export —
follow the link above for the full history.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]