diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog
index 08ec226b316..c5e3283ef3f 100644
--- a/debug/org.eclipse.cdt.debug.ui/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-15 Mikhail Khodjaiants
+ An ICDebuggerPage adapter is added to retain compatibility with old extensions.
+ + CDebuggerPageAdapter.java
+ * CDebugUIPlugin.java
+
2006-03-06 Mikhail Khodjaiants
Fix for Bug 93777: Postmortem and Local launch need a default preference for selected debugger.
* ICDebugHelpContextIds.java
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebuggerPageAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebuggerPageAdapter.java
new file mode 100644
index 00000000000..2dbde9d4d62
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebuggerPageAdapter.java
@@ -0,0 +1,165 @@
+/*******************************************************************************
+ * Copyright (c) 2004 QNX Software 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.internal.ui;
+
+import org.eclipse.cdt.debug.ui.ICDebuggerPage;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * Migration from AbstractLaunchConfigurationTab
to ICDebuggerPage
.
+ *
+ * @since 3.1
+ */
+public class CDebuggerPageAdapter implements ICDebuggerPage {
+
+ private ILaunchConfigurationTab fDelegate;
+ private String fDebuggerId;
+
+ /**
+ * Constructor for CDebuggerPageAdapter.
+ */
+ public CDebuggerPageAdapter( ILaunchConfigurationTab tab ) {
+ fDelegate = tab;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.ui.ICDebuggerPage#init(java.lang.String)
+ */
+ public void init( String debuggerID ) {
+ fDebuggerId = debuggerID;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.ui.ICDebuggerPage#getDebuggerIdentifier()
+ */
+ public String getDebuggerIdentifier() {
+ return fDebuggerId;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl( Composite parent ) {
+ fDelegate.createControl( parent );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getControl()
+ */
+ public Control getControl() {
+ return fDelegate.getControl();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ public void setDefaults( ILaunchConfigurationWorkingCopy configuration ) {
+ fDelegate.setDefaults( configuration );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ public void initializeFrom( ILaunchConfiguration configuration ) {
+ fDelegate.initializeFrom( configuration );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose()
+ */
+ public void dispose() {
+ fDelegate.dispose();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ public void performApply( ILaunchConfigurationWorkingCopy configuration ) {
+ fDelegate.performApply( configuration );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getErrorMessage()
+ */
+ public String getErrorMessage() {
+ return fDelegate.getErrorMessage();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getMessage()
+ */
+ public String getMessage() {
+ return fDelegate.getMessage();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ public boolean isValid( ILaunchConfiguration launchConfig ) {
+ return fDelegate.isValid( launchConfig );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#canSave()
+ */
+ public boolean canSave() {
+ return fDelegate.canSave();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setLaunchConfigurationDialog(org.eclipse.debug.ui.ILaunchConfigurationDialog)
+ */
+ public void setLaunchConfigurationDialog( ILaunchConfigurationDialog dialog ) {
+ fDelegate.setLaunchConfigurationDialog( dialog );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#launched(org.eclipse.debug.core.ILaunch)
+ */
+ public void launched( ILaunch launch ) {
+ fDelegate.launched( launch );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
+ */
+ public String getName() {
+ return fDelegate.getName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
+ */
+ public Image getImage() {
+ return fDelegate.getImage();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ public void activated( ILaunchConfigurationWorkingCopy workingCopy ) {
+ fDelegate.activated( workingCopy );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#deactivated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ public void deactivated( ILaunchConfigurationWorkingCopy workingCopy ) {
+ fDelegate.deactivated( workingCopy );
+ }
+}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java
index 44941b3fc67..313eaea135e 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java
@@ -18,6 +18,7 @@ import org.eclipse.cdt.debug.core.model.IModuleRetrieval;
import org.eclipse.cdt.debug.internal.ui.CBreakpointUpdater;
import org.eclipse.cdt.debug.internal.ui.CDebugImageDescriptorRegistry;
import org.eclipse.cdt.debug.internal.ui.CDebugModelPresentation;
+import org.eclipse.cdt.debug.internal.ui.CDebuggerPageAdapter;
import org.eclipse.cdt.debug.internal.ui.ColorManager;
import org.eclipse.cdt.debug.internal.ui.EvaluationContextManager;
import org.eclipse.cdt.debug.internal.ui.IInternalCDebugUIConstants;
@@ -35,6 +36,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.model.IPersistableSourceLocator;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.text.source.ISharedTextColors;
@@ -149,8 +151,15 @@ public class CDebugUIPlugin extends AbstractUIPlugin {
IConfigurationElement configElement = (IConfigurationElement)fDebuggerPageMap.get( debuggerID );
ICDebuggerPage tab = null;
if ( configElement != null ) {
- tab = (ICDebuggerPage)configElement.createExecutableExtension( "class" ); //$NON-NLS-1$
- tab.init( debuggerID );
+ Object o = configElement.createExecutableExtension( "class" ); //$NON-NLS-1$
+ if ( o instanceof ICDebuggerPage ) {
+ tab = (ICDebuggerPage)o;
+ tab.init( debuggerID );
+ }
+ else if ( o instanceof ILaunchConfigurationTab ) {
+ tab = new CDebuggerPageAdapter( (ILaunchConfigurationTab)o );
+ tab.init( debuggerID );
+ }
}
return tab;
}