Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] problem in function runEventLoop(Window.IExceptionHandler handler, Display display)

Hi, Flo,

This isn't a CDT question; it would be more appropriate in the Eclipse Platform UI newsgroup.

But, in any case, I can give a quick answer:  the loop that you see is the Eclipse workbench's main run loop.  It's not supposed to exit until the workbench shuts down, so the behaviour that you observe is perfectly normal.

I suspect that an unchecked exception or an Error is being thrown from the SAXBuilder constructor that unwinds the stack all the way up to the event loop.  If so, it will be logged in your workspace log file.

HTH,

Christian



-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx on behalf of Flo Menier
Sent: Thu 3/18/2010 12:03 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] problem in function runEventLoop(Window.IExceptionHandler handler, Display display)
 
Hi all, 
when I debug mon program, I've the problem in the class below
public class MakefileEditorAction implements IObjectActionDelegate {

private ISelection selection;

@Override
public void run(IAction action) {

XMLReader.getVariableValues("data.xml");
....................................
}}
line :XMLReader.getVariableValues("data.xml");
step in the definition of this function:

public class XMLReader {
static org.jdom.Document document;
static Element racine;

public static Map<String, ArrayList<String>> getVariableValues(
String filename) {
Map<String, ArrayList<String>> valueList = new HashMap<String, ArrayList<String>>();
SAXBuilder sxb = new SAXBuilder();
try {
document = sxb.build(new File(filename));
} catch (Exception e) {
}
........
}
when i step over this line :SAXBuilder sxb = new SAXBuilder();
I entered in the class eventtable.class and then in Workbench.class:
the program run in loop, it can't get out of while...
Workbench.class:
private void runEventLoop(Window.IExceptionHandler handler, Display display) {
runEventLoop = true;
while (runEventLoop) {
try {
if (!display.readAndDispatch()) {
getAdvisor().eventLoopIdle(display);
}
} catch (Throwable t) {
handler.handleException(t);
// In case Display was closed under us
if (display.isDisposed())
   runEventLoop = false;
}
}
}


have a idea about that?
thanks,

________________________________

Hotmail : une messagerie performante et gratuite avec une s�curit� sign�e Microsoft Profitez-en <https://signup.live.com/signup.aspx?id=60969> 

<<winmail.dat>>


Back to the top