Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2015-03-24 16:38:00 +0000
committerDani Megert2015-03-24 16:39:40 +0000
commit5d5bf2e0030919740c04f5e9723bde3a82d44fec (patch)
tree10b8c946edcb50eead562d485f9a21812dac5ebe /org.eclipse.debug.ui
parentc2fb26c5fc84522375f13f6566e25efba91ebb17 (diff)
downloadeclipse.platform.debug-5d5bf2e0030919740c04f5e9723bde3a82d44fec.tar.gz
eclipse.platform.debug-5d5bf2e0030919740c04f5e9723bde3a82d44fec.tar.xz
eclipse.platform.debug-5d5bf2e0030919740c04f5e9723bde3a82d44fec.zip
Fixed bug 460417: Fix compiler problems from generified IAdaptable#getAdapter(..)
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java36
1 files changed, 21 insertions, 15 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
index 92a41dd97..50ea022d9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,10 +19,13 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
-import org.eclipse.debug.internal.ui.LazyModelPresentation;
-import org.eclipse.debug.internal.ui.actions.breakpoints.SkipAllBreakpointsAction;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IContributionItem;
@@ -31,18 +34,14 @@ import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.TextViewer;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IBaseLabelProvider;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
+
+import org.eclipse.jface.text.TextViewer;
+
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IPartListener2;
@@ -59,8 +58,14 @@ import org.eclipse.ui.part.MessagePage;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.part.PageBookView;
+
import org.eclipse.ui.texteditor.IUpdate;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
+import org.eclipse.debug.internal.ui.LazyModelPresentation;
+import org.eclipse.debug.internal.ui.actions.breakpoints.SkipAllBreakpointsAction;
+
/**
* Common function for views related to debugging. Clients implementing
* views for a debugger should subclass this class. Common function
@@ -252,17 +257,18 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
* @see IDebugView
*/
+ @SuppressWarnings("unchecked")
@Override
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
if (adapter == IDebugView.class) {
- return this;
+ return (T) this;
}
if (adapter == IDebugModelPresentation.class) {
StructuredViewer viewer = getStructuredViewer();
if (viewer != null) {
IBaseLabelProvider labelProvider = viewer.getLabelProvider();
if (labelProvider instanceof IDebugModelPresentation) {
- return labelProvider;
+ return (T) labelProvider;
}
}
}

Back to the top