use of org.eclipse.ui.internal.ide.dialogs.CreateLinkedResourceGroup in project translationstudio8 by heartsome.
the class NewFolderDialogOfHs method createAdvancedControls.
/**
* Creates the widget for advanced options.
*
* @param parent the parent composite
*/
protected void createAdvancedControls(Composite parent) {
Preferences preferences = ResourcesPlugin.getPlugin().getPluginPreferences();
if (preferences.getBoolean(ResourcesPlugin.PREF_DISABLE_LINKING) == false && isValidContainer()) {
linkedResourceParent = new Composite(parent, SWT.NONE);
linkedResourceParent.setFont(parent.getFont());
linkedResourceParent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
linkedResourceParent.setLayout(layout);
advancedButton = new Button(linkedResourceParent, SWT.PUSH);
advancedButton.setFont(linkedResourceParent.getFont());
advancedButton.setText(IDEWorkbenchMessages.showAdvanced);
setButtonLayoutData(advancedButton);
GridData data = (GridData) advancedButton.getLayoutData();
data.horizontalAlignment = GridData.BEGINNING;
advancedButton.setLayoutData(data);
advancedButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
handleAdvancedButtonSelect();
}
});
}
linkedResourceGroup = new CreateLinkedResourceGroup(IResource.FOLDER, new Listener() {
public void handleEvent(Event e) {
validateLinkedResource();
firstLinkCheck = false;
}
}, new CreateLinkedResourceGroup.IStringValue() {
public void setValue(String string) {
folderNameField.setText(string);
}
public String getValue() {
return folderNameField.getText();
}
public IResource getResource() {
return container;
}
});
}
Aggregations