Netbeans 6.5 M1 已经发布,最新版本的NetBeans 增强了许多功能,同时也引入了许多值得期待的新特性.
其中我比较喜欢的是DataBase 的改进,Eclipse 项目导入变得比以前更方便了,可以正确的区分Web项目
和普通项目,还有Spring Hibernate 增强. GUI 中新增了JDK1.6 u10 中的look&feel 只要你用的是 JDK1.6 u10
就可以使用这个外观预览.数据绑定功能也改进了! 全新的多线程Debug 功能支持!
JavaScript 也加入的Debug功能,还加入了好几个Javascript 库,像JQuery ,Yahoo ui dojo 等等!
还新增了一个 "驼峰拼写" 代码补全功能. 很有意思.
JavaEE 的lib path 也变成了可变的了.此外还增加了快速搜索功能. 更方便搜索! 还有好多个特性呢!
还有PHP Groovy Ruby 等都有增强!
具体看下面的介绍! 英文太多了就不翻译了 大家自己看吧!
UNC paths on Windows
Now the NetBeans IDE supports UNC paths like ""computerName"sharedFolder" . 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.
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 #133773 ). 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.
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.
Certain IDE distributions (e.g. PHP IDE) don't require Java JDK to run on, JRE is enough.
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.
Quickly search for action or type is now easy. Use Ctrl-I.
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 named variable pointing to a folder and use this variable as a base for referring to JARs/Folders.
This feature further simplifies project sharing between users. In scenario where a project depends on JARs for which:
a named IDE variable can be used.
The variables are managed via Tools -> Variable menu item:
In above screenshot single variable is defined with these details:
When variable based JAR/Folder is added to project classpath you can see its path starting with variable name (and tooltip showing absolute path):
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":
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.
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:
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.
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 ide , subcomponent eclipse project import )
Support for creating applets that can be deployed via Java Web Start was added to NetBeans IDE. Note: the functionality is available in JDK 1.6.0 update 10.
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.
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.
Slided-in windows can keep their preferred size instead of being stretched to the whole height/width of the IDE window.
(see #135318 ).
Some window system features can be turned off by branding of core.windows module.
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.
(see #33281 ).
API in options.api module has been changed to allow open Options dialog with preselected subcategory (see #109538 ). In your code you can call OptionsDisplayer.getDefault().open("CategoryID/SubcategoryID"); where CategoryID and SubcategoryID are registration names from layer. For selection a panel under Miscellaneous category use OptionsDisplayer.getDefault().open(OptionsDisplayer.ADVANCED+"/SubcategoryID"); .
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.
The NetBeans IDE Early Access for PHP was released in April at the same time as NetBeans 6.1. Milestone 1 of NetBeans 6.5 now contains all features introduced in this release .
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.
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 NetBeans PHP Team Blog .
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.
Available also for PHP development. Right click the item and select "Find Usages" or hit Alt-F7.
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.
Show all callers/callees in the search scope of the selected member.
You can specify formatting settings individually for each project
Code completion improved. Just write first letters of each word in method to get smart code completion. For instance "iL" stands for invokeLater.
Encapsulate Fields Refactoring Improved. New options available.
Top voted enhancement finally implemented
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.
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.
Is now part of the Web & Java EE and Ruby bundles. No need to get the modules from the update center.
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:
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.
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 Navigate | Go to Spring Bean... or the keyboard short cut Alt + Shift + B to invoke the Go to Spring Bean dialog.
When refactoring Java Bean property getters and setters, the corresponding usages in the Spring XML Configuration files are also modified.
.
.
.
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 Editor Support in JSF Configuration Files and JSP Files .
Managed Beans | |
Resource Bundles | |
<managed-bean-class>foo.ManagedBean </managed-bean-class> | the Java file ManagedBean.java under package foo |
<to-view-id>/Page2.jsp </to-view-id> | the JSF page file Page2.jsp under the context root |
<h3> <h:outputText value =" #{ManagedBean .min}" /></h3> | the JSF configuration file on position where the managed bean been defined |
<h3> <h:outputText value =" #{ManagedBean.min }" /></h3> | the appropriate Java file on position where the getter for the property been defined |
Managed Beans | |
Folder / Package |
Managed Beans |
In NetBean 6.5, the Entity Classes from Database wizard has one additional panel to allow the user to configure the following mapping options:
The panel is at the last step of the wizard. It is optional.
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 UML Current Projects for additional information.
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.
Supported components in Milstone 1:
Databinding support in the custom property editors:
Generated code for empty DataSet:
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.
New Project Custom Component wizard.
Generated project and classes with one component descriptor and one producer.
Add Mobile Custom Component wizard.
Full description of this feature i available here: Custom Components API Project Support - DRAFT
Motivation is to extend group of existing SVG components to provide better support for creation of compelling UI on mobile platforms using SVG technology.
New components available in the SVG library:
SVG Components in action:
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.
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.
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.
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.
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.
Anytime the debugger displays the thread icon in the editor gutter, the user is informed that there is/are one or more suspended non-current 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->Threads navigation available in the editor gutter.
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.
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.
Current Model Summary (NB 6.1 and older):
New Model Summary:
When you select a ButtonGroup or some component in a ButtonGroup then the GUI builder shows you which components belong into this group.
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 javax.swing.UIManager design). Besides the design preview you can also set the Nimbus look and feel for runtime - this is easily possible for Desktop Java Application projects in the Project Properties window (go to the Desktop App panel).
New TreeModel property editor allows you to prototype your JTree easily.
We rewrote property editors for ListModel and ComboBoxModel. It is much easier to use them by now.
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.
Web Services nodes in the Services tab of Netbeans 6.5 support Drag-n-drop to Php files as shown below.
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.
Show all callers/callees of the selected function.
Direct call graph:
Reverse call graph:
C/C++ editors highlights basic errors. Semantic highlighting for typedefs, class fields and function names was added.