Skip to content

Conversation

@sgupta7857
Copy link
Owner

@sgupta7857 sgupta7857 commented Apr 21, 2017

@humphd so for release 0.4 my task is to add a toggle button for linting [enable-disable]
please reivew, my code on the brackets side. for some reason thimble isn't loading anymore and I can't figure out why
I know i need to fix my indentation for release 0.3. will do after work tonight

i will also be posting thimble code change for this task and link it here
mozilla/thimble.mozilla.org#2024

exports.TOGGLE_ACTIVE_LINE = "view.toggleActiveLine"; // EditorOptionHandlers.js _getToggler()
exports.TOGGLE_WORD_WRAP = "view.toggleWordWrap"; // EditorOptionHandlers.js _getToggler()
exports.TOGGLE_ALLOW_JAVASCRIPT = "cmd.toggleAllowJavaScript"; // EditorOptionsHandlers.js _getToggler()
exports.TOGGLE_ALLOW_LINT = "cmd.toggleAllowLint"; // EditorOptionsHandlers.js _getToggler()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this file changed.

WORD_WRAP = "wordWrap",
INDENT_LINE_COMMENT = "indentLineComment",
ALLOW_JAVASCRIPT = "allowJavaScript",
ALLOW_LINT = "interactive-linter",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need any of the changes to this file, you can revert all this.

// Constants for the preferences referred to in this file
var SHOW_LINE_NUMBERS = "showLineNumbers",
STYLE_ACTIVE_LINE = "styleActiveLine",
WORD_WRAP = "wordWrap",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need any of these changes.

PostMessageTransport.reload();
break;
case "BRAMBLE_ENABLE_LINT":
PreferencesManager.set("allowLint", true);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to set this for the proper pref in your extension:

PreferencesManager.getExtensionPrefs("interactive-linter").set("enabled" true);

I think. Test that.

PostMessageTransport.reload();
break;
case "BRAMBLE_DISABLE_LINT":
PreferencesManager.set("allowLint", false);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here.

});
});
// Listen for changes to allow javascript
var Lint = PreferencesManager.getExtensionPrefs("interactive-linter");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var lintPrefs

});
// Listen for changes to allow javascript
var Lint = PreferencesManager.getExtensionPrefs("interactive-linter");
Lint.on("change", "allowLint", function () {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. Check out https://github.com/mozilla/brackets/pull/702/files which is pretty similar to what you're doing.

@sgupta7857
Copy link
Owner Author

@humphd I made the changes you suggested on the brackets side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants