diff options
author | Dani Megert | 2015-02-20 12:08:00 +0000 |
---|---|---|
committer | Dani Megert | 2015-02-20 12:08:00 +0000 |
commit | 035b16c4845dde58ab3f6463878cbe662349e58c (patch) | |
tree | a312725ef6ac6c4aeedc3ca81bad03b0583f5fb1 /org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java | |
parent | 87bf3db976790862ceb9b321661e0234afb342ca (diff) | |
download | eclipse.platform.debug-035b16c4845dde58ab3f6463878cbe662349e58c.tar.gz eclipse.platform.debug-035b16c4845dde58ab3f6463878cbe662349e58c.tar.xz eclipse.platform.debug-035b16c4845dde58ab3f6463878cbe662349e58c.zip |
Fixed bug 460417: Fix compiler problems from generified IAdaptable#getAdapter(..)
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java')
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java index cb5b1b94e..c6c85731e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014 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,8 +19,10 @@ import org.eclipse.core.commands.operations.IOperationHistory; import org.eclipse.core.commands.operations.IUndoContext; import org.eclipse.core.commands.operations.IUndoableOperation; import org.eclipse.core.commands.operations.ObjectUndoContext; + import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IResource; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IConfigurationElement; @@ -29,6 +31,7 @@ import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Platform; + import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchConfiguration; @@ -57,6 +60,7 @@ import org.eclipse.debug.internal.ui.memory.MemoryRenderingManager; import org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility; import org.eclipse.debug.internal.ui.sourcelookup.SourceLookupUIUtils; import org.eclipse.debug.internal.ui.stringsubstitution.SelectedResourceManager; + import org.eclipse.debug.ui.actions.IToggleBreakpointsTargetManager; import org.eclipse.debug.ui.contexts.IDebugContextListener; import org.eclipse.debug.ui.contexts.IDebugContextManager; @@ -64,15 +68,18 @@ import org.eclipse.debug.ui.contexts.IDebugContextService; import org.eclipse.debug.ui.memory.IMemoryRenderingManager; import org.eclipse.debug.ui.sourcelookup.ISourceContainerBrowser; import org.eclipse.debug.ui.sourcelookup.ISourceLookupResult; + import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.window.Window; + import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Shell; + import org.eclipse.ui.IViewSite; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPart; @@ -309,10 +316,11 @@ public class DebugUITools { IAdaptable context= null; if (shell != null) { context= new IAdaptable() { + @SuppressWarnings("unchecked") @Override - public Object getAdapter(Class adapter) { + public <T> T getAdapter(Class<T> adapter) { if (adapter == Shell.class) { - return shell; + return (T) shell; } return null; } @@ -477,7 +485,7 @@ public class DebugUITools { } if (context != null) { - return (IProcess) context.getAdapter(IProcess.class); + return context.getAdapter(IProcess.class); } return null; |