* @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;
}