|
Lines 11-21
Link Here
|
| 11 |
*******************************************************************************/ |
11 |
*******************************************************************************/ |
| 12 |
package org.eclipse.hyades.test.tools.ui.http.internal.junit.editor; |
12 |
package org.eclipse.hyades.test.tools.ui.http.internal.junit.editor; |
| 13 |
|
13 |
|
|
|
14 |
import org.eclipse.core.runtime.IProgressMonitor; |
| 15 |
import org.eclipse.core.runtime.SubProgressMonitor; |
| 14 |
import org.eclipse.hyades.test.tools.ui.common.internal.editor.TestSuiteEditorExtension; |
16 |
import org.eclipse.hyades.test.tools.ui.common.internal.editor.TestSuiteEditorExtension; |
|
|
17 |
import org.eclipse.hyades.test.tools.ui.http.internal.junit.wizard.HttpGenerateWizard; |
| 15 |
import org.eclipse.hyades.test.tools.ui.internal.resources.ToolsUiPluginResourceBundle; |
18 |
import org.eclipse.hyades.test.tools.ui.internal.resources.ToolsUiPluginResourceBundle; |
| 16 |
import org.eclipse.hyades.test.ui.editor.form.util.WidgetFactory; |
19 |
import org.eclipse.hyades.test.ui.editor.form.util.WidgetFactory; |
| 17 |
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle; |
20 |
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle; |
| 18 |
import org.eclipse.hyades.ui.editor.IHyadesEditorPart; |
21 |
import org.eclipse.hyades.ui.editor.IHyadesEditorPart; |
|
|
22 |
import org.eclipse.jface.viewers.StructuredSelection; |
| 23 |
import org.eclipse.jface.wizard.WizardDialog; |
| 24 |
import org.eclipse.swt.widgets.Display; |
| 25 |
import org.eclipse.ui.PlatformUI; |
| 19 |
|
26 |
|
| 20 |
/** |
27 |
/** |
| 21 |
* @author marcelop |
28 |
* @author marcelop |
|
Lines 49-52
Link Here
|
| 49 |
|
56 |
|
| 50 |
getTestSuiteForm().updateTitle(); |
57 |
getTestSuiteForm().updateTitle(); |
| 51 |
} |
58 |
} |
|
|
59 |
|
| 60 |
/* (non-Javadoc) |
| 61 |
* @see org.eclipse.hyades.test.ui.editor.extension.BaseEditorExtension#save(org.eclipse.core.runtime.IProgressMonitor) |
| 62 |
*/ |
| 63 |
public void save(IProgressMonitor monitor) throws Exception { |
| 64 |
|
| 65 |
monitor.beginTask("", 2); //$NON-NLS-1$ |
| 66 |
|
| 67 |
|
| 68 |
//TODO: Change recording wizard and new wizard to gather require fields and populate classpath. |
| 69 |
|
| 70 |
//TODO: Use JUnit code generation facility. |
| 71 |
|
| 72 |
//TODO: Change to the wait cursor. |
| 73 |
|
| 74 |
try { |
| 75 |
HttpGenerateWizard httpGenerateWizard = new HttpGenerateWizard(); |
| 76 |
httpGenerateWizard.init(PlatformUI.getWorkbench(), new StructuredSelection(getTestSuite())); |
| 77 |
|
| 78 |
WizardDialog wizardDialog = new WizardDialog(Display.getDefault().getActiveShell(), httpGenerateWizard); |
| 79 |
wizardDialog.open(); |
| 80 |
|
| 81 |
httpGenerateWizard.dispose(); |
| 82 |
|
| 83 |
// Perform the save |
| 84 |
super.save(new SubProgressMonitor(monitor, 1)); |
| 85 |
} |
| 86 |
finally { |
| 87 |
monitor.done(); |
| 88 |
} |
| 89 |
} |
| 52 |
} |
90 |
} |