aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael Istria2014-02-19 03:14:36 (EST)
committerGerrit Code Review @ Eclipse.org2014-02-21 10:38:54 (EST)
commitb0ce805681c1fb08fabd004c1b34319a0d385d53 (patch)
tree712ca0b1f517e792c0653dc6c071cfb2386dcd35
parenta68ba21575cd6402c83d00781c740ad66bc37a4a (diff)
downloadeclipse.platform.ui-b0ce805681c1fb08fabd004c1b34319a0d385d53.zip
eclipse.platform.ui-b0ce805681c1fb08fabd004c1b34319a0d385d53.tar.gz
eclipse.platform.ui-b0ce805681c1fb08fabd004c1b34319a0d385d53.tar.bz2
Bug 427923: remove generic types warningsrefs/changes/02/22202/3
Signed-off-by: Mickael Istria <mistria@redhat.com> Change-Id: Ic731090dd8ad466082859764780368b5b6644444
-rwxr-xr-xbundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/ResourceToItemsMapper.java4
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java2
2 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/ResourceToItemsMapper.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/ResourceToItemsMapper.java
index 400512e..f7daeda 100755
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/ResourceToItemsMapper.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/ResourceToItemsMapper.java
@@ -18,7 +18,6 @@ import java.util.Stack;
import org.eclipse.swt.widgets.Item;
import org.eclipse.ui.navigator.CommonViewer;
import org.eclipse.ui.navigator.ICommonViewerMapper;
-
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IAdaptable;
@@ -64,6 +63,7 @@ public class ResourceToItemsMapper implements ICommonViewerMapper {
_resourceToItem.put(resource, list);
}
} else { // List
+ @SuppressWarnings("unchecked")
List<Item> list = (List<Item>) existingMapping;
if (!list.contains(item)) {
list.add(item);
@@ -81,6 +81,7 @@ public class ResourceToItemsMapper implements ICommonViewerMapper {
} else if (existingMapping instanceof Item) {
_resourceToItem.remove(resource);
} else { // List
+ @SuppressWarnings("unchecked")
List<Item> list = (List<Item>) existingMapping;
list.remove(item);
if (list.isEmpty()) {
@@ -130,6 +131,7 @@ public class ResourceToItemsMapper implements ICommonViewerMapper {
} else if (obj instanceof Item) {
updateItem((Item) obj);
} else { // List of Items
+ @SuppressWarnings("unchecked")
List<Item> list = (List<Item>) obj;
for (Item item : list) {
updateItem(item);
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java
index 2b22914..a71567a 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java
@@ -121,7 +121,7 @@ public class ResourceMgmtActionProvider extends CommonActionProvider {
boolean hasClosedProjects = false;
boolean hasBuilder = true; // false if any project is closed or does not
// have builder
- Iterator resources = selection.iterator();
+ Iterator<Object> resources = selection.iterator();
while (resources.hasNext() && (!hasOpenProjects || !hasClosedProjects || hasBuilder || isProjectSelection)) {
Object next = resources.next();