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

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

Issue 8527002: Fix to allow getters and setters (or other elements with the same name) to be uniquely identified... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 1 month 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.core/src/com/google/dart/tools/core/internal/model/SourceReferenceImpl.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/SourceReferenceImpl.java (revision 1404)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/SourceReferenceImpl.java (working copy)
@@ -152,8 +152,11 @@
// return getHandleFromMemento(token, memento, owner);
// }
- /*
- * @see IMember#getOccurrenceCount()
+ /**
+ * Return the occurrence count of this element. The occurrence count is used to distinguish two
+ * elements that would otherwise be indistinguishable, such as two fields with the same name.
+ *
+ * @return the occurrence count of this element
*/
public int getOccurrenceCount() {
return occurrenceCount;
@@ -275,6 +278,17 @@
return ((DartElementImpl) getParent()).resource();
}
+ /**
+ * Set the occurrence count of this element to the given value. The occurrence count is used to
+ * distinguish two elements that would otherwise be indistinguishable, such as two fields with the
+ * same name.
+ *
+ * @param count the new occurrence count of this element
+ */
+ public void setOccurrenceCount(int count) {
+ occurrenceCount = count;
+ }
+
@Override
protected void closing(DartElementInfo info) throws DartModelException {
// Do any necessary cleanup
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/CompilationUnitImpl.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698