Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 108683 Details for
Bug 241985
[services] Service factory should be used to create ICommandControl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Use of variable number of arguments
zpatch.txt (text/plain), 6.42 KB, created by
Marc Khouzam
on 2008-07-29 14:37:05 EDT
(
hide
)
Description:
Use of variable number of arguments
Filename:
MIME Type:
Creator:
Marc Khouzam
Created:
2008-07-29 14:37:05 EDT
Size:
6.42 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.dd.gdb >Index: src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControl.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.dd.dsf/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControl.java,v >retrieving revision 1.19 >diff -u -r1.19 GDBControl.java >--- src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControl.java 29 Jul 2008 18:25:42 -0000 1.19 >+++ src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControl.java 29 Jul 2008 18:32:02 -0000 >@@ -114,13 +114,9 @@ > private MIInferiorProcess fInferiorProcess = null; > > private PTY fPty; >- >- public GDBControl(DsfSession session) { >- super(session); >- fControlDmc = new GDBControlDMContext(session.getId(), "gdbcontrol[" + ++fgInstanceCounter + "]"); //$NON-NLS-1$ //$NON-NLS-2$ >- } > >- public void initData(ILaunchConfiguration config) { >+ public GDBControl(DsfSession session, ILaunchConfiguration config) { >+ super(session); > fSessionType = LaunchUtils.getSessionType(config); > fAttach = LaunchUtils.getIsAttach(config); > fGdbPath = LaunchUtils.getGDBPath(config); >@@ -129,6 +125,7 @@ > } catch (CoreException e) { > fExecPath = new Path(""); //$NON-NLS-1$ > } >+ fControlDmc = new GDBControlDMContext(session.getId(), "gdbcontrol[" + ++fgInstanceCounter + "]"); //$NON-NLS-1$ //$NON-NLS-2$ > } > > @Deprecated >Index: src/org/eclipse/dd/gdb/internal/provisional/service/GdbDebugServicesFactory.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.dd.dsf/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/service/GdbDebugServicesFactory.java,v >retrieving revision 1.3 >diff -u -r1.3 GdbDebugServicesFactory.java >--- src/org/eclipse/dd/gdb/internal/provisional/service/GdbDebugServicesFactory.java 27 Jul 2008 19:12:00 -0000 1.3 >+++ src/org/eclipse/dd/gdb/internal/provisional/service/GdbDebugServicesFactory.java 29 Jul 2008 18:32:02 -0000 >@@ -34,6 +34,7 @@ > import org.eclipse.dd.mi.service.MIModules; > import org.eclipse.dd.mi.service.MIRegisters; > import org.eclipse.dd.mi.service.MIStack; >+import org.eclipse.debug.core.ILaunchConfiguration; > > public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory { > >@@ -47,10 +48,17 @@ > > @Override > @SuppressWarnings("unchecked") >- public <V> V createService(DsfSession session, Class<V> clazz) { >- if (MIBreakpointsManager.class.isAssignableFrom(clazz)) { >+ public <V> V createService(DsfSession session, Class<V> clazz, Object ... arguments) { >+ if (MIBreakpointsManager.class.isAssignableFrom(clazz)) { > return (V)createBreakpointManagerService(session); >- } >+ } else if (ICommandControl.class.isAssignableFrom(clazz)) { >+ for (Object arg : arguments) { >+ if (arg instanceof ILaunchConfiguration) { >+ return (V)createCommandControl(session, (ILaunchConfiguration)arg); >+ } >+ } >+ } >+ > > return super.createService(session, clazz); > } >@@ -64,9 +72,8 @@ > return new MIBreakpoints(session); > } > >- @Override >- protected ICommandControl createCommandControl(DsfSession session) { >- return new GDBControl(session); >+ protected ICommandControl createCommandControl(DsfSession session, ILaunchConfiguration config) { >+ return new GDBControl(session, config); > } > > @Override >Index: src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.dd.dsf/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java,v >retrieving revision 1.12 >diff -u -r1.12 ServicesLaunchSequence.java >--- src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java 29 Jul 2008 18:25:42 -0000 1.12 >+++ src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java 29 Jul 2008 18:32:02 -0000 >@@ -40,8 +40,7 @@ > // > // Create the connection. > // >- fCommandControl = fLaunch.getServiceFactory().createService(fSession, GDBControl.class); >- fCommandControl.initData(fLaunch.getLaunchConfiguration()); >+ fCommandControl = fLaunch.getServiceFactory().createService(fSession, GDBControl.class, fLaunch.getLaunchConfiguration()); > fCommandControl.initialize(requestMonitor); > } > }, >#P org.eclipse.dd.dsf.debug >Index: src/org/eclipse/dd/dsf/debug/service/AbstractDsfDebugServicesFactory.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.dd.dsf/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/AbstractDsfDebugServicesFactory.java,v >retrieving revision 1.3 >diff -u -r1.3 AbstractDsfDebugServicesFactory.java >--- src/org/eclipse/dd/dsf/debug/service/AbstractDsfDebugServicesFactory.java 24 Jul 2008 16:19:28 -0000 1.3 >+++ src/org/eclipse/dd/dsf/debug/service/AbstractDsfDebugServicesFactory.java 29 Jul 2008 18:32:03 -0000 >@@ -16,7 +16,7 @@ > public abstract class AbstractDsfDebugServicesFactory implements IDsfDebugServicesFactory { > > @SuppressWarnings("unchecked") >- public <V> V createService(DsfSession session, Class<V> clazz) { >+ public <V> V createService(DsfSession session, Class<V> clazz, Object ... arguments) { > if (IBreakpoints.class.isAssignableFrom(clazz)) { > return (V)createBreakpointService(session); > } else if (ICommandControl.class.isAssignableFrom(clazz)) { >Index: src/org/eclipse/dd/dsf/debug/service/IDsfDebugServicesFactory.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.dd.dsf/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IDsfDebugServicesFactory.java,v >retrieving revision 1.1 >diff -u -r1.1 IDsfDebugServicesFactory.java >--- src/org/eclipse/dd/dsf/debug/service/IDsfDebugServicesFactory.java 24 Jun 2008 18:41:38 -0000 1.1 >+++ src/org/eclipse/dd/dsf/debug/service/IDsfDebugServicesFactory.java 29 Jul 2008 18:32:03 -0000 >@@ -17,5 +17,5 @@ > * to easily have different service implementation for different backends. > */ > public interface IDsfDebugServicesFactory { >- public <V> V createService(DsfSession session, Class<V> clazz); >+ public <V> V createService(DsfSession session, Class<V> clazz, Object ... arguments); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
cdtdoug
:
iplog-
Actions:
View
|
Diff
Attachments on
bug 241985
:
108369
|
108506
|
108679
| 108683