1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-16 13:35:22 +02:00

[240997] - Additional fixes for generics related javac compile error.

This commit is contained in:
Pawel Piech 2008-09-08 19:06:43 +00:00
parent 86adda189d
commit c48cd231b5
4 changed files with 17 additions and 16 deletions

View file

@ -739,8 +739,9 @@ public class GDBProcesses_7_0 extends AbstractDsfService implements IMIProcesses
// HACK figure out the thread and the group ids // HACK figure out the thread and the group ids
// I had to HACK GDB for this // I had to HACK GDB for this
if (e instanceof IMIDMEvent) { if (e instanceof IMIDMEvent) {
String threadId = ((MIThreadCreatedEvent)((IMIDMEvent)e).getMIEvent()).getStrId(); MIThreadCreatedEvent miEvent = (MIThreadCreatedEvent)((IMIDMEvent<?>)e).getMIEvent();
IContainerDMContext ctx = ((MIThreadCreatedEvent)((IMIDMEvent)e).getMIEvent()).getDMContext(); String threadId = miEvent.getStrId();
IContainerDMContext ctx = miEvent.getDMContext();
if (ctx instanceof IMIExecutionGroupDMContext) { if (ctx instanceof IMIExecutionGroupDMContext) {
String groupId = ((IMIExecutionGroupDMContext)ctx).getGroupId(); String groupId = ((IMIExecutionGroupDMContext)ctx).getGroupId();
fGroupIdMap.put(threadId, groupId); 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 // HACK figure out the thread and the group ids
// I had to HACK GDB for this // I had to HACK GDB for this
if (e instanceof IMIDMEvent) { if (e instanceof IMIDMEvent) {
String threadId = ((MIThreadCreatedEvent)((IMIDMEvent)e).getMIEvent()).getStrId(); String threadId = ((MIThreadCreatedEvent)((IMIDMEvent<?>)e).getMIEvent()).getStrId();
fGroupIdMap.remove(threadId); fGroupIdMap.remove(threadId);
} }
// END HACK // END HACK

View file

@ -139,23 +139,23 @@ public class MIRunControl extends AbstractDsfService implements IRunControl, ICa
* @see MIRunControl * @see MIRunControl
*/ */
@Immutable @Immutable
protected static class RunControlEvent<V extends IDMContext, T extends MIEvent<? extends IDMContext>> extends AbstractDMEvent<V> protected static class RunControlEvent<V extends IDMContext, T extends IDMContext> extends AbstractDMEvent<V>
implements IDMEvent<V>, IMIDMEvent implements IDMEvent<V>, IMIDMEvent<T>
{ {
final private T fMIInfo; final private MIEvent<T> fMIInfo;
public RunControlEvent(V dmc, T miInfo) { public RunControlEvent(V dmc, MIEvent<T> miInfo) {
super(dmc); super(dmc);
fMIInfo = miInfo; fMIInfo = miInfo;
} }
public T getMIEvent() { return fMIInfo; } public MIEvent<T> getMIEvent() { return fMIInfo; }
} }
/** /**
* Indicates that the given thread has been suspended. * Indicates that the given thread has been suspended.
*/ */
@Immutable @Immutable
protected static class SuspendedEvent extends RunControlEvent<IExecutionDMContext, MIStoppedEvent> protected static class SuspendedEvent extends RunControlEvent<IExecutionDMContext, IExecutionDMContext>
implements ISuspendedDMEvent implements ISuspendedDMEvent
{ {
SuspendedEvent(IExecutionDMContext ctx, MIStoppedEvent miInfo) { SuspendedEvent(IExecutionDMContext ctx, MIStoppedEvent miInfo) {
@ -198,7 +198,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl, ICa
} }
@Immutable @Immutable
protected static class ResumedEvent extends RunControlEvent<IExecutionDMContext, MIRunningEvent> protected static class ResumedEvent extends RunControlEvent<IExecutionDMContext, IExecutionDMContext>
implements IResumedDMEvent implements IResumedDMEvent
{ {
ResumedEvent(IExecutionDMContext ctx, MIRunningEvent miInfo) { ResumedEvent(IExecutionDMContext ctx, MIRunningEvent miInfo) {
@ -206,7 +206,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl, ICa
} }
public StateChangeReason getReason() { public StateChangeReason getReason() {
switch(getMIEvent().getType()) { switch(((MIRunningEvent)getMIEvent()).getType()) {
case MIRunningEvent.CONTINUE: case MIRunningEvent.CONTINUE:
return StateChangeReason.USER_REQUEST; return StateChangeReason.USER_REQUEST;
case MIRunningEvent.NEXT: case MIRunningEvent.NEXT:
@ -243,7 +243,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl, ICa
} }
@Immutable @Immutable
protected static class StartedDMEvent extends RunControlEvent<IExecutionDMContext,MIThreadCreatedEvent> protected static class StartedDMEvent extends RunControlEvent<IExecutionDMContext, IContainerDMContext>
implements IStartedDMEvent implements IStartedDMEvent
{ {
StartedDMEvent(IMIExecutionDMContext executionDmc, MIThreadCreatedEvent miInfo) { StartedDMEvent(IMIExecutionDMContext executionDmc, MIThreadCreatedEvent miInfo) {
@ -252,7 +252,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl, ICa
} }
@Immutable @Immutable
protected static class ExitedDMEvent extends RunControlEvent<IExecutionDMContext,MIThreadExitEvent> protected static class ExitedDMEvent extends RunControlEvent<IExecutionDMContext, IContainerDMContext>
implements IExitedDMEvent implements IExitedDMEvent
{ {
ExitedDMEvent(IMIExecutionDMContext executionDmc, MIThreadExitEvent miInfo) { ExitedDMEvent(IMIExecutionDMContext executionDmc, MIThreadExitEvent miInfo) {

View file

@ -658,7 +658,7 @@ public class MIStack extends AbstractDsfService
} }
@DsfServiceEventHandler @DsfServiceEventHandler
public void eventDispatched(IMIDMEvent e) { public void eventDispatched(IMIDMEvent<?> e) {
// Note: the e.getMIEvent() is cast to an object as a workaround // Note: the e.getMIEvent() is cast to an object as a workaround
// for a compiler error generated by javac (bug 240997). // for a compiler error generated by javac (bug 240997).
Object miEvent = e.getMIEvent(); Object miEvent = e.getMIEvent();

View file

@ -15,6 +15,6 @@ import org.eclipse.dd.dsf.datamodel.IDMContext;
/** /**
* Common interface for events that are directly caused by some MI event. * Common interface for events that are directly caused by some MI event.
*/ */
public interface IMIDMEvent { public interface IMIDMEvent<V extends IDMContext> {
public MIEvent<? extends IDMContext> getMIEvent(); public MIEvent<V> getMIEvent();
} }