use of org.eclipse.jface.wizard.WizardDialog in project tesb-studio-se by Talend.
the class OpenCamelExistVersionProcessAction method doRun.
@Override
protected void doRun() {
ISelection selection = getSelection();
Object obj = ((IStructuredSelection) selection).getFirstElement();
IRepositoryNode node = (IRepositoryNode) obj;
IPath path = RepositoryNodeUtilities.getPath(node);
String originalName = node.getObject().getLabel();
RepositoryObject repositoryObj = new RepositoryObject(node.getObject().getProperty());
repositoryObj.setRepositoryNode(node.getObject().getRepositoryNode());
OpenCamelExistVersionProcessWizard wizard = new OpenCamelExistVersionProcessWizard(repositoryObj);
WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
dialog.setHelpAvailable(false);
dialog.setPageSize(300, 250);
//$NON-NLS-1$
dialog.setTitle(Messages.getString("OpenExistVersionProcess.open.dialog"));
if (dialog.open() == Dialog.OK) {
refresh(node);
// refresh the corresponding editor's name
IEditorPart part = getCorrespondingEditor(node);
if (part != null && part instanceof IUIRefresher) {
((IUIRefresher) part).refreshName();
} else {
processRoutineRenameOperation(originalName, node, path);
}
}
}
use of org.eclipse.jface.wizard.WizardDialog in project tesb-studio-se by Talend.
the class RunContainerPreferencePage method createPageContents.
/**
* Create contents of the preference page.
*
* @param parent
*/
@Override
public Control createPageContents(Composite parent) {
serverFieldEditors = new ArrayList<FieldEditor>();
optionFieldEditors = new ArrayList<FieldEditor>();
runtimeEnable = getPreferenceStore().getBoolean(RunContainerPreferenceInitializer.P_ESB_IN_OSGI);
GridLayout gridLayoutDefault = new GridLayout(1, false);
Composite body = new Composite(parent, SWT.NONE);
body.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
body.setLayout(gridLayoutDefault);
getPreferenceStore().getBoolean(RunContainerPreferenceInitializer.P_ESB_IN_OSGI);
useOSGiEditor = new BooleanFieldEditor(RunContainerPreferenceInitializer.P_ESB_IN_OSGI, "ESB Studio Runtime - Use Local Talend Runtime (OSGi Container)", body);
addField(useOSGiEditor);
Label lblNote = new Label(body, SWT.WRAP);
lblNote.setText("Note: It will be only taken into account for an ESB Artifact:\n" + " · A Route (Any Route)\n" + " · A DataService (SOAP/REST)\n" + " · A Job contains tRESTClient or tESBConsumer component");
Group groupServer = new Group(body, SWT.NONE);
//$NON-NLS-1$
groupServer.setText(RunContainerMessages.getString("RunContainerPreferencePage.Group1"));
groupServer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
groupServer.setLayout(new GridLayout(2, false));
compositeServerBody = new Composite(groupServer, SWT.BORDER);
compositeServerBody.setLayout(gridLayoutDefault);
compositeServerBody.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
StringFieldEditor locationEditor = new StringFieldEditor(RunContainerPreferenceInitializer.P_ESB_RUNTIME_LOCATION, RunContainerMessages.getString("RunContainerPreferencePage.Location"), //$NON-NLS-1$
compositeServerBody);
addField(locationEditor);
serverFieldEditors.add(locationEditor);
StringFieldEditor hostFieldEditor = new StringFieldEditor(RunContainerPreferenceInitializer.P_ESB_RUNTIME_HOST, RunContainerMessages.getString("RunContainerPreferencePage.Host"), compositeServerBody);
addField(hostFieldEditor);
// only support local runtime server, if need support remote server ,enable this editor
hostFieldEditor.setEnabled(false, compositeServerBody);
StringFieldEditor userFieldEditor = new StringFieldEditor(RunContainerPreferenceInitializer.P_ESB_RUNTIME_USERNAME, RunContainerMessages.getString("RunContainerPreferencePage.Username"), //$NON-NLS-1$
compositeServerBody);
addField(userFieldEditor);
serverFieldEditors.add(userFieldEditor);
StringFieldEditor passwordFieldEditor = new StringFieldEditor(RunContainerPreferenceInitializer.P_ESB_RUNTIME_PASSWORD, RunContainerMessages.getString("RunContainerPreferencePage.Password"), //$NON-NLS-1$
compositeServerBody);
addField(passwordFieldEditor);
serverFieldEditors.add(passwordFieldEditor);
StringFieldEditor instanceFieldEditor = new StringFieldEditor(RunContainerPreferenceInitializer.P_ESB_RUNTIME_INSTANCE, RunContainerMessages.getString("RunContainerPreferencePage.Instance"), //$NON-NLS-1$
compositeServerBody);
addField(instanceFieldEditor);
serverFieldEditors.add(instanceFieldEditor);
IntegerFieldEditor portFieldEditor = new IntegerFieldEditor(RunContainerPreferenceInitializer.P_ESB_RUNTIME_PORT, RunContainerMessages.getString("RunContainerPreferencePage.Port"), //$NON-NLS-1$
compositeServerBody);
addField(portFieldEditor);
serverFieldEditors.add(portFieldEditor);
StringFieldEditor jmxPortFieldEditor = new StringFieldEditor(RunContainerPreferenceInitializer.P_ESB_RUNTIME_JMX_PORT, RunContainerMessages.getString("RunContainerPreferencePage.JMXPort"), //$NON-NLS-1$
compositeServerBody);
addField(jmxPortFieldEditor);
serverFieldEditors.add(jmxPortFieldEditor);
Composite compBtn = new Composite(groupServer, SWT.NONE);
GridData gridDataBtn = new GridData(SWT.LEFT, SWT.FILL, false, true, 1, 1);
gridDataBtn.widthHint = 100;
compBtn.setLayoutData(gridDataBtn);
GridLayout layoutCompBtn = new GridLayout(1, false);
layoutCompBtn.marginWidth = 0;
layoutCompBtn.marginHeight = 0;
compBtn.setLayout(layoutCompBtn);
buttonAddServer = new Button(compBtn, SWT.NONE);
buttonAddServer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
buttonAddServer.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
AddRuntimeWizard dirWizard = new AddRuntimeWizard(locationEditor.getStringValue());
dirWizard.setNeedsProgressMonitor(true);
WizardDialog wizardDialog = new WizardDialog(getShell(), dirWizard);
if (wizardDialog.open() == Window.OK) {
locationEditor.setStringValue(dirWizard.getTarget());
}
}
});
//$NON-NLS-1$
buttonAddServer.setText(RunContainerMessages.getString("RunContainerPreferencePage.ServerButton"));
// Button btnTestConnection = new Button(compBtn, SWT.NONE);
// btnTestConnection.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
// btnTestConnection.setText("Server Info...");
buttonInitalizeServer = new Button(compBtn, SWT.NONE);
buttonInitalizeServer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
//$NON-NLS-1$
buttonInitalizeServer.setText(RunContainerMessages.getString("RunContainerPreferencePage.InitalizeButton"));
buttonInitalizeServer.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if (initalizeRuntime(locationEditor.getStringValue(), hostFieldEditor.getStringValue())) {
try {
new InitFinishMessageDialog(getShell(), JMXUtil.getBundlesName()).open();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
});
Group groupOption = new Group(body, SWT.NONE);
groupOption.setLayout(gridLayoutDefault);
groupOption.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
//$NON-NLS-1$
groupOption.setText(RunContainerMessages.getString("RunContainerPreferencePage.Group2"));
compositeOptionBody = new Composite(groupOption, SWT.NONE);
compositeOptionBody.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
BooleanFieldEditor filterLogEditor = new BooleanFieldEditor(RunContainerPreferenceInitializer.P_ESB_RUNTIME_SYS_LOG, RunContainerMessages.getString("RunContainerPreferencePage.FilterLogs"), //$NON-NLS-1$
compositeOptionBody);
addField(filterLogEditor);
optionFieldEditors.add(filterLogEditor);
manager = ProcessManager.getInstance();
return body;
}
use of org.eclipse.jface.wizard.WizardDialog in project tdi-studio-se by Talend.
the class PublishOnSpagoAction method doRun.
protected void doRun() {
PublishOnSpagoExportWizard publishWizard = new PublishOnSpagoExportWizard();
IWorkbench workbench = getWorkbench();
//$NON-NLS-1$
publishWizard.setWindowTitle(EXPORTJOBSCRIPTS + " (SpagoBI)");
publishWizard.init(workbench, (IStructuredSelection) this.getSelection());
Shell activeShell = Display.getCurrent().getActiveShell();
WizardDialog dialog = new WizardDialog(activeShell, publishWizard);
dialog.open();
}
use of org.eclipse.jface.wizard.WizardDialog in project tesb-studio-se by Talend.
the class CreateESBAction method doRun.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
protected void doRun() {
RepositoryNode beanNode = getCurrentRepositoryNode();
if (isToolbar()) {
if (beanNode != null && beanNode.getContentType() != ESBRepositoryNodeType.SERVICES) {
beanNode = null;
}
if (beanNode == null) {
beanNode = getRepositoryNodeForDefault(ESBRepositoryNodeType.SERVICES);
}
}
ISelection selection;
IWorkbenchPage activePage = getActivePage();
if (activePage == null) {
selection = getSelection();
} else {
selection = getRepositorySelection();
}
if (selection.isEmpty()) {
return;
}
ESBWizard beanWizard = new ESBWizard(PlatformUI.getWorkbench(), true, selection);
WizardDialog dlg = new WizardDialog(Display.getCurrent().getActiveShell(), beanWizard);
dlg.open();
}
use of org.eclipse.jface.wizard.WizardDialog in project tesb-studio-se by Talend.
the class CreateNewJobAction method doRun.
@Override
protected void doRun() {
RepositoryNode node = getSelectedRepositoryNode();
if (node == null) {
return;
}
NewProcessWizard processWizard = getNewProcessWizard(node);
WizardDialog dlg = new WizardDialog(Display.getCurrent().getActiveShell(), processWizard);
if (dlg.open() == Window.OK) {
createNewProcess(node, processWizard.getProcess());
}
}
Aggregations