在Mac 平台上使用了一段时间的IntelliJ IDEA,它在智能代码助手、代码自动提示、重构、J2EE支持、Ant、JUnit、CVS整合、代码审查、 创新的GUI设计等方面的功能可以说是超常的,业界良心。
如果想学习有关如何使用IDEA的知识,可以多访问官方文档(http://www.jetbrains.com/),对初学者来说是足够了,至少我个人是这么走过来的。如果觉得阅读官方文档耗时费力,我搜集到了一个学习的教程,自我感觉整理的还不错,分享链接http://www.phperz.com/special/83.html。
我学习的过程中觉得如下几点比较重要:
1.基本概念
Project 相当于 Eclipse的Workspace
Modules 相当于 Eclipse 的Project
Facets 表示这个module有什么特征,比如 Web,Spring和Hibernate等;
Artifact 是maven中的一个概念,表示某个module要如何打包,例如war exploded、war、jar、ear等等这种打包形式;一个module有了 Artifacts 就可以部署到应用服务器中了!
artifact你把它理解成“生成的东西”就差不多了。这个词强调的是这是你软件生产过程中某一步的产生物,不像程序本身,或者是配置文件这些,是你手写出来的。
Exploed在给项目配置Artifacts的时候有好多个type的选项,explode 在这里你可以理解为展开,不压缩的意思。也就是war、jar等产出物没压缩前的目录结构。建议在开发的时候使用这种模式,便于修改了文件的效果立刻显现出来。
Archive和Exploed是相对的,意味最终的产物为打包的内容,可以是war\ear\jar包。【Archive 原意为存档,这里可以理解为打包】
默认情况下,IDEA的Modules和Artifacts的output目录已经设置好了,不需要更改,打成war包的时候会自动在WEB-INF目录下生产classes目录,然后把编译后的文件放进去。
Langugae Level
SDK
2.常用设置(注意我这里说的常用是指必须掌握的,这个不掌握,后续开发过程中会很迷惑)
设置File Encoding
团队协作开发时,需要注意哪些内容是需要纳入版本管理哪些又是不能的?比如个人配置数据就不能纳入版本管理,如果这样做了,会经常性的出现冲突。
设置适合自己的快捷键。
3.熟悉常用的快捷键(个人的建议是预置的快捷键最好不要改,除非你觉得学习成本太高)
Ctrl + B (or Command + B in Mac)
directs the developer to the declarationof methods, fields, constructors, and so on. To use this shortcut correctly,the developer needs to hover the cursor over the element being used.
Ctrl+N and Ctrl+Shift+N(or Command+NandCommand+Shift+N inMac)
are used to navigate to a class and a file, respectively; you just needto type the name of the resource you want.
Ctrl + Alt + B (or Command + Option + B in Mac)
directs the developer to the implementation of an element (class, interface, method, and such). In case the element has more than one implementation, a list with all implementations will appear.
Ctrl + E (or Command + E in Mac)
can be used so the developer can see therecently opened files, allowing him/her to reopen them easily and fast.
Ctrl + Tab
will display a simple dialog with opened files and availabletool tabs.
Ctrl + F (or Command + F in Mac)
shows a find text field to run a search for sentences in the current file. You can configure regex to find things and use other options available in the find bar.
Ctrl + Shift + F
will open a dialog that will allow you to run a search for a sentence through all the files in the project. The developer can filter where the search will be done and define some other options.
4.使用提高效率的插件(比如:支持热部署插件)
JRebel
Hungry Backspace
原文:http://www.cnblogs.com/masb/p/5058496.html