Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
b8796015
Commit
b8796015
authored
7 years ago
by
alexey.afanasiev
1
Browse files
Options
Download
Email Patches
Plain Diff
IDEA-CR-29566 Create method from Java to Groovy (IDEA-186327)
parent
ff0a6841
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
plugins/groovy/src/org/jetbrains/plugins/groovy/annotator/intentions/elements/CreateMethodAction.kt
+1
-1
...roovy/annotator/intentions/elements/CreateMethodAction.kt
plugins/groovy/src/org/jetbrains/plugins/groovy/annotator/intentions/elements/templates.kt
+2
-2
...plugins/groovy/annotator/intentions/elements/templates.kt
plugins/groovy/test/org/jetbrains/plugins/groovy/fixes/CreateMethodFromJavaUsageTest.groovy
+1
-1
...plugins/groovy/fixes/CreateMethodFromJavaUsageTest.groovy
with
4 additions
and
4 deletions
+4
-4
plugins/groovy/src/org/jetbrains/plugins/groovy/annotator/intentions/elements/CreateMethodAction.kt
+
1
-
1
View file @
b8796015
...
...
@@ -39,7 +39,7 @@ internal class CreateMethodAction(
override
fun
getText
():
String
{
val
what
=
request
.
methodName
val
where
=
getNameForClass
(
target
,
false
)
return
if
(
abstract
)
{
return
if
(
abstract
&&
!
target
.
isInterface
)
{
message
(
"create.abstract.method.from.usage.full.text"
,
what
,
where
)
}
else
{
...
...
This diff is collapsed.
Click to expand it.
plugins/groovy/src/org/jetbrains/plugins/groovy/annotator/intentions/elements/templates.kt
+
2
-
2
View file @
b8796015
...
...
@@ -2,10 +2,10 @@
package
org.jetbrains.plugins.groovy.annotator.intentions.elements
import
com.intellij.openapi.util.Computable
import
com.intellij.psi.PsiParameter
import
com.intellij.psi.PsiType
import
com.intellij.psi.impl.source.PostprocessReformattingAspect
import
org.jetbrains.plugins.groovy.lang.psi.GroovyPsiElementFactory
import
org.jetbrains.plugins.groovy.lang.psi.api.statements.params.GrParameter
import
org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.members.GrMethod
import
org.jetbrains.plugins.groovy.lang.psi.expectedTypes.TypeConstraint
import
org.jetbrains.plugins.groovy.template.expressions.ChooseTypeExpression
...
...
@@ -28,7 +28,7 @@ internal fun setupParameters(method: GrMethod, parameters: ExpectedParameters):
val
dummyParameter
=
factory
.
createParameter
(
names
.
first
(),
PsiType
.
INT
)
postprocessReformattingAspect
.
postponeFormattingInside
(
Computable
{
parameterList
.
add
(
dummyParameter
)
})
as
Psi
Parameter
})
as
Gr
Parameter
paramTypesExpressions
+=
setupTypeElement
(
method
,
createConstraints
(
project
,
parameterInfo
.
second
))
}
...
...
This diff is collapsed.
Click to expand it.
plugins/groovy/test/org/jetbrains/plugins/groovy/fixes/CreateMethodFromJavaUsageTest.groovy
+
1
-
1
View file @
b8796015
...
...
@@ -67,7 +67,7 @@ class CreateMethodFromJavaUsageTest extends GrHighlightingTestBase {
}
void
testAbstractInInterface
()
{
doTest
(
CREATE_ABSTRACT_METHOD
)
doTest
()
}
void
testArrayParam
()
{
...
...
This diff is collapsed.
Click to expand it.
小 白蛋
@baidan
mentioned in commit
97cbe790
·
2 years ago
mentioned in commit
97cbe790
mentioned in commit 97cbe79099cae3d9f96322bce880d7bd0eab798c
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment