Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.ui/src/org/eclipse/papyrus/emf/facet/util/emf/ui/internal/actions/OpenModelFromEmfRegistryAction.java')
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.ui/src/org/eclipse/papyrus/emf/facet/util/emf/ui/internal/actions/OpenModelFromEmfRegistryAction.java124
1 files changed, 62 insertions, 62 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.ui/src/org/eclipse/papyrus/emf/facet/util/emf/ui/internal/actions/OpenModelFromEmfRegistryAction.java b/plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.ui/src/org/eclipse/papyrus/emf/facet/util/emf/ui/internal/actions/OpenModelFromEmfRegistryAction.java
index 65877217e60..40df553b1f6 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.ui/src/org/eclipse/papyrus/emf/facet/util/emf/ui/internal/actions/OpenModelFromEmfRegistryAction.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.ui/src/org/eclipse/papyrus/emf/facet/util/emf/ui/internal/actions/OpenModelFromEmfRegistryAction.java
@@ -1,62 +1,62 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010, 2011 Mia-Software.
- * 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:
- * Gabriel Barbier (Mia-Software) - initial API and implementation
- * Nicolas Bros (Mia-Software)
- * Nicolas Guyomar (Mia-Software) - Bug 333652 Extension point offering the possibility to declare an EPackage browser
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.util.emf.ui.internal.actions;
-
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.emf.facet.util.emf.core.IBrowserRegistry;
-import org.eclipse.papyrus.emf.facet.util.emf.ui.internal.dialogs.UriSelectionDialog;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-/**
- * This is an action class which opens a dialog to select an EPackage to browse
- */
-public class OpenModelFromEmfRegistryAction implements IWorkbenchWindowActionDelegate {
-
- private IWorkbenchWindow fWorkbenchWindow;
-
- @Override
- public void dispose() {
- // nothing
- }
-
- @Override
- public void init(final IWorkbenchWindow window) {
- this.fWorkbenchWindow = window;
- }
-
- @Override
- public void run(final IAction action) {
- final IWorkbenchPage activePage = this.fWorkbenchWindow.getActivePage();
- if (activePage != null) {
- final UriSelectionDialog launcher = new UriSelectionDialog(
- this.fWorkbenchWindow.getShell());
- if (launcher.open() == Window.OK) {
- final String nsURI = launcher.getUriSelected();
- if (nsURI != null && nsURI.length() > 0) {
- EPackage ePackage = EPackage.Registry.INSTANCE.getEPackage(nsURI);
- IBrowserRegistry.INSTANCE.browseEPackage(ePackage);
- }
- }
- }
- }
-
- @Override
- public void selectionChanged(final IAction action, final ISelection selection) {
- // nothing
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2008, 2010, 2011 Mia-Software.
+ * 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:
+ * Gabriel Barbier (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software)
+ * Nicolas Guyomar (Mia-Software) - Bug 333652 Extension point offering the possibility to declare an EPackage browser
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.util.emf.ui.internal.actions;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.emf.facet.util.emf.core.IBrowserRegistry;
+import org.eclipse.papyrus.emf.facet.util.emf.ui.internal.dialogs.UriSelectionDialog;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+/**
+ * This is an action class which opens a dialog to select an EPackage to browse
+ */
+public class OpenModelFromEmfRegistryAction implements IWorkbenchWindowActionDelegate {
+
+ private IWorkbenchWindow fWorkbenchWindow;
+
+ @Override
+ public void dispose() {
+ // nothing
+ }
+
+ @Override
+ public void init(final IWorkbenchWindow window) {
+ this.fWorkbenchWindow = window;
+ }
+
+ @Override
+ public void run(final IAction action) {
+ final IWorkbenchPage activePage = this.fWorkbenchWindow.getActivePage();
+ if (activePage != null) {
+ final UriSelectionDialog launcher = new UriSelectionDialog(
+ this.fWorkbenchWindow.getShell());
+ if (launcher.open() == Window.OK) {
+ final String nsURI = launcher.getUriSelected();
+ if (nsURI != null && nsURI.length() > 0) {
+ EPackage ePackage = EPackage.Registry.INSTANCE.getEPackage(nsURI);
+ IBrowserRegistry.INSTANCE.browseEPackage(ePackage);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void selectionChanged(final IAction action, final ISelection selection) {
+ // nothing
+ }
+}

Back to the top