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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractUtils.java

Issue 11346004: Issue 6201. Clean up to replace 'interface' with 'abstract class' (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractUtils.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractUtils.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractUtils.java
index ca86da17b7a21f59ecc3487b365b7303d3f22b1d..913148cb7a1fdc50a3fef3eff7bd5b2c53756e5b 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractUtils.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractUtils.java
@@ -474,6 +474,23 @@ public class ExtractUtils {
}
/**
+ * @return the index of the first non-whitespace character after given index.
+ */
+ public int getNonWhitespaceForward(int index) {
+ int length = buffer.getLength();
+ // skip whitespace characters
+ while (index < length) {
+ char c = buffer.getChar(index);
+ if (!Character.isWhitespace(c)) {
+ break;
+ }
+ index++;
+ }
+ // done
+ return index;
+ }
+
+ /**
* @return the line prefix consisting of spaces and tabs on the left from the given offset.
*/
public String getPrefix(int endIndex) {

Powered by Google App Engine
This is Rietveld 408576698