Skip to content

Commit

Permalink
Add workaround for node issue 25266, where node seems to be generatin…
Browse files Browse the repository at this point in the history
…g 'compileError' events instead of 'afterCompile' events, which causes nodeclipse to miss the chance to process new scripts as they are pulled into a running application
  • Loading branch information
swingfield committed Jul 13, 2015
1 parent fc9c8a9 commit e5b5b0f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public enum DebuggerCommand {
BREAK("break"),
EXCEPTION("exception"),
AFTER_COMPILE("afterCompile"),
COMPILE_ERROR("compileError"),
SCRIPT_COLLECTED("scriptCollected"),
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,27 @@ BreakpointProcessor get(DefaultResponseHandler instance) {
command2EventProcessorGetter.put(DebuggerCommand.BREAK /* event */, bppGetter);
command2EventProcessorGetter.put(DebuggerCommand.EXCEPTION /* event */, bppGetter);

// Nodeclipse Issue 189 / node issue 25266
// Treat the "compileError" event as if it were
// the "afterCompile" event...
// This is a workaround for an apparent problem in node
// that was introduced in v0.11.14. The reported problem
// is that when a new script is required and compiled,
// the compileError event is generated instead of the
// afterCompile event.
// If this does in fact turn out to be a node issue,
// then presumably this workaround would be version-specific,
// and would only need to be activated for certain versions
// of node.
command2EventProcessorGetter.put(DebuggerCommand.COMPILE_ERROR /* event */,
new ProcessorGetter() {
@Override
AfterCompileProcessor get(DefaultResponseHandler instance) {
return instance.afterCompileProcessor;
}
});
// <end> Nodeclipse Issue 189 / node issue 25266

command2EventProcessorGetter.put(DebuggerCommand.AFTER_COMPILE /* event */,
new ProcessorGetter() {
@Override
Expand Down

0 comments on commit e5b5b0f

Please sign in to comment.