Changed all usages of the depreciated ".className" to ".type" that were being used on objects returned from the getTokenAt() method. There are many ".className" references that refer to the name of the CSS class, and all these were left alone. Also, any uses of ".className" in the third party code was left alone as well.

This commit is contained in:
Jeffrey Fisher committed 2013-05-01 19:09:25 -07:00
1 parent 8bba105e08
commit c81d79ad4a
10 files changed
+51 -51

No files matched your search

@@ -72,7 +72,7 @@ define(function (require, exports, module) {
* @return {boolean} - could the token be hintable?
*/
function hintable(token) {
switch (token.className) {
switch (token.type) {
case "comment":
case "number":
case "regexp":
@@ -298,7 +298,7 @@ define(function (require, exports, module) {
propertyLookup = true;
context = this.getContext(cursor);
} else {
if (token.className === "property") {
if (token.type === "property") {
propertyLookup = true;
}
@@ -210,18 +210,18 @@ define(function (require, exports, module) {
return true;
}
if (token.className === null) {
if (token.type === null) {
token = session.getNextTokenOnLine(cursor);
}
if (lastToken && lastToken.className === null) {
if (lastToken && lastToken.type === null) {
lastToken = session.getNextTokenOnLine(cachedCursor);
}
// Both of the tokens should never be null (happens when token is off
// the end of the line), so one is null then close the hints.
if (!lastToken || !token ||
token.className !== lastToken.className) {
token.type !== lastToken.type) {
return true;
}