mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 22:25:25 +02:00
[370007] potential NPEs in table-tree provider and remote resource dialog
This commit is contained in:
parent
af857b3c7f
commit
3850b5a12d
2 changed files with 14 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2002, 2011 IBM Corporation and others. All rights reserved.
|
||||
* Copyright (c) 2002, 2012 IBM Corporation and others. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||
* David McKnight (IBM) - [362700] SystemTableTreeViewProvider should not use context object in adapter call to get subsystem
|
||||
* David McKnight (IBM) - [370007] potential NPEs in table-tree provider and remote resource dialog
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.view;
|
||||
|
@ -199,13 +200,12 @@ public class SystemTableTreeViewProvider implements ILabelProvider, ITableLabelP
|
|||
{
|
||||
element = ((IContextObject)object).getModelObject();
|
||||
}
|
||||
|
||||
ISystemViewElementAdapter adapter = getAdapterFor(element);
|
||||
if (adapter != null)
|
||||
{
|
||||
|
||||
ISystemViewElementAdapter adapter = getAdapterFor(element);
|
||||
adapter.setViewer(_viewer);
|
||||
|
||||
|
||||
|
||||
|
||||
if (adapter.hasChildren((IAdaptable)element))
|
||||
{
|
||||
if (supportsDeferredQueries())
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2012 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -18,6 +18,7 @@
|
|||
* Xuan Chen (IBM) - [220999] [api] Need to change class SystemSelectRemoteFileAction to use SystemRemoteFileDialog
|
||||
* David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
|
||||
* David McKnight (IBM) - [267061] resource dialog/form to allow custom host combo label
|
||||
* David McKnight (IBM) - [370007] potential NPEs in table-tree provider and remote resource dialog
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.ui.dialogs;
|
||||
|
@ -64,7 +65,9 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog
|
|||
{
|
||||
_form = new SystemResourceSelectionForm(getShell(), parent, this, _inputProvider, getVerbiage(), _multipleSelectionMode, getMessageLine());
|
||||
initForm();
|
||||
_form.setPreSelection(_preSelection);
|
||||
if (_preSelection != null){
|
||||
_form.setPreSelection(_preSelection);
|
||||
}
|
||||
createMessageLine(parent);
|
||||
return _form.getInitialFocusControl();
|
||||
}
|
||||
|
@ -91,7 +94,9 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog
|
|||
_form.applyViewerFilter(getViewerFilter());
|
||||
}
|
||||
_form.setSelectionValidator(_selectionValidator);
|
||||
_form.setPreSelection(_preSelection);
|
||||
if (_preSelection != null){
|
||||
_form.setPreSelection(_preSelection);
|
||||
}
|
||||
_form.setShowPropertySheet(_showPropertySheet);
|
||||
_form.setSelectionTreeToolTipText(getTreeTip());
|
||||
if (_message != null)
|
||||
|
|
Loading…
Add table
Reference in a new issue