From 0152c28c22dd8950baf8c857c2ca19275cf39a06 Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Thu, 24 Apr 2014 14:17:48 +0200 Subject: [PATCH] Bug 433308 - Always show the Common page initially for new breakpoints --- .../breakpoints/AbstractToggleBreakpointAdapter.java | 7 ++++++- .../breakpoints/CBreakpointPropertyDialogAction.java | 11 ++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/AbstractToggleBreakpointAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/AbstractToggleBreakpointAdapter.java index 8ca7acd4264..6ec0228d919 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/AbstractToggleBreakpointAdapter.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/AbstractToggleBreakpointAdapter.java @@ -834,7 +834,12 @@ abstract public class AbstractToggleBreakpointAdapter .getContextService(part.getSite().getWorkbenchWindow()).getActiveContext(part.getSite().getId()); CBreakpointContext bpContext = new CBreakpointContext(bp, debugContext, resource, attributes); - PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn(part.getSite().getShell(), bpContext, null, + String initialPageId = null; + if (bp.getMarker() == null) { + // Bug 433308 - Always show Common page initially for new breakpoints + initialPageId = CBreakpointPropertyDialogAction.PAGE_ID_COMMON; + } + PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn(part.getSite().getShell(), bpContext, initialPageId , null, null); if (dialog != null) { dialog.open(); diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CBreakpointPropertyDialogAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CBreakpointPropertyDialogAction.java index 461c050d625..5d3d85c722f 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CBreakpointPropertyDialogAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/CBreakpointPropertyDialogAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems and others. + * Copyright (c) 2012, 2014 Wind River Systems 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 @@ -59,7 +59,7 @@ public class CBreakpointPropertyDialogAction extends SelectionProviderAction { private IDebugContextProvider fDebugContextProvider; - private static final String PAGE_ID_COMMON = "org.eclipse.cdt.debug.ui.propertypages.breakpoint.common"; //$NON-NLS-1$ + static final String PAGE_ID_COMMON = "org.eclipse.cdt.debug.ui.propertypages.breakpoint.common"; //$NON-NLS-1$ public CBreakpointPropertyDialogAction(IShellProvider shell, ISelectionProvider selectionProvider, IDebugContextProvider debugContextProvider) { super(selectionProvider, WorkbenchMessages.PropertyDialog_text); @@ -190,7 +190,12 @@ public class CBreakpointPropertyDialogAction extends SelectionProviderAction { if (ss.isEmpty()) return null; - return PreferencesUtil.createPropertyDialogOn(fShellProvider.getShell(), bpContext, null, null, null); + String initialPageId = null; + if (bpContext.getBreakpoint().getMarker() == null) { + // Bug 433308 - Always show Common page initially for new breakpoints + initialPageId = PAGE_ID_COMMON; + } + return PreferencesUtil.createPropertyDialogOn(fShellProvider.getShell(), bpContext, initialPageId, null, null); }