use of com.collabnet.subversion.merge.wizards.DialogWizard in project subclipse by subclipse.
the class MergeConflictsCompareInput method handleExternalDispose.
public void handleExternalDispose() {
DialogWizard dialogWizard = new DialogWizard(DialogWizard.FINISHED_EDITING);
dialogWizard.setConflictDescriptor(conflictDescriptor);
MergeWizardDialog dialog = new MergeWizardDialog(Display.getDefault().getActiveShell(), dialogWizard);
dialog.open();
// resolved = dialogWizard.isConflictResolved();
resolution = dialogWizard.getResolution();
resolved = resolution != ISVNConflictResolver.Choice.postpone;
finished = true;
markResolved();
}
use of com.collabnet.subversion.merge.wizards.DialogWizard in project subclipse by subclipse.
the class MergeConflictsCompareInput method handleInternalDispose.
protected void handleInternalDispose() {
DialogWizard dialogWizard = new DialogWizard(DialogWizard.FINISHED_EDITING);
dialogWizard.setConflictDescriptor(conflictDescriptor);
MergeWizardDialog dialog = new MergeWizardDialog(Display.getDefault().getActiveShell(), dialogWizard);
dialog.open();
// resolved = dialogWizard.isConflictResolved();
resolution = dialogWizard.getResolution();
resolved = resolution != ISVNConflictResolver.Choice.postpone;
finished = true;
markResolved();
}
use of com.collabnet.subversion.merge.wizards.DialogWizard in project subclipse by subclipse.
the class SVNConflictResolver method finishEditing.
private void finishEditing(SVNConflictDescriptor descrip) {
DialogWizard dialogWizard = new DialogWizard(DialogWizard.FINISHED_EDITING);
dialogWizard.setConflictDescriptor(descrip);
MergeWizardDialog dialog = new MergeWizardDialog(Display.getDefault().getActiveShell(), dialogWizard);
dialog.open();
try {
copyFile(workingTempFile, mergedFile);
} catch (IOException e) {
e.printStackTrace();
}
// resolved = dialogWizard.isConflictResolved();
resolution = dialogWizard.getResolution();
// resolved = resolution != ISVNConflictResolver.Choice.postpone;
finished = true;
}
use of com.collabnet.subversion.merge.wizards.DialogWizard in project subclipse by subclipse.
the class ResumeMergeAction method run.
public void run(IAction action) {
DialogWizard dialogWizard = new DialogWizard(DialogWizard.RESUME_MERGE);
MergeWizardDialog dialog = new MergeWizardDialog(Display.getDefault().getActiveShell(), dialogWizard);
if (dialog.open() == MergeWizardDialog.CANCEL)
return;
Iterator iter = fSelection.iterator();
while (iter.hasNext()) {
Object selectedObject = iter.next();
if (selectedObject instanceof MergeOutput) {
MergeOutput mergeOutput = (MergeOutput) selectedObject;
mergeOutput.resume();
}
}
}
use of com.collabnet.subversion.merge.wizards.DialogWizard in project subclipse by subclipse.
the class UndoMergeAction method run.
public void run(IAction action) {
DialogWizard dialogWizard = new DialogWizard(DialogWizard.UNDO_MERGE_WARNING);
MergeWizardDialog dialog = new MergeWizardDialog(Display.getDefault().getActiveShell(), dialogWizard, true);
if (dialog.open() == MergeWizardDialog.CANCEL)
return;
final ArrayList resources = new ArrayList();
ArrayList mergeOutputs = new ArrayList();
Iterator iter = fSelection.iterator();
while (iter.hasNext()) {
Object object = iter.next();
if (object instanceof MergeOutput) {
MergeOutput mergeOutput = (MergeOutput) object;
mergeOutputs.add(mergeOutput);
IResource resource = mergeOutput.getResource();
resources.add(resource);
}
}
final IResource[] resourceArray = new IResource[resources.size()];
resources.toArray(resourceArray);
UndoMergeOperation undoMergeOperation = new UndoMergeOperation(MergeResultsView.getView(), resourceArray);
try {
undoMergeOperation.run();
} catch (Exception e) {
Activator.handleError(Messages.UndoMergeAction_error, e);
MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.UndoMergeAction_title, e.getMessage());
return;
}
iter = mergeOutputs.iterator();
while (iter.hasNext()) {
MergeOutput mergeOutput = (MergeOutput) iter.next();
mergeOutput.delete();
}
MergeResultsView.getView().refresh();
dialogWizard = new DialogWizard(DialogWizard.UNDO_MERGE_COMPLETED);
dialog = new MergeWizardDialog(Display.getDefault().getActiveShell(), dialogWizard, true);
if (dialog.open() == MergeWizardDialog.CANCEL)
return;
RevertAction revertAction = new RevertAction();
revertAction.setShowNothingToRevertMessage(false);
IStructuredSelection selection = new IStructuredSelection() {
public Object getFirstElement() {
return resourceArray[0];
}
public Iterator iterator() {
return toList().iterator();
}
public int size() {
return resourceArray.length;
}
public Object[] toArray() {
return resourceArray;
}
public List toList() {
return resources;
}
public boolean isEmpty() {
return resources.isEmpty();
}
};
revertAction.selectionChanged(null, selection);
revertAction.run(null);
}
Aggregations