From 44c60018da2e1e14ec6b2d0b0f2b01a71df104fc Mon Sep 17 00:00:00 2001 From: Mike Rennie Date: Tue, 16 Jul 2013 11:57:17 -0500 Subject: Bug 413095 - Clean up deprecation and code warnings --- .../ui/org/eclipse/debug/ui/InspectPopupDialog.java | 15 +++++++++++++-- .../debug/ui/actions/ImportBreakpointsOperation.java | 6 ++++-- 2 files changed, 17 insertions(+), 4 deletions(-) (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/ui') diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java index 90d5babe2..c0c71c341 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2012 IBM Corporation and others. + * Copyright (c) 2005, 2013 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 @@ -13,6 +13,8 @@ package org.eclipse.debug.ui; import java.util.List; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.model.IExpression; import org.eclipse.debug.internal.ui.DebugUIPlugin; @@ -50,6 +52,7 @@ import org.eclipse.ui.IViewPart; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPartSite; import org.eclipse.ui.PartInitException; +import org.osgi.service.prefs.BackingStoreException; /** * A DebugPopup that can be used to inspect an @@ -194,7 +197,15 @@ public class InspectPopupDialog extends DebugPopup { int[] weights = fSashForm.getWeights(); if (weights.length == 2){ String weightString = weights[0] + ":" + weights[1]; //$NON-NLS-1$ - DebugUIPlugin.getDefault().getPluginPreferences().setValue(PREF_INSPECT_POPUP_SASH_WEIGHTS, weightString); + IEclipsePreferences node = InstanceScope.INSTANCE.getNode(DebugUIPlugin.getUniqueIdentifier()); + if(node != null) { + node.put(PREF_INSPECT_POPUP_SASH_WEIGHTS, weightString); + try { + node.flush(); + } catch (BackingStoreException e) { + DebugUIPlugin.log(e); + } + } } } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java index 2599e5477..5e94b9d18 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2012 IBM Corporation and others. + * Copyright (c) 2005, 2013 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 @@ -182,7 +182,9 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { return; } attributes = collectBreakpointProperties(nodes[i]); - + if(attributes == null) { + continue; + } IResource resource; if(fImportBreakpoints) { resource = workspace.findMember((String) attributes.get(IImportExportConstants.IE_NODE_PATH)); -- cgit v1.2.3