[nobug] avoid bvt failure for no active shell on Display
diff --git a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/TestsPlugin.java b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/TestsPlugin.java
index 8766170..71a4197 100644
--- a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/TestsPlugin.java
+++ b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/TestsPlugin.java
@@ -1,7 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.wst.common.snippets.tests;
-import org.eclipse.ui.plugin.*;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
diff --git a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/CommonApplicableInterface.java b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/CommonApplicableInterface.java
index 0eb5850..bff1dd3 100644
--- a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/CommonApplicableInterface.java
+++ b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/CommonApplicableInterface.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.wst.common.snippets.tests.helpers;
import org.eclipse.core.runtime.IProgressMonitor;
diff --git a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/ComplexInsertion.java b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/ComplexInsertion.java
index 986a5d8..041d8ef 100644
--- a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/ComplexInsertion.java
+++ b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/ComplexInsertion.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.wst.common.snippets.tests.helpers;
import org.eclipse.swt.dnd.DragSourceEvent;
diff --git a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/ComplexProvider.java b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/ComplexProvider.java
index 46d950d..6a53f87 100644
--- a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/ComplexProvider.java
+++ b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/ComplexProvider.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.wst.common.snippets.tests.helpers;
import java.io.BufferedWriter;
diff --git a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/DummyProvider.java b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/DummyProvider.java
index f3ed8ec..4cdda54 100644
--- a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/DummyProvider.java
+++ b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/DummyProvider.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.wst.common.snippets.tests.helpers;
import org.eclipse.core.runtime.IPath;
diff --git a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/SApplicableEditor.java b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/SApplicableEditor.java
index ec06e76..516f998 100644
--- a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/SApplicableEditor.java
+++ b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/SApplicableEditor.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.wst.common.snippets.tests.helpers;
import org.eclipse.core.runtime.IProgressMonitor;
diff --git a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/TextSnippetProvider2.java b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/TextSnippetProvider2.java
index 92b4ecf..167f578 100644
--- a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/TextSnippetProvider2.java
+++ b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/helpers/TextSnippetProvider2.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.wst.common.snippets.tests.helpers;
import org.eclipse.wst.common.snippets.ui.TextSnippetProvider;
diff --git a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/providers/SnippetProviderExtensionTests.java b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/providers/SnippetProviderExtensionTests.java
index 533a4c1..db7dcc0 100644
--- a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/providers/SnippetProviderExtensionTests.java
+++ b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/providers/SnippetProviderExtensionTests.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.wst.common.snippets.tests.providers;
import junit.framework.TestCase;
diff --git a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/providers/TextProviderTests.java b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/providers/TextProviderTests.java
index 2d9b7e8..7175f29 100644
--- a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/providers/TextProviderTests.java
+++ b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/providers/TextProviderTests.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.wst.common.snippets.tests.providers;
import java.io.ByteArrayInputStream;
diff --git a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/scenarios/ObjectOrientedSnippetScenario.java b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/scenarios/ObjectOrientedSnippetScenario.java
index 4483515..0fc8f6b 100644
--- a/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/scenarios/ObjectOrientedSnippetScenario.java
+++ b/org.eclipse.wst.common.snippets.tests/src/org/eclipse/wst/common/snippets/tests/scenarios/ObjectOrientedSnippetScenario.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2009 by SAP AG, Walldorf.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.wst.common.snippets.tests.scenarios;
import java.io.BufferedReader;
@@ -13,7 +23,6 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.gef.palette.PaletteDrawer;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
@@ -58,7 +67,7 @@
if (view != null) {
anchor = view.getRoot();
}
- Shell activeShell = Display.getDefault().getActiveShell();
+ Shell activeShell = SnippetsPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();//Display.getDefault().getActiveShell();
assertNotNull(activeShell);
PaletteDrawer drawer = (PaletteDrawer) new SnippetPaletteDrawerFactory().createNewEntry(activeShell, anchor);
drawer.setLabel("testName");
@@ -85,7 +94,7 @@
if (view != null) {
anchor = view.getRoot();
}
- Shell activeShell = Display.getDefault().getActiveShell();
+ Shell activeShell = SnippetsPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();//Display.getDefault().getActiveShell();
assertNotNull(activeShell);
PaletteDrawer drawer = (PaletteDrawer) new SnippetPaletteDrawerFactory().createNewEntry(activeShell, anchor);
drawer.setLabel(getName());