description:
exception is thrown out when restart birt without closing the chart builder.

build number:
2.6.0.v20100317-0630

steps to reproduce:
1. new a chart (keep the chart builder open).
2. activate the highcontrast function using the keyboard shortcut (left-alt+left-shift+printscreen), and click ok to restart birt-all-in-one.
3. check the error log view.

expected result:
no exception.

actual result:
exception is thrown out.
error log:
org.eclipse.birt.report.designer.core.runtime.guiexception: caused by java.lang.nullpointerexception.
at org.eclipse.birt.report.designer.core.runtime.guiexception.createguiexception(guiexception.java:78)
at org.eclipse.birt.report.designer.internal.ui.util.exceptionhandler.handle(exceptionhandler.java:169)
at org.eclipse.birt.report.designer.internal.ui.util.exceptionhandler.handle(exceptionhandler.java:150)
at org.eclipse.birt.report.designer.internal.ui.util.exceptionhandler.handle(exceptionhandler.java:89)
at org.eclipse.birt.report.designer.ui.actions.baseinsertmenuaction.run(baseinsertmenuaction.java:282)
at org.eclipse.jface.action.action.runwithevent(action.java:498)
at org.eclipse.jface.action.actioncontributionitem.handlewidgetselection(actioncontributionitem.java:584)
at org.eclipse.jface.action.actioncontributionitem.access$2(actioncontributionitem.java:501)
at org.eclipse.jface.action.actioncontributionitem$5.handleevent(actioncontributionitem.java:411)
at org.eclipse.swt.widgets.eventtable.sendevent(eventtable.java:84)
at org.eclipse.swt.widgets.widget.sendevent(widget.java:1050)
at org.eclipse.swt.widgets.display.rundeferredevents(display.java:4037)
at org.eclipse.swt.widgets.display.readanddispatch(display.java:3628)
at org.eclipse.ui.internal.workbench.runeventloop(workbench.java:2416)
at org.eclipse.ui.internal.workbench.runui(workbench.java:2380)
at org.eclipse.ui.internal.workbench.access$4(workbench.java:2229)
at org.eclipse.ui.internal.workbench$5.run(workbench.java:504)
at org.eclipse.core.databinding.observable.realm.runwithdefault(realm.java:332)
at org.eclipse.ui.internal.workbench.createandrunworkbench(workbench.java:497)
at org.eclipse.ui.platformui.createandrunworkbench(platformui.java:149)
at org.eclipse.ui.internal.ide.application.ideapplication.start(ideapplication.java:115)
at org.eclipse.equinox.internal.app.eclipseapphandle.run(eclipseapphandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.eclipseapplauncher.runapplication(eclipseapplauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.eclipseapplauncher.start(eclipseapplauncher.java:79)
at org.eclipse.core.runtime.adaptor.eclipsestarter.run(eclipsestarter.java:369)
at org.eclipse.core.runtime.adaptor.eclipsestarter.run(eclipsestarter.java:179)
at sun.reflect.nativemethodaccessorimpl.invoke0(native method)
at sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39)
at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25)
at java.lang.reflect.method.invoke(method.java:585)
at org.eclipse.equinox.launcher.main.invokeframework(main.java:619)
at org.eclipse.equinox.launcher.main.basicrun(main.java:574)
at org.eclipse.equinox.launcher.main.run(main.java:1406)
caused by: java.lang.nullpointerexception
at org.eclipse.birt.report.designer.ui.actions.baseinsertmenuaction.selectelement(baseinsertmenuaction.java:207)
at org.eclipse.birt.report.designer.ui.actions.baseinsertmenuaction.run(baseinsertmenuaction.java:275)
... 28 more
error log:
java.util.emptystackexception
at java.util.stack.peek(stack.java:79)
at java.util.stack.pop(stack.java:61)
at org.eclipse.birt.report.model.activity.activitystack.rollback(activitystack.java:779)
at org.eclipse.birt.report.designer.ui.actions.baseinsertmenuaction.run(baseinsertmenuaction.java:284)
at org.eclipse.jface.action.action.runwithevent(action.java:498)
at org.eclipse.jface.action.actioncontributionitem.handlewidgetselection(actioncontributionitem.java:584)
at org.eclipse.jface.action.actioncontributionitem.access$2(actioncontributionitem.java:501)
at org.eclipse.jface.action.actioncontributionitem$5.handleevent(actioncontributionitem.java:411)
at org.eclipse.swt.widgets.eventtable.sendevent(eventtable.java:84)
at org.eclipse.swt.widgets.widget.sendevent(widget.java:1050)
at org.eclipse.swt.widgets.display.rundeferredevents(display.java:4037)
at org.eclipse.swt.widgets.display.readanddispatch(display.java:3628)
at org.eclipse.ui.internal.workbench.runeventloop(workbench.java:2416)
at org.eclipse.ui.internal.workbench.runui(workbench.java:2380)
at org.eclipse.ui.internal.workbench.access$4(workbench.java:2229)
at org.eclipse.ui.internal.workbench$5.run(workbench.java:504)
at org.eclipse.core.databinding.observable.realm.runwithdefault(realm.java:332)
at org.eclipse.ui.internal.workbench.createandrunworkbench(workbench.java:497)
at org.eclipse.ui.platformui.createandrunworkbench(platformui.java:149)
at org.eclipse.ui.internal.ide.application.ideapplication.start(ideapplication.java:115)
at org.eclipse.equinox.internal.app.eclipseapphandle.run(eclipseapphandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.eclipseapplauncher.runapplication(eclipseapplauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.eclipseapplauncher.start(eclipseapplauncher.java:79)
at org.eclipse.core.runtime.adaptor.eclipsestarter.run(eclipsestarter.java:369)
at org.eclipse.core.runtime.adaptor.eclipsestarter.run(eclipsestarter.java:179)
at sun.reflect.nativemethodaccessorimpl.invoke0(native method)
at sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39)
at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25)
at java.lang.reflect.method.invoke(method.java:585)
at org.eclipse.equinox.launcher.main.invokeframework(main.java:619)
at org.eclipse.equinox.launcher.main.basicrun(main.java:574)
at org.eclipse.equinox.launcher.main.run(main.java:1406)
when restart birt-all-in-one,return false when edit the chart.
fixed by returning false if chart builder dialog is not closed by pressing ok button.
verify the bug
closed.