Examples of ButtonAttribute


Examples of org.springframework.ide.eclipse.config.ui.widgets.ButtonAttribute

   * @param required denotes whether this is a required field
   * @return {@link ButtonAttribute} widget set
   */
  protected ButtonAttribute createClassAttribute(Composite client, String attr, final boolean includeInterfaces,
      boolean required) {
    ButtonAttribute buttonAttr = new ButtonAttribute(client, toolkit, attr, required) {
      @Override
      public void browse() {
        doOpenTypeDialog(attr, text.getText(), includeInterfaces);
      }

      @Override
      public void modifyAttribute() {
        editAttribute(attr, text.getText());
      }

      public void openHyperlink() {
        XmlBackedHyperlinkProvider provider = new ClassHyperlinkProvider(getConfigEditor().getTextViewer(),
            getInput(), attr);
        if (!provider.open(text.getText())) {
          openNewClassWizard(attr, text.getText());
        }
      }

      @Override
      public void update() {
        setTextValue(text, getAttributeValue(attr));
      }
    };
    buttonAttr.createAttribute();
    return buttonAttr;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.