Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-07-19 08:22:04 +0000
committerEike Stepper2012-07-19 08:22:04 +0000
commit1460904fd3c193ffaf809913b2983a400fce9d94 (patch)
tree72f3a17b75fedba3ae1060df1d32c9c7889be954 /plugins/org.eclipse.emf.cdo.releng.manifests
parent5f360965ae87478e0681899bf310a210cafc2c44 (diff)
downloadcdo-1460904fd3c193ffaf809913b2983a400fce9d94.tar.gz
cdo-1460904fd3c193ffaf809913b2983a400fce9d94.tar.xz
cdo-1460904fd3c193ffaf809913b2983a400fce9d94.zip
Fix line endings in master (dos2unix)
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.releng.manifests')
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.manifests/.classpath14
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.manifests/.project56
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.manifests/.settings/org.eclipse.core.resources.prefs6
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.manifests/about.properties62
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.manifests/copyright.txt14
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.manifests/plugin.properties22
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.manifests/plugin.xml246
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/AbstractProjectHandler.java210
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/Activator.java108
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/OpenManifestHandler.java226
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/OpenPropertiesHandler.java124
11 files changed, 544 insertions, 544 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng.manifests/.classpath b/plugins/org.eclipse.emf.cdo.releng.manifests/.classpath
index 2d1a4302f0..64c5e31b7a 100644
--- a/plugins/org.eclipse.emf.cdo.releng.manifests/.classpath
+++ b/plugins/org.eclipse.emf.cdo.releng.manifests/.classpath
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.emf.cdo.releng.manifests/.project b/plugins/org.eclipse.emf.cdo.releng.manifests/.project
index 9a203347e9..ebc99848d6 100644
--- a/plugins/org.eclipse.emf.cdo.releng.manifests/.project
+++ b/plugins/org.eclipse.emf.cdo.releng.manifests/.project
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.emf.cdo.releng.manifests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.cdo.releng.manifests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.emf.cdo.releng.manifests/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.cdo.releng.manifests/.settings/org.eclipse.core.resources.prefs
index 93c8fd514e..b02ec790ac 100644
--- a/plugins/org.eclipse.emf.cdo.releng.manifests/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/org.eclipse.emf.cdo.releng.manifests/.settings/org.eclipse.core.resources.prefs
@@ -1,3 +1,3 @@
-#Mon Jul 11 16:02:45 CEST 2011
-eclipse.preferences.version=1
-encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
+#Mon Jul 11 16:02:45 CEST 2011
+eclipse.preferences.version=1
+encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
diff --git a/plugins/org.eclipse.emf.cdo.releng.manifests/about.properties b/plugins/org.eclipse.emf.cdo.releng.manifests/about.properties
index 05340fccd8..66bb37c2d7 100644
--- a/plugins/org.eclipse.emf.cdo.releng.manifests/about.properties
+++ b/plugins/org.eclipse.emf.cdo.releng.manifests/about.properties
@@ -1,31 +1,31 @@
-# 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
-
-# NLS_MESSAGEFORMAT_VAR
-
-# ==============================================================================
-# Do not change the properties between this line and the last line containing:
-# %%% END OF TRANSLATED PROPERTIES %%%
-# Instead, either redefine an existing property, or create a new property,
-# append it to the end of the file, and change the code to use the new name.
-# ==============================================================================
-
-featureName = CDO Release Engineering Manifest Opener
-featureText = CDO Release Engineering Manifest Opener\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. All rights reserved.\n\
-\n\
-Visit http://www.eclipse.org/cdo
-
-# ==============================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# The above properties have been shipped for translation.
-# ==============================================================================
+# 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
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ==============================================================================
+# Do not change the properties between this line and the last line containing:
+# %%% END OF TRANSLATED PROPERTIES %%%
+# Instead, either redefine an existing property, or create a new property,
+# append it to the end of the file, and change the code to use the new name.
+# ==============================================================================
+
+featureName = CDO Release Engineering Manifest Opener
+featureText = CDO Release Engineering Manifest Opener\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/cdo
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/plugins/org.eclipse.emf.cdo.releng.manifests/copyright.txt b/plugins/org.eclipse.emf.cdo.releng.manifests/copyright.txt
index 8f6328980e..0a0f67e6d7 100644
--- a/plugins/org.eclipse.emf.cdo.releng.manifests/copyright.txt
+++ b/plugins/org.eclipse.emf.cdo.releng.manifests/copyright.txt
@@ -1,8 +1,8 @@
-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:
+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 \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.releng.manifests/plugin.properties b/plugins/org.eclipse.emf.cdo.releng.manifests/plugin.properties
index 8057ff4c22..b07cbf051e 100644
--- a/plugins/org.eclipse.emf.cdo.releng.manifests/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.releng.manifests/plugin.properties
@@ -1,11 +1,11 @@
-# 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
-
-pluginName = CDO Release Engineering Manifest Opener
-providerName = Eclipse Modeling Project
+# 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
+
+pluginName = CDO Release Engineering Manifest Opener
+providerName = Eclipse Modeling Project
diff --git a/plugins/org.eclipse.emf.cdo.releng.manifests/plugin.xml b/plugins/org.eclipse.emf.cdo.releng.manifests/plugin.xml
index 0f0b876fbc..6c5260def9 100644
--- a/plugins/org.eclipse.emf.cdo.releng.manifests/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.releng.manifests/plugin.xml
@@ -1,123 +1,123 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<!--
- 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
--->
-
-<plugin>
-
- <extension
- point="org.eclipse.ui.commands">
- <category
- name="CDO Release Engineering"
- id="org.eclipse.emf.cdo.releng">
- </category>
- <command
- name="Open Project Manifest"
- categoryId="org.eclipse.emf.cdo.releng"
- id="org.eclipse.emf.cdo.releng.OpenManifest">
- </command>
- <command
- name="Open Project Properties"
- categoryId="org.eclipse.emf.cdo.releng"
- id="org.eclipse.emf.cdo.releng.OpenProperties">
- </command>
- </extension>
-
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- commandId="org.eclipse.emf.cdo.releng.OpenManifest"
- class="org.eclipse.emf.cdo.releng.manifests.OpenManifestHandler">
- </handler>
- <handler
- commandId="org.eclipse.emf.cdo.releng.OpenProperties"
- class="org.eclipse.emf.cdo.releng.manifests.OpenPropertiesHandler">
- </handler>
- </extension>
-
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.emf.cdo.releng.OpenManifest"
- contextId="org.eclipse.ui.contexts.window"
- sequence="F6"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
- </key>
- <key
- commandId="org.eclipse.emf.cdo.releng.OpenManifest"
- contextId="org.eclipse.ui.textEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="F6">
- </key>
- <key
- commandId="org.eclipse.emf.cdo.releng.OpenManifest"
- contextId="org.eclipse.jdt.ui.javaEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="F6">
- </key>
- <key
- commandId="org.eclipse.emf.cdo.releng.OpenManifest"
- contextId="org.eclipse.jdt.ui.breadcrumbEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="F6">
- </key>
- <key
- commandId="org.eclipse.emf.cdo.releng.OpenManifest"
- contextId="org.eclipse.ant.ui.AntEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="F6">
- </key>
- <key
- commandId="org.eclipse.emf.cdo.releng.OpenManifest"
- contextId="org.eclipse.jdt.ui.propertiesEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="F6">
- </key>
-
- <key
- commandId="org.eclipse.emf.cdo.releng.OpenProperties"
- contextId="org.eclipse.ui.contexts.window"
- sequence="M2+F6"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
- </key>
- <key
- commandId="org.eclipse.emf.cdo.releng.OpenProperties"
- contextId="org.eclipse.ui.textEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+F6">
- </key>
- <key
- commandId="org.eclipse.emf.cdo.releng.OpenProperties"
- contextId="org.eclipse.jdt.ui.javaEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+F6">
- </key>
- <key
- commandId="org.eclipse.emf.cdo.releng.OpenProperties"
- contextId="org.eclipse.jdt.ui.breadcrumbEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+F6">
- </key>
- <key
- commandId="org.eclipse.emf.cdo.releng.OpenProperties"
- contextId="org.eclipse.ant.ui.AntEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+F6">
- </key>
- <key
- commandId="org.eclipse.emf.cdo.releng.OpenProperties"
- contextId="org.eclipse.jdt.ui.propertiesEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+F6">
- </key>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ 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
+-->
+
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ name="CDO Release Engineering"
+ id="org.eclipse.emf.cdo.releng">
+ </category>
+ <command
+ name="Open Project Manifest"
+ categoryId="org.eclipse.emf.cdo.releng"
+ id="org.eclipse.emf.cdo.releng.OpenManifest">
+ </command>
+ <command
+ name="Open Project Properties"
+ categoryId="org.eclipse.emf.cdo.releng"
+ id="org.eclipse.emf.cdo.releng.OpenProperties">
+ </command>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ commandId="org.eclipse.emf.cdo.releng.OpenManifest"
+ class="org.eclipse.emf.cdo.releng.manifests.OpenManifestHandler">
+ </handler>
+ <handler
+ commandId="org.eclipse.emf.cdo.releng.OpenProperties"
+ class="org.eclipse.emf.cdo.releng.manifests.OpenPropertiesHandler">
+ </handler>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.emf.cdo.releng.OpenManifest"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="F6"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </key>
+ <key
+ commandId="org.eclipse.emf.cdo.releng.OpenManifest"
+ contextId="org.eclipse.ui.textEditorScope"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="F6">
+ </key>
+ <key
+ commandId="org.eclipse.emf.cdo.releng.OpenManifest"
+ contextId="org.eclipse.jdt.ui.javaEditorScope"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="F6">
+ </key>
+ <key
+ commandId="org.eclipse.emf.cdo.releng.OpenManifest"
+ contextId="org.eclipse.jdt.ui.breadcrumbEditorScope"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="F6">
+ </key>
+ <key
+ commandId="org.eclipse.emf.cdo.releng.OpenManifest"
+ contextId="org.eclipse.ant.ui.AntEditorScope"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="F6">
+ </key>
+ <key
+ commandId="org.eclipse.emf.cdo.releng.OpenManifest"
+ contextId="org.eclipse.jdt.ui.propertiesEditorScope"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="F6">
+ </key>
+
+ <key
+ commandId="org.eclipse.emf.cdo.releng.OpenProperties"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M2+F6"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
+ </key>
+ <key
+ commandId="org.eclipse.emf.cdo.releng.OpenProperties"
+ contextId="org.eclipse.ui.textEditorScope"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M2+F6">
+ </key>
+ <key
+ commandId="org.eclipse.emf.cdo.releng.OpenProperties"
+ contextId="org.eclipse.jdt.ui.javaEditorScope"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M2+F6">
+ </key>
+ <key
+ commandId="org.eclipse.emf.cdo.releng.OpenProperties"
+ contextId="org.eclipse.jdt.ui.breadcrumbEditorScope"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M2+F6">
+ </key>
+ <key
+ commandId="org.eclipse.emf.cdo.releng.OpenProperties"
+ contextId="org.eclipse.ant.ui.AntEditorScope"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M2+F6">
+ </key>
+ <key
+ commandId="org.eclipse.emf.cdo.releng.OpenProperties"
+ contextId="org.eclipse.jdt.ui.propertiesEditorScope"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M2+F6">
+ </key>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/AbstractProjectHandler.java b/plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/AbstractProjectHandler.java
index 94d67073cb..786f34123f 100644
--- a/plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/AbstractProjectHandler.java
+++ b/plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/AbstractProjectHandler.java
@@ -1,105 +1,105 @@
-/*
- * 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.manifests;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * @author Eike Stepper
- */
-public abstract class AbstractProjectHandler extends AbstractHandler
-{
- public AbstractProjectHandler()
- {
- }
-
- public final Object execute(ExecutionEvent event) throws ExecutionException
- {
- IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
- IWorkbenchPage page = window.getActivePage();
- if (page == null)
- {
- return null;
- }
-
- IProject project = getProject(page);
- if (project != null)
- {
- execute(page, project);
- }
-
- return null;
- }
-
- private IProject getProject(IWorkbenchPage page)
- {
- IResource resource = null;
- ISelection selection = page.getSelection();
- if (selection instanceof IStructuredSelection)
- {
- IStructuredSelection ssel = (IStructuredSelection)selection;
- if (ssel.size() == 1)
- {
- Object element = ssel.getFirstElement();
- if (element instanceof IResource)
- {
- resource = (IResource)element;
- }
-
- if (resource == null && element instanceof IAdaptable)
- {
- resource = (IResource)((IAdaptable)element).getAdapter(IResource.class);
- }
-
- if (resource == null)
- {
- resource = (IResource)Platform.getAdapterManager().getAdapter(element, IResource.class);
- }
- }
- }
-
- if (resource == null)
- {
- IEditorPart editor = page.getActiveEditor();
- if (editor != null)
- {
- IEditorInput input = editor.getEditorInput();
- if (input instanceof IFileEditorInput)
- {
- resource = ((IFileEditorInput)input).getFile();
- }
- }
- }
-
- if (resource == null)
- {
- return null;
- }
-
- return resource.getProject();
- }
-
- protected abstract void execute(IWorkbenchPage page, IProject project);
-}
+/*
+ * 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.manifests;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * @author Eike Stepper
+ */
+public abstract class AbstractProjectHandler extends AbstractHandler
+{
+ public AbstractProjectHandler()
+ {
+ }
+
+ public final Object execute(ExecutionEvent event) throws ExecutionException
+ {
+ IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
+ IWorkbenchPage page = window.getActivePage();
+ if (page == null)
+ {
+ return null;
+ }
+
+ IProject project = getProject(page);
+ if (project != null)
+ {
+ execute(page, project);
+ }
+
+ return null;
+ }
+
+ private IProject getProject(IWorkbenchPage page)
+ {
+ IResource resource = null;
+ ISelection selection = page.getSelection();
+ if (selection instanceof IStructuredSelection)
+ {
+ IStructuredSelection ssel = (IStructuredSelection)selection;
+ if (ssel.size() == 1)
+ {
+ Object element = ssel.getFirstElement();
+ if (element instanceof IResource)
+ {
+ resource = (IResource)element;
+ }
+
+ if (resource == null && element instanceof IAdaptable)
+ {
+ resource = (IResource)((IAdaptable)element).getAdapter(IResource.class);
+ }
+
+ if (resource == null)
+ {
+ resource = (IResource)Platform.getAdapterManager().getAdapter(element, IResource.class);
+ }
+ }
+ }
+
+ if (resource == null)
+ {
+ IEditorPart editor = page.getActiveEditor();
+ if (editor != null)
+ {
+ IEditorInput input = editor.getEditorInput();
+ if (input instanceof IFileEditorInput)
+ {
+ resource = ((IFileEditorInput)input).getFile();
+ }
+ }
+ }
+
+ if (resource == null)
+ {
+ return null;
+ }
+
+ return resource.getProject();
+ }
+
+ protected abstract void execute(IWorkbenchPage page, IProject project);
+}
diff --git a/plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/Activator.java b/plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/Activator.java
index 5ff226ac9c..b7d635372b 100644
--- a/plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/Activator.java
+++ b/plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/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.manifests;
-
-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.manifests";
-
- 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.manifests;
+
+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.manifests";
+
+ 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.manifests/src/org/eclipse/emf/cdo/releng/manifests/OpenManifestHandler.java b/plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/OpenManifestHandler.java
index 448663a1b6..2b0c405ab3 100644
--- a/plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/OpenManifestHandler.java
+++ b/plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/OpenManifestHandler.java
@@ -1,113 +1,113 @@
-/*
- * 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.manifests;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.FileEditorInput;
-
-/**
- * @author Eike Stepper
- */
-public class OpenManifestHandler extends AbstractProjectHandler
-{
- private static final ProjectType[] PROJECT_TYPES = {
- new ProjectType("org.eclipse.pde.PluginNature", "org.eclipse.pde.ui.manifestEditor", "META-INF/MANIFEST.MF"),
- new ProjectType("org.eclipse.pde.FeatureNature", "org.eclipse.pde.ui.featureEditor", "feature.xml"),
- new ProjectType("org.eclipse.pde.UpdateSiteNature", "org.eclipse.pde.ui.siteEditor", "site.xml") };
-
- public OpenManifestHandler()
- {
- }
-
- @Override
- protected void execute(IWorkbenchPage page, IProject project)
- {
- ProjectType projectType = getProjectType(project);
- if (projectType == null)
- {
- return;
- }
-
- IFile manifest = project.getFile(new Path(projectType.getManifestPath()));
- if (manifest.exists())
- {
- try
- {
- IEditorInput input = new FileEditorInput(manifest);
- page.openEditor(input, projectType.getEditorID(), true);
- }
- catch (PartInitException ex)
- {
- Activator.getDefault().getLog().log(ex.getStatus());
- }
- }
- }
-
- private ProjectType getProjectType(IProject project)
- {
- for (ProjectType projectType : PROJECT_TYPES)
- {
- try
- {
- if (project.hasNature(projectType.getNatureID()))
- {
- return projectType;
- }
- }
- catch (CoreException ex)
- {
- Activator.getDefault().getLog().log(ex.getStatus());
- }
- }
-
- return null;
- }
-
- /**
- * @author Eike Stepper
- */
- private static final class ProjectType
- {
- private String natureID;
-
- private String editorID;
-
- private String manifestPath;
-
- public ProjectType(String natureID, String editorID, String manifestPath)
- {
- this.natureID = natureID;
- this.editorID = editorID;
- this.manifestPath = manifestPath;
- }
-
- public String getNatureID()
- {
- return natureID;
- }
-
- public String getEditorID()
- {
- return editorID;
- }
-
- public String getManifestPath()
- {
- return manifestPath;
- }
- }
-}
+/*
+ * 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.manifests;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.FileEditorInput;
+
+/**
+ * @author Eike Stepper
+ */
+public class OpenManifestHandler extends AbstractProjectHandler
+{
+ private static final ProjectType[] PROJECT_TYPES = {
+ new ProjectType("org.eclipse.pde.PluginNature", "org.eclipse.pde.ui.manifestEditor", "META-INF/MANIFEST.MF"),
+ new ProjectType("org.eclipse.pde.FeatureNature", "org.eclipse.pde.ui.featureEditor", "feature.xml"),
+ new ProjectType("org.eclipse.pde.UpdateSiteNature", "org.eclipse.pde.ui.siteEditor", "site.xml") };
+
+ public OpenManifestHandler()
+ {
+ }
+
+ @Override
+ protected void execute(IWorkbenchPage page, IProject project)
+ {
+ ProjectType projectType = getProjectType(project);
+ if (projectType == null)
+ {
+ return;
+ }
+
+ IFile manifest = project.getFile(new Path(projectType.getManifestPath()));
+ if (manifest.exists())
+ {
+ try
+ {
+ IEditorInput input = new FileEditorInput(manifest);
+ page.openEditor(input, projectType.getEditorID(), true);
+ }
+ catch (PartInitException ex)
+ {
+ Activator.getDefault().getLog().log(ex.getStatus());
+ }
+ }
+ }
+
+ private ProjectType getProjectType(IProject project)
+ {
+ for (ProjectType projectType : PROJECT_TYPES)
+ {
+ try
+ {
+ if (project.hasNature(projectType.getNatureID()))
+ {
+ return projectType;
+ }
+ }
+ catch (CoreException ex)
+ {
+ Activator.getDefault().getLog().log(ex.getStatus());
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ private static final class ProjectType
+ {
+ private String natureID;
+
+ private String editorID;
+
+ private String manifestPath;
+
+ public ProjectType(String natureID, String editorID, String manifestPath)
+ {
+ this.natureID = natureID;
+ this.editorID = editorID;
+ this.manifestPath = manifestPath;
+ }
+
+ public String getNatureID()
+ {
+ return natureID;
+ }
+
+ public String getEditorID()
+ {
+ return editorID;
+ }
+
+ public String getManifestPath()
+ {
+ return manifestPath;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/OpenPropertiesHandler.java b/plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/OpenPropertiesHandler.java
index ea983fef26..44638c9cd4 100644
--- a/plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/OpenPropertiesHandler.java
+++ b/plugins/org.eclipse.emf.cdo.releng.manifests/src/org/eclipse/emf/cdo/releng/manifests/OpenPropertiesHandler.java
@@ -1,62 +1,62 @@
-/*
- * 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.manifests;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-
-/**
- * @author Eike Stepper
- */
-public class OpenPropertiesHandler extends AbstractProjectHandler
-{
- public OpenPropertiesHandler()
- {
- }
-
- @Override
- protected void execute(IWorkbenchPage page, final IProject project)
- {
- PropertyDialogAction action = new PropertyDialogAction(page.getWorkbenchWindow(), new ISelectionProvider()
- {
- public ISelection getSelection()
- {
- return new StructuredSelection(project);
- }
-
- public void setSelection(ISelection selection)
- {
- }
-
- public void addSelectionChangedListener(ISelectionChangedListener listener)
- {
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener)
- {
- }
- });
-
- try
- {
- action.runWithEvent(null);
- }
- finally
- {
- action.dispose();
- }
- }
-}
+/*
+ * 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.manifests;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.dialogs.PropertyDialogAction;
+
+/**
+ * @author Eike Stepper
+ */
+public class OpenPropertiesHandler extends AbstractProjectHandler
+{
+ public OpenPropertiesHandler()
+ {
+ }
+
+ @Override
+ protected void execute(IWorkbenchPage page, final IProject project)
+ {
+ PropertyDialogAction action = new PropertyDialogAction(page.getWorkbenchWindow(), new ISelectionProvider()
+ {
+ public ISelection getSelection()
+ {
+ return new StructuredSelection(project);
+ }
+
+ public void setSelection(ISelection selection)
+ {
+ }
+
+ public void addSelectionChangedListener(ISelectionChangedListener listener)
+ {
+ }
+
+ public void removeSelectionChangedListener(ISelectionChangedListener listener)
+ {
+ }
+ });
+
+ try
+ {
+ action.runWithEvent(null);
+ }
+ finally
+ {
+ action.dispose();
+ }
+ }
+}

Back to the top