Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 90943 Details for
Bug 208022
[Apply Patch] cancel save modified resource does not cancel apply patch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
utilize return value of saveEditors
clipboard.txt (text/plain), 2.29 KB, created by
Benjamin Muskalla
on 2008-02-27 17:48:06 EST
(
hide
)
Description:
utilize return value of saveEditors
Filename:
MIME Type:
Creator:
Benjamin Muskalla
Created:
2008-02-27 17:48:06 EST
Size:
2.29 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.compare >Index: compare/org/eclipse/compare/patch/ApplyPatchOperation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/compare/org/eclipse/compare/patch/ApplyPatchOperation.java,v >retrieving revision 1.10 >diff -u -r1.10 ApplyPatchOperation.java >--- compare/org/eclipse/compare/patch/ApplyPatchOperation.java 16 Mar 2007 19:53:11 -0000 1.10 >+++ compare/org/eclipse/compare/patch/ApplyPatchOperation.java 27 Feb 2008 22:44:51 -0000 >@@ -139,19 +139,18 @@ > * This method must be called from the UI thread. > */ > public void openWizard() { >- >- saveAllEditors(); >- >- PatchWizard wizard = new PatchWizard(patch, target, configuration); >- if (patchWizardImage != null) >- wizard.setDefaultPageImageDescriptor(patchWizardImage); >- if (patchWizardTitle != null) >- wizard.setWindowTitle(patchWizardTitle); >- wizard.setNeedsProgressMonitor(true); >- >- PatchWizardDialog dialog = new PatchWizardDialog(getShell(), wizard); >- wizard.setDialog(dialog); >- dialog.open(); >+ if(saveAllEditors()) { >+ PatchWizard wizard = new PatchWizard(patch, target, configuration); >+ if (patchWizardImage != null) >+ wizard.setDefaultPageImageDescriptor(patchWizardImage); >+ if (patchWizardTitle != null) >+ wizard.setWindowTitle(patchWizardTitle); >+ wizard.setNeedsProgressMonitor(true); >+ >+ PatchWizardDialog dialog = new PatchWizardDialog(getShell(), wizard); >+ wizard.setDialog(dialog); >+ dialog.open(); >+ } > } > > /** >@@ -170,9 +169,13 @@ > * This method will save all dirty editors. It will prompt the user if the Compare preference to save > * dirty editors before viewing a patch is <code>false</code>. Clients can use this or provide their own > * implementation. >+ * >+ * @return <code>true</code> if the command succeeded, and >+ * <code>false</code> if the operation was canceled by the user or >+ * an error occurred while saving > */ >- protected void saveAllEditors(){ >- IDE.saveAllEditors(new IResource[]{ResourcesPlugin.getWorkspace().getRoot()}, !ComparePreferencePage.getSaveAllEditors()); >+ protected boolean saveAllEditors(){ >+ return IDE.saveAllEditors(new IResource[]{ResourcesPlugin.getWorkspace().getRoot()}, !ComparePreferencePage.getSaveAllEditors()); > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 208022
: 90943 |
90944
|
91169