From c48cd231b56d2ea6e94865efbf1707891e96d1d5 Mon Sep 17 00:00:00 2001 From: Pawel Piech Date: Mon, 8 Sep 2008 19:06:43 +0000 Subject: [PATCH] [240997] - Additional fixes for generics related javac compile error. --- .../provisional/service/GDBProcesses_7_0.java | 7 ++++--- .../eclipse/dd/mi/service/MIRunControl.java | 20 +++++++++---------- .../org/eclipse/dd/mi/service/MIStack.java | 2 +- .../mi/service/command/events/IMIDMEvent.java | 4 ++-- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/service/GDBProcesses_7_0.java b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/service/GDBProcesses_7_0.java index 49e2737bfb8..5a8ce01e3e3 100644 --- a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/service/GDBProcesses_7_0.java +++ b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/service/GDBProcesses_7_0.java @@ -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 diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIRunControl.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIRunControl.java index 226cd13bdba..529567a4cf4 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIRunControl.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIRunControl.java @@ -139,23 +139,23 @@ public class MIRunControl extends AbstractDsfService implements IRunControl, ICa * @see MIRunControl */ @Immutable - protected static class RunControlEvent> extends AbstractDMEvent - implements IDMEvent, IMIDMEvent + protected static class RunControlEvent extends AbstractDMEvent + implements IDMEvent, IMIDMEvent { - final private T fMIInfo; - public RunControlEvent(V dmc, T miInfo) { + final private MIEvent fMIInfo; + public RunControlEvent(V dmc, MIEvent miInfo) { super(dmc); fMIInfo = miInfo; } - public T getMIEvent() { return fMIInfo; } + public MIEvent getMIEvent() { return fMIInfo; } } /** * Indicates that the given thread has been suspended. */ @Immutable - protected static class SuspendedEvent extends RunControlEvent + protected static class SuspendedEvent extends RunControlEvent 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 + protected static class ResumedEvent extends RunControlEvent 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 + protected static class StartedDMEvent extends RunControlEvent 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 + protected static class ExitedDMEvent extends RunControlEvent implements IExitedDMEvent { ExitedDMEvent(IMIExecutionDMContext executionDmc, MIThreadExitEvent miInfo) { diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIStack.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIStack.java index 60a14915aec..d085f1c37f9 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIStack.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIStack.java @@ -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(); diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/events/IMIDMEvent.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/events/IMIDMEvent.java index e08bbdc5bca..968176f6bd7 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/events/IMIDMEvent.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/events/IMIDMEvent.java @@ -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 getMIEvent(); +public interface IMIDMEvent { + public MIEvent getMIEvent(); }