Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-debug-dev] Some questions about using the LaunchView Context support.

On Wednesday 03 March 2004 11:03 am, Jeff Turnham wrote:
> 5.  When the user terminates the Compiled Debug Session, the Modules View
> is removed.

Bug 53548 - Automatically close views that were opened automatically
https://bugs.eclipse.org/bugs/show_bug.cgi?id=53548

We plan to investigate this option in the near future.

> 1.  It seems that on a fresh Debug Perspective, the LauchViewContext
> Listener deems there to be no active contexts so it shows all views.

I don't know how this is possible. If you can reproduce this, please file a 
bug report against Platform-Debug.

> 4.  I can't seem to find the right combination of autoOpen/autoClose
> settings to both allow the Modules view to only open for the Compiled
> Debug context, but ALSO stay open when the user selects a Java Stack
> Frame.  

If you actually want this "specific" behavior (and I'm guessing it was just an 
example...), you could just add another context binding which bound your view 
to the jdt.debugging context but set autoOpen="false". This would mean it 
would only be opened by your context, but it wouldn't be closed when the user 
switched to Java.

> So what I think I'm asking for is that my context bindings be 
> respected even if my StackFrame is not selected in the Debug View.   Just
> the fact that it's there, means I may want to examine the contents of the
> views.  I don't necessarily want all my Compiled Language Views to
> disappear when I click on a different type of Stack Frame.   But I DO want
> my views to disappear when there is no applicable Stack Frame. (does that
> make sense?)

The autoClose option was written to accommodate views with "static" content 
which might remain interesting to the user even when they switch contexts. 
For example, Java's "Display View" contains expressions that the user has 
typed in and the results of evaluations. It's conceivable that the text in 
that view might remain useful to the user even when they switch to a 
different debugging context.

Views whose content is selection-based and debug-model specific shouldn't 
specify autoClose="false". For example, Java's "Threads and Monitors" view 
can only show useful content when Java Debug elements are selected. If the 
user selects a C stack frame, this view no longer makes sense so it allows 
itself to be closed.

That said...

The automatic closing of views when the target terminates might prove to be a 
little tricky. For now, I think it will just close all views that were opened 
when a target terminates and there are no more active targets. We could 
provide another flag in the extension point to let clients say "don't close 
me when all targets terminate". It wouldn't be a big deal for us to add this, 
but I'm not sure why you'd want this separate from the autoClose flag. The 
only view we have like this is the Display view, so maybe I just need another 
example. But I figure if we say its contents are interesting when you switch 
to a non-applicable contents, then they're just as interesting when you're 
done debugging (again, because of the view's "static" nature).

Can you explain why you would want your Compiled Language views open when 
someone switches to debugging PHP but you wouldn't want them open when the 
target terminates?

>    <extension
>          point="org.eclipse.debug.ui.contextViewBindings">
>       <contextViewBinding
>             viewId="com.ibm.debug.pdt.ui.ModulesView"
>             contextId="com.ibm.debug.pdt.ui.debugging"
>             autoOpen="true"
>             autoClose="false">
>       </contextViewBinding>
>     </extension>

Just so you know, autoOpen="true" is the default behavior, so you don't have 
to specify this if you want to save yourself a few lines of XML.

- Jared



Back to the top