差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| study:java:netbeans [2008/02/12 09:06] – banana | study:java:netbeans [2008/04/11 05:31] (現在) – banana | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| ====== useful hot key ====== | ====== useful hot key ====== | ||
| Here is some useful hot keys for Netbeans. But I prefer eclipse to netbeans personally. :-( | Here is some useful hot keys for Netbeans. But I prefer eclipse to netbeans personally. :-( | ||
| - | (Eclipse | + | |
| - | < | + | | ^ Netbeans ^ Eclipse |
| - | F4: Run to cursor | + | ^ Run to cursor |
| - | F5: Starts debugger | + | ^ Starts debugger |
| - | F6: Lanches the midlet without debugging | + | ^ Lanches the midlet without debugging |
| - | F7: Step in(F5) | + | ^ Step in |
| - | F8: Step over(F6) | + | ^ Step over |
| - | F9: Compiles the code | + | ^ Resume(Debug) |
| - | F11: Builds main project. | + | ^ Compiles the code |
| - | Shift+F11: Cleans and rebuilds the main project | + | ^ Builds main project |
| - | Ctrl+F7: Step out | + | ^ Cleans and rebuilds the main project |
| - | Shift+F5: | + | ^ Step out | |
| - | Ctrl+F5: Continues debug session when paused | + | ^ Ends debug session |
| - | Ctrl+Shift+F7: New watch | + | ^ Continues debug session when paused |
| - | Alt+Shift+F: Organize imports(Ctrl+Shift+O) | + | ^ New watch | |
| - | Ctrl+Shift+F: Format (Ctrl+Shift+F) | + | ^ Organize imports |
| - | Ctrl+Shift+T: Add Comments (Ctrl+/) | + | ^ Format |
| - | Ctrl+Shift+D: Delete Comments(Ctrl+/) | + | ^ Add Comments |
| - | Ctrl+Space: Code Assistant(Ctrl+Space) | + | ^ Delete Comments |
| - | Ctrl+Shift+P: Search in project (Ctrl+H) | + | ^ Code Assistant |
| + | ^ Search in project | ||
| + | ^ Run Test | Alt+F6 | ||
| + | |||
| + | ~~META: | ||
| + | title=NetBeans useful hot key and overriding build-impl.xml | ||
| + | ~~ | ||
| + | |||
| + | |||
| + | |||
| + | ====== Overriding build-impl.xml ====== | ||
| + | Netbeansは自動的にbuild.xmlを生成してくれるのだが、さらに自分好みのbuild.xmlファイルの作成も支援している。\\ | ||
| + | 例として、struts-config.xmlを作成するAntタスクをここに紹介する。 | ||
| + | <code xml> | ||
| + | <?xml version=" | ||
| + | <!-- You may freely edit this file. See commented blocks below for --> | ||
| + | <!-- some examples of how to customize the build. --> | ||
| + | <!-- (If you delete it and reopen the project it will be recreated.) --> | ||
| + | <project name=" | ||
| + | < | ||
| + | <import file=" | ||
| + | < | ||
| + | < | ||
| + | <!-- | ||
| + | |||
| + | There exist several targets which are by default empty and which can be | ||
| + | used for execution of your tasks. These targets are usually executed | ||
| + | before and after some main targets. They are: | ||
| + | |||
| + | -pre-init: | ||
| + | -post-init: | ||
| + | -pre-compile: | ||
| + | -post-compile: | ||
| + | -pre-compile-single: | ||
| + | -post-compile-single: | ||
| + | -pre-compile-test: | ||
| + | -post-compile-test: | ||
| + | -pre-compile-test-single: | ||
| + | -post-compile-test-single: | ||
| + | -pre-dist: | ||
| + | -post-dist: | ||
| + | -post-clean: | ||
| + | |||
| + | Example of pluging an obfuscator after the compilation could look like | ||
| + | |||
| + | <target name=" | ||
| + | < | ||
| + | <fileset dir=" | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | For list of available properties check the imported | ||
| + | nbproject/ | ||
| + | |||
| + | |||
| + | Other way how to customize the build is by overriding existing main targets. | ||
| + | The target of interest are: | ||
| + | |||
| + | init-macrodef-javac: | ||
| + | init-macrodef-junit: | ||
| + | init-macrodef-debug: | ||
| + | do-dist: | ||
| + | run: execution of project | ||
| + | javadoc-build: | ||
| + | |||
| + | Example of overriding the target for project execution could look like | ||
| + | |||
| + | <target name=" | ||
| + | <exec dir=" | ||
| + | <arg file=" | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Notice that overridden target depends on jar target and not only on | ||
| + | compile target as regular run target does. Again, for list of available | ||
| + | properties which you can use check the target you are overriding in | ||
| + | nbproject/ | ||
| + | |||
| + | --> | ||
| + | <target name=" | ||
| + | < | ||
| + | <path id=" | ||
| + | <fileset dir=" | ||
| + | <fileset dir=" | ||
| + | < | ||
| + | | ||
| + | </ | ||
| + | <!-- ================================= | ||
| + | target: strutsgenerateDD | ||
| + | ================================= --> | ||
| + | |||
| + | <target name=" | ||
| + | < | ||
| + | <fileset dir=" | ||
| + | <include name=" | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | <echo message=" | ||
| + | < | ||
| + | <fileset dir=" | ||
| + | <include name=" | ||
| + | <include name=" | ||
| + | </ | ||
| + | </ | ||
| + | <taskdef name=" | ||
| + | |||
| + | < | ||
| + | mergeDir=" | ||
| + | excludedTags=" | ||
| + | <fileset dir=" | ||
| + | <include name=" | ||
| + | <include name=" | ||
| + | </ | ||
| + | < | ||
| + | destdir=" | ||
| + | displayname=" | ||
| + | sessiontimeout=" | ||
| + | | ||
| + | </ | ||
| + | < | ||
| + | version=" | ||
| + | destdir=" | ||
| + | mergedir=" | ||
| + | destinationFile=" | ||
| + | /> | ||
| + | </ | ||
| + | </ | ||
| + | <target name=" | ||
| + | <antcall target=" | ||
| + | </ | ||
| + | </ | ||
| </ | </ | ||
| + | |||
| + | {{keywords> | ||
| + | |||
| + | ~~DISCUSSION~~ | ||