Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMarkus Schorn2008-04-11 05:37:31 -0400
committerMarkus Schorn2008-04-11 05:37:31 -0400
commit147b628385001e610194394e138457a451f835d2 (patch)
treeb801cab6352afae22e770fefda7e59ebebd68092 /core
parentb681d5978e3329ea3a7b55ef2473143ce0b2ed98 (diff)
downloadorg.eclipse.cdt-147b628385001e610194394e138457a451f835d2.tar.gz
org.eclipse.cdt-147b628385001e610194394e138457a451f835d2.tar.xz
org.eclipse.cdt-147b628385001e610194394e138457a451f835d2.zip
Fix warnings.
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeInfoLabelProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java18
2 files changed, 9 insertions, 11 deletions
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeInfoLabelProvider.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeInfoLabelProvider.java
index d35781eaebe..0ba02040827 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeInfoLabelProvider.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeInfoLabelProvider.java
@@ -119,6 +119,7 @@ public class TypeInfoLabelProvider extends LabelProvider {
buf.append(returnType);
}
}
+ break;
case ICElement.C_VARIABLE:
ITypeReference ref= typeInfo.getResolvedReference();
if (ref != null) {
@@ -137,6 +138,7 @@ public class TypeInfoLabelProvider extends LabelProvider {
}
}
}
+ break;
}
}
if (isSet(SHOW_PATH)) {
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java
index 3715a2ada2c..bf6a974eb8f 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java
@@ -184,14 +184,11 @@ public class TypeSelectionDialog extends TwoPaneElementSelector {
}
}
- private static class StringComparator implements Comparator {
- public int compare(Object left, Object right) {
- String leftString = (String) left;
- String rightString = (String) right;
-
- int result = leftString.compareToIgnoreCase(rightString);
+ private static class StringComparator implements Comparator<String> {
+ public int compare(String left, String right) {
+ int result = left.compareToIgnoreCase(right);
if (result == 0)
- result = leftString.compareTo(rightString);
+ result = left.compareTo(right);
return result;
}
@@ -676,8 +673,7 @@ public class TypeSelectionDialog extends TwoPaneElementSelector {
ArrayList<IndexTypeInfo> result= new ArrayList<IndexTypeInfo>();
Object[] typeInfos= super.getFoldedElements(index);
if (typeInfos != null) {
- for (int i = 0; i < typeInfos.length; i++) {
- Object typeInfo = typeInfos[i];
+ for (Object typeInfo : typeInfos) {
if (typeInfo instanceof IndexTypeInfo) {
addFoldedElements((IndexTypeInfo) typeInfo, result);
}
@@ -688,8 +684,8 @@ public class TypeSelectionDialog extends TwoPaneElementSelector {
private void addFoldedElements(IndexTypeInfo typeInfo, ArrayList<IndexTypeInfo> result) {
ITypeReference[] refs= typeInfo.getReferences();
- for (int i = 0; i < refs.length; i++) {
- result.add(new IndexTypeInfo(typeInfo, refs[i]));
+ for (ITypeReference ref : refs) {
+ result.add(new IndexTypeInfo(typeInfo, ref));
}
}
}

Back to the top