Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2015-02-21 02:59:08 -0500
committerDani Megert2015-02-21 02:59:08 -0500
commite934ec6178b49b12027eeb6836ea0f1eb25b3630 (patch)
tree45eeea44489c0d3fcd9ede73c1cf498f6525b9cc /org.eclipse.debug.examples.memory
parent035b16c4845dde58ab3f6463878cbe662349e58c (diff)
downloadeclipse.platform.debug-e934ec6178b49b12027eeb6836ea0f1eb25b3630.tar.gz
eclipse.platform.debug-e934ec6178b49b12027eeb6836ea0f1eb25b3630.tar.xz
eclipse.platform.debug-e934ec6178b49b12027eeb6836ea0f1eb25b3630.zip
Fixed bug 460417: Fix compiler problems from generified IAdaptable#getAdapter(..)
Diffstat (limited to 'org.eclipse.debug.examples.memory')
-rw-r--r--org.eclipse.debug.examples.memory/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.debug.examples.memory/pom.xml4
-rw-r--r--org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleDebugTarget.java7
-rw-r--r--org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleMemoryBlock.java9
-rw-r--r--org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleStackFrame.java7
-rw-r--r--org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleThread.java7
6 files changed, 21 insertions, 17 deletions
diff --git a/org.eclipse.debug.examples.memory/META-INF/MANIFEST.MF b/org.eclipse.debug.examples.memory/META-INF/MANIFEST.MF
index c27f2d7f8..cbd5cb8c8 100644
--- a/org.eclipse.debug.examples.memory/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.examples.memory/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.debug.examples.memory;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.100.0.qualifier
Bundle-ClassPath: bin/
Bundle-Activator: org.eclipse.debug.examples.internal.memory.MemoryViewSamplePlugin
Bundle-Vendor: %Bundle-Vendor
@@ -13,7 +13,7 @@ Export-Package: org.eclipse.debug.examples.internal.memory;x-internal:=true,
org.eclipse.debug.examples.internal.memory.launchconfig;x-internal:=true
Require-Bundle: org.eclipse.core.expressions,
org.eclipse.ui,
- org.eclipse.core.runtime,
+ org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)",
org.eclipse.debug.core;bundle-version="3.9.0",
org.eclipse.debug.ui;bundle-version="3.10.0",
org.eclipse.core.resources,
diff --git a/org.eclipse.debug.examples.memory/pom.xml b/org.eclipse.debug.examples.memory/pom.xml
index 1bb084506..d206327b5 100644
--- a/org.eclipse.debug.examples.memory/pom.xml
+++ b/org.eclipse.debug.examples.memory/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013 Eclipse Foundation and others.
+ Copyright (c) 2013, 2015 Eclipse Foundation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
@@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.debug</groupId>
<artifactId>org.eclipse.debug.examples.memory</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.100.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleDebugTarget.java b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleDebugTarget.java
index 5601bee86..4470d7e7d 100644
--- a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleDebugTarget.java
+++ b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleDebugTarget.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 IBM Corporation and others.
+ * Copyright (c) 2013, 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
@@ -278,11 +278,12 @@ public class SampleDebugTarget extends DebugElement implements IDebugTarget, IMe
return null;
}
+ @SuppressWarnings("unchecked")
@Override
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
if (adapter == ILaunch.class) {
- return getLaunch();
+ return (T) getLaunch();
}
return super.getAdapter(adapter);
diff --git a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleMemoryBlock.java b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleMemoryBlock.java
index 641be7b75..09c9b9ef8 100644
--- a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleMemoryBlock.java
+++ b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleMemoryBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 IBM Corporation and others.
+ * Copyright (c) 2013, 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
@@ -286,15 +286,16 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
+ @SuppressWarnings("unchecked")
@Override
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
if (adapter.equals(IMemoryBlockRetrievalExtension.class)) {
- return getDebugTarget();
+ return (T) getDebugTarget();
}
if (adapter == IColorProvider.class) {
- return SampleModelPresentation.getSampleModelPresentation();
+ return (T) SampleModelPresentation.getSampleModelPresentation();
}
return super.getAdapter(adapter);
diff --git a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleStackFrame.java b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleStackFrame.java
index e8056850b..4b23904d2 100644
--- a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleStackFrame.java
+++ b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleStackFrame.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 IBM Corporation and others.
+ * Copyright (c) 2013, 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
@@ -60,10 +60,11 @@ public class SampleStackFrame extends DebugElement implements IStackFrame {
return true;
}
+ @SuppressWarnings("unchecked")
@Override
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
if (adapter == ILaunch.class) {
- return getLaunch();
+ return (T) getLaunch();
}
return super.getAdapter(adapter);
}
diff --git a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleThread.java b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleThread.java
index 6585941aa..6e72a6f68 100644
--- a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleThread.java
+++ b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleThread.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 IBM Corporation and others.
+ * Copyright (c) 2013, 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
@@ -273,10 +273,11 @@ public class SampleThread extends DebugElement implements IThread {
}
+ @SuppressWarnings("unchecked")
@Override
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
if (adapter == ILaunch.class) {
- return getLaunch();
+ return (T) getLaunch();
}
return super.getAdapter(adapter);
}

Back to the top