我的汽车如何实现Android Studio中的建议吗? [英] How can I auto implement suggestions in Android Studio?

查看:177
本文介绍了我的汽车如何实现Android Studio中的建议吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能自动实现Android Studio中就像Eclipse的建议。任何想法?结果
在Eclipse中,我们可以点击,使其将自身的Eclipse实施得到的建议。

How can I auto implement suggestions in Android Studio just like Eclipse. Any idea?
In Eclipse we can click on the suggestions so that it will get implemented by Eclipse itself.

例如。在日食,如果我得到这些建议由我能够通过IDE本身单击并实施该建议的IDE如果从内部类访问的变量应该声明为final。无需做手工。这就是我所需要的。

Eg. "If a variable accessed from within an inner class it should be declared final" in eclipse if I get these suggestion by the IDE I am able to click and implement that suggestion by IDE itself. No need to do it manually. thats what I need.

推荐答案

我不知道你的意思,但也有Android Studio中的一些重要的快捷方式:

I am not sure what you mean but there are a few important shortcuts in Android Studio:


  • 生成


  • 在Mac上:<大骨节病> CTRL + <大骨节病> ENTER

  • 在Windows上:<大骨节病> ALT + <大骨节病>插入

  • On Mac: CTRL + ENTER
  • On Windows: ALT + INSERT

通过此快捷键可以生成很多东西像构造函数,getter和setter方法​​,正确的等于()散code( )的实施,覆盖或实现方法......总之它的功能非常强大和非常有用的。

With this shortcut you can generate a lot of things like constructors, getters and setters, correct equals() and hashCode() implementations, overriding or implementing methods... Overall its very powerful and very useful.

快速修复


  • 在Mac上:<大骨节病> ALT + <大骨节病> ENTER

  • 在Windows上:<大骨节病> ALT + <大骨节病> ENTER

  • On Mac: ALT + ENTER
  • On Windows: ALT + ENTER

通过这个快捷方式即可修复最常见的错误,它可以做很多的工作适合你。永远不要低估重构和快速修复多么强大的IntelliJ中/ Android的工作室。

With this shortcut you can fix most common errors and it can do a lot of work for you. You should never underestimate how powerful refactoring and quick fix are in IntelliJ/Android Studio.

code完成


  • 在Mac上:<大骨节病> CTRL + <大骨节病> SPACE

  • 在Windows上:<大骨节病> CTRL + <大骨节病> SPACE

  • On Mac: CTRL + SPACE
  • On Windows: CTRL + SPACE

顾名思义,这是基本的code完成。默认情况下,仅给出了最相关的建议和/或类你以前使用过,通过点击这个快捷方式两次可以显示的所有的建议。

As the name implies this is your basic code completion. By default it shows you only the most relevant suggestions and/or classes you have used before, by hitting this shortcut twice you can show all suggestions.

显示参数


  • 在Mac上:<大骨节病>⌘ + <大骨节病> P

  • 在Windows上:<大骨节病> CTRL + <大骨节病> P

  • On Mac: + P
  • On Windows: CTRL + P

这显示当前方法的参数及其所有重载的,这是我认为最被低估的捷径之一,因为它可以让你的生活的很多更容易。

This shows you parameters of the current method and all of its overloads, this is among the most underrated shortcuts in my opinion as it can make your life a lot easier.

这篇关于我的汽车如何实现Android Studio中的建议吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆