提交 b6b561d6 编写于 作者: J Johannes Rieken

Merge branch 'master' into joh/tsjs-slim

{
"account": "monacobuild",
"container": "debuggers",
"zip": "63e4d82/node-debug.zip",
"zip": "3fb9a7f/node-debug.zip",
"output": ""
}
......@@ -140,10 +140,6 @@
cursor: pointer;
}
.global-message-list li.message-list-entry .actions-container.multiple .message-action .action-button {
min-width: 45px;
text-align: center;
}
.vs .global-message-list {
background-color: #2C2C2C;
}
......
......@@ -208,7 +208,7 @@ export class MessageList {
// Actions (if none provided, add one default action to hide message)
let messageActions = this.getMessageActions(message);
li.div({ class: (total > 1 || delta < 0) ? 'actions-container multiple' : 'actions-container' }, (actionContainer) => {
li.div({ class: 'actions-container' }, (actionContainer) => {
for (let i = messageActions.length - 1; i >= 0; i--) {
let action = messageActions[i];
actionContainer.div({ class: 'message-action' }, (div) => {
......
......@@ -28,6 +28,7 @@
* Character score: 1
* Same case bonus: 1
* Upper case bonus: 1
* Consecutive match bonus: 5
* Start of word/path bonus: 7
* Start of string bonus: 8
*/
......@@ -48,40 +49,44 @@ export function score(target: string, query: string, cache?: {[id: string]: numb
const queryLower = query.toLowerCase();
let index = 0;
let lastIndexOf = -1;
let startAt = 0;
let score = 0;
while (index < queryLen) {
var indexOf = targetLower.indexOf(queryLower[index], lastIndexOf + 1);
let indexOf = targetLower.indexOf(queryLower[index], startAt);
if (indexOf < 0) {
score = 0; // This makes sure that the query is contained in the target
break;
}
lastIndexOf = indexOf;
// Character Match Bonus
// Character match bonus
score += 1;
// Same Case Bonous
// Consecutive match bonus
if (startAt === indexOf) {
score += 5;
}
// Same case bonus
if (target[indexOf] === query[indexOf]) {
score += 1;
}
// Prefix Bonus
// Start of word bonus
if (indexOf === 0) {
score += 8;
}
// Start of Word/Path Bonous
// After separator bonus
else if (wordPathBoundary.some(w => w === target[indexOf - 1])) {
score += 7;
}
// Inside Word Upper Case Bonus
// Inside word upper case bonus
else if (isUpper(target.charCodeAt(indexOf))) {
score += 1;
}
startAt = indexOf + 1;
index++;
}
......@@ -110,7 +115,7 @@ export function matches(target: string, queryLower: string): boolean {
let index = 0;
let lastIndexOf = -1;
while (index < queryLen) {
var indexOf = targetLower.indexOf(queryLower[index], lastIndexOf + 1);
let indexOf = targetLower.indexOf(queryLower[index], lastIndexOf + 1);
if (indexOf < 0) {
return false;
}
......
......@@ -76,7 +76,8 @@ export class DebugActionsWidget implements wbext.IWorkbenchContribution {
}
private onDebugStateChange(): void {
if (this.debugService.getState() === debug.State.Inactive) {
const state = this.debugService.getState();
if (state === debug.State.Disabled || state === debug.State.Inactive || state === debug.State.Initializing) {
return this.hide();
}
......
......@@ -382,6 +382,8 @@ declare module DebugProtocol {
export interface StackTraceArguments {
/** Retrieve the stacktrace for this thread. */
threadId: number;
/** the index of the first frames to return; if omitted frames start at 0. */
startFrame?: number;
/** The maximum number of frames to return. If levels is not specified or 0, all frames are returned. */
levels?: number;
}
......@@ -391,6 +393,8 @@ declare module DebugProtocol {
/** The frames of the stackframe. If the array has length zero, there are no stackframes available.
This means that there is no location information available. */
stackFrames: StackFrame[];
/** The total number of frames available. */
totalFrames?: number;
};
}
......
......@@ -526,8 +526,10 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
this.setStateAndEmit(debug.State.Initializing);
this.clearReplExpressions();
return this.textFileService.saveAll().then(() => this.extensionService.onReady()).then(() => this.setConfiguration(this.configurationManager.getConfigurationName())).then(() => {
return this.textFileService.saveAll()
.then(() => this.extensionService.onReady()
.then(() => this.setConfiguration(this.configurationManager.getConfigurationName())
.then(() => {
const configuration = this.configurationManager.getConfiguration();
if (!configuration) {
return this.configurationManager.openConfigFile(false).then(openend => {
......@@ -552,6 +554,7 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
return this.doCreateSession(configuration, changeViewState);
}
this.setStateAndEmit(debug.State.Inactive);
this.messageService.show(severity.Error, {
message: errorCount > 1 ? nls.localize('preLaunchTaskErrors', "Errors detected while running the preLaunchTask '{0}'.", configuration.preLaunchTask) :
errorCount === 1 ? nls.localize('preLaunchTaskError', "Error detected while running the preLaunchTask '{0}'.", configuration.preLaunchTask) :
......@@ -562,6 +565,7 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
})]
});
}, (err: TaskError) => {
this.setStateAndEmit(debug.State.Inactive);
if (err.code !== TaskErrors.NotConfigured) {
throw err;
}
......@@ -571,10 +575,14 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
actions: [CloseAction, this.taskService.configureAction()]
});
});
})), err => {
this.setStateAndEmit(debug.State.Inactive);
throw err;
});
}
private doCreateSession(configuration: debug.IConfig, changeViewState: boolean): TPromise<any> {
this.setStateAndEmit(debug.State.Initializing);
const key = this.configurationManager.getAdapter().aiKey;
const telemetryInfo = Object.create(null);
this.telemetryService.getTelemetryInfo().then(info => {
......
......@@ -244,7 +244,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.IRawDebugSes
if (launch.command === 'node') {
stdfork.fork(launch.argv[0], launch.argv.slice(1), {}, (err, child) => {
if (err) {
e(new Error(nls.localize('unableToLaunchDebugAdapter', "Unable to launch debug adapter from {0}.", launch.argv[0])));
e(new Error(nls.localize('unableToLaunchDebugAdapter', "Unable to launch debug adapter from '{0}'.", launch.argv[0])));
}
this.serverProcess = child;
c(null);
......@@ -304,7 +304,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.IRawDebugSes
if (exists) {
c(null);
} else {
e(new Error(nls.localize('debugAdapterBinNotFound', "DebugAdapter bin folder not found on path {0}.", this.adapter.program)));
e(new Error(nls.localize('debugAdapterBinNotFound', "Debug adapter executable '{0}' not found.", this.adapter.program)));
}
});
}).then(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册