本文整理汇总了TypeScript中console.ProcessConsole类的典型用法代码示例。如果您正苦于以下问题:TypeScript ProcessConsole类的具体用法?TypeScript ProcessConsole怎么用?TypeScript ProcessConsole使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ProcessConsole类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: saveEditor
function saveEditor(update) {
var editorState: FileEditorState = FileEditor.currentEditorState();
var editorPath: FilePath = editorState.getResource();
if(editorPath != null) {
var message = {
project : Common.getProjectName(),
resource : editorPath.getFilePath(),
source : editorState.getSource(),
directory: false,
create: false
};
ProcessConsole.clearConsole();
EventBus.sendEvent("SAVE", message);
if(update) { // should the editor be updated?
return function() {
var modificationTime: number = new Date().getTime();
var fileResource: FileResource = new FileResource(editorPath, null, modificationTime, editorState.getSource(), null, false, false);
FileEditor.updateEditor(fileResource);
};
}
}
return function(){}
}
示例2: function
function(){
var message = {
project : Common.getProjectName(),
resource : resourceDetails.getFilePath()
};
ProcessConsole.clearConsole();
EventBus.sendEvent("DELETE", message);
Project.deleteEditorTab(resourceDetails.getResourcePath()); // rename tabs if open
},
示例3: deleteDirectory
export function deleteDirectory(resourceDetails: FilePath) {
if(resourceDetails != null) {
var message = {
project : Common.getProjectName(),
resource : resourceDetails.getFilePath()
};
ProcessConsole.clearConsole();
EventBus.sendEvent("DELETE", message);
}
}
示例4: saveFileWithAction
function saveFileWithAction(update, saveCallback) {
var editorState: FileEditorState = FileEditor.currentEditorState();
if (editorState.getResource() == null) {
DialogBuilder.openTreeDialog(null, false, function(resourceDetails: FilePath) {
var saveFunction = saveEditor(update);
saveCallback(saveFunction);
});
} else {
if (FileEditor.isEditorChanged()) {
// XXX don't prompt
//DialogBuilder.openTreeDialog(editorState.getResource(), true, function(resourceDetails: FilePath) {
var saveFunction = saveEditor(update);
saveCallback(saveFunction);
//});
} else {
ProcessConsole.clearConsole();
saveCallback(function(){});
}
}
}