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

Unified Diff: pkg/analysis_server/tool/spec/codegen_java_types.dart

Issue 994733002: Issue 22465. Mark occurrences only if there are no pending changes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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: pkg/analysis_server/tool/spec/codegen_java_types.dart
diff --git a/pkg/analysis_server/tool/spec/codegen_java_types.dart b/pkg/analysis_server/tool/spec/codegen_java_types.dart
index 646e5ffe760cbf751aa4da57e69e7c8ac304bc52..e7d289e59a1212a45fec445d9787c2ed19c296fa 100644
--- a/pkg/analysis_server/tool/spec/codegen_java_types.dart
+++ b/pkg/analysis_server/tool/spec/codegen_java_types.dart
@@ -672,11 +672,11 @@ class CodegenJavaType extends CodegenJavaVisitor {
// contains(int x)
//
if (className == 'Occurrences') {
- publicMethod('contains', () {
- writeln('public boolean contains(int x) {');
+ publicMethod('containsInclusive', () {
+ writeln('public boolean containsInclusive(int x) {');
indent(() {
writeln('for (int offset : offsets) {');
- writeln(' if (offset <= x && x < offset + length) {');
+ writeln(' if (offset <= x && x <= offset + length) {');
writeln(' return true;');
writeln(' }');
writeln('}');
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/MarkOccurrencesManager_NEW.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698