Author: vyemialyanchyk
Date: 2010-03-12 12:19:25 -0500 (Fri, 12 Mar 2010)
New Revision: 20806
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/META-INF/MANIFEST.MF
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/hqleditor/preferences/HQLEditorPreferencePageTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6053 - fixed
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/META-INF/MANIFEST.MF
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/META-INF/MANIFEST.MF 2010-03-12
17:16:20 UTC (rev 20805)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/META-INF/MANIFEST.MF 2010-03-12
17:19:25 UTC (rev 20806)
@@ -52,7 +52,6 @@
org.apache.ant,
org.eclipse.ui.views,
org.jboss.tools.hibernate.ui,
- org.jboss.tools.tests,
org.eclipse.jdt.apt.core,
org.eclipse.debug.ui,
org.eclipse.ui.workbench.texteditor;bundle-version="3.5.0"
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/hqleditor/preferences/HQLEditorPreferencePageTest.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/hqleditor/preferences/HQLEditorPreferencePageTest.java 2010-03-12
17:16:20 UTC (rev 20805)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/hqleditor/preferences/HQLEditorPreferencePageTest.java 2010-03-12
17:19:25 UTC (rev 20806)
@@ -1,7 +1,9 @@
package org.hibernate.eclipse.hqleditor.preferences;
import org.eclipse.jface.preference.PreferenceDialog;
-import org.jboss.tools.test.util.WorkbenchUtils;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PreferencesUtil;
import junit.framework.TestCase;
/**
@@ -12,10 +14,20 @@
*/
public class HQLEditorPreferencePageTest extends TestCase {
+ public static Shell getActiveShell() {
+ return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ }
+
+ public static PreferenceDialog createPreferenceDialog(String pageId) {
+ PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(
+ getActiveShell(), pageId, new String[] {pageId}, null);
+ dialog.setBlockOnOpen(false);
+ return dialog;
+ }
+
public void testHQLEditorPreferencePageShow() {
PreferenceDialog prefDialog =
- WorkbenchUtils.createPreferenceDialog(
- HQLEditorPreferencePage.class.getName());
+ createPreferenceDialog(HQLEditorPreferencePage.class.getName());
try {
prefDialog.setBlockOnOpen(false);
@@ -30,8 +42,7 @@
public void testHQLEditorPreferencePagePerformOk() {
PreferenceDialog prefDialog =
- WorkbenchUtils.createPreferenceDialog(
- HQLEditorPreferencePage.class.getName());
+ createPreferenceDialog(HQLEditorPreferencePage.class.getName());
try {
prefDialog.setBlockOnOpen(false);