In-place rename (Shift+F6) doesn't work anymore

In PhpStorm 2016.2.1 the rename in-place (Shift+F6) no longer works. It instantly opens the Rename dialog box, which is undesired behaviour. The option "Enable in-place mode" is checked (Settings | Editor | General > Refactorings).

26 comments
Comment actions Permalink

Hello,

Can you reproduce it on any variable or in another completely new project?

0
Comment actions Permalink

I have the same problem as you, but only in one project. How did you resolve it?

PhpStorm 2016.2.2
Build #PS-162.2380.11, built on October 24, 2016
JRE: 1.8.0_112-release-287-b3 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

macOS Sierra 10.12.1

0
Comment actions Permalink

Hi there,

I have the same problem to.

PhpStorm 2017.1.4
Build #PS-171.4694.2, built on May 16, 2017
JRE: 1.8.0_112-release-736-b21 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.5

0
Comment actions Permalink

Hello Jasper,

Can you reproduce it on any variable or in another completely new project?

0
Comment actions Permalink

Hi Vladimir,

 

Yes it won't work on any variable. Also not in a completely new project.

0
Comment actions Permalink

Is File | Settings | Editor | General > Enable in-place mode option checked?

0
Comment actions Permalink

Hi Vladimir,

Yes the option is checked and I  checked all the appropriate settings.

0
Comment actions Permalink

Jasper,

Please try to restart IDE, invoke shift+f6 and then upload the idea.log file (help > Show log in ...) somewhere we could access it.

0
Comment actions Permalink

Hi Dmitry,

Here is the logfile

0
Comment actions Permalink

Thanks, looking good. Would disabling "Dash" plugin help?

0
Comment actions Permalink

Going to try that now.

 

0
Comment actions Permalink

No, still nog working.

0
Comment actions Permalink

Could you please attach a screenshot of a code part you're working with?

Also as I can see the project is in "Dropbox" folder - could you please check if the same behavior occurs with projects located in any other folder (that is not symlinked/tracked by 3rd party watchers), e.g. "Documents"?

0
Comment actions Permalink

Ok, wil do and let you know my findings. thanks.

0
Comment actions Permalink

I'm seeing this same issue on Goland:

GoLand 2018.2
Build #GO-182.3684.99, built on July 24, 2018
Licensed to GoLand Evaluator
Expiration date: August 24, 2018
JRE: 1.8.0_152-release-1248-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Same as others: "Enable in-place mode" is checked, but "Refactoring Preview" opens after using Shift-F6.

Restarting goland did not fix the issue.
Rebooting the PC did not fix the issue.

What should I try next?

Update:
This appears to be inconsistent; sometimes in-place works, sometimes it doesn't.
The scope of variables seems to be related. (Or at least, specific variables are able to be renamed in-place, and others cannot be.)

0
Comment actions Permalink

> The scope of variables seems to be related

They should. Please compare the code/affected objects next time the issue occurs for you.

0
Comment actions Permalink

I have the same problem.

Settings: https://d.pr/i/7WIoGz+

After pressing ⇧F6: https://d.pr/i/S2R0ln+

I expected that only the variables in the current scope would be affected. This is not the case. All occurrences in the projector affected.

 

0
Comment actions Permalink

That's not the same problem as described by OP. 

Please describe what you're renaming and what do you mean/how did you define "current scope".

0
Comment actions Permalink

I've had this issue for a while up to the latest version.

IntelliJ IDEA 2018.3.3 (Ultimate Edition)
Build #IU-183.5153.38, built on January 9, 2019
JRE: 1.8.0_191-b12 amd64
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation
Linux 4.18.0-13-generic

Here's what I've been able to test so far:

In a regular php file it works in-place as long as you're within a class or function:

<?php

// opens dialog
$hello = "world";
$hello .= "!!";

class Hurr {
// works in place, doesn't affect derp()'s $foo
public function herp($foo) {
$foo .= "bar";
$foo .= "baz";
return $foo;
}

public function derp($foo) {
$foo = $foo ? "something" : "other";
return $foo;
}
}

// works in place
function meh($doh) {
echo $doh;
}

When using a Blade template's @php block however it behaves erratically:

@php
// opens dialog
$timeFormat = 'g:i A';
$timeFormat .= '~~~';

// works on standing on function argument
function hey($timeFormat) {
// intermittenly stops working on a random one, sometimes
// the first one, sometimes the 2nd one, when it doesn't work
// it doesn't show anything, no dialog, no in-place
$timeFormat .= "dududud";
echo $timeFormat;
}
@endphp

Here is the link to the log file: https://www.dropbox.com/s/m6l9ccb6bsc00iz/idea.log?dl=0

0
Comment actions Permalink

Ariel, is there a reason you have to run PhpStorm on the Oracle JDK?
If there's no reason, please switch to the built-in JDK (Help | Find Action | Switch boot JDK) and check if the issue is still there.

0
Comment actions Permalink

Hi Eugene,

Thanks for your reply. There is in fact a reason: Using the bundled JDK on linux gives me issues with window focus, specifically that the IDEA window ignores taskbar commands and won't come into focus when clicking on the taskbar button. Have not been able to determine exactly how it happens, seems intermittent but once it starts happening, the only way to bring it back to focus is via Alt-Tab. This doesn't happen at all when I use the Oracle JDK, and I've had it happen both at home on Ubuntu 18.04 with KDE (Kubuntu) and at work with Ubuntu 18.10 with XFCE (Xubuntu) and LXQt. I don't think I've had it happen on Win7-64 though. If you could orient me on how/where/to whom to report this and how to help diagnose it I'd be very gratefuly because I'd rather use the bundled JDK if I can.

However, to the bug at hand, I've reverted to OpenJDK and tested again:

IntelliJ IDEA 2018.3.3 (Ultimate Edition)
Build #IU-183.5153.38, built on January 9, 2019
JRE: 1.8.0_152-release-1343-b26 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.18.0-13-generic

The issue persists. Here's the relevant section from the logs:

https://gist.github.com/arjona/756450c63979df33da3250ab2f6b0f9d

Anything else I can provide to help diagnose this, please let me know.

0
Comment actions Permalink

I think it's worth filing the bug. Please submit the issue here: https://youtrack.jetbrains.com/newIssue?project=WI

We need the log and the sample (just repost the one you already posted here).

Thank you!

0
Comment actions Permalink

Thank you Eugene, the issue has been filed.

0
Comment actions Permalink

Was there ever a bug report filed for the @eugene issue? (quick search of Youtrack, well, you know Youtrack). I know i noticed it in Pycharm earlier, but just finally got fed up. The dialog opening to refactor variable names is just too cumbersome. (I know I sound lazy). It is checked in settings, and the IDE has started hundreds of times since I noticed the issue under 2018.

 

Thanks

0
Comment actions Permalink

Andrew, do I get right that you are talking about inplace rename of a local variable?
It seems that it's fixed for a generic case, but not for a top-level variable: https://youtrack.jetbrains.com/issue/WI-2662
For instance, it works inside a method, but doesn't work outside a class.
Please submit one: https://youtrack.jetbrains.com/newIssue?project=WI

0
Comment actions Permalink

I take it back... 100% take it back. At least as far as Pycharm is concerned.

Setting says local. My expectation was different, but a global checkbox would be nice.

But I think the wording here in general is confusing and needs better clarity

 

 

0

Please sign in to leave a comment.