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

[197841] "Terminate and Remove" should remove the shell from Scratchpad

This commit is contained in:
Kevin Doyle 2007-10-26 13:59:52 +00:00
parent 46c49d37c3
commit de09c1a031

View file

@ -20,6 +20,7 @@
* Kevin Doyle (IBM) - [193151] Scratchpad not updated on Move * Kevin Doyle (IBM) - [193151] Scratchpad not updated on Move
* Kevin Doyle (IBM) - [189421] Scratchpad not updated after Rename * Kevin Doyle (IBM) - [189421] Scratchpad not updated after Rename
* David McKnight (IBM) - [197860] drag and drop consistency - no text transfer * David McKnight (IBM) - [197860] drag and drop consistency - no text transfer
* Kevin Doyle (IBM) - [197841] "Terminate and Remove" should remove the shell from Scratchpad
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view.scratchpad; package org.eclipse.rse.internal.ui.view.scratchpad;
@ -389,21 +390,22 @@ public class SystemScratchpadView
} }
} }
break; break;
case ISystemResourceChangeEvents.EVENT_DELETE: case ISystemResourceChangeEvents.EVENT_DELETE:
case ISystemResourceChangeEvents.EVENT_DELETE_MANY: case ISystemResourceChangeEvents.EVENT_COMMAND_SHELL_REMOVED:
{ {
if (child instanceof ISystemFilterReference) deleteObject(child);
{ }
Widget w = findItem(child); break;
if (w != null) case ISystemResourceChangeEvents.EVENT_DELETE_MANY:
{ {
remove(child); Object[] multiSrc = event.getMultiSource();
SystemRegistryUI.getInstance().getSystemScratchPad().removeChild(child); if (multiSrc != null) {
} for (int i = 0; i < multiSrc.length; i++) {
} deleteObject(multiSrc[i]);
} }
break; }
}
break;
default : default :
break; break;
@ -449,7 +451,6 @@ public class SystemScratchpadView
String remoteResourceName = getRemoteResourceAbsoluteName(remoteResource); String remoteResourceName = getRemoteResourceAbsoluteName(remoteResource);
if (remoteResourceName == null) if (remoteResourceName == null)
return; return;
SystemScratchpadViewProvider provider = (SystemScratchpadViewProvider) getContentProvider();
switch (eventType) switch (eventType)
{ {
@ -500,12 +501,12 @@ public class SystemScratchpadView
{ {
for (int i = 0; i < remoteResourceNames.size(); i++) for (int i = 0; i < remoteResourceNames.size(); i++)
{ {
deleteRemoteObject(remoteResourceNames.get(i)); deleteObject(remoteResourceNames.get(i));
} }
} }
else else
{ {
deleteRemoteObject(remoteResource); deleteObject(remoteResource);
} }
/* /*
@ -1589,7 +1590,7 @@ public class SystemScratchpadView
/** /**
* Delete all occurrences of a given remote object * Delete all occurrences of a given remote object
*/ */
protected void deleteRemoteObject(Object deleteObject) protected void deleteObject(Object deleteObject)
{ {
// If deleteObject is a string find it's tree item and get it's data as thats what's // If deleteObject is a string find it's tree item and get it's data as thats what's
// stored inside the SystemScratchpad // stored inside the SystemScratchpad