1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-15 04:55:22 +02:00

[216252] canceled --> cancelled in comments and locals

This commit is contained in:
Martin Oberhuber 2008-04-12 00:35:17 +00:00
parent 71fbaa7e47
commit 20598876f5
5 changed files with 109 additions and 105 deletions

View file

@ -114,7 +114,7 @@ public class TelnetConnectorService extends StandardConnectorService implements
return telnetSet; return telnetSet;
} }
public static void checkCanceled(IProgressMonitor monitor) { public static void checkCancelled(IProgressMonitor monitor) {
if (monitor.isCanceled()) if (monitor.isCanceled())
throw new OperationCanceledException(); throw new OperationCanceledException();
} }

View file

@ -15,7 +15,7 @@ package org.eclipse.rse.services.clientserver;
public class SystemOperationMonitor implements ISystemOperationMonitor public class SystemOperationMonitor implements ISystemOperationMonitor
{ {
private boolean canceled = false; private boolean cancelled = false;
private boolean done = false; private boolean done = false;
@ -31,13 +31,13 @@ public class SystemOperationMonitor implements ISystemOperationMonitor
public boolean isCancelled() public boolean isCancelled()
{ {
return canceled; return cancelled;
} }
public void setCancelled(boolean value) public void setCancelled(boolean value)
{ {
canceled = value; cancelled = value;
} }
} }

View file

@ -1199,8 +1199,8 @@ public class SystemZipHandler implements ISystemArchiveHandler
// if it is an empty zip file, no need to recreate it // if it is an empty zip file, no need to recreate it
if (!(vcList.length == 1) || !vcList[0].fullName.equals("")) //$NON-NLS-1$ if (!(vcList.length == 1) || !vcList[0].fullName.equals("")) //$NON-NLS-1$
{ {
boolean isCanceled = recreateZipDeleteEntries(vcList, dest, null, archiveOperationMonitor); boolean isCancelled = recreateZipDeleteEntries(vcList, dest, null, archiveOperationMonitor);
if (isCanceled) if (isCancelled)
{ {
dest.close(); dest.close();
if (!(outputTempFile == null)) outputTempFile.delete(); if (!(outputTempFile == null)) outputTempFile.delete();
@ -1319,8 +1319,8 @@ public class SystemZipHandler implements ISystemArchiveHandler
// if it is an empty zip file, no need to recreate it // if it is an empty zip file, no need to recreate it
if (!(vcList.length == 1) || !vcList[0].fullName.equals("")) //$NON-NLS-1$ if (!(vcList.length == 1) || !vcList[0].fullName.equals("")) //$NON-NLS-1$
{ {
boolean isCanceled = recreateZipDeleteEntries(vcList, dest, null, archiveOperationMonitor); boolean isCancelled = recreateZipDeleteEntries(vcList, dest, null, archiveOperationMonitor);
if (isCanceled) if (isCancelled)
{ {
dest.close(); dest.close();
if (!(outputTempFile == null)) if (!(outputTempFile == null))
@ -1751,8 +1751,8 @@ public class SystemZipHandler implements ISystemArchiveHandler
} }
// recreate the zip file without the omissions // recreate the zip file without the omissions
boolean isCanceled = recreateZipDeleteEntries(vcList, dest, omissions, archiveOperationMonitor); boolean isCancelled = recreateZipDeleteEntries(vcList, dest, omissions, archiveOperationMonitor);
if (isCanceled) if (isCancelled)
{ {
dest.close(); dest.close();
if (!(outputTempFile == null)) outputTempFile.delete(); if (!(outputTempFile == null)) outputTempFile.delete();
@ -1855,8 +1855,8 @@ public class SystemZipHandler implements ISystemArchiveHandler
HashSet omissions = new HashSet(); HashSet omissions = new HashSet();
omissions.add(fullVirtualName); omissions.add(fullVirtualName);
boolean isCanceled = recreateZipDeleteEntries(vcList, dest, omissions, archiveOperationMonitor); boolean isCancelled = recreateZipDeleteEntries(vcList, dest, omissions, archiveOperationMonitor);
if (isCanceled) if (isCancelled)
{ {
dest.close(); dest.close();
if (!(outputTempFile == null)) outputTempFile.delete(); if (!(outputTempFile == null)) outputTempFile.delete();
@ -1932,8 +1932,8 @@ public class SystemZipHandler implements ISystemArchiveHandler
VirtualChild[] vcList = getVirtualChildrenList(false, archiveOperationMonitor); VirtualChild[] vcList = getVirtualChildrenList(false, archiveOperationMonitor);
HashSet omissions = new HashSet(); HashSet omissions = new HashSet();
omissions.add(fullVirtualName); omissions.add(fullVirtualName);
boolean isCanceled = recreateZipDeleteEntries(vcList, dest, omissions, archiveOperationMonitor); boolean isCancelled = recreateZipDeleteEntries(vcList, dest, omissions, archiveOperationMonitor);
if (isCanceled) if (isCancelled)
{ {
dest.close(); dest.close();
if (!(outputTempFile == null)) outputTempFile.delete(); if (!(outputTempFile == null)) outputTempFile.delete();
@ -2054,11 +2054,11 @@ public class SystemZipHandler implements ISystemArchiveHandler
newOldNames.put(newFullVirtualName, fullVirtualName); newOldNames.put(newFullVirtualName, fullVirtualName);
} }
// find the entry to rename and rename it // find the entry to rename and rename it
boolean isCanceled = recreateZipRenameEntries(vcList, dest, oldNewNames, archiveOperationMonitor); boolean isCancelled = recreateZipRenameEntries(vcList, dest, oldNewNames, archiveOperationMonitor);
dest.close(); dest.close();
if (isCanceled) if (isCancelled)
{ {
if (!(outputTempFile == null)) outputTempFile.delete(); if (!(outputTempFile == null)) outputTempFile.delete();
if (closeZipFile) closeZipFile(); if (closeZipFile) closeZipFile();
@ -2228,8 +2228,8 @@ public class SystemZipHandler implements ISystemArchiveHandler
// if it is an empty zip file, no need to recreate it // if it is an empty zip file, no need to recreate it
if (!(vcList.length == 1) || !vcList[0].fullName.equals("")) //$NON-NLS-1$ if (!(vcList.length == 1) || !vcList[0].fullName.equals("")) //$NON-NLS-1$
{ {
boolean isCanceled = recreateZipDeleteEntries(vcList, dest, null, archiveOperationMonitor); boolean isCancelled = recreateZipDeleteEntries(vcList, dest, null, archiveOperationMonitor);
if (isCanceled) if (isCancelled)
{ {
dest.close(); dest.close();
if (!(outputTempFile == null)) outputTempFile.delete(); if (!(outputTempFile == null)) outputTempFile.delete();
@ -2752,8 +2752,8 @@ public class SystemZipHandler implements ISystemArchiveHandler
{ {
//String sourceName = name; //String sourceName = name;
HashSet children = new HashSet(); HashSet children = new HashSet();
boolean isCanceled = listAllFiles(file, children, archiveOperationMonitor); boolean isCancelled = listAllFiles(file, children, archiveOperationMonitor);
if (isCanceled) if (isCancelled)
{ {
return false; return false;
} }
@ -2840,8 +2840,8 @@ public class SystemZipHandler implements ISystemArchiveHandler
else else
{ {
HashSet children = new HashSet(); HashSet children = new HashSet();
boolean isCanceled = listAllFiles(file, children, archiveOperationMonitor); boolean isCancelled = listAllFiles(file, children, archiveOperationMonitor);
if (isCanceled) if (isCancelled)
{ {
return false; return false;
} }

View file

@ -159,7 +159,7 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
public class PromptForPassword implements Runnable public class PromptForPassword implements Runnable
{ {
public SubSystem _ss; public SubSystem _ss;
private boolean isCanceled = false; private boolean isCancelled = false;
public PromptForPassword(SubSystem ss) public PromptForPassword(SubSystem ss)
{ {
_ss = ss; _ss = ss;
@ -169,11 +169,11 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
{ {
try try
{ {
isCanceled = false; isCancelled = false;
_ss.promptForPassword(); _ss.promptForPassword();
} }
catch (InterruptedException e) { catch (InterruptedException e) {
isCanceled = true; isCancelled = true;
} }
catch (Exception e) catch (Exception e)
{ {
@ -181,8 +181,12 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
} }
} }
public boolean isCanceled() { /**
return isCanceled; * @since org.eclipse.rse.ui 3.0 renamed from isCanceled to isCancelled
* @return true if cancelled
*/
public boolean isCancelled() {
return isCancelled;
} }
} }
@ -233,10 +237,10 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
Display dis = Display.getDefault(); Display dis = Display.getDefault();
PromptForPassword prompter = new PromptForPassword(ss); PromptForPassword prompter = new PromptForPassword(ss);
dis.syncExec(prompter); dis.syncExec(prompter);
if (prompter.isCanceled()) { if (prompter.isCancelled()) {
SystemMessage canceledMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED); SystemMessage cancelledMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED);
SystemMessageObject canceledMessageObject = new SystemMessageObject(canceledMessage, ISystemMessageObject.MSGTYPE_CANCEL, _remoteObject); SystemMessageObject cancelledMessageObject = new SystemMessageObject(cancelledMessage, ISystemMessageObject.MSGTYPE_CANCEL, _remoteObject);
_collector.add(canceledMessageObject, monitor); _collector.add(cancelledMessageObject, monitor);
throw new InterruptedException(); throw new InterruptedException();
} }
try try

View file

@ -63,13 +63,13 @@ public class StandardCredentialsProvider extends AbstractCredentialsProvider {
* A runnable that will actually perform the prompting. * A runnable that will actually perform the prompting.
*/ */
private class PromptForCredentials implements Runnable { private class PromptForCredentials implements Runnable {
private boolean canceled = false; private boolean cancelled = false;
/** /**
* @return true if prompting was cancelled. * @return true if prompting was cancelled.
*/ */
public boolean isCanceled() { public boolean isCancelled() {
return canceled; return cancelled;
} }
/* (non-Javadoc) /* (non-Javadoc)
@ -95,15 +95,15 @@ public class StandardCredentialsProvider extends AbstractCredentialsProvider {
} catch (Exception e) { } catch (Exception e) {
logException(e); logException(e);
} }
canceled = dialog.wasCancelled(); cancelled = dialog.wasCancelled();
if (!canceled) { if (!cancelled) {
userId = dialog.getUserId(); userId = dialog.getUserId();
password = dialog.getPassword(); password = dialog.getPassword();
saveUserId = dialog.getIsUserIdChangePermanent(); saveUserId = dialog.getIsUserIdChangePermanent();
savePassword = dialog.getIsSavePassword(); savePassword = dialog.getIsSavePassword();
} }
} else { } else {
canceled = true; cancelled = true;
} }
} }
} }
@ -114,14 +114,14 @@ public class StandardCredentialsProvider extends AbstractCredentialsProvider {
*/ */
private class PromptForNewPassword implements Runnable { private class PromptForNewPassword implements Runnable {
private SystemMessage message; private SystemMessage message;
private boolean canceled = false; private boolean cancelled = false;
public PromptForNewPassword(SystemMessage message) { public PromptForNewPassword(SystemMessage message) {
this.message = message; this.message = message;
} }
public boolean isCancelled() { public boolean isCancelled() {
return canceled; return cancelled;
} }
public void run() { public void run() {
@ -130,13 +130,13 @@ public class StandardCredentialsProvider extends AbstractCredentialsProvider {
SystemChangePasswordDialog dlg = new SystemChangePasswordDialog(shell, getConnectorService().getHostName(), getUserId(), message); SystemChangePasswordDialog dlg = new SystemChangePasswordDialog(shell, getConnectorService().getHostName(), getUserId(), message);
dlg.setSavePassword(savePassword); dlg.setSavePassword(savePassword);
dlg.open(); dlg.open();
canceled = dlg.wasCancelled(); cancelled = dlg.wasCancelled();
if (!canceled) { if (!cancelled) {
password = dlg.getNewPassword(); password = dlg.getNewPassword();
savePassword = dlg.getIsSavePassword(); savePassword = dlg.getIsSavePassword();
} }
} else { } else {
canceled = true; cancelled = true;
} }
} }
} }
@ -398,7 +398,7 @@ public class StandardCredentialsProvider extends AbstractCredentialsProvider {
private void promptForCredentials() throws OperationCanceledException { private void promptForCredentials() throws OperationCanceledException {
PromptForCredentials runnable = new PromptForCredentials(); PromptForCredentials runnable = new PromptForCredentials();
Display.getDefault().syncExec(runnable); Display.getDefault().syncExec(runnable);
if (runnable.isCanceled()) { if (runnable.isCancelled()) {
throw new OperationCanceledException(); throw new OperationCanceledException();
} }
} }