Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-debug-dev] How to input a string as arg of MI command?

> 
> But the approach to wrap the code in a runnable does not work.
> The same error occurred when PlatformUI.getWorkbench(); was called.
> Unhandled exception caught in event loop.
> Reason:
> org/eclipse/ui/PlatformUI
> 
> btw, I did not find the method getDisplay() in IWorkbench.
> 

Eclipse-3.0

PlatformUI.getWorkbench().getDisplay()

	/**
	 * Returns the display for this workbench.
	 * <p>
	 * Code should always ask the workbench for the display rather than rely on
	 * {@link Display#getDefault Display.getDefault()}.
	 * </p>
	 * 
	 * @return the display to be used for all UI interactions with this
	 *         workbench
	 * @since 3.0
	 */
	public Display getDisplay();

> I know Mikhail's approach is much better. But in my case, the parameter will
> change frequently. If it is set in the "Debugger" page of the launch
> configuration dialog, users have to launch a new debugger session and modify
> the configuration when they want to change the parameter. That's rather
> complicated.
> So, I need a simple and direct way to send parameters to one debugger
> session.
> 

Have the launch open the dialog each time.
This is what we do for "attach to process".  In the GDB debug launch
if you choose "attach" setting, every time you launch, a dialog box will appear
with a list of processes to choose.

Because of the clear separation of the UI thread in eclipse, just
opening a dialog anywhere is not that simple 8-)

> 



Back to the top