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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/delta/DeltaProcessor.java

Issue 8806029: Incremental change to the DeltaProcessor. This change removes some unnecessary casts which were i... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/delta/DeltaProcessor.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/delta/DeltaProcessor.java (revision 2102)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/delta/DeltaProcessor.java (working copy)
@@ -48,7 +48,6 @@
import com.google.dart.tools.core.model.DartResource;
import com.google.dart.tools.core.model.ElementChangedEvent;
import com.google.dart.tools.core.model.ElementChangedListener;
-import com.google.dart.tools.core.model.HTMLFile;
import com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities;
import org.eclipse.core.resources.IContainer;
@@ -677,7 +676,6 @@
// enter this code with
// an elementType DART_PROJECT (see #elementType(...)).
if (resource instanceof IProject) {
-
if (currentElement != null && currentElement.getElementType() == DartElement.DART_PROJECT
&& ((DartProject) currentElement).getProject().equals(resource)) {
return currentElement;
@@ -693,12 +691,11 @@
}
break;
case DartElement.COMPILATION_UNIT:
- CompilationUnit cu = (CompilationUnit) DartCore.create(resource);
- element = cu;
+ // Note: this element could be a compilation unit or library (if it is a defining CU)
+ element = DartCore.create(resource);
break;
case DartElement.HTML_FILE:
- HTMLFile htmlFile = (HTMLFile) DartCore.create(resource);
- element = htmlFile;
+ element = DartCore.create(resource);
break;
}
if (element == null) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698