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

Unified Diff: editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/elements/TopLevelElement_NEW.java

Issue 474193003: Make more use of generated code in Java analysis server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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.deploy/src/com/google/dart/tools/ui/omni/elements/TopLevelElement_NEW.java
diff --git a/editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/elements/TopLevelElement_NEW.java b/editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/elements/TopLevelElement_NEW.java
index 1153a2241110ca36fef9497885c4c7c9f2ba7dee..483df22639a4eeb486949edf35031bda2f6eaf73 100644
--- a/editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/elements/TopLevelElement_NEW.java
+++ b/editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/elements/TopLevelElement_NEW.java
@@ -27,6 +27,8 @@ import com.google.dart.tools.ui.omni.OmniProposalProvider;
import org.eclipse.core.resources.IFile;
import org.eclipse.jface.resource.ImageDescriptor;
+import java.util.List;
+
/**
* {@link OmniElement} for a top-level {@link Element}.
*/
@@ -37,8 +39,8 @@ public class TopLevelElement_NEW extends OmniElement {
public TopLevelElement_NEW(OmniProposalProvider provider, SearchResult searchResult) {
super(provider);
- Element[] path = searchResult.getPath();
- this.element = path[0];
+ List<Element> path = searchResult.getPath();
+ this.element = path.get(0);
this.library = getLibraryElement(path);
}
@@ -98,7 +100,7 @@ public class TopLevelElement_NEW extends OmniElement {
}
}
- private Element getLibraryElement(Element[] elements) {
+ private Element getLibraryElement(List<Element> elements) {
for (Element element : elements) {
if (element.getKind() == ElementKind.LIBRARY) {
return element;

Powered by Google App Engine
This is Rietveld 408576698