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

Side by Side Diff: Source/devtools/front_end/ui/TextUtils.js

Issue 357483007: DevTools: [CodeMirror] add support for camel case movements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: use nice naming for shift-movement Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 inString = true; 146 inString = true;
147 else if (character === "{") 147 else if (character === "{")
148 ++counter; 148 ++counter;
149 else if (character === "}") { 149 else if (character === "}") {
150 if (--counter === 0) 150 if (--counter === 0)
151 return index + 1; 151 return index + 1;
152 } 152 }
153 } 153 }
154 } 154 }
155 return -1; 155 return -1;
156 },
157
158 /**
159 * @param {string} text
160 * @return {boolean}
161 */
162 isUpperCase: function(text)
163 {
164 return text === text.toUpperCase();
165 },
166
167 /**
168 * @param {string} text
169 * @return {boolean}
170 */
171 isLowerCase: function(text)
172 {
173 return text === text.toLowerCase();
156 } 174 }
157 } 175 }
158 176
159 WebInspector.TextUtils._SpaceCharRegex = /\s/; 177 WebInspector.TextUtils._SpaceCharRegex = /\s/;
160 178
161 /** 179 /**
162 * @enum {string} 180 * @enum {string}
163 */ 181 */
164 WebInspector.TextUtils.Indent = { 182 WebInspector.TextUtils.Indent = {
165 TwoSpaces: " ", 183 TwoSpaces: " ",
166 FourSpaces: " ", 184 FourSpaces: " ",
167 EightSpaces: " ", 185 EightSpaces: " ",
168 TabCharacter: "\t" 186 TabCharacter: "\t"
169 } 187 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698