Method signature Refactor for Dart/Flutter - available in Android Studio? - android-studio

Using Android Studio 3.6.1 with Dart / Flutter.
I don't see an option to Refector > Change Signature for Methods.
Is this not supported? Or only in Intellij IDEA?
Normally this would be a Ctrl + F6 shortcut and available on context menu or main menu, but it's missing.

Related

No "Suppress" hint for "UNUSED_PARAMETER" in Kotlin

When I press Alt+Enter to show Android Studio's suggestion for unused parameter, I get the pop-up menu below,
You can see there is no any hint for adding the #Suppress("UNUSED_PARAMETER"), however the user has.
My environment is
Macbook air M1
Android Studio Arctic Fox | 2020.3.1 Patch 2
Kotlin plugin version: 203-1.5.31-release-550-AS7717.8

How to jump to source class of the lamba parameter in Android Studio?

We know that jumping the source is possible with a shortcut in Android Studio.
Mac shortcut of the jumping the source is CMD+Arrow down
Is this possible for a lambda parameter?
sample.someMethod(5)
.sampleMethod(lambdaParameter -> { ... });
CMD+Opt+Left or
CMD+Shift+ Left Click

Insert comments after closing bracket using Android Studio automatically

Is it possible to get comments to be placed automatically at the end of a method with Android Studio?
return new MaterialApp(
); // MaterialApp
Closing labels are now supported in Android Studio 3.1 with the latest Dart and Flutter plugin
(last checkbox at the bottom)
Disable checkbox and restart IDE
As in Android Studio 3.4 the location name changes to:
File > Settings... > Editor > General > Appearance
Tick the last checkbox - "Show closing labels in Dart source code".
Just ctrl + f in settings and paste:
Show closing labels in Dart source code
Disable checkbox and restart the IDE
Now your code is readable!

Android Studio hotkey for "do refactor"

In Android Studio I can start renaming via Shift + F6. Then Android Studio shows me a box telling me about the changes and presents me with a "Do Refactor"-button. When hovering over the button Android Studio shows me no information about a hotkey I could press. Is there a hotkey for that button?
I found that it works with pressing Alt + d.
There shouldn't be a keyboard shortcut for every button.
Usually program developers provide hotkeys just for most used basic functions.
There is Shift+F6 in Android Studio for refactoring and that's the closest option to get the functionality you want.

Strange key mapping in Android Studio

I am new to Android studio, it seems to be great IDE. But I have found that it has really strange key and shortcut mapping. I am using Czech keyboard.
When I try to type ">" by pressing Right ALT + . the symbol is not appearing, and I got message box that says "Go to custom Region. There are no custom foldings regions in the current file."
It is really strange behaviour, I have problem with writing many more characters like brackets,..... I tried to set keymap profiles to Visual Studio and more. But nothing seems to work. I didn't have any of these problems in any other IDE (Netbeans, Eclipse, Visual Studio, Xamarin)
Add this line:
actionSystem.force.alt.gr=true
to this file:
...\Android\android-studio\bin\idea.properties
As written here:
http://youtrack.jetbrains.com/issue/IDEA-91975
Yes, well... its problem with "old" keyboards. Newer keyboards don't have Alt Gr keys and IDE doesn't count on this in default.
Solutions:
Buy a new keyboard with no Alt Gr on it (using right Alt instead of Alt Gr is working for me)
Go to File -> Settings -> Keymap and search for implementation - delete Ctrl + Alt + B, hit "Apply" and you can now use this shortcut for "{"
As already mentioned below... add following line to ..\<Android Studio folder>\bin\idea.properties:
actionSystem.force.alt.gr=true
(update) Since newer version of AS (not sure which one, should be 2.3.3+), you don't need to manually access the properties file. Go to Help -> Edit Custom Properties and add actionSystem.force.alt.gr=true there.
Go to Preferences -> Keymap and choose Mac OS X as Keymaps.
I have been a long time Visual Studio user, so wanted to leverage all the keyboard shortcuts that I had picked up using Visual Studio.
On Android Studio, I first changed the Keymap to be Visual Studio. You can do this by using Alt+F7 on Windows and then search for Keymap.
By using the Visual Studio Keymap in Android studio, I got only debug related mapping, which was still a minority of what I use in Visual Studio.
So went ahead and added/modified some more mappings.
Here is the github link
https://github.com/vinayakg/VisualStudioKeymapforAndroidStudio/blob/master/settings.jar.
PR's welcome.
As for '>' sign (AltGr + .) and Android Studio 1.0.1, go to File>Settings, choose Keymap in IDE Settings section, search for "GotoCustomRegion" item (it is located in MainMenu-Navigate) and remove its mapping (via context menu).
If you're using macOS newest versions and have had weird behavior with the shortcuts, try this:
Go to Android Studio -> Preferences -> Keymap
Now change from "Mac OS X" to "Mac OS X 10.5+" and hit apply.

Resources