Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 206356 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/hyades/test/ui/wizard/TestSuiteNewWizard2.java (-4 / +13 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2006, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 28-33 Link Here
28
import org.eclipse.hyades.test.ui.TestUIImages;
28
import org.eclipse.hyades.test.ui.TestUIImages;
29
import org.eclipse.hyades.test.ui.UiPlugin;
29
import org.eclipse.hyades.test.ui.UiPlugin;
30
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
30
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
31
import org.eclipse.hyades.test.ui.util.TestUIUtil;
31
import org.eclipse.hyades.ui.internal.util.UIUtil;
32
import org.eclipse.hyades.ui.internal.util.UIUtil;
32
import org.eclipse.hyades.ui.internal.wizard.HyadesNewWizard;
33
import org.eclipse.hyades.ui.internal.wizard.HyadesNewWizard;
33
import org.eclipse.jface.dialogs.IDialogSettings;
34
import org.eclipse.jface.dialogs.IDialogSettings;
Lines 41-49 Link Here
41
 * <li>a name and description page.</li></ul>
42
 * <li>a name and description page.</li></ul>
42
 * At least, clients need to provide the type of the test suite by implementing the <code>getType()</code> method. 
43
 * At least, clients need to provide the type of the test suite by implementing the <code>getType()</code> method. 
43
 * 
44
 * 
44
 * @author pnedelec
45
 * 
45
 * @author jgout
46
 * @author  Patrick Nedelic
46
 * @since 4.2
47
 * @author  Jerome Gout
48
 * @author  Tony Wang
49
 * @author  Paul E. Slauenwhite
50
 * @version February 28, 2008
51
 * @since   March 9, 2006
47
 */
52
 */
48
public abstract class TestSuiteNewWizard2 extends HyadesNewWizard
53
public abstract class TestSuiteNewWizard2 extends HyadesNewWizard
49
{
54
{
Lines 158-163 Link Here
158
	protected void openEditor(IFile file) 
163
	protected void openEditor(IFile file) 
159
	throws PartInitException
164
	throws PartInitException
160
	{
165
	{
166
		
167
		//Attempt to open the Test Perspective:
168
		TestUIUtil.openTestPerspective();
169
		
161
		if(UiPlugin.getInstance().getPreferenceStore().getBoolean(TestUI.OPEN_EDITOR))
170
		if(UiPlugin.getInstance().getPreferenceStore().getBoolean(TestUI.OPEN_EDITOR))
162
			UIUtil.openEditor(file, TestUIExtension.GENERIC_TEST_SUITE_EDITOR_PART_ID, false);
171
			UIUtil.openEditor(file, TestUIExtension.GENERIC_TEST_SUITE_EDITOR_PART_ID, false);
163
	}	
172
	}	
(-)src/org/eclipse/hyades/test/ui/wizard/TestSuiteNewWizard.java (-3 / +11 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 29-42 Link Here
29
import org.eclipse.hyades.test.ui.TestUIImages;
29
import org.eclipse.hyades.test.ui.TestUIImages;
30
import org.eclipse.hyades.test.ui.UiPlugin;
30
import org.eclipse.hyades.test.ui.UiPlugin;
31
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
31
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
32
import org.eclipse.hyades.test.ui.util.TestUIUtil;
32
import org.eclipse.hyades.ui.internal.util.UIUtil;
33
import org.eclipse.hyades.ui.internal.util.UIUtil;
33
import org.eclipse.hyades.ui.internal.wizard.HyadesNewWizard;
34
import org.eclipse.hyades.ui.internal.wizard.HyadesNewWizard;
34
35
35
/**
36
/**
36
 * Extends the HyadesNewWizard to create the Hyades Generic Test Suite.
37
 * Extends the HyadesNewWizard to create the Hyades Generic Test Suite.
37
 * 
38
 * 
38
 * @author pnedelec
39
 * @author  Patrick Nedelic
39
 * @since 3.0
40
 * @author  Tony Wang
41
 * @author  Paul E. Slauenwhite
42
 * @version February 28, 2008
43
 * @since   February 1, 2005
40
 * @deprecated use TestSuiteNewWizard2 instead.
44
 * @deprecated use TestSuiteNewWizard2 instead.
41
 */
45
 */
42
public class TestSuiteNewWizard 
46
public class TestSuiteNewWizard 
Lines 154-159 Link Here
154
	protected void openEditor(IFile file) 
158
	protected void openEditor(IFile file) 
155
	throws PartInitException
159
	throws PartInitException
156
	{
160
	{
161
		
162
		//Attempt to open the Test Perspective:
163
		TestUIUtil.openTestPerspective();
164
		
157
		if(UiPlugin.getInstance().getPreferenceStore().getBoolean(TestUI.OPEN_EDITOR))
165
		if(UiPlugin.getInstance().getPreferenceStore().getBoolean(TestUI.OPEN_EDITOR))
158
			UIUtil.openEditor(file, TestUIExtension.GENERIC_TEST_SUITE_EDITOR_PART_ID, false);
166
			UIUtil.openEditor(file, TestUIExtension.GENERIC_TEST_SUITE_EDITOR_PART_ID, false);
159
	}	
167
	}	
(-)src/org/eclipse/hyades/test/ui/wizard/LocationNewWizard.java (-1 / +6 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2006, 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 22-27 Link Here
22
import org.eclipse.hyades.test.ui.UiPlugin;
22
import org.eclipse.hyades.test.ui.UiPlugin;
23
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
23
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
24
import org.eclipse.hyades.test.ui.internal.wizard.LocationHostNameWizardPage;
24
import org.eclipse.hyades.test.ui.internal.wizard.LocationHostNameWizardPage;
25
import org.eclipse.hyades.test.ui.util.TestUIUtil;
25
import org.eclipse.hyades.ui.internal.util.UIUtil;
26
import org.eclipse.hyades.ui.internal.util.UIUtil;
26
import org.eclipse.hyades.ui.internal.wizard.HyadesNewWizard;
27
import org.eclipse.hyades.ui.internal.wizard.HyadesNewWizard;
27
import org.eclipse.jface.dialogs.IDialogSettings;
28
import org.eclipse.jface.dialogs.IDialogSettings;
Lines 123-128 Link Here
123
	protected void openEditor(IFile file) 
124
	protected void openEditor(IFile file) 
124
	throws PartInitException
125
	throws PartInitException
125
	{
126
	{
127
		
128
		//Attempt to open the Test Perspective:
129
		TestUIUtil.openTestPerspective();
130
		
126
		if(UiPlugin.getInstance().getPreferenceStore().getBoolean(TestUI.OPEN_EDITOR))
131
		if(UiPlugin.getInstance().getPreferenceStore().getBoolean(TestUI.OPEN_EDITOR))
127
			UIUtil.openEditor(file, TestUIExtension.LOCATION_EDITOR_PART_ID, false);
132
			UIUtil.openEditor(file, TestUIExtension.LOCATION_EDITOR_PART_ID, false);
128
	}	
133
	}	
(-)src/org/eclipse/hyades/test/ui/util/TestUIUtil.java (-2 / +29 lines)
Lines 21-26 Link Here
21
import org.eclipse.hyades.models.common.common.CMNNamedElement;
21
import org.eclipse.hyades.models.common.common.CMNNamedElement;
22
import org.eclipse.hyades.models.common.facades.behavioral.INamedElement;
22
import org.eclipse.hyades.models.common.facades.behavioral.INamedElement;
23
import org.eclipse.hyades.test.core.util.EMFUtil;
23
import org.eclipse.hyades.test.core.util.EMFUtil;
24
import org.eclipse.hyades.test.ui.TestUIConstants;
24
import org.eclipse.hyades.test.ui.UiPlugin;
25
import org.eclipse.hyades.test.ui.UiPlugin;
25
import org.eclipse.hyades.ui.internal.util.UIUtil;
26
import org.eclipse.hyades.ui.internal.util.UIUtil;
26
import org.eclipse.ui.IEditorDescriptor;
27
import org.eclipse.ui.IEditorDescriptor;
Lines 34-41 Link Here
34
import org.eclipse.ui.model.IWorkbenchAdapter;
35
import org.eclipse.ui.model.IWorkbenchAdapter;
35
36
36
/**
37
/**
37
 * @author marcelop
38
 * Test UI utilities.
38
 * @since 0.3.0
39
 * <p/>
40
 * 
41
 * 
42
 * @author  Marcelo Paternostro
43
 * @author  Paul E. Slauenwhite
44
 * @version February 28, 2008
45
 * @since   February 1, 2005
39
 */
46
 */
40
public class TestUIUtil
47
public class TestUIUtil
41
{
48
{
Lines 151-156 Link Here
151
		}
158
		}
152
		return null;
159
		return null;
153
	}
160
	}
161
	
162
	/**
163
	 * Opens the Test Perspective based on its identifier.
164
	 * <p/>
165
	 *
166
	 * @return True if the Test Perspective can be opened, otherwise false.
167
	 * @see TestUIConstants#TEST_PERSPECTIVE_ID
168
	 */
169
	public static boolean openTestPerspective(){
170
171
		//Attempt to open the Test perspective:
172
		try {											
173
			PlatformUI.getWorkbench().showPerspective(TestUIConstants.TEST_PERSPECTIVE_ID, PlatformUI.getWorkbench().getActiveWorkbenchWindow());
174
		} 
175
		catch (Exception e) {
176
			return false;
177
		}
178
		
179
		return true;
180
	}
154
}
181
}
155
182
156
183
(-)src/org/eclipse/hyades/test/ui/internal/wizard/DeploymentNewWizard.java (-2 / +11 lines)
Lines 25-30 Link Here
25
import org.eclipse.hyades.test.ui.TestUIImages;
25
import org.eclipse.hyades.test.ui.TestUIImages;
26
import org.eclipse.hyades.test.ui.UiPlugin;
26
import org.eclipse.hyades.test.ui.UiPlugin;
27
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
27
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
28
import org.eclipse.hyades.test.ui.util.TestUIUtil;
28
import org.eclipse.hyades.ui.internal.util.UIUtil;
29
import org.eclipse.hyades.ui.internal.util.UIUtil;
29
import org.eclipse.hyades.ui.internal.wizard.HyadesNewWizard;
30
import org.eclipse.hyades.ui.internal.wizard.HyadesNewWizard;
30
import org.eclipse.jface.dialogs.IDialogSettings;
31
import org.eclipse.jface.dialogs.IDialogSettings;
Lines 34-42 Link Here
34
35
35
/**
36
/**
36
 * Extends the HyadesNewWizard to create the Deployment.
37
 * Extends the HyadesNewWizard to create the Deployment.
38
 *
37
 * 
39
 * 
38
 * @author marcelop
40
 * @author  Marcelo Paternostro
39
 * @since 0.0.1
41
 * @author  Tony Wang
42
 * @author  Paul E. Slauenwhite
43
 * @version February 28, 2008
44
 * @since   February 1, 2005
40
 */
45
 */
41
public class DeploymentNewWizard 
46
public class DeploymentNewWizard 
42
extends HyadesNewWizard
47
extends HyadesNewWizard
Lines 150-155 Link Here
150
	protected void openEditor(IFile file) 
155
	protected void openEditor(IFile file) 
151
	throws PartInitException
156
	throws PartInitException
152
	{
157
	{
158
		
159
		//Attempt to open the Test Perspective:
160
		TestUIUtil.openTestPerspective();
161
		
153
		if(UiPlugin.getInstance().getPreferenceStore().getBoolean(TestUI.OPEN_EDITOR))
162
		if(UiPlugin.getInstance().getPreferenceStore().getBoolean(TestUI.OPEN_EDITOR))
154
			UIUtil.openEditor(file, TestUIExtension.DEPLOYMENT_EDITOR_PART_ID, false);
163
			UIUtil.openEditor(file, TestUIExtension.DEPLOYMENT_EDITOR_PART_ID, false);
155
	}	
164
	}	
(-)src/org/eclipse/hyades/test/ui/internal/wizard/DatapoolNewWizard.java (-5 / +13 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 30-35 Link Here
30
import org.eclipse.hyades.test.ui.UiPlugin;
30
import org.eclipse.hyades.test.ui.UiPlugin;
31
import org.eclipse.hyades.test.ui.datapool.internal.util.CSVImportExportUtil;
31
import org.eclipse.hyades.test.ui.datapool.internal.util.CSVImportExportUtil;
32
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
32
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
33
import org.eclipse.hyades.test.ui.util.TestUIUtil;
33
import org.eclipse.hyades.ui.internal.util.UIUtil;
34
import org.eclipse.hyades.ui.internal.util.UIUtil;
34
import org.eclipse.hyades.ui.internal.wizard.HyadesNewWizard;
35
import org.eclipse.hyades.ui.internal.wizard.HyadesNewWizard;
35
import org.eclipse.jface.dialogs.ErrorDialog;
36
import org.eclipse.jface.dialogs.ErrorDialog;
Lines 41-50 Link Here
41
/**
42
/**
42
 * Extends the HyadesNewWizard to create the Hyades Generic DataPool.
43
 * Extends the HyadesNewWizard to create the Hyades Generic DataPool.
43
 * 
44
 * 
44
 * @author psun
45
 * 
45
 * @since 0.0.1
46
 * @author  Peter Sun
46
 * @author bjiang
47
 * @author  Bianca Xue Jiang
47
 * @since 4.0
48
 * @author  Tony Wang
49
 * @author  Paul E. Slauenwhite
50
 * @version February 28, 2008
51
 * @since   February 1, 2005
48
 */
52
 */
49
public class DatapoolNewWizard extends HyadesNewWizard {
53
public class DatapoolNewWizard extends HyadesNewWizard {
50
54
Lines 228-233 Link Here
228
	protected void openEditor(IFile file) 
232
	protected void openEditor(IFile file) 
229
	throws PartInitException
233
	throws PartInitException
230
	{
234
	{
235
		
236
		//Attempt to open the Test Perspective:
237
		TestUIUtil.openTestPerspective();
238
		
231
		if(UiPlugin.getInstance().getPreferenceStore().getBoolean(TestUI.OPEN_EDITOR))
239
		if(UiPlugin.getInstance().getPreferenceStore().getBoolean(TestUI.OPEN_EDITOR))
232
			UIUtil.openEditor(file, TestUIExtension.DATAPOOL_EDITOR_PART_ID, false);
240
			UIUtil.openEditor(file, TestUIExtension.DATAPOOL_EDITOR_PART_ID, false);
233
	}
241
	}
(-)src/org/eclipse/hyades/test/ui/internal/wizard/ArtifactNewWizard.java (-5 / +12 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 26-31 Link Here
26
import org.eclipse.hyades.test.ui.TestUIImages;
26
import org.eclipse.hyades.test.ui.TestUIImages;
27
import org.eclipse.hyades.test.ui.UiPlugin;
27
import org.eclipse.hyades.test.ui.UiPlugin;
28
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
28
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
29
import org.eclipse.hyades.test.ui.util.TestUIUtil;
29
import org.eclipse.hyades.ui.internal.util.UIUtil;
30
import org.eclipse.hyades.ui.internal.util.UIUtil;
30
import org.eclipse.hyades.ui.internal.wizard.HyadesNewWizard;
31
import org.eclipse.hyades.ui.internal.wizard.HyadesNewWizard;
31
import org.eclipse.jface.dialogs.IDialogSettings;
32
import org.eclipse.jface.dialogs.IDialogSettings;
Lines 34-43 Link Here
34
/**
35
/**
35
 * Extends the HyadesNewWizard to create the Hyades Generic Artifact.
36
 * Extends the HyadesNewWizard to create the Hyades Generic Artifact.
36
 * 
37
 * 
37
 * @author psun
38
 * @author  Peter Sun
38
 * @since 0.0.1
39
 * @author  Bianca Xue Jiang
39
 * @author bjiang
40
 * @author  Tony Wang
40
 * @since 1.3
41
 * @author  Paul E. Slauenwhite
42
 * @version February 28, 2008
43
 * @since   February 1, 2005
41
 */
44
 */
42
public class ArtifactNewWizard extends HyadesNewWizard {
45
public class ArtifactNewWizard extends HyadesNewWizard {
43
	
46
	
Lines 165-170 Link Here
165
	protected void openEditor(IFile file) 
168
	protected void openEditor(IFile file) 
166
	throws PartInitException
169
	throws PartInitException
167
	{
170
	{
171
		
172
		//Attempt to open the Test Perspective:
173
		TestUIUtil.openTestPerspective();
174
		
168
		if(UiPlugin.getInstance().getPreferenceStore().getBoolean(TestUI.OPEN_EDITOR))
175
		if(UiPlugin.getInstance().getPreferenceStore().getBoolean(TestUI.OPEN_EDITOR))
169
			UIUtil.openEditor(file, TestUIExtension.ARTIFACT_EDITOR_PART_ID, false);
176
			UIUtil.openEditor(file, TestUIExtension.ARTIFACT_EDITOR_PART_ID, false);
170
	}	
177
	}	
(-)src/org/eclipse/hyades/test/ui/TestUIConstants.java (-3 / +14 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005 IBM Corporation and others.
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 12-22 Link Here
12
package org.eclipse.hyades.test.ui;
12
package org.eclipse.hyades.test.ui;
13
13
14
/**
14
/**
15
 * Constants storage interface
15
 * Constants storage interface.
16
 * @author jgout
16
 * <p>
17
 * 
18
 * 
19
 * @author  Jerome Gout
20
 * @author  Paul E. Slauenwhite
21
 * @version February 28, 2008
22
 * @since   February 1, 2005
17
 */
23
 */
18
public interface TestUIConstants {
24
public interface TestUIConstants {
19
	
25
	
26
	/**
27
	 * Test Perspective identifier as defined in the implementation of the <code>org.eclipse.ui.perspectives</code> extension point in this plug-in.
28
	 */
29
	public static final String TEST_PERSPECTIVE_ID = "org.eclipse.hyades.ui.perspective.TestPerspective";
30
	
20
    /**
31
    /**
21
     * @deprecated use TAG_FRAGMENT instead. We no longer should persiste the full URI because it contains file path
32
     * @deprecated use TAG_FRAGMENT instead. We no longer should persiste the full URI because it contains file path
22
     */
33
     */

Return to bug 206356