Only include the views that are really installed
diff --git a/examples/org.eclipse.graphiti.examples.common/src/org/eclipse/graphiti/examples/common/perspective/GFPerspective.java b/examples/org.eclipse.graphiti.examples.common/src/org/eclipse/graphiti/examples/common/perspective/GFPerspective.java
index 5545536..7562ddc 100644
--- a/examples/org.eclipse.graphiti.examples.common/src/org/eclipse/graphiti/examples/common/perspective/GFPerspective.java
+++ b/examples/org.eclipse.graphiti.examples.common/src/org/eclipse/graphiti/examples/common/perspective/GFPerspective.java
@@ -15,14 +15,18 @@
  *******************************************************************************/
 package org.eclipse.graphiti.examples.common.perspective;
 
+import org.eclipse.graphiti.ui.internal.editor.ThumbNailView;
 import org.eclipse.ui.IFolderLayout;
 import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IPerspectiveFactory;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.views.IViewDescriptor;
 
 /**
  * The Class GFPerspective. Defines the Eclipse perspective for testing
  * Graphiti.
  */
+@SuppressWarnings("restriction")
 public class GFPerspective implements IPerspectiveFactory {
 
 	/**
@@ -38,6 +42,7 @@
 	 * org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui
 	 * .IPageLayout)
 	 */
+	@Override
 	public void createInitialLayout(IPageLayout layout) {
 		defineActions(layout);
 		defineLayout(layout);
@@ -78,21 +83,40 @@
 
 		// Top left.
 		IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, (float) 0.26, editorArea);//$NON-NLS-1$
-		topLeft.addView(IPageLayout.ID_PROJECT_EXPLORER);
-		topLeft.addView("org.eclipse.jdt.ui.PackageExplorer"); //$NON-NLS-1$
+		if (isViewAvailable(IPageLayout.ID_PROJECT_EXPLORER)) {
+			topLeft.addView(IPageLayout.ID_PROJECT_EXPLORER);
+		}
+		if (isViewAvailable("org.eclipse.jdt.ui.PackageExplorer")) {
+			topLeft.addView("org.eclipse.jdt.ui.PackageExplorer"); //$NON-NLS-1$
+		}
 		topLeft.addPlaceholder(IPageLayout.ID_BOOKMARKS);
 
 		// Bottom left.
 		IFolderLayout bottomLeft = layout.createFolder("bottomLeft", IPageLayout.BOTTOM, (float) 0.50,//$NON-NLS-1$
 				"topLeft");//$NON-NLS-1$
-		bottomLeft.addView(IPageLayout.ID_OUTLINE);
-		bottomLeft.addView("org.eclipse.graphiti.ui.internal.editor.thumbnailview"); //$NON-NLS-1$
+		if (isViewAvailable(IPageLayout.ID_OUTLINE)) {
+			bottomLeft.addView(IPageLayout.ID_OUTLINE);
+		}
+		if (isViewAvailable(ThumbNailView.VIEW_ID)) {
+			bottomLeft.addView(ThumbNailView.VIEW_ID); //$NON-NLS-1$
+		}
 
 		// Bottom right.
 		IFolderLayout bottomRight = layout.createFolder("bottomRight", IPageLayout.BOTTOM, (float) 0.66,//$NON-NLS-1$
 				editorArea);
-		bottomRight.addView("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$
-		bottomRight.addView(IPageLayout.ID_PROP_SHEET);
-		bottomRight.addView(IPageLayout.ID_PROBLEM_VIEW);
+		if (isViewAvailable("org.eclipse.pde.runtime.LogView")) {
+			bottomRight.addView("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$
+		}
+		if (isViewAvailable(IPageLayout.ID_PROP_SHEET)) {
+			bottomRight.addView(IPageLayout.ID_PROP_SHEET);
+		}
+		if (isViewAvailable(IPageLayout.ID_PROBLEM_VIEW)) {
+			bottomRight.addView(IPageLayout.ID_PROBLEM_VIEW);
+		}
+	}
+
+	private static boolean isViewAvailable(String viewId) {
+		IViewDescriptor viewDesc = PlatformUI.getWorkbench().getViewRegistry().find(viewId);
+		return viewDesc != null;
 	}
 }