Announcement Announcement Module
Collapse
No announcement yet.
Toolbar in a view? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Toolbar in a view?

    Hi all.

    I am using Jide Docking Framework and the Spring RCP Jide Integration project found at https://jide-springrcp.dev.java.net/.

    I want to use the feature of Jide that allows a toolbar on the DockingFrame, but I cannot seem to find a good way to configure this.

    Any help would be appreciated

    Thanks

    Trevor

  • #2
    Re: Toolbar in a view?

    Trevor,

    currently there's no way of specifying a view specific toolbar. I've not had the need to do this so I've not implemented it. I will, however, look into it and see what I can come up with.

    Jonny

    Originally posted by tdunn
    Hi all.

    I am using Jide Docking Framework and the Spring RCP Jide Integration project found at https://jide-springrcp.dev.java.net/.

    I want to use the feature of Jide that allows a toolbar on the DockingFrame, but I cannot seem to find a good way to configure this.

    Any help would be appreciated

    Thanks

    Trevor

    Comment


    • #3
      Hi Jonny

      It looks as if some work is being done on this.
      http://opensource2.atlassian.com/pro.../browse/RCP-81

      Once this happens, I guess you would have to make a call to setToolBarComponent on the DockableFrame in the createDockableFrame method of DockingApplicationPage.

      Trevor

      Comment


      • #4
        Trevor,

        thanks for that link, I was half way through implementing something so it was useful.

        So, I've got something together that, at least at a basic level, works. Until the changes to the basic framework mentioned in the link are made though I've had to put some work arounds in, which basically implies any view that needs the functionality will have to extend a specific view implementation.

        Anyway, the funtionality I implemented means if you extend a specific view class then it will look in the command definitions for a command group for both a toolbar and a menu bar and, if they exist (using the magic names suggested in the link), will add to the view. In addition, I've given the option to override the magic names with whatever name you'd like and also override the creation of the toolbar and menu bar if you don't want to use the decarative command group mechanism

        Is this basically what you had in mind? As I mentioned, I don't have a use for this right now so it's hard to test. Let me know if this fits what you're after and if so I'll commit it. Alternatively, let me know what's missing.

        thanks
        Jonny

        Originally posted by tdunn
        Hi Jonny

        It looks as if some work is being done on this.
        http://opensource2.atlassian.com/pro.../browse/RCP-81

        Once this happens, I guess you would have to make a call to setToolBarComponent on the DockableFrame in the createDockableFrame method of DockingApplicationPage.

        Trevor

        Comment


        • #5
          Thanks Jonny.

          What you described seems great to me. It should do fine.

          Thanks
          Trevor

          Originally posted by jwray
          Trevor,

          thanks for that link, I was half way through implementing something so it was useful.

          So, I've got something together that, at least at a basic level, works. Until the changes to the basic framework mentioned in the link are made though I've had to put some work arounds in, which basically implies any view that needs the functionality will have to extend a specific view implementation.

          Anyway, the funtionality I implemented means if you extend a specific view class then it will look in the command definitions for a command group for both a toolbar and a menu bar and, if they exist (using the magic names suggested in the link), will add to the view. In addition, I've given the option to override the magic names with whatever name you'd like and also override the creation of the toolbar and menu bar if you don't want to use the decarative command group mechanism

          Is this basically what you had in mind? As I mentioned, I don't have a use for this right now so it's hard to test. Let me know if this fits what you're after and if so I'll commit it. Alternatively, let me know what's missing.

          thanks
          Jonny

          Originally posted by tdunn
          Hi Jonny

          It looks as if some work is being done on this.
          http://opensource2.atlassian.com/pro.../browse/RCP-81

          Once this happens, I guess you would have to make a call to setToolBarComponent on the DockableFrame in the createDockableFrame method of DockingApplicationPage.

          Trevor

          Comment


          • #6
            Trevor,

            I've committed the changes I made to support view specific menus and toolbars. The simple example application uses the MessagesView to illustrate the useage.

            Summary of the most simple way of enabling a view to have its own toolbar and/or menu:

            i) the view should extend DockingAbstractView, which itself extends AbstractView.

            ii) A command group should be defined for both the toolbar and menu in the file with the rest of the command definitions. The command group ids can either be the default constructed ids (eg messagesView.viewToolBar for a toolbar in the view with id messagesView) or you can specify the ids to use in the view definition.

            try it out and let me know what you think,
            Jonny

            Comment


            • #7
              Hi Jonny

              I got a chance to try out your stuff and it worked like a charm.

              Thanks a lot, I really appreciate it.

              Trevor

              Comment


              • #8
                Good to hear.

                Strange, but as soon as I implemented it I came across a use case in my application where it made sense, so it was useful for me also.

                However, I came across the situation in which the view specific commands need context information (eg a reference to the actual view) and there's no way currently for this command context to be specified, at least with the declarative solution. It's something I'm going to think about though.

                You can always override the programmatic hooks to get the view specific toolbar and menu.

                Originally posted by tdunn
                Hi Jonny

                I got a chance to try out your stuff and it worked like a charm.

                Thanks a lot, I really appreciate it.

                Trevor

                Comment

                Working...
                X