Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.releng.winexplorer/src')
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/AbstractContainerAction.java134
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/Activator.java108
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/ExplorerAction.java64
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/PromptAction.java64
4 files changed, 185 insertions, 185 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/AbstractContainerAction.java b/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/AbstractContainerAction.java
index e3f20c297f..443a6eda08 100644
--- a/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/AbstractContainerAction.java
+++ b/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/AbstractContainerAction.java
@@ -1,67 +1,67 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.releng.winexplorer;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * @author Eike Stepper
- */
-public abstract class AbstractContainerAction implements IObjectActionDelegate
-{
- private IContainer container;
-
- public AbstractContainerAction()
- {
- }
-
- public void setActivePart(IAction action, IWorkbenchPart targetPart)
- {
- }
-
- public void selectionChanged(IAction action, ISelection selection)
- {
- container = null;
- if (selection instanceof IStructuredSelection)
- {
- IStructuredSelection ssel = (IStructuredSelection)selection;
- Object element = ssel.getFirstElement();
- if (element instanceof IFile)
- {
- container = ((IFile)element).getParent();
- }
- else if (element instanceof IContainer)
- {
- container = (IContainer)element;
- }
- }
- }
-
- public void run(IAction action)
- {
- try
- {
- run(container);
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
- }
-
- protected abstract void run(IContainer container) throws Exception;
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.releng.winexplorer;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * @author Eike Stepper
+ */
+public abstract class AbstractContainerAction implements IObjectActionDelegate
+{
+ private IContainer container;
+
+ public AbstractContainerAction()
+ {
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart)
+ {
+ }
+
+ public void selectionChanged(IAction action, ISelection selection)
+ {
+ container = null;
+ if (selection instanceof IStructuredSelection)
+ {
+ IStructuredSelection ssel = (IStructuredSelection)selection;
+ Object element = ssel.getFirstElement();
+ if (element instanceof IFile)
+ {
+ container = ((IFile)element).getParent();
+ }
+ else if (element instanceof IContainer)
+ {
+ container = (IContainer)element;
+ }
+ }
+ }
+
+ public void run(IAction action)
+ {
+ try
+ {
+ run(container);
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ protected abstract void run(IContainer container) throws Exception;
+}
diff --git a/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/Activator.java b/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/Activator.java
index 6a9ff10125..6538b985a4 100644
--- a/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/Activator.java
+++ b/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/Activator.java
@@ -1,54 +1,54 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.releng.winexplorer;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-import org.osgi.framework.BundleContext;
-
-/**
- * @author Eike Stepper
- */
-public class Activator extends AbstractUIPlugin
-{
- public static final String PLUGIN_ID = "org.eclipse.emf.cdo.releng.winexplorer";
-
- private static Activator plugin;
-
- public Activator()
- {
- }
-
- @Override
- public void start(BundleContext context) throws Exception
- {
- super.start(context);
- plugin = this;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception
- {
- plugin = null;
- super.stop(context);
- }
-
- public static Activator getDefault()
- {
- return plugin;
- }
-
- public static ImageDescriptor getImageDescriptor(String path)
- {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.releng.winexplorer;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Eike Stepper
+ */
+public class Activator extends AbstractUIPlugin
+{
+ public static final String PLUGIN_ID = "org.eclipse.emf.cdo.releng.winexplorer";
+
+ private static Activator plugin;
+
+ public Activator()
+ {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception
+ {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception
+ {
+ plugin = null;
+ super.stop(context);
+ }
+
+ public static Activator getDefault()
+ {
+ return plugin;
+ }
+
+ public static ImageDescriptor getImageDescriptor(String path)
+ {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/ExplorerAction.java b/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/ExplorerAction.java
index 9d15c09779..6160afbef9 100644
--- a/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/ExplorerAction.java
+++ b/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/ExplorerAction.java
@@ -1,32 +1,32 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.releng.winexplorer;
-
-import org.eclipse.core.resources.IContainer;
-
-import java.io.File;
-
-/**
- * @author Eike Stepper
- */
-public class ExplorerAction extends AbstractContainerAction
-{
- public ExplorerAction()
- {
- }
-
- @Override
- protected void run(IContainer container) throws Exception
- {
- String location = container.getLocation().toString().replace('/', File.separatorChar);
- Runtime.getRuntime().exec("explorer.exe \"" + location + "\"");
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.releng.winexplorer;
+
+import org.eclipse.core.resources.IContainer;
+
+import java.io.File;
+
+/**
+ * @author Eike Stepper
+ */
+public class ExplorerAction extends AbstractContainerAction
+{
+ public ExplorerAction()
+ {
+ }
+
+ @Override
+ protected void run(IContainer container) throws Exception
+ {
+ String location = container.getLocation().toString().replace('/', File.separatorChar);
+ Runtime.getRuntime().exec("explorer.exe \"" + location + "\"");
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/PromptAction.java b/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/PromptAction.java
index d7ec07bc04..46d7583bc6 100644
--- a/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/PromptAction.java
+++ b/plugins/org.eclipse.emf.cdo.releng.winexplorer/src/org/eclipse/emf/cdo/releng/winexplorer/PromptAction.java
@@ -1,32 +1,32 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.releng.winexplorer;
-
-import org.eclipse.core.resources.IContainer;
-
-import java.io.File;
-
-/**
- * @author Eike Stepper
- */
-public class PromptAction extends AbstractContainerAction
-{
- public PromptAction()
- {
- }
-
- @Override
- protected void run(IContainer container) throws Exception
- {
- String location = container.getLocation().toString().replace('/', File.separatorChar);
- Runtime.getRuntime().exec("cmd /c cd \"" + location + "\" && start cmd.exe");
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.releng.winexplorer;
+
+import org.eclipse.core.resources.IContainer;
+
+import java.io.File;
+
+/**
+ * @author Eike Stepper
+ */
+public class PromptAction extends AbstractContainerAction
+{
+ public PromptAction()
+ {
+ }
+
+ @Override
+ protected void run(IContainer container) throws Exception
+ {
+ String location = container.getLocation().toString().replace('/', File.separatorChar);
+ Runtime.getRuntime().exec("cmd /c cd \"" + location + "\" && start cmd.exe");
+ }
+}

Back to the top