mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 19:25:38 +02:00
Bug 485107: ensure correct adapter factory is being used
Ensure that the correct adapter factory is being used for each adapter type. Change-Id: Ibd401bb16c6320a49285cae4618a80a1bc318da3 Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
This commit is contained in:
parent
2469e0e117
commit
b2300cbcfe
3 changed files with 17 additions and 0 deletions
|
@ -152,6 +152,9 @@
|
||||||
</tab>
|
</tab>
|
||||||
</extension>
|
</extension>
|
||||||
<extension point="org.eclipse.core.runtime.adapters">
|
<extension point="org.eclipse.core.runtime.adapters">
|
||||||
|
<!-- Extenders providing their own subclass of GdbAdapterFactory must also extend GdbLaunch
|
||||||
|
and declare that the extended versions adapt to all of these types. See class comment in
|
||||||
|
GdbAdapterFactory for more details. -->
|
||||||
<factory
|
<factory
|
||||||
class="org.eclipse.cdt.dsf.gdb.internal.ui.GdbAdapterFactory"
|
class="org.eclipse.cdt.dsf.gdb.internal.ui.GdbAdapterFactory"
|
||||||
adaptableType="org.eclipse.cdt.dsf.gdb.launching.GdbLaunch">
|
adaptableType="org.eclipse.cdt.dsf.gdb.launching.GdbLaunch">
|
||||||
|
|
|
@ -40,6 +40,13 @@ import org.eclipse.debug.ui.contexts.ISuspendTrigger;
|
||||||
* for the launch object. But it also manages the creation and destruction
|
* for the launch object. But it also manages the creation and destruction
|
||||||
* of the session-based adapters which are returned by the
|
* of the session-based adapters which are returned by the
|
||||||
* IDMContext.getAdapter() methods.
|
* IDMContext.getAdapter() methods.
|
||||||
|
*
|
||||||
|
* When extending the GdbAdapterFactory, it is important to register all the
|
||||||
|
* types declaratively (in the plugin.xml) that the factory can adapt the
|
||||||
|
* extended launch to.
|
||||||
|
*
|
||||||
|
* See the plugin.xml that references GdbAdapterFactory for the current list,
|
||||||
|
* and it should match {@link #getAdapterList()}.
|
||||||
*/
|
*/
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
public class GdbAdapterFactory implements IAdapterFactory, ILaunchesListener2 {
|
public class GdbAdapterFactory implements IAdapterFactory, ILaunchesListener2 {
|
||||||
|
@ -126,6 +133,9 @@ public class GdbAdapterFactory implements IAdapterFactory, ILaunchesListener2 {
|
||||||
return adapterSet.getLaunchAdapter(adapterType);
|
return adapterSet.getLaunchAdapter(adapterType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This list must match the list in the plugin.xml. See class comment.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Class<?>[] getAdapterList() {
|
public Class<?>[] getAdapterList() {
|
||||||
return new Class<?>[] {
|
return new Class<?>[] {
|
||||||
|
|
|
@ -81,6 +81,10 @@
|
||||||
<adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory"/>
|
<adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory"/>
|
||||||
<adapter type="org.eclipse.debug.ui.contexts.ISuspendTrigger"/>
|
<adapter type="org.eclipse.debug.ui.contexts.ISuspendTrigger"/>
|
||||||
<adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory"/>
|
<adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory"/>
|
||||||
|
<adapter type="org.eclipse.debug.core.commands.ITerminateHandler"/>
|
||||||
|
<adapter type="org.eclipse.cdt.debug.core.model.IConnectHandler"/>
|
||||||
|
<adapter type="org.eclipse.debug.core.commands.IDisconnectHandler"/>
|
||||||
|
<adapter type="org.eclipse.cdt.debug.core.model.IDebugNewExecutableHandler"/>
|
||||||
</factory>
|
</factory>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue