Enabling java refactoring within Groovy editor

Hi

When I'm within a groovy class, and refer to a property / field on java class that doesn't exist, is there a way to enable the create property refactoring?

Eg:

// Inside Foo.groovy
void method()
{
    Bar bar = new Bar();  // Defined in Bar.java

    bar.someProperty = "Hello, world"; // bar.someProperty doesn't exist.
}

In the above example, I'd like to get access to the "create property" refactoring option on someProperty.  Is there a way to enable this?

Thanks,


Marty

1 comment
Comment actions Permalink

I don't know of a way to do it.  :(

You could vote on this ticket (if you haven't already), which covers the specific case you describe: http://youtrack.jetbrains.net/issue/IDEA-67112

I see you created a ticket for the more general case.  You picked a good example for that one, by the way: creating the method should definitely be possible there!  It's the obvious thing to want to do.  I'll include a link so anyone who finds this conversation first can go ahead and vote: http://youtrack.jetbrains.net/issue/IDEA-65446

0

Please sign in to leave a comment.