Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2016-11-24 12:57:00 +0000
committervincent lorenzo2016-11-29 11:02:37 +0000
commit9de7dd08c546fb2510b6061ed024103b4a77a793 (patch)
tree1abbb39f9eafea7cf583da6bde8f65542fe41b4e /tests/framework/org.eclipse.papyrus.tests.framework.editor
parent3ed639ecef256da3eeff86d3b428720561f362df (diff)
downloadorg.eclipse.papyrus-9de7dd08c546fb2510b6061ed024103b4a77a793.tar.gz
org.eclipse.papyrus-9de7dd08c546fb2510b6061ed024103b4a77a793.tar.xz
org.eclipse.papyrus-9de7dd08c546fb2510b6061ed024103b4a77a793.zip
Bug 496905: [Diagram][ModelExplorer][Table][Dialog] Papyrus must integrate
the internationalization feature provided by UML. https://bugs.eclipse.org/bugs/show_bug.cgi?id=496905 JUnit tests for internationalization: infra + UML. Change-Id: I68393120387178e9f3f1017ed20858bc2ad48c2b Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@all4tec.net>
Diffstat (limited to 'tests/framework/org.eclipse.papyrus.tests.framework.editor')
-rw-r--r--tests/framework/org.eclipse.papyrus.tests.framework.editor/META-INF/MANIFEST.MF3
-rw-r--r--tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsEditor.java129
2 files changed, 47 insertions, 85 deletions
diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/META-INF/MANIFEST.MF b/tests/framework/org.eclipse.papyrus.tests.framework.editor/META-INF/MANIFEST.MF
index 3096832f6ec..c545d7fcfa0 100644
--- a/tests/framework/org.eclipse.papyrus.tests.framework.editor/META-INF/MANIFEST.MF
+++ b/tests/framework/org.eclipse.papyrus.tests.framework.editor/META-INF/MANIFEST.MF
@@ -1,7 +1,8 @@
Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.tests.framework.exceptions.presentation
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
- org.eclipse.papyrus.tests.framework.edit;bundle-version="[1.2.0,2.0.0)";visibility:=reexport
+ org.eclipse.papyrus.tests.framework.edit;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.uml.internationalization.edit;bundle-version="[1.0.0,2.0.0)"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
diff --git a/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsEditor.java b/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsEditor.java
index 2fdf4860d94..8d551198a24 100644
--- a/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsEditor.java
+++ b/tests/framework/org.eclipse.papyrus.tests.framework.editor/src-gen/org/eclipse/papyrus/tests/framework/exceptions/presentation/ExceptionsEditor.java
@@ -13,7 +13,6 @@ package org.eclipse.papyrus.tests.framework.exceptions.presentation;
import java.io.IOException;
import java.io.InputStream;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -32,24 +31,56 @@ import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.ResourcesPlugin;
-
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.emf.codegen.ecore.genmodel.provider.GenModelItemProviderAdapterFactory;
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.ui.MarkerHelper;
+import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
+import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
+import org.eclipse.emf.edit.ui.util.EditUIUtil;
+import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
+import org.eclipse.gmf.codegen.gmfgen.provider.GMFGenItemProviderAdapterFactory;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
-
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-
import org.eclipse.jface.util.LocalSelectionTransfer;
-
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
@@ -59,24 +90,19 @@ import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
-
+import org.eclipse.papyrus.tests.framework.exceptions.provider.ExceptionsItemProviderAdapterFactory;
+import org.eclipse.papyrus.uml.internationalization.edit.providers.InternationalizationUMLItemProviderAdapterFactory;
import org.eclipse.swt.SWT;
-
import org.eclipse.swt.custom.CTabFolder;
-
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.Transfer;
-
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
-
import org.eclipse.swt.graphics.Point;
-
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Tree;
-
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -84,85 +110,18 @@ import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
-
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.SaveAsDialog;
-
import org.eclipse.ui.ide.IGotoMarker;
-
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
-
import org.eclipse.ui.views.contentoutline.ContentOutline;
import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.PropertySheet;
import org.eclipse.ui.views.properties.PropertySheetPage;
-import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.command.CommandStackListener;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.ui.MarkerHelper;
-
-import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
-
-import org.eclipse.emf.common.ui.viewer.IViewerProvider;
-
-import org.eclipse.emf.common.util.BasicDiagnostic;
-import org.eclipse.emf.common.util.Diagnostic;
-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.util.EContentAdapter;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-
-import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
-
-import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
-
-import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
-
-import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
-
-import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
-import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
-import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
-
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
-
-import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
-import org.eclipse.emf.edit.ui.util.EditUIUtil;
-
-import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
-
-import org.eclipse.papyrus.tests.framework.exceptions.provider.ExceptionsItemProviderAdapterFactory;
-
-import org.eclipse.emf.codegen.ecore.genmodel.provider.GenModelItemProviderAdapterFactory;
-
-import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
-
-import org.eclipse.gmf.codegen.gmfgen.provider.GMFGenItemProviderAdapterFactory;
-
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-import org.eclipse.uml2.uml.edit.providers.UMLItemProviderAdapterFactory;
-
/**
* This is an example of a Exceptions model editor. <!-- begin-user-doc --> <!--
* end-user-doc -->
@@ -648,7 +607,7 @@ public class ExceptionsEditor extends MultiPageEditorPart
adapterFactory.addAdapterFactory(new ExceptionsItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new GMFGenItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new UMLItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new InternationalizationUMLItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new GenModelItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
@@ -1323,7 +1282,8 @@ public class ExceptionsEditor extends MultiPageEditorPart
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
IProgressMonitor progressMonitor = getActionBars().getStatusLineManager() != null
- ? getActionBars().getStatusLineManager().getProgressMonitor() : new NullProgressMonitor();
+ ? getActionBars().getStatusLineManager().getProgressMonitor()
+ : new NullProgressMonitor();
doSave(progressMonitor);
}
@@ -1425,7 +1385,8 @@ public class ExceptionsEditor extends MultiPageEditorPart
*/
public void setStatusLineManager(ISelection selection) {
IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer
- ? contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+ ? contentOutlineStatusLineManager
+ : getActionBars().getStatusLineManager();
if (statusLineManager != null) {
if (selection instanceof IStructuredSelection) {

Back to the top