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

Side by Side Diff: compiler/java/com/google/dart/compiler/resolver/LibraryElementImplementation.java

Issue 11648026: Issue 7532. Fix for NPE in SemanticHighlightings (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 package com.google.dart.compiler.resolver; 5 package com.google.dart.compiler.resolver;
6 6
7 import com.google.common.collect.Maps; 7 import com.google.common.collect.Maps;
8 import com.google.dart.compiler.ast.DartObsoleteMetadata; 8 import com.google.dart.compiler.ast.DartObsoleteMetadata;
9 import com.google.dart.compiler.ast.LibraryUnit; 9 import com.google.dart.compiler.ast.LibraryUnit;
10 10
11 import java.util.Collection; 11 import java.util.Collection;
12 import java.util.Map; 12 import java.util.Map;
13 13
14 class LibraryElementImplementation extends AbstractNodeElement implements Librar yElement { 14 class LibraryElementImplementation extends AbstractNodeElement implements Librar yElement {
15 15
16 private final Scope importScope = new Scope("import", this); 16 private final Scope importScope = new Scope("import", this);
17 private final Scope scope = new Scope("library", this, importScope); 17 private final Scope scope = new Scope("library", this, importScope);
18 private final Map<String, Element> exportedElements = Maps.newHashMap(); 18 private final Map<String, Element> exportedElements = Maps.newHashMap();
19 private LibraryUnit libraryUnit; 19 private LibraryUnit libraryUnit;
20 private MethodElement entryPoint; 20 private MethodElement entryPoint;
21 private DartObsoleteMetadata metadata; 21 private DartObsoleteMetadata metadata = DartObsoleteMetadata.EMPTY;
22 22
23 public LibraryElementImplementation(LibraryUnit libraryUnit) { 23 public LibraryElementImplementation(LibraryUnit libraryUnit) {
24 // TODO(ngeoffray): What should we pass the super? Should a LibraryUnit be a node? 24 // TODO(ngeoffray): What should we pass the super? Should a LibraryUnit be a node?
25 super(null, libraryUnit.getSource().getName()); 25 super(null, libraryUnit.getSource().getName());
26 this.libraryUnit = libraryUnit; 26 this.libraryUnit = libraryUnit;
27 } 27 }
28 28
29 @Override 29 @Override
30 public boolean isInterface() { 30 public boolean isInterface() {
31 return false; 31 return false;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 @Override 92 @Override
93 public DartObsoleteMetadata getMetadata() { 93 public DartObsoleteMetadata getMetadata() {
94 return metadata; 94 return metadata;
95 } 95 }
96 96
97 public void setMetadata(DartObsoleteMetadata metadata) { 97 public void setMetadata(DartObsoleteMetadata metadata) {
98 this.metadata = metadata; 98 this.metadata = metadata;
99 } 99 }
100 } 100 }
OLDNEW
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightings.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698