diff options
author | cvs2svn | 2010-07-26 14:55:11 +0000 |
---|---|---|
committer | cvs2svn | 2010-07-26 14:55:11 +0000 |
commit | 8a93c10efcbb2f2bbfbf3540afcbb71830b54a70 (patch) | |
tree | 79d53b00bbcf46a30c67c31b30a8c76c486f54fa | |
parent | fff5dc54d99acafae99d4d7911f606352a70fa00 (diff) | |
download | org.eclipse.e4.tools-8a93c10efcbb2f2bbfbf3540afcbb71830b54a70.tar.gz org.eclipse.e4.tools-8a93c10efcbb2f2bbfbf3540afcbb71830b54a70.tar.xz org.eclipse.e4.tools-8a93c10efcbb2f2bbfbf3540afcbb71830b54a70.zip |
This commit was manufactured by cvs2svn to create branch 'post_40_release'.
Sprout from master 2010-07-26 14:55:06 UTC Thomas Schindl <tschindl> 'Bug 320909 - [ModelTooling] Label displayed to add KeyBindingTable is wrong'
Delete:
bundles/org.eclipse.e4.tools.compat/.classpath
bundles/org.eclipse.e4.tools.compat/.project
bundles/org.eclipse.e4.tools.compat/.settings/org.eclipse.jdt.core.prefs
bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF
bundles/org.eclipse.e4.tools.compat/OSGI-INF/l10n/bundle.properties
bundles/org.eclipse.e4.tools.compat/OSGI-INF/selectionproviderfunction.xml
bundles/org.eclipse.e4.tools.compat/about.html
bundles/org.eclipse.e4.tools.compat/build.properties
bundles/org.eclipse.e4.tools.compat/plugin.xml
bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ClipboardServiceImpl.java
bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java
bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/CopyAction.java
bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/CutAction.java
bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/DefaultLoggerProvider.java
bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java
bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PasteAction.java
bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ReflectionContributionFactory.java
bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/SelectionProviderContextFunction.java
bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/Util.java
bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/WorkbenchLogger.java
bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java
bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DISaveableViewPart.java
bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java
bundles/org.eclipse.e4.tools.context/.classpath
bundles/org.eclipse.e4.tools.context/.project
bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.jdt.core.prefs
bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.pde.core.prefs
bundles/org.eclipse.e4.tools.context/META-INF/MANIFEST.MF
bundles/org.eclipse.e4.tools.context/build.properties
bundles/org.eclipse.e4.tools.context/plugin.xml
bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/DiffSnapshotHandler.java
bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/GenerateSnapshotHandler.java
bundles/org.eclipse.e4.tools.emf.editor/.classpath
bundles/org.eclipse.e4.tools.emf.editor/.project
bundles/org.eclipse.e4.tools.emf.editor/.settings/org.eclipse.jdt.core.prefs
bundles/org.eclipse.e4.tools.emf.editor/Application.e4xmi
bundles/org.eclipse.e4.tools.emf.editor/META-INF/MANIFEST.MF
bundles/org.eclipse.e4.tools.emf.editor/ModelEditor.product
bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/l10n/bundle.properties
bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/selectionproviderfunction.xml
bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/xmiresourcecontextfunction.xml
bundles/org.eclipse.e4.tools.emf.editor/about.html
bundles/org.eclipse.e4.tools.emf.editor/build.properties
bundles/org.eclipse.e4.tools.emf.editor/css/default.css
bundles/org.eclipse.e4.tools.emf.editor/css/e4_default.css
bundles/org.eclipse.e4.tools.emf.editor/icons/full/application_view_tile.png
bundles/org.eclipse.e4.tools.emf.editor/icons/full/disk.png
bundles/org.eclipse.e4.tools.emf.editor/icons/full/folder_page.png
bundles/org.eclipse.e4.tools.emf.editor/images/winXPBlue.PNG
bundles/org.eclipse.e4.tools.emf.editor/images/winXPOlive.PNG
bundles/org.eclipse.e4.tools.emf.editor/plugin.xml
bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewApplicationModelHandler.java
bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewModelContributionHandler.java
bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/OpenModelFileHandler.java
bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SaveModelFileHandler.java
bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SelectionProviderContextFunction.java
bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/XMIResourceFunction.java
bundles/org.eclipse.e4.tools.emf.editor3x/.classpath
bundles/org.eclipse.e4.tools.emf.editor3x/.project
bundles/org.eclipse.e4.tools.emf.editor3x/.settings/org.eclipse.jdt.core.prefs
bundles/org.eclipse.e4.tools.emf.editor3x/META-INF/MANIFEST.MF
bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/l10n/bundle.properties
bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdecontributionprovider.xml
bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdee4xmiprovider.xml
bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdeextensionlookup.xml
bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/projectfunction.xml
bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/xmiresourcecontextfunction.xml
bundles/org.eclipse.e4.tools.emf.editor3x/about.html
bundles/org.eclipse.e4.tools.emf.editor3x/build.properties
bundles/org.eclipse.e4.tools.emf.editor3x/icons/full/obj16/application_view_tile.png
bundles/org.eclipse.e4.tools.emf.editor3x/plugin.xml
bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/E4WorkbenchModelEditor.java
bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/EditorProjectFunction.java
bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/ModelEditorPreferencePage.java
bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEClassContributionProvider.java
bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEExtensionLookup.java
bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/RedoAction.java
bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/TargetElementProviders.java
bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/UndoAction.java
bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIModelResource.java
bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIResourceFunction.java
bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java
bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/AddonContributionEditor.java
bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/HandlerContributionEditor.java
bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/PartContributionEditor.java
bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/Util.java
bundles/org.eclipse.e4.tools.emf.liveeditor/.classpath
bundles/org.eclipse.e4.tools.emf.liveeditor/.project
bundles/org.eclipse.e4.tools.emf.liveeditor/.settings/org.eclipse.jdt.core.prefs
bundles/org.eclipse.e4.tools.emf.liveeditor/META-INF/MANIFEST.MF
bundles/org.eclipse.e4.tools.emf.liveeditor/OSGI-INF/extensionlookup.xml
bundles/org.eclipse.e4.tools.emf.liveeditor/OSGI-INF/l10n/bundle.properties
bundles/org.eclipse.e4.tools.emf.liveeditor/about.html
bundles/org.eclipse.e4.tools.emf.liveeditor/build.properties
bundles/org.eclipse.e4.tools.emf.liveeditor/plugin.xml
bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/MemoryModelResource.java
bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/ModelProcessor.java
bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/OpenLiveDialogHandler.java
bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/RuntimeExtensionLookup.java
bundles/org.eclipse.e4.tools.jdt.templates/.classpath
bundles/org.eclipse.e4.tools.jdt.templates/.project
bundles/org.eclipse.e4.tools.jdt.templates/.settings/org.eclipse.jdt.core.prefs
bundles/org.eclipse.e4.tools.jdt.templates/META-INF/MANIFEST.MF
bundles/org.eclipse.e4.tools.jdt.templates/build.properties
bundles/org.eclipse.e4.tools.jdt.templates/icons/full/elcl16/e4assist_co.gif
bundles/org.eclipse.e4.tools.jdt.templates/plugin.xml
bundles/org.eclipse.e4.tools.jdt.templates/src/org/eclipse/e4/internal/tools/jdt/templates/E4ContextType.java
bundles/org.eclipse.e4.tools.jdt.templates/src/org/eclipse/e4/internal/tools/jdt/templates/E4TemplateCompletionProposalComputer.java
bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.properties
bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.xml
bundles/org.eclipse.e4.tools.services/.classpath
bundles/org.eclipse.e4.tools.services/.project
bundles/org.eclipse.e4.tools.services/.settings/org.eclipse.jdt.core.prefs
bundles/org.eclipse.e4.tools.services/META-INF/MANIFEST.MF
bundles/org.eclipse.e4.tools.services/OSGI-INF/l10n/bundle.properties
bundles/org.eclipse.e4.tools.services/about.html
bundles/org.eclipse.e4.tools.services/build.properties
bundles/org.eclipse.e4.tools.services/src/org/eclipse/e4/tools/services/IClipboardService.java
bundles/org.eclipse.e4.tools.services/src/org/eclipse/e4/tools/services/IDirtyProviderService.java
bundles/org.eclipse.e4.tools.services/src/org/eclipse/e4/tools/services/ISelectionProviderService.java
bundles/org.eclipse.e4.tools/.classpath
bundles/org.eclipse.e4.tools/.jetproperties
bundles/org.eclipse.e4.tools/.project
bundles/org.eclipse.e4.tools/.settings/org.eclipse.jdt.core.prefs
bundles/org.eclipse.e4.tools/META-INF/MANIFEST.MF
bundles/org.eclipse.e4.tools/OSGI-INF/l10n/bundle.properties
bundles/org.eclipse.e4.tools/about.html
bundles/org.eclipse.e4.tools/build.properties
bundles/org.eclipse.e4.tools/icons/full/obj16/Addons.png
bundles/org.eclipse.e4.tools/icons/full/obj16/Part.gif
bundles/org.eclipse.e4.tools/icons/full/obj16/application_view_tile.png
bundles/org.eclipse.e4.tools/icons/full/obj16/class_obj.gif
bundles/org.eclipse.e4.tools/icons/full/obj16/plugin.png
bundles/org.eclipse.e4.tools/icons/full/wizban/newclass_wiz.png
bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/emf/editor3x/templates/HandlerTemplate.java
bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/emf/editor3x/templates/PartTemplate.java
bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/internal/classes/templates/HandlerTemplate.java
bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/internal/classes/templates/PartTemplate.java
bundles/org.eclipse.e4.tools/plugin.xml
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/ToolsPlugin.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassPage.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassWizard.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewAddonClassWizard.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewHandlerClassWizard.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewPartClassWizard.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/templates/AddonTemplate.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/templates/HandlerTemplate.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/templates/PartTemplate.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/BaseApplicationModelWizard.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewApplicationModelWizard.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewContributionModelWizard.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewModelFilePage.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizardPage.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/NewApplicationWizardPage.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/PluginContentPage.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/ResourceLocator.java
bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/TemplateOperation.java
bundles/org.eclipse.e4.tools/templates/addon.txtjet
bundles/org.eclipse.e4.tools/templates/common/$projectName$.product
bundles/org.eclipse.e4.tools/templates/common/icons/sample.gif
bundles/org.eclipse.e4.tools/templates/common/icons/save_edit.gif
bundles/org.eclipse.e4.tools/templates/css/default.css
bundles/org.eclipse.e4.tools/templates/handler.txtjet
bundles/org.eclipse.e4.tools/templates/part.txtjet
bundles/org.eclipse.e4.tools/templates/src/handlers/AboutHandler.java
bundles/org.eclipse.e4.tools/templates/src/handlers/OpenHandler.java
bundles/org.eclipse.e4.tools/templates/src/handlers/QuitHandler.java
bundles/org.eclipse.e4.tools/templates/src/handlers/SaveHandler.java
features/org.eclipse.e4.core.tools.feature/.project
features/org.eclipse.e4.core.tools.feature/build.properties
features/org.eclipse.e4.core.tools.feature/feature.properties
features/org.eclipse.e4.core.tools.feature/feature.xml
features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/eclipse_update_120.jpg
features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/epl-v10.html
features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/feature.properties
features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/license.html
features/org.eclipse.e4.core.tools.feature/sourceTemplatePlugin/build.properties
178 files changed, 0 insertions, 9366 deletions
diff --git a/bundles/org.eclipse.e4.tools.compat/.classpath b/bundles/org.eclipse.e4.tools.compat/.classpath deleted file mode 100644 index 64c5e31b..00000000 --- a/bundles/org.eclipse.e4.tools.compat/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?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/bundles/org.eclipse.e4.tools.compat/.project b/bundles/org.eclipse.e4.tools.compat/.project deleted file mode 100644 index e5e9a152..00000000 --- a/bundles/org.eclipse.e4.tools.compat/.project +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.e4.tools.compat</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> - <buildCommand> - <name>org.eclipse.pde.ds.core.builder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/bundles/org.eclipse.e4.tools.compat/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.compat/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 4fe42718..00000000 --- a/bundles/org.eclipse.e4.tools.compat/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Mon May 31 09:52:05 CEST 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF deleted file mode 100644 index 0b4aea4d..00000000 --- a/bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF +++ /dev/null @@ -1,20 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %Bundle-Name -Bundle-SymbolicName: org.eclipse.e4.tools.compat;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Require-Bundle: org.eclipse.ui;bundle-version="3.6.0", - org.eclipse.core.runtime;bundle-version="3.6.0", - org.eclipse.e4.core.contexts;bundle-version="0.9.0", - org.eclipse.e4.core.services;bundle-version="0.9.1", - org.eclipse.e4.ui.services;bundle-version="0.9.1", - org.eclipse.e4.core.di;bundle-version="0.9.0", - org.eclipse.e4.tools.services;bundle-version="1.0.0", - org.eclipse.e4.ui.css.swt.theme;bundle-version="0.9.0", - org.eclipse.e4.ui.di;bundle-version="0.9.0", - javax.inject;bundle-version="1.0.0" -Service-Component: OSGI-INF/selectionproviderfunction.xml -Export-Package: org.eclipse.e4.tools.compat.parts -Bundle-ActivationPolicy: lazy -Bundle-Vendor: %Bundle-Vendor diff --git a/bundles/org.eclipse.e4.tools.compat/OSGI-INF/l10n/bundle.properties b/bundles/org.eclipse.e4.tools.compat/OSGI-INF/l10n/bundle.properties deleted file mode 100644 index 767d1e6f..00000000 --- a/bundles/org.eclipse.e4.tools.compat/OSGI-INF/l10n/bundle.properties +++ /dev/null @@ -1,3 +0,0 @@ -#Properties file for org.eclipse.e4.tools.compat -Bundle-Name = Compat -Bundle-Vendor = Eclipse.org
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.compat/OSGI-INF/selectionproviderfunction.xml b/bundles/org.eclipse.e4.tools.compat/OSGI-INF/selectionproviderfunction.xml deleted file mode 100644 index 15b8531d..00000000 --- a/bundles/org.eclipse.e4.tools.compat/OSGI-INF/selectionproviderfunction.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.compat.selectionprovider"> - <implementation class="org.eclipse.e4.tools.compat.internal.SelectionProviderContextFunction"/> - <service> - <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/> - </service> - <property name="service.context.key" type="String" value="org.eclipse.e4.tools.services.ISelectionProviderService"/> -</scr:component> diff --git a/bundles/org.eclipse.e4.tools.compat/about.html b/bundles/org.eclipse.e4.tools.compat/about.html deleted file mode 100644 index 82494867..00000000 --- a/bundles/org.eclipse.e4.tools.compat/about.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> -<title>About</title> -</head> -<body lang="EN-US"> -<h2>About This Content</h2> - -<p>December 3, 2009</p> -<h3>License</h3> - -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> - -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> - -</body> -</html>
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.compat/build.properties b/bundles/org.eclipse.e4.tools.compat/build.properties deleted file mode 100644 index aac269a4..00000000 --- a/bundles/org.eclipse.e4.tools.compat/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - about.html,\ - OSGI-INF/ -source.. = src/ diff --git a/bundles/org.eclipse.e4.tools.compat/plugin.xml b/bundles/org.eclipse.e4.tools.compat/plugin.xml deleted file mode 100644 index a8396863..00000000 --- a/bundles/org.eclipse.e4.tools.compat/plugin.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.4"?> -<plugin> - <extension - point="org.eclipse.ui.services"> - <serviceFactory - factoryClass="org.eclipse.e4.tools.compat.internal.ContextServiceFactory"> - <service - serviceClass="org.eclipse.e4.core.contexts.IEclipseContext"></service> - </serviceFactory> - </extension> - -</plugin> diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ClipboardServiceImpl.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ClipboardServiceImpl.java deleted file mode 100644 index bd163fe0..00000000 --- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ClipboardServiceImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.compat.internal; - -import org.eclipse.e4.tools.services.IClipboardService; - -public class ClipboardServiceImpl implements IClipboardService { - private Handler handler; - - public void copy() { - if( handler != null ) { - handler.copy(); - } - } - - public void paste() { - if( handler != null ) { - handler.paste(); - } - } - - public void setHandler(Handler handler) { - this.handler = handler; - } - - public void cut() { - this.handler.cut(); - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java deleted file mode 100644 index 632d0fbe..00000000 --- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java +++ /dev/null @@ -1,137 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.compat.internal; - -import org.eclipse.e4.core.contexts.ContextInjectionFactory; -import org.eclipse.e4.core.contexts.EclipseContextFactory; -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.core.services.contributions.IContributionFactory; -import org.eclipse.e4.core.services.log.ILoggerProvider; -import org.eclipse.e4.core.services.log.Logger; -import org.eclipse.e4.tools.services.IClipboardService; -import org.eclipse.e4.ui.css.swt.theme.IThemeEngine; -import org.eclipse.e4.ui.css.swt.theme.IThemeManager; -import org.eclipse.e4.ui.services.IServiceConstants; -import org.eclipse.e4.ui.services.IStylingEngine; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Widget; -import org.eclipse.ui.ISelectionListener; -import org.eclipse.ui.ISelectionService; -import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.IWorkbenchPartSite; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.internal.services.IWorkbenchLocationService; -import org.eclipse.ui.services.AbstractServiceFactory; -import org.eclipse.ui.services.IServiceLocator; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.w3c.dom.css.CSSStyleDeclaration; - -@SuppressWarnings("restriction") -public class ContextServiceFactory extends AbstractServiceFactory { - - @Override - public Object create(@SuppressWarnings("rawtypes") Class serviceInterface, IServiceLocator parentLocator, - IServiceLocator locator) { - if( ! IEclipseContext.class.equals(serviceInterface) ) { - return null; - } - - - IWorkbenchLocationService wls = (IWorkbenchLocationService) locator.getService(IWorkbenchLocationService.class); - final IWorkbenchWindow window = wls.getWorkbenchWindow(); - final IWorkbenchPartSite site = wls.getPartSite(); - - Object o = parentLocator.getService(serviceInterface); - - // This happens when we run in plain 3.x - // We need to create a parent service context - if( window == null && site == null ) { - Bundle bundle = FrameworkUtil.getBundle(ContextServiceFactory.class); - BundleContext bundleContext = bundle.getBundleContext(); - IEclipseContext serviceContext = EclipseContextFactory.getServiceContext(bundleContext); - - final IEclipseContext appContext = serviceContext.createChild("WorkbenchContext"); //$NON-NLS-1$ - appContext.set(Logger.class, new WorkbenchLogger()); - appContext.set(IClipboardService.class, new ClipboardServiceImpl()); - IContributionFactory contributionFactory = ContextInjectionFactory.make(ReflectionContributionFactory.class, appContext); - appContext.set(IContributionFactory.class.getName(),contributionFactory); - - IThemeManager manager = serviceContext.get(IThemeManager.class); - final IThemeEngine engine = manager.getEngineForDisplay(Display.getCurrent()); - appContext.set(IThemeEngine.class, engine); - - appContext.set(IStylingEngine.class, new IStylingEngine() { - - public void setClassname(Object widget, String classname) { - ((Widget) widget).setData( - "org.eclipse.e4.ui.css.CssClassName", classname); //$NON-NLS-1$ - engine.applyStyles((Widget) widget, true); - } - - public void setId(Object widget, String id) { - ((Widget) widget).setData("org.eclipse.e4.ui.css.id", id); //$NON-NLS-1$ - engine.applyStyles((Widget) widget, true); - } - - public void style(Object widget) { - engine.applyStyles((Widget) widget, true); - } - - public CSSStyleDeclaration getStyle(Object widget) { - return engine.getStyle((Widget) widget); - } - - public void setClassnameAndId(Object widget, String classname, - String id) { - ((Widget) widget).setData( - "org.eclipse.e4.ui.css.CssClassName", classname); //$NON-NLS-1$ - ((Widget) widget).setData("org.eclipse.e4.ui.css.id", id); //$NON-NLS-1$ - engine.applyStyles((Widget) widget, true); - } - }); - - if( appContext.get(ILoggerProvider.class) == null ) { - appContext.set(ILoggerProvider.class, ContextInjectionFactory.make(DefaultLoggerProvider.class, appContext)); - } - - return appContext; - } else if( o != null && site == null ) { - final IEclipseContext windowContext = ((IEclipseContext)o).createChild("WindowContext("+window+")"); - windowContext.set(ISelectionService.class, window.getSelectionService()); - - windowContext.declareModifiable(IServiceConstants.ACTIVE_SELECTION); - window.getSelectionService().addSelectionListener(new ISelectionListener() { - - public void selectionChanged(IWorkbenchPart part, ISelection selection) { - if( ! selection.isEmpty() ) { - if( selection instanceof IStructuredSelection ) { - IStructuredSelection s = (IStructuredSelection) selection; - if( s.size() == 1 ) { - windowContext.set(IServiceConstants.ACTIVE_SELECTION, s.getFirstElement()); - } else { - windowContext.set(IServiceConstants.ACTIVE_SELECTION, s.toList()); - } - } else { - windowContext.set(IServiceConstants.ACTIVE_SELECTION, selection); - } - } - } - }); - return windowContext; - } - - return o; - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/CopyAction.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/CopyAction.java deleted file mode 100644 index a6493fee..00000000 --- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/CopyAction.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.compat.internal; - -import org.eclipse.e4.tools.services.IClipboardService; -import org.eclipse.jface.action.Action; - -public class CopyAction extends Action { - private IClipboardService service; - - public CopyAction(IClipboardService service) { - super("Copy"); - this.service = service; - } - - @Override - public void run() { - service.copy(); - } -} diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/CutAction.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/CutAction.java deleted file mode 100644 index 02a0c9dd..00000000 --- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/CutAction.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.compat.internal; - -import org.eclipse.e4.tools.services.IClipboardService; -import org.eclipse.jface.action.Action; - -public class CutAction extends Action { - private IClipboardService service; - - public CutAction(IClipboardService service) { - super("Cut"); - this.service = service; - } - - @Override - public void run() { - service.cut(); - } -} diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/DefaultLoggerProvider.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/DefaultLoggerProvider.java deleted file mode 100644 index b3f922b0..00000000 --- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/DefaultLoggerProvider.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.eclipse.e4.tools.compat.internal; - -import javax.inject.Inject; - -import org.eclipse.e4.core.contexts.ContextInjectionFactory; -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.core.services.log.ILoggerProvider; -import org.eclipse.e4.core.services.log.Logger; -import org.osgi.framework.FrameworkUtil; - -public class DefaultLoggerProvider implements ILoggerProvider { - @Inject - private IEclipseContext context; - - public Logger getClassLogger(Class<?> clazz) { - IEclipseContext childContext = context.createChild(); - childContext.set("logger.bundlename", FrameworkUtil.getBundle(clazz).getSymbolicName()); //$NON-NLS-1$ - return (Logger) ContextInjectionFactory.make(WorkbenchLogger.class, childContext); - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java deleted file mode 100644 index aceae1eb..00000000 --- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java +++ /dev/null @@ -1,110 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.compat.internal; - -import java.lang.reflect.Method; - -import org.eclipse.core.runtime.ListenerList; -import org.eclipse.e4.core.contexts.ContextInjectionFactory; -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.tools.services.IClipboardService; -import org.eclipse.e4.ui.services.IStylingEngine; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.ISelectionProvider; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.IWorkbenchPartSite; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.part.WorkbenchPart; - -public class PartHelper { - public static IEclipseContext createPartContext(WorkbenchPart part) throws PartInitException { - IWorkbenchPartSite site = part.getSite(); - IEclipseContext parentContext = (IEclipseContext) site.getService(IEclipseContext.class); - - // Check if running in 4.x - if( parentContext.get("org.eclipse.e4.ui.workbench.IPresentationEngine") != null ) { - // Hack to get the MPart-Context - try { - Class<?> clazz = Util.getBundle("org.eclipse.e4.ui.model.workbench").loadClass("org.eclipse.e4.ui.model.application.ui.basic.MPart"); - Object instance = site.getService(clazz); - Method m = clazz.getMethod("getContext", new Class[0]); - IEclipseContext ctx = (IEclipseContext) m.invoke(instance); - IEclipseContext rv = ctx.createChild(); - while( ctx.getParent() != null ) { - ctx = ctx.getParent(); - } - ctx.set(IClipboardService.class, new ClipboardServiceImpl()); - return rv; - } catch (Exception e) { - throw new PartInitException("Could not create context",e); - } - } else { - return parentContext.createChild("EditPart('"+part.getPartName()+"')"); //$NON-NLS-1$ - } - - } - - public static <C> C creatComponent(Composite parent, IEclipseContext context, Class<C> clazz, WorkbenchPart part) { - ISelectionProvider s = new SelectionProviderImpl(); - context.set(ISelectionProvider.class, s); - part.getSite().setSelectionProvider(s); - - IStylingEngine styleEngine = context.get(IStylingEngine.class); - Composite comp = new Composite(parent, SWT.NONE); - comp.setBackgroundMode(SWT.INHERIT_DEFAULT); - - //FIXME This should be read from the CSS - FillLayout layout = new FillLayout(); - layout.marginWidth = 10; - layout.marginHeight = 10; - comp.setLayout(layout); - - context.set(Composite.class.getName(), comp); - C component = ContextInjectionFactory.make(clazz, context); - - styleEngine.setClassname(comp, part.getClass().getSimpleName()); - - return component; - } - - static class SelectionProviderImpl implements ISelectionProvider { - private ISelection currentSelection = StructuredSelection.EMPTY; - - private ListenerList listeners = new ListenerList(); - - public void setSelection(ISelection selection) { - currentSelection = selection; - SelectionChangedEvent evt = new SelectionChangedEvent(this, selection); - - for( Object l : listeners.getListeners() ) { - ((ISelectionChangedListener)l).selectionChanged(evt); - } - } - - public void removeSelectionChangedListener( - ISelectionChangedListener listener) { - listeners.remove(listener); - } - - public ISelection getSelection() { - return currentSelection; - } - - public void addSelectionChangedListener(ISelectionChangedListener listener) { - listeners.add(listener); - } - } -} diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PasteAction.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PasteAction.java deleted file mode 100644 index 9e3b40a2..00000000 --- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PasteAction.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.compat.internal; - -import org.eclipse.e4.tools.services.IClipboardService; -import org.eclipse.jface.action.Action; - -public class PasteAction extends Action { - private IClipboardService service; - public PasteAction(IClipboardService service) { - super("Paste"); - this.service = service; - } - - @Override - public void run() { - service.paste(); - } -} diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ReflectionContributionFactory.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ReflectionContributionFactory.java deleted file mode 100644 index 5b61577c..00000000 --- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ReflectionContributionFactory.java +++ /dev/null @@ -1,186 +0,0 @@ -package org.eclipse.e4.tools.compat.internal; - -import java.util.HashMap; -import java.util.Map; - -import javax.inject.Inject; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtensionRegistry; -import org.eclipse.core.runtime.InvalidRegistryObjectException; -import org.eclipse.e4.core.contexts.ContextInjectionFactory; -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.core.di.InjectionException; -import org.eclipse.e4.core.services.contributions.IContributionFactory; -import org.eclipse.e4.core.services.contributions.IContributionFactorySpi; -import org.eclipse.e4.core.services.log.Logger; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; -import org.osgi.service.packageadmin.PackageAdmin; - -/** - * Create the contribution factory. - */ -@SuppressWarnings("restriction") -public class ReflectionContributionFactory implements IContributionFactory { - - private IExtensionRegistry registry; - private Map<String, Object> languages; - - @Inject - private PackageAdmin packageAdmin; - - @Inject - private Logger logger; - - /** - * Create a reflection factory. - * - * @param registry - * to read languages. - */ - @Inject - public ReflectionContributionFactory(IExtensionRegistry registry) { - this.registry = registry; - processLanguages(); - } - - public Object create(String uriString, IEclipseContext context, IEclipseContext staticContext) { - return doCreate(uriString, context, staticContext); - } - - public Object create(String uriString, IEclipseContext context) { - return doCreate(uriString, context, null); - } - - private Object doCreate(String uriString, IEclipseContext context, IEclipseContext staticContext) { - if (uriString == null) { - return null; - } - URI uri = URI.createURI(uriString); - Bundle bundle = getBundle(uri); - Object contribution; - if (bundle != null) { - contribution = createFromBundle(bundle, context, staticContext, uri); - } else { - contribution = null; - logger.error("Unable to retrive the bundle from the URI: " //$NON-NLS-1$ - + uriString); - } - return contribution; - } - - protected Object createFromBundle(Bundle bundle, IEclipseContext context, - IEclipseContext staticContext, URI uri) { - Object contribution; - if (uri.segmentCount() > 3) { - String prefix = uri.segment(2); - IContributionFactorySpi factory = (IContributionFactorySpi) languages.get(prefix); - StringBuffer resource = new StringBuffer(uri.segment(3)); - for (int i = 4; i < uri.segmentCount(); i++) { - resource.append('/'); - resource.append(uri.segment(i)); - } - contribution = factory.create(bundle, resource.toString(), context); - } else { - String clazz = uri.segment(2); - try { - Class<?> targetClass = bundle.loadClass(clazz); - if (staticContext == null) - contribution = ContextInjectionFactory.make(targetClass, context); - else - contribution = ContextInjectionFactory - .make(targetClass, context, staticContext); - - if (contribution == null) { - String message = "Unable to load class '" + clazz + "' from bundle '" //$NON-NLS-1$ //$NON-NLS-2$ - + bundle.getBundleId() + "'"; //$NON-NLS-1$ - logger.error(message); - } - } catch (ClassNotFoundException e) { - contribution = null; - String message = "Unable to load class '" + clazz + "' from bundle '" //$NON-NLS-1$ //$NON-NLS-2$ - + bundle.getBundleId() + "'"; //$NON-NLS-1$ - logger.error(e,message); - } catch (InjectionException e) { - contribution = null; - String message = "Unable to create class '" + clazz + "' from bundle '" //$NON-NLS-1$ //$NON-NLS-2$ - + bundle.getBundleId() + "'"; //$NON-NLS-1$ - logger.error(e, message); - } - } - return contribution; - } - - protected void processLanguages() { - languages = new HashMap<String, Object>(); - String extId = "org.eclipse.e4.languages"; //$NON-NLS-1$ - IConfigurationElement[] languageElements = registry.getConfigurationElementsFor(extId); - for (int i = 0; i < languageElements.length; i++) { - IConfigurationElement languageElement = languageElements[i]; - try { - languages.put(languageElement.getAttribute("name"), //$NON-NLS-1$ - languageElement.createExecutableExtension("contributionFactory")); //$NON-NLS-1$ - } catch (InvalidRegistryObjectException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - - - protected Bundle getBundle(URI platformURI) { - return getBundleForName(platformURI.segments[1]); - } - - public Bundle getBundle(String uriString) { - return getBundle(new URI(uriString)); - } - - public Bundle getBundleForName(String bundlename) { - if( packageAdmin == null ) { - Bundle bundle = FrameworkUtil.getBundle(getClass()); - BundleContext context = bundle.getBundleContext(); - ServiceReference reference = context.getServiceReference(PackageAdmin.class.getName()); - packageAdmin = (PackageAdmin) context.getService(reference); - } - - Bundle[] bundles = packageAdmin.getBundles(bundlename, null); - if (bundles == null) - return null; - // Return the first bundle that is not installed or uninstalled - for (int i = 0; i < bundles.length; i++) { - if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) { - return bundles[i]; - } - } - return null; - } - - static class URI { - String[] segments; - String uri; - - URI(String uriString) { - segments = uriString.substring(uriString.indexOf('/')+1).split("/"); - } - - public String segment(int i) { - return segments[i]; - } - - public int segmentCount() { - return segments.length; - } - - static URI createURI(String uriString) { - return new URI(uriString); - } - } -} diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/SelectionProviderContextFunction.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/SelectionProviderContextFunction.java deleted file mode 100644 index 901627cd..00000000 --- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/SelectionProviderContextFunction.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.compat.internal; - -import java.util.List; - -import org.eclipse.e4.core.contexts.ContextFunction; -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.tools.services.ISelectionProviderService; -import org.eclipse.jface.viewers.ISelectionProvider; -import org.eclipse.jface.viewers.StructuredSelection; - - -public class SelectionProviderContextFunction extends ContextFunction { - - @Override - public Object compute(final IEclipseContext context) { - return new ISelectionProviderService() { - public void setSelection(Object selection) { - ISelectionProvider pv = context.get(ISelectionProvider.class); - - if( selection instanceof List<?> ) { - pv.setSelection(new StructuredSelection((List<?>)selection)); - } else { - pv.setSelection(new StructuredSelection(selection)); - } - - } - }; - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/Util.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/Util.java deleted file mode 100644 index 567fcc2b..00000000 --- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/Util.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.eclipse.e4.tools.compat.internal; - -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; -import org.osgi.service.packageadmin.PackageAdmin; - -public class Util { - public static Bundle getBundle(String bundleName) { - Bundle bundle = FrameworkUtil.getBundle(Util.class); - BundleContext ctx = bundle.getBundleContext(); - ServiceReference ref = bundle.getBundleContext().getServiceReference(PackageAdmin.class.getName()); - PackageAdmin bundleAdmin = (PackageAdmin) ctx.getService(ref); - Bundle[] bundles = bundleAdmin.getBundles(bundleName, null); - if (bundles == null) - return null; - // Return the first bundle that is not installed or uninstalled - for (int i = 0; i < bundles.length; i++) { - if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) { - return bundles[i]; - } - } - return null; - } -} diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/WorkbenchLogger.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/WorkbenchLogger.java deleted file mode 100644 index ff8cbf85..00000000 --- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/WorkbenchLogger.java +++ /dev/null @@ -1,145 +0,0 @@ -package org.eclipse.e4.tools.compat.internal; - -import java.util.ArrayList; - -import javax.inject.Inject; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.e4.core.services.log.Logger; -import org.eclipse.osgi.framework.log.FrameworkLog; -import org.eclipse.osgi.framework.log.FrameworkLogEntry; -import org.eclipse.osgi.service.debug.DebugOptions; -import org.eclipse.osgi.service.debug.DebugTrace; -import org.osgi.framework.Bundle; -import org.osgi.framework.FrameworkUtil; - -/** - * The workbench implementation of the logger service. - */ -public final class WorkbenchLogger extends Logger { - protected DebugTrace trace; - protected FrameworkLog log; - private Bundle bundle = FrameworkUtil.getBundle(WorkbenchLogger.class); - - /** - * Creates a new workbench logger - */ - public WorkbenchLogger() { - super(); - } - - public void debug(Throwable t) { - debug(t, null); - } - - public void debug(Throwable t, String message) { - trace(t, message); - } - - public void error(Throwable t, String message) { - log(new Status(IStatus.ERROR, bundle.getSymbolicName(), - message, t)); - } - - /** - * Copied from PlatformLogWriter in core runtime. - */ - private static FrameworkLogEntry getLog(IStatus status) { - Throwable t = status.getException(); - ArrayList childlist = new ArrayList(); - - int stackCode = t instanceof CoreException ? 1 : 0; - // ensure a substatus inside a CoreException is properly logged - if (stackCode == 1) { - IStatus coreStatus = ((CoreException) t).getStatus(); - if (coreStatus != null) { - childlist.add(getLog(coreStatus)); - } - } - - if (status.isMultiStatus()) { - IStatus[] children = status.getChildren(); - for (int i = 0; i < children.length; i++) { - childlist.add(getLog(children[i])); - } - } - - FrameworkLogEntry[] children = (FrameworkLogEntry[]) (childlist.size() == 0 ? null - : childlist.toArray(new FrameworkLogEntry[childlist.size()])); - - return new FrameworkLogEntry(status.getPlugin(), status.getSeverity(), status.getCode(), - status.getMessage(), stackCode, t, children); - } - - public void info(Throwable t, String message) { - log(new Status(IStatus.INFO, bundle.getSymbolicName(), message, - t)); - } - - public boolean isDebugEnabled() { - return false; - } - - public boolean isErrorEnabled() { - return true; - } - - public boolean isInfoEnabled() { - return true; - } - - public boolean isTraceEnabled() { - return false; - } - - public boolean isWarnEnabled() { - return true; - } - - private void log(IStatus status) { - if (log != null) { - log.log(getLog(status)); - } else { - System.out.println(status.getMessage()); - if (status.getException() != null) - status.getException().printStackTrace(); - } - } - - /** - * Sets the debug options service for this logger. - * - * @param options - * The debug options to be used by this logger - */ - @Inject - public void setDebugOptions(DebugOptions options) { - if (options != null) { - this.trace = options.newDebugTrace(bundle.getSymbolicName(), WorkbenchLogger.class); - } - } - - /** - * @param log - */ - @Inject - public void setFrameworkLog(FrameworkLog log) { - this.log = log; - } - - public void trace(Throwable t, String message) { - if (trace != null) { - trace.trace(null, message, t); - } else { - System.out.println(message); - t.printStackTrace(); - } - } - - public void warn(Throwable t, String message) { - log(new Status(IStatus.WARNING, bundle.getSymbolicName(), - message, t)); - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java deleted file mode 100644 index f1f6838d..00000000 --- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java +++ /dev/null @@ -1,140 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.compat.parts; - - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.e4.core.contexts.ContextInjectionFactory; -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.tools.compat.internal.CopyAction; -import org.eclipse.e4.tools.compat.internal.CutAction; -import org.eclipse.e4.tools.compat.internal.PartHelper; -import org.eclipse.e4.tools.compat.internal.PasteAction; -import org.eclipse.e4.tools.services.IClipboardService; -import org.eclipse.e4.tools.services.IDirtyProviderService; -import org.eclipse.e4.ui.di.Focus; -import org.eclipse.e4.ui.di.Persist; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorSite; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.actions.ActionFactory; -import org.eclipse.ui.part.EditorPart; - -public abstract class DIEditorPart<C> extends EditorPart implements IDirtyProviderService { - private IEclipseContext context; - private C component; - private Class<C> clazz; - private boolean dirtyState; - - private int features; - - protected static final int COPY = 1; - protected static final int PASTE = 1 << 1; - protected static final int CUT = 1 << 2; - - - public DIEditorPart(Class<C> clazz) { - this(clazz, SWT.NONE); - } - - public DIEditorPart(Class<C> clazz, int features) { - this.clazz = clazz; - this.features = features; - } - - @Override - public void doSave(IProgressMonitor monitor) { - IEclipseContext saveContext = context.createChild(); - ContextInjectionFactory.invoke(component, Persist.class, saveContext); - saveContext.dispose(); - } - - @Override - public void doSaveAs() { - - } - - @Override - public boolean isSaveAsAllowed() { - return false; - } - - @Override - public void init(IEditorSite site, IEditorInput input) - throws PartInitException { - setSite(site); - setInput(input); - - context = PartHelper.createPartContext(this); - context.declareModifiable(IEditorInput.class); - context.declareModifiable(IEditorPart.class); - context.declareModifiable(IDirtyProviderService.class); - - context.set(IEditorPart.class,this); - context.set(IDirtyProviderService.class,this); - context.set(IEditorInput.class, input); - } - - - @Override - public void createPartControl(Composite parent) { - component = PartHelper.creatComponent(parent, context, clazz, this); - makeActions(); - } - - public C getComponent() { - return component; - } - - protected void makeActions() { - if( (features & COPY) == COPY ) { - IClipboardService clipboard = context.get(IClipboardService.class); - getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.COPY.getId(), new CopyAction(clipboard)); - } - - if( (features & PASTE) == PASTE ) { - IClipboardService clipboard = context.get(IClipboardService.class); - getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.PASTE.getId(), new PasteAction(clipboard)); - } - - if( (features & CUT) == CUT ) { - IClipboardService clipboard = context.get(IClipboardService.class); - getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.CUT.getId(), new CutAction(clipboard)); - } - } - - public void setDirtyState(boolean dirtyState) { - if( dirtyState != this.dirtyState ) { - this.dirtyState = dirtyState; - firePropertyChange(PROP_DIRTY); - } - } - - @Override - public boolean isDirty() { - return dirtyState; - } - - @Override - public void setFocus() { - ContextInjectionFactory.invoke(component, Focus.class, context); - } - - @Override - public void dispose() { - context.dispose(); - context = null; - super.dispose(); - } -} diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DISaveableViewPart.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DISaveableViewPart.java deleted file mode 100644 index b9cb94eb..00000000 --- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DISaveableViewPart.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.compat.parts; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.e4.core.contexts.ContextInjectionFactory; -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.tools.services.IDirtyProviderService; -import org.eclipse.e4.ui.di.Persist; -import org.eclipse.ui.ISaveablePart2; -import org.eclipse.ui.IViewSite; -import org.eclipse.ui.PartInitException; - -public abstract class DISaveableViewPart<C> extends DIViewPart<C> implements ISaveablePart2, IDirtyProviderService { - private boolean dirtyState; - - public DISaveableViewPart(Class<C> clazz) { - super(clazz); - } - - public void doSave(IProgressMonitor monitor) { - IEclipseContext saveContext = getContext().createChild(); - ContextInjectionFactory.invoke(getComponent(), Persist.class, saveContext); - saveContext.dispose(); - } - - public void doSaveAs() { - - } - - public boolean isSaveAsAllowed() { - return false; - } - - public void setDirtyState(boolean dirtyState) { - if( dirtyState != this.dirtyState ) { - this.dirtyState = dirtyState; - firePropertyChange(PROP_DIRTY); - } - } - - public boolean isDirty() { - return dirtyState; - } - - public void init(IViewSite site) throws PartInitException { - super.init(site); - - getContext().declareModifiable(IDirtyProviderService.class); - getContext().set(IDirtyProviderService.class, this); - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java deleted file mode 100644 index 46a29f69..00000000 --- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.compat.parts; - -import org.eclipse.e4.core.contexts.ContextInjectionFactory; -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.core.di.InjectionException; -import org.eclipse.e4.tools.compat.internal.PartHelper; -import org.eclipse.e4.ui.di.Focus; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.IViewPart; -import org.eclipse.ui.IViewSite; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.part.ViewPart; - -public abstract class DIViewPart<C> extends ViewPart { - private IEclipseContext context; - private Class<C> clazz; - private C component; - - public DIViewPart(Class<C> clazz) { - this.clazz = clazz; - } - - @Override - public void init(IViewSite site) throws PartInitException { - super.init(site); - context = PartHelper.createPartContext(this); - - context.declareModifiable(IViewPart.class); - - context.set(IViewPart.class, this); - } - - @Override - public void createPartControl(Composite parent) { - component = PartHelper.creatComponent(parent, context, clazz, this); - } - - protected IEclipseContext getContext() { - return context; - } - - public C getComponent() { - return component; - } - - @Override - public void setFocus() { - try { - ContextInjectionFactory.invoke(component, Focus.class, context); - } catch (InjectionException e) { - // TODO: handle exception - } - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.context/.classpath b/bundles/org.eclipse.e4.tools.context/.classpath deleted file mode 100644 index 64c5e31b..00000000 --- a/bundles/org.eclipse.e4.tools.context/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?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/bundles/org.eclipse.e4.tools.context/.project b/bundles/org.eclipse.e4.tools.context/.project deleted file mode 100644 index 079583bd..00000000 --- a/bundles/org.eclipse.e4.tools.context/.project +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.e4.tools.context</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/bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index c987469a..00000000 --- a/bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Wed Mar 24 16:01:57 EDT 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index 041d6be3..00000000 --- a/bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Wed Mar 24 16:13:19 EDT 2010 -eclipse.preferences.version=1 -pluginProject.extensions=true -resolve.requirebundle=false diff --git a/bundles/org.eclipse.e4.tools.context/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.context/META-INF/MANIFEST.MF deleted file mode 100644 index 39ffa787..00000000 --- a/bundles/org.eclipse.e4.tools.context/META-INF/MANIFEST.MF +++ /dev/null @@ -1,12 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Tools -Bundle-SymbolicName: org.eclipse.e4.tools.context;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Require-Bundle: org.eclipse.ui;bundle-version="3.6.0", - org.eclipse.e4.core.services;bundle-version="0.9.1", - org.eclipse.e4.ui.model.workbench;bundle-version="0.9.1", - org.eclipse.e4.core.contexts;bundle-version="0.9.0", - org.eclipse.e4.core.di;bundle-version="0.9.0" -Export-Package: org.eclipse.e4.tools.handlers diff --git a/bundles/org.eclipse.e4.tools.context/build.properties b/bundles/org.eclipse.e4.tools.context/build.properties deleted file mode 100644 index e9863e28..00000000 --- a/bundles/org.eclipse.e4.tools.context/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml diff --git a/bundles/org.eclipse.e4.tools.context/plugin.xml b/bundles/org.eclipse.e4.tools.context/plugin.xml deleted file mode 100644 index f68f7c7a..00000000 --- a/bundles/org.eclipse.e4.tools.context/plugin.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.4"?> -<plugin> - <extension - point="org.eclipse.ui.commands"> - <command - categoryId="org.eclipse.e4.tools.category1" - defaultHandler="org.eclipse.e4.tools.handlers.GenerateSnapshotHandler" - id="org.eclipse.e4.tools.globalSnapshot" - name="Global Snapshot"> - </command> - <command - categoryId="org.eclipse.e4.tools.category1" - defaultHandler="org.eclipse.e4.tools.handlers.DiffSnapshotHandler" - id="org.eclipse.e4.tools.globalDiff" - name="Global Diff"> - </command> - <category - description="e4 tools" - id="org.eclipse.e4.tools.category1" - name="e4 tools"> - </category> - </extension> - <extension - point="org.eclipse.ui.menus"> - <menuContribution - allPopups="false" - locationURI="menu:org.eclipse.ui.main.menu?after=additions"> - <menu - id="org.eclipse.e4.tools.menu" - label="e4 tools"> - <command - commandId="org.eclipse.e4.tools.globalSnapshot" - mnemonic="S" - style="push"> - </command> - <command - commandId="org.eclipse.e4.tools.globalDiff" - mnemonic="D" - style="push"> - </command> - </menu> - </menuContribution> - </extension> - -</plugin> diff --git a/bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/DiffSnapshotHandler.java b/bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/DiffSnapshotHandler.java deleted file mode 100644 index ca1c9117..00000000 --- a/bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/DiffSnapshotHandler.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 IBM Corporation 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.e4.tools.handlers; - -import org.eclipse.core.commands.*; -import org.eclipse.e4.core.internal.contexts.EclipseContext; -import org.eclipse.e4.ui.model.application.MApplication; -import org.eclipse.ui.handlers.HandlerUtil; - -/** - * Generates a diff of the main application context, showing changes since the - * last snapshot. - */ -public class DiffSnapshotHandler extends AbstractHandler { - - /* (non-Javadoc) - * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) - */ - public Object execute(ExecutionEvent event) throws ExecutionException { - MApplication app = (MApplication) HandlerUtil.getVariableChecked(event, - MApplication.class.getName()); - ((EclipseContext) app.getContext()).debugDiff(); - return null; - } - -} diff --git a/bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/GenerateSnapshotHandler.java b/bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/GenerateSnapshotHandler.java deleted file mode 100644 index 3b212b6d..00000000 --- a/bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/GenerateSnapshotHandler.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 IBM Corporation 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.e4.tools.handlers; - -import org.eclipse.core.commands.*; -import org.eclipse.e4.core.internal.contexts.EclipseContext; -import org.eclipse.e4.ui.model.application.MApplication; -import org.eclipse.ui.handlers.HandlerUtil; - -/** - * Generates a snapshot of the current main application context state - */ -public class GenerateSnapshotHandler extends AbstractHandler { - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands. - * ExecutionEvent) - */ - public Object execute(ExecutionEvent event) throws ExecutionException { - MApplication app = (MApplication) HandlerUtil.getVariableChecked(event, - MApplication.class.getName()); - ((EclipseContext) app.getContext()).debugSnap(); - return null; - } - -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor/.classpath b/bundles/org.eclipse.e4.tools.emf.editor/.classpath deleted file mode 100644 index 64c5e31b..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?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/bundles/org.eclipse.e4.tools.emf.editor/.project b/bundles/org.eclipse.e4.tools.emf.editor/.project deleted file mode 100644 index 624efe93..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/.project +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.e4.tools.emf.editor</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> - <buildCommand> - <name>org.eclipse.pde.ds.core.builder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/bundles/org.eclipse.e4.tools.emf.editor/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.emf.editor/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index da2d41a3..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Sun Mar 07 16:24:33 CET 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/bundles/org.eclipse.e4.tools.emf.editor/Application.e4xmi b/bundles/org.eclipse.e4.tools.emf.editor/Application.e4xmi deleted file mode 100644 index 9bb548c7..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/Application.e4xmi +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?> -<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmi:id="_oq6MwEY6Ed-3Rue18XuTew" elementId="org.eclipse.e4.ide.application"> - <children xsi:type="basic:TrimmedWindow" xmi:id="_Z-NzMUjJEd-FKq59UN1_HA" elementId="_Z-NzMUjJEd-FKq59UN1_HA" width="800" height="600"> - <children xsi:type="basic:PartStack" xmi:id="_gkgxwEjJEd-FKq59UN1_HA" elementId="org.eclipse.e4.tools.emf.editor.mainwindow.editorstack"> - <tags>newtablook</tags> - </children> - <mainMenu xmi:id="_LqyFoEjQEd-XR9_8rlW1bQ" elementId="e4.modeleditor.menu.file"> - <children xsi:type="menu:Menu" xmi:id="_cURncEjQEd-XR9_8rlW1bQ" elementId="e4.modeleditor.menu.file" label="File"> - <children xsi:type="menu:Menu" xmi:id="_mRNKoEjQEd-XR9_8rlW1bQ" elementId="_mRNKoEjQEd-XR9_8rlW1bQ" label="New"> - <children xsi:type="menu:HandledMenuItem" xmi:id="_pdLXYEjQEd-XR9_8rlW1bQ" elementId="_pdLXYEjQEd-XR9_8rlW1bQ" label="Application Model" command="_OI-FgEZCEd-3Rue18XuTew"/> - <children xsi:type="menu:HandledMenuItem" xmi:id="_z0xdUEjQEd-XR9_8rlW1bQ" elementId="_z0xdUEjQEd-XR9_8rlW1bQ" label="Model Contribution" command="_OcpPcEZCEd-3Rue18XuTew"/> - </children> - <children xsi:type="menu:HandledMenuItem" xmi:id="_5agWwEjQEd-XR9_8rlW1bQ" elementId="_5agWwEjQEd-XR9_8rlW1bQ" label="Open XMI ..." iconURI="platform:/plugin/org.eclipse.e4.tools.emf.editor/icons/full/folder_page.png" command="_Hx2ycEZCEd-3Rue18XuTew"/> - <children xsi:type="menu:HandledMenuItem" xmi:id="_ATY6IEjREd-XR9_8rlW1bQ" elementId="_ATY6IEjREd-XR9_8rlW1bQ" label="Save" command="_NyiigEZCEd-3Rue18XuTew"/> - </children> - </mainMenu> - <trimBars xmi:id="_5UAKUUjJEd-Y_4Sy4ZiGUQ" elementId="_5UAKUUjJEd-Y_4Sy4ZiGUQ"> - <children xsi:type="menu:ToolBar" xmi:id="_8DUQQEjJEd-Y_4Sy4ZiGUQ" elementId="_8DUQQEjJEd-Y_4Sy4ZiGUQ"> - <children xsi:type="menu:HandledToolItem" xmi:id="_GTv-QEjKEd-Y_4Sy4ZiGUQ" elementId="org.eclipse.e4.tools.emf.editor.mainwindow.trims.top.toolbars.main.items.openxmi" iconURI="platform:/plugin/org.eclipse.e4.tools.emf.editor/icons/full/folder_page.png" tooltip="Open XMI File" command="_Hx2ycEZCEd-3Rue18XuTew"/> - <children xsi:type="menu:HandledToolItem" xmi:id="_G1D7kEjKEd-Y_4Sy4ZiGUQ" elementId="org.eclipse.e4.tools.emf.editor.mainwindow.trims.top.toolbars.main.items.savexmi" iconURI="platform:/plugin/org.eclipse.e4.tools.emf.editor/icons/full/disk.png" tooltip="Save XMI" command="_NyiigEZCEd-3Rue18XuTew"/> - </children> - </trimBars> - </children> - <handlers xmi:id="_Jp-AEEZBEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.handlers.openxmi" contributionURI="platform:/plugin/org.eclipse.e4.tools.emf.editor/org.eclipse.e4.tools.emf.editor.OpenModelFileHandler" command="_Hx2ycEZCEd-3Rue18XuTew"/> - <handlers xmi:id="_OTM1AEZBEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.handlers.savexmi" contributionURI="platform:/plugin/org.eclipse.e4.tools.emf.editor/org.eclipse.e4.tools.emf.editor.SaveModelFileHandler" command="_NyiigEZCEd-3Rue18XuTew"/> - <handlers xmi:id="_Owa8gEZBEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.handlers.newappmodel" contributionURI="platform:/plugin/org.eclipse.e4.tools.emf.editor/org.eclipse.e4.tools.emf.editor.NewApplicationModelHandler" command="_OI-FgEZCEd-3Rue18XuTew"/> - <handlers xmi:id="_PhoXAEZBEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.handlers.newcontribmodel" contributionURI="platform:/plugin/org.eclipse.e4.tools.emf.editor/org.eclipse.e4.tools.emf.editor.NewModelContributionHandler" command="_OcpPcEZCEd-3Rue18XuTew"/> - <bindingTables xmi:id="_a8i7IEZBEd-3Rue18XuTew" elementId="org.eclipse.ui.bindingtables.dialogAndWindow" bindingContextId="org.eclipse.ui.contexts.dialogAndWindow"> - <bindings xmi:id="_pTpjkEZBEd-3Rue18XuTew" keySequence="M1+S" elementId="_pTpjkEZBEd-3Rue18XuTew" command="_NyiigEZCEd-3Rue18XuTew"/> - </bindingTables> - <rootContext xmi:id="_uvPCgEZBEd-3Rue18XuTew" elementId="org.eclipse.ui.contexts.dialogAndWindow" name="In Dialog and Windows" description=""> - <children xmi:id="_1GFP0EZBEd-3Rue18XuTew" elementId="org.eclipse.ui.contexts.window" name="In Windows" description=""/> - <children xmi:id="_9_03sEZBEd-3Rue18XuTew" elementId="org.eclipse.ui.contexts.dialog" name="In Dialogs" description=""/> - </rootContext> - <bindingContexts>org.eclipse.ui.contexts.dialogAndWindow</bindingContexts> - <commands xmi:id="_Hx2ycEZCEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.commands.openxmi" commandName="e4editor.openxmi"/> - <commands xmi:id="_NyiigEZCEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.commands.savexmi" commandName="e4editor.savexmi"/> - <commands xmi:id="_OI-FgEZCEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.commands.newappmodel" commandName="e4editor.newappmodel"/> - <commands xmi:id="_OcpPcEZCEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.commands.newcontribmodel" commandName="e4editor.newcontribmodel"/> -</application:Application> diff --git a/bundles/org.eclipse.e4.tools.emf.editor/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.emf.editor/META-INF/MANIFEST.MF deleted file mode 100644 index e30c652f..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/META-INF/MANIFEST.MF +++ /dev/null @@ -1,24 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %Bundle-Name -Bundle-SymbolicName: org.eclipse.e4.tools.emf.editor; singleton:=true -Bundle-Version: 0.9.0.qualifier -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.e4.ui.workbench.swt;bundle-version="0.9.1", - org.eclipse.e4.ui.model.workbench;bundle-version="0.9.1", - org.eclipse.e4.ui.workbench;bundle-version="0.9.1", - org.eclipse.swt;bundle-version="3.6.0", - javax.inject;bundle-version="1.0.0", - org.eclipse.e4.tools.emf.ui;bundle-version="0.9.0", - org.eclipse.e4.core.services;bundle-version="0.9.1", - org.eclipse.e4.ui.services;bundle-version="0.9.1", - org.eclipse.core.databinding.observable;bundle-version="1.3.0", - org.eclipse.emf.edit;bundle-version="2.6.0", - org.eclipse.core.resources;bundle-version="3.6.0", - org.eclipse.e4.ui.css.swt.theme;bundle-version="0.9.0" -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Import-Package: org.eclipse.e4.core.contexts, - org.eclipse.e4.core.di.annotations -Service-Component: OSGI-INF/xmiresourcecontextfunction.xml, OSGI-INF/selectionproviderfunction.xml -Bundle-Vendor: %Bundle-Vendor diff --git a/bundles/org.eclipse.e4.tools.emf.editor/ModelEditor.product b/bundles/org.eclipse.e4.tools.emf.editor/ModelEditor.product deleted file mode 100644 index 1d6d2f00..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/ModelEditor.product +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?pde version="3.5"?> - -<product name="ModelEditor" id="org.eclipse.e4.tools.emf.editor.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" useFeatures="false" includeLaunchers="true"> - - <configIni use="default"> - </configIni> - - <launcherArgs> - <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac> - </launcherArgs> - - <plugins> - <plugin id="com.ibm.icu"/> - <plugin id="javax.inject"/> - <plugin id="org.apache.batik.css"/> - <plugin id="org.apache.batik.util"/> - <plugin id="org.apache.batik.util.gui"/> - <plugin id="org.apache.commons.beanutils"/> - <plugin id="org.apache.commons.logging"/> - <plugin id="org.eclipse.core.commands"/> - <plugin id="org.eclipse.core.contenttype"/> - <plugin id="org.eclipse.core.databinding"/> - <plugin id="org.eclipse.core.databinding.observable"/> - <plugin id="org.eclipse.core.databinding.property"/> - <plugin id="org.eclipse.core.expressions"/> - <plugin id="org.eclipse.core.filesystem"/> - <plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/> - <plugin id="org.eclipse.core.jobs"/> - <plugin id="org.eclipse.core.resources"/> - <plugin id="org.eclipse.core.runtime"/> - <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/> - <plugin id="org.eclipse.e4.core.commands"/> - <plugin id="org.eclipse.e4.core.services"/> - <plugin id="org.eclipse.e4.core.services.annotations" fragment="true"/> - <plugin id="org.eclipse.e4.tools.emf.editor"/> - <plugin id="org.eclipse.e4.tools.emf.ui"/> - <plugin id="org.eclipse.e4.ui.bindings"/> - <plugin id="org.eclipse.e4.ui.css.core"/> - <plugin id="org.eclipse.e4.ui.css.nebula"/> - <plugin id="org.eclipse.e4.ui.css.swt"/> - <plugin id="org.eclipse.e4.ui.model.workbench"/> - <plugin id="org.eclipse.e4.ui.model.workbench.edit"/> - <plugin id="org.eclipse.e4.ui.services"/> - <plugin id="org.eclipse.e4.ui.workbench"/> - <plugin id="org.eclipse.e4.ui.workbench.renderers.swt"/> - <plugin id="org.eclipse.e4.ui.workbench.swt"/> - <plugin id="org.eclipse.e4.ui.workbench3"/> - <plugin id="org.eclipse.emf.common"/> - <plugin id="org.eclipse.emf.databinding"/> - <plugin id="org.eclipse.emf.databinding.edit"/> - <plugin id="org.eclipse.emf.ecore"/> - <plugin id="org.eclipse.emf.ecore.change"/> - <plugin id="org.eclipse.emf.ecore.xmi"/> - <plugin id="org.eclipse.emf.edit"/> - <plugin id="org.eclipse.equinox.app"/> - <plugin id="org.eclipse.equinox.common"/> - <plugin id="org.eclipse.equinox.concurrent"/> - <plugin id="org.eclipse.equinox.ds"/> - <plugin id="org.eclipse.equinox.event"/> - <plugin id="org.eclipse.equinox.preferences"/> - <plugin id="org.eclipse.equinox.registry"/> - <plugin id="org.eclipse.equinox.util"/> - <plugin id="org.eclipse.jface"/> - <plugin id="org.eclipse.jface.databinding"/> - <plugin id="org.eclipse.nebula.widgets.gallery"/> - <plugin id="org.eclipse.osgi"/> - <plugin id="org.eclipse.osgi.services"/> - <plugin id="org.eclipse.swt"/> - <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/> - <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/> - <plugin id="org.w3c.css.sac"/> - <plugin id="org.w3c.dom.smil"/> - <plugin id="org.w3c.dom.svg"/> - </plugins> - - -</product> diff --git a/bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/l10n/bundle.properties b/bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/l10n/bundle.properties deleted file mode 100644 index 744a6750..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/l10n/bundle.properties +++ /dev/null @@ -1,4 +0,0 @@ -#Properties file for org.eclipse.e4.tools.emf.editor -product.name = ModelEditor -Bundle-Name = Editor -Bundle-Vendor = Eclipse.org
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/selectionproviderfunction.xml b/bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/selectionproviderfunction.xml deleted file mode 100644 index c5204caa..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/selectionproviderfunction.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.emf.editor.selectionprovider"> - <implementation class="org.eclipse.e4.tools.emf.editor.SelectionProviderContextFunction"/> - <service> - <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/> - </service> - <property name="service.context.key" type="String" value="org.eclipse.e4.tools.emf.ui.common.ISelectionProviderService"/> -</scr:component> diff --git a/bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/xmiresourcecontextfunction.xml b/bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/xmiresourcecontextfunction.xml deleted file mode 100644 index 2c7c2e29..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/xmiresourcecontextfunction.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.emf.editor.xmiresource"> - <implementation class="org.eclipse.e4.tools.emf.editor.XMIResourceFunction"/> - <service> - <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/> - </service> - <property name="service.context.key" type="String" value="org.eclipse.e4.tools.emf.ui.common.IModelResource"/> -</scr:component> diff --git a/bundles/org.eclipse.e4.tools.emf.editor/about.html b/bundles/org.eclipse.e4.tools.emf.editor/about.html deleted file mode 100644 index c1343aa3..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/about.html +++ /dev/null @@ -1,45 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> -<title>About</title> -</head> -<body lang="EN-US"> -<h2>About This Content</h2> - -<p>December 3, 2009</p> -<h3>License</h3> - -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> - -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> - -<h3>Third Party Content</h3> - -<p>The Content includes items from third parties as set out below. If you did not -receive this Content directly from the Eclipse Foundation, the following is provided for informational -purposes only, and you should look to the Redistributor’s license for terms and conditions of use.</p> - -<h4>Silk icon set Version 1.3</h4> -<p> -This plugin contains icons from the Silk icon set created by Mark James. The original files can -be found at: -<ul> -<a href="http://www.famfamfam.com/lab/icons/silk/">http://www.famfamfam.com/lab/icons/silk/</a></ul> -<p>The license can be found at:</p> -<ul> - <li><a href="http://creativecommons.org/licenses/by/2.5/">http://creativecommons.org/licenses/by/2.5/</a></li> -</ul> - -</body> -</html>
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.editor/build.properties b/bundles/org.eclipse.e4.tools.emf.editor/build.properties deleted file mode 100644 index 71ac81ce..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/build.properties +++ /dev/null @@ -1,10 +0,0 @@ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - css/,\ - icons/,\ - Application.e4xmi,\ - about.html,\ - OSGI-INF/ -source.. = src/ diff --git a/bundles/org.eclipse.e4.tools.emf.editor/css/default.css b/bundles/org.eclipse.e4.tools.emf.editor/css/default.css deleted file mode 100644 index 192ddf5e..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/css/default.css +++ /dev/null @@ -1,8 +0,0 @@ -CTabFolder { - tab-renderer: url('platform:/plugin/org.eclipse.e4.ui.workbench.renderers.swt/org.eclipse.e4.workbench.ui.renderers.swt.CTabRendering'); - -} - -Shell { - background-color: #ffffff; -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.editor/css/e4_default.css b/bundles/org.eclipse.e4.tools.emf.editor/css/e4_default.css deleted file mode 100644 index b78bf7f9..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/css/e4_default.css +++ /dev/null @@ -1,21 +0,0 @@ - -.MWindow { - background-color: #EEF2F7 #DEEBF3 100%; -} - -.MPartStack { - tab-renderer: url('platform:/plugin/org.eclipse.e4.ui.workbench.renderers.swt/org.eclipse.e4.workbench.ui.renderers.swt.CTabRendering'); - unselected-tabs-color: #FFFFFF #FFFFFF #FFFFFF 100% 100%; - outer-keyline-color: #FFFFFF; - inner-keyline-color: #FFFFFF; -} - -.MTrimBar { - background-image: url(./winXPBlue.PNG); -} - -.MPartStack.active { - unselected-tabs-color: #CEDEF4 #D2E2F9 #FFFFFF 100% 100%; - outer-keyline-color: #C3D0E9; - inner-keyline-color: #FFFFFF; -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor/icons/full/application_view_tile.png b/bundles/org.eclipse.e4.tools.emf.editor/icons/full/application_view_tile.png Binary files differdeleted file mode 100644 index 3bc0bd32..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/icons/full/application_view_tile.png +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools.emf.editor/icons/full/disk.png b/bundles/org.eclipse.e4.tools.emf.editor/icons/full/disk.png Binary files differdeleted file mode 100644 index 99d532e8..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/icons/full/disk.png +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools.emf.editor/icons/full/folder_page.png b/bundles/org.eclipse.e4.tools.emf.editor/icons/full/folder_page.png Binary files differdeleted file mode 100644 index 1ef6e114..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/icons/full/folder_page.png +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools.emf.editor/images/winXPBlue.PNG b/bundles/org.eclipse.e4.tools.emf.editor/images/winXPBlue.PNG Binary files differdeleted file mode 100644 index 57e94e5d..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/images/winXPBlue.PNG +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools.emf.editor/images/winXPOlive.PNG b/bundles/org.eclipse.e4.tools.emf.editor/images/winXPOlive.PNG Binary files differdeleted file mode 100644 index c745ee1b..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/images/winXPOlive.PNG +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools.emf.editor/plugin.xml b/bundles/org.eclipse.e4.tools.emf.editor/plugin.xml deleted file mode 100644 index 887e8b84..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/plugin.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.4"?> -<plugin> - <extension - id="product" - point="org.eclipse.core.runtime.products"> - <product - application="org.eclipse.e4.ui.workbench.swt.E4Application" - name="%product.name"> - <property - name="appName" - value="ModelEditor"> - </property> - <property - name="applicationXMI" - value="org.eclipse.e4.tools.emf.editor/Application.e4xmi"> - </property> - <property - name="applicationCSS" - value="org.eclipse.e4.tools.emf.editor.theme"> - </property> - <property - name="applicationCSSResources" - value="platform:/plugin/org.eclipse.e4.tools.emf.editor/images/"> - </property> - </product> - </extension> - <extension - point="org.eclipse.e4.ui.css.swt.theme"> - <theme - basestylesheeturi="css/e4_default.css" - id="org.eclipse.e4.tools.emf.editor.theme" - label="Application Theme"> - </theme> - </extension> - -</plugin> diff --git a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewApplicationModelHandler.java b/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewApplicationModelHandler.java deleted file mode 100644 index 075f6797..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewApplicationModelHandler.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.editor; - - -import java.io.IOException; - -import javax.inject.Named; - -import org.eclipse.e4.core.di.annotations.Execute; -import org.eclipse.e4.ui.internal.workbench.E4XMIResource; -import org.eclipse.e4.ui.model.application.MApplication; -import org.eclipse.e4.ui.model.application.MApplicationFactory; -import org.eclipse.e4.ui.model.application.ui.basic.MBasicFactory; -import org.eclipse.e4.ui.model.application.ui.basic.MInputPart; -import org.eclipse.e4.ui.model.application.ui.basic.MPartStack; -import org.eclipse.e4.ui.services.IServiceConstants; -import org.eclipse.e4.ui.workbench.modeling.EModelService; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.FileDialog; -import org.eclipse.swt.widgets.Shell; - -@SuppressWarnings("restriction") -public class NewApplicationModelHandler { - @Execute - public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell, MApplication application, EModelService modelService) { - FileDialog dialog = new FileDialog(shell,SWT.SAVE); - String file = dialog.open(); - if( file != null ) { - String name = file.substring(file.lastIndexOf("/") + 1); - String filePath = "file://" + file; - - try { - E4XMIResource resource = new E4XMIResource(); - resource.getContents().add((EObject) MApplicationFactory.INSTANCE.createApplication()); - resource.setURI(URI.createFileURI(file)); - resource.save(null); - - MPartStack stack = (MPartStack) modelService.find("modeleditorstack", application); - - MInputPart part = MBasicFactory.INSTANCE.createInputPart(); - part.setLabel(name); - part.setTooltip(file); - part.setContributionURI("platform:/plugin/org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.wbm.ApplicationModelEditor"); - part.setIconURI("platform:/plugin/org.eclipse.e4.tools.emf.editor/icons/full/application_view_tile.png"); - part.setInputURI(filePath); - - part.setCloseable(true); - stack.getChildren().add(part); - stack.setSelectedElement(part); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewModelContributionHandler.java b/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewModelContributionHandler.java deleted file mode 100644 index 4a15db4e..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewModelContributionHandler.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.eclipse.e4.tools.emf.editor; - -import java.io.IOException; - -import javax.inject.Named; - -import org.eclipse.e4.core.di.annotations.Execute; -import org.eclipse.e4.ui.internal.workbench.E4XMIResource; -import org.eclipse.e4.ui.model.application.MApplication; -import org.eclipse.e4.ui.model.application.ui.basic.MBasicFactory; -import org.eclipse.e4.ui.model.application.ui.basic.MInputPart; -import org.eclipse.e4.ui.model.application.ui.basic.MPartStack; -import org.eclipse.e4.ui.model.fragment.MFragmentFactory; -import org.eclipse.e4.ui.services.IServiceConstants; -import org.eclipse.e4.ui.workbench.modeling.EModelService; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.FileDialog; -import org.eclipse.swt.widgets.Shell; - -public class NewModelContributionHandler { - @Execute - public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell, MApplication application, EModelService modelService) { - FileDialog dialog = new FileDialog(shell,SWT.SAVE); - String file = dialog.open(); - if( file != null ) { - String name = file.substring(file.lastIndexOf("/") + 1); - String filePath = "file://" + file; - - try { - E4XMIResource resource = new E4XMIResource(); - resource.getContents().add((EObject) MFragmentFactory.INSTANCE.createModelFragments()); - resource.setURI(URI.createFileURI(file)); - resource.save(null); - - System.err.println("Saved to: " + file); - - MPartStack stack = (MPartStack) modelService.find("modeleditorstack", application); - - MInputPart part = MBasicFactory.INSTANCE.createInputPart(); - part.setLabel(name); - part.setTooltip(file); - part.setContributionURI("platform:/plugin/org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.wbm.ApplicationModelEditor"); - part.setIconURI("platform:/plugin/org.eclipse.e4.tools.emf.editor/icons/full/application_view_tile.png"); - part.setInputURI(filePath); - - part.setCloseable(true); - stack.getChildren().add(part); - stack.setSelectedElement(part); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - } - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/OpenModelFileHandler.java b/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/OpenModelFileHandler.java deleted file mode 100644 index 0e8895ec..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/OpenModelFileHandler.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.editor; - -import java.util.Collection; - -import javax.inject.Named; - -import org.eclipse.e4.core.di.annotations.Execute; -import org.eclipse.e4.ui.model.application.MApplication; -import org.eclipse.e4.ui.model.application.ui.basic.MBasicFactory; -import org.eclipse.e4.ui.model.application.ui.basic.MInputPart; -import org.eclipse.e4.ui.model.application.ui.basic.MPartStack; -import org.eclipse.e4.ui.services.IServiceConstants; -import org.eclipse.e4.ui.workbench.modeling.EModelService; -import org.eclipse.e4.ui.workbench.modeling.EPartService; -import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState; -import org.eclipse.swt.widgets.FileDialog; -import org.eclipse.swt.widgets.Shell; - -public class OpenModelFileHandler { - @Execute - public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell, MApplication application, EModelService modelService, EPartService partService) { - System.err.println("Execute!"); - FileDialog dialog = new FileDialog(shell); - String file = dialog.open(); - if( file != null ) { - String name = file.substring(file.lastIndexOf("/") + 1); - String filePath = "file://" + file; - Collection<MInputPart> parts = partService.getInputParts(filePath); - if( parts.size() == 0 ) { - MPartStack stack = (MPartStack) modelService.find("org.eclipse.e4.tools.emf.editor.mainwindow.editorstack", application); - - try { - MInputPart part = MBasicFactory.INSTANCE.createInputPart(); - part.setLabel(name); - part.setTooltip(file); - part.setContributionURI("platform:/plugin/org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.wbm.ApplicationModelEditor"); - part.setIconURI("platform:/plugin/org.eclipse.e4.tools.emf.editor/icons/full/application_view_tile.png"); - part.setInputURI(filePath); - - part.setCloseable(true); - stack.getChildren().add(part); - stack.setSelectedElement(part); - System.err.println("Done"); - } catch (Exception e) { - e.printStackTrace(); - } - } else { - partService.showPart(parts.iterator().next(), PartState.ACTIVATE); - } - } - } -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SaveModelFileHandler.java b/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SaveModelFileHandler.java deleted file mode 100644 index 7aacb884..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SaveModelFileHandler.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.editor; - -import javax.inject.Named; - -import org.eclipse.e4.core.di.annotations.Execute; -import org.eclipse.e4.ui.model.application.ui.basic.MPart; -import org.eclipse.e4.ui.services.IServiceConstants; -import org.eclipse.e4.ui.workbench.modeling.EPartService; - -public class SaveModelFileHandler { - @Execute - public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart part, EPartService partService) { - partService.savePart(part, false); - } -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SelectionProviderContextFunction.java b/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SelectionProviderContextFunction.java deleted file mode 100644 index 8dc1fa26..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SelectionProviderContextFunction.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.eclipse.e4.tools.emf.editor; - -import org.eclipse.e4.core.contexts.ContextFunction; -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.tools.emf.ui.common.ISelectionProviderService; -import org.eclipse.e4.ui.services.IServiceConstants; - -public class SelectionProviderContextFunction extends ContextFunction { - - @Override - public Object compute(final IEclipseContext context) { - return new ISelectionProviderService() { - - public void setSelection(Object selection) { - context.set(IServiceConstants.SELECTION, selection); - } - }; - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/XMIResourceFunction.java b/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/XMIResourceFunction.java deleted file mode 100644 index f3cc4b91..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/XMIResourceFunction.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.eclipse.e4.tools.emf.editor; - -import org.eclipse.e4.core.contexts.ContextFunction; -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.tools.emf.ui.common.IModelResource.ModelListener; -import org.eclipse.e4.tools.emf.ui.common.XMIModelResource; -import org.eclipse.e4.ui.model.application.ui.basic.MInputPart; -import org.eclipse.emf.common.util.URI; - -public class XMIResourceFunction extends ContextFunction { - - @Override - public Object compute(IEclipseContext context) { - final MInputPart part = context.get(MInputPart.class); - if( part != null ) { - final XMIModelResource resource = new XMIModelResource(URI.createURI(part.getInputURI())); - resource.addModelListener(new ModelListener() { - - public void dirtyChanged() { - part.setDirty(resource.isDirty()); - } - - public void commandStackChanged() { - - } - }); - return resource; - } - - return null; - } -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/.classpath b/bundles/org.eclipse.e4.tools.emf.editor3x/.classpath deleted file mode 100644 index 64c5e31b..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?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/bundles/org.eclipse.e4.tools.emf.editor3x/.project b/bundles/org.eclipse.e4.tools.emf.editor3x/.project deleted file mode 100644 index 6682b79a..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/.project +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.e4.tools.emf.editor3x</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> - <buildCommand> - <name>org.eclipse.pde.ds.core.builder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.emf.editor3x/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index df1b497b..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Sun Mar 14 13:37:58 CET 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.emf.editor3x/META-INF/MANIFEST.MF deleted file mode 100644 index 1691e76e..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/META-INF/MANIFEST.MF +++ /dev/null @@ -1,32 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %Bundle-Name -Bundle-SymbolicName: org.eclipse.e4.tools.emf.editor3x;singleton:=true -Bundle-Version: 0.9.0.qualifier -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Require-Bundle: org.eclipse.ui;bundle-version="3.6.0", - org.eclipse.core.runtime;bundle-version="3.6.0", - org.eclipse.emf.common;bundle-version="2.6.0", - org.eclipse.core.databinding.observable;bundle-version="1.3.0", - org.eclipse.e4.tools.emf.ui;bundle-version="0.9.0", - org.eclipse.e4.ui.workbench;bundle-version="0.9.1", - org.eclipse.e4.ui.css.core;bundle-version="0.9.0", - org.eclipse.e4.ui.css.swt;bundle-version="0.9.1", - org.w3c.css.sac;bundle-version="1.3.0", - org.eclipse.pde.core;bundle-version="3.6.0", - org.eclipse.core.resources;bundle-version="3.6.0", - org.eclipse.jdt.core;bundle-version="3.6.0", - org.eclipse.ui.ide;bundle-version="3.6.0", - org.eclipse.e4.ui.css.swt.theme;bundle-version="0.9.0", - org.eclipse.e4.core.contexts;bundle-version="0.9.0", - org.eclipse.e4.core.di;bundle-version="0.9.0", - org.eclipse.e4.core.services;bundle-version="0.9.1", - org.eclipse.emf.edit;bundle-version="2.6.0", - org.eclipse.e4.ui.services;bundle-version="0.9.1", - org.eclipse.e4.tools.compat;bundle-version="1.0.0", - org.eclipse.e4.tools.services;bundle-version="1.0.0", - org.eclipse.e4.tools;bundle-version="0.9.0", - org.eclipse.jdt.ui;bundle-version="3.6.0" -Service-Component: OSGI-INF/pdecontributionprovider.xml, OSGI-INF/xmiresourcecontextfunction.xml, OSGI-INF/projectfunction.xml, OSGI-INF/pdee4xmiprovider.xml, OSGI-INF/pdeextensionlookup.xml -Bundle-ActivationPolicy: lazy -Bundle-Vendor: %Bundle-Vendor diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/l10n/bundle.properties b/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/l10n/bundle.properties deleted file mode 100644 index 9042b1e4..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/l10n/bundle.properties +++ /dev/null @@ -1,5 +0,0 @@ -#Properties file for org.eclipse.e4.tools.emf.editor3x -editor.name = e4 Workbenchmodel Editor -page.name = Model Editor -Bundle-Name = Editor3x -Bundle-Vendor = Eclipse.org
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdecontributionprovider.xml b/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdecontributionprovider.xml deleted file mode 100644 index ce78958e..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdecontributionprovider.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.emf.editor3x.pdecontrib"> - <implementation class="org.eclipse.e4.tools.emf.editor3x.PDEClassContributionProvider"/> - <service> - <provide interface="org.eclipse.e4.tools.emf.ui.common.IClassContributionProvider"/> - </service> -</scr:component> diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdee4xmiprovider.xml b/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdee4xmiprovider.xml deleted file mode 100644 index f1e7b737..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdee4xmiprovider.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="false" name="org.eclipse.e4.tools.emf.editor3x.pdee4xmiprovider"> - <implementation class="org.eclipse.e4.tools.emf.editor3x.TargetElementProviders"/> - <service> - <provide interface="org.eclipse.e4.tools.emf.ui.common.IModelElementProvider"/> - </service> -</scr:component> diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdeextensionlookup.xml b/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdeextensionlookup.xml deleted file mode 100644 index cad2595f..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdeextensionlookup.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.emf.editor3x"> - <implementation class="org.eclipse.e4.tools.emf.editor3x.PDEExtensionLookup"/> - <service> - <provide interface="org.eclipse.e4.tools.emf.ui.common.IExtensionLookup"/> - </service> - <property name="service.ranking" type="Integer" value="1000"/> -</scr:component> diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/projectfunction.xml b/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/projectfunction.xml deleted file mode 100644 index ed7571e8..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/projectfunction.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.emf.editor3x.projectfunction"> - <implementation class="org.eclipse.e4.tools.emf.editor3x.EditorProjectFunction"/> - <service> - <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/> - </service> - <property name="service.context.key" type="String" value="org.eclipse.e4.tools.emf.ui.editorproject"/> -</scr:component>
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/xmiresourcecontextfunction.xml b/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/xmiresourcecontextfunction.xml deleted file mode 100644 index 07c42709..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/xmiresourcecontextfunction.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.emf.editor3x.contextfunction"> - <implementation class="org.eclipse.e4.tools.emf.editor3x.XMIResourceFunction"/> - <service> - <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/> - </service> - <property name="service.context.key" type="String" value="org.eclipse.e4.tools.emf.ui.common.IModelResource"/> -</scr:component>
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/about.html b/bundles/org.eclipse.e4.tools.emf.editor3x/about.html deleted file mode 100644 index c1343aa3..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/about.html +++ /dev/null @@ -1,45 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> -<title>About</title> -</head> -<body lang="EN-US"> -<h2>About This Content</h2> - -<p>December 3, 2009</p> -<h3>License</h3> - -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> - -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> - -<h3>Third Party Content</h3> - -<p>The Content includes items from third parties as set out below. If you did not -receive this Content directly from the Eclipse Foundation, the following is provided for informational -purposes only, and you should look to the Redistributor’s license for terms and conditions of use.</p> - -<h4>Silk icon set Version 1.3</h4> -<p> -This plugin contains icons from the Silk icon set created by Mark James. The original files can -be found at: -<ul> -<a href="http://www.famfamfam.com/lab/icons/silk/">http://www.famfamfam.com/lab/icons/silk/</a></ul> -<p>The license can be found at:</p> -<ul> - <li><a href="http://creativecommons.org/licenses/by/2.5/">http://creativecommons.org/licenses/by/2.5/</a></li> -</ul> - -</body> -</html>
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/build.properties b/bundles/org.eclipse.e4.tools.emf.editor3x/build.properties deleted file mode 100644 index 13160ee8..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/build.properties +++ /dev/null @@ -1,9 +0,0 @@ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - icons/,\ - OSGI-INF/,\ - about.html,\ - OSGI-INF/pdeextensionlookup.xml -source.. = src/ diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/icons/full/obj16/application_view_tile.png b/bundles/org.eclipse.e4.tools.emf.editor3x/icons/full/obj16/application_view_tile.png Binary files differdeleted file mode 100644 index 3bc0bd32..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/icons/full/obj16/application_view_tile.png +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/plugin.xml b/bundles/org.eclipse.e4.tools.emf.editor3x/plugin.xml deleted file mode 100644 index 0ca898f3..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/plugin.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.4"?> -<plugin> - <extension - point="org.eclipse.ui.editors"> - <editor - class="org.eclipse.e4.tools.emf.editor3x.E4WorkbenchModelEditor" - default="true" - extensions="e4xmi" - icon="icons/full/obj16/application_view_tile.png" - id="org.eclipse.e4.tools.emf.editor3x.e4wbm" - name="%editor.name"> - </editor> - </extension> - <extension - point="org.eclipse.e4.tools.emf.ui.editors"> - <contributionClassCreator - class="org.eclipse.e4.tools.emf.editor3x.extension.HandlerContributionEditor"> - </contributionClassCreator> - <contributionClassCreator - class="org.eclipse.e4.tools.emf.editor3x.extension.PartContributionEditor"> - </contributionClassCreator> - <contributionClassCreator - class="org.eclipse.e4.tools.emf.editor3x.extension.AddonContributionEditor"> - </contributionClassCreator> - </extension> - <extension - point="org.eclipse.ui.preferencePages"> - <page - class="org.eclipse.e4.tools.emf.editor3x.ModelEditorPreferencePage" - id="org.eclipse.e4.tools.emf.editor3x.modeleditor" - name="%page.name"> - </page> - </extension> - -</plugin> diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/E4WorkbenchModelEditor.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/E4WorkbenchModelEditor.java deleted file mode 100644 index eff3aa3a..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/E4WorkbenchModelEditor.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.editor3x; - -import org.eclipse.e4.tools.compat.parts.DIEditorPart; -import org.eclipse.e4.tools.emf.ui.common.IModelResource.ModelListener; -import org.eclipse.e4.tools.emf.ui.internal.wbm.ApplicationModelEditor; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.IWorkbenchCommandConstants; -import org.eclipse.ui.actions.ActionFactory; - -@SuppressWarnings("restriction") -public class E4WorkbenchModelEditor extends - DIEditorPart<ApplicationModelEditor> { - private UndoAction undoAction; - private RedoAction redoAction; - - private ModelListener listener = new ModelListener() { - - public void dirtyChanged() { - firePropertyChange(PROP_DIRTY); - } - - public void commandStackChanged() { - - } - }; - - public E4WorkbenchModelEditor() { - super(ApplicationModelEditor.class, COPY|CUT|PASTE); - } - - @Override - public void createPartControl(Composite parent) { - super.createPartControl(parent); - setPartName(getEditorInput().getName()); - } - - protected void makeActions() { - super.makeActions(); - undoAction = new UndoAction(getComponent().getModelProvider()); - undoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_UNDO); - - redoAction = new RedoAction(getComponent().getModelProvider()); - redoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_REDO); - - getEditorSite().getActionBars().setGlobalActionHandler( - ActionFactory.UNDO.getId(), undoAction); - getEditorSite().getActionBars().setGlobalActionHandler( - ActionFactory.REDO.getId(), redoAction); - } - - @Override - public void dispose() { - if (undoAction != null) - undoAction.dispose(); - - if (redoAction != null) - redoAction.dispose(); - - if (listener != null && getComponent().getModelProvider() != null) - getComponent().getModelProvider().removeModelListener(listener); - - super.dispose(); - } -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/EditorProjectFunction.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/EditorProjectFunction.java deleted file mode 100644 index c99606b5..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/EditorProjectFunction.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.eclipse.e4.tools.emf.editor3x; - -import org.eclipse.e4.core.contexts.ContextFunction; -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IFileEditorInput; - -public class EditorProjectFunction extends ContextFunction { - - @Override - public Object compute(IEclipseContext context) { - final IEditorInput input = context.get(IEditorInput.class); - if( input != null ) { - return ((IFileEditorInput)input).getFile().getProject(); - } - return null; - } - -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/ModelEditorPreferencePage.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/ModelEditorPreferencePage.java deleted file mode 100644 index 7bb2547f..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/ModelEditorPreferencePage.java +++ /dev/null @@ -1,92 +0,0 @@ -package org.eclipse.e4.tools.emf.editor3x; - -import org.eclipse.core.runtime.preferences.IEclipsePreferences; -import org.eclipse.core.runtime.preferences.InstanceScope; -import org.eclipse.jface.preference.PreferencePage; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Label; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; -import org.osgi.service.prefs.BackingStoreException; - -public class ModelEditorPreferencePage extends PreferencePage implements - IWorkbenchPreferencePage { - private boolean autoCreateElementId; - private boolean showXMIId; - - private IEclipsePreferences node; - - public ModelEditorPreferencePage() { - } - - public ModelEditorPreferencePage(String title) { - super(title); - } - - public ModelEditorPreferencePage(String title, ImageDescriptor image) { - super(title, image); - } - - public void init(IWorkbench workbench) { - node = new InstanceScope().getNode("org.eclipse.e4.tools.emf.ui"); - autoCreateElementId = node.getBoolean("autoCreateElementId", false); - showXMIId = node.getBoolean("showXMIId", false); - } - - @Override - protected Control createContents(Composite parent) { - Composite result= new Composite(parent, SWT.NONE); - result.setLayout(new GridLayout(2,false)); - - { - Label l = new Label(result, SWT.NONE); - l.setText("Autogenerate Element-Id"); - final Button b = new Button(result, SWT.CHECK); - b.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - autoCreateElementId = b.getSelection(); - } - }); - } - - { - Label l = new Label(result, SWT.NONE); - l.setText("Show XMI:ID"); - final Button b = new Button(result, SWT.CHECK); - b.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - showXMIId = b.getSelection(); - } - }); - } - - return result; - } - - @Override - public boolean performOk() { - node.putBoolean("autoCreateElementId", autoCreateElementId); - node.putBoolean("showXMIId", showXMIId); - try { - node.flush(); - } catch (BackingStoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return super.performOk(); - } - - @Override - public void dispose() { - super.dispose(); - } -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEClassContributionProvider.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEClassContributionProvider.java deleted file mode 100644 index cf55a477..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEClassContributionProvider.java +++ /dev/null @@ -1,149 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.editor3x; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.e4.tools.emf.ui.common.IClassContributionProvider; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.core.search.IJavaSearchConstants; -import org.eclipse.jdt.core.search.IJavaSearchScope; -import org.eclipse.jdt.core.search.SearchEngine; -import org.eclipse.jdt.core.search.SearchPattern; -import org.eclipse.jdt.core.search.TypeNameRequestor; -import org.eclipse.pde.internal.core.util.PDEJavaHelper; - -public class PDEClassContributionProvider implements IClassContributionProvider { - private SearchEngine searchEngine; - public PDEClassContributionProvider() { - searchEngine = new SearchEngine(); - } - - @SuppressWarnings("restriction") - public void findContribution(final Filter filter, final ContributionResultHandler handler) { - System.err.println("Searching for: " + filter.namePattern); - - IJavaSearchScope scope = PDEJavaHelper.getSearchScope(filter.project); - - char[] packageName = null; - char[] typeName = null; - String currentContent = filter.namePattern; - int index = currentContent.lastIndexOf('.'); - - if (index == -1) { - // There is no package qualification - // Perform the search only on the type name - typeName = currentContent.toCharArray(); - } else if ((index + 1) == currentContent.length()) { - // There is a package qualification and the last character is a - // dot - // Perform the search for all types under the given package - // Pattern for all types - typeName = "".toCharArray(); //$NON-NLS-1$ - // Package name without the trailing dot - packageName = currentContent.substring(0, index).toCharArray(); - } else { - // There is a package qualification, followed by a dot, and - // a type fragment - // Type name without the package qualification - typeName = currentContent.substring(index + 1).toCharArray(); - // Package name without the trailing dot - packageName = currentContent.substring(0, index).toCharArray(); - } - -// char[] packageName = "at.bestsolution.e4.handlers".toCharArray(); -// char[] typeName = "*".toCharArray(); - - TypeNameRequestor req = new TypeNameRequestor() { - public void acceptType(int modifiers, char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path) { - // Accept search results from the JDT SearchEngine - String cName = new String(simpleTypeName); - String pName = new String(packageName); -// String label = cName + " - " + pName; //$NON-NLS-1$ - String content = pName + "." + cName; //$NON-NLS-1$ - -// System.err.println("Found: " + label + " => " + pName + " => " + path); - - IResource resource = filter.project.getWorkspace().getRoot().findMember(path); - - if( resource != null ) { - IProject project = resource.getProject(); - IFile f = project.getFile("/META-INF/MANIFEST.MF"); - - if( f != null && f.exists() ) { - BufferedReader r = null; - try { - InputStream s = f.getContents(); - r = new BufferedReader(new InputStreamReader(s)); - String line; - while( (line = r.readLine()) != null ) { - if( line.startsWith("Bundle-SymbolicName:") ) { - int start = line.indexOf(':'); - int end = line.indexOf(';'); - if( end == -1 ) { - end = line.length(); - } - ContributionData data = new ContributionData(line.substring(start+1,end).trim(), content, "Java", null); - handler.result(data); - break; - } - } - - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } finally { - if( r != null ) { - try { - r.close(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - } - } - - - //Image image = (Flags.isInterface(modifiers)) ? PDEPluginImages.get(PDEPluginImages.OBJ_DESC_GENERATE_INTERFACE) : PDEPluginImages.get(PDEPluginImages.OBJ_DESC_GENERATE_CLASS); - //addProposalToCollection(c, startOffset, length, label, content, image); - } - }; - - try { - searchEngine.searchAllTypeNames( - packageName, - SearchPattern.R_EXACT_MATCH, - typeName, - SearchPattern.R_PREFIX_MATCH, - IJavaSearchConstants.CLASS, - scope, - req, - IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null); - } catch (JavaModelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEExtensionLookup.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEExtensionLookup.java deleted file mode 100644 index 88c4114e..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEExtensionLookup.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.editor3x; - -import org.eclipse.core.runtime.IExtension; -import org.eclipse.core.runtime.IExtensionRegistry; -import org.eclipse.core.runtime.RegistryFactory; -import org.eclipse.e4.tools.emf.ui.common.IExtensionLookup; -import org.eclipse.pde.internal.core.PDEExtensionRegistry; - -public class PDEExtensionLookup implements IExtensionLookup { - - public IExtension[] findExtensions(String extensionPointId, boolean liveModel) { - if( liveModel ) { - IExtensionRegistry registry = RegistryFactory.getRegistry(); - return registry.getExtensionPoint(extensionPointId).getExtensions(); - } else { - PDEExtensionRegistry reg = new PDEExtensionRegistry(); - return reg.findExtensions(extensionPointId, true); - } - } - -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/RedoAction.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/RedoAction.java deleted file mode 100644 index 36c0b85a..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/RedoAction.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.editor3x; - -import org.eclipse.e4.tools.emf.ui.common.IModelResource; -import org.eclipse.jface.action.Action; - -public class RedoAction extends Action { - private final IModelResource resource; - private final IModelResource.ModelListener listener; - - public RedoAction(IModelResource resource) { - this.resource = resource; - this.listener = new IModelResource.ModelListener() { - - public void commandStackChanged() { - update(); - } - - public void dirtyChanged() { - - } - - }; - resource.addModelListener(listener); - update(); - } - - @Override - public void run() { - if (resource.getEditingDomain().getCommandStack().canRedo()) { - resource.getEditingDomain().getCommandStack().redo(); - } - } - - private void update() { - if (resource.getEditingDomain().getCommandStack().canRedo()) { - setText("Redo " - + resource.getEditingDomain().getCommandStack() - .getRedoCommand().getLabel()); - setEnabled(true); - } else { - setText("Redo"); - setEnabled(false); - } - } - - /** - * Clean up - */ - public void dispose() { - resource.removeModelListener(listener); - } -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/TargetElementProviders.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/TargetElementProviders.java deleted file mode 100644 index 4f4718d5..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/TargetElementProviders.java +++ /dev/null @@ -1,113 +0,0 @@ -package org.eclipse.e4.tools.emf.editor3x; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtension; -import org.eclipse.e4.tools.emf.ui.common.IModelElementProvider; -import org.eclipse.e4.ui.model.fragment.impl.FragmentPackageImpl; -import org.eclipse.emf.common.util.TreeIterator; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.pde.internal.core.PDEExtensionRegistry; - -public class TargetElementProviders implements IModelElementProvider { - private ResourceSet resourceSet; - - public void getModelElements(Filter filter, ModelResultHandler handler) { - if( resourceSet == null ) { - resourceSet = new ResourceSetImpl(); - PDEExtensionRegistry reg = new PDEExtensionRegistry(); - IExtension[] extensions = reg.findExtensions("org.eclipse.e4.workbench.model", true); - IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); - - for( IExtension ext : extensions ) { - for( IConfigurationElement el : ext.getConfigurationElements() ) { - if( el.getName().equals("fragment") ) { - URI uri; -// System.err.println("Model-Ext: Checking: " + ext.getContributor().getName()); - IProject p = root.getProject(ext.getContributor().getName()); - if( p.exists() && p.isOpen() ) { - uri = URI.createPlatformResourceURI(ext.getContributor().getName() + "/" + el.getAttribute("uri"), true); - } else { - uri = URI.createURI("platform:/plugin/" + ext.getContributor().getName() + "/" + el.getAttribute("uri") ); - } -// System.err.println(uri); - try { - resourceSet.getResource(uri, true); - } catch (Exception e) { - e.printStackTrace(); -// System.err.println("=============> Failing"); - } - - } - } - } - - extensions = reg.findExtensions("org.eclipse.core.runtime.products", true); - for( IExtension ext : extensions ) { - for( IConfigurationElement el : ext.getConfigurationElements() ) { - if( el.getName().equals("product") ) { - for( IConfigurationElement prop: el.getChildren("property") ) { - if( prop.getAttribute("name").equals("applicationXMI") ) { - String v = prop.getAttribute("value"); - String[] s = v.split("/"); - URI uri; -// System.err.println("Product-Ext: Checking: " + v + " => P:" + s[0] + ""); - IProject p = root.getProject(s[0]); - if( p.exists() && p.isOpen() ) { - uri = URI.createPlatformResourceURI(v, true ); - } else { - uri = URI.createURI("platform:/plugin/" + v ); - } - -// System.err.println(uri); - try { - resourceSet.getResource(uri, true); - } catch (Exception e) { - e.printStackTrace(); -// System.err.println("=============> Failing"); - } - break; - } - } - } - } - } - } - - applyFilter(filter, handler); - } - - private void applyFilter(Filter filter, ModelResultHandler handler) { - for (Resource res : resourceSet.getResources()) { - TreeIterator<EObject> it = EcoreUtil.getAllContents(res, - true); - while (it.hasNext()) { - EObject o = it.next(); - if (o.eContainingFeature() == FragmentPackageImpl.Literals.MODEL_FRAGMENTS__IMPORTS) { -// System.err -// .println("Skipped because it is an import"); - } else { - if (o.eClass().equals(filter.eClass)) { - System.err.println("Found: " + o); - handler.result(o); - } - } - } - } - } - - public void clearCache() { - for (Resource r : resourceSet.getResources()) { - r.unload(); - } - resourceSet = null; - } - -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/UndoAction.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/UndoAction.java deleted file mode 100644 index 6988d3d1..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/UndoAction.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.editor3x; - -import org.eclipse.e4.tools.emf.ui.common.IModelResource; -import org.eclipse.jface.action.Action; - -public class UndoAction extends Action { - private final IModelResource resource; - private final IModelResource.ModelListener listener; - - public UndoAction(IModelResource resource) { - this.resource = resource; - this.listener = new IModelResource.ModelListener() { - - public void commandStackChanged() { - update(); - } - - public void dirtyChanged() { - } - }; - resource.addModelListener(listener); - update(); - } - - @Override - public void run() { - if (resource.getEditingDomain().getCommandStack().canUndo()) { - resource.getEditingDomain().getCommandStack().undo(); - } - } - - private void update() { - if (resource.getEditingDomain().getCommandStack().canUndo()) { - setText("Undo " - + resource.getEditingDomain().getCommandStack() - .getUndoCommand().getLabel()); - setEnabled(true); - } else { - setText("Undo"); - setEnabled(false); - } - } - - /** - * Clean up - */ - public void dispose() { - resource.removeModelListener(listener); - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIModelResource.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIModelResource.java deleted file mode 100644 index a19ed76d..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIModelResource.java +++ /dev/null @@ -1,118 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.editor3x; - -import java.util.ArrayList; -import java.util.EventObject; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.databinding.observable.list.IObservableList; -import org.eclipse.core.databinding.observable.list.WritableList; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.e4.tools.emf.ui.common.IModelResource; -import org.eclipse.e4.ui.internal.workbench.E4XMIResourceFactory; -import org.eclipse.emf.common.command.BasicCommandStack; -import org.eclipse.emf.common.command.CommandStackListener; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; -import org.eclipse.emf.edit.domain.EditingDomain; -import org.eclipse.emf.edit.provider.ComposedAdapterFactory; - -@SuppressWarnings("restriction") -public class XMIModelResource implements IModelResource { - private EditingDomain editingDomain; - private Resource resource; - private List<ModelListener> listeners = new ArrayList<IModelResource.ModelListener>(); - private boolean dirty; - - - public XMIModelResource(URI uri) { - ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory( - ComposedAdapterFactory.Descriptor.Registry.INSTANCE); - ResourceSet resourceSet = new ResourceSetImpl(); - BasicCommandStack commandStack = new BasicCommandStack(); - commandStack.addCommandStackListener(new CommandStackListener() { - - public void commandStackChanged(EventObject event) { - dirty = true; - fireDirtyChanged(); - fireCommandStackChanged(); - } - }); - editingDomain = new AdapterFactoryEditingDomain(adapterFactory, - commandStack, resourceSet); - resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap() - .put(Resource.Factory.Registry.DEFAULT_EXTENSION, - new E4XMIResourceFactory()); - resource = resourceSet.getResource(uri, true); - } - - public IObservableList getRoot() { - WritableList list = new WritableList(); - list.add(resource.getContents().get(0)); - return list; - } - - public EditingDomain getEditingDomain() { - return editingDomain; - } - - public boolean isSaveable() { - return true; - } - - public void addModelListener(ModelListener listener) { - listeners.add(listener); - } - - public void removeModelListener(ModelListener listener) { - listeners.remove(listener); - } - - public boolean isDirty() { - return dirty && getEditingDomain().getCommandStack().canUndo(); - } - - private void fireDirtyChanged() { - for( ModelListener listener : listeners ) { - listener.dirtyChanged(); - } - } - - private void fireCommandStackChanged() { - for( ModelListener listener : listeners ) { - listener.commandStackChanged(); - } - } - - public IStatus save() { - Map<String, String> map = new HashMap<String, String>(); - try { - resource.save(map); - editingDomain.getCommandStack().flush(); - dirty = false; - fireDirtyChanged(); - fireCommandStackChanged(); - } catch (Exception e) { - // TODO: handle exception - e.printStackTrace(); - } - - return Status.OK_STATUS; - } - -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIResourceFunction.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIResourceFunction.java deleted file mode 100644 index 2b64fcb8..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIResourceFunction.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.eclipse.e4.tools.emf.editor3x; - -import org.eclipse.e4.core.contexts.ContextFunction; -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.tools.emf.editor3x.emf.EditUIUtil; -import org.eclipse.e4.tools.emf.ui.common.IModelResource.ModelListener; -import org.eclipse.e4.tools.emf.ui.common.XMIModelResource; -import org.eclipse.e4.tools.services.IDirtyProviderService; -import org.eclipse.emf.common.util.URI; -import org.eclipse.ui.IEditorInput; - -public class XMIResourceFunction extends ContextFunction { - - @Override - public Object compute(final IEclipseContext context) { - final IEditorInput input = context.get(IEditorInput.class); - final IDirtyProviderService dirtyProvider = context.get(IDirtyProviderService.class); - - if( input != null ) { - URI resourceURI = EditUIUtil.getURI(input); - final XMIModelResource resource = new XMIModelResource(resourceURI); - resource.addModelListener(new ModelListener() { - - public void dirtyChanged() { - dirtyProvider.setDirtyState(resource.isDirty()); - } - - public void commandStackChanged() { - - } - }); - return resource; - } - - return null; - } - -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java deleted file mode 100644 index 39074b03..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.eclipse.e4.tools.emf.editor3x.emf; - -import java.lang.reflect.Method; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.Platform; -import org.eclipse.emf.common.util.URI; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IURIEditorInput; -import org.osgi.framework.Bundle; - -public class EditUIUtil { - static final Class<?> FILE_CLASS; - static { - Class<?> fileClass = null; - try { - fileClass = IFile.class; - } catch (Throwable exception) { - // Ignore any exceptions and assume the class isn't available. - } - FILE_CLASS = fileClass; - } - - static final Class<?> FILE_REVISION_CLASS; - static final Method FILE_REVISION_GET_URI_METHOD; - static { - Class<?> fileRevisionClass = null; - Method fileRevisionGetURIMethod = null; - Bundle bundle = Platform.getBundle("org.eclipse.team.core"); - if (bundle != null - && (bundle.getState() & (Bundle.ACTIVE | Bundle.STARTING | Bundle.RESOLVED)) != 0) { - try { - fileRevisionClass = bundle - .loadClass("org.eclipse.team.core.history.IFileRevision"); - fileRevisionGetURIMethod = fileRevisionClass - .getMethod("getURI"); - } catch (Throwable exeption) { - // Ignore any exceptions and assume the class isn't available. - } - } - FILE_REVISION_CLASS = fileRevisionClass; - FILE_REVISION_GET_URI_METHOD = fileRevisionGetURIMethod; - } - - static final Class<?> URI_EDITOR_INPUT_CLASS; - static { - Class<?> uriEditorInputClass = null; - try { - uriEditorInputClass = IURIEditorInput.class; - } catch (Throwable exception) { - // The class is not available. - } - URI_EDITOR_INPUT_CLASS = uriEditorInputClass; - } - - public static URI getURI(IEditorInput editorInput) { - - if (FILE_CLASS != null) { - IFile file = (IFile) editorInput.getAdapter(FILE_CLASS); - if (file != null) { - return URI.createPlatformResourceURI(file.getFullPath() - .toString(), true); - } - } - if (FILE_REVISION_CLASS != null) { - Object fileRevision = editorInput.getAdapter(FILE_REVISION_CLASS); - if (fileRevision != null) { - try { - return URI - .createURI(((java.net.URI) FILE_REVISION_GET_URI_METHOD - .invoke(fileRevision)).toString()); - } catch (Throwable exception) { - // TODO Log error - } - } - } - if (URI_EDITOR_INPUT_CLASS != null) { - if (editorInput instanceof IURIEditorInput) { - return URI.createURI( - ((IURIEditorInput) editorInput).getURI().toString()) - .trimFragment(); - } - } - - return null; - } -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/AddonContributionEditor.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/AddonContributionEditor.java deleted file mode 100644 index dee4f6bd..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/AddonContributionEditor.java +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.editor3x.extension; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.e4.internal.tools.wizards.classes.NewAddonClassWizard; -import org.eclipse.e4.tools.emf.ui.common.IContributionClassCreator; -import org.eclipse.e4.ui.model.application.MContribution; -import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl; -import org.eclipse.emf.common.command.Command; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.edit.command.SetCommand; -import org.eclipse.emf.edit.domain.EditingDomain; -import org.eclipse.jdt.core.ICompilationUnit; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.ui.JavaUI; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PartInitException; - -public class AddonContributionEditor implements IContributionClassCreator { - - public boolean isSupported(EClass element) { - return Util.isTypeOrSuper(ApplicationPackageImpl.Literals.ADDON, element); - } - - public void createOpen(MContribution contribution, EditingDomain domain, - IProject project, Shell shell) { - if( contribution.getContributionURI() == null || contribution.getContributionURI().trim().length() == 0 ) { - NewAddonClassWizard wizard = new NewAddonClassWizard(); - wizard.init( null, new StructuredSelection(project)); - WizardDialog dialog = new WizardDialog(shell, wizard); - if( dialog.open() == WizardDialog.OK ) { - IFile f = wizard.getFile(); - ICompilationUnit el = JavaCore.createCompilationUnitFrom(f); - try { - String packageName = el.getPackageDeclarations()[0].getElementName(); - String className = wizard.getDomainClass().getName(); - Command cmd = SetCommand.create(domain, contribution, ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI, "platform:/plugin/" + f.getProject().getName() + "/" + packageName+"."+className); - if( cmd.canExecute() ) { - domain.getCommandStack().execute(cmd); - } - } catch (JavaModelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } else { - URI uri = URI.createURI(contribution.getContributionURI()); - IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(uri.segment(1)); - //TODO If this is not a WS-Resource we need to open differently - if( p != null ) { - IJavaProject jp = JavaCore.create(p); - try { - IType t = jp.findType(uri.segment(2)); - JavaUI.openInEditor(t); - } catch (JavaModelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (PartInitException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - } - -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/HandlerContributionEditor.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/HandlerContributionEditor.java deleted file mode 100644 index 4ebf9a28..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/HandlerContributionEditor.java +++ /dev/null @@ -1,90 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.editor3x.extension; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.e4.internal.tools.wizards.classes.NewHandlerClassWizard; -import org.eclipse.e4.tools.emf.ui.common.IContributionClassCreator; -import org.eclipse.e4.ui.model.application.MContribution; -import org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl; -import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl; -import org.eclipse.e4.ui.model.application.ui.menu.impl.MenuPackageImpl; -import org.eclipse.emf.common.command.Command; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.edit.command.SetCommand; -import org.eclipse.emf.edit.domain.EditingDomain; -import org.eclipse.jdt.core.ICompilationUnit; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.ui.JavaUI; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PartInitException; - -public class HandlerContributionEditor implements IContributionClassCreator { - - public void createOpen(MContribution contribution, EditingDomain domain, IProject project, Shell shell) { - if( contribution.getContributionURI() == null || contribution.getContributionURI().trim().length() == 0 ) { - NewHandlerClassWizard wizard = new NewHandlerClassWizard(); - wizard.init( null, new StructuredSelection(project)); - WizardDialog dialog = new WizardDialog(shell, wizard); - if( dialog.open() == WizardDialog.OK ) { - IFile f = wizard.getFile(); - ICompilationUnit el = JavaCore.createCompilationUnitFrom(f); - try { - String packageName = el.getPackageDeclarations()[0].getElementName(); - String className = wizard.getDomainClass().getName(); - Command cmd = SetCommand.create(domain, contribution, ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI, "platform:/plugin/" + f.getProject().getName() + "/" + packageName+"."+className); - if( cmd.canExecute() ) { - domain.getCommandStack().execute(cmd); - } - } catch (JavaModelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } else { - URI uri = URI.createURI(contribution.getContributionURI()); - IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(uri.segment(1)); - //TODO If this is not a WS-Resource we need to open differently - if( p != null ) { - IJavaProject jp = JavaCore.create(p); - try { - IType t = jp.findType(uri.segment(2)); - JavaUI.openInEditor(t); - } catch (JavaModelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (PartInitException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - } - - public boolean isSupported(EClass element) { - return - Util.isTypeOrSuper(CommandsPackageImpl.Literals.HANDLER,element) - || - Util.isTypeOrSuper(MenuPackageImpl.Literals.DIRECT_MENU_ITEM, element) - || - Util.isTypeOrSuper(MenuPackageImpl.Literals.DIRECT_TOOL_ITEM, element); - } - - -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/PartContributionEditor.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/PartContributionEditor.java deleted file mode 100644 index c6f5c3a3..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/PartContributionEditor.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.editor3x.extension; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.e4.internal.tools.wizards.classes.NewPartClassWizard; -import org.eclipse.e4.tools.emf.ui.common.IContributionClassCreator; -import org.eclipse.e4.ui.model.application.MContribution; -import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl; -import org.eclipse.e4.ui.model.application.ui.basic.impl.BasicPackageImpl; -import org.eclipse.emf.common.command.Command; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.edit.command.SetCommand; -import org.eclipse.emf.edit.domain.EditingDomain; -import org.eclipse.jdt.core.ICompilationUnit; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.ui.JavaUI; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PartInitException; - -public class PartContributionEditor implements IContributionClassCreator { - - public void createOpen(MContribution contribution, EditingDomain domain, - IProject project, Shell shell) { - if (contribution.getContributionURI() == null - || contribution.getContributionURI().trim().length() == 0) { - NewPartClassWizard wizard = new NewPartClassWizard(); - wizard.init(null, new StructuredSelection(project)); - WizardDialog dialog = new WizardDialog(shell, wizard); - if (dialog.open() == WizardDialog.OK) { - IFile f = wizard.getFile(); - ICompilationUnit el = JavaCore.createCompilationUnitFrom(f); - try { - String packageName = el.getPackageDeclarations()[0] - .getElementName(); - String className = wizard.getDomainClass().getName(); - Command cmd = SetCommand - .create(domain, - contribution, - ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI, - "platform:/plugin/" - + f.getProject().getName() + "/" - + packageName + "." + className); - if (cmd.canExecute()) { - domain.getCommandStack().execute(cmd); - } - } catch (JavaModelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } else { - URI uri = URI.createURI(contribution.getContributionURI()); - IProject p = ResourcesPlugin.getWorkspace().getRoot() - .getProject(uri.segment(1)); - // TODO If this is not a WS-Resource we need to open differently - if (p != null) { - IJavaProject jp = JavaCore.create(p); - try { - IType t = jp.findType(uri.segment(2)); - JavaUI.openInEditor(t); - } catch (JavaModelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (PartInitException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - } - - public boolean isSupported(EClass element) { - return Util.isTypeOrSuper(BasicPackageImpl.Literals.PART, element); - } - -} diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/Util.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/Util.java deleted file mode 100644 index f49d3b78..00000000 --- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/Util.java +++ /dev/null @@ -1,19 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.editor3x.extension; - -import org.eclipse.emf.ecore.EClass; - -public class Util { - public static boolean isTypeOrSuper(EClass eClass, EClass element) { - return eClass.equals(element) || element.getEAllSuperTypes().contains(eClass); - } -} diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/.classpath b/bundles/org.eclipse.e4.tools.emf.liveeditor/.classpath deleted file mode 100644 index 64c5e31b..00000000 --- a/bundles/org.eclipse.e4.tools.emf.liveeditor/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?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/bundles/org.eclipse.e4.tools.emf.liveeditor/.project b/bundles/org.eclipse.e4.tools.emf.liveeditor/.project deleted file mode 100644 index 8f237706..00000000 --- a/bundles/org.eclipse.e4.tools.emf.liveeditor/.project +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.e4.tools.emf.liveeditor</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> - <buildCommand> - <name>org.eclipse.pde.ds.core.builder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.emf.liveeditor/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 5bf6d1cf..00000000 --- a/bundles/org.eclipse.e4.tools.emf.liveeditor/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Sun Mar 14 18:18:29 CET 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.emf.liveeditor/META-INF/MANIFEST.MF deleted file mode 100644 index e4b46dae..00000000 --- a/bundles/org.eclipse.e4.tools.emf.liveeditor/META-INF/MANIFEST.MF +++ /dev/null @@ -1,23 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %Bundle-Name -Bundle-SymbolicName: org.eclipse.e4.tools.emf.liveeditor;singleton:=true -Bundle-Version: 0.9.0.qualifier -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Require-Bundle: javax.inject;bundle-version="1.0.0", - org.eclipse.e4.ui.services;bundle-version="0.9.1", - org.eclipse.swt;bundle-version="3.6.0", - org.eclipse.e4.tools.emf.ui;bundle-version="0.9.0", - org.eclipse.emf.edit;bundle-version="2.6.0", - org.eclipse.core.databinding.observable;bundle-version="1.3.0", - org.eclipse.equinox.common;bundle-version="3.6.0", - org.eclipse.e4.ui.model.workbench;bundle-version="0.9.1", - org.eclipse.e4.ui.workbench;bundle-version="0.9.1", - org.eclipse.core.resources;bundle-version="3.6.0", - org.eclipse.e4.core.contexts;bundle-version="0.9.0", - org.eclipse.e4.core.di;bundle-version="0.9.0", - org.eclipse.jface;bundle-version="3.6.0", - org.eclipse.equinox.registry;bundle-version="3.5.0" -Bundle-Vendor: %Bundle-Vendor -Service-Component: OSGI-INF/extensionlookup.xml -Bundle-ActivationPolicy: lazy diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/OSGI-INF/extensionlookup.xml b/bundles/org.eclipse.e4.tools.emf.liveeditor/OSGI-INF/extensionlookup.xml deleted file mode 100644 index 658799d9..00000000 --- a/bundles/org.eclipse.e4.tools.emf.liveeditor/OSGI-INF/extensionlookup.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.emf.liveeditor"> - <implementation class="org.eclipse.e4.tools.emf.liveeditor.RuntimeExtensionLookup"/> - <service> - <provide interface="org.eclipse.e4.tools.emf.ui.common.IExtensionLookup"/> - </service> - <property name="service.ranking" type="Integer" value="0"/> -</scr:component> diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/OSGI-INF/l10n/bundle.properties b/bundles/org.eclipse.e4.tools.emf.liveeditor/OSGI-INF/l10n/bundle.properties deleted file mode 100644 index 2b0bd2c4..00000000 --- a/bundles/org.eclipse.e4.tools.emf.liveeditor/OSGI-INF/l10n/bundle.properties +++ /dev/null @@ -1,3 +0,0 @@ -#Properties file for org.eclipse.e4.tools.emf.liveeditor -Bundle-Name = Liveeditor -Bundle-Vendor = Eclipse.org
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/about.html b/bundles/org.eclipse.e4.tools.emf.liveeditor/about.html deleted file mode 100644 index 82494867..00000000 --- a/bundles/org.eclipse.e4.tools.emf.liveeditor/about.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> -<title>About</title> -</head> -<body lang="EN-US"> -<h2>About This Content</h2> - -<p>December 3, 2009</p> -<h3>License</h3> - -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> - -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> - -</body> -</html>
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/build.properties b/bundles/org.eclipse.e4.tools.emf.liveeditor/build.properties deleted file mode 100644 index c15df501..00000000 --- a/bundles/org.eclipse.e4.tools.emf.liveeditor/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - about.html,\ - OSGI-INF/,\ - OSGI-INF/extensionlookup.xml -source.. = src/ diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/plugin.xml b/bundles/org.eclipse.e4.tools.emf.liveeditor/plugin.xml deleted file mode 100644 index 5e6b541b..00000000 --- a/bundles/org.eclipse.e4.tools.emf.liveeditor/plugin.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.4"?> -<plugin> - <extension - id="id1" - point="org.eclipse.e4.workbench.model"> - <processor - beforefragment="true" - class="org.eclipse.e4.tools.emf.liveeditor.ModelProcessor"> - </processor> - </extension> - -</plugin> diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/MemoryModelResource.java b/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/MemoryModelResource.java deleted file mode 100644 index d93e9fee..00000000 --- a/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/MemoryModelResource.java +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.liveeditor; - - -import org.eclipse.core.databinding.observable.list.IObservableList; -import org.eclipse.core.databinding.observable.list.WritableList; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.e4.tools.emf.ui.common.IModelResource; -import org.eclipse.e4.ui.model.application.MApplication; -import org.eclipse.emf.common.command.BasicCommandStack; -import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; -import org.eclipse.emf.edit.domain.EditingDomain; -import org.eclipse.emf.edit.provider.ComposedAdapterFactory; - -public class MemoryModelResource implements IModelResource { - private WritableList list = new WritableList(); - private EditingDomain editingDomain; - - public MemoryModelResource(MApplication application) { - list.add(application); - BasicCommandStack commandStack = new BasicCommandStack(); - ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); - editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack); - } - - public IObservableList getRoot() { - return list; - } - - public boolean isSaveable() { - return false; - } - - public IStatus save() { - return Status.OK_STATUS; - } - - public EditingDomain getEditingDomain() { - return editingDomain; - } - - public boolean isDirty() { - return false; - } - - public void addModelListener(ModelListener listener) { - - } - - public void removeModelListener(ModelListener listener) { - - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/ModelProcessor.java b/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/ModelProcessor.java deleted file mode 100644 index 054c29e3..00000000 --- a/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/ModelProcessor.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.liveeditor; - -import org.eclipse.e4.core.di.annotations.Execute; -import org.eclipse.e4.ui.model.application.MApplication; -import org.eclipse.e4.ui.model.application.commands.MCommand; -import org.eclipse.e4.ui.model.application.commands.MCommandsFactory; -import org.eclipse.e4.ui.model.application.commands.MHandler; -import org.eclipse.e4.ui.model.application.commands.MKeyBinding; - -public class ModelProcessor { - - @Execute - public void process(MApplication application) { - MCommand command = MCommandsFactory.INSTANCE.createCommand(); - command.setElementId("e4.tooling.livemodel"); - command.setCommandName("Show running app model"); - command.setDescription("Show the running application model"); - application.getCommands().add(command); - - MHandler handler = MCommandsFactory.INSTANCE.createHandler(); - handler.setContributionURI("platform:/plugin/org.eclipse.e4.tools.emf.liveeditor/org.eclipse.e4.tools.emf.liveeditor.OpenLiveDialogHandler"); - handler.setCommand(command); - application.getHandlers().add(handler); - - MKeyBinding binding = MCommandsFactory.INSTANCE.createKeyBinding(); - binding.setKeySequence("ALT+SHIFT+F9"); - binding.setCommand(command); - if( application.getBindingTables().size() > 0 ) { - application.getBindingTables().get(0).getBindings().add(binding); - } - } -} diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/OpenLiveDialogHandler.java b/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/OpenLiveDialogHandler.java deleted file mode 100644 index cedb14d1..00000000 --- a/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/OpenLiveDialogHandler.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.emf.liveeditor; - -import javax.inject.Named; - -import org.eclipse.e4.core.contexts.ContextInjectionFactory; -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.core.di.annotations.Execute; -import org.eclipse.e4.tools.emf.ui.common.IModelResource; -import org.eclipse.e4.tools.emf.ui.internal.wbm.ApplicationModelEditor; -import org.eclipse.e4.ui.model.application.MApplication; -import org.eclipse.e4.ui.services.IServiceConstants; -import org.eclipse.e4.ui.services.IStylingEngine; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; - -public class OpenLiveDialogHandler { - private Shell shell; - - public OpenLiveDialogHandler() { - } - - @Execute - public void run(@Named(IServiceConstants.ACTIVE_SHELL) Shell s, - IEclipseContext c, MApplication application, IStylingEngine engine) { - if (this.shell == null || this.shell.isDisposed()) { - try { - this.shell = new Shell(s,SWT.SHELL_TRIM); - //FIXME Style - this.shell.setBackground(shell.getDisplay().getSystemColor(SWT.COLOR_WHITE)); - FillLayout layout = new FillLayout(); - layout.marginHeight=10; - layout.marginWidth=10; - this.shell.setLayout(layout); - final IEclipseContext childContext = c - .createChild("EditorContext"); - MemoryModelResource resource = new MemoryModelResource(application); - childContext.set(IModelResource.class, resource); - childContext.set(Composite.class.getName(), shell); - childContext.set(IModelResource.class, resource); - - ContextInjectionFactory.make(ApplicationModelEditor.class, childContext); - -// new ApplicationModelEditor(shell, childContext, resource, null); - shell.open(); - Display d = shell.getDisplay(); - while( ! shell.isDisposed() ) { - if( ! d.readAndDispatch() ) { - d.sleep(); - } - } - childContext.dispose(); -// d.update(); - shell = null; - } catch (Exception e) { - e.printStackTrace(); - } - } - } -} diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/RuntimeExtensionLookup.java b/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/RuntimeExtensionLookup.java deleted file mode 100644 index a2005021..00000000 --- a/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/RuntimeExtensionLookup.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.eclipse.e4.tools.emf.liveeditor; - -import org.eclipse.core.runtime.IExtension; -import org.eclipse.core.runtime.IExtensionRegistry; -import org.eclipse.core.runtime.RegistryFactory; -import org.eclipse.e4.tools.emf.ui.common.IExtensionLookup; - -public class RuntimeExtensionLookup implements IExtensionLookup { - - public IExtension[] findExtensions(String extensionPointId, boolean liveModel) { - IExtensionRegistry registry = RegistryFactory.getRegistry(); - return registry.getExtensionPoint(extensionPointId).getExtensions(); - } - -} diff --git a/bundles/org.eclipse.e4.tools.jdt.templates/.classpath b/bundles/org.eclipse.e4.tools.jdt.templates/.classpath deleted file mode 100644 index 64c5e31b..00000000 --- a/bundles/org.eclipse.e4.tools.jdt.templates/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?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/bundles/org.eclipse.e4.tools.jdt.templates/.project b/bundles/org.eclipse.e4.tools.jdt.templates/.project deleted file mode 100644 index e0303cd3..00000000 --- a/bundles/org.eclipse.e4.tools.jdt.templates/.project +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.e4.tools.jdt.templates</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/bundles/org.eclipse.e4.tools.jdt.templates/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.jdt.templates/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 5a797383..00000000 --- a/bundles/org.eclipse.e4.tools.jdt.templates/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Sat Mar 06 23:33:15 EST 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/bundles/org.eclipse.e4.tools.jdt.templates/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.jdt.templates/META-INF/MANIFEST.MF deleted file mode 100644 index 1a967cb3..00000000 --- a/bundles/org.eclipse.e4.tools.jdt.templates/META-INF/MANIFEST.MF +++ /dev/null @@ -1,12 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: e4 Templates -Bundle-SymbolicName: org.eclipse.e4.tools.jdt.templates;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Require-Bundle: org.eclipse.jdt.ui;bundle-version="3.6.0", - org.eclipse.ui.editors;bundle-version="3.6.0", - org.eclipse.jface.text;bundle-version="3.6.0", - org.eclipse.jdt.core;bundle-version="3.6.0", - org.eclipse.core.runtime;bundle-version="3.6.0" -Export-Package: org.eclipse.e4.internal.tools.jdt.templates diff --git a/bundles/org.eclipse.e4.tools.jdt.templates/build.properties b/bundles/org.eclipse.e4.tools.jdt.templates/build.properties deleted file mode 100644 index 3337a4a3..00000000 --- a/bundles/org.eclipse.e4.tools.jdt.templates/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - templates/,\ - icons/ diff --git a/bundles/org.eclipse.e4.tools.jdt.templates/icons/full/elcl16/e4assist_co.gif b/bundles/org.eclipse.e4.tools.jdt.templates/icons/full/elcl16/e4assist_co.gif Binary files differdeleted file mode 100644 index 150a1f7e..00000000 --- a/bundles/org.eclipse.e4.tools.jdt.templates/icons/full/elcl16/e4assist_co.gif +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools.jdt.templates/plugin.xml b/bundles/org.eclipse.e4.tools.jdt.templates/plugin.xml deleted file mode 100644 index b3ed8606..00000000 --- a/bundles/org.eclipse.e4.tools.jdt.templates/plugin.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.4"?> -<plugin> - <extension - point="org.eclipse.jdt.ui.javaCompletionProposalComputer" - id="e4ProposalCategory" - name="e4 proposals"> - <proposalCategory - icon="$nl$/icons/full/elcl16/e4assist_co.gif"/> - </extension> - <extension - point="org.eclipse.jdt.ui.javaCompletionProposalComputer" - id="e4BuilderCompletionProposalComputer"> - <javaCompletionProposalComputer - activate="true" - categoryId="org.eclipse.e4.tools.jdt.templates.e4ProposalCategory" - class="org.eclipse.e4.internal.tools.jdt.templates.E4TemplateCompletionProposalComputer"> - <partition type="__dftl_partition_content_type"/> - </javaCompletionProposalComputer> - </extension> - <extension - point="org.eclipse.ui.editors.templates"> - <contextType - name="e4" - class="org.eclipse.e4.internal.tools.jdt.templates.E4ContextType" - id="e4" - registryId="org.eclipse.jdt.ui.CompilationUnitEditor"> - </contextType> - <contextType - name="e4 statements" - class="org.eclipse.e4.internal.tools.jdt.templates.E4ContextType" - id="e4-statements" - registryId="org.eclipse.jdt.ui.CompilationUnitEditor"> - </contextType> - <contextType - name="e4 members" - class="org.eclipse.e4.internal.tools.jdt.templates.E4ContextType" - id="e4-members" - registryId="org.eclipse.jdt.ui.CompilationUnitEditor"> - </contextType> - <include - file="templates/default-e4templates.xml" - translations="$nl$/templates/default-e4templates.properties"> - </include> - </extension> - -</plugin> diff --git a/bundles/org.eclipse.e4.tools.jdt.templates/src/org/eclipse/e4/internal/tools/jdt/templates/E4ContextType.java b/bundles/org.eclipse.e4.tools.jdt.templates/src/org/eclipse/e4/internal/tools/jdt/templates/E4ContextType.java deleted file mode 100644 index 1fdf5ff9..00000000 --- a/bundles/org.eclipse.e4.tools.jdt.templates/src/org/eclipse/e4/internal/tools/jdt/templates/E4ContextType.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 IBM Corporation 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: - * IBM Corporation - initial API and implementation (adapted from JDT's SWTContextType) - *******************************************************************************/ -package org.eclipse.e4.internal.tools.jdt.templates; - -import org.eclipse.jdt.internal.corext.template.java.AbstractJavaContextType; -import org.eclipse.jdt.internal.corext.template.java.JavaContext; - -/** - * The context type for templates inside e4 code. - * The same class is used for several context types: - * <dl> - * <li>templates for all Java code locations</li> - * <li>templates for member locations</li> - * <li>templates for statement locations</li> - * </dl> - */ -public class E4ContextType extends AbstractJavaContextType { - - /** - * The context type id for templates working on all Java code locations in e4 projects - */ - public static final String ID_ALL= "e4"; //$NON-NLS-1$ - - /** - * The context type id for templates working on member locations in e4 projects - */ - public static final String ID_MEMBERS= "e4-members"; //$NON-NLS-1$ - - /** - * The context type id for templates working on statement locations in e4 projects - */ - public static final String ID_STATEMENTS= "e4-statements"; //$NON-NLS-1$ - - protected void initializeContext(JavaContext context) { - if (!getId().equals(E4ContextType.ID_ALL)) { // a specific context must also allow the templates that work everywhere - context.addCompatibleContextType(E4ContextType.ID_ALL); - } - } -} diff --git a/bundles/org.eclipse.e4.tools.jdt.templates/src/org/eclipse/e4/internal/tools/jdt/templates/E4TemplateCompletionProposalComputer.java b/bundles/org.eclipse.e4.tools.jdt.templates/src/org/eclipse/e4/internal/tools/jdt/templates/E4TemplateCompletionProposalComputer.java deleted file mode 100644 index cadf6bfc..00000000 --- a/bundles/org.eclipse.e4.tools.jdt.templates/src/org/eclipse/e4/internal/tools/jdt/templates/E4TemplateCompletionProposalComputer.java +++ /dev/null @@ -1,204 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 IBM Corporation 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: - * IBM Corporation - initial API and implementation (adapted from JDT's SWTTemplateCompletionProposalComputer) - *******************************************************************************/ -package org.eclipse.e4.internal.tools.jdt.templates; - -import org.eclipse.core.runtime.Assert; -import org.eclipse.jdt.core.CompletionContext; -import org.eclipse.jdt.core.ElementChangedEvent; -import org.eclipse.jdt.core.ICompilationUnit; -import org.eclipse.jdt.core.IElementChangedListener; -import org.eclipse.jdt.core.IJavaElementDelta; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.internal.ui.JavaPlugin; -import org.eclipse.jdt.internal.ui.text.java.AbstractTemplateCompletionProposalComputer; -import org.eclipse.jdt.internal.ui.text.template.contentassist.TemplateEngine; -import org.eclipse.jdt.ui.text.java.JavaContentAssistInvocationContext; -import org.eclipse.jface.text.templates.ContextTypeRegistry; -import org.eclipse.jface.text.templates.TemplateContextType; - -/** - * Computer that computes the template proposals for the E4 context type. - * - */ -public class E4TemplateCompletionProposalComputer extends AbstractTemplateCompletionProposalComputer { - - /** - * The name of <code>org.eclipse.e4.core.services.IDisposable</code> used to detect - * if a project uses e4. - */ - private static final String E4_TYPE_NAME= "org.eclipse.e4.core.services.IDisposable"; //$NON-NLS-1$ - - - /** - * Listener that resets the cached java project if its build path changes. - */ - private final class BuildPathChangeListener implements IElementChangedListener { - - public void elementChanged(ElementChangedEvent event) { - IJavaProject javaProject= getCachedJavaProject(); - if (javaProject == null) - return; - - IJavaElementDelta[] children= event.getDelta().getChangedChildren(); - for (int i= 0; i < children.length; i++) { - IJavaElementDelta child= children[i]; - if (javaProject.equals(child.getElement())) { - if (isClasspathChange(child)) { - setCachedJavaProject(null); - } - } - } - } - - /** - * Does the delta indicate a classpath change? - * @param delta the delta to inspect - * @return true if classpath has changed - */ - private boolean isClasspathChange(IJavaElementDelta delta) { - int flags= delta.getFlags(); - if (isClasspathChangeFlag(flags)) - return true; - - if ((flags & IJavaElementDelta.F_CHILDREN) != 0) { - IJavaElementDelta[] children= delta.getAffectedChildren(); - for (int i= 0; i < children.length; i++) { - if (isClasspathChangeFlag(children[i].getFlags())) - return true; - } - } - - return false; - } - - /** - * Do the flags indicate a classpath change? - * @param flags the flags to inspect - * @return true if the flag flags a classpath change - */ - private boolean isClasspathChangeFlag(int flags) { - if ((flags & IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED) != 0) - return true; - - if ((flags & IJavaElementDelta.F_ADDED_TO_CLASSPATH) != 0) - return true; - - if ((flags & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0) - return true; - - if ((flags & IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED) != 0) - return true; - - return false; - } - } - - - /** - * Engine used to compute the proposals for this computer - */ - private final TemplateEngine fE4TemplateEngine; - private final TemplateEngine fE4MembersTemplateEngine; - private final TemplateEngine fE4StatementsTemplateEngine; - - /** - * The Java project of the compilation unit for which a template - * engine has been computed last time if any - */ - private IJavaProject fCachedJavaProject; - /** - * Is org.eclipse.e4.core.services.IDisposable on class path of <code>fJavaProject</code>. Invalid - * if <code>fJavaProject</code> is <code>false</code>. - */ - private boolean fIsE4OnClasspath; - - public E4TemplateCompletionProposalComputer() { - ContextTypeRegistry templateContextRegistry= JavaPlugin.getDefault().getTemplateContextRegistry(); - fE4TemplateEngine= createTemplateEngine(templateContextRegistry, E4ContextType.ID_ALL); - fE4MembersTemplateEngine= createTemplateEngine(templateContextRegistry, E4ContextType.ID_MEMBERS); - fE4StatementsTemplateEngine= createTemplateEngine(templateContextRegistry, E4ContextType.ID_STATEMENTS); - - JavaCore.addElementChangedListener(new BuildPathChangeListener()); - } - - private static TemplateEngine createTemplateEngine(ContextTypeRegistry templateContextRegistry, String contextTypeId) { - TemplateContextType contextType= templateContextRegistry.getContextType(contextTypeId); - Assert.isNotNull(contextType); - return new TemplateEngine(contextType); - } - - protected TemplateEngine computeCompletionEngine(JavaContentAssistInvocationContext context) { - ICompilationUnit unit= context.getCompilationUnit(); - if (unit == null) - return null; - - IJavaProject javaProject= unit.getJavaProject(); - if (javaProject == null) - return null; - - if (isE4OnClasspath(javaProject)) { - CompletionContext coreContext= context.getCoreContext(); - if (coreContext != null) { - int tokenLocation= coreContext.getTokenLocation(); - if ((tokenLocation & CompletionContext.TL_MEMBER_START) != 0) { - return fE4MembersTemplateEngine; - } - if ((tokenLocation & CompletionContext.TL_STATEMENT_START) != 0) { - return fE4StatementsTemplateEngine; - } - } - return fE4TemplateEngine; - } - - return null; - } - - /** - * Tells whether E4 is on the given project's class path. - * - * @param javaProject the Java project - * @return <code>true</code> if the given project's class path - */ - private synchronized boolean isE4OnClasspath(IJavaProject javaProject) { - if (!javaProject.equals(fCachedJavaProject)) { - fCachedJavaProject= javaProject; - try { - IType type= javaProject.findType(E4_TYPE_NAME); - fIsE4OnClasspath= type != null; - } catch (JavaModelException e) { - fIsE4OnClasspath= false; - } - } - return fIsE4OnClasspath; - } - - /** - * Returns the cached Java project. - * - * @return the cached Java project or <code>null</code> if none - */ - private synchronized IJavaProject getCachedJavaProject() { - return fCachedJavaProject; - } - - /** - * Set the cached Java project. - * - * @param project or <code>null</code> to reset the cache - */ - private synchronized void setCachedJavaProject(IJavaProject project) { - fCachedJavaProject= project; - } - -} diff --git a/bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.properties b/bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.properties deleted file mode 100644 index e69de29b..00000000 --- a/bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.properties +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.xml b/bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.xml deleted file mode 100644 index 33dd0808..00000000 --- a/bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- -/******************************************************************************* - * Copyright (c) 2010 IBM Corporation 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: - * Boris Bokowski, IBM Corporation - initial API and implementation - *******************************************************************************/ ---> - -<templates> - -<template name="e4-parent" description="Injected Parent Composite" id="org.eclipse.e4.tools.jdt.templates.parent" context="e4-members" enabled="true" autoinsert="false">@Inject -Composite parent;</template> - -<template name="e4-preference" description="Injected Preference Value" id="org.eclipse.e4.tools.jdt.templates.preference" context="e4-members" enabled="true" autoinsert="false">@Inject -void setPreferenceValue(@Named("preference-PREFERENCE_KEY") String preferenceValue) { - ${cursor} -}</template> - -<template name="e4-adapter" description="Injected Adapter Service" id="org.eclipse.e4.tools.jdt.templates.adapter" context="e4-members" enabled="true" autoinsert="false">@Inject -Adapter adapter;</template> - -<template name="e4-preferences" description="Injected Preferences Service" id="org.eclipse.e4.tools.jdt.templates.preferences" context="e4-members" enabled="true" autoinsert="false">@Inject -IEclipsePreferences preferences;</template> - -<template name="e4-statushandler" description="Injected Status Handler" id="org.eclipse.e4.tools.jdt.templates.statushandler" context="e4-members" enabled="true" autoinsert="false">@Inject -IStatusHandler statusHandler;</template> - -<template name="e4-logger" description="Injected Logger" id="org.eclipse.e4.tools.jdt.templates.logger" context="e4-members" enabled="true" autoinsert="false">@Inject -Logger logger;</template> - -<template name="e4-eventbroker" description="Injected Event Broker" id="org.eclipse.e4.tools.jdt.templates.eventbroker" context="e4-members" enabled="true" autoinsert="false">@Inject -IEventBroker eventBroker;</template> - -<template name="e4-stylingengine" description="Injected Styling Engine" id="org.eclipse.e4.tools.jdt.templates.stylingengine" context="e4-members" enabled="true" autoinsert="false">@Inject -IStylingEngine stylingEngine;</template> - -<template name="e4-event" description="Event Handler Method" id="org.eclipse.e4.tools.jdt.templates.eventhandler" context="e4-members" enabled="true" autoinsert="false">@EventHandler("some/event/topic") -void handleSomeEvent(Payload payloadObject) { - ${cursor} -}</template> - -<template name="e4-init" description="Initialization Method" id="org.eclipse.e4.tools.jdt.templates.init" context="e4-members" enabled="true" autoinsert="false">@PostConstruct -void init() { - ${cursor} -}</template> - -<template name="e4-dispose" description="Dispose Method" id="org.eclipse.e4.tools.jdt.templates.dispose" context="e4-members" enabled="true" autoinsert="false">@PreDestroy -void dispose() { - ${cursor} -}</template> - -</templates> diff --git a/bundles/org.eclipse.e4.tools.services/.classpath b/bundles/org.eclipse.e4.tools.services/.classpath deleted file mode 100644 index 64c5e31b..00000000 --- a/bundles/org.eclipse.e4.tools.services/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?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/bundles/org.eclipse.e4.tools.services/.project b/bundles/org.eclipse.e4.tools.services/.project deleted file mode 100644 index 15c52ba1..00000000 --- a/bundles/org.eclipse.e4.tools.services/.project +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.e4.tools.services</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/bundles/org.eclipse.e4.tools.services/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.services/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 199694e6..00000000 --- a/bundles/org.eclipse.e4.tools.services/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Wed Jun 02 16:01:21 CEST 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/bundles/org.eclipse.e4.tools.services/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.services/META-INF/MANIFEST.MF deleted file mode 100644 index 08d062af..00000000 --- a/bundles/org.eclipse.e4.tools.services/META-INF/MANIFEST.MF +++ /dev/null @@ -1,8 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %Bundle-Name -Bundle-SymbolicName: org.eclipse.e4.tools.services -Bundle-Version: 1.0.0.qualifier -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Export-Package: org.eclipse.e4.tools.services -Bundle-Vendor: %Bundle-Vendor diff --git a/bundles/org.eclipse.e4.tools.services/OSGI-INF/l10n/bundle.properties b/bundles/org.eclipse.e4.tools.services/OSGI-INF/l10n/bundle.properties deleted file mode 100644 index 190cbb96..00000000 --- a/bundles/org.eclipse.e4.tools.services/OSGI-INF/l10n/bundle.properties +++ /dev/null @@ -1,3 +0,0 @@ -#Properties file for org.eclipse.e4.tools.services -Bundle-Name = Services -Bundle-Vendor = Eclipse.org
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.services/about.html b/bundles/org.eclipse.e4.tools.services/about.html deleted file mode 100644 index 82494867..00000000 --- a/bundles/org.eclipse.e4.tools.services/about.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> -<title>About</title> -</head> -<body lang="EN-US"> -<h2>About This Content</h2> - -<p>December 3, 2009</p> -<h3>License</h3> - -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> - -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> - -</body> -</html>
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.services/build.properties b/bundles/org.eclipse.e4.tools.services/build.properties deleted file mode 100644 index b8bb95d7..00000000 --- a/bundles/org.eclipse.e4.tools.services/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - about.html,\ - OSGI-INF/ diff --git a/bundles/org.eclipse.e4.tools.services/src/org/eclipse/e4/tools/services/IClipboardService.java b/bundles/org.eclipse.e4.tools.services/src/org/eclipse/e4/tools/services/IClipboardService.java deleted file mode 100644 index 2f1f796a..00000000 --- a/bundles/org.eclipse.e4.tools.services/src/org/eclipse/e4/tools/services/IClipboardService.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.services; - -public interface IClipboardService { - public void copy(); - public void paste(); - public void cut(); - public void setHandler(Handler handler); - - public interface Handler { - public void paste(); - public void copy(); - public void cut(); -// public boolean canCopy(); -// public boolean canPaste(); - } -} diff --git a/bundles/org.eclipse.e4.tools.services/src/org/eclipse/e4/tools/services/IDirtyProviderService.java b/bundles/org.eclipse.e4.tools.services/src/org/eclipse/e4/tools/services/IDirtyProviderService.java deleted file mode 100644 index cdbd5489..00000000 --- a/bundles/org.eclipse.e4.tools.services/src/org/eclipse/e4/tools/services/IDirtyProviderService.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.services; - -public interface IDirtyProviderService { - public void setDirtyState(boolean dirtyState); -} diff --git a/bundles/org.eclipse.e4.tools.services/src/org/eclipse/e4/tools/services/ISelectionProviderService.java b/bundles/org.eclipse.e4.tools.services/src/org/eclipse/e4/tools/services/ISelectionProviderService.java deleted file mode 100644 index 42b49e77..00000000 --- a/bundles/org.eclipse.e4.tools.services/src/org/eclipse/e4/tools/services/ISelectionProviderService.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.tools.services; - -public interface ISelectionProviderService { - public void setSelection(Object selection); -} diff --git a/bundles/org.eclipse.e4.tools/.classpath b/bundles/org.eclipse.e4.tools/.classpath deleted file mode 100644 index 64c5e31b..00000000 --- a/bundles/org.eclipse.e4.tools/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?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/bundles/org.eclipse.e4.tools/.jetproperties b/bundles/org.eclipse.e4.tools/.jetproperties deleted file mode 100644 index 2907c83a..00000000 --- a/bundles/org.eclipse.e4.tools/.jetproperties +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<jet-settings> - <template-container>templates</template-container> <source-container>src</source-container> -</jet-settings> diff --git a/bundles/org.eclipse.e4.tools/.project b/bundles/org.eclipse.e4.tools/.project deleted file mode 100644 index 62db1d2d..00000000 --- a/bundles/org.eclipse.e4.tools/.project +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.e4.tools</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.emf.codegen.JETBuilder</name> - <arguments> - </arguments> - </buildCommand> - <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.emf.codegen.jet.IJETNature</nature> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/bundles/org.eclipse.e4.tools/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 25961444..00000000 --- a/bundles/org.eclipse.e4.tools/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Mon Jul 05 10:09:17 CEST 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/bundles/org.eclipse.e4.tools/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools/META-INF/MANIFEST.MF deleted file mode 100644 index 3e806852..00000000 --- a/bundles/org.eclipse.e4.tools/META-INF/MANIFEST.MF +++ /dev/null @@ -1,26 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %Bundle-Name -Bundle-SymbolicName: org.eclipse.e4.tools;singleton:=true -Bundle-Version: 0.9.0.qualifier -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Require-Bundle: org.eclipse.ui;bundle-version="3.6.0", - org.eclipse.pde.core;bundle-version="3.6.0", - org.eclipse.pde.ui;bundle-version="3.6.0", - org.eclipse.core.runtime;bundle-version="3.6.0", - org.eclipse.e4.ui.model.workbench;bundle-version="0.9.1", - org.eclipse.core.resources;bundle-version="3.6.0", - org.eclipse.jdt.core;bundle-version="3.6.0", - org.eclipse.jdt.launching;bundle-version="3.5.100", - org.eclipse.ui.ide;bundle-version="3.6.0", - org.eclipse.core.databinding;bundle-version="1.3.100", - org.eclipse.core.databinding.beans;bundle-version="1.2.100", - org.eclipse.jface.databinding;bundle-version="1.4.0", - org.eclipse.core.databinding.property;bundle-version="1.3.0", - org.eclipse.jdt.ui;bundle-version="3.6.0" -Bundle-ActivationPolicy: lazy -Bundle-Activator: org.eclipse.e4.internal.tools.ToolsPlugin -Export-Package: org.eclipse.e4.internal.tools.wizards.classes;x-internal:=true, - org.eclipse.e4.internal.tools.wizards.model;x-internal:=true, - org.eclipse.e4.internal.tools.wizards.project;x-internal:=true -Bundle-Vendor: %Bundle-Vendor diff --git a/bundles/org.eclipse.e4.tools/OSGI-INF/l10n/bundle.properties b/bundles/org.eclipse.e4.tools/OSGI-INF/l10n/bundle.properties deleted file mode 100644 index af034d7e..00000000 --- a/bundles/org.eclipse.e4.tools/OSGI-INF/l10n/bundle.properties +++ /dev/null @@ -1,12 +0,0 @@ -#Properties file for org.eclipse.e4.tools -category.name = e4 -category.name.0 = Classes -category.name.1 = Model -wizard.name = e4 Application Project -wizard.name.0 = New Application Model -wizard.name.1 = New Model Fragment -wizard.name.2 = New Handler Class -wizard.name.3 = New Part Class -wizard.name.4 = New Addon Class -Bundle-Name = Tools -Bundle-Vendor = Eclipse.org
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools/about.html b/bundles/org.eclipse.e4.tools/about.html deleted file mode 100644 index c1343aa3..00000000 --- a/bundles/org.eclipse.e4.tools/about.html +++ /dev/null @@ -1,45 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> -<title>About</title> -</head> -<body lang="EN-US"> -<h2>About This Content</h2> - -<p>December 3, 2009</p> -<h3>License</h3> - -<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. -For purposes of the EPL, "Program" will mean the Content.</p> - -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> - -<h3>Third Party Content</h3> - -<p>The Content includes items from third parties as set out below. If you did not -receive this Content directly from the Eclipse Foundation, the following is provided for informational -purposes only, and you should look to the Redistributor’s license for terms and conditions of use.</p> - -<h4>Silk icon set Version 1.3</h4> -<p> -This plugin contains icons from the Silk icon set created by Mark James. The original files can -be found at: -<ul> -<a href="http://www.famfamfam.com/lab/icons/silk/">http://www.famfamfam.com/lab/icons/silk/</a></ul> -<p>The license can be found at:</p> -<ul> - <li><a href="http://creativecommons.org/licenses/by/2.5/">http://creativecommons.org/licenses/by/2.5/</a></li> -</ul> - -</body> -</html>
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools/build.properties b/bundles/org.eclipse.e4.tools/build.properties deleted file mode 100644 index 337436eb..00000000 --- a/bundles/org.eclipse.e4.tools/build.properties +++ /dev/null @@ -1,9 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - icons/,\ - templates/,\ - about.html,\ - OSGI-INF/ diff --git a/bundles/org.eclipse.e4.tools/icons/full/obj16/Addons.png b/bundles/org.eclipse.e4.tools/icons/full/obj16/Addons.png Binary files differdeleted file mode 100644 index 3262767c..00000000 --- a/bundles/org.eclipse.e4.tools/icons/full/obj16/Addons.png +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools/icons/full/obj16/Part.gif b/bundles/org.eclipse.e4.tools/icons/full/obj16/Part.gif Binary files differdeleted file mode 100644 index 610f5844..00000000 --- a/bundles/org.eclipse.e4.tools/icons/full/obj16/Part.gif +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools/icons/full/obj16/application_view_tile.png b/bundles/org.eclipse.e4.tools/icons/full/obj16/application_view_tile.png Binary files differdeleted file mode 100644 index 3bc0bd32..00000000 --- a/bundles/org.eclipse.e4.tools/icons/full/obj16/application_view_tile.png +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools/icons/full/obj16/class_obj.gif b/bundles/org.eclipse.e4.tools/icons/full/obj16/class_obj.gif Binary files differdeleted file mode 100644 index e4c2a836..00000000 --- a/bundles/org.eclipse.e4.tools/icons/full/obj16/class_obj.gif +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools/icons/full/obj16/plugin.png b/bundles/org.eclipse.e4.tools/icons/full/obj16/plugin.png Binary files differdeleted file mode 100644 index 6187b15a..00000000 --- a/bundles/org.eclipse.e4.tools/icons/full/obj16/plugin.png +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools/icons/full/wizban/newclass_wiz.png b/bundles/org.eclipse.e4.tools/icons/full/wizban/newclass_wiz.png Binary files differdeleted file mode 100644 index cc123864..00000000 --- a/bundles/org.eclipse.e4.tools/icons/full/wizban/newclass_wiz.png +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/emf/editor3x/templates/HandlerTemplate.java b/bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/emf/editor3x/templates/HandlerTemplate.java deleted file mode 100644 index e969a093..00000000 --- a/bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/emf/editor3x/templates/HandlerTemplate.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.eclipse.e4.tools.emf.editor3x.templates; - -import org.eclipse.e4.tools.emf.editor3x.wizard.NewHandlerClassWizard.HandlerClass; - -public class HandlerTemplate -{ - protected static String nl; - public static synchronized HandlerTemplate create(String lineSeparator) - { - nl = lineSeparator; - HandlerTemplate result = new HandlerTemplate(); - nl = null; - return result; - } - - public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; - protected final String TEXT_1 = " " + NL + "package "; - protected final String TEXT_2 = ";" + NL + "" + NL + "import org.eclipse.e4.core.di.annotations.Execute;"; - protected final String TEXT_3 = NL + "import org.eclipse.e4.core.di.annotations.CanExecute;"; - protected final String TEXT_4 = NL + NL + "public class "; - protected final String TEXT_5 = " {" + NL + "\t@Execute" + NL + "\tpublic void "; - protected final String TEXT_6 = "() {" + NL + "\t\t//TODO Your code goes here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_7 = NL + "\t" + NL + "\t@CanExecute" + NL + "\tpublic boolean "; - protected final String TEXT_8 = "() {" + NL + "\t\t//TODO Your code goes here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_9 = "\t" + NL + "}"; - - public String generate(Object argument) - { - final StringBuffer stringBuffer = new StringBuffer(); - HandlerClass domainClass = (HandlerClass)argument; - stringBuffer.append(TEXT_1); - stringBuffer.append( domainClass.getPackageFragment().getElementName() ); - stringBuffer.append(TEXT_2); - if( domainClass.isUseCanExecute() ) { - stringBuffer.append(TEXT_3); - } - stringBuffer.append(TEXT_4); - stringBuffer.append( domainClass.getName() ); - stringBuffer.append(TEXT_5); - stringBuffer.append( domainClass.getExecuteMethodName() ); - stringBuffer.append(TEXT_6); - if( domainClass.isUseCanExecute() ) { - stringBuffer.append(TEXT_7); - stringBuffer.append( domainClass.getCanExecuteMethodName() ); - stringBuffer.append(TEXT_8); - } - stringBuffer.append(TEXT_9); - return stringBuffer.toString(); - } -} diff --git a/bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/emf/editor3x/templates/PartTemplate.java b/bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/emf/editor3x/templates/PartTemplate.java deleted file mode 100644 index 3bcf8475..00000000 --- a/bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/emf/editor3x/templates/PartTemplate.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.eclipse.e4.tools.emf.editor3x.templates; - -import org.eclipse.e4.tools.emf.editor3x.wizard.NewPartClassWizard.PartClass; - -public class PartTemplate -{ - protected static String nl; - public static synchronized PartTemplate create(String lineSeparator) - { - nl = lineSeparator; - PartTemplate result = new PartTemplate(); - nl = null; - return result; - } - - public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; - protected final String TEXT_1 = " " + NL + "package "; - protected final String TEXT_2 = ";" + NL + "" + NL + "import javax.inject.Inject;"; - protected final String TEXT_3 = NL + "import javax.annotation.PostConstruct;"; - protected final String TEXT_4 = NL + "import javax.annotation.PreDestroy;"; - protected final String TEXT_5 = NL + "import org.eclipse.e4.ui.di.Focus;"; - protected final String TEXT_6 = NL + "import org.eclipse.e4.ui.di.Persist;"; - protected final String TEXT_7 = NL + NL + "public class "; - protected final String TEXT_8 = " {" + NL + "\t@Inject" + NL + "\tpublic "; - protected final String TEXT_9 = "() {" + NL + "\t\t//TODO Your code here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_10 = NL + "\t@PostConstruct" + NL + "\tpublic void "; - protected final String TEXT_11 = "() {" + NL + "\t\t//TODO Your code here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_12 = NL + "\t"; - protected final String TEXT_13 = NL + "\t@PreDestroy" + NL + "\tpublic void "; - protected final String TEXT_14 = "() {" + NL + "\t\t//TODO Your code here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_15 = NL + "\t"; - protected final String TEXT_16 = NL + "\t@Focus" + NL + "\tpublic void "; - protected final String TEXT_17 = "() {" + NL + "\t\t//TODO Your code here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_18 = NL + "\t"; - protected final String TEXT_19 = NL + "\t@Persist" + NL + "\tpublic void "; - protected final String TEXT_20 = "() {" + NL + "\t\t//TODO Your code here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_21 = NL + "}"; - - public String generate(Object argument) - { - final StringBuffer stringBuffer = new StringBuffer(); - PartClass domainClass = (PartClass)argument; - stringBuffer.append(TEXT_1); - stringBuffer.append( domainClass.getPackageFragment().getElementName() ); - stringBuffer.append(TEXT_2); - if( domainClass.isUsePostConstruct() ) { - stringBuffer.append(TEXT_3); - } - if( domainClass.isUsePredestroy() ) { - stringBuffer.append(TEXT_4); - } - if( domainClass.isUseFocus() ) { - stringBuffer.append(TEXT_5); - } - if( domainClass.isUsePersist() ) { - stringBuffer.append(TEXT_6); - } - stringBuffer.append(TEXT_7); - stringBuffer.append( domainClass.getName() ); - stringBuffer.append(TEXT_8); - stringBuffer.append( domainClass.getName() ); - stringBuffer.append(TEXT_9); - if( domainClass.isUsePostConstruct() ) { - stringBuffer.append(TEXT_10); - stringBuffer.append( domainClass.getPostConstructMethodName() ); - stringBuffer.append(TEXT_11); - } - stringBuffer.append(TEXT_12); - if( domainClass.isUsePredestroy() ) { - stringBuffer.append(TEXT_13); - stringBuffer.append( domainClass.getPreDestroyMethodName() ); - stringBuffer.append(TEXT_14); - } - stringBuffer.append(TEXT_15); - if( domainClass.isUseFocus() ) { - stringBuffer.append(TEXT_16); - stringBuffer.append( domainClass.getFocusMethodName() ); - stringBuffer.append(TEXT_17); - } - stringBuffer.append(TEXT_18); - if( domainClass.isUsePersist() ) { - stringBuffer.append(TEXT_19); - stringBuffer.append( domainClass.getPersistMethodName() ); - stringBuffer.append(TEXT_20); - } - stringBuffer.append(TEXT_21); - return stringBuffer.toString(); - } -} diff --git a/bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/internal/classes/templates/HandlerTemplate.java b/bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/internal/classes/templates/HandlerTemplate.java deleted file mode 100644 index 711cdd74..00000000 --- a/bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/internal/classes/templates/HandlerTemplate.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.eclipse.e4.tools.internal.classes.templates; - -import org.eclipse.e4.tools.internal.classes.NewHandlerClassWizard.HandlerClass; - -public class HandlerTemplate -{ - protected static String nl; - public static synchronized HandlerTemplate create(String lineSeparator) - { - nl = lineSeparator; - HandlerTemplate result = new HandlerTemplate(); - nl = null; - return result; - } - - public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; - protected final String TEXT_1 = " " + NL + "package "; - protected final String TEXT_2 = ";" + NL + "" + NL + "import org.eclipse.e4.core.di.annotations.Execute;"; - protected final String TEXT_3 = NL + "import org.eclipse.e4.core.di.annotations.CanExecute;"; - protected final String TEXT_4 = NL + NL + "public class "; - protected final String TEXT_5 = " {" + NL + "\t@Execute" + NL + "\tpublic void "; - protected final String TEXT_6 = "() {" + NL + "\t\t//TODO Your code goes here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_7 = NL + "\t" + NL + "\t@CanExecute" + NL + "\tpublic boolean "; - protected final String TEXT_8 = "() {" + NL + "\t\t//TODO Your code goes here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_9 = "\t" + NL + "}"; - - public String generate(Object argument) - { - final StringBuffer stringBuffer = new StringBuffer(); - HandlerClass domainClass = (HandlerClass)argument; - stringBuffer.append(TEXT_1); - stringBuffer.append( domainClass.getPackageFragment().getElementName() ); - stringBuffer.append(TEXT_2); - if( domainClass.isUseCanExecute() ) { - stringBuffer.append(TEXT_3); - } - stringBuffer.append(TEXT_4); - stringBuffer.append( domainClass.getName() ); - stringBuffer.append(TEXT_5); - stringBuffer.append( domainClass.getExecuteMethodName() ); - stringBuffer.append(TEXT_6); - if( domainClass.isUseCanExecute() ) { - stringBuffer.append(TEXT_7); - stringBuffer.append( domainClass.getCanExecuteMethodName() ); - stringBuffer.append(TEXT_8); - } - stringBuffer.append(TEXT_9); - return stringBuffer.toString(); - } -} diff --git a/bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/internal/classes/templates/PartTemplate.java b/bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/internal/classes/templates/PartTemplate.java deleted file mode 100644 index d10a2681..00000000 --- a/bundles/org.eclipse.e4.tools/org/eclipse/e4/tools/internal/classes/templates/PartTemplate.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.eclipse.e4.tools.internal.classes.templates; - -import org.eclipse.e4.tools.internal.classes.NewPartClassWizard.PartClass; - -public class PartTemplate -{ - protected static String nl; - public static synchronized PartTemplate create(String lineSeparator) - { - nl = lineSeparator; - PartTemplate result = new PartTemplate(); - nl = null; - return result; - } - - public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; - protected final String TEXT_1 = " " + NL + "package "; - protected final String TEXT_2 = ";" + NL + "" + NL + "import javax.inject.Inject;"; - protected final String TEXT_3 = NL + "import javax.annotation.PostConstruct;"; - protected final String TEXT_4 = NL + "import javax.annotation.PreDestroy;"; - protected final String TEXT_5 = NL + "import org.eclipse.e4.ui.di.Focus;"; - protected final String TEXT_6 = NL + "import org.eclipse.e4.ui.di.Persist;"; - protected final String TEXT_7 = NL + NL + "public class "; - protected final String TEXT_8 = " {" + NL + "\t@Inject" + NL + "\tpublic "; - protected final String TEXT_9 = "() {" + NL + "\t\t//TODO Your code here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_10 = NL + "\t@PostConstruct" + NL + "\tpublic void "; - protected final String TEXT_11 = "() {" + NL + "\t\t//TODO Your code here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_12 = NL + "\t"; - protected final String TEXT_13 = NL + "\t@PreDestroy" + NL + "\tpublic void "; - protected final String TEXT_14 = "() {" + NL + "\t\t//TODO Your code here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_15 = NL + "\t"; - protected final String TEXT_16 = NL + "\t@Focus" + NL + "\tpublic void "; - protected final String TEXT_17 = "() {" + NL + "\t\t//TODO Your code here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_18 = NL + "\t"; - protected final String TEXT_19 = NL + "\t@Persist" + NL + "\tpublic void "; - protected final String TEXT_20 = "() {" + NL + "\t\t//TODO Your code here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_21 = NL + "}"; - - public String generate(Object argument) - { - final StringBuffer stringBuffer = new StringBuffer(); - PartClass domainClass = (PartClass)argument; - stringBuffer.append(TEXT_1); - stringBuffer.append( domainClass.getPackageFragment().getElementName() ); - stringBuffer.append(TEXT_2); - if( domainClass.isUsePostConstruct() ) { - stringBuffer.append(TEXT_3); - } - if( domainClass.isUsePredestroy() ) { - stringBuffer.append(TEXT_4); - } - if( domainClass.isUseFocus() ) { - stringBuffer.append(TEXT_5); - } - if( domainClass.isUsePersist() ) { - stringBuffer.append(TEXT_6); - } - stringBuffer.append(TEXT_7); - stringBuffer.append( domainClass.getName() ); - stringBuffer.append(TEXT_8); - stringBuffer.append( domainClass.getName() ); - stringBuffer.append(TEXT_9); - if( domainClass.isUsePostConstruct() ) { - stringBuffer.append(TEXT_10); - stringBuffer.append( domainClass.getPostConstructMethodName() ); - stringBuffer.append(TEXT_11); - } - stringBuffer.append(TEXT_12); - if( domainClass.isUsePredestroy() ) { - stringBuffer.append(TEXT_13); - stringBuffer.append( domainClass.getPreDestroyMethodName() ); - stringBuffer.append(TEXT_14); - } - stringBuffer.append(TEXT_15); - if( domainClass.isUseFocus() ) { - stringBuffer.append(TEXT_16); - stringBuffer.append( domainClass.getFocusMethodName() ); - stringBuffer.append(TEXT_17); - } - stringBuffer.append(TEXT_18); - if( domainClass.isUsePersist() ) { - stringBuffer.append(TEXT_19); - stringBuffer.append( domainClass.getPersistMethodName() ); - stringBuffer.append(TEXT_20); - } - stringBuffer.append(TEXT_21); - return stringBuffer.toString(); - } -} diff --git a/bundles/org.eclipse.e4.tools/plugin.xml b/bundles/org.eclipse.e4.tools/plugin.xml deleted file mode 100644 index 4efad6a0..00000000 --- a/bundles/org.eclipse.e4.tools/plugin.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.4"?> -<plugin> - <extension - point="org.eclipse.ui.newWizards"> - <category - id="org.eclipse.e4.tools" - name="%category.name"> - </category> - <category - id="org.eclipse.e4.tools.classes" - name="%category.name.0" - parentCategory="org.eclipse.e4.tools"> - </category> - <category - id="org.eclipse.e4.tools.model" - name="%category.name.1" - parentCategory="org.eclipse.e4.tools"> - </category> - <wizard - category="org.eclipse.e4.tools" - class="org.eclipse.e4.internal.tools.wizards.project.E4NewProjectWizard" - icon="platform:/plugin/org.eclipse.pde.ui/icons/etool16/newpprj_wiz.gif" - id="org.eclipse.e4.tools.E4NewProjectWizard" - name="%wizard.name" - project="true"> - </wizard> - <wizard - category="org.eclipse.e4.tools/org.eclipse.e4.tools.model" - class="org.eclipse.e4.internal.tools.wizards.model.NewApplicationModelWizard" - icon="icons/full/obj16/application_view_tile.png" - id="org.eclipse.e4.tools.newappmodel" - name="%wizard.name.0"> - </wizard> - <wizard - category="org.eclipse.e4.tools/org.eclipse.e4.tools.model" - class="org.eclipse.e4.internal.tools.wizards.model.NewContributionModelWizard" - icon="icons/full/obj16/plugin.png" - id="org.eclipse.e4.tools.newmodelfragment" - name="%wizard.name.1"> - </wizard> - <wizard - category="org.eclipse.e4.tools/org.eclipse.e4.tools.classes" - class="org.eclipse.e4.internal.tools.wizards.classes.NewHandlerClassWizard" - icon="icons/full/obj16/class_obj.gif" - id="org.eclipse.e4.tools.newhandler" - name="%wizard.name.2"> - </wizard> - <wizard - category="org.eclipse.e4.tools/org.eclipse.e4.tools.classes" - class="org.eclipse.e4.internal.tools.wizards.classes.NewPartClassWizard" - icon="icons/full/obj16/Part.gif" - id="org.eclipse.e4.tools.newpart" - name="%wizard.name.3"> - </wizard> - <wizard - category="org.eclipse.e4.tools/org.eclipse.e4.tools.classes" - class="org.eclipse.e4.internal.tools.wizards.classes.NewAddonClassWizard" - icon="icons/full/obj16/Addons.png" - id="org.eclipse.e4.tools.newaddon" - name="%wizard.name.4"> - </wizard> - </extension> - -</plugin> diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/ToolsPlugin.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/ToolsPlugin.java deleted file mode 100644 index 9f80ed6b..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/ToolsPlugin.java +++ /dev/null @@ -1,117 +0,0 @@ -package org.eclipse.e4.internal.tools; - -import java.net.URL; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -public class ToolsPlugin extends AbstractUIPlugin { - // The plug-in ID - public static final String PLUGIN_ID = "org.eclipse.e4.tools"; //$NON-NLS-1$ - - private static ToolsPlugin plugin; - - private ResourceLocator resourceLocator; - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext - * ) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext - * ) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static ToolsPlugin getDefault() { - return plugin; - } - - public ResourceLocator getResourceLocator() { - if (resourceLocator == null) { - resourceLocator = new ResourceLocator() { - - public String getString(String key, Object[] substitutions, - boolean translate) { - return null; - } - - public String getString(String key, Object[] substitutions) { - return null; - } - - public String getString(String key, boolean translate) { - return null; - } - - public String getString(String key) { - return null; - } - - public Object getImage(String key) { - return null; - } - - public URL getBaseURL() { - return null; - } - }; - } - return resourceLocator; - } - - public static void log(IStatus status, int nesting, boolean appendLogger) { - getDefault().getLog().log(status); - } - - /** - * Log Throwable Error - */ - public static void logError(Throwable t) { - logError(t, 0, true); - } - - public static void logError(Throwable t, boolean appendLogger) { - logError(t, 0, appendLogger); - } - - public static void logError(Throwable t, int nesting) { - logError(t, nesting, true); - } - - public static void logError(Throwable t, int nesting, boolean appendLogger) { - log(newStatus(IStatus.ERROR, t.getMessage(), t), nesting, appendLogger); - } - - /** - * Create an IStatus - * - * @return a new IStatus - */ - public static IStatus newStatus(int severity, String message, - Throwable exception) { - return new Status(severity, PLUGIN_ID, 0, message, exception); - } -} diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassPage.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassPage.java deleted file mode 100644 index 91584d66..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassPage.java +++ /dev/null @@ -1,368 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.internal.tools.wizards.classes; - -import java.beans.PropertyChangeListener; -import java.beans.PropertyChangeSupport; - -import org.eclipse.core.databinding.Binding; -import org.eclipse.core.databinding.DataBindingContext; -import org.eclipse.core.databinding.UpdateValueStrategy; -import org.eclipse.core.databinding.beans.BeanProperties; -import org.eclipse.core.databinding.conversion.Converter; -import org.eclipse.core.databinding.validation.IValidator; -import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jdt.core.IJavaElement; -import org.eclipse.jdt.core.IJavaModel; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IPackageFragmentRoot; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.internal.ui.JavaPlugin; -import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; -import org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator; -import org.eclipse.jdt.internal.ui.wizards.TypedViewerFilter; -import org.eclipse.jdt.ui.JavaElementComparator; -import org.eclipse.jdt.ui.JavaElementLabelProvider; -import org.eclipse.jdt.ui.StandardJavaElementContentProvider; -import org.eclipse.jface.databinding.swt.IWidgetValueProperty; -import org.eclipse.jface.databinding.swt.WidgetProperties; -import org.eclipse.jface.databinding.wizard.WizardPageSupport; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.jface.viewers.ViewerFilter; -import org.eclipse.jface.window.Window; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.DisposeEvent; -import org.eclipse.swt.events.DisposeListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.dialogs.ElementListSelectionDialog; -import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; - -public abstract class AbstractNewClassPage extends WizardPage { - public static class JavaClass { - protected PropertyChangeSupport support = new PropertyChangeSupport(this); - - private IPackageFragmentRoot fragmentRoot; - private IPackageFragment packageFragment; - private String name; - - public JavaClass(IPackageFragmentRoot fragmentRoot) { - this.fragmentRoot = fragmentRoot; - } - - public IPackageFragmentRoot getFragmentRoot() { - return fragmentRoot; - } - - public void setFragmentRoot(IPackageFragmentRoot fragmentRoot) { - support.firePropertyChange("fragementRoot", this.fragmentRoot, this.fragmentRoot = fragmentRoot); - } - - public IPackageFragment getPackageFragment() { - return packageFragment; - } - - public void setPackageFragment(IPackageFragment packageFragment) { - support.firePropertyChange("packageFragment", this.packageFragment, this.packageFragment = packageFragment); - } - - public String getName() { - return name; - } - - public void setName(String name) { - support.firePropertyChange("name", this.name, this.name = name); - } - - public void addPropertyChangeListener(PropertyChangeListener listener) { - support.addPropertyChangeListener(listener); - } - - public void removePropertyChangeListener(PropertyChangeListener listener) { - support.removePropertyChangeListener(listener); - } - } - - private JavaClass clazz; - private IPackageFragmentRoot froot; - private IWorkspaceRoot fWorkspaceRoot; - - protected AbstractNewClassPage(String pageName, String title, String description, IPackageFragmentRoot froot, IWorkspaceRoot fWorkspaceRoot) { - super(pageName); - this.froot = froot; - this.fWorkspaceRoot = fWorkspaceRoot; - - setTitle(title); - setDescription(description); - } - - public void createControl(Composite parent) { - final Image img = new Image(parent.getDisplay(), getClass().getClassLoader().getResourceAsStream("/icons/full/wizban/newclass_wiz.png")); - setImageDescriptor(ImageDescriptor.createFromImage(img)); - - parent.addDisposeListener(new DisposeListener() { - - public void widgetDisposed(DisposeEvent e) { - img.dispose(); - setImageDescriptor(null); - } - }); - - parent = new Composite(parent, SWT.NULL); - parent.setLayoutData(new GridData(GridData.FILL_BOTH)); - parent.setLayout(new GridLayout(3, false)); - - clazz = createInstance(); - - DataBindingContext dbc = new DataBindingContext(); - WizardPageSupport.create(this, dbc); - - { - Label l = new Label(parent, SWT.NONE); - l.setText("Source folder"); - - Text t = new Text(parent, SWT.BORDER); - t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - t.setEditable(false); - final Binding bd = dbc.bindValue( - WidgetProperties.text().observe(t), - BeanProperties.value("fragmentRoot").observe(clazz), - new UpdateValueStrategy(), - new UpdateValueStrategy().setConverter(new PackageFragmentRootToStringConverter()) - ); - - Button b = new Button(parent, SWT.PUSH); - b.setText("Browse ..."); - b.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - IPackageFragmentRoot root = choosePackageRoot(); - if( root != null ) { - froot = root; - clazz.setFragmentRoot(root); - } - bd.updateModelToTarget(); //TODO Find out why this is needed - } - }); - } - - { - Label l = new Label(parent, SWT.NONE); - l.setText("Package"); - - Text t = new Text(parent, SWT.BORDER); - t.setEditable(false); - t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - final Binding bd = dbc.bindValue( - WidgetProperties.text().observe(t), - BeanProperties.value("packageFragment").observe(clazz), - new UpdateValueStrategy(), - new UpdateValueStrategy().setConverter(new PackageFragmentToStringConverter()) - ); - - Button b = new Button(parent, SWT.PUSH); - b.setText("Browse ..."); - b.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - IPackageFragment fragment = choosePackage(); - if( fragment != null ) { - clazz.setPackageFragment(fragment); - } - bd.updateModelToTarget(); //TODO Find out why this is needed - } - }); - } - - { - IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify); - - Label l = new Label(parent, SWT.NONE); - l.setText("Name"); - - Text t = new Text(parent, SWT.BORDER); - t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - dbc.bindValue(textProp.observe(t), BeanProperties.value("name", String.class).observe(clazz)); - - new Label(parent, SWT.NONE); - } - - { - Label l = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL); - l.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 3, 1)); - } - - createFields(parent, dbc); - setControl(parent); - } - - private IPackageFragmentRoot choosePackageRoot() { - IJavaElement initElement= clazz.getFragmentRoot(); - Class[] acceptedClasses= new Class[] { IPackageFragmentRoot.class, IJavaProject.class }; - TypedElementSelectionValidator validator= new TypedElementSelectionValidator(acceptedClasses, false) { - public boolean isSelectedValid(Object element) { - try { - if (element instanceof IJavaProject) { - IJavaProject jproject= (IJavaProject)element; - IPath path= jproject.getProject().getFullPath(); - return (jproject.findPackageFragmentRoot(path) != null); - } else if (element instanceof IPackageFragmentRoot) { - return (((IPackageFragmentRoot)element).getKind() == IPackageFragmentRoot.K_SOURCE); - } - return true; - } catch (JavaModelException e) { - JavaPlugin.log(e.getStatus()); // just log, no UI in validation - } - return false; - } - }; - - acceptedClasses= new Class[] { IJavaModel.class, IPackageFragmentRoot.class, IJavaProject.class }; - ViewerFilter filter= new TypedViewerFilter(acceptedClasses) { - public boolean select(Viewer viewer, Object parent, Object element) { - if (element instanceof IPackageFragmentRoot) { - try { - return (((IPackageFragmentRoot)element).getKind() == IPackageFragmentRoot.K_SOURCE); - } catch (JavaModelException e) { - JavaPlugin.log(e.getStatus()); // just log, no UI in validation - return false; - } - } - return super.select(viewer, parent, element); - } - }; - - StandardJavaElementContentProvider provider= new StandardJavaElementContentProvider(); - ILabelProvider labelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT); - ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), labelProvider, provider); - dialog.setValidator(validator); - dialog.setComparator(new JavaElementComparator()); - dialog.setTitle(NewWizardMessages.NewContainerWizardPage_ChooseSourceContainerDialog_title); - dialog.setMessage(NewWizardMessages.NewContainerWizardPage_ChooseSourceContainerDialog_description); - dialog.addFilter(filter); - dialog.setInput(JavaCore.create(fWorkspaceRoot)); - dialog.setInitialSelection(initElement); - dialog.setHelpAvailable(false); - - if (dialog.open() == Window.OK) { - Object element= dialog.getFirstResult(); - if (element instanceof IJavaProject) { - IJavaProject jproject= (IJavaProject)element; - return jproject.getPackageFragmentRoot(jproject.getProject()); - } else if (element instanceof IPackageFragmentRoot) { - return (IPackageFragmentRoot)element; - } - return null; - } - return null; - } - - private IPackageFragment choosePackage() { - IJavaElement[] packages= null; - try { - if (froot != null && froot.exists()) { - packages= froot.getChildren(); - } - } catch (JavaModelException e) { - e.printStackTrace(); - } - if (packages == null) { - packages= new IJavaElement[0]; - } - - ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT)); - dialog.setIgnoreCase(false); - dialog.setTitle("Choose Package"); - dialog.setMessage("Choose a Package"); - dialog.setEmptyListMessage("You need to select a package"); - dialog.setElements(packages); - dialog.setHelpAvailable(false); - - IPackageFragment pack= clazz.getPackageFragment(); - if (pack != null) { - dialog.setInitialSelections(new Object[] { pack }); - } - - if (dialog.open() == Window.OK) { - return (IPackageFragment) dialog.getFirstResult(); - } - return null; - } - - protected abstract void createFields(Composite parent, DataBindingContext dbc); - - protected abstract JavaClass createInstance(); - - public JavaClass getClazz() { - return clazz; - } - - static class ClassnameValidator implements IValidator { - - public IStatus validate(Object value) { - String name = value.toString(); - char[] ar = name.toCharArray(); - for (char c : ar) { - if (!Character.isJavaIdentifierPart(c)) { - return new Status(IStatus.ERROR, "", "'" + c + "' is not allowed in a Class-Name"); - } - } - - if (!Character.isJavaIdentifierStart(ar[0])) { - return new Status(IStatus.ERROR, "", "'" + ar[0] + "' is not allowed as the first character of a Class-Name"); - } - - return Status.OK_STATUS; - } - } - - static class PackageFragmentRootToStringConverter extends Converter { - - public PackageFragmentRootToStringConverter() { - super(IPackageFragmentRoot.class, String.class); - } - - public Object convert(Object fromObject) { - IPackageFragmentRoot f = (IPackageFragmentRoot) fromObject; - return f.getPath().makeRelative().toString(); - } - } - - static class PackageFragmentToStringConverter extends Converter { - - public PackageFragmentToStringConverter() { - super(IPackageFragment.class, String.class); - } - - public Object convert(Object fromObject) { - if( fromObject == null ) { - return ""; - } - IPackageFragment f = (IPackageFragment) fromObject; - return f.getElementName(); - } - } -} diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassWizard.java deleted file mode 100644 index 16974d80..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/AbstractNewClassWizard.java +++ /dev/null @@ -1,148 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.internal.tools.wizards.classes; - -import java.io.ByteArrayInputStream; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.e4.internal.tools.wizards.classes.AbstractNewClassPage.JavaClass; -import org.eclipse.jdt.core.ICompilationUnit; -import org.eclipse.jdt.core.IJavaElement; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IPackageFragmentRoot; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.Wizard; -import org.eclipse.ui.INewWizard; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.ide.IDE; - -public abstract class AbstractNewClassWizard extends Wizard implements INewWizard { - protected IPackageFragmentRoot root; - protected IFile file; - - public void init(IWorkbench workbench, IStructuredSelection selection) { - root = getFragmentRoot(getInitialJavaElement(selection)); - } - - protected IJavaElement getInitialJavaElement(IStructuredSelection selection) { - IJavaElement jelem = null; - if (selection != null && !selection.isEmpty()) { - Object selectedElement = selection.getFirstElement(); - if (selectedElement instanceof IAdaptable) { - IAdaptable adaptable = (IAdaptable) selectedElement; - - jelem = (IJavaElement) adaptable.getAdapter(IJavaElement.class); - if (jelem == null || !jelem.exists()) { - jelem = null; - IResource resource = (IResource) adaptable - .getAdapter(IResource.class); - if (resource != null - && resource.getType() != IResource.ROOT) { - while (jelem == null - && resource.getType() != IResource.PROJECT) { - resource = resource.getParent(); - jelem = (IJavaElement) resource - .getAdapter(IJavaElement.class); - } - if (jelem == null) { - jelem = JavaCore.create(resource); // java project - } - } - } - } - } - - return jelem; - } - - protected IPackageFragmentRoot getFragmentRoot(IJavaElement elem) { - IPackageFragmentRoot initRoot = null; - if (elem != null) { - initRoot = (IPackageFragmentRoot) elem - .getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT); - try { - if (initRoot == null - || initRoot.getKind() != IPackageFragmentRoot.K_SOURCE) { - IJavaProject jproject = elem.getJavaProject(); - if (jproject != null) { - initRoot = null; - if (jproject.exists()) { - IPackageFragmentRoot[] roots = jproject - .getPackageFragmentRoots(); - for (int i = 0; i < roots.length; i++) { - if (roots[i].getKind() == IPackageFragmentRoot.K_SOURCE) { - initRoot = roots[i]; - break; - } - } - } - if (initRoot == null) { - initRoot = jproject.getPackageFragmentRoot(jproject - .getResource()); - } - } - } - } catch (JavaModelException e) { - // TODO - e.printStackTrace(); - } - } - return initRoot; - } - - protected abstract String getContent(); - - public JavaClass getDomainClass() { - return ((AbstractNewClassPage) getPages()[0]).getClazz(); - } - - @Override - public boolean performFinish() { - JavaClass clazz = getDomainClass(); - String content = getContent(); - - IPackageFragment fragment = clazz.getPackageFragment(); - if (fragment != null) { - String cuName = clazz.getName() + ".java"; - ICompilationUnit unit = fragment.getCompilationUnit(cuName); - IResource resource = unit.getResource(); - file = (IFile) resource; - try { - if (!file.exists()) { - file.create(new ByteArrayInputStream(content.getBytes()), - true, null); - } else { - file.setContents(new ByteArrayInputStream(content.getBytes()), - IFile.FORCE | IFile.KEEP_HISTORY, null); - } - IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), file); - unit.open(null); - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - return true; - - } - - public IFile getFile() { - return file; - } -} diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewAddonClassWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewAddonClassWizard.java deleted file mode 100644 index fba02f96..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewAddonClassWizard.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.internal.tools.wizards.classes; - -import org.eclipse.core.databinding.DataBindingContext; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.e4.internal.tools.wizards.classes.templates.AddonTemplate; -import org.eclipse.swt.widgets.Composite; - -public class NewAddonClassWizard extends AbstractNewClassWizard { - @Override - public void addPages() { - addPage(new AbstractNewClassPage("Classinformation", - "New Addon", - "Create a new addon class", root, ResourcesPlugin.getWorkspace().getRoot()) { - - @Override - protected void createFields(Composite parent, - DataBindingContext dbc) { - } - - @Override - protected JavaClass createInstance() { - return new JavaClass(root); - } - - }); - } - - @Override - protected String getContent() { - AddonTemplate template = new AddonTemplate(); - return template.generate(getDomainClass()); - } - -} diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewHandlerClassWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewHandlerClassWizard.java deleted file mode 100644 index 4fc4f479..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewHandlerClassWizard.java +++ /dev/null @@ -1,129 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.internal.tools.wizards.classes; - -import org.eclipse.core.databinding.DataBindingContext; -import org.eclipse.core.databinding.beans.BeanProperties; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.e4.internal.tools.wizards.classes.AbstractNewClassPage.JavaClass; -import org.eclipse.e4.internal.tools.wizards.classes.templates.HandlerTemplate; -import org.eclipse.jdt.core.IPackageFragmentRoot; -import org.eclipse.jface.databinding.swt.IWidgetValueProperty; -import org.eclipse.jface.databinding.swt.WidgetProperties; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Text; - -public class NewHandlerClassWizard extends AbstractNewClassWizard { - @Override - protected String getContent() { - HandlerTemplate template = new HandlerTemplate(); - return template.generate(getDomainClass()); - } - - @Override - public void addPages() { - addPage(new AbstractNewClassPage("Classinformation", - "New Handler", - "Create a new handler class", root, ResourcesPlugin.getWorkspace().getRoot()) { - - @Override - protected JavaClass createInstance() { - return new HandlerClass(root); - } - - @Override - protected void createFields(Composite parent, DataBindingContext dbc) { - IWidgetValueProperty textProp = WidgetProperties - .text(SWT.Modify); - - { - Label l = new Label(parent, SWT.NONE); - l.setText("Execute Method"); - - Text t = new Text(parent, SWT.BORDER); - t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - dbc.bindValue( - textProp.observe(t), - BeanProperties.value("executeMethodName").observe( - getClazz())); - - l = new Label(parent, SWT.NONE); - } - - { - Label l = new Label(parent, SWT.NONE); - l.setText("Can-Execute Method"); - - Text t = new Text(parent, SWT.BORDER); - t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - dbc.bindValue(textProp.observe(t), - BeanProperties.value("canExecuteMethodName") - .observe(getClazz())); - dbc.bindValue( - WidgetProperties.enabled().observe(t), - BeanProperties.value("useCanExecute").observe( - getClazz())); - - Button b = new Button(parent, SWT.CHECK); - dbc.bindValue( - WidgetProperties.selection().observe(b), - BeanProperties.value("useCanExecute").observe( - getClazz())); - } - } - }); - } - - - - public static class HandlerClass extends JavaClass { - private String executeMethodName = "execute"; - private String canExecuteMethodName = "canExecute"; - private boolean useCanExecute = false; - - public HandlerClass(IPackageFragmentRoot root) { - super(root); - } - - public String getExecuteMethodName() { - return executeMethodName; - } - - public void setExecuteMethodName(String executeMethodName) { - support.firePropertyChange("executeMethodName", - this.executeMethodName, - this.executeMethodName = executeMethodName); - } - - public String getCanExecuteMethodName() { - return canExecuteMethodName; - } - - public void setCanExecuteMethodName(String canExecuteMethodName) { - support.firePropertyChange("canExecuteMethodName", - this.canExecuteMethodName, - this.canExecuteMethodName = canExecuteMethodName); - } - - public boolean isUseCanExecute() { - return useCanExecute; - } - - public void setUseCanExecute(boolean useCanExecute) { - support.firePropertyChange("useCanExecute", this.useCanExecute, - this.useCanExecute = useCanExecute); - } - } -} diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewPartClassWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewPartClassWizard.java deleted file mode 100644 index d33ffbdc..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/NewPartClassWizard.java +++ /dev/null @@ -1,247 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.internal.tools.wizards.classes; - -import java.beans.PropertyChangeListener; -import java.beans.PropertyChangeSupport; - -import org.eclipse.core.databinding.DataBindingContext; -import org.eclipse.core.databinding.beans.BeanProperties; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.e4.internal.tools.wizards.classes.AbstractNewClassPage.JavaClass; -import org.eclipse.e4.internal.tools.wizards.classes.templates.PartTemplate; -import org.eclipse.jdt.core.IPackageFragmentRoot; -import org.eclipse.jface.databinding.swt.IWidgetValueProperty; -import org.eclipse.jface.databinding.swt.WidgetProperties; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Text; - -public class NewPartClassWizard extends AbstractNewClassWizard { - - @Override - public void addPages() { - addPage(new AbstractNewClassPage("Classinformation", "New Part", - "Create a new part class", root, ResourcesPlugin.getWorkspace() - .getRoot()) { - - @Override - protected void createFields(Composite parent, DataBindingContext dbc) { - IWidgetValueProperty textProp = WidgetProperties - .text(SWT.Modify); - IWidgetValueProperty enabledProp = WidgetProperties.enabled(); - - { - Label l = new Label(parent, SWT.NONE); - l.setText("PostContruct Method"); - - Text t = new Text(parent, SWT.BORDER); - t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - dbc.bindValue(textProp.observe(t), - BeanProperties.value("postConstructMethodName") - .observe(getClazz())); - dbc.bindValue( - enabledProp.observe(t), - BeanProperties.value("usePostConstruct").observe( - getClazz())); - - Button b = new Button(parent, SWT.CHECK); - dbc.bindValue( - WidgetProperties.selection().observe(b), - BeanProperties.value("usePostConstruct").observe( - getClazz())); - } - - { - Label l = new Label(parent, SWT.NONE); - l.setText("Predestroy Method"); - - Text t = new Text(parent, SWT.BORDER); - t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - dbc.bindValue(textProp.observe(t), - BeanProperties.value("preDestroyMethodName") - .observe(getClazz())); - dbc.bindValue( - enabledProp.observe(t), - BeanProperties.value("usePredestroy").observe( - getClazz())); - - Button b = new Button(parent, SWT.CHECK); - dbc.bindValue( - WidgetProperties.selection().observe(b), - BeanProperties.value("usePredestroy").observe( - getClazz())); - } - - { - Label l = new Label(parent, SWT.NONE); - l.setText("Focus Method"); - - Text t = new Text(parent, SWT.BORDER); - t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - dbc.bindValue(textProp.observe(t), - BeanProperties.value("focusMethodName") - .observe(getClazz())); - dbc.bindValue( - enabledProp.observe(t), - BeanProperties.value("useFocus").observe( - getClazz())); - - Button b = new Button(parent, SWT.CHECK); - dbc.bindValue( - WidgetProperties.selection().observe(b), - BeanProperties.value("useFocus").observe( - getClazz())); - } - - { - Label l = new Label(parent, SWT.NONE); - l.setText("Persist Method"); - - Text t = new Text(parent, SWT.BORDER); - t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - dbc.bindValue(textProp.observe(t), - BeanProperties.value("persistMethodName") - .observe(getClazz())); - dbc.bindValue( - enabledProp.observe(t), - BeanProperties.value("usePersist").observe( - getClazz())); - - Button b = new Button(parent, SWT.CHECK); - dbc.bindValue( - WidgetProperties.selection().observe(b), - BeanProperties.value("usePersist").observe( - getClazz())); - } - } - - @Override - protected JavaClass createInstance() { - return new PartClass(root); - } - - }); - } - - @Override - protected String getContent() { - PartTemplate template = new PartTemplate(); - return template.generate(getDomainClass()); - } - - public static class PartClass extends JavaClass { - private PropertyChangeSupport support = new PropertyChangeSupport(this); - - private boolean usePostConstruct; - private String postConstructMethodName = "postConstruct"; - - private boolean usePredestroy; - private String preDestroyMethodName = "preDestroy"; - - private boolean useFocus = true; - private String focusMethodName = "onFocus"; - - private boolean usePersist; - private String persistMethodName = "save"; - - public PartClass(IPackageFragmentRoot fragmentRoot) { - super(fragmentRoot); - } - - public void addPropertyChangeListener(PropertyChangeListener listener) { - support.addPropertyChangeListener(listener); - } - - public void removePropertyChangeListener(PropertyChangeListener listener) { - support.removePropertyChangeListener(listener); - } - - public boolean isUsePostConstruct() { - return usePostConstruct; - } - - public void setUsePostConstruct(boolean usePostConstruct) { - support.firePropertyChange("usePostConstruct", - this.usePostConstruct, - this.usePostConstruct = usePostConstruct); - } - - public String getPostConstructMethodName() { - return postConstructMethodName; - } - - public void setPostConstructMethodName(String postConstructMethodName) { - support.firePropertyChange("postConstructMethodName", - this.postConstructMethodName, - this.postConstructMethodName = postConstructMethodName); - } - - public boolean isUsePredestroy() { - return usePredestroy; - } - - public void setUsePredestroy(boolean usePredestroy) { - support.firePropertyChange("usePredestroy", this.usePredestroy, - this.usePredestroy = usePredestroy); - } - - public String getPreDestroyMethodName() { - return preDestroyMethodName; - } - - public void setPreDestroyMethodName(String preDestroyMethodName) { - support.firePropertyChange("preDestroyMethodName", - this.preDestroyMethodName, - this.preDestroyMethodName = preDestroyMethodName); - } - - public boolean isUseFocus() { - return useFocus; - } - - public void setUseFocus(boolean useFocus) { - support.firePropertyChange("useFocus", this.useFocus, - this.useFocus = useFocus); - } - - public String getFocusMethodName() { - return focusMethodName; - } - - public void setFocusMethodName(String focusMethodName) { - support.firePropertyChange("focusMethodName", this.focusMethodName, - this.focusMethodName = focusMethodName); - } - - public boolean isUsePersist() { - return usePersist; - } - - public void setUsePersist(boolean usePersist) { - support.firePropertyChange("usePersist", this.usePersist, - this.usePersist = usePersist); - } - - public String getPersistMethodName() { - return persistMethodName; - } - - public void setPersistMethodName(String persistMethodName) { - support.firePropertyChange("persistMethodName", - this.persistMethodName, - this.persistMethodName = persistMethodName); - } - } -} diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/templates/AddonTemplate.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/templates/AddonTemplate.java deleted file mode 100644 index 52be770c..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/templates/AddonTemplate.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.eclipse.e4.internal.tools.wizards.classes.templates; - -import org.eclipse.e4.internal.tools.wizards.classes.AbstractNewClassPage.JavaClass; - -public class AddonTemplate -{ - protected static String nl; - public static synchronized AddonTemplate create(String lineSeparator) - { - nl = lineSeparator; - AddonTemplate result = new AddonTemplate(); - nl = null; - return result; - } - - public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; - protected final String TEXT_1 = " " + NL + "package "; - protected final String TEXT_2 = ";" + NL + "" + NL + "import javax.inject.Inject;" + NL + "import javax.annotation.PostConstruct;" + NL + "import javax.annotation.PreDestroy;" + NL + "" + NL + "import org.eclipse.e4.core.services.events.IEventBroker;" + NL + "" + NL + "public class "; - protected final String TEXT_3 = " {" + NL + "\t@Inject" + NL + "\tIEventBroker eventBroker;" + NL + "\t" + NL + "\t@PostConstruct" + NL + "\tvoid hookListeners() {" + NL + "\t\t// Hook event listeners" + NL + "\t}" + NL + "\t" + NL + "\t@PreDestroy" + NL + "\tvoid unhookListeners() {" + NL + "\t\t// Unhook event listeners" + NL + "\t}" + NL + "}"; - - public String generate(Object argument) - { - final StringBuffer stringBuffer = new StringBuffer(); - JavaClass domainClass = (JavaClass)argument; - stringBuffer.append(TEXT_1); - stringBuffer.append( domainClass.getPackageFragment().getElementName() ); - stringBuffer.append(TEXT_2); - stringBuffer.append( domainClass.getName() ); - stringBuffer.append(TEXT_3); - return stringBuffer.toString(); - } -} diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/templates/HandlerTemplate.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/templates/HandlerTemplate.java deleted file mode 100644 index 70ec397a..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/templates/HandlerTemplate.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.eclipse.e4.internal.tools.wizards.classes.templates; - -import org.eclipse.e4.internal.tools.wizards.classes.NewHandlerClassWizard.HandlerClass; - -public class HandlerTemplate -{ - protected static String nl; - public static synchronized HandlerTemplate create(String lineSeparator) - { - nl = lineSeparator; - HandlerTemplate result = new HandlerTemplate(); - nl = null; - return result; - } - - public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; - protected final String TEXT_1 = " " + NL + "package "; - protected final String TEXT_2 = ";" + NL + "" + NL + "import org.eclipse.e4.core.di.annotations.Execute;"; - protected final String TEXT_3 = NL + "import org.eclipse.e4.core.di.annotations.CanExecute;"; - protected final String TEXT_4 = NL + NL + "public class "; - protected final String TEXT_5 = " {" + NL + "\t@Execute" + NL + "\tpublic void "; - protected final String TEXT_6 = "() {" + NL + "\t\t//TODO Your code goes here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_7 = NL + "\t" + NL + "\t@CanExecute" + NL + "\tpublic boolean "; - protected final String TEXT_8 = "() {" + NL + "\t\t//TODO Your code goes here" + NL + "\t\treturn true;" + NL + "\t}" + NL + "\t"; - protected final String TEXT_9 = "\t" + NL + "}"; - - public String generate(Object argument) - { - final StringBuffer stringBuffer = new StringBuffer(); - HandlerClass domainClass = (HandlerClass)argument; - stringBuffer.append(TEXT_1); - stringBuffer.append( domainClass.getPackageFragment().getElementName() ); - stringBuffer.append(TEXT_2); - if( domainClass.isUseCanExecute() ) { - stringBuffer.append(TEXT_3); - } - stringBuffer.append(TEXT_4); - stringBuffer.append( domainClass.getName() ); - stringBuffer.append(TEXT_5); - stringBuffer.append( domainClass.getExecuteMethodName() ); - stringBuffer.append(TEXT_6); - if( domainClass.isUseCanExecute() ) { - stringBuffer.append(TEXT_7); - stringBuffer.append( domainClass.getCanExecuteMethodName() ); - stringBuffer.append(TEXT_8); - } - stringBuffer.append(TEXT_9); - return stringBuffer.toString(); - } -} diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/templates/PartTemplate.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/templates/PartTemplate.java deleted file mode 100644 index 7180c498..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/classes/templates/PartTemplate.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.eclipse.e4.internal.tools.wizards.classes.templates; - -import org.eclipse.e4.internal.tools.wizards.classes.NewPartClassWizard.PartClass; - -public class PartTemplate -{ - protected static String nl; - public static synchronized PartTemplate create(String lineSeparator) - { - nl = lineSeparator; - PartTemplate result = new PartTemplate(); - nl = null; - return result; - } - - public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; - protected final String TEXT_1 = " " + NL + "package "; - protected final String TEXT_2 = ";" + NL + "" + NL + "import javax.inject.Inject;"; - protected final String TEXT_3 = NL + "import javax.annotation.PostConstruct;"; - protected final String TEXT_4 = NL + "import javax.annotation.PreDestroy;"; - protected final String TEXT_5 = NL + "import org.eclipse.e4.ui.di.Focus;"; - protected final String TEXT_6 = NL + "import org.eclipse.e4.ui.di.Persist;"; - protected final String TEXT_7 = NL + NL + "public class "; - protected final String TEXT_8 = " {" + NL + "\t@Inject" + NL + "\tpublic "; - protected final String TEXT_9 = "() {" + NL + "\t\t//TODO Your code here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_10 = NL + "\t@PostConstruct" + NL + "\tpublic void "; - protected final String TEXT_11 = "() {" + NL + "\t\t//TODO Your code here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_12 = NL + "\t"; - protected final String TEXT_13 = NL + "\t@PreDestroy" + NL + "\tpublic void "; - protected final String TEXT_14 = "() {" + NL + "\t\t//TODO Your code here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_15 = NL + "\t"; - protected final String TEXT_16 = NL + "\t@Focus" + NL + "\tpublic void "; - protected final String TEXT_17 = "() {" + NL + "\t\t//TODO Your code here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_18 = NL + "\t"; - protected final String TEXT_19 = NL + "\t@Persist" + NL + "\tpublic void "; - protected final String TEXT_20 = "() {" + NL + "\t\t//TODO Your code here" + NL + "\t}" + NL + "\t"; - protected final String TEXT_21 = NL + "}"; - - public String generate(Object argument) - { - final StringBuffer stringBuffer = new StringBuffer(); - PartClass domainClass = (PartClass)argument; - stringBuffer.append(TEXT_1); - stringBuffer.append( domainClass.getPackageFragment().getElementName() ); - stringBuffer.append(TEXT_2); - if( domainClass.isUsePostConstruct() ) { - stringBuffer.append(TEXT_3); - } - if( domainClass.isUsePredestroy() ) { - stringBuffer.append(TEXT_4); - } - if( domainClass.isUseFocus() ) { - stringBuffer.append(TEXT_5); - } - if( domainClass.isUsePersist() ) { - stringBuffer.append(TEXT_6); - } - stringBuffer.append(TEXT_7); - stringBuffer.append( domainClass.getName() ); - stringBuffer.append(TEXT_8); - stringBuffer.append( domainClass.getName() ); - stringBuffer.append(TEXT_9); - if( domainClass.isUsePostConstruct() ) { - stringBuffer.append(TEXT_10); - stringBuffer.append( domainClass.getPostConstructMethodName() ); - stringBuffer.append(TEXT_11); - } - stringBuffer.append(TEXT_12); - if( domainClass.isUsePredestroy() ) { - stringBuffer.append(TEXT_13); - stringBuffer.append( domainClass.getPreDestroyMethodName() ); - stringBuffer.append(TEXT_14); - } - stringBuffer.append(TEXT_15); - if( domainClass.isUseFocus() ) { - stringBuffer.append(TEXT_16); - stringBuffer.append( domainClass.getFocusMethodName() ); - stringBuffer.append(TEXT_17); - } - stringBuffer.append(TEXT_18); - if( domainClass.isUsePersist() ) { - stringBuffer.append(TEXT_19); - stringBuffer.append( domainClass.getPersistMethodName() ); - stringBuffer.append(TEXT_20); - } - stringBuffer.append(TEXT_21); - return stringBuffer.toString(); - } -} diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/BaseApplicationModelWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/BaseApplicationModelWizard.java deleted file mode 100644 index d6b56991..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/BaseApplicationModelWizard.java +++ /dev/null @@ -1,193 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.internal.tools.wizards.model; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.core.resources.IContainer; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Status; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.wizard.Wizard; -import org.eclipse.ui.INewWizard; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.IWorkbenchWizard; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.actions.WorkspaceModifyOperation; -import org.eclipse.ui.part.FileEditorInput; -import org.eclipse.ui.part.ISetSelectionTarget; - -public abstract class BaseApplicationModelWizard extends Wizard implements INewWizard { - private NewModelFilePage page; - private ISelection selection; - - protected IWorkbench workbench; - - /** - * Constructor for NewApplicationModelWizard. - */ - public BaseApplicationModelWizard() { - super(); - setNeedsProgressMonitor(true); - } - - /** - * Adding the page to the wizard. - */ - - public void addPages() { - page = new NewModelFilePage(selection,getDefaultFileName()); - addPage(page); - } - - public abstract String getDefaultFileName(); - - @Override - public boolean performFinish() { - try { - // Remember the file. - // - final IFile modelFile = getModelFile(); - - if( modelFile.exists() ) { - if( ! MessageDialog.openQuestion(getShell(), "File exists", "The file already exists. Would you like to overwrite?")) { - return false; - } - } - - // Do the work within an operation. - // - WorkspaceModifyOperation operation = - new WorkspaceModifyOperation() { - @Override - protected void execute(IProgressMonitor progressMonitor) { - try { - // Create a resource set - // - ResourceSet resourceSet = new ResourceSetImpl(); - - // Get the URI of the model file. - // - URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true); - - // Create a resource for this file. - // - Resource resource = resourceSet.createResource(fileURI); - - // Add the initial model object to the contents. - // - EObject rootObject = createInitialModel(); - if (rootObject != null) { - resource.getContents().add(rootObject); - } - - // Save the contents of the resource to the file system. - // - Map<Object, Object> options = new HashMap<Object, Object>(); - resource.save(options); - } - catch (Exception exception) { - throw new RuntimeException(exception); - } - finally { - progressMonitor.done(); - } - } - }; - - getContainer().run(false, false, operation); - - // Select the new file resource in the current view. - // - IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); - IWorkbenchPage page = workbenchWindow.getActivePage(); - final IWorkbenchPart activePart = page.getActivePart(); - if (activePart instanceof ISetSelectionTarget) { - final ISelection targetSelection = new StructuredSelection(modelFile); - getShell().getDisplay().asyncExec - (new Runnable() { - public void run() { - ((ISetSelectionTarget)activePart).selectReveal(targetSelection); - } - }); - } - - // Open an editor on the new file. - // - try { - page.openEditor - (new FileEditorInput(modelFile), - workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId()); - } - catch (PartInitException exception) { - MessageDialog.openError(workbenchWindow.getShell(), "Could not init editor", exception.getMessage()); //$NON-NLS-1$ - return false; - } - - return true; - } - catch (Exception exception) { - MessageDialog.openError(getShell(), "Error", exception.getMessage()); - return false; - } - } - - protected abstract EObject createInitialModel(); - - protected IFile getModelFile() throws CoreException { - String containerName = page.getContainerName(); - String fileName = page.getFileName(); - IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); - IResource resource = root.findMember(new Path(containerName)); - if (!resource.exists() || !(resource instanceof IContainer)) { - throwCoreException("Container \"" + containerName - + "\" does not exist."); - } - IContainer container = (IContainer) resource; - return container.getFile(new Path(fileName)); - } - - private void throwCoreException(String message) throws CoreException { - IStatus status = new Status(IStatus.ERROR, - "org.eclipse.e4.tools.emf.editor3x", IStatus.OK, message, null); - throw new CoreException(status); - } - - /** - * We will accept the selection in the workbench to see if we can initialize - * from it. - * - * @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection) - */ - public void init(IWorkbench workbench, IStructuredSelection selection) { - this.workbench = workbench; - this.selection = selection; - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewApplicationModelWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewApplicationModelWizard.java deleted file mode 100644 index 7b625052..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewApplicationModelWizard.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.internal.tools.wizards.model; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.e4.ui.model.application.MApplication; -import org.eclipse.e4.ui.model.application.MApplicationFactory; -import org.eclipse.emf.ecore.EObject; - - -public class NewApplicationModelWizard extends BaseApplicationModelWizard { - - @Override - public String getDefaultFileName() { - return "Application.e4xmi"; - } - - protected EObject createInitialModel() { - MApplication application = MApplicationFactory.INSTANCE.createApplication(); - try { - application.setElementId(getModelFile().getProject().getName() + ".application"); - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return (EObject) application; - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewContributionModelWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewContributionModelWizard.java deleted file mode 100644 index 04d252f6..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewContributionModelWizard.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.internal.tools.wizards.model; - -import org.eclipse.e4.ui.model.fragment.MFragmentFactory; -import org.eclipse.emf.ecore.EObject; - - -public class NewContributionModelWizard extends BaseApplicationModelWizard { - - @Override - public String getDefaultFileName() { - return "fragment.e4xmi"; - } - - protected EObject createInitialModel() { - return (EObject) MFragmentFactory.INSTANCE.createModelFragments(); - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewModelFilePage.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewModelFilePage.java deleted file mode 100644 index 4cb85960..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/model/NewModelFilePage.java +++ /dev/null @@ -1,199 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 BestSolution.at 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - ******************************************************************************/ -package org.eclipse.e4.internal.tools.wizards.model; - -import org.eclipse.core.resources.IContainer; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.Path; -import org.eclipse.jface.dialogs.IDialogPage; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.dialogs.ContainerSelectionDialog; - -/** - * The "New" wizard page allows setting the container for the new file as well - * as the file name. The page will only accept file name without the extension - * OR with the extension that matches the expected one (e4xmi). - */ - -public class NewModelFilePage extends WizardPage { - private Text containerText; - - private Text fileText; - - private ISelection selection; - - private String defaultFilename; - - /** - * Constructor for SampleNewWizardPage. - * - * @param pageName - */ - public NewModelFilePage(ISelection selection, String defaultFilename) { - super("wizardPage"); - setTitle("New application model"); - setDescription("This wizard creates a new e4 application model"); - this.selection = selection; - this.defaultFilename = defaultFilename; - } - - /** - * @see IDialogPage#createControl(Composite) - */ - public void createControl(Composite parent) { - Composite container = new Composite(parent, SWT.NULL); - GridLayout layout = new GridLayout(); - container.setLayout(layout); - layout.numColumns = 3; - layout.verticalSpacing = 9; - Label label = new Label(container, SWT.NULL); - label.setText("&Container:"); - - containerText = new Text(container, SWT.BORDER | SWT.SINGLE); - GridData gd = new GridData(GridData.FILL_HORIZONTAL); - containerText.setLayoutData(gd); - containerText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - dialogChanged(); - } - }); - - Button button = new Button(container, SWT.PUSH); - button.setText("Browse..."); - button.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - handleBrowse(); - } - }); - label = new Label(container, SWT.NULL); - label.setText("&File name:"); - - fileText = new Text(container, SWT.BORDER | SWT.SINGLE); - gd = new GridData(GridData.FILL_HORIZONTAL); - fileText.setLayoutData(gd); - fileText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - dialogChanged(); - } - }); - initialize(); - dialogChanged(); - setControl(container); - } - - /** - * Tests if the current workbench selection is a suitable container to use. - */ - - private void initialize() { - if (selection != null && selection.isEmpty() == false - && selection instanceof IStructuredSelection) { - IStructuredSelection ssel = (IStructuredSelection) selection; - if (ssel.size() > 1) - return; - Object obj = ssel.getFirstElement(); - if (obj instanceof IResource) { - IContainer container; - if (obj instanceof IContainer) - container = (IContainer) obj; - else - container = ((IResource) obj).getParent(); - containerText.setText(container.getFullPath().toString()); - } - } - fileText.setText(defaultFilename); - } - - /** - * Uses the standard container selection dialog to choose the new value for - * the container field. - */ - - private void handleBrowse() { - ContainerSelectionDialog dialog = new ContainerSelectionDialog( - getShell(), ResourcesPlugin.getWorkspace().getRoot(), false, - "Select new file container"); - if (dialog.open() == ContainerSelectionDialog.OK) { - Object[] result = dialog.getResult(); - if (result.length == 1) { - containerText.setText(((Path) result[0]).toString()); - } - } - } - - /** - * Ensures that both text fields are set. - */ - - private void dialogChanged() { - IResource container = ResourcesPlugin.getWorkspace().getRoot() - .findMember(new Path(getContainerName())); - String fileName = getFileName(); - - if (getContainerName().length() == 0) { - updateStatus("File container must be specified"); - return; - } - if (container == null - || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) { - updateStatus("File container must exist"); - return; - } - if (!container.isAccessible()) { - updateStatus("Project must be writable"); - return; - } - if (fileName.length() == 0) { - updateStatus("File name must be specified"); - return; - } - if (fileName.replace('\\', '/').indexOf('/', 1) > 0) { - updateStatus("File name must be valid"); - return; - } - int dotLoc = fileName.lastIndexOf('.'); - if (dotLoc != -1) { - String ext = fileName.substring(dotLoc + 1); - if (ext.equalsIgnoreCase("e4xmi") == false) { - updateStatus("File extension must be \"e4xmi\""); - return; - } - } - updateStatus(null); - } - - private void updateStatus(String message) { - setErrorMessage(message); - setPageComplete(message == null); - } - - public String getContainerName() { - return containerText.getText(); - } - - public String getFileName() { - return fileText.getText(); - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java deleted file mode 100644 index 85a29bf6..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java +++ /dev/null @@ -1,606 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2010 Soyatec(http://www.soyatec.com) 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: - * Soyatec - initial API and implementation - *******************************************************************************/ -package org.eclipse.e4.internal.tools.wizards.project; - -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.net.URL; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.eclipse.core.resources.IContainer; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.Platform; -import org.eclipse.e4.ui.model.application.MApplication; -import org.eclipse.e4.ui.model.application.MApplicationFactory; -import org.eclipse.e4.ui.model.application.commands.MBindingContext; -import org.eclipse.e4.ui.model.application.commands.MBindingTable; -import org.eclipse.e4.ui.model.application.commands.MCommand; -import org.eclipse.e4.ui.model.application.commands.MCommandsFactory; -import org.eclipse.e4.ui.model.application.commands.MHandler; -import org.eclipse.e4.ui.model.application.commands.MKeyBinding; -import org.eclipse.e4.ui.model.application.ui.advanced.MAdvancedFactory; -import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective; -import org.eclipse.e4.ui.model.application.ui.advanced.MPerspectiveStack; -import org.eclipse.e4.ui.model.application.ui.basic.MBasicFactory; -import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainer; -import org.eclipse.e4.ui.model.application.ui.basic.MPartStack; -import org.eclipse.e4.ui.model.application.ui.basic.MTrimBar; -import org.eclipse.e4.ui.model.application.ui.basic.MTrimmedWindow; -import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem; -import org.eclipse.e4.ui.model.application.ui.menu.MHandledToolItem; -import org.eclipse.e4.ui.model.application.ui.menu.MMenu; -import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory; -import org.eclipse.e4.ui.model.application.ui.menu.MToolBar; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.emf.ecore.xmi.XMLResource; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IPackageFragmentRoot; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jface.dialogs.IDialogSettings; -import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.pde.core.plugin.IPluginBase; -import org.eclipse.pde.core.plugin.IPluginElement; -import org.eclipse.pde.core.plugin.IPluginExtension; -import org.eclipse.pde.core.plugin.IPluginImport; -import org.eclipse.pde.internal.core.ICoreConstants; -import org.eclipse.pde.internal.core.bundle.WorkspaceBundlePluginModel; -import org.eclipse.pde.internal.core.plugin.WorkspacePluginModelBase; -import org.eclipse.pde.internal.ui.PDEPlugin; -import org.eclipse.pde.internal.ui.PDEUIMessages; -import org.eclipse.pde.internal.ui.wizards.IProjectProvider; -import org.eclipse.pde.internal.ui.wizards.plugin.NewPluginProjectWizard; -import org.eclipse.pde.internal.ui.wizards.plugin.NewProjectCreationOperation; -import org.eclipse.pde.internal.ui.wizards.plugin.PluginFieldData; -import org.eclipse.ui.IWorkingSet; -import org.osgi.framework.Bundle; -import org.osgi.framework.Version; - -/** - * @author jin.liu (jin.liu@soyatec.com) - */ -public class E4NewProjectWizard extends NewPluginProjectWizard { - - private PluginFieldData fPluginData; - private NewApplicationWizardPage fApplicationPage; - private IProjectProvider fProjectProvider; - private PluginContentPage fContentPage; - - public E4NewProjectWizard() { - fPluginData = new PluginFieldData(); - } - - public void addPages() { - fMainPage = new E4NewProjectWizardPage( - "main", fPluginData, false, getSelection()); //$NON-NLS-1$ - fMainPage.setTitle(PDEUIMessages.NewProjectWizard_MainPage_title); - fMainPage.setDescription(PDEUIMessages.NewProjectWizard_MainPage_desc); - String pname = getDefaultValue(DEF_PROJECT_NAME); - if (pname != null) - fMainPage.setInitialProjectName(pname); - addPage(fMainPage); - - fProjectProvider = new IProjectProvider() { - public String getProjectName() { - return fMainPage.getProjectName(); - } - - public IProject getProject() { - return fMainPage.getProjectHandle(); - } - - public IPath getLocationPath() { - return fMainPage.getLocationPath(); - } - }; - - fContentPage = new PluginContentPage( - "page2", fProjectProvider, fMainPage, fPluginData); //$NON-NLS-1$ - - fApplicationPage = new NewApplicationWizardPage(fProjectProvider); - - addPage(fContentPage); - addPage(fApplicationPage); - } - - @SuppressWarnings("restriction") - public boolean performFinish() { - try { - fMainPage.updateData(); - fContentPage.updateData(); - IDialogSettings settings = getDialogSettings(); - if (settings != null) { - fMainPage.saveSettings(settings); - fContentPage.saveSettings(settings); - } - getContainer().run( - false, - true, - new NewProjectCreationOperation(fPluginData, - fProjectProvider, null) { - private WorkspacePluginModelBase model; - - @Override - protected void adjustManifests( - IProgressMonitor monitor, IProject project, - IPluginBase bundle) throws CoreException { - super.adjustManifests(monitor, project, bundle); - IPluginBase pluginBase = model.getPluginBase(); - String[] dependencyId = new String[] { - "javax.inject", - "org.eclipse.core.resources", - "org.eclipse.core.runtime", - "org.eclipse.swt", - "org.eclipse.core.databinding", - "org.eclipse.core.databinding.beans", - "org.eclipse.jface", - "org.eclipse.jface.databinding", - "org.eclipse.e4.ui.services", - "org.eclipse.e4.ui.workbench", - "org.eclipse.e4.core.services", - "org.eclipse.e4.core.di", - "org.eclipse.e4.core.contexts", - "org.eclipse.e4.ui.workbench.swt", - "org.eclipse.core.databinding.property", - "org.eclipse.e4.ui.css.core", - "org.w3c.css.sac", - "org.eclipse.e4.core.commands", - "org.eclipse.e4.ui.bindings" }; - for (String id : dependencyId) { - Bundle dependency = Platform.getBundle(id); - - IPluginImport iimport = model - .getPluginFactory().createImport(); - iimport.setId(id); - Version version = dependency.getVersion(); - String versionString = version.getMajor() + "." - + version.getMinor() + "." - + version.getMicro(); - iimport.setVersion(versionString); - pluginBase.add(iimport); - } - } - - @Override - protected void setPluginLibraries( - WorkspacePluginModelBase model) - throws CoreException { - this.model = model; - super.setPluginLibraries(model); - } - }); - - IWorkingSet[] workingSets = fMainPage.getSelectedWorkingSets(); - if (workingSets.length > 0) - getWorkbench().getWorkingSetManager().addToWorkingSets( - fProjectProvider.getProject(), workingSets); - - this.createProductsExtension(fProjectProvider.getProject()); - - this.createApplicationResources(fProjectProvider.getProject(), - new NullProgressMonitor()); - - return true; - } catch (InvocationTargetException e) { - PDEPlugin.logException(e); - } catch (InterruptedException e) { - } - return false; - } - - /** - * create products extension detail - * - * @param project - */ - @SuppressWarnings("restriction") - public void createProductsExtension(IProject project) { - Map<String, String> map = fApplicationPage.getData(); - if (map == null - || map.get(NewApplicationWizardPage.PRODUCT_NAME) == null) - return; - - WorkspacePluginModelBase fmodel = new WorkspaceBundlePluginModel( - project.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR), - project.getFile(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR)); - IPluginExtension extension = fmodel.getFactory().createExtension(); - try { - String productName = map.get(NewApplicationWizardPage.PRODUCT_NAME); - String applicationName = map - .get(NewApplicationWizardPage.APPLICATION); - - String xmiPath = map - .get(NewApplicationWizardPage.APPLICATION_XMI_PROPERTY); - if (xmiPath != null) { - xmiPath = productName + "/" + xmiPath; - map.put(NewApplicationWizardPage.APPLICATION_XMI_PROPERTY, - xmiPath); - } - String cssValue = map - .get(NewApplicationWizardPage.APPLICATION_CSS_PROPERTY); - if (cssValue != null) { - cssValue = "platform:/plugin/" + productName + "/" + cssValue; - map.put(NewApplicationWizardPage.APPLICATION_CSS_PROPERTY, - cssValue); - } - - extension.setPoint("org.eclipse.core.runtime.products"); - extension.setId("product"); - IPluginElement productElement = fmodel.getFactory().createElement( - extension); - - productElement.setName("product"); - if (applicationName != null) { - productElement.setAttribute("application", applicationName); - } else { - productElement.setAttribute("application", - NewApplicationWizardPage.E4_APPLICATION); - } - productElement.setAttribute("name", productName); - - Set<Entry<String, String>> set = map.entrySet(); - if (set != null) { - Iterator<Entry<String, String>> it = set.iterator(); - if (it != null) { - while (it.hasNext()) { - Entry<String, String> entry = it.next(); - String value = entry.getValue(); - if (value == null || value.trim().length() == 0) { - continue; - } - - if (entry.getKey().equals( - NewApplicationWizardPage.PRODUCT_NAME) - || entry.getKey().equals( - NewApplicationWizardPage.APPLICATION)) { - continue; - } - IPluginElement element = fmodel.getFactory() - .createElement(productElement); - element.setName("property"); - element.setAttribute("name", entry.getKey()); - element.setAttribute("value", value); - productElement.add(element); - } - } - } - extension.add(productElement); - fmodel.getPluginBase().add(extension); - fmodel.save(); - - } catch (CoreException e) { - PDEPlugin.logException(e); - } - } - - /** - * create products extension detail - * - * @param project - */ - @SuppressWarnings("restriction") - public void createApplicationResources(IProject project, - IProgressMonitor monitor) { - Map<String, String> map = fApplicationPage.getData(); - if (map == null - || map.get(NewApplicationWizardPage.PRODUCT_NAME) == null) - return; - - String projectName = map.get(NewApplicationWizardPage.PRODUCT_NAME); - String xmiPath = map - .get(NewApplicationWizardPage.APPLICATION_XMI_PROPERTY); - - IJavaProject javaProject = JavaCore.create(project); - IPackageFragment fragment = null; - try { - for (IPackageFragment element : javaProject.getPackageFragments()) { - if (element.getKind() == IPackageFragmentRoot.K_SOURCE) { - fragment = element; - } - } - } catch (JavaModelException e1) { - e1.printStackTrace(); - } - - if (xmiPath != null && xmiPath.trim().length() > 0) { - // Create a resource set - // - ResourceSet resourceSet = new ResourceSetImpl(); - - // Get the URI of the model file. - // - URI fileURI = URI.createPlatformResourceURI(project.getName() + "/" - + xmiPath, true); - - // Create a resource for this file. - // - Resource resource = resourceSet.createResource(fileURI); - - MApplication application = MApplicationFactory.INSTANCE - .createApplication(); - - application.setElementId("org.eclipse.e4.ide.application"); - - MBindingContext rootContext = MCommandsFactory.INSTANCE.createBindingContext(); - rootContext.setElementId("org.eclipse.ui.contexts.dialogAndWindow"); - rootContext.setName("In Dialog and Windows"); - - MBindingContext childContext = MCommandsFactory.INSTANCE.createBindingContext(); - childContext.setElementId("org.eclipse.ui.contexts.window"); - childContext.setName("In Windows"); - rootContext.getChildren().add(childContext); - - childContext = MCommandsFactory.INSTANCE.createBindingContext(); - childContext.setElementId("org.eclipse.ui.contexts.dialog"); - childContext.setName("In Dialogs"); - rootContext.getChildren().add(childContext); - - application.setRootContext(rootContext); - application.getBindingContexts().add("org.eclipse.ui.contexts.dialogAndWindow"); - - resource.getContents().add((EObject) application); - - // Create Quit command - MCommand quitCommand = createCommand("quitCommand", "QuitHandler", - "Ctrl+Q", projectName, fragment, application); - - MCommand openCommand = createCommand("openCommand", "OpenHandler", - "Ctrl+O", projectName, fragment, application); - - MCommand saveCommand = createCommand("saveCommand", "SaveHandler", - "Ctrl+S", projectName, fragment, application); - - MCommand aboutCommand = createCommand("aboutCommand", - "AboutHandler", "Ctrl+A", projectName, fragment, - application); - - MTrimmedWindow mainWindow = MBasicFactory.INSTANCE.createTrimmedWindow(); - application.getChildren().add(mainWindow); - { - mainWindow.setLabel(projectName); - mainWindow.setWidth(500); - mainWindow.setHeight(400); - - // Menu - { - MMenu menu = MMenuFactory.INSTANCE.createMenu(); - mainWindow.setMainMenu(menu); - menu.setElementId("menu:org.eclipse.ui.main.menu"); - - MMenu fileMenuItem = MMenuFactory.INSTANCE - .createMenu(); - menu.getChildren().add(fileMenuItem); - fileMenuItem.setLabel("File"); - { - MHandledMenuItem menuItemOpen = MMenuFactory.INSTANCE - .createHandledMenuItem(); - fileMenuItem.getChildren().add(menuItemOpen); - menuItemOpen.setLabel("Open"); - menuItemOpen.setIconURI("platform:/plugin/" - + project.getName() + "/icons/sample.gif"); - menuItemOpen.setCommand(openCommand); - - MHandledMenuItem menuItemSave = MMenuFactory.INSTANCE - .createHandledMenuItem(); - fileMenuItem.getChildren().add(menuItemSave); - menuItemSave.setLabel("Save"); - menuItemSave.setIconURI("platform:/plugin/" - + project.getName() + "/icons/save_edit.gif"); - menuItemSave.setCommand(saveCommand); - - MHandledMenuItem menuItemQuit = MMenuFactory.INSTANCE - .createHandledMenuItem(); - fileMenuItem.getChildren().add(menuItemQuit); - menuItemQuit.setLabel("Quit"); - menuItemQuit.setCommand(quitCommand); - } - MMenu helpMenuItem = MMenuFactory.INSTANCE - .createMenu(); - menu.getChildren().add(helpMenuItem); - helpMenuItem.setLabel("Help"); - { - MHandledMenuItem menuItemAbout = MMenuFactory.INSTANCE - .createHandledMenuItem(); - helpMenuItem.getChildren().add(menuItemAbout); - menuItemAbout.setLabel("About"); - menuItemAbout.setCommand(aboutCommand); - } - } - - // PerspectiveStack - { - MPerspectiveStack perspectiveStack = MAdvancedFactory.INSTANCE - .createPerspectiveStack(); - mainWindow.getChildren().add(perspectiveStack); - - MPerspective perspective = MAdvancedFactory.INSTANCE - .createPerspective(); - perspectiveStack.getChildren().add(perspective); - { - // Part Container - MPartSashContainer partSashContainer = MBasicFactory.INSTANCE - .createPartSashContainer(); - perspective.getChildren().add(partSashContainer); - - MPartStack partStack = MBasicFactory.INSTANCE - .createPartStack(); - partSashContainer.getChildren().add(partStack); -// -// MPart part = MApplicationFactory.eINSTANCE.createPart(); -// partStack.getChildren().add(part); -// part.setLabel("Main"); - } - - // WindowTrim - { - MTrimBar trimBar = MBasicFactory.INSTANCE.createTrimBar(); - mainWindow.getTrimBars().add(trimBar); - - MToolBar toolBar = MMenuFactory.INSTANCE - .createToolBar(); - toolBar.setElementId("toolbar:org.eclipse.ui.main.toolbar"); - trimBar.getChildren().add(toolBar); - - MHandledToolItem toolItemOpen = MMenuFactory.INSTANCE - .createHandledToolItem(); - toolBar.getChildren().add(toolItemOpen); - toolItemOpen.setIconURI("platform:/plugin/" - + project.getName() + "/icons/sample.gif"); - toolItemOpen.setCommand(openCommand); - - MHandledToolItem toolItemSave = MMenuFactory.INSTANCE - .createHandledToolItem(); - toolBar.getChildren().add(toolItemSave); - toolItemSave.setIconURI("platform:/plugin/" - + project.getName() + "/icons/save_edit.gif"); - toolItemSave.setCommand(saveCommand); - } - } - } - Map<Object, Object> options = new HashMap<Object, Object>(); - options.put(XMLResource.OPTION_ENCODING, "UTF-8"); - try { - resource.save(options); - } catch (IOException e) { - PDEPlugin.logException(e); - } - } - - String cssPath = map - .get(NewApplicationWizardPage.APPLICATION_CSS_PROPERTY); - if (cssPath != null && cssPath.trim().length() > 0) { - IFile file = project.getFile(cssPath); - - try { - prepareFolder(file.getParent(), monitor); - - URL corePath = ResourceLocator - .getProjectTemplateFiles("css/default.css"); - file.create(corePath.openStream(), true, monitor); - } catch (Exception e) { - PDEPlugin.logException(e); - } - } - - // IFolder folder = project.getFolder("icons"); - // try { - // folder.create(true, true, monitor); - // Bundle bundle = Platform - // .getBundle("org.eclipse.e4.tools.ui.designer"); - // - // for (String fileName : new String[] { "sample.gif", "save_edit.gif" - // }) { - // URL sampleUrl = bundle.getEntry("resources/icons/" + fileName); - // sampleUrl = FileLocator.resolve(sampleUrl); - // InputStream inputStream = sampleUrl.openStream(); - // IFile file = folder.getFile(fileName); - // file.create(inputStream, true, monitor); - // } - // } catch (Exception e) { - // PDEPlugin.logException(e); - // } - - String template_id = "common"; - Set<String> binaryExtentions = new HashSet<String>(); - binaryExtentions.add(".gif"); - binaryExtentions.add(".png"); - - Map<String, String> keys = new HashMap<String, String>(); - keys.put("projectName", projectName); - keys.put("packageName", fragment.getElementName() + ".handlers"); - - try { - URL corePath = ResourceLocator.getProjectTemplateFiles(template_id); - IRunnableWithProgress op = new TemplateOperation(corePath, project, - keys, binaryExtentions); - getContainer().run(false, true, op); - } catch (Exception e) { - PDEPlugin.logException(e); - } - - try { - URL corePath = ResourceLocator.getProjectTemplateFiles("src"); - IRunnableWithProgress op = new TemplateOperation(corePath, - (IContainer) fragment.getResource(), keys, binaryExtentions); - getContainer().run(false, true, op); - } catch (Exception e) { - PDEPlugin.logException(e); - } - } - - private MCommand createCommand(String name, String className, - String keyBinding, String projectName, IPackageFragment fragment, - MApplication application) { - MCommand command = MCommandsFactory.INSTANCE.createCommand(); - command.setCommandName(name); - command.setElementId(projectName + "." + name); - application.getCommands().add(command); - { - // Create Quit handler for command - MHandler quitHandler =MCommandsFactory.INSTANCE - .createHandler(); - quitHandler.setCommand(command); - quitHandler.setContributionURI("platform:/plugin/" + projectName + "/" - + fragment.getElementName() + ".handlers." + className); - application.getHandlers().add(quitHandler); - - MKeyBinding binding = MCommandsFactory.INSTANCE - .createKeyBinding(); - binding.setKeySequence(keyBinding); - binding.setCommand(command); - List<MBindingTable> tables = application.getBindingTables(); - if (tables.size()==0) { - MBindingTable table = MCommandsFactory.INSTANCE.createBindingTable(); - table.setBindingContextId("org.eclipse.ui.contexts.dialogAndWindow"); - tables.add(table); - } - tables.get(0).getBindings().add(binding); - } - return command; - } - - private void prepareFolder(IContainer container, IProgressMonitor monitor) - throws CoreException { - IContainer parent = container.getParent(); - if (parent instanceof IFolder) { - prepareFolder((IFolder) parent, monitor); - } - if (!container.exists() && container instanceof IFolder) { - IFolder folder = (IFolder) container; - folder.create(true, true, monitor); - } - } - - public String getPluginId() { - return fPluginData.getId(); - } - - public String getPluginVersion() { - return fPluginData.getVersion(); - } -} diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizardPage.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizardPage.java deleted file mode 100644 index 72ae3d44..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizardPage.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2010 Soyatec(http://www.soyatec.com) 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: - * Soyatec - initial API and implementation - *******************************************************************************/ -package org.eclipse.e4.internal.tools.wizards.project; - -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.pde.internal.ui.wizards.plugin.AbstractFieldData; -import org.eclipse.swt.widgets.Composite; - -public class E4NewProjectWizardPage extends org.eclipse.pde.internal.ui.wizards.plugin.NewProjectCreationPage { - - public E4NewProjectWizardPage(String pageName, AbstractFieldData data, boolean fragment, IStructuredSelection selection) { - super(pageName, data, fragment, selection); - } - - @Override - public void createControl(Composite parent) { - super.createControl(parent); - fOSGIButton.setSelection(true); - fEclipseButton.setEnabled(false); - fEclipseCombo.setEnabled(false); - } -} - diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/NewApplicationWizardPage.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/NewApplicationWizardPage.java deleted file mode 100644 index 14bc00b9..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/NewApplicationWizardPage.java +++ /dev/null @@ -1,417 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2010 Soyatec (http://www.soyatec.com) 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: - * Soyatec - initial API and implementation - *******************************************************************************/ -package org.eclipse.e4.internal.tools.wizards.project; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.core.resources.IProject; -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.pde.internal.ui.wizards.IProjectProvider; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.events.VerifyEvent; -import org.eclipse.swt.events.VerifyListener; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.RGB; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.ColorDialog; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.branding.IProductConstants; - -/** - * @author jin.liu (jin.liu@soyatec.com) - */ -public class NewApplicationWizardPage extends WizardPage { - public static final String E4_APPLICATION = "org.eclipse.e4.ui.workbench.swt.E4Application"; - public static final String APPLICATION_XMI_PROPERTY = "applicationXMI"; - public static final String APPLICATION_CSS_PROPERTY = "applicationCSS"; - public static final String PRODUCT_NAME = "productName"; - public static final String APPLICATION = "application"; - - private final Map<String, String> data; - - private IProject project; - private IProjectProvider projectProvider; - private Text proNameText; - private Text proApplicationText; - private Group propertyGroup; - - private PropertyData[] PROPERTIES; - - protected NewApplicationWizardPage(IProjectProvider projectProvider) { - super("New e4 Application Wizard Page"); - this.projectProvider = projectProvider; - data = new HashMap<String, String>(); - setTitle("e4 Application"); - setMessage("Configure application with special values."); - } - - public IProject getProject() { - if (project == null && projectProvider != null) { - project = projectProvider.getProject(); - } - return project; - } - - public void setProject(IProject project) { - this.project = project; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets - * .Composite) - */ - public void createControl(Composite parent) { - Composite control = new Composite(parent, SWT.NONE); - control.setLayout(new GridLayout()); - - Group productGroup = createProductGroup(control); - productGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - propertyGroup = createPropertyGroup(control); - propertyGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - setControl(control); - } - - static class PropertyData { - private String name; - private String label; - - private String value; - private Class<?> type; - private boolean editable; - - public PropertyData(String name, String label, String value, Class<?> type, - boolean editable) { - this.name = name; - this.value = value; - this.label = label; - this.type = type; - this.editable = editable; - } - - public String getName() { - return name; - } - - public String getValue() { - return value; - } - - public Class<?> getType() { - return type; - } - - public boolean isEditable() { - return editable; - } - - public String getLabel() { - return label; - } - } - - private Group createPropertyGroup(Composite control) { - Group group = new Group(control, SWT.NONE); - group.setText("Properties"); - - group.setLayout(new GridLayout(3, false)); - - return group; - } - - private void createPropertyItem(final Composite parent, - final PropertyData property) { - Label label = new Label(parent, SWT.NONE); - label.setText(property.getLabel()); - label.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_BLUE)); - label.setToolTipText("Property \"" + property.getName() + "\""); - - final Text valueText = new Text(parent, SWT.BORDER); - valueText.setText(property.getValue()); - GridData gridData = new GridData(GridData.FILL_HORIZONTAL); - valueText.setLayoutData(gridData); - if (!property.isEditable()) { - valueText.setEditable(false); - } - valueText.addListener(SWT.Modify, new Listener() { - public void handleEvent(Event event) { - handleTextEvent(property.getName(), valueText); - } - }); - - if (property.getType() == Color.class - || property.getType() == Rectangle.class) { - Button button = new Button(parent, SWT.PUSH); - button.setText("..."); - button.addSelectionListener(new SelectionListener() { - public void widgetSelected(SelectionEvent e) { - handleLinkEvent(property, valueText, parent.getShell()); - } - - public void widgetDefaultSelected(SelectionEvent e) { - } - }); - } - else { - new Label(parent, SWT.NONE); - } - data.put(property.getName(), property.getValue()); - } - - private void handleLinkEvent(PropertyData property, Text valueText, - Shell shell) { - if (property == null || valueText == null || valueText.isDisposed()) { - return; - } - if (property.getType() == Color.class) { - ColorDialog colorDialog = new ColorDialog(shell); - RGB selectRGB = colorDialog.open(); - if (selectRGB != null) { - valueText.setText((this.hexColorConvert(Integer - .toHexString(selectRGB.blue)) - + this.hexColorConvert(Integer - .toHexString(selectRGB.green)) + this - .hexColorConvert(Integer.toHexString(selectRGB.red))) - .toUpperCase()); - } - } else if (property.getType() == Rectangle.class) { - this.createRectDialog(shell, valueText).open(); - } - } - - /** - * exchange the color pattern of hex numeric - * - * @param number - * @return - */ - public String hexColorConvert(String color) { - if (color.length() == 1) { - return "0" + color; - } - return color; - } - - /** - * create Rect Set dialog - * - * @param parent - * @param valueText - * @return - */ - public Dialog createRectDialog(final Composite parent, final Text valueText) { - return new Dialog(parent.getShell()) { - Text xPointText, yPointText, widthText, heightText; - - @Override - protected Button createButton(Composite parent, int id, - String label, boolean defaultButton) { - return super.createButton(parent, id, label, defaultButton); - } - - @Override - protected Control createDialogArea(final Composite parent) { - Composite composite = (Composite) super - .createDialogArea(parent); - composite.getShell().setText("Set Rect"); - Group group = new Group(composite, SWT.NONE); - group.setText("Rect"); - GridLayout gridLayout = new GridLayout(); - gridLayout.numColumns = 4; - group.setLayout(gridLayout); - - Label xPointLabel = new Label(group, SWT.NONE); - xPointLabel.setText("X:"); - xPointText = new Text(group, SWT.BORDER); - VerifyListener verifyListener = createVerifyListener(parent - .getShell()); - xPointText.addVerifyListener(verifyListener); - Label yPointLabel = new Label(group, SWT.NONE); - yPointLabel.setText("Y:"); - yPointText = new Text(group, SWT.BORDER); - yPointText.addVerifyListener(verifyListener); - Label widthLabel = new Label(group, SWT.NONE); - widthLabel.setText("Width:"); - widthText = new Text(group, SWT.BORDER); - widthText.addVerifyListener(verifyListener); - Label heighttLabel = new Label(group, SWT.NONE); - heighttLabel.setText("Height:"); - heightText = new Text(group, SWT.BORDER); - heightText.addVerifyListener(verifyListener); - - return composite; - } - - @Override - protected void buttonPressed(int buttonId) { - if (IDialogConstants.OK_ID == buttonId) { - String xPoint = xPointText.getText(); - String yPoint = yPointText.getText(); - String width = widthText.getText(); - String height = heightText.getText(); - if (xPoint.length() == 0 || yPoint.length() == 0 - || width.length() == 0 || height.length() == 0) { - MessageDialog.openWarning(parent.getShell(), - "Input value empty", - "Value shoud not be empty!"); - } else { - valueText.setText(xPoint + "," + yPoint + "," + width - + "," + height); - okPressed(); - } - } else if (IDialogConstants.CANCEL_ID == buttonId) { - cancelPressed(); - } - } - }; - } - - /** - * create verify Listener - * - * @param shell - * @return - */ - public VerifyListener createVerifyListener(final Shell shell) { - return new VerifyListener() { - public void verifyText(VerifyEvent e) { - char c = e.character; - if ("0123456789".indexOf(c) == -1) { - e.doit = false; - MessageDialog.openWarning(shell, "Input value error", - "Only numeric is allowed!"); - return; - } - } - }; - } - - private void handleTextEvent(String property, Text valueText) { - if (property == null || valueText == null || valueText.isDisposed()) { - return; - } - String value = valueText.getText(); - if (value.equals("")) { - value = null; - } - data.put(property, value); - } - - private Group createProductGroup(Composite control) { - Group proGroup = new Group(control, SWT.NONE); - proGroup.setText("Product"); - - proGroup.setLayout(new GridLayout(2, false)); - - Label proNameLabel = new Label(proGroup, SWT.NONE); - proNameLabel.setText("Name:*"); - - proNameText = new Text(proGroup, SWT.BORDER); - proNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - proNameText.addListener(SWT.Modify, new Listener() { - public void handleEvent(Event event) { - handleTextEvent(PRODUCT_NAME, proNameText); - } - }); - - Label proApplicationLabel = new Label(proGroup, SWT.NONE); - proApplicationLabel.setText("Application:"); - - proApplicationText = new Text(proGroup, SWT.BORDER); - proApplicationText - .setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - proApplicationText.addListener(SWT.Modify, new Listener() { - public void handleEvent(Event event) { - handleTextEvent(APPLICATION, proApplicationText); - } - }); - return proGroup; - } - - protected PropertyData[] getPropertyData() { - if (PROPERTIES == null) { - PROPERTIES = new PropertyData[] { - new PropertyData(IProductConstants.APP_NAME, "Application Name:", - projectProvider.getProjectName(), String.class, - true), - new PropertyData(APPLICATION_XMI_PROPERTY, "Application UI:", - "Application.e4xmi", String.class, true), - new PropertyData(APPLICATION_CSS_PROPERTY, "CSS Style:", - "css/default.css", String.class, true), - new PropertyData(IProductConstants.ABOUT_TEXT, "About Message:", "", - String.class, true), - new PropertyData( - IProductConstants.STARTUP_FOREGROUND_COLOR, "Startup Foreground:", "", - Color.class, false), - new PropertyData(IProductConstants.STARTUP_MESSAGE_RECT, "Startup Message Region:", - "", Rectangle.class, false), - new PropertyData(IProductConstants.STARTUP_PROGRESS_RECT, "Startup Progress Region:", - "", Rectangle.class, false), - new PropertyData( - IProductConstants.PREFERENCE_CUSTOMIZATION, "Preference Customization:", "", - String.class, true) }; // plugin_customization.ini - } - return PROPERTIES; - } - - @Override - public void setVisible(boolean visible) { - if (visible && PROPERTIES == null) { - proNameText.setText(projectProvider.getProjectName()); - - proApplicationText.setText(E4_APPLICATION); - - for (PropertyData property : getPropertyData()) { - createPropertyItem(propertyGroup, property); - } - propertyGroup.getParent().layout(); - } - super.setVisible(visible); - } - - /** - * @return the data - */ - public Map<String, String> getData() { - if (PROPERTIES == null) { - for (PropertyData property : getPropertyData()) { - data.put(property.getName(), property.getValue()); - } - - data.put(PRODUCT_NAME, projectProvider.getProjectName()); - data.put(APPLICATION, E4_APPLICATION); - } - Map<String, String> map = new HashMap<String, String>(); - map.putAll(data); - return map; - } -} diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/PluginContentPage.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/PluginContentPage.java deleted file mode 100644 index 6fb9ae3f..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/PluginContentPage.java +++ /dev/null @@ -1,363 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation 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: - * IBM Corporation - initial API and implementation - * Soyatec - port to e4 - *******************************************************************************/ -package org.eclipse.e4.internal.tools.wizards.project; - -import java.util.Locale; -import java.util.TreeSet; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.jdt.core.JavaConventions; -import org.eclipse.jdt.launching.IVMInstall; -import org.eclipse.jdt.launching.JavaRuntime; -import org.eclipse.jdt.launching.environments.IExecutionEnvironment; -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.dialogs.IDialogSettings; -import org.eclipse.jface.dialogs.IMessageProvider; -import org.eclipse.pde.internal.core.util.PDEJavaHelper; -import org.eclipse.pde.internal.core.util.VMUtil; -import org.eclipse.pde.internal.ui.IHelpContextIds; -import org.eclipse.pde.internal.ui.PDEUIMessages; -import org.eclipse.pde.internal.ui.SWTFactory; -import org.eclipse.pde.internal.ui.wizards.IProjectProvider; -import org.eclipse.pde.internal.ui.wizards.plugin.AbstractFieldData; -import org.eclipse.pde.internal.ui.wizards.plugin.ContentPage; -import org.eclipse.pde.internal.ui.wizards.plugin.NewProjectCreationPage; -import org.eclipse.pde.internal.ui.wizards.plugin.PluginFieldData; -import org.eclipse.pde.internal.ui.wizards.plugin.TemplateListSelectionPage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Combo; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.dialogs.PreferencesUtil; - -/** - * Content wizard page for the New Plugin Project wizard (page 2) - */ -public class PluginContentPage extends ContentPage { - private Text fClassText; - protected Button fGenerateActivator; - protected Button fUIPlugin; - private Label fClassLabel; - private Label fEELabel; - private Button fExeEnvButton; - private Combo fEEChoice; - - /** - * Button to enable API analysis for the project during project creation - */ - private Button fApiAnalysisButton; - - /** - * Dialog settings constants - */ - private final static String S_GENERATE_ACTIVATOR = "generateActivator"; //$NON-NLS-1$ - private final static String S_UI_PLUGIN = "uiPlugin"; //$NON-NLS-1$ - private final static String S_RCP_PLUGIN = "rcpPlugin"; //$NON-NLS-1$ - private final static String S_API_ANALYSIS = "apiAnalysis"; //$NON-NLS-1$ - - protected final static int P_CLASS_GROUP = 2; - private final static String NO_EXECUTION_ENVIRONMENT = PDEUIMessages.PluginContentPage_noEE; - - /** - * default tText modify listener - */ - private ModifyListener classListener = new ModifyListener() { - public void modifyText(ModifyEvent e) { - if (fInitialized) - fChangedGroups |= P_CLASS_GROUP; - validatePage(); - } - }; - - /** - * Constructor - * @param pageName - * @param provider - * @param page - * @param data - */ - public PluginContentPage(String pageName, IProjectProvider provider, NewProjectCreationPage page, AbstractFieldData data) { - super(pageName, provider, page, data); - setTitle(PDEUIMessages.ContentPage_title); - setDescription(PDEUIMessages.ContentPage_desc); - } - - /* (non-Javadoc) - * @see org.eclipse.pde.internal.ui.wizards.plugin.ContentPage#createControl(org.eclipse.swt.widgets.Composite) - */ - public void createControl(Composite parent) { - Composite container = new Composite(parent, SWT.NONE); - container.setLayout(new GridLayout()); - - createPluginPropertiesGroup(container); - createPluginClassGroup(container); - - Dialog.applyDialogFont(container); - setControl(container); - PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.NEW_PROJECT_REQUIRED_DATA); - } - - /** - * Creates all of the plugin properties widgets - * @param container - */ - private void createPluginPropertiesGroup(Composite container) { - Group propertiesGroup = SWTFactory.createGroup(container, PDEUIMessages.ContentPage_pGroup, 3, 1, GridData.FILL_HORIZONTAL); - - Label label = new Label(propertiesGroup, SWT.NONE); - label.setText(PDEUIMessages.ContentPage_pid); - fIdText = createText(propertiesGroup, propertiesListener, 2); - - label = new Label(propertiesGroup, SWT.NONE); - label.setText(PDEUIMessages.ContentPage_pversion); - fVersionText = createText(propertiesGroup, propertiesListener, 2); - - label = new Label(propertiesGroup, SWT.NONE); - label.setText(PDEUIMessages.ContentPage_pname); - fNameText = createText(propertiesGroup, propertiesListener, 2); - - label = new Label(propertiesGroup, SWT.NONE); - label.setText(PDEUIMessages.ContentPage_pprovider); - fProviderText = createText(propertiesGroup, propertiesListener, 2); - - createExecutionEnvironmentControls(propertiesGroup); - } - - /** - * Creates all of the EE widgets - * @param container - */ - private void createExecutionEnvironmentControls(Composite container) { - // Create label - fEELabel = new Label(container, SWT.NONE); - fEELabel.setText(PDEUIMessages.NewProjectCreationPage_executionEnvironments_label); - - // Create combo - fEEChoice = new Combo(container, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER); - fEEChoice.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - // Gather EEs - IExecutionEnvironment[] exeEnvs = VMUtil.getExecutionEnvironments(); - TreeSet availableEEs = new TreeSet(); - for (int i = 0; i < exeEnvs.length; i++) { - availableEEs.add(exeEnvs[i].getId()); - } - availableEEs.add(NO_EXECUTION_ENVIRONMENT); - - // Set data - fEEChoice.setItems((String[]) availableEEs.toArray(new String[availableEEs.size() - 1])); - fEEChoice.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - validatePage(); - } - }); - - // Set default EE based on strict match to default VM - IVMInstall defaultVM = JavaRuntime.getDefaultVMInstall(); - String[] EEChoices = fEEChoice.getItems(); - for (int i = 0; i < EEChoices.length; i++) { - if (!EEChoices[i].equals(NO_EXECUTION_ENVIRONMENT)) { - if (VMUtil.getExecutionEnvironment(EEChoices[i]).isStrictlyCompatible(defaultVM)) { - fEEChoice.select(i); - break; - } - } - } - - // Create button - fExeEnvButton = new Button(container, SWT.PUSH); - fExeEnvButton.setLayoutData(new GridData()); - fExeEnvButton.setText(PDEUIMessages.NewProjectCreationPage_environmentsButton); - fExeEnvButton.addListener(SWT.Selection, new Listener() { - public void handleEvent(Event event) { - PreferencesUtil.createPreferenceDialogOn(getShell(), "org.eclipse.jdt.debug.ui.jreProfiles", //$NON-NLS-1$ - new String[] {"org.eclipse.jdt.debug.ui.jreProfiles"}, null).open(); //$NON-NLS-1$ - } - }); - } - - /** - * Creates all of the plugin options widgets - * @param container - */ - protected void createPluginClassGroup(Composite container) { - Group classGroup = SWTFactory.createGroup(container, PDEUIMessages.ContentPage_pClassGroup, 2, 1, GridData.FILL_HORIZONTAL); - - IDialogSettings settings = getDialogSettings(); - - fGenerateActivator = SWTFactory.createCheckButton(classGroup, PDEUIMessages.ContentPage_generate, null, (settings != null) ? !settings.getBoolean(S_GENERATE_ACTIVATOR) : true, 2); - fGenerateActivator.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - fClassLabel.setEnabled(fGenerateActivator.getSelection()); - fClassText.setEnabled(fGenerateActivator.getSelection()); - updateData(); - validatePage(); - } - }); - - fClassLabel = new Label(classGroup, SWT.NONE); - fClassLabel.setText(PDEUIMessages.ContentPage_classname); - GridData gd = new GridData(); - gd.horizontalIndent = 20; - fClassLabel.setLayoutData(gd); - fClassText = createText(classGroup, classListener); - - fUIPlugin = SWTFactory.createCheckButton(classGroup, PDEUIMessages.ContentPage_uicontribution, null, (settings != null) ? !settings.getBoolean(S_UI_PLUGIN) : true, 2); - fUIPlugin.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - updateData(); - validatePage(); - } - }); - - fApiAnalysisButton = SWTFactory.createCheckButton(classGroup, PDEUIMessages.PluginContentPage_enable_api_analysis, null, false, 2); - fApiAnalysisButton.setSelection((settings != null) ? settings.getBoolean(S_API_ANALYSIS) : false); - fApiAnalysisButton.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - updateData(); - validatePage(); - } - }); - } - - /* (non-Javadoc) - * @see org.eclipse.pde.internal.ui.wizards.plugin.ContentPage#updateData() - */ - public void updateData() { - super.updateData(); - PluginFieldData data = (PluginFieldData) fData; - data.setClassname(fClassText.getText().trim()); - data.setUIPlugin(fUIPlugin.getSelection()); - data.setDoGenerateClass(fGenerateActivator.getSelection()); - data.setRCPApplicationPlugin(!fData.isSimple() && !isPureOSGi()); - data.setEnableAPITooling(fApiAnalysisButton.getSelection()); - if (fEEChoice.isEnabled() && !fEEChoice.getText().equals(NO_EXECUTION_ENVIRONMENT)) { - fData.setExecutionEnvironment(fEEChoice.getText().trim()); - } else { - fData.setExecutionEnvironment(null); - } - } - - /* (non-Javadoc) - * @see org.eclipse.pde.internal.ui.wizards.plugin.ContentPage#setVisible(boolean) - */ - public void setVisible(boolean visible) { - if (visible) { - fMainPage.updateData(); - fGenerateActivator.setSelection(!fData.isSimple()); - fGenerateActivator.setEnabled(!fData.isSimple()); - fClassLabel.setEnabled(!fData.isSimple() && fGenerateActivator.getSelection()); - fClassText.setEnabled(!fData.isSimple() && fGenerateActivator.getSelection()); - boolean wasUIPluginEnabled = fUIPlugin.isEnabled(); - fUIPlugin.setEnabled(!fData.isSimple() && !isPureOSGi()); - // if fUIPlugin is disabled, set selection to false - if (!fUIPlugin.isEnabled()) { - fUIPlugin.setSelection(false); - } - // if the fUIPlugin was disabled and is now enabled, then set the selection to true - else if (!wasUIPluginEnabled) { - fUIPlugin.setSelection(true); - } - - // plugin class group - if (((fChangedGroups & P_CLASS_GROUP) == 0)) { - int oldfChanged = fChangedGroups; - fClassText.setText(computeId().replaceAll("-", "_").toLowerCase(Locale.ENGLISH) + ".Activator"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - fChangedGroups = oldfChanged; - } - - boolean allowEESelection = !fData.isSimple() && fData.hasBundleStructure(); - fEELabel.setEnabled(allowEESelection); - fEEChoice.setEnabled(allowEESelection); - fExeEnvButton.setEnabled(allowEESelection); - // API tooling only works for osgi bundles with java natures - fApiAnalysisButton.setEnabled(allowEESelection); - if (allowEESelection && getDialogSettings() != null) { - fApiAnalysisButton.setSelection(getDialogSettings().getBoolean(S_API_ANALYSIS)); - } else { - fApiAnalysisButton.setSelection(false); - } - } - super.setVisible(visible); - } - - /** - * @return if the field data is using the OSGi framework - */ - private boolean isPureOSGi() { - return ((PluginFieldData) fData).getOSGiFramework() != null; - } - - /* (non-Javadoc) - * @see org.eclipse.pde.internal.ui.wizards.plugin.ContentPage#validatePage() - */ - protected void validatePage() { - String errorMessage = validateProperties(); - if (errorMessage == null && fGenerateActivator.getSelection()) { - IStatus status = JavaConventions.validateJavaTypeName(fClassText.getText().trim(), PDEJavaHelper.getJavaSourceLevel(null), PDEJavaHelper.getJavaComplianceLevel(null)); - if (status.getSeverity() == IStatus.ERROR) { - errorMessage = status.getMessage(); - } else if (status.getSeverity() == IStatus.WARNING) { - setMessage(status.getMessage(), IMessageProvider.WARNING); - } - } - if (errorMessage == null) { - String eeid = fEEChoice.getText(); - if (fEEChoice.isEnabled()) { - IExecutionEnvironment ee = VMUtil.getExecutionEnvironment(eeid); - if (ee != null && ee.getCompatibleVMs().length == 0) { - errorMessage = PDEUIMessages.NewProjectCreationPage_invalidEE; - } - } - } - setErrorMessage(errorMessage); - setPageComplete(errorMessage == null); - } - - /** - * Saves the current state of widgets of interest in the dialog settings for the wizard - * @param settings - */ - public void saveSettings(IDialogSettings settings) { - settings.put(S_GENERATE_ACTIVATOR, !fGenerateActivator.getSelection()); - if (fUIPlugin.isEnabled()) { - settings.put(S_UI_PLUGIN, !fUIPlugin.getSelection()); - } - if (fApiAnalysisButton.isEnabled()) { - settings.put(S_API_ANALYSIS, fApiAnalysisButton.getSelection()); - } - settings.put(S_RCP_PLUGIN, true); - } - - /* (non-Javadoc) - * @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage() - */ - public boolean canFlipToNextPage() { - if (getNextPage() instanceof TemplateListSelectionPage) { - TemplateListSelectionPage templatePage = (TemplateListSelectionPage) getNextPage(); - return super.canFlipToNextPage() && templatePage.isAnyTemplateAvailable(); - } - return super.canFlipToNextPage(); - } -} diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/ResourceLocator.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/ResourceLocator.java deleted file mode 100644 index 1e2c5e29..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/ResourceLocator.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2010 Soyatec (http://www.soyatec.com) 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: - * Soyatec - initial API and implementation - *******************************************************************************/ -package org.eclipse.e4.internal.tools.wizards.project; - -import java.io.IOException; -import java.net.URL; - -import org.eclipse.core.runtime.FileLocator; -import org.eclipse.core.runtime.Plugin; -import org.eclipse.e4.internal.tools.ToolsPlugin; - -public class ResourceLocator { - private static final String TEMPLATE_FOLDER = "templates"; - - private static ResourceLocator instance = new ResourceLocator(); - - private ResourceLocator() { - } - - public static ResourceLocator getInstance() { - return instance; - } - - public static URL getProjectTemplateFiles(String folder) - throws IOException { - Plugin plugin = getResorucePlugin(); - URL installURL = plugin.getBundle().getEntry( - "/" + TEMPLATE_FOLDER + "/" + folder); - // FileLocator.toFileURL(installURL); - URL corePath = FileLocator.resolve(installURL); - return corePath; - } - - public static URL getFile(String relativePath) throws IOException { - Plugin plugin = getResorucePlugin(); - URL installURL = plugin.getBundle().getEntry(relativePath); - URL corePath = FileLocator.resolve(installURL); - return corePath; - } - - public static Plugin getResorucePlugin() { - return ToolsPlugin.getDefault(); - } -} diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/TemplateOperation.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/TemplateOperation.java deleted file mode 100644 index 3546db57..00000000 --- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/TemplateOperation.java +++ /dev/null @@ -1,401 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2010 Soyatec (http://www.soyatec.com) 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: - * Soyatec - initial API and implementation - *******************************************************************************/ -package org.eclipse.e4.internal.tools.wizards.project; - -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.lang.reflect.InvocationTargetException; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; -import java.util.zip.ZipEntry; -import java.util.zip.ZipException; -import java.util.zip.ZipFile; - -import org.eclipse.core.resources.IContainer; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.Path; -import org.eclipse.e4.internal.tools.ToolsPlugin; -import org.eclipse.pde.internal.ui.PDEUIMessages; -import org.eclipse.pde.ui.templates.IVariableProvider; -import org.eclipse.ui.actions.WorkspaceModifyOperation; - -public class TemplateOperation extends WorkspaceModifyOperation implements - IVariableProvider { - - private final URL templateDirectory; - private final IContainer target; - private final Map<String, String> keys; - private final Set<String> binaryExtentions; - - public TemplateOperation(URL source, IContainer target, - Map<String, String> keys, Set<String> binaryExtentions) { - templateDirectory = source; - this.binaryExtentions = binaryExtentions; - this.target = target; - this.keys = keys; - } - - @Override - protected void execute(IProgressMonitor monitor) throws CoreException, - InvocationTargetException, InterruptedException { - monitor.setTaskName(PDEUIMessages.AbstractTemplateSection_generating); - - if ("jar".equals(templateDirectory.getProtocol())) { //$NON-NLS-1$ - String file = templateDirectory.getFile(); - int exclamation = file.indexOf('!'); - if (exclamation < 0) - return; - URL fileUrl = null; - try { - fileUrl = new URL(file.substring(0, exclamation)); - } catch (MalformedURLException mue) { - ToolsPlugin.logError(mue); - return; - } - File pluginJar = new File(fileUrl.getFile()); - if (!pluginJar.exists()) - return; - String templateDirectory = file.substring(exclamation + 1); // "/some/path/" - IPath path = new Path(templateDirectory); - ZipFile zipFile = null; - try { - zipFile = new ZipFile(pluginJar); - generateFiles(zipFile, path, target, monitor); - } catch (ZipException ze) { - } catch (IOException ioe) { - } finally { - if (zipFile != null) { - try { - zipFile.close(); - } catch (IOException e) { - } - } - } - } else if ("file".equals(templateDirectory.getProtocol())) { //$NON-NLS-1$ - File directory = new File(templateDirectory.getFile()); - if (!directory.exists()) - return; - generateFiles(directory, target, true, monitor); - } - } - - private void generateFiles(File src, IContainer dst, boolean firstLevel, - IProgressMonitor monitor) throws CoreException { - File[] members = src.listFiles(); - - for (int i = 0; i < members.length; i++) { - File member = members[i]; - String name = member.getName(); - if (member.isDirectory()) { - if (".svn".equals(name) || "cvs".equalsIgnoreCase(name)) - continue; - IContainer dstContainer = null; - - if (dstContainer == null) { - String folderName = getProcessedString(name, name); - dstContainer = dst.getFolder(new Path(folderName)); - } - if (dstContainer != null && !dstContainer.exists()) - ((IFolder) dstContainer).create(true, true, monitor); - generateFiles(member, dstContainer, false, monitor); - } else { - InputStream in = null; - try { - in = new FileInputStream(member); - copyFile(name, in, dst, monitor); - } catch (IOException ioe) { - } finally { - if (in != null) - try { - in.close(); - } catch (IOException ioe2) { - } - } - } - } - } - - /** - * - * - * @param zipFile - * @param path - * @param dst - * @param monitor - * @throws CoreException - */ - private void generateFiles(ZipFile zipFile, IPath path, IContainer dst, - IProgressMonitor monitor) throws CoreException { - int pathLength = path.segmentCount(); - // Immidiate children - Map childZipEntries = new HashMap(); // "dir/" or "dir/file.java" - - for (Enumeration zipEntries = zipFile.entries(); zipEntries - .hasMoreElements();) { - ZipEntry zipEntry = (ZipEntry) zipEntries.nextElement(); - IPath entryPath = new Path(zipEntry.getName()); - if (entryPath.segmentCount() <= pathLength) { - // ancestor or current directory - continue; - } - if (!path.isPrefixOf(entryPath)) { - // not a descendant - continue; - } - if (entryPath.segmentCount() == pathLength + 1) { - childZipEntries.put(zipEntry.getName(), zipEntry); - } else { - String name = entryPath.uptoSegment(pathLength + 1) - .addTrailingSeparator().toString(); - if (!childZipEntries.containsKey(name)) { - ZipEntry dirEntry = new ZipEntry(name); - childZipEntries.put(name, dirEntry); - } - } - } - - for (Iterator it = childZipEntries.values().iterator(); it.hasNext();) { - ZipEntry zipEnry = (ZipEntry) it.next(); - String name = new Path(zipEnry.getName()).lastSegment().toString(); - if (zipEnry.isDirectory()) { - IContainer dstContainer = null; - - if (dstContainer == null) { - String folderName = getProcessedString(name, name); - dstContainer = dst.getFolder(new Path(folderName)); - } - if (dstContainer != null && !dstContainer.exists()) - ((IFolder) dstContainer).create(true, true, monitor); - generateFiles(zipFile, path.append(name), dstContainer, monitor); - } else { - InputStream in = null; - try { - in = zipFile.getInputStream(zipEnry); - copyFile(name, in, dst, monitor); - } catch (IOException ioe) { - } finally { - if (in != null) - try { - in.close(); - } catch (IOException ioe2) { - } - } - } - } - } - - private void copyFile(String fileName, InputStream input, IContainer dst, - IProgressMonitor monitor) throws CoreException { - String targetFileName = getProcessedString(fileName, fileName); - - monitor.subTask(targetFileName); - IFile dstFile = dst.getFile(new Path(targetFileName)); - - try { - InputStream stream = isBinary(fileName) ? input - : getProcessedStream(fileName, input); - if (dstFile.exists()) { - dstFile.setContents(stream, true, true, monitor); - } else { - dstFile.create(stream, true, monitor); - } - stream.close(); - - } catch (IOException e) { - } - } - - protected void copyFile(String fileName, InputStream input, IContainer dst, - final String destPath, IProgressMonitor monitor) - throws CoreException { - String targetFileName = null; - if (destPath == null) { - targetFileName = getProcessedString(fileName, fileName); - } else { - targetFileName = destPath; - } - - monitor.subTask(targetFileName); - IFile dstFile = dst.getFile(new Path(targetFileName)); - - try { - InputStream stream = isBinary(fileName) ? input - : getProcessedStream(fileName, input); - if (dstFile.exists()) { - dstFile.setContents(stream, true, true, monitor); - } else { - dstFile.create(stream, true, monitor); - } - stream.close(); - - } catch (IOException e) { - } - } - - /** - * - * @param fileName - * @param input - * @param dst - * @param basePath - * @param monitor - * @throws CoreException - */ - public void copyFile(String fileName, InputStream input, IContainer dst, - final String basePath, final String destName, - IProgressMonitor monitor) throws CoreException { - if (basePath == null || basePath.equals("")) { - copyFile(fileName, input, dst, monitor); - } - - String targetFileName = destName == null ? getProcessedString(fileName, - fileName) : destName; - - monitor.subTask(targetFileName); - IFile dstFile = dst.getFile(new Path(basePath + targetFileName)); - - try { - InputStream stream = isBinary(fileName) ? input - : getProcessedStream(fileName, input); - if (dstFile.exists()) { - dstFile.setContents(stream, true, true, monitor); - } else { - dstFile.create(stream, true, monitor); - } - stream.close(); - - } catch (IOException e) { - } - } - - private boolean isBinary(String fileName) { - if (binaryExtentions == null) { - return false; - } - - String ext = getfileExtention(fileName); - if (ext == null) - return false; - return binaryExtentions.contains(ext); - } - - private String getfileExtention(String name) { - int indexOf = name.lastIndexOf('.'); - if (indexOf == -1) - return null; - return name.substring(indexOf); - } - - private InputStream getProcessedStream(String fileName, InputStream stream) - throws IOException, CoreException { - InputStreamReader reader = new InputStreamReader(stream); - int bufsize = 1024; - char[] cbuffer = new char[bufsize]; - int read = 0; - StringBuffer keyBuffer = new StringBuffer(); - StringBuffer outBuffer = new StringBuffer(); - - boolean replacementMode = false; - boolean almostReplacementMode = false; - boolean escape = false; - while (read != -1) { - read = reader.read(cbuffer); - for (int i = 0; i < read; i++) { - char c = cbuffer[i]; - - if (escape) { - StringBuffer buf = outBuffer; - buf.append(c); - escape = false; - continue; - } - - if (c == '@') { - if (replacementMode && almostReplacementMode) { - almostReplacementMode = false; - } else if (replacementMode) { - replacementMode = false; - String key = keyBuffer.toString(); - String value = key.length() == 0 ? "@@" //$NON-NLS-1$ - : getReplacementString(key); - outBuffer.append(value); - keyBuffer.delete(0, keyBuffer.length()); - } else if (almostReplacementMode) { - replacementMode = true; - } else { - almostReplacementMode = true; - } - } else { - if (replacementMode) - keyBuffer.append(c); - else { - if (almostReplacementMode) - outBuffer.append('@'); - outBuffer.append(c); - almostReplacementMode = false; - } - } - } - } - return new ByteArrayInputStream(outBuffer.toString().getBytes()); - // return new - // ByteArrayInputStream(outBuffer.toString().getBytes(project. - // getDefaultCharset())); - } - - private String getProcessedString(String fileName, String source) { - if (source.indexOf('$') == -1) - return source; - int loc = -1; - StringBuffer buffer = new StringBuffer(); - boolean replacementMode = false; - for (int i = 0; i < source.length(); i++) { - char c = source.charAt(i); - if (c == '$') { - if (replacementMode) { - String key = source.substring(loc, i); - String value = key.length() == 0 ? "$" : getReplacementString(key); //$NON-NLS-1$ - buffer.append(value); - replacementMode = false; - } else { - replacementMode = true; - loc = i + 1; - continue; - } - } else if (!replacementMode) - buffer.append(c); - } - return buffer.toString(); - } - - public String getReplacementString(String key) { - String result = keys.get(key); - return result != null ? result : key; - } - - public Object getValue(String variable) { - return getReplacementString(variable); - } - -} diff --git a/bundles/org.eclipse.e4.tools/templates/addon.txtjet b/bundles/org.eclipse.e4.tools/templates/addon.txtjet deleted file mode 100644 index 32436d2b..00000000 --- a/bundles/org.eclipse.e4.tools/templates/addon.txtjet +++ /dev/null @@ -1,24 +0,0 @@ -<%@ jet package="org.eclipse.e4.internal.tools.wizards.classes.templates" class="AddonTemplate" imports="org.eclipse.e4.internal.tools.wizards.classes.AbstractNewClassPage.JavaClass" %> -<% JavaClass domainClass = (JavaClass)argument; %> -package <%= domainClass.getPackageFragment().getElementName() %>; - -import javax.inject.Inject; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; - -import org.eclipse.e4.core.services.events.IEventBroker; - -public class <%= domainClass.getName() %> { - @Inject - IEventBroker eventBroker; - - @PostConstruct - void hookListeners() { - // Hook event listeners - } - - @PreDestroy - void unhookListeners() { - // Unhook event listeners - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools/templates/common/$projectName$.product b/bundles/org.eclipse.e4.tools/templates/common/$projectName$.product deleted file mode 100644 index 4d69f3c6..00000000 --- a/bundles/org.eclipse.e4.tools/templates/common/$projectName$.product +++ /dev/null @@ -1,105 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?pde version="3.5"?> - -<product name="@@projectName@@" id="@@projectName@@.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true"> - - <configIni use="default"> - </configIni> - - <launcherArgs> - <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac> - </launcherArgs> - - <windowImages/> - - <plugins> - <plugin id="@@projectName@@"/> - <plugin id="com.ibm.icu"/> - <plugin id="javax.annotation"/> - <plugin id="javax.inject"/> - <plugin id="org.apache.batik.css"/> - <plugin id="org.apache.batik.util"/> - <plugin id="org.apache.batik.util.gui"/> - <plugin id="org.apache.commons.logging"/> - <plugin id="org.eclipse.core.commands"/> - <plugin id="org.eclipse.core.contenttype"/> - <plugin id="org.eclipse.core.databinding"/> - <plugin id="org.eclipse.core.databinding.beans"/> - <plugin id="org.eclipse.core.databinding.observable"/> - <plugin id="org.eclipse.core.databinding.property"/> - <plugin id="org.eclipse.core.expressions"/> - <plugin id="org.eclipse.core.filesystem"/> - <plugin id="org.eclipse.core.filesystem.aix.ppc" fragment="true"/> - <plugin id="org.eclipse.core.filesystem.hpux.ia64_32" fragment="true"/> - <plugin id="org.eclipse.core.filesystem.linux.ppc" fragment="true"/> - <plugin id="org.eclipse.core.filesystem.linux.x86" fragment="true"/> - <plugin id="org.eclipse.core.filesystem.linux.x86_64" fragment="true"/> - <plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/> - <plugin id="org.eclipse.core.filesystem.solaris.sparc" fragment="true"/> - <plugin id="org.eclipse.core.filesystem.win32.x86" fragment="true"/> - <plugin id="org.eclipse.core.filesystem.win32.x86_64" fragment="true"/> - <plugin id="org.eclipse.core.jobs"/> - <plugin id="org.eclipse.core.resources"/> - <plugin id="org.eclipse.core.resources.win32.x86" fragment="true"/> - <plugin id="org.eclipse.core.runtime"/> - <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/> - <plugin id="org.eclipse.e4.core.commands"/> - <plugin id="org.eclipse.e4.core.contexts"/> - <plugin id="org.eclipse.e4.core.di"/> - <plugin id="org.eclipse.e4.core.di.extensions"/> - <plugin id="org.eclipse.e4.core.services"/> - <plugin id="org.eclipse.e4.ui.bindings"/> - <plugin id="org.eclipse.e4.ui.css.core"/> - <plugin id="org.eclipse.e4.ui.css.swt"/> - <plugin id="org.eclipse.e4.ui.css.swt.theme"/> - <plugin id="org.eclipse.e4.ui.di"/> - <plugin id="org.eclipse.e4.ui.model.workbench"/> - <plugin id="org.eclipse.e4.ui.services"/> - <plugin id="org.eclipse.e4.ui.widgets"/> - <plugin id="org.eclipse.e4.ui.workbench"/> - <plugin id="org.eclipse.e4.ui.workbench.renderers.swt"/> - <plugin id="org.eclipse.e4.ui.workbench.swt"/> - <plugin id="org.eclipse.e4.ui.workbench3"/> - <plugin id="org.eclipse.emf.common"/> - <plugin id="org.eclipse.emf.databinding"/> - <plugin id="org.eclipse.emf.ecore"/> - <plugin id="org.eclipse.emf.ecore.change"/> - <plugin id="org.eclipse.emf.ecore.xmi"/> - <plugin id="org.eclipse.equinox.app"/> - <plugin id="org.eclipse.equinox.common"/> - <plugin id="org.eclipse.equinox.concurrent"/> - <plugin id="org.eclipse.equinox.ds"/> - <plugin id="org.eclipse.equinox.event"/> - <plugin id="org.eclipse.equinox.preferences"/> - <plugin id="org.eclipse.equinox.registry"/> - <plugin id="org.eclipse.equinox.util"/> - <plugin id="org.eclipse.jface"/> - <plugin id="org.eclipse.jface.databinding"/> - <plugin id="org.eclipse.osgi"/> - <plugin id="org.eclipse.osgi.services"/> - <plugin id="org.eclipse.swt"/> - <plugin id="org.eclipse.swt.carbon.macosx" fragment="true"/> - <plugin id="org.eclipse.swt.cocoa.macosx" fragment="true"/> - <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/> - <plugin id="org.eclipse.swt.gtk.linux.ppc" fragment="true"/> - <plugin id="org.eclipse.swt.gtk.linux.ppc64" fragment="true"/> - <plugin id="org.eclipse.swt.gtk.linux.s390" fragment="true"/> - <plugin id="org.eclipse.swt.gtk.linux.s390x" fragment="true"/> - <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/> - <plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/> - <plugin id="org.eclipse.swt.gtk.solaris.sparc" fragment="true"/> - <plugin id="org.eclipse.swt.gtk.solaris.x86" fragment="true"/> - <plugin id="org.eclipse.swt.motif.aix.ppc" fragment="true"/> - <plugin id="org.eclipse.swt.motif.hpux.ia64_32" fragment="true"/> - <plugin id="org.eclipse.swt.motif.linux.x86" fragment="true"/> - <plugin id="org.eclipse.swt.motif.solaris.sparc" fragment="true"/> - <plugin id="org.eclipse.swt.photon.qnx.x86" fragment="true"/> - <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/> - <plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/> - <plugin id="org.w3c.css.sac"/> - <plugin id="org.w3c.dom.smil"/> - <plugin id="org.w3c.dom.svg"/> - </plugins> - - -</product> diff --git a/bundles/org.eclipse.e4.tools/templates/common/icons/sample.gif b/bundles/org.eclipse.e4.tools/templates/common/icons/sample.gif Binary files differdeleted file mode 100644 index 34fb3c9d..00000000 --- a/bundles/org.eclipse.e4.tools/templates/common/icons/sample.gif +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools/templates/common/icons/save_edit.gif b/bundles/org.eclipse.e4.tools/templates/common/icons/save_edit.gif Binary files differdeleted file mode 100644 index 499dd0ca..00000000 --- a/bundles/org.eclipse.e4.tools/templates/common/icons/save_edit.gif +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools/templates/css/default.css b/bundles/org.eclipse.e4.tools/templates/css/default.css deleted file mode 100644 index e69de29b..00000000 --- a/bundles/org.eclipse.e4.tools/templates/css/default.css +++ /dev/null diff --git a/bundles/org.eclipse.e4.tools/templates/handler.txtjet b/bundles/org.eclipse.e4.tools/templates/handler.txtjet deleted file mode 100644 index 7dfd8fd6..00000000 --- a/bundles/org.eclipse.e4.tools/templates/handler.txtjet +++ /dev/null @@ -1,23 +0,0 @@ -<%@ jet package="org.eclipse.e4.internal.tools.wizards.classes.templates" class="HandlerTemplate" imports="org.eclipse.e4.internal.tools.wizards.classes.NewHandlerClassWizard.HandlerClass" %> -<% HandlerClass domainClass = (HandlerClass)argument; %> -package <%= domainClass.getPackageFragment().getElementName() %>; - -import org.eclipse.e4.core.di.annotations.Execute; -<% if( domainClass.isUseCanExecute() ) { %> -import org.eclipse.e4.core.di.annotations.CanExecute; -<% } %> - -public class <%= domainClass.getName() %> { - @Execute - public void <%= domainClass.getExecuteMethodName() %>() { - //TODO Your code goes here - } - <% if( domainClass.isUseCanExecute() ) { %> - - @CanExecute - public boolean <%= domainClass.getCanExecuteMethodName() %>() { - //TODO Your code goes here - return true; - } - <% } %> -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools/templates/part.txtjet b/bundles/org.eclipse.e4.tools/templates/part.txtjet deleted file mode 100644 index 03a2b1b6..00000000 --- a/bundles/org.eclipse.e4.tools/templates/part.txtjet +++ /dev/null @@ -1,48 +0,0 @@ -<%@ jet package="org.eclipse.e4.internal.tools.wizards.classes.templates" class="PartTemplate" imports="org.eclipse.e4.internal.tools.wizards.classes.NewPartClassWizard.PartClass" %> -<% PartClass domainClass = (PartClass)argument; %> -package <%= domainClass.getPackageFragment().getElementName() %>; - -import javax.inject.Inject; -<% if( domainClass.isUsePostConstruct() ) { %> -import javax.annotation.PostConstruct; -<% } %> -<% if( domainClass.isUsePredestroy() ) { %> -import javax.annotation.PreDestroy; -<% } %> -<% if( domainClass.isUseFocus() ) { %> -import org.eclipse.e4.ui.di.Focus; -<% } %> -<% if( domainClass.isUsePersist() ) { %> -import org.eclipse.e4.ui.di.Persist; -<% } %> - -public class <%= domainClass.getName() %> { - @Inject - public <%= domainClass.getName() %>() { - //TODO Your code here - } - <% if( domainClass.isUsePostConstruct() ) { %> - @PostConstruct - public void <%= domainClass.getPostConstructMethodName() %>() { - //TODO Your code here - } - <% } %> - <% if( domainClass.isUsePredestroy() ) { %> - @PreDestroy - public void <%= domainClass.getPreDestroyMethodName() %>() { - //TODO Your code here - } - <% } %> - <% if( domainClass.isUseFocus() ) { %> - @Focus - public void <%= domainClass.getFocusMethodName() %>() { - //TODO Your code here - } - <% } %> - <% if( domainClass.isUsePersist() ) { %> - @Persist - public void <%= domainClass.getPersistMethodName() %>() { - //TODO Your code here - } - <% } %> -}
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools/templates/src/handlers/AboutHandler.java b/bundles/org.eclipse.e4.tools/templates/src/handlers/AboutHandler.java deleted file mode 100644 index c9f6a86a..00000000 --- a/bundles/org.eclipse.e4.tools/templates/src/handlers/AboutHandler.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 IBM Corporation 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package @@packageName@@; - -import javax.inject.Named; - -import org.eclipse.e4.core.di.annotations.Execute; -import org.eclipse.e4.ui.services.IServiceConstants; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.swt.widgets.Shell; - -public class AboutHandler { - @Execute - public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell) { - MessageDialog.openInformation(shell, "About", "e4 Application example."); - } -} diff --git a/bundles/org.eclipse.e4.tools/templates/src/handlers/OpenHandler.java b/bundles/org.eclipse.e4.tools/templates/src/handlers/OpenHandler.java deleted file mode 100644 index 46d423ce..00000000 --- a/bundles/org.eclipse.e4.tools/templates/src/handlers/OpenHandler.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 IBM Corporation 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package @@packageName@@; - -import java.lang.reflect.InvocationTargetException; - -import javax.inject.Named; - -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.core.di.annotations.Execute; -import org.eclipse.e4.ui.services.IServiceConstants; -import org.eclipse.swt.widgets.FileDialog; -import org.eclipse.swt.widgets.Shell; - -public class OpenHandler { - - @Execute - public void execute( - IEclipseContext context, - @Named(IServiceConstants.ACTIVE_SHELL) Shell shell) - throws InvocationTargetException, InterruptedException { - FileDialog dialog = new FileDialog(shell); - dialog.open(); - } -} diff --git a/bundles/org.eclipse.e4.tools/templates/src/handlers/QuitHandler.java b/bundles/org.eclipse.e4.tools/templates/src/handlers/QuitHandler.java deleted file mode 100644 index 0c1337bb..00000000 --- a/bundles/org.eclipse.e4.tools/templates/src/handlers/QuitHandler.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 IBM Corporation 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package @@packageName@@; - -import java.lang.reflect.InvocationTargetException; - -import javax.inject.Named; - -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.core.di.annotations.Execute; -import org.eclipse.e4.ui.services.IServiceConstants; -import org.eclipse.e4.ui.workbench.IWorkbench; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.swt.widgets.Shell; - -public class QuitHandler { - @Execute - public void execute(IWorkbench workbench, IEclipseContext context, - @Named(IServiceConstants.ACTIVE_SHELL) Shell shell) - throws InvocationTargetException, InterruptedException { - if (MessageDialog.openConfirm(shell, "Confirmation", - "Do you want to exit?")) { - workbench.close(); - } - } -} diff --git a/bundles/org.eclipse.e4.tools/templates/src/handlers/SaveHandler.java b/bundles/org.eclipse.e4.tools/templates/src/handlers/SaveHandler.java deleted file mode 100644 index c1e49cdf..00000000 --- a/bundles/org.eclipse.e4.tools/templates/src/handlers/SaveHandler.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 IBM Corporation 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package @@packageName@@; - -import java.lang.reflect.InvocationTargetException; - -import javax.inject.Named; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.e4.core.contexts.ContextInjectionFactory; -import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.core.di.IDisposable; -import org.eclipse.e4.core.di.annotations.Execute; -import org.eclipse.e4.core.di.annotations.CanExecute; -import org.eclipse.e4.ui.model.application.MContribution; -import org.eclipse.e4.ui.model.application.ui.MDirtyable; -import org.eclipse.e4.ui.services.IServiceConstants; -//import org.eclipse.e4.ui.workbench.Persist; -import org.eclipse.jface.dialogs.ProgressMonitorDialog; -import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.swt.widgets.Shell; - -public class SaveHandler { - @CanExecute - public boolean canExecute( - @Named(IServiceConstants.ACTIVE_PART) MDirtyable dirtyable) { - if (dirtyable == null) { - return false; - } - return dirtyable.isDirty(); - } - - @Execute - public void execute( - IEclipseContext context, - @Named(IServiceConstants.ACTIVE_SHELL) Shell shell, - @Named(IServiceConstants.ACTIVE_PART) final MContribution contribution) - throws InvocationTargetException, InterruptedException { - final IEclipseContext pmContext = context.createChild(); - - ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell); - dialog.open(); - dialog.run(true, true, new IRunnableWithProgress() { - public void run(IProgressMonitor monitor) - throws InvocationTargetException, InterruptedException { - pmContext.set(IProgressMonitor.class.getName(), monitor); - if (contribution != null) { - Object clientObject = contribution.getObject(); -// ContextInjectionFactory.invoke(clientObject, Persist.class, //$NON-NLS-1$ -// pmContext, null); - } - } - }); - - if (pmContext instanceof IDisposable) { - ((IDisposable) pmContext).dispose(); - } - } -} diff --git a/features/org.eclipse.e4.core.tools.feature/.project b/features/org.eclipse.e4.core.tools.feature/.project deleted file mode 100644 index d0fa7e44..00000000 --- a/features/org.eclipse.e4.core.tools.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.e4.core.tools.feature</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.pde.FeatureBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.FeatureNature</nature> - </natures> -</projectDescription> diff --git a/features/org.eclipse.e4.core.tools.feature/build.properties b/features/org.eclipse.e4.core.tools.feature/build.properties deleted file mode 100644 index b3a611b5..00000000 --- a/features/org.eclipse.e4.core.tools.feature/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -bin.includes = feature.xml,\ - feature.properties diff --git a/features/org.eclipse.e4.core.tools.feature/feature.properties b/features/org.eclipse.e4.core.tools.feature/feature.properties deleted file mode 100755 index 41626957..00000000 --- a/features/org.eclipse.e4.core.tools.feature/feature.properties +++ /dev/null @@ -1,149 +0,0 @@ -############################################################################### -# Copyright (c) 2000, 2009 IBM Corporation 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: -# IBM Corporation - initial API and implementation -############################################################################### -# feature.properties -# contains externalized strings for feature.xml -# "%foo" in feature.xml corresponds to the key "foo" in this file -# java.io.Properties file (ISO 8859-1 with "\" escapes) -# This file should be translated. - -# "featureName" property - name of the feature -featureName=Eclipse e4 Tools (Incubation) - -# "providerName" property - name of the company that provides the feature -providerName=Eclipse.org - -# "updateSiteName" property - label for the update site -updateSiteName=The Eclipse Project Updates - -# "secondarySiteName" property - label for the update site -secondaryUpdateSiteName=Ganymede Discovery Site - - -# "description" property - description of the feature -description=Eclipse e4 Modeltooling - -# "copyright" property - text of the "Feature Update Copyright" -copyright=\ -Copyright (c) 2010 BestSolution.at, Soyatec and others.\n\ -All rights reserved. This program and the accompanying materials\n\ -are made available under the terms of the Eclipse Public License v1.0\n\ -which accompanies this distribution, and is available at\n\ -http://www.eclipse.org/legal/epl-v10.html\n\ -\n\ -Contributors:\n\ - BestSolution.at - initial API and implementation\n\ - Soytec - initial API and implementation\n -################ end of copyright property #################################### - -# "licenseURL" property - URL of the "Feature License" -# do not translate value - just change to point to a locale-specific HTML page -licenseURL=license.html - -# "license" property - text of the "Feature Update License" -# should be plain text version of license agreement pointed to be "licenseURL" -license=\ -ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\ -March 17, 2005\n\ -\n\ -Usage Of Content\n\ -\n\ -THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ -OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ -USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ -AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ -NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ -AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ -AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ -OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ -TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ -OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ -BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ -\n\ -Applicable Licenses\n\ -\n\ -Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\ -is provided to you under the terms and conditions of the Eclipse Public\n\ -License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\ -Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ -For purposes of the EPL, "Program" will mean the Content.\n\ -\n\ -Content includes, but is not limited to, source code, object code,\n\ -documentation and other files maintained in the Eclipse.org CVS\n\ -repository ("Repository") in CVS modules ("Modules") and made available\n\ -as downloadable archives ("Downloads").\n\ -\n\ - - Content may be structured and packaged into modules to facilitate delivering,\n\ - extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ - plug-in fragments ("Fragments"), and features ("Features").\n\ - - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\ - in a directory named "plugins".\n\ - - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ - Each Feature may be packaged as a sub-directory in a directory named "features".\n\ - Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ - numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ - - Features may also include other Features ("Included Features"). Within a Feature, files\n\ - named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ -\n\ -Features may also include other Features ("Included Features"). Files named\n\ -"feature.xml" may contain a list of the names and version numbers of\n\ -Included Features.\n\ -\n\ -The terms and conditions governing Plug-ins and Fragments should be\n\ -contained in files named "about.html" ("Abouts"). The terms and\n\ -conditions governing Features and Included Features should be contained\n\ -in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ -Licenses may be located in any directory of a Download or Module\n\ -including, but not limited to the following locations:\n\ -\n\ - - The top-level (root) directory\n\ - - Plug-in and Fragment directories\n\ - - Inside Plug-ins and Fragments packaged as JARs\n\ - - Sub-directories of the directory named "src" of certain Plug-ins\n\ - - Feature directories\n\ -\n\ -Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ -Eclipse Update Manager, you must agree to a license ("Feature Update\n\ -License") during the installation process. If the Feature contains\n\ -Included Features, the Feature Update License should either provide you\n\ -with the terms and conditions governing the Included Features or inform\n\ -you where you can locate them. Feature Update Licenses may be found in\n\ -the "license" property of files named "feature.properties". Such Abouts,\n\ -Feature Licenses and Feature Update Licenses contain the terms and\n\ -conditions (or references to such terms and conditions) that govern your\n\ -use of the associated Content in that directory.\n\ -\n\ -THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\ -TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ -SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ -\n\ - - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ - - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ - - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ - - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\ - - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\ - - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ -\n\ -IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ -TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\ -is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ -govern that particular Content.\n\ -\n\ -Cryptography\n\ -\n\ -Content may contain encryption software. The country in which you are\n\ -currently may have restrictions on the import, possession, and use,\n\ -and/or re-export to another country, of encryption software. BEFORE\n\ -using any encryption software, please check the country's laws,\n\ -regulations and policies concerning the import, possession, or use,\n\ -and re-export of encryption software, to see if this is permitted.\n\ -\n\ -Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n -########### end of license property ########################################## diff --git a/features/org.eclipse.e4.core.tools.feature/feature.xml b/features/org.eclipse.e4.core.tools.feature/feature.xml deleted file mode 100644 index 1ce569e1..00000000 --- a/features/org.eclipse.e4.core.tools.feature/feature.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<feature - id="org.eclipse.e4.core.tools.feature" - label="%featureName" - version="0.9.0.qualifier" - provider-name="%providerName"> - - <description> - %description - </description> - - <copyright> - %copyright - </copyright> - - <license url="%licenseURL"> - %license - </license> - - <plugin - id="org.eclipse.e4.tools.emf.editor3x" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.eclipse.e4.tools.emf.ui" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.eclipse.e4.tools.compat" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.eclipse.e4.tools.services" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.eclipse.e4.tools.emf.liveeditor" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.eclipse.e4.tools" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - -</feature> diff --git a/features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/eclipse_update_120.jpg Binary files differdeleted file mode 100755 index bfdf708a..00000000 --- a/features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/eclipse_update_120.jpg +++ /dev/null diff --git a/features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/epl-v10.html deleted file mode 100755 index ed4b1966..00000000 --- a/features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/epl-v10.html +++ /dev/null @@ -1,328 +0,0 @@ -<html xmlns:o="urn:schemas-microsoft-com:office:office" -xmlns:w="urn:schemas-microsoft-com:office:word" -xmlns="http://www.w3.org/TR/REC-html40"> - -<head> -<meta http-equiv=Content-Type content="text/html; charset=windows-1252"> -<meta name=ProgId content=Word.Document> -<meta name=Generator content="Microsoft Word 9"> -<meta name=Originator content="Microsoft Word 9"> -<link rel=File-List -href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml"> -<title>Eclipse Public License - Version 1.0</title> -<!--[if gte mso 9]><xml> - <o:DocumentProperties> - <o:Revision>2</o:Revision> - <o:TotalTime>3</o:TotalTime> - <o:Created>2004-03-05T23:03:00Z</o:Created> - <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved> - <o:Pages>4</o:Pages> - <o:Words>1626</o:Words> - <o:Characters>9270</o:Characters> - <o:Lines>77</o:Lines> - <o:Paragraphs>18</o:Paragraphs> - <o:CharactersWithSpaces>11384</o:CharactersWithSpaces> - <o:Version>9.4402</o:Version> - </o:DocumentProperties> -</xml><![endif]--><!--[if gte mso 9]><xml> - <w:WordDocument> - <w:TrackRevisions/> - </w:WordDocument> -</xml><![endif]--> -<style> -<!-- - /* Font Definitions */ -@font-face - {font-family:Tahoma; - panose-1:2 11 6 4 3 5 4 4 2 4; - mso-font-charset:0; - mso-generic-font-family:swiss; - mso-font-pitch:variable; - mso-font-signature:553679495 -2147483648 8 0 66047 0;} - /* Style Definitions */ -p.MsoNormal, li.MsoNormal, div.MsoNormal - {mso-style-parent:""; - margin:0in; - margin-bottom:.0001pt; - mso-pagination:widow-orphan; - font-size:12.0pt; - font-family:"Times New Roman"; - mso-fareast-font-family:"Times New Roman";} -p - {margin-right:0in; - mso-margin-top-alt:auto; - mso-margin-bottom-alt:auto; - margin-left:0in; - mso-pagination:widow-orphan; - font-size:12.0pt; - font-family:"Times New Roman"; - mso-fareast-font-family:"Times New Roman";} -p.BalloonText, li.BalloonText, div.BalloonText - {mso-style-name:"Balloon Text"; - margin:0in; - margin-bottom:.0001pt; - mso-pagination:widow-orphan; - font-size:8.0pt; - font-family:Tahoma; - mso-fareast-font-family:"Times New Roman";} -@page Section1 - {size:8.5in 11.0in; - margin:1.0in 1.25in 1.0in 1.25in; - mso-header-margin:.5in; - mso-footer-margin:.5in; - mso-paper-source:0;} -div.Section1 - {page:Section1;} ---> -</style> -</head> - -<body lang=EN-US style='tab-interval:.5in'> - -<div class=Section1> - -<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b> -</p> - -<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER -THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, -REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE -OF THIS AGREEMENT.</span> </p> - -<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p> - -<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) -in the case of the initial Contributor, the initial code and documentation -distributed under this Agreement, and<br clear=left> -b) in the case of each subsequent Contributor:</span></p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i) -changes to the Program, and</span></p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii) -additions to the Program;</span></p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where -such changes and/or additions to the Program originate from and are distributed -by that particular Contributor. A Contribution 'originates' from a Contributor -if it was added to the Program by such Contributor itself or anyone acting on -such Contributor's behalf. Contributions do not include additions to the -Program which: (i) are separate modules of software distributed in conjunction -with the Program under their own license agreement, and (ii) are not derivative -works of the Program. </span></p> - -<p><span style='font-size:10.0pt'>"Contributor" means any person or -entity that distributes the Program.</span> </p> - -<p><span style='font-size:10.0pt'>"Licensed Patents " mean patent -claims licensable by a Contributor which are necessarily infringed by the use -or sale of its Contribution alone or when combined with the Program. </span></p> - -<p><span style='font-size:10.0pt'>"Program" means the Contributions -distributed in accordance with this Agreement.</span> </p> - -<p><span style='font-size:10.0pt'>"Recipient" means anyone who -receives the Program under this Agreement, including all Contributors.</span> </p> - -<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) -Subject to the terms of this Agreement, each Contributor hereby grants Recipient -a non-exclusive, worldwide, royalty-free copyright license to<span -style='color:red'> </span>reproduce, prepare derivative works of, publicly -display, publicly perform, distribute and sublicense the Contribution of such -Contributor, if any, and such derivative works, in source code and object code -form.</span></p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) -Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free -patent license under Licensed Patents to make, use, sell, offer to sell, import -and otherwise transfer the Contribution of such Contributor, if any, in source -code and object code form. This patent license shall apply to the combination -of the Contribution and the Program if, at the time the Contribution is added -by the Contributor, such addition of the Contribution causes such combination -to be covered by the Licensed Patents. The patent license shall not apply to -any other combinations which include the Contribution. No hardware per se is -licensed hereunder. </span></p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c) -Recipient understands that although each Contributor grants the licenses to its -Contributions set forth herein, no assurances are provided by any Contributor -that the Program does not infringe the patent or other intellectual property -rights of any other entity. Each Contributor disclaims any liability to Recipient -for claims brought by any other entity based on infringement of intellectual -property rights or otherwise. As a condition to exercising the rights and -licenses granted hereunder, each Recipient hereby assumes sole responsibility -to secure any other intellectual property rights needed, if any. For example, -if a third party patent license is required to allow Recipient to distribute -the Program, it is Recipient's responsibility to acquire that license before -distributing the Program.</span></p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d) -Each Contributor represents that to its knowledge it has sufficient copyright -rights in its Contribution, if any, to grant the copyright license set forth in -this Agreement. </span></p> - -<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p> - -<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the -Program in object code form under its own license agreement, provided that:</span> -</p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) -it complies with the terms and conditions of this Agreement; and</span></p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) -its license agreement:</span></p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i) -effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title -and non-infringement, and implied warranties or conditions of merchantability -and fitness for a particular purpose; </span></p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii) -effectively excludes on behalf of all Contributors all liability for damages, -including direct, indirect, special, incidental and consequential damages, such -as lost profits; </span></p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii) -states that any provisions which differ from this Agreement are offered by that -Contributor alone and not by any other party; and</span></p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv) -states that source code for the Program is available from such Contributor, and -informs licensees how to obtain it in a reasonable manner on or through a -medium customarily used for software exchange.<span style='color:blue'> </span></span></p> - -<p><span style='font-size:10.0pt'>When the Program is made available in source -code form:</span> </p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a) -it must be made available under this Agreement; and </span></p> - -<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a -copy of this Agreement must be included with each copy of the Program. </span></p> - -<p><span style='font-size:10.0pt'>Contributors may not remove or alter any -copyright notices contained within the Program. </span></p> - -<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the -originator of its Contribution, if any, in a manner that reasonably allows -subsequent Recipients to identify the originator of the Contribution. </span></p> - -<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p> - -<p><span style='font-size:10.0pt'>Commercial distributors of software may -accept certain responsibilities with respect to end users, business partners -and the like. While this license is intended to facilitate the commercial use -of the Program, the Contributor who includes the Program in a commercial -product offering should do so in a manner which does not create potential -liability for other Contributors. Therefore, if a Contributor includes the -Program in a commercial product offering, such Contributor ("Commercial -Contributor") hereby agrees to defend and indemnify every other -Contributor ("Indemnified Contributor") against any losses, damages and -costs (collectively "Losses") arising from claims, lawsuits and other -legal actions brought by a third party against the Indemnified Contributor to -the extent caused by the acts or omissions of such Commercial Contributor in -connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor -to control, and cooperate with the Commercial Contributor in, the defense and -any related settlement negotiations. The Indemnified Contributor may participate -in any such claim at its own expense.</span> </p> - -<p><span style='font-size:10.0pt'>For example, a Contributor might include the -Program in a commercial product offering, Product X. That Contributor is then a -Commercial Contributor. If that Commercial Contributor then makes performance -claims, or offers warranties related to Product X, those performance claims and -warranties are such Commercial Contributor's responsibility alone. Under this -section, the Commercial Contributor would have to defend claims against the -other Contributors related to those performance claims and warranties, and if a -court requires any other Contributor to pay any damages as a result, the -Commercial Contributor must pay those damages.</span> </p> - -<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p> - -<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS -AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, -WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely -responsible for determining the appropriateness of using and distributing the -Program and assumes all risks associated with its exercise of rights under this -Agreement , including but not limited to the risks and costs of program errors, -compliance with applicable laws, damage to or loss of data, programs or -equipment, and unavailability or interruption of operations. </span></p> - -<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p> - -<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS -AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF -THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGES.</span> </p> - -<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p> - -<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid -or unenforceable under applicable law, it shall not affect the validity or -enforceability of the remainder of the terms of this Agreement, and without -further action by the parties hereto, such provision shall be reformed to the -minimum extent necessary to make such provision valid and enforceable.</span> </p> - -<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation -against any entity (including a cross-claim or counterclaim in a lawsuit) -alleging that the Program itself (excluding combinations of the Program with -other software or hardware) infringes such Recipient's patent(s), then such -Recipient's rights granted under Section 2(b) shall terminate as of the date -such litigation is filed. </span></p> - -<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement -shall terminate if it fails to comply with any of the material terms or -conditions of this Agreement and does not cure such failure in a reasonable -period of time after becoming aware of such noncompliance. If all Recipient's -rights under this Agreement terminate, Recipient agrees to cease use and -distribution of the Program as soon as reasonably practicable. However, -Recipient's obligations under this Agreement and any licenses granted by -Recipient relating to the Program shall continue and survive. </span></p> - -<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute -copies of this Agreement, but in order to avoid inconsistency the Agreement is -copyrighted and may only be modified in the following manner. The Agreement -Steward reserves the right to publish new versions (including revisions) of -this Agreement from time to time. No one other than the Agreement Steward has -the right to modify this Agreement. The Eclipse Foundation is the initial -Agreement Steward. The Eclipse Foundation may assign the responsibility to -serve as the Agreement Steward to a suitable separate entity. Each new version -of the Agreement will be given a distinguishing version number. The Program -(including Contributions) may always be distributed subject to the version of -the Agreement under which it was received. In addition, after a new version of -the Agreement is published, Contributor may elect to distribute the Program -(including its Contributions) under the new version. Except as expressly stated -in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to -the intellectual property of any Contributor under this Agreement, whether -expressly, by implication, estoppel or otherwise. All rights in the Program not -expressly granted under this Agreement are reserved.</span> </p> - -<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the -State of New York and the intellectual property laws of the United States of -America. No party to this Agreement will bring a legal action under this -Agreement more than one year after the cause of action arose. Each party waives -its rights to a jury trial in any resulting litigation.</span> </p> - -<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> - -</div> - -</body> - -</html>
\ No newline at end of file diff --git a/features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/feature.properties deleted file mode 100755 index 7b266ca8..00000000 --- a/features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/feature.properties +++ /dev/null @@ -1,144 +0,0 @@ -############################################################################### -# Copyright (c) 2000, 2007 IBM Corporation 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: -# IBM Corporation - initial API and implementation -############################################################################### -# feature.properties -# contains externalized strings for feature.xml -# "%foo" in feature.xml corresponds to the key "foo" in this file -# java.io.Properties file (ISO 8859-1 with "\" escapes) -# This file should be translated. - -# "featureName" property - name of the feature -featureName=Eclipse e4 Tools Source (Incubation) - -# "providerName" property - name of the company that provides the feature -providerName=Eclipse.org - -# "updateSiteName" property - label for the update site -updateSiteName=The Eclipse Project Updates - -# "description" property - description of the feature -description=Source code zips for Eclipse E4 initiative. - -# "copyright" property - text of the "Feature Update Copyright" -copyright=\ -Copyright (c) 2000, 2007 IBM Corporation and others.\n\ -All rights reserved. This program and the accompanying materials\n\ -are made available under the terms of the Eclipse Public License v1.0\n\ -which accompanies this distribution, and is available at\n\ -http://www.eclipse.org/legal/epl-v10.html\n\ -\n\ -Contributors:\n\ - IBM Corporation - initial API and implementation\n -################ end of copyright property #################################### - -# "licenseURL" property - URL of the "Feature License" -# do not translate value - just change to point to a locale-specific HTML page -licenseURL=license.html - -# "license" property - text of the "Feature Update License" -# should be plain text version of license agreement pointed to be "licenseURL" -license=\ -ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\ -March 17, 2005\n\ -\n\ -Usage Of Content\n\ -\n\ -THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ -OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ -USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ -AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ -NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ -AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ -AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ -OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ -TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ -OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ -BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ -\n\ -Applicable Licenses\n\ -\n\ -Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\ -is provided to you under the terms and conditions of the Eclipse Public\n\ -License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\ -Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ -For purposes of the EPL, "Program" will mean the Content.\n\ -\n\ -Content includes, but is not limited to, source code, object code,\n\ -documentation and other files maintained in the Eclipse.org CVS\n\ -repository ("Repository") in CVS modules ("Modules") and made available\n\ -as downloadable archives ("Downloads").\n\ -\n\ - - Content may be structured and packaged into modules to facilitate delivering,\n\ - extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ - plug-in fragments ("Fragments"), and features ("Features").\n\ - - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\ - in a directory named "plugins".\n\ - - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ - Each Feature may be packaged as a sub-directory in a directory named "features".\n\ - Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ - numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ - - Features may also include other Features ("Included Features"). Within a Feature, files\n\ - named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ -\n\ -Features may also include other Features ("Included Features"). Files named\n\ -"feature.xml" may contain a list of the names and version numbers of\n\ -Included Features.\n\ -\n\ -The terms and conditions governing Plug-ins and Fragments should be\n\ -contained in files named "about.html" ("Abouts"). The terms and\n\ -conditions governing Features and Included Features should be contained\n\ -in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ -Licenses may be located in any directory of a Download or Module\n\ -including, but not limited to the following locations:\n\ -\n\ - - The top-level (root) directory\n\ - - Plug-in and Fragment directories\n\ - - Inside Plug-ins and Fragments packaged as JARs\n\ - - Sub-directories of the directory named "src" of certain Plug-ins\n\ - - Feature directories\n\ -\n\ -Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ -Eclipse Update Manager, you must agree to a license ("Feature Update\n\ -License") during the installation process. If the Feature contains\n\ -Included Features, the Feature Update License should either provide you\n\ -with the terms and conditions governing the Included Features or inform\n\ -you where you can locate them. Feature Update Licenses may be found in\n\ -the "license" property of files named "feature.properties". Such Abouts,\n\ -Feature Licenses and Feature Update Licenses contain the terms and\n\ -conditions (or references to such terms and conditions) that govern your\n\ -use of the associated Content in that directory.\n\ -\n\ -THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\ -TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ -SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ -\n\ - - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ - - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ - - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ - - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\ - - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\ - - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ -\n\ -IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ -TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\ -is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ -govern that particular Content.\n\ -\n\ -Cryptography\n\ -\n\ -Content may contain encryption software. The country in which you are\n\ -currently may have restrictions on the import, possession, and use,\n\ -and/or re-export to another country, of encryption software. BEFORE\n\ -using any encryption software, please check the country's laws,\n\ -regulations and policies concerning the import, possession, or use,\n\ -and re-export of encryption software, to see if this is permitted.\n\ -\n\ -Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n -########### end of license property ########################################## diff --git a/features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/license.html b/features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/license.html deleted file mode 100755 index c6af966b..00000000 --- a/features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/license.html +++ /dev/null @@ -1,79 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> -<html> -<head> -<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"> -<title>Eclipse.org Software User Agreement</title> -</head> - -<body lang="EN-US" link=blue vlink=purple> -<h2>Eclipse Foundation Software User Agreement</h2> -<p>March 17, 2005</p> - -<h3>Usage Of Content</h3> - -<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS - (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND - CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE - OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR - NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND - CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p> - -<h3>Applicable Licenses</h3> - -<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 - ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. - For purposes of the EPL, "Program" will mean the Content.</p> - -<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS - modules ("Modules") and made available as downloadable archives ("Downloads").</p> - -<ul> - <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li> - <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li> - <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins - and/or Fragments associated with that Feature.</li> - <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li> -</ul> - -<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and -Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module -including, but not limited to the following locations:</p> - -<ul> - <li>The top-level (root) directory</li> - <li>Plug-in and Fragment directories</li> - <li>Inside Plug-ins and Fragments packaged as JARs</li> - <li>Sub-directories of the directory named "src" of certain Plug-ins</li> - <li>Feature directories</li> -</ul> - -<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the -installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or -inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. -Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in -that directory.</p> - -<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE -OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p> - -<ul> - <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li> - <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li> - <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li> - <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li> - <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li> - <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li> -</ul> - -<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please -contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p> - -<h3>Cryptography</h3> - -<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to - another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, - possession, or use, and re-export of encryption software, to see if this is permitted.</p> - -<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small> -</body> -</html> diff --git a/features/org.eclipse.e4.core.tools.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.e4.core.tools.feature/sourceTemplatePlugin/build.properties deleted file mode 100755 index cdb3ab38..00000000 --- a/features/org.eclipse.e4.core.tools.feature/sourceTemplatePlugin/build.properties +++ /dev/null @@ -1,12 +0,0 @@ -############################################################################### -# Copyright (c) 2000, 2006 IBM Corporation 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: -# IBM Corporation - initial API and implementation -############################################################################### -bin.includes = plugin.xml, src/**, META-INF/ -sourcePlugin = true |