CONAN ZONE

你越挣扎我就越兴奋

BlogJava 首页 新随笔 联系 聚合 管理
  0 Posts :: 282 Stories :: 0 Comments :: 0 Trackbacks

NetBeans6.5 M1 众多期待的特性一览表!

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.

File Associations options panel and Open As... action

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.

file-associations.png

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.

open-as-action.png

Running some IDE distributions on JRE

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.

missing-jdk-warning.png

QuickSearch

Quickly search for action or type is now easy. Use Ctrl-I.

qs.png

Variable based paths in J2SE/J2EE projects

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:

  • it is not desirable to store them in VCS; and which
  • can be placed in different locations for different users

a named IDE variable can be used.

The variables are managed via Tools -> Variable menu item:

Manage-Variables.png

In above screenshot single variable is defined with these details:

Edit-Variable.png

When variable based JAR/Folder is added to project classpath you can see its path starting with variable name (and tooltip showing absolute path):

Project-Properties.png

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":

Add-JAR-Folder.png

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:

Broken-Reference.png

Eclipse project import and synchronization

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.

wizard1.png

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 )

Enhanced Java Web Start support

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.

JWSProjProps.png

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.

JWSExtRes.png

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.

JWSAppletParams.png

Platform

Sliding windows support original window sizes

Slided-in windows can keep their preferred size instead of being stretched to the whole height/width of the IDE window.

(see #135318 ).

Possibility to configure some Window System properties for applications based on Platform

Some window system features can be turned off by branding of core.windows module.

winsys_customization.png

TreeTableView replacement introduced

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 ).

Opening Options dialog with preselected subcategories

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"); .

Support allowing a user to drop a text into the palette

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.

PHP

Features first introduced in Early Access for PHP

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 .

Database-related code snippets

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.

php-database-table-snippet.png

Find Usages

Available also for PHP development. Right click the item and select "Find Usages" or hit Alt-F7.

php-find-usages.png

Multiple project configurations

  • running, debugging either as script or as web page in browser
  • index file, arguments ...

php-project-configs.png

Ajax

JavaScript Debugger

  • Supported browsers
    • Firefox 2.0.0.X
    • Requires Firebug 1.1beta. An automatic installation is attempted when not found.
  • Add & delete breakpoints in JavaScript code
    • Html Files
    • JavaScript Files
    • URL source resulting from server side technologies such as JSP
  • Manage debugger session
  • View & navigate source artifacts
    • Html Files
    • JavaScript files
    • URL source resulting from server side technologies such as JSP
  • View window/frame structure
  • View & navigate JavaScript Callstack
  • View local variables
  • Set & delete watches
  • View (static) browser DOM in the IDE
  • J2EE & Ruby Project integration
    • 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
    • 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:
      • Html files
      • JavaScript files

User Guide

JavaScript Library Manager

  • Utilizes NetBeans Library Manager to manage JavaScript libraries
  • Wizard to add JS libraries to Java EE, Ruby, or PHP projects (Tools->Add JavaScript Libraries)

Bundled JavaScript Libraries

  • Yahoo UI
  • WoodStock
  • jQuery
  • dojo
  • scriptaculous
  • prototype

Java

Javadoc Analyzer

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.

javadoc.png

Call Hierarchy

Show all callers/callees in the search scope of the selected member.

ch.png

Formatting Settings per Project

You can specify formatting settings individually for each project

sttings.png

CamelCase code completion

Code completion improved. Just write first letters of each word in method to get smart code completion. For instance "iL" stands for invokeLater.

cc.png

Improved Encapsulate Fields Refactoring

Encapsulate Fields Refactoring Improved. New options available.

encapsulate.png

Option to remove whitespace at end of line

Top voted enhancement finally implemented

Groovy

Editor

  • placeholder

Java SE Project Integration

Database

Improved New Connection dialog

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.

conndialog.jpg

SQL history dialog

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. sql_history_icon.png

sql_history.png

Server Support

GlassFish V3 integration module.

Is now part of the Web & Java EE and Ruby bundles. No need to get the modules from the update center.

Web frameworks (Spring, Hibernate, JSF, JSF CRUD Generator, JPA)

Spring

  • Improved Java class FQN completion

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: cc_step1.png

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. cc_step2.png

  • Go to Spring Bean dialog

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. menu_goto.png

goto_dialog.png

  • Refactoring support for Java properties

When refactoring Java Bean property getters and setters, the corresponding usages in the Spring XML Configuration files are also modified. ren_ref_pre.png

Hibernate (Available via Development Update center for M1)

  • Reverse Engineering support. With an existing configuration, POJOs and mapping files can be generated using this feature. See Reverse Engineering for more details

ReverseEngg.png

.

  • HQL query execution support. Execute HQL queries right inside the IDE. Queries can include joins and clauses. See HQL Editor for more details

HQLQueryEditor.png .

  • Refactoring of hibernate mapping files is supported. See Refactoring for more details.

.

JSF, JSF CRUD Generator

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 .

  • 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.
Example Code Completion UI
Managed Beans JsfEditorSupportCodeComplete1.gif

JsfEditorSupportCodeComplete2.gif
Resource Bundles JsfEditorSupportCodeComplete3.gif

JsfEditorSupportCodeComplete4.gif
  • Hyperlink: By using the Hyperlink inside the JSF configuration files and JSF JSP Pages, developers can fast navigate from one source to another reference.
JSF Configuration Files Example File opened
<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
JSF JSP Pages Example File opened
<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
  • 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.
Example Refactoring UI
Managed Beans JsfEditorSupportRefactoring1.gif
Folder / Package JsfEditorSupportRefactoring2.gif
  • 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.
Example Usages UI
Managed Beans JsfEditorSupportUsages.gif
  • The JSF CRUD Generator now applies default styles.

styled-jsfcrud.gif

JPA

In NetBean 6.5, the Entity Classes from Database wizard has one additional panel to allow the user to configure the following mapping options:

  • Association Fetch: can be default, eager or lazy. By default, it is default, meaning no fetch attribute will be added to the relationship annotations
  • 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.
  • Fully Qualified Database Table Names: if checked, catalog and schema attributes will be added on @Table. By default, it is not checked.
  • 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.

The panel is at the last step of the wizard. It is optional.

UML

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

Databinding

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:

  • TextField ( Text, Label)
  • ImageItem (Image, Label)
  • DateField (Date, Label)
  • StringItem (Text, Label)
  • rest of the Items ( Label)

Databinding support in the custom property editors:

mobilitypropertyeditor.png

Generated code for empty DataSet:

mobilitydataset.png

Custom Component Support

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.

mobilityccp1.png

Generated project and classes with one component descriptor and one producer.

mobilityccp3.png

Add Mobile Custom Component wizard.

mobilityccp5.png

Full description of this feature i available here: Custom Components API Project Support - DRAFT

New SVG Support

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:

  • SVGForm
  • Button
  • RadioButton
  • CheckBox
  • ComboBox
  • Label
  • List
  • Slider
  • Spinner
  • TextField

SVG Components in action:

widgets.gif

Debugger

New Multithreaded Debugging Support

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.

 

Debugging Window


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.

 

Current Thread Chooser


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.

 

'Other Thread(s) Suspended Here' Gutter Navigation


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.

 

Deadlock Detection


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.

 

New Threading Model

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):

  • Default breakpoint suspends all threads.
  • Step resumes all threads when invoked and suspends all threads when completed regardless there are threads intentionally suspended or not.
  • Evaluation is done only resuming the current thread (by default), which may easily lead to 'deadlock caused by debugger' in current model.
  • 'Step interrupted by a breakpoint' issue exists with default breakpoint.

New Model Summary:

  • Default breakpoint only suspends breakpoint thread.
  • Step only resumes current thread when invoked and suspends current thread when completed.
  • 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).
  • 'Step interrupted by a breakpoint' issue does not exist with default breakpoint. (Except the stepping thread itself encounters a breakpoint.)

GUI Builder

ButtonGroup visualization

When you select a ButtonGroup or some component in a ButtonGroup then the GUI builder shows you which components belong into this group.

buttonGroups.jpg

Preview in Nimbus look and feel

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).

nimbusPreview.jpg

TreeModel editor

New TreeModel property editor allows you to prototype your JTree easily.

treeModelEditor.jpg

ListModel and ComboBoxModel usability enhancements

We rewrote property editors for ListModel and ComboBoxModel. It is much easier to use them by now.

listModelEditor.jpg comboBoxModelEditor.jpg

Web Services

RESTful services from database

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.

Consuming popular SaaS services in Php

Web Services nodes in the Services tab of Netbeans 6.5 support Drag-n-drop to Php files as shown below.

PhpSaaSClient.png

C/C++

Code completion accuracy

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.

Call Graph

Show all callers/callees of the selected function.

Direct call graph:

direct_callgraph.png

Reverse call graph:

reverse_callgraph.png

Error highlighting and more types of semantic highlighting

C/C++ editors highlights basic errors. Semantic highlighting for typedefs, class fields and function names was added.

hl-ss.png

Ruby

  • Rake
    • Rake Runner (http://wiki.netbeans.org/RubyRake)
    • infrastructure overhaul
      • internal unification brings more smooth workflow to users
  • Debugger
    • support for conditional (expression) breakpoints
    • support for breakpoint on exception (catchpoint)
    • switched to the new engines versions
  • Projects
    • useful pre-generated Rakefile (clean, gem, packages, rdoc, spec, test, .... tasks)
    • possibility to pass JVM options to the JRuby (e.g. -Djruby.objectspace.enabled=true)
  • Platform
    • Rubinius Support
    • sudo support - 'gksu' so far (issue 128575)
    • Options for tweaking Gems fetching in Gem Manager (-a, -d)
  • Rails
    • updated the bundled Rails to 2.1.0
    • support for running the Rails console in different environments
    • possibility to specify the version of Rails for new projects (in case there are more than one version installed)
    • support for 'destroy' in the Rails generator
  • Test Runner
    • New Test Runner UI for displaying test results
posted on 2008-06-25 20:14 CONAN 阅读(499) 评论(0)  编辑  收藏 所属分类: NetBeans