diff options
Diffstat (limited to 'sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/EditorHelper.java')
-rw-r--r-- | sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/EditorHelper.java | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/EditorHelper.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/EditorHelper.java deleted file mode 100644 index 6ca2e7a1d0d..00000000000 --- a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/EditorHelper.java +++ /dev/null @@ -1,51 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * 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:
- * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.tools.util;
-
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- *
- * a helper for the Editor
- *
- */
-public class EditorHelper {
-
- private EditorHelper() {
- //nothing to do
- }
-
- /**
- *
- * @return
- * the current editor or <code>null</code> if not found
- */
- public static final IEditorPart getCurrentEditor() {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- if(workbench != null) {
- final IWorkbenchWindow activeWorkbench = workbench.getActiveWorkbenchWindow();
- if(activeWorkbench != null) {
- final IWorkbenchPage activePage = activeWorkbench.getActivePage();
- if(activePage != null) {
- return activePage.getActiveEditor();
- }
- }
- }
- return null;
- }
-}
|