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

[193155] Kevin's patch to check to see if element is IAdaptable

This commit is contained in:
David McKnight 2007-07-11 19:01:48 +00:00
parent 9c9e01baec
commit 0d8e25b58f

View file

@ -15,6 +15,7 @@
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Kevin Doyle (IBM) - [182403] Double Click on an object that can be expanded
* Kevin Doyle (IBM) - [195543] Double Clicking expands wrong folder when duplicate elements shown
* Kevin Doyle (IBM) - [193155] Double Clicking on a String in Scratchpad Errors
********************************************************************************/
package org.eclipse.rse.internal.ui.view.scratchpad;
@ -182,7 +183,7 @@ public class SystemScratchpadViewPart extends ViewPart
ITreeSelection s = (ITreeSelection) event.getSelection();
Object element = s.getFirstElement();
if (element == null)
if (element == null || !(element instanceof IAdaptable))
return;
ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) element).getAdapter(ISystemViewElementAdapter.class);