Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Dropdown toolbar button
Dropdown toolbar button [message #149862] Fri, 03 September 2004 18:49 Go to next message
Eclipse UserFriend
Originally posted by: mward.harmonia.com

HI!

Im trying to implement an Undo tolbar button that will have a dropdown
menu of the most rescent undo-able actions. I am implementing the
toolbar through an ActionBarContributor and the Undo does have a
RetargetAction that in its constructor has the IAction.AS_DROP_DOWN_MENU
(so i can get the black arrow to appear). My problem is how to populate
the black arrow's list. (Right now it just fires the Undo action).
Any Help would be greatly appreciated.

-Matt
Re: Dropdown toolbar button [message #149869 is a reply to message #149862] Fri, 03 September 2004 19:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

I don't think you can get to the undo and redo Stacks.
Open a bugzilla. You would have to subclass and keep track of the commands
yourself.

"Matthew Ward" <mward@harmonia.com> wrote in message
news:chae5n$8qj$1@eclipse.org...
> HI!
>
> Im trying to implement an Undo tolbar button that will have a dropdown
> menu of the most rescent undo-able actions. I am implementing the
> toolbar through an ActionBarContributor and the Undo does have a
> RetargetAction that in its constructor has the IAction.AS_DROP_DOWN_MENU
> (so i can get the black arrow to appear). My problem is how to populate
> the black arrow's list. (Right now it just fires the Undo action).
> Any Help would be greatly appreciated.
>
> -Matt
Re: Dropdown toolbar button [message #149885 is a reply to message #149869] Fri, 03 September 2004 19:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mward.harmonia.com

Randy Hudson wrote:

> I don't think you can get to the undo and redo Stacks.
> Open a bugzilla. You would have to subclass and keep track of the commands
> yourself.
>
> "Matthew Ward" <mward@harmonia.com> wrote in message
> news:chae5n$8qj$1@eclipse.org...
>
>>HI!
>>
>>Im trying to implement an Undo tolbar button that will have a dropdown
>>menu of the most rescent undo-able actions. I am implementing the
>>toolbar through an ActionBarContributor and the Undo does have a
>>RetargetAction that in its constructor has the IAction.AS_DROP_DOWN_MENU
>>(so i can get the black arrow to appear). My problem is how to populate
>>the black arrow's list. (Right now it just fires the Undo action).
>>Any Help would be greatly appreciated.
>>
>>-Matt
>
>
>
Well it depends where i am trying to implement the population of the
drop down menu. Right now I have thigns set up for a context menu where
it gives a detailed undo description (i.E. "Undo: object property
change" etc.) So I think i can figure it out. I just need help with what
class needs to implement what and where, to get this thing to work
right. (I know that sounds really confusing....that kinda where I'm at
right now).
Re: Dropdown toolbar button [message #149893 is a reply to message #149885] Fri, 03 September 2004 20:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mward.harmonia.com

Matthew Ward wrote:
Alright sorry, you were right. We are keeping track of our CommandStack.
I just dont know how I should be implementing that action associated
with clicking the black down arrow. I know the Action is supposed to
Implement IMenuCreator, but after that I believe I am missing a few
details. Is there anything outside my Action class that needs to do
anything to get the drop down menu to work?
Thanks, -Matt

> Randy Hudson wrote:
>
>> I don't think you can get to the undo and redo Stacks.
>> Open a bugzilla. You would have to subclass and keep track of the
>> commands
>> yourself.
>>
>> "Matthew Ward" <mward@harmonia.com> wrote in message
>> news:chae5n$8qj$1@eclipse.org...
>>
>>> HI!
>>>
>>> Im trying to implement an Undo tolbar button that will have a dropdown
>>> menu of the most rescent undo-able actions. I am implementing the
>>> toolbar through an ActionBarContributor and the Undo does have a
>>> RetargetAction that in its constructor has the IAction.AS_DROP_DOWN_MENU
>>> (so i can get the black arrow to appear). My problem is how to populate
>>> the black arrow's list. (Right now it just fires the Undo action).
>>> Any Help would be greatly appreciated.
>>>
>>> -Matt
>>
>>
>>
>>
> Well it depends where i am trying to implement the population of the
> drop down menu. Right now I have thigns set up for a context menu where
> it gives a detailed undo description (i.E. "Undo: object property
> change" etc.) So I think i can figure it out. I just need help with what
> class needs to implement what and where, to get this thing to work
> right. (I know that sounds really confusing....that kinda where I'm at
> right now).
Re: Dropdown toolbar button [message #149984 is a reply to message #149893] Tue, 07 September 2004 14:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

We have one example of this type of Action in the PaletteCustomizerDialog.
You can look at our implementation but this is really a JFace question.

"Matthew Ward" <mward@harmonia.com> wrote in message
news:chakjm$jl4$1@eclipse.org...
> Matthew Ward wrote:
> Alright sorry, you were right. We are keeping track of our CommandStack.
> I just dont know how I should be implementing that action associated
> with clicking the black down arrow. I know the Action is supposed to
> Implement IMenuCreator, but after that I believe I am missing a few
> details. Is there anything outside my Action class that needs to do
> anything to get the drop down menu to work?
> Thanks, -Matt
>
Re: Dropdown toolbar button [message #149996 is a reply to message #149984] Tue, 07 September 2004 20:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mward.harmonia.com

Randy Hudson wrote:
> We have one example of this type of Action in the PaletteCustomizerDialog.
> You can look at our implementation but this is really a JFace question.
>
> "Matthew Ward" <mward@harmonia.com> wrote in message
> news:chakjm$jl4$1@eclipse.org...
>
>>Matthew Ward wrote:
>>Alright sorry, you were right. We are keeping track of our CommandStack.
>>I just dont know how I should be implementing that action associated
>>with clicking the black down arrow. I know the Action is supposed to
>>Implement IMenuCreator, but after that I believe I am missing a few
>>details. Is there anything outside my Action class that needs to do
>>anything to get the drop down menu to work?
>>Thanks, -Matt
>>
>
>
> In what package can i find that class(PaletteCustomizerDialog)?
Re: Dropdown toolbar button [message #150004 is a reply to message #149996] Tue, 07 September 2004 20:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mward.harmonia.com

Matthew Ward wrote:

> Randy Hudson wrote:
>
>> We have one example of this type of Action in the
>> PaletteCustomizerDialog.
>> You can look at our implementation but this is really a JFace question.
>>
>> "Matthew Ward" <mward@harmonia.com> wrote in message
>> news:chakjm$jl4$1@eclipse.org...
>>
>>> Matthew Ward wrote:
>>> Alright sorry, you were right. We are keeping track of our CommandStack.
>>> I just dont know how I should be implementing that action associated
>>> with clicking the black down arrow. I know the Action is supposed to
>>> Implement IMenuCreator, but after that I believe I am missing a few
>>> details. Is there anything outside my Action class that needs to do
>>> anything to get the drop down menu to work?
>>> Thanks, -Matt
>>>
>>
>>
>> In what package can i find that class(PaletteCustomizerDialo

I found the class you were talking about...I don't know if thats along
the lines of what I am looking for. I am trying to keep uniformity in my
code and everything else thus far has been implemented be using
RetargetActions and ActionBarContributor. (I know within the constructor
of RetargetAction it provides for IAction.AS_DROP_DOWN MENU to cause the
black arrow to appear.
Re: Dropdown toolbar button [message #150009 is a reply to message #150004] Tue, 07 September 2004 21:18 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Actually, that contribution item is irrelevant. Look for the use of the
item, and the action which goes into it is an IMenuCreator
"Matthew Ward" <mward@harmonia.com> wrote in message
news:chl673$fst$1@eclipse.org...
> Matthew Ward wrote:
>
> > Randy Hudson wrote:
> >
> >> We have one example of this type of Action in the
> >> PaletteCustomizerDialog.
> >> You can look at our implementation but this is really a JFace question.
> >>
> >> "Matthew Ward" <mward@harmonia.com> wrote in message
> >> news:chakjm$jl4$1@eclipse.org...
> >>
> >>> Matthew Ward wrote:
> >>> Alright sorry, you were right. We are keeping track of our
CommandStack.
> >>> I just dont know how I should be implementing that action associated
> >>> with clicking the black down arrow. I know the Action is supposed to
> >>> Implement IMenuCreator, but after that I believe I am missing a few
> >>> details. Is there anything outside my Action class that needs to do
> >>> anything to get the drop down menu to work?
> >>> Thanks, -Matt
> >>>
> >>
> >>
> >> In what package can i find that class(PaletteCustomizerDialo
>
> I found the class you were talking about...I don't know if thats along
> the lines of what I am looking for. I am trying to keep uniformity in my
> code and everything else thus far has been implemented be using
> RetargetActions and ActionBarContributor. (I know within the constructor
> of RetargetAction it provides for IAction.AS_DROP_DOWN MENU to cause the
> black arrow to appear.
Previous Topic:Relative and Absolute coordinate
Next Topic:GEF 3.0.1 Create Pallete Error
Goto Forum:
  


Current Time: Fri Apr 26 02:50:48 GMT 2024

Powered by FUDForum. Page generated in 0.03578 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top