use of org.talend.core.model.metadata.builder.connection.impl.QueryImpl in project tdi-studio-se by Talend.
the class ContextModeSessionSwitcher method createControl.
@Override
protected Control createControl(Composite parent) {
button = new Button(parent, SWT.CHECK);
//$NON-NLS-1$
button.setText(Messages.getString("ContextModeSessionSwitcher.buttonText"));
final Query query = (QueryImpl) contextmodeaction.getQuery();
// judge from repository node
if (query != null) {
button.setSelection(query.isContextMode());
// judge from designer built-in
} else {
button.setSelection(contextmodeaction.getParameters().getIfContextButtonCheckedFromBuiltIn());
}
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
contextmodeaction.setChecked(button.getSelection());
contextmodeaction.getParameters().setIfContextButtonCheckedFromBuiltIn(button.getSelection());
// judge dirty
MultiPageSqlBuilderEditor m = editor.getMultiPageEditor();
m.updateEditorTitle(null);
}
});
return button;
}
Aggregations