2 Replies Latest reply on Feb 4, 2013 5:35 PM by rcernich

    The Button Pad Is Your Friend (Updates for SWITCHYARD-954)

    bfitzpat

      Ok folks, feedback time again.

       

      For SWITCHYARD-954, we've been talking about further fleshing out the button bars in the editor to accelerate development. Less click & drag from the palette and more hover, select, and go.

       

      What follows are screen grabs of the button pad changes we're implementing.

      button-bar-composite.png

      Here you'll note a few changes for the Composite button pad. Going around the button pad from top left to bottom right, we have: Update, Syncrhonize, Auto-Layout, Service, Reference, and Component (which has a cascading list). Based on feedback from Rob, the auto-layout icon went from a circular arrow to something hinting at moving things around (thus the arrows). Clicking the service, reference, or one of the component buttons does the same action as if you clicked, dragged, and dropped something from the palette onto the canvas - just with fewer motions of the mouse. New items are added to the top left or top right of the composite, which means you'll have to hit "Auto-Layout" to get things not to stack on top of each other or move them manually.

       

      So in this case, I've created a new generic component and moved it where I want it on the Composite:

      button-bar-component.png

      On the component, you notice that the button pad includes these buttons: Delete, Service, Reference, and Implementation (with a cascading selection of Implementation types). Again, clicking any of these behaves the same way as though you clicked on something in the palette and dropped it on the Component.

       

      Now I'll select the Bean implementation and that will leave me with this:

      button-bar-component-service.png

      On the component service that was created, we see a few other buttons on the button pad: Delete, Promote, New Service Test Class, Generate WSDL File, and Edit Interface. All of these work the same way they have in the past, though Edit Interface allows you to either update the existing one or change it to a different interface type entirely.


      Now I'll promote the service so we can look at the composite-level service button bar.

       

      button-bar-service.png

      Here, we can Delete, Edit the interface, or add a new Binding to the service from the button pad.

       

      button-bar-component-reference.png

      If I create a component reference, I see a similar set of options to what we saw on the component service, but limited to Promote and Edit Interface.

       

      And the promoted reference looks exactly the same as the composite service did:

      button-bar-reference.png

       

      Long story short, what do you think?

        • 1. Re: The Button Pad Is Your Friend (Updates for SWITCHYARD-954)
          kcbabo

          This is top notch. 

           

          • What is the difference between update and synchronize on the composite bar?
          • Can we add a small bit of positioning logic for new components, composite services and composite references?  Assume these are for the middle of the item being placed:
            • Components are dropped at 50% x and 25% y of the composite (for example)
            • Composites services are aligned with left composite x and 25 % y (seems like the x alignment is happening today)
            • Composites references are aligned with right composite x and 25 % y (seems like the x alignment is happening today)
            • Bonus points - above is a starting point and additional items being added are adjusted down on the y-axis by a pre-determined pad.

           

          Note that the second item doesn't require dynamic resize.  If the user adds too many items to the composite and we overrun y, then just stack them up at the bottom.  Easy workaround for this is for the user to manually resize the composite before overrun.

          • 2. Re: The Button Pad Is Your Friend (Updates for SWITCHYARD-954)
            rcernich

            I agree with Keith.

             

            Update is for updating the figures to match the underlying model.  Auto-update is enabled, so the diagram should always be up-to-date.  Also, the diagram is udpated when it is opened, if necessary (this is how we generate the initial diagram).

             

            Synchronize is for synchronizing the contents of the editor with the generated file (in target/classes).  Synchronization occurs automatically if the editor is nto "dirty."  If the editor is dirty, this action will become enabled (e.g. if you're using a bean scanner and change a Java file).  That said, if you save the file, that will cause the output file to be regenerated and thus be synchronized automatically.  (You might see the action enabled if your machine is really slow.)

             

            For the inital positioning, I believe component service/references should be positioned automatically.  For the others, Keith's algorithms sound good to me.

             

            Great work Brian!