From 5b5615f51f149e0bec7d484e087029c4da99f2f5 Mon Sep 17 00:00:00 2001 From: Benoit Maggi Date: Tue, 26 Sep 2017 13:47:38 +0200 Subject: [Quality] Improve example for comment editor - no bug since bugzilla down - extract Bundle Vendor and Bundle Name - replace deprecated api - remove unused import Change-Id: Ic9b8371b166484c29c4b9522fc673d96d2711661 Signed-off-by: Benoit Maggi --- .../META-INF/MANIFEST.MF | 7 ++++--- .../build.properties | 3 ++- .../plugin.properties | 5 ++++- .../comment/editor/newresource/handler/CommentEditorHandler.java | 2 +- .../newresource/modelresource/TextEditorModelCommentResource.java | 4 ---- .../META-INF/MANIFEST.MF | 7 ++++--- .../build.properties | 3 ++- .../plugin.properties | 4 +++- .../comment/editor/sharedresource/editor/PapyrusCommentEditor.java | 3 +-- .../editor/sharedresource/handler/CommentEditorHandler.java | 5 ++--- 10 files changed, 23 insertions(+), 20 deletions(-) (limited to 'examples') diff --git a/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/META-INF/MANIFEST.MF b/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/META-INF/MANIFEST.MF index ba8423aaa3f..a4f7e4855f0 100644 --- a/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/META-INF/MANIFEST.MF +++ b/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/META-INF/MANIFEST.MF @@ -16,14 +16,15 @@ Require-Bundle: org.eclipse.ui, org.eclipse.gmf.runtime.emf.type.core, org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="[3.0.0,4.0.0)", org.eclipse.ui.ide;bundle-version="3.10.0" -Bundle-Vendor: Eclipse Modeling Project +Bundle-Vendor: %Bundle-Vendor Bundle-ActivationPolicy: lazy Bundle-Version: 1.1.0.qualifier -Bundle-Name: Papyrus Comment Editor Example (Incubation) +Bundle-Localization: plugin +Bundle-Name: %Bundle-Name Bundle-ManifestVersion: 2 Bundle-Activator: org.eclipse.papyrus.example.uml.comment.editor.newre source.Activator Bundle-SymbolicName: org.eclipse.papyrus.example.uml.comment.editor.ne wresource;singleton:=true Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Description: %pluginDescription +Bundle-Description: %Bundle-Description diff --git a/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/build.properties b/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/build.properties index 274b1327ea1..d5b16c20732 100644 --- a/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/build.properties +++ b/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/build.properties @@ -5,5 +5,6 @@ bin.includes = META-INF/,\ plugin.xml,\ icons/,\ build.properties,\ - about.html + about.html,\ + plugin.properties src.includes = about.html diff --git a/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/plugin.properties b/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/plugin.properties index 0bf1dafb010..3c206cb810b 100644 --- a/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/plugin.properties +++ b/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/plugin.properties @@ -9,4 +9,7 @@ # Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - initial API and implementation ##################################################################################) -pluginDescription=This plugin provides a editor for uml.Comment. The informations are stored in a new file : .comment \ No newline at end of file +Bundle-Description=This plugin provides a editor for uml.Comment. The informations are stored in a new file : .comment +Bundle-Name=Papyrus Comment New Resource Editor Example (Incubation) +Bundle-Vendor=Eclipse Modeling Project + diff --git a/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/handler/CommentEditorHandler.java b/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/handler/CommentEditorHandler.java index 9c568b671eb..43609dd2c13 100644 --- a/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/handler/CommentEditorHandler.java +++ b/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/handler/CommentEditorHandler.java @@ -30,7 +30,7 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.emf.workspace.AbstractEMFOperation; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.papyrus.commands.CheckedOperationHistory; +import org.eclipse.papyrus.infra.emf.gmf.command.CheckedOperationHistory; import org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance; import org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrustextinstanceFactory; import org.eclipse.papyrus.example.uml.comment.editor.newresource.Activator; diff --git a/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/modelresource/TextEditorModelCommentResource.java b/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/modelresource/TextEditorModelCommentResource.java index 4ca8c4beb3a..f1264f6a55f 100644 --- a/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/modelresource/TextEditorModelCommentResource.java +++ b/examples/uml/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/modelresource/TextEditorModelCommentResource.java @@ -15,7 +15,6 @@ package org.eclipse.papyrus.example.uml.comment.editor.newresource.modelresource import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance; import org.eclipse.papyrus.infra.core.resource.AbstractDynamicModel; import org.eclipse.papyrus.infra.core.resource.IModel; @@ -103,13 +102,10 @@ public class TextEditorModelCommentResource extends AbstractDynamicModel