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

[235164] SystemView should allow to create filter in disconnected mode

This commit is contained in:
David McKnight 2008-06-03 13:11:02 +00:00
parent 9544b8dda9
commit 108c2a6158

View file

@ -18,6 +18,7 @@
* David Dykstal (IBM) - [189483] add notification when canceling password prompting * David Dykstal (IBM) - [189483] add notification when canceling password prompting
* David McKnight (IBM) - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE * David McKnight (IBM) - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
* David McKnight (IBM) - [231964] [ssh] SSH login dialog appears twice after cancel, when doing Refresh on a node * David McKnight (IBM) - [231964] [ssh] SSH login dialog appears twice after cancel, when doing Refresh on a node
* David McKnight (IBM) - [235164] SystemView should allow to create filter in disconnected mode
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.ui.operations; package org.eclipse.rse.ui.operations;
@ -230,9 +231,11 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
protected void execute(IProgressMonitor monitor) throws Exception, InterruptedException protected void execute(IProgressMonitor monitor) throws Exception, InterruptedException
{ {
SubSystem ss = null; SubSystem ss = null;
Object actualRemoteObj = _remoteObject;
if (_remoteObject instanceof IContextObject) if (_remoteObject instanceof IContextObject)
{ {
ss = (SubSystem)((IContextObject)_remoteObject).getSubSystem(); ss = (SubSystem)((IContextObject)_remoteObject).getSubSystem();
actualRemoteObj = ((IContextObject)_remoteObject).getModelObject();
} }
else else
{ {
@ -241,9 +244,19 @@ public class SystemFetchOperation extends JobChangeAdapter implements IRunnableW
if (ss.isOffline() ){ if (ss.isOffline() ){
return; return;
} }
boolean isPromptable = false;
if (actualRemoteObj instanceof IAdaptable){
ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)actualRemoteObj).getAdapter(ISystemViewElementAdapter.class);
if (adapter != null){
isPromptable = adapter.isPromptable(actualRemoteObj);
}
}
synchronized (ss.getConnectorService()) synchronized (ss.getConnectorService())
{ {
if (!ss.isConnected()) if (!ss.isConnected() && !isPromptable)
{ {
Display dis = Display.getDefault(); Display dis = Display.getDefault();