*
* @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
*/
public void handleEvent(Event event) {
valueChanged = false;
OperationalProperties ops = getOperationalProperties();
if (event.widget == findButton) {
String className = null;
try {
String implKind = editor.getAeDescription().getFrameworkImplementation();
if (Constants.CPP_FRAMEWORK_NAME.equals(implKind)) {
FileDialog dialog = new FileDialog(getSection().getShell(), SWT.NONE);
String[] extensions = { "*.dll" };
dialog.setFilterExtensions(extensions);
String sStartDir = Platform.getLocation().toString();
dialog.setFilterPath(sStartDir);
className = dialog.open();
} else {
SelectionDialog typeDialog = JavaUI.createTypeDialog(getSection().getShell(), editor
.getEditorSite().getWorkbenchWindow(), editor.getSearchScopeForDescriptorType(),
IJavaElementSearchConstants.CONSIDER_CLASSES, false, "*");
typeDialog.setTitle(MessageFormat.format("Choose the {0} implementation class",
new Object[] { editor.descriptorTypeString() }));
typeDialog.setMessage("Filter/mask:");
if (typeDialog.open() == Window.CANCEL)
return;
Object[] result = typeDialog.getResult();
if (result != null && result.length > 0)
className = ((IType) result[0]).getFullyQualifiedName();
}
if (className == null || className.equals("")) //$NON-NLS-1$
return;
implName.setText(className);
editor.getAeDescription().setAnnotatorImplementationName(className);
valueChanged = true;
} catch (JavaModelException e) {
throw new InternalErrorCDE("unexpected Exception", e);
}
} else if (event.widget == modifiesCas) {
ops.setModifiesCas(setValueChangedBoolean(modifiesCas.getSelection(), ops.getModifiesCas()));
} else if (event.widget == multipleDeploymentAllowed) {
ops.setMultipleDeploymentAllowed(setValueChangedBoolean(multipleDeploymentAllowed
.getSelection(), ops.isMultipleDeploymentAllowed()));
} else if (event.widget == outputsNewCASes) {
ops.setOutputsNewCASes(setValueChangedBoolean(outputsNewCASes.getSelection(), ops
.getOutputsNewCASes()));
} else if (event.widget == implName) {
editor.getAeDescription().setAnnotatorImplementationName(
setValueChanged(implName.getText(), editor.getAeDescription()
.getAnnotatorImplementationName()));