Community
Participate
Working Groups
Need way to customize the editor settings during the create() API call.
As mentioned in the bug 481916, a user wants to enable the content assist auto trigger. The current way to do that is to use the call as below: editorViewer.settings.contentAssistAutoTrigger = true; But we should figure out a better way to allow user to configure all the editor settings values to a set of default values. We may end up with a preference service.
Please see bug 491938. .editorConfig might be helpful here.
(In reply to Carolyn MacLeod from comment #2) > Please see bug 491938. > .editorConfig might be helpful here. I am working on this right now... In org.eclipse.orion.client.ui/web/orion/editorPreferences.js, we already have a default object: var defaults = { autoSave: true, autoSaveVisible: true, autoSaveLocalVisible: true, autoSaveTimeout: 250, autoSaveTimeoutVisible: true, themeVisible: true, themeLocalVisible: true, fontSizeVisible: true, fontSizeLocalVisible: true, autoLoad: true, autoLoadVisible: true, saveDiffs: true, saveDiffsVisible: true, contentAssistAutoTrigger: true, contentAssistAutoTriggerVisible: true, showOccurrences: true, showOccurrencesVisible: true, autoPairParentheses: true, autoPairParenthesesVisible: true, autoPairBraces: true, autoPairBracesVisible: true, autoPairSquareBrackets: true, autoPairSquareBracketsVisible: true, autoPairAngleBrackets: false, autoPairAngleBracketsVisible: true, autoPairQuotations: true, autoPairQuotationsVisible: true, autoCompleteComments: true, autoCompleteCommentsVisible: true, smartIndentation: true, smartIndentationVisible: true, trimTrailingWhiteSpace: false, trimTrailingWhiteSpaceVisible: true, tabSize: 4, tabSizeVisible: true, expandTab: false, expandTabVisible: true, scrollAnimation: true, scrollAnimationVisible: true, scrollAnimationTimeout: 300, scrollAnimationTimeoutVisible: true, annotationRuler: true, annotationRulerVisible: true, lineNumberRuler: true, lineNumberRulerVisible: true, foldingRuler: true, foldingRulerVisible: true, overviewRuler: true, overviewRulerVisible: true, zoomRuler: false, zoomRulerVisible: true, zoomRulerLocalVisible: true, showWhitespaces: false, showWhitespacesVisible: true, wordWrap: false, wordWrapVisible: true, showMargin: false, showMarginVisible: true, marginOffset: 80, marginOffsetVisible: true, keyBindings: "Default", keyBindingsVisible: true, keyBindingsLocalVisible: true, diffService: false, diffServiceVisible: false }; We should just allow user to pass a SUBSET of this object during the widget creation, and merge the subset back to the default. For the signature of the param, we may either go with a simple object or a fancier "preference" object.
fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=1facef22e9fd8924551ac8f8963bb39aae036649
*** Bug 491938 has been marked as a duplicate of this bug. ***