Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
https://bugs.eclipse.org/bugs/show_bug.cgi?id=527136
  • Loading branch information
libingw committed Nov 13, 2017
1 parent 728d2bc commit 6805d77
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 3 deletions.
Expand Up @@ -194,9 +194,47 @@ Deferred) {

var startup = function() {
createJSEditorInstance();
embeddedEditor.create({parent: "embeddedEditor1",
/*
var defaults = {
autoSave: true,
autoSaveTimeout: 250,
autoLoad: true,
saveDiffs: true,
contentAssistAutoTrigger: true,
showOccurrences: true,
autoPairParentheses: true,
autoPairBraces: true,
autoPairSquareBrackets: true,
autoPairAngleBrackets: false,
autoPairQuotations: true,
autoCompleteComments: true,
smartIndentation: true,
trimTrailingWhiteSpace: false,
tabSize: 4,
expandTab: false,
scrollAnimation: true,
scrollAnimationTimeout: 300,
annotationRuler: true,
lineNumberRuler: true,
foldingRuler: true,
overviewRuler: true,
zoomRuler: false,
showWhitespaces: false,
wordWrap: false,
showMargin: false,
marginOffset: 80,
keyBindings: "Default",
diffService: false
};
*/
embeddedEditor.create({parent: "embeddedEditor1", singleMode: true, editorConfig: {lineNumberRuler: false, overviewRuler: false},
contentType: "application/json",
contents: contents1});
contents: contents1}).then(function(editorViewer){
var height = editorViewer.editor.getTextView().computeSize().height;
var parent = document.getElementById("embeddedEditor1");
parent.style.height = height + "px"; //$NON-NLS-0$
});

embeddedEditor.create({parent: "embeddedEditor2",
contentType: "foo/bar",
contents: contents2}).then(function(editorViewer){
Expand Down Expand Up @@ -245,6 +283,7 @@ Deferred) {
editorViewer.serviceRegistry.registerService('orion.edit.occurrences',
{computeOccurrences: computeOccurrences}, {contentType: ["foo/bar"]});
});

};

var files2create = [
Expand Down
Expand Up @@ -78,8 +78,9 @@ define([
commandRegistry: this._commandRegistry,
contentTypeRegistry: this._contentTypeRegistry,
editorCommands: this._editorCommands,
editorConfig: this._editorConfig,
editorConfig: options.editorConfig ? options.editorConfig: this._editorConfig,
statusReporter: options.statusReporter,
singleMode: options.singleMode,
progressService: this._progressService,
inputManager: this._inputManager, // fake it
fileService: this._fileClient, // fake it
Expand Down
2 changes: 2 additions & 0 deletions bundles/org.eclipse.orion.client.ui/web/orion/editorView.js
Expand Up @@ -98,6 +98,7 @@ define([
this.inputManager = options.inputManager;
this.preferences = options.preferences;
this.readonly = options.readonly;
this.singleMode = options.singleMode;
this.searcher = options.searcher;
this.statusReporter = options.statusReporter;
this.model = options.model;
Expand Down Expand Up @@ -208,6 +209,7 @@ define([
}
return {
readonly: this.readonly || this.inputManager.getReadOnly(),
singleMode: this.singleMode,
tabSize: prefs.tabSize || 4,
expandTab: prefs.expandTab,
wrapMode: prefs.wordWrap,
Expand Down

0 comments on commit 6805d77

Please sign in to comment.