﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-CONAN ZONE-文章分类-NetBeans</title><link>http://www.blogjava.net/conans/category/32530.html</link><description>你越挣扎我就越兴奋</description><language>zh-cn</language><lastBuildDate>Wed, 25 Jun 2008 18:52:52 GMT</lastBuildDate><pubDate>Wed, 25 Jun 2008 18:52:52 GMT</pubDate><ttl>60</ttl><item><title>NetBeans6.5 M1 众多期待的特性一览表! </title><link>http://www.blogjava.net/conans/articles/210665.html</link><dc:creator>CONAN</dc:creator><author>CONAN</author><pubDate>Wed, 25 Jun 2008 12:14:00 GMT</pubDate><guid>http://www.blogjava.net/conans/articles/210665.html</guid><description><![CDATA[<div id="news_content">
<h3>NetBeans6.5 M1 众多期待的特性一览表! </h3>
<p>Netbeans 6.5 M1 已经发布,最新版本的NetBeans 增强了许多功能,同时也引入了许多值得期待的新特性.<br />
其中我比较喜欢的是DataBase 的改进,Eclipse 项目导入变得比以前更方便了,可以正确的区分Web项目<br />
和普通项目,还有Spring&nbsp;&nbsp; Hibernate 增强. GUI 中新增了JDK1.6 u10 中的look&amp;feel 只要你用的是 JDK1.6 u10<br />
就可以使用这个外观预览.数据绑定功能也改进了!&nbsp;&nbsp; 全新的多线程Debug&nbsp; 功能支持!<br />
&nbsp;JavaScript&nbsp; 也加入的Debug功能,还加入了好几个Javascript 库,像JQuery ,Yahoo ui dojo 等等! <br />
还新增了一个 "驼峰拼写" 代码补全功能. 很有意思. <br />
JavaEE 的lib path 也变成了可变的了.此外还增加了快速搜索功能. 更方便搜索!&nbsp;&nbsp; 还有好多个特性呢! </p>
<p>还有PHP Groovy Ruby 等都有增强!<br />
具体看下面的介绍! 英文太多了就不翻译了 大家自己看吧!<br />
<br />
UNC paths on Windows </p>
<p>Now the NetBeans IDE supports <a href="http://en.wikipedia.org/wiki/Path_%28computing%29#Uniform_Naming_Convention">UNC paths</a> like <span style="font-family: monospace; white-space: pre">""computerName"sharedFolder"</span> . It is possible to install the IDE to UNC like folder and also it is possible to create projects and other resources on UNC paths. </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-FileAssociationsOptionsPanelAndOpenAs...Action">File Associations options panel and Open As... action</h3>
<p>A new panel in options dialog which allows to say to NetBeans that files with certain extension should be treated as files with a certain MIME type (see <a href="http://www.netbeans.org/issues/show_bug.cgi?id=133773">#133773</a> ). You can add a new extension to the list of modify existing one. If you want to restore default setting for selected extension, you just click the Default button. </p>
<p><img class="magplus" title="点击查看原始大小图片" height="429" alt="file-associations.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/file-associations.png" width="650" _counted="undefined" /> </p>
<p>In connection with the above change there was also added a new Open As... action. It is enabled only for files which are not recognized by the IDE. User can choose one from supplied MIME types and from now on all files with this extension are treated as of choosen MIME type. </p>
<p><img alt="open-as-action.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/open-as-action.png" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-RunningSomeIDEDistributionsOnJRE">Running some IDE distributions on JRE</h3>
<p>Certain IDE distributions (e.g. PHP IDE) don't require Java JDK to run on, JRE is enough. </p>
<p>Plugin Manager now checks OpenIDE-Module-Package-Dependencies of all modules which user selects to be installed. If the user's IDE is running on JRE and the unsatified package dependency might indicate that JDK is required, user is warned about it and the plugin installation is not allowed. </p>
<p><img alt="missing-jdk-warning.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/missing-jdk-warning.png" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-QuickSearch"><a href="http://wiki.netbeans.org/QuickSearch">QuickSearch</a> </h3>
<p>Quickly search for action or type is now easy. Use Ctrl-I. </p>
<p><img alt="qs.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/qs.png" _counted="undefined" /> </p>
<ul>
    <li>wiki: <a href="http://wiki.netbeans.org/QuickSearch">http://wiki.netbeans.org/QuickSearch</a>
    <li>UI spec:<a href="http://ui.netbeans.org/docs/ui/quicksearch/index.html">http://ui.netbeans.org/docs/ui/quicksearch/index.html</a> </li>
</ul>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-VariableBasedPathsInJ2SEJ2EEProjects">Variable based paths in J2SE/J2EE projects </h3>
<p>Since NetBeans 6.1 it is possible to control whether JAR/Folder added to project classpath is referenced via absolute or relative path. Now it is also possible to define a global IDE <em>named variable</em> pointing to a folder and use this variable as a base for referring to JARs/Folders. </p>
<p>This feature further simplifies project sharing between users. In scenario where a project depends on JARs for which: </p>
<ul>
    <li>it is not desirable to store them in VCS; and which
    <li>can be placed in different locations for different users </li>
</ul>
<p>a named IDE variable can be used. </p>
<p>The variables are managed via Tools -&gt; Variable menu item: </p>
<p><img alt="Manage-Variables.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/Manage-Variables.png" _counted="undefined" /> </p>
<p>In above screenshot single variable is defined with these details: </p>
<p><img alt="Edit-Variable.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/Edit-Variable.png" _counted="undefined" /> </p>
<p>When variable based JAR/Folder is added to project classpath you can see its path starting with variable name (and tooltip showing absolute path): </p>
<p><img class="magplus" title="点击查看原始大小图片" height="375" alt="Project-Properties.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/Project-Properties.png" width="650" _counted="undefined" /> </p>
<p>Variable based JAR/Fodler is added to classpath via standard means of "Add Jar/Folder" button in classpath customizer (or "Add JAR/Folder" action on project's Libraries node in project's view). Custom file chooser is shown with one new option "Use Variable Path": </p>
<p><img class="magplus" title="点击查看原始大小图片" height="393" alt="Add-JAR-Folder.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/Add-JAR-Folder.png" width="650" _counted="undefined" /> </p>
<p>Just browse for your JAR/Folder and if selected file is under a variable the option gets enabled. Alternatively press "..." button and setup a new variable. </p>
<p>If a user opens project with a variable based path and the variable is not defined in user's IDE then standard broken reference warning is shown to advice user to define variable: </p>
<p><img alt="Broken-Reference.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/Broken-Reference.png" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-EclipseProjectImportAndSynchronization">Eclipse project import and synchronization</h3>
<p>The Eclipse project import feature facilitates mixed IDE development teams. It allows you to select Eclipse projects from an Eclipse workspace and generate NetBeans projects for them. The generated NetBeans project keeps a link to the original Eclipse project and will update itself after any relevant change: for example, changing the classpath of the Eclipse project. The update is done automatically when the NetBeans project is opened, or can be explicitly requested via a context menu item "Synch with Eclipse" on the project. </p>
<p><img class="magplus" title="点击查看原始大小图片" height="473" alt="wizard1.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/wizard1.png" width="650" _counted="undefined" /> </p>
<p>This is early preview of the Eclipse import feature which will be fully implemented in Milestone 2. (It supersedes the limited Eclipse import feature available in former NetBeans releases on the update center.) We would appreciate feedback and real-life Eclipse projects for testing; best is to use Issuezilla. (component <tt>ide</tt> , subcomponent <tt>eclipse project import</tt> ) </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-EnhancedJavaWebStartSupport">Enhanced Java Web Start support</h3>
<p>Support for creating applets that can be deployed via Java Web Start was added to NetBeans IDE. <strong>Note:</strong> the functionality is available in JDK 1.6.0 update 10. </p>
<p><img class="magplus" title="点击查看原始大小图片" height="465" alt="JWSProjProps.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/JWSProjProps.png" width="650" _counted="undefined" /> </p>
<p>Each application or applet deployed via Java Web Start can specify external resources (usually other JNLP file in internet). Dialog is opened by clicking on 'External Resources' button. </p>
<p><img alt="JWSExtRes.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/JWSExtRes.png" _counted="undefined" /> </p>
<p>Each applet can have number of properties defined in JNLP file, those properties can be defined in dialog that is opened by clicking 'Applet Parameters'. Also you can set applet dimensions in the dialog. </p>
<p><img alt="JWSAppletParams.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/JWSAppletParams.png" _counted="undefined" /> </p>
<h2 id="section-NewAndNoteWorthyMilestone1NB65-Platform">Platform</h2>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-SlidingWindowsSupportOriginalWindowSizes">Sliding windows support original window sizes</h3>
<p>Slided-in windows can keep their preferred size instead of being stretched to the whole height/width of the IDE window. </p>
<p>(see <a href="http://www.netbeans.org/issues/show_bug.cgi?id=135318">#135318</a> ). </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-PossibilityToConfigureSomeWindowSystemPropertiesForApplicationsBasedOnPlatform">Possibility to configure some Window System properties for applications based on Platform</h3>
<p>Some window system features can be turned off by branding of core.windows module. </p>
<p><img alt="winsys_customization.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/winsys_customization.png" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-TreeTableViewReplacementIntroduced">TreeTableView replacement introduced</h3>
<p>OutlineView is a new replacement for buggy TreeTableView. It supports drag and drop, in-place editing of tree cells, enhanced sorting etc. The data model is fully compatible with TreeTableView. </p>
<p>(see <a href="http://www.netbeans.org/issues/show_bug.cgi?id=33281">#33281</a> ). </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-OpeningOptionsDialogWithPreselectedSubcategories">Opening Options dialog with preselected subcategories</h3>
<p>API in options.api module has been changed to allow open Options dialog with preselected subcategory (see <a href="http://www.netbeans.org/issues/show_bug.cgi?id=109538">#109538</a> ). In your code you can call <tt>OptionsDisplayer.getDefault().open("CategoryID/SubcategoryID");</tt> where <tt>CategoryID</tt> and <tt>SubcategoryID</tt> are registration names from layer. For selection a panel under Miscellaneous category use <tt>OptionsDisplayer.getDefault().open(OptionsDisplayer.ADVANCED+"/SubcategoryID");</tt> . </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-SupportAllowingAUserToDropATextIntoThePalette">Support allowing a user to drop a text into the palette</h3>
<p>It is possible to drag and drop any text to the Palette window to create a new code snippet. It works for HTML editor palette only at the moment, more document types will follow soon. </p>
<h2 id="section-NewAndNoteWorthyMilestone1NB65-PHP">PHP</h2>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-FeaturesFirstIntroducedInEarlyAccessForPHP">Features first introduced in Early Access for PHP</h3>
<p>The <a href="http://download.netbeans.org/netbeans/6.1/final/">NetBeans IDE Early Access for PHP</a> was released in April at the same time as NetBeans 6.1. Milestone 1 of NetBeans 6.5 now contains <a href="http://wiki.netbeans.org/FeatureListEAPHP">all features introduced in this release</a> . </p>
<p>Next, in NB 6.5 M1, PHP features are a part of the "all-in-one" distribution of NetBeans, so they can be used together with all the other NetBeans features. Of course, there is still the slim PHP edition of NetBeans, targeted for PHP development specifically. </p>
<p>See below for more features added in NetBeans 6.5 Milestone 1, that were not present in Early Access. Also, to keep up with the new features added to NetBeans PHP support, make sure to check and bookmark the <a href="http://blogs.sun.com/netbeansphp/">NetBeans PHP Team Blog</a> . </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-DatabaseRelatedCodeSnippets">Database-related code snippets</h3>
<p>Generate code to connect to a MySQL database and to display the data in a database table. These snippets are available under the Generate Code action [Alt+Insert], just like in the Java editor. </p>
<p><img alt="php-database-table-snippet.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/php-database-table-snippet.png" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-FindUsages">Find Usages </h3>
<p>Available also for PHP development. Right click the item and select "Find Usages" or hit Alt-F7. </p>
<p><img class="magplus" title="点击查看原始大小图片" height="206" alt="php-find-usages.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/php-find-usages.png" width="650" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-MultipleProjectConfigurations">Multiple project configurations</h3>
<ul>
    <li>running, debugging either as script or as web page in browser
    <li>index file, arguments ... </li>
</ul>
<p><img class="magplus" title="点击查看原始大小图片" height="207" alt="php-project-configs.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/php-project-configs.png" width="650" _counted="undefined" /> </p>
<h2 id="section-NewAndNoteWorthyMilestone1NB65-Ajax">Ajax</h2>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-JavaScriptDebugger"><a href="http://wiki.netbeans.org/NbAjaxProject#section-NbAjaxProject-section-NbAjaxProject-JavaScriptDebugging">JavaScript Debugger </a></h3>
<ul>
    <li>Supported browsers
    <ul>
        <li>Firefox 2.0.0.X
        <li>Requires Firebug 1.1beta. An automatic installation is attempted when not found. </li>
    </ul>
    <li>Add &amp; delete breakpoints in JavaScript code
    <ul>
        <li>Html Files
        <li>JavaScript Files
        <li>URL source resulting from server side technologies such as JSP </li>
    </ul>
    <li>Manage debugger session
    <li>View &amp; navigate source artifacts
    <ul>
        <li>Html Files
        <li>JavaScript files
        <li>URL source resulting from server side technologies such as JSP </li>
    </ul>
    <li>View window/frame structure
    <li>View &amp; navigate JavaScript Callstack
    <li>View local variables
    <li>Set &amp; delete watches
    <li>View (static) browser DOM in the IDE
    <li>J2EE &amp; Ruby Project integration
    <ul>
        <li>Debug Client Session: Run the project and launch a JavaScript debugging session in NetBeans, attached to the Firefox 2.0.0.X browser where the client-side application is running
        <li>Source Mapping: Correlate a client-side application (browser DOM) identified by a URI with the corresponding source file in the J2EE project (limited mapping in M1) Mapping for:
        <ul>
            <li>Html files
            <li>JavaScript files </li>
        </ul>
        </li>
    </ul>
    </li>
</ul>
<p><a href="http://wiki.netbeans.org/JavaScriptDebuggerNetBeans6.5M1UserGuide">User Guide</a> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-JavaScriptLibraryManager"><a href="http://wiki.netbeans.org/JavaScriptBundledLibraries">JavaScript Library Manager </a></h3>
<ul>
    <li>Utilizes NetBeans Library Manager to manage JavaScript libraries
    <li>Wizard to add JS libraries to Java EE, Ruby, or PHP projects (Tools-&gt;Add JavaScript Libraries) </li>
</ul>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-BundledJavaScriptLibraries"><a href="http://wiki.netbeans.org/JavaScriptBundledLibraries">Bundled JavaScript Libraries </a></h3>
<ul>
    <li>Yahoo UI
    <li>WoodStock
    <li>jQuery
    <li>dojo
    <li>scriptaculous
    <li>prototype </li>
</ul>
<h2 id="section-NewAndNoteWorthyMilestone1NB65-Java">Java</h2>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-JavadocAnalyzer">Javadoc Analyzer</h3>
<p>This plugin provides ability to check and fix Javadoc comments in your source code. Just select project/package/files and invoke "Source | Analyze Javadoc". Auto comment functionality is back. </p>
<p><img alt="javadoc.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/javadoc.png" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-CallHierarchy">Call Hierarchy</h3>
<p>Show all callers/callees in the search scope of the selected member. </p>
<p><img class="magplus" title="点击查看原始大小图片" height="247" alt="ch.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/ch.png" width="650" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-FormattingSettingsPerProject">Formatting Settings per Project</h3>
<p>You can specify formatting settings individually for each project </p>
<p><img class="magplus" title="点击查看原始大小图片" height="467" alt="sttings.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/sttings.png" width="650" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-CamelCaseCodeCompletion">CamelCase code completion</h3>
<p>Code completion improved. Just write first letters of each word in method to get smart code completion. For instance "iL" stands for invokeLater. </p>
<p><img class="magplus" title="点击查看原始大小图片" height="369" alt="cc.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/cc.png" width="650" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-ImprovedEncapsulateFieldsRefactoring">Improved Encapsulate Fields Refactoring</h3>
<p>Encapsulate Fields Refactoring Improved. New options available. </p>
<p><img class="magplus" title="点击查看原始大小图片" height="502" alt="encapsulate.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/encapsulate.png" width="650" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-OptionToRemoveWhitespaceAtEndOfLine">Option to remove whitespace at end of line</h3>
<p>Top voted <a href="http://www.netbeans.org/issues/show_bug.cgi?id=13063">enhancement</a> finally implemented </p>
<h2 id="section-NewAndNoteWorthyMilestone1NB65-Groovy">Groovy</h2>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-Editor">Editor</h3>
<ul>
    <li>placeholder </li>
</ul>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-JavaSEProjectIntegration">Java SE Project Integration</h3>
<h2 id="section-NewAndNoteWorthyMilestone1NB65-Database">Database</h2>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-ImprovedNewConnectionDialog">Improved New Connection dialog</h3>
<p>Now the dialog for creating a new database connection does not expect you to know the details of the JDBC URL to open a connection. If you want to modify the URL, however, you can do so, just click on the "Show JDBC URL" checkbox. Changes to the URL are reflected in the fields and vice versa. </p>
<p><img alt="conndialog.jpg" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/conndialog.jpg" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-SQLHistoryDialog">SQL history dialog</h3>
<p>SQL that has been executed is saved to a file in the userdir and available for viewing in a dialog and also SQL can be selected and reinserted in an existing SQL file. <img alt="sql_history_icon.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/sql_history_icon.png" _counted="undefined" /> </p>
<p><img class="magplus" title="点击查看原始大小图片" height="342" alt="sql_history.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/sql_history.png" width="650" _counted="undefined" /> </p>
<h2 id="section-NewAndNoteWorthyMilestone1NB65-ServerSupport">Server Support</h2>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-GlassFishV3IntegrationModule.">GlassFish V3 integration module.</h3>
<p>Is now part of the Web &amp; Java EE and Ruby bundles. No need to get the modules from the update center. </p>
<h2 id="section-NewAndNoteWorthyMilestone1NB65-WebFrameworksSpringHibernateJSFJSFCRUDGeneratorJPA">Web frameworks (Spring, Hibernate, JSF, JSF CRUD Generator, JPA)</h2>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-Spring">Spring</h3>
<ul>
    <li>Improved Java class FQN completion </li>
</ul>
<p>Code completion is now faster than the earlier version. For efficiency, Java class FQN completion is now a two step process. Most of the times, a user will need only classes defined locally in the project (source classpath). Hence the first CTRL+SPACE will list only the items in the source classpath, as shown below: <img class="magplus" title="点击查看原始大小图片" height="554" alt="cc_step1.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/cc_step1.png" width="650" _counted="undefined" /> </p>
<p>If the user wishes to add an item not in the source classpath, he can press CTRL+SPACE again. Also, if the typed prefix does not match any local item, the completion will automatically switch to show all items instead of just local items. <img alt="cc_step2.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/cc_step2.png" _counted="undefined" /> </p>
<ul>
    <li>Go to Spring Bean dialog </li>
</ul>
<p>A Go to Spring Bean dialog is similar to the Go to Type dialog and will allow the user to quickly navigate to a given Spring Bean definition by it's name. The user selects the main menu item <strong>Navigate | Go to Spring Bean...</strong> or the keyboard short cut <strong>Alt + Shift + B</strong> to invoke the Go to Spring Bean dialog. <img alt="menu_goto.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/menu_goto.png" _counted="undefined" /> </p>
<p><img alt="goto_dialog.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/goto_dialog.png" _counted="undefined" /> </p>
<ul>
    <li>Refactoring support for Java properties </li>
</ul>
<p>When refactoring Java Bean property getters and setters, the corresponding usages in the Spring XML Configuration files are also modified. <img class="magplus" title="点击查看原始大小图片" height="135" alt="ren_ref_pre.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/ren_ref_pre.png" width="650" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-HibernateAvailableViaDevelopmentUpdateCenterForM1">Hibernate (Available via Development Update center for M1)</h3>
<ul>
    <li>Reverse Engineering support. With an existing configuration, POJOs and mapping files can be generated using this feature. See <a href="http://wiki.netbeans.org/ReverseEngineering">Reverse Engineering</a> for more details </li>
</ul>
<p><img class="magplus" title="点击查看原始大小图片" height="442" alt="ReverseEngg.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/ReverseEngg.png" width="650" _counted="undefined" /> </p>
<p>. </p>
<ul>
    <li>HQL query execution support. Execute HQL queries right inside the IDE. Queries can include joins and clauses. See <a href="http://wiki.netbeans.org/HibernateSupportHQLEditorOnePager">HQL Editor</a> for more details </li>
</ul>
<p><img class="magplus" title="点击查看原始大小图片" height="470" alt="HQLQueryEditor.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/HQLQueryEditor.png" width="650" _counted="undefined" /> . </p>
<ul>
    <li>Refactoring of hibernate mapping files is supported. See <a href="http://wiki.netbeans.org/RefactoringHbm">Refactoring</a> for more details. </li>
</ul>
<table border="0">
    <tbody>
        <tr>
            <td><img alt="" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/MappingRefactoring.PNG" _counted="undefined" /> </td>
        </tr>
    </tbody>
</table>
<p>. </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-JSFJSFCRUDGenerator">JSF, JSF CRUD Generator</h3>
<p>The editor support for both JSF Configuration Files and JSF JSP Pages are both improved. The improved features include: Code Completion, Hyperlink, Refactoring, and Find Usage. More details can be found at <a href="http://wiki.netbeans.org/JsfEditorSupport">Editor Support in JSF Configuration Files and JSP Files</a> . </p>
<ul>
    <li>Code Completion: On top of the generic JSP editing features, the JSP editor for the JSF page file provides additional code completion for Managed Beans and Resource Bundles. </li>
</ul>
<table border="1">
    <tbody>
        <tr>
            <th>Example </th>
            <th>Code Completion UI</th>
        </tr>
        <tr>
            <td><strong>Managed Beans</strong> </td>
            <td><img alt="JsfEditorSupportCodeComplete1.gif" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/JsfEditorSupportCodeComplete1.gif" _counted="undefined" /> <br />
            <br />
            <img alt="JsfEditorSupportCodeComplete2.gif" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/JsfEditorSupportCodeComplete2.gif" _counted="undefined" /> </td>
        </tr>
        <tr>
            <td><strong>Resource Bundles</strong> </td>
            <td><img class="magplus" title="点击查看原始大小图片" height="134" alt="JsfEditorSupportCodeComplete3.gif" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/JsfEditorSupportCodeComplete3.gif" width="650" _counted="undefined" /> <br />
            <br />
            <img class="magplus" title="点击查看原始大小图片" height="134" alt="JsfEditorSupportCodeComplete4.gif" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/JsfEditorSupportCodeComplete4.gif" width="650" _counted="undefined" /> </td>
        </tr>
    </tbody>
</table>
<ul>
    <li>Hyperlink: By using the Hyperlink inside the JSF configuration files and JSF JSP Pages, developers can fast navigate from one source to another reference. </li>
</ul>
<table border="1">
    <tbody>
        <tr>
            <th>JSF Configuration Files Example </th>
            <th>File opened</th>
        </tr>
    </tbody>
</table>
<table border="1">
    <tbody>
        <tr>
            <td><tt><span style="color: blue">&lt;managed-bean-class&gt;<strong><em>foo.ManagedBean</em> </strong>&lt;/managed-bean-class&gt;</span> </tt></td>
            <td>the Java file <tt>ManagedBean.java</tt> under package <tt>foo</tt> </td>
        </tr>
        <tr>
            <td><tt><span style="color: blue">&lt;to-view-id&gt;<strong><em>/Page2.jsp</em> </strong>&lt;/to-view-id&gt;</span> </tt></td>
            <td>the JSF page file <tt>Page2.jsp</tt> under the context root</td>
        </tr>
    </tbody>
</table>
<table border="1">
    <tbody>
        <tr>
            <th>JSF JSP Pages Example </th>
            <th>File opened</th>
        </tr>
        <tr>
            <td><tt><span style="color: blue">&lt;h3&gt;</span> &lt;<span style="color: blue"><strong>h:outputText</strong> </span>&nbsp;<span style="color: green">value</span> =<span style="color: red">"</span> #{<span style="color: blue"><strong><em>ManagedBean</em> </strong></span>.min}<span style="color: red">"</span> /&gt;<span style="color: blue">&lt;/h3&gt; </span></tt></td>
            <td>the JSF configuration file on position where the managed bean been defined</td>
        </tr>
        <tr>
            <td><tt><span style="color: blue">&lt;h3&gt;</span> &lt;<span style="color: blue"><strong>h:outputText</strong> </span>&nbsp;<span style="color: green">value</span> =<span style="color: red">"</span> #{ManagedBean.<span style="color: blue"><strong><em>min</em> </strong></span>}<span style="color: red">"</span> /&gt;<span style="color: blue">&lt;/h3&gt; </span></tt></td>
            <td>the appropriate Java file on position where the getter for the property been defined</td>
        </tr>
    </tbody>
</table>
<ul>
    <li>Refactoring Support: The refactoring support processes all files in the list of JSF configuration files. Bean and Java class/method usages are found in bean and alias elements and their subelements, as well as elements in the util namespace. </li>
</ul>
<table border="1">
    <tbody>
        <tr>
            <th>Example </th>
            <th>Refactoring UI</th>
        </tr>
        <tr>
            <td><strong>Managed Beans</strong> </td>
            <td><img class="magplus" title="点击查看原始大小图片" height="194" alt="JsfEditorSupportRefactoring1.gif" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/JsfEditorSupportRefactoring1.gif" width="650" _counted="undefined" /> </td>
        </tr>
        <tr>
            <td><strong>Folder / Package</strong> </td>
            <td><img class="magplus" title="点击查看原始大小图片" height="191" alt="JsfEditorSupportRefactoring2.gif" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/JsfEditorSupportRefactoring2.gif" width="650" _counted="undefined" /> </td>
        </tr>
    </tbody>
</table>
<ul>
    <li>Find usages: The JSF support will plug into the Java find usages to show JSF beans definitions which refer to Java elements (classes, methods, fields, properties). The Find Usages action will be available for bean definitions as well, to show beans used by other beans. </li>
</ul>
<table border="1">
    <tbody>
        <tr>
            <th>Example </th>
            <th>Usages UI</th>
        </tr>
        <tr>
            <td><strong>Managed Beans</strong> </td>
            <td><img class="magplus" title="点击查看原始大小图片" height="175" alt="JsfEditorSupportUsages.gif" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/JsfEditorSupportUsages.gif" width="650" _counted="undefined" /> </td>
        </tr>
    </tbody>
</table>
<ul>
    <li>The JSF CRUD Generator now applies default styles. </li>
</ul>
<p><img class="magplus" title="点击查看原始大小图片" height="82" alt="styled-jsfcrud.gif" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/styled-jsfcrud.gif" width="650" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-JPA">JPA</h3>
<p>In NetBean 6.5, the Entity Classes from Database wizard has one additional panel to allow the user to configure the following mapping options: </p>
<ul>
    <li>Association Fetch: can be default, eager or lazy. By default, it is default, meaning no fetch attribute will be added to the relationship annotations
    <li>Collection Type: The collection type used for OneToMany and ManyToMany CMR fields. Can be java.util.Collection, java.util.List or java.util.Set. By default, it is java.util.Collection.
    <li>Fully Qualified Database Table Names: if checked, catalog and schema attributes will be added on @Table. By default, it is not checked.
    <li>Attributes for Regenerating Database Tables: if checked, nullable (when it is false), length (for String type), precision and scale (for decimal type) will be added on @Column. Unique constraints will be added on @Table if checked. By default, it is not checked. </li>
</ul>
<p>The panel is at the last step of the wizard. It is optional. </p>
<table border="0">
    <tbody>
        <tr>
            <td><img class="magplus" title="点击查看原始大小图片" height="441" alt="" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/jpaFromDB-step4.JPG" width="650" _counted="undefined" /> </td>
        </tr>
    </tbody>
</table>
<h2 id="section-NewAndNoteWorthyMilestone1NB65-UML">UML</h2>
<p>NetBeans Development is migrating UML to the NetBeans Visual Library. The majority of the planned features are now implemented in the release trunk and the Development is focused on stabilizing the code for release. The new UML will be available in M2. Please see <a href="http://wiki.netbeans.org/UML">UML Current Projects </a>for additional information. </p>
<h2 id="section-NewAndNoteWorthyMilestone1NB65-Mobility">Mobility</h2>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-Databinding">Databinding</h3>
<p>Mobility Data binding provides a simple and consistent way for applications to present and interact with data in the Visual Designer. It utilizes the Databinding libraries available in Netbeans Mobility. New custom component DataSet which provides data for UI components. </p>
<p>Supported components in Milstone 1: </p>
<ul>
    <li>TextField ( Text, Label)
    <li>ImageItem (Image, Label)
    <li>DateField (Date, Label)
    <li>StringItem (Text, Label)
    <li>rest of the Items ( Label) </li>
</ul>
<p>Databinding support in the custom property editors: </p>
<p><img alt="mobilitypropertyeditor.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/mobilitypropertyeditor.png" _counted="undefined" /> </p>
<p>Generated code for empty DataSet: </p>
<p><img class="magplus" title="点击查看原始大小图片" height="447" alt="mobilitydataset.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/mobilitydataset.png" width="650" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-CustomComponentSupport">Custom Component Support</h3>
<p>Custom Component Support helps to create the Visual Mobile Designer Custom Components. It generates all of the necessary Custom Component infrastructure including: Module project Infrastructure, components descriptors and producers as well the layer.xml file. </p>
<p>New Project Custom Component wizard. </p>
<p><img class="magplus" title="点击查看原始大小图片" height="405" alt="mobilityccp1.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/mobilityccp1.png" width="650" _counted="undefined" /> </p>
<p>Generated project and classes with one component descriptor and one producer. </p>
<p><img alt="mobilityccp3.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/mobilityccp3.png" _counted="undefined" /> </p>
<p>Add Mobile Custom Component wizard. </p>
<p><img class="magplus" title="点击查看原始大小图片" height="431" alt="mobilityccp5.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/mobilityccp5.png" width="650" _counted="undefined" /> </p>
<p>Full description of this feature i available here: <a href="http://wiki.netbeans.org/MobilityCustomComponentProjectSupport">Custom Components API Project Support - DRAFT </a></p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-NewSVGSupport">New SVG Support</h3>
<p>Motivation is to extend group of existing SVG components to provide better support for creation of compelling UI on mobile platforms using SVG technology. </p>
<p>New components available in the SVG library: </p>
<ul>
    <li>SVGForm
    <li>Button
    <li>RadioButton
    <li>CheckBox
    <li>ComboBox
    <li>Label
    <li>List
    <li>Slider
    <li>Spinner
    <li>TextField </li>
</ul>
<p>SVG Components in action: </p>
<p><img alt="widgets.gif" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/widgets.gif" _counted="undefined" /> </p>
<h2 id="section-NewAndNoteWorthyMilestone1NB65-Debugger">Debugger</h2>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-NewMultithreadedDebuggingSupport">New Multithreaded Debugging Support</h3>
<p>This is a summary description for the new Multithreaded Debugging Support that is available in M1 NB 6.5. These bits have been done as a first phase of the overall NB debugger redesign effort, which goal is to significantly improve the debugging workflow and usability. </p>
<p>&nbsp;</p>
<h4 id="section-NewAndNoteWorthyMilestone1NB65-DebuggingWindow">Debugging Window</h4>
<table border="0">
    <tbody>
        <tr>
            <td><img alt="" src="http://wiki.netbeans.org/attach/MultithreadedDebugging/DebuggingWindow.PNG" _counted="undefined" /> </td>
        </tr>
    </tbody>
</table>
<p><br />
In order to improve UI for multithreaded debugging and also willing to reduce the number of debugger views, a new (unifying) debugger view is introduced. This view (referred as Debugging View) integrates current Sessions, Threads and Call Stack views being displayed in the Explorer group by default. </p>
<p>From the technical perspective, the Debug view is organized as (in general) a list of sessions, having each session as a list of threads, each suspended thread than expandable to its call stack and more. Debug view is customizable via context options only showing typically needed info by default. With the 'Suspend Table' switched on, any thread can be resumed/suspended by one click on the dedicated button. </p>
<p>If there is the debugger counter displayed in the editor and another thread encounters a breakpoint, the current thread will not be automatically switched. Instead, a non-modal panel is displayed in the bottom of Debugging view informing that there are new breakpoint hits waiting; there is also a drop-down button switching the debugger to the next (or selected) breakpoint hit. Having this non-modal notification, users are allowed to finish their debugging of current thread (e.g. expression evaluation) and switch to next breakpoint hit when it fits to the workflow. </p>
<p>&nbsp;</p>
<h4 id="section-NewAndNoteWorthyMilestone1NB65-CurrentThreadChooser">Current Thread Chooser</h4>
<table border="0">
    <tbody>
        <tr>
            <td><img class="magplus" title="点击查看原始大小图片" height="216" alt="" src="http://wiki.netbeans.org/attach/MultithreadedDebugging/CTChooser.PNG" width="650" _counted="undefined" /> </td>
        </tr>
    </tbody>
</table>
<p><br />
When doing a multithreaded debugging, it is often needed to quickly switch between particular threads; e.g. when doing a stepping sequence in two threads alternately. For such purpose we introduce a new action--Current Thread Chooser (CTRL+8). In fact, it is an analogy to application switching common in OS environment. With this feature, it is really straightforward to revisit any thread for debugging or switch to a particular thread for the first time. </p>
<p>&nbsp;</p>
<h4 id="section-NewAndNoteWorthyMilestone1NB65-OtherThreadSSuspendedHereGutterNavigation">'Other Thread(s) Suspended Here' Gutter Navigation</h4>
<table border="0">
    <tbody>
        <tr>
            <td><img alt="" src="http://wiki.netbeans.org/attach/MultithreadedDebugging/gutter.png" _counted="undefined" /> </td>
        </tr>
    </tbody>
</table>
<p><br />
Anytime the debugger displays the thread icon in the editor gutter, the user is informed that there is/are one or more suspended <em>non-current</em> thread(s) at this line. The list of these threads can be seen in the icon tooltip, and it is also possible to switch debugging to any of these threads via the context menu. Strictly speeking, it is the Source-&gt;Threads navigation available in the editor gutter. </p>
<p>&nbsp;</p>
<h4 id="section-NewAndNoteWorthyMilestone1NB65-DeadlockDetection">Deadlock Detection</h4>
<table border="0">
    <tbody>
        <tr>
            <td><img alt="" src="http://wiki.netbeans.org/attach/MultithreadedDebugging/DeadlockDetection.PNG" _counted="undefined" /> </td>
        </tr>
    </tbody>
</table>
<p><br />
The debugger automatically searches for deadlock among all suspended threads. When a deadlock is detected, a non-modal notification is displayed having emphasized involved threads. Detailed monitor info is also available displayed in dedicated monitor nodes. </p>
<p>&nbsp;</p>
<h4 id="section-NewAndNoteWorthyMilestone1NB65-NewThreadingModel">New Threading Model</h4>
<p>In order to improve multithreaded debugging, we decided to change the way how debugger manages debuggee threads. The main issue related to current model (NB 6.1 and older) is likely the fact that any step resumes all threads regardless there are threads intentionally suspended by the user or not. This can be limiting e.g. in case of debugging race conditions or deadlock issues. The natural solution to this problem is to resume only the current thread leaving other threads suspended if they are (may have happened via breakpoints or Suspend action). Obviously, this change needs the default breakpoint to suspend only the breakpoint thread, otherwise stepping could lead to so-called Deadlock Caused by Debugger. </p>
<p>Current Model Summary (NB 6.1 and older):</p>
<ul>
    <li>Default breakpoint suspends all threads.
    <li>Step resumes all threads when invoked and suspends all threads when completed regardless there are threads intentionally suspended or not.
    <li>Evaluation is done only resuming the current thread (by default), which may easily lead to 'deadlock caused by debugger' in current model.
    <li>'Step interrupted by a breakpoint' issue exists with default breakpoint. </li>
</ul>
<p>New Model Summary:</p>
<ul>
    <li>Default breakpoint only suspends breakpoint thread.
    <li>Step only resumes current thread when invoked and suspends current thread when completed.
    <li>Evaluation is done resuming the current thread (other threads unsuspended by default breakpoint or step). No deadlock caused by debugger might happen as far as no thread is explicitly suspended by the user (via suspend action or some breakpoint).
    <li>'Step interrupted by a breakpoint' issue does not exist with default breakpoint. (Except the stepping thread itself encounters a breakpoint.) </li>
</ul>
<h2 id="section-NewAndNoteWorthyMilestone1NB65-GUIBuilder">GUI Builder</h2>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-ButtonGroupVisualization">ButtonGroup visualization</h3>
<p>When you select a ButtonGroup or some component in a ButtonGroup then the GUI builder shows you which components belong into this group. </p>
<p><img alt="buttonGroups.jpg" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/buttonGroups.jpg" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-PreviewInNimbusLookAndFeel">Preview in Nimbus look and feel</h3>
<p>If you use JDK 6 Update 10 then you can preview your form in the new Nimbus look and feel. We have made this preview more reliable and accurate (within the limits of <tt>javax.swing.UIManager</tt> design). Besides the design preview you can also set the Nimbus look and feel for runtime - this is easily possible for <em>Desktop Java Application</em> projects in the Project Properties window (go to the Desktop App panel). </p>
<p><img class="magplus" title="点击查看原始大小图片" height="248" alt="nimbusPreview.jpg" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/nimbusPreview.jpg" width="650" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-TreeModelEditor">TreeModel editor</h3>
<p>New TreeModel property editor allows you to prototype your JTree easily. </p>
<p><img alt="treeModelEditor.jpg" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/treeModelEditor.jpg" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-ListModelAndComboBoxModelUsabilityEnhancements">ListModel and ComboBoxModel usability enhancements</h3>
<p>We rewrote property editors for ListModel and ComboBoxModel. It is much easier to use them by now. </p>
<p><img alt="listModelEditor.jpg" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/listModelEditor.jpg" _counted="undefined" /> <img alt="comboBoxModelEditor.jpg" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/comboBoxModelEditor.jpg" _counted="undefined" /> </p>
<h2 id="section-NewAndNoteWorthyMilestone1NB65-WebServices">Web Services</h2>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-RESTfulServicesFromDatabase">RESTful services from database</h3>
<p>A new wizard allows for the creation of RESTful, JSR311-based services directly from database tables. This facility is in addition to the wizard that creates services from JPA entities. </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-ConsumingPopularSaaSServicesInPhp">Consuming popular SaaS services in Php</h3>
<p>Web Services nodes in the Services tab of Netbeans 6.5 support Drag-n-drop to Php files as shown below. </p>
<p><img class="magplus" title="点击查看原始大小图片" height="358" alt="PhpSaaSClient.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/PhpSaaSClient.png" width="650" _counted="undefined" /> </p>
<h2 id="section-NewAndNoteWorthyMilestone1NB65-CC">C/C++</h2>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-CodeCompletionAccuracy">Code completion accuracy</h3>
<p>Code completion accuracy is much improved in milestone 1 compared to NetBeans 6.1. There are very few known cases where an incorrect choice is presented. So the known "inaccuracy rate" is nearly 0. There are known situations where valid choices are not presented to the user. For a range of mid to large scale applications those cases (where valid choices are not shown) is under 5%. Work to further improve accuracy is ongoing. </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-CallGraph">Call Graph</h3>
<p>Show all callers/callees of the selected function. </p>
<p>Direct call graph: </p>
<p><img alt="direct_callgraph.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/direct_callgraph.png" _counted="undefined" /> </p>
<p>Reverse call graph: </p>
<p><img alt="reverse_callgraph.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/reverse_callgraph.png" _counted="undefined" /> </p>
<h3 id="section-NewAndNoteWorthyMilestone1NB65-ErrorHighlightingAndMoreTypesOfSemanticHighlighting">Error highlighting and more types of semantic highlighting</h3>
<p>C/C++ editors highlights basic errors. Semantic highlighting for typedefs, class fields and function names was added. </p>
<p><img alt="hl-ss.png" src="http://wiki.netbeans.org/attach/NewAndNoteWorthyMilestone1NB65/hl-ss.png" _counted="undefined" /> </p>
<h2 id="section-NewAndNoteWorthyMilestone1NB65-Ruby">Ruby</h2>
<ul>
    <li>Rake
    <ul>
        <li>Rake Runner (http://wiki.netbeans.org/RubyRake)
        <li>infrastructure overhaul
        <ul>
            <li>internal unification brings more smooth workflow to users </li>
        </ul>
        </li>
    </ul>
    <li>Debugger
    <ul>
        <li>support for conditional (expression) breakpoints
        <li>support for breakpoint on exception (catchpoint)
        <li>switched to the new engines versions </li>
    </ul>
    <li>Projects
    <ul>
        <li>useful pre-generated Rakefile (clean, gem, packages, rdoc, spec, test, .... tasks)
        <li>possibility to pass JVM options to the JRuby (e.g. -Djruby.objectspace.enabled=true) </li>
    </ul>
    <li>Platform
    <ul>
        <li>Rubinius Support
        <li>sudo support - 'gksu' so far (issue 128575)
        <li>Options for tweaking Gems fetching in Gem Manager (-a, -d) </li>
    </ul>
    <li>Rails
    <ul>
        <li>updated the bundled Rails to 2.1.0
        <li>support for running the Rails console in different environments
        <li>possibility to specify the version of Rails for new projects (in case there are more than one version installed)
        <li>support for 'destroy' in the Rails generator </li>
    </ul>
    <li>Test Runner
    <ul>
        <li>New Test Runner UI for displaying test results </li>
    </ul>
    </li>
</ul>
</div>
<img src ="http://www.blogjava.net/conans/aggbug/210665.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/conans/" target="_blank">CONAN</a> 2008-06-25 20:14 <a href="http://www.blogjava.net/conans/articles/210665.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> 在NetBeans5.0中使用xdoclet生成hibernate的*.hbm.xml文件</title><link>http://www.blogjava.net/conans/articles/210393.html</link><dc:creator>CONAN</dc:creator><author>CONAN</author><pubDate>Tue, 24 Jun 2008 13:02:00 GMT</pubDate><guid>http://www.blogjava.net/conans/articles/210393.html</guid><description><![CDATA[在NetBeans5.0中使用xdoclet生成hibernate的*.hbm.xml文件<br />
<br />
敬告：<br />
------------------------------------------------------------<br />
&nbsp;&nbsp;&nbsp; 本文作者希望本文可以在网络及任何媒体进行任何形式的传播、复<br />
制、引用、修改，在此过程中请保留此敬告内容。<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 谢谢！<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; popo<br />
------------------------------------------------------------<br />
<br />
NetBeans是基于ANT进行项目的build和run的，所以我们可以方便的加入自己的target对原有项目进行扩展。<br />
启动NetBeans，打开以前写的SimpleWebSite_dao项目，因为我们要做的是利用XDoclet生成Hibernate的*.hbm.xml(ORM)文件，所以将XDoclet的所有Jar包解压到lib\xdoclet-1.3-SNAPSHOT目录下，不用在项目中引用XDoclet的包，因为我们是要通过修改Build文件来引用这些包。<br />
选择&#8220;Files&#8221;窗口，展开SimpleWebSite_dao项目。<br />
打开build.xml文件，看该文件中的注释，大概就是讲NetBeans为我们生成的build文件是nbproject/build-impl.xml，build.xml已经import了build-impl文件，如果我们想加入自己的target或者对原有target进行修改，只要改动build文件就可以。<br />
用NetBeans编辑XML文件很方便，可以对XML文件进行检查和校验，并且还有代码提示及补齐的功能：）。导航窗口更是为我们查看XML内容结构提供了极大的方便。<br />
在build.xml中加入以下内容：<br />
<br />
&nbsp;&nbsp;&nbsp; &lt;property name="lib.dir" location="../lib" /&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="xdoclet.dir" location="../lib/xdoclet-1.3-SNAPSHOT" /&gt;<br />
<br />
&nbsp;&nbsp;&nbsp; &lt;path id="xdoclet.classpath"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fileset dir="${lib.dir}" includes="*.jar"/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fileset dir="${xdoclet.dir}" includes="*.jar"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/path&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!-- =================================================================== --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!-- The "hibernatedoclet" target generates Hibernate mapping files&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!-- based on XDoclet marked-up Plain Old Java Object (POJO)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!-- =================================================================== --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;target name="hibernatedoclet" depends="compile" unless="hibernatedoclet.unnecessary"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description="Generate Hibernate mapping files"&gt;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;taskdef name="hibernatedoclet"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classname="xdoclet.modules.hibernate.HibernateDocletTask"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classpathref="xdoclet.classpath"/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- generate hibernate files --&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;hibernatedoclet destdir="${build.classes.dir}"&nbsp; mergedir="${build.classes.dir}"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force="${xdoclet.force}"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fileset dir="src"/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;hibernate validatexml="true" version="3.0"/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/hibernatedoclet&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/target&gt;<br />
<br />
用右键点build.xml文件，在&#8220;Run target&#8221;中，会看到我们新加的target-&gt;&#8220;hibernatedoclet&#8221;。<br />
现在写一个POJO，用这个target生成.hbm.xml文件。<br />
New 一个Java Class&nbsp; Customer（这个类的代码是从网上拷贝来的，因为我对XDoclet还不太熟悉）：<br />
package hibernate;<br />
import java.util.Set;<br />
import java.util.Collections;<br />
/**<br />
&nbsp;* @author roson<br />
&nbsp;* @since 1.0<br />
&nbsp;* @version 1.0<br />
&nbsp;* @hibernate.class tables="customers"<br />
&nbsp;*/<br />
public class Customer {<br />
&nbsp;&nbsp;&nbsp; /**This customer's identifier field.<br />
&nbsp;&nbsp;&nbsp;&nbsp; */<br />
&nbsp;&nbsp;&nbsp; private long id;<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /**This customer's name field.<br />
&nbsp;&nbsp;&nbsp;&nbsp; */<br />
&nbsp;&nbsp;&nbsp; private String name;<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /**The customer's orders set.<br />
&nbsp;&nbsp;&nbsp;&nbsp; */<br />
&nbsp;&nbsp;&nbsp; private Set orders=Collections.EMPTY_SET;<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /**The default construtor for Hibernate to instantiate with.<br />
&nbsp;&nbsp;&nbsp;&nbsp; */<br />
&nbsp;&nbsp;&nbsp; public Customer() {}<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /**The getter method for this Customer's identifier.<br />
&nbsp;&nbsp;&nbsp;&nbsp; *<br />
&nbsp;&nbsp;&nbsp;&nbsp; * @hibernate.id generator-class="native"<br />
&nbsp;&nbsp;&nbsp;&nbsp; */<br />
&nbsp;&nbsp;&nbsp; public long getId() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return id;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /**The setter method for this Customer's identifier.<br />
&nbsp;&nbsp;&nbsp;&nbsp; */<br />
&nbsp;&nbsp;&nbsp; public void setId(long id) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.id=id;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /**The getter method for this Customer's name.<br />
&nbsp;&nbsp;&nbsp;&nbsp; *<br />
&nbsp;&nbsp;&nbsp;&nbsp; * @hibernate.property<br />
&nbsp;&nbsp;&nbsp;&nbsp; */<br />
&nbsp;&nbsp;&nbsp; public String getName() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return name;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /**The setter method for this Customer's name.<br />
&nbsp;&nbsp;&nbsp;&nbsp; */<br />
&nbsp;&nbsp;&nbsp; public void setName(String name) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.name=name;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /**The getter method for this Customer's orders.<br />
&nbsp;&nbsp;&nbsp;&nbsp; *<br />
&nbsp;&nbsp;&nbsp;&nbsp; * @hibernate.set role="orders"<br />
&nbsp;&nbsp;&nbsp;&nbsp; *<br />
&nbsp;&nbsp;&nbsp;&nbsp; * @hibernate.collection-key column="customer_id"<br />
&nbsp;&nbsp;&nbsp;&nbsp; *<br />
&nbsp;&nbsp;&nbsp;&nbsp; * @hibernate.collection-one-to-many class="Order"<br />
&nbsp;&nbsp;&nbsp;&nbsp; */<br />
&nbsp;&nbsp;&nbsp; public Set getOrders() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return orders;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /**The setter method for this Customer's orders.<br />
&nbsp;&nbsp;&nbsp;&nbsp; */<br />
&nbsp;&nbsp;&nbsp; public void setOrders(Set orders) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.orders=orders;<br />
&nbsp;&nbsp;&nbsp; }<br />
}<br />
<br />
现在右键点build.xml文件，在&#8220;Run target&#8221;中，选&#8220;hibernatedoclet&#8221;，BUILD SUCCESSFUL。<br />
在build\classes\hibernate目录下会看到编译后的Customer.class文件和XDoclet生成的Customer.hbm.xml。<br />
<br />
为了方便，我们进一步修改build.xml文件，将build-impl.xml中的&#8220;jar&#8221;这个target复制粘贴过来，并改为以下内容：<br />
&nbsp;&nbsp;&nbsp; &lt;target name="jar" depends="init,hibernatedoclet,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/&gt;<br />
我只把depends中的compile改为了hibernatedoclet，这样在编译后和打包前的时候，会生成*.hbm.xml文件。<br />
<br />
现在的build.xml文件内容如下：<br />
&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;!-- You may freely edit this file. See commented blocks below for --&gt;<br />
&lt;!-- some examples of how to customize the build. --&gt;<br />
&lt;!-- (If you delete it and reopen the project it will be recreated.) --&gt;<br />
&lt;project name="SimpleWebSite_Dao" default="default" basedir="."&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;description&gt;Builds, tests, and runs the project SimpleWebSite_Dao.&lt;/description&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;import file="nbproject/build-impl.xml"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="lib.dir" location="../lib" /&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="xdoclet.dir" location="../lib/xdoclet-1.3-SNAPSHOT" /&gt;<br />
<br />
&nbsp;&nbsp;&nbsp; &lt;path id="xdoclet.classpath"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fileset dir="${lib.dir}" includes="*.jar"/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fileset dir="${xdoclet.dir}" includes="*.jar"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/path&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!--<br />
<br />
&nbsp;&nbsp;&nbsp; There exist several targets which are by default empty and which can be <br />
&nbsp;&nbsp;&nbsp; used for execution of your tasks. These targets are usually executed <br />
&nbsp;&nbsp;&nbsp; before and after some main targets. They are: <br />
<br />
&nbsp;&nbsp;&nbsp; -pre-init:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called before initialization of project properties<br />
&nbsp;&nbsp;&nbsp; -post-init:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called after initialization of project properties<br />
&nbsp;&nbsp;&nbsp; -pre-compile:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called before javac compilation<br />
&nbsp;&nbsp;&nbsp; -post-compile:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called after javac compilation<br />
&nbsp;&nbsp;&nbsp; -pre-compile-single:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called before javac compilation of single file<br />
&nbsp;&nbsp;&nbsp; -post-compile-single:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called after javac compilation of single file<br />
&nbsp;&nbsp;&nbsp; -pre-compile-test:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called before javac compilation of JUnit tests<br />
&nbsp;&nbsp;&nbsp; -post-compile-test:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called after javac compilation of JUnit tests<br />
&nbsp;&nbsp;&nbsp; -pre-compile-test-single:&nbsp; called before javac compilation of single JUnit test<br />
&nbsp;&nbsp;&nbsp; -post-compile-test-single: called after javac compilation of single JUunit test<br />
&nbsp;&nbsp;&nbsp; -pre-jar:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called before JAR building<br />
&nbsp;&nbsp;&nbsp; -post-jar:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called after JAR building<br />
&nbsp;&nbsp;&nbsp; -post-clean:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called after cleaning build products<br />
<br />
&nbsp;&nbsp;&nbsp; (Targets beginning with '-' are not intended to be called on their own.)<br />
<br />
&nbsp;&nbsp;&nbsp; Example of inserting an obfuscator after compilation could look like this:<br />
<br />
&nbsp;&nbsp;&nbsp; &lt;target name="-post-compile"&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;obfuscate&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;fileset dir="${build.classes.dir}"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/obfuscate&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/target&gt;<br />
<br />
&nbsp;&nbsp;&nbsp; For list of available properties check the imported <br />
&nbsp;&nbsp;&nbsp; nbproject/build-impl.xml file. <br />
<br />
<br />
&nbsp;&nbsp;&nbsp; Another way to customize the build is by overriding existing main targets.<br />
&nbsp;&nbsp;&nbsp; The targets of interest are: <br />
<br />
&nbsp;&nbsp;&nbsp; -init-macrodef-javac:&nbsp;&nbsp;&nbsp;&nbsp; defines macro for javac compilation<br />
&nbsp;&nbsp;&nbsp; -init-macrodef-junit:&nbsp;&nbsp;&nbsp;&nbsp; defines macro for junit execution<br />
&nbsp;&nbsp;&nbsp; -init-macrodef-debug:&nbsp;&nbsp;&nbsp;&nbsp; defines macro for class debugging<br />
&nbsp;&nbsp;&nbsp; -init-macrodef-java:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; defines macro for class execution<br />
&nbsp;&nbsp;&nbsp; -do-jar-with-manifest:&nbsp;&nbsp;&nbsp; JAR building (if you are using a manifest)<br />
&nbsp;&nbsp;&nbsp; -do-jar-without-manifest: JAR building (if you are not using a manifest)<br />
&nbsp;&nbsp;&nbsp; run:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; execution of project <br />
&nbsp;&nbsp;&nbsp; -javadoc-build:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Javadoc generation<br />
&nbsp;&nbsp;&nbsp; test-report:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; JUnit report generation<br />
<br />
&nbsp;&nbsp;&nbsp; An example of overriding the target for project execution could look like this:<br />
<br />
&nbsp;&nbsp;&nbsp; &lt;target name="run" depends="SimpleWebSite_Dao-impl.jar"&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;exec dir="bin" executable="launcher.exe"&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;arg file="${dist.jar}"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/exec&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/target&gt;<br />
<br />
&nbsp;&nbsp;&nbsp; Notice that the overridden target depends on the jar target and not only on <br />
&nbsp;&nbsp;&nbsp; the compile target as the regular run target does. Again, for a list of available <br />
&nbsp;&nbsp;&nbsp; properties which you can use, check the target you are overriding in the<br />
&nbsp;&nbsp;&nbsp; nbproject/build-impl.xml file. <br />
<br />
&nbsp;&nbsp;&nbsp; --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!-- =================================================================== --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!-- The "hibernatedoclet" target generates Hibernate mapping files&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!-- based on XDoclet marked-up Plain Old Java Object (POJO)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!-- =================================================================== --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;target name="hibernatedoclet" depends="compile" unless="hibernatedoclet.unnecessary"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description="Generate Hibernate mapping files"&gt;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;taskdef name="hibernatedoclet"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classname="xdoclet.modules.hibernate.HibernateDocletTask"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classpathref="xdoclet.classpath"/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- generate hibernate files --&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;hibernatedoclet destdir="${build.classes.dir}"&nbsp; mergedir="${build.classes.dir}"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force="${xdoclet.force}"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fileset dir="src"/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;hibernate validatexml="true" version="3.0"/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/hibernatedoclet&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/target&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;target name="jar" depends="init,hibernatedoclet,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/&gt;<br />
&nbsp;&nbsp;&nbsp; <br />
&lt;/project&gt;<br />
<br />
在Projects窗口，选&#8220;Build Project&#8221;或者&#8220;Clean and Build Project&#8221;，<br />
会看到用到了我们修改后的jar这个target进行的编译和打包。<br />
XDoclet的功能很强大，我会边学边在我的项目中利用它，可以省去很多编码工作。<br />
<br />
看Appfuse的build.xml，数据库的表是用Hibernate提供的SchemaExportTask工具生成数据库建表的SQL，我们也来照做，这样只要在写POJO时加上注释，用ANT的target就可以生成*.hbm.xml文件和创建数据表的SQL语句。方便吧？<br />
对build.xml进行修改，把生成*.hbm.xml文件的目标路径改为SRC目录，不再depends="compile"，改为在jar的时候先&#8220;hibernatedoclet&#8221;再&#8220;compile&#8221;，增加create_tables_sql的target，修改后的build.xml文件为：<br />
&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;!-- You may freely edit this file. See commented blocks below for --&gt;<br />
&lt;!-- some examples of how to customize the build. --&gt;<br />
&lt;!-- (If you delete it and reopen the project it will be recreated.) --&gt;<br />
&lt;project name="SimpleWebSite_Dao" default="default" basedir="."&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;description&gt;Builds, tests, and runs the project SimpleWebSite_Dao.&lt;/description&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;import file="nbproject/build-impl.xml"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="src.dir" location="./src" /&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="lib.dir" location="../lib" /&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;property name="xdoclet.dir" location="../lib/xdoclet-1.3-SNAPSHOT" /&gt;<br />
<br />
&nbsp;&nbsp;&nbsp; &lt;path id="xdoclet.classpath"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fileset dir="${lib.dir}" includes="*.jar"/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fileset dir="${xdoclet.dir}" includes="*.jar"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/path&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!--<br />
<br />
&nbsp;&nbsp;&nbsp; There exist several targets which are by default empty and which can be <br />
&nbsp;&nbsp;&nbsp; used for execution of your tasks. These targets are usually executed <br />
&nbsp;&nbsp;&nbsp; before and after some main targets. They are: <br />
<br />
&nbsp;&nbsp;&nbsp; -pre-init:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called before initialization of project properties<br />
&nbsp;&nbsp;&nbsp; -post-init:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called after initialization of project properties<br />
&nbsp;&nbsp;&nbsp; -pre-compile:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called before javac compilation<br />
&nbsp;&nbsp;&nbsp; -post-compile:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called after javac compilation<br />
&nbsp;&nbsp;&nbsp; -pre-compile-single:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called before javac compilation of single file<br />
&nbsp;&nbsp;&nbsp; -post-compile-single:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called after javac compilation of single file<br />
&nbsp;&nbsp;&nbsp; -pre-compile-test:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called before javac compilation of JUnit tests<br />
&nbsp;&nbsp;&nbsp; -post-compile-test:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called after javac compilation of JUnit tests<br />
&nbsp;&nbsp;&nbsp; -pre-compile-test-single:&nbsp; called before javac compilation of single JUnit test<br />
&nbsp;&nbsp;&nbsp; -post-compile-test-single: called after javac compilation of single JUunit test<br />
&nbsp;&nbsp;&nbsp; -pre-jar:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called before JAR building<br />
&nbsp;&nbsp;&nbsp; -post-jar:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called after JAR building<br />
&nbsp;&nbsp;&nbsp; -post-clean:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called after cleaning build products<br />
<br />
&nbsp;&nbsp;&nbsp; (Targets beginning with '-' are not intended to be called on their own.)<br />
<br />
&nbsp;&nbsp;&nbsp; Example of inserting an obfuscator after compilation could look like this:<br />
<br />
&nbsp;&nbsp;&nbsp; &lt;target name="-post-compile"&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;obfuscate&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;fileset dir="${build.classes.dir}"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/obfuscate&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/target&gt;<br />
<br />
&nbsp;&nbsp;&nbsp; For list of available properties check the imported <br />
&nbsp;&nbsp;&nbsp; nbproject/build-impl.xml file. <br />
<br />
<br />
&nbsp;&nbsp;&nbsp; Another way to customize the build is by overriding existing main targets.<br />
&nbsp;&nbsp;&nbsp; The targets of interest are: <br />
<br />
&nbsp;&nbsp;&nbsp; -init-macrodef-javac:&nbsp;&nbsp;&nbsp;&nbsp; defines macro for javac compilation<br />
&nbsp;&nbsp;&nbsp; -init-macrodef-junit:&nbsp;&nbsp;&nbsp;&nbsp; defines macro for junit execution<br />
&nbsp;&nbsp;&nbsp; -init-macrodef-debug:&nbsp;&nbsp;&nbsp;&nbsp; defines macro for class debugging<br />
&nbsp;&nbsp;&nbsp; -init-macrodef-java:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; defines macro for class execution<br />
&nbsp;&nbsp;&nbsp; -do-jar-with-manifest:&nbsp;&nbsp;&nbsp; JAR building (if you are using a manifest)<br />
&nbsp;&nbsp;&nbsp; -do-jar-without-manifest: JAR building (if you are not using a manifest)<br />
&nbsp;&nbsp;&nbsp; run:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; execution of project <br />
&nbsp;&nbsp;&nbsp; -javadoc-build:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Javadoc generation<br />
&nbsp;&nbsp;&nbsp; test-report:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; JUnit report generation<br />
<br />
&nbsp;&nbsp;&nbsp; An example of overriding the target for project execution could look like this:<br />
<br />
&nbsp;&nbsp;&nbsp; &lt;target name="run" depends="SimpleWebSite_Dao-impl.jar"&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;exec dir="bin" executable="launcher.exe"&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;arg file="${dist.jar}"/&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/exec&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/target&gt;<br />
<br />
&nbsp;&nbsp;&nbsp; Notice that the overridden target depends on the jar target and not only on <br />
&nbsp;&nbsp;&nbsp; the compile target as the regular run target does. Again, for a list of available <br />
&nbsp;&nbsp;&nbsp; properties which you can use, check the target you are overriding in the<br />
&nbsp;&nbsp;&nbsp; nbproject/build-impl.xml file. <br />
<br />
&nbsp;&nbsp;&nbsp; --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!-- =================================================================== --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!-- The "hibernatedoclet" target generates Hibernate mapping files&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!-- based on XDoclet marked-up Plain Old Java Object (POJO)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!-- =================================================================== --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;target name="hibernatedoclet" unless="hibernatedoclet.unnecessary"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description="Generate Hibernate mapping files"&gt;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;taskdef name="hibernatedoclet"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classname="xdoclet.modules.hibernate.HibernateDocletTask"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classpathref="xdoclet.classpath"/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- generate hibernate files --&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;hibernatedoclet destdir="${src.dir}"&nbsp; mergedir="${src.dir}"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force="${xdoclet.force}"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fileset dir="${src.dir}"/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;hibernate validatexml="true" version="3.0"/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/hibernatedoclet&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/target&gt;<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; &lt;!-- =================================================================== --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!-- The "create_tables_sql" target generates the database schema and&nbsp;&nbsp;&nbsp; --&gt; <br />
&nbsp;&nbsp;&nbsp; &lt;!-- creates tables based on the mapping files&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;!-- =================================================================== --&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;target name="create_tables_sql" depends="hibernatedoclet" description="creates database tables"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;taskdef name="schemaexport" <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classname="org.hibernate.tool.hbm2ddl.SchemaExportTask" <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classpathref="xdoclet.classpath"/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;schemaexport quiet="yes" text="true" drop="no" delimiter=";" <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; properties="src/database.properties" output="../database/sql/create-tables.sql"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fileset dir="${src.dir}" includes="**/*.hbm.xml"/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/schemaexport&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/target&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;target name="jar" depends="init,create_tables_sql,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/&gt;<br />
&nbsp;&nbsp;&nbsp; <br />
&lt;/project&gt;<br />
<br />
这样，每次&#8220;Build Project&#8221;或者&#8220;Clean and Build Project&#8221;时，都会先在源程序目录创建*.hbm.xml文件，再在../database/sql目录下生成创建数据表的SQL文件，再进行编译，打包。<br />
<br />
用上面的示例文件有几个问题<br />
1.Customer类中 * @hibernate.class tables="customers"应该是 * @hibernate.class table="customers"，<br />
2.生成的Customer.hbm.xml文件&#8220;create_tables_sql&#8221;时失败，提示信息为：<br />
D:\ProjectNetBeans\SimpleWebSite\SimpleWebSite_Dao\build.xml:107: Schema text failed: Could not read mapping document from file: D:\ProjectNetBeans\SimpleWebSite\SimpleWebSite_Dao\src\hibernate\Customer.hbm.xml<br />
BUILD FAILED (total time: 4 seconds)<br />
为字段加上数据类型（type="java.lang.Long"）后可以读取文件，但还是失败：<br />
D:\ProjectNetBeans\SimpleWebSite\SimpleWebSite_Dao\build.xml:107: Schema text failed: Association references unmapped class: Order<br />
因为对XDoclet不熟，对Hibernate的配置也快忘记差不多了，所以省点事儿，先把Order属性去掉。<br />
<br />
&#8220;Clean and Build Project&#8221;，哈哈，看看，*.hbm.xml文件和建数据库表的Sql语句都生成啦。<br />
不过还没有试过Debug等target，如果那些target依赖生成的*.hbm.xml文件的话，还要对相应的target加上depends...<br />
<br />
剩下的就是要多看看XDoclet和Hibernate配置的文档啦。
<img src ="http://www.blogjava.net/conans/aggbug/210393.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/conans/" target="_blank">CONAN</a> 2008-06-24 21:02 <a href="http://www.blogjava.net/conans/articles/210393.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>NetBeans的优化配置Ⅱ</title><link>http://www.blogjava.net/conans/articles/210178.html</link><dc:creator>CONAN</dc:creator><author>CONAN</author><pubDate>Mon, 23 Jun 2008 14:39:00 GMT</pubDate><guid>http://www.blogjava.net/conans/articles/210178.html</guid><description><![CDATA[<p><span class="hilite1">NetBeans</span> 6.0 Beta1出来也有几天了，它建议的内存大小是 1G。稍加调整后，就能使其启动速度有明显提高。<br />
<br />
一、模块<br />
禁用没有使用的模块：Tools》Plugins》Installed<br />
选择不用的模块，Deactivate。<br />
<br />
二、<span class="hilite2">配置</span><br />
编辑文件：<br />
$NB_HOME/etc/<span class="hilite1">netbeans</span>.conf<br />
<br />
修改 <span class="hilite1">netbeans</span>_default_options选项，<br />
<span class="hilite1">netbeans</span>_default_options="xxxxxxxxxxxxxxx"<br />
其中，修改（-J-Xms的数值依内存而定，下面是512MB的例子）<br />
-J-Xms64m -J-XX:PermSize=32m -J-XX:MaxPermSize=192m <br />
<br />
再在末尾双引号前加入（注意行首有个空格）<br />
-J-DuseGtk=true -J-Xverify:none -J-Djava.net.preferIPv4Stack=true<br />
<br />
其中&#8220;-J-DuseGtk=true&#8221;是为了界面使用GTK风格，这样，字体已不用<span class="hilite2">配置</span>了。当然前提是用JDK6。而Fedora不用加这一项，就自动使用GTK了，这是因为<span class="hilite1">Netbeans</span>的支持列表中没有ubuntulooks主题引擎</p>
<p>这是在版本6.0beta2上的优化。经我实验，大大提高了NetBeans的启动速度.</p>
<p>1，修改英文netbeans界面字体大小，修改%Netbeans_home%\etc\netbeans.conf<br />
在netbeans_default_options里加上 --fontsize 12</p>
<p>2，修改JVM内存配置（本机内存1G，不同内存大小不同设置）<br />
在netbeans_default_options里加上 -J-Xmx512m，同时修改-J-Xms256m。<br />
【说明】-J-Xms32m <br />
此设置用于通知 Java 虚拟机将其初始堆大小设置为 32 MB。通过通知 JVM 它最初应该为堆分配多少内存，我们可以防止它随着 IDE 使用更多的内存而将堆增大。 <br />
【说明】-J-Xmx128m <br />
此设置用于指定 Java 虚拟机应该用于堆的最大内存。对此数值设置硬性上限意味着 Java 进程不能使用比可用的物理 RAM 更多的内存。对于具有更多内存的系统可以提升此限制 - 128 MB 设置有助于确保 IDE 在 256MB 的系统上可靠地执行操作。注意：不要将此值设置为接近或大于系统中的物理 RAM 数，否则在主要回收过程中将导致频繁的交换空间操作。</p>
<p>3，在netbeans_default_options里修改 -J-XX:PermSize=20m <br />
这是一个较特殊的 JVM 开关，但它也缩短了启动时间。此设置用于调整内存中&#8220;永久区域&#8221;（在这里保存类）的大小。由于我们知道所有 IDE 类均占用特定数量的内存，因此我们向 JVM 提示它将需要的内存数量。此设置消除了许多系统上启动过程中的主要垃圾回收事件。SunONE Studio 或包括更多模块的其他 IDE 的用户可能希望将此数值设置得更高些。</p>
<p>4，在netbeans_default_options里加上-J-Xverify:none<br />
此开关用于关闭 Java 字节码验证，从而加快类加载，以及消除在启动过程中仅为验证目的而加载类的需要。此开关将显著缩短启动时间。</p>
<p>5，在Tools-Plugins-installed里面把不需要的模块去掉<br />
我这里去掉了 Glashfish；JSF；CVS；Subversion等。速度就得到很大提高了。当然如果你的开发需要这些模块就不需要去掉了。</p>
<p>6，修改编辑器配置<br />
把所有的Javadoc自动弹出窗口去掉，把所有自动完成延时设置为0，把所有自动完成大小写敏感去掉。<br />
注：在netbeans6的JAVA代码编辑器设置里面默认没有设置代码自动完成的延时设置了。可以自己手动加入到配置文件C:\Documents and Settings\%USER_NAME%\.netbeans\6.0beta2\config\Editors\text\x-java下的properties.xml，加入<br />
&lt;property class="java.lang.Integer" name="completion-auto-popup-delay" value="1"/&gt;<br />
【说明】 preperties.xml文件默认不存在，只有在你修改了编辑器配置以后才会出现这个文件</p>
<p>环境设置<br />
这一步是在NetBeans IDE内部设置。在 工具--选项--高级选项；<br />
在 编辑器设置 中将 文本平滑&nbsp;&nbsp; 去掉（个人不喜欢这个，总感觉选上后有些字母边缘怪怪的）<br />
在 编辑器设置--java编辑器设置 中将 自动完成弹出窗口延时 设置为1,选中自动弹出javadoc窗口<br />
在 JAVA源代码 中将 错误标注限制 和 自动解析延迟 设置为1,另外 缺省编码 默认是GBK 建议可以改成 UTF-8.以便在移植源代码到非GBK编码平台的时候中文注释能正确显示。<br />
在 IDE配置--建议框架 中 的3个延迟时间都改为 1</p>
<p>字体设置<br />
默认情况下的NetBeans的字体真的很难看,可以将非注解的字体与字符串类型的全部设置为Courier New 14号字体，注释与字符串类型的字体设置为宋体 13号。设置完后是不是觉得很漂亮（不要打开 文本平滑 功能）</p>
<img src ="http://www.blogjava.net/conans/aggbug/210178.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/conans/" target="_blank">CONAN</a> 2008-06-23 22:39 <a href="http://www.blogjava.net/conans/articles/210178.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>NetBeans的优化配置</title><link>http://www.blogjava.net/conans/articles/210176.html</link><dc:creator>CONAN</dc:creator><author>CONAN</author><pubDate>Mon, 23 Jun 2008 14:37:00 GMT</pubDate><guid>http://www.blogjava.net/conans/articles/210176.html</guid><description><![CDATA[<p style="text-indent: 2em">Eclipse用户总是在NetBeans炫耀Eclipse是多么的漂亮，尤其会说NetBeans的字体丑陋，NetBeans的字体太小，编辑器里的字体不好看，字体边楞有锯齿等等。坦白的说，这也是我刚从Eclipse转到NetBeans的第一印象。其实由于NetBeans使用Swing构建界面，这使得它缺省的使用Swing的缺省配置，尤其是中文，就更不敢恭维。其实NetBeans提供了强大的配置工具，完全可以将NetBeans配置的很漂亮。下面我就以Windows上的NetBeans安装为例，说说如何配置字体。</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.NetBeans界面上的普通字体大小，可以通过配置NetBeans安装目录下netbeans.conf启动文件来实现，这个文件在&lt;NetBeans&gt;/etc目录下。缺省的NetBeans在使用Swing的缺省字体，大小为11，稍稍嫌小，如果要改成12，可以将文件中的下面一行：</p>
<p style="text-indent: 2em">netbeans_default_options="-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true"</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 改成</p>
<p style="text-indent: 2em">netbeans_default_options="-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true --fontsize 12"</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 另外，也可以通过设置Swing的一个控制字体的系统属性swing.useSystemFontSetting来实现：</p>
<p style="text-indent: 2em">netbeans_default_options="-J-Dswing.useSystemFontSettings=false -J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true"</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.编辑器的字体可以通过选项设置来实现，具体是Tools-&gt;Options-&gt;Fonts &amp; Colors，这儿可以设置包含字体、前后背景等设置。刚转到NetBeans时，我就按照Eclipse和VS2003刚设置了一套设置，设置好了之后的NetBeans特别漂亮，一点都不输给Eclipse。</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.字体锯齿问题，解决这个问题，首先你要使用Java6。Java6支持LCD和反走样(anti-alias)字体，安装Java6后，修改etc/netbeans.conf让NetBeans使用Java6。需要注意的是在Windows下需要明确打开操作系统的字体边缘平滑设置后，才起作用。设置方法是，右键点击桌面，选择外观-&gt;效果-&gt;使用下列方式使字体的边缘平滑-&gt;清晰，然后启动NetBeans就可以了。</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 另外，我个人觉得NetBeans缺省的工具栏按钮太大，如果你和我有同样感觉，可以右键点击工具栏，从下拉菜单中选择Small Toolbar Icons。</p>
<p style="text-indent: 2em">你将缺省字体改为DialogInput 12就可以了。</p>
<p style="text-indent: 2em">NetBeans使用心得二：内存和垃圾收集机制配置</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NetBeans的缺省的内存配置偏低，只有128M，实际上Eclipse的缺省配置为256M，对于NetBeans这样拥有如此之多的功能，却才使用128M是不太合适的。曾经在别人的博客上看到，最佳的内存配置应该为物理内存的1/3，如果小于这个值，NetBeans就难以发挥全效，如果大于这个值就会造成操作系统内存抖动。就NetBeans5.5来说，官方网站上规定的最小内存是512M，推荐内存1G，这一点和其他Java IDE一样，比如Eclipse官方规定的最小内存居然是1G。这让我不得不叹息我们的电脑实在太落后了。我家里的工作机才256M，后来买了512M添上去，总共才768M，因此按照1/3原则，我把NetBeans设置为256M。如何设置这个值呢？同前文一样要设置启动文件 &lt;NetBeans&gt;/etc/netbeans.conf，打开启动文件，将netbeans_default_options一行中的-J-Xmx选项设置成256M就可以了，如下：</p>
<p style="text-indent: 2em">netbeans_default_options=="-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true"</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 使用NetBeans的缺省配置，在长时间的运行后，往往会突然间僵住了，没有响应，这是因为JVM缺省的垃圾收集机制不使用增量式并行收集，而是隔断时间后，等内存垃圾积累到一定程度，完全锁定甚至暂停虚拟机，进行垃圾收集。可以将这种垃圾收集机制改成增量式并行收集，避免这种僵死。同样是改动netbeans_default_options，在行后加上：</p>
<p style="text-indent: 2em">netbeans_default_options=="-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled"</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 总的来说，如果你懒得想这些，采用下面的配置比较不错：</p>
<p style="text-indent: 2em">netbeans_default_options="-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled --fontsize 12"</p>
<p style="text-indent: 2em">netbeans_default_options=="-J-Xms32m -J-Xmx256m0.....</p>
<p style="text-indent: 2em">J-Xms32m 等于J-Xmx256m时，运行比较顺畅</p>
<p style="text-indent: 2em">NetBeans使用心得三：保存配置和改变JDK</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NetBeans升级太快，经常需要下载新的版本安装，但一重新安装原来的辛辛苦苦的配置好了的东西都没有了。另外需要使用不同的JDK，但是重新卸载和安装netbeans又比较麻烦。如何解决这个问题？</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 原来netbeans将用户的配置放在用户目录下的.netbeans目录中，在Windows下，用户目录是：</p>
<p style="text-indent: 2em">C:\Documents and Settings\&lt;UserName&gt;</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 将该目录备份保存，可以避免重新配置的麻烦，安装新的NetBeans之后，将.netbeans中对应版本的配置拷贝到目标版本的目录小就可以了。比如我保存了NetBeans5.0的配置，现在安装了5.5，可以将原来.netbeans/5.0目录下的内容，覆盖.netbeans/5.5下的内容，你原来配置的内容包含当前workspace的状态就都转移过去了。</p>
<p style="text-indent: 2em"></p>
<p style="text-indent: 2em">NetBeans使用心得四：Java平台、NetBeans平台、类库配置管理</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NetBeans项目通常来说要针对某个Java版本，NetBeans插件开发需要以来某个NetBeans平台，这些项目如果要使用第三方类库，都需要引用这些类库。NetBeans中提供了所谓Java运行时平台、NetBeans平台以及类库的配置管理。下面介绍一下如何配置和管理这些平台及类库：</p>
<p style="text-indent: 2em">1.Java平台管理：Tools-&gt;Java Platform Manager，缺省的有一个JDK的平台，如果需要添加其他版本的JDK，可以选择按钮Add Platform...，并在右边的Classes, Sources和Javadoc选择需要添加的类。再选择Add Platform这个按钮时，NetBeans会询问你JDK根目录，当找到并且选中这个目录，NetBeans会自动将Classes,Sources和Javadoc内容填好。一般如果有Sources了，可以不必选Javadoc，NetBeans会根据Sources自动生成Javadoc以便引用。Classes是用来编译和运行以及代码辅助使用的，Sources可以用于调试程序时跟踪代码，而Javadoc会被NetBeans总动索引到帮助系统(Help-&gt;Javadoc references)，以及代码辅助中显示帮助。可以肯定的说这样配置要比Eclipse方便的多。</p>
<p style="text-indent: 2em">2.和Java平台管理相似，NetBeans平台配置大体遵循上面步骤，选择Tools-&gt;NetBeans Platform Manager，然后的过程就和Java平台配置一样。</p>
<p style="text-indent: 2em">3.和Java平台和NetBeans平台配置类似，选择Tools-&gt;Library Manager配置类库。</p>
<p style="text-indent: 2em">配置好的Java运行时平台，NetBeans平台以及类库，可以通过右键选择项目的属性，在Library一栏，选择Java平台、NetBeans平台以及添加和删除第三方类库。或者展开项目树，在Libraries节点右键点击，选择New Library或者New Module Dependency。</p>
<p style="text-indent: 2em">NetBeans使用心得五：热键配置、模块管理及其他配置</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 刚从其他IDE转到NetBeans后，有个不顺手的地方就是热键差别较大，非常常用的主要是代码辅助，在Eclipse是Ctrl+/，而这儿使用的是Ctrl+Space，很不幸的是大部分汉字输入法已经占用了这个热键。幸运的是NetBeans提供了修改热键的配置面板Tools-&gt;Options-&gt;Keymap。另外最新版本的NetBeans5.5还提供了Eclipse和Emacs的热键映射，这对于从eclipse和Emacs转过来的人来说无疑是天大的好消息，你不用在适应新的热键，只要在这儿选择Eclipse或者Emacs就可以了。</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 另外你也可以添加新的热键，比如，我就添加了一个用于关闭工程的热键，热键配置中，选择File-&gt;Close Project，然后选择Add...按钮，选择Ctrl+Shift+Backspace，你就定义关闭工程的热键为Ctrl+Shift+Backspace。</p>
<p style="text-indent: 2em">NetBeans的模块管理负责各种插件的更新、下载、安装、卸载等。工具位于Tools-&gt;Module Manager和Update Center，这儿你可以很简单根据向导的提示更新、下载、安装以及卸载各种插件。</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 其他常见配置都能在Tools-&gt;Options找到，包括：</p>
<p style="text-indent: 2em">1.General-&gt;View Java Packages as List/Tree，让你选择树或者列表的方式组织类包。</p>
<p style="text-indent: 2em">2.General-&gt;Web Browser配置缺省的浏览器。</p>
<p style="text-indent: 2em">3.General-&gt;Proxy配置Web代理，主要用于更新管理器。</p>
<p style="text-indent: 2em">4.General-&gt;Auto Update配置自动更新的方式以及频率。</p>
<p style="text-indent: 2em">5.General-&gt;Editor-&gt;General-&gt;Code Folding配置代码折叠选项。</p>
<p style="text-indent: 2em">6.General-&gt;Code Completion配置辅助代码选项：是否自动弹出、自动插入单独选项、大小写敏感、是否显示弃用代码。</p>
<p style="text-indent: 2em">7.General-&gt;Indention配置代码缩进选项。</p>
<p style="text-indent: 2em">8.General-&gt;Code Templates-&gt;定义各种快捷模式的模板</p>
<p style="text-indent: 2em">9.General-&gt;Macros配置宏变量。</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 另外一些杂项可以在Miscellaneous和Advanced选项找到。常见的抱怨是辅助代码为何弹出那么慢，错误纠正为何出现那么慢，并且被认为是NetBeans慢的表现，实际这些都是可以配置的，并不是NetBeans造成的，这些配置缺省的延迟时间太长，给用户造成NetBeans速度很慢地错觉。这些设置在：</p>
<p style="text-indent: 2em">Tools-&gt;Options-&gt;Advanced Options-&gt;Editing-&gt;Editor Settings-&gt;Java Editor-&gt;Delay of Completion Window Auto Popup</p>
<p style="text-indent: 2em">Tools-&gt;Options-&gt;Advanced Options-&gt;Editing-&gt;Java Sources-&gt;Automatic Parsing Delay</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 最后，如果你发现有些不想你预料的NetBeans行为，千万不要马上抱怨NetBeans不能这个，不能那个，很可能这又是一个不符合你以前习惯的地方，在配置面板找一找，也许就能找到你要的行为配置。</p>
<p style="text-indent: 2em">netbeans也有一个类似的快捷键：Ctrl + \</p>
<p style="text-indent: 2em">可以使用 IDE-HOME/etc/netbeans.conf</p>
<p style="text-indent: 2em">下表定义了可用于 IDE 的开关。</p>
<p style="text-indent: 2em">--help（或 -h）</p>
<p style="text-indent: 2em">打印常用启动参数的描述。</p>
<p style="text-indent: 2em">--jdkhome jdk-home-dir</p>
<p style="text-indent: 2em">使用指定的 JavaTM 2 JDK 版本，而不是缺省的 JDK。在 Microsoft Windows 系统上，IDE 启动程序在缺省情况下会查找注册表，使用最新的可用 JDK。</p>
<p style="text-indent: 2em">在升级 IDE 使用的 JDK 之前，应该备份用户目录。如果以后需要恢复到先前的 JDK，可以切换到已备份的用户目录，从而确保不丢失任何设置。</p>
<p style="text-indent: 2em">要切换 IDE 的用户目录，请使用 -userdir 开关，下面将对其进行详细介绍。</p>
<p style="text-indent: 2em">--cp:p additional-classpath</p>
<p style="text-indent: 2em">将指定类路径置于 IDE 的类路径之前。</p>
<p style="text-indent: 2em">--cp:a additional-classpath</p>
<p style="text-indent: 2em">将指定类路径附加到 IDE 的类路径上。</p>
<p style="text-indent: 2em">--open file</p>
<p style="text-indent: 2em">在源代码编辑器中打开文件。</p>
<p style="text-indent: 2em">--open file:line number</p>
<p style="text-indent: 2em">在源代码编辑器中打开文件，并将光标置于指定行上。</p>
<p style="text-indent: 2em">--laf UI-class-name</p>
<p style="text-indent: 2em">选择给定的类作为 IDE 的外观。以下是两个外观类的示例：</p>
<p style="text-indent: 2em">com.sun.java.swing.plaf.motif.MotifLookAndFeel</p>
<p style="text-indent: 2em">javax.swing.plaf.metal.MetalLookAndFeel</p>
<p style="text-indent: 2em">--fontsize size</p>
<p style="text-indent: 2em">设置 IDE 用户界面中的字体大小，以磅表示。如果未使用此选项，则字体大小为 11 磅。</p>
<p style="text-indent: 2em">--locale language[:country[:variant]]</p>
<p style="text-indent: 2em">激活指定的语言环境。</p>
<p style="text-indent: 2em">--userdir userdir</p>
<p style="text-indent: 2em">明确指定用户目录，该目录是存储用户设置的位置。</p>
<p style="text-indent: 2em">如果在 UNIX&amp;reg; 环境中未使用此选项，则缺省情况下在 HOME 目录中设置用户目录。如果在 Microsoft Windows 系统上未设置此选项，则用户目录是第一次启动 IDE 时指定的目录。</p>
<p style="text-indent: 2em">可以在&#8220;关于&#8221;对话框中确定当前用户目录。选择&#8220;帮助&#8221;&gt;&#8220;关于&#8221;。然后单击&#8220;详细信息&#8221;标签，并查看&#8220;用户目录&#8221;字段。</p>
<p style="text-indent: 2em">-J jvm-flags</p>
<p style="text-indent: 2em">将指定标记直接传递给 JVM 软件。</p>
<p style="text-indent: 2em">-J-Dsun.java2d.noddraw=true</p>
<p style="text-indent: 2em">防止使用 DirectX 进行呈现。此开关可能会防止在某些带有不合格图形卡的 Microsoft Windows 系统上出现问题。</p>
<p style="text-indent: 2em">-J-Dorg.netbeans.spi.java.project.support.ui.packageView.USE_TREE_VIEW=true</p>
<p style="text-indent: 2em">以基于目录的视图（而不是基于包的视图）显示&#8220;项目&#8221;窗口中的包。</p>
<p style="text-indent: 2em"></p>
<hr />
<p>&nbsp;</p>
<p style="text-indent: 2em">URL https://substance-netbeans.dev.java.net/files/documents/4104/35292/org-jvnet-substance-netbeans.nbm</p>
<p style="text-indent: 2em">下载之后</p>
<p style="text-indent: 2em">工具-〉更新中心-〉手动下载安装的模块-〉添加-〉加入你刚下载文件-〉下一步知道结束</p>
<p style="text-indent: 2em">安装完毕之后单击视图菜单里面会多出几个子菜单，然后自己去看吧</p>
<hr />
<p>&nbsp;</p>
<p style="text-indent: 2em">如果我要设成java默认的风格要怎么样设，</p>
<p style="text-indent: 2em">能不能说清楚一点</p>
<hr />
<p>&nbsp;</p>
<p style="text-indent: 2em">找到文件 nb安装目录/etc/netbeans.conf</p>
<p style="text-indent: 2em">-laf UI-class-name</p>
<p style="text-indent: 2em">选择给定的类作为 IDE 的外观。以下是两个外观类的示例：</p>
<p style="text-indent: 2em">com.sun.java.swing.plaf.motif.MotifLookAndFeel</p>
<p style="text-indent: 2em">javax.swing.plaf.metal.MetalLookAndFeel</p>
<p style="text-indent: 2em">默认的是windows系统风格不用设置</p>
<p style="text-indent: 2em">javax.swing.plaf.metal.MetalLookAndFeel这个市金属的风格，是swing的风格</p>
<p style="text-indent: 2em">看看那一段，已经很清楚了</p>
<p style="text-indent: 2em"></p>
<hr />
<p>　　 原来一个再eclipse 下的web项目因为经常出兼容问题 打算转到Netbeans下，项目编码使用utf－8，再网上找了些资料，终于搞定了netbeans的编码设置：</p>
<p>&nbsp;</p>
<p style="text-indent: 2em">　　</p>
<p style="text-indent: 2em">　　1》打开项目的属性，设置编译参数： -encoding utf-8</p>
<p style="text-indent: 2em">　　</p>
<p style="text-indent: 2em">　　 Project Properties -&gt; Build -&gt; Compiling Sources -&gt; Additional Compiler Options -&gt; "-encoding utf-8"</p>
<p style="text-indent: 2em">　　</p>
<p style="text-indent: 2em">　　2》设置项目源文件的编码是 utf-8</p>
<p style="text-indent: 2em">　　</p>
<p style="text-indent: 2em">　　 Select files, Window -&gt; Properties -&gt; Text -&gt; Encoding -&gt; "UTF-8".</p>
<p style="text-indent: 2em">　　</p>
<p style="text-indent: 2em">　　3》设置 选项－－》高级---&gt;java源文件设为utf-8</p>
<p style="text-indent: 2em">　　</p>
<p style="text-indent: 2em">　　 Tools -&gt; Options -&gt; Options -&gt; Editing -&gt; Java Sources -&gt; Export -&gt; Default Encoding -&gt; UTF-8.</p>
<p style="text-indent: 2em">　　</p>
<p style="text-indent: 2em">　　搞定!</p>
<p style="text-indent: 2em"></p>
<p style="text-indent: 2em">JDK6在Swing桌面程序上的改进很大(不说大家也知道!)</p>
<p style="text-indent: 2em">但默认配置下的NetBeans仍然 还是很慢。</p>
<p style="text-indent: 2em">下面讲讲我对NetBeans的配置看法</p>
<p style="text-indent: 2em">第一 调优JVM</p>
<p style="text-indent: 2em">&nbsp;&nbsp;&nbsp; 针对JVM的调优其实是最关键的一步,配置netbeans-5.5\etc\目录下的netbeans.conf文件,将netbeans_default_options替换如下</p>
<p style="text-indent: 2em">netbeans_default_options="-J-Xverify:none -J-Xms128m&nbsp;&nbsp; -J-Xmx128m&nbsp;&nbsp;&nbsp;&nbsp; -J-XX:CompileThreshold=10000&nbsp;&nbsp; -J-XX:ReservedCodeCacheSize=100m&nbsp;&nbsp; -J-XX:PermSize=120m&nbsp;&nbsp;&nbsp; -J-XX:+UseConcMarkSweepGC -J-XX:+UseParNewGC&nbsp;&nbsp;&nbsp;&nbsp; -J-XX:+UseFastAccessorMethods -J-XX:+UseThreadPriorities&nbsp;&nbsp; -J-XX:+AggressiveOpts&nbsp;&nbsp;&nbsp;&nbsp; -J-Dapple.laf.useScreenMenuBar=true&nbsp;&nbsp;&nbsp;&nbsp; --fontsize 14 "</p>
<p style="text-indent: 2em">好长哦o(&#8745;_&#8745;)o...随便讲讲含义吧</p>
<p style="text-indent: 2em">-J-XX:CompileThreshold=10000&nbsp;&nbsp; ：将10000个方法编译成本地代码（不利用JIT）</p>
<p style="text-indent: 2em">-J-XX:ReservedCodeCacheSize=100m ：设置缓存大小</p>
<p style="text-indent: 2em">-J-XX:+UseFastAccessorMethods&nbsp;&nbsp; ：将所有getter / setter 转换成本地代码</p>
<p style="text-indent: 2em">第二 环境设置</p>
<p style="text-indent: 2em">&nbsp;&nbsp; 这一步是在NetBeans IDE内部设置。在 工具--选项--高级选项；</p>
<p style="text-indent: 2em">&nbsp;&nbsp; 在 编辑器设置 中将 文本平滑&nbsp;&nbsp;&nbsp; 去掉（个人不喜欢这个，总感觉选上后有些字母边缘怪怪的）</p>
<p style="text-indent: 2em">&nbsp;&nbsp; 在 编辑器设置--java编辑器设置 中将 自动完成弹出窗口延时 设置为1,选中自动弹出javadoc窗口</p>
<p style="text-indent: 2em">&nbsp;&nbsp; 在 JAVA源代码 中将 错误标注限制 和 自动解析延迟 设置为1,另外 缺省编码 默认是GBK 建议可以改成 UTF-8.以便在移植源代码到非GBK编码平台的时候中文注释能正确显示。</p>
<p style="text-indent: 2em">&nbsp;&nbsp; 在 IDE配置--建议框架 中 的3个延迟时间都改为 1</p>
<p style="text-indent: 2em">第三 字体设置</p>
<p style="text-indent: 2em">默认情况下的NetBeans的字体真的很难看,可以将非注解的字体与字符串类型的全部设置为Courier New 14号字体，注释与字符串类型的字体设置为宋体 13号。设置完后是不是觉得很漂亮（不要打开 文本平滑 功能）</p>
<img src ="http://www.blogjava.net/conans/aggbug/210176.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/conans/" target="_blank">CONAN</a> 2008-06-23 22:37 <a href="http://www.blogjava.net/conans/articles/210176.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>