在eclipse 4.2中,我只需输入:
joptionpane
Run Code Online (Sandbox Code Playgroud)
并按CTRL+SPACE,它将变为:
JOptionPane
Run Code Online (Sandbox Code Playgroud)
有没有办法用intelliJ IDEA做同样的事情?我试过按CTRL+SPACE和ALT+/.但是,由于某种原因它只是不起作用.
如果有人能告诉我如何做到这一点,我将不胜感激.
我只是尝试了IDEA的第12版,因为我的一些朋友告诉我这是一个更好的IDE并且有更好的代码完成(他们的意见).
Ctrl+ M+O非常适合折叠类中的所有方法但是我很难找到一种方法来折叠整个文件中的所有类概述.
有人可能会问 - 为什么你在一个文件中有很多课?这是因为我正在使用MSpec,而类是我的测试,所以我有几十个类的文件.为了绕过正在发生的事情,我经常不得不逐个崩溃类,但这并不是真正有效的.
我正在开发一个用于为购物网站创建特价的功能.一种产品可以有多种特殊产品,显然特殊产品可以有多种产品.
我正在使用一段has_and_belongs_to_many
关系,所以我宣布:
Product.rb
has_and_belongs_to_many :specials
Run Code Online (Sandbox Code Playgroud)
Special.rb
has_and belongs_to_many :products
Run Code Online (Sandbox Code Playgroud)
现在,通过产品@product
和特殊产品,@special
可以创建一个类似的关联.
@special.products << @product
Run Code Online (Sandbox Code Playgroud)
执行此操作后,以下情况属实:
@special.products.first == @product
Run Code Online (Sandbox Code Playgroud)
而且,重要的是:
@product.specials.first == @special
Run Code Online (Sandbox Code Playgroud)
当我删除使用此关联
@special.products.delete(@product)
Run Code Online (Sandbox Code Playgroud)
然后@product
从特价中删除,换句话说@special.products.first==nil
,@product
仍然包含 @special
@products.specials.first==@special
除了编写删除方法之外,还有什么方法可以在一次调用中执行此操作吗?
在Visual Studio中,我们可以通过CTRL+R,CTRL+W显示空格.但是我们怎样才能改变白色空间指示器本身的颜色呢?
我想把它变成柔和的灰色,这样它的颜色不会那么强烈而且不会分散注意力.
我是C#的新手,我正在现有的应用程序中做一些工作.我有一个DirectX视口,其中包含我希望能够使用箭头键定位的组件.
目前我正在重写ProcessCmdKey并捕获箭头输入并发送OnKeyPress事件.这有效,但我希望能够使用修饰符(ALT+ CTRL+SHIFT).一旦我拿着修改器并按箭头,就不会触发我正在听的事件.
有没有人对我应该去哪里有任何想法或建议?
我想在模拟器上测试手机的旋转,我看到我们必须使用的所有地方Ctrl+F11但它只旋转模拟器的图像并且不会启动配置更改事件或重绘活动.
这是我用的Ctrl+F11:
那么,我必须使用什么来模拟真正的旋转?
我需要帮助解决路由问题,使用devise authentication gem在成功登录后重定向到自定义页面,以便通过输入测试人员姓名和年龄来创建新记录(测试数据)
我正在使用Rails 3和设计版本1.4.9
我的路线如下
new_user_session GET /users/sign_in(.:format) {:action=>"new", :controller=>"devise/sessions"}
user_session POST /users/sign_in(.:format) {:action=>"create", :controller=>"devise/sessions"}
destroy_user_session DELETE /users/sign_out(.:format) {:action=>"destroy", :controller=>"devise/sessions"}
user_password POST /users/password(.:format) {:action=>"create", :controller=>"devise/passwords"}
new_user_password GET /users/password/new(.:format) {:action=>"new", :controller=>"devise/passwords"}
edit_user_password GET /users/password/edit(.:format) {:action=>"edit", :controller=>"devise/passwords"}
PUT /users/password(.:format) {:action=>"update", :controller=>"devise/passwords"}
cancel_user_registration GET /users/cancel(.:format) {:action=>"cancel", :controller=>"devise/registrations"}
user_registration POST /users(.:format) {:action=>"create", :controller=>"devise/registrations"}
new_user_registration GET /users/sign_up(.:format) {:action=>"new", :controller=>"devise/registrations"}
edit_user_registration GET /users/edit(.:format) {:action=>"edit", :controller=>"devise/registrations"}
PUT /users(.:format) {:action=>"update", :controller=>"devise/registrations"}
DELETE /users(.:format) {:action=>"destroy", :controller=>"devise/registrations"}
testers GET /testers(.:format) {:action=>"index", :controller=>"testers"}
POST /testers(.:format) {:action=>"create", :controller=>"testers"}
new_tester GET /testers/new(.:format) …
Run Code Online (Sandbox Code Playgroud) 是否有任何快捷方式可以选择netbeans中的下一个单词?
就像Ctrl+ d 在崇高的文本 选择字(重复选择其他人出现在上下文中的多个编辑)
有没有办法在Linux中映射Cmd+C到复制?(而不是Ctrl+C)
如果我也可以使用emacs样式,比如Ctrl+B向左移动一个字符,那就太好了.
通过eclipse自动格式化java代码非常棒!你可以编写可怕的代码,然后简单的类型CTRL+ SHIFT+ f- 代码是惊人的.
但是,有时我想将部分代码标记为不自动格式化.例如,通过流畅的界面:
public void fluentInterfaceJooqDemo() {
create.select(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME, count())
.from(AUTHOR)
.join(BOOK).on(AUTHOR.ID.equal(BOOK.AUTHOR_ID))
.where(BOOK.LANGUAGE.eq("DE"))
.and(BOOK.PUBLISHED.gt(date("2008-01-01")))
.groupBy(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
.having(count().gt(5))
.orderBy(AUTHOR.LAST_NAME.asc().nullsFirst())
.limit(2)
.offset(1)
.forUpdate()
.of(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME);
}
Run Code Online (Sandbox Code Playgroud)
并且在CTRL+ SHIFT+之后f
public void fluentInterfaceJooqDemo() {
create.select(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME, count()).from(AUTHOR).join(BOOK).on(AUTHOR.ID.equal(BOOK.AUTHOR_ID))
.where(BOOK.LANGUAGE.eq("DE")).and(BOOK.PUBLISHED.gt(date("2008-01-01"))).groupBy(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
.having(count().gt(5)).orderBy(AUTHOR.LAST_NAME.asc().nullsFirst()).limit(2).offset(1).forUpdate()
.of(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME);
}
Run Code Online (Sandbox Code Playgroud)
但是,我正在寻找一些方法来标记这样的代码non-autoformat
,例如
//non-format
public void fluentInterfaceJooqDemo() {
...
}
Run Code Online (Sandbox Code Playgroud)