Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Please Help! Runnable Interface in Console not Working
Please Help! Runnable Interface in Console not Working [message #257931] Fri, 02 July 2004 13:03
Eclipse UserFriend
Originally posted by: elwino.runbox.com

Hello,

I'm creating derivative of the Debug Console (v 2.1). Essentially, I'm
going to use it to display outputs from an external process. I've gotten
pretty far, but for some reason, I just can't figure out why I'm getting a
failed to execute Runnable error.

This is a sample of my code that sets up the process and sets the console
viewer input to that process.

// initialize input, after viewer has been created

String[] cmdLine = {"\\windows\\system32\\cmd.exe"};

Process p;

IProcess process = null;


// add process type to process attributes



if (extension != null) {

programName = programName.substring(0, programName.length() -
(extension.length() + 1));

}

programName = programName.toLowerCase();

try {

p = DebugPlugin.exec(cmdLine);

process = DebugPlugin.newProcess(null, p, programName);

} catch (CoreException e) {

e.printStackTrace();

}

setViewerInput(process);


public void setViewerInput(IProcess process) {

setProcess(process) ;


Runnable r = new Runnable() {

public void run() {

IDocument doc = null;

System.out.println(getProcess().toString());

doc =
DebugUIPlugin.getDefault().getConsoleDocumentManager().getCo nsoleDocument(ge
tProcess());

getConsoleViewer().setDocument(doc);

System.out.println("Here I am");

getConsoleViewer().setEditable(true);

System.out.println(doc.getLength());

updateTitle();

updateObjects();

updateSelectionDependentActions();

fKeyBindingFollowLinkAction.clearStatusLine();

}


};

getConsoleViewer().getControl().getDisplay().asyncExec(r);

}



I'd appreciate any help. I've been staring at this code for 3 days now.

Cheers,

Elwin
Previous Topic:from wizart to view
Next Topic:Java element code generation problems
Goto Forum:
  


Current Time: Thu Jul 03 10:49:55 EDT 2025

Powered by FUDForum. Page generated in 0.17644 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top