kopia lustrzana https://github.com/c9/core
Add api support for salesforce
rodzic
903ab6f1d8
commit
ecd1d928de
|
@ -721,6 +721,8 @@ module.exports = function(options) {
|
||||||
|
|
||||||
"plugins/c9.ide.test.mocha/mocha",
|
"plugins/c9.ide.test.mocha/mocha",
|
||||||
|
|
||||||
|
"plugins/salesforce.sync/package.editor",
|
||||||
|
|
||||||
// git integration
|
// git integration
|
||||||
"plugins/c9.ide.scm/scm",
|
"plugins/c9.ide.scm/scm",
|
||||||
"plugins/c9.ide.scm/scmpanel",
|
"plugins/c9.ide.scm/scmpanel",
|
||||||
|
|
|
@ -259,12 +259,19 @@ define(function(require, module, exports) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var currentValue = plugin.document.value;
|
||||||
|
|
||||||
editorType = type;
|
editorType = type;
|
||||||
amlTab.setAttribute("type", "editor::" + type);
|
amlTab.setAttribute("type", "editor::" + type);
|
||||||
|
|
||||||
if (amlPane.getPage() == amlTab) {
|
if (amlPane.getPage() == amlTab) {
|
||||||
amlPane.activepage = -1;
|
amlPane.activepage = -1;
|
||||||
amlPane.set(amlTab);
|
amlPane.set(amlTab);
|
||||||
|
|
||||||
|
plugin.document.value = currentValue;
|
||||||
|
// TODO undo managers for different editors conflict
|
||||||
|
// however, resetting removes changed state
|
||||||
|
// plugin.document.undoManager.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
callback();
|
callback();
|
||||||
|
|
|
@ -25,6 +25,7 @@ define(function(require, module, exports) {
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var item = stack[position];
|
var item = stack[position];
|
||||||
|
if (!item) return;
|
||||||
if (!item.undo)
|
if (!item.undo)
|
||||||
item = stack[position] = findItem(item);
|
item = stack[position] = findItem(item);
|
||||||
position--;
|
position--;
|
||||||
|
@ -43,6 +44,7 @@ define(function(require, module, exports) {
|
||||||
|
|
||||||
position++;
|
position++;
|
||||||
var item = stack[position];
|
var item = stack[position];
|
||||||
|
if (!item) return;
|
||||||
if (!item.redo)
|
if (!item.redo)
|
||||||
item = stack[position] = findItem(item);
|
item = stack[position] = findItem(item);
|
||||||
item.redo();
|
item.redo();
|
||||||
|
@ -119,7 +121,7 @@ define(function(require, module, exports) {
|
||||||
stack: stack
|
stack: stack
|
||||||
.filter(function(item){ return item; })
|
.filter(function(item){ return item; })
|
||||||
.map(function(item) {
|
.map(function(item) {
|
||||||
return item.getState ? item.getState() : item;
|
return item && item.getState ? item.getState() : item;
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -141,7 +143,7 @@ define(function(require, module, exports) {
|
||||||
return emit("itemFind", { state: compressedItem });
|
return emit("itemFind", { state: compressedItem });
|
||||||
}
|
}
|
||||||
|
|
||||||
function reset(){
|
function reset(keepChange){
|
||||||
if (position == -1)
|
if (position == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -456,6 +456,7 @@ define(function(require, exports, module) {
|
||||||
case "dropdown":
|
case "dropdown":
|
||||||
var dropdown = el.lastChild;
|
var dropdown = el.lastChild;
|
||||||
|
|
||||||
|
if (item.items) {
|
||||||
var data = item.items.map(function(item) {
|
var data = item.items.map(function(item) {
|
||||||
return "<item value='" + item.value
|
return "<item value='" + item.value
|
||||||
+ "'><![CDATA[" + item.caption + "]]></item>";
|
+ "'><![CDATA[" + item.caption + "]]></item>";
|
||||||
|
@ -471,6 +472,10 @@ define(function(require, exports, module) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (item.value) {
|
||||||
|
dropdown.setAttribute("value", item.value);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if ("value" in item)
|
if ("value" in item)
|
||||||
|
|
Ładowanie…
Reference in New Issue