# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/HgModuleConfig.java
--- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/HgModuleConfig.java Base (1.15)
+++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/HgModuleConfig.java Locally Modified (Based On 1.15)
@@ -76,7 +76,7 @@
private static final String RECENT_URL = "repository.recentURL"; // NOI18N
private static final String SHOW_CLONE_COMPLETED = "cloneCompleted.showCloneCompleted"; // NOI18N
- private static final String OPEN_CLONED_PROJECT = "cloneCompleted.openClonedProject"; // NOI18N
+ private static final String SET_MAIN_PROJECT = "cloneCompleted.setMainProject"; // NOI18N
private static final String URL_EXP = "annotator.urlExp"; // NOI18N
private static final String ANNOTATION_EXP = "annotator.annotationExp"; // NOI18N
@@ -104,8 +104,8 @@
return getPreferences().getBoolean(SHOW_CLONE_COMPLETED, true);
}
- public boolean getOpenClonedProject() {
- return getPreferences().getBoolean(OPEN_CLONED_PROJECT, true);
+ public boolean getSetMainProject() {
+ return getPreferences().getBoolean(SET_MAIN_PROJECT, true);
}
public Pattern [] getIgnoredFilePatterns() {
@@ -281,8 +281,8 @@
getPreferences().putBoolean(SHOW_CLONE_COMPLETED, bl);
}
- public void setOpenClonedProject(boolean bl) {
- getPreferences().putBoolean(OPEN_CLONED_PROJECT, bl);
+ public void setSetMainProject(boolean bl) {
+ getPreferences().putBoolean(SET_MAIN_PROJECT, bl);
}
public RepositoryConnection getRepositoryConnection(String url) {
Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/CloneAction.java
--- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/CloneAction.java Base (1.15)
+++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/CloneAction.java Locally Modified (Based On 1.15)
@@ -138,15 +138,9 @@
try {
FileObject cloneProj = FileUtil.toFileObject(clonePrjFile);
Project prj = projectManager.findProject(cloneProj);
- HgProjectUtils.openProject(prj, this);
- // TODO: figure out how to rename the cloned project
- // Following brings up Rename Project Dialog but not with correct settings
- // - thought the ctx was ok but must not be
- // HgProjectUtils.renameProject(prj);
-
+ HgProjectUtils.openProject(prj, this, HgModuleConfig.getDefault().getSetMainProject());
hg.versionedFilesChanged();
hg.refreshAllAnnotations();
- //HgUtils.forceStatusRefresh(cloneFolder);
} catch (java.lang.Exception ex) {
NotifyDescriptor.Exception e = new NotifyDescriptor.Exception(new HgException(ex.toString()));
@@ -189,9 +183,7 @@
FileObject cloneProj = FileUtil.toFileObject(clonePrjFile);
if (isLocalClone){
- if (HgModuleConfig.getDefault().getOpenClonedProject()) {
SwingUtilities.invokeLater(doOpenProject);
- }
} else if (HgModuleConfig.getDefault().getShowCloneCompleted()) {
CloneCompleted cc = new CloneCompleted(cloneFolder);
if (isCanceled()) {
Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/ClonePanel.form
--- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/ClonePanel.form Base (1.5)
+++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/ClonePanel.form Locally Modified (Based On 1.5)
@@ -24,7 +24,7 @@
-
+
@@ -34,7 +34,7 @@
-
+
@@ -70,7 +70,7 @@
-
+
@@ -133,7 +133,7 @@
-
+
Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/ClonePanel.java
--- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/ClonePanel.java Base (1.7)
+++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/ClonePanel.java Locally Modified (Based On 1.7)
@@ -69,11 +69,11 @@
repository = repo;
initComponents();
browseButton.addActionListener(this);
- openProjectCheckBox.addActionListener(this);
+ setMainCheckBox.addActionListener(this);
fromTextField.setText(repo.getAbsolutePath());
toTextField.setText(to.getParent());
toCloneField.setText(to.getName());
- openProjectCheckBox.setSelected(HgModuleConfig.getDefault().getOpenClonedProject());
+ setMainCheckBox.setSelected(HgModuleConfig.getDefault().getSetMainProject());
}
public String getOutputFileName() {
@@ -96,7 +96,7 @@
toNameLabel = new javax.swing.JLabel();
toCloneField = new javax.swing.JTextField();
destinationLabel = new javax.swing.JLabel();
- openProjectCheckBox = new javax.swing.JCheckBox();
+ setMainCheckBox = new javax.swing.JCheckBox();
fromLabel.setLabelFor(fromTextField);
org.openide.awt.Mnemonics.setLocalizedText(fromLabel, org.openide.util.NbBundle.getMessage(ClonePanel.class, "ClonePanel.fromLabel.text")); // NOI18N
@@ -113,7 +113,7 @@
org.openide.awt.Mnemonics.setLocalizedText(destinationLabel, org.openide.util.NbBundle.getMessage(ClonePanel.class, "destinationLabel.text")); // NOI18N
- org.openide.awt.Mnemonics.setLocalizedText(openProjectCheckBox, org.openide.util.NbBundle.getMessage(ClonePanel.class, "openCheckbox.text")); // NOI18N
+ org.openide.awt.Mnemonics.setLocalizedText(setMainCheckBox, org.openide.util.NbBundle.getMessage(ClonePanel.class, "openCheckbox.text")); // NOI18N
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
this.setLayout(layout);
@@ -128,13 +128,13 @@
.add(12, 12, 12)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(toNameLabel)
- .add(openProjectCheckBox)))
+ .add(setMainCheckBox)))
.add(layout.createSequentialGroup()
.add(12, 12, 12)
.add(toLabel)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(fromTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE)
+ .add(fromTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 253, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(toCloneField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 165, Short.MAX_VALUE)
@@ -162,7 +162,7 @@
.add(toCloneField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(toNameLabel))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(openProjectCheckBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(setMainCheckBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
}// //GEN-END:initComponents
@@ -171,8 +171,8 @@
public void actionPerformed(ActionEvent evt) {
if (evt.getSource() == browseButton) {
onBrowseClick();
- } else if (evt.getSource() == openProjectCheckBox) {
- HgModuleConfig.getDefault().setOpenClonedProject(openProjectCheckBox.isSelected());
+ } else if (evt.getSource() == setMainCheckBox) {
+ HgModuleConfig.getDefault().setSetMainProject(setMainCheckBox.isSelected());
}
}
@@ -247,7 +247,7 @@
private javax.swing.JLabel destinationLabel;
private javax.swing.JLabel fromLabel;
private javax.swing.JTextField fromTextField;
- private javax.swing.JCheckBox openProjectCheckBox;
+ private javax.swing.JCheckBox setMainCheckBox;
private javax.swing.JTextField toCloneField;
private javax.swing.JLabel toLabel;
private javax.swing.JLabel toNameLabel;
Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/HgProjectUtils.java
--- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/HgProjectUtils.java Base (1.8)
+++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/HgProjectUtils.java Locally Modified (Based On 1.8)
@@ -73,17 +73,14 @@
ctxAction.actionPerformed(new ActionEvent(caller, 0, "")); // NOI18N
}
- public static void openProject(Project p, Object caller) {
+ public static void openProject(Project p, Object caller, boolean setMain) {
Project[] projects = new Project[] {p};
OpenProjects.getDefault().open(projects, false);
+ if (setMain) {
OpenProjects.getDefault().setMainProject(p);
+ }
// set as main project and expand
-/* ContextAwareAction action = (ContextAwareAction) CommonProjectActions.setAsMainProjectAction();
- Lookup ctx = Lookups.singleton(p);
- Action ctxAction = action.createContextAwareInstance(ctx);
- ctxAction.actionPerformed(new ActionEvent(caller, 0, "")); // NOI18N
-*/
selectAndExpandProject(p);
}