Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SpecificContentAssistExecutor.java

Issue 10882061: Clean up some warnings. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SpecificContentAssistExecutor.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SpecificContentAssistExecutor.java (revision 11395)
+++ editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SpecificContentAssistExecutor.java (working copy)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, the Dart project authors.
+ * Copyright (c) 2012, the Dart project authors.
*
* Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
@@ -50,12 +50,13 @@
* @param categoryId the id of the proposal category to show proposals for
*/
public void invokeContentAssist(final ITextEditor editor, String categoryId) {
- Collection categories = fRegistry.getProposalCategories();
+ @SuppressWarnings("unchecked")
+ Collection<CompletionProposalCategory> categories = fRegistry.getProposalCategories();
boolean[] inclusionState = new boolean[categories.size()];
boolean[] separateState = new boolean[categories.size()];
int i = 0;
- for (Iterator it = categories.iterator(); it.hasNext(); i++) {
- CompletionProposalCategory cat = (CompletionProposalCategory) it.next();
+ for (Iterator<CompletionProposalCategory> it = categories.iterator(); it.hasNext(); i++) {
+ CompletionProposalCategory cat = it.next();
inclusionState[i] = cat.isIncluded();
cat.setIncluded(cat.getId().equals(categoryId));
separateState[i] = cat.isSeparateCommand();
@@ -69,8 +70,8 @@
}
} finally {
i = 0;
- for (Iterator it = categories.iterator(); it.hasNext(); i++) {
- CompletionProposalCategory cat = (CompletionProposalCategory) it.next();
+ for (Iterator<CompletionProposalCategory> it = categories.iterator(); it.hasNext(); i++) {
+ CompletionProposalCategory cat = it.next();
cat.setIncluded(inclusionState[i]);
cat.setSeparateCommand(separateState[i]);
}

Powered by Google App Engine
This is Rietveld 408576698