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

Unified Diff: editor/util/plugins/com.google.dart.java2dart/resources/java_engine.dart

Issue 128443003: Analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments. Created 6 years, 11 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/util/plugins/com.google.dart.java2dart/resources/java_engine.dart
diff --git a/editor/util/plugins/com.google.dart.java2dart/resources/java_engine.dart b/editor/util/plugins/com.google.dart.java2dart/resources/java_engine.dart
index 21a205b1ca3ba18c224a36d3b9eb77d90b6be7af..a6ae4441db2230caf11c48e0f851e8afb2db3777 100644
--- a/editor/util/plugins/com.google.dart.java2dart/resources/java_engine.dart
+++ b/editor/util/plugins/com.google.dart.java2dart/resources/java_engine.dart
@@ -1,9 +1,29 @@
library java.engine;
+import 'java_core.dart';
+
class StringUtilities {
static const String EMPTY = '';
static const List<String> EMPTY_ARRAY = const <String> [];
static String intern(String s) => s;
+ static bool isTagName(String s) {
+ if (s == null || s.length == 0) {
+ return false;
+ }
+ int sz = s.length;
+ for (int i = 0; i < sz; i++) {
+ int c = s.codeUnitAt(i);
+ if (!Character.isLetter(c)) {
+ if (i == 0) {
+ return false;
+ }
+ if (!Character.isDigit(c) && c != 0x2D) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
static String substringBefore(String str, String separator) {
if (str == null || str.isEmpty) {
return str;

Powered by Google App Engine
This is Rietveld 408576698