Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debug/org.eclipse.cdt.debug.ui/ChangeLog8
-rw-r--r--debug/org.eclipse.cdt.debug.ui/schema/CDebuggerPage.exsd2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/AbstractCDebuggerPage.java36
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java8
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/ICDebuggerPage.java36
-rw-r--r--launch/org.eclipse.cdt.launch/ChangeLog5
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/AbstractCDebuggerTab.java24
7 files changed, 102 insertions, 17 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog
index d91218a48bf..a555cea5695 100644
--- a/debug/org.eclipse.cdt.debug.ui/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog
@@ -1,3 +1,11 @@
+2006-02-03 Mikhail Khodjaiants
+ The "ICDebuggerPage" interface and "AbstractCDebuggerPage" class are added.
+ All extensions of the "CDebuggerPage" extension point must implement "ICDebuggerPage".
+ * CDebuggerPage.exsd
+ + AbstractCDebuggerPage.java
+ * CDebugUIPlugin.java
+ + ICDebuggerPage.java
+
2006-01-27 Mikhail Khodjaiants
Bug 125561: ClassCastException in Modules view.
* ModulesView.java
diff --git a/debug/org.eclipse.cdt.debug.ui/schema/CDebuggerPage.exsd b/debug/org.eclipse.cdt.debug.ui/schema/CDebuggerPage.exsd
index fd47f0e3f21..55079d52fed 100644
--- a/debug/org.eclipse.cdt.debug.ui/schema/CDebuggerPage.exsd
+++ b/debug/org.eclipse.cdt.debug.ui/schema/CDebuggerPage.exsd
@@ -64,7 +64,7 @@
specifies a fully qualified name of a Java class that implements <code>AbstractLaunchConfigurationTab</code>
</documentation>
<appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.debug.ui.AbstractLaunchConfigurationTab"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.cdt.debug.ui.ICDebuggerPage"/>
</appInfo>
</annotation>
</attribute>
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/AbstractCDebuggerPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/AbstractCDebuggerPage.java
new file mode 100644
index 00000000000..c76ebcbef4d
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/AbstractCDebuggerPage.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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.ui;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+
+/**
+ * Common function for debugger pages.
+ * @since 3.1
+ */
+abstract public class AbstractCDebuggerPage extends AbstractLaunchConfigurationTab implements ICDebuggerPage {
+
+ private String fDebuggerID = null;
+
+ /* (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;
+ }
+}
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 3f3532a9e73..a5964229d09 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
@@ -30,7 +30,6 @@ 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.swt.graphics.Color;
@@ -135,14 +134,15 @@ public class CDebugUIPlugin extends AbstractUIPlugin {
log( new Status( IStatus.ERROR, getUniqueIdentifier(), IInternalCDebugUIConstants.INTERNAL_ERROR, message, null ) );
}
- public ILaunchConfigurationTab getDebuggerPage( String debuggerID ) throws CoreException {
+ public ICDebuggerPage getDebuggerPage( String debuggerID ) throws CoreException {
if ( fDebuggerPageMap == null ) {
initializeDebuggerPageMap();
}
IConfigurationElement configElement = (IConfigurationElement)fDebuggerPageMap.get( debuggerID );
- ILaunchConfigurationTab tab = null;
+ ICDebuggerPage tab = null;
if ( configElement != null ) {
- tab = (ILaunchConfigurationTab)configElement.createExecutableExtension( "class" ); //$NON-NLS-1$
+ tab = (ICDebuggerPage)configElement.createExecutableExtension( "class" ); //$NON-NLS-1$
+ tab.init( debuggerID );
}
return tab;
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/ICDebuggerPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/ICDebuggerPage.java
new file mode 100644
index 00000000000..9bc8acdc67e
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/ICDebuggerPage.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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.ui;
+
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+
+/**
+ * Interface for debugger pages contributed via the "CDebuggerPage"
+ * extension point.
+ *
+ * @since 3.1
+ */
+public interface ICDebuggerPage extends ILaunchConfigurationTab {
+
+ /**
+ * Allows the page to initialize itself after being created.
+ * This lifecycle method is called after the page has been created
+ * and before any other method of the page is called.
+ *
+ * @param debuggerID the identifier of the debugger this page is created for.
+ */
+ public void init( String debuggerID );
+
+ /**
+ * Returns the identifier of the debugger this page is associated with.
+ */
+ public String getDebuggerIdentifier();
+}
diff --git a/launch/org.eclipse.cdt.launch/ChangeLog b/launch/org.eclipse.cdt.launch/ChangeLog
index c14f47922f5..c44944912e3 100644
--- a/launch/org.eclipse.cdt.launch/ChangeLog
+++ b/launch/org.eclipse.cdt.launch/ChangeLog
@@ -1,3 +1,8 @@
+2006-02-03 Mikhail Khodjaiants
+ The "ICDebuggerPage" interface and "AbstractCDebuggerPage" class are added.
+ All extensions of the "CDebuggerPage" extension point must implement "ICDebuggerPage".
+ * AbstractCLaunchDelegate.java
+
2006-01-30 Mikhail Khodjaiants
Bug 124519: CDT launch shortcuts ignore Common Tabs "Launch in background" option.
Applied patch from Andrew Ferguson (andrew.ferguson@arm.com).
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/AbstractCDebuggerTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/AbstractCDebuggerTab.java
index 2f49e703047..3ffe6e9956c 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/AbstractCDebuggerTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/AbstractCDebuggerTab.java
@@ -15,11 +15,11 @@ import java.util.Map;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.core.ICDebugConfiguration;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
+import org.eclipse.cdt.debug.ui.ICDebuggerPage;
import org.eclipse.cdt.launch.ui.CLaunchConfigurationTab;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -39,7 +39,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
protected ICDebugConfiguration fCurrentDebugConfig;
// Dynamic Debugger UI widgets
- protected ILaunchConfigurationTab fDynamicTab;
+ protected ICDebuggerPage fDynamicTab;
protected Composite fDynamicTabHolder;
private boolean fInitDefaults;
private Combo fDCombo;
@@ -54,11 +54,11 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
return fCurrentDebugConfig;
}
- protected ILaunchConfigurationTab getDynamicTab() {
+ protected ICDebuggerPage getDynamicTab() {
return fDynamicTab;
}
- protected void setDynamicTab(ILaunchConfigurationTab tab) {
+ protected void setDynamicTab(ICDebuggerPage tab) {
fDynamicTab = tab;
}
@@ -94,7 +94,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
* @see ILaunchConfigurationTab#getErrorMessage()
*/
public String getErrorMessage() {
- ILaunchConfigurationTab tab = getDynamicTab();
+ ICDebuggerPage tab = getDynamicTab();
if ( (super.getErrorMessage() != null) || (tab == null)) {
return super.getErrorMessage();
}
@@ -157,7 +157,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
if (debugConfig == null) {
setDynamicTab(null);
} else {
- ILaunchConfigurationTab tab = null;
+ ICDebuggerPage tab = null;
try {
tab = CDebugUIPlugin.getDefault().getDebuggerPage(debugConfig.getID());
} catch (CoreException e) {
@@ -179,7 +179,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
abstract public void createControl(Composite parent);
public void activated(ILaunchConfigurationWorkingCopy workingCopy) {
- ILaunchConfigurationTab dynamicTab = getDynamicTab();
+ ICDebuggerPage dynamicTab = getDynamicTab();
if (dynamicTab != null) {
dynamicTab.activated(workingCopy);
}
@@ -187,7 +187,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
public void initializeFrom(ILaunchConfiguration config) {
setLaunchConfiguration(config);
- ILaunchConfigurationTab dynamicTab = getDynamicTab();
+ ICDebuggerPage dynamicTab = getDynamicTab();
if (dynamicTab != null) {
dynamicTab.initializeFrom(config);
}
@@ -196,7 +196,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
public void performApply(ILaunchConfigurationWorkingCopy config) {
if (getDebugConfig() != null) {
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, getDebugConfig().getID());
- ILaunchConfigurationTab dynamicTab = getDynamicTab();
+ ICDebuggerPage dynamicTab = getDynamicTab();
if (dynamicTab == null) {
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, (Map)null);
} else {
@@ -207,7 +207,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
public void setDefaults(ILaunchConfigurationWorkingCopy config) {
setLaunchConfigurationWorkingCopy(config);
- ILaunchConfigurationTab dynamicTab = getDynamicTab();
+ ICDebuggerPage dynamicTab = getDynamicTab();
if (dynamicTab != null) {
dynamicTab.setDefaults(config);
setInitializeDefault(false);
@@ -222,7 +222,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
return false;
}
- ILaunchConfigurationTab dynamicTab = getDynamicTab();
+ ICDebuggerPage dynamicTab = getDynamicTab();
if (dynamicTab != null) {
return dynamicTab.isValid(config);
}
@@ -322,7 +322,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
}
/**
- * Return the class that implements <code>ILaunchConfigurationTab</code>
+ * Return the class that implements <code>ICDebuggerPage</code>
* that is registered against the debugger id of the currently selected
* debugger.
*/

Back to the top