mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-02 06:35:28 +02:00
[240997] - Additional fixes for generics related javac compile error.
This commit is contained in:
parent
86adda189d
commit
c48cd231b5
4 changed files with 17 additions and 16 deletions
|
@ -739,8 +739,9 @@ public class GDBProcesses_7_0 extends AbstractDsfService implements IMIProcesses
|
|||
// HACK figure out the thread and the group ids
|
||||
// I had to HACK GDB for this
|
||||
if (e instanceof IMIDMEvent) {
|
||||
String threadId = ((MIThreadCreatedEvent)((IMIDMEvent)e).getMIEvent()).getStrId();
|
||||
IContainerDMContext ctx = ((MIThreadCreatedEvent)((IMIDMEvent)e).getMIEvent()).getDMContext();
|
||||
MIThreadCreatedEvent miEvent = (MIThreadCreatedEvent)((IMIDMEvent<?>)e).getMIEvent();
|
||||
String threadId = miEvent.getStrId();
|
||||
IContainerDMContext ctx = miEvent.getDMContext();
|
||||
if (ctx instanceof IMIExecutionGroupDMContext) {
|
||||
String groupId = ((IMIExecutionGroupDMContext)ctx).getGroupId();
|
||||
fGroupIdMap.put(threadId, groupId);
|
||||
|
@ -760,7 +761,7 @@ public class GDBProcesses_7_0 extends AbstractDsfService implements IMIProcesses
|
|||
// HACK figure out the thread and the group ids
|
||||
// I had to HACK GDB for this
|
||||
if (e instanceof IMIDMEvent) {
|
||||
String threadId = ((MIThreadCreatedEvent)((IMIDMEvent)e).getMIEvent()).getStrId();
|
||||
String threadId = ((MIThreadCreatedEvent)((IMIDMEvent<?>)e).getMIEvent()).getStrId();
|
||||
fGroupIdMap.remove(threadId);
|
||||
}
|
||||
// END HACK
|
||||
|
|
|
@ -139,23 +139,23 @@ public class MIRunControl extends AbstractDsfService implements IRunControl, ICa
|
|||
* @see MIRunControl
|
||||
*/
|
||||
@Immutable
|
||||
protected static class RunControlEvent<V extends IDMContext, T extends MIEvent<? extends IDMContext>> extends AbstractDMEvent<V>
|
||||
implements IDMEvent<V>, IMIDMEvent
|
||||
protected static class RunControlEvent<V extends IDMContext, T extends IDMContext> extends AbstractDMEvent<V>
|
||||
implements IDMEvent<V>, IMIDMEvent<T>
|
||||
{
|
||||
final private T fMIInfo;
|
||||
public RunControlEvent(V dmc, T miInfo) {
|
||||
final private MIEvent<T> fMIInfo;
|
||||
public RunControlEvent(V dmc, MIEvent<T> miInfo) {
|
||||
super(dmc);
|
||||
fMIInfo = miInfo;
|
||||
}
|
||||
|
||||
public T getMIEvent() { return fMIInfo; }
|
||||
public MIEvent<T> getMIEvent() { return fMIInfo; }
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates that the given thread has been suspended.
|
||||
*/
|
||||
@Immutable
|
||||
protected static class SuspendedEvent extends RunControlEvent<IExecutionDMContext, MIStoppedEvent>
|
||||
protected static class SuspendedEvent extends RunControlEvent<IExecutionDMContext, IExecutionDMContext>
|
||||
implements ISuspendedDMEvent
|
||||
{
|
||||
SuspendedEvent(IExecutionDMContext ctx, MIStoppedEvent miInfo) {
|
||||
|
@ -198,7 +198,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl, ICa
|
|||
}
|
||||
|
||||
@Immutable
|
||||
protected static class ResumedEvent extends RunControlEvent<IExecutionDMContext, MIRunningEvent>
|
||||
protected static class ResumedEvent extends RunControlEvent<IExecutionDMContext, IExecutionDMContext>
|
||||
implements IResumedDMEvent
|
||||
{
|
||||
ResumedEvent(IExecutionDMContext ctx, MIRunningEvent miInfo) {
|
||||
|
@ -206,7 +206,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl, ICa
|
|||
}
|
||||
|
||||
public StateChangeReason getReason() {
|
||||
switch(getMIEvent().getType()) {
|
||||
switch(((MIRunningEvent)getMIEvent()).getType()) {
|
||||
case MIRunningEvent.CONTINUE:
|
||||
return StateChangeReason.USER_REQUEST;
|
||||
case MIRunningEvent.NEXT:
|
||||
|
@ -243,7 +243,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl, ICa
|
|||
}
|
||||
|
||||
@Immutable
|
||||
protected static class StartedDMEvent extends RunControlEvent<IExecutionDMContext,MIThreadCreatedEvent>
|
||||
protected static class StartedDMEvent extends RunControlEvent<IExecutionDMContext, IContainerDMContext>
|
||||
implements IStartedDMEvent
|
||||
{
|
||||
StartedDMEvent(IMIExecutionDMContext executionDmc, MIThreadCreatedEvent miInfo) {
|
||||
|
@ -252,7 +252,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl, ICa
|
|||
}
|
||||
|
||||
@Immutable
|
||||
protected static class ExitedDMEvent extends RunControlEvent<IExecutionDMContext,MIThreadExitEvent>
|
||||
protected static class ExitedDMEvent extends RunControlEvent<IExecutionDMContext, IContainerDMContext>
|
||||
implements IExitedDMEvent
|
||||
{
|
||||
ExitedDMEvent(IMIExecutionDMContext executionDmc, MIThreadExitEvent miInfo) {
|
||||
|
|
|
@ -658,7 +658,7 @@ public class MIStack extends AbstractDsfService
|
|||
}
|
||||
|
||||
@DsfServiceEventHandler
|
||||
public void eventDispatched(IMIDMEvent e) {
|
||||
public void eventDispatched(IMIDMEvent<?> e) {
|
||||
// Note: the e.getMIEvent() is cast to an object as a workaround
|
||||
// for a compiler error generated by javac (bug 240997).
|
||||
Object miEvent = e.getMIEvent();
|
||||
|
|
|
@ -15,6 +15,6 @@ import org.eclipse.dd.dsf.datamodel.IDMContext;
|
|||
/**
|
||||
* Common interface for events that are directly caused by some MI event.
|
||||
*/
|
||||
public interface IMIDMEvent {
|
||||
public MIEvent<? extends IDMContext> getMIEvent();
|
||||
public interface IMIDMEvent<V extends IDMContext> {
|
||||
public MIEvent<V> getMIEvent();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue