intellij-file-preview
intellij-file-preview copied to clipboard
Focus shifts to Project view while editing scala file
Happens right after starting to create a new top level class/object to an existing Scala file.
@BananaPlantain Thanks for reporting!
Unfortunately I am not familiar in development with Scala. Can you please provide some more details (e.g. used IDE & version, used (Scala) Plugin, Scala SDK setup, detailed steps on how to create "a new top level class/object to an existing Scala file, ...). Thanks!
This happens to me also, when adding a new Kotlin class (as soon as I start to type, focus is shifted to the project view and my keystrokes start searching for files)
I experience this when adding javadoc comments, but it's always been inconsistent.
I'll type /*
and focus will jump to the Project view before I can type the last *
.
I think I've just found a way to replicate it...
Using IntelliJ IDEA 2020.1 & Quick File Preview 1.6.2
- Open two editor window tabs fully (not previews), where one is a Java class without class-level javadoc
- Switch to the other tab, then back to the Java class, using the mouse to click on the tab
- On the line above the class declaration, type
/*
- Focus will switch to the Project view
During this I discovered that it only happens when 'Always Select Opened File' is selected. I note that the readme says this option is incompatible (under the previous name 'Autoscroll To Source') - I swear it used to only warn against using 'Open Files With A Single Click'... It'd be awesome if this could be supported, I think the two features (autoscroll and quick preview) fit well together conceptually. That said Intellij IDEA 2020.3 appears to finally include its own preview feature
Similar issue: On creating a new Scala file with Alt + Insert -> Scala Class -> Object, it jumps to "Search for: " in the project sidebar.
Steps to reproduce (Intellij IDEA 2020.3.1 and .3.2):
- Create a new Scala project with default settings
- Navigate to src/main/scala and create some package
- Highlight the package and press
Alt + Insert
, pressDown Arrow
for "Scala Class", pressEnter
- Type a name, for example
Object
and pressDown Arrow
twice, pressEnter
. - Double click on the object name to select the word, type a different class name, for example
Puppies
The bug has now ocurred.
Instead of typing Puppies
to replace the object name, you most likely have typed P
or Pu
in the editor window and uppies
or ppies
in the top left of the project sidebar in a "Search for: uppies" dialogue.