Lines 19-24
Link Here
|
19 |
* Kevin Doyle (IBM) - [187083] Launch Shell action available on folders inside virtual files |
19 |
* Kevin Doyle (IBM) - [187083] Launch Shell action available on folders inside virtual files |
20 |
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible |
20 |
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible |
21 |
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared |
21 |
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared |
|
|
22 |
* Anna Dushistova (MontaVista) - [149285] [ssh] multiple prompts and errors in case of incorrect username |
22 |
********************************************************************************/ |
23 |
********************************************************************************/ |
23 |
|
24 |
|
24 |
package org.eclipse.rse.internal.shells.ui.actions; |
25 |
package org.eclipse.rse.internal.shells.ui.actions; |
Lines 29-34
Link Here
|
29 |
import org.eclipse.core.runtime.IProgressMonitor; |
30 |
import org.eclipse.core.runtime.IProgressMonitor; |
30 |
import org.eclipse.core.runtime.IStatus; |
31 |
import org.eclipse.core.runtime.IStatus; |
31 |
import org.eclipse.core.runtime.NullProgressMonitor; |
32 |
import org.eclipse.core.runtime.NullProgressMonitor; |
|
|
33 |
import org.eclipse.core.runtime.OperationCanceledException; |
32 |
import org.eclipse.core.runtime.Status; |
34 |
import org.eclipse.core.runtime.Status; |
33 |
import org.eclipse.core.runtime.jobs.Job; |
35 |
import org.eclipse.core.runtime.jobs.Job; |
34 |
import org.eclipse.jface.resource.ImageDescriptor; |
36 |
import org.eclipse.jface.resource.ImageDescriptor; |
Lines 123-128
Link Here
|
123 |
catch (SystemMessageException e) { |
125 |
catch (SystemMessageException e) { |
124 |
SystemMessageDialog.displayMessage(e); |
126 |
SystemMessageDialog.displayMessage(e); |
125 |
} |
127 |
} |
|
|
128 |
catch (OperationCanceledException e) { |
129 |
//do nothing--it's user's action |
130 |
} |
126 |
catch (Exception e) { |
131 |
catch (Exception e) { |
127 |
SystemBasePlugin.logError( |
132 |
SystemBasePlugin.logError( |
128 |
e.getLocalizedMessage()!=null ? e.getLocalizedMessage() : e.getClass().getName(), |
133 |
e.getLocalizedMessage()!=null ? e.getLocalizedMessage() : e.getClass().getName(), |
Lines 135-140
Link Here
|
135 |
public class PromptForPassword implements Runnable |
140 |
public class PromptForPassword implements Runnable |
136 |
{ |
141 |
{ |
137 |
public SubSystem _ss; |
142 |
public SubSystem _ss; |
|
|
143 |
private boolean connectionCancelled=false; |
138 |
public PromptForPassword(SubSystem ss) |
144 |
public PromptForPassword(SubSystem ss) |
139 |
{ |
145 |
{ |
140 |
_ss = ss; |
146 |
_ss = ss; |
Lines 148-156
Link Here
|
148 |
} |
154 |
} |
149 |
catch (Exception e) |
155 |
catch (Exception e) |
150 |
{ |
156 |
{ |
151 |
|
157 |
if(e instanceof OperationCanceledException){ |
|
|
158 |
setConnectionCancelled(true); |
159 |
} |
152 |
} |
160 |
} |
153 |
} |
161 |
} |
|
|
162 |
|
163 |
public void setConnectionCancelled(boolean connectionCancelled) { |
164 |
this.connectionCancelled = connectionCancelled; |
165 |
} |
166 |
|
167 |
public boolean isConnectionCancelled() { |
168 |
return connectionCancelled; |
169 |
} |
154 |
} |
170 |
} |
155 |
|
171 |
|
156 |
public class UpdateRegistry implements Runnable |
172 |
public class UpdateRegistry implements Runnable |
Lines 615-623
Link Here
|
615 |
{ |
631 |
{ |
616 |
|
632 |
|
617 |
Display dis = Display.getDefault(); |
633 |
Display dis = Display.getDefault(); |
618 |
dis.syncExec(new PromptForPassword(ss)); |
634 |
PromptForPassword passPrompt = new PromptForPassword(ss); |
619 |
ss.getConnectorService().connect(monitor); |
635 |
dis.syncExec(passPrompt); |
620 |
dis.asyncExec(new UpdateRegistry(ss)); |
636 |
if(!passPrompt.isConnectionCancelled()){ |
|
|
637 |
ss.getConnectorService().connect(monitor); |
638 |
dis.asyncExec(new UpdateRegistry(ss)); |
639 |
}else |
640 |
throw new OperationCanceledException(); |
621 |
} |
641 |
} |
622 |
return true; |
642 |
return true; |
623 |
} |
643 |
} |