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 ispossible to create projects and other resources on UNC paths.
File Associations options panel and Open As... actionA new panel in options dialog which allows to say to NetBeans thatfiles with certain extension should be treated as files with a certainMIME type (see #133773).You can add a new extension to the list of modify existing one. If youwant to restore default setting for selected extension, you just clickthe Default button.
In connection with the above change there was also added a new OpenAs... action. It is enabled only for files which are not recognized bythe IDE. User can choose one from supplied MIME types and from now onall files with this extension are treated as of choosen MIME type.
Running some IDE distributions on JRECertain 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 allmodules which user selects to be installed. If the user's IDE isrunning on JRE and the unsatified package dependency might indicatethat JDK is required, user is warned about it and the plugininstallation is not allowed.
QuickSearchQuickly search for action or type is now easy. Use Ctrl-I.
wiki: http://wiki.netbeans.org/QuickSearch UI spec:http://ui.netbeans.org/docs/ui/quicksearch/index.html Variable based paths in J2SE/J2EE projectsSince NetBeans 6.1 it is possible to control whether JAR/Folderadded 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 usersa 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 cansee its path starting with variable name (and tooltip showing absolutepath):
Variable based JAR/Fodler is added to classpath via standard meansof "Add Jar/Folder" button in classpath customizer (or "Add JAR/Folder"action on project's Libraries node in project's view). Custom filechooser is shown with one new option "Use Variable Path":
Just browse for your JAR/Folder and if selected file is under avariable the option gets enabled. Alternatively press "..." button andsetup a new variable.
If a user opens project with a variable based path and the variableis not defined in user's IDE then standard broken reference warning isshown to advice user to define variable:
Eclipse project import and synchronizationThe Eclipse project import feature facilitates mixed IDE development teams.It allows you to select Eclipse projects from an Eclipse workspaceand generate NetBeans projects for them.The generated NetBeans project keeps a link to the original Eclipse projectand 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)
Enhanced Java Web Start supportSupport 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 specifyexternal resources (usually other JNLP file in internet). Dialog isopened 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.
Platform Sliding windows support original window sizesSlided-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 PlatformSome window system features can be turned off by branding of core.windows module.
TreeTableView replacement introducedOutlineView is a new replacement for buggy TreeTableView. Itsupports drag and drop, in-place editing of tree cells, enhancedsorting etc. The data model is fully compatible with TreeTableView.
(see #33281).
Opening Options dialog with preselected subcategoriesAPI 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 paletteIt is possible to drag and drop any text to the Palette window tocreate a new code snippet. It works for HTML editor palette only at themoment, more document types will follow soon.
PHP Features first introduced in Early Access for PHPThe 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 theother NetBeans features. Of course, there is still the slim PHP editionof NetBeans, targeted for PHP development specifically.
See below for more features added in NetBeans 6.5 Milestone 1, thatwere not present in Early Access. Also, to keep up with the newfeatures added to NetBeans PHP support, make sure to check and bookmarkthe NetBeans PHP Team Blog.
Database-related code snippetsGenerate code to connect to a MySQL database and to display the datain a database table. These snippets are available under the GenerateCode action [Alt+Insert], just like in the Java editor.
Find UsagesAvailable also for PHP development. Right click the item and select "Find Usages" or hit Alt-F7.
Multiple project configurations running, debugging either as script or as web page in browser index file, arguments ... 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 filesUser 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 AnalyzerThisplugin provides ability to check and fix Javadoc comments in yoursource code. Just select project/package/files and invoke "Source |Analyze Javadoc".Auto comment functionality is back.
Call HierarchyShow all callers/callees in the search scope of the selected member.
Formatting Settings per ProjectYou can specify formatting settings individually for each project
CamelCase code completionCodecompletion improved. Just write first letters of each word in method toget smart code completion. For instance "iL" stands for invokeLater.
Improved Encapsulate Fields RefactoringEncapsulate Fields Refactoring Improved. New options available.
Option to remove whitespace at end of lineTop voted enhancement finally implemented
GroovyEditorplaceholder Java SE Project Integration Database Improved New Connection dialogNowthe dialog for creating a new database connection does not expect youto know the details of the JDBC URL to open a connection. If you wantto modify the URL, however, you can do so, just click on the "Show JDBCURL" checkbox. Changes to the URL are reflected in the fields and viceversa.
SQL history dialogSQLthat has been executed is saved to a file in the userdir and availablefor viewing in a dialog and also SQL can be selected and reinserted inan existing SQL file.
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 completionCode completion is now faster than the earlier version. Forefficiency, Java class FQN completion is now a two step process. Mostof the times, a user will need only classes defined locally in theproject (source classpath). Hence the first CTRL+SPACE will list onlythe items in the source classpath, as shown below:
If the user wishes to add an item not in the source classpath, hecan press CTRL+SPACE again. Also, if the typed prefix does not matchany local item, the completion will automatically switch to show allitems instead of just local items.
Go to Spring Bean dialogA Go to Spring Bean dialog is similar to the Go to Typedialog and will allow the user to quickly navigate to a given SpringBean 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.
Refactoring support for Java propertiesWhen refactoring Java Bean property getters and setters, thecorresponding usages in the Spring XML Configuration files are alsomodified.
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.
HQL query execution support. Execute HQL queries right inside the IDE. Queries can include joins and clauses. See HQL Editor for more details.
Refactoring of hibernate mapping files is supported. See Refactoring for more details..
JSF, JSF CRUD GeneratorTheeditor support for both JSF Configuration Files and JSF JSP Pages areboth 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 BeansIn NetBean 6.5, the Entity Classes from Database wizard has oneadditional panel to allow the user to configure the following mappingoptions:
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.
UMLNetBeansDevelopment is migrating UML to the NetBeans Visual Library. Themajority of the planned features are now implemented in the releasetrunk and the Development is focused on stabilizing the code forrelease. The new UML will be available in M2. Please see UML Current Projects for additional information.
Mobility DatabindingMobility Data binding provides a simple and consistent way forapplications 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:
Generated code for empty DataSet:
Custom Component SupportCustomComponent Support helps to create the Visual Mobile Designer CustomComponents. It generates all of the necessary Custom Componentinfrastructure including: Module project Infrastructure, componentsdescriptors 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
New SVG SupportMotivation is to extend group of existing SVG components to providebetter support for creation of compelling UI on mobile platforms usingSVG technology.
New components available in the SVG library:
SVGForm Button RadioButton CheckBox ComboBox Label List Slider Spinner TextFieldSVG Components in action:
Debugger New Multithreaded Debugging SupportThisis a summary description for the new Multithreaded Debugging Supportthat is available in M1 NB 6.5. These bits have been done as a firstphase of the overall NB debugger redesign effort, which goal is tosignificantly improve the debugging workflow and usability.
?
Debugging Window
In order to improve UI for multithreaded debugging and also willingto reduce the number of debugger views, a new (unifying) debugger viewis introduced. This view (referred as Debugging View) integratescurrent Sessions, Threads and Call Stack views being displayed in theExplorer group by default.
From the technical perspective, the Debug view is organized as (ingeneral) a list of sessions, having each session as a list of threads,each suspended thread than expandable to its call stack and more. Debugview is customizable via context options only showing typically neededinfo by default. With the 'Suspend Table' switched on, any thread canbe resumed/suspended by one click on the dedicated button.
If there is the debugger counter displayed in the editor and anotherthread encounters a breakpoint, the current thread will not beautomatically switched. Instead, a non-modal panel is displayed in thebottom of Debugging view informing that there are new breakpoint hitswaiting; there is also a drop-down button switching the debugger to thenext (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 fitsto the workflow.
?
Current Thread Chooser
When doing a multithreaded debugging, it is often needed to quicklyswitch between particular threads; e.g. when doing a stepping sequencein two threads alternately. For such purpose we introduce a newaction--Current Thread Chooser (CTRL+8). In fact, it is an analogy toapplication switching common in OS environment. With this feature, itis really straightforward to revisit any thread for debugging or switchto 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-currentthread(s) at this line. The list of these threads can be seen in theicon tooltip, and it is also possible to switch debugging to any ofthese threads via the context menu. Strictly speeking, it is theSource->Threads navigation available in the editor gutter.
?
Deadlock Detection
The debugger automatically searches for deadlock among all suspendedthreads. When a deadlock is detected, a non-modal notification isdisplayed having emphasized involved threads. Detailed monitor info isalso available displayed in dedicated monitor nodes.
?
New Threading ModelIn order to improve multithreaded debugging, we decided to change theway how debugger manages debuggee threads. The main issue related tocurrent model (NB 6.1 and older) is likely the fact that any stepresumes all threads regardless there are threads intentionallysuspended by the user or not. This can be limiting e.g. in case ofdebugging race conditions or deadlock issues. The natural solution tothis problem is to resume only the current thread leaving other threadssuspended if they are (may have happened via breakpoints or Suspendaction). Obviously, this change needs the default breakpoint to suspendonly the breakpoint thread, otherwise stepping could lead to so-calledDeadlock 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 visualizationWhen you select a ButtonGroup or some component in a ButtonGroup thenthe GUI builder shows you which components belong into this group.
Preview in Nimbus look and feelIf you use JDK 6 Update 10 then you can preview your form in the newNimbus 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).
TreeModel editorNew TreeModel property editor allows you to prototype your JTree easily.
ListModel and ComboBoxModel usability enhancementsWe rewrote property editors for ListModel and ComboBoxModel.It is much easier to use them by now.
Web Services RESTful services from databaseA new wizard allows for the creation of RESTful, JSR311-basedservices directly from database tables. This facility is in addition tothe wizard that creates services from JPA entities.
Consuming popular SaaS services in PhpWeb Services nodes in the Services tab of Netbeans 6.5 support Drag-n-drop to Php files as shown below.
C/C++ Code completion accuracyCodecompletion accuracy is much improved in milestone 1 compared toNetBeans 6.1. There are very few known cases where an incorrect choiceis presented. So the known "inaccuracy rate" is nearly 0. There areknown situations where valid choices are not presented to the user. Fora range of mid to large scale applications those cases (where validchoices are not shown) is under 5%. Work to further improve accuracy isongoing.
Call GraphShow all callers/callees of the selected function.
Direct call graph:
Reverse call graph:
Error highlighting and more types of semantic highlightingC/C++ editors highlights basic errors.Semantic highlighting for typedefs, class fields and function names was added.
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