| 
| Scope of Actions [message #46128] | Fri, 23 May 2003 11:39  |  | 
| Eclipse User  |  |  |  |  | I am working on a plugin to support the development and debugging of my own program language. I have created my own perspective for editing
 programs in my language. For debugging, I started by simply using the
 standard debug perspective with some custom enhancement for concepts
 in my language. I am not happy with this because there is too much
 baggage in the debug perspective from other languages and I feel that
 it will confuse user's of my language. For example, there is Java
 specific stuff in the main menus and the popup menu of the Expressions
 view. Also I have added my own stepping button to the Debug view, and
 people who are working with Java will be distracted by my step button.
 
 I have partially improved the situation by creating my own Debug
 perspective. Now when users install my plugin they will have two
 perspectives for my language, one for editing and one for
 debugging. This new debugging perspective has all of the Java action
 sets removed, and is much more specific to my language. Although this
 is a good improvement, the situation is not perfect. Actions and
 buttons that are added to core debug views still have contributions
 from other languages. For example, I can't get rid of the 'Add Java
 Watch Expression' from the Expression view's popup menu. Also, my
 special step button is still on the Debug view while in the regular
 Debug perspective.
 
 So the problem is one of scoping. Adding actions to popup menus and
 toolbar for views seems to be perspective-unaware. Am I right about this? Is
 there any way for view contributions to be action sets that can be
 turned on and off based on the current perspective? I can customize
 the regular debug perspective and remove the stepping actions from the
 Run menu, but I can't take them out of the view toolbar. Why don't
 view toolbar and popup contributions use the same scheme as
 contributions to the main Run menu, so that the user could customise
 his or her perspective more fully?
 
 
 This is the contribution of the button to remove all terminated runs
 on the Debug view. Notice how it doesn't refer to action sets.
 
 
 <extension
 point="org.eclipse.ui.viewActions">
 <!-- Contributions to Debug View Toolbar -->
 <viewContribution
 targetID="org.eclipse.debug.ui.DebugView"
 id="org.eclipse.debug.ui.debugview.toolbar">
 <!-- Thread Group -->
 <action
 
 id="org.eclipse.debug.ui.debugview.toolbar.removeAllTerminated "
 toolbarPath="threadGroup"
 hoverIcon="icons/full/clcl16/rem_all_co.gif"
 
 class=" org.eclipse.debug.internal.ui.actions.RemoveAllTerminatedAct ion "
 disabledIcon="icons/full/dlcl16/rem_all_co.gif"
 icon="icons/full/elcl16/rem_all_co.gif"
 helpContextId="remove_all_terminated_action_context"
 label="%RemoveAllTerminatedAction.label"
 tooltip="%RemoveAllTerminatedAction.tooltip">
 </action>
 </viewContribution>
 
 
 Patrick Baker
 |  |  |  | 
| 
| Re: Scope of Actions [message #48434 is a reply to message #46128] | Mon, 26 May 2003 12:38  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: simon.ibm.oti.lab 
 We are looking into this very issue (among other related action contribution
 problems). See bug report 36968 and add yourself to the cc list. You may
 also want to monitor the eclipse ui dev mailing list to see what solutions
 will be proposed (nothing yet has been posted)
 
 Simon :-)
 
 "Patrick Baker" <pbaker@ca.stilo.com> wrote in message
 news:balfbl$rmi$1@rogue.oti.com...
 >
 > I am working on a plugin to support the development and debugging of
 > my own program language. I have created my own perspective for editing
 > programs in my language. For debugging, I started by simply using the
 > standard debug perspective with some custom enhancement for concepts
 > in my language. I am not happy with this because there is too much
 > baggage in the debug perspective from other languages and I feel that
 > it will confuse user's of my language. For example, there is Java
 > specific stuff in the main menus and the popup menu of the Expressions
 > view. Also I have added my own stepping button to the Debug view, and
 > people who are working with Java will be distracted by my step button.
 >
 > I have partially improved the situation by creating my own Debug
 > perspective. Now when users install my plugin they will have two
 > perspectives for my language, one for editing and one for
 > debugging. This new debugging perspective has all of the Java action
 > sets removed, and is much more specific to my language. Although this
 > is a good improvement, the situation is not perfect. Actions and
 > buttons that are added to core debug views still have contributions
 > from other languages. For example, I can't get rid of the 'Add Java
 > Watch Expression' from the Expression view's popup menu. Also, my
 > special step button is still on the Debug view while in the regular
 > Debug perspective.
 >
 > So the problem is one of scoping. Adding actions to popup menus and
 > toolbar for views seems to be perspective-unaware. Am I right about this?
 Is
 > there any way for view contributions to be action sets that can be
 > turned on and off based on the current perspective? I can customize
 > the regular debug perspective and remove the stepping actions from the
 > Run menu, but I can't take them out of the view toolbar. Why don't
 > view toolbar and popup contributions use the same scheme as
 > contributions to the main Run menu, so that the user could customise
 > his or her perspective more fully?
 >
 >
 > This is the contribution of the button to remove all terminated runs
 > on the Debug view. Notice how it doesn't refer to action sets.
 >
 >
 >    <extension
 >          point="org.eclipse.ui.viewActions">
 > <!-- Contributions to Debug View Toolbar -->
 >       <viewContribution
 >             targetID="org.eclipse.debug.ui.DebugView"
 >             id="org.eclipse.debug.ui.debugview.toolbar">
 > <!-- Thread Group -->
 >          <action
 >
 > id="org.eclipse.debug.ui.debugview.toolbar.removeAllTerminated "
 >                toolbarPath="threadGroup"
 >                hoverIcon="icons/full/clcl16/rem_all_co.gif"
 >
 > class=" org.eclipse.debug.internal.ui.actions.RemoveAllTerminatedAct ion "
 >                disabledIcon="icons/full/dlcl16/rem_all_co.gif"
 >                icon="icons/full/elcl16/rem_all_co.gif"
 >                helpContextId="remove_all_terminated_action_context"
 >                label="%RemoveAllTerminatedAction.label"
 >                tooltip="%RemoveAllTerminatedAction.tooltip">
 >          </action>
 >       </viewContribution>
 >
 >
 > Patrick Baker
 >
 >
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.02584 seconds