The NetBeans IDE comes with MySQL database support. In the Services window, a MySQL node appears under the Databases node when the IDE detects a running MySQL server on the local machine at the default port. The node is also registered automatically under the following conditions:
The IDE comes with MySQL database support. In the Services window, a MySQL node appears under the Databases node when the IDE detects a running MySQL server on the local machine at the default port. The node is also registered automatically under the following conditions:
++
+
If the IDE detects a recognized installation of MySQL. This is currently MAMP on Macintosh and XAMPP on Windows.
+
If a MySQL connection is registered, the IDE auto-registers the MySQL node using the properties defined on the connection.
+
If the user creates a new connection to MySQL, the IDE auto-registers the MySQL node at that time.
+@@ -64,13 +64,15 @@
+
+
+
+-
Create Database. Brings up a dialog for creating a database, including sample databases.
++
Create Database. Brings up a dialog for creating a database, including sample databases.
++
++Note: When using MySQL 5.0 with Windows, some foreign characters may not be used when creating a database.
+
Start. Starts the database server. If the user chooses this action and no start or stop command is set, then they are prompted to set the command.
+
Stop. Stops the database server. If the user chooses this action and no start or stop command is set, then they are prompted to set the command.
+
Connect. Connects the IDE to the MySQL database server.
+
Disconnect. Disconnects the IDE ffrom the MySQL database server.
+
+-
Delete. Removes the MySQL node. It also marks the node as removed, so that next time the user starts up NetBeans the IDE will not auto-register the node again. The user will need to manually register the node using Databases > Register MySQL Server.
++
Delete. Removes the MySQL node. It also marks the node as removed, so that next time the user starts up the IDE will not auto-register the node again. The user will need to manually register the node using Databases > Register MySQL Server.
+
Refresh. Refreshes the list of databases based on what's currently on the server.
+
Run Administration Tool. Brings up the administration tool that is registered with the runtime. The provider either invokes the admin tool as a separate system process, or if it is a web-based tool, brings up the provided URL in the default browser. If the administer command has not been set, then when the user picks the action, they are prompted to set the path to the command.
+
Properties. Brings up a dialog that allows the user to configure important settings for the server. There are two tabs, one for basic settings and one for setting command paths to administrative commands (start, stop, administer)
+@@ -91,6 +93,7 @@
+ are not logged.
+
Disable Debug. This terminates the debugging function.
+
++
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 db/libsrc/org/netbeans/lib/ddl/resources/dbspec.plist
+--- a/db/libsrc/org/netbeans/lib/ddl/resources/dbspec.plist Fri Nov 07 11:48:18 2008 +0100
++++ b/db/libsrc/org/netbeans/lib/ddl/resources/dbspec.plist Tue Mar 10 13:53:55 2009 +0300
+@@ -904,7 +904,7 @@
+ };
+
+ RemoveColumnCommand = {
+- Supported = false;
++ Supported = true;
+ };
+
+ };
+diff -r 76d51071af8a -r af9499d919b8 db/nbproject/project.properties
+--- a/db/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/db/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -42,7 +42,7 @@
+ javadoc.arch=${basedir}/arch.xml
+ javadoc.apichanges=${basedir}/apichanges.xml
+
+-spec.version.base=1.30.1
++spec.version.base=1.30.3
+
+ extra.module.files=modules/ext/ddl.jar
+
+diff -r 76d51071af8a -r af9499d919b8 db/src/org/netbeans/modules/db/explorer/actions/AddIndexAction.java
+--- a/db/src/org/netbeans/modules/db/explorer/actions/AddIndexAction.java Fri Nov 07 11:48:18 2008 +0100
++++ b/db/src/org/netbeans/modules/db/explorer/actions/AddIndexAction.java Tue Mar 10 13:53:55 2009 +0300
+@@ -42,22 +42,23 @@
+ package org.netbeans.modules.db.explorer.actions;
+
+ import java.sql.*;
+-import java.text.MessageFormat;
+ import java.util.*;
+-import org.netbeans.modules.db.explorer.DbUtilities;
+
+-import org.openide.*;
++import java.util.logging.Level;
++import java.util.logging.Logger;
++import org.netbeans.api.db.explorer.DatabaseException;
+ import org.openide.nodes.*;
+
+-import org.netbeans.lib.ddl.*;
+ import org.netbeans.lib.ddl.impl.*;
+-import org.netbeans.lib.ddl.adaptors.*;
+ import org.netbeans.modules.db.explorer.*;
+ import org.netbeans.modules.db.explorer.dlg.*;
+ import org.netbeans.modules.db.explorer.nodes.*;
+ import org.netbeans.modules.db.explorer.infos.*;
++import org.openide.util.RequestProcessor;
+
+ public class AddIndexAction extends DatabaseAction {
++ private static final Logger LOGGER = Logger.getLogger(AddIndexAction.class .getName());
++
+ public void performAction (Node[] activatedNodes) {
+ Node node;
+ if (activatedNodes != null && activatedNodes.length>0)
+@@ -67,7 +68,7 @@
+
+ try {
+ DatabaseNodeInfo info = (DatabaseNodeInfo)node.getCookie(DatabaseNodeInfo.class);
+- IndexListNodeInfo nfo = (IndexListNodeInfo)info.getParent(nodename);
++ final IndexListNodeInfo nfo = (IndexListNodeInfo)info.getParent(nodename);
+
+ String tablename = (String)nfo.get(DatabaseNode.TABLE);
+ String columnname = (String)nfo.get(DatabaseNode.COLUMN);
+@@ -93,12 +94,24 @@
+ throw new Exception(bundle().getString("EXC_NoUsableColumnInPlace")); // NOI18N
+
+ // Create and execute command
+- AddIndexDialog dlg = new AddIndexDialog(cols, spec, info);
++ final AddIndexDialog dlg = new AddIndexDialog(cols, spec, info);
+ dlg.setIndexName(tablename + "_idx"); // NOI18N
+ if (dlg.run()) {
+- nfo.addIndex(dlg.getIndexName());
++ RequestProcessor.getDefault().post(new Runnable() {
++ public void run() {
++ try {
++ nfo.addIndex(dlg.getIndexName());
++ nfo.refreshChildren();
++ } catch (DatabaseException dbe) {
++ LOGGER.log(Level.INFO, dbe.getMessage(), dbe);
++ DbUtilities.reportError(bundle().getString("ERR_UnableToAddIndex"), dbe.getMessage()); // NOI18N
++ }
++
++ }
++ });
+ }
+ } catch(Exception exc) {
++ LOGGER.log(Level.INFO, exc.getMessage(), exc);
+ DbUtilities.reportError(bundle().getString("ERR_UnableToAddIndex"), exc.getMessage()); // NOI18N
+ }
+ }
+diff -r 76d51071af8a -r af9499d919b8 db/src/org/netbeans/modules/db/explorer/dlg/LabeledTextFieldDialog.form
+--- a/db/src/org/netbeans/modules/db/explorer/dlg/LabeledTextFieldDialog.form Fri Nov 07 11:48:18 2008 +0100
++++ b/db/src/org/netbeans/modules/db/explorer/dlg/LabeledTextFieldDialog.form Tue Mar 10 13:53:55 2009 +0300
+@@ -22,7 +22,7 @@
+
+
+
+-
++
+
+
+
+@@ -54,21 +54,29 @@
+
+
+
+-
++
+
+
+
+
+
+
+-
++
+
+
++
++
++
++
++
++
++
++
+
+
+
+
+-
++
+
+
+
+@@ -88,13 +96,21 @@
+
+
+
++
++
++
++
++
++
++
++
+
+
+
+
+
+
+-
++
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 db/src/org/netbeans/modules/db/explorer/dlg/LabeledTextFieldDialog.java
+--- a/db/src/org/netbeans/modules/db/explorer/dlg/LabeledTextFieldDialog.java Fri Nov 07 11:48:18 2008 +0100
++++ b/db/src/org/netbeans/modules/db/explorer/dlg/LabeledTextFieldDialog.java Tue Mar 10 13:53:55 2009 +0300
+@@ -60,8 +60,8 @@
+ /** Creates new form LabeledTextFieldDialog */
+ public LabeledTextFieldDialog(String notes)
+ {
+- String title = bundle.getString("RecreateTableRenameTable");
+- String lab = bundle.getString("RecreateTableNewName");
++ String title = bundle.getString("RecreateTableRenameTable"); // NOI18N
++ String lab = bundle.getString("RecreateTableNewName"); // NOI18N
+ original_notes = notes;
+
+ initComponents();
+@@ -71,7 +71,7 @@
+ Mnemonics.setLocalizedText(titleLabel, lab);
+ titleLabel.getAccessibleContext().setAccessibleDescription(bundle.getString("ACS_RecreateTableNewNameA11yDesc")); // NOI18N
+
+- Mnemonics.setLocalizedText(descLabel, bundle.getString("RecreateTableRenameNotes"));
++ Mnemonics.setLocalizedText(descLabel, bundle.getString("RecreateTableRenameNotes")); // NOI18N
+ descLabel.getAccessibleContext().setAccessibleDescription(bundle.getString("ACS_RecreateTableRenameNotesA11yDesc")); // NOI18N
+ Mnemonics.setLocalizedText(editButton, bundle.getString("EditCommand")); // NOI18N
+ editButton.setToolTipText(bundle.getString("ACS_EditCommandA11yDesc")); // NOI18N
+@@ -86,7 +86,7 @@
+ }
+ };
+
+- getAccessibleContext().setAccessibleDescription(bundle.getString("ACS_RecreateTableDialogA11yDesc"));
++ getAccessibleContext().setAccessibleDescription(bundle.getString("ACS_RecreateTableDialogA11yDesc")); // NOI18N
+
+ DialogDescriptor descriptor = new DialogDescriptor(this, title, true, listener);
+ dialog = DialogDisplayer.getDefault().createDialog(descriptor);
+@@ -134,7 +134,7 @@
+ isEditMode = !isEditMode;
+
+ if (isEditMode) { // NOI18N
+- Mnemonics.setLocalizedText(editButton, bundle.getString("ReloadCommand"));
++ Mnemonics.setLocalizedText(editButton, bundle.getString("ReloadCommand")); // NOI18N
+ editButton.setToolTipText(bundle.getString("ACS_ReloadCommandA11yDesc")); // NOI18N
+ notesArea.setEditable( true );
+ notesArea.setEnabled(true);
+@@ -144,12 +144,12 @@
+ textField.setBackground(titleLabel.getBackground()); // grey
+ } else {
+ // reload script from file
+- Mnemonics.setLocalizedText(editButton, bundle.getString("EditCommand"));
++ Mnemonics.setLocalizedText(editButton, bundle.getString("EditCommand")); // NOI18N
+ editButton.setToolTipText(bundle.getString("ACS_EditCommandA11yDesc")); // NOI18N
+ notesArea.setText(original_notes);
+ notesArea.setEditable( false );
+ notesArea.setEnabled(false);
+- notesArea.setDisabledTextColor(javax.swing.UIManager.getColor("Label.foreground"));
++ notesArea.setDisabledTextColor(javax.swing.UIManager.getColor("Label.foreground")); // NOI18N
+ textField.setEditable( true );
+ textField.setBackground(notesArea.getBackground()); // grey
+ notesArea.setBackground(titleLabel.getBackground()); // white
+@@ -162,7 +162,7 @@
+ * WARNING: Do NOT modify this code. The content of this method is
+ * always regenerated by the Form Editor.
+ */
+- //
++ // //GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ titleLabel = new javax.swing.JLabel();
+@@ -172,6 +172,12 @@
+ notesArea = new javax.swing.JTextArea();
+ editButton = new javax.swing.JButton();
+
++ titleLabel.setText(bundle.getString("LabeledTextFieldDialog.titleLabel.text")); // NOI18N
++
++ textField.setText(bundle.getString("LabeledTextFieldDialog.textField.text")); // NOI18N
++
++ descLabel.setText(bundle.getString("LabeledTextFieldDialog.descLabel.text")); // NOI18N
++
+ notesArea.setColumns(20);
+ notesArea.setEditable(false);
+ notesArea.setLineWrap(true);
+@@ -179,7 +185,10 @@
+ notesArea.setWrapStyleWord(true);
+ notesArea.setEnabled(false);
+ notesAreaScrollPane.setViewportView(notesArea);
++ notesArea.getAccessibleContext().setAccessibleName(bundle.getString("ACS_RecreateTableTableScriptTextAreaA11yName")); // NOI18N
++ notesArea.getAccessibleContext().setAccessibleDescription(bundle.getString("ACS_RecreateTableTableScriptTextAreaA11yDesc")); // NOI18N
+
++ editButton.setText(bundle.getString("LabeledTextFieldDialog.editButton.text")); // NOI18N
+ editButton.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ editButtonActionPerformed(evt);
+@@ -197,7 +206,7 @@
+ .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
+ .add(titleLabel)
+ .add(18, 18, 18)
+- .add(textField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 437, Short.MAX_VALUE))
++ .add(textField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 485, Short.MAX_VALUE))
+ .add(org.jdesktop.layout.GroupLayout.LEADING, descLabel)
+ .add(org.jdesktop.layout.GroupLayout.LEADING, editButton))
+ .addContainerGap())
+@@ -217,7 +226,10 @@
+ .add(editButton)
+ .addContainerGap())
+ );
+- }//
++
++ textField.getAccessibleContext().setAccessibleName(bundle.getString("ACS_RecreateTableNewNameTextFieldA11yName")); // NOI18N
++ textField.getAccessibleContext().setAccessibleDescription(bundle.getString("ACS_RecreateTableNewNameTextFieldA11yDesc")); // NOI18N
++ }// //GEN-END:initComponents
+
+ private void editButtonActionPerformed(java.awt.event.ActionEvent evt) {
+ updateState();
+@@ -231,13 +243,13 @@
+ private String original_notes;
+ private ResourceBundle bundle = NbBundle.getBundle("org.netbeans.modules.db.resources.Bundle"); //NOI18N
+
+- // Variables declaration - do not modify
++ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JLabel descLabel;
+ private javax.swing.JButton editButton;
+ private javax.swing.JTextArea notesArea;
+ private javax.swing.JScrollPane notesAreaScrollPane;
+ private javax.swing.JTextField textField;
+ private javax.swing.JLabel titleLabel;
+- // End of variables declaration
++ // End of variables declaration//GEN-END:variables
+
+ }
+diff -r 76d51071af8a -r af9499d919b8 db/src/org/netbeans/modules/db/explorer/dlg/NewConnectionPanel.java
+--- a/db/src/org/netbeans/modules/db/explorer/dlg/NewConnectionPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/db/src/org/netbeans/modules/db/explorer/dlg/NewConnectionPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -884,6 +884,7 @@
+ public void run() {
+ progressHandle = ProgressHandleFactory.createHandle(getMessage("ConnectionProgress_Connecting"));
+ progressHandle.start();
++ enableInput(false);
+ }
+ });
+ }
+@@ -911,11 +912,28 @@
+ public void run() {
+ if (progressHandle != null) {
+ progressHandle.finish();
++ enableInput(true);
+ }
+ }
+ });
+ }
+
++ private void enableInput(boolean enable) {
++ fieldInputCheckBox.setEnabled(enable);
++ directInputCheckBox.setEnabled(enable);
++ templateComboBox.setEnabled(enable);
++ userField.setEnabled(enable);
++ passwordField.setEnabled(enable);
++ passwordCheckBox.setEnabled(enable);
++ showUrlCheckBox.setEnabled(enable);
++ urlField.setEnabled(enable);
++ directUrlField.setEnabled(enable);
++
++ for (Entry entry : urlFields.entrySet()) {
++ entry.getValue().getField().setEnabled(enable);
++ }
++ }
++
+ private void resetProgress() {
+ if (progressHandle != null) {
+ progressHandle.setDisplayName(""); // NOI18N
+diff -r 76d51071af8a -r af9499d919b8 db/src/org/netbeans/modules/db/explorer/infos/Bundle.properties
+--- a/db/src/org/netbeans/modules/db/explorer/infos/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/db/src/org/netbeans/modules/db/explorer/infos/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -34,4 +34,5 @@
+ # Contributor(s):
+ #
+ # Portions Copyrighted 2008 Sun Microsystems, Inc.
+-MSG_ConnectionLost=Connection to the database was lost. Do you want to try to reconnect?
+\ No newline at end of file
++MSG_ConnectionLost=Connection to the database was lost. Do you want to try to reconnect?
++LBL_JavaDB_DeleteNotSupported=Java DB version {0} does not support column deletion.
+\ No newline at end of file
+diff -r 76d51071af8a -r af9499d919b8 db/src/org/netbeans/modules/db/explorer/infos/ColumnNodeInfo.java
+--- a/db/src/org/netbeans/modules/db/explorer/infos/ColumnNodeInfo.java Fri Nov 07 11:48:18 2008 +0100
++++ b/db/src/org/netbeans/modules/db/explorer/infos/ColumnNodeInfo.java Tue Mar 10 13:53:55 2009 +0300
+@@ -43,9 +43,13 @@
+
+ import java.io.IOException;
+ import java.sql.ResultSet;
++import java.sql.SQLException;
+ import java.util.HashMap;
+ import java.util.Map;
+ import java.text.MessageFormat;
++import java.util.Vector;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.netbeans.modules.db.explorer.DbUtilities;
+
+ import org.netbeans.lib.ddl.impl.AbstractCommand;
+@@ -57,10 +61,37 @@
+ import org.netbeans.lib.ddl.impl.TableColumn;
+
+ import org.netbeans.api.db.explorer.DatabaseException;
++import org.netbeans.modules.db.explorer.nodes.ColumnNode;
+ import org.netbeans.modules.db.explorer.nodes.DatabaseNode;
+
+ public class ColumnNodeInfo extends DatabaseNodeInfo {
+ static final long serialVersionUID =-1470704512178901918L;
++ private static final Logger LOGGER = Logger.getLogger(ColumnNode.class.getName());
++ private static final double JAVADB_MINOR_VERSION_SUPPORTED = 3; // Java DB minor version that supports column deletion
++ private static final String DELETE_ACTION_CLASS = "DeleteAction"; // NOI18N
++
++
++ @Override
++ public Vector getActions() {
++ // #149904 [65cat] Cannot remove database table column from action
++ Vector actions = super.getActions();
++ Vector revisedActions = new Vector();
++ Specification spec = (Specification) getSpecification();
++ // If Java DB doesn't support column deletion, exclude the Delete action
++ for (int i = 0; i < actions.size(); i++) {
++ if (spec.getProperties().get("DatabaseProductName").equals("Apache Derby") && !isSupported(spec)) { // NOI18N
++ if (actions.get(i) != null) {
++ String simpleClassName = actions.get(i).getClass().getSimpleName();
++ if (!simpleClassName.equals(DELETE_ACTION_CLASS)) {
++ revisedActions.add(actions.get(i));
++ }
++ }
++ } else {
++ revisedActions.add(actions.get(i));
++ }
++ }
++ return revisedActions;
++ }
+
+ public boolean canAdd(Map propmap, String propname) {
+ if (propname.equals("decdigits")) { //NOI18N
+@@ -287,5 +318,26 @@
+ return this.getColumnPosition() -
+ ((ColumnNodeInfo)o2).getColumnPosition();
+ }
+-
++
++ private boolean isSupported(Specification spec) {
++ try {
++ int majorVersion = spec.getMetaData().getDatabaseMajorVersion();
++ if (majorVersion < 10) {
++ return false;
++ }
++ String productVersion = spec.getMetaData().getDatabaseProductVersion();
++ int dotLoc = productVersion.indexOf("."); // NOI18N
++ if (dotLoc != -1) { // check if no "dot" in the release - if future Java DB versions do not support dot releases
++ int minorVersion = Integer.parseInt(productVersion.substring(dotLoc + 1, dotLoc + 2));
++ if (minorVersion < JAVADB_MINOR_VERSION_SUPPORTED) {
++ return false;
++ }
++ }
++ } catch (SQLException ex) {
++ LOGGER.log(Level.INFO, "ColumnNodeInfo.isSupported() threw SQLException", ex);
++ } catch (NumberFormatException nfe) {
++ LOGGER.log(Level.INFO, "ColumnNodeInfo.isSupported() threw NumberFormatException retrieving the version", nfe);
++ }
++ return true;
++ }
+ }
+diff -r 76d51071af8a -r af9499d919b8 db/src/org/netbeans/modules/db/explorer/infos/DatabaseNodeInfo.java
+--- a/db/src/org/netbeans/modules/db/explorer/infos/DatabaseNodeInfo.java Fri Nov 07 11:48:18 2008 +0100
++++ b/db/src/org/netbeans/modules/db/explorer/infos/DatabaseNodeInfo.java Tue Mar 10 13:53:55 2009 +0300
+@@ -50,7 +50,9 @@
+ import java.util.*;
+
+ import java.util.concurrent.ConcurrentHashMap;
++import java.util.logging.Level;
+ import java.util.logging.Logger;
++import javax.swing.SwingUtilities;
+ import javax.swing.event.ChangeListener;
+ import org.netbeans.api.db.explorer.ConnectionManager;
+ import org.openide.nodes.Node;
+@@ -59,7 +61,6 @@
+
+ import org.netbeans.lib.ddl.DatabaseSpecification;
+ import org.netbeans.lib.ddl.DatabaseSpecificationFactory;
+-import org.netbeans.lib.ddl.DBConnection;
+ import org.netbeans.lib.ddl.impl.DriverSpecification;
+ import org.netbeans.lib.ddl.util.PListReader;
+ import org.netbeans.api.db.explorer.DatabaseException;
+@@ -70,9 +71,12 @@
+ import org.netbeans.modules.db.explorer.actions.DatabaseAction;
+ import org.netbeans.modules.db.explorer.nodes.DatabaseNode;
+ import org.netbeans.modules.db.util.UIUtils;
++import org.openide.DialogDisplayer;
++import org.openide.NotifyDescriptor;
+ import org.openide.util.ChangeSupport;
+ import org.openide.util.Mutex;
+ import org.openide.util.Mutex.Action;
++import org.openide.util.RequestProcessor;
+
+ public class DatabaseNodeInfo extends ConcurrentHashMap
+ implements Node.Cookie, Comparable {
+@@ -355,11 +359,30 @@
+ }
+
+ public void refreshChildren() throws DatabaseException {
++ // Refresh involves going to the database, which shouldn't go on the
++ // dispatch thread.
++ if (SwingUtilities.isEventDispatchThread()) {
++ RequestProcessor.getDefault().post(new Runnable() {
++ public void run() {
++ try {
++ refreshChildrenSync();
++ } catch (Exception e) {
++ LOGGER.log(Level.INFO, e.getMessage(), e);
++ DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Exception(e));
++ }
++ }
++ });
++ } else {
++ refreshChildrenSync();
++ }
++ }
++
++ private void refreshChildrenSync() throws DatabaseException {
+ // create list (infos)
+ Vector children = loadChildren(new Vector());
+
+ put(DatabaseNodeInfo.CHILDREN, children);
+-
++
+ notifyChange();
+ }
+
+diff -r 76d51071af8a -r af9499d919b8 db/src/org/netbeans/modules/db/util/DataComboBoxSupport.java
+--- a/db/src/org/netbeans/modules/db/util/DataComboBoxSupport.java Fri Nov 07 11:48:18 2008 +0100
++++ b/db/src/org/netbeans/modules/db/util/DataComboBoxSupport.java Tue Mar 10 13:53:55 2009 +0300
+@@ -41,21 +41,15 @@
+
+ package org.netbeans.modules.db.util;
+
+-import java.awt.Color;
+ import java.awt.Component;
+-import java.awt.Dimension;
+ import java.awt.event.ActionEvent;
+ import java.awt.event.ActionListener;
+-import java.awt.event.InputEvent;
+-import java.awt.event.KeyAdapter;
+-import java.awt.event.KeyEvent;
+ import javax.swing.AbstractListModel;
+ import javax.swing.ComboBoxModel;
+ import javax.swing.DefaultListCellRenderer;
+ import javax.swing.JComboBox;
+ import javax.swing.JLabel;
+ import javax.swing.JList;
+-import javax.swing.JSeparator;
+ import javax.swing.SwingUtilities;
+ import javax.swing.event.ListDataEvent;
+ import javax.swing.event.ListDataListener;
+@@ -64,7 +58,7 @@
+
+ /**
+ * This is an utility class for filling combo boxes with some data (usually
+- * some items). The combo box has a separator item and a "Add item" item allowing
++ * some items). The combo box has a "New item" item allowing
+ * the user to invoke the adding of new items to the combo box. The client of
+ * this class should provide a {@link DataComboBoxModel} and call
+ * the {@link #connect} method.
+@@ -72,35 +66,15 @@
+ * @author Andrei Badea
+ */
+ public final class DataComboBoxSupport {
+-
+ private final DataComboBoxModel dataModel;
+ private final boolean allowAdding;
+
+ private Object previousItem = null;
+ private Object previousNonSpecialItem = null;
+- private int previousIndex = -1;
+
+ private boolean performingNewItemAction = false;
+
+ /**
+- * Serves as the separator item.
+- */
+- private static final class Separator extends JSeparator {
+-
+- Separator() {
+- setForeground(Color.BLACK);
+- }
+-
+- public Dimension getPreferredSize() {
+- Dimension size = super.getPreferredSize();
+- return new Dimension(size.width, 1);
+- }
+- }
+-
+- /** Not private because used in tests. */
+- static final Separator SEPARATOR_ITEM = new Separator();
+-
+- /**
+ * Serves as the new item. Not private because used in tests.
+ */
+ final Object NEW_ITEM = new Object() {
+@@ -113,13 +87,12 @@
+ DataComboBoxSupport(JComboBox comboBox, DataComboBoxModel dataModel, boolean allowAdding) {
+ this.dataModel = dataModel;
+ this.allowAdding = allowAdding;
+-
++
+ comboBox.setEditable(false);
+
+ comboBox.setModel(new ItemComboBoxModel());
+
+ comboBox.setRenderer(new ItemListCellRenderer());
+- comboBox.addKeyListener(new ItemKeyListener());
+ comboBox.addActionListener(new ItemActionListener());
+ comboBox.addPopupMenuListener(new ItemPopupMenuListener());
+ }
+@@ -139,7 +112,7 @@
+ }
+
+ private boolean isSpecialItem(Object item) {
+- return item == SEPARATOR_ITEM || item == NEW_ITEM;
++ return item == NEW_ITEM;
+ }
+
+ private void setPreviousNonSpecialItem(JComboBox comboBox) {
+@@ -169,11 +142,9 @@
+ }
+ }
+
+- // there are the delegate items, SEPARATOR_ITEM, NEW_ITEM
++ // there are the delegate items and NEW_ITEM
+ if (index >= 0 && index < getDelegate().getSize()) {
+ return getDelegate().getElementAt(index);
+- } else if (index == getSize() - 2) {
+- return SEPARATOR_ITEM;
+ } else if (index == getSize() - 1) {
+ return NEW_ITEM;
+ } else {
+@@ -187,9 +158,8 @@
+
+ public int getSize() {
+ // 1 = NEW_ITEM
+- // 2 = SEPARATOR, NEW_ITEM
+ if (allowAdding) {
+- return getDelegate().getSize() == 0 ? 1 : getDelegate().getSize() + 2;
++ return getDelegate().getSize() == 0 ? 1 : getDelegate().getSize() + 1;
+ } else {
+ return getDelegate().getSize();
+ }
+@@ -197,7 +167,6 @@
+
+ public void setSelectedItem(Object anItem) {
+ previousItem = getDelegate().getSelectedItem();
+- previousIndex = getItemIndex(previousItem);
+
+ if (!isSpecialItem(previousItem)) {
+ previousNonSpecialItem = previousItem;
+@@ -254,8 +223,6 @@
+ String displayName = dataModel.getItemDisplayName(value);
+ label.setText(dataModel.getItemDisplayName(value));
+ label.setToolTipText(dataModel.getItemTooltipText(value));
+- } else if (value == SEPARATOR_ITEM) {
+- return SEPARATOR_ITEM;
+ } else if (value != null) {
+ label.setText(value.toString());
+ label.setToolTipText(null);
+@@ -265,73 +232,32 @@
+ }
+ }
+
+- private final class ItemKeyListener extends KeyAdapter {
+-
+- public void keyPressed(KeyEvent e) {
+- JComboBox comboBox = (JComboBox)e.getSource();
+-
+- int keyCode = e.getKeyCode();
+- if (KeyEvent.VK_ENTER == keyCode) {
+- Object selectedItem = comboBox.getSelectedItem();
+- if (selectedItem == NEW_ITEM) {
+- performingNewItemAction = true;
+- try {
+- comboBox.setPopupVisible(false);
+- e.consume();
+- dataModel.newItemActionPerformed();
+- } finally {
+- performingNewItemAction = false;
+- }
+-
+- setPreviousNonSpecialItem(comboBox);
+- }
+- }
+- }
+- }
+-
+ private final class ItemActionListener implements ActionListener {
+
+ public void actionPerformed(ActionEvent e) {
+ final JComboBox comboBox = (JComboBox)e.getSource();
+
+ Object selectedItem = comboBox.getSelectedItem();
+- if (selectedItem == SEPARATOR_ITEM) {
+- int newIndex = -1;
+- if (previousIndex != -1) {
+- // skipping the separator when moving up/down with the arrow keys
+- int selectedIndex = comboBox.getSelectedIndex();
+- if (selectedIndex > previousIndex) {
+- // moving down
+- newIndex = selectedIndex + 1;
+- } else {
+- // moving up
+- newIndex= selectedIndex - 1;
++ if (selectedItem == NEW_ITEM) {
++ performingNewItemAction = true;
++ try {
++ comboBox.setPopupVisible(false);
++ dataModel.newItemActionPerformed();
++ } finally {
++ performingNewItemAction = false;
++ }
++
++ setPreviousNonSpecialItem(comboBox);
++ // we (or maybe the client) have just selected an item inside an actionPerformed event,
++ // which will not send another actionPerformed event for the new item.
++ // We need to make sure all listeners get an event for the new item,
++ // thus...
++ final Object newSelectedItem = comboBox.getSelectedItem();
++ SwingUtilities.invokeLater(new Runnable() {
++ public void run() {
++ comboBox.setSelectedItem(newSelectedItem);
+ }
+- }
+- comboBox.setSelectedIndex(newIndex);
+- } else if ((e.getModifiers() & InputEvent.BUTTON1_MASK) != 0) {
+- // handling mouse click, see KeyEvent.getKeyModifiersText(e.getModifiers())
+- if (selectedItem == NEW_ITEM) {
+- performingNewItemAction = true;
+- try {
+- comboBox.setPopupVisible(false);
+- dataModel.newItemActionPerformed();
+- } finally {
+- performingNewItemAction = false;
+- }
+-
+- setPreviousNonSpecialItem(comboBox);
+- // we (or maybe the client) have just selected an item inside an actionPerformed event,
+- // which will not send another actionPerformed event for the new item.
+- // We need to make sure all listeners get an event for the new item,
+- // thus...
+- final Object newSelectedItem = comboBox.getSelectedItem();
+- SwingUtilities.invokeLater(new Runnable() {
+- public void run() {
+- comboBox.setSelectedItem(newSelectedItem);
+- }
+- });
+- }
++ });
+ }
+ }
+ }
+diff -r 76d51071af8a -r af9499d919b8 db/test/unit/src/org/netbeans/api/db/explorer/support/DatabaseExplorerUIsTest.java
+--- a/db/test/unit/src/org/netbeans/api/db/explorer/support/DatabaseExplorerUIsTest.java Fri Nov 07 11:48:18 2008 +0100
++++ b/db/test/unit/src/org/netbeans/api/db/explorer/support/DatabaseExplorerUIsTest.java Tue Mar 10 13:53:55 2009 +0300
+@@ -85,7 +85,7 @@
+ initConnections();
+ JComboBox combo = connect();
+
+- assertTrue("Wrong number of items in the combobox", combo.getItemCount() == 4);
++ assertTrue("Wrong number of items in the combobox", combo.getItemCount() == 3);
+
+ assertSame(dbconn2, combo.getItemAt(0));
+ assertSame(dbconn1, combo.getItemAt(1));
+diff -r 76d51071af8a -r af9499d919b8 db/test/unit/src/org/netbeans/modules/db/util/DataComboBoxSupportTest.java
+--- a/db/test/unit/src/org/netbeans/modules/db/util/DataComboBoxSupportTest.java Fri Nov 07 11:48:18 2008 +0100
++++ b/db/test/unit/src/org/netbeans/modules/db/util/DataComboBoxSupportTest.java Tue Mar 10 13:53:55 2009 +0300
+@@ -80,8 +80,7 @@
+
+ assertEquals("foo", comboBox.getItemAt(0));
+ assertEquals("bar", comboBox.getItemAt(1));
+- assertSame(support.SEPARATOR_ITEM, comboBox.getItemAt(2));
+- assertEquals("Add", comboBox.getItemAt(3).toString());
++ assertEquals("Add", comboBox.getItemAt(2).toString());
+ assertEquals("The old selected item was removed, nothing should be selected now", -1, comboBox.getSelectedIndex());
+
+ comboBox.setSelectedIndex(1); // bar
+@@ -89,8 +88,7 @@
+ listModel.setItems(items);
+
+ assertEquals("bar", comboBox.getItemAt(0));
+- assertSame(support.SEPARATOR_ITEM, comboBox.getItemAt(1));
+- assertEquals("Add", comboBox.getItemAt(2).toString());
++ assertEquals("Add", comboBox.getItemAt(1).toString());
+ assertEquals("Bar should still be selected", 0, comboBox.getSelectedIndex());
+
+ items.add("new");
+@@ -98,8 +96,7 @@
+
+ assertEquals("bar", comboBox.getItemAt(0));
+ assertEquals("new", comboBox.getItemAt(1));
+- assertSame(support.SEPARATOR_ITEM, comboBox.getItemAt(2));
+- assertEquals("Add", comboBox.getItemAt(3).toString());
++ assertEquals("Add", comboBox.getItemAt(2).toString());
+ assertEquals("new", comboBox.getSelectedItem());
+ assertEquals("New should be selected", 1, comboBox.getSelectedIndex());
+ }
+diff -r 76d51071af8a -r af9499d919b8 db/test/unit/src/org/netbeans/modules/db/util/DatabaseExplorerInternalUIsTest.java
+--- a/db/test/unit/src/org/netbeans/modules/db/util/DatabaseExplorerInternalUIsTest.java Fri Nov 07 11:48:18 2008 +0100
++++ b/db/test/unit/src/org/netbeans/modules/db/util/DatabaseExplorerInternalUIsTest.java Tue Mar 10 13:53:55 2009 +0300
+@@ -93,7 +93,7 @@
+ JComboBox combo = new JComboBox();
+ DatabaseExplorerInternalUIs.connect(combo, JDBCDriverManager.getDefault());
+
+- assertEquals(4, combo.getItemCount());
++ assertEquals(3, combo.getItemCount());
+ JdbcUrl url = (JdbcUrl)combo.getItemAt(0);
+ assertDriversEqual(driver2, url.getDriver());
+ assertEquals(driver2.getClassName(), url.getClassName());
+@@ -123,7 +123,7 @@
+ JComboBox combo = new JComboBox();
+ DatabaseExplorerInternalUIs.connect(combo, JDBCDriverManager.getDefault());
+
+- assertEquals(4, combo.getItemCount());
++ assertEquals(3, combo.getItemCount());
+
+ JdbcUrl url = (JdbcUrl)combo.getItemAt(0);
+ assertDriversEqual(driver1, url.getDriver());
+diff -r 76d51071af8a -r af9499d919b8 dbschema/nbproject/project.properties
+--- a/dbschema/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/dbschema/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -39,7 +39,7 @@
+
+ javac.compilerargs=-Xlint -Xlint:-serial
+ javac.source=1.5
+-spec.version.base=1.12.1
++spec.version.base=1.12.2
+
+ javahelp.base=org/netbeans/modules/dbschema/docs
+ javahelp.hs=HelpSet.hs
+diff -r 76d51071af8a -r af9499d919b8 dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaConnectionPanel.java
+--- a/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaConnectionPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaConnectionPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -1,7 +1,7 @@
+ /*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
++ * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+@@ -24,7 +24,7 @@
+ * Contributor(s):
+ *
+ * The Original Software is NetBeans. The Initial Developer of the Original
+- * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
++ * Software is Sun Microsystems, Inc. Portions Copyright 1997-2009 Sun
+ * Microsystems, Inc. All Rights Reserved.
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+@@ -169,7 +169,7 @@
+
+ private final ResourceBundle bundle = NbBundle.getBundle("org.netbeans.modules.dbschema.jdbcimpl.resources.Bundle"); //NOI18N
+
+- public boolean isValid() {
++ public boolean isInputValid() {
+ return existingConnComboBox.getSelectedItem() instanceof DatabaseConnection;
+ }
+
+diff -r 76d51071af8a -r af9499d919b8 dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaConnectionWizardPanel.java
+--- a/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaConnectionWizardPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaConnectionWizardPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -1,7 +1,7 @@
+ /*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
++ * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+@@ -24,7 +24,7 @@
+ * Contributor(s):
+ *
+ * The Original Software is NetBeans. The Initial Developer of the Original
+- * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
++ * Software is Sun Microsystems, Inc. Portions Copyright 1997-2009 Sun
+ * Microsystems, Inc. All Rights Reserved.
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+@@ -68,7 +68,7 @@
+ }
+
+ public boolean isValid () {
+- return getPanelUI().isValid();
++ return getPanelUI().isInputValid();
+ }
+
+ }
+diff -r 76d51071af8a -r af9499d919b8 dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaTablesPanel.java
+--- a/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaTablesPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaTablesPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -1,7 +1,7 @@
+ /*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
++ * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+@@ -24,7 +24,7 @@
+ * Contributor(s):
+ *
+ * The Original Software is NetBeans. The Initial Developer of the Original
+- * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
++ * Software is Sun Microsystems, Inc. Portions Copyright 1997-2009 Sun
+ * Microsystems, Inc. All Rights Reserved.
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+@@ -687,7 +687,7 @@
+ jButtonRemoveAll.setEnabled(((SortedListModel) jListSelectedTables.getModel()).isEmpty() ? false : true);
+ }
+
+- public boolean isValid() {
++ public boolean isInputValid() {
+ if (jListSelectedTables.getModel().getSize() > 0)
+ return true;
+ else
+diff -r 76d51071af8a -r af9499d919b8 dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaTablesWizardPanel.java
+--- a/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaTablesWizardPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaTablesWizardPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -68,7 +68,7 @@
+ }
+
+ public boolean isValid () {
+- return getPanelUI().isValid();
++ return getPanelUI().isInputValid();
+ }
+
+ }
+diff -r 76d51071af8a -r af9499d919b8 debugger.jpda.ui/manifest.mf
+--- a/debugger.jpda.ui/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/debugger.jpda.ui/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -2,7 +2,7 @@
+ OpenIDE-Module: org.netbeans.modules.debugger.jpda.ui/1
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/debugger/jpda/ui/Bundle.properties
+ OpenIDE-Module-Layer: org/netbeans/modules/debugger/jpda/resources/mf-layer.xml
+-OpenIDE-Module-Specification-Version: 1.8.2
++OpenIDE-Module-Specification-Version: 1.8.3
+ OpenIDE-Module-Requires: org.netbeans.api.debugger.jpda.JPDADebuggerEngineImpl,
+ org.netbeans.spi.debugger.ui
+ OpenIDE-Module-Provides: org.netbeans.modules.debugger.jpda.ui
+diff -r 76d51071af8a -r af9499d919b8 debugger.jpda.ui/nbproject/project.xml
+--- a/debugger.jpda.ui/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100
++++ b/debugger.jpda.ui/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300
+@@ -115,6 +115,7 @@
+
+
+ 1
++ 2.14.2
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/Bundle.properties
+--- a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -42,7 +42,11 @@
+ OpenIDE-Module-Name=Java Debugger
+ OpenIDE-Module-Display-Category=Java
+ OpenIDE-Module-Short-Description=JPDA Debugger.
+-OpenIDE-Module-Long-Description=Contains UI for Java Debugger implementation.
++OpenIDE-Module-Long-Description=\
++For the list of included fixed bugs please check http://wiki.netbeans.org/NetBeans6.5PatchesInfo. \
++ \
++ \
++ Contains UI for Java Debugger implementation.
+
+ # File names on system filesystem
+ # Each key is resource path to a primary file
+diff -r 76d51071af8a -r af9499d919b8 debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/ConnectPanel.java
+--- a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/ConnectPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/ConnectPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -57,6 +57,7 @@
+ import java.awt.event.ActionListener;
+ import java.awt.event.FocusAdapter;
+ import java.awt.event.FocusEvent;
++import java.beans.PropertyChangeListener;
+ import java.io.IOException;
+ import java.text.MessageFormat;
+ import java.util.ArrayList;
+@@ -106,8 +107,7 @@
+ *
+ * @author Jan Jancura
+ */
+-public class ConnectPanel extends JPanel implements
+-Controller, ActionListener {
++public class ConnectPanel extends JPanel implements ActionListener {
+
+ private static final Logger USG_LOGGER = Logger.getLogger("org.netbeans.ui.metrics.debugger"); // NOI18N
+
+@@ -117,6 +117,7 @@
+ private JComboBox cbConnectors;
+ /** List of JTextFields containing all parameters of curentConnector. */
+ private JTextField[] tfParams;
++ private Controller controller;
+
+
+ public ConnectPanel () {
+@@ -176,6 +177,11 @@
+ }
+
+ cbConnectors.setSelectedIndex (defaultIndex);
++ controller = new ConnectController();
++ }
++
++ public Controller getController() {
++ return controller;
+ }
+
+ /**
+@@ -310,93 +316,6 @@
+ return;
+ }
+
+- public boolean cancel () {
+- return true;
+- }
+-
+- public boolean ok () {
+- int index = cbConnectors.getSelectedIndex ();
+- final Connector connector = (Connector) connectors.get (index);
+- final Map args = getEditedArgs (tfParams, connector);
+- if (args == null) return true; // CANCEL
+- saveArgs (args, connector);
+- log(connector, args);
+-
+- // Take the start off the AWT EQ:
+- final RequestProcessor.Task[] startTaskPtr = new RequestProcessor.Task[1];
+- startTaskPtr[0] = RequestProcessor.getDefault().create(new Runnable() {
+- public void run() {
+- final Thread theCurrentThread = Thread.currentThread();
+- ProgressHandle progress = ProgressHandleFactory.createHandle(
+- NbBundle.getMessage(ConnectPanel.class, "CTL_connectProgress"),
+- new Cancellable() {
+- public boolean cancel() {
+- theCurrentThread.interrupt();
+- return startTaskPtr[0].isFinished();
+- }
+- });
+- try {
+- //System.out.println("Before progress.start()");
+- progress.start();
+- //System.out.println("After progress.start()");
+- DebuggerEngine[] es = null;
+- if (connector instanceof AttachingConnector)
+- es = DebuggerManager.getDebuggerManager ().startDebugging (
+- DebuggerInfo.create (
+- AttachingDICookie.ID,
+- new Object [] {
+- AttachingDICookie.create (
+- (AttachingConnector) connector,
+- args
+- )
+- }
+- )
+- );
+- else
+- if (connector instanceof ListeningConnector)
+- es = DebuggerManager.getDebuggerManager ().startDebugging (
+- DebuggerInfo.create (
+- ListeningDICookie.ID,
+- new Object [] {
+- ListeningDICookie.create (
+- (ListeningConnector) connector,
+- args
+- )
+- }
+- )
+- );
+- if (es != null) {
+- for (int i = 0; i < es.length; i++) {
+- JPDADebugger d = es[i].lookupFirst(null, JPDADebugger.class);
+- if (d == null) continue;
+- try {
+- // workaround for #64227
+- if (d.getState() != d.STATE_RUNNING)
+- d.waitRunning ();
+- } catch (DebuggerStartException dsex) {
+- //ErrorManager.getDefault().notify(ErrorManager.USER, dsex);
+- // Not necessary to notify - message written to debugger console.
+- }
+- }
+- }
+- } finally {
+- //System.out.println("Before progress.finish()");
+- progress.finish();
+- //System.out.println("After progress.finish()");
+- }
+- }
+- });
+- Runnable action = new Runnable() {
+-
+- public void run() {
+- startTaskPtr[0].schedule(0);
+- }
+- };
+- ScanDialog.runWhenScanFinished(action, NbBundle.getMessage (ConnectPanel.class, "CTL_Connect")); //NOI18N
+- //System.out.println("Before return from ConnectPanel.ok()");
+- return true;
+- }
+-
+ private static void log(Connector c, Map args) {
+ LogRecord record = new LogRecord(Level.INFO, "USG_DEBUG_ATTACH_JPDA");
+ record.setResourceBundle(NbBundle.getBundle(ConnectPanel.class));
+@@ -419,17 +338,6 @@
+ USG_LOGGER.log(record);
+ }
+
+- /**
+- * Return true whether value of this customizer
+- * is valid (and OK button can be enabled).
+- *
+- * @return true whether value of this customizer
+- * is valid
+- */
+- public boolean isValid () {
+- return true;
+- }
+-
+
+ // private helper methods ..................................................
+
+@@ -602,6 +510,113 @@
+ return null;
+ }
+ }
++
++ private class ConnectController implements Controller {
++
++ public boolean cancel () {
++ return true;
++ }
++
++ public boolean ok () {
++ int index = cbConnectors.getSelectedIndex ();
++ final Connector connector = (Connector) connectors.get (index);
++ final Map args = getEditedArgs (tfParams, connector);
++ if (args == null) return true; // CANCEL
++ saveArgs (args, connector);
++ log(connector, args);
++
++ // Take the start off the AWT EQ:
++ final RequestProcessor.Task[] startTaskPtr = new RequestProcessor.Task[1];
++ startTaskPtr[0] = new RequestProcessor("JPDA Debugger Starting").create(new Runnable() {
++ public void run() {
++ final Thread theCurrentThread = Thread.currentThread();
++ ProgressHandle progress = ProgressHandleFactory.createHandle(
++ NbBundle.getMessage(ConnectPanel.class, "CTL_connectProgress"),
++ new Cancellable() {
++ public boolean cancel() {
++ theCurrentThread.interrupt();
++ return startTaskPtr[0].isFinished();
++ }
++ });
++ try {
++ //System.out.println("Before progress.start()");
++ progress.start();
++ //System.out.println("After progress.start()");
++ DebuggerEngine[] es = null;
++ if (connector instanceof AttachingConnector)
++ es = DebuggerManager.getDebuggerManager ().startDebugging (
++ DebuggerInfo.create (
++ AttachingDICookie.ID,
++ new Object [] {
++ AttachingDICookie.create (
++ (AttachingConnector) connector,
++ args
++ )
++ }
++ )
++ );
++ else
++ if (connector instanceof ListeningConnector)
++ es = DebuggerManager.getDebuggerManager ().startDebugging (
++ DebuggerInfo.create (
++ ListeningDICookie.ID,
++ new Object [] {
++ ListeningDICookie.create (
++ (ListeningConnector) connector,
++ args
++ )
++ }
++ )
++ );
++ if (es != null) {
++ for (int i = 0; i < es.length; i++) {
++ JPDADebugger d = es[i].lookupFirst(null, JPDADebugger.class);
++ if (d == null) continue;
++ try {
++ // workaround for #64227
++ if (d.getState() != d.STATE_RUNNING)
++ d.waitRunning ();
++ } catch (DebuggerStartException dsex) {
++ //ErrorManager.getDefault().notify(ErrorManager.USER, dsex);
++ // Not necessary to notify - message written to debugger console.
++ }
++ }
++ }
++ } finally {
++ //System.out.println("Before progress.finish()");
++ progress.finish();
++ //System.out.println("After progress.finish()");
++ }
++ }
++ });
++ Runnable action = new Runnable() {
++
++ public void run() {
++ startTaskPtr[0].schedule(0);
++ }
++ };
++ ScanDialog.runWhenScanFinished(action, NbBundle.getMessage (ConnectPanel.class, "CTL_Connect")); //NOI18N
++ //System.out.println("Before return from ConnectPanel.ok()");
++ return true;
++ }
++
++ /**
++ * Return true whether value of this customizer
++ * is valid (and OK button can be enabled).
++ *
++ * @return true whether value of this customizer
++ * is valid
++ */
++ public boolean isValid () {
++ return true;
++ }
++
++ public void addPropertyChangeListener(PropertyChangeListener l) {
++ }
++
++ public void removePropertyChangeListener(PropertyChangeListener l) {
++ }
++ }
+
+ }
+
+diff -r 76d51071af8a -r af9499d919b8 debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/JPDAAttachType.java
+--- a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/JPDAAttachType.java Fri Nov 07 11:48:18 2008 +0100
++++ b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/JPDAAttachType.java Tue Mar 10 13:53:55 2009 +0300
+@@ -41,8 +41,11 @@
+
+ package org.netbeans.modules.debugger.jpda.ui;
+
++import java.lang.ref.Reference;
++import java.lang.ref.WeakReference;
+ import javax.swing.JComponent;
+ import org.netbeans.spi.debugger.ui.AttachType;
++import org.netbeans.spi.debugger.ui.Controller;
+ import org.openide.util.NbBundle;
+
+
+@@ -52,11 +55,27 @@
+ */
+ public class JPDAAttachType extends AttachType {
+
++ private Reference customizerRef = new WeakReference(null);
++
++ @Override
+ public String getTypeDisplayName () {
+ return NbBundle.getMessage (JPDAAttachType.class, "CTL_Connector_name");
+ }
+
+ public JComponent getCustomizer () {
+- return new ConnectPanel ();
++ ConnectPanel panel = new ConnectPanel ();
++ customizerRef = new WeakReference(panel);
++ return panel;
+ }
++
++ @Override
++ public Controller getController() {
++ ConnectPanel panel = customizerRef.get();
++ if (panel != null) {
++ return panel.getController();
++ } else {
++ return null;
++ }
++ }
++
+ }
+\ No newline at end of file
+diff -r 76d51071af8a -r af9499d919b8 debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/ClassBreakpointPanel.java
+--- a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/ClassBreakpointPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/ClassBreakpointPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -290,17 +290,6 @@
+ return true;
+ }
+
+- /**
+- * Return true whether value of this customizer
+- * is valid (and OK button can be enabled).
+- *
+- * @return true whether value of this customizer
+- * is valid
+- */
+- public boolean isValid () {
+- return true;
+- }
+-
+ private String valiadateMsg () {
+ if (tfClassName.getText().trim ().length() == 0) {
+ return NbBundle.getMessage(ClassBreakpointPanel.class, "MSG_No_Class_Name_Spec");
+diff -r 76d51071af8a -r af9499d919b8 debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/ExceptionBreakpointPanel.java
+--- a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/ExceptionBreakpointPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/ExceptionBreakpointPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -293,17 +293,6 @@
+ return true;
+ }
+
+- /**
+- * Return true whether value of this customizer
+- * is valid (and OK button can be enabled).
+- *
+- * @return true whether value of this customizer
+- * is valid
+- */
+- public boolean isValid () {
+- return true;
+- }
+-
+ private String valiadateMsg () {
+ if (tfExceptionClassName.getText().trim ().length() == 0) {
+ return NbBundle.getMessage(ExceptionBreakpointPanel.class, "MSG_No_Exception_Class_Name_Spec");
+diff -r 76d51071af8a -r af9499d919b8 debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/FieldBreakpointPanel.form
+--- a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/FieldBreakpointPanel.form Fri Nov 07 11:48:18 2008 +0100
++++ b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/FieldBreakpointPanel.form Tue Mar 10 13:53:55 2009 +0300
+@@ -8,6 +8,7 @@
+
+
+
++
+
+
+
+@@ -39,9 +40,6 @@
+
+
+
+-
+-
+-
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/FieldBreakpointPanel.java
+--- a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/FieldBreakpointPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/FieldBreakpointPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -319,17 +319,6 @@
+ return true;
+ }
+
+- /**
+- * Return true whether value of this customizer
+- * is valid (and OK button can be enabled).
+- *
+- * @return true whether value of this customizer
+- * is valid
+- */
+- public boolean isValid () {
+- return true;
+- }
+-
+ private String valiadateMsg () {
+ if (tfClassName.getText().trim ().length() == 0 || tfFieldName.getText().trim ().length() == 0) {
+ return NbBundle.getMessage(FieldBreakpointPanel.class, "MSG_No_Class_or_Field_Name_Spec");
+diff -r 76d51071af8a -r af9499d919b8 debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/LineBreakpointPanel.java
+--- a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/LineBreakpointPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/LineBreakpointPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -305,17 +305,6 @@
+ return true;
+ }
+
+- /**
+- * Return true whether value of this customizer
+- * is valid (and OK button can be enabled).
+- *
+- * @return true whether value of this customizer
+- * is valid
+- */
+- public boolean isValid () {
+- return true;
+- }
+-
+ private String valiadateMsg () {
+ int line;
+ try {
+diff -r 76d51071af8a -r af9499d919b8 debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/MethodBreakpointPanel.java
+--- a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/MethodBreakpointPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/MethodBreakpointPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -506,17 +506,6 @@
+ return true;
+ }
+
+- /**
+- * Return true whether value of this customizer
+- * is valid (and OK button can be enabled).
+- *
+- * @return true whether value of this customizer
+- * is valid
+- */
+- public boolean isValid () {
+- return true;
+- }
+-
+ private String valiadateMsg () {
+ if (tfClassName.getText().trim ().length() == 0 || (tfMethodName.getText().trim ().length() == 0 && !cbAllMethods.isSelected())) {
+ return NbBundle.getMessage(MethodBreakpointPanel.class, "MSG_No_Class_or_Method_Name_Spec");
+diff -r 76d51071af8a -r af9499d919b8 debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/ThreadBreakpointPanel.java
+--- a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/ThreadBreakpointPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/ThreadBreakpointPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -247,17 +247,6 @@
+ return true;
+ }
+
+- /**
+- * Return true whether value of this customizer
+- * is valid (and OK button can be enabled).
+- *
+- * @return true whether value of this customizer
+- * is valid
+- */
+- public boolean isValid () {
+- return true;
+- }
+-
+ private String valiadateMsg () {
+ return null;
+ }
+diff -r 76d51071af8a -r af9499d919b8 debugger.jpda/manifest.mf
+--- a/debugger.jpda/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/debugger.jpda/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -2,6 +2,6 @@
+ OpenIDE-Module: org.netbeans.modules.debugger.jpda/2
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/debugger/jpda/Bundle.properties
+ OpenIDE-Module-Layer: org/netbeans/modules/debugger/jpda/resources/mf-layer.xml
+-OpenIDE-Module-Specification-Version: 1.22.1
++OpenIDE-Module-Specification-Version: 1.22.2
+ OpenIDE-Module-Provides: org.netbeans.api.debugger.jpda.JPDADebuggerEngineImpl
+ OpenIDE-Module-Requires: org.netbeans.spi.debugger.jpda.EditorContext, org.netbeans.spi.debugger.jpda.SourcePathProvider
+diff -r 76d51071af8a -r af9499d919b8 debugger.jpda/src/org/netbeans/modules/debugger/jpda/actions/RunIntoMethodActionProvider.java
+--- a/debugger.jpda/src/org/netbeans/modules/debugger/jpda/actions/RunIntoMethodActionProvider.java Fri Nov 07 11:48:18 2008 +0100
++++ b/debugger.jpda/src/org/netbeans/modules/debugger/jpda/actions/RunIntoMethodActionProvider.java Tue Mar 10 13:53:55 2009 +0300
+@@ -312,6 +312,7 @@
+ debugger.getOperator().register(brReq, tracingExecutor);
+ brReq.addThreadFilter(t.getThreadReference());
+ brReq.setSuspendPolicy(debugger.getSuspend());
++ brReq.addCountFilter(1);
+ brReq.enable();
+ if (setBoundaryStep) {
+ boundaryStepPtr[0] = setBoundaryStepRequest(debugger, t, brReq);
+diff -r 76d51071af8a -r af9499d919b8 debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/WatchesModel.java
+--- a/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/WatchesModel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/WatchesModel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -530,7 +530,8 @@
+ public void propertyChange (PropertyChangeEvent evt) {
+ String propName = evt.getPropertyName();
+ // We already have watchAdded & watchRemoved. Ignore PROP_WATCHES:
+- if (DebuggerManager.PROP_WATCHES.equals(propName)) return ;
++ // We care only about the debugger state change and watch expression change here...
++ if (!(JPDADebugger.PROP_STATE.equals(propName) || Watch.PROP_EXPRESSION.equals(propName))) return ;
+ final WatchesModel m = getModel ();
+ if (m == null) return;
+ if (m.debugger.getState () == JPDADebugger.STATE_DISCONNECTED) {
+diff -r 76d51071af8a -r af9499d919b8 editor.completion/manifest.mf
+--- a/editor.completion/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/editor.completion/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -2,7 +2,7 @@
+ OpenIDE-Module: org.netbeans.modules.editor.completion/1
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/completion/Bundle.properties
+ OpenIDE-Module-Install: org/netbeans/modules/editor/completion/CompletionModule.class
+-OpenIDE-Module-Specification-Version: 1.13.1
++OpenIDE-Module-Specification-Version: 1.13.2
+ OpenIDE-Module-Layer: org/netbeans/modules/editor/completion/resources/layer.xml
+ OpenIDE-Module-Implementation-Version: 1
+ AutoUpdate-Show-In-Client: false
+diff -r 76d51071af8a -r af9499d919b8 editor.completion/nbproject/project.xml
+--- a/editor.completion/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100
++++ b/editor.completion/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300
+@@ -61,7 +61,7 @@
+
+
+ 1
+- 1.27
++ 1.29.2
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 editor.completion/src/org/netbeans/modules/editor/completion/CompletionLayoutPopup.java
+--- a/editor.completion/src/org/netbeans/modules/editor/completion/CompletionLayoutPopup.java Fri Nov 07 11:48:18 2008 +0100
++++ b/editor.completion/src/org/netbeans/modules/editor/completion/CompletionLayoutPopup.java Tue Mar 10 13:53:55 2009 +0300
+@@ -372,42 +372,44 @@
+ * @param unionBounds bounds occupied by all popups
+ */
+ void showAlongOrNextOccupiedBounds(Rectangle occupiedBounds, Rectangle unionBounds) {
+- Rectangle screen = ScreenBoundsProvider.getScreenBounds(getEditorComponent());
+- Dimension prefSize = getPreferredSize();
+- Rectangle bounds = new Rectangle();
+- boolean aboveCaret;
++ if (occupiedBounds != null) {
++ Rectangle screen = ScreenBoundsProvider.getScreenBounds(getEditorComponent());
++ Dimension prefSize = getPreferredSize();
++ Rectangle bounds = new Rectangle();
++ boolean aboveCaret;
+
+- if (isEnoughSpace(occupiedBounds, preferDisplayAboveCaret)) {
+- aboveCaret = preferDisplayAboveCaret;
+- } else
+- aboveCaret = false;
++ if (isEnoughSpace(occupiedBounds, preferDisplayAboveCaret)) {
++ aboveCaret = preferDisplayAboveCaret;
++ } else
++ aboveCaret = false;
+
+- boolean left = false;
+- boolean right = false;
++ boolean left = false;
++ boolean right = false;
+
+- // Right of CC
+- if (occupiedBounds.x + occupiedBounds.width + prefSize.width < screen.width &&
+- occupiedBounds.y + prefSize.height < screen.height) {
+- bounds.x = occupiedBounds.x + occupiedBounds.width + CompletionLayout.POPUP_VERTICAL_GAP;
+- right = true;
+- }
++ // Right of CC
++ if (occupiedBounds.x + occupiedBounds.width + prefSize.width < screen.width &&
++ occupiedBounds.y + prefSize.height < screen.height) {
++ bounds.x = occupiedBounds.x + occupiedBounds.width + CompletionLayout.POPUP_VERTICAL_GAP;
++ right = true;
++ }
+
+- // Left of CC
+- if (!right && occupiedBounds.x - prefSize.width > 0 && occupiedBounds.y + prefSize.height < screen.height) {
+- bounds.x = occupiedBounds.x - prefSize.width - CompletionLayout.POPUP_VERTICAL_GAP;
+- left = true;
+- }
++ // Left of CC
++ if (!right && occupiedBounds.x - prefSize.width > 0 && occupiedBounds.y + prefSize.height < screen.height) {
++ bounds.x = occupiedBounds.x - prefSize.width - CompletionLayout.POPUP_VERTICAL_GAP;
++ left = true;
++ }
+
+- if (right || left) {
+- bounds.width = prefSize.width;
+- bounds.height = Math.min(prefSize.height, screen.height);
+- if (aboveCaret) {
+- bounds.y = occupiedBounds.y + occupiedBounds.height - prefSize.height;
+- } else {
+- bounds.y = occupiedBounds.y;
++ if (right || left) {
++ bounds.width = prefSize.width;
++ bounds.height = Math.min(prefSize.height, screen.height);
++ if (aboveCaret) {
++ bounds.y = occupiedBounds.y + occupiedBounds.height - prefSize.height;
++ } else {
++ bounds.y = occupiedBounds.y;
++ }
++ show(bounds, aboveCaret);
++ return;
+ }
+- show(bounds, aboveCaret);
+- return;
+ }
+
+ // Fallback to Above/Below
+diff -r 76d51071af8a -r af9499d919b8 editor.lib/nbproject/project.properties
+--- a/editor.lib/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/editor.lib/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -39,7 +39,7 @@
+
+ javac.compilerargs=-Xlint:unchecked
+ javac.source=1.5
+-spec.version.base=1.29.1
++spec.version.base=1.29.2
+ is.autoload=true
+
+ javadoc.arch=${basedir}/arch.xml
+diff -r 76d51071af8a -r af9499d919b8 editor.lib/src/org/netbeans/editor/GuardedDocument.java
+--- a/editor.lib/src/org/netbeans/editor/GuardedDocument.java Fri Nov 07 11:48:18 2008 +0100
++++ b/editor.lib/src/org/netbeans/editor/GuardedDocument.java Tue Mar 10 13:53:55 2009 +0300
+@@ -46,6 +46,8 @@
+ import java.util.Enumeration;
+ import java.awt.Color;
+ import java.awt.Font;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import javax.swing.text.BadLocationException;
+ import javax.swing.text.StyledDocument;
+ import javax.swing.text.Style;
+@@ -81,6 +83,9 @@
+ private static final boolean debugAtomic = Boolean.getBoolean("netbeans.debug.editor.atomic"); // NOI18N
+ private static final boolean debugAtomicStack = Boolean.getBoolean("netbeans.debug.editor.atomic.stack"); // NOI18N
+
++ // -J-Dorg.netbeans.editor.GuardedDocument.level=FINEST
++ private static final Logger LOG = Logger.getLogger(GuardedDocument.class.getName());
++
+ // Add the attributes to sets
+ static {
+ guardedSet.addAttribute(GUARDED_ATTRIBUTE, Boolean.TRUE);
+@@ -211,22 +216,31 @@
+ }
+ }
+
+- if (text.length() > 0
+- && (rel & MarkBlock.OVERLAP) != 0
++ boolean guarded = (rel & MarkBlock.OVERLAP) != 0
+ && rel != MarkBlock.INSIDE_END // guarded blocks have insertAfter endMark
+- && !(text.charAt(text.length() - 1) == '\n'
+- && rel == MarkBlock.INSIDE_BEGIN)
+- ) {
++ && !(text.charAt(text.length() - 1) == '\n' && rel == MarkBlock.INSIDE_BEGIN);
++ if (guarded) {
+ if (!breakGuarded || atomicAsUser) {
+- throw new GuardedException(
+- MessageFormat.format(
+- NbBundle.getBundle(BaseKit.class).getString(FMT_GUARDED_INSERT_LOCALE),
+- new Object [] {
+- new Integer(offset)
+- }
+- ),
+- offset
+- );
++ CharSequence docText = org.netbeans.lib.editor.util.swing.DocumentUtilities.getText(this);
++ // Allow mod when inserting "inside" line and right at the begining of the guarded block
++ boolean insertAtLineBegin = (offset == 0 || docText.charAt(offset - 1) == '\n');
++ guarded = (rel != MarkBlock.INSIDE_BEGIN) || insertAtLineBegin;
++ if (guarded) {
++ if (LOG.isLoggable(Level.FINE)) {
++ LOG.fine("GuardedDocument.preInsertCheck(): offset:" + Utilities.debugPosition(this, offset) +
++ ", relation: " + rel + "; guardedBlockChain:\n" + guardedBlockChain + "\n");
++ }
++
++ throw new GuardedException(
++ MessageFormat.format(
++ NbBundle.getBundle(BaseKit.class).getString(FMT_GUARDED_INSERT_LOCALE),
++ new Object [] {
++ new Integer(offset)
++ }
++ ),
++ offset
++ );
++ }
+ }
+ }
+ }
+@@ -248,11 +262,27 @@
+ }
+ }
+
+- if ((rel & MarkBlock.OVERLAP) != 0
+- || (rel == MarkBlock.CONTINUE_BEGIN
+- && !(offset == 0 || getChars(offset - 1, 1)[0] == '\n'))
+- ) {
++ // Check if removed block overlaps any guarded block(s)
++ // Also check that if an area right before GB gets removed (including ending newline)
++ // that the area does not start in the middle of the line (GB would then start in the middle of line
++ // after the removal).
++ // For GBs that already start in the middle of a line this does not apply
++ boolean guarded = ((rel & MarkBlock.OVERLAP) != 0);
++ if (!guarded && (rel == MarkBlock.CONTINUE_BEGIN)) { // GB starts right after removed area
++ CharSequence docText = org.netbeans.lib.editor.util.swing.DocumentUtilities.getText(this);
++ int gbStartOffset = offset + len;
++ // To allow removal either GB starts in a middle of line
++ // or (if starts at line begining) check that a character in front of first removed char is newline
++ boolean gbStartsAtLineBegin = (gbStartOffset == 0 || docText.charAt(gbStartOffset - 1) == '\n');
++ guarded = gbStartsAtLineBegin && (offset != 0 && docText.charAt(offset - 1) != '\n');
++ }
++ if (guarded) {
+ if (!breakGuarded || atomicAsUser) {
++ if (LOG.isLoggable(Level.FINE)) {
++ LOG.fine("GuardedDocument.preRemoveCheck(): offset:" + Utilities.debugPosition(this, offset) +
++ ", relation: " + rel + "; guardedBlockChain:\n" + guardedBlockChain + "\n");
++ }
++
+ // test whether the previous char before removed text is '\n'
+ throw new GuardedException(
+ MessageFormat.format(
+diff -r 76d51071af8a -r af9499d919b8 favorites/manifest.mf
+--- a/favorites/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/favorites/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -1,7 +1,7 @@
+ Manifest-Version: 1.0
+ OpenIDE-Module: org.netbeans.modules.favorites/1
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/favorites/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.14.1
++OpenIDE-Module-Specification-Version: 1.14.3
+ OpenIDE-Module-Layer: org/netbeans/modules/favorites/resources/layer.xml
+ AutoUpdate-Show-In-Client: false
+ AutoUpdate-Essential-Module: true
+diff -r 76d51071af8a -r af9499d919b8 favorites/nbproject/project.xml
+--- a/favorites/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100
++++ b/favorites/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300
+@@ -100,7 +100,7 @@
+
+
+
+- 4.12
++ 7.2.2
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 favorites/src/org/netbeans/modules/favorites/Favorites.java
+--- a/favorites/src/org/netbeans/modules/favorites/Favorites.java Fri Nov 07 11:48:18 2008 +0100
++++ b/favorites/src/org/netbeans/modules/favorites/Favorites.java Tue Mar 10 13:53:55 2009 +0300
+@@ -61,16 +61,18 @@
+ import org.openide.filesystems.FileStateInvalidException;
+ import org.openide.filesystems.FileUtil;
+ import org.openide.filesystems.Repository;
++import org.openide.loaders.ChangeableDataFilter;
++import org.openide.loaders.DataFilter;
+ import org.openide.loaders.DataFolder;
+ import org.openide.loaders.DataObject;
+ import org.openide.loaders.DataShadow;
+ import org.openide.nodes.FilterNode;
+ import org.openide.nodes.Index;
+ import org.openide.nodes.Node;
++import org.openide.util.ChangeSupport;
+ import org.openide.util.Exceptions;
+ import org.openide.util.ImageUtilities;
+ import org.openide.util.NbBundle;
+-import org.openide.util.Utilities;
+ import org.openide.util.datatransfer.PasteType;
+
+ /**
+@@ -287,43 +289,71 @@
+ }
+ }
+
+- private static class Chldrn extends FilterNode.Children
+- implements ChangeListener, Runnable {
++
++
++ static class VisQ
++ implements DataFilter.FileBased, ChangeableDataFilter, ChangeListener {
++ public static final VisQ DEFAULT = new VisQ();
++
+ private ChangeListener weak;
+- private boolean hideHidden;
+- /** Creates new Chldrn. */
+- public Chldrn (Node node, boolean hideHidden) {
+- super (node);
+- this.hideHidden = hideHidden;
+-
++ private ChangeSupport support = new ChangeSupport(this);
++
++ VisQ() {
+ weak = org.openide.util.WeakListeners.change(this, VisibilityQuery.getDefault());
+ VisibilityQuery.getDefault().addChangeListener(weak);
+ }
+
++ public boolean acceptFileObject(FileObject fo) {
++ return VisibilityQuery.getDefault().isVisible(fo);
++ }
++
++ public boolean acceptDataObject(DataObject obj) {
++ return acceptFileObject(obj.getPrimaryFile());
++ }
++
++ public void addChangeListener(ChangeListener listener) {
++ support.addChangeListener(listener);
++ }
++
++ public void removeChangeListener(ChangeListener listener) {
++ support.removeChangeListener(listener);
++ }
++
++ public void stateChanged(ChangeEvent e) {
++ support.fireChange();
++ }
++ } // end of VisQ
++
++ private static class Chldrn extends FilterNode.Children {
++ private boolean hideHidden;
++ /** Creates new Chldrn. */
++ public Chldrn(Node node, boolean hideHidden) {
++ super (node);
++ this.hideHidden = hideHidden;
++ }
++
+ @Override
+ protected Node[] createNodes(Node node) {
++ org.openide.nodes.Children ch = Children.LEAF;
++ DataObject obj = node.getLookup().lookup(DataObject.class);
+ if (hideHidden) {
+- DataObject obj = node.getCookie(DataObject.class);
+ if (obj != null && !VisibilityQuery.getDefault().isVisible(obj.getPrimaryFile())) {
+ return null;
+ }
+ }
++
++ DataFolder folder = node.getLookup().lookup(DataFolder.class);
++ if (folder != null) {
++ ch = new Chldrn(new FilterNode(node, folder.createNodeChildren(new VisQ())), true);
++ } else {
++ if (node.isLeaf()) {
++ ch = org.openide.nodes.Children.LEAF;
++ } else {
++ ch = new Chldrn(node, true);
++ }
++ }
+
+- return new Node[] { new ProjectFilterNode (
+- node,
+- (node.isLeaf ()) ? org.openide.nodes.Children.LEAF : new Chldrn (node, true)
+- )};
+- }
+-
+- public void stateChanged(ChangeEvent e) {
+- MUTEX.postWriteRequest(this);
+- }
+-
+- public void run() {
+- Node[] arr = original.getChildren().getNodes();
+- for (int i = 0; i < arr.length; i++) {
+- refreshKey(arr[i]);
+- }
++ return new Node[] { new ProjectFilterNode (node, ch) };
+ }
+ } // end of Chldrn
+
+diff -r 76d51071af8a -r af9499d919b8 favorites/src/org/netbeans/modules/favorites/templates/TemplatesPanel.java
+--- a/favorites/src/org/netbeans/modules/favorites/templates/TemplatesPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/favorites/src/org/netbeans/modules/favorites/templates/TemplatesPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -91,11 +91,14 @@
+ * @author Jiri Rechtacek
+ */
+ public class TemplatesPanel extends TopComponent implements ExplorerManager.Provider {
+- private ExplorerManager manager;
+- private TemplateTreeView view;
++ private static ExplorerManager manager;
++ private static TemplateTreeView view;
+
+ static private FileObject templatesRoot;
+
++ private static final String TEMPLATE_DISPLAY_NAME_ATTRIBUTE = "displayName";
++ private static final String TEMPLATE_LOCALIZING_BUNDLE_ATTRIBUTE = "SystemFileSystem.localizingBundle";
++
+ /** Creates new form TemplatesPanel */
+ public TemplatesPanel () {
+
+@@ -470,7 +473,7 @@
+ SystemAction.get (DeleteAction.class),
+ SystemAction.get (RenameAction.class),
+ };
+-
++
+ public TemplateNode (Node n) {
+ this (n, new DataFolderFilterChildren (n), new InstanceContent ());
+ }
+@@ -515,17 +518,22 @@
+ }
+
+ @Override
++ public String getName () {
++ return super.getDisplayName ();
++ }
++
++ @Override
+ public void setName(String name) {
+- // #140308 - get attributtes before rename and set them for renamed FileObject
+ FileObject fo = this.getLookup().lookup(FileObject.class);
+- final HashMap attributes = getAttributes(fo);
+- super.setName(name);
+ try {
+- setAttributes (fo, attributes);
++ fo.setAttribute (TEMPLATE_DISPLAY_NAME_ATTRIBUTE, name);
++ fo.setAttribute (TEMPLATE_LOCALIZING_BUNDLE_ATTRIBUTE, null);
+ } catch (IOException ex) {
+ Logger.getLogger(TemplatesPanel.class.getName()).log(Level.WARNING, null, ex);
+ }
++ setDisplayName (name);
+ }
++
+ }
+
+ private static class DataFolderFilterChildren extends FilterNode.Children {
+@@ -634,10 +642,33 @@
+ static DataObject createDuplicateFromNode (Node n) {
+ DataObject source = getDOFromNode (n);
+ try {
++ Node parent = n.getParentNode ();
+ DataObject target = source.copy(source.getFolder());
+ FileObject srcFo = source.getPrimaryFile();
+ FileObject targetFo = target.getPrimaryFile();
+- setAttributes(targetFo, getAttributes(srcFo));
++ setTemplateAttributes(targetFo, getAttributes(srcFo));
++ if (parent != null) {
++ Node duplicateNode = null;
++ for (Node k : parent.getChildren ().getNodes (true)) {
++ if (k.getName ().startsWith (targetFo.getName ())) {
++ duplicateNode = k;
++ break;
++ }
++ }
++ if (duplicateNode != null) {
++ final Node finalNode = duplicateNode;
++ SwingUtilities.invokeLater (new Runnable () {
++ public void run () {
++ try {
++ manager.setSelectedNodes (new Node [] { finalNode });
++ view.invokeInplaceEditing ();
++ } catch (PropertyVetoException ex) {
++ Logger.getLogger (TemplatesPanel.class.getName ()).log (Level.INFO, ex.getLocalizedMessage (), ex);
++ }
++ }
++ });
++ }
++ }
+ return target;
+ } catch (IOException ioe) {
+ Logger.getLogger(TemplatesPanel.class.getName()).log(Level.WARNING, null, ioe);
+@@ -663,8 +694,12 @@
+ }
+
+ /** Sets attributes for given FileObject. */
+- private static void setAttributes(FileObject fo, HashMap attributes) throws IOException {
++ private static void setTemplateAttributes(FileObject fo, HashMap attributes) throws IOException {
+ for (Entry entry : attributes.entrySet()) {
++ // skip localizing bundle for custom templates
++ if (TEMPLATE_LOCALIZING_BUNDLE_ATTRIBUTE.equals (entry.getKey ())) {
++ continue;
++ }
+ fo.setAttribute(entry.getKey(), entry.getValue());
+ }
+ }
+diff -r 76d51071af8a -r af9499d919b8 favorites/test/unit/src/org/netbeans/modules/favorites/VisibilityQueryWorksTest.java
+--- a/favorites/test/unit/src/org/netbeans/modules/favorites/VisibilityQueryWorksTest.java Fri Nov 07 11:48:18 2008 +0100
++++ b/favorites/test/unit/src/org/netbeans/modules/favorites/VisibilityQueryWorksTest.java Tue Mar 10 13:53:55 2009 +0300
+@@ -85,6 +85,7 @@
+ /** If execution fails we wrap the exception with
+ * new log message.
+ */
++ @Override
+ protected void runTest () throws Throwable {
+ try {
+ super.runTest ();
+@@ -96,6 +97,7 @@
+ }
+
+
++ @Override
+ protected void setUp () throws Exception {
+ clearWorkDir();
+
+@@ -193,7 +195,10 @@
+ VQI vqi = (VQI) Lookup.getDefault().lookup(VQI.class);
+ vqi.showAll = true;
+ vqi.fire();
+-
++
++ // initialize the children
++ Node some = f.getChildren().findChild(null);
++ assertNotNull("Some node needs to be found", some);
+ arr = f.getChildren().getNodes(true);
+ assertNodeForDataObject("hidden object is now there", hiddenDO, true, arr);
+ assertEquals("One child at all", 1, arr.length);
+diff -r 76d51071af8a -r af9499d919b8 form.kit/manifest.mf
+--- a/form.kit/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/form.kit/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -1,5 +1,5 @@
+ Manifest-Version: 1.0
+ OpenIDE-Module: org.netbeans.modules.form.kit
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/form/kit/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.2.1
++OpenIDE-Module-Specification-Version: 1.2.2
+
+diff -r 76d51071af8a -r af9499d919b8 form.kit/nbproject/project.xml
+--- a/form.kit/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100
++++ b/form.kit/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300
+@@ -41,7 +41,7 @@
+
+ org.netbeans.modules.swingapp
+
+- 1.1
++ 1.3.2
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 form.kit/src/org/netbeans/modules/form/kit/Bundle.properties
+--- a/form.kit/src/org/netbeans/modules/form/kit/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/form.kit/src/org/netbeans/modules/form/kit/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -1,4 +1,8 @@
+ OpenIDE-Module-Display-Category=Java
+ OpenIDE-Module-Name=GUI Builder
+ OpenIDE-Module-Short-Description=Enables you to visually design Java desktop (AWT and Swing) applications.
+-OpenIDE-Module-Long-Description=The GUI Builder enables you to visually design Java desktop (AWT and Swing) applications. It includes special support for GroupLayout, the Swing Application Framework (JSR 296), and the Beans Binding specification (JSR 295).
++OpenIDE-Module-Long-Description=\
++For the list of included fixed bugs please check http://wiki.netbeans.org/NetBeans6.5PatchesInfo. \
++ \
++ \
++The GUI Builder enables you to visually design Java desktop (AWT and Swing) applications. It includes special support for GroupLayout, the Swing Application Framework (JSR 296), and the Beans Binding specification (JSR 295).
+diff -r 76d51071af8a -r af9499d919b8 glassfish.common/manifest.mf
+--- a/glassfish.common/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/glassfish.common/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -1,7 +1,7 @@
+ Manifest-Version: 1.0
+-OpenIDE-Module: org.netbeans.modules.glassfish.common
++OpenIDE-Module: org.netbeans.modules.glassfish.common/0
+ OpenIDE-Module-Install: org/netbeans/modules/glassfish/common/Installer.class
+ OpenIDE-Module-Layer: org/netbeans/modules/glassfish/common/layer.xml
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/glassfish/common/Bundle.properties
+-OpenIDE-Module-Specification-Version: 0.51.1
++OpenIDE-Module-Specification-Version: 1.0.2
+
+diff -r 76d51071af8a -r af9499d919b8 glassfish.common/nbproject/project.xml
+--- a/glassfish.common/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100
++++ b/glassfish.common/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300
+@@ -37,8 +37,8 @@
+
+
+
+- 0-1
+- 1.0
++ 0
++ 1.2
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 glassfish.common/src/org/netbeans/modules/glassfish/spi/ServerUtilities.java
+--- a/glassfish.common/src/org/netbeans/modules/glassfish/spi/ServerUtilities.java Fri Nov 07 11:48:18 2008 +0100
++++ b/glassfish.common/src/org/netbeans/modules/glassfish/spi/ServerUtilities.java Tue Mar 10 13:53:55 2009 +0300
+@@ -58,6 +58,7 @@
+ import org.netbeans.spi.server.ServerInstanceImplementation;
+ import org.netbeans.spi.server.ServerInstanceProvider;
+ import org.openide.WizardDescriptor.InstantiatingIterator;
++import org.openide.filesystems.FileObject;
+ import org.openide.filesystems.FileUtil;
+ import org.openide.util.Lookup;
+
+@@ -254,13 +255,14 @@
+ * modules directory.
+ *
+ * @param jarList the list "so far"
+- * @param parent the directory to look into
++ * @param parent the directory to look into. Should not be null.
+ * @param depth depth of the server
+ * @param escape pass true if backslashes in jar names should be escaped
+ * @return the complete list of jars that match the selection criteria
+ */
+- public static List filterByManifest(List jarList, File parent, int depth, boolean escape) {
+- if(parent.exists()) {
++ public static List filterByManifest(List jarList, FileObject parent, int depth, boolean escape) {
++ // be kind to clients that pass in null
++ if(null != parent) {
+ int parentLength = parent.getPath().length();
+ /* modules/web/jsf-impl.jar was not seen (or added with wrong relative name).
+ * need to calculate size relative to the modules/ dir and not the subdirs
+@@ -269,20 +271,21 @@
+ * with this test, we now also return "web/jsf-impl.jar" which is correct
+ */
+ if (depth==1){
+- parentLength = parent.getParentFile().getPath().length();
++ parentLength = parent.getParent().getPath().length();
+ }
+- for(File candidate: parent.listFiles()) {
+- if(candidate.isDirectory()) {
++
++ for(FileObject candidate: parent.getChildren()) {
++ if(candidate.isFolder()) {
+ if(depth < 1) {
+ filterByManifest(jarList, candidate, depth+1, escape);
+ }
+ continue;
+- } else if(!candidate.getName().endsWith(".jar")) {
++ } else if(!candidate.getNameExt().endsWith(".jar")) {
+ continue;
+ }
+ JarFile jarFile = null;
+ try {
+- jarFile = new JarFile(candidate, false);
++ jarFile = new JarFile(FileUtil.toFile(candidate), false);
+ Manifest manifest = jarFile.getManifest();
+ if(manifest != null) {
+ Attributes attrs = manifest.getMainAttributes();
+@@ -290,7 +293,7 @@
+ String bundleName = attrs.getValue("Bundle-SymbolicName");
+ //String bundleName = attrs.getValue("Extension-Name");
+ if(bundleName != null && bundleName.contains("javax")) {
+- String val = candidate.getPath().substring(parentLength+1);
++ String val = candidate.getPath().substring(parentLength);
+ if(escape) {
+ val = val.replace("\\", "\\\\");
+ }
+@@ -300,14 +303,14 @@
+ }
+ } catch (IOException ex) {
+ Logger.getLogger(ServerUtilities.class.getName()).log(Level.INFO,
+- candidate.getAbsolutePath(), ex);
++ candidate.getPath(), ex);
+ } finally {
+ if (null != jarFile) {
+ try {
+ jarFile.close();
+ } catch (IOException ex) {
+ Logger.getLogger(ServerUtilities.class.getName()).log(Level.INFO,
+- candidate.getAbsolutePath(), ex);
++ candidate.getPath(), ex);
+ }
+ jarFile = null;
+ }
+@@ -315,8 +318,8 @@
+
+ }
+ } else {
+- Logger.getLogger(ServerUtilities.class.getName()).log(Level.FINER,
+- parent.getAbsolutePath() + " does not exist");
++ Logger.getLogger(ServerUtilities.class.getName()).log(Level.FINER,
++ "Null FileObject passed in as the parent parameter. Returning the original list");
+ }
+ return jarList;
+ }
+diff -r 76d51071af8a -r af9499d919b8 hibernate/manifest.mf
+--- a/hibernate/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/hibernate/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -3,4 +3,4 @@
+ OpenIDE-Module-Implementation-Version: 1
+ OpenIDE-Module-Layer: org/netbeans/modules/hibernate/resources/layer.xml
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/hibernate/resources/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.0.1
++OpenIDE-Module-Specification-Version: 1.0.3
+diff -r 76d51071af8a -r af9499d919b8 hibernate/nbproject/project.xml
+--- a/hibernate/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100
++++ b/hibernate/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300
+@@ -132,7 +132,7 @@
+
+
+ 1
+- 1.0
++ 1.12.2
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 hibernate/src/org/netbeans/modules/hibernate/hqleditor/HQLEditorController.java
+--- a/hibernate/src/org/netbeans/modules/hibernate/hqleditor/HQLEditorController.java Fri Nov 07 11:48:18 2008 +0100
++++ b/hibernate/src/org/netbeans/modules/hibernate/hqleditor/HQLEditorController.java Tue Mar 10 13:53:55 2009 +0300
+@@ -42,9 +42,11 @@
+ import java.net.URL;
+ import java.util.ArrayList;
+ import java.util.Arrays;
++import java.util.HashSet;
+ import java.util.Iterator;
+ import java.util.List;
+ import java.util.Map;
++import java.util.Set;
+ import java.util.StringTokenizer;
+ import java.util.logging.Level;
+ import java.util.logging.Logger;
+@@ -146,7 +148,7 @@
+ }
+
+ public SessionFactory getHibernateSessionFactoryForThisContext(FileObject configFileObject,
+- List mappingFOList,
++ Set mappingFOList,
+ List annotatedClassList,
+ ClassLoader customClassLoader) throws Exception {
+
+@@ -252,7 +254,7 @@
+ }
+
+ // Process Mappings
+- List matchedMappingFOList = new ArrayList();
++ Set matchedMappingFOList = new HashSet();
+ List mappingFOList = new ArrayList();
+ Map> mappingPOJOMap = env.getAllPOJONamesFromConfiguration(configFileObject);
+
+@@ -551,7 +553,7 @@
+ }
+ }
+
+- private List getRelatedMappings(FileObject mappingFO, List relatedMappings, Map> mappingPOJOMap) {
++ private Set getRelatedMappings(FileObject mappingFO, Set relatedMappings, Map> mappingPOJOMap) {
+ try {
+ org.dom4j.io.SAXReader xmlReader = new org.dom4j.io.SAXReader();
+ org.dom4j.Document document = xmlReader.read(FileUtil.toFile(mappingFO));
+@@ -559,21 +561,21 @@
+ while (classElementIterator.hasNext()) {
+ org.dom4j.Element classElement = (org.dom4j.Element) classElementIterator.next();
+ logger.info("Processing many-to-one");
+- processMappingRelationships(classElement.elementIterator("many-to-one"), relatedMappings, mappingPOJOMap);
++ processMappingRelationships(classElement.elementIterator("many-to-one"), relatedMappings, mappingPOJOMap);
+ logger.info("Processing one-to-one");
+- processMappingRelationships(classElement.elementIterator("one-to-one"), relatedMappings, mappingPOJOMap);
++ processMappingRelationships(classElement.elementIterator("one-to-one"), relatedMappings, mappingPOJOMap);
+ logger.info("Processing set");
+- processMappingRelationships(classElement.elementIterator("set"), relatedMappings, mappingPOJOMap);
++ processMappingRelationships(classElement.elementIterator("set"), relatedMappings, mappingPOJOMap);
+ logger.info("Processing idbag");
+- processMappingRelationships(classElement.elementIterator("idbag"), relatedMappings, mappingPOJOMap);
++ processMappingRelationships(classElement.elementIterator("idbag"), relatedMappings, mappingPOJOMap);
+ logger.info("Processing map");
+- processMappingRelationships(classElement.elementIterator("map"), relatedMappings, mappingPOJOMap);
++ processMappingRelationships(classElement.elementIterator("map"), relatedMappings, mappingPOJOMap);
+ logger.info("Processing bag");
+- processMappingRelationships(classElement.elementIterator("bag"), relatedMappings, mappingPOJOMap);
++ processMappingRelationships(classElement.elementIterator("bag"), relatedMappings, mappingPOJOMap);
+ logger.info("Processing list");
+- processMappingRelationships(classElement.elementIterator("list"), relatedMappings, mappingPOJOMap);
++ processMappingRelationships(classElement.elementIterator("list"), relatedMappings, mappingPOJOMap);
+ logger.info("Processing array");
+- processMappingRelationships(classElement.elementIterator("array"), relatedMappings, mappingPOJOMap);
++ processMappingRelationships(classElement.elementIterator("array"), relatedMappings, mappingPOJOMap);
+
+ }
+ } catch (Exception e) {
+@@ -583,28 +585,28 @@
+ return relatedMappings;
+ }
+
+- private List processMappingRelationships(Iterator relationshipIterator, List relatedMappings, Map> mappingPOJOMap) {
++ private Set processMappingRelationships(Iterator relationshipIterator, Set relatedMappings, Map> mappingPOJOMap) {
+ while (relationshipIterator.hasNext()) {
+ org.dom4j.Element relationshipElement = (org.dom4j.Element) relationshipIterator.next();
+ String pojoName = relationshipElement.attributeValue("class");
+- if(pojoName == null) {
++ if (pojoName == null) {
+ // Check for Collection based relationship types.
+ org.dom4j.Element connectionTypeElement = relationshipElement.element("one-to-many");
+- if(connectionTypeElement == null) {
++ if (connectionTypeElement == null) {
+ connectionTypeElement = relationshipElement.element("composite-element");
+ }
+- if(connectionTypeElement == null) {
++ if (connectionTypeElement == null) {
+ connectionTypeElement = relationshipElement.element("one-to-many");
+ }
+- if(connectionTypeElement == null) {
++ if (connectionTypeElement == null) {
+ connectionTypeElement = relationshipElement.element("many-to-many");
+ }
+- if(connectionTypeElement != null) {
++ if (connectionTypeElement != null) {
+ pojoName = connectionTypeElement.attributeValue("class");
+- }
++ }
+ }
+ FileObject relatedMappingFO = findRelatedMappingFO(pojoName, mappingPOJOMap);
+- if (relatedMappingFO != null && (! relatedMappings.contains(relatedMappingFO))) {
++ if (relatedMappingFO != null && (!relatedMappings.contains(relatedMappingFO))) {
+ relatedMappings.add(relatedMappingFO);
+ getRelatedMappings(relatedMappingFO, relatedMappings, mappingPOJOMap);
+ }
+@@ -648,7 +650,7 @@
+ private Class processMatchingClass(String className, ClassLoader customClassLoader, Project project) {
+ FileObject clazzFO = HibernateUtil.findJavaFileObjectInProject(className, project);
+ FileObject buildFolderFO = HibernateUtil.getBuildFO(project);
+- if(buildFolderFO == null) {
++ if (buildFolderFO == null) {
+ return null; // Unable to find the build folder.
+ }
+ return checkAndCompile(className, clazzFO, buildFolderFO, customClassLoader, project);
+@@ -705,7 +707,7 @@
+ logger.info("b = " + b);
+ if (b == false) { // Compilation errors.
+ FileObject classfileFO = buildFolderFO.getFileObject(className + ".class");
+- if(classfileFO != null && classfileFO.isValid()) {
++ if (classfileFO != null && classfileFO.isValid()) {
+ classfileFO.delete();
+ }
+ return clazz;
+diff -r 76d51071af8a -r af9499d919b8 hibernate/src/org/netbeans/modules/hibernate/loaders/cfg/multiview/MappingPanel.java
+--- a/hibernate/src/org/netbeans/modules/hibernate/loaders/cfg/multiview/MappingPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/hibernate/src/org/netbeans/modules/hibernate/loaders/cfg/multiview/MappingPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -70,7 +70,7 @@
+ this.classTextField.setText( className );
+ }
+
+- public boolean isValid() {
++ public boolean isDataValid() {
+ // At least one field should be filled to make it valid
+ if( getResourceName().length() != 0
+ || getJarName().length() != 0
+diff -r 76d51071af8a -r af9499d919b8 hibernate/src/org/netbeans/modules/hibernate/loaders/cfg/multiview/MappingsTablePanel.java
+--- a/hibernate/src/org/netbeans/modules/hibernate/loaders/cfg/multiview/MappingsTablePanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/hibernate/src/org/netbeans/modules/hibernate/loaders/cfg/multiview/MappingsTablePanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -118,7 +118,7 @@
+
+ if (add) {
+ // enambe/disable OK button
+- dialog.setValid(dialogPanel.isValid());
++ dialog.setValid(dialogPanel.isDataValid());
+ }
+
+ javax.swing.event.DocumentListener docListener = new EditDialog.DocListener(dialog);
+diff -r 76d51071af8a -r af9499d919b8 hibernate/src/org/netbeans/modules/hibernate/resources/Bundle.properties
+--- a/hibernate/src/org/netbeans/modules/hibernate/resources/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/hibernate/src/org/netbeans/modules/hibernate/resources/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -38,6 +38,9 @@
+ # made subject to such option by the copyright holder.
+ OpenIDE-Module-Display-Category=Java
+ OpenIDE-Module-Long-Description=\
++For the list of included fixed bugs please check http://wiki.netbeans.org/NetBeans6.5PatchesInfo. \
++ \
++ \
+ This module provides Hibernate support in NetBeans
+ OpenIDE-Module-Name=Hibernate Support
+ OpenIDE-Module-Short-Description=Hibernate Support
+diff -r 76d51071af8a -r af9499d919b8 ide.branding.kit/manifest.mf
+--- a/ide.branding.kit/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/ide.branding.kit/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -1,5 +1,5 @@
+ Manifest-Version: 1.0
+ OpenIDE-Module: org.netbeans.modules.ide.branding.kit
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/ide/branding/kit/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.2.1
++OpenIDE-Module-Specification-Version: 1.2.4
+
+diff -r 76d51071af8a -r af9499d919b8 ide.branding.kit/nbproject/project.xml
+--- a/ide.branding.kit/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100
++++ b/ide.branding.kit/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300
+@@ -21,13 +21,13 @@
+
+ org.netbeans.modules.registration
+
+- 1.0
++ 1.1.2
+
+
+
+ org.netbeans.modules.uihandler.exceptionreporter
+
+- 1.0
++ 1.2.3
+
+
+
+@@ -37,6 +37,12 @@
+ 1.12
+
+
++
++ org.netbeans.modules.reglib
++
++ 1.2.4
++
++
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 ide.branding.kit/src/org/netbeans/modules/ide/branding/kit/Bundle.properties
+--- a/ide.branding.kit/src/org/netbeans/modules/ide/branding/kit/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/ide.branding.kit/src/org/netbeans/modules/ide/branding/kit/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -1,5 +1,9 @@
+ OpenIDE-Module-Display-Category=Base IDE
+ OpenIDE-Module-Long-Description=\
++For the list of included fixed bugs please check http://wiki.netbeans.org/NetBeans6.5PatchesInfo. \
++ \
++ \
++\
+ Content and branding for the specific release of NetBeans, including welcome screen, branding, definition of update centers, exception reporter, etc.
+ OpenIDE-Module-Name=NetBeans 6.5
+ OpenIDE-Module-Short-Description=NetBeans IDE content and branding.
+diff -r 76d51071af8a -r af9499d919b8 ide.kit/manifest.mf
+--- a/ide.kit/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/ide.kit/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -1,5 +1,5 @@
+ Manifest-Version: 1.0
+ OpenIDE-Module: org.netbeans.modules.ide.kit
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/ide/kit/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.5.1
++OpenIDE-Module-Specification-Version: 1.5.4
+
+diff -r 76d51071af8a -r af9499d919b8 ide.kit/nbproject/project.xml
+--- a/ide.kit/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100
++++ b/ide.kit/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300
+@@ -6,6 +6,15 @@
+ org.netbeans.modules.ide.kit
+
+
++ org.netbeans.api.java.classpath
++
++
++
++ 1
++ 1.18.2
++
++
++
+ org.netbeans.core.ide
+
+ 1
+@@ -50,7 +59,7 @@
+ org.netbeans.modules.editor.completion
+
+ 1
+- 1.9
++ 1.13.2
+
+
+
+@@ -134,7 +143,7 @@
+ org.netbeans.modules.jumpto
+
+ 1
+- 1.2
++ 1.7.2
+
+
+
+@@ -152,16 +161,25 @@
+
+
+
++ org.netbeans.modules.project.ant
++
++
++
++ 1
++ 1.26.3
++
++
++
+ org.netbeans.modules.project.libraries
+
+ 1
+- 1.14
++ 1.19.2
+
+
+
+ org.netbeans.modules.projectui
+
+- 1.12
++ 1.15.3
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 ide.kit/src/org/netbeans/modules/ide/kit/Bundle.properties
+--- a/ide.kit/src/org/netbeans/modules/ide/kit/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/ide.kit/src/org/netbeans/modules/ide/kit/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -1,5 +1,8 @@
+ OpenIDE-Module-Display-Category=Base IDE
+ OpenIDE-Module-Long-Description=\
++For the list of included fixed bugs please check http://wiki.netbeans.org/NetBeans6.5PatchesInfo. \
++ \
++ \
+ The IDE Platform consists of the modules in the Base IDE that do not naturally belong to any of its visible plugins, but are installed together with the plugins that require them. \
+ The modules (NBMs) in IDE Platform are: Directory Chooser, External HTML Browser, External Libraries, General Online Help, General Options Dialog Panels, Generic Languages Framework, HTTP Server, IDE Defaults, Project UI, Refactoring API, Tag Based Editors Library, Timers API, and User Utilities.
+ OpenIDE-Module-Name=IDE Platform
only in patch2:
unchanged:
--- netbeans-6.5.orig/debian/patches/94-6.5.1-patches-4.patch
+++ netbeans-6.5/debian/patches/94-6.5.1-patches-4.patch
@@ -0,0 +1,103 @@
+diff -Nur -x '*.orig' -x '*~' netbeans-6.5/java.kit/nbproject/project.xml netbeans-6.5.new/java.kit/nbproject/project.xml
+--- netbeans-6.5/java.kit/nbproject/project.xml 2009-03-30 19:35:36.000000000 +0400
++++ netbeans-6.5.new/java.kit/nbproject/project.xml 2009-03-30 19:43:06.000000000 +0400
+@@ -35,6 +35,13 @@
+
+
+
++ org.netbeans.modules.debugger.jpda
++
++ 2
++ 1.22.2
++
++
++
+ org.netbeans.modules.i18n
+
+ 1
+@@ -65,7 +72,7 @@
+ org.netbeans.modules.java.editor
+
+ 1
+- 2.8
++ 2.13.2
+
+
+
+@@ -114,7 +121,7 @@
+ org.netbeans.modules.java.j2seproject
+
+ 1
+- 1.12
++ 1.21.2
+
+
+
+@@ -135,13 +142,13 @@
+ org.netbeans.modules.java.project
+
+ 1
+- 1.12
++ 1.22.2
+
+
+
+ org.netbeans.modules.java.source
+
+- 0.21
++ 0.40.4
+
+
+
+@@ -154,14 +161,14 @@
+ org.netbeans.modules.java.sourceui
+
+ 1
+- 1.2
++ 1.6.2
+
+
+
+ org.netbeans.modules.javadoc
+
+ 1
+- 1.20
++ 1.24.2
+
+
+
+@@ -181,7 +188,7 @@
+ org.netbeans.modules.refactoring.java
+
+ 1
+- 1.1
++ 1.4.2
+
+
+
++
++ org.netbeans.libs.javacimpl
++
++ 1
++ 0.9.2
++
++
+
+
+
+diff -Nur -x '*.orig' -x '*~' netbeans-6.5/libs.javacimpl/nbproject/project.properties netbeans-6.5.new/libs.javacimpl/nbproject/project.properties
+--- netbeans-6.5/libs.javacimpl/nbproject/project.properties 2009-03-30 19:35:36.000000000 +0400
++++ netbeans-6.5.new/libs.javacimpl/nbproject/project.properties 2009-03-30 19:44:59.000000000 +0400
+@@ -40,7 +40,7 @@
+ javac.source=1.5
+ nbm.homepage=http://jackpot.netbeans.org/
+ nbm.module.author=Petr Hrebejk, Sun Microsystems, Inc.
+-spec.version.base=0.9.1
++spec.version.base=0.9.2
+ javadoc.arch=${basedir}/arch.xml
+
+
only in patch2:
unchanged:
--- netbeans-6.5.orig/debian/patches/92-6.5.1-patches-2.patch
+++ netbeans-6.5/debian/patches/92-6.5.1-patches-2.patch
@@ -0,0 +1,2512 @@
+diff -r 76d51071af8a -r af9499d919b8 java.editor/nbproject/project.properties
+--- a/java.editor/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/java.editor/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -39,7 +39,7 @@
+
+ javadoc.title=Java Editor
+
+-spec.version.base=2.13.1
++spec.version.base=2.13.2
+ test.qa-functional.cp.extra=${editor.dir}/modules/org-netbeans-modules-editor-fold.jar
+ javac.source=1.5
+ build.compiler.source=1.5
+diff -r 76d51071af8a -r af9499d919b8 java.editor/src/org/netbeans/modules/editor/java/AbstractCamelCasePosition.java
+--- a/java.editor/src/org/netbeans/modules/editor/java/AbstractCamelCasePosition.java Fri Nov 07 11:48:18 2008 +0100
++++ b/java.editor/src/org/netbeans/modules/editor/java/AbstractCamelCasePosition.java Tue Mar 10 13:53:55 2009 +0300
+@@ -90,7 +90,7 @@
+ } else {
+ final BaseDocument bdoc = org.netbeans.editor.Utilities.getDocument(target);
+ if (bdoc != null) {
+- bdoc.runAtomic (new Runnable () {
++ bdoc.runAtomicAsUser(new Runnable () {
+ public void run () {
+ DocumentUtilities.setTypingModification(bdoc, true);
+ try {
+diff -r 76d51071af8a -r af9499d919b8 java.editor/src/org/netbeans/modules/editor/java/BraceCompletion.java
+--- a/java.editor/src/org/netbeans/modules/editor/java/BraceCompletion.java Fri Nov 07 11:48:18 2008 +0100
++++ b/java.editor/src/org/netbeans/modules/editor/java/BraceCompletion.java Tue Mar 10 13:53:55 2009 +0300
+@@ -474,7 +474,7 @@
+ // It can be revised in the future.
+ bracketBalance = 1;
+ }
+- finished = true;
++ finished = javaTS.offset() < caretOffset;
+ }
+ }
+ break;
+@@ -592,8 +592,16 @@
+ if (caretOffset <= 0) {
+ return false;
+ }
+- char previousChar = doc.getChars(caretOffset - 1, 1)[0];
+- return previousChar == '\\';
++
++ if (caretOffset == 1) {
++ char previousChar = doc.getChars(caretOffset - 1, 1)[0];
++
++ return previousChar == '\\';
++ }
++
++ char[] previousChars = doc.getChars(caretOffset - 2, 2);
++
++ return previousChars[0] != '\\' && previousChars[1] == '\\';
+ }
+
+ /**
+diff -r 76d51071af8a -r af9499d919b8 java.editor/test/unit/src/org/netbeans/modules/editor/java/JavaBraceCompletionUnitTest.java
+--- a/java.editor/test/unit/src/org/netbeans/modules/editor/java/JavaBraceCompletionUnitTest.java Fri Nov 07 11:48:18 2008 +0100
++++ b/java.editor/test/unit/src/org/netbeans/modules/editor/java/JavaBraceCompletionUnitTest.java Tue Mar 10 13:53:55 2009 +0300
+@@ -79,7 +79,7 @@
+ }
+
+ // ------- Tests for completion of right parenthesis ')' -------------
+-
++
+ public void testTypeSemicolonInForLoop() { // #146139
+ Context ctx = new Context(new JavaKit(),
+ "for (int i = 0|)"
+@@ -125,7 +125,7 @@
+ ctx.typeChar('(');
+ ctx.assertDocumentTextEquals("m(|)");
+ }
+-
++
+ public void testTypeSecondRightParen() {
+ Context ctx = new Context(new JavaKit(),
+ "m()|)"
+@@ -135,7 +135,7 @@
+ "m())|"
+ );
+ }
+-
++
+ public void testTypeRightParenSwingInvokeLaterRunnable() {
+ Context ctx = new Context(new JavaKit(),
+ "SwingUtilities.invokeLater(new Runnable()|))"
+@@ -169,7 +169,7 @@
+ "})"
+ );
+ }
+-
++
+ public void testTypeRightParenIfMethodCall() {
+ Context ctx = new Context(new JavaKit(),
+ "if (a()|) + 5 > 6) {\n" +
+@@ -195,7 +195,7 @@
+
+
+ // ------- Tests for completion of right brace '}' -------------
+-
++
+ public void testTypeAddRightBraceIfLeftBrace() {
+ Context ctx = new Context(new JavaKit(),
+ "if (true) {|"
+@@ -219,7 +219,7 @@
+ "}"
+ );
+ }
+-
++
+ public void testTypeAddRightBraceIfLeftBraceLineComment() {
+ Context ctx = new Context(new JavaKit(),
+ "if (true) { // line-comment|"
+@@ -292,9 +292,9 @@
+ " System.out.println(\"\");\n" +
+ "}\n");
+ }
+-
+-
+- // ------- Tests for completion of quote (") -------------
++
++
++ // ------- Tests for completion of quote (") -------------
+ public void testTypeSimpleQuoteInEmptyDoc () throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ "|"
+@@ -324,7 +324,7 @@
+ " \"|\""
+ );
+ }
+-
++
+ public void testTypeSimpleQuoteInWhiteSpaceArea () throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ " | "
+@@ -334,7 +334,7 @@
+ " \"|\" "
+ );
+ }
+-
++
+ public void testTypeQuoteAtEOL () throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ " |\n"
+@@ -344,7 +344,7 @@
+ " \"|\"\n"
+ );
+ }
+-
++
+ public void testTypeQuoteWithUnterminatedStringLiteral () throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ " \"unterminated string| \n"
+@@ -354,7 +354,7 @@
+ " \"unterminated string\"| \n"
+ );
+ }
+-
++
+ public void testTypeQuoteAtEOLWithUnterminatedStringLiteral () throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ " \"unterminated string | \n"
+@@ -394,7 +394,7 @@
+ " System.out.println(\"|some text) "
+ );
+ }
+-
++
+ public void testTypeQuoteInsideNonEmptyParenthesesBeforeClosingParentheses () throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ " System.out.println(i+|) "
+@@ -404,7 +404,7 @@
+ " System.out.println(i+\"|\") "
+ );
+ }
+-
++
+ public void testTypeQuoteInsideNonEmptyParenthesesBeforeClosingParenthesesAndUnterminatedStringLiteral () throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ " System.out.println(\"unterminated string literal |); "
+@@ -474,7 +474,7 @@
+ "\\\"|"
+ );
+ }
+-
++
+ public void testTypeQuoteEaten() throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ "|"
+@@ -484,8 +484,8 @@
+ ctx.assertDocumentTextEquals(
+ "\"\"|"
+ );
+- }
+-
++ }
++
+ public void testTypeQuoteOnFirstQuote () throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ " |\"asdf\""
+@@ -504,8 +504,8 @@
+ ctx.assertDocumentTextEquals(
+ "/** \"|\n */"
+ );
+- }
+-
++ }
++
+ public void testTypeQuoteAtTheEndOfLineCommentLine() throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ "// test line comment |\n"
+@@ -514,11 +514,11 @@
+ ctx.assertDocumentTextEquals(
+ "// test line comment \"|\n"
+ );
+- }
+-
+-
+- // ------- Tests for completion of single quote (') -------------
+-
++ }
++
++
++ // ------- Tests for completion of single quote (') -------------
++
+ public void testTypeSingleQuoteInEmptyDoc () throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ "|"
+@@ -548,7 +548,7 @@
+ " '|'"
+ );
+ }
+-
++
+ public void testTypeSingleQuoteInWhiteSpaceArea () throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ " | "
+@@ -558,7 +558,7 @@
+ " '|' "
+ );
+ }
+-
++
+ public void testTypeSingleQuoteAtEOL () throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ " |\n"
+@@ -568,7 +568,7 @@
+ " '|'\n"
+ );
+ }
+-
++
+ public void testTypeSingleQuoteWithUnterminatedCharLiteral () throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ " '| \n"
+@@ -578,7 +578,7 @@
+ " ''| \n"
+ );
+ }
+-
++
+ public void testTypeSingleQuoteAtEOLWithUnterminatedCharLiteral () throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ " ' |\n"
+@@ -618,7 +618,7 @@
+ " System.out.println('|some text) "
+ );
+ }
+-
++
+ public void testTypeSingleQuoteInsideNonEmptyParenthesesBeforeClosingParentheses () throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ " System.out.println(i+|) "
+@@ -628,7 +628,7 @@
+ " System.out.println(i+'|') "
+ );
+ }
+-
++
+ public void testTypeSingleQuoteInsideNonEmptyParenthesesBeforeClosingParenthesesAndUnterminatedCharLiteral () throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ " System.out.println(' |); "
+@@ -698,7 +698,7 @@
+ "\\'|"
+ );
+ }
+-
++
+ public void testTypeSingleQuoteEaten() throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ "|"
+@@ -708,8 +708,8 @@
+ ctx.assertDocumentTextEquals(
+ "''|"
+ );
+- }
+-
++ }
++
+ public void testTypeSingleQuoteInsideComments() throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ "/* |\n */"
+@@ -718,7 +718,7 @@
+ ctx.assertDocumentTextEquals(
+ "/* \'|\n */"
+ );
+- }
++ }
+
+ public void testTypeSingleQuoteAtTheEndOfLineCommentLine() throws Exception {
+ Context ctx = new Context(new JavaKit(),
+@@ -748,7 +748,7 @@
+ prefs.putBoolean(SimpleValueNames.COMPLETION_PAIR_CHARACTERS, orig);
+ }
+ }
+-
++
+ public void testDoNotSkipWhenNotBalanced147683a() throws Exception {
+ Context ctx = new Context(new JavaKit(),
+ "System.err.println((true|);"
+@@ -789,6 +789,26 @@
+ );
+ }
+
++ public void testKeepBalance148878() throws Exception {
++ Context ctx = new Context(new JavaKit(),
++ "Map[|] m = new HashMap[1];"
++ );
++ ctx.typeChar(']');
++ ctx.assertDocumentTextEquals(
++ "Map[]| m = new HashMap[1];"
++ );
++ }
++
++ public void testQuotes148878() throws Exception {
++ Context ctx = new Context(new JavaKit(),
++ "if (c == '\\\\|')"
++ );
++ ctx.typeChar('\'');
++ ctx.assertDocumentTextEquals(
++ "if (c == '\\\\'|)"
++ );
++ }
++
+ private static final class Context {
+
+ private JEditorPane pane;
+diff -r 76d51071af8a -r af9499d919b8 java.j2seproject/nbproject/project.properties
+--- a/java.j2seproject/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/java.j2seproject/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -39,7 +39,7 @@
+
+ javac.compilerargs=-Xlint -Xlint:-serial
+ javac.source=1.5
+-spec.version.base=1.21.1
++spec.version.base=1.21.2
+
+ javadoc.arch=${basedir}/arch.xml
+ javadoc.apichanges=${basedir}/apichanges.xml
+diff -r 76d51071af8a -r af9499d919b8 java.j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl
+--- a/java.j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl Fri Nov 07 11:48:18 2008 +0100
++++ b/java.j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl Tue Mar 10 13:53:55 2009 +0300
+@@ -335,7 +335,7 @@
+
+
+ sourcepath
+-
++ /does/not/exist
+
+
+ customize
+diff -r 76d51071af8a -r af9499d919b8 java.kit/manifest.mf
+--- a/java.kit/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/java.kit/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -1,5 +1,5 @@
+ Manifest-Version: 1.0
+ OpenIDE-Module: org.netbeans.modules.java.kit
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/java/kit/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.3.1
++OpenIDE-Module-Specification-Version: 1.3.4
+
+diff -r 76d51071af8a -r af9499d919b8 java.kit/src/org/netbeans/modules/java/kit/Bundle.properties
+--- a/java.kit/src/org/netbeans/modules/java/kit/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/java.kit/src/org/netbeans/modules/java/kit/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -1,4 +1,8 @@
+ OpenIDE-Module-Display-Category=Java
+ OpenIDE-Module-Name=Java
+-OpenIDE-Module-Long-Description=Provides the general infrastructure for handling Java code in the IDE. Includes features such as syntax highlighting, error marking, code completion, code templates, refactoring, and other coding productivity features.
++OpenIDE-Module-Long-Description=\
++For the list of included fixed bugs please check http://wiki.netbeans.org/NetBeans6.5PatchesInfo. \
++ \
++ \
++Provides the general infrastructure for handling Java code in the IDE. Includes features such as syntax highlighting, error marking, code completion, code templates, refactoring, and other coding productivity features.
+ OpenIDE-Module-Short-Description=Support for development in Java.
+diff -r 76d51071af8a -r af9499d919b8 java.project/manifest.mf
+--- a/java.project/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/java.project/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -3,7 +3,7 @@
+ OpenIDE-Module-Layer: org/netbeans/modules/java/project/layer.xml
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/java/project/Bundle.properties
+ OpenIDE-Module-Needs: javax.script.ScriptEngine.freemarker
+-OpenIDE-Module-Specification-Version: 1.22.1
++OpenIDE-Module-Specification-Version: 1.22.2
+ OpenIDE-Module-Recommends: org.netbeans.spi.java.project.runner.JavaRunnerImplementation
+ AutoUpdate-Show-In-Client: false
+
+diff -r 76d51071af8a -r af9499d919b8 java.project/src/org/netbeans/spi/java/project/support/ui/PackageViewChildren.java
+--- a/java.project/src/org/netbeans/spi/java/project/support/ui/PackageViewChildren.java Fri Nov 07 11:48:18 2008 +0100
++++ b/java.project/src/org/netbeans/spi/java/project/support/ui/PackageViewChildren.java Tue Mar 10 13:53:55 2009 +0300
+@@ -1132,7 +1132,7 @@
+ }
+ }
+
+- final class NoFoldersDataFilter implements ChangeListener, ChangeableDataFilter {
++ final class NoFoldersDataFilter implements ChangeListener, ChangeableDataFilter, DataFilter.FileBased {
+
+ private final ChangeSupport cs = new ChangeSupport(this);
+
+@@ -1141,8 +1141,7 @@
+ }
+
+ public boolean acceptDataObject(DataObject obj) {
+- FileObject fo = obj.getPrimaryFile();
+- return fo.isValid() && VisibilityQuery.getDefault().isVisible(fo) && !(obj instanceof DataFolder) && group.contains(fo);
++ return acceptFileObject(obj.getPrimaryFile());
+ }
+
+ public void stateChanged( ChangeEvent e) {
+@@ -1156,6 +1155,10 @@
+ public void removeChangeListener( ChangeListener listener ) {
+ cs.removeChangeListener(listener);
+ }
++
++ public boolean acceptFileObject(FileObject fo) {
++ return fo.isValid() && VisibilityQuery.getDefault().isVisible(fo) && fo.isData() && group.contains(fo);
++ }
+
+ }
+
+diff -r 76d51071af8a -r af9499d919b8 java.project/src/org/netbeans/spi/java/project/support/ui/TreeRootNode.java
+--- a/java.project/src/org/netbeans/spi/java/project/support/ui/TreeRootNode.java Fri Nov 07 11:48:18 2008 +0100
++++ b/java.project/src/org/netbeans/spi/java/project/support/ui/TreeRootNode.java Tue Mar 10 13:53:55 2009 +0300
+@@ -52,7 +52,6 @@
+ import javax.swing.Icon;
+ import javax.swing.event.ChangeEvent;
+ import javax.swing.event.ChangeListener;
+-import javax.swing.event.EventListenerList;
+ import org.netbeans.api.project.SourceGroup;
+ import org.netbeans.api.queries.VisibilityQuery;
+ import org.openide.DialogDisplayer;
+@@ -60,12 +59,14 @@
+ import org.openide.filesystems.FileObject;
+ import org.openide.filesystems.FileUtil;
+ import org.openide.loaders.ChangeableDataFilter;
++import org.openide.loaders.DataFilter;
+ import org.openide.loaders.DataFolder;
+ import org.openide.loaders.DataObject;
+ import org.openide.nodes.FilterNode;
+ import org.openide.nodes.Node;
+ import org.openide.nodes.NodeNotFoundException;
+ import org.openide.nodes.NodeOp;
++import org.openide.util.ChangeSupport;
+ import org.openide.util.NbBundle;
+ import org.openide.util.Utilities;
+ import org.openide.util.WeakListeners;
+@@ -88,7 +89,7 @@
+ }
+
+ private TreeRootNode(DataFolder folder, SourceGroup g) {
+- this(new FilterNode(folder.getNodeDelegate(), folder.createNodeChildren(new VisibilityQueryDataFilter(g))), g);
++ this(new FilterNode(folder.getNodeDelegate(), folder.createNodeChildren(new GroupDataFilter(g))), g);
+ }
+
+ private TreeRootNode (Node originalNode, SourceGroup g) {
+@@ -204,53 +205,44 @@
+ }
+ }
+
+- private static final class VisibilityQueryDataFilter implements ChangeListener, PropertyChangeListener, ChangeableDataFilter {
++ private static final class GroupDataFilter implements ChangeListener, PropertyChangeListener,
++ ChangeableDataFilter, DataFilter.FileBased {
+
+ private static final long serialVersionUID = 1L; // in case a DataFolder.ClonedFilterHandle saves me
+
+- private final EventListenerList ell = new EventListenerList();
++ private final ChangeSupport cs = new ChangeSupport(this);
+ private final SourceGroup g;
+
+- public VisibilityQueryDataFilter(SourceGroup g) {
++ public GroupDataFilter(SourceGroup g) {
+ this.g = g;
+ VisibilityQuery.getDefault().addChangeListener(WeakListeners.change(this, VisibilityQuery.getDefault()));
+ g.addPropertyChangeListener(WeakListeners.propertyChange(this, g));
+ }
+
+ public boolean acceptDataObject(DataObject obj) {
+- FileObject fo = obj.getPrimaryFile();
+- return g.contains(fo) && VisibilityQuery.getDefault().isVisible(fo);
++ return acceptFileObject(obj.getPrimaryFile());
+ }
+
+ public void stateChanged(ChangeEvent e) {
+- fireChange();
++ cs.fireChange();
+ }
+
+ public void propertyChange(PropertyChangeEvent e) {
+ if (SourceGroup.PROP_CONTAINERSHIP.equals(e.getPropertyName())) {
+- fireChange();
++ cs.fireChange();
+ }
+ }
+
+- private void fireChange() {
+- Object[] listeners = ell.getListenerList();
+- ChangeEvent event = null;
+- for (int i = listeners.length - 2; i >= 0; i -= 2) {
+- if (listeners[i] == ChangeListener.class) {
+- if (event == null) {
+- event = new ChangeEvent(this);
+- }
+- ((ChangeListener) listeners[i+1]).stateChanged(event);
+- }
+- }
+- }
+-
+ public void addChangeListener(ChangeListener listener) {
+- ell.add(ChangeListener.class, listener);
++ cs.addChangeListener(listener);
+ }
+
+ public void removeChangeListener(ChangeListener listener) {
+- ell.remove(ChangeListener.class, listener);
++ cs.removeChangeListener(listener);
++ }
++
++ public boolean acceptFileObject(FileObject fo) {
++ return g.contains(fo) && VisibilityQuery.getDefault().isVisible(fo);
+ }
+
+ }
+diff -r 76d51071af8a -r af9499d919b8 java.source/nbproject/project.properties
+--- a/java.source/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/java.source/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -43,7 +43,7 @@
+ javadoc.title=Java Source
+ javadoc.arch=${basedir}/arch.xml
+ javadoc.apichanges=${basedir}/apichanges.xml
+-spec.version.base=0.40.1
++spec.version.base=0.40.4
+ test.qa-functional.cp.extra=${refactoring.java.dir}/modules/ext/javac-api-nb-7.0-b07.jar
+ test.unit.run.cp.extra=${o.n.core.dir}/core/core.jar:\
+ ${o.n.core.dir}/lib/boot.jar:\
+diff -r 76d51071af8a -r af9499d919b8 java.source/src/org/netbeans/api/java/source/WorkingCopy.java
+--- a/java.source/src/org/netbeans/api/java/source/WorkingCopy.java Fri Nov 07 11:48:18 2008 +0100
++++ b/java.source/src/org/netbeans/api/java/source/WorkingCopy.java Tue Mar 10 13:53:55 2009 +0300
+@@ -291,7 +291,12 @@
+ return null;
+ }
+ Tree repl = changeMap.remove(tree);
+- Tree newRepl = super.translate(repl != null ? repl : tree);
++ Tree newRepl;
++ if (repl != null) {
++ newRepl = translate(repl);
++ } else {
++ newRepl = super.translate(tree);
++ }
+ return newRepl;
+ }
+ }
+diff -r 76d51071af8a -r af9499d919b8 java.source/src/org/netbeans/modules/java/source/save/CasualDiff.java
+--- a/java.source/src/org/netbeans/modules/java/source/save/CasualDiff.java Fri Nov 07 11:48:18 2008 +0100
++++ b/java.source/src/org/netbeans/modules/java/source/save/CasualDiff.java Tue Mar 10 13:53:55 2009 +0300
+@@ -333,6 +333,7 @@
+
+ protected int diffClassDef(JCClassDecl oldT, JCClassDecl newT, int[] bounds) {
+ int localPointer = bounds[0];
++ final Name origOuterClassName = origClassName;
+ int insertHint = localPointer;
+ // skip the section when printing anonymous class
+ if (anonClass == false) {
+@@ -442,8 +443,7 @@
+ copyTo(localPointer, insertHint);
+ localPointer = diffList(filterHidden(oldT.defs), filterHidden(newT.defs), insertHint, est, Measure.MEMBER, printer);
+ printer.enclClassName = origName;
+- // the reference is no longer needed.
+- origClassName = null;
++ origClassName = origOuterClassName;
+ printer.undent(old);
+ if (localPointer != -1 && localPointer < origText.length()) {
+ if (origText.charAt(localPointer) == '}') {
+diff -r 76d51071af8a -r af9499d919b8 java.source/src/org/netbeans/modules/java/source/save/Reformatter.java
+--- a/java.source/src/org/netbeans/modules/java/source/save/Reformatter.java Fri Nov 07 11:48:18 2008 +0100
++++ b/java.source/src/org/netbeans/modules/java/source/save/Reformatter.java Tue Mar 10 13:53:55 2009 +0300
+@@ -1497,6 +1497,11 @@
+ alignIndent = col;
+ for (Iterator extends StatementTree> it = inits.iterator(); it.hasNext();) {
+ scan(it.next(), p);
++ if (it.hasNext() && !fieldGroup) {
++ spaces(cs.spaceBeforeComma() ? 1 : 0);
++ accept(COMMA);
++ spaces(cs.spaceAfterComma() ? 1 : 0);
++ }
+ }
+ spaces(cs.spaceBeforeSemi() ? 1 : 0);
+ }
+@@ -2647,7 +2652,11 @@
+ int index = tokens.index();
+ int c = col;
+ Diff d = diffs.isEmpty() ? null : diffs.getFirst();
++ old = indent;
++ if (alignIndent >= 0)
++ indent = alignIndent;
+ spaces(spacesCnt, true);
++ indent = old;
+ ret = col;
+ accept(first, rest);
+ if (this.col > rightMargin) {
+@@ -2662,7 +2671,11 @@
+ }
+ break;
+ case WRAP_NEVER:
++ old = indent;
++ if (alignIndent >= 0)
++ indent = alignIndent;
+ spaces(spacesCnt, true);
++ indent = old;
+ ret = col;
+ accept(first, rest);
+ break;
+@@ -2686,7 +2699,11 @@
+ int index = tokens.index();
+ int c = col;
+ Diff d = diffs.isEmpty() ? null : diffs.getFirst();
++ old = indent;
++ if (alignIndent >= 0)
++ indent = alignIndent;
+ spaces(spacesCnt, true);
++ indent = old;
+ ret = col;
+ wrapDepth++;
+ scan(tree, null);
+@@ -2703,7 +2720,11 @@
+ }
+ break;
+ case WRAP_NEVER:
++ old = indent;
++ if (alignIndent >= 0)
++ indent = alignIndent;
+ spaces(spacesCnt, true);
++ indent = old;
+ ret = col;
+ scan(tree, null);
+ break;
+diff -r 76d51071af8a -r af9499d919b8 java.source/src/org/netbeans/modules/java/source/usages/RepositoryUpdater.java
+--- a/java.source/src/org/netbeans/modules/java/source/usages/RepositoryUpdater.java Fri Nov 07 11:48:18 2008 +0100
++++ b/java.source/src/org/netbeans/modules/java/source/usages/RepositoryUpdater.java Tue Mar 10 13:53:55 2009 +0300
+@@ -283,11 +283,12 @@
+ assert changedCp != null;
+ if (LOGGER.isLoggable(Level.FINE))
+ LOGGER.log(Level.FINE, "ClassPath change, cp={0}", changedCp.toString());
+- for (ClassPath.Entry e : changedCp.entries()) {
+- URL root = e.getURL();
+- scheduleCompilation(root,root, true, false);
++ final List entries = changedCp.entries();
++ final List roots = new ArrayList(entries.size());
++ for (ClassPath.Entry e : entries) {
++ roots.add (e.getURL());
+ }
+-
++ submit(Work.filterChange(roots, true));
+ return ;
+ }
+
+@@ -617,6 +618,7 @@
+ if (!noscan) {
+ synchronized (this) {
+ this.noSubmited++;
++ LOGGER.finest("submit()+: " + this.noSubmited);
+ }
+ final CompileWorker cw = new CompileWorker (work);
+ JavaSource.Priority p;
+@@ -771,8 +773,14 @@
+ Reference taskRef = url2CompileWithDepsTask.get(root);
+ Task t = taskRef != null ? taskRef.get() : null;
+ Collection storedFiles;
++ Boolean can = null;
++
++ LOGGER.finest("t: " + t);
+
+- if (t == null || !t.cancel()) {
++ if (t == null || (can = !t.cancel())) {
++ if (can != null) {
++ LOGGER.finest("canceling: " + System.identityHashCode(t) + ", " + can);
++ }
+ if (lockRU == 0 || t != null) {
+ storedFiles = new LinkedHashSet();
+ url2CompileWithDeps.put(root, storedFiles);
+@@ -788,6 +796,7 @@
+ //the task either does not exist, or has been already started - create new one:
+ LOGGER.log(Level.FINER, "creating a new task for root: {0}", root.toExternalForm());
+ final Collection storedFilesFin = storedFiles;
++ final Task[] tt = new Task[1];
+ t = WORKER.create(new Runnable() {
+ public void run() {
+ synchronized (RepositoryUpdater.this) {
+@@ -795,25 +804,50 @@
+ }
+ submit(Work.compileWithDeps(root, storedFilesFin));
+ noSubmited--;
++ LOGGER.finest("assureCompiledWithDeps()-: " + noSubmited + ":" + System.identityHashCode(tt[0]));
+ }
+ });
+- url2CompileWithDepsTask.put(root, new WeakReference(t));
++ tt[0] = t;
++ class WR extends WeakReference implements Runnable {
++
++ long l;
++ public WR(Task t) {
++ super(t, Utilities.activeReferenceQueue());
++ l = System.identityHashCode(t);
++ }
++
++ public void run() {
++ LOGGER.finest("GCing: " + l);
++ }
++
++ }
++ url2CompileWithDepsTask.put(root, new WR(t));
+ compileScheduled++;
+- noSubmited++;
++ LOGGER.finest("assureCompiledWithDeps()+: " + noSubmited + ":" + System.identityHashCode(t));
+ } else {
+ url2CompileWithDepsTask.remove(root);
+ }
+ } else {
+ storedFiles = url2CompileWithDeps.get(root);
++ if (can != null) {
++ LOGGER.finest("2. canceling: " + System.identityHashCode(t) + ", " + can);
++ }
++ if (t != null) {
++ noSubmited--;
++ }
+ }
+
+ assert storedFiles != null;
+
+ storedFiles.add(file);
+-
++
++ LOGGER.finest("lockRU: " + lockRU);
++
+ if (lockRU > 0) {
+ compileWithDepsToBeScheduled = true;
+ } else {
++ LOGGER.finest("scheduling: " + System.identityHashCode(t));
++ noSubmited++;
+ t.schedule(DELAY);
+ }
+ }
+@@ -914,9 +948,11 @@
+ public void run() {
+ submit(Work.compileWithDeps(root, storedFilesFin));
+ noSubmited--;
++ LOGGER.finest("unlockRU()-: " + noSubmited);
+ }
+ });
+ noSubmited++;
++ LOGGER.finest("unlockRU()+: " + noSubmited);
+ url2CompileWithDepsTask.put(root, new WeakReference(t));
+ }
+
+@@ -1612,6 +1648,7 @@
+ if (!continuation) {
+ synchronized (RepositoryUpdater.this) {
+ RepositoryUpdater.this.noSubmited--;
++ LOGGER.finest("compileWorker.run()-: " + noSubmited);
+ if (RepositoryUpdater.this.noSubmited == 0) {
+ RepositoryUpdater.this.notifyAll();
+ }
+diff -r 76d51071af8a -r af9499d919b8 java.source/src/org/netbeans/modules/java/ui/FmtTabsIndents.form
+--- a/java.source/src/org/netbeans/modules/java/ui/FmtTabsIndents.form Fri Nov 07 11:48:18 2008 +0100
++++ b/java.source/src/org/netbeans/modules/java/ui/FmtTabsIndents.form Tue Mar 10 13:53:55 2009 +0300
+@@ -36,6 +36,10 @@
+
+
+
++
++
++
++
+
+
+
+@@ -57,6 +61,8 @@
+
+
+
++
++
+
+
+
+@@ -123,5 +129,17 @@
+
+
+
++
++
++
++
++
++
++
++
++
++
++
++
+
+
+diff -r 76d51071af8a -r af9499d919b8 java.source/src/org/netbeans/modules/java/ui/FmtTabsIndents.java
+--- a/java.source/src/org/netbeans/modules/java/ui/FmtTabsIndents.java Fri Nov 07 11:48:18 2008 +0100
++++ b/java.source/src/org/netbeans/modules/java/ui/FmtTabsIndents.java Tue Mar 10 13:53:55 2009 +0300
+@@ -65,6 +65,7 @@
+ absoluteLabelIndentCheckBox.putClientProperty(OPTION_ID, absoluteLabelIndent);
+ indentTopLevelClassMembersCheckBox.putClientProperty(OPTION_ID, indentTopLevelClassMembers);
+ indentCasesFromSwitchCheckBox.putClientProperty(OPTION_ID, indentCasesFromSwitch);
++ addLeadingStarInCommentCheckBox.putClientProperty(OPTION_ID, addLeadingStarInComment);
+ // rightMarginField.putClientProperty(OPTION_ID, rightMargin);
+ }
+
+@@ -119,6 +120,7 @@
+ absoluteLabelIndentCheckBox = new javax.swing.JCheckBox();
+ indentTopLevelClassMembersCheckBox = new javax.swing.JCheckBox();
+ indentCasesFromSwitchCheckBox = new javax.swing.JCheckBox();
++ addLeadingStarInCommentCheckBox = new javax.swing.JCheckBox();
+
+ setName(org.openide.util.NbBundle.getMessage(FmtTabsIndents.class, "LBL_TabsAndIndents")); // NOI18N
+ setOpaque(false);
+@@ -138,6 +140,9 @@
+ org.openide.awt.Mnemonics.setLocalizedText(indentCasesFromSwitchCheckBox, org.openide.util.NbBundle.getMessage(FmtTabsIndents.class, "LBL_IndentCasesFromSwitch")); // NOI18N
+ indentCasesFromSwitchCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
+
++ org.openide.awt.Mnemonics.setLocalizedText(addLeadingStarInCommentCheckBox, org.openide.util.NbBundle.getMessage(FmtTabsIndents.class, "LBL_AddLeadingStarInComment")); // NOI18N
++ addLeadingStarInCommentCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
++
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
+ this.setLayout(layout);
+ layout.setHorizontalGroup(
+@@ -153,6 +158,9 @@
+ .add(indentCasesFromSwitchCheckBox)
+ .add(indentTopLevelClassMembersCheckBox)
+ .add(absoluteLabelIndentCheckBox)
++ .add(layout.createSequentialGroup()
++ .add(addLeadingStarInCommentCheckBox)
++ .addContainerGap())
+ );
+
+ layout.linkSize(new java.awt.Component[] {continuationIndentSizeField, labelIndentField}, org.jdesktop.layout.GroupLayout.HORIZONTAL);
+@@ -174,6 +182,8 @@
+ .add(indentTopLevelClassMembersCheckBox)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(indentCasesFromSwitchCheckBox)
++ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
++ .add(addLeadingStarInCommentCheckBox)
+ .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+ }// //GEN-END:initComponents
+diff -r 76d51071af8a -r af9499d919b8 java.source/test/unit/src/org/netbeans/api/java/source/gen/MultipleRewritesTest.java
+--- a/java.source/test/unit/src/org/netbeans/api/java/source/gen/MultipleRewritesTest.java Fri Nov 07 11:48:18 2008 +0100
++++ b/java.source/test/unit/src/org/netbeans/api/java/source/gen/MultipleRewritesTest.java Tue Mar 10 13:53:55 2009 +0300
+@@ -42,6 +42,7 @@
+
+ import com.sun.source.tree.ClassTree;
+ import com.sun.source.tree.ExpressionTree;
++import com.sun.source.tree.IdentifierTree;
+ import com.sun.source.tree.MethodTree;
+ import com.sun.source.tree.ModifiersTree;
+ import com.sun.source.tree.TypeParameterTree;
+@@ -119,6 +120,41 @@
+ assertEquals(golden, res);
+ }
+
++ public void testRewriteRewrittenTree2() throws Exception {
++ testFile = new File(getWorkDir(), "Test.java");
++ TestUtilities.copyStringToFile(testFile,
++ "package hierbas.del.litoral;\n\n" +
++ "public class Test {\n" +
++ " String a;\n" +
++ "}\n"
++ );
++ String golden =
++ "package hierbas.del.litoral;\n\n" +
++ "public class Test {\n" +
++ " Object a;\n" +
++ "}\n";
++ JavaSource testSource = JavaSource.forFileObject(FileUtil.toFileObject(testFile));
++ Task task = new Task() {
++
++ public void run(WorkingCopy workingCopy) throws java.io.IOException {
++ workingCopy.toPhase(Phase.RESOLVED);
++ TreeMaker make = workingCopy.getTreeMaker();
++
++ ClassTree clazz = (ClassTree) workingCopy.getCompilationUnit().getTypeDecls().get(0);
++ VariableTree var = (VariableTree) clazz.getMembers().get(1);
++ IdentifierTree i = make.Identifier("Test");
++
++ workingCopy.rewrite(var.getType(), i);
++ workingCopy.rewrite(i, make.Identifier("Object"));
++ }
++
++ };
++ testSource.runModificationTask(task).commit();
++ String res = TestUtilities.copyFileToString(testFile);
++ System.err.println(res);
++ assertEquals(golden, res);
++ }
++
+ String getGoldenPckg() {
+ return "";
+ }
+diff -r 76d51071af8a -r af9499d919b8 java.sourceui/nbproject/project.properties
+--- a/java.sourceui/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/java.sourceui/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -2,4 +2,4 @@
+ javac.compilerargs=-Xlint -Xlint:-serial
+ javac.source=1.5
+ javadoc.arch=${basedir}/arch.xml
+-spec.version.base=1.6.1
++spec.version.base=1.6.2
+diff -r 76d51071af8a -r af9499d919b8 java.sourceui/src/org/netbeans/modules/java/source/ui/JavaTypeDescription.java
+--- a/java.sourceui/src/org/netbeans/modules/java/source/ui/JavaTypeDescription.java Fri Nov 07 11:48:18 2008 +0100
++++ b/java.sourceui/src/org/netbeans/modules/java/source/ui/JavaTypeDescription.java Tue Mar 10 13:53:55 2009 +0300
+@@ -87,7 +87,14 @@
+ }
+
+ public void open() {
+- final ClasspathInfo ci = ClasspathInfo.create(cacheItem.getRoot());
++ final FileObject root = cacheItem.getRoot();
++ if (root == null) {
++ final String message = NbBundle.getMessage(JavaTypeDescription.class, "LBL_JavaTypeDescription_nosource",handle.getQualifiedName());
++ StatusDisplayer.getDefault().setStatusText(message);
++ Toolkit.getDefaultToolkit().beep();
++ return;
++ }
++ final ClasspathInfo ci = ClasspathInfo.create(root);
+ if ( cacheItem.isBinary() ) {
+ final JavaSource js = JavaSource.create( ci );
+ final ElementHandle eh = handle;
+diff -r 76d51071af8a -r af9499d919b8 java.sourceui/src/org/netbeans/modules/java/source/ui/JavaTypeProvider.java
+--- a/java.sourceui/src/org/netbeans/modules/java/source/ui/JavaTypeProvider.java Fri Nov 07 11:48:18 2008 +0100
++++ b/java.sourceui/src/org/netbeans/modules/java/source/ui/JavaTypeProvider.java Tue Mar 10 13:53:55 2009 +0300
+@@ -42,10 +42,12 @@
+ package org.netbeans.modules.java.source.ui;
+
+ import java.io.IOException;
++import java.net.URISyntaxException;
+ import java.net.URL;
+ import java.util.ArrayList;
+ import java.util.EnumSet;
+ import java.util.HashSet;
++import java.util.List;
+ import java.util.Set;
+ import java.util.concurrent.ExecutionException;
+ import java.util.concurrent.Future;
+@@ -75,6 +77,7 @@
+ import org.netbeans.spi.jumpto.type.TypeProvider;
+ import org.openide.filesystems.FileObject;
+ import org.openide.filesystems.FileStateInvalidException;
++import org.openide.filesystems.URLMapper;
+ import org.openide.util.Exceptions;
+ import org.openide.util.Lookup;
+ import org.openide.util.NbBundle;
+@@ -176,19 +179,17 @@
+ // Sources
+ time = System.currentTimeMillis();
+ ClassPath scp = RepositoryUpdater.getDefault().getScannedSources();
+- FileObject roots[] = scp.getRoots();
++ List entries = scp.entries();
+ gss += System.currentTimeMillis() - time;
+- FileObject root[] = new FileObject[1];
+- sources = new HashSet( roots.length );
+- for (int i = 0; i < roots.length; i++ ) {
+- root[0] = roots[i];
++ sources = new HashSet(entries.size());
++ for (ClassPath.Entry entry : entries) {
+ time = System.currentTimeMillis();
+- ClasspathInfo ci = ClasspathInfo.create( EMPTY_CLASSPATH, EMPTY_CLASSPATH, ClassPathSupport.createClassPath(root)); //create(roots[i]);
++ ClasspathInfo ci = ClasspathInfo.create( EMPTY_CLASSPATH, EMPTY_CLASSPATH, ClassPathSupport.createClassPath(entry.getURL()));
+ if ( isCanceled ) {
+ return;
+ }
+ else {
+- sources.add( new CacheItem( roots[i], ci, false ) );
++ sources.add( new CacheItem( entry.getURL(), ci, false ) );
+ }
+ cp += System.currentTimeMillis() - time;
+ }
+@@ -198,31 +199,26 @@
+ // Binaries
+ time = System.currentTimeMillis();
+ scp = RepositoryUpdater.getDefault().getScannedBinaries();
+- roots = scp.getRoots();
++ entries = scp.entries();
+ gsb += System.currentTimeMillis() - time;
+- root = new FileObject[1];
+- for (int i = 0; i < roots.length; i++ ) {
++ for (ClassPath.Entry entry : entries) {
+ try {
+ if ( isCanceled ) {
+ return;
+ }
+ time = System.currentTimeMillis();
+ if (!hasBinaryOpen) {
+- SourceForBinaryQuery.Result result = SourceForBinaryQuery.findSourceRoots(roots[i].getURL());
++ SourceForBinaryQuery.Result result = SourceForBinaryQuery.findSourceRoots(entry.getURL());
+ if ( result.getRoots().length == 0 ) {
+ continue;
+ }
+ }
+ sfb += System.currentTimeMillis() - time;
+ time = System.currentTimeMillis();
+- root[0] = roots[i];
+- ClasspathInfo ci = ClasspathInfo.create(ClassPathSupport.createClassPath(root), EMPTY_CLASSPATH, EMPTY_CLASSPATH );//create(roots[i]);
+- sources.add( new CacheItem( roots[i], ci, true ) );
++ ClasspathInfo ci = ClasspathInfo.create(ClassPathSupport.createClassPath(entry.getURL()), EMPTY_CLASSPATH, EMPTY_CLASSPATH );//create(roots[i]);
++ sources.add( new CacheItem( entry.getURL(), ci, true ) );
+ cp += System.currentTimeMillis() - time;
+- }
+- catch ( FileStateInvalidException e ) {
+- continue;
+- }
++ }
+ finally {
+ if ( isCanceled ) {
+ return;
+@@ -231,46 +227,46 @@
+ }
+ } else { // user provided classpath
+
+- FileObject[] bootRoots = cpInfo.getClassPath(ClasspathInfo.PathKind.BOOT).getRoots();
+- FileObject[] compileRoots = cpInfo.getClassPath(ClasspathInfo.PathKind.COMPILE).getRoots();
+- FileObject[] sourceRoots = cpInfo.getClassPath(ClasspathInfo.PathKind.SOURCE).getRoots();
+- sources = new HashSet(bootRoots.length + compileRoots.length + sourceRoots.length);
++ final List bootRoots = cpInfo.getClassPath(ClasspathInfo.PathKind.BOOT).entries();
++ final List compileRoots = cpInfo.getClassPath(ClasspathInfo.PathKind.COMPILE).entries();
++ final List sourceRoots = cpInfo.getClassPath(ClasspathInfo.PathKind.SOURCE).entries();
++ sources = new HashSet(bootRoots.size() + compileRoots.size() + sourceRoots.size());
+
+ // bootPath
+- for (int i = 0; i < bootRoots.length; i++ ) {
++ for (ClassPath.Entry entry : bootRoots) {
+ time = System.currentTimeMillis();
+- ClasspathInfo ci = ClasspathInfo.create(ClassPathSupport.createClassPath(bootRoots[i]), EMPTY_CLASSPATH, EMPTY_CLASSPATH);
++ ClasspathInfo ci = ClasspathInfo.create(ClassPathSupport.createClassPath(entry.getURL()), EMPTY_CLASSPATH, EMPTY_CLASSPATH);
+ if ( isCanceled ) {
+ return;
+ }
+ else {
+- sources.add( new CacheItem( bootRoots[i], ci, true ) );
++ sources.add( new CacheItem( entry.getURL(), ci, true ) );
+ }
+ cp += System.currentTimeMillis() - time;
+ }
+
+ // classPath
+- for (int i = 0; i < compileRoots.length; i++ ) {
++ for (ClassPath.Entry entry : compileRoots) {
+ time = System.currentTimeMillis();
+- ClasspathInfo ci = ClasspathInfo.create(EMPTY_CLASSPATH, ClassPathSupport.createClassPath(compileRoots[i]), EMPTY_CLASSPATH);
++ ClasspathInfo ci = ClasspathInfo.create(EMPTY_CLASSPATH, ClassPathSupport.createClassPath(entry.getURL()), EMPTY_CLASSPATH);
+ if ( isCanceled ) {
+ return;
+ }
+ else {
+- sources.add( new CacheItem( compileRoots[i], ci, true ) );
++ sources.add( new CacheItem( entry.getURL(), ci, true ) );
+ }
+ cp += System.currentTimeMillis() - time;
+ }
+
+ // sourcePath
+- for (int i = 0; i < sourceRoots.length; i++ ) {
++ for (ClassPath.Entry entry : sourceRoots) {
+ time = System.currentTimeMillis();
+- ClasspathInfo ci = ClasspathInfo.create(EMPTY_CLASSPATH, EMPTY_CLASSPATH, ClassPathSupport.createClassPath(sourceRoots[i]));
++ ClasspathInfo ci = ClasspathInfo.create(EMPTY_CLASSPATH, EMPTY_CLASSPATH, ClassPathSupport.createClassPath(entry.getURL()));
+ if ( isCanceled ) {
+ return;
+ }
+ else {
+- sources.add( new CacheItem( sourceRoots[i], ci, false ) );
++ sources.add( new CacheItem( entry.getURL(), ci, false ) );
+ }
+ cp += System.currentTimeMillis() - time;
+ }
+@@ -412,15 +408,16 @@
+ static class CacheItem {
+
+ public final boolean isBinary;
+- public final FileObject fileObject;
++ public final URL root;
+ public final ClasspathInfo classpathInfo;
+ public String projectName;
+ public Icon projectIcon;
+ private ClassPath.Entry defEntry;
++ private FileObject cachedRoot;
+
+- public CacheItem ( FileObject fileObject, ClasspathInfo classpathInfo, boolean isBinary ) {
++ public CacheItem ( URL root, ClasspathInfo classpathInfo, boolean isBinary ) {
+ this.isBinary = isBinary;
+- this.fileObject = fileObject;
++ this.root = root;
+ this.classpathInfo = classpathInfo;
+ }
+
+@@ -443,20 +440,31 @@
+
+ @Override
+ public int hashCode () {
+- return this.fileObject == null ? 0 : this.fileObject.hashCode();
++ return this.root == null ? 0 : this.root.hashCode();
+ }
+
+ @Override
+ public boolean equals (Object other) {
+ if (other instanceof CacheItem) {
+ CacheItem otherItem = (CacheItem) other;
+- return this.fileObject == null ? otherItem.fileObject == null : this.fileObject.equals(otherItem.fileObject);
++ return this.root == null ? otherItem.root == null : this.root.equals(otherItem.root);
+ }
+ return false;
+ }
+
+ public FileObject getRoot() {
+- return fileObject;
++ synchronized (this) {
++ if (cachedRoot != null) {
++ return cachedRoot;
++ }
++ }
++ FileObject _tmp = URLMapper.findFileObject(root);
++ synchronized (this) {
++ if (cachedRoot == null) {
++ cachedRoot = _tmp;
++ }
++ }
++ return _tmp;
+ }
+
+ public boolean isBinary() {
+@@ -478,11 +486,15 @@
+ }
+
+ private void initProjectInfo() {
+- Project p = FileOwnerQuery.getOwner(fileObject);
+- if (p != null) {
+- ProjectInformation pi = ProjectUtils.getInformation( p );
+- projectName = pi.getDisplayName();
+- projectIcon = pi.getIcon();
++ try {
++ Project p = FileOwnerQuery.getOwner(this.root.toURI());
++ if (p != null) {
++ ProjectInformation pi = ProjectUtils.getInformation( p );
++ projectName = pi.getDisplayName();
++ projectIcon = pi.getIcon();
++ }
++ } catch (URISyntaxException e) {
++ Exceptions.printStackTrace(e);
+ }
+ }
+
+diff -r 76d51071af8a -r af9499d919b8 javadoc/nbproject/project.properties
+--- a/javadoc/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/javadoc/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -39,4 +39,4 @@
+ build.compiler.deprecation=false
+ javac.compilerargs=-Xlint:unchecked
+ javac.source=1.5
+-spec.version.base=1.24.1
++spec.version.base=1.24.2
+diff -r 76d51071af8a -r af9499d919b8 javadoc/src/org/netbeans/modules/javadoc/search/IndexSearch.java
+--- a/javadoc/src/org/netbeans/modules/javadoc/search/IndexSearch.java Fri Nov 07 11:48:18 2008 +0100
++++ b/javadoc/src/org/netbeans/modules/javadoc/search/IndexSearch.java Tue Mar 10 13:53:55 2009 +0300
+@@ -456,7 +456,7 @@
+ evt.consume();
+ }
+ else
+- showHelp();
++ showHelpExternal();
+ }
+ }//GEN-LAST:event_resultsListMouseClicked
+
+diff -r 76d51071af8a -r af9499d919b8 jumpto/manifest.mf
+--- a/jumpto/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/jumpto/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -2,5 +2,5 @@
+ OpenIDE-Module: org.netbeans.modules.jumpto/1
+ OpenIDE-Module-Layer: org/netbeans/modules/jumpto/resources/layer.xml
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jumpto/resources/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.7.1
++OpenIDE-Module-Specification-Version: 1.7.2
+ AutoUpdate-Show-In-Client: false
+diff -r 76d51071af8a -r af9499d919b8 jumpto/nbproject/project.xml
+--- a/jumpto/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100
++++ b/jumpto/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300
+@@ -177,6 +177,7 @@
+ org.netbeans.modules.cnd.gotodeclaration
+ org.netbeans.modules.gsf
+ org.netbeans.modules.java.sourceui
++ org.netbeans.modules.javafx.editor
+ org.netbeans.modules.spring.beans
+ org.netbeans.api.jumpto.type
+ org.netbeans.spi.jumpto.symbol
+diff -r 76d51071af8a -r af9499d919b8 lib.cvsclient/manifest.mf
+--- a/lib.cvsclient/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/lib.cvsclient/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -1,7 +1,7 @@
+ Manifest-Version: 1.0
+ OpenIDE-Module: org.netbeans.lib.cvsclient/1
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/lib/cvsclient/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.17.1
++OpenIDE-Module-Specification-Version: 1.17.3
+ Specification-Version: 1.9
+ Main-Class: org.netbeans.lib.cvsclient.commandLine.CVSCommand
+
+diff -r 76d51071af8a -r af9499d919b8 lib.cvsclient/src/org/netbeans/lib/cvsclient/admin/Entry.java
+--- a/lib.cvsclient/src/org/netbeans/lib/cvsclient/admin/Entry.java Fri Nov 07 11:48:18 2008 +0100
++++ b/lib.cvsclient/src/org/netbeans/lib/cvsclient/admin/Entry.java Tue Mar 10 13:53:55 2009 +0300
+@@ -491,7 +491,8 @@
+ */
+ public boolean isNewUserFile() {
+ return revision != null
+- && revision.startsWith(NEW_USER_FILE);
++ && revision.startsWith(NEW_USER_FILE)
++ && revision.indexOf(".") < 0;
+ }
+
+ /**
+diff -r 76d51071af8a -r af9499d919b8 libs.jna/manifest.mf
+--- a/libs.jna/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/libs.jna/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -3,4 +3,4 @@
+ OpenIDE-Module: org.netbeans.libs.jna/1
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/jna/Bundle.properties
+ AutoUpdate-Essential-Module: true
+-OpenIDE-Module-Specification-Version: 1.1.1
++OpenIDE-Module-Specification-Version: 1.1.2
+diff -r 76d51071af8a -r af9499d919b8 masterfs/manifest.mf
+--- a/masterfs/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/masterfs/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -1,7 +1,7 @@
+ Manifest-Version: 1.0
+ OpenIDE-Module: org.netbeans.modules.masterfs/2
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/masterfs/resources/Bundle.properties
+-OpenIDE-Module-Specification-Version: 2.15.1
++OpenIDE-Module-Specification-Version: 2.15.2
+ AutoUpdate-Show-In-Client: false
+ AutoUpdate-Essential-Module: true
+
+diff -r 76d51071af8a -r af9499d919b8 masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/LockForFile.java
+--- a/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/LockForFile.java Fri Nov 07 11:48:18 2008 +0100
++++ b/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/LockForFile.java Tue Mar 10 13:53:55 2009 +0300
+@@ -105,7 +105,11 @@
+ }
+ if (namesakes.putInstance(file, result) == null) {
+ FileAlreadyLockedException alreadyLockedException = new FileAlreadyLockedException(file.getAbsolutePath());
+- alreadyLockedException.initCause(namesakes.getInstance(file).lockedBy);
++ LockForFile previousLock = namesakes.getInstance(file);
++ // #151576 - check for null although it should not happen
++ if (previousLock != null) {
++ alreadyLockedException.initCause(previousLock.lockedBy);
++ }
+ throw alreadyLockedException;
+ }
+ result.valid = true;
+diff -r 76d51071af8a -r af9499d919b8 mercurial/nbproject/project.properties
+--- a/mercurial/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/mercurial/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -5,7 +5,7 @@
+ nbm.homepage=http://wiki.netbeans.org/wiki/view/MercurialVersionControl
+ nbm.module.author=John Rice and Padraig O'Briain
+ nbm.needs.restart=true
+-spec.version.base=1.7.1
++spec.version.base=1.7.2
+
+ #qa-functional
+ test.qa-functional.cp.extra=${openide.nodes.dir}/modules/org-openide-nodes.jar:\${openide.util.dir}/lib/org-openide-util.jar
+diff -r 76d51071af8a -r af9499d919b8 mercurial/src/org/netbeans/modules/mercurial/Bundle.properties
+--- a/mercurial/src/org/netbeans/modules/mercurial/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/mercurial/src/org/netbeans/modules/mercurial/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -39,6 +39,10 @@
+
+ OpenIDE-Module-Display-Category=Base IDE
+ OpenIDE-Module-Long-Description=\
++For the list of included fixed bugs please check http://wiki.netbeans.org/NetBeans6.5PatchesInfo. \
++ \
++ \
++\
+ Integrates Mercurial functionality into NetBeans IDE
+ OpenIDE-Module-Name=Mercurial
+ OpenIDE-Module-Short-Description=Mercurial Versioning System
+diff -r 76d51071af8a -r af9499d919b8 mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java
+--- a/mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java Fri Nov 07 11:48:18 2008 +0100
++++ b/mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java Tue Mar 10 13:53:55 2009 +0300
+@@ -936,7 +936,7 @@
+ }
+
+ public static HgLogMessage[] getLogMessagesNoFileInfo(final String rootUrl, final Set files, int limit, OutputLogger logger) {
+- return getLogMessages(rootUrl, files, null, null, true, false, limit, logger);
++ return getLogMessages(rootUrl, files, HG_STATUS_FLAG_TIP_CMD, "0", true, false, limit, logger);
+ }
+
+ public static HgLogMessage[] getLogMessagesNoFileInfo(final String rootUrl, final Set files, OutputLogger logger) {
+@@ -1520,6 +1520,16 @@
+ revStr = "0:" + to;
+ }
+
++ if(revStr == null) {
++ if(to == null) {
++ to = HG_STATUS_FLAG_TIP_CMD;
++ }
++ if(from == null) {
++ from = "0";
++ }
++ revStr = from + ":" + to;
++ }
++
+ return revStr;
+ }
+ /**
+diff -r 76d51071af8a -r af9499d919b8 o.apache.tools.ant.module/nbproject/project.properties
+--- a/o.apache.tools.ant.module/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/o.apache.tools.ant.module/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -39,7 +39,7 @@
+
+ javac.compilerargs=-Xlint:unchecked
+ javac.source=1.5
+-spec.version.base=3.32.1
++spec.version.base=3.32.2
+ compile.ant.jar=${ant.core.lib}
+ src-bridge.cp.extra=build/classes:${compile.ant.jar}
+ extra.module.files=\
+diff -r 76d51071af8a -r af9499d919b8 o.apache.tools.ant.module/src/org/apache/tools/ant/module/nodes/AntNavigatorPanel.java
+--- a/o.apache.tools.ant.module/src/org/apache/tools/ant/module/nodes/AntNavigatorPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/o.apache.tools.ant.module/src/org/apache/tools/ant/module/nodes/AntNavigatorPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -42,7 +42,6 @@
+ package org.apache.tools.ant.module.nodes;
+
+ import java.awt.BorderLayout;
+-import java.beans.PropertyVetoException;
+ import java.util.Collection;
+ import javax.swing.ActionMap;
+ import javax.swing.JComponent;
+@@ -53,7 +52,6 @@
+ import org.openide.explorer.ExplorerUtils;
+ import org.openide.explorer.view.ListView;
+ import org.openide.loaders.DataObject;
+-import org.openide.nodes.Children;
+ import org.openide.nodes.Node;
+ import org.openide.util.Lookup;
+ import org.openide.util.LookupEvent;
+@@ -109,25 +107,9 @@
+ public ExplorerManager getExplorerManager() {
+ return manager;
+ }
+- // Make sure list gets focus, with first node initially selected:
+ @Override
+ public boolean requestFocusInWindow() {
+- boolean b = view.requestFocusInWindow();
+- Children.MUTEX.postReadRequest(new Runnable() {
+- public void run() {
+- if (manager.getSelectedNodes().length == 0) {
+- Node[] children = manager.getRootContext().getChildren().getNodes(true);
+- if (children.length > 0) {
+- try {
+- manager.setSelectedNodes(new Node[] {children[0]});
+- } catch (PropertyVetoException e) {
+- // #146284 - happens sometimes; why? Ignore...
+- }
+- }
+- }
+- }
+- });
+- return b;
++ return view.requestFocusInWindow();
+ }
+ public Lookup getLookup() {
+ return lookup;
+diff -r 76d51071af8a -r af9499d919b8 o.n.core/nbproject/project.properties
+--- a/o.n.core/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/o.n.core/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -39,7 +39,7 @@
+
+ javac.compilerargs=-Xlint:unchecked
+ javac.source=1.5
+-spec.version.base=3.10.1
++spec.version.base=3.10.4
+
+ javadoc.arch=${basedir}/arch.xml
+
+diff -r 76d51071af8a -r af9499d919b8 o.n.core/src/org/netbeans/beaninfo/editors/DataFolderPanel.form
+--- a/o.n.core/src/org/netbeans/beaninfo/editors/DataFolderPanel.form Fri Nov 07 11:48:18 2008 +0100
++++ b/o.n.core/src/org/netbeans/beaninfo/editors/DataFolderPanel.form Tue Mar 10 13:53:55 2009 +0300
+@@ -1,7 +1,9 @@
+
+
+-
+
+@@ -162,7 +162,7 @@
+
+
+
+- 5.1
++ 7.2.2
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 projectui/src/org/netbeans/modules/project/ui/PhysicalView.java
+--- a/projectui/src/org/netbeans/modules/project/ui/PhysicalView.java Fri Nov 07 11:48:18 2008 +0100
++++ b/projectui/src/org/netbeans/modules/project/ui/PhysicalView.java Tue Mar 10 13:53:55 2009 +0300
+@@ -142,7 +142,7 @@
+ return nodes;
+ }
+
+- static final class VisibilityQueryDataFilter implements ChangeListener, ChangeableDataFilter {
++ static final class VisibilityQueryDataFilter implements ChangeListener, ChangeableDataFilter, DataFilter.FileBased {
+
+ private final ChangeSupport changeSupport = new ChangeSupport( this );
+
+@@ -150,9 +150,8 @@
+ VisibilityQuery.getDefault().addChangeListener( this );
+ }
+
+- public boolean acceptDataObject(DataObject obj) {
+- FileObject fo = obj.getPrimaryFile();
+- return VisibilityQuery.getDefault().isVisible( fo );
++ public boolean acceptDataObject(DataObject obj) {
++ return acceptFileObject(obj.getPrimaryFile());
+ }
+
+ public void stateChanged( ChangeEvent e) {
+@@ -171,6 +170,10 @@
+ public void removeChangeListener( ChangeListener listener ) {
+ changeSupport.removeChangeListener( listener );
+ }
++
++ public boolean acceptFileObject(FileObject fo) {
++ return VisibilityQuery.getDefault().isVisible(fo);
++ }
+
+ }
+
+diff -r 76d51071af8a -r af9499d919b8 projectui/src/org/netbeans/modules/project/ui/SimpleTargetChooserPanelGUI.java
+--- a/projectui/src/org/netbeans/modules/project/ui/SimpleTargetChooserPanelGUI.java Fri Nov 07 11:48:18 2008 +0100
++++ b/projectui/src/org/netbeans/modules/project/ui/SimpleTargetChooserPanelGUI.java Tue Mar 10 13:53:55 2009 +0300
+@@ -132,10 +132,10 @@
+
+ locationComboBox.setModel( new DefaultComboBoxModel( folders ) );
+ // Guess the group we want to create the file in
+- SourceGroup preselectedGroup = getPreselectedGroup( folders, preselectedFolder );
+- locationComboBox.setSelectedItem( preselectedGroup );
++ SourceGroup preselectedGroup = getPreselectedGroup( folders, preselectedFolder );
+ // Create OS dependent relative name
+ if (preselectedGroup != null) {
++ locationComboBox.setSelectedItem( preselectedGroup );
+ folderTextField.setText( getRelativeNativeName( preselectedGroup.getRootFolder(), preselectedFolder ) );
+ }
+
+@@ -404,7 +404,11 @@
+
+ private void updateCreatedFolder() {
+
+- FileObject root = ((SourceGroup)locationComboBox.getSelectedItem()).getRootFolder();
++ SourceGroup sg = (SourceGroup) locationComboBox.getSelectedItem();
++ if (sg == null) {
++ return;
++ }
++ FileObject root = sg.getRootFolder();
+
+ String folderName = folderTextField.getText().trim();
+ String documentName = documentNameTextField.getText().trim();
+diff -r 76d51071af8a -r af9499d919b8 properties/manifest.mf
+--- a/properties/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/properties/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -1,6 +1,6 @@
+ Manifest-Version: 1.0
+ OpenIDE-Module: org.netbeans.modules.properties/1
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/properties/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.25.1
++OpenIDE-Module-Specification-Version: 1.25.2
+ OpenIDE-Module-Layer: org/netbeans/modules/properties/Layer.xml
+ AutoUpdate-Show-In-Client: false
+diff -r 76d51071af8a -r af9499d919b8 properties/src/org/netbeans/modules/properties/Element.java
+--- a/properties/src/org/netbeans/modules/properties/Element.java Fri Nov 07 11:48:18 2008 +0100
++++ b/properties/src/org/netbeans/modules/properties/Element.java Tue Mar 10 13:53:55 2009 +0300
+@@ -1,7 +1,7 @@
+ /*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
++ * Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+@@ -24,7 +24,7 @@
+ * Contributor(s):
+ *
+ * The Original Software is NetBeans. The Initial Developer of the Original
+- * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
++ * Software is Sun Microsystems, Inc. Portions Copyright 1997-2008 Sun
+ * Microsystems, Inc. All Rights Reserved.
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+@@ -316,9 +316,6 @@
+ if (c < 0x20) {
+ Basic.appendIsoControlChar(buf, c);
+ } else {
+- if (c == '\\') {
+- buf.append('\\');
+- }
+ buf.append(c);
+ }
+ }
+diff -r 76d51071af8a -r af9499d919b8 properties/src/org/netbeans/modules/properties/PropertiesEditorSupport.java
+--- a/properties/src/org/netbeans/modules/properties/PropertiesEditorSupport.java Fri Nov 07 11:48:18 2008 +0100
++++ b/properties/src/org/netbeans/modules/properties/PropertiesEditorSupport.java Tue Mar 10 13:53:55 2009 +0300
+@@ -67,6 +67,8 @@
+ import java.util.Collections;
+ import java.util.Date;
+ import java.util.Enumeration;
++import java.util.HashMap;
++import java.util.Map;
+ import java.util.Set;
+ import java.util.WeakHashMap;
+ import java.util.logging.Level;
+@@ -79,6 +81,7 @@
+ import javax.swing.undo.CannotRedoException;
+ import javax.swing.undo.CannotUndoException;
+ import javax.swing.undo.UndoableEdit;
++import org.netbeans.api.queries.FileEncodingQuery;
+ import org.netbeans.modules.properties.PropertiesEncoding.PropCharset;
+ import org.netbeans.modules.properties.PropertiesEncoding.PropCharsetEncoder;
+ import org.openide.ErrorManager;
+@@ -93,10 +96,12 @@
+ import org.openide.filesystems.FileEvent;
+ import org.openide.filesystems.FileLock;
+ import org.openide.filesystems.FileObject;
++import org.openide.filesystems.FileRenameEvent;
+ import org.openide.filesystems.FileStatusEvent;
+ import org.openide.filesystems.FileStatusListener;
+ import org.openide.filesystems.FileSystem;
+ import org.openide.filesystems.FileStateInvalidException;
++import org.openide.filesystems.FileSystem.AtomicAction;
+ import org.openide.filesystems.FileUtil;
+ import org.openide.loaders.DataFolder;
+ import org.openide.loaders.DataObject;
+@@ -137,6 +142,10 @@
+ /** Generated serial version UID. */
+ static final long serialVersionUID =1787354011149868490L;
+
++ /** can hold the right charset to be used during save, needed for communication
++ * between saveFromKitToStream and saveDocument
++ */
++ private static Map charsets = Collections.synchronizedMap(new HashMap());
+
+ /** Constructor. */
+ public PropertiesEditorSupport(PropertiesFileEntry entry) {
+@@ -145,6 +154,13 @@
+ this.myEntry = entry;
+ }
+
++ /** Getter for the environment that was provided in the constructor.
++ * @return the environment
++ */
++ final CloneableEditorSupport.Env desEnv() {
++ return (CloneableEditorSupport.Env) env;
++ }
++
+ /**
+ * Overrides superclass method.
+ * Should test whether all data is saved, and if not, prompt the user
+@@ -171,6 +187,18 @@
+ protected CloneableEditor createCloneableEditor() {
+ return new PropertiesEditor(this);
+ }
++
++ /** Getter of the data object that this support is associated with.
++ * @return data object passed in constructor
++ */
++ public final DataObject getDataObject () {
++ return myEntry.getDataObject();
++ }
++
++ private boolean isEnvReadOnly() {
++ CloneableEditorSupport.Env myEnv = desEnv();
++ return myEnv instanceof Environment && !((Environment) myEnv).getFileImpl().canWrite();
++ }
+
+ /**
+ *
+@@ -524,7 +552,9 @@
+
+ /** Helper method. Saves this entry. */
+ private void saveThisEntry() throws IOException {
+- super.saveDocument();
++ FileSystem.AtomicAction aa = new SaveImpl(this);
++ FileUtil.runAtomicAction(aa);
++// super.saveDocument();
+ // #32777 - it can happen that save operation was interrupted
+ // and file is still modified. Mark it unmodified only when it is really
+ // not modified.
+@@ -532,6 +562,10 @@
+ myEntry.setModified(false);
+ }
+ }
++
++ final void superSaveDoc() throws IOException {
++ super.saveDocument();
++ }
+
+ /**
+ * Save the document under a new file name and/or extension.
+@@ -674,9 +708,9 @@
+ if(this.entry != null)
+ super.entry = this.entry;
+ }
+- }
++ }
+
+-
++
+ /** Nested class. Implementation of ClonableEditorSupport.Env interface. */
+ private static class Environment implements CloneableEditorSupport.Env,
+ PropertyChangeListener, SaveCookie {
+@@ -685,10 +719,15 @@
+ static final long serialVersionUID = 354528097109874355L;
+
+ /** Entry on which is support build. */
+- protected PropertiesFileEntry entry;
+-
++ private PropertiesFileEntry entry;
++
+ /** Lock acquired after the first modification and used in save method. */
+ private transient FileLock fileLock;
++
++ /** The file object this environment is associated to.
++ * This file object can be changed by a call to refresh file.
++ */
++ private transient FileObject fileObject;
+
+ /** Spport for firing of property changes. */
+ private transient PropertyChangeSupport propSupp;
+@@ -707,7 +746,18 @@
+ entry.getFile().addFileChangeListener(new EnvironmentListener(this));
+ entry.addPropertyChangeListener(this);
+ }
++ /** Getter for the file to work on.
++ * @return the file
++ */
++ private FileObject getFileImpl () {
++ // updates the file if there was a change
++ changeFile();
++ return fileObject;
++ }
+
++ protected final DataObject getDataObject() {
++ return entry.getDataObject();
++ }
+ /** Implements CloneableEditorSupport.Env inetrface. Adds property listener. */
+ public void addPropertyChangeListener(PropertyChangeListener l) {
+ LOG.finer("Environment.addPropertyChangeListener(...)"); //NOI18N
+@@ -826,6 +876,20 @@
+
+ entry.setModified(false);
+ }
++ /**
++ * Called from the EnvironmentListener.
++ */
++ final void updateDocumentProperty () {
++ //Update document TitleProperty
++ EditorCookie ec = getDataObject().getCookie(EditorCookie.class);
++ if (ec != null) {
++ StyledDocument doc = ec.getDocument();
++ if (doc != null) {
++ doc.putProperty(Document.TitleProperty,
++ FileUtil.getFileDisplayName(getDataObject().getPrimaryFile()));
++ }
++ }
++ }
+
+ /**
+ * Implements CloneableEditorSupport.Env interface.
+@@ -833,7 +897,7 @@
+ * @return the mime type to use for the document
+ */
+ public String getMimeType() {
+- return entry.getFile().getMIMEType();
++ return getFileImpl().getMIMEType();
+ }
+
+ /**
+@@ -841,8 +905,59 @@
+ * The time when the data has been modified. */
+ public Date getTime() {
+ // #32777 - refresh file object and return always the actual time
+- entry.getFile().refresh(false);
+- return entry.getFile().lastModified();
++ getFileImpl().refresh();
++ return getFileImpl().lastModified();
++ }
++
++ /** Method that allows subclasses to notify this environment that
++ * the file associated with this support has changed and that
++ * the environment should listen on modifications of different
++ * file object.
++ */
++ protected final void changeFile () {
++ FileObject newFile = entry.getFile ();
++ if (newFile.equals (fileObject)) {
++ // the file has not been updated
++ return;
++ }
++
++ boolean lockAgain;
++ if (fileLock != null) {
++// <> NB #61818 In case the lock was not active (isValid() == false), the new lock was taken,
++// which seems to be incorrect. There is taken a lock on new file, while it there wasn't on the old one.
++// fileLock.releaseLock ();
++// lockAgain = true;
++// =====
++ if(fileLock.isValid()) {
++ LOG.fine("changeFile releaseLock: " + fileLock + " for " + fileObject); // NOI18N
++ fileLock.releaseLock ();
++ lockAgain = true;
++ } else {
++ fileLock = null;
++ lockAgain = false;
++ }
++// >
++ } else {
++ lockAgain = false;
++ }
++
++ boolean wasNull = fileObject == null;
++
++ fileObject = newFile;
++ LOG.fine("changeFile: " + newFile + " for " + fileObject); // NOI18N
++ fileObject.addFileChangeListener (new EnvironmentListener(this));
++
++ if (lockAgain) { // refresh lock
++ try {
++ fileLock = entry.takeLock ();
++ LOG.fine("changeFile takeLock: " + fileLock + " for " + fileObject); // NOI18N
++ } catch (IOException e) {
++ Logger.getLogger(PropertiesEditorSupport.class.getName()).log(Level.WARNING, null, e);
++ }
++ }
++ if (!wasNull) {
++ firePropertyChange("expectedTime", null, getTime()); // NOI18N
++ }
+ }
+
+ /**
+@@ -852,7 +967,7 @@
+ */
+ public InputStream inputStream() throws IOException {
+ LOG.finer("Environment.inputStream()"); //NOI18N
+- return entry.getFile().getInputStream();
++ return getFileImpl().getInputStream();
+ }
+
+ /**
+@@ -862,7 +977,22 @@
+ */
+ public OutputStream outputStream() throws IOException {
+ LOG.finer("Environment.outputStream()"); //NOI18N
+- return entry.getFile().getOutputStream(fileLock);
++ if (fileLock == null || !fileLock.isValid()) {
++ fileLock = entry.takeLock ();
++ }
++ LOG.fine("outputStream after takeLock: " + fileLock + " for " + fileObject); // NOI18N
++ try {
++ return getFileImpl ().getOutputStream (fileLock);
++ } catch (IOException fse) {
++ // [pnejedly] just retry once.
++ // Ugly workaround for #40552
++ if (fileLock == null || !fileLock.isValid()) {
++ fileLock = entry.takeLock ();
++ }
++ LOG.fine("ugly workaround for #40552: " + fileLock + " for " + fileObject); // NOI18N
++ return getFileImpl ().getOutputStream (fileLock);
++ }
++// return entry.getFile().getOutputStream(fileLock);
+ }
+
+ /**
+@@ -875,7 +1005,7 @@
+ // Do saving job. Note it gets editor support, not open support.
+ ((PropertiesEditorSupport)findCloneableOpenSupport()).saveThisEntry();
+ }
+-
++
+ /** Fires property change.
+ * @param name the name of property that changed
+ * @param oldValue old value
+@@ -955,6 +1085,12 @@
+ }
+ }
+
++ /** Called from the EnvironmentListener.
++ */
++ final void fileRenamed () {
++ //#151787: Sync timestamp when svn client changes timestamp externally during rename.
++ firePropertyChange("expectedTime", null, getTime()); // NOI18N
++ }
+
+ /** Called from the EnvironmentListener.
+ * The components are going to be closed anyway and in case of
+@@ -1000,12 +1136,12 @@
+ }
+ Environment environment = reference.get();
+ if (environment != null) {
+- if(!environment.entry.getFile().equals(evt.getFile()) ) {
++ if(!environment.getFileImpl().equals(evt.getFile()) ) {
+ // If the FileObject was changed.
+ // Remove old listener from old FileObject.
+ evt.getFile().removeFileChangeListener(this);
+ // Add new listener to new FileObject.
+- environment.entry.getFile().addFileChangeListener(new EnvironmentListener(environment));
++ environment.getFileImpl().addFileChangeListener(new EnvironmentListener(environment));
+ return;
+ }
+
+@@ -1021,6 +1157,15 @@
+ }
+ }
+ }
++
++ @Override
++ public void fileRenamed(FileRenameEvent fe) {
++ Environment myEnv = this.reference.get();
++ if (myEnv != null) {
++ myEnv.updateDocumentProperty();
++ myEnv.fileRenamed();
++ }
++ }
+ } // End of nested class EnvironmentListener.
+
+
+@@ -1266,4 +1411,40 @@
+ return atomicFlag;
+ }
+ } // End of nested class TimeStamp.
++
++ private static class SaveImpl implements AtomicAction {
++ private static final SaveImpl DEFAULT = new SaveImpl(null);
++ private final PropertiesEditorSupport des;
++
++ public SaveImpl(PropertiesEditorSupport des) {
++ this.des = des;
++ }
++
++ public void run() throws IOException {
++ if (des.desEnv().isModified() && des.isEnvReadOnly()) {
++ IOException e = new IOException("File is read-only: " + ((Environment) des.env).getFileImpl()); // NOI18N
++// UIException.annotateUser(e, null, org.openide.util.NbBundle.getMessage(org.openide.loaders.DataObject.class, "MSG_FileReadOnlySaving", new java.lang.Object[]{((org.netbeans.modules.properties.PropertiesEditorSupport.Environment) des.env).getFileImpl().getNameExt()}), null, null);
++ throw e;
++ }
++ DataObject tmpObj = des.getDataObject();
++ Charset c = FileEncodingQuery.getEncoding(tmpObj.getPrimaryFile());
++ try {
++ charsets.put(tmpObj, c);
++ des.superSaveDoc();
++ } finally {
++ charsets.remove(tmpObj);
++ }
++ }
++
++ @Override
++ public int hashCode() {
++ return getClass().hashCode();
++ }
++
++ @Override
++ public boolean equals(Object obj) {
++ return obj != null && getClass() == obj.getClass();
++ }
++ }
++
+ }
+diff -r 76d51071af8a -r af9499d919b8 properties/src/org/netbeans/modules/properties/PropertiesEncoding.java
+--- a/properties/src/org/netbeans/modules/properties/PropertiesEncoding.java Fri Nov 07 11:48:18 2008 +0100
++++ b/properties/src/org/netbeans/modules/properties/PropertiesEncoding.java Tue Mar 10 13:53:55 2009 +0300
+@@ -787,13 +787,11 @@
+ assert index <= 15;
+ unicodeValue = (unicodeValue << 4) | index;
+ if (++unicodeBytesRead == 4) {
+- if ((unicodeValue == 0x20)
+- || (unicodeValue == 0x09)
+- || (unicodeValue == 0x0c)) {
++ if (unicodeValue <= 0x20) {
+ unicodeValueChars[3] = bChar;
+ /*
+- * Do not translate sequences \\u0020 (Space),
+- * \\u0009 (Tab) and \\u000c (Form-feed).
++ * Do not translate Unicode sequences of value
++ * 20h (space) or less (control characters).
+ * Changing form of these unicode sequences
+ * to one-character form might change
+ * semantics, which is not desirable
+diff -r 76d51071af8a -r af9499d919b8 properties/src/org/netbeans/modules/properties/PropertiesParser.java
+--- a/properties/src/org/netbeans/modules/properties/PropertiesParser.java Fri Nov 07 11:48:18 2008 +0100
++++ b/properties/src/org/netbeans/modules/properties/PropertiesParser.java Tue Mar 10 13:53:55 2009 +0300
+@@ -1,7 +1,7 @@
+ /*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
++ * Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+@@ -24,7 +24,7 @@
+ * Contributor(s):
+ *
+ * The Original Software is NetBeans. The Initial Developer of the Original
+- * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
++ * Software is Sun Microsystems, Inc. Portions Copyright 1997-2008 Sun
+ * Microsystems, Inc. All Rights Reserved.
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+@@ -234,7 +234,7 @@
+ if(comment.charAt(comment.length() - 1) == '\n')
+ comHelp = comment.substring(0, comment.length() - 1);
+
+- commE = new Element.CommentElem(createBiasBounds(begPos, keyPos), UtilConvert.loadConvert(comHelp));
++ commE = new Element.CommentElem(createBiasBounds(begPos, keyPos), comHelp);
+ // fl now contains the line after the comment or null if none exists
+
+
+@@ -321,8 +321,8 @@
+ valuePosFile = currentPos;
+ }
+
+- keyE = new Element.KeyElem (createBiasBounds(keyPos, valuePosFile), UtilConvert.loadConvert(key));
+- valueE = new Element.ValueElem(createBiasBounds(valuePosFile, currentPos), UtilConvert.loadConvert(value));
++ keyE = new Element.KeyElem (createBiasBounds(keyPos, valuePosFile), key);
++ valueE = new Element.ValueElem(createBiasBounds(valuePosFile, currentPos), value);
+ }
+
+ return new Element.ItemElem(createBiasBounds(begPos, in.position), keyE, valueE, commE);
+diff -r 76d51071af8a -r af9499d919b8 refactoring.java/manifest.mf
+--- a/refactoring.java/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/refactoring.java/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -3,6 +3,6 @@
+ OpenIDE-Module-Install: org/netbeans/modules/refactoring/java/RefactoringModule.class
+ OpenIDE-Module-Layer: org/netbeans/modules/refactoring/java/resources/mf-layer.xml
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/refactoring/java/resources/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.4.1
++OpenIDE-Module-Specification-Version: 1.4.2
+ AutoUpdate-Show-In-Client: false
+
+diff -r 76d51071af8a -r af9499d919b8 refactoring.java/src/org/netbeans/modules/refactoring/java/CopyHandler.java
+--- a/refactoring.java/src/org/netbeans/modules/refactoring/java/CopyHandler.java Fri Nov 07 11:48:18 2008 +0100
++++ b/refactoring.java/src/org/netbeans/modules/refactoring/java/CopyHandler.java Tue Mar 10 13:53:55 2009 +0300
+@@ -50,6 +50,7 @@
+ import org.netbeans.api.java.source.TreeMaker;
+ import org.netbeans.api.java.source.WorkingCopy;
+ import org.openide.filesystems.FileObject;
++import org.openide.filesystems.FileUtil;
+ import org.openide.loaders.DataLoaderPool;
+ import org.openide.loaders.OperationEvent;
+ import org.openide.loaders.OperationEvent.Copy;
+@@ -68,24 +69,24 @@
+ * @author Jan Pokorsky
+ */
+ final class CopyHandler implements OperationListener {
+-
++
+ private static final CopyHandler INSTANCE = new CopyHandler();
+-
++
+ public static CopyHandler getInstance() {
+ return INSTANCE;
+ }
+-
++
+ public void register() {
+ DataLoaderPool.getDefault().addOperationListener(this);
+ }
+
+- private static void renameFO(final JavaSource javaSource,
+- final String packageName,
+- final String newName,
++ private static void renameFO(final JavaSource javaSource,
++ final String packageName,
++ final String newName,
+ final String originalName) throws IOException {
+
+ Task task = new Task() {
+-
++
+ public void run(WorkingCopy workingCopy) throws IOException {
+ workingCopy.toPhase(Phase.RESOLVED);
+ TreeMaker make = workingCopy.getTreeMaker();
+@@ -110,11 +111,11 @@
+ }
+ }
+ }
+- }
++ }
+ };
+ javaSource.runModificationTask(task).commit();
+ }
+-
++
+ // singleton
+ private CopyHandler() {
+ }
+@@ -126,6 +127,11 @@
+ if (js == null) {
+ return;
+ }
++ if (!"text/x-java".equals(FileUtil.getMIMEType(copyFO)) //NOI18N
++ && !"java".equals(copyFO.getExt())) { //NOI18N
++ // #151288: JavaSource may exist even for .class file
++ return;
++ }
+ ClassPath cp = ClassPath.getClassPath(copyFO, ClassPath.SOURCE);
+ if (cp == null) {
+ return;
+diff -r 76d51071af8a -r af9499d919b8 registration/manifest.mf
+--- a/registration/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/registration/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -4,5 +4,5 @@
+ OpenIDE-Module-Install: org/netbeans/modules/registration/NbInstaller.class
+ OpenIDE-Module-Layer: org/netbeans/modules/registration/resources/layer.xml
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/registration/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.1.1
++OpenIDE-Module-Specification-Version: 1.1.2
+
+diff -r 76d51071af8a -r af9499d919b8 registration/nbproject/project.xml
+--- a/registration/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100
++++ b/registration/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300
+@@ -60,7 +60,7 @@
+
+
+
+- 1.1
++ 1.2.2
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 reglib/manifest.mf
+--- a/reglib/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/reglib/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -2,5 +2,5 @@
+ AutoUpdate-Show-In-Client: false
+ OpenIDE-Module: org.netbeans.modules.reglib
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/reglib/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.2.1
++OpenIDE-Module-Specification-Version: 1.2.4
+
+diff -r 76d51071af8a -r af9499d919b8 reglib/src/org/netbeans/modules/reglib/Bundle.properties
+--- a/reglib/src/org/netbeans/modules/reglib/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/reglib/src/org/netbeans/modules/reglib/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -73,21 +73,21 @@
+ servicetag.javafxsdk.parent.urn=urn:uuid:bc76c157-8a3c-4da7-97d2-41d561ffe234
+ servicetag.javafxsdk.parent.name=Development Tools
+
+-#For GFv2ur1
++#For GFv2.1
+ servicetag.gf.urn=urn:uuid:f49ff605-60a0-11dc-9b8e-080020a9ed93
+ servicetag.gf.name=Sun Java System Application Server
+-servicetag.gf.version=9.1
++servicetag.gf.version=9.1.1
+ servicetag.gf.parent.urn=urn:uuid:a573278d-43d6-11d9-9607-080020a9ed93
+ servicetag.gf.parent.name=Sun Java System Application Server
+
+-#For GFv2ur1
++#For GFv2.1
+ servicetag.gf.urn.v2=urn:uuid:f49ff605-60a0-11dc-9b8e-080020a9ed93
+ servicetag.gf.name.v2=Sun Java System Application Server
+-servicetag.gf.version.v2=9.1
++servicetag.gf.version.v2=9.1.1
+ servicetag.gf.parent.urn.v2=urn:uuid:a573278d-43d6-11d9-9607-080020a9ed93
+ servicetag.gf.parent.name.v2=Sun Java System Application Server
+
+-#For GFv2.1
++#For SGESv2.1
+ servicetag.gf.urn.v2.1=urn:uuid:f49ff605-60a0-11dc-9b8e-080020a9ed93
+ servicetag.gf.name.v2.1=Sun GlassFish Enterprise Server
+ servicetag.gf.version.v2.1=2.1
+diff -r 76d51071af8a -r af9499d919b8 reglib/src/org/netbeans/modules/reglib/NbServiceTagSupport.java
+--- a/reglib/src/org/netbeans/modules/reglib/NbServiceTagSupport.java Fri Nov 07 11:48:18 2008 +0100
++++ b/reglib/src/org/netbeans/modules/reglib/NbServiceTagSupport.java Tue Mar 10 13:53:55 2009 +0300
+@@ -183,13 +183,13 @@
+ if (arrGF.length >= 2) {
+ if (arrGF[1].toUpperCase(Locale.ENGLISH).contains("GLASSFISH")) { // NOI18N
+ if (!isGFAdded) {
+- names.add("GlassFish V2 UR2"); // NOI18N
++ names.add("GlassFish V2.1"); // NOI18N
+ isGFAdded = true;
+ }
+ } else if (arrGF[1].toUpperCase(Locale.ENGLISH).contains("APPSERVER") || // NOI18N
+ arrGF[1].toUpperCase(Locale.ENGLISH).contains("SDK")) { // NOI18N
+ if (!isASAdded) {
+- names.add("Sun Java System Application Server 9.1 Update 2"); // NOI18N
++ names.add("Sun GlassFish Enterprise Server v2.1"); // NOI18N
+ isASAdded = true;
+ }
+ }
+@@ -199,12 +199,12 @@
+ }
+ } else if (st.getProductName().contains("Sun Java System Application Server")) { // NOI18N
+ if (!isASAdded) {
+- names.add("Sun Java System Application Server 9.1 Update 2"); // NOI18N
++ names.add("GlassFish V2.1"); // NOI18N
+ isASAdded = true;
+ }
+ } else if (st.getProductName().contains("Sun GlassFish Enterprise Server")) { // NOI18N
+ if (!isGFAdded) {
+- names.add("GlassFish V2 UR2"); // NOI18N
++ names.add("Sun GlassFish Enterprise Server v2.1"); // NOI18N
+ isGFAdded = true;
+ }
+ } else if (st.getProductName().contains("J2SE 5.0 Development Kit")) { // NOI18N
+@@ -529,13 +529,25 @@
+ }
+ if ((tmpFile != null) && tmpFile.exists()) {
+ tmpFile.delete();
+- targetFile = regXmlFileNb;
++ //Verify we can overwrite/delete target file in install dir
++ //to handle case whet target file is read only.
++ if (regXmlFileNb.exists()) {
++ if (regXmlFileNb.delete()) {
++ targetFile = regXmlFileNb;
++ } else {
++ targetFile = regXmlFileHome;
++ }
++ } else {
++ targetFile = regXmlFileNb;
++ }
+ } else {
+ targetFile = regXmlFileHome;
+ }
+ } else {
+ targetFile = regXmlFileHome;
+ }
++ LOG.log(Level.FINE,"writeRegistrationXml targetFile: " + targetFile);
++
+ BufferedOutputStream out = null;
+ try {
+ out = new BufferedOutputStream(new FileOutputStream(targetFile));
+@@ -567,12 +579,38 @@
+ }
+
+ File srcFile = null;
++ //Below srcFile must be either set or method must return
+ if (regXmlFileNb.exists()) {
+- srcFile = regXmlFileNb;
+- LOG.log(Level.FINE,"Service tag will be loaded from NB install dir: " + srcFile);
++ //#151921 Check for empty file
++ if (regXmlFileNb.length() == 0) {
++ //Check file at home dir just in case install dir is read only
++ if (regXmlFileHome.exists()) {
++ if (regXmlFileHome.length() == 0) {
++ registration = new RegistrationData();
++ LOG.log(Level.FINE,"Service tag file:" + regXmlFileHome + " is empty.");
++ return registration;
++ } else {
++ srcFile = regXmlFileHome;
++ }
++ } else {
++ registration = new RegistrationData();
++ LOG.log(Level.FINE,"Service tag file:" + regXmlFileNb + " is empty.");
++ return registration;
++ }
++ } else {
++ srcFile = regXmlFileNb;
++ LOG.log(Level.FINE,"Service tag will be loaded from NB install dir: " + srcFile);
++ }
+ } else if (regXmlFileHome.exists()) {
+- srcFile = regXmlFileHome;
+- LOG.log(Level.FINE,"Service tag will be loaded from user home dir: " + srcFile);
++ //#151921 Check for empty file
++ if (regXmlFileHome.length() == 0) {
++ registration = new RegistrationData();
++ LOG.log(Level.FINE,"Service tag file:" + regXmlFileHome + " is empty.");
++ return registration;
++ } else {
++ srcFile = regXmlFileHome;
++ LOG.log(Level.FINE,"Service tag will be loaded from user home dir: " + srcFile);
++ }
+ } else {
+ registration = new RegistrationData();
+ LOG.log(Level.FINE,"Service tag file not found");
+diff -r 76d51071af8a -r af9499d919b8 reglib/src/org/netbeans/modules/servicetag/RegistrationDocument.java
+--- a/reglib/src/org/netbeans/modules/servicetag/RegistrationDocument.java Fri Nov 07 11:48:18 2008 +0100
++++ b/reglib/src/org/netbeans/modules/servicetag/RegistrationDocument.java Tue Mar 10 13:53:55 2009 +0300
+@@ -158,7 +158,8 @@
+
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ Document doc = builder.parse(new InputSource(in));
+- validator.validate(new DOMSource(doc));
++ //Switch off validation as workaround for issue #151843
++ //validator.validate(new DOMSource(doc));
+ return doc;
+ } catch (SAXException sxe) {
+ IllegalArgumentException e = new IllegalArgumentException("Error generated in parsing");
+diff -r 76d51071af8a -r af9499d919b8 reglib/src/org/netbeans/modules/servicetag/Util.java
+--- a/reglib/src/org/netbeans/modules/servicetag/Util.java Fri Nov 07 11:48:18 2008 +0100
++++ b/reglib/src/org/netbeans/modules/servicetag/Util.java Tue Mar 10 13:53:55 2009 +0300
+@@ -54,6 +54,11 @@
+ class Util {
+ private static boolean verbose = (System.getProperty("servicetag.verbose") != null);
+ private static String jrepath = null;
++ private static final String REGKEY_TAIL =
++ "microsoft\\windows\\currentversion\\app paths\\stclient.exe";
++ private static final String STCLIENT_TAIL = "sun\\servicetag\\stclient.exe";
++ private static final String WIN32_STCLIENT =
++ "c:\\Program Files (x86)\\" + STCLIENT_TAIL;
+
+ // for debugging and tracing
+ static boolean isVerbose() {
+@@ -231,15 +236,20 @@
+
+ /**
+ * Gets the stclient path using a well known location from
+- * the Windows platform Registry, otherwise it will return null.
++ * the Windows platform Registry, ensuring the path returned
++ * by the registry is really the one we are looking for,
++ * otherwise it will return null.
+ */
+- static File getWindowsStClientFile() {
++ private static File getWindowsStClientFile(boolean wow64) {
+ File out = null;
+- String regKey = "software\\microsoft\\windows\\currentversion\\app paths\\stclient.exe";
++ String regKey = (wow64 == true)
++ ? "software\\Wow6432Node\\" + REGKEY_TAIL
++ : "software\\" + REGKEY_TAIL;
+ String keyName = "" ; // use the default key
+ String path = getRegistryKey(regKey, keyName);
+-
+- if (path != null && (new File(path)).exists()) {
++ if (path != null
++ && (new File(path)).exists()
++ && path.toLowerCase().endsWith(STCLIENT_TAIL.toLowerCase())) {
+ out = new File(path);
+ }
+ if (isVerbose()) {
+@@ -249,6 +259,43 @@
+ }
+
+ /**
++ * Finds a stclient in 32 and 64 bit environments, first by querying
++ * the windows registry, if not then get the well known paths for
++ * 64bit see http://support.microsoft.com/kb/896459
++ */
++
++ static File getWindowsStClientFile() {
++ File stclient = null;
++
++ if (System.getProperty("os.arch").equals("x86")) {
++ // try to get the default entry
++ stclient = getWindowsStClientFile(false);
++ if (stclient != null) {
++ return stclient;
++ }
++ } else { // we are on 64-bit system
++ // try the wow64 area
++ stclient = getWindowsStClientFile(true);
++ if (stclient != null) {
++ return stclient;
++ }
++ // try the default hard coded path, maybe wow64 registry is missing
++ stclient = new File(WIN32_STCLIENT);
++ // 6.5 uses Java 1.5: canExecute() changed to canRead()
++ if (stclient.canRead()) {
++ if (isVerbose()) {
++ System.out.println("stclient(default)=" + stclient);
++ }
++ return stclient;
++ }
++ }
++ if (isVerbose()) {
++ System.out.println("stclient not found");
++ }
++ return null;
++ }
++
++ /**
+ * This uses reflection to access a private java windows registry
+ * interface, any changes to that Class must be appropriately adjusted.
+ * Returns a null if unsuccessful.
+diff -r 76d51071af8a -r af9499d919b8 server/manifest.mf
+--- a/server/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/server/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -2,6 +2,6 @@
+ OpenIDE-Module: org.netbeans.modules.server/0
+ OpenIDE-Module-Layer: org/netbeans/modules/server/resources/layer.xml
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/server/resources/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.2.1
++OpenIDE-Module-Specification-Version: 1.2.2
+ AutoUpdate-Show-In-Client: false
+
+diff -r 76d51071af8a -r af9499d919b8 server/src/org/netbeans/modules/server/ui/wizard/ServerWizardPanel.java
+--- a/server/src/org/netbeans/modules/server/ui/wizard/ServerWizardPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/server/src/org/netbeans/modules/server/ui/wizard/ServerWizardPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -84,7 +84,7 @@
+ }
+
+ public boolean isValid() {
+- return getVisual().isValid();
++ return getVisual().hasValidData();
+ }
+
+ public void addChangeListener(ChangeListener listener) {
+diff -r 76d51071af8a -r af9499d919b8 server/src/org/netbeans/modules/server/ui/wizard/ServerWizardVisual.java
+--- a/server/src/org/netbeans/modules/server/ui/wizard/ServerWizardVisual.java Fri Nov 07 11:48:18 2008 +0100
++++ b/server/src/org/netbeans/modules/server/ui/wizard/ServerWizardVisual.java Tue Mar 10 13:53:55 2009 +0300
+@@ -141,8 +141,7 @@
+ }
+ }
+
+- @Override
+- public boolean isValid() {
++ boolean hasValidData() {
+ boolean result = isServerValid() && isDisplayNameValid();
+ if (result) {
+ wizard.setErrorMessage(null);
+diff -r 76d51071af8a -r af9499d919b8 spi.debugger.ui/manifest.mf
+--- a/spi.debugger.ui/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/spi.debugger.ui/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -2,6 +2,6 @@
+ OpenIDE-Module: org.netbeans.spi.debugger.ui/1
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/debugger/ui/Bundle.properties
+ OpenIDE-Module-Layer: org/netbeans/modules/debugger/resources/mf-layer.xml
+-OpenIDE-Module-Specification-Version: 2.14.1
++OpenIDE-Module-Specification-Version: 2.14.2
+ OpenIDE-Module-Provides: org.netbeans.spi.debugger.ui
+ OpenIDE-Module-Install: org/netbeans/modules/debugger/ui/DebuggerModule.class
+diff -r 76d51071af8a -r af9499d919b8 spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/AddBreakpointAction.java
+--- a/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/AddBreakpointAction.java Fri Nov 07 11:48:18 2008 +0100
++++ b/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/AddBreakpointAction.java Tue Mar 10 13:53:55 2009 +0300
+@@ -194,7 +194,12 @@
+ bOk.setEnabled (false);
+ return;
+ }
+- bOk.setEnabled (controller.isValid ());
++ if (panel.isNoValidityController()) {
++ // Always valid
++ bOk.setEnabled (true);
++ } else {
++ bOk.setEnabled (controller.isValid ());
++ }
+ }
+
+ /** @return true if OK button was pressed in dialog,
+diff -r 76d51071af8a -r af9499d919b8 spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/AddBreakpointPanel.java
+--- a/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/AddBreakpointPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/AddBreakpointPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -57,6 +57,7 @@
+ import org.netbeans.api.debugger.Breakpoint.*;
+ import org.netbeans.spi.debugger.ui.BreakpointType;
+ import org.netbeans.spi.debugger.ui.Controller;
++import org.openide.util.Exceptions;
+
+
+ /**
+@@ -134,10 +135,11 @@
+ return type;
+ }
+
+- public Controller getController () {
++ Controller getController () {
+ if (type != null) {
+ Controller c = type.getController();
+ if (c == null && customizer instanceof Controller) {
++ //Exceptions.printStackTrace(new IllegalStateException("FIXME: JComponent "+customizer+" must not implement Controller interface!"));
+ return (Controller) customizer;
+ } else {
+ return c;
+@@ -146,6 +148,11 @@
+ return null;
+ }
+ }
++
++ boolean isNoValidityController() {
++ // This controller must not be asked for isValid()
++ return type.getController() == null && customizer instanceof Controller;
++ }
+
+
+ // other methods ...........................................................
+diff -r 76d51071af8a -r af9499d919b8 spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/BreakpointCustomizeAction.java
+--- a/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/BreakpointCustomizeAction.java Fri Nov 07 11:48:18 2008 +0100
++++ b/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/BreakpointCustomizeAction.java Tue Mar 10 13:53:55 2009 +0300
+@@ -204,6 +204,7 @@
+ }
+ final Controller[] cPtr = new Controller[] { null };
+ if (c instanceof Controller) {
++ //Exceptions.printStackTrace(new IllegalStateException("FIXME: JComponent "+c+" must not implement Controller interface!"));
+ cPtr[0] = (Controller) c;
+ }
+ final DialogDescriptor[] descriptorPtr = new DialogDescriptor[1];
+diff -r 76d51071af8a -r af9499d919b8 spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/ConnectorPanel.java
+--- a/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/ConnectorPanel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/ConnectorPanel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -67,6 +67,7 @@
+ import org.netbeans.spi.debugger.ui.Controller;
+ import org.openide.awt.Mnemonics;
+
++import org.openide.util.Exceptions;
+ import org.openide.util.NbBundle;
+
+
+@@ -166,6 +167,7 @@
+ JComponent customizer = attachType.getCustomizer ();
+ controller = attachType.getController();
+ if (controller == null && (customizer instanceof Controller)) {
++ Exceptions.printStackTrace(new IllegalStateException("FIXME: JComponent "+customizer+" must not implement Controller interface!"));
+ controller = (Controller) customizer;
+ }
+ firePropertyChange(PROP_TYPE, null, customizer);
+diff -r 76d51071af8a -r af9499d919b8 spi.debugger.ui/src/org/netbeans/spi/debugger/ui/AttachType.java
+--- a/spi.debugger.ui/src/org/netbeans/spi/debugger/ui/AttachType.java Fri Nov 07 11:48:18 2008 +0100
++++ b/spi.debugger.ui/src/org/netbeans/spi/debugger/ui/AttachType.java Tue Mar 10 13:53:55 2009 +0300
+@@ -60,12 +60,13 @@
+ public abstract String getTypeDisplayName ();
+
+ /**
+- * Returns visual customizer for this Attach Type. Customizer can
+- * optionally implement {@link Controller} interface. In that case please
+- * notice the clash of {@link Controller#isValid()} method with
+- * {@link javax.swing.JComponent#isValid()} and consider extending
+- * {@link #getController()} method in case you need to provide
+- * false validity in some cases.
++ * Returns visual customizer for this Attach Type.
++ *
++ * Customizer can not implement the {@link Controller} interface any more,
++ * due to a clash of {@link Controller#isValid()} method with
++ * {@link javax.swing.JComponent#isValid()}.
++ * Override {@link #getController()} method instead.
++ *
+ *
+ * @return visual customizer for this Attach Type
+ */
+@@ -73,13 +74,13 @@
+
+ /**
+ * Return the implementation of {@link Controller} interface.
+- * In cases when it's not desired to implement {@link Controller} interface
+- * by the JComponent returned from {@link #getCustomizer()} method, because
++ * It's not desired to implement the {@link Controller} interface
++ * by JComponent returned from {@link #getCustomizer()} method, because
+ * of the clash of {@link Controller#isValid()} method with
+- * {@link javax.swing.JComponent#isValid()}, an explicit implementation
+- * can be returned by overriding this method.
++ * {@link javax.swing.JComponent#isValid()}. An explicit implementation
++ * should be returned by overriding this method.
+ * The default implementation returns null, in which case
+- * the customizer component is cast to {@link Controller}.
++ * no {@link Controller} is used.
+ *
+ * @return Controller implementation or null.
+ * @since 2.14
+diff -r 76d51071af8a -r af9499d919b8 spi.debugger.ui/src/org/netbeans/spi/debugger/ui/BreakpointType.java
+--- a/spi.debugger.ui/src/org/netbeans/spi/debugger/ui/BreakpointType.java Fri Nov 07 11:48:18 2008 +0100
++++ b/spi.debugger.ui/src/org/netbeans/spi/debugger/ui/BreakpointType.java Tue Mar 10 13:53:55 2009 +0300
+@@ -67,12 +67,13 @@
+ public abstract String getTypeDisplayName ();
+
+ /**
+- * Returns visual customizer for this breakpoint type. Customizer can
+- * optionally implement {@link Controller} interface. In that case please
+- * notice the clash of {@link Controller#isValid()} method with
+- * {@link javax.swing.JComponent#isValid()} and consider extending
+- * {@link #getController()} method in case you need to provide
+- * false validity in some cases.
++ * Returns visual customizer for this breakpoint type.
++ *
++ * Customizer can not implement the {@link Controller} interface any more,
++ * due to a clash of {@link Controller#isValid()} method with
++ * {@link javax.swing.JComponent#isValid()}.
++ * Override {@link #getController()} method instead.
++ *
+ *
+ * @return visual customizer for this breakpoint type
+ */
+@@ -80,13 +81,13 @@
+
+ /**
+ * Return the implementation of {@link Controller} interface.
+- * In cases when it's not desired to implement {@link Controller} interface
+- * by the JComponent returned from {@link #getCustomizer()} method, because
++ * It's not desired to implement the {@link Controller} interface
++ * by JComponent returned from {@link #getCustomizer()} method, because
+ * of the clash of {@link Controller#isValid()} method with
+- * {@link javax.swing.JComponent#isValid()}, an explicit implementation
+- * can be returned by overriding this method.
+- * The default implementation returns null, in which case
+- * the customizer component is cast to {@link Controller}.
++ * {@link javax.swing.JComponent#isValid()}. An explicit implementation
++ * should be returned by overriding this method.
++ * The default implementation returns null, in which case
++ * no {@link Controller} is used.
+ *
+ * @return Controller implementation or null.
+ * @since 2.14
+diff -r 76d51071af8a -r af9499d919b8 spi.debugger.ui/src/org/netbeans/spi/debugger/ui/Controller.java
+--- a/spi.debugger.ui/src/org/netbeans/spi/debugger/ui/Controller.java Fri Nov 07 11:48:18 2008 +0100
++++ b/spi.debugger.ui/src/org/netbeans/spi/debugger/ui/Controller.java Tue Mar 10 13:53:55 2009 +0300
+@@ -45,10 +45,10 @@
+
+
+ /**
+- * Support for validation of various customizers. This interface can be
+- * optionally implemented by some customizers like Attach Panel (see
+- * {@link AttachType#getCustomizer}) and breakpoint customizer (see
+- * {@link BreakpointType#getCustomizer}).
++ * Support for validation of various customizers. This interface can not be
++ * implemented directly by the customizer component. See
++ * {@link AttachType#getController}) and
++ * {@link BreakpointType#getController}).
+ *
+ * @author Jan Jancura
+ */
+@@ -76,10 +76,9 @@
+ * Return true whether value of this customizer
+ * is valid (and OK button can be enabled).
+ *
+- * Please note that if this interface is implemented by a class that extends
++ * When this interface is implemented by a class that extends
+ * {@link javax.swing.JComponent}, this method clashes with
+- * {@link javax.swing.JComponent#isValid()} method. Thus in case you need
+- * to provide false validity in some cases, please implement
++ * {@link javax.swing.JComponent#isValid()} method. In this case please implement
+ * this by a different class and override {@link AttachType#getController()},
+ * resp. {@link BreakpointType#getController()}.
+ *
+diff -r 76d51071af8a -r af9499d919b8 subversion/manifest.mf
+--- a/subversion/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -3,5 +3,5 @@
+ OpenIDE-Module-Layer: org/netbeans/modules/subversion/resources/svn-layer.xml
+ OpenIDE-Module-Install: org/netbeans/modules/subversion/ModuleLifecycleManager.class
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/subversion/resources/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.4.1
++OpenIDE-Module-Specification-Version: 1.4.2
+
+diff -r 76d51071af8a -r af9499d919b8 subversion/nbproject/project.xml
+--- a/subversion/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300
+@@ -157,7 +157,7 @@
+
+
+ 1
+- 1.4
++ 1.8.2
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/SubversionVisibilityQuery.java
+--- a/subversion/src/org/netbeans/modules/subversion/SubversionVisibilityQuery.java Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/src/org/netbeans/modules/subversion/SubversionVisibilityQuery.java Tue Mar 10 13:53:55 2009 +0300
+@@ -93,7 +93,16 @@
+ return true;
+ }
+ try {
+- return getCache().getStatus(file).getStatus() != FileInformation.STATUS_VERSIONED_REMOVEDLOCALLY;
++ // get cached status so you won't block or trigger synchronous shareability calls
++ FileInformation info = getCache().getCachedStatus(file);
++ if(info != null) {
++ return info.getStatus() != FileInformation.STATUS_VERSIONED_REMOVEDLOCALLY;
++ } else {
++ // status isn't cached yet; lets be optimistic here and return true
++ // the visibility will be called again as soon as the refreshes finnishes
++ getCache().refreshAsync(file);
++ return true;
++ }
+ } catch (Exception e) {
+ Subversion.LOG.log(Level.SEVERE, e.getMessage(), e);
+ return true;
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/SvnModuleConfig.java
+--- a/subversion/src/org/netbeans/modules/subversion/SvnModuleConfig.java Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/src/org/netbeans/modules/subversion/SvnModuleConfig.java Tue Mar 10 13:53:55 2009 +0300
+@@ -63,8 +63,9 @@
+ public static final String KEY_EXECUTABLE_BINARY = "svnExecBinary"; // NOI18N
+ public static final String KEY_ANNOTATION_FORMAT = "annotationFormat"; // NOI18N
+ public static final String SAVE_PASSWORD = "savePassword"; // NOI18N
++ private static final String FILE_SELECTOR_PREFIX = "fileSelector"; // NOI18N
+
+- public static final String KEY_RECENT_URL = "repository.recentURL"; // NOI18N
++ public static final String KEY_RECENT_URL = "repository.recentURL"; // NOI18N
+ private static final String SHOW_CHECKOUT_COMPLETED = "checkoutCompleted.showCheckoutCompleted"; // NOI18N
+
+ private static final String URL_EXP = "annotator.urlExp"; // NOI18N
+@@ -72,6 +73,7 @@
+
+ public static final String TEXT_ANNOTATIONS_FORMAT_DEFAULT = "{DEFAULT}"; // NOI18N
+
++
+ private static final SvnModuleConfig INSTANCE = new SvnModuleConfig();
+
+ private Map urlCredentials;
+@@ -151,7 +153,15 @@
+ public void setSavePassword(boolean bl) {
+ getPreferences().putBoolean(SAVE_PASSWORD, bl);
+ }
+-
++
++ public String getFileSelectorPreset(String hash) {
++ return getPreferences().get(FILE_SELECTOR_PREFIX + "-" + hash, "");
++ }
++
++ public void setFileSelectorPreset(String hash, String path) {
++ getPreferences().put(FILE_SELECTOR_PREFIX + "-" + hash, path);
++ }
++
+ public RepositoryConnection getRepositoryConnection(String url) {
+ if(url.endsWith("/")) url = url.substring(0, url.length() - 1);
+ List rcs = getRecentUrls();
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/client/SvnClientExceptionHandler.java
+--- a/subversion/src/org/netbeans/modules/subversion/client/SvnClientExceptionHandler.java Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/src/org/netbeans/modules/subversion/client/SvnClientExceptionHandler.java Tue Mar 10 13:53:55 2009 +0300
+@@ -502,21 +502,9 @@
+ }
+
+ private String getFingerprint(X509Certificate cert, String alg) {
+- String str;
+ try {
+ byte[] encoded = cert.getEncoded();
+- MessageDigest md5 = MessageDigest.getInstance(alg);
+- md5.update(encoded);
+- byte[] md5digest = md5.digest();
+- String ret = ""; // NOI18N
+- for (int i = 0; i < md5digest.length; i++) {
+- String hex = Integer.toHexString(md5digest[i] & 0x000000FF);
+- if(hex.length()==1) {
+- hex = "0" + hex; // NOI18N
+- }
+- ret += hex + (i < md5digest.length - 1 ? ":" : ""); // NOI18N
+- }
+- return ret;
++ return SvnUtils.getHash(alg, encoded);
+ } catch (CertificateEncodingException ex) {
+ Subversion.LOG.log(Level.INFO, ex.getMessage(), ex); // should not happen
+ } catch (NoSuchAlgorithmException ex) {
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/resources/Bundle.properties
+--- a/subversion/src/org/netbeans/modules/subversion/resources/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/src/org/netbeans/modules/subversion/resources/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -41,7 +41,11 @@
+ OpenIDE-Module-Name=Subversion
+ OpenIDE-Module-Display-Category=Base IDE
+ OpenIDE-Module-Short-Description=Integrates Subversion actions into IDE workflow.
+-OpenIDE-Module-Long-Description=Introduces project level Subversion features. Version control actions, such as diff, update, and commit aid in streamlining typical team development cycles.
++OpenIDE-Module-Long-Description=\
++For the list of included fixed bugs please check http://wiki.netbeans.org/NetBeans6.5PatchesInfo. \
++ \
++ \
++Introduces project level Subversion features. Version control actions, such as diff, update, and commit aid in streamlining typical team development cycles.
+
+
+ ## svn-layer.xml
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/ui/copy/CreateCopyAction.java
+--- a/subversion/src/org/netbeans/modules/subversion/ui/copy/CreateCopyAction.java Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/src/org/netbeans/modules/subversion/ui/copy/CreateCopyAction.java Tue Mar 10 13:53:55 2009 +0300
+@@ -95,7 +95,8 @@
+
+ Context ctx = getContext(nodes);
+
+- final File root = ctx.getRootFiles()[0];
++ File root = SvnUtils.getActionRoot(ctx);
++ if(root == null) return;
+ File[] files = Subversion.getInstance().getStatusCache().listFiles(ctx, FileInformation.STATUS_LOCAL_CHANGE);
+
+ final boolean hasChanges = files.length > 0;
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/ui/copy/MergeAction.java
+--- a/subversion/src/org/netbeans/modules/subversion/ui/copy/MergeAction.java Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/src/org/netbeans/modules/subversion/ui/copy/MergeAction.java Tue Mar 10 13:53:55 2009 +0300
+@@ -94,7 +94,8 @@
+ }
+
+ Context ctx = getContext(nodes);
+- final File root = ctx.getRootFiles()[0];
++ final File root = SvnUtils.getActionRoot(ctx);
++ if(root == null) return;
+ SVNUrl rootUrl;
+ SVNUrl url;
+ try {
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/ui/copy/SwitchToAction.java
+--- a/subversion/src/org/netbeans/modules/subversion/ui/copy/SwitchToAction.java Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/src/org/netbeans/modules/subversion/ui/copy/SwitchToAction.java Tue Mar 10 13:53:55 2009 +0300
+@@ -53,6 +53,7 @@
+ import org.netbeans.modules.subversion.client.SvnProgressSupport;
+ import org.netbeans.modules.subversion.ui.actions.ContextAction;
+ import org.netbeans.modules.subversion.util.Context;
++import org.netbeans.modules.subversion.util.FileSelector;
+ import org.netbeans.modules.subversion.util.SvnUtils;
+ import org.netbeans.modules.versioning.util.Utils;
+ import org.openide.nodes.Node;
+@@ -103,8 +104,9 @@
+ }
+
+ Context ctx = getContext(nodes);
+-
+- final File root = ctx.getRootFiles()[0];
++
++ File root = SvnUtils.getActionRoot(ctx);
++ if(root == null) return;
+ SVNUrl rootUrl;
+
+ try {
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/ui/project/ImportAction.java
+--- a/subversion/src/org/netbeans/modules/subversion/ui/project/ImportAction.java Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/src/org/netbeans/modules/subversion/ui/project/ImportAction.java Tue Mar 10 13:53:55 2009 +0300
+@@ -140,7 +140,7 @@
+ final String message)
+ {
+ SVNUrl repository;
+- try {
++ try {
+ repository = SvnUtils.getRepositoryRootUrl(context.getRootFiles()[0]);
+ } catch (SVNClientException ex) {
+ SvnClientExceptionHandler.notifyException(ex, true, true);
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/ui/properties/SvnPropertiesAction.java
+--- a/subversion/src/org/netbeans/modules/subversion/ui/properties/SvnPropertiesAction.java Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/src/org/netbeans/modules/subversion/ui/properties/SvnPropertiesAction.java Tue Mar 10 13:53:55 2009 +0300
+@@ -68,7 +68,7 @@
+ public final class SvnPropertiesAction extends ContextAction {
+
+ protected boolean enable(Node[] nodes) {
+- return getContext(nodes).getRootFiles().length == 1;
++ return nodes.length == 1;
+ }
+
+ protected int getFileEnabledStatus() {
+@@ -91,26 +91,16 @@
+
+ protected void performContextAction(Node[] nodes) {
+ final Context ctx = getContext(nodes);
+- String ctxDisplayName = getContextDisplayName(nodes);
+- File[] roots = ctx.getRootFiles();
+-
+- openProperties(roots, ctxDisplayName);
++ String ctxDisplayName = getContextDisplayName(nodes);
++ File root = SvnUtils.getActionRoot(ctx);
++ openProperties(root, ctxDisplayName);
+ }
+
+- public static void openProperties(File[ ]roots, String ctxDisplayName) {
++ public static void openProperties(File root, String ctxDisplayName) {
+ if(!Subversion.getInstance().checkClientAvailable()) {
+ return;
+ }
+
+- SvnClient client;
+- try {
+- SVNUrl repositoryUrl = SvnUtils.getRepositoryRootUrl(roots[0]);
+- client = Subversion.getInstance().getClient(repositoryUrl);
+- } catch (SVNClientException ex) {
+- SvnClientExceptionHandler.notifyException(ex, true, true);
+- return;
+- }
+-
+ final PropertiesPanel panel = new PropertiesPanel();
+ final PropertiesTable propTable;
+ propTable = new PropertiesTable(panel.labelForTable, PropertiesTable.PROPERTIES_COLUMNS, new String[] { PropertiesTableModel.COLUMN_NAME_VALUE});
+@@ -119,7 +109,7 @@
+ JComponent component = propTable.getComponent();
+ panel.propsPanel.setLayout(new BorderLayout());
+ panel.propsPanel.add(component, BorderLayout.CENTER);
+- SvnProperties svnProperties = new SvnProperties(panel, propTable, roots[0]);
++ SvnProperties svnProperties = new SvnProperties(panel, propTable, root);
+ ResourceBundle loc = NbBundle.getBundle(SvnPropertiesAction.class);
+ JButton cancel = new JButton(loc.getString("CTL_Properties_Action_Cancel")); // NOI18N
+ cancel.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(SvnPropertiesAction.class, "CTL_Properties_Action_Cancel")); // NOI18N
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/ui/relocate/RelocateAction.java
+--- a/subversion/src/org/netbeans/modules/subversion/ui/relocate/RelocateAction.java Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/src/org/netbeans/modules/subversion/ui/relocate/RelocateAction.java Tue Mar 10 13:53:55 2009 +0300
+@@ -44,6 +44,7 @@
+ import java.io.File;
+ import java.net.MalformedURLException;
+ import java.util.ResourceBundle;
++import java.util.logging.Level;
+ import javax.swing.JButton;
+ import javax.swing.event.DocumentEvent;
+ import javax.swing.event.DocumentListener;
+@@ -71,13 +72,20 @@
+ public class RelocateAction extends ContextAction {
+
+ protected boolean enable(Node[] nodes) {
++ if(nodes.length != 1) {
++ return false;
++ }
+ final Context ctx = getContext(nodes);
+ File[] roots = ctx.getRootFiles();
+- if(roots == null || roots.length != 1) {
++ if(roots == null || roots.length < 1) {
+ return false;
+ }
+- File file = roots[0];
+- return file != null && file.isDirectory();
++ for (File file : roots) {
++ if(file.isDirectory()) {
++ return true; // at least one dir
++ }
++ }
++ return false;
+ }
+
+ protected int getDirectoryEnabledStatus() {
+@@ -86,21 +94,6 @@
+ & ~FileInformation.STATUS_NOTVERSIONED_NEWLOCALLY;
+ }
+
+- private String getCurrentURL(File root) {
+- try {
+- SVNUrl repositoryUrl = SvnUtils.getRepositoryRootUrl(root);
+- return repositoryUrl.toString();
+- } catch (SVNClientException ex) {
+- SvnClientExceptionHandler.notifyException(ex, true, true);
+- }
+- return "";
+- }
+-
+- private String getWorkingCopy(File root) {
+- final String working = root.getAbsolutePath();
+- return working;
+- }
+-
+ public void validate(RelocatePanel panel, JButton btnOk) {
+ try {
+ new SVNUrl(panel.getNewURL().getText());
+@@ -108,7 +101,6 @@
+ } catch (MalformedURLException e) {
+ btnOk.setEnabled(false);
+ }
+-
+ }
+
+ protected String getBaseName(Node[] activatedNodes) {
+@@ -117,21 +109,34 @@
+
+ protected void performContextAction(Node[] nodes) {
+ ResourceBundle loc = NbBundle.getBundle(RelocateAction.class);
+-
++
+ final Context ctx = getContext(nodes);
+ File[] roots = ctx.getRootFiles();
+ if (roots == null) {
+ return;
+ }
+-
++
+ final RelocatePanel panel = new RelocatePanel();
+- panel.getCurrentURL().setText(getCurrentURL(roots[0]));
+- panel.getWorkingCopy().setText(getWorkingCopy(roots[0]));
+-
++ File root = SvnUtils.getActionRoot(ctx);
++ SVNUrl repositoryUrl = null;
++ try {
++ repositoryUrl = SvnUtils.getRepositoryRootUrl(root);
++ } catch (SVNClientException ex) {
++ SvnClientExceptionHandler.notifyException(ex, true, true);
++ return;
++ }
++ if(repositoryUrl == null) {
++ Subversion.LOG.log(Level.WARNING, "Could not retrieve repository root for context file {0}", new Object[]{ root });
++ return;
++ }
++ final String wc = root.getAbsolutePath();
++ panel.getCurrentURL().setText(repositoryUrl.toString());
++ panel.getWorkingCopy().setText(wc);
++
+ final JButton btnRelocate = new JButton(loc.getString("CTL_Relocate_Action_Name"));
+ btnRelocate.setEnabled(false);
+ btnRelocate.setToolTipText(loc.getString("TT_Relocate_Action"));
+-
++
+ panel.getNewURL().getDocument().addDocumentListener(new DocumentListener() {
+ public void insertUpdate(DocumentEvent event) {
+ validate(panel, btnRelocate);
+@@ -143,7 +148,7 @@
+
+ public void changedUpdate(DocumentEvent event) {
+ validate(panel, btnRelocate);
+- }
++ }
+ });
+ JButton btnCancel = new JButton(loc.getString("CTL_Relocate_Action_Cancel"));
+ btnCancel.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(RelocateAction.class, "ACSD_Relocate_Action_Cancel")); // NOI18N
+@@ -152,31 +157,24 @@
+ descriptor.setHelpCtx(new HelpCtx(RelocateAction.class));
+ Dialog dialog = DialogDisplayer.getDefault().createDialog(descriptor);
+ dialog.getAccessibleContext().setAccessibleDescription(loc.getString("ACSD_Relocate"));
+-
++
+ dialog.setVisible(true);
+- if (descriptor.getValue() != btnRelocate)
++ if (descriptor.getValue() != btnRelocate)
+ return;
+-
++
+ final String newUrl = panel.getNewURL().getText();
+-
+- final SVNUrl repositoryUrl;
+- try {
+- repositoryUrl = SvnUtils.getRepositoryRootUrl(roots[0]);
+- } catch (SVNClientException ex) {
+- SvnClientExceptionHandler.notifyException(ex, true, true);
+- return;
+- }
+- final String wc = roots[0].getAbsolutePath();
++
+ RequestProcessor rp = Subversion.getInstance().getRequestProcessor(repositoryUrl);
++ final SVNUrl url = repositoryUrl;
+ SvnProgressSupport support = new SvnProgressSupport() {
+ SvnClient client = null;
+- protected void perform() {
++ protected void perform() {
+ try {
+- client = Subversion.getInstance().getClient(repositoryUrl);
+- client.relocate(repositoryUrl.toString(), newUrl, wc, true);
++ client = Subversion.getInstance().getClient(url);
++ client.relocate(url.toString(), newUrl, wc, true);
+ } catch (SVNClientException ex) {
+ annotate(ex);
+- }
++ }
+ }
+ };
+ support.start(rp, repositoryUrl, loc.getString("LBL_Relocate_Progress"));
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/ui/update/RevertModificationsAction.java
+--- a/subversion/src/org/netbeans/modules/subversion/ui/update/RevertModificationsAction.java Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/src/org/netbeans/modules/subversion/ui/update/RevertModificationsAction.java Tue Mar 10 13:53:55 2009 +0300
+@@ -90,7 +90,8 @@
+ return;
+ }
+ final Context ctx = getContext(nodes);
+- final File root = ctx.getRootFiles()[0];
++ final File root = SvnUtils.getActionRoot(ctx);
++ if(root == null) return;
+ final SVNUrl rootUrl;
+ final SVNUrl url;
+
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/ui/update/UpdateResultsTable.java
+--- a/subversion/src/org/netbeans/modules/subversion/ui/update/UpdateResultsTable.java Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/src/org/netbeans/modules/subversion/ui/update/UpdateResultsTable.java Tue Mar 10 13:53:55 2009 +0300
+@@ -336,7 +336,7 @@
+ }
+
+ private void performOpenSvnProperties(File file) {
+- SvnPropertiesAction.openProperties(new File[] {file}, file.getName());
++ SvnPropertiesAction.openProperties(file, file.getName());
+ }
+
+ private File[] getSelectedFiles(int[] selection) {
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/util/Bundle.properties
+--- a/subversion/src/org/netbeans/modules/subversion/util/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/src/org/netbeans/modules/subversion/util/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -2,3 +2,8 @@
+
+ MSG_too_old_WC=It seems that files you are working with were created with an unsupported client version.\n\
+ Please check out your files again with SVN client 1.3.0 or later.
++FileSelector.jLabel1.text=Your selection applies to more than one folder. Please specify the folder you want to use:
++
++CTL_FileSelector_Cancel=Cancel
++CTL_FileSelector_Select=Select
++LBL_FileSelector_Title=Select a Folder
+\ No newline at end of file
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/util/FileSelector.form
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/subversion/src/org/netbeans/modules/subversion/util/FileSelector.form Tue Mar 10 13:53:55 2009 +0300
+@@ -0,0 +1,76 @@
++
++
++
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/util/FileSelector.java
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/subversion/src/org/netbeans/modules/subversion/util/FileSelector.java Tue Mar 10 13:53:55 2009 +0300
+@@ -0,0 +1,214 @@
++/*
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
++ *
++ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
++ *
++ * The contents of this file are subject to the terms of either the GNU
++ * General Public License Version 2 only ("GPL") or the Common
++ * Development and Distribution License("CDDL") (collectively, the
++ * "License"). You may not use this file except in compliance with the
++ * License. You can obtain a copy of the License at
++ * http://www.netbeans.org/cddl-gplv2.html
++ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
++ * specific language governing permissions and limitations under the
++ * License. When distributing the software, include this License Header
++ * Notice in each file and include the License file at
++ * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Sun in the GPL Version 2 section of the License file that
++ * accompanied this code. If applicable, add the following below the
++ * License Header, with the fields enclosed by brackets [] replaced by
++ * your own identifying information:
++ * "Portions Copyrighted [year] [name of copyright owner]"
++ *
++ * If you wish your version of this file to be governed by only the CDDL
++ * or only the GPL Version 2, indicate your decision by adding
++ * "[Contributor] elects to include this software in this distribution
++ * under the [CDDL or GPL Version 2] license." If you do not indicate a
++ * single choice of license, a recipient has the option to distribute
++ * your version of this file under either the CDDL, the GPL Version 2 or
++ * to extend the choice of license to its licensees as provided above.
++ * However, if you add GPL Version 2 code and therefore, elected the GPL
++ * Version 2 license, then the option applies only if the new code is
++ * made subject to such option by the copyright holder.
++ *
++ * Contributor(s):
++ *
++ * Portions Copyrighted 2008 Sun Microsystems, Inc.
++ */
++
++/*
++ * RootSelectorPanel.java
++ *
++ * Created on Dec 1, 2008, 2:41:58 PM
++ */
++
++package org.netbeans.modules.subversion.util;
++
++import java.awt.Dialog;
++import java.io.File;
++import java.security.NoSuchAlgorithmException;
++import java.util.Arrays;
++import java.util.logging.Level;
++import javax.swing.DefaultListModel;
++import javax.swing.JButton;
++import javax.swing.event.ListSelectionEvent;
++import javax.swing.event.ListSelectionListener;
++import org.netbeans.modules.subversion.Subversion;
++import org.netbeans.modules.subversion.SvnModuleConfig;
++import org.openide.DialogDescriptor;
++import org.openide.DialogDisplayer;
++import org.openide.util.Exceptions;
++import org.openide.util.HelpCtx;
++import org.openide.util.NbBundle;
++
++/**
++ *
++ * @author Tomas Stuka
++ */
++public class FileSelector extends javax.swing.JPanel implements ListSelectionListener {
++ private File[] files;
++ private DialogDescriptor dialogDescriptor;
++ private JButton okButton;
++ private JButton cancelButton;
++
++ /** Creates new form RootSelectorPanel */
++ public FileSelector() {
++ initComponents();
++ filesList.addListSelectionListener(this);
++
++ dialogDescriptor = new DialogDescriptor(this, org.openide.util.NbBundle.getMessage(FileSelector.class, "LBL_FileSelector_Title"));
++
++ okButton = new JButton(org.openide.util.NbBundle.getMessage(FileSelector.class, "CTL_FileSelector_Select"));
++ okButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FileSelector.class, "CTL_FileSelector_Select"));
++ okButton.setEnabled(false);
++ cancelButton = new JButton(org.openide.util.NbBundle.getMessage(FileSelector.class, "CTL_FileSelector_Cancel")); // NOI18N
++ cancelButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FileSelector.class, "CTL_FileSelector_Cancel")); // NOI18N
++ dialogDescriptor.setOptions(new Object[] {okButton, cancelButton});
++
++ dialogDescriptor.setModal(true);
++ dialogDescriptor.setHelpCtx(new HelpCtx(this.getClass()));
++ dialogDescriptor.setValid(false);
++ }
++
++ /** This method is called from within the constructor to
++ * initialize the form.
++ * WARNING: Do NOT modify this code. The content of this method is
++ * always regenerated by the Form Editor.
++ */
++ @SuppressWarnings("unchecked")
++ // //GEN-BEGIN:initComponents
++ private void initComponents() {
++
++ jLabel1 = new javax.swing.JLabel();
++ jScrollPane1 = new javax.swing.JScrollPane();
++
++ jLabel1.setText(org.openide.util.NbBundle.getMessage(FileSelector.class, "FileSelector.jLabel1.text")); // NOI18N
++
++ filesList.setModel(new javax.swing.AbstractListModel() {
++ String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
++ public int getSize() { return strings.length; }
++ public Object getElementAt(int i) { return strings[i]; }
++ });
++ filesList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
++ jScrollPane1.setViewportView(filesList);
++
++ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
++ this.setLayout(layout);
++ layout.setHorizontalGroup(
++ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
++ .add(layout.createSequentialGroup()
++ .addContainerGap()
++ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
++ .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
++ .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 572, Short.MAX_VALUE))
++ .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
++ );
++ layout.setVerticalGroup(
++ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
++ .add(layout.createSequentialGroup()
++ .addContainerGap()
++ .add(jLabel1)
++ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
++ .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 109, Short.MAX_VALUE)
++ .addContainerGap())
++ );
++ }// //GEN-END:initComponents
++
++
++ // Variables declaration - do not modify//GEN-BEGIN:variables
++ final javax.swing.JList filesList = new javax.swing.JList();
++ private javax.swing.JLabel jLabel1;
++ private javax.swing.JScrollPane jScrollPane1;
++ // End of variables declaration//GEN-END:variables
++
++ public boolean show(File[] files) {
++ this.files = files;
++ DefaultListModel m = new DefaultListModel();
++ for (File file : files) {
++ m.addElement(file);
++ }
++ filesList.setModel(m);
++ preselectFile(files);
++
++ Dialog dialog = DialogDisplayer.getDefault().createDialog(dialogDescriptor);
++ dialog.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(FileSelector.class, "LBL_FileSelector_Title")); // NOI18N
++
++ dialog.setVisible(true);
++ dialogDescriptor.setHelpCtx(new HelpCtx("org.netbeans.modules.subversion.FileSelector"));
++ boolean ret = dialogDescriptor.getValue() == okButton;
++ if(ret) {
++ saveSelectedFile(files);
++ }
++ return ret;
++ }
++
++ public File getSelectedFile() {
++ return (File) filesList.getSelectedValue();
++ }
++
++ public void valueChanged(ListSelectionEvent e) {
++ boolean enabled = filesList.getSelectedValue() != null;
++ dialogDescriptor.setValid(enabled);
++ okButton.setEnabled(enabled);
++ }
++
++ private void preselectFile(File[] files) {
++ String hash = getHash(files);
++ if(hash == null || hash.trim().equals("")) {
++ return;
++ }
++ String path = SvnModuleConfig.getDefault().getFileSelectorPreset(hash);
++ if(path != null && !path.trim().equals("")) {
++ File f = new File(path);
++ filesList.setSelectedValue(f, true);
++ }
++ }
++
++ private void saveSelectedFile(File[] files) {
++ String hash = getHash(files);
++ if(hash == null || hash.trim().equals("")) {
++ return;
++ }
++ File file = getSelectedFile();
++ if(file != null) {
++ SvnModuleConfig.getDefault().setFileSelectorPreset(hash, file.getAbsolutePath());
++ }
++ }
++
++ private String getHash(File[] files) {
++ Arrays.sort(files);
++ StringBuffer sb = new StringBuffer();
++ for (File file : files) {
++ sb.append(file.getAbsolutePath());
++ }
++ String hash = null;
++ try {
++ hash = SvnUtils.getHash("MD5", sb.toString().getBytes());
++ } catch (NoSuchAlgorithmException ex) {
++ Subversion.LOG.log(Level.SEVERE, null, ex); // should not happen
++ }
++ return hash;
++ }
++
++}
+diff -r 76d51071af8a -r af9499d919b8 subversion/src/org/netbeans/modules/subversion/util/SvnUtils.java
+--- a/subversion/src/org/netbeans/modules/subversion/util/SvnUtils.java Fri Nov 07 11:48:18 2008 +0100
++++ b/subversion/src/org/netbeans/modules/subversion/util/SvnUtils.java Tue Mar 10 13:53:55 2009 +0300
+@@ -53,8 +53,12 @@
+ import org.netbeans.modules.subversion.Subversion;
+ import org.netbeans.modules.subversion.FileInformation;
+ import java.io.*;
++import java.io.File;
++import java.security.MessageDigest;
++import java.security.NoSuchAlgorithmException;
+ import java.util.*;
+ import java.text.ParseException;
++import java.util.ArrayList;
+ import java.util.logging.Level;
+ import java.util.logging.Logger;
+ import java.util.regex.Pattern;
+@@ -980,4 +984,41 @@
+ if(TY9_LOG == null) TY9_LOG = Logger.getLogger("org.netbeans.modules.subversion.t9y");
+ TY9_LOG.log(Level.FINEST, msg);
+ }
++
++ public static File getActionRoot(Context ctx) {
++ File[] roots = ctx.getRootFiles();
++ List l = new ArrayList();
++ for (File file : roots) {
++ if(isManaged(file)) {
++ l.add(file);
++ }
++ }
++ roots = l.toArray(new File[l.size()]);
++ if(roots.length > 1) {
++ FileSelector fs = new FileSelector();
++ if(fs.show(roots)) {
++ return fs.getSelectedFile();
++ } else {
++ return null;
++ }
++ } else {
++ return roots[0];
++ }
++ }
++
++ public static String getHash(String alg, byte[] encoded) throws NoSuchAlgorithmException {
++ MessageDigest md5 = MessageDigest.getInstance(alg);
++ md5.update(encoded);
++ byte[] md5digest = md5.digest();
++ String ret = ""; // NOI18N
++ for (int i = 0; i < md5digest.length; i++) {
++ String hex = Integer.toHexString(md5digest[i] & 0x000000FF);
++ if (hex.length() == 1) {
++ hex = "0" + hex; // NOI18N
++ }
++ ret += hex + (i < md5digest.length - 1 ? ":" : ""); // NOI18N
++ }
++ return ret;
++ }
++
+ }
+diff -r 76d51071af8a -r af9499d919b8 swingapp/manifest.mf
+--- a/swingapp/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/swingapp/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -2,6 +2,6 @@
+ OpenIDE-Module: org.netbeans.modules.swingapp
+ OpenIDE-Module-Layer: org/netbeans/modules/swingapp/resources/layer.xml
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/swingapp/resources/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.3.1
++OpenIDE-Module-Specification-Version: 1.3.2
+ AutoUpdate-Show-In-Client: false
+
+diff -r 76d51071af8a -r af9499d919b8 swingapp/src/org/netbeans/modules/swingapp/templates/NewAppWizardIterator.java
+--- a/swingapp/src/org/netbeans/modules/swingapp/templates/NewAppWizardIterator.java Fri Nov 07 11:48:18 2008 +0100
++++ b/swingapp/src/org/netbeans/modules/swingapp/templates/NewAppWizardIterator.java Tue Mar 10 13:53:55 2009 +0300
+@@ -44,7 +44,9 @@
+ import java.beans.PropertyChangeEvent;
+ import java.beans.PropertyChangeListener;
+ import java.io.File;
++import java.io.FileOutputStream;
+ import java.io.IOException;
++import java.io.OutputStream;
+ import java.lang.reflect.InvocationTargetException;
+ import java.lang.reflect.Method;
+ import java.util.*;
+@@ -246,6 +248,8 @@
+ FileObject projectFolderFO = AppProjectGenerator.createProjectFromTemplate(
+ template, projectDirectory, templateNames, substNames);
+
++ generatePrivateProperties(projectDirectory);
++
+ // remember project location in ProjectChooser
+ ProjectChooser.setProjectsFolder(projectDirectory.getParentFile());
+
+@@ -413,6 +417,28 @@
+ public void uninitialize(WizardDescriptor wiz) {
+ }
+
++ private void generatePrivateProperties(File projectLocation) throws IOException {
++ FileObject prjLoc = FileUtil.toFileObject(projectLocation);
++ String[] nameElements = AntProjectHelper.PRIVATE_PROPERTIES_PATH.split("/"); // NOI18N
++ FileObject fo = prjLoc;
++ for (int i=0; i
+
+
+- 2.0
++ 2.6.3
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 uihandler/manifest.mf
+--- a/uihandler/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/uihandler/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -2,5 +2,5 @@
+ OpenIDE-Module: org.netbeans.modules.uihandler
+ OpenIDE-Module-Install: org/netbeans/modules/uihandler/Installer.class
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/uihandler/Bundle.properties
+-OpenIDE-Module-Specification-Version: 2.6.1
++OpenIDE-Module-Specification-Version: 2.6.3
+
+diff -r 76d51071af8a -r af9499d919b8 uihandler/src/org/netbeans/modules/uihandler/Installer.java
+--- a/uihandler/src/org/netbeans/modules/uihandler/Installer.java Fri Nov 07 11:48:18 2008 +0100
++++ b/uihandler/src/org/netbeans/modules/uihandler/Installer.java Tue Mar 10 13:53:55 2009 +0300
+@@ -50,6 +50,7 @@
+ import java.awt.image.BufferedImage;
+ import java.io.BufferedInputStream;
+ import java.io.BufferedOutputStream;
++import java.io.ByteArrayInputStream;
+ import java.io.DataOutputStream;
+ import java.io.File;
+ import java.io.FileInputStream;
+@@ -73,7 +74,6 @@
+ import java.text.MessageFormat;
+ import java.util.ArrayList;
+ import java.util.Arrays;
+-import java.util.Collection;
+ import java.util.Collections;
+ import java.util.Date;
+ import java.util.LinkedList;
+@@ -136,6 +136,8 @@
+ import org.openide.windows.WindowManager;
+ import org.w3c.dom.Document;
+ import org.w3c.dom.NodeList;
++import org.xml.sax.EntityResolver;
++import org.xml.sax.InputSource;
+ import org.xml.sax.SAXException;
+
+ /**
+@@ -996,6 +998,17 @@
+ factory.setValidating(false);
+ factory.setIgnoringComments(true);
+ DocumentBuilder builder = factory.newDocumentBuilder();
++ builder.setEntityResolver(new EntityResolver() {
++ //Avoid connecting out to get DTD
++ public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
++ if (systemId.equals("http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd")) {
++ InputStream is = new ByteArrayInputStream(new byte[0]);
++ return new InputSource(is);
++ } else {
++ return null;
++ }
++ }
++ });
+
+ PushbackInputStream isWithProlog = new PushbackInputStream(is, 255);
+ byte[] xmlHeader = new byte[5];
+@@ -1020,12 +1033,8 @@
+ NodeList forms = doc.getElementsByTagName("form");
+ for (int i = 0; i < forms.getLength(); i++) {
+ String action = forms.item(i).getAttributes().getNamedItem("action").getNodeValue();
+- if ((action == null) || ("".equals(action))){// logging for issue #145167
+- Logger logger = Logger.getLogger("org.netbeans.ui.logger.Installer");
+- LogRecord rec = new LogRecord(Level.WARNING, "invalid action from doc:");
+- String[] params = new String[]{forms.item(i).toString(), doc.getTextContent(), doc.getDocumentURI()};
+- rec.setParameters(params);
+- logger.log(rec);
++ if ((action == null) || ("".equals(action))) {
++ throw new IllegalStateException("Action should not be empty");
+ }
+ Form f = new Form(action);
+ NodeList inputs = doc.getElementsByTagName("input");
+@@ -1037,7 +1046,14 @@
+ String value = attrValue(in, "value");
+ String align = attrValue(in, "align");
+ String alt = attrValue(in, "alt");
+- boolean enabled = !"true".equals(attrValue(in, "disabled")); // NOI18N
++ //Incorrect value but we keep it here for backward compatibility
++ //Correct value of atribute "disabled" is "disabled"
++ boolean enabled = true;
++ if ("true".equals(attrValue(in, "disabled"))) { // NOI18N
++ enabled = false;
++ } else if ("disabled".equals(attrValue(in, "disabled"))) { // NOI18N
++ enabled = false;
++ }
+
+ List addTo = "left".equals(align) ? left : buttons;
+
+@@ -1111,7 +1127,7 @@
+ try {
+ url[0] = new URL((String) post);
+ } catch (MalformedURLException ex) {
+- LOG.log(Level.WARNING, "Cannot decode URL: " + post, ex); // NOI18N
++ LOG.log(Level.INFO, "Cannot decode URL: " + post, ex); // NOI18N
+ url[0] = null;
+ return null;
+ }
+@@ -1424,6 +1440,9 @@
+ LOG.log(Level.WARNING, null, ex);
+ } catch (SAXException ex) {
+ LOG.log(Level.WARNING, url.toExternalForm(), ex);
++ } catch (IllegalStateException ex){
++ catchConnectionProblem(ex);
++ continue;
+ } catch (java.net.SocketTimeoutException ex) {
+ catchConnectionProblem(ex);
+ continue;
+diff -r 76d51071af8a -r af9499d919b8 uihandler/src/org/netbeans/modules/uihandler/UnknownHostException.html
+--- a/uihandler/src/org/netbeans/modules/uihandler/UnknownHostException.html Fri Nov 07 11:48:18 2008 +0100
++++ b/uihandler/src/org/netbeans/modules/uihandler/UnknownHostException.html Tue Mar 10 13:53:55 2009 +0300
+@@ -1,17 +1,20 @@
+-
+-
++
++
++
+
+
+- UI Gestures Collector
+-
+-
+-
Welcome to the UI Gestures Collector
+-
++
UI Gestures Collector
++
++
++
Welcome to the UI Gestures Collector
++
+ This is the entry page to the world of statistics. The UI Gestures Collector
+ is a portal that allows you to find new tips on how to use NetBeans,
+ discover what developers using the same technologies do the most, and
+ also submit feedback to the NetBeans development team.
+-
++
+
+
+ The basic idea is that you tell the server what you do, and the server,
+@@ -37,10 +40,10 @@
+
+
+-
+-
++
++
+diff -r 76d51071af8a -r af9499d919b8 updatecenters/src/org/netbeans/modules/updatecenters/resources/Bundle.properties
+--- a/updatecenters/src/org/netbeans/modules/updatecenters/resources/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/updatecenters/src/org/netbeans/modules/updatecenters/resources/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -52,8 +52,8 @@
+ Services/AutoupdateType/thirdparty-update-provider.instance=3rd Party Plugins
+ Services/AutoupdateType/pluginportal-update-provider.instance=Plugin Portal
+ #NOI18N
+-URL_Standard=http://updates.netbeans.org/netbeans/updates/6.5/uc/final/stable/catalog.xml.gz?{$netbeans.hash.code}
+-URL_Beta=http://updates.netbeans.org/netbeans/updates/6.5/uc/final/beta/catalog.xml.gz?{$netbeans.hash.code}
+-URL_ThirdParty=http://updates.netbeans.org/netbeans/updates/6.5/uc/final/thirdparty/catalog.xml.gz?{$netbeans.hash.code}
++URL_Standard=http://updates.netbeans.org/netbeans/updates/6.5.1/uc/final/stable/catalog.xml.gz?{$netbeans.hash.code}
++URL_Beta=http://updates.netbeans.org/netbeans/updates/6.5.1/uc/final/beta/catalog.xml.gz?{$netbeans.hash.code}
++URL_ThirdParty=http://updates.netbeans.org/netbeans/updates/6.5.1/uc/final/thirdparty/catalog.xml.gz?{$netbeans.hash.code}
+ URL_PluginPortal=http://plugins.netbeans.org/nbpluginportal/updates/6.5/catalog.xml.gz
+
+diff -r 76d51071af8a -r af9499d919b8 versioning.system.cvss/nbproject/project.properties
+--- a/versioning.system.cvss/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/versioning.system.cvss/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -40,7 +40,7 @@
+ javac.source=1.5
+ javadoc.name=CVS Versioning System
+ javadoc.arch=${basedir}/arch.xml
+-spec.version.base=1.11.1
++spec.version.base=1.11.2
+
+ # copy paste magic to enable unit tests
+ test.unit.src.dir=${basedir}/test/unit/src
+diff -r 76d51071af8a -r af9499d919b8 versioning.system.cvss/nbproject/project.xml
+--- a/versioning.system.cvss/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100
++++ b/versioning.system.cvss/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300
+@@ -69,7 +69,7 @@
+
+
+ 1
+- 1.0
++ 1.17.3
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 versioning.system.cvss/src/org/netbeans/modules/versioning/system/cvss/Bundle.properties
+--- a/versioning.system.cvss/src/org/netbeans/modules/versioning/system/cvss/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/versioning.system.cvss/src/org/netbeans/modules/versioning/system/cvss/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -40,7 +40,11 @@
+ OpenIDE-Module-Name=CVS
+ OpenIDE-Module-Display-Category=Base IDE
+ OpenIDE-Module-Short-Description=Integrates CVS actions into IDE workflow.
+-OpenIDE-Module-Long-Description=Introduces project level CVS (Concurrent Versioning System) features. Version control actions, such as diff, update, and commit aid in streamlining typical team development cycles.
++OpenIDE-Module-Long-Description=\
++For the list of included fixed bugs please check http://wiki.netbeans.org/NetBeans6.5PatchesInfo. \
++ \
++ \
++ Introduces project level CVS (Concurrent Versioning System) features. Version control actions, such as diff, update, and commit aid in streamlining typical team development cycles.
+
+ CTL_CVS_DisplayName = CVS
+ CTL_CVS_MainMenu = &CVS
+diff -r 76d51071af8a -r af9499d919b8 versioning/nbproject/project.properties
+--- a/versioning/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/versioning/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -41,7 +41,7 @@
+ javac.source=1.5
+
+ javadoc.name=Versioning
+-spec.version.base=1.8.1
++spec.version.base=1.8.2
+ is.autoload=true
+
+ javadoc.arch=${basedir}/arch.xml
+diff -r 76d51071af8a -r af9499d919b8 versioning/src/org/netbeans/modules/versioning/diff/DiffSidebar.java
+--- a/versioning/src/org/netbeans/modules/versioning/diff/DiffSidebar.java Fri Nov 07 11:48:18 2008 +0100
++++ b/versioning/src/org/netbeans/modules/versioning/diff/DiffSidebar.java Tue Mar 10 13:53:55 2009 +0300
+@@ -116,6 +116,7 @@
+
+ private RequestProcessor.Task refreshDiffTask;
+ private VersioningSystem ownerVersioningSystem;
++ private File tempFolder;
+
+ public DiffSidebar(JTextComponent target, File file) {
+ this.textComponent = target;
+@@ -426,7 +427,7 @@
+
+ private void initialize() {
+ assert SwingUtilities.isEventDispatchThread();
+-
++
+ document.addDocumentListener(this);
+ textComponent.addComponentListener(this);
+ foldHierarchy.addFoldHierarchyListener(this);
+@@ -439,6 +440,10 @@
+ private void shutdown() {
+ assert SwingUtilities.isEventDispatchThread();
+
++ if(tempFolder != null) {
++ Utils.deleteRecursively(tempFolder);
++ }
++
+ if (fileObject != null) {
+ fileObject.removeFileChangeListener(this);
+ }
+@@ -728,9 +733,13 @@
+ if (vs == null) return null;
+ File mainFile = FileUtil.toFile(fileObject);
+ if (mainFile == null) return null;
+-
+- File tempFolder = Utils.getTempFolder();
+-
++
++ if(tempFolder != null) {
++ Utils.deleteRecursively(tempFolder);
++ }
++ tempFolder = Utils.getTempFolder();
++ tempFolder.deleteOnExit();
++
+ Set filesToCheckout = new HashSet(2);
+ filesToCheckout.add(mainFile);
+ DataObject dao = null;
+@@ -750,6 +759,7 @@
+ try {
+ for (File file : filesToCheckout) {
+ File originalFile = new File(tempFolder, file.getName());
++ originalFile.deleteOnExit();
+ vs.getOriginalFile(file, originalFile);
+ originalFiles.add(originalFile);
+ }
+@@ -764,7 +774,6 @@
+ if(encodinqQuery != null) {
+ encodinqQuery.resetEncodingForFiles(originalFiles);
+ }
+- Utils.deleteRecursively(tempFolder);
+ }
+ }
+
+diff -r 76d51071af8a -r af9499d919b8 websvc.saas.kit/manifest.mf
+--- a/websvc.saas.kit/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/websvc.saas.kit/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -1,5 +1,5 @@
+ Manifest-Version: 1.0
+ OpenIDE-Module: org.netbeans.modules.websvc.saas.kit
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/websvc/saas/kit/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.0.1
++OpenIDE-Module-Specification-Version: 1.0.2
+ AutoUpdate-Show-In-Client: true
+diff -r 76d51071af8a -r af9499d919b8 websvc.saas.kit/nbproject/project.xml
+--- a/websvc.saas.kit/nbproject/project.xml Fri Nov 07 11:48:18 2008 +0100
++++ b/websvc.saas.kit/nbproject/project.xml Tue Mar 10 13:53:55 2009 +0300
+@@ -52,13 +52,13 @@
+
+ org.netbeans.modules.websvc.saas.services.google
+
+- 1.0
++ 1.1.2
+
+
+
+ org.netbeans.modules.websvc.saas.services.strikeiron
+
+- 1.0
++ 1.1.2
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 websvc.saas.kit/src/org/netbeans/modules/websvc/saas/kit/Bundle.properties
+--- a/websvc.saas.kit/src/org/netbeans/modules/websvc/saas/kit/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/websvc.saas.kit/src/org/netbeans/modules/websvc/saas/kit/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -1,5 +1,9 @@
+ OpenIDE-Module-Display-Category=Java, Web, Java EE & PHP
+ OpenIDE-Module-Name=SaaS Services Support
+ OpenIDE-Module-Short-Description=Provides support for consuming SaaS services.
+-OpenIDE-Module-Long-Description=Provides support for consuming SaaS services.
++OpenIDE-Module-Long-Description=\
++For the list of included fixed bugs please check http://wiki.netbeans.org/NetBeans6.5PatchesInfo. \
++ \
++ \
++Provides support for consuming SaaS services.
+
+diff -r 76d51071af8a -r af9499d919b8 websvc.saas.services.google/manifest.mf
+--- a/websvc.saas.services.google/manifest.mf Fri Nov 07 11:48:18 2008 +0100
++++ b/websvc.saas.services.google/manifest.mf Tue Mar 10 13:53:55 2009 +0300
+@@ -2,6 +2,6 @@
+ OpenIDE-Module: org.netbeans.modules.websvc.saas.services.google
+ OpenIDE-Module-Layer: org/netbeans/modules/websvc/saas/services/google/layer.xml
+ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/websvc/saas/services/google/Bundle.properties
+-OpenIDE-Module-Specification-Version: 1.1.1
++OpenIDE-Module-Specification-Version: 1.1.2
+ AutoUpdate-Show-In-Client: false
+
+diff -r 76d51071af8a -r af9499d919b8 websvc.saas.services.google/src/org/netbeans/modules/websvc/saas/services/google/resources/GoogleMap.xml
+--- a/websvc.saas.services.google/src/org/netbeans/modules/websvc/saas/services/google/resources/GoogleMap.xml Fri Nov 07 11:48:18 2008 +0100
++++ b/websvc.saas.services.google/src/org/netbeans/modules/websvc/saas/services/google/resources/GoogleMap.xml Tue Mar 10 13:53:55 2009 +0300
+@@ -58,7 +58,7 @@
+
+
+
+-
++
+
+ 0) {
++ Node node = list.item(0);
++ // Now that we have the desired element, delegate to JAXB.
++ JAXBContext jc = JAXBContext.newInstance("com.strikeiron.search");
++ Unmarshaller unmarshaller = jc.createUnmarshaller();
++ SearchResponse resp = (SearchResponse) unmarshaller.unmarshal(node);
++ return resp.getSearchResult();
++ }
++ } catch (JAXBException jbe) {
++ throw new SearchException(jbe);
++ } catch (MalformedURLException mue) {
++ throw new SearchException(mue);
++ } catch (ParserConfigurationException pce) {
++ throw new SearchException(pce);
++ } catch (SAXException se) {
++ throw new SearchException(se);
++ } catch (IOException ioe) {
++ throw new SearchException(ioe);
++ }
++ return null;
++ }
++
++ /**
++ * A wrapper around the various exceptions that can occur when invoking
++ * the StrikeIron search web service. Get the nested cause exception for
++ * the pertinent details on the error.
++ */
++ public static class SearchException extends Exception {
++ private static final long serialVersionUID = 1L;
++
++ public SearchException(Throwable cause) {
++ super(cause);
++ }
++ }
++}
+diff -r 76d51071af8a -r af9499d919b8 websvc.saas.services.strikeiron/src/org/netbeans/modules/websvc/saas/services/strikeiron/actions/Bundle.properties
+--- a/websvc.saas.services.strikeiron/src/org/netbeans/modules/websvc/saas/services/strikeiron/actions/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/websvc.saas.services.strikeiron/src/org/netbeans/modules/websvc/saas/services/strikeiron/actions/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -37,4 +37,4 @@
+ # Version 2 license, then the option applies only if the new code is
+ # made subject to such option by the copyright holder.
+
+-LBL_FindStrikeIronServices=Find StrikeIron Services
++LBL_FindStrikeIronServices=Find StrikeIron Services...
+diff -r 76d51071af8a -r af9499d919b8 websvc.saas.services.strikeiron/src/org/netbeans/modules/websvc/saas/services/strikeiron/ui/Bundle.properties
+--- a/websvc.saas.services.strikeiron/src/org/netbeans/modules/websvc/saas/services/strikeiron/ui/Bundle.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/websvc.saas.services.strikeiron/src/org/netbeans/modules/websvc/saas/services/strikeiron/ui/Bundle.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -151,8 +151,6 @@
+ FindServiceUI.jlAuthenticationMode.text=Authentication Mode:
+ FindServiceUI.settingsPanel.TabConstraints.tabTitle=Settings
+ FindServiceUI.bSearch.text=Search
+-FindServiceUI.addButton.label=Add
+-FindServiceUI.addButton.actionCommand=Add
+ FindServiceUI.addButton.text=Add
+
+-MSG_ClickToOverride=
+\ No newline at end of file
++MSG_ClickToOverride=
+diff -r 76d51071af8a -r af9499d919b8 websvc.saas.services.strikeiron/src/org/netbeans/modules/websvc/saas/services/strikeiron/ui/FindServiceUI.form
+--- a/websvc.saas.services.strikeiron/src/org/netbeans/modules/websvc/saas/services/strikeiron/ui/FindServiceUI.form Fri Nov 07 11:48:18 2008 +0100
++++ b/websvc.saas.services.strikeiron/src/org/netbeans/modules/websvc/saas/services/strikeiron/ui/FindServiceUI.form Tue Mar 10 13:53:55 2009 +0300
+@@ -4,6 +4,7 @@
+
+
+
++
+
+
+
+@@ -21,9 +22,9 @@
+
+
+
+-
+-
+-
++
++
++
+
+
+
+@@ -54,7 +55,7 @@
+
+
+
+-
++
+
+
+
+@@ -76,9 +77,9 @@
+
+
+
+-
++
+
+-
++
+
+
+
+@@ -95,9 +96,9 @@
+
+
+
+-
++
+
+-
++
+
+
+
+@@ -113,7 +114,7 @@
+
+
+
+-
++
+
+
+
+@@ -186,7 +187,7 @@
+
+
+
+-
++
+
+
+
+@@ -208,14 +209,11 @@
+
+
+
+-
+-
+-
+
+
+-
++
+
+-
++
+
+
+
+@@ -232,8 +230,8 @@
+
+
+
+-
+-
++
++
+
+
+
+@@ -252,7 +250,7 @@
+
+
+
+-
++
+
+
+
+@@ -261,14 +259,14 @@
+
+
+
+-
++
+
+
+
+
+
+
+-
++
+
+
+
+@@ -298,6 +296,9 @@
+
+
+
++
++
++
+
+
+
+@@ -306,7 +307,7 @@
+
+
+
+-
++
+
+
+
+@@ -317,13 +318,7 @@
+
+
+
+-
+-
+-
+-
+-
+-
+-
++
+
+
+
+diff -r 76d51071af8a -r af9499d919b8 websvc.saas.services.strikeiron/src/org/netbeans/modules/websvc/saas/services/strikeiron/ui/FindServiceUI.java
+--- a/websvc.saas.services.strikeiron/src/org/netbeans/modules/websvc/saas/services/strikeiron/ui/FindServiceUI.java Fri Nov 07 11:48:18 2008 +0100
++++ b/websvc.saas.services.strikeiron/src/org/netbeans/modules/websvc/saas/services/strikeiron/ui/FindServiceUI.java Tue Mar 10 13:53:55 2009 +0300
+@@ -1,7 +1,42 @@
+ /*
+- * FindServiceUI.java
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+- * Created on October 31, 2007, 2:42 PM
++ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
++ *
++ * The contents of this file are subject to the terms of either the GNU
++ * General Public License Version 2 only ("GPL") or the Common
++ * Development and Distribution License("CDDL") (collectively, the
++ * "License"). You may not use this file except in compliance with the
++ * License. You can obtain a copy of the License at
++ * http://www.netbeans.org/cddl-gplv2.html
++ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
++ * specific language governing permissions and limitations under the
++ * License. When distributing the software, include this License Header
++ * Notice in each file and include the License file at
++ * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Sun in the GPL Version 2 section of the License file that
++ * accompanied this code. If applicable, add the following below the
++ * License Header, with the fields enclosed by brackets [] replaced by
++ * your own identifying information:
++ * "Portions Copyrighted [year] [name of copyright owner]"
++ *
++ * Contributor(s):
++ *
++ * The Original Software is NetBeans. The Initial Developer of the Original
++ * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
++ * Microsystems, Inc. All Rights Reserved.
++ *
++ * If you wish your version of this file to be governed by only the CDDL
++ * or only the GPL Version 2, indicate your decision by adding
++ * "[Contributor] elects to include this software in this distribution
++ * under the [CDDL or GPL Version 2] license." If you do not indicate a
++ * single choice of license, a recipient has the option to distribute
++ * your version of this file under either the CDDL, the GPL Version 2 or
++ * to extend the choice of license to its licensees as provided above.
++ * However, if you add GPL Version 2 code and therefore, elected the GPL
++ * Version 2 license, then the option applies only if the new code is
++ * made subject to such option by the copyright holder.
+ */
+
+ package org.netbeans.modules.websvc.saas.services.strikeiron.ui;
+@@ -19,7 +54,6 @@
+ import javax.swing.event.ListSelectionListener;
+ import org.netbeans.api.progress.ProgressHandle;
+ import org.netbeans.api.progress.ProgressHandleFactory;
+-import org.netbeans.modules.websvc.saas.spi.ServiceData;
+ import org.netbeans.modules.websvc.saas.spi.websvcmgr.WsdlServiceData;
+ import org.netbeans.modules.websvc.saas.util.WsdlUtil;
+ import org.openide.util.Cancellable;
+@@ -30,7 +64,7 @@
+ * @author nam
+ */
+ public class FindServiceUI extends javax.swing.JPanel {
+-
++ private static final long serialVersionUID = 1L;
+ private ProgressHandle progressHandle;
+ private JComponent progressComponent;
+ private boolean jaxrpcWarned = false;
+@@ -208,8 +242,8 @@
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(bSearch)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
+- .add(progressContainerPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 277, Short.MAX_VALUE))
+- .add(org.jdesktop.layout.GroupLayout.TRAILING, spTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 580, Short.MAX_VALUE))
++ .add(progressContainerPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE))
++ .add(org.jdesktop.layout.GroupLayout.TRAILING, spTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 744, Short.MAX_VALUE))
+ .addContainerGap())
+ );
+ searchPanelLayout.setVerticalGroup(
+@@ -221,18 +255,12 @@
+ .add(bSearch, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(progressContainerPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+- .add(spTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 270, Short.MAX_VALUE)
++ .add(spTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
+ .addContainerGap())
+ );
+
+ tpTabs.addTab(org.openide.util.NbBundle.getMessage(FindServiceUI.class, "FindServiceUI.searchPanel.TabConstraints.tabTitle"), searchPanel); // NOI18N
+
+- settingsPanel.addMouseListener(new java.awt.event.MouseAdapter() {
+- public void mousePressed(java.awt.event.MouseEvent evt) {
+- settingsPanelMousePressed(evt);
+- }
+- });
+-
+ jlAuthenticationMode.setText(org.openide.util.NbBundle.getMessage(FindServiceUI.class, "FindServiceUI.jlAuthenticationMode.text")); // NOI18N
+
+ jlSortBy.setText(org.openide.util.NbBundle.getMessage(FindServiceUI.class, "FindServiceUI.jlSortBy.text")); // NOI18N
+@@ -262,8 +290,8 @@
+ .add(jlSortBy))
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(settingsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+- .add(cbSortBy, 0, 467, Short.MAX_VALUE)
+- .add(cbAuthenticationMode, 0, 467, Short.MAX_VALUE))
++ .add(cbSortBy, 0, 607, Short.MAX_VALUE)
++ .add(cbAuthenticationMode, 0, 607, Short.MAX_VALUE))
+ .addContainerGap())
+ );
+ settingsPanelLayout.setVerticalGroup(
+@@ -277,7 +305,7 @@
+ .add(settingsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(jlSortBy)
+ .add(cbSortBy, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+- .addContainerGap(249, Short.MAX_VALUE))
++ .addContainerGap(226, Short.MAX_VALUE))
+ );
+
+ tpTabs.addTab(org.openide.util.NbBundle.getMessage(FindServiceUI.class, "FindServiceUI.settingsPanel.TabConstraints.tabTitle"), settingsPanel); // NOI18N
+@@ -289,8 +317,6 @@
+ cancelButton.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
+
+ addButton.setText(org.openide.util.NbBundle.getMessage(FindServiceUI.class, "FindServiceUI.addButton.text")); // NOI18N
+- addButton.setActionCommand(org.openide.util.NbBundle.getMessage(FindServiceUI.class, "FindServiceUI.addButton.actionCommand")); // NOI18N
+- addButton.setLabel(org.openide.util.NbBundle.getMessage(FindServiceUI.class, "FindServiceUI.addButton.label")); // NOI18N
+ addButton.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
+@@ -300,12 +326,12 @@
+ .add(layout.createSequentialGroup()
+ .addContainerGap()
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+- .add(labelDescription, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 611, Short.MAX_VALUE)
+- .add(tpTabs, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 611, Short.MAX_VALUE)
++ .add(labelDescription, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 807, Short.MAX_VALUE)
++ .add(tpTabs, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 807, Short.MAX_VALUE)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
+- .add(statusMessage, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 449, Short.MAX_VALUE)
+- .add(16, 16, 16)
+- .add(addButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 67, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
++ .add(statusMessage, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 638, Short.MAX_VALUE)
++ .add(8, 8, 8)
++ .add(addButton)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
+ .add(cancelButton)))
+ .addContainerGap())
+@@ -350,10 +376,6 @@
+ getModel().setSortBy((SORTBY)cbSortBy.getSelectedItem());
+ }//GEN-LAST:event_cbSortByActionPerformed
+
+- private void settingsPanelMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_settingsPanelMousePressed
+- // TODO add your handling code here:
+- }//GEN-LAST:event_settingsPanelMousePressed
+-
+ private void tpTabsStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_tpTabsStateChanged
+ if (settingsPanel.isShowing()) {
+ addButton.setEnabled(false);
+diff -r 76d51071af8a -r af9499d919b8 websvc.saas.services.strikeiron/src/org/netbeans/modules/websvc/saas/services/strikeiron/ui/ServiceTableModel.java
+--- a/websvc.saas.services.strikeiron/src/org/netbeans/modules/websvc/saas/services/strikeiron/ui/ServiceTableModel.java Fri Nov 07 11:48:18 2008 +0100
++++ b/websvc.saas.services.strikeiron/src/org/netbeans/modules/websvc/saas/services/strikeiron/ui/ServiceTableModel.java Tue Mar 10 13:53:55 2009 +0300
+@@ -43,32 +43,22 @@
+
+ import com.strikeiron.search.AUTHENTICATIONSTYLE;
+ import com.strikeiron.search.ArrayOfMarketPlaceService;
+-import com.strikeiron.search.LicenseInfo;
+ import com.strikeiron.search.MarketPlaceService;
+-import com.strikeiron.search.ObjectFactory;
+-import com.strikeiron.search.RegisteredUser;
+-import com.strikeiron.search.SISearchService;
+-import com.strikeiron.search.SISearchServiceSoap;
+ import com.strikeiron.search.SORTBY;
+ import com.strikeiron.search.SearchOutPut;
+-//FIXME - Refactor
+-//import com.sun.xml.ws.developer.WSBindingProvider;
+ import java.io.File;
+ import java.io.FileInputStream;
+ import java.io.IOException;
+-import java.net.URL;
+ import java.util.ArrayList;
+ import java.util.EventListener;
+ import java.util.HashSet;
+ import java.util.List;
+ import java.util.Properties;
+ import java.util.Set;
+-import java.util.logging.Level;
+-import java.util.logging.Logger;
+ import javax.swing.event.ChangeEvent;
+ import javax.swing.table.DefaultTableModel;
+ import javax.xml.namespace.QName;
+-import org.netbeans.modules.websvc.saas.spi.ServiceData;
++import org.netbeans.modules.websvc.saas.services.strikeiron.StrikeIronSearch;
+ import org.netbeans.modules.websvc.saas.spi.websvcmgr.WsdlServiceData;
+ import org.netbeans.modules.websvc.saas.spi.websvcmgr.WsdlServiceProxyDescriptor;
+ import org.openide.util.NbBundle;
+@@ -79,6 +69,7 @@
+ * @author nam
+ */
+ public class ServiceTableModel extends DefaultTableModel {
++ private static final long serialVersionUID = 1L;
+ public static final QName SI_SEARCH_SERVICE = new QName("http://www.strikeiron.com", "SISearchService");
+ public static final String STRIKE_IRON_HOME = WsdlServiceProxyDescriptor.WEBSVC_HOME + "/strikeiron";
+ public static final String SEARCH_PROPERTIES = "search.properties";
+@@ -93,12 +84,11 @@
+ static final int COLUMN_SELECT = 0;
+
+ private String wsdlLocation;
+- private String userId = "Sun_Search@strikeiron.com";
+- private String password = "SearchSun.01";
++ private String userId;
++ private String password;
+ private AUTHENTICATIONSTYLE authenticationStyle = AUTHENTICATIONSTYLE.SIMPLE_PARAM;
+ private Boolean useCustomWSDL = Boolean.TRUE;
+ private SORTBY sortBy = SORTBY.NAME;
+- private SISearchService sservice;
+ private List extends WsdlServiceData> result;
+
+ private String status;
+@@ -149,27 +139,11 @@
+ public void setSortBy(SORTBY v) {
+ sortBy = v;
+ }
+-
+- private String getUserId() {
+- return userId;
+- }
+-
+- private String getPassword() {
+- return password;
+- }
+-
+- public String getSearchServiceUrl() {
+- return getWsdlLocation().toExternalForm();
+- }
+
+ public WsdlServiceData getService(int row) {
+ return result.get(row);
+ }
+
+- public static final String SEARCH_COMPLETE = "searchCompleted";
+- public static final String SEARCH_CANCELLED = "searchCancelled";
+- public static final String SEARCH_ERROR = "searchError";
+-
+ public interface SearchListener extends EventListener {
+ void searchCompleted(ChangeEvent e);
+ void serviceSelectionChanged(ChangeEvent e);
+@@ -228,18 +202,6 @@
+ return warnsOrErrors;
+ }
+
+- private URL getWsdlLocation() {
+- if (wsdlLocation == null) {
+- return null;
+- }
+- try {
+- return new URL(wsdlLocation);
+- } catch(Exception ex) {
+- Logger.global.log(Level.WARNING, ex.getLocalizedMessage(), ex);
+- return null;
+- }
+- }
+-
+ private List extends WsdlServiceData> convertResult(List rawResult) {
+ List converted = new ArrayList();
+ if (rawResult != null) {
+@@ -273,52 +235,31 @@
+ fireTableDataChanged();
+
+ try {
+- // init service only when needed to avoid unecessary internet access
+- if (sservice == null) {
+- URL url = getWsdlLocation();
+- if (url == null) {
+- sservice = new SISearchService();
+- } else {
+- sservice = new SISearchService(url, SI_SEARCH_SERVICE);
++ SearchOutPut output = StrikeIronSearch.search(userId, password,
++ searchTerm, sortBy, useCustomWSDL, authenticationStyle);
++ if (output != null) {
++ ArrayOfMarketPlaceService amps = output.getStrikeIronWebServices();
++ if (amps != null) {
++ result = convertResult(output.getStrikeIronWebServices().getMarketPlaceService());
++ }
++ if (output.getServiceStatus() != null) {
++ String msg = output.getServiceStatus().getStatusDescription();
++ if (msg == null || msg.trim().length() == 0 || msg.startsWith("Found")) { //NOI18N
++ setStatusMessage(NbBundle.getMessage(ServiceTableModel.class, "MSG_Found", result.size()));
++ } else {
++ setErrorMessage(NbBundle.getMessage(ServiceTableModel.class, "MSG_ERROR", msg));
++ }
+ }
+ }
+- SISearchServiceSoap port = sservice.getSISearchServiceSoap();
+- setHeaderParameters(port);
+- //FIXME - Refactor
+-// SearchOutPut output = port.search(searchTerm, sortBy, useCustomWSDL, authenticationStyle);
+-// if (output != null) {
+-// ArrayOfMarketPlaceService amps = output.getStrikeIronWebServices();
+-// if (amps != null) {
+-// result = convertResult(output.getStrikeIronWebServices().getMarketPlaceService());
+-// }
+-// }
+-// if (output != null && output.getServiceStatus() != null) {
+-// String msg = output.getServiceStatus().getStatusDescription();
+-// if (msg == null || msg.trim().length() == 0 || msg.startsWith("Found")) { //NOI18N
+-// setStatusMessage(NbBundle.getMessage(ServiceTableModel.class, "MSG_Found", result.size()));
+-// } else {
+-// setErrorMessage(NbBundle.getMessage(ServiceTableModel.class, "MSG_ERROR", msg));
+-// }
+-// }
+ fireTableDataChanged();
+ } catch (Exception ex) {
+ setErrorMessage(ex.getLocalizedMessage());
++ ex.printStackTrace();
+ } finally {
+ fireSearchEnded();
+ searchTask = null;
+ }
+ }
+-
+- private void setHeaderParameters(SISearchServiceSoap port) {
+- RegisteredUser ru = new RegisteredUser();
+- ru.setUserID(userId);
+- ru.setPassword(password);
+- LicenseInfo li = new LicenseInfo();
+- li.setRegisteredUser(ru);
+- //FIXME - Refactor
+-// WSBindingProvider bp = (WSBindingProvider) port;
+-// bp.setOutboundHeaders(new ObjectFactory().createLicenseInfo(li));
+- }
+
+ @Override
+ public int getColumnCount() {
+diff -r 76d51071af8a -r af9499d919b8 xml.text/nbproject/project.properties
+--- a/xml.text/nbproject/project.properties Fri Nov 07 11:48:18 2008 +0100
++++ b/xml.text/nbproject/project.properties Tue Mar 10 13:53:55 2009 +0300
+@@ -38,7 +38,7 @@
+ # made subject to such option by the copyright holder.
+
+ javac.source=1.5
+-spec.version.base=1.16.1
++spec.version.base=1.16.2
+
+ test.unit.cp.extra=${openide.dir}/core/openide.jar:${openide.loaders.dir}/core/openide-loaders.jar
+ test.unit.run.cp.extra=${test.unit.cp.extra}
+diff -r 76d51071af8a -r af9499d919b8 xml.text/src/org/netbeans/modules/xml/text/bracematch/XMLBraceMatcher.java
+--- a/xml.text/src/org/netbeans/modules/xml/text/bracematch/XMLBraceMatcher.java Fri Nov 07 11:48:18 2008 +0100
++++ b/xml.text/src/org/netbeans/modules/xml/text/bracematch/XMLBraceMatcher.java Tue Mar 10 13:53:55 2009 +0300
+@@ -50,6 +50,7 @@
+ import org.netbeans.api.xml.lexer.XMLTokenId;
+ import org.netbeans.spi.editor.bracesmatching.BracesMatcher;
+ import org.netbeans.spi.editor.bracesmatching.MatcherContext;
++import org.netbeans.spi.editor.bracesmatching.support.BracesMatcherSupport;
+
+ /**
+ * The brace matching algorithm is invokes by the brace matcher framework.
+@@ -74,11 +75,14 @@
+ private static final String DECLARATION_START = ""; //NOI18N
+
+- int searchOffset;
+- javax.swing.text.Document document;
++ private int searchOffset;
++ private javax.swing.text.Document document;
++ private MatcherContext context;
++ private BracesMatcher defaultMatcher;
+
+ public XMLBraceMatcher(MatcherContext context) {
+ this(context.getDocument(), context.getSearchOffset());
++ this.context = context;
+ }
+
+ //so that we could use it from unit test code
+@@ -93,12 +97,12 @@
+ return null;
+ }
+ //so that we could use this from unit tests
+- try {
+- return doFindOrigin();
+- } catch (Exception e) {
+- //do nothing
+- }
+- return null;
++ int[] origin = doFindOrigin();
++ if(origin != null)
++ return origin;
++
++ defaultMatcher = BracesMatcherSupport.defaultMatcher(context, -1, -1);
++ return defaultMatcher.findOrigin();
+ }
+
+ public int[] doFindOrigin() throws InterruptedException, BadLocationException {
+@@ -157,13 +161,12 @@
+ if (MatcherContext.isTaskCanceled()) {
+ return null;
+ }
+- try {
+- //so that we could use this from unit tests
+- return doFindMatches();
+- } catch (Exception e) {
+- //do nothing
++
++ if(defaultMatcher != null) {
++ return defaultMatcher.findMatches();
+ }
+- return null;
++
++ return doFindMatches();
+ }
+
+ public int[] doFindMatches() throws InterruptedException, BadLocationException {