Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfaure2011-09-23 13:17:16 +0000
committertfaure2011-09-23 13:17:16 +0000
commit27baf9e9898115963fefdcc49b32cc3559c9ff39 (patch)
treeefeb994822196cc428e95eb34b41d567531ddf55 /plugins/core
parentac6dbdf61230c157322df57041a1e6d9565fa867 (diff)
downloadorg.eclipse.papyrus-27baf9e9898115963fefdcc49b32cc3559c9ff39.tar.gz
org.eclipse.papyrus-27baf9e9898115963fefdcc49b32cc3559c9ff39.tar.xz
org.eclipse.papyrus-27baf9e9898115963fefdcc49b32cc3559c9ff39.zip
REOPENED - bug 273413: [Usability][Navigation] Papyrus shall enable diagram navigation history with back and next buttons
https://bugs.eclipse.org/bugs/show_bug.cgi?id=273413 Patch provided by Anass Radouani, modifications in page manger perspective extension for displaying buttons commands implementation
Diffstat (limited to 'plugins/core')
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/Activator.java18
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/IElementWithSemantic.java13
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/contentoutline/ContentOutlineRegistry.java33
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/BackboneException.java3
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/ContentProviderServiceFactory.java11
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/CoreMultiDiagramEditor.java13
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/DiResourceSetServiceFactory.java6
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/DiSashModelMngrServiceFactory.java8
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/IMultiDiagramEditor.java20
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/ModelSetServiceFactory.java18
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/PageIconRegistryServiceFactory.java4
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/PageMngrServiceFactory.java5
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/IEditorFactory.java15
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/IEditorIconFactory.java41
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/IPageIconsRegistry.java7
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/PageIconsRegistry.java17
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/PageModelFactoryRegistry.java16
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/BadClassNameException.java6
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/BadNameExtensionException.java3
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/ExtensionException.java6
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/ExtensionUtils.java18
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/NotFoundException.java3
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/CreationCommandDescriptor.java16
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/CreationCommandExtensionFactory.java18
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/CreationCommandRegistry.java8
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/ICreationCommand.java25
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/ICreationCondition.java7
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/IModelCreationCommand.java8
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/ModelCreationCommandBase.java5
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/PerspectiveContextDependence.java12
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/AbstractEditorFactory.java15
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorDescriptor.java6
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorDescriptorExtensionFactory.java10
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorFactoryProxy.java38
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorIconFactory.java19
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/IPluggableEditorFactory.java14
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/PluggableEditorFactoryReader.java35
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/DoSaveEvent.java16
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/IEditorInputChangedListener.java12
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/ILifeCycleEventsProvider.java8
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/ISaveAndDirtyService.java19
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/ISaveEventListener.java9
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/LifeCycleEventsProvider.java21
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/LifeCycleEventsProviderServiceFactory.java5
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/SaveAndDirtyService.java97
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/listenerservice/IPapyrusListener.java5
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/listenerservice/ModelListenerManager.java2
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/modelsetquery/ModelSetQuery.java3
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/modelsetquery/impl/ModelSetQueryAdapter.java16
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/modelsetquery/impl/ModelSetQueryInitializer.java31
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/ActionBarContributorDescriptor.java13
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/ActionBarContributorExtensionFactory.java11
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/ActionBarContributorRegistry.java20
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/CoreComposedActionBarContributor.java13
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/IActionBarContributorFactory.java5
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/BadStateException.java12
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ComposedService.java39
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ComposedServicePart.java40
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ExtensionServicesRegistry.java12
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/IService.java21
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/IServiceFactory.java8
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceDescriptor.java60
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceException.java1
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceMultiException.java70
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceNotFoundException.java1
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceStartKind.java9
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceState.java1
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServicesRegistry.java238
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ErrorServiceTypeEntry.java36
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/LazyStartupEntry.java18
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/PojoServiceEntry.java26
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceEntry.java43
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceFactoryEntry.java51
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceStartupEntry.java11
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceTypeEntry.java79
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/StartStartupEntry.java6
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/ui/IRevealSemanticElement.java22
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/AbstractServiceUtils.java57
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/BusinessModelResolver.java15
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/DiResourceSet.java168
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/DisplayUtils.java4
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/EditorUtils.java506
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/FilteredCollectionView.java20
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/FilteredCollectionViewFromIterator.java31
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/FilteredListView.java29
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/GMFtoEMFCommandWrapper.java3
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/IFilter.java3
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/OpenDiagramCommand.java9
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusEcoreUtils.java8
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusImageUtils.java9
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusTrace.java7
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/ServiceUtils.java9
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/ServiceUtilsForActionHandlers.java63
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/AbstractBaseModel.java33
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/AbstractModelWithSharedResource.java107
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/BadStateException.java15
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/EditingDomainServiceFactory.java20
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/IModel.java52
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/IModelSetSnippet.java21
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/IModelSnippet.java17
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelException.java11
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelIdentifiers.java10
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelMultiException.java70
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelSet.java104
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelSnippetList.java20
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelUtils.java55
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelsReader.java59
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/NotFoundException.java11
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/additional/AdditionalResourcesModel.java11
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/notation/NotationModel.java26
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/notation/NotationUtils.java29
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/DiModel.java11
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/DiModelUtils.java11
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/SashModel.java28
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/SashModelUtils.java30
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/ExtendedUmlModel.java13
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/UmlModel.java20
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/UmlSnippet.java2
-rw-r--r--plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/UmlUtils.java51
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/META-INF/MANIFEST.MF40
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/icons/BACK.pngbin0 -> 655 bytes
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/icons/NEXT.pngbin0 -> 676 bytes
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/icons/TOP.pngbin0 -> 636 bytes
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/icons/UP.pngbin0 -> 652 bytes
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/plugin.xml213
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/Activator.java39
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/CreateDiagramWithNavigationHandler.java15
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/CreatedNavigableElement.java10
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/ExistingNavigableElement.java3
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/IBaseNameSetter.java6
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/NavigableElement.java4
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/NavigationHelper.java19
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/decorator/NavigationDecorator.java29
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/decorator/NavigationDecoratorProvider.java24
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/BackNavigateHandler.java54
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/NextNavigateHandler.java53
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/TopNavigateHandler.java105
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/UpNavigateHandler.java93
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/preference/INavigationPreferenceConstant.java20
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/preference/NavigationPreferenceInitializer.java4
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/preference/NavigationPreferencePage.java37
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/Messages.java27
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/MultiDiagramDialog.java176
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/PropertyTester.java77
-rw-r--r--plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/messages.properties6
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/META-INF/MANIFEST.MF50
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/DiSashModelMngr.java66
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/IPageModelFactory.java9
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/TransactionalDiSashModelMngr.java21
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/commands/CloseAllDiagramsCommand.java32
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/commands/CloseDiagramCommand.java35
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/commands/CloseOtherDiagramsCommand.java15
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/ContentChangedEventProvider.java28
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/DiContentProvider.java31
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/PageMngrImpl.java228
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/SashPanelModel.java1
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/TabFolderModel.java2
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/TransactionalDiContentProvider.java7
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/TransactionalPageMngrImpl.java206
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/utils/IPageUtils.java20
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/AbstractPage.java17
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/AbstractPanel.java21
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/DiFactory.java75
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/DiPackage.java842
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/PageList.java29
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/PageRef.java84
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/PanelParent.java31
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/Position.java25
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/SashModel.java141
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/SashPanel.java50
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/SashWindowsMngr.java36
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/Size.java28
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/TabFolder.java35
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/Window.java43
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/exception/SashEditorException.java1
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/AbstractPageImpl.java49
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/AbstractPanelImpl.java46
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/DiFactoryImpl.java199
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/DiPackageImpl.java302
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PageListImpl.java46
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PageRefImpl.java107
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PanelParentImpl.java45
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PositionImpl.java63
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SashModelImpl.java215
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SashPanelImpl.java102
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SashWindowsMngrImpl.java63
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SizeImpl.java57
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/TabFolderImpl.java48
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/WindowImpl.java70
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiAdapterFactory.java293
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiResourceFactoryImpl.java21
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiResourceImpl.java16
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiSwitch.java427
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiUtils.java38
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/Activator.java8
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IAbstractPanelModel.java5
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IContentChangedListener.java16
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IContentChangedProvider.java8
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IEditorModel.java7
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IPageMngr.java81
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IPageModel.java11
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/ISashPanelModel.java11
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/ISashWindowsContentProvider.java67
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/ITabFolderModel.java10
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/AbstractModel.java3
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/AbstractPanelModel.java5
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/SashPanelModel.java21
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/SimpleSashWindowsContentProvider.java67
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/TabFolderModel.java27
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/singlefolder/SingleFolderContentProvider.java11
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/singlefolder/SingleFolderModel.java11
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/AbstractMultiPageSashEditor.java72
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IComponentPage.java9
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IEditorPage.java9
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IMultiEditorManager.java (renamed from plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/IMultiEditorManager.java)27
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IMultiPageEditorPart.java8
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IPage.java11
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IPageChangedListener.java2
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IPageVisitor.java3
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/ISashWindowsContainer.java32
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/ISashWindowsContainerChangedListener.java2
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashContainerEventsListener.java (renamed from plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashContainerEventsListener.java)6
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashTabDecorationSynchronizer.java122
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashWindowsContainer.java (renamed from plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashWindowsContainer.java)343
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashWindowsEventsProvider.java88
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/actionbarcontributor/ComposedActionBarContributor.java83
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/actionbarcontributor/IMultiPageEditorActionBarContributor.java14
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/actionbarcontributor/MultiPageEditorActionBarContributor.java10
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/gef/MultiDiagramEditorGefDelegate.java42
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/AbstractPanelPart.java32
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/AbstractPart.java11
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ActiveEditorServicesSwitcher.java64
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ActivePageTracker.java22
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ComponentPart.java85
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/Copyright.java1
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/EditorPart.java227
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/IPanelParent.java7
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/IPartVisitor.java24
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/LookupFolderPartByRawModelVisitor.java3
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/LookupIPageByIEditorPartVisitor.java2
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/LookupModelPageVisitor.java2
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/NotFoundException.java2
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PTabFolder.java80
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PagePart.java52
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PageVisitorWrapper.java1
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PartLists.java25
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PartVisitor.java4
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/RootPart.java90
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashContainerEventsProvider.java15
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashPanelPart.java86
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashWindowsException.java1
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ShowPartStatusVisitor.java17
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/TabFolderPart.java380
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/TabItemPart.java44
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/eclipsecopy/AbstractTabFolderPart.java420
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/eclipsecopy/MultiPageEditorSite.java62
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/eclipsecopy/MultiPageSelectionProvider.java34
-rw-r--r--plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/multipage/editor/MultiPageEditor.java113
258 files changed, 6627 insertions, 5409 deletions
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/Activator.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/Activator.java
index 584f1eb0a93..3307889fdc3 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/Activator.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/Activator.java
@@ -28,10 +28,10 @@ public class Activator extends AbstractUIPlugin {
// The shared instance
private static Activator plugin;
- /** Logging helper */
- public static LogHelper log = new LogHelper();
-
- /**
+ /** Logging helper */
+ public static LogHelper log = new LogHelper();
+
+ /**
* The constructor
*/
public Activator() {
@@ -40,19 +40,23 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
// register the login helper
- log.setPlugin(plugin);
+ log.setPlugin(plugin);
}
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/IElementWithSemantic.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/IElementWithSemantic.java
index dd2aa1f7b26..ee725bc4b86 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/IElementWithSemantic.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/IElementWithSemantic.java
@@ -15,16 +15,19 @@ package org.eclipse.papyrus.core;
/**
*
* all implementation is used to give the semantic element form a wrapper
- *
- * the implementation can call method getAdapter for example
- * for notation element return semantic element, for edit part return the semantic
- * element and not the view...
+ *
+ * the implementation can call method getAdapter for example for notation
+ * element return semantic element, for edit part return the semantic element
+ * and not the view...
*/
public interface IElementWithSemantic {
/**
* return the semantic element linked to this wrapper
- * @param wrapper an object that wrapped or are linked to a semantic element <B>cannot be null</B>
+ *
+ * @param wrapper
+ * an object that wrapped or are linked to a semantic element
+ * <B>cannot be null</B>
* @return null or the semantic element
*/
public Object getSemanticElement(Object wrapper);
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/contentoutline/ContentOutlineRegistry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/contentoutline/ContentOutlineRegistry.java
index fa2109194aa..009c923aff8 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/contentoutline/ContentOutlineRegistry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/contentoutline/ContentOutlineRegistry.java
@@ -45,9 +45,10 @@ public class ContentOutlineRegistry {
private IMultiDiagramEditor multiEditor;
/**
- * Constructor. defaultContext, input and site are explicitly required in order be sure that they are initialized. The multiEditor should be
- * initialized. In particular, getEditorSite(),
- * getEditorInput() and getDefaultContext() should return initialized values.
+ * Constructor. defaultContext, input and site are explicitly required in
+ * order be sure that they are initialized. The multiEditor should be
+ * initialized. In particular, getEditorSite(), getEditorInput() and
+ * getDefaultContext() should return initialized values.
*
* @param multiEditor
* @param defaultContext
@@ -61,7 +62,8 @@ public class ContentOutlineRegistry {
}
/**
- * Returns the single instance of the content outline. Creates one if necessary.
+ * Returns the single instance of the content outline. Creates one if
+ * necessary.
*
* @return the contentOutline the single instance of the content outline
* @throws BackboneException
@@ -117,9 +119,9 @@ public class ContentOutlineRegistry {
}
/**
- * Inner Descriptor for content outline.
- * This class load data from Eclipse extension mechanism
- * TODO Change the parent class. It is here just to have quick code.
+ * Inner Descriptor for content outline. This class load data from Eclipse
+ * extension mechanism TODO Change the parent class. It is here just to have
+ * quick code.
*/
protected class ContentOutlineDescriptor extends EditorDescriptorExtensionFactory {
@@ -131,7 +133,6 @@ public class ContentOutlineRegistry {
private IConfigurationElement element;
-
/**
* Instance is created when requested.
*/
@@ -169,13 +170,13 @@ public class ContentOutlineRegistry {
}
/**
- * Return the higher value of the descriptor. This value is used to order the contentOutline. The highest priority win.
+ * Return the higher value of the descriptor. This value is used to
+ * order the contentOutline. The highest priority win.
*/
private int getPriority() {
return priority;
}
-
/**
* @return the actionBarContributorID
*/
@@ -221,7 +222,8 @@ public class ContentOutlineRegistry {
}
/**
- * create the outlinepage by calling constructor without parameter and then call init method
+ * create the outlinepage by calling constructor without parameter and
+ * then call init method
*
* @return the outline.
* @throws BackboneException
@@ -233,15 +235,18 @@ public class ContentOutlineRegistry {
return outline;
} catch (SecurityException e) {
- // Lets propagate. This is an implementation problem that should be solved by programmer.
+ // Lets propagate. This is an implementation problem that should
+ // be solved by programmer.
throw new RuntimeException(e);
}
catch (InstantiationException e) {
- // Lets propagate. This is an implementation problem that should be solved by programmer.
+ // Lets propagate. This is an implementation problem that should
+ // be solved by programmer.
// throw new RuntimeException(e);
} catch (IllegalAccessException e) {
- // Lets propagate. This is an implementation problem that should be solved by programmer.
+ // Lets propagate. This is an implementation problem that should
+ // be solved by programmer.
throw new RuntimeException(e);
}
return null;
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/BackboneException.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/BackboneException.java
index 45a8a257cd2..4dcffc19e5f 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/BackboneException.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/BackboneException.java
@@ -56,7 +56,8 @@ public class BackboneException extends Exception {
}
/**
- * Creates a new BackboneException with a specified message and the specified cause.
+ * Creates a new BackboneException with a specified message and the
+ * specified cause.
*
* @param message
* the message of the exception
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/ContentProviderServiceFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/ContentProviderServiceFactory.java
index 0b550ab6eee..350258c73ef 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/ContentProviderServiceFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/ContentProviderServiceFactory.java
@@ -9,13 +9,12 @@ import org.eclipse.papyrus.core.services.ServicesRegistry;
import org.eclipse.papyrus.sasheditor.contentprovider.ISashWindowsContentProvider;
import org.eclipse.papyrus.sasheditor.contentprovider.di.DiSashModelMngr;
-
/**
* A service factory to create the {@link ISashWindowsContentProvider} service.
* This service depends on {@link DiSashModelMngrServiceFactory}.
*
* @author cedric dumoulin
- *
+ *
*/
public class ContentProviderServiceFactory implements IServiceFactory {
@@ -26,7 +25,7 @@ public class ContentProviderServiceFactory implements IServiceFactory {
/**
* @see org.eclipse.papyrus.core.services.IService#init(org.eclipse.papyrus.core.services.ServicesRegistry)
- *
+ *
* @param servicesRegistry
* @throws ServiceException
*/
@@ -38,7 +37,7 @@ public class ContentProviderServiceFactory implements IServiceFactory {
/**
* @see org.eclipse.papyrus.core.services.IService#startService()
- *
+ *
* @throws ServiceException
*/
public void startService() throws ServiceException {
@@ -46,7 +45,7 @@ public class ContentProviderServiceFactory implements IServiceFactory {
/**
* @see org.eclipse.papyrus.core.services.IService#disposeService()
- *
+ *
* @throws ServiceException
*/
public void disposeService() throws ServiceException {
@@ -54,7 +53,7 @@ public class ContentProviderServiceFactory implements IServiceFactory {
/**
* @see org.eclipse.papyrus.core.services.IServiceFactory#createServiceInstance()
- *
+ *
* @return
* @throws ServiceException
*/
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/CoreMultiDiagramEditor.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/CoreMultiDiagramEditor.java
index 1f4d64be99b..1d7064266f1 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/CoreMultiDiagramEditor.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/CoreMultiDiagramEditor.java
@@ -550,8 +550,7 @@ public class CoreMultiDiagramEditor extends AbstractMultiPageSashEditor implemen
}
/**
- * Activate this editor.
- * Called after the SWT.control is created.
+ * Activate this editor. Called after the SWT.control is created.
*/
@Override
protected void activate() {
@@ -559,6 +558,10 @@ public class CoreMultiDiagramEditor extends AbstractMultiPageSashEditor implemen
super.activate();
initFolderTabMenus();
+ // add page changed listener to sash container to warn page manager
+ getISashWindowsContainer().addPageChangedListener(getIPageMngr());
+ getISashWindowsContainer().addLifeCycleListener(getIPageMngr());
+
try {
// Register ISashWindowsContainer as service
// Should be done only once the container is ready.
@@ -569,6 +572,12 @@ public class CoreMultiDiagramEditor extends AbstractMultiPageSashEditor implemen
}
}
+ @Override
+ protected void deactivate() {
+ super.deactivate();
+ getISashWindowsContainer().removePageChangedListener(getIPageMngr());
+ }
+
/**
* Init the contextual menu shown in the folder tabs.
* This popup menu is contributed by the help of Eclipse extensions, using the Commands framework.
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/DiResourceSetServiceFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/DiResourceSetServiceFactory.java
index 510810fcc34..6cebfe199fd 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/DiResourceSetServiceFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/DiResourceSetServiceFactory.java
@@ -8,11 +8,9 @@ import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.services.ServicesRegistry;
import org.eclipse.papyrus.resource.ModelSet;
-
/**
- * A service factory to create the {@link ModelSet} service.
- * This provide a nickname for {@link ModelSet} service.
- * This serviceFactory depends on {@link ModelSet} service.
+ * A service factory to create the {@link ModelSet} service. This provide a
+ * nickname for {@link ModelSet} service. This serviceFactory depends on {@link ModelSet} service.
*
* @author cedric dumoulin
*
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/DiSashModelMngrServiceFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/DiSashModelMngrServiceFactory.java
index 8acc3285474..bcb82f3b806 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/DiSashModelMngrServiceFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/DiSashModelMngrServiceFactory.java
@@ -15,7 +15,6 @@ import org.eclipse.papyrus.resource.sasheditor.SashModelUtils;
import org.eclipse.papyrus.sasheditor.contentprovider.di.DiSashModelMngr;
import org.eclipse.papyrus.sasheditor.contentprovider.di.TransactionalDiSashModelMngr;
-
/**
* Service Factory to create the {@link DiSashModelMngr} service.
*
@@ -24,7 +23,6 @@ import org.eclipse.papyrus.sasheditor.contentprovider.di.TransactionalDiSashMode
*/
public class DiSashModelMngrServiceFactory implements IServiceFactory {
-
private TransactionalEditingDomain transactionalEditingDomain;
private SashModel sashModel;
@@ -33,8 +31,6 @@ public class DiSashModelMngrServiceFactory implements IServiceFactory {
private ServicesRegistry servicesRegistry;
-
-
/**
* @see org.eclipse.papyrus.core.services.IService#init(org.eclipse.papyrus.core.services.ServicesRegistry)
*
@@ -70,7 +66,6 @@ public class DiSashModelMngrServiceFactory implements IServiceFactory {
// create the service
sashModelMngr = new TransactionalDiSashModelMngr(pageModelRegistry, sashModel.getResource(), transactionalEditingDomain);
-
}
/**
@@ -90,7 +85,8 @@ public class DiSashModelMngrServiceFactory implements IServiceFactory {
public Object createServiceInstance() throws ServiceException {
// Start locally the service if needed.
- // Question: Can createServiceInstance() method be called before startService() is called ?
+ // Question: Can createServiceInstance() method be called before
+ // startService() is called ?
if(sashModelMngr == null) {
startService();
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/IMultiDiagramEditor.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/IMultiDiagramEditor.java
index c3dc1d760c8..f8b60085263 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/IMultiDiagramEditor.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/IMultiDiagramEditor.java
@@ -21,18 +21,18 @@ import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.views.properties.IPropertySheetPage;
/**
- * Interface implemented by the main multipage editor. This interface list the methods available to diagram editors. Diagram editors can relies on
- * this interface to retrieve services from the main
- * multi diagram editor.
- * <br>
- * This interface should stay minimalist, as the editor is not designed to handle the services itself.
- * A service should be retrieved by using {@link #getServicesRegistry()}.
+ * Interface implemented by the main multipage editor. This interface list the
+ * methods available to diagram editors. Diagram editors can relies on this
+ * interface to retrieve services from the main multi diagram editor. <br>
+ * This interface should stay minimalist, as the editor is not designed to
+ * handle the services itself. A service should be retrieved by using {@link #getServicesRegistry()}.
*
*
* @author cedric dumoulin
*
- * TODO remove extends IEditingDomainProvider. This interface should be independant of any technology (EMF, GMF, ...).
- * If the EditingDomain is required, it can be retrieved by the registry.
+ * TODO remove extends IEditingDomainProvider. This interface should be
+ * independant of any technology (EMF, GMF, ...). If the EditingDomain
+ * is required, it can be retrieved by the registry.
*
*/
public interface IMultiDiagramEditor extends IEditorPart {
@@ -44,7 +44,6 @@ public interface IMultiDiagramEditor extends IEditorPart {
*/
public ServicesRegistry getServicesRegistry();
-
/**
* Return the editor site.
*
@@ -62,7 +61,8 @@ public interface IMultiDiagramEditor extends IEditorPart {
/**
* Change the editor input.
*
- * @param newInput The new input.
+ * @param newInput
+ * The new input.
* @deprecated No replacement. Input can't be changed on multi editors.
*/
public void setEditorInput(IEditorInput newInput);
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/ModelSetServiceFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/ModelSetServiceFactory.java
index 684302a1f83..c852ea81440 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/ModelSetServiceFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/ModelSetServiceFactory.java
@@ -9,32 +9,32 @@ import org.eclipse.papyrus.core.services.ServicesRegistry;
import org.eclipse.papyrus.core.utils.DiResourceSet;
import org.eclipse.papyrus.resource.ModelSet;
-
/**
* A service starting the ModelSet
+ *
* @author cedric dumoulin
- *
+ *
*/
-public class ModelSetServiceFactory implements IServiceFactory{
+public class ModelSetServiceFactory implements IServiceFactory {
/** The ModelSet */
private ModelSet service;
-
+
/**
*
* @see org.eclipse.papyrus.core.services.IService#init(org.eclipse.papyrus.core.services.ServicesRegistry)
- *
+ *
* @param servicesRegistry
* @throws ServiceException
*/
public void init(ServicesRegistry servicesRegistry) throws ServiceException {
-
+
}
/**
*
* @see org.eclipse.papyrus.core.services.IService#startService()
- *
+ *
* @throws ServiceException
*/
public void startService() throws ServiceException {
@@ -43,11 +43,11 @@ public class ModelSetServiceFactory implements IServiceFactory{
/**
*
* @see org.eclipse.papyrus.core.services.IService#disposeService()
- *
+ *
* @throws ServiceException
*/
public void disposeService() throws ServiceException {
- if( service != null)
+ if(service != null)
service.unload();
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/PageIconRegistryServiceFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/PageIconRegistryServiceFactory.java
index f5f5798f72e..c3c44177607 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/PageIconRegistryServiceFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/PageIconRegistryServiceFactory.java
@@ -11,7 +11,6 @@ import org.eclipse.papyrus.core.services.IServiceFactory;
import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.services.ServicesRegistry;
-
/**
* Service Factory to register {@link IPageIconsRegistry}.
*
@@ -49,7 +48,8 @@ public class PageIconRegistryServiceFactory implements IServiceFactory {
}
/**
- * Create and populate a {@link PageIconsRegistry}. Return it as the service instance.
+ * Create and populate a {@link PageIconsRegistry}. Return it as the service
+ * instance.
*
* @return
*/
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/PageMngrServiceFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/PageMngrServiceFactory.java
index 7c2f2fd4cb1..ad73218ee28 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/PageMngrServiceFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editor/PageMngrServiceFactory.java
@@ -10,10 +10,9 @@ import org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr;
import org.eclipse.papyrus.sasheditor.contentprovider.ISashWindowsContentProvider;
import org.eclipse.papyrus.sasheditor.contentprovider.di.DiSashModelMngr;
-
/**
- * A service factory to create the {@link IPageMngr} service.
- * This serviceFactory depends on {@link ISashWindowsContentProvider} service.
+ * A service factory to create the {@link IPageMngr} service. This
+ * serviceFactory depends on {@link ISashWindowsContentProvider} service.
*
* @author cedric dumoulin
*
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/IEditorFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/IEditorFactory.java
index 33ca891f634..0dccf498ecc 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/IEditorFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/IEditorFactory.java
@@ -5,10 +5,9 @@ package org.eclipse.papyrus.core.editorsfactory;
import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel;
-
-
/**
- * Factory used to get the Icon associated to the editor used to render the specified pageIdentifier.
+ * Factory used to get the Icon associated to the editor used to render the
+ * specified pageIdentifier.
*
*
* @author cedric dumoulin
@@ -17,8 +16,8 @@ import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel;
public interface IEditorFactory {
/**
- * Create the {@link IPageModel} for the specified identifier.
- * TODO throw an exception encapsulating problems encountered while creating the model.
+ * Create the {@link IPageModel} for the specified identifier. TODO throw an
+ * exception encapsulating problems encountered while creating the model.
*
* @param pageIdentifier
* Object identifying an Editor.
@@ -27,9 +26,9 @@ public interface IEditorFactory {
public IPageModel createIPageModel(Object pageIdentifier);
/**
- * Return true if the factory can create an IPageModel for the specified pageIdentifier.
- * Return false otherwise
- * TODO throw an exception encapsulating problems encountered while creating the model.
+ * Return true if the factory can create an IPageModel for the specified
+ * pageIdentifier. Return false otherwise TODO throw an exception
+ * encapsulating problems encountered while creating the model.
*
* @param pageIdentifier
* The object representing the page to test
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/IEditorIconFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/IEditorIconFactory.java
index ba74f7104bd..ead2f932358 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/IEditorIconFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/IEditorIconFactory.java
@@ -9,47 +9,46 @@ import org.eclipse.papyrus.sasheditor.contentprovider.di.DiSashModelMngr;
import org.eclipse.papyrus.sasheditor.editor.ISashWindowsContainer;
import org.eclipse.swt.graphics.Image;
-
-
/**
- * Factory used to create an {@link IPageModel} used by the {@link ISashWindowsContainer} to create
- * an instance of the editor represented by the provided Object.
- * Such factory is required by the {@link DiSashModelMngr}. It is called whenever the ISashWindowsContainer
- * need to create an editor from an EObject representing this editor in the Di implementation of the
- * {@link ISashWindowsContentProvider}
- *
+ * Factory used to create an {@link IPageModel} used by the {@link ISashWindowsContainer} to create an instance of the editor represented
+ * by the provided Object. Such factory is required by the {@link DiSashModelMngr}. It is called whenever the ISashWindowsContainer need
+ * to create an editor from an EObject representing this editor in the Di
+ * implementation of the {@link ISashWindowsContentProvider}
+ *
*
* @author cedric dumoulin
- *
+ *
*/
public interface IEditorIconFactory {
/**
- * Get the icon associated to the editor used to render the model. Model represent the top level
- * object of a model editor.
- * Can return a cached Image.
+ * Get the icon associated to the editor used to render the model. Model
+ * represent the top level object of a model editor. Can return a cached
+ * Image.
*
* @param pageIdentifier
- * the pageIdentifier representing the Editor. This is usually the EObject used to reconstruct the editor.
+ * the pageIdentifier representing the Editor. This is usually
+ * the EObject used to reconstruct the editor.
* @return the icon representing the editor
*/
public Image getEditorIcon(Object pageIdentifier);
/**
- * Create the icon associated to the editor used to render the model. Model represent the top level
- * object of a model editor.
- * Always return a newly created Image.
+ * Create the icon associated to the editor used to render the model. Model
+ * represent the top level object of a model editor. Always return a newly
+ * created Image.
*
* @param pageIdentifier
- * the pageIdentifier representing the Editor. This is usually the EObject used to reconstruct the editor.
+ * the pageIdentifier representing the Editor. This is usually
+ * the EObject used to reconstruct the editor.
* @return the icon representing the editor
*/
public Image createEditorIcon(Object pageIdentifier);
-
+
/**
- * Return true if the factory can create an IPageModel for the specified pageIdentifier.
- * Return false otherwise
- * TODO throw an exception encapsulating problems encountered while creating the model.
+ * Return true if the factory can create an IPageModel for the specified
+ * pageIdentifier. Return false otherwise TODO throw an exception
+ * encapsulating problems encountered while creating the model.
*
* @param pageIdentifier
* The object representing the page to test
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/IPageIconsRegistry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/IPageIconsRegistry.java
index f7cc243f319..2987676aad8 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/IPageIconsRegistry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/IPageIconsRegistry.java
@@ -23,11 +23,12 @@ import org.eclipse.swt.graphics.Image;
public interface IPageIconsRegistry {
/**
- * Get the icon associated to the editor used to render the model. Model represent the top level
- * object of a model editor.
+ * Get the icon associated to the editor used to render the model. Model
+ * represent the top level object of a model editor.
*
* @param model
- * the model representing the Editor. This is usually the EObject used to reconstruct the editor.
+ * the model representing the Editor. This is usually the EObject
+ * used to reconstruct the editor.
* @return the icon representing the editor
*/
public Image getEditorIcon(Object model);
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/PageIconsRegistry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/PageIconsRegistry.java
index a50b164033b..2ac5c94861f 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/PageIconsRegistry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/PageIconsRegistry.java
@@ -8,10 +8,9 @@ import java.util.List;
import org.eclipse.swt.graphics.Image;
-
/**
- * Concrete implementation of the {@link IPageIconsRegistry}.
- * This implementation allows to add and remove {@link IPageIconsRegistry}.
+ * Concrete implementation of the {@link IPageIconsRegistry}. This
+ * implementation allows to add and remove {@link IPageIconsRegistry}.
*
*
* @author cedric dumoulin
@@ -21,7 +20,6 @@ public class PageIconsRegistry implements IPageIconsRegistry {
/** list of registered icon factories */
protected List<IEditorIconFactory> pageIcons = new ArrayList<IEditorIconFactory>();
-
/**
* Constructor.
*
@@ -33,8 +31,9 @@ public class PageIconsRegistry implements IPageIconsRegistry {
}
/**
- * Walk each registered {@link IEditorFactory} to find the one handling the specified pageIdentifier.
- * Call the corresponding method in the found pageIdentifier.
+ * Walk each registered {@link IEditorFactory} to find the one handling the
+ * specified pageIdentifier. Call the corresponding method in the found
+ * pageIdentifier.
*
* TODO Throw an exception to report errors.
*
@@ -45,18 +44,18 @@ public class PageIconsRegistry implements IPageIconsRegistry {
for(IEditorIconFactory factory : getPageIcons()) {
if(factory.isPageModelFactoryFor(pageIdentifier)) {
{
- // return factory.getEditorIcon(pageIdentifier);
+ // return factory.getEditorIcon(pageIdentifier);
return factory.createEditorIcon(pageIdentifier);
}
}
}
// no editor found !
// TODO Throw an exception.
- // throw new EditorNotFoundException("No editor registered for '" + pageIdentifier + "'.");
+ // throw new EditorNotFoundException("No editor registered for '" +
+ // pageIdentifier + "'.");
return null;
}
-
/**
* @return the editorFactories
*/
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/PageModelFactoryRegistry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/PageModelFactoryRegistry.java
index 104f55ae86a..4d59a68284c 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/PageModelFactoryRegistry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/editorsfactory/PageModelFactoryRegistry.java
@@ -10,10 +10,10 @@ import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel;
import org.eclipse.papyrus.sasheditor.contentprovider.ISashWindowsContentProvider;
import org.eclipse.papyrus.sasheditor.contentprovider.di.IPageModelFactory;
-
/**
- * Concrete implementation of the {@link IPageModelFactory} required by the di implementation of {@link ISashWindowsContentProvider}.
- * This implementation allows to add and remove {@link IEditorFactory}.
+ * Concrete implementation of the {@link IPageModelFactory} required by the di
+ * implementation of {@link ISashWindowsContentProvider}. This implementation
+ * allows to add and remove {@link IEditorFactory}.
*
*
* @author cedric dumoulin
@@ -23,7 +23,6 @@ public class PageModelFactoryRegistry implements IPageModelFactory {
/** list of editor factories */
protected List<IEditorFactory> editorFactories = new ArrayList<IEditorFactory>();
-
/**
* Constructor.
*
@@ -35,8 +34,9 @@ public class PageModelFactoryRegistry implements IPageModelFactory {
}
/**
- * Walk each registered {@link IEditorFactory} to find the one handling the specified pageIdentifier.
- * Call the corresponding method in the found pageIdentifier.
+ * Walk each registered {@link IEditorFactory} to find the one handling the
+ * specified pageIdentifier. Call the corresponding method in the found
+ * pageIdentifier.
*
* TODO Throw an exception to report errors.
*
@@ -53,11 +53,11 @@ public class PageModelFactoryRegistry implements IPageModelFactory {
}
// no editor found !
// TODO Throw an exception.
- // throw new EditorNotFoundException("No editor registered for '" + pageIdentifier + "'.");
+ // throw new EditorNotFoundException("No editor registered for '" +
+ // pageIdentifier + "'.");
return null;
}
-
/**
* @return the editorFactories
*/
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/BadClassNameException.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/BadClassNameException.java
index b8022b1c040..24fbf0346d8 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/BadClassNameException.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/BadClassNameException.java
@@ -16,9 +16,9 @@ package org.eclipse.papyrus.core.extension;
import org.eclipse.core.runtime.IConfigurationElement;
/**
- * Exception thrown as an extension point is parsed at runtime. More accurately, it is thrown when one attribute of an extension point that should
- * describe a class name does not correspond to a class
- * in the classpath.
+ * Exception thrown as an extension point is parsed at runtime. More accurately,
+ * it is thrown when one attribute of an extension point that should describe a
+ * class name does not correspond to a class in the classpath.
*
* @author Cedric Dumoulin
* @author Patrick Tessier
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/BadNameExtensionException.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/BadNameExtensionException.java
index d7d5ad6629b..50e27b8b5d2 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/BadNameExtensionException.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/BadNameExtensionException.java
@@ -55,7 +55,8 @@ public class BadNameExtensionException extends ExtensionException {
}
/**
- * Creates a BadNameExtensionException with a specific cause and a specific message.
+ * Creates a BadNameExtensionException with a specific cause and a specific
+ * message.
*
* @param message
* the message of the exception
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/ExtensionException.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/ExtensionException.java
index 1e1b77ec107..3a3e157cb03 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/ExtensionException.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/ExtensionException.java
@@ -59,7 +59,8 @@ public class ExtensionException extends BackboneException {
}
/**
- * Creates a ExtensionException with a specific cause and a specific message.
+ * Creates a ExtensionException with a specific cause and a specific
+ * message.
*
* @param message
* the message of the exception
@@ -75,7 +76,8 @@ public class ExtensionException extends BackboneException {
*
* @param element
* the configuration element corresponding to the extension
- * @return a string containing the name of the plugin and the name of the extension
+ * @return a string containing the name of the plugin and the name of the
+ * extension
*/
protected static String declaringExtensionToString(IConfigurationElement element) {
return "plugin:" + element.getContributor().getName() + " extension:" + element.getName();
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/ExtensionUtils.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/ExtensionUtils.java
index 74dc0e0ae8d..25004e9bc43 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/ExtensionUtils.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/ExtensionUtils.java
@@ -19,8 +19,8 @@ import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;
/**
- * Utility methods for Eclipse extension reading.
- * This class can be extended, or access throw the unique instance.
+ * Utility methods for Eclipse extension reading. This class can be extended, or
+ * access throw the unique instance.
*
* @author cedric dumoulin
* @author Patrick Tessier
@@ -30,15 +30,18 @@ public abstract class ExtensionUtils {
/**
* Unique instance that can be used directly.
*/
- static public ExtensionUtils INSTANCE = new ExtensionUtils(){};
-
+ static public ExtensionUtils INSTANCE = new ExtensionUtils() {
+ };
+
/**
- * used to verify if the name of the {@link IConfigurationElement} is the same as the given name
+ * used to verify if the name of the {@link IConfigurationElement} is the
+ * same as the given name
*
* @param element
* an {@link IConfigurationElement} see eclipse extension point
* @param tagName
- * the name of the {@link IConfigurationElement} that has to be verified
+ * the name of the {@link IConfigurationElement} that has to be
+ * verified
* @throws InvalidRegistryObjectException
* @throws BadNameExtensionException
*/
@@ -56,7 +59,8 @@ public abstract class ExtensionUtils {
* @param attributeName
* the name of the attribute to read
* @param extensionPointName
- * Name of the extension point. Used in exception msg. TODO: remove ?
+ * Name of the extension point. Used in exception msg. TODO:
+ * remove ?
*
* @return the class, result of the parsing
* @throws InvalidRegistryObjectException
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/NotFoundException.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/NotFoundException.java
index 9df2e493000..d058795ce34 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/NotFoundException.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/NotFoundException.java
@@ -14,7 +14,8 @@
package org.eclipse.papyrus.core.extension;
/**
- * Exception thrown when something is not found when parsing a configuration element.
+ * Exception thrown when something is not found when parsing a configuration
+ * element.
*
* @author dumoulin
* @author schnekenburger
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/CreationCommandDescriptor.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/CreationCommandDescriptor.java
index bdb4fb2ea45..c8b1c4e0de8 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/CreationCommandDescriptor.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/CreationCommandDescriptor.java
@@ -52,10 +52,11 @@ public class CreationCommandDescriptor {
public ICreationCondition getCondition() {
return condition;
}
- public void setCondition(ICreationCondition condition){
- this.condition= condition;
+
+ public void setCondition(ICreationCondition condition) {
+ this.condition = condition;
condition.setCommand(getCommandId());
-
+
}
/**
@@ -81,15 +82,18 @@ public class CreationCommandDescriptor {
ICreationCommand command = creationCommandClass.newInstance();
return command;
} catch (SecurityException e) {
- // Lets propagate. This is an implementation problem that should be solved by
+ // Lets propagate. This is an implementation problem that should be
+ // solved by
// programmer.
throw new RuntimeException(e);
} catch (InstantiationException e) {
- // Lets propagate. This is an implementation problem that should be solved by
+ // Lets propagate. This is an implementation problem that should be
+ // solved by
// programmer.
throw new RuntimeException(e);
} catch (IllegalAccessException e) {
- // Lets propagate. This is an implementation problem that should be solved by
+ // Lets propagate. This is an implementation problem that should be
+ // solved by
// programmer.
throw new RuntimeException(e);
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/CreationCommandExtensionFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/CreationCommandExtensionFactory.java
index 4ceaaaedf6d..998b101fece 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/CreationCommandExtensionFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/CreationCommandExtensionFactory.java
@@ -20,7 +20,8 @@ import org.eclipse.papyrus.core.utils.PapyrusTrace;
import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
- * A factory used to create CreationCommand object from Eclipse extensions points elements.
+ * A factory used to create CreationCommand object from Eclipse extensions
+ * points elements.
*
* @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
*/
@@ -49,7 +50,7 @@ public class CreationCommandExtensionFactory extends ExtensionUtils {
/** constant for the attribute language **/
public final static String LANGUAGE_ATTR = "language";
-
+
/**
* @return the eINSTANCE
*/
@@ -58,20 +59,20 @@ public class CreationCommandExtensionFactory extends ExtensionUtils {
}
/**
- * Create a CreationCommand instance corresponding to the ConfigurationElement.
+ * Create a CreationCommand instance corresponding to the
+ * ConfigurationElement.
*
* @param element
* an {@link IConfigurationElement} see eclipse extension point
- * @return a CreationCommandDescriptor structure that contains information to the creation
- * diagram command
+ * @return a CreationCommandDescriptor structure that contains information
+ * to the creation diagram command
* @throws BadNameExtensionException
**/
public CreationCommandDescriptor createCreationCommand(IConfigurationElement element) throws ExtensionException {
CreationCommandDescriptor res;
checkTagName(element, CREATION_COMMAND_EXTENSIONPOINT);
res = new CreationCommandDescriptor();
- res.creationCommandClass = (Class<ICreationCommand>)parseClass(element, CREATION_COMMAND_CLASS_ATTR,
- CREATION_COMMAND_EXTENSIONPOINT);
+ res.creationCommandClass = (Class<ICreationCommand>)parseClass(element, CREATION_COMMAND_CLASS_ATTR, CREATION_COMMAND_EXTENSIONPOINT);
res.commandId = element.getAttribute(ID_ATTRIBUTE);
res.label = element.getAttribute(LABEL_ATTR);
res.language = element.getAttribute(LANGUAGE_ATTR);
@@ -81,8 +82,7 @@ public class CreationCommandExtensionFactory extends ExtensionUtils {
}
String attributeForCreationCondition = element.getAttribute(CONDITION_COMMAND_CLASS_ATTR);
if(attributeForCreationCondition != null && attributeForCreationCondition.length() > 0) {
- Class<ICreationCondition> classCondition = (Class<ICreationCondition>)parseClass(element,
- CONDITION_COMMAND_CLASS_ATTR, CREATION_COMMAND_EXTENSIONPOINT);
+ Class<ICreationCondition> classCondition = (Class<ICreationCondition>)parseClass(element, CONDITION_COMMAND_CLASS_ATTR, CREATION_COMMAND_EXTENSIONPOINT);
if(classCondition != null) {
try {
res.setCondition(classCondition.newInstance());
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/CreationCommandRegistry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/CreationCommandRegistry.java
index 037a7a4d7ae..c6c10786bcf 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/CreationCommandRegistry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/CreationCommandRegistry.java
@@ -34,14 +34,16 @@ public class CreationCommandRegistry implements ICreationCommandRegistry {
private static Map<String, CreationCommandRegistry> registriesMap = new HashMap<String, CreationCommandRegistry>();
/**
- * This static method returns an instance of this class for a specified namespace
+ * This static method returns an instance of this class for a specified
+ * namespace
+ *
* @param extensionPointNamespace
* @return
*/
public static CreationCommandRegistry getInstance(String extensionPointNamespace) {
- synchronized (registriesMap) {
+ synchronized(registriesMap) {
CreationCommandRegistry registry = registriesMap.get(extensionPointNamespace);
- if (registry == null) {
+ if(registry == null) {
registry = new CreationCommandRegistry(extensionPointNamespace);
registriesMap.put(extensionPointNamespace, registry);
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/ICreationCommand.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/ICreationCommand.java
index 4168eb02c7c..d593e676cec 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/ICreationCommand.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/ICreationCommand.java
@@ -15,7 +15,8 @@ import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.papyrus.core.utils.DiResourceSet;
/**
- * Define a command use to create new diagram. It use to provide Eclipse extension @see {@link PapyrusDiagram#creationCommand} It used by the creation
+ * Define a command use to create new diagram. It use to provide Eclipse
+ * extension @see {@link PapyrusDiagram#creationCommand} It used by the creation
* model wizard.
*
* @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
@@ -28,24 +29,29 @@ public interface ICreationCommand {
* @param diResourceSet
* the resourceSet containing all diagrams
* @param container
- * of the diagram, if container is null, the diagram is contained by the top level container
+ * of the diagram, if container is null, the diagram is contained
+ * by the top level container
* @param diagramName
- * the name of the new diagram or null to use a dialog to choose the name
+ * the name of the new diagram or null to use a dialog to choose
+ * the name
*/
public void createDiagram(DiResourceSet diResourceSet, EObject container, String diagramName);
-
+
/**
- * Get a command to create a new diagram in diResourceSet with the given name.
+ * Get a command to create a new diagram in diResourceSet with the given
+ * name.
*
* @param diResourceSet
* the resourceSet containing all diagrams
* @param container
- * of the diagram, if container is null, the diagram is contained by the top level container
+ * of the diagram, if container is null, the diagram is contained
+ * by the top level container
* @param diagramName
- * the name of the new diagram or null to use a dialog to choose the name
+ * the name of the new diagram or null to use a dialog to choose
+ * the name
*/
public ICommand getCreateDiagramCommand(final DiResourceSet diResourceSet, final EObject container, final String diagramName);
-
+
/**
* Get the type of the diagram to create.
*
@@ -54,7 +60,8 @@ public interface ICreationCommand {
public String getCreatedDiagramType();
/**
- * Check if the creation of this diagram is strongly attached to its parent or if it can be reassigned after creation.
+ * Check if the creation of this diagram is strongly attached to its parent
+ * or if it can be reassigned after creation.
*
* @return true if parent can be reassigned
*/
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/ICreationCondition.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/ICreationCondition.java
index 7d3cca6b894..c98120f4cfc 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/ICreationCondition.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/ICreationCondition.java
@@ -24,10 +24,13 @@ public interface ICreationCondition {
* @return true if the diagram can be created
*/
boolean create(EObject selectedElement);
+
/**
- * set the command ID in order to take account the environment in order to create a diagram
+ * set the command ID in order to take account the environment in order to
+ * create a diagram
+ *
* @param commandID
*/
public void setCommand(String commandID);
-
+
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/IModelCreationCommand.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/IModelCreationCommand.java
index 27c6c52ad3a..b38f6324bca 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/IModelCreationCommand.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/IModelCreationCommand.java
@@ -15,16 +15,16 @@ package org.eclipse.papyrus.core.extension.commands;
import org.eclipse.papyrus.core.utils.DiResourceSet;
-
/**
* The Interface IModelCreationCommand.
*/
public interface IModelCreationCommand {
-
+
/**
* Creates the model.
- *
- * @param diResourceSet the di resource set
+ *
+ * @param diResourceSet
+ * the di resource set
*/
void createModel(final DiResourceSet diResourceSet);
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/ModelCreationCommandBase.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/ModelCreationCommandBase.java
index 771cd3481d6..0a7f09dd3a8 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/ModelCreationCommandBase.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/ModelCreationCommandBase.java
@@ -57,7 +57,8 @@ public abstract class ModelCreationCommandBase implements IModelCreationCommand
* the di resource set
*/
protected void runAsTransaction(final DiResourceSet diResourceSet) {
- // Get the uml element to which the newly created diagram will be attached.
+ // Get the uml element to which the newly created diagram will be
+ // attached.
// Create the diagram
final Resource modelResource = diResourceSet.getModelResource();
TransactionalEditingDomain editingDomain = diResourceSet.getTransactionalEditingDomain();
@@ -127,6 +128,4 @@ public abstract class ModelCreationCommandBase implements IModelCreationCommand
*/
protected abstract EObject createRootElement();
-
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/PerspectiveContextDependence.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/PerspectiveContextDependence.java
index 385613ddd1d..14054198ecd 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/PerspectiveContextDependence.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/commands/PerspectiveContextDependence.java
@@ -21,7 +21,8 @@ import org.eclipse.ui.internal.WorkbenchPage;
public class PerspectiveContextDependence implements ICreationCondition {
- protected String commandID=null;
+ protected String commandID = null;
+
public PerspectiveContextDependence() {
// TODO Auto-generated constructor stub
}
@@ -32,18 +33,19 @@ public class PerspectiveContextDependence implements ICreationCondition {
public boolean create(EObject selectedElement) {
// Get the perspective
Perspective perspective = ((WorkbenchPage)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()).getActivePerspective();
- //look for the perspective
- //verify if the commannd has to be displayed
- if(perspective.getHiddenMenuItems().contains(commandID)&& perspective.getHiddenToolbarItems().contains(commandID)){
+ // look for the perspective
+ // verify if the commannd has to be displayed
+ if(perspective.getHiddenMenuItems().contains(commandID) && perspective.getHiddenToolbarItems().contains(commandID)) {
return false;
}
return true;
}
+
/**
* {@inheritDoc}
*/
public void setCommand(String commandID) {
- this.commandID=commandID;
+ this.commandID = commandID;
}
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/AbstractEditorFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/AbstractEditorFactory.java
index bf6c8349ae6..1356ae82168 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/AbstractEditorFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/AbstractEditorFactory.java
@@ -18,8 +18,7 @@ import org.eclipse.papyrus.core.editorsfactory.IEditorFactory;
import org.eclipse.papyrus.core.services.ServicesRegistry;
/**
- * Abstract base class for Factory of editors.
- * See {@link IEditorFactory}.
+ * Abstract base class for Factory of editors. See {@link IEditorFactory}.
*
*
* @author Remi Schnekenburger
@@ -37,8 +36,8 @@ public abstract class AbstractEditorFactory implements IPluggableEditorFactory {
private String expectedType;
/**
- * EditorDescriptor associated to the factory.
- * TODO : Maybe use individual setters to set the requested data (ContributorId and Icon).
+ * EditorDescriptor associated to the factory. TODO : Maybe use individual
+ * setters to set the requested data (ContributorId and Icon).
*/
protected EditorDescriptor editorDescriptor;
@@ -64,8 +63,10 @@ public abstract class AbstractEditorFactory implements IPluggableEditorFactory {
/**
* Initialize the factory with useful Classes.
*
- * @param serviceRegistry Service registry that will be provided to created editor.
- * @param editorDescriptor Descriptor containing data from the Eclipse Extension.
+ * @param serviceRegistry
+ * Service registry that will be provided to created editor.
+ * @param editorDescriptor
+ * Descriptor containing data from the Eclipse Extension.
*/
public void init(ServicesRegistry serviceRegistry, EditorDescriptor editorDescriptor) {
this.editorDescriptor = editorDescriptor;
@@ -73,7 +74,6 @@ public abstract class AbstractEditorFactory implements IPluggableEditorFactory {
}
-
/**
* @return the serviceRegistry
*/
@@ -106,5 +106,4 @@ public abstract class AbstractEditorFactory implements IPluggableEditorFactory {
return editorDescriptor;
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorDescriptor.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorDescriptor.java
index 0e8a0c12918..dcc81524abf 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorDescriptor.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorDescriptor.java
@@ -16,7 +16,8 @@ package org.eclipse.papyrus.core.extension.diagrameditor;
import org.eclipse.jface.resource.ImageDescriptor;
/**
- * This descriptor describes a nested diagram. It is used by MultiDiagramEditor to know about the nested diagram. It is fill by an extension.
+ * This descriptor describes a nested diagram. It is used by MultiDiagramEditor
+ * to know about the nested diagram. It is fill by an extension.
*
* @author Cedric Dumoulin
*
@@ -29,7 +30,8 @@ public class EditorDescriptor {
private Class<IPluggableEditorFactory> editorFactoryClass;
/**
- * EditorActionBarContributor Id used to search the EditorActionBarContributor requested by the editor.
+ * EditorActionBarContributor Id used to search the
+ * EditorActionBarContributor requested by the editor.
*/
private String actionBarContributorId;
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorDescriptorExtensionFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorDescriptorExtensionFactory.java
index 98c66d54cc8..b03a3f708af 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorDescriptorExtensionFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorDescriptorExtensionFactory.java
@@ -22,10 +22,11 @@ import org.eclipse.papyrus.core.extension.ExtensionException;
import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
- * A factory used to create editor descriptor object from Eclipse extensions points elements.
+ * A factory used to create editor descriptor object from Eclipse extensions
+ * points elements.
*
- *@author Cedric Dumoulin
- *@author Patrick Tessier
+ * @author Cedric Dumoulin
+ * @author Patrick Tessier
*/
public class EditorDescriptorExtensionFactory extends ExtensionUtils {
@@ -56,7 +57,8 @@ public class EditorDescriptorExtensionFactory extends ExtensionUtils {
*
* @param element
* an {@link IConfigurationElement} see eclipse extension point
- * @return a nestedEditorDescriptor strucure that contains information to create diagrams
+ * @return a nestedEditorDescriptor strucure that contains information to
+ * create diagrams
* @throws BadNameExtensionException
*/
@SuppressWarnings("unchecked")
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorFactoryProxy.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorFactoryProxy.java
index d0085f47610..9cd7b1bd4ef 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorFactoryProxy.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorFactoryProxy.java
@@ -7,14 +7,13 @@ import org.eclipse.papyrus.core.editorsfactory.IEditorFactory;
import org.eclipse.papyrus.core.services.ServicesRegistry;
import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel;
-
/**
- * A proxy implementation of {@link IEditorFactory} used to do lazy instantiation
- * of concrete {@link IPluggableEditorFactory}.
- * This class is used by the {@link PluggableEditorFactoryReader}
+ * A proxy implementation of {@link IEditorFactory} used to do lazy
+ * instantiation of concrete {@link IPluggableEditorFactory}. This class is used
+ * by the {@link PluggableEditorFactoryReader}
*
* @author cedric dumoulin
- *
+ *
*/
public class EditorFactoryProxy implements IEditorFactory {
@@ -22,7 +21,7 @@ public class EditorFactoryProxy implements IEditorFactory {
* The concrete implementation.
*/
private IPluggableEditorFactory editorFactory;
-
+
/**
* EditorDescriptor associated to the factory.
*/
@@ -35,7 +34,7 @@ public class EditorFactoryProxy implements IEditorFactory {
/**
* Constructor.
- *
+ *
* @param serviceRegistry
* @param editorDescriptor
*/
@@ -46,7 +45,7 @@ public class EditorFactoryProxy implements IEditorFactory {
/**
* @see org.eclipse.papyrus.core.editorsfactory.IEditorFactory#createIPageModel(java.lang.Object)
- *
+ *
* @param pageIdentifier
* @return
*/
@@ -56,7 +55,7 @@ public class EditorFactoryProxy implements IEditorFactory {
/**
* @see org.eclipse.papyrus.core.editorsfactory.IEditorFactory#isPageModelFactoryFor(java.lang.Object)
- *
+ *
* @param pageIdentifier
* @return
*/
@@ -64,32 +63,32 @@ public class EditorFactoryProxy implements IEditorFactory {
return getEditorFactory().isPageModelFactoryFor(pageIdentifier);
}
-
/**
* @return the editorFactory
*/
protected IPluggableEditorFactory getEditorFactory() {
-
- if(editorFactory == null)
- {
+
+ if(editorFactory == null) {
editorFactory = createEditorFactory();
}
-
+
return editorFactory;
-
+
}
/**
- * Create an instance of IPluggableEditorFactory as described in the editorDescriptor.
- * TODO let propagate the exceptions.
+ * Create an instance of IPluggableEditorFactory as described in the
+ * editorDescriptor. TODO let propagate the exceptions.
+ *
* @return
*/
private IPluggableEditorFactory createEditorFactory() {
// Create the requested class.
try {
editorFactory = editorDescriptor.getEditorFactoryClass().newInstance();
- // Set the descriptor. USed by the factory to get the ActionBarId and Icon
- editorFactory.init(serviceRegistry, editorDescriptor);
+ // Set the descriptor. USed by the factory to get the ActionBarId
+ // and Icon
+ editorFactory.init(serviceRegistry, editorDescriptor);
return editorFactory;
} catch (InstantiationException e) {
// Lets propagate. This is an implementation problem that should be
@@ -103,5 +102,4 @@ public class EditorFactoryProxy implements IEditorFactory {
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorIconFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorIconFactory.java
index 94469848176..79581e14bea 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorIconFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/EditorIconFactory.java
@@ -7,10 +7,9 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.core.editorsfactory.IEditorIconFactory;
import org.eclipse.swt.graphics.Image;
-
/**
- * A factory used to create the Icon associated to an editor
- * TODO Lets have a common ancestor for {@link EditorIconFactory} and {@link EditorFactoryProxy}
+ * A factory used to create the Icon associated to an editor TODO Lets have a
+ * common ancestor for {@link EditorIconFactory} and {@link EditorFactoryProxy}
*
* @author cedric dumoulin
*
@@ -50,7 +49,6 @@ public class EditorIconFactory implements IEditorIconFactory {
*/
public Image getEditorIcon(Object pageIdentifier) {
-
if(cachedImage == null) {
cachedImage = createEditorIcon(pageIdentifier);
}
@@ -59,7 +57,8 @@ public class EditorIconFactory implements IEditorIconFactory {
}
/**
- * Create an Image associated to the editor used to render the specified pageIdentifier
+ * Create an Image associated to the editor used to render the specified
+ * pageIdentifier
*
* @return
*/
@@ -81,7 +80,6 @@ public class EditorIconFactory implements IEditorIconFactory {
return getEditorFactory().isPageModelFactoryFor(pageIdentifier);
}
-
/**
* @return the editorFactory
*/
@@ -96,8 +94,8 @@ public class EditorIconFactory implements IEditorIconFactory {
}
/**
- * Create an instance of IPluggableEditorFactory as described in the editorDescriptor.
- * TODO let propagate the exceptions.
+ * Create an instance of IPluggableEditorFactory as described in the
+ * editorDescriptor. TODO let propagate the exceptions.
*
* @return
*/
@@ -105,8 +103,9 @@ public class EditorIconFactory implements IEditorIconFactory {
// Create the requested class.
try {
editorFactory = editorDescriptor.getEditorFactoryClass().newInstance();
- // Set the descriptor. USed by the factory to get the ActionBarId and Icon
- // editorFactory.init(serviceRegistry, editorDescriptor);
+ // Set the descriptor. USed by the factory to get the ActionBarId
+ // and Icon
+ // editorFactory.init(serviceRegistry, editorDescriptor);
return editorFactory;
} catch (InstantiationException e) {
// Lets propagate. This is an implementation problem that should be
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/IPluggableEditorFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/IPluggableEditorFactory.java
index c3e286a30fa..1c56d08599d 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/IPluggableEditorFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/IPluggableEditorFactory.java
@@ -16,11 +16,11 @@ package org.eclipse.papyrus.core.extension.diagrameditor;
import org.eclipse.papyrus.core.editorsfactory.IEditorFactory;
import org.eclipse.papyrus.core.services.ServicesRegistry;
-
/**
- * This interface should be implemented by Editor Factories that can be declared as Eclipse extension.
- * It extends the {@link IEditorFactory} by adding methods to initialize the factory with multieditor
- * ServiceRegistry and associated editor data.
+ * This interface should be implemented by Editor Factories that can be declared
+ * as Eclipse extension. It extends the {@link IEditorFactory} by adding methods
+ * to initialize the factory with multieditor ServiceRegistry and associated
+ * editor data.
*
* @author Cédric Dumoulin
*
@@ -30,8 +30,10 @@ public interface IPluggableEditorFactory extends IEditorFactory {
/**
* Initialize the factory with useful Classes.
*
- * @param serviceRegistry Service registry that will be provided to created editor.
- * @param editorDescriptor Descriptor containing data from the Eclipse Extension.
+ * @param serviceRegistry
+ * Service registry that will be provided to created editor.
+ * @param editorDescriptor
+ * Descriptor containing data from the Eclipse Extension.
*/
public void init(ServicesRegistry serviceRegistry, EditorDescriptor editorDescriptor);
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/PluggableEditorFactoryReader.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/PluggableEditorFactoryReader.java
index 8aabba6c29f..9de43a2944e 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/PluggableEditorFactoryReader.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/extension/diagrameditor/PluggableEditorFactoryReader.java
@@ -26,8 +26,8 @@ import org.eclipse.papyrus.core.extension.ExtensionException;
import org.eclipse.papyrus.core.services.ServicesRegistry;
/**
- * This reader is used to read PluggableEditorFactory from the Eclipse extension declarations.
- * It can be used to populate an {@link PageModelFactoryRegistry}.
+ * This reader is used to read PluggableEditorFactory from the Eclipse extension
+ * declarations. It can be used to populate an {@link PageModelFactoryRegistry}.
*/
public class PluggableEditorFactoryReader {
@@ -43,10 +43,9 @@ public class PluggableEditorFactoryReader {
/** indicates if extension is loaded or not */
private boolean isExtensionLoaded = false;
-
/**
- * Create a new Registry reading extension from the specified namespace. The namespace is
- * usually the name of the plugin owning the registry.
+ * Create a new Registry reading extension from the specified namespace. The
+ * namespace is usually the name of the plugin owning the registry.
*
* @param extensionPointNamespace
*/
@@ -57,13 +56,14 @@ public class PluggableEditorFactoryReader {
}
/**
- * Populate the provided {@link PageModelFactoryRegistry} with {@link IPluggableEditorFactory} read
- * from Eclipse extension declarations.
- * For each declared editor, create a proxy encapsulating the real EditorFactory. Then the proxy is
- * added to the PageModelFactoryRegistry.
+ * Populate the provided {@link PageModelFactoryRegistry} with {@link IPluggableEditorFactory} read from Eclipse extension declarations.
+ * For each declared editor, create a proxy encapsulating the real
+ * EditorFactory. Then the proxy is added to the PageModelFactoryRegistry.
*
- * @param pageModelFactoryRegistry The object to populate
- * @param serviceRegistry ServiceRegistry provided to newly instantiated {@link IPluggableEditorFactory}.
+ * @param pageModelFactoryRegistry
+ * The object to populate
+ * @param serviceRegistry
+ * ServiceRegistry provided to newly instantiated {@link IPluggableEditorFactory}.
*/
public void populate(PageModelFactoryRegistry pageModelFactoryRegistry, ServicesRegistry serviceRegistry) {
@@ -75,12 +75,13 @@ public class PluggableEditorFactoryReader {
}
/**
- * Populate the provided {@link PageIconsRegistry} with icons read
- * from Eclipse extension declarations.
- * For each declared editor, create a {@link EditorIconFactory}.
+ * Populate the provided {@link PageIconsRegistry} with icons read from
+ * Eclipse extension declarations. For each declared editor, create a {@link EditorIconFactory}.
*
- * @param pageModelFactoryRegistry The object to populate
- * @param serviceRegistry ServiceRegistry provided to newly instantiated {@link IPluggableEditorFactory}.
+ * @param pageModelFactoryRegistry
+ * The object to populate
+ * @param serviceRegistry
+ * ServiceRegistry provided to newly instantiated {@link IPluggableEditorFactory}.
*/
public void populate(PageIconsRegistry registry) {
@@ -91,8 +92,6 @@ public class PluggableEditorFactoryReader {
}
}
-
-
/**
* Get the list of editor descriptor.
*
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/DoSaveEvent.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/DoSaveEvent.java
index 1552f5a4a2b..dc27d32e104 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/DoSaveEvent.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/DoSaveEvent.java
@@ -3,11 +3,9 @@
*/
package org.eclipse.papyrus.core.lifecycleevents;
-
import org.eclipse.papyrus.core.editor.IMultiDiagramEditor;
import org.eclipse.papyrus.core.services.ServicesRegistry;
-
/**
* Event sent whith a Save or SaveAs.
*
@@ -17,13 +15,13 @@ import org.eclipse.papyrus.core.services.ServicesRegistry;
public class DoSaveEvent {
final protected ServicesRegistry serviceRegistry;
+
final protected IMultiDiagramEditor multiDiagramEditor;
-
+
/**
- * Create an Event that is sent with a Save or SaveAs.
- * The same event can be reused.
- * Constructor.
- *
+ * Create an Event that is sent with a Save or SaveAs. The same event can be
+ * reused. Constructor.
+ *
* @param serviceRegistry
* @param multiDiagramEditor
*/
@@ -38,12 +36,12 @@ public class DoSaveEvent {
public ServicesRegistry getServiceRegistry() {
return serviceRegistry;
}
-
+
/**
* @return the multiDiagramEditor
*/
public IMultiDiagramEditor getMultiDiagramEditor() {
return multiDiagramEditor;
}
-
+
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/IEditorInputChangedListener.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/IEditorInputChangedListener.java
index 23a44e7e8e0..a5e317408be 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/IEditorInputChangedListener.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/IEditorInputChangedListener.java
@@ -17,19 +17,19 @@ package org.eclipse.papyrus.core.lifecycleevents;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.part.FileEditorInput;
-
/**
- * Interface implemented by classes wishing to be notified of the inputChanged event after a call to
- * {@link ISaveAndDirtyService#doSaveAs()}.
+ * Interface implemented by classes wishing to be notified of the inputChanged
+ * event after a call to {@link ISaveAndDirtyService#doSaveAs()}.
*
* @author cedric dumoulin
- *
+ *
*/
public interface IEditorInputChangedListener {
/**
*
- * @param fileEditorInput The new value of EditorInput
+ * @param fileEditorInput
+ * The new value of EditorInput
*/
public void editorInputChanged(FileEditorInput fileEditorInput);
@@ -37,5 +37,5 @@ public interface IEditorInputChangedListener {
* Called when the value of the isDirty() flag has changed.
*/
public void isDirtyChanged();
-
+
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/ILifeCycleEventsProvider.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/ILifeCycleEventsProvider.java
index 433fd3cc0e9..d27c2c31b27 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/ILifeCycleEventsProvider.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/ILifeCycleEventsProvider.java
@@ -3,14 +3,12 @@
*/
package org.eclipse.papyrus.core.lifecycleevents;
-
-
/**
- * Concrete implementation of this interface allows to listen on various lifecycle events.
- * This interface is the "public" part of the {@link LifeCycleEventsProvider}.
+ * Concrete implementation of this interface allows to listen on various
+ * lifecycle events. This interface is the "public" part of the {@link LifeCycleEventsProvider}.
*
* @author cedric dumoulin
- *
+ *
*/
public interface ILifeCycleEventsProvider {
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/ISaveAndDirtyService.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/ISaveAndDirtyService.java
index 4dfd829e74a..abda177667a 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/ISaveAndDirtyService.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/ISaveAndDirtyService.java
@@ -17,18 +17,16 @@ package org.eclipse.papyrus.core.lifecycleevents;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ui.ISaveablePart;
-
-
/**
* @author dumoulin
- *
+ *
*/
public interface ISaveAndDirtyService extends ISaveablePart {
/**
- * Register a nested {@link ISaveablePart} as a listener that will be notified each time a {@link #doSave(IProgressMonitor)} or
- * {@link #doSaveAs()} is performed.
- * Also, it will be asked for the dirtyState.
+ * Register a nested {@link ISaveablePart} as a listener that will be
+ * notified each time a {@link #doSave(IProgressMonitor)} or {@link #doSaveAs()} is performed. Also, it will be asked for the
+ * dirtyState.
*
* @param saveablePart
*/
@@ -36,20 +34,23 @@ public interface ISaveAndDirtyService extends ISaveablePart {
/**
* Remove the specified {@link ISaveablePart} from the list of listeners.
+ *
* @param saveablePart
*/
public abstract void removeIsaveablePart(ISaveablePart saveablePart);
/**
* Add a listeners on input changed event.
+ *
* @param inputChangedListener
*/
- public void addInputChangedListener( IEditorInputChangedListener inputChangedListener );
-
+ public void addInputChangedListener(IEditorInputChangedListener inputChangedListener);
+
/**
* Remove a listeners on input changed event.
+ *
* @param inputChangedListener
*/
- public void removeInputChangedListener( IEditorInputChangedListener inputChangedListener );
+ public void removeInputChangedListener(IEditorInputChangedListener inputChangedListener);
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/ISaveEventListener.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/ISaveEventListener.java
index cb3c04d119e..a1171b487e4 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/ISaveEventListener.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/ISaveEventListener.java
@@ -3,14 +3,13 @@
*/
package org.eclipse.papyrus.core.lifecycleevents;
-
-
/**
* Interface used to listen on open, save and saveAs events.
*
* @author cedric dumoulin
- *
- * @param <T> Type of event passed to methods.
+ *
+ * @param <T>
+ * Type of event passed to methods.
*/
public interface ISaveEventListener {
@@ -19,7 +18,7 @@ public interface ISaveEventListener {
* @param editor
*/
public void doSave(DoSaveEvent event);
-
+
/**
*
* @param editor
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/LifeCycleEventsProvider.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/LifeCycleEventsProvider.java
index 3017a9d1396..6da95116a3f 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/LifeCycleEventsProvider.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/LifeCycleEventsProvider.java
@@ -7,9 +7,8 @@ import java.util.ArrayList;
import java.util.List;
/**
- * This class provides events about the life cycle of a MultiEditor.
- * Not all life cycle events are available.
- * Available events:
+ * This class provides events about the life cycle of a MultiEditor. Not all
+ * life cycle events are available. Available events:
* <ul>
* <li>aboutToDoSave, aboutToDoSaveAs - SaveEventListener</li>
* <li>doSave, doSaveAs - SaveEventListener</li>
@@ -39,7 +38,6 @@ public class LifeCycleEventsProvider implements ILifeCycleEventsProvider {
*/
protected SaveEventListenerLazyList postSaveListeners = new SaveEventListenerLazyList();
-
/**
* Add specified listener.
*
@@ -97,12 +95,10 @@ public class LifeCycleEventsProvider implements ILifeCycleEventsProvider {
postSaveListeners.removeListener(listener);
}
-
// ****************************************************** //
- // Fire events methods //
+ // Fire events methods //
// ****************************************************** //
-
/**
* Fire AboutToSaveEvent to registered Listeners.
*
@@ -170,8 +166,8 @@ public class LifeCycleEventsProvider implements ILifeCycleEventsProvider {
}
/**
- * Fire all SaveAs events (about, events, post) to registered Listeners.
- * If one of the saveAs event fail, post events are not sent.
+ * Fire all SaveAs events (about, events, post) to registered Listeners. If
+ * one of the saveAs event fail, post events are not sent.
*
* @param editorPart
*/
@@ -222,7 +218,6 @@ public class LifeCycleEventsProvider implements ILifeCycleEventsProvider {
listeners.remove(listener);
}
-
/**
* @return the listeners
*/
@@ -241,9 +236,9 @@ public class LifeCycleEventsProvider implements ILifeCycleEventsProvider {
protected class SaveEventListenerLazyList extends AbstractEventListenersLazyList<ISaveEventListener> {
/**
- * Fire OpenEvent to registered Listeners.
- * If a listener throw an exception, remaining listeners are called, and then the exception
- * is resent.
+ * Fire OpenEvent to registered Listeners. If a listener throw an
+ * exception, remaining listeners are called, and then the exception is
+ * resent.
*
* @param editorPart
*/
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/LifeCycleEventsProviderServiceFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/LifeCycleEventsProviderServiceFactory.java
index 48826579f94..44d0cc56bab 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/LifeCycleEventsProviderServiceFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/LifeCycleEventsProviderServiceFactory.java
@@ -19,11 +19,10 @@ import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.services.ServicesRegistry;
import org.eclipse.papyrus.resource.ModelSet;
-
/**
* A service factory to create the {@link ILifeCycleEventsProvider} service.
- * This provide a nickname for {@link SaveAndDirtyService} service.
- * This serviceFactory depends on {@link SaveAndDirtyService} service.
+ * This provide a nickname for {@link SaveAndDirtyService} service. This
+ * serviceFactory depends on {@link SaveAndDirtyService} service.
*
* @author cedric dumoulin
*
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/SaveAndDirtyService.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/SaveAndDirtyService.java
index 1b3edf0aa12..71898cbe651 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/SaveAndDirtyService.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/lifecycleevents/SaveAndDirtyService.java
@@ -48,19 +48,21 @@ import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.SaveAsDialog;
import org.eclipse.ui.part.FileEditorInput;
-
/**
- * A Papyrus Service allowing to perform save and saveAs on Papyrus Models. The service also allows
- * to listen on the dirty state of the Models. <br>
- * The service implements the {@link ISaveablePart} interface, and can be used directly in part requiring such
- * interface of adapter.
+ * A Papyrus Service allowing to perform save and saveAs on Papyrus Models. The
+ * service also allows to listen on the dirty state of the Models. <br>
+ * The service implements the {@link ISaveablePart} interface, and can be used
+ * directly in part requiring such interface of adapter.
*
* <br>
- * This class allows nested editors to register themselves as nested {@link ISaveablePart}. In this case, the registered part
- * will be notified each time a save or saveAs is performed. Also, the nested part will be asked for its dirtyState.
+ * This class allows nested editors to register themselves as nested {@link ISaveablePart}. In this case, the registered part will be notified
+ * each time a save or saveAs is performed. Also, the nested part will be asked
+ * for its dirtyState.
*
- * TODO : Improve the implementation by registering the isDirty flag value, and firing events only if the value really change.
- * Actually, the event is fired every time the model is modified, even if the virtual value of the flag hasn't changed.
+ * TODO : Improve the implementation by registering the isDirty flag value, and
+ * firing events only if the value really change. Actually, the event is fired
+ * every time the model is modified, even if the virtual value of the flag
+ * hasn't changed.
*
* @author cedric dumoulin
*
@@ -68,10 +70,10 @@ import org.eclipse.ui.part.FileEditorInput;
public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISaveablePart, IService, ISaveAndDirtyService {
/**
- * Class used to propagate life cycle events.
- * This class can be retrieved as a service using {@link ILifeCycleEventsProvider}.class.
- * This class extends LifeCycleEventsProvider, so the local variable is set with ourself (historical reasons).
- * TODO : remove this local variable.
+ * Class used to propagate life cycle events. This class can be retrieved as
+ * a service using {@link ILifeCycleEventsProvider}.class. This class
+ * extends LifeCycleEventsProvider, so the local variable is set with
+ * ourself (historical reasons). TODO : remove this local variable.
*/
protected LifeCycleEventsProvider lifeCycleEventsProvider = this;
@@ -96,13 +98,13 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav
private ServicesRegistry servicesRegistry;
/**
- * Associated editor.
- * Needed by saveAs to synchronize editor input.
+ * Associated editor. Needed by saveAs to synchronize editor input.
*/
private IMultiDiagramEditor multiDiagramEditor;
/**
- * List of registered {@link ISaveablePart}. This are usually nested editors.
+ * List of registered {@link ISaveablePart}. This are usually nested
+ * editors.
*/
private ISaveablePartList registeredIsaveablePart;
@@ -111,7 +113,6 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav
*/
private List<IEditorInputChangedListener> inputChangedListeners;
-
/**
* Listener on commandStack changes.
*/
@@ -123,7 +124,6 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav
};
};
-
/*
* Listener on ResourceSet
*/
@@ -157,7 +157,6 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav
};
-
/**
* Constructor.
*
@@ -168,8 +167,8 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav
}
/**
- * Initialize the service.
- * Retrieve other required services (ModelSet, CoreEditor).
+ * Initialize the service. Retrieve other required services (ModelSet,
+ * CoreEditor).
*
* @see org.eclipse.papyrus.core.services.IService#init(org.eclipse.papyrus.core.services.ServicesRegistry)
*
@@ -185,10 +184,13 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav
multiDiagramEditor = servicesRegistry.getService(IMultiDiagramEditor.class);
transactionalEditingDomain = ServiceUtils.getInstance().getTransactionalEditingDomain(servicesRegistry);
- // Initialize and register the ILifeCycleEventsProvider service (which is ourself).
- // This mean that the ILifeCycleEventsProvider is not available until we are started.
+ // Initialize and register the ILifeCycleEventsProvider service (which
+ // is ourself).
+ // This mean that the ILifeCycleEventsProvider is not available until we
+ // are started.
lifeCycleEvent = new DoSaveEvent(servicesRegistry, multiDiagramEditor);
- // servicesRegistry.add(ILifeCycleEventsProvider.class, 1, lifeCycleEventsProvider);
+ // servicesRegistry.add(ILifeCycleEventsProvider.class, 1,
+ // lifeCycleEventsProvider);
}
@@ -262,7 +264,6 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav
lifeCycleEventsProvider.fireDoSaveAsEvent(lifeCycleEvent);
// Perform local doSaveAs
-
// Show a SaveAs dialog
Shell shell = multiDiagramEditor.getEditorSite().getWorkbenchWindow().getShell();
SaveAsDialog dialog = new SaveAsDialog(shell);
@@ -274,20 +275,20 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav
final IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
try {
new ProgressMonitorDialog(shell).run(false, // don't fork
- false, // can't cancel
- new WorkspaceModifyOperation() { // run this operation
-
- @Override
- public void execute(final IProgressMonitor monitor) {
- try {
- resourceSet.saveAs(path);
- // notify registered IsaveablePart
- registeredIsaveablePart.doSave(monitor);
- } catch (IOException e) {
- log.error("Unable to saveAs the resource set", e);
+ false, // can't cancel
+ new WorkspaceModifyOperation() { // run this operation
+
+ @Override
+ public void execute(final IProgressMonitor monitor) {
+ try {
+ resourceSet.saveAs(path);
+ // notify registered IsaveablePart
+ registeredIsaveablePart.doSave(monitor);
+ } catch (IOException e) {
+ log.error("Unable to saveAs the resource set", e);
+ }
}
- }
- });
+ });
// set input to the new file
fireEditorInputChanged(new FileEditorInput(file));
markSaveLocation();
@@ -338,8 +339,8 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav
}
/**
- * Return true if the multiEditor is dirty, false otherwise.
- * The dirty state is compute as follow:
+ * Return true if the multiEditor is dirty, false otherwise. The dirty state
+ * is compute as follow:
* <ul>
* <li>The {@link TransactionalEditingDomain} commandStack is checked</li>
* <li>and each registered nested Isaveable.isDirty() state is checked</li>
@@ -356,7 +357,8 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav
* @return
*/
public boolean isDirty() {
- // First, look if the model part (EMF) is dirty, else look at the Graphical part (GEF/GMF)
+ // First, look if the model part (EMF) is dirty, else look at the
+ // Graphical part (GEF/GMF)
return ((BasicCommandStack)transactionalEditingDomain.getCommandStack()).isSaveNeeded() || registeredIsaveablePart.isDirty();
}
@@ -379,7 +381,8 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav
}
/**
- * Mark the command stack of all sub-editors. Default implementation do nothing.
+ * Mark the command stack of all sub-editors. Default implementation do
+ * nothing.
*/
protected void markSaveLocation() {
((BasicCommandStack)transactionalEditingDomain.getCommandStack()).saveIsDone();
@@ -387,9 +390,9 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav
}
/**
- * Register a nested {@link ISaveablePart} as a listener that will be notified each time a {@link #doSave(IProgressMonitor)} or
- * {@link #doSaveAs()} is performed.
- * Also, it will be asked for the dirtyState.
+ * Register a nested {@link ISaveablePart} as a listener that will be
+ * notified each time a {@link #doSave(IProgressMonitor)} or {@link #doSaveAs()} is performed. Also, it will be asked for the
+ * dirtyState.
*
* @param saveablePart
*/
@@ -438,7 +441,8 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav
private static final long serialVersionUID = 1L;
/**
- * Return true if one of the part is dirty, false if all part are not dirty.
+ * Return true if one of the part is dirty, false if all part are not
+ * dirty.
*
* @return
*/
@@ -459,7 +463,6 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav
public void doSave(IProgressMonitor monitor) {
for(ISaveablePart part : this) {
-
try {
part.doSave(monitor);
} catch (Exception e) {
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/listenerservice/IPapyrusListener.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/listenerservice/IPapyrusListener.java
index fb5dfb86c51..b88c6cdaf58 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/listenerservice/IPapyrusListener.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/listenerservice/IPapyrusListener.java
@@ -13,9 +13,10 @@ package org.eclipse.papyrus.core.listenerservice;
import org.eclipse.emf.common.notify.Notification;
/**
- * This interface is a listener that will listen directly all events in papyrus: uml. It will be very useful for external plug-in.
+ * This interface is a listener that will listen directly all events in papyrus:
+ * uml. It will be very useful for external plug-in.
*
- *An implementation may be an adapter.
+ * An implementation may be an adapter.
*/
public interface IPapyrusListener {
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/listenerservice/ModelListenerManager.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/listenerservice/ModelListenerManager.java
index 73ca05e22d9..b8b56781a2f 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/listenerservice/ModelListenerManager.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/listenerservice/ModelListenerManager.java
@@ -71,7 +71,7 @@ public class ModelListenerManager extends EContentAdapter {
IPapyrusListener listener = (IPapyrusListener)createExtension(element, element.getAttribute(REALIZATION_ID));
listenerRegistry.put(listenerName, listener);
} catch (Exception e) {
- Activator.log.error("- " + listenerName + " can not be loaded: "+e.getLocalizedMessage(), e);
+ Activator.log.error("- " + listenerName + " can not be loaded: " + e.getLocalizedMessage(), e);
}
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/modelsetquery/ModelSetQuery.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/modelsetquery/ModelSetQuery.java
index 92d90314749..c77e9b33c3f 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/modelsetquery/ModelSetQuery.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/modelsetquery/ModelSetQuery.java
@@ -22,7 +22,8 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.core.modelsetquery.impl.IModelSetQueryAdapter;
/**
- * The Class ModelSetQuery provides service to get objects of specified type using cache mechanism
+ * The Class ModelSetQuery provides service to get objects of specified type
+ * using cache mechanism
*/
public class ModelSetQuery {
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/modelsetquery/impl/ModelSetQueryAdapter.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/modelsetquery/impl/ModelSetQueryAdapter.java
index d89308e7c2e..7402f4f0911 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/modelsetquery/impl/ModelSetQueryAdapter.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/modelsetquery/impl/ModelSetQueryAdapter.java
@@ -38,7 +38,8 @@ import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
/**
- * This cache creates a map associating EClasses to all the corresponding instances
+ * This cache creates a map associating EClasses to all the corresponding
+ * instances
*
* @author Tristan Faure
*/
@@ -50,8 +51,9 @@ public class ModelSetQueryAdapter implements IModelSetQueryAdapter, Adapter.Inte
private Map<EClassifier, Collection<EObject>> cache = Collections.synchronizedMap(new HashMap<EClassifier, Collection<EObject>>());
/**
- * This cache adapter is only used if the caller don't use correctly TypeCacheAdapter.
- * With the simple cache adapter performance are not good but a result is still returned
+ * This cache adapter is only used if the caller don't use correctly
+ * TypeCacheAdapter. With the simple cache adapter performance are not good
+ * but a result is still returned
*/
private static SimpleTypeCacheAdapter simpleCacheAdapter = new SimpleTypeCacheAdapter();
@@ -114,7 +116,6 @@ public class ModelSetQueryAdapter implements IModelSetQueryAdapter, Adapter.Inte
}
}
-
protected void handleContainment(Notification notification) {
Object notifier = notification.getNotifier();
// synchronize cache on ADD and REMOVE notifications
@@ -450,7 +451,8 @@ public class ModelSetQueryAdapter implements IModelSetQueryAdapter, Adapter.Inte
}
/**
- * This method provides a way for user to force first entries in the cache. The list of element must be a HashSet to optimize the performances
+ * This method provides a way for user to force first entries in the cache.
+ * The list of element must be a HashSet to optimize the performances
*
* @param type
* @param list
@@ -463,13 +465,13 @@ public class ModelSetQueryAdapter implements IModelSetQueryAdapter, Adapter.Inte
return cache.containsKey(type);
}
-
public static IModelSetQueryAdapter getSimpleTypeCacheAdapter() {
return simpleCacheAdapter;
}
/**
- * This implementation uses ItemPropertyDescriptor class to resolve objects from type
+ * This implementation uses ItemPropertyDescriptor class to resolve objects
+ * from type
*
* @author tfaure
*/
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/modelsetquery/impl/ModelSetQueryInitializer.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/modelsetquery/impl/ModelSetQueryInitializer.java
index 7283543e872..d231156293f 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/modelsetquery/impl/ModelSetQueryInitializer.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/modelsetquery/impl/ModelSetQueryInitializer.java
@@ -15,40 +15,36 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.papyrus.resource.IModelSetSnippet;
import org.eclipse.papyrus.resource.ModelSet;
-
/**
- * This snippet take in charge the initialization of the TypeCache.
- * The snippet is attached to the {@link ModelSet} (in the extensions), and called
- * right after ModelsManager is initialized.
+ * This snippet take in charge the initialization of the TypeCache. The snippet
+ * is attached to the {@link ModelSet} (in the extensions), and called right
+ * after ModelsManager is initialized.
*
* @author cedric dumoulin
- *
+ *
*/
public class ModelSetQueryInitializer implements IModelSetSnippet {
/**
* The type cache adapter used to reference elements from a type
*/
- private ModelSetQueryAdapter modelQueryAdapter ;
+ private ModelSetQueryAdapter modelQueryAdapter;
/**
* @see org.eclipse.papyrus.resource.IModelSetSnippet#start(org.eclipse.papyrus.resource.ModelSet)
- *
+ *
* @param modelsManager
*/
public void start(ModelSet modelsManager) {
EList<Adapter> eAdapters = modelsManager.eAdapters();
- boolean found = false ;
- for (Adapter adapter : eAdapters)
- {
- if (adapter instanceof IModelSetQueryAdapter)
- {
- found = true ;
+ boolean found = false;
+ for(Adapter adapter : eAdapters) {
+ if(adapter instanceof IModelSetQueryAdapter) {
+ found = true;
modelQueryAdapter = (ModelSetQueryAdapter)adapter;
}
}
- if (!found)
- {
+ if(!found) {
modelQueryAdapter = new ModelSetQueryAdapter();
eAdapters.add(modelQueryAdapter);
}
@@ -57,12 +53,11 @@ public class ModelSetQueryInitializer implements IModelSetSnippet {
/**
* @see org.eclipse.papyrus.resource.IModelSetSnippet#dispose(org.eclipse.papyrus.resource.ModelSet)
- *
+ *
* @param modelsManager
*/
public void dispose(ModelSet modelsManager) {
- if (modelQueryAdapter != null)
- {
+ if(modelQueryAdapter != null) {
modelsManager.eAdapters().remove(modelQueryAdapter);
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/ActionBarContributorDescriptor.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/ActionBarContributorDescriptor.java
index a52d71b28a6..fdc48612671 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/ActionBarContributorDescriptor.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/ActionBarContributorDescriptor.java
@@ -17,8 +17,8 @@ import org.eclipse.papyrus.core.editor.BackboneException;
import org.eclipse.ui.part.EditorActionBarContributor;
/**
- * Descriptor of an ActionBarContributor.
- * This descriptor is usually loaded from the Eclipse extension mechanism.
+ * Descriptor of an ActionBarContributor. This descriptor is usually loaded from
+ * the Eclipse extension mechanism.
*
* @author Cedric Dumoulin
* @author Patrick Tessier
@@ -54,13 +54,16 @@ public class ActionBarContributorDescriptor {
return context;
} catch (SecurityException e) {
- // Lets propagate. This is an implementation problem that should be solved by programmer.
+ // Lets propagate. This is an implementation problem that should be
+ // solved by programmer.
throw new RuntimeException(e);
} catch (InstantiationException e) {
- // Lets propagate. This is an implementation problem that should be solved by programmer.
+ // Lets propagate. This is an implementation problem that should be
+ // solved by programmer.
throw new RuntimeException(e);
} catch (IllegalAccessException e) {
- // Lets propagate. This is an implementation problem that should be solved by programmer.
+ // Lets propagate. This is an implementation problem that should be
+ // solved by programmer.
throw new RuntimeException(e);
}
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/ActionBarContributorExtensionFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/ActionBarContributorExtensionFactory.java
index 49cf8bef36a..e9dd491a273 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/ActionBarContributorExtensionFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/ActionBarContributorExtensionFactory.java
@@ -20,10 +20,11 @@ import org.eclipse.papyrus.core.extension.ExtensionException;
import org.eclipse.ui.part.EditorActionBarContributor;
/**
- * A factory used to create ActionBarContributor object from Eclipse extensions points elements.
+ * A factory used to create ActionBarContributor object from Eclipse extensions
+ * points elements.
*
* @author Cedric Dumoulin
- *@auhtor Patrick Tessier
+ * @auhtor Patrick Tessier
*/
public class ActionBarContributorExtensionFactory extends ExtensionUtils {
@@ -47,11 +48,13 @@ public class ActionBarContributorExtensionFactory extends ExtensionUtils {
}
/**
- * Create a ContextDescriptor instance corresponding to the ConfigurationElement.
+ * Create a ContextDescriptor instance corresponding to the
+ * ConfigurationElement.
*
* @param element
* an {@link IConfigurationElement} see eclipse extension point
- * @return a ContextDescriptor structure that contains information to the diagram context
+ * @return a ContextDescriptor structure that contains information to the
+ * diagram context
* @throws BadNameExtensionException
**/
public ActionBarContributorDescriptor createActionBarContributorDescriptor(IConfigurationElement element) throws ExtensionException {
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/ActionBarContributorRegistry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/ActionBarContributorRegistry.java
index 2cfc603832d..d9248e879fe 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/ActionBarContributorRegistry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/ActionBarContributorRegistry.java
@@ -30,8 +30,8 @@ import org.eclipse.papyrus.core.services.ServicesRegistry;
import org.eclipse.ui.part.EditorActionBarContributor;
/**
- * A factory managing ActionBarContributor creation.
- * The factory is loaded from ActionBarContributor declared in Eclipse extension mechanism.
+ * A factory managing ActionBarContributor creation. The factory is loaded from
+ * ActionBarContributor declared in Eclipse extension mechanism.
*
* @author dumoulin
*
@@ -50,17 +50,17 @@ public class ActionBarContributorRegistry implements IActionBarContributorFactor
private Map<Object, ActionBarContributorDescriptor> editorContextDescriptors;
/**
- * Constructor. defaultContext, input and site are explicitly required in order be sure that they are initialized. The multiEditor should be
- * initialized. In particular, getEditorSite(),
- * getEditorInput() and getDefaultContext() should return initialized values.
+ * Constructor. defaultContext, input and site are explicitly required in
+ * order be sure that they are initialized. The multiEditor should be
+ * initialized. In particular, getEditorSite(), getEditorInput() and
+ * getDefaultContext() should return initialized values.
*
- *@param multiEditor
+ * @param multiEditor
* the multieditor
- *@param extensionPointNamespace
+ * @param extensionPointNamespace
*/
public ActionBarContributorRegistry(String extensionPointNamespace) {
-
this.extensionPointNamespace = extensionPointNamespace;
initializeEditorContextDescriptors();
}
@@ -146,8 +146,9 @@ public class ActionBarContributorRegistry implements IActionBarContributorFactor
/**
* Initialize the service. Do nothing here.
+ *
* @see org.eclipse.papyrus.core.services.IService#init(org.eclipse.papyrus.core.services.ServicesRegistry)
- *
+ *
* @param servicesRegistry
*/
public void init(ServicesRegistry servicesRegistry) {
@@ -168,5 +169,4 @@ public class ActionBarContributorRegistry implements IActionBarContributorFactor
public void disposeService() {
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/CoreComposedActionBarContributor.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/CoreComposedActionBarContributor.java
index 6caeb12f6f7..d01e583265d 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/CoreComposedActionBarContributor.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/CoreComposedActionBarContributor.java
@@ -24,12 +24,11 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.part.EditorActionBarContributor;
-
/**
*
* An ActionBarContributor composed of ActionBarContributor from multi editor.
- * This ActionBarContributor switch to the contributor dedicated to the active editor in
- * a MultiPageEditor environement.
+ * This ActionBarContributor switch to the contributor dedicated to the active
+ * editor in a MultiPageEditor environement.
*
* @author dumoulin
*
@@ -63,7 +62,6 @@ public class CoreComposedActionBarContributor extends ComposedActionBarContribut
contributors = actionBarContributorRegistry.getActionBarContributors();
}
-
/**
* @return the actionBarContributorRegistry
*/
@@ -71,7 +69,6 @@ public class CoreComposedActionBarContributor extends ComposedActionBarContribut
return actionBarContributorRegistry;
}
-
/**
* Dispose all nested ActionBarContributors.
*/
@@ -105,14 +102,14 @@ public class CoreComposedActionBarContributor extends ComposedActionBarContribut
* @see org.eclipse.gef.ui.actions.ActionBarContributor#buildActions()
*/
protected void buildActions() {
- //getActionBars().getToolBarManager().add(new UndoRetargetAction());
- //getActionBars().getToolBarManager().add(new RedoRetargetAction());
+ // getActionBars().getToolBarManager().add(new UndoRetargetAction());
+ // getActionBars().getToolBarManager().add(new RedoRetargetAction());
}
@Override
public void setActiveEditor(IEditorPart part) {
super.setActiveEditor(part);
- for (EditorActionBarContributor contributor : contributors) {
+ for(EditorActionBarContributor contributor : contributors) {
contributor.setActiveEditor(part);
}
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/IActionBarContributorFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/IActionBarContributorFactory.java
index 66fe63e9a80..128224f75fc 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/IActionBarContributorFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/multidiagram/actionbarcontributor/IActionBarContributorFactory.java
@@ -6,7 +6,6 @@ package org.eclipse.papyrus.core.multidiagram.actionbarcontributor;
import org.eclipse.papyrus.core.editor.BackboneException;
import org.eclipse.ui.part.EditorActionBarContributor;
-
/**
* Interface used to get an ActionBarContributor from its ID.
*
@@ -16,8 +15,8 @@ import org.eclipse.ui.part.EditorActionBarContributor;
public interface IActionBarContributorFactory {
/**
- * Get an ActionBarContributor by its key.
- * If an ActionBarContributor already exists for this key, return it.
+ * Get an ActionBarContributor by its key. If an ActionBarContributor
+ * already exists for this key, return it.
*
* @param key
* @return
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/BadStateException.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/BadStateException.java
index cff1ab1ee95..6ff06b1724e 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/BadStateException.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/BadStateException.java
@@ -3,8 +3,6 @@
*/
package org.eclipse.papyrus.core.services;
-
-
/**
* @author cedric dumoulin
*
@@ -21,10 +19,7 @@ public class BadStateException extends ServiceException {
*
*/
public BadStateException(ServiceState expectedState, ServiceState state, ServiceDescriptor descriptor) {
- super("Bad state for service '" + descriptor.getKey()
- + "'. Expected '" + expectedState
- + "' found '" + state
- + "'.");
+ super("Bad state for service '" + descriptor.getKey() + "'. Expected '" + expectedState + "' found '" + state + "'.");
}
/**
@@ -36,10 +31,7 @@ public class BadStateException extends ServiceException {
* @param serviceDescriptor
*/
public BadStateException(String text, ServiceState state, ServiceDescriptor descriptor) {
- super(text
- + " (Service= '" + descriptor.getKey()
- + ", state= " + state
- + ")");
+ super(text + " (Service= '" + descriptor.getKey() + ", state= " + state + ")");
}
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ComposedService.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ComposedService.java
index 0151a03a029..9ee20a77f22 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ComposedService.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ComposedService.java
@@ -6,52 +6,55 @@ package org.eclipse.papyrus.core.services;
import java.util.ArrayList;
import java.util.List;
-
/**
* Base class to create a Service composed of other services called Parts.
- * ServiceParts register themselves to the ComposedService.
- * The ComposedService maintain a list of its part.
+ * ServiceParts register themselves to the ComposedService. The ComposedService
+ * maintain a list of its part.
*
* @author cedric dumoulin
*
- * @param T The type of sub-services that can register to this ComposedService.
+ * @param T
+ * The type of sub-services that can register to this
+ * ComposedService.
*/
-public abstract class ComposedService <T> implements IService {
+public abstract class ComposedService<T> implements IService {
/**
* The list of serviceParts composing this Service.
*/
protected List<T> serviceParts = new ArrayList<T>();
-
+
/**
- * Constructor.
- * Constructor.
- *
+ * Constructor. Constructor.
+ *
*/
public ComposedService() {
}
-
+
/**
* Add the provided servicePart.
+ *
* @param servicePart
*/
public void addServicePart(T servicePart) {
serviceParts.add(servicePart);
}
-
+
/**
* Remove the provided servicePart.
+ *
* @param servicePart
*/
public void removeServicePart(T servicePart) {
- serviceParts.remove(servicePart);
+ serviceParts.remove(servicePart);
}
-
+
/**
* Do nothing here.
+ *
* @see org.eclipse.papyrus.core.services.IService#init(org.eclipse.papyrus.core.services.ServicesRegistry)
- *
+ *
* @param servicesRegistry
* @throws ServiceException
*/
@@ -60,8 +63,9 @@ public abstract class ComposedService <T> implements IService {
/**
* Do nothing here.
+ *
* @see org.eclipse.papyrus.core.services.IService#startService()
- *
+ *
* @throws ServiceException
*/
public void startService() throws ServiceException {
@@ -69,8 +73,9 @@ public abstract class ComposedService <T> implements IService {
/**
* Do nothing here.
+ *
* @see org.eclipse.papyrus.core.services.IService#disposeService()
- *
+ *
* @throws ServiceException
*/
public void disposeService() throws ServiceException {
@@ -78,11 +83,11 @@ public abstract class ComposedService <T> implements IService {
/**
* Get a list of registered sub service parts.
+ *
* @return List of registered services.
*/
public List<T> getRegisteredServices() {
return serviceParts;
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ComposedServicePart.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ComposedServicePart.java
index 7124b79a7ef..03ac1ec5a81 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ComposedServicePart.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ComposedServicePart.java
@@ -3,46 +3,47 @@
*/
package org.eclipse.papyrus.core.services;
-
-
/**
* A service that register itself to its associated {@link ComposedService}.
*
- * @param T The main ComposedService
+ * @param T
+ * The main ComposedService
*
* @author cedric dumoulin
- * @param T The type of the ComposedService to which this part will be registered.
- *
+ * @param T
+ * The type of the ComposedService to which this part will be
+ * registered.
+ *
*/
@SuppressWarnings("rawtypes")
-public abstract class ComposedServicePart <T extends ComposedService> implements IService {
+public abstract class ComposedServicePart<T extends ComposedService> implements IService {
/**
*
*/
protected ServicesRegistry servicesRegistry;
-
+
/**
* Class of the parent ComposedService
*/
private Class<T> composedServiceKey;
-
+
/**
* ComposedService that will own this part.
*/
T parentService;
-
-
- public ComposedServicePart( Class< T> composedServiceKey) {
+
+ public ComposedServicePart(Class<T> composedServiceKey) {
this.composedServiceKey = composedServiceKey;
}
-
+
/**
* Initialize the service. Attach itself to the ComposedService
+ *
* @see org.eclipse.papyrus.core.services.IService#init(org.eclipse.papyrus.core.services.ServicesRegistry)
- *
+ *
* @param servicesRegistry
- * @throws ServiceException
+ * @throws ServiceException
*/
@SuppressWarnings("unchecked")
public void init(ServicesRegistry servicesRegistry) throws ServiceException {
@@ -52,24 +53,23 @@ public abstract class ComposedServicePart <T extends ComposedService> implements
}
/**
- * Start the service.
+ * Start the service.
+ *
* @see org.eclipse.papyrus.core.services.IService#startService()
- *
+ *
*/
public void startService() throws ServiceException {
-
-
+
}
/**
*
* @see org.eclipse.papyrus.core.services.IService#disposeService()
- *
+ *
*/
@SuppressWarnings("unchecked")
public void disposeService() {
parentService.removeServicePart(this);
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ExtensionServicesRegistry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ExtensionServicesRegistry.java
index 5668d423cfc..c318d9f0609 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ExtensionServicesRegistry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ExtensionServicesRegistry.java
@@ -11,9 +11,9 @@ import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.Platform;
import org.eclipse.papyrus.core.services.ServiceDescriptor.ServiceTypeKind;
-
/**
- * ServiceRegistry reading and registering services declared in Eclipse Extensions.
+ * ServiceRegistry reading and registering services declared in Eclipse
+ * Extensions.
*
* @author dumoulin
*
@@ -140,11 +140,7 @@ public class ExtensionServicesRegistry extends ServicesRegistry {
serviceStartKind = ServiceStartKind.valueOf(serviceStartKindStr.toUpperCase());
} catch (IllegalArgumentException e) {
// Can't convert property
- throw new ServiceException("Can't convert property " + STARTKIND_PROPERTY
- + "(plugin=" + ele.getContributor()
- + "declaringExtension=" + ele.getDeclaringExtension()
- + ")"
- , e);
+ throw new ServiceException("Can't convert property " + STARTKIND_PROPERTY + "(plugin=" + ele.getContributor() + "declaringExtension=" + ele.getDeclaringExtension() + ")", e);
}
}
@@ -161,7 +157,6 @@ public class ExtensionServicesRegistry extends ServicesRegistry {
// Read dependsOn keys
List<String> keys = getDependsOn(ele);
-
// Create descriptor
ServiceDescriptor desc = new ServiceDescriptor(key, serviceClassname, serviceStartKind, priority);
desc.setClassBundleID(ele.getContributor().getName());
@@ -198,5 +193,4 @@ public class ExtensionServicesRegistry extends ServicesRegistry {
return keys;
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/IService.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/IService.java
index eb48459b6af..0961af556cf 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/IService.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/IService.java
@@ -3,18 +3,17 @@
*/
package org.eclipse.papyrus.core.services;
-
/**
- * An Service that can be registered in the {@link ServicesRegistry}.
- * A service is a singleton available throw the registry. A service can be shared across editors.
- * <br>
+ * An Service that can be registered in the {@link ServicesRegistry}. A service
+ * is a singleton available throw the registry. A service can be shared across
+ * editors. <br>
* The life cycle is as follow:
* <ul>
- * <li>service creation</li>
- * <li>{@link #init(ServicesRegistry)} - Other service can be retrieved from the registry, but are not started yet.</li>
- * <li>{@link #startService()} - service is started.</li>
- * <li>Service can be used</li>
- * <li>{@link #disposeService()} - service is disposed and should not be used anymore.</li>
+ * <li>service creation</li>
+ * <li>{@link #init(ServicesRegistry)} - Other service can be retrieved from the registry, but are not started yet.</li>
+ * <li>{@link #startService()} - service is started.</li>
+ * <li>Service can be used</li>
+ * <li>{@link #disposeService()} - service is disposed and should not be used anymore.</li>
* </ul>
*
* @author cedric dumoulin
@@ -23,8 +22,8 @@ package org.eclipse.papyrus.core.services;
public interface IService {
/**
- * Init the service and set its associated Registry.
- * The registry can be used to retrieve other services.
+ * Init the service and set its associated Registry. The registry can be
+ * used to retrieve other services.
*
* @param servicesRegistry
*/
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/IServiceFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/IServiceFactory.java
index e7e35a356c1..df6aeb7211e 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/IServiceFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/IServiceFactory.java
@@ -3,13 +3,13 @@
*/
package org.eclipse.papyrus.core.services;
-
/**
* A factory creating a Service that can be registered in the {@link ServicesRegistry}.
*
- * A service is a singleton available throw the registry. A service can be shared across editors.
- * The service lifecycle events (init, start and dispose) are sent to the factory. The factory is
- * responsible to forward them to the real service.
+ * A service is a singleton available throw the registry. A service can be
+ * shared across editors. The service lifecycle events (init, start and dispose)
+ * are sent to the factory. The factory is responsible to forward them to the
+ * real service.
*
* @author dumoulin
*
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceDescriptor.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceDescriptor.java
index 0c661ea4ba2..8073b61123d 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceDescriptor.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceDescriptor.java
@@ -6,11 +6,8 @@ package org.eclipse.papyrus.core.services;
import java.util.Collections;
import java.util.List;
-
-
/**
- * Descriptor of a service.
- * This descriptor describe a service.
+ * Descriptor of a service. This descriptor describe a service.
*
* @author cedirc dumoulin
*
@@ -19,10 +16,12 @@ public class ServiceDescriptor {
/**
* Possible kind for service types.
- *
+ *
*/
- public enum ServiceTypeKind { service, serviceFactory, pojo };
-
+ public enum ServiceTypeKind {
+ service, serviceFactory, pojo
+ };
+
/** Classname of the service. USed to start the service */
private String serviceClassname;
@@ -33,8 +32,8 @@ public class ServiceDescriptor {
private ServiceTypeKind serviceTypeKind = ServiceTypeKind.service;
/**
- * Service priority. If two service are registered under the same key, only the one with the
- * higher priority is started.
+ * Service priority. If two service are registered under the same key, only
+ * the one with the higher priority is started.
*/
private int priority;
@@ -44,14 +43,14 @@ public class ServiceDescriptor {
private String key;
/**
- * Id of the bundle owning the .class that is referenced by serviceClassname.
- * Requested when instanciating the class.
+ * Id of the bundle owning the .class that is referenced by
+ * serviceClassname. Requested when instanciating the class.
*/
private String classBundleID;
/**
- * If set to true, the service is anonymous : it is not registered and can't be retrieved with
- * getService().
+ * If set to true, the service is anonymous : it is not registered and can't
+ * be retrieved with getService().
*/
private boolean isAnonymous = false;
@@ -59,12 +58,12 @@ public class ServiceDescriptor {
* List of keys of Services required by this service.
*/
private List<String> requiredServices = Collections.emptyList();
-
+
/**
* Empty list.
*/
private static List<String> EMPTY_LIST_STRING = Collections.emptyList();
-
+
/**
* Constructor.
*
@@ -85,7 +84,8 @@ public class ServiceDescriptor {
/**
* Constructor.
*
- * @param key A class used as key. The classname is used as key.
+ * @param key
+ * A class used as key. The classname is used as key.
* @param serviceClassname
* @param serviceStartKind
* @param priority
@@ -98,7 +98,8 @@ public class ServiceDescriptor {
/**
* Constructor.
*
- * @param key A class used as key. The classname is used as key.
+ * @param key
+ * A class used as key. The classname is used as key.
* @param serviceClassname
* @param serviceStartKind
* @param priority
@@ -117,7 +118,8 @@ public class ServiceDescriptor {
/**
* Constructor.
*
- * @param key A class used as key. The classname is used as key.
+ * @param key
+ * A class used as key. The classname is used as key.
* @param serviceClassname
* @param serviceStartKind
* @param priority
@@ -143,7 +145,8 @@ public class ServiceDescriptor {
/**
* Constructor.
*
- * @param key A class used as key. The classname is used as key.
+ * @param key
+ * A class used as key. The classname is used as key.
* @param serviceClassname
* @param serviceStartKind
* @param priority
@@ -209,7 +212,6 @@ public class ServiceDescriptor {
return priority;
}
-
/**
* @return the key
*/
@@ -217,7 +219,6 @@ public class ServiceDescriptor {
return key;
}
-
/**
* @return the serviceClassname
*/
@@ -225,7 +226,6 @@ public class ServiceDescriptor {
return serviceClassname;
}
-
/**
* @return the classBundleID
*/
@@ -241,18 +241,18 @@ public class ServiceDescriptor {
classBundleID = classBundleId;
}
-
/**
* Get the keys of all the required services
+ *
* @return the requiredServices
*/
public List<String> getRequiredServiceKeys() {
return requiredServices;
}
-
/**
- * @param requiredServices the requiredServices to set
+ * @param requiredServices
+ * the requiredServices to set
*/
public void setRequiredServiceKeys(List<String> requiredServices) {
this.requiredServices = requiredServices;
@@ -275,15 +275,14 @@ public class ServiceDescriptor {
return isAnonymous;
}
-
/**
- * @param isAnonymous the isAnonymous to set
+ * @param isAnonymous
+ * the isAnonymous to set
*/
public void setAnonymous(boolean isAnonymous) {
this.isAnonymous = isAnonymous;
}
-
/**
* @return the serviceTypeKind
*/
@@ -291,13 +290,12 @@ public class ServiceDescriptor {
return serviceTypeKind;
}
-
/**
- * @param serviceTypeKind the serviceTypeKind to set
+ * @param serviceTypeKind
+ * the serviceTypeKind to set
*/
public void setServiceTypeKind(ServiceTypeKind serviceTypeKind) {
this.serviceTypeKind = serviceTypeKind;
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceException.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceException.java
index 8a48c7f1b50..458d8d379a1 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceException.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceException.java
@@ -3,7 +3,6 @@
*/
package org.eclipse.papyrus.core.services;
-
/**
* Root Exception of Services Exception.
*
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceMultiException.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceMultiException.java
index 1538dc7ff50..cf51be1a527 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceMultiException.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceMultiException.java
@@ -6,15 +6,14 @@ package org.eclipse.papyrus.core.services;
import java.util.ArrayList;
import java.util.List;
-
/**
- * An exception encapsulating multiple exceptions.
- * This exception is thrown when an operation performed on several Services fails
- * on one or more of these Service.
- * The exception contains all the exceptions encoutered while opertating on Services.
+ * An exception encapsulating multiple exceptions. This exception is thrown when
+ * an operation performed on several Services fails on one or more of these
+ * Service. The exception contains all the exceptions encoutered while
+ * opertating on Services.
*
* @author cedric dumoulin
- *
+ *
*/
public class ServiceMultiException extends ServiceException {
@@ -22,16 +21,17 @@ public class ServiceMultiException extends ServiceException {
*
*/
private static final long serialVersionUID = 1L;
+
/**
* List of encountered exceptions.
*/
List<Throwable> encounteredExceptions = new ArrayList<Throwable>();
+
/**
* List of identifiers corresponding to exceptions.
*/
List<Object> serviceIdentifiers = new ArrayList<Object>();
-
-
+
/**
* @return the encounteredExceptions
*/
@@ -41,7 +41,7 @@ public class ServiceMultiException extends ServiceException {
/**
* Constructor.
- *
+ *
*/
public ServiceMultiException() {
super("Multiple exceptions");
@@ -49,7 +49,7 @@ public class ServiceMultiException extends ServiceException {
/**
* Constructor.
- *
+ *
* @param message
*/
public ServiceMultiException(String message) {
@@ -58,35 +58,37 @@ public class ServiceMultiException extends ServiceException {
/**
* Return the first exception.
+ *
* @see java.lang.Throwable#getCause()
- *
+ *
* @return
*/
@Override
public Throwable getCause() {
- return ( encounteredExceptions.size()>0 ? encounteredExceptions.get(0) : null );
+ return (encounteredExceptions.size() > 0 ? encounteredExceptions.get(0) : null);
}
-
+
/**
* Return the message if any, or the message of the first exception.
+ *
* @see java.lang.Throwable#getMessage()
- *
+ *
* @return
*/
@Override
public String getMessage() {
-
+
StringBuffer buffer = new StringBuffer();
-
+
String message = super.getMessage();
- if (message != null)
+ if(message != null)
buffer.append(message).append('\n');
-
+
buffer.append("----- exceptions : ----------\n");
- for( int i = 0; i< encounteredExceptions.size(); i++ ) {
+ for(int i = 0; i < encounteredExceptions.size(); i++) {
Throwable exception = encounteredExceptions.get(i);
Object identifierMsg = serviceIdentifiers.get(i);
-
+
if(identifierMsg != null)
buffer.append(identifierMsg.toString()).append(" : ");
String msg = exception.getMessage();
@@ -94,40 +96,44 @@ public class ServiceMultiException extends ServiceException {
buffer.append(msg).append('\n');
}
buffer.append("----------------------------- \n");
-
+
return buffer.toString();
-// // Check for first exception
-// if( encounteredExceptions.size() > 1)
-// return encounteredExceptions.get(0).getMessage();
-//
-// // default
-// return null;
+ // // Check for first exception
+ // if( encounteredExceptions.size() > 1)
+ // return encounteredExceptions.get(0).getMessage();
+ //
+ // // default
+ // return null;
}
-
+
/**
* Add an exception to the list of exceptions.
+ *
* @param exception
*/
- public void addException( Throwable exception) {
+ public void addException(Throwable exception) {
addException("unknown", exception);
}
/**
- * Add an exception to the list of exceptions. Also record the corresponding model identifier if any.
+ * Add an exception to the list of exceptions. Also record the corresponding
+ * model identifier if any.
+ *
* @param exception
*/
public void addException(Object identifier, Throwable exception) {
- encounteredExceptions.add( exception );
+ encounteredExceptions.add(exception);
serviceIdentifiers.add(identifier);
}
/**
* Merge both exceptions
+ *
* @param e
*/
public void addAll(ServiceMultiException e) {
encounteredExceptions.addAll(e.encounteredExceptions);
serviceIdentifiers.addAll(serviceIdentifiers);
}
-
+
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceNotFoundException.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceNotFoundException.java
index 164899a88a3..2981042819a 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceNotFoundException.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceNotFoundException.java
@@ -1,6 +1,5 @@
package org.eclipse.papyrus.core.services;
-
/**
* Service is not found.
*
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceStartKind.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceStartKind.java
index 7a772f6cd17..316e3d6ebe0 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceStartKind.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceStartKind.java
@@ -3,12 +3,11 @@
*/
package org.eclipse.papyrus.core.services;
-
/**
- * Kind of possible start method for a service.
- * LAZY - The service start when it is requested for the first time.
- * STARTUP - The service start as soon as the registry is started, or when the service is added is the
- * registry is already started.
+ * Kind of possible start method for a service. LAZY - The service start when it
+ * is requested for the first time. STARTUP - The service start as soon as the
+ * registry is started, or when the service is added is the registry is already
+ * started.
*
* @author dumoulin
*
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceState.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceState.java
index 0a11a463b68..ef562806824 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceState.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServiceState.java
@@ -3,7 +3,6 @@
*/
package org.eclipse.papyrus.core.services;
-
/**
* The different states that a service can have.
*
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServicesRegistry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServicesRegistry.java
index eb8aa1e3030..7298820738b 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServicesRegistry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/ServicesRegistry.java
@@ -22,22 +22,22 @@ import org.eclipse.papyrus.core.services.internal.ServiceStartupEntry;
import org.eclipse.papyrus.core.services.internal.ServiceTypeEntry;
import org.eclipse.papyrus.core.services.internal.StartStartupEntry;
-
/**
- * A registry of services.
- * This registry allows to get a service by its identifier. The identifier is generally
- * the classname of the service.
- * Services can be added using the Eclipse extension mechanism (if you use {@link ExtensionServicesRegistry}).
- * <br>
- * A Service is a class providing operations. The ServiceRegistry is used to share objects (i.e. services)
- * between nested editors and also the core main editor.
+ * A registry of services. This registry allows to get a service by its
+ * identifier. The identifier is generally the classname of the service.
+ * Services can be added using the Eclipse extension mechanism (if you use {@link ExtensionServicesRegistry}). <br>
+ * A Service is a class providing operations. The ServiceRegistry is used to
+ * share objects (i.e. services) between nested editors and also the core main
+ * editor.
*
* <br>
- * In this implementation, services should be added to the registry before the call to createServices().
- * If a service is added after the call, it will not be started (except if it is a lazy service).
- * <br>
+ * In this implementation, services should be added to the registry before the
+ * call to createServices(). If a service is added after the call, it will not
+ * be started (except if it is a lazy service). <br>
* A typical usage is:
- * <pre><code>
+ *
+ * <pre>
+ * <code>
* ServicesRegistry serviceRegistry = new ServiceRegistry();
* // Add your services
* serviceRegistry.add( ...);
@@ -48,22 +48,27 @@ import org.eclipse.papyrus.core.services.internal.StartStartupEntry;
*
* // Retrieve a service
* myService = serviceRegistry.getService( serviceKey );
- * </code></pre>
+ * </code>
+ * </pre>
+ *
+ * It is possible to register new services after the serviceRegistry has been
+ * started. In this case, you need to start them explicitly if they are of type
+ * ServiceStartKind.STARTUP.
*
- * It is possible to register new services after the serviceRegistry has been started. In this case, you need to start
- * them explicitly if they are of type ServiceStartKind.STARTUP.
- * <pre><code>
+ * <pre>
+ * <code>
* // Add your new services
* serviceRegistry.add( key1, ...);
* serviceRegistry.add( key2, ...);
*
* // start the new services
* serviceRegistry.startRegistry(key1, key2);
- * </code></pre>
+ * </code>
+ * </pre>
*
* <ul>
- * <li></li>
- * <li></li>
+ * <li></li>
+ * <li></li>
* </ul>
*
* @author cedric dumoulin
@@ -78,11 +83,11 @@ public class ServicesRegistry {
/**
* Map of existing services.
*/
- // private Map<Object, AbstractServiceEntry> services;
+ // private Map<Object, AbstractServiceEntry> services;
/**
- * A Map of services added to the register (thow the addXxx() methods), but not yet registered.
- * They will be registered after a call to startXxx().
+ * A Map of services added to the register (thow the addXxx() methods), but
+ * not yet registered. They will be registered after a call to startXxx().
*/
private Map<String, ServiceStartupEntry> addedServices = new HashMap<String, ServiceStartupEntry>();
@@ -92,11 +97,11 @@ public class ServicesRegistry {
private Map<String, ServiceStartupEntry> namedServices = new HashMap<String, ServiceStartupEntry>();
/**
- * Map of services registered without a name (anonymous). Such services can't be retrieved.
+ * Map of services registered without a name (anonymous). Such services
+ * can't be retrieved.
*/
private List<ServiceStartupEntry> anonymousServices = new ArrayList<ServiceStartupEntry>();
-
/**
* Constructor.
*/
@@ -117,18 +122,11 @@ public class ServicesRegistry {
if(service != null) {
if(service.getDescriptor().getPriority() > serviceDescriptor.getPriority())
return;
- else if(service.getDescriptor().getPriority() == serviceDescriptor.getPriority())
- {
- log.warning("Two services with same priority (" + serviceDescriptor.getPriority()
- + ") are declared under key '" + service.getDescriptor().getKey()
- + "'. Keep the first encountered only. (bundles: " + service.getDescriptor().getClassBundleID()
- + ", " + serviceDescriptor.getClassBundleID()
- + ")"
- );
+ else if(service.getDescriptor().getPriority() == serviceDescriptor.getPriority()) {
+ log.warning("Two services with same priority (" + serviceDescriptor.getPriority() + ") are declared under key '" + service.getDescriptor().getKey() + "'. Keep the first encountered only. (bundles: " + service.getDescriptor().getClassBundleID() + ", " + serviceDescriptor.getClassBundleID() + ")");
}
}
-
// Compute the service type entry
ServiceTypeEntry serviceTypeEntry;
ServiceTypeKind typeKind = serviceDescriptor.getServiceTypeKind();
@@ -151,8 +149,7 @@ public class ServicesRegistry {
}
/**
- * Add a service.
- * The descriptor will be created.
+ * Add a service. The descriptor will be created.
*
* @param key
* Service key
@@ -166,8 +163,7 @@ public class ServicesRegistry {
}
/**
- * Add a service.
- * The descriptor will be created.
+ * Add a service. The descriptor will be created.
*
* @param key
* Service key
@@ -181,8 +177,7 @@ public class ServicesRegistry {
}
/**
- * Add a service.
- * The descriptor will be created.
+ * Add a service. The descriptor will be created.
*
* @param key
* Service key
@@ -211,8 +206,7 @@ public class ServicesRegistry {
}
/**
- * Add a service.
- * The descriptor will be created.
+ * Add a service. The descriptor will be created.
*
* @param key
* Service key Class used as key. The classname is used as key.
@@ -227,9 +221,9 @@ public class ServicesRegistry {
}
/**
- * Add an already instanciated pojo (Plain Old Java Object) as Service.
- * The descriptor will be created.
- * No life cycle methods are called on the service.
+ * Add an already instanciated pojo (Plain Old Java Object) as Service. The
+ * descriptor will be created. No life cycle methods are called on the
+ * service.
*
* @param key
* Service key
@@ -243,9 +237,9 @@ public class ServicesRegistry {
}
/**
- * Add an already instanciated pojo (Plain Old Java Object) as Service.
- * The descriptor will be created.
- * No life cycle methods are called on the service.
+ * Add an already instanciated pojo (Plain Old Java Object) as Service. The
+ * descriptor will be created. No life cycle methods are called on the
+ * service.
*
* @param key
* Service key
@@ -277,9 +271,9 @@ public class ServicesRegistry {
}
/**
- * Add an already instanciated pojo (Plain Old Java Object) as Service.
- * The descriptor will be created.
- * No life cycle methods are called on the service.
+ * Add an already instanciated pojo (Plain Old Java Object) as Service. The
+ * descriptor will be created. No life cycle methods are called on the
+ * service.
*
* @param key
* Service key Class used as key. The classname is used as key.
@@ -320,8 +314,8 @@ public class ServicesRegistry {
}
/**
- * Get the requested service by its key.
- * The key is usually the classname of the service.
+ * Get the requested service by its key. The key is usually the classname of
+ * the service.
*
* @param serviceClass
* @return
@@ -344,7 +338,8 @@ public class ServicesRegistry {
}
/**
- * Get the requested service by its class (the service has to be registered by its class object).
+ * Get the requested service by its class (the service has to be registered
+ * by its class object).
*
* @param key
* The service class.
@@ -400,11 +395,10 @@ public class ServicesRegistry {
}
/**
- * Start the registry.
- * Start all services marked as start = STARTUP are started.
- * All services are first created, then initialized and finally started.
- * If an error occur on a service during one of this step, the service is removed from
- * the registry and and the error is logged.
+ * Start the registry. Start all services marked as start = STARTUP are
+ * started. All services are first created, then initialized and finally
+ * started. If an error occur on a service during one of this step, the
+ * service is removed from the registry and and the error is logged.
*
* @throws ServiceMultiException
*
@@ -421,12 +415,12 @@ public class ServicesRegistry {
// Get all roots : LAZY and START
Collection<ServiceStartupEntry> roots = getServiceRoots(addedServices.values(), map);
-// showServices(" Roots:", roots);
+ // showServices(" Roots:", roots);
// Detect cycles
checkCycle(roots, map);
// Retain only services with startupkind = START
roots = retainsToStartServices(roots);
- //
+ //
List<ServiceStartupEntry> toStart = buildTopologicalListOfServicesToStart(roots, map);
if(Activator.log.isDebugEnabled()) {
@@ -446,16 +440,15 @@ public class ServicesRegistry {
if(errors.getExceptions().size() > 0)
throw errors;
-
}
/**
- * Start the specified services, and their required services.
- * The specifies services should be in the addServices or already registered.
- * Start all services marked as start = STARTUP .
- * All eligible services are first created, then initialized and finally started.
- * If an error occur on a service during one of this step, the service is removed from
- * the registry and and the error is logged.
+ * Start the specified services, and their required services. The specifies
+ * services should be in the addServices or already registered. Start all
+ * services marked as start = STARTUP . All eligible services are first
+ * created, then initialized and finally started. If an error occur on a
+ * service during one of this step, the service is removed from the registry
+ * and and the error is logged.
*
* @param serviceKeys
* Keys of services to start.
@@ -480,6 +473,7 @@ public class ServicesRegistry {
/**
* Same as {@link #startServices(List)}, but with an array as input.
+ *
* @see #startServices(List)
*
* @param serviceKeys
@@ -491,22 +485,23 @@ public class ServicesRegistry {
* @throws ServiceException
* If a service can't be started.
*/
- public void startServices(String ... serviceKeys) throws ServiceMultiException, ServiceNotFoundException {
+ public void startServices(String... serviceKeys) throws ServiceMultiException, ServiceNotFoundException {
List<String> serviceKeysList = Arrays.asList(serviceKeys);
startServices(serviceKeysList);
}
/**
- * Start the specified services, and their required services.
- * The specifies services should be in the addServices or already registered.
- * Start all services marked as start = STARTUP .
- * All eligible services are first created, then initialized and finally started.
- * If an error occur on a service during one of this step, the service is removed from
- * the registry and and the error is logged.
+ * Start the specified services, and their required services. The specifies
+ * services should be in the addServices or already registered. Start all
+ * services marked as start = STARTUP . All eligible services are first
+ * created, then initialized and finally started. If an error occur on a
+ * service during one of this step, the service is removed from the registry
+ * and and the error is logged.
*
* @param serviceKeys
- * Keys of services to start. Keys will be translated to the classname.
+ * Keys of services to start. Keys will be translated to the
+ * classname.
* @throws ServiceMultiException
* @throws ServiceNotFoundException
* If a service can't be retrieved by its key.
@@ -527,7 +522,9 @@ public class ServicesRegistry {
}
/**
- * Same as {@link #startServicesByClassKeys(List)}, but with an array as input.
+ * Same as {@link #startServicesByClassKeys(List)}, but with an array as
+ * input.
+ *
* @see #startServices(List)
*
* @param serviceKeys
@@ -539,20 +536,19 @@ public class ServicesRegistry {
* @throws ServiceException
* If a service can't be started.
*/
- public void startServicesByClassKeys(Class<?> ... serviceKeys) throws ServiceMultiException, ServiceNotFoundException {
+ public void startServicesByClassKeys(Class<?>... serviceKeys) throws ServiceMultiException, ServiceNotFoundException {
List<Class<?>> serviceKeysList = Arrays.asList(serviceKeys);
startServicesByClassKeys(serviceKeysList);
}
/**
- * Start the specified services, and their required services.
- * The specifies services should be in the specified map.
- * The map is also used to resolves dependencies.
- * Start all services marked as start = STARTUP .
- * All eligible services are first created, then initialized and finally started.
- * If an error occur on a service during one of this step, the service is removed from
- * the registry and and the error is logged.
+ * Start the specified services, and their required services. The specifies
+ * services should be in the specified map. The map is also used to resolves
+ * dependencies. Start all services marked as start = STARTUP . All eligible
+ * services are first created, then initialized and finally started. If an
+ * error occur on a service during one of this step, the service is removed
+ * from the registry and and the error is logged.
*
* @param services
* Services to start
@@ -572,18 +568,19 @@ public class ServicesRegistry {
}
// Detect cycles
checkCycle(roots, map);
- // Retain only services with startupkind == START and state == REGISTERED
+ // Retain only services with startupkind == START and state ==
+ // REGISTERED
roots = retainsToStartServices(roots);
- //
+ //
List<ServiceStartupEntry> toStart = buildTopologicalListOfServicesToStart(roots, map);
-
+
// Remove already started services
toStart = retainsToStartServices(toStart);
- // if( log.isLoggable(Level.FINE))
- // {
+ // if( log.isLoggable(Level.FINE))
+ // {
showServices(" Services to start:", toStart);
- // }
+ // }
// Create an object to collect errors if any.
ServiceMultiException errors = new ServiceMultiException();
@@ -638,8 +635,7 @@ public class ServicesRegistry {
}
/**
- * Print the services.
- * For debug purpose
+ * Print the services. For debug purpose
*
* @param roots
*/
@@ -658,8 +654,8 @@ public class ServicesRegistry {
}
/**
- * Check if all dependencies exist. Throw an error if a declared dependency has no corresponding
- * service.
+ * Check if all dependencies exist. Throw an error if a declared dependency
+ * has no corresponding service.
*
* @param services
* Services to check
@@ -669,7 +665,6 @@ public class ServicesRegistry {
*/
private void checkDependencies(Collection<ServiceStartupEntry> services, LookupMap map) throws ServiceMultiException {
-
ServiceMultiException errors = new ServiceMultiException();
// Walk each service and check if its required services exist.
@@ -694,10 +689,11 @@ public class ServicesRegistry {
}
/**
- * Retains only the services that should be started.
- * Retains only services with startupkind = START and state == REGISTERED
+ * Retains only the services that should be started. Retains only services
+ * with startupkind = START and state == REGISTERED
*
- * @param services Collection to filter
+ * @param services
+ * Collection to filter
* @return a new Collection containing the services to start.
*/
private List<ServiceStartupEntry> retainsToStartServices(Collection<ServiceStartupEntry> services) {
@@ -714,8 +710,8 @@ public class ServicesRegistry {
}
/**
- * Check for cycles. Throws an exception if a cycle is discovered.
- * Each root is checked to see if it contains a cycle.
+ * Check for cycles. Throws an exception if a cycle is discovered. Each root
+ * is checked to see if it contains a cycle.
*
* @param roots
* @param map
@@ -726,9 +722,9 @@ public class ServicesRegistry {
}
/**
- * Build a list of services to start, in the topological order (right order).
- * The required services are placed before the dependent services in the list.
- * Services already started are disguarded.
+ * Build a list of services to start, in the topological order (right
+ * order). The required services are placed before the dependent services in
+ * the list. Services already started are disguarded.
*
* @param roots
* @param map
@@ -739,7 +735,8 @@ public class ServicesRegistry {
List<ServiceStartupEntry> result = new ArrayList<ServiceStartupEntry>();
- // Each root represent a graph. Walk the root and its child in the list, in the right order.
+ // Each root represent a graph. Walk the root and its child in the list,
+ // in the right order.
for(ServiceStartupEntry root : roots) {
walkGraphDepthFirst(result, root, map);
}
@@ -768,7 +765,8 @@ public class ServicesRegistry {
ServiceStartupEntry child = map.getChecked(serviceKey);
walkGraphDepthFirst(result, child, map);
} catch (ServiceNotFoundException e) {
- // Do nothing, we have already reported the problems with checkServices;
+ // Do nothing, we have already reported the problems with
+ // checkServices;
}
}
@@ -777,11 +775,12 @@ public class ServicesRegistry {
}
/**
- * Create a List of the root services.
- * The roots are services that are not required by any service.
+ * Create a List of the root services. The roots are services that are not
+ * required by any service.
*
* @param addedServices
- * A collection from which roots are required. The collection is unmodified.
+ * A collection from which roots are required. The collection is
+ * unmodified.
* @param map
* @return
*/
@@ -792,7 +791,6 @@ public class ServicesRegistry {
List<ServiceStartupEntry> allRequired = new ArrayList<ServiceStartupEntry>();
-
// The roots are services that are not required by any service.
// Build a list of the services required by all other services.
for(ServiceStartupEntry service : services) {
@@ -803,7 +801,8 @@ public class ServicesRegistry {
ServiceStartupEntry child = keyServiceMap.getChecked(serviceKey);
allRequired.add(child);
} catch (ServiceNotFoundException e) {
- // Do nothing, we have already reported the problems with checkServices;
+ // Do nothing, we have already reported the problems with
+ // checkServices;
}
}
@@ -823,7 +822,7 @@ public class ServicesRegistry {
*/
public void disposeRegistry() throws ServiceMultiException {
- // List of keys of service in error.
+ // List of keys of service in error.
ServiceMultiException errors = new ServiceMultiException();
disposeServices(namedServices.values(), errors);
disposeServices(anonymousServices, errors);
@@ -864,8 +863,8 @@ public class ServicesRegistry {
}
/**
- * Register all services provided in the list.
- * After this operation, services are available thru {@link #getService(Class)}.
+ * Register all services provided in the list. After this operation,
+ * services are available thru {@link #getService(Class)}.
*
* @param toStart
* List of services to register.
@@ -965,8 +964,8 @@ public class ServicesRegistry {
}
/**
- * This class represents a union of two maps of <String, ServiceStartupEntry>.
- * It provide specific methods to retrieve a {@link ServiceStartupEntry} by its key.
+ * This class represents a union of two maps of <String,
+ * ServiceStartupEntry>. It provide specific methods to retrieve a {@link ServiceStartupEntry} by its key.
*
* @author cedric dumoulin
*
@@ -977,12 +976,10 @@ public class ServicesRegistry {
Map<String, ServiceStartupEntry> map2;
-
/**
*
- * Constructor.
- * Build a union of two maps.
- *
+ * Constructor. Build a union of two maps.
+ *
* @param map1
* @param map2
*/
@@ -993,8 +990,7 @@ public class ServicesRegistry {
/**
*
- * Constructor.
- * Build a union of one map (sic).
+ * Constructor. Build a union of one map (sic).
*
* @param map
*/
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ErrorServiceTypeEntry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ErrorServiceTypeEntry.java
index 595899032c6..2be4cf905ee 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ErrorServiceTypeEntry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ErrorServiceTypeEntry.java
@@ -9,14 +9,13 @@ import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.services.ServiceState;
import org.eclipse.papyrus.core.services.ServicesRegistry;
-
/**
- * A service entry used for faulty services.
- * In this implementation, methods do nothings or throw an error.
+ * A service entry used for faulty services. In this implementation, methods do
+ * nothings or throw an error.
*
*
* @author cedric dumoulin
- *
+ *
*/
public class ErrorServiceTypeEntry extends ServiceTypeEntry {
@@ -24,77 +23,76 @@ public class ErrorServiceTypeEntry extends ServiceTypeEntry {
* The original service descriptor.
*/
private ServiceDescriptor descriptor;
-
-
+
/**
*
* Constructor.
- *
+ *
* @param descriptor
*/
- public ErrorServiceTypeEntry( ServiceDescriptor descriptor ) {
+ public ErrorServiceTypeEntry(ServiceDescriptor descriptor) {
super(descriptor);
}
-
+
/**
*
* @see org.eclipse.papyrus.core.services.internal.ServiceTypeEntry#getServiceInstance()
- *
+ *
* @return
* @throws ServiceException
*/
@Override
public Object getServiceInstance() throws ServiceException {
- throw new BadStateException("Service has not started.", ServiceState.error, descriptor );
+ throw new BadStateException("Service has not started.", ServiceState.error, descriptor);
}
/**
*
* @see org.eclipse.papyrus.core.services.internal.ServiceTypeEntry#createService()
- *
+ *
* @throws ServiceException
*/
@Override
public void createService() throws ServiceException {
// do nothing
-
+
}
/**
*
* @see org.eclipse.papyrus.core.services.internal.ServiceTypeEntry#initService(ServicesRegistry)
- *
+ *
* @param servicesRegistry
* @throws ServiceException
*/
@Override
public void initService(ServicesRegistry servicesRegistry) throws ServiceException {
// do nothing
-
+
}
/**
*
* @see org.eclipse.papyrus.core.services.internal.ServiceTypeEntry#startService()
- *
+ *
* @throws ServiceException
*/
@Override
public void startService() throws ServiceException {
// do nothing
-
+
}
/**
*
* @see org.eclipse.papyrus.core.services.internal.ServiceTypeEntry#disposeService()
- *
+ *
* @throws ServiceException
*/
@Override
public void disposeService() throws ServiceException {
// do nothing
-
+
}
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/LazyStartupEntry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/LazyStartupEntry.java
index 7fb83fa19b9..c16c7f9ee6c 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/LazyStartupEntry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/LazyStartupEntry.java
@@ -8,12 +8,11 @@ import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.services.ServiceState;
import org.eclipse.papyrus.core.services.ServicesRegistry;
-
/**
* An ServiceEntry managing {@link IService} registered as lazy start.
*
* @author cedric dumoulin
- *
+ *
*/
public class LazyStartupEntry extends ServiceStartupEntry {
@@ -27,21 +26,20 @@ public class LazyStartupEntry extends ServiceStartupEntry {
*/
public LazyStartupEntry(ServiceTypeEntry serviceEntry, ServicesRegistry registry) {
- super( serviceEntry);
+ super(serviceEntry);
this.registry = registry;
}
/**
*
* @see org.eclipse.papyrus.core.services.internal.ServiceStartupEntry#getServiceInstance()
- *
+ *
* @return
* @throws ServiceException
*/
@Override
public Object getServiceInstance() throws ServiceException {
- if( serviceEntry.getState() == ServiceState.registered)
- {
+ if(serviceEntry.getState() == ServiceState.registered) {
// Start the service
try {
serviceEntry.createService();
@@ -52,14 +50,14 @@ public class LazyStartupEntry extends ServiceStartupEntry {
serviceEntry = new ErrorServiceTypeEntry(serviceEntry.getDescriptor());
}
}
-
+
// Return the instance
return serviceEntry.getServiceInstance();
}
/**
* Do nothing
- *
+ *
* @throws ServiceException
*/
@Override
@@ -78,7 +76,7 @@ public class LazyStartupEntry extends ServiceStartupEntry {
/**
* Do nothing.
- *
+ *
* @throws ServiceException
*/
@Override
@@ -87,7 +85,7 @@ public class LazyStartupEntry extends ServiceStartupEntry {
/**
* @see org.eclipse.papyrus.core.services.AbstractServiceEntry#disposeService()
- *
+ *
* @throws ServiceException
*/
@Override
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/PojoServiceEntry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/PojoServiceEntry.java
index 77e243a9435..1b6746150eb 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/PojoServiceEntry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/PojoServiceEntry.java
@@ -9,7 +9,6 @@ import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.services.ServiceState;
import org.eclipse.papyrus.core.services.ServicesRegistry;
-
/**
* Entry for a service provided as POJO.
*
@@ -27,14 +26,12 @@ public class PojoServiceEntry extends ServiceTypeEntry {
* @param serviceDescriptor
*/
public PojoServiceEntry(ServiceDescriptor serviceDescriptor) {
- super( serviceDescriptor );
+ super(serviceDescriptor);
setState(ServiceState.registered);
}
-
/**
- * Create an entry for an already created service.
- * Constructor.
+ * Create an entry for an already created service. Constructor.
*
* @param descriptor
* Descriptor of the service. Key and priority should be set.
@@ -42,7 +39,7 @@ public class PojoServiceEntry extends ServiceTypeEntry {
* The service Instance
*/
public PojoServiceEntry(ServiceDescriptor descriptor, Object serviceInstance) {
- super( descriptor );
+ super(descriptor);
this.serviceInstance = serviceInstance;
setState(ServiceState.registered);
}
@@ -55,10 +52,10 @@ public class PojoServiceEntry extends ServiceTypeEntry {
* If service can't be started.
*/
public Object getServiceInstance() throws ServiceException {
-
- if( serviceInstance == null)
+
+ if(serviceInstance == null)
throw new BadStateException("Service is not created.", state, serviceDescriptor);
-
+
return serviceInstance;
}
@@ -69,13 +66,12 @@ public class PojoServiceEntry extends ServiceTypeEntry {
*/
public void createService() throws ServiceException {
checkState(ServiceState.registered);
- // Exit if already created.
- if( serviceInstance != null)
- {
+ // Exit if already created.
+ if(serviceInstance != null) {
setState(ServiceState.created);
return;
}
-
+
// Create it
try {
// Create the instance
@@ -112,9 +108,9 @@ public class PojoServiceEntry extends ServiceTypeEntry {
* Do nothing.
*/
public void disposeService() throws ServiceException {
- if( serviceInstance == null)
+ if(serviceInstance == null)
return;
-
+
serviceInstance = null;
setState(ServiceState.disposed);
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceEntry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceEntry.java
index 47d02586c53..5e9f547fdb2 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceEntry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceEntry.java
@@ -10,12 +10,9 @@ import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.services.ServiceState;
import org.eclipse.papyrus.core.services.ServicesRegistry;
-
-
-
/**
- * Entry of a Service implementing {@link IService}.
- * This class provide methods to manage the Service life cycle.
+ * Entry of a Service implementing {@link IService}. This class provide methods
+ * to manage the Service life cycle.
*
* @author cedric dumoulin
*
@@ -32,15 +29,13 @@ public class ServiceEntry extends ServiceTypeEntry {
* @param registry
*/
public ServiceEntry(ServiceDescriptor serviceDescriptor) {
- super( serviceDescriptor );
+ super(serviceDescriptor);
setState(ServiceState.registered);
}
-
/**
- * Create an entry for an already created service.
- * Constructor.
+ * Create an entry for an already created service. Constructor.
*
* @param descriptor
* Descriptor of the service. Key and priority should be set.
@@ -48,28 +43,27 @@ public class ServiceEntry extends ServiceTypeEntry {
* The service Instance
*/
public ServiceEntry(ServiceDescriptor descriptor, IService serviceInstance) {
- super( descriptor );
+ super(descriptor);
this.serviceInstance = serviceInstance;
setState(ServiceState.registered);
}
/**
- * Get the service instance, even if it is not started.
- * The service should be created.
+ * Get the service instance, even if it is not started. The service should
+ * be created.
*
* @return
* @throws ServiceException
* If service can't be started.
*/
public Object getServiceInstance() throws ServiceException {
-
- if( serviceInstance == null)
+
+ if(serviceInstance == null)
throw new BadStateException("Service is not created.", state, serviceDescriptor);
-
+
return serviceInstance;
-
- }
+ }
/**
* @see java.lang.Object#toString()
@@ -81,7 +75,6 @@ public class ServiceEntry extends ServiceTypeEntry {
return "ServiceEntry [serviceDescriptor=" + serviceDescriptor.toString() + ", serviceInstance=" + serviceInstance + "]";
}
-
/**
* Create the associated service if not a Lazy Service.
*
@@ -89,13 +82,12 @@ public class ServiceEntry extends ServiceTypeEntry {
*/
public void createService() throws ServiceException {
checkState(ServiceState.registered);
- // Exit if already created.
- if( serviceInstance != null)
- {
+ // Exit if already created.
+ if(serviceInstance != null) {
setState(ServiceState.created);
return;
}
-
+
// Create it
try {
// Create the instance
@@ -136,10 +128,10 @@ public class ServiceEntry extends ServiceTypeEntry {
* @throws ServiceException
*/
public void startService() throws ServiceException {
-
+
checkState(ServiceState.initialized);
setState(ServiceState.starting);
-
+
try {
serviceInstance.startService();
} catch (ServiceException e) {
@@ -149,7 +141,7 @@ public class ServiceEntry extends ServiceTypeEntry {
setState(ServiceState.error);
throw new ServiceException(e);
}
-
+
setState(ServiceState.started);
}
@@ -165,5 +157,4 @@ public class ServiceEntry extends ServiceTypeEntry {
setState(ServiceState.disposed);
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceFactoryEntry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceFactoryEntry.java
index bd8f3fa6f8a..ecf1b3b5de5 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceFactoryEntry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceFactoryEntry.java
@@ -10,12 +10,9 @@ import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.services.ServiceState;
import org.eclipse.papyrus.core.services.ServicesRegistry;
-
-
-
/**
- * Entry of a Service implementing {@link IServiceFactory}.
- * This class provide methods to manage the Service life cycle.
+ * Entry of a Service implementing {@link IServiceFactory}. This class provide
+ * methods to manage the Service life cycle.
*
* @author cedric dumoulin
*
@@ -35,15 +32,13 @@ public class ServiceFactoryEntry extends ServiceTypeEntry {
* @param registry
*/
public ServiceFactoryEntry(ServiceDescriptor serviceDescriptor) {
- super( serviceDescriptor );
+ super(serviceDescriptor);
setState(ServiceState.registered);
}
-
/**
- * Create an entry for an already created service.
- * Constructor.
+ * Create an entry for an already created service. Constructor.
*
* @param descriptor
* Descriptor of the service. Key and priority should be set.
@@ -51,38 +46,35 @@ public class ServiceFactoryEntry extends ServiceTypeEntry {
* The service Instance
*/
public ServiceFactoryEntry(ServiceDescriptor descriptor, IServiceFactory factoryInstance) {
- super( descriptor );
+ super(descriptor);
this.factoryInstance = factoryInstance;
setState(ServiceState.registered);
}
/**
- * Get the service instance, even if it is not started.
- * The service should be created.
+ * Get the service instance, even if it is not started. The service should
+ * be created.
*
* @return
* @throws ServiceException
* If service can't be started.
*/
public Object getServiceInstance() throws ServiceException {
-
- if( factoryInstance == null)
+
+ if(factoryInstance == null)
throw new BadStateException("Service is not created.", state, serviceDescriptor);
-
+
// Get the service instance if needed.
- if(serviceInstance == null)
- {
+ if(serviceInstance == null) {
serviceInstance = factoryInstance.createServiceInstance();
- if( serviceInstance == null)
- {
+ if(serviceInstance == null) {
throw new ServiceException("Service Factory '" + getDescriptor().getKey() + " return a null service. It should return a valid service.");
}
}
-
+
return serviceInstance;
-
- }
+ }
/**
* @see java.lang.Object#toString()
@@ -94,7 +86,6 @@ public class ServiceFactoryEntry extends ServiceTypeEntry {
return "ServiceEntry [serviceDescriptor=" + serviceDescriptor.toString() + ", serviceInstance=" + serviceInstance + "]";
}
-
/**
* Create the associated service if not a Lazy Service.
*
@@ -102,13 +93,12 @@ public class ServiceFactoryEntry extends ServiceTypeEntry {
*/
public void createService() throws ServiceException {
checkState(ServiceState.registered);
- // Exit if already created.
- if( factoryInstance != null)
- {
+ // Exit if already created.
+ if(factoryInstance != null) {
setState(ServiceState.created);
return;
}
-
+
// Create it
try {
// Create the instance
@@ -149,10 +139,10 @@ public class ServiceFactoryEntry extends ServiceTypeEntry {
* @throws ServiceException
*/
public void startService() throws ServiceException {
-
+
checkState(ServiceState.initialized);
setState(ServiceState.starting);
-
+
try {
factoryInstance.startService();
} catch (ServiceException e) {
@@ -162,7 +152,7 @@ public class ServiceFactoryEntry extends ServiceTypeEntry {
setState(ServiceState.error);
throw new ServiceException(e);
}
-
+
setState(ServiceState.started);
}
@@ -178,5 +168,4 @@ public class ServiceFactoryEntry extends ServiceTypeEntry {
setState(ServiceState.disposed);
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceStartupEntry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceStartupEntry.java
index caa02404b87..d88d1f6a861 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceStartupEntry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceStartupEntry.java
@@ -11,7 +11,6 @@ import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.services.ServiceState;
import org.eclipse.papyrus.core.services.ServicesRegistry;
-
/**
* Base class for the different types of service startups (lazy, synchronized).
*
@@ -20,7 +19,6 @@ import org.eclipse.papyrus.core.services.ServicesRegistry;
*/
public abstract class ServiceStartupEntry {
-
/**
* The ServiceEntry, according to its type.
*/
@@ -79,18 +77,20 @@ public abstract class ServiceStartupEntry {
abstract public void disposeService() throws ServiceException;
/**
- * Return the list of the {@link ServiceStartupEntry} required by this service.
+ * Return the list of the {@link ServiceStartupEntry} required by this
+ * service.
*
* @return
*/
public Collection<ServiceStartupEntry> getRequiredServices() {
throw new UnsupportedOperationException("Not yet implemented");
-// return requiredServices;
+ // return requiredServices;
}
/**
* Get {@link ServiceDescriptor} associated to this entry.
+ *
* @return
*/
public ServiceDescriptor getDescriptor() {
@@ -113,11 +113,10 @@ public abstract class ServiceStartupEntry {
return serviceEntry.isStarted();
}
-
/**
*
* @see java.lang.Object#toString()
- *
+ *
* @return
*/
@Override
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceTypeEntry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceTypeEntry.java
index 64e188206fa..f00ea5de29f 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceTypeEntry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/ServiceTypeEntry.java
@@ -11,9 +11,9 @@ import org.eclipse.papyrus.core.services.ServiceState;
import org.eclipse.papyrus.core.services.ServicesRegistry;
import org.osgi.framework.Bundle;
-
/**
- * Base class for the different types of service entries (PoJo, Service, ServiceFactory, ...).
+ * Base class for the different types of service entries (PoJo, Service,
+ * ServiceFactory, ...).
*
* @author cedric dumoulin
*/
@@ -23,7 +23,7 @@ public abstract class ServiceTypeEntry {
* Current state of the service.
*/
protected ServiceState state = ServiceState.registered;
-
+
/**
* Descriptor of the service associated to this entry.
*/
@@ -32,21 +32,21 @@ public abstract class ServiceTypeEntry {
/**
*
* Constructor.
- *
+ *
*/
public ServiceTypeEntry(ServiceDescriptor serviceDescriptor) {
this.serviceDescriptor = serviceDescriptor;
}
-
+
/**
* Change the state of the service.
+ *
* @param newState
*/
- protected void setState( ServiceState newState ) {
+ protected void setState(ServiceState newState) {
state = newState;
}
-
-
+
/**
* @return the state
*/
@@ -55,19 +55,18 @@ public abstract class ServiceTypeEntry {
}
/**
- * Check if the current state is the proposed state.
- * Throws an exception if the state is different.
+ * Check if the current state is the proposed state. Throws an exception if
+ * the state is different.
*
* @param expectedState
* @throws BadStateException
*/
- protected void checkState( ServiceState expectedState) throws BadStateException {
- if(expectedState!=state)
- {
+ protected void checkState(ServiceState expectedState) throws BadStateException {
+ if(expectedState != state) {
throw new BadStateException(expectedState, state, serviceDescriptor);
}
}
-
+
/**
* Get the descriptor of the service associated to this entry.
*
@@ -91,22 +90,27 @@ public abstract class ServiceTypeEntry {
// Try to get the one arg constructor.
// This require the ServiceRegistry. Old stuff, not more used.
-// try {
-// Constructor<?> constructor = classname.getConstructor(ServicesRegistry.class);
-// return constructor.newInstance(registry);
-// } catch (SecurityException e) {
-// // Do nothing, try next constructor
-// } catch (NoSuchMethodException e) {
-// // Do nothing, try next constructor
-// } catch (IllegalArgumentException e) {
-// throw new ServiceException("Can't instanciate '" + serviceClassname + "' with args ServicesRegistry.", e);
-// } catch (InstantiationException e) {
-// throw new ServiceException("Can't instanciate '" + serviceClassname + "' with args ServicesRegistry.", e);
-// } catch (IllegalAccessException e) {
-// throw new ServiceException("Can't instanciate '" + serviceClassname + "' with args ServicesRegistry.", e);
-// } catch (InvocationTargetException e) {
-// throw new ServiceException("Can't instanciate '" + serviceClassname + "' with args ServicesRegistry.", e);
-// }
+ // try {
+ // Constructor<?> constructor =
+ // classname.getConstructor(ServicesRegistry.class);
+ // return constructor.newInstance(registry);
+ // } catch (SecurityException e) {
+ // // Do nothing, try next constructor
+ // } catch (NoSuchMethodException e) {
+ // // Do nothing, try next constructor
+ // } catch (IllegalArgumentException e) {
+ // throw new ServiceException("Can't instanciate '" + serviceClassname +
+ // "' with args ServicesRegistry.", e);
+ // } catch (InstantiationException e) {
+ // throw new ServiceException("Can't instanciate '" + serviceClassname +
+ // "' with args ServicesRegistry.", e);
+ // } catch (IllegalAccessException e) {
+ // throw new ServiceException("Can't instanciate '" + serviceClassname +
+ // "' with args ServicesRegistry.", e);
+ // } catch (InvocationTargetException e) {
+ // throw new ServiceException("Can't instanciate '" + serviceClassname +
+ // "' with args ServicesRegistry.", e);
+ // }
// Try with zero arg constructor.
try {
@@ -122,10 +126,9 @@ public abstract class ServiceTypeEntry {
}
}
-
/**
- * Load the Class object. Try from current ClassLoader, then try using the plugin referenced in the
- * serviceDescriptor.PluginId
+ * Load the Class object. Try from current ClassLoader, then try using the
+ * plugin referenced in the serviceDescriptor.PluginId
*
* @return
* @throws ServiceException
@@ -160,6 +163,7 @@ public abstract class ServiceTypeEntry {
/**
* Get the service instance.
+ *
* @return
* @throws ServiceException
*/
@@ -167,20 +171,24 @@ public abstract class ServiceTypeEntry {
/**
* Create the associated service if not a Lazy Service.
+ *
* @throws ServiceException
*/
abstract public void createService() throws ServiceException;
/**
* Start the associated service if not a Lazy Service.
- * @param servicesRegistry The servicesRegistry containing this service.
+ *
+ * @param servicesRegistry
+ * The servicesRegistry containing this service.
*
* @throws ServiceException
*/
- abstract public void initService( ServicesRegistry servicesRegistry) throws ServiceException;
+ abstract public void initService(ServicesRegistry servicesRegistry) throws ServiceException;
/**
* Start the associated service if not a Lazy Service.
+ *
* @throws ServiceException
*/
abstract public void startService() throws ServiceException;
@@ -190,5 +198,4 @@ public abstract class ServiceTypeEntry {
*/
abstract public void disposeService() throws ServiceException;
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/StartStartupEntry.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/StartStartupEntry.java
index b91a51f3cd7..e35764aa16f 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/StartStartupEntry.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/services/internal/StartStartupEntry.java
@@ -7,9 +7,9 @@ import org.eclipse.papyrus.core.services.IService;
import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.services.ServicesRegistry;
-
/**
- * An ServiceEntry managing {@link IService} that should be started when the registry is started.
+ * An ServiceEntry managing {@link IService} that should be started when the
+ * registry is started.
*
* @author cedric dumoulin
*
@@ -30,7 +30,7 @@ public class StartStartupEntry extends ServiceStartupEntry {
/**
*
* @see org.eclipse.papyrus.core.services.internal.ServiceStartupEntry#getServiceInstance()
- *
+ *
* @return
* @throws ServiceException
*/
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/ui/IRevealSemanticElement.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/ui/IRevealSemanticElement.java
index 76d41e2deb7..64f98801eff 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/ui/IRevealSemanticElement.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/ui/IRevealSemanticElement.java
@@ -15,16 +15,20 @@ package org.eclipse.papyrus.core.ui;
import java.util.List;
/**
- * this interface is used to reveal element that are given in parameter.
- * Example of the use case:
- * the class that implements this interface can be a diagram that select all editparts
- * that are linked to the given list of semantic element
- *
+ * this interface is used to reveal element that are given in parameter. Example
+ * of the use case: the class that implements this interface can be a diagram
+ * that select all editparts that are linked to the given list of semantic
+ * element
+ *
*/
public interface IRevealSemanticElement {
-/**
- * reveal all elements that represent an element in the given list.
- * @param elementList list of semantic element that we want to reveal, <B> cannot be null</B>
- */
+
+ /**
+ * reveal all elements that represent an element in the given list.
+ *
+ * @param elementList
+ * list of semantic element that we want to reveal, <B> cannot be
+ * null</B>
+ */
public void revealSemanticElement(List<?> elementList);
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/AbstractServiceUtils.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/AbstractServiceUtils.java
index f77279fc379..b72dac2cc68 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/AbstractServiceUtils.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/AbstractServiceUtils.java
@@ -23,22 +23,19 @@ import org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr;
import org.eclipse.papyrus.sasheditor.editor.ISashWindowsContainer;
import org.eclipse.ui.IEditorPart;
-
/**
- * Set of utility methods for accessing core Services.
- * This class provide methods to access the Papyrus well known services.
+ * Set of utility methods for accessing core Services. This class provide
+ * methods to access the Papyrus well known services.
*
* <br>
- * This is the base class for concrete classes providing
- * these utility methods.
- * Concrete class need to provide method {@link #getServiceRegistry(Object)} implementing how the
- * ServiceRegistry is retrieved from the provided object.
- * Subclasses can also provide a Singleton pattern (getInstance()) in order to allow access to the utility methods
- * in a static way.
- * <br>
+ * This is the base class for concrete classes providing these utility methods.
+ * Concrete class need to provide method {@link #getServiceRegistry(Object)} implementing how the ServiceRegistry is retrieved from the provided
+ * object.
+ * Subclasses can also provide a Singleton pattern (getInstance()) in order to
+ * allow access to the utility methods in a static way. <br>
*
* @author cedri dumoulin
- *
+ *
*/
public abstract class AbstractServiceUtils<T> {
@@ -49,68 +46,74 @@ public abstract class AbstractServiceUtils<T> {
* @return
*/
abstract public ServicesRegistry getServiceRegistry(T from) throws ServiceException;
-
+
/**
- * Gets the {@link TransactionalEditingDomain} registered in the {@link ServicesRegistry}.
+ * Gets the {@link TransactionalEditingDomain} registered in the {@link ServicesRegistry}.
*
* @param from
* @return
- * @throws ServiceException If an error occurs while getting the requested service.
+ * @throws ServiceException
+ * If an error occurs while getting the requested service.
*/
public TransactionalEditingDomain getTransactionalEditingDomain(T from) throws ServiceException {
return getServiceRegistry(from).getService(TransactionalEditingDomain.class);
}
-
+
/**
- * Gets the {@link IPageMngr} registered in the {@link ServicesRegistry}.
+ * Gets the {@link IPageMngr} registered in the {@link ServicesRegistry}.
*
* @param from
* @return
- * @throws ServiceException If an error occurs while getting the requested service.
+ * @throws ServiceException
+ * If an error occurs while getting the requested service.
*/
public IPageMngr getIPageMngr(T from) throws ServiceException {
return getServiceRegistry(from).getService(IPageMngr.class);
}
-
+
/**
- * Gets the {@link IPageMngr} registered in the {@link ServicesRegistry}.
+ * Gets the {@link IPageMngr} registered in the {@link ServicesRegistry}.
*
* @param from
* @return
- * @throws ServiceException If an error occurs while getting the requested service.
+ * @throws ServiceException
+ * If an error occurs while getting the requested service.
*/
public ModelSet getModelSet(T from) throws ServiceException {
return getServiceRegistry(from).getService(ModelSet.class);
}
/**
- * Gets the {@link ILifeCycleEventsProvider} registered in the {@link ServicesRegistry}.
+ * Gets the {@link ILifeCycleEventsProvider} registered in the {@link ServicesRegistry}.
*
* @param from
* @return
- * @throws ServiceException If an error occurs while getting the requested service.
+ * @throws ServiceException
+ * If an error occurs while getting the requested service.
*/
public ILifeCycleEventsProvider getILifeCycleEventsProvider(T from) throws ServiceException {
return getServiceRegistry(from).getService(ILifeCycleEventsProvider.class);
}
/**
- * Gets the {@link ISashWindowsContainer} registered in the {@link ServicesRegistry}.
+ * Gets the {@link ISashWindowsContainer} registered in the {@link ServicesRegistry}.
*
* @param from
* @return
- * @throws ServiceException If an error occurs while getting the requested service.
+ * @throws ServiceException
+ * If an error occurs while getting the requested service.
*/
public ISashWindowsContainer getISashWindowsContainer(T from) throws ServiceException {
return getServiceRegistry(from).getService(ISashWindowsContainer.class);
}
-
+
/**
- * Gets the {@link IEditorPart} of the currently nested active editor.
+ * Gets the {@link IEditorPart} of the currently nested active editor.
*
* @param from
* @return
- * @throws ServiceException If an error occurs while getting the requested service.
+ * @throws ServiceException
+ * If an error occurs while getting the requested service.
*/
public IEditorPart getNestedActiveIEditorPart(T from) throws ServiceException {
return getISashWindowsContainer(from).getActiveEditor();
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/BusinessModelResolver.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/BusinessModelResolver.java
index 4ae8861d9a7..f76b3d9772c 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/BusinessModelResolver.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/BusinessModelResolver.java
@@ -19,11 +19,12 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.notation.View;
-
/**
- * This class allows to retrieve the business object from an object representing a graphical artifact in a diagram. Each diagram can register its
- * resolver which will be added to the list of
- * resolvers. Some common resolvers are already registered : gef.EditPart TODO Use extensions to register additional resolvers.
+ * This class allows to retrieve the business object from an object representing
+ * a graphical artifact in a diagram. Each diagram can register its resolver
+ * which will be added to the list of resolvers. Some common resolvers are
+ * already registered : gef.EditPart TODO Use extensions to register additional
+ * resolvers.
*/
public class BusinessModelResolver {
@@ -37,7 +38,8 @@ public class BusinessModelResolver {
}
/**
- * Get the business object associated to this object, if any. This method navigate throw the object if the object is an graphical artefact or a
+ * Get the business object associated to this object, if any. This method
+ * navigate throw the object if the object is an graphical artefact or a
* diagram artifact.
*
* @param object
@@ -57,7 +59,7 @@ public class BusinessModelResolver {
return ((View)object).getElement();
} else if(object instanceof IAdaptable) {
- // Among others this is useful to retrieve the selected object from
+ // Among others this is useful to retrieve the selected object from
// an explorer item.
return ((IAdaptable)object).getAdapter(EObject.class);
@@ -66,7 +68,6 @@ public class BusinessModelResolver {
}
}
-
/**
* Get the business object from a GraphElement.
*
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/DiResourceSet.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/DiResourceSet.java
index 6122b766e27..9cb27814a8e 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/DiResourceSet.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/DiResourceSet.java
@@ -44,7 +44,6 @@ import org.eclipse.papyrus.resource.uml.UmlUtils;
*/
public class DiResourceSet extends ModelSet {
-
/**
*
* Constructor.
@@ -61,7 +60,8 @@ public class DiResourceSet extends ModelSet {
* Just loads the model into the current resource set.
*
* @returns The loaded model or null if the model is not loaded.
- * @deprecated load requested model and get its resource. See implementation for example.
+ * @deprecated load requested model and get its resource. See implementation
+ * for example.
*/
public Resource loadModelResource(IFile file) {
@@ -75,17 +75,16 @@ public class DiResourceSet extends ModelSet {
}
/**
- * Returns the extension of the model.
- * Seem to be unused.
+ * Returns the extension of the model. Seem to be unused.
*
* @deprecated Use {@link UmlModel#UML_FILE_EXTENSION}
*/
public String getModelFileExtension() {
throw new UnsupportedOperationException("deprecated method.");
- // if(modelFileExtension == null) {
- // modelFileExtension = modelResource.getURI().fileExtension();
- // }
- // return modelFileExtension;
+ // if(modelFileExtension == null) {
+ // modelFileExtension = modelResource.getURI().fileExtension();
+ // }
+ // return modelFileExtension;
}
/**
@@ -102,56 +101,62 @@ public class DiResourceSet extends ModelSet {
e.printStackTrace();
}
- // // Extract file name, without extension
- // IPath fullPath = file.getFullPath().removeFileExtension();
+ // // Extract file name, without extension
+ // IPath fullPath = file.getFullPath().removeFileExtension();
//
- // // load DI2
- // URI diUri = getPlatformURI(fullPath.addFileExtension(DI_FILE_EXTENSION));
- // diResource = getResource(diUri, true);
+ // // load DI2
+ // URI diUri =
+ // getPlatformURI(fullPath.addFileExtension(DI_FILE_EXTENSION));
+ // diResource = getResource(diUri, true);
//
- // // load notation
- // URI notationURI = getPlatformURI(fullPath.addFileExtension(NOTATION_FILE_EXTENSION));
- // notationResource = getResource(notationURI, true);
+ // // load notation
+ // URI notationURI =
+ // getPlatformURI(fullPath.addFileExtension(NOTATION_FILE_EXTENSION));
+ // notationResource = getResource(notationURI, true);
//
- // if(notationResource != null) {
- // // look for a model associated with a diagram in notation
- // for(EObject eObject : notationResource.getContents()) {
- // if(eObject instanceof Diagram) {
- // Diagram diagram = (Diagram)eObject;
- // if(diagram.getElement() != null) {
- // modelResource = diagram.getElement().eResource();
- // break;
- // }
- // }
- // }
- // }
+ // if(notationResource != null) {
+ // // look for a model associated with a diagram in notation
+ // for(EObject eObject : notationResource.getContents()) {
+ // if(eObject instanceof Diagram) {
+ // Diagram diagram = (Diagram)eObject;
+ // if(diagram.getElement() != null) {
+ // modelResource = diagram.getElement().eResource();
+ // break;
+ // }
+ // }
+ // }
+ // }
//
//
- // // if modelResource is still null, we look for a file with the same name and a supported extension
- // if(modelResource == null) {
- // IContainer folder = file.getParent();
- // try {
- // IResource[] files = folder.members();
- // for(IResource r : files) {
- // String extension = r.getFullPath().getFileExtension();
- // if(r.getFullPath().removeFileExtension().lastSegment().equals(fullPath.lastSegment()) && !DI_FILE_EXTENSION.equalsIgnoreCase(extension) && !NOTATION_FILE_EXTENSION.equalsIgnoreCase(extension)) {
- // if(Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().get(extension) != null) {
- // modelResource = getResource(getPlatformURI(r.getFullPath()), true);
- // break;
- // }
- // }
- // }
- // } catch (CoreException e) {
- // // never happens.
- // }
- // }
+ // // if modelResource is still null, we look for a file with the same
+ // name and a supported extension
+ // if(modelResource == null) {
+ // IContainer folder = file.getParent();
+ // try {
+ // IResource[] files = folder.members();
+ // for(IResource r : files) {
+ // String extension = r.getFullPath().getFileExtension();
+ // if(r.getFullPath().removeFileExtension().lastSegment().equals(fullPath.lastSegment())
+ // && !DI_FILE_EXTENSION.equalsIgnoreCase(extension) &&
+ // !NOTATION_FILE_EXTENSION.equalsIgnoreCase(extension)) {
+ // if(Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().get(extension)
+ // != null) {
+ // modelResource = getResource(getPlatformURI(r.getFullPath()), true);
+ // break;
+ // }
+ // }
+ // }
+ // } catch (CoreException e) {
+ // // never happens.
+ // }
+ // }
//
- // modelFileExtension = modelResource.getURI().fileExtension();
+ // modelFileExtension = modelResource.getURI().fileExtension();
//
- // // TODO move next line away from DiResourceSet ? Define a place
- // // where Resource initialization can take place.
- // // move this line to centralize all the adapters
- // modelResource.eAdapters().add(new ModelListenerManager());
+ // // TODO move next line away from DiResourceSet ? Define a place
+ // // where Resource initialization can take place.
+ // // move this line to centralize all the adapters
+ // modelResource.eAdapters().add(new ModelListenerManager());
}
/**
@@ -172,26 +177,31 @@ public class DiResourceSet extends ModelSet {
// Create models
createsModels(newFile);
- // // create the di resource URI
- // URI diUri = getPlatformURI(newFile.getFullPath());
- // // Create the di Resource for the sashcontainer
- // // The model will be automatically initialized by the SashContainer if needed (if it is empty).
- // // Normally the resource should contains models set by previous use from the SashContainer
- // diResource = createResource(diUri);
+ // // create the di resource URI
+ // URI diUri = getPlatformURI(newFile.getFullPath());
+ // // Create the di Resource for the sashcontainer
+ // // The model will be automatically initialized by the SashContainer
+ // if needed (if it is empty).
+ // // Normally the resource should contains models set by previous use
+ // from the SashContainer
+ // diResource = createResource(diUri);
//
- // IPath filenameWithoutExtension = newFile.getFullPath().removeFileExtension();
- // // if the model is not loaded, create resource
- // if(modelResource == null) {
- // // create the model URI
- // URI modelUri = getPlatformURI(filenameWithoutExtension.addFileExtension(modelExtension));
- // // create the model resource
- // modelResource = createResource(modelUri, eContentType);
- // this.modelFileExtension = modelExtension;
- // }
- // // create the notation URI
- // URI notationURI = getPlatformURI(filenameWithoutExtension.addFileExtension(NOTATION_FILE_EXTENSION));
- // // create the notation resource
- // notationResource = createResource(notationURI);
+ // IPath filenameWithoutExtension =
+ // newFile.getFullPath().removeFileExtension();
+ // // if the model is not loaded, create resource
+ // if(modelResource == null) {
+ // // create the model URI
+ // URI modelUri =
+ // getPlatformURI(filenameWithoutExtension.addFileExtension(modelExtension));
+ // // create the model resource
+ // modelResource = createResource(modelUri, eContentType);
+ // this.modelFileExtension = modelExtension;
+ // }
+ // // create the notation URI
+ // URI notationURI =
+ // getPlatformURI(filenameWithoutExtension.addFileExtension(NOTATION_FILE_EXTENSION));
+ // // create the notation resource
+ // notationResource = createResource(notationURI);
}
@@ -210,7 +220,8 @@ public class DiResourceSet extends ModelSet {
* Returns the notation resource.
*
* @return the notationResource
- * @deprecated Use NotationUtils.getNotationModel(this).getResource(); instead.
+ * @deprecated Use NotationUtils.getNotationModel(this).getResource();
+ * instead.
*/
public Resource getNotationResource() {
return NotationUtils.getNotationModel(this).getResource();
@@ -231,7 +242,8 @@ public class DiResourceSet extends ModelSet {
*
* @param modelElement
* @return the di resource or null
- * @deprecated a model should be modified/created to correctly handle controlled resources
+ * @deprecated a model should be modified/created to correctly handle
+ * controlled resources
*/
public Resource getAssociatedDiResource(EObject modelElement) {
// return the "base" di since we want the opened tabs in a unique di
@@ -243,7 +255,8 @@ public class DiResourceSet extends ModelSet {
*
* @param modelElement
* @return the notation resource or null
- * @deprecated a model should be modified/created to correctly handle controlled resources
+ * @deprecated a model should be modified/created to correctly handle
+ * controlled resources
*/
public Resource getAssociatedNotationResource(EObject modelElement) {
if(modelElement != null) {
@@ -257,13 +270,14 @@ public class DiResourceSet extends ModelSet {
}
/**
- * Retrieve the model resource associated with a given model element.
- * Please refers to {@link ResourceSet#getResource(URI, boolean)}
- * for the meaning of loadOnDemand.
+ * Retrieve the model resource associated with a given model element. Please
+ * refers to {@link ResourceSet#getResource(URI, boolean)} for the meaning
+ * of loadOnDemand.
*
* @param modelElement
* @return the model resource or null
- * @deprecated a model should be modified/created to correctly handle controlled resources
+ * @deprecated a model should be modified/created to correctly handle
+ * controlled resources
*/
public Resource getAssociatedModelResource(EObject modelElement) {
if(modelElement != null && modelElement.eResource() != null) {
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/DisplayUtils.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/DisplayUtils.java
index 7ef63594be7..8a8bc452052 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/DisplayUtils.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/DisplayUtils.java
@@ -17,7 +17,6 @@ import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.services.ServicesRegistry;
-
/**
* Util class for display in Papyrus (label providers, etc...)
*/
@@ -26,7 +25,8 @@ public class DisplayUtils {
/**
* Gets the shared label provider.
*
- * @return Get the current {@link ILabelProvider} or <code>null</code> if not found
+ * @return Get the current {@link ILabelProvider} or <code>null</code> if
+ * not found
*/
public static ILabelProvider getLabelProvider() {
try {
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/EditorUtils.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/EditorUtils.java
index 9c424b57b52..50424fdab52 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/EditorUtils.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/EditorUtils.java
@@ -46,12 +46,14 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
/**
- * Set of utility methods for the CoreEditor.
- * <br>
- * WARNING : Some of these methods rely on PlatformUI.getWorkbench().getActiveWorkbenchWindow()getActivePage() to
- * lookup for shared objects owned by the main editor. This doesn't work during the initialization of the main editor
- * because the main editor is not yet registered in the Eclipse workbench. This can lead to a null or an exception,
- * and sometime this can lead to getting the shared object of another main editor !
+ * Set of utility methods for the CoreEditor. <br>
+ * WARNING : Some of these methods rely on
+ * PlatformUI.getWorkbench().getActiveWorkbenchWindow()getActivePage() to lookup
+ * for shared objects owned by the main editor. This doesn't work during the
+ * initialization of the main editor because the main editor is not yet
+ * registered in the Eclipse workbench. This can lead to a null or an exception,
+ * and sometime this can lead to getting the shared object of another main
+ * editor !
*
* @author cedric dumoulin
* @author <a href="mailto:thomas.szadel@atosorigin.com">Thomas Szadel</a>
@@ -60,19 +62,17 @@ import org.eclipse.ui.PlatformUI;
public class EditorUtils {
/**
- * Gets the {@link IMultiDiagramEditor} interface of the a Eclipse active editor, if possible, or null
- * if not possible.
- * <br>
- * WARNING - This method doesn't work during the initialization of the main editor. See note in class doc.
- * <br>
- * This method return null if there is no active editor, or if the editor is not instance of IMultiDiagramEditor.
- * <br>
- * This method is designed to be used by ui actions that interact with the active editor.
- * <br>
- * This method should not be used during the editor initialization phase.
- * <br>
- * In any case, a check should be done on the returned value that can be null. Usage of this method is
- * discouraged. Use {@link #getMultiDiagramEditorChecked()} instead.
+ * Gets the {@link IMultiDiagramEditor} interface of the a Eclipse active
+ * editor, if possible, or null if not possible. <br>
+ * WARNING - This method doesn't work during the initialization of the main
+ * editor. See note in class doc. <br>
+ * This method return null if there is no active editor, or if the editor is
+ * not instance of IMultiDiagramEditor. <br>
+ * This method is designed to be used by ui actions that interact with the
+ * active editor. <br>
+ * This method should not be used during the editor initialization phase. <br>
+ * In any case, a check should be done on the returned value that can be
+ * null. Usage of this method is discouraged. Use {@link #getMultiDiagramEditorChecked()} instead.
*
*
* @return Get the current {@link IMultiDiagramEditor} or null if not found.
@@ -96,18 +96,18 @@ public class EditorUtils {
}
/**
- * Gets the {@link IMultiDiagramEditor} interface of the a Eclipse active editor, if possible, or throw an exception
- * if not possible.
- * <br>
- * WARNING - This method throw an exception during the initialization of the main editor.
- * This method throws an exception if there is no active editor, or if the editor is not instance of IMultiDiagramEditor.
- * <br>
- * This method is designed to be used by ui actions that interact with the active editor.
- * <br>
+ * Gets the {@link IMultiDiagramEditor} interface of the a Eclipse active
+ * editor, if possible, or throw an exception if not possible. <br>
+ * WARNING - This method throw an exception during the initialization of the
+ * main editor. This method throws an exception if there is no active
+ * editor, or if the editor is not instance of IMultiDiagramEditor. <br>
+ * This method is designed to be used by ui actions that interact with the
+ * active editor. <br>
*
*
* @return Get the current {@link IMultiDiagramEditor} or null if not found.
- * @throws BackboneException If it is not possible to get an instanceof {@link IMultiDiagramEditor}
+ * @throws BackboneException
+ * If it is not possible to get an instanceof {@link IMultiDiagramEditor}
*/
public static IMultiDiagramEditor getMultiDiagramEditorChecked() throws BackboneException {
IEditorPart editor;
@@ -124,10 +124,12 @@ public class EditorUtils {
throw new BackboneException("Can't get an Active Editor instance of IMultiDiagramEditor. (actual type:" + editor.getClass().getName() + ")");
}
}
+
/**
* Gets the opened multi-diagram editors.
*
- * @return The opened {@link IMultiDiagramEditor} or null if an error occured.
+ * @return The opened {@link IMultiDiagramEditor} or null if an error
+ * occured.
*/
public static IMultiDiagramEditor[] getMultiDiagramEditors() {
// Lookup ServiceRegistry
@@ -179,33 +181,37 @@ public class EditorUtils {
/**
* Get the {@link ServicesRegistry}of the currently active eclipse editor. <br>
- * WARNING - This method doesn't work during the initialization of the main editor. See note in class doc.
- * <br>
- * This method return null if the ServicesRegistry can not be found.
- * <br>
- * This method is designed to be used by ui actions that interact with the active editor.
- * <br>
- * This method should not be used during the editor initialization phase.
- * <br>
- * In any case, a check should be done on the returned value that can be null. An alternative is to use
- * {@link #getServiceRegistryChecked()} and to catch the exception.
- * <br>
- * It is preferable to retrieve the ServiceRegistry from elsewhere whenever it is possible.
- * <br>
- * In GMF EditParts or EditPolicies, the ServiceRegistry can be retrieved with methods from
+ * WARNING - This method doesn't work during the initialization of the main
+ * editor. See note in class doc. <br>
+ * This method return null if the ServicesRegistry can not be found. <br>
+ * This method is designed to be used by ui actions that interact with the
+ * active editor. <br>
+ * This method should not be used during the editor initialization phase. <br>
+ * In any case, a check should be done on the returned value that can be
+ * null. An alternative is to use {@link #getServiceRegistryChecked()} and
+ * to catch the exception. <br>
+ * It is preferable to retrieve the ServiceRegistry from elsewhere whenever
+ * it is possible. <br>
+ * In GMF EditParts or EditPolicies, the ServiceRegistry can be retrieved
+ * with methods from
* org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF
*
* <br>
- * WARNING: This method can return null if there is no Active Editor. This happen during the editor initialization,
- * especially when there is no other editor opened.
+ * WARNING: This method can return null if there is no Active Editor. This
+ * happen during the editor initialization, especially when there is no
+ * other editor opened.
*
* @return The {@link ServicesRegistry} or null if not found.
- * @deprecated Check modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments/cookbook/PapyrusCookBook.odt and use one of the replacement:
- * <ul>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
- * <li>org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
- * </ul>
+ * @deprecated Check
+ * modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments
+ * /cookbook/PapyrusCookBook.odt and use one of the replacement:
+ * <ul>
+ * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
+ * <li>
+ * org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
+ * <li>
+ * org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * </ul>
*/
static public ServicesRegistry getServiceRegistry() {
// Lookup ServiceRegistry
@@ -215,49 +221,59 @@ public class EditorUtils {
/**
* Get the service registry of the currently active main editor. <br>
- * WARNING - This method doesn't work during the initialization of the main editor. See note in class doc.
+ * WARNING - This method doesn't work during the initialization of the main
+ * editor. See note in class doc.
*
* @return The {@link ServicesRegistry} or null if not found.
- * @throws ServiceException If an error occurs.
- * @deprecated Check modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments/cookbook/PapyrusCookBook.odt and use one of the replacement:
- * <ul>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
- * <li>org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
- * </ul>
+ * @throws ServiceException
+ * If an error occurs.
+ * @deprecated Check
+ * modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments
+ * /cookbook/PapyrusCookBook.odt and use one of the replacement:
+ * <ul>
+ * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
+ * <li>
+ * org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
+ * <li>
+ * org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * </ul>
*/
static public ServicesRegistry getServiceRegistryChecked() throws ServiceException {
// Lookup ServiceRegistry
IMultiDiagramEditor editor = getMultiDiagramEditor();
- if( editor == null ) {
+ if(editor == null) {
throw new ServiceException("Can't get ServiceRegistry");
}
-
+
return (ServicesRegistry)editor.getAdapter(ServicesRegistry.class);
}
/**
- * Get the ISashWindowsContentProvider of the active Eclipse Editor, if possible.
- * <br>
- * This method return null if the ServiceRegistry can not be found or if an error occur.
- * <br>
- * This method is designed to be used by ui actions that interact with the active editor.
- * <br>
- * This method should not be used during the editor initialization phase.
- * <br>
- * In any case, a check should be done on the returned value that can be null.
- * <br>
+ * Get the ISashWindowsContentProvider of the active Eclipse Editor, if
+ * possible. <br>
+ * This method return null if the ServiceRegistry can not be found or if an
+ * error occur. <br>
+ * This method is designed to be used by ui actions that interact with the
+ * active editor. <br>
+ * This method should not be used during the editor initialization phase. <br>
+ * In any case, a check should be done on the returned value that can be
+ * null. <br>
*
- * @return the ISashWindowsContentProvider from the main editor or null if not found.
- * @deprecated Check modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments/cookbook/PapyrusCookBook.odt and use one of the replacement:
- * <ul>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
- * <li>org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
- * </ul>
+ * @return the ISashWindowsContentProvider from the main editor or null if
+ * not found.
+ * @deprecated Check
+ * modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments
+ * /cookbook/PapyrusCookBook.odt and use one of the replacement:
+ * <ul>
+ * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
+ * <li>
+ * org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
+ * <li>
+ * org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * </ul>
*/
static public ISashWindowsContentProvider getISashWindowsContentProvider() {
-
+
try {
return getServiceRegistryChecked().getService(ISashWindowsContentProvider.class);
} catch (ServiceException e) {
@@ -267,23 +283,28 @@ public class EditorUtils {
}
/**
- * Get the ISashWindowsContentProvider of the active Eclipse Editor, if possible.
- * <br>
- * This method return null if the ServiceRegistry can not be found or if an error occur.
- * <br>
- * This method is designed to be used by ui actions that interact with the active editor.
- * <br>
- * This method should not be used during the editor initialization phase.
- * <br>
- * In any case, a check should be done on the returned value that can be null.
+ * Get the ISashWindowsContentProvider of the active Eclipse Editor, if
+ * possible. <br>
+ * This method return null if the ServiceRegistry can not be found or if an
+ * error occur. <br>
+ * This method is designed to be used by ui actions that interact with the
+ * active editor. <br>
+ * This method should not be used during the editor initialization phase. <br>
+ * In any case, a check should be done on the returned value that can be
+ * null.
*
- * @return the ISashWindowsContentProvider from the main editor or null if not found.
- * @deprecated Check modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments/cookbook/PapyrusCookBook.odt and use one of the replacement:
- * <ul>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
- * <li>org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
- * </ul>
+ * @return the ISashWindowsContentProvider from the main editor or null if
+ * not found.
+ * @deprecated Check
+ * modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments
+ * /cookbook/PapyrusCookBook.odt and use one of the replacement:
+ * <ul>
+ * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
+ * <li>
+ * org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
+ * <li>
+ * org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * </ul>
*/
public static IPageMngr getIPageMngr() {
@@ -312,8 +333,8 @@ public class EditorUtils {
}
/**
- * Create an instance of IPageMngr acting on the provided resource.
- * This instance is suitable to add, remove, close or open diagrams.
+ * Create an instance of IPageMngr acting on the provided resource. This
+ * instance is suitable to add, remove, close or open diagrams.
*
* @param diResource
* @return The non transactional implementation of IPageMngr
@@ -323,8 +344,8 @@ public class EditorUtils {
}
/**
- * Create an instance of IPageMngr acting on the provided resource.
- * This instance is suitable to add, remove, close or open diagrams.
+ * Create an instance of IPageMngr acting on the provided resource. This
+ * instance is suitable to add, remove, close or open diagrams.
*
* @param diResource
* @param editingDomain
@@ -336,19 +357,19 @@ public class EditorUtils {
}
/**
- * Lookup the currently active Diagram from the Papyrus editor. Return the current Diagram
- * or null if none is active.
- * <br>
- * WARNING - This method doesn't work during the initialization of the main editor. See note in class doc.
- * <br>
- * This method return null if the ServicesRegistry can not be found.
- * <br>
- * TODO This method introduce dependency on GMF. It can be moved to a GMF plugin.
+ * Lookup the currently active Diagram from the Papyrus editor. Return the
+ * current Diagram or null if none is active. <br>
+ * WARNING - This method doesn't work during the initialization of the main
+ * editor. See note in class doc. <br>
+ * This method return null if the ServicesRegistry can not be found. <br>
+ * TODO This method introduce dependency on GMF. It can be moved to a GMF
+ * plugin.
*
* @return The active diagram or null if not found.
*
- * @deprecated The core do make suppositions about the type of nested Editors, GMF stuff should be moved
- * in GMF projects. In many case, {@link #lookupActiveNestedIEditor()} can be used.
+ * @deprecated The core do make suppositions about the type of nested
+ * Editors, GMF stuff should be moved in GMF projects. In many
+ * case, {@link #lookupActiveNestedIEditor()} can be used.
*/
public static Diagram lookupEditorActiveDiagram() {
DiagramEditor diagEditor = lookupActiveDiagramEditor();
@@ -356,19 +377,19 @@ public class EditorUtils {
}
/**
- * Lookup the currently active Diagram from the Papyrus editor. Return the current Diagram or
- * null if none is active.
- * <br>
- * WARNING - This method doesn't work during the initialization of the main editor. See note in class doc.
- * <br>
- * This method return null if the ServicesRegistry can not be found.
- * <br>
- * TODO This method introduce dependency on GMF. It can be moved to a GMF plugin.
+ * Lookup the currently active Diagram from the Papyrus editor. Return the
+ * current Diagram or null if none is active. <br>
+ * WARNING - This method doesn't work during the initialization of the main
+ * editor. See note in class doc. <br>
+ * This method return null if the ServicesRegistry can not be found. <br>
+ * TODO This method introduce dependency on GMF. It can be moved to a GMF
+ * plugin.
*
* @return the active diagram editor or null if not found.
*
- * @deprecated The core do make suppositions about the type of nested Editors, GMF stuff should be moved
- * in GMF projects. In many case, {@link #lookupActiveNestedIEditor()} can be used.
+ * @deprecated The core do make suppositions about the type of nested
+ * Editors, GMF stuff should be moved in GMF projects. In many
+ * case, {@link #lookupActiveNestedIEditor()} can be used.
*/
public static DiagramEditor lookupActiveDiagramEditor() {
// Get the active page within the sashcontainer
@@ -384,31 +405,33 @@ public class EditorUtils {
}
/**
- * Lookup the currently active {@link IEditorPart} from the Papyrus editor.
- * Return the current nested editor part, or null if it can not be found.
- * <br>
- * WARNING - This method doesn't work during the initialization of the main editor. See note in class doc.
- * <br>
- * This method return null if the ServicesRegistry can not be found.
- * <br>
- * This method is designed to be used by ui actions that interact with the active editor.
- * <br>
- * This method should not be used during the editor initialization phase.
- * <br>
- * In any case, a check should be done on the returned value that can be null. An alternative is to use
- * serviceRegistry.getService(ISashWindowsContainer.class).getActiveEditor();
- * <br>
- * It is preferable to retrieve the ServiceRegistry from elsewhere whenever it is possible.
- * <br>
+ * Lookup the currently active {@link IEditorPart} from the Papyrus editor.
+ * Return the current nested editor part, or null if it can not be found. <br>
+ * WARNING - This method doesn't work during the initialization of the main
+ * editor. See note in class doc. <br>
+ * This method return null if the ServicesRegistry can not be found. <br>
+ * This method is designed to be used by ui actions that interact with the
+ * active editor. <br>
+ * This method should not be used during the editor initialization phase. <br>
+ * In any case, a check should be done on the returned value that can be
+ * null. An alternative is to use
+ * serviceRegistry.getService(ISashWindowsContainer
+ * .class).getActiveEditor(); <br>
+ * It is preferable to retrieve the ServiceRegistry from elsewhere whenever
+ * it is possible. <br>
*
*
* @return
- * @deprecated Check modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments/cookbook/PapyrusCookBook.odt and use one of the replacement:
- * <ul>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
- * <li>org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
- * </ul>
+ * @deprecated Check
+ * modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments
+ * /cookbook/PapyrusCookBook.odt and use one of the replacement:
+ * <ul>
+ * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
+ * <li>
+ * org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
+ * <li>
+ * org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * </ul>
*/
public static IEditorPart lookupActiveNestedIEditor() {
// Get the sashwindow container
@@ -418,33 +441,37 @@ public class EditorUtils {
}
/**
- * Lookup the currently active IEditor in the SashSystem.
- * If the currently eclipse active editor doesn't contains a {@link ISashWindowsContainer}, return null.
- * If the current SashSystem page is not a IEditor, return null.
- * <br>
- * WARNING - This method doesn't work during the initialization of the main editor. See note in class doc.
- * <br>
- * This method return null if the ServicesRegistry can not be found.
- * <br>
- * This method is designed to be used by ui actions that interact with the active editor.
- * <br>
- * This method should not be used during the editor initialization phase.
- * <br>
- * In any case, a check should be done on the returned value that can be null. An alternative is to use
- * serviceRegistry.getService(ISashWindowsContainer.class).getActiveSashWindowsPage();
- * <br>
- * It is preferable to retrieve the ServiceRegistry from elsewhere whenever it is possible.
+ * Lookup the currently active IEditor in the SashSystem. If the currently
+ * eclipse active editor doesn't contains a {@link ISashWindowsContainer},
+ * return null. If the current SashSystem page is not a IEditor, return
+ * null. <br>
+ * WARNING - This method doesn't work during the initialization of the main
+ * editor. See note in class doc. <br>
+ * This method return null if the ServicesRegistry can not be found. <br>
+ * This method is designed to be used by ui actions that interact with the
+ * active editor. <br>
+ * This method should not be used during the editor initialization phase. <br>
+ * In any case, a check should be done on the returned value that can be
+ * null. An alternative is to use
+ * serviceRegistry.getService(ISashWindowsContainer
+ * .class).getActiveSashWindowsPage(); <br>
+ * It is preferable to retrieve the ServiceRegistry from elsewhere whenever
+ * it is possible.
*
* @return
- * @deprecated Check modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments/cookbook/PapyrusCookBook.odt and use one of the replacement:
- * <ul>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
- * <li>org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
- * </ul>
+ * @deprecated Check
+ * modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments
+ * /cookbook/PapyrusCookBook.odt and use one of the replacement:
+ * <ul>
+ * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
+ * <li>
+ * org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
+ * <li>
+ * org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * </ul>
*/
public static IPage lookupActiveNestedPage() {
-
+
// Get the sashwindow container
ISashWindowsContainer container = getSashWindowContainer();
// Get the active page within the sashcontainer
@@ -456,7 +483,7 @@ public class EditorUtils {
* @return
*/
private static ISashWindowsContainer getSashWindowContainer() {
-
+
try {
return getServiceRegistryChecked().getService(ISashWindowsContainer.class);
} catch (ServiceException e) {
@@ -469,12 +496,16 @@ public class EditorUtils {
* Gets the di resource set.
*
* @return Get the current {@link DiResourceSet} or null if not found.
- * @deprecated Check modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments/cookbook/PapyrusCookBook.odt and use one of the replacement:
- * <ul>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
- * <li>org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
- * </ul>
+ * @deprecated Check
+ * modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments
+ * /cookbook/PapyrusCookBook.odt and use one of the replacement:
+ * <ul>
+ * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
+ * <li>
+ * org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
+ * <li>
+ * org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * </ul>
*/
public static DiResourceSet getDiResourceSet() {
try {
@@ -487,34 +518,38 @@ public class EditorUtils {
}
/**
- * Gets the {@link TransactionalEditingDomain} of the current active Eclipse Editor.
- * This method should be used only when it is sure that the active editor exist, and that you want the
- * EditingDomain of this editor.
- * <br>
- * This method return null if the TransactionalEditingDomain can not be found.
- * <br>
- * This method is designed to be used by ui actions that interact with the active editor.
- * <br>
- * This method should not be used during the editor initialization phase.
- * <br>
- * In any case, a check should be done on the returned value that can be null. An alternative is to use
- * {@link #getTransactionalEditingDomainChecked()} and to catch the exception.
- * <br>
- * It is preferable to use {@link #getTransactionalEditingDomain(ServicesRegistry)} whenever it is possible.
- * <br>
- * In GMF EditParts or EditPolicies, the ServiceRegistry can be retrieved with methods from
- * org.eclipse.papyrus.diagram.common.util.DiagramCoreServiceUtils
- * <br>
- * WARNING: This method can return null if there is no Active Editor. This happen during the editor initialization,
- * especially when there is no other editor opened.
+ * Gets the {@link TransactionalEditingDomain} of the current active Eclipse
+ * Editor. This method should be used only when it is sure that the active
+ * editor exist, and that you want the EditingDomain of this editor. <br>
+ * This method return null if the TransactionalEditingDomain can not be
+ * found. <br>
+ * This method is designed to be used by ui actions that interact with the
+ * active editor. <br>
+ * This method should not be used during the editor initialization phase. <br>
+ * In any case, a check should be done on the returned value that can be
+ * null. An alternative is to use {@link #getTransactionalEditingDomainChecked()} and to catch the
+ * exception. <br>
+ * It is preferable to use {@link #getTransactionalEditingDomain(ServicesRegistry)} whenever it is
+ * possible. <br>
+ * In GMF EditParts or EditPolicies, the ServiceRegistry can be retrieved
+ * with methods from
+ * org.eclipse.papyrus.diagram.common.util.DiagramCoreServiceUtils <br>
+ * WARNING: This method can return null if there is no Active Editor. This
+ * happen during the editor initialization, especially when there is no
+ * other editor opened.
*
- * @return Get the current {@link TransactionalEditingDomain} or null if not found
- * @deprecated Check modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments/cookbook/PapyrusCookBook.odt and use one of the replacement:
- * <ul>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
- * <li>org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
- * </ul>
+ * @return Get the current {@link TransactionalEditingDomain} or null if not
+ * found
+ * @deprecated Check
+ * modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments
+ * /cookbook/PapyrusCookBook.odt and use one of the replacement:
+ * <ul>
+ * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
+ * <li>
+ * org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
+ * <li>
+ * org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * </ul>
*/
public static TransactionalEditingDomain getTransactionalEditingDomain() {
try {
@@ -529,34 +564,38 @@ public class EditorUtils {
}
/**
- * Gets the {@link TransactionalEditingDomain} of the current active Eclipse Editor.
- * This method should be used only when it is sure that the active editor exist, and that you want the
- * EditingDomain of this editor.
- * <br>
- * This method is designed to be used by ui actions that interact with the active editor.
- * <br>
- * This method should not be used during the editor initialization phase.
- * <br>
- * It is preferable to use {@link #getTransactionalEditingDomain(ServicesRegistry)} whenever it is possible.
- * <br>
- * This method throw a {@link ServiceException} if the TransactionalEditingDomain can not be found.
- * <br>
- * In GMF EditParts or EditPolicies, the ServiceRegistry can be retrieved with methods from
+ * Gets the {@link TransactionalEditingDomain} of the current active Eclipse
+ * Editor. This method should be used only when it is sure that the active
+ * editor exist, and that you want the EditingDomain of this editor. <br>
+ * This method is designed to be used by ui actions that interact with the
+ * active editor. <br>
+ * This method should not be used during the editor initialization phase. <br>
+ * It is preferable to use {@link #getTransactionalEditingDomain(ServicesRegistry)} whenever it is
+ * possible. <br>
+ * This method throw a {@link ServiceException} if the
+ * TransactionalEditingDomain can not be found. <br>
+ * In GMF EditParts or EditPolicies, the ServiceRegistry can be retrieved
+ * with methods from
* org.eclipse.papyrus.diagram.common.util.DiagramCoreServiceUtils
*
*
- * WARNING: This method throws an exception when no Active Editor is found. This happen during the editor initialization,
- * especially when there is no other editor opened.
+ * WARNING: This method throws an exception when no Active Editor is found.
+ * This happen during the editor initialization, especially when there is no
+ * other editor opened.
*
* @return Get the current {@link TransactionalEditingDomain}
* @throws ServiceException
* @throws ServiceNotFoundException
- * @deprecated Check modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments/cookbook/PapyrusCookBook.odt and use one of the replacement:
- * <ul>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
- * <li>org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
- * </ul>
+ * @deprecated Check
+ * modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments
+ * /cookbook/PapyrusCookBook.odt and use one of the replacement:
+ * <ul>
+ * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
+ * <li>
+ * org.eclipse.papyrus.diagram.common.util.ServiceUtilsForGMF</li>
+ * <li>
+ * org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * </ul>
*/
public static TransactionalEditingDomain getTransactionalEditingDomainChecked() throws ServiceException {
try {
@@ -570,14 +609,16 @@ public class EditorUtils {
}
/**
- * Gets the {@link TransactionalEditingDomain} registered in the {@link ServicesRegistry}.
+ * Gets the {@link TransactionalEditingDomain} registered in the {@link ServicesRegistry}.
*
* @param servicesRegistry
* @return
- * @deprecated Check modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments/cookbook/PapyrusCookBook.odt and use one of the replacement:
- * <ul>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
- * </ul>
+ * @deprecated Check
+ * modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments
+ * /cookbook/PapyrusCookBook.odt and use one of the replacement:
+ * <ul>
+ * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
+ * </ul>
*/
public static TransactionalEditingDomain getTransactionalEditingDomain(ServicesRegistry registry) {
try {
@@ -591,18 +632,21 @@ public class EditorUtils {
}
/**
- * Gets the {@link TransactionalEditingDomain} registered in the {@link ServicesRegistry}.
+ * Gets the {@link TransactionalEditingDomain} registered in the {@link ServicesRegistry}.
*
* @param servicesRegistry
* @return
- * @throws ServiceException If the TransactionalEditingDomain can not be found.
- * @deprecated Check modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments/cookbook/PapyrusCookBook.odt and use one of the replacement:
- * <ul>
- * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
- * </ul>
+ * @throws ServiceException
+ * If the TransactionalEditingDomain can not be found.
+ * @deprecated Check
+ * modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments
+ * /cookbook/PapyrusCookBook.odt and use one of the replacement:
+ * <ul>
+ * <li>org.eclipse.papyrus.core.utils.ServiceUtils</li>
+ * </ul>
*/
public static TransactionalEditingDomain getTransactionalEditingDomainChecked(ServicesRegistry registry) throws ServiceException {
- return registry.getService(TransactionalEditingDomain.class);
+ return registry.getService(TransactionalEditingDomain.class);
}
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/FilteredCollectionView.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/FilteredCollectionView.java
index 172aef6d65d..aeb26e4f9e6 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/FilteredCollectionView.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/FilteredCollectionView.java
@@ -19,7 +19,8 @@ import java.util.Iterator;
import java.util.NoSuchElementException;
/**
- * A unmodifiable view on a specified list. The view filters the original list according to the provided filter.
+ * A unmodifiable view on a specified list. The view filters the original list
+ * according to the provided filter.
*/
public class FilteredCollectionView<T> extends AbstractCollection<T> implements Collection<T> {
@@ -30,7 +31,8 @@ public class FilteredCollectionView<T> extends AbstractCollection<T> implements
private IFilter filter;
/**
- * The cached size. Compute only once, so change in the underlying collection is not reflected
+ * The cached size. Compute only once, so change in the underlying
+ * collection is not reflected
*/
private int size = -1;
@@ -107,10 +109,9 @@ public class FilteredCollectionView<T> extends AbstractCollection<T> implements
return list.contains(o);
}
-
/**
- * remove the object.
- * Throw an UnsupportedOperationException, as the FilteredCollection is ReadOnly.
+ * remove the object. Throw an UnsupportedOperationException, as the
+ * FilteredCollection is ReadOnly.
*
* @see java.util.AbstractCollection#remove(java.lang.Object)
* @param o
@@ -123,11 +124,13 @@ public class FilteredCollectionView<T> extends AbstractCollection<T> implements
}
/**
- * Return the value to be returned by the iterator.next() method. This method can be overloaded by subclasses in order to return another value
+ * Return the value to be returned by the iterator.next() method. This
+ * method can be overloaded by subclasses in order to return another value
* than the objects belonging to the underlying list.
*
* @param ele
- * The iterated object. This is the object iterated inside the underlying list.
+ * The iterated object. This is the object iterated inside the
+ * underlying list.
* @return
*/
protected T returnedValue(T ele) {
@@ -195,7 +198,8 @@ public class FilteredCollectionView<T> extends AbstractCollection<T> implements
}
/**
- * Compute the next field (null or next value), and return the previous value of the next field.
+ * Compute the next field (null or next value), and return the previous
+ * value of the next field.
*
* @return Object
*/
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/FilteredCollectionViewFromIterator.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/FilteredCollectionViewFromIterator.java
index d9363d945f7..84cf91ac4fe 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/FilteredCollectionViewFromIterator.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/FilteredCollectionViewFromIterator.java
@@ -20,7 +20,8 @@ import java.util.Iterator;
import java.util.NoSuchElementException;
/**
- * A unmodifiable view on a specified list from its iterator. The view filters the original list according to the provided filter.
+ * A unmodifiable view on a specified list from its iterator. The view filters
+ * the original list according to the provided filter.
*
* @param <E>
* the type of objects in the filtered collection
@@ -38,7 +39,8 @@ public class FilteredCollectionViewFromIterator<E> extends AbstractCollection<E>
private IFilter filter;
/**
- * The cached size. Compute only once, so change in the underlying collection is not reflected
+ * The cached size. Compute only once, so change in the underlying
+ * collection is not reflected
*/
private int size = -1;
@@ -112,11 +114,11 @@ public class FilteredCollectionViewFromIterator<E> extends AbstractCollection<E>
}
/**
- * Removes a single instance of the specified element from this collection, if it is present (optional operation). More formally, removes an
- * element <tt>e</tt> such that <tt>(o==null ? e==null :
- * o.equals(e))</tt>, if the collection contains one or more such elements. Returns <tt>true</tt> if the collection contained the specified
- * element (or equivalently, if the collection changed as a
- * result of the call).
+ * Removes a single instance of the specified element from this collection,
+ * if it is present (optional operation). More formally, removes an element <tt>e</tt> such that <tt>(o==null ? e==null :
+ * o.equals(e))</tt>, if the collection contains one or more such elements.
+ * Returns <tt>true</tt> if the collection contained the specified element
+ * (or equivalently, if the collection changed as a result of the call).
* <p>
*
* This implementation call the remove method on the underlying collection.
@@ -128,7 +130,8 @@ public class FilteredCollectionViewFromIterator<E> extends AbstractCollection<E>
* @return <tt>true</tt> if the collection contained the specified element.
*
* @throws UnsupportedOperationException
- * if the <tt>remove</tt> method is not supported by this collection.
+ * if the <tt>remove</tt> method is not supported by this
+ * collection.
*/
@Override
public boolean remove(Object o) {
@@ -137,11 +140,13 @@ public class FilteredCollectionViewFromIterator<E> extends AbstractCollection<E>
}
/**
- * Return the value to be returned by the iterator.next() method. This method can be overloaded by subclasses in order to return another value
+ * Return the value to be returned by the iterator.next() method. This
+ * method can be overloaded by subclasses in order to return another value
* than the objects belonging to the underlying list.
*
* @param ele
- * The iterated object. This is the object iterated inside the underlying list.
+ * The iterated object. This is the object iterated inside the
+ * underlying list.
*
* @return
*/
@@ -217,7 +222,8 @@ public class FilteredCollectionViewFromIterator<E> extends AbstractCollection<E>
}
/**
- * Compute the next field (null or next value), and return the previous value of the next field.
+ * Compute the next field (null or next value), and return the previous
+ * value of the next field.
*
* @return Object
*/
@@ -233,7 +239,8 @@ public class FilteredCollectionViewFromIterator<E> extends AbstractCollection<E>
}
/**
- * Inner class. Provide an iterator used internally in the unmodifiable collection view..
+ * Inner class. Provide an iterator used internally in the unmodifiable
+ * collection view..
*/
public interface IteratorProvider<E> {
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/FilteredListView.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/FilteredListView.java
index bfe10ce9d9d..fde7d99cf3b 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/FilteredListView.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/FilteredListView.java
@@ -20,7 +20,8 @@ import java.util.ListIterator;
import java.util.NoSuchElementException;
/**
- * A unmodifiable view on a specified list. The view filters the original list according to the provided filter.
+ * A unmodifiable view on a specified list. The view filters the original list
+ * according to the provided filter.
*/
public class FilteredListView extends AbstractSequentialList<Object> implements List<Object> {
@@ -35,7 +36,8 @@ public class FilteredListView extends AbstractSequentialList<Object> implements
private IFilter filter;
/**
- * The cached size. Copute only once, so change in the underlying collection is not reflected
+ * The cached size. Copute only once, so change in the underlying collection
+ * is not reflected
*/
private int size = -1;
@@ -89,7 +91,8 @@ public class FilteredListView extends AbstractSequentialList<Object> implements
}
/**
- * Returns <tt>true</tt> if this collection contains the specified element. More formally, returns <tt>true</tt> if and only if this collection
+ * Returns <tt>true</tt> if this collection contains the specified element.
+ * More formally, returns <tt>true</tt> if and only if this collection
* contains at least one element <tt>e</tt> such that <tt>(o==null ? e==null : o.equals(e))</tt>.
* <p>
*
@@ -104,11 +107,11 @@ public class FilteredListView extends AbstractSequentialList<Object> implements
}
/**
- * Removes a single instance of the specified element from this collection, if it is present (optional operation). More formally, removes an
- * element <tt>e</tt> such that <tt>(o==null ? e==null :
- * o.equals(e))</tt>, if the collection contains one or more such elements. Returns <tt>true</tt> if the collection contained the specified
- * element (or equivalently, if the collection changed as a
- * result of the call).
+ * Removes a single instance of the specified element from this collection,
+ * if it is present (optional operation). More formally, removes an element <tt>e</tt> such that <tt>(o==null ? e==null :
+ * o.equals(e))</tt>, if the collection contains one or more such elements.
+ * Returns <tt>true</tt> if the collection contained the specified element
+ * (or equivalently, if the collection changed as a result of the call).
* <p>
*
* This implementation call the remove method on the underlying collection.
@@ -120,7 +123,8 @@ public class FilteredListView extends AbstractSequentialList<Object> implements
* @return <tt>true</tt> if the collection contained the specified element.
*
* @throws UnsupportedOperationException
- * if the <tt>remove</tt> method is not supported by this collection.
+ * if the <tt>remove</tt> method is not supported by this
+ * collection.
*/
@Override
public boolean remove(Object o) {
@@ -220,7 +224,8 @@ public class FilteredListView extends AbstractSequentialList<Object> implements
protected Object nextFilteredObject() {
while(listIterator.hasNext()) {
- int curIndex = listIterator.nextIndex(); // This is the current index in the list
+ int curIndex = listIterator.nextIndex(); // This is the current
+ // index in the list
Object ele = listIterator.next();
if(filter.isAllowed(ele) && (curIndex > nextIndex)) {
nextIndex = curIndex;
@@ -237,7 +242,9 @@ public class FilteredListView extends AbstractSequentialList<Object> implements
*/
protected Object previousFilteredObject() {
while(listIterator.hasPrevious()) {
- int curIndex = listIterator.previousIndex(); // This is the current index in the list
+ int curIndex = listIterator.previousIndex(); // This is the
+ // current index
+ // in the list
Object ele = listIterator.previous();
if(filter.isAllowed(ele) && (curIndex < previousIndex)) {
previousIndex = curIndex;
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/GMFtoEMFCommandWrapper.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/GMFtoEMFCommandWrapper.java
index eaf0627acc4..1ce3e95ea4f 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/GMFtoEMFCommandWrapper.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/GMFtoEMFCommandWrapper.java
@@ -13,7 +13,8 @@ package org.eclipse.papyrus.core.utils;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
/**
- * A EMF Command that wraps a GMF command. Each method is redirected to the GMF one.
+ * A EMF Command that wraps a GMF command. Each method is redirected to the GMF
+ * one.
*
* @deprecated use {@link org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper} instead
*/
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/IFilter.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/IFilter.java
index 8ac559c8571..8621796e0a1 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/IFilter.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/IFilter.java
@@ -19,7 +19,8 @@ package org.eclipse.papyrus.core.utils;
public interface IFilter {
/**
- * Is the specified object allowed ? Return true if the filter allow this object. Return false if the filter doesn't allows the object.
+ * Is the specified object allowed ? Return true if the filter allow this
+ * object. Return false if the filter doesn't allows the object.
*
* @param object
*
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/OpenDiagramCommand.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/OpenDiagramCommand.java
index e78aac543ec..b34ef4b8200 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/OpenDiagramCommand.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/OpenDiagramCommand.java
@@ -23,7 +23,6 @@ import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
import org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr;
-
/**
* The Class OpenDiagramCommand.
*
@@ -62,15 +61,13 @@ public class OpenDiagramCommand extends AbstractTransactionalCommand {
try {
if(diagramToOpen == null && previousCreateDiagramCommand != null) {
Object possibleDiagramToOpen = previousCreateDiagramCommand.getCommandResult().getReturnValue();
- if (possibleDiagramToOpen instanceof EObject) {
+ if(possibleDiagramToOpen instanceof EObject) {
diagramToOpen = (EObject)possibleDiagramToOpen;
}
}
- if(diagramToOpen != null && getEditingDomain().getResourceSet() instanceof DiResourceSet) {
- DiResourceSet diResourceSet = (DiResourceSet)getEditingDomain().getResourceSet();
-
- IPageMngr pageMngr = EditorUtils.getIPageMngr(diResourceSet.getDiResource());
+ if(diagramToOpen != null) {
+ IPageMngr pageMngr = EditorUtils.getServiceRegistry().getService(IPageMngr.class);
if(pageMngr.isOpen(diagramToOpen)) {
pageMngr.closePage(diagramToOpen);
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusEcoreUtils.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusEcoreUtils.java
index 5ec232e2519..4d56f002909 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusEcoreUtils.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusEcoreUtils.java
@@ -24,7 +24,6 @@ import org.eclipse.emf.ecore.EStructuralFeature.Setting;
import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
import org.eclipse.emf.ecore.util.EcoreUtil;
-
public class PapyrusEcoreUtils {
/**
@@ -66,7 +65,7 @@ public class PapyrusEcoreUtils {
Set<EObject> crossReferences = new HashSet<EObject>();
for(Setting setting : PapyrusEcoreUtils.getUsages(usedObject)) {
EObject eObj = setting.getEObject();
- if (eObj.eClass().getEPackage().equals(mmPackage)) {
+ if(eObj.eClass().getEPackage().equals(mmPackage)) {
crossReferences.add(eObj);
}
}
@@ -76,8 +75,9 @@ public class PapyrusEcoreUtils {
// Remove the knownReferencer from the list of references.
crossReferences.remove(knownReferencer);
- // If no referencer remains in the list, the known element is the only usage.
- if (crossReferences.isEmpty()) {
+ // If no referencer remains in the list, the known element is the only
+ // usage.
+ if(crossReferences.isEmpty()) {
isUsed = true;
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusImageUtils.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusImageUtils.java
index ed007015eac..703c7a64a42 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusImageUtils.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusImageUtils.java
@@ -19,7 +19,6 @@ import org.eclipse.papyrus.core.Activator;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
-
/**
* Services to access to Papyrus images
*
@@ -33,8 +32,8 @@ public class PapyrusImageUtils {
private static final String default_icon = "/icons/papyrus/Papyrus.gif";
/**
- * get the default icon for Papyrus
- * the image does not have to be disposed as it is registered in an ImageRegistry
+ * get the default icon for Papyrus the image does not have to be disposed
+ * as it is registered in an ImageRegistry
*
* @return the Image
*/
@@ -43,8 +42,8 @@ public class PapyrusImageUtils {
}
/**
- * get the default icon 32x32 for Papyrus
- * the image does not have to be disposed as it is registered in an ImageRegistry
+ * get the default icon 32x32 for Papyrus the image does not have to be
+ * disposed as it is registered in an ImageRegistry
*
* @return the Image
*/
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusTrace.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusTrace.java
index 2d8452f174f..2fbf9a1d3d9 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusTrace.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusTrace.java
@@ -17,10 +17,11 @@ import org.eclipse.papyrus.core.Activator;
import org.eclipse.papyrus.log.LogHelper;
/**
- * Utility class to log errors or debug information either in the plugin'log or in the console.
+ * Utility class to log errors or debug information either in the plugin'log or
+ * in the console.
* <p>
- * A set of channels is used to separate different traces for different aspects. A short list is displayed at the end of the file to give an example
- * of channels
+ * A set of channels is used to separate different traces for different aspects. A short list is displayed at the end of the file to give an example of channels
+ *
* @deprecated Use {@link LogHelper} instead
**/
@Deprecated
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/ServiceUtils.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/ServiceUtils.java
index 31a66c2c305..bb9645aae12 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/ServiceUtils.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/ServiceUtils.java
@@ -17,15 +17,14 @@ package org.eclipse.papyrus.core.utils;
import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.services.ServicesRegistry;
-
/**
* @author cedric dumoulin
- *
+ *
*/
public class ServiceUtils extends AbstractServiceUtils<ServicesRegistry> {
private final static ServiceUtils instance = new ServiceUtils();
-
+
/**
* Get the singleton instance of the class.
*
@@ -34,10 +33,10 @@ public class ServiceUtils extends AbstractServiceUtils<ServicesRegistry> {
public static final ServiceUtils getInstance() {
return instance;
}
-
+
/**
* @see org.eclipse.papyrus.core.utils.AbstractServiceUtils#getServiceRegistry(java.lang.Object)
- *
+ *
* @param from
* @return
* @throws ServiceException
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/ServiceUtilsForActionHandlers.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/ServiceUtilsForActionHandlers.java
index 9981acae84e..77cbb33567e 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/ServiceUtilsForActionHandlers.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/ServiceUtilsForActionHandlers.java
@@ -26,23 +26,22 @@ import org.eclipse.papyrus.sasheditor.editor.ISashWindowsContainer;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
-
/**
- * Set of utility methods for accessing core Services.
- * This class provide methods to access the Papyrus well known services.
- * This class is designed to be used from ui Action Handlers or from any code relying on the
- * Eclipse Active Editor.
- * <br>
- * All methods from this class rely on the Eclipse Active Editor, which should be an instance of
- * {@link IMultiDiagramEditor}. If this is not the case, methods throw an exception {@link ServiceException}.
+ * Set of utility methods for accessing core Services. This class provide
+ * methods to access the Papyrus well known services. This class is designed to
+ * be used from ui Action Handlers or from any code relying on the Eclipse
+ * Active Editor. <br>
+ * All methods from this class rely on the Eclipse Active Editor, which should
+ * be an instance of {@link IMultiDiagramEditor}. If this is not the case,
+ * methods throw an exception {@link ServiceException}.
*
* @author cedric dumoulin
- *
+ *
*/
public class ServiceUtilsForActionHandlers {
private final static ServiceUtilsForActionHandlers instance = new ServiceUtilsForActionHandlers();
-
+
/**
* Get the singleton instance of the class.
*
@@ -51,7 +50,7 @@ public class ServiceUtilsForActionHandlers {
public static final ServiceUtilsForActionHandlers getInstance() {
return instance;
}
-
+
/**
* Get the service registry from the specified parameter.
*
@@ -59,7 +58,7 @@ public class ServiceUtilsForActionHandlers {
* @return
*/
public ServicesRegistry getServiceRegistry() throws ServiceException {
-
+
IEditorPart editor;
try {
editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
@@ -72,70 +71,76 @@ public class ServiceUtilsForActionHandlers {
if(serviceRegistry != null) {
return serviceRegistry;
}
-
+
// Not found
throw new ServiceNotFoundException("Can't get the ServiceRegistry from current Eclipse Active Editor");
}
-
+
/**
- * Gets the {@link TransactionalEditingDomain} registered in the {@link ServicesRegistry}.
+ * Gets the {@link TransactionalEditingDomain} registered in the {@link ServicesRegistry}.
*
* @return
- * @throws ServiceException If an error occurs while getting the requested service.
+ * @throws ServiceException
+ * If an error occurs while getting the requested service.
*/
public TransactionalEditingDomain getTransactionalEditingDomain() throws ServiceException {
return getServiceRegistry().getService(TransactionalEditingDomain.class);
}
-
+
/**
- * Gets the {@link IPageMngr} registered in the {@link ServicesRegistry}.
+ * Gets the {@link IPageMngr} registered in the {@link ServicesRegistry}.
*
* @return
- * @throws ServiceException If an error occurs while getting the requested service.
+ * @throws ServiceException
+ * If an error occurs while getting the requested service.
*/
public IPageMngr getIPageMngr() throws ServiceException {
return getServiceRegistry().getService(IPageMngr.class);
}
-
+
/**
- * Gets the {@link IPageMngr} registered in the {@link ServicesRegistry}.
+ * Gets the {@link IPageMngr} registered in the {@link ServicesRegistry}.
*
* @return
- * @throws ServiceException If an error occurs while getting the requested service.
+ * @throws ServiceException
+ * If an error occurs while getting the requested service.
*/
public ModelSet getModelSet() throws ServiceException {
return getServiceRegistry().getService(ModelSet.class);
}
/**
- * Gets the {@link ILifeCycleEventsProvider} registered in the {@link ServicesRegistry}.
+ * Gets the {@link ILifeCycleEventsProvider} registered in the {@link ServicesRegistry}.
*
* @param from
* @return
- * @throws ServiceException If an error occurs while getting the requested service.
+ * @throws ServiceException
+ * If an error occurs while getting the requested service.
*/
public ILifeCycleEventsProvider getILifeCycleEventsProvider() throws ServiceException {
return getServiceRegistry().getService(ILifeCycleEventsProvider.class);
}
/**
- * Gets the {@link ISashWindowsContainer} registered in the {@link ServicesRegistry}.
+ * Gets the {@link ISashWindowsContainer} registered in the {@link ServicesRegistry}.
*
* @param from
* @return
- * @throws ServiceException If an error occurs while getting the requested service.
+ * @throws ServiceException
+ * If an error occurs while getting the requested service.
*/
public ISashWindowsContainer getISashWindowsContainer() throws ServiceException {
return getServiceRegistry().getService(ISashWindowsContainer.class);
}
-
+
/**
- * Gets the {@link IEditorPart} of the currently nested active editor.
+ * Gets the {@link IEditorPart} of the currently nested active editor.
*
* @param from
* @return
- * @throws ServiceException If an error occurs while getting the requested service.
+ * @throws ServiceException
+ * If an error occurs while getting the requested service.
*/
public IEditorPart getNestedActiveIEditorPart() throws ServiceException {
return getISashWindowsContainer().getActiveEditor();
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/AbstractBaseModel.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/AbstractBaseModel.java
index 823f5e63233..84a694e9c0c 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/AbstractBaseModel.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/AbstractBaseModel.java
@@ -11,10 +11,9 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
-
/**
- * An abstract implmeentation of model.
- * This class should be subclassed to fit the required model.
+ * An abstract implmeentation of model. This class should be subclassed to fit
+ * the required model.
*
* @author cedric dumoulin
*
@@ -96,8 +95,8 @@ public abstract class AbstractBaseModel implements IModel {
abstract protected String getModelFileExtension();
/**
- * Return true if the resource is set, false otherwise.
- * When the resource is set, this mean that the model is loaded or created.
+ * Return true if the resource is set, false otherwise. When the resource is
+ * set, this mean that the model is loaded or created.
*
* @return
*/
@@ -130,13 +129,13 @@ public abstract class AbstractBaseModel implements IModel {
return URI.createPlatformResourceURI(path.toString(), true);
}
-
/**
- * Load the model repository.
- * The URI is calculated by removing the extension and replacing it by the model extension.
+ * Load the model repository. The URI is calculated by removing the
+ * extension and replacing it by the model extension.
*
* @param file
- * The file selected by user requesting load. Should be used as a bases to guess the model IPath.
+ * The file selected by user requesting load. Should be used as a
+ * bases to guess the model IPath.
*/
public void loadModel(IFile file) {
// Get the full path and call the load method with it.
@@ -144,8 +143,8 @@ public abstract class AbstractBaseModel implements IModel {
}
/**
- * Load the model by using the provided fullpath as a hint for the resource URI.
- * In this implementation, simply add the model extension.
+ * Load the model by using the provided fullpath as a hint for the resource
+ * URI. In this implementation, simply add the model extension.
*
* @param fullPathWithoutExtension
*/
@@ -161,8 +160,8 @@ public abstract class AbstractBaseModel implements IModel {
}
/**
- * Import the model by using the provided fullpath as a hint for the resource URI.
- * In this implementation, simply call {@link #loadModel(IPath)}
+ * Import the model by using the provided fullpath as a hint for the
+ * resource URI. In this implementation, simply call {@link #loadModel(IPath)}
*
* @param fullPathWithoutExtension
*/
@@ -208,10 +207,9 @@ public abstract class AbstractBaseModel implements IModel {
}
/**
- * Add a snippet to this model.
- * The snippet is called just after model is initialized,
- * and before it is disposed or unloaded.
- * Snippet can be shared among models.
+ * Add a snippet to this model. The snippet is called just after model is
+ * initialized, and before it is disposed or unloaded. Snippet can be shared
+ * among models.
*
* @param snippet
* The snippet to add.
@@ -220,5 +218,4 @@ public abstract class AbstractBaseModel implements IModel {
snippets.add(snippet);
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/AbstractModelWithSharedResource.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/AbstractModelWithSharedResource.java
index fd9e4d9bc59..984adb22a84 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/AbstractModelWithSharedResource.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/AbstractModelWithSharedResource.java
@@ -11,34 +11,34 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
-
/**
- * Base class for models sharing a common {@link Resource}.
- * To share a common {@link Resource}, one of the model should be Master, while the other are slaves.
- * The Master is the one performing the save operation.
- * All the model should use the same file extension. So, {@link #getModelFileExtension()} should return
- * the same value for all models.
+ * Base class for models sharing a common {@link Resource}. To share a common {@link Resource}, one of the model should be Master, while the other are
+ * slaves. The Master is the one performing the save operation. All the model
+ * should use the same file extension. So, {@link #getModelFileExtension()} should return the same value for all models.
*
* @author cedric dumoulin
- *
- * @param T Type of the roots of the model.
+ *
+ * @param T
+ * Type of the roots of the model.
*/
-public abstract class AbstractModelWithSharedResource <T extends EObject> extends AbstractBaseModel {
+public abstract class AbstractModelWithSharedResource<T extends EObject> extends AbstractBaseModel {
/**
* Possible type for this model: master or slave
*/
- public enum ModelKind {master, slave}
+ public enum ModelKind {
+ master, slave
+ }
- /**
- * Model kind.
- */
+ /**
+ * Model kind.
+ */
private ModelKind modelKind;;
-
+
/**
*
* Constructor.
- *
+ *
* @param modelKind
*/
public AbstractModelWithSharedResource(ModelKind modelKind) {
@@ -46,9 +46,8 @@ public abstract class AbstractModelWithSharedResource <T extends EObject> extend
}
/**
- * By default, we are a slave.
- * Constructor.
- *
+ * By default, we are a slave. Constructor.
+ *
* @param modelKind
*/
public AbstractModelWithSharedResource() {
@@ -57,13 +56,14 @@ public abstract class AbstractModelWithSharedResource <T extends EObject> extend
/**
* Attach the model to its resource if this is not already done.
+ *
* @see org.eclipse.papyrus.resource.AbstractBaseModel#loadModel(org.eclipse.core.runtime.IPath)
- *
+ *
* @param fullPathWithoutExtension
*/
@Override
public void loadModel(IPath fullPathWithoutExtension) {
-
+
// Look for the resource
lookupResource(fullPathWithoutExtension);
// Check if model is loaded.
@@ -75,13 +75,14 @@ public abstract class AbstractModelWithSharedResource <T extends EObject> extend
/**
* Create the model if this is not already done.
+ *
* @see org.eclipse.papyrus.resource.AbstractBaseModel#createModel(org.eclipse.core.runtime.IPath)
- *
+ *
* @param fullPath
*/
@Override
public void createModel(IPath fullPath) {
-
+
// Look for the resource
lookupResource(fullPath);
// Check if model is loaded.
@@ -90,82 +91,82 @@ public abstract class AbstractModelWithSharedResource <T extends EObject> extend
// model is not loaded, do it.
super.createModel(fullPath);
}
-
+
/**
- * Lookup for the resource in the resourceSet. Return the resource or null if not found.
+ * Lookup for the resource in the resourceSet. Return the resource or null
+ * if not found.
*
* @param fullPath
*/
private void lookupResource(IPath fullPath) {
-
+
// Compute model URI
resourceURI = getPlatformURI(fullPath.addFileExtension(getModelFileExtension()));
-
+
resource = getResourceSet().getResource(resourceURI, false);
-
+
}
/**
- * Do nothing as we are slave.
- * The Resource is save by the master model.
+ * Do nothing as we are slave. The Resource is save by the master model.
+ *
* @see org.eclipse.papyrus.resource.AbstractBaseModel#saveModel()
- *
+ *
* @throws IOException
*/
@Override
public void saveModel() throws IOException {
-
+
// Do nothing if we are a slave
- if( modelKind == ModelKind.slave)
+ if(modelKind == ModelKind.slave)
return;
-
+
// Do the save
super.saveModel();
}
-
+
/**
- * Get the root of this model. Lookup in the associated {@link Resource} for the root.
+ * Get the root of this model. Lookup in the associated {@link Resource} for
+ * the root.
*
* @return The root of the model, or null if no root exist.
*/
@SuppressWarnings("unchecked")
public T getModelRoot() {
-
- for( EObject object : getResource().getContents() )
- {
-
- if( isModelRoot(object) )
- {
+
+ for(EObject object : getResource().getContents()) {
+
+ if(isModelRoot(object)) {
return (T)object;
}
}
-
+
// Not found
return null;
}
-
+
/**
* Get the roots of this model. Lookup in the associated {@link Resource} for the roots.
*
- * @return A list containing the roots of the model. The list is empty if there is no root.
+ * @return A list containing the roots of the model. The list is empty if
+ * there is no root.
*/
@SuppressWarnings("unchecked")
public List<T> getModelRoots() {
-
+
List<T> roots = new ArrayList<T>();
-
- for( EObject object : getResource().getContents() )
- {
- if( isModelRoot(object) )
+
+ for(EObject object : getResource().getContents()) {
+ if(isModelRoot(object))
roots.add((T)object);
}
-
+
return roots;
}
-
+
/**
- * Return true if the provided object is a root of the model, false otherwise.
- * This method should be implemented by subclasses.
+ * Return true if the provided object is a root of the model, false
+ * otherwise. This method should be implemented by subclasses.
*
* @param object
* @return
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/BadStateException.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/BadStateException.java
index e083f1c6021..6f921e10950 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/BadStateException.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/BadStateException.java
@@ -3,13 +3,12 @@
*/
package org.eclipse.papyrus.resource;
-
/**
- * Exception thrown when a method is called while the object state is not ready for this
- * call.
+ * Exception thrown when a method is called while the object state is not ready
+ * for this call.
*
* @author cedric dumoulin
- *
+ *
*/
public class BadStateException extends Exception {
@@ -20,7 +19,7 @@ public class BadStateException extends Exception {
/**
* Constructor.
- *
+ *
*/
public BadStateException() {
super();
@@ -29,7 +28,7 @@ public class BadStateException extends Exception {
/**
* Constructor.
- *
+ *
* @param message
* @param cause
*/
@@ -40,7 +39,7 @@ public class BadStateException extends Exception {
/**
* Constructor.
- *
+ *
* @param message
*/
public BadStateException(String message) {
@@ -50,7 +49,7 @@ public class BadStateException extends Exception {
/**
* Constructor.
- *
+ *
* @param cause
*/
public BadStateException(Throwable cause) {
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/EditingDomainServiceFactory.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/EditingDomainServiceFactory.java
index 5f2e1e00c2f..eff67437600 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/EditingDomainServiceFactory.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/EditingDomainServiceFactory.java
@@ -7,23 +7,23 @@ import org.eclipse.papyrus.core.services.IServiceFactory;
import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.services.ServicesRegistry;
-
/**
* A service factory starting the EditingDomain service.
+ *
* @author cedric dumoulin
- *
+ *
*/
public class EditingDomainServiceFactory implements IServiceFactory {
-
+
/**
- * The associated ModelSet.
- * This service depends on the ModelSet service. So, we can get it in the init.
+ * The associated ModelSet. This service depends on the ModelSet service.
+ * So, we can get it in the init.
*/
private ModelSet modelSet;
-
+
/**
* @see org.eclipse.papyrus.core.services.IService#init(org.eclipse.papyrus.core.services.ServicesRegistry)
- *
+ *
* @param servicesRegistry
* @throws ServiceException
*/
@@ -33,7 +33,7 @@ public class EditingDomainServiceFactory implements IServiceFactory {
/**
* @see org.eclipse.papyrus.core.services.IService#startService()
- *
+ *
* @throws ServiceException
*/
public void startService() throws ServiceException {
@@ -41,7 +41,7 @@ public class EditingDomainServiceFactory implements IServiceFactory {
/**
* @see org.eclipse.papyrus.core.services.IService#disposeService()
- *
+ *
* @throws ServiceException
*/
public void disposeService() throws ServiceException {
@@ -49,7 +49,7 @@ public class EditingDomainServiceFactory implements IServiceFactory {
/**
* @see org.eclipse.papyrus.core.services.IServiceFactory#createServiceInstance()
- *
+ *
* @return
*/
public Object createServiceInstance() {
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/IModel.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/IModel.java
index 0d652f655a5..a4b37b8b633 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/IModel.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/IModel.java
@@ -7,28 +7,30 @@ import java.io.IOException;
import org.eclipse.core.runtime.IPath;
-
/**
- * A Model is a set of elements defined by a metamodel (preferably an EMF metamodel).
- * A root of a model is an element which have no parent (i.e. is not contained by another
- * element of the model).
- * A model has usually only one root.
- * Elements of a model can be contained in one or several resources.
- * A model is identified by an id, usually the id from the metamodel package (ModelPackage.eCONTENT_TYPE).
+ * A Model is a set of elements defined by a metamodel (preferably an EMF
+ * metamodel). A root of a model is an element which have no parent (i.e. is not
+ * contained by another element of the model). A model has usually only one
+ * root. Elements of a model can be contained in one or several resources. A
+ * model is identified by an id, usually the id from the metamodel package
+ * (ModelPackage.eCONTENT_TYPE).
*
* @author cedric dumoulin
- *
+ *
*/
public interface IModel {
/**
* Initialize the model and set its associated model manager.
- * @param modelManager The associated model manager.
+ *
+ * @param modelManager
+ * The associated model manager.
*/
public void init(ModelSet modelManager);
/**
* Get the identifier identifying this model (aka: uml, notation, ...)
+ *
* @return
*/
public String getIdentifier();
@@ -36,34 +38,40 @@ public interface IModel {
/**
* Create the model repository.
*
- * @param fullPath The full path, without extension where the model should be saved.
+ * @param fullPath
+ * The full path, without extension where the model should be
+ * saved.
*/
public void createModel(IPath fullPath);
/**
* Load the model from the specified path..
*
- * @param path The full path, without extension where the model should be saved. Should be used as a bases to guess the model IPath.
+ * @param path
+ * The full path, without extension where the model should be
+ * saved. Should be used as a bases to guess the model IPath.
*/
public void loadModel(IPath path);
/**
* Import the model from the specified path.
*
- * @param path The full path, without extension.
+ * @param path
+ * The full path, without extension.
*/
public void importModel(IPath path);
/**
* Save the model in its repository.
- * @throws IOException
+ *
+ * @throws IOException
*
*/
public void saveModel() throws IOException;
/**
- * Change the path under which the model should be save.
- * Do not save it now !
+ * Change the path under which the model should be save. Do not save it now
+ * !
*
*/
public void changeModelPath(IPath fullPath);
@@ -72,15 +80,15 @@ public interface IModel {
* Dispose the model.
*/
public void unload();
-
+
/**
- * Add a snippet to this model.
- * The snippet is called just after model is initialized,
- * and before it is disposed or unloaded.
- * Snippet can be shared among models.
- * @param snippet The snippet to add.
+ * Add a snippet to this model. The snippet is called just after model is
+ * initialized, and before it is disposed or unloaded. Snippet can be shared
+ * among models.
+ *
+ * @param snippet
+ * The snippet to add.
*/
public void addModelSnippet(IModelSnippet snippet);
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/IModelSetSnippet.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/IModelSetSnippet.java
index 12a3b48a346..f805063e2da 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/IModelSetSnippet.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/IModelSetSnippet.java
@@ -3,27 +3,30 @@
*/
package org.eclipse.papyrus.resource;
-
/**
- * A model snippet can be used to add code that should do some stuff on a modelsManager.
- * A ModelSnippet is attached to a modelsManager, and is called after modelsManager is started and
- * just before it is disposed.
+ * A model snippet can be used to add code that should do some stuff on a
+ * modelsManager. A ModelSnippet is attached to a modelsManager, and is called
+ * after modelsManager is started and just before it is disposed.
*
*
* @author cedric dumoulin
- *
+ *
*/
public interface IModelSetSnippet {
/**
* Called right after the model is started.
- * @param modelsManager The modelsManager that is starting
+ *
+ * @param modelsManager
+ * The modelsManager that is starting
*/
public void start(ModelSet modelsManager);
-
+
/**
- * Called just before the model is disposed or unloaded.
- * @param modelsManager The modelsManager that is starting
+ * Called just before the model is disposed or unloaded.
+ *
+ * @param modelsManager
+ * The modelsManager that is starting
*/
public void dispose(ModelSet modelsManager);
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/IModelSnippet.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/IModelSnippet.java
index 1bf042e4c10..1a445db2387 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/IModelSnippet.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/IModelSnippet.java
@@ -3,27 +3,30 @@
*/
package org.eclipse.papyrus.resource;
-
/**
* A model snippet can be used to add code that should do some stuff on a model.
- * A ModelSnippet is attached to a model, and is called after model starting and
+ * A ModelSnippet is attached to a model, and is called after model starting and
* when model is disposed.
*
*
* @author cedric dumoulin
- *
+ *
*/
public interface IModelSnippet {
/**
* Called right after the model is started.
- * @param startingModel The model that is starting
+ *
+ * @param startingModel
+ * The model that is starting
*/
public void start(IModel startingModel);
-
+
/**
- * Called just before the model is disposed or unloaded.
- * @param stoppingModel The model that is starting
+ * Called just before the model is disposed or unloaded.
+ *
+ * @param stoppingModel
+ * The model that is starting
*/
public void dispose(IModel stoppingModel);
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelException.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelException.java
index 4820b606b02..4180d8ee00d 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelException.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelException.java
@@ -3,12 +3,11 @@
*/
package org.eclipse.papyrus.resource;
-
/**
* Root exception for this package.
*
* @author cedric dumoulin
- *
+ *
*/
public class ModelException extends Exception {
@@ -19,14 +18,14 @@ public class ModelException extends Exception {
/**
* Constructor.
- *
+ *
*/
public ModelException() {
}
/**
* Constructor.
- *
+ *
* @param message
*/
public ModelException(String message) {
@@ -35,7 +34,7 @@ public class ModelException extends Exception {
/**
* Constructor.
- *
+ *
* @param cause
*/
public ModelException(Throwable cause) {
@@ -44,7 +43,7 @@ public class ModelException extends Exception {
/**
* Constructor.
- *
+ *
* @param message
* @param cause
*/
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelIdentifiers.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelIdentifiers.java
index 41c7bb32c5b..5670facbf0c 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelIdentifiers.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelIdentifiers.java
@@ -5,19 +5,17 @@ package org.eclipse.papyrus.resource;
import java.util.ArrayList;
-
/**
* A collection of Identifiers identifying Models.
*
* @author cedric dumoulin
- *
+ *
*/
public class ModelIdentifiers extends ArrayList<String> {
- public ModelIdentifiers(String ... modelIdentifiers) {
-
- for(String identifier : modelIdentifiers)
- {
+ public ModelIdentifiers(String... modelIdentifiers) {
+
+ for(String identifier : modelIdentifiers) {
add(identifier);
}
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelMultiException.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelMultiException.java
index d572f9dcaf5..1e4b0ca0ee5 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelMultiException.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelMultiException.java
@@ -6,15 +6,14 @@ package org.eclipse.papyrus.resource;
import java.util.ArrayList;
import java.util.List;
-
/**
- * An exception encapsulating multiple exceptions.
- * This exception is thrown when an operation performed on several Models fails
- * on one or more of these models.
- * The exception contains all the exceptions encoutered while opertating on models.
+ * An exception encapsulating multiple exceptions. This exception is thrown when
+ * an operation performed on several Models fails on one or more of these
+ * models. The exception contains all the exceptions encoutered while opertating
+ * on models.
*
* @author cedric dumoulin
- *
+ *
*/
public class ModelMultiException extends ModelException {
@@ -22,16 +21,17 @@ public class ModelMultiException extends ModelException {
*
*/
private static final long serialVersionUID = 1L;
+
/**
* List of encountered exceptions.
*/
List<Throwable> encounteredExceptions = new ArrayList<Throwable>();
+
/**
* List of identifiers corresponding to exceptions.
*/
List<Object> encounteredModels = new ArrayList<Object>();
-
-
+
/**
* @return the encounteredExceptions
*/
@@ -41,7 +41,7 @@ public class ModelMultiException extends ModelException {
/**
* Constructor.
- *
+ *
*/
public ModelMultiException() {
super("Multiple exceptions");
@@ -49,7 +49,7 @@ public class ModelMultiException extends ModelException {
/**
* Constructor.
- *
+ *
* @param message
*/
public ModelMultiException(String message) {
@@ -58,35 +58,37 @@ public class ModelMultiException extends ModelException {
/**
* Return the first exception.
+ *
* @see java.lang.Throwable#getCause()
- *
+ *
* @return
*/
@Override
public Throwable getCause() {
- return ( encounteredExceptions.size()>0 ? encounteredExceptions.get(0) : null );
+ return (encounteredExceptions.size() > 0 ? encounteredExceptions.get(0) : null);
}
-
+
/**
* Return the message if any, or the message of the first exception.
+ *
* @see java.lang.Throwable#getMessage()
- *
+ *
* @return
*/
@Override
public String getMessage() {
-
+
StringBuffer buffer = new StringBuffer();
-
+
String message = super.getMessage();
- if (message != null)
+ if(message != null)
buffer.append(message).append('\n');
-
+
buffer.append("----- exceptions : ----------\n");
- for( int i = 0; i< encounteredExceptions.size(); i++ ) {
+ for(int i = 0; i < encounteredExceptions.size(); i++) {
Throwable exception = encounteredExceptions.get(i);
Object identifierMsg = encounteredModels.get(i);
-
+
if(identifierMsg != null)
buffer.append(identifierMsg.toString()).append(" : ");
String msg = exception.getMessage();
@@ -94,35 +96,39 @@ public class ModelMultiException extends ModelException {
buffer.append(msg).append('\n');
}
buffer.append("----------------------------- \n");
-
+
return buffer.toString();
-// // Check for first exception
-// if( encounteredExceptions.size() > 1)
-// return encounteredExceptions.get(0).getMessage();
-//
-// // default
-// return null;
+ // // Check for first exception
+ // if( encounteredExceptions.size() > 1)
+ // return encounteredExceptions.get(0).getMessage();
+ //
+ // // default
+ // return null;
}
-
+
/**
* Add an exception to the list of exceptions.
+ *
* @param exception
*/
- public void addException( Throwable exception) {
+ public void addException(Throwable exception) {
addException("unknown", exception);
}
/**
- * Add an exception to the list of exceptions. Also record the corresponding model identifier if any.
+ * Add an exception to the list of exceptions. Also record the corresponding
+ * model identifier if any.
+ *
* @param exception
*/
public void addException(Object identifier, Throwable exception) {
- encounteredExceptions.add( exception );
+ encounteredExceptions.add(exception);
encounteredModels.add(identifier);
}
-
+
/**
* Return true if this MultiExceptions contains nested exceptions.
+ *
* @return
*/
public boolean isNotEmpty() {
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelSet.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelSet.java
index bee95676a2c..06508fc6476 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelSet.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelSet.java
@@ -35,8 +35,6 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
import org.eclipse.papyrus.resource.additional.AdditionalResourcesModel;
-
-
/**
* This class is used to manage a set of {@link IModel}.
*
@@ -65,8 +63,8 @@ public class ModelSet extends ResourceSetImpl {
/** The snippets. */
private ModelSetSnippetList snippets = new ModelSetSnippetList();
-
- private AdditionalResourcesModel additional = new AdditionalResourcesModel();
+
+ private AdditionalResourcesModel additional = new AdditionalResourcesModel();
/**
* The associated EditingDomain.
@@ -88,11 +86,10 @@ public class ModelSet extends ResourceSetImpl {
this.setURIResourceMap(new HashMap<URI, Resource>());
getLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, true);
}
-
/**
- * Register the specified model under its associated key.
- * The key is defined in the model itself. It is usually the model type from
+ * Register the specified model under its associated key. The key is defined
+ * in the model itself. It is usually the model type from
* (ModelPackage.eCONTENT_TYPE).
*
* @param model
@@ -104,8 +101,7 @@ public class ModelSet extends ResourceSetImpl {
}
/**
- * Get a model by its key.
- * TODO throw an exception if not found.
+ * Get a model by its key. TODO throw an exception if not found.
*
* @param key
* the key
@@ -116,8 +112,7 @@ public class ModelSet extends ResourceSetImpl {
}
/**
- * Get a model by its key.
- * TODO throw an exception if not found.
+ * Get a model by its key. TODO throw an exception if not found.
*
* @param key
* the key
@@ -132,19 +127,17 @@ public class ModelSet extends ResourceSetImpl {
return model;
}
-
+
@Override
public Resource getResource(URI uri, boolean loadOnDemand) {
Resource r = super.getResource(uri, loadOnDemand);
- if (r instanceof ResourceImpl)
- {
- ResourceImpl impl = (ResourceImpl) r ;
- if (impl.getIntrinsicIDToEObjectMap() == null)
- {
+ if(r instanceof ResourceImpl) {
+ ResourceImpl impl = (ResourceImpl)r;
+ if(impl.getIntrinsicIDToEObjectMap() == null) {
impl.setIntrinsicIDToEObjectMap(new HashMap<String, EObject>());
}
}
- return r ;
+ return r;
}
/**
@@ -153,11 +146,13 @@ public class ModelSet extends ResourceSetImpl {
* @return the transactional editing domain
*/
public TransactionalEditingDomain getTransactionalEditingDomain() {
- // transactionalEditingDomain = TransactionalEditingDomain.Factory.INSTANCE.getEditingDomain(this);
+ // transactionalEditingDomain =
+ // TransactionalEditingDomain.Factory.INSTANCE.getEditingDomain(this);
transactionalEditingDomain = WorkspaceEditingDomainFactory.INSTANCE.getEditingDomain(this);
if(transactionalEditingDomain == null) {
- // transactionalEditingDomain = TransactionalEditingDomain.Factory.INSTANCE.createEditingDomain(this);
+ // transactionalEditingDomain =
+ // TransactionalEditingDomain.Factory.INSTANCE.createEditingDomain(this);
transactionalEditingDomain = WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain(this);
// What for?
transactionalEditingDomain.setID("SharedEditingDomain"); //$NON-NLS-1$
@@ -165,7 +160,6 @@ public class ModelSet extends ResourceSetImpl {
return transactionalEditingDomain;
}
-
/**
* @return the filenameWithoutExtension
*/
@@ -184,7 +178,6 @@ public class ModelSet extends ResourceSetImpl {
return filenameWithoutExtension;
}
-
/**
* @param filenameWithoutExtension
* the filenameWithoutExtension to set
@@ -194,11 +187,12 @@ public class ModelSet extends ResourceSetImpl {
}
/**
- * Create all the associated models.
- * This creates the models, regardless if they already exist.
+ * Create all the associated models. This creates the models, regardless if
+ * they already exist.
*
* @param newFile
- * The file from which path is extracted to create the new resources
+ * The file from which path is extracted to create the new
+ * resources
*/
public void createsModels(IFile newFile) {
@@ -215,13 +209,14 @@ public class ModelSet extends ResourceSetImpl {
}
/**
- * Create the model specified by the identifiers. Other models are untouched, unless they are
- * sharing something with specified models.
+ * Create the model specified by the identifiers. Other models are
+ * untouched, unless they are sharing something with specified models.
*
* This creates the models, regardless if they already exist.
*
* @param newFile
- * The file from which path is extracted to create the new resources
+ * The file from which path is extracted to create the new
+ * resources
*/
public void createsModels(ModelIdentifiers modelIdentifiers) {
@@ -234,12 +229,12 @@ public class ModelSet extends ResourceSetImpl {
}
// call snippets to allow them to do their stuff
- // snippets.modelsAdded(modelIdentifiers);
+ // snippets.modelsAdded(modelIdentifiers);
}
/**
- * Load only the specified model. ModelSetSnippets are not called.
- * Model is loaded using the ModelSet Path.
+ * Load only the specified model. ModelSetSnippets are not called. Model is
+ * loaded using the ModelSet Path.
*
* @param modelIdentifier
* the model identifier
@@ -278,7 +273,8 @@ public class ModelSet extends ResourceSetImpl {
}
/**
- * Load all the associated models from a handle on one of the associated file.
+ * Load all the associated models from a handle on one of the associated
+ * file.
*
* @param file
* The file to load (no matter the extension)
@@ -292,7 +288,8 @@ public class ModelSet extends ResourceSetImpl {
// Walk all registered models
for(IModel model : models.values()) {
- // Try to load each model. Catch exceptions in order to load other models.
+ // Try to load each model. Catch exceptions in order to load other
+ // models.
try {
model.loadModel(filenameWithoutExtension);
} catch (Exception e) {
@@ -314,8 +311,9 @@ public class ModelSet extends ResourceSetImpl {
}
/**
- * Import specified models into the ModelSet. The models are imported using the specified IFile.
- * After import, the models are associated with the ModelSet Path.
+ * Import specified models into the ModelSet. The models are imported using
+ * the specified IFile. After import, the models are associated with the
+ * ModelSet Path.
*
* @param modelIdentifiers
* The model to import from the specified IFile.
@@ -339,9 +337,9 @@ public class ModelSet extends ResourceSetImpl {
}
/**
- * Import only the specified model. ModelSetSnippets are not called.
- * An import can be performed after model are loaded. Normally, it should not be done
- * before a model is loaded.
+ * Import only the specified model. ModelSetSnippets are not called. An
+ * import can be performed after model are loaded. Normally, it should not
+ * be done before a model is loaded.
*
* @param modelIdentifier
* the model identifier
@@ -373,7 +371,6 @@ public class ModelSet extends ResourceSetImpl {
}
-
/**
* Save the resources.
*
@@ -391,8 +388,7 @@ public class ModelSet extends ResourceSetImpl {
try {
// Walk all registered models
for(IModel model : modelList) {
- if (!(model instanceof AdditionalResourcesModel))
- {
+ if(!(model instanceof AdditionalResourcesModel)) {
model.saveModel();
monitor.worked(1);
}
@@ -404,7 +400,8 @@ public class ModelSet extends ResourceSetImpl {
}
/**
- * The resources are already loaded, but we want to save them under another name.
+ * The resources are already loaded, but we want to save them under another
+ * name.
*
* @param path
* the path
@@ -413,7 +410,6 @@ public class ModelSet extends ResourceSetImpl {
*/
public void saveAs(IPath path) throws IOException {
-
// Get the file name, without extension.
filenameWithoutExtension = path.removeFileExtension();
@@ -436,14 +432,13 @@ public class ModelSet extends ResourceSetImpl {
// Walk all registered models
for(IModel model : models.values()) {
- if (!(model instanceof AdditionalResourcesModel))
- {
+ if(!(model instanceof AdditionalResourcesModel)) {
model.unload();
}
}
additional.unload();
- // Unload remaining resources
+ // Unload remaining resources
for(Iterator<Resource> iter = getResources().iterator(); iter.hasNext();) {
iter.next().unload();
iter.remove();
@@ -451,8 +446,8 @@ public class ModelSet extends ResourceSetImpl {
}
/**
- * Add a {@link IModelSetSnippet}. A snippet allows to add code that will perform
- * additional operations on the ModelSet.
+ * Add a {@link IModelSetSnippet}. A snippet allows to add code that will
+ * perform additional operations on the ModelSet.
*
* @param snippet
* The snippet to add.
@@ -460,7 +455,7 @@ public class ModelSet extends ResourceSetImpl {
public void addModelSetSnippet(IModelSetSnippet snippet) {
snippets.add(snippet);
}
-
+
/**
* A list of {@link IModelSetSnippet}.
*
@@ -502,16 +497,17 @@ public class ModelSet extends ResourceSetImpl {
/**
* Check is a resource is additional in the resource set
- * @param uri the specified URI of the resource
+ *
+ * @param uri
+ * the specified URI of the resource
* @return true if it is an additional resource
*/
public boolean isAdditionalResource(URI uri) {
- if (uri != null) {
+ if(uri != null) {
String platformString = uri.trimFileExtension().toPlatformString(false);
- return ((platformString == null) || !getFilenameWithoutExtension().toString().equals(platformString.toString()));
+ return ((platformString == null) || !getFilenameWithoutExtension().toString().equals(platformString.toString()));
}
return false;
}
-
-
+
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelSnippetList.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelSnippetList.java
index 443f6ead352..794a11457c9 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelSnippetList.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelSnippetList.java
@@ -5,14 +5,13 @@ package org.eclipse.papyrus.resource;
import java.util.ArrayList;
-
/**
* A list of {@link IModelSnippet}.
*
* Used by Models to maintain their list of Snippets.
*
* @author cedric dumoulin
- *
+ *
*/
public class ModelSnippetList extends ArrayList<IModelSnippet> {
@@ -24,24 +23,25 @@ public class ModelSnippetList extends ArrayList<IModelSnippet> {
/**
* Call the start method on all registered snippets.
*
- * @param model The model that is starting
+ * @param model
+ * The model that is starting
*/
public void performStart(IModel model) {
- for( IModelSnippet snippet : this)
- {
+ for(IModelSnippet snippet : this) {
snippet.start(model);
}
}
-
+
/**
* Call the start method on all registered snippets.
- * @param model The model that is stopping
+ *
+ * @param model
+ * The model that is stopping
*/
public void performDispose(IModel model) {
- for( IModelSnippet snippet : this)
- {
+ for(IModelSnippet snippet : this) {
snippet.dispose(model);
}
-
+
}
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelUtils.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelUtils.java
index 47e279061d7..8d93a8e4a08 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelUtils.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelUtils.java
@@ -3,29 +3,28 @@
*/
package org.eclipse.papyrus.resource;
-
import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.services.ServicesRegistry;
import org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers;
-
/**
* Set of utility methods to get the current {@link ModelSet}.
+ *
* @author cedric dumoulin
- *
+ *
*/
public class ModelUtils {
-
/**
- * Gets the {@link ModelSet} for the currently selected editor.
- * <br>
- * Warning: This method is designed to be call from ui.handlers. It is not designed to
- * be call from Editors. This method can return null.
+ * Gets the {@link ModelSet} for the currently selected editor. <br>
+ * Warning: This method is designed to be call from ui.handlers. It is not
+ * designed to be call from Editors. This method can return null.
+ *
* @see ServiceUtilsForActionHandlers.getInstance().getModelSet()
- *
*
- * @return The {@link TraceModel} of the current editor, or null if not found.
+ *
+ * @return The {@link TraceModel} of the current editor, or null if not
+ * found.
* @deprecated Use ServiceUtilsForActionHandlers.getInstance().getModelSet()
*/
public static ModelSet getModelSet() {
@@ -36,30 +35,31 @@ public class ModelUtils {
return null;
}
}
-
+
/**
- * Gets the {@link ModelSet} for the currently selected editor.
- * <br>
- * Warning: This method is designed to be call from ui.handlers. It is not designed to
- * be call from Editors. This method can return null if called during the MultiEditor initialization.
+ * Gets the {@link ModelSet} for the currently selected editor. <br>
+ * Warning: This method is designed to be call from ui.handlers. It is not
+ * designed to be call from Editors. This method can return null if called
+ * during the MultiEditor initialization.
+ *
+ * @see ServiceUtilsForActionHandlers.getInstance().getModelSet() Warning:
*
- * @see ServiceUtilsForActionHandlers.getInstance().getModelSet()
- * Warning:
- *
*
* @return The {@link TraceModel} of the current editor.
- * @throws ServiceException If an error occurs while getting or starting the service.
- * @deprecated Use ServiceUtilsForActionHandlers.getInstance().getModelSet()
+ * @throws ServiceException
+ * If an error occurs while getting or starting the service.
+ * @deprecated Use ServiceUtilsForActionHandlers.getInstance().getModelSet()
*/
public static ModelSet getModelSetChecked() throws ServiceException {
- return ServiceUtilsForActionHandlers.getInstance().getModelSet();
+ return ServiceUtilsForActionHandlers.getInstance().getModelSet();
}
-
+
/**
* Gets the ModelSet from the {@link ServicesRegistry}.
*
- * @return ServicesRegistry The service registry under which the ModelSet is registered.
+ * @return ServicesRegistry The service registry under which the ModelSet is
+ * registered.
*/
public static ModelSet getModelSet(ServicesRegistry servicesRegistry) {
@@ -73,12 +73,13 @@ public class ModelUtils {
/**
* Gets the ModelSet from the {@link ServicesRegistry}.
*
- * @return ServicesRegistry The service registry under which the ModelSet is registered.
- * @throws ServiceException If the service can't be returned.
+ * @return ServicesRegistry The service registry under which the ModelSet is
+ * registered.
+ * @throws ServiceException
+ * If the service can't be returned.
*/
public static ModelSet getModelSetChecked(ServicesRegistry servicesRegistry) throws ServiceException {
- return servicesRegistry.getService(ModelSet.class);
+ return servicesRegistry.getService(ModelSet.class);
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelsReader.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelsReader.java
index 2e10b9f5a3b..719523df90b 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelsReader.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/ModelsReader.java
@@ -11,17 +11,19 @@ import org.eclipse.papyrus.core.Activator;
import org.eclipse.papyrus.core.extension.ExtensionException;
import org.eclipse.papyrus.core.extension.ExtensionUtils;
-
/**
- * A reader to read model from Eclipse extension
- * and register them to the specified ModelManager.
+ * A reader to read model from Eclipse extension and register them to the
+ * specified ModelManager.
*
* @author cedric dumoulin
*
*/
public class ModelsReader extends ExtensionUtils {
- /** Name of the extension (as declared in 'plugin.xml->extension point->xxx->ID') */
+ /**
+ * Name of the extension (as declared in 'plugin.xml->extension
+ * point->xxx->ID')
+ */
public static final String EXTENSION_POINT_NAME = "model";
/** Name for the element "model" */
@@ -52,8 +54,8 @@ public class ModelsReader extends ExtensionUtils {
}
/**
- * Create a ModelReader reading extension from the specified namespace. The namespace is
- * usually the name of the plugin owning the {@link ModelSet}.
+ * Create a ModelReader reading extension from the specified namespace. The
+ * namespace is usually the name of the plugin owning the {@link ModelSet}.
*
* @param extensionPointNamespace
*/
@@ -67,19 +69,19 @@ public class ModelsReader extends ExtensionUtils {
*
* @param modelSet
*/
- public void readModel( ModelSet modelSet) {
-
+ public void readModel(ModelSet modelSet) {
+
// Actually, we register model manually.
// TODO: read from Eclipse extension.
-// modelSet.registerModel( new SashModel() );
-// modelSet.registerModel( new NotationModel() );
-// // uml model
-// UmlModel umlModel = new ExtendedUmlModel();
-// umlModel.addModelSnippet(new UmlSnippet());
-// modelSet.registerModel(umlModel);
-// // global snippets
-// modelSet.addModelSetSnippet(new TypeCacheInitializer());
-
+ // modelSet.registerModel( new SashModel() );
+ // modelSet.registerModel( new NotationModel() );
+ // // uml model
+ // UmlModel umlModel = new ExtendedUmlModel();
+ // umlModel.addModelSnippet(new UmlSnippet());
+ // modelSet.registerModel(umlModel);
+ // // global snippets
+ // modelSet.addModelSetSnippet(new TypeCacheInitializer());
+
// Reading data from plugins
IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(extensionPointNamespace, EXTENSION_POINT_NAME);
addDeclaredModels(configElements, modelSet);
@@ -94,7 +96,7 @@ public class ModelsReader extends ExtensionUtils {
private void addDeclaredModels(IConfigurationElement[] configElements, ModelSet modelSet) {
for(IConfigurationElement ele : configElements) {
-
+
// Check if it is a Model
try {
if(MODEL_ELEMENT_NAME.equals(ele.getName())) {
@@ -112,11 +114,12 @@ public class ModelsReader extends ExtensionUtils {
/**
* Add ModelSet snippet
+ *
* @param modelSet
*/
private void addDeclaredModelSetSnippets(IConfigurationElement[] configElements, ModelSet modelSet) {
for(IConfigurationElement ele : configElements) {
-
+
// Check if it is a Model
try {
if(MODEL_SET_SNIPPET_ELEMENT_NAME.equals(ele.getName())) {
@@ -137,7 +140,7 @@ public class ModelsReader extends ExtensionUtils {
* @return
* @throws ExtensionException
*/
-
+
private IModel instanciateModel(IConfigurationElement ele) throws ExtensionException {
@SuppressWarnings("unchecked")
@@ -154,7 +157,7 @@ public class ModelsReader extends ExtensionUtils {
return model;
}
-
+
/**
* Instanciate model snippet declared in the configuration element.
*
@@ -178,7 +181,7 @@ public class ModelsReader extends ExtensionUtils {
return snippet;
}
-
+
/**
* Instanciate modelSet snippet declared in the configuration element.
*
@@ -202,7 +205,7 @@ public class ModelsReader extends ExtensionUtils {
return snippet;
}
-
+
/**
* Add associated snippets to the model.
*
@@ -210,22 +213,20 @@ public class ModelsReader extends ExtensionUtils {
* @param model
*/
private void addDeclaredModelSnippet(IConfigurationElement parentElement, IModel model) {
-
+
// Get children
IConfigurationElement[] configElements = parentElement.getChildren(MODEL_SNIPPET_ELEMENT_NAME);
for(IConfigurationElement ele : configElements) {
try {
- IModelSnippet snippet = instanciateModelSnippet(ele);
- model.addModelSnippet(snippet);
- log.debug("model snippet added: '" + model.getClass().getName() + "().add(" + snippet.getClass().getName() + ")'");
+ IModelSnippet snippet = instanciateModelSnippet(ele);
+ model.addModelSnippet(snippet);
+ log.debug("model snippet added: '" + model.getClass().getName() + "().add(" + snippet.getClass().getName() + ")'");
} catch (ExtensionException e) {
log.error("Problems occur while instanciating model snippet", e);
}
}
-
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/NotFoundException.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/NotFoundException.java
index 285e435c217..24033a65f18 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/NotFoundException.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/NotFoundException.java
@@ -3,12 +3,11 @@
*/
package org.eclipse.papyrus.resource;
-
/**
* Exception indicating that something is not found.
*
* @author cedric dumoulin
- *
+ *
*/
public class NotFoundException extends ModelException {
@@ -19,14 +18,14 @@ public class NotFoundException extends ModelException {
/**
* Constructor.
- *
+ *
*/
public NotFoundException() {
}
/**
* Constructor.
- *
+ *
* @param message
*/
public NotFoundException(String message) {
@@ -35,7 +34,7 @@ public class NotFoundException extends ModelException {
/**
* Constructor.
- *
+ *
* @param cause
*/
public NotFoundException(Throwable cause) {
@@ -44,7 +43,7 @@ public class NotFoundException extends ModelException {
/**
* Constructor.
- *
+ *
* @param message
* @param cause
*/
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/additional/AdditionalResourcesModel.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/additional/AdditionalResourcesModel.java
index 085ee0178d1..754cce1a079 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/additional/AdditionalResourcesModel.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/additional/AdditionalResourcesModel.java
@@ -54,7 +54,7 @@ public class AdditionalResourcesModel implements IModel {
* useless for additional resources
*/
public void createModel(IPath fullPath) {
- //do nothing
+ // do nothing
}
public void loadModel(IPath path) {
@@ -70,10 +70,9 @@ public class AdditionalResourcesModel implements IModel {
for(Resource r : modelSet.getResources()) {
if(modelSet.isAdditionalResource(r.getURI())) {
EditingDomain editingDomain = modelSet.getTransactionalEditingDomain();
- // only save referenced models, if modified, not empty, not read-only and either platform or file
- if(!r.getContents().isEmpty() && r.isModified() &&
- (editingDomain != null) && !editingDomain.isReadOnly(r) &&
- (r.getURI().isPlatform() || r.getURI().isFile())) {
+ // only save referenced models, if modified, not empty, not
+ // read-only and either platform or file
+ if(!r.getContents().isEmpty() && r.isModified() && (editingDomain != null) && !editingDomain.isReadOnly(r) && (r.getURI().isPlatform() || r.getURI().isFile())) {
r.save(Collections.EMPTY_MAP);
}
}
@@ -91,7 +90,7 @@ public class AdditionalResourcesModel implements IModel {
// call registered snippets
snippets.performDispose(this);
- // Unload remaining resources
+ // Unload remaining resources
for(Iterator<Resource> iter = modelSet.getResources().iterator(); iter.hasNext();) {
Resource next = iter.next();
if(modelSet.isAdditionalResource(next.getURI())) {
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/notation/NotationModel.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/notation/NotationModel.java
index 953b3a11b3a..cddc86f598d 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/notation/NotationModel.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/notation/NotationModel.java
@@ -9,10 +9,9 @@ import org.eclipse.papyrus.resource.AbstractBaseModel;
import org.eclipse.papyrus.resource.IModel;
import org.eclipse.papyrus.resource.ModelSet;
-
/**
* @author dumoulin
- *
+ *
*/
public class NotationModel extends AbstractBaseModel implements IModel {
@@ -22,20 +21,19 @@ public class NotationModel extends AbstractBaseModel implements IModel {
public static final String NOTATION_FILE_EXTENSION = "notation"; //$NON-NLS-1$
/**
- * Model ID.
+ * Model ID.
*/
public static final String MODEL_ID = "org.eclipse.papyrus.resource.notation.NotationModel"; //$NON-NLS-1$
-
/**
*
* Constructor.
- *
+ *
*/
public NotationModel() {
-
+
}
-
+
// Initialize stuff in the model.
@Override
public void init(ModelSet modelManager) {
@@ -45,10 +43,12 @@ public class NotationModel extends AbstractBaseModel implements IModel {
getResourceSet().getResourceFactoryRegistry().getExtensionToFactoryMap().put(NOTATION_FILE_EXTENSION, gmfFactory);
}
+
/**
* Get the file extension used for this model.
+ *
* @see org.eclipse.papyrus.resource.AbstractBaseModel#getModelFileExtension()
- *
+ *
* @return
*/
@Override
@@ -58,8 +58,9 @@ public class NotationModel extends AbstractBaseModel implements IModel {
/**
* Get the identifier used to register this model.
+ *
* @see org.eclipse.papyrus.resource.AbstractBaseModel#getIdentifier()
- *
+ *
* @return
*/
@Override
@@ -67,12 +68,13 @@ public class NotationModel extends AbstractBaseModel implements IModel {
return MODEL_ID;
}
-
/**
* Add a new initialized {@link Diagram} to the model.
- * @param newDiagram The diagram to add.
+ *
+ * @param newDiagram
+ * The diagram to add.
*/
- public void addDiagram( Diagram newDiagram) {
+ public void addDiagram(Diagram newDiagram) {
getResource().getContents().add(newDiagram);
}
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/notation/NotationUtils.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/notation/NotationUtils.java
index b8cb756286c..9cb46002479 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/notation/NotationUtils.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/notation/NotationUtils.java
@@ -25,11 +25,11 @@ import org.eclipse.papyrus.core.utils.ServiceUtilsForActionHandlers;
import org.eclipse.papyrus.resource.ModelSet;
/**
- * Utilities method to manage notation models. Should be moved in a more suitable plugin
+ * Utilities method to manage notation models. Should be moved in a more
+ * suitable plugin
*/
public class NotationUtils {
-
/**
* Get the notation Resource.
*
@@ -43,12 +43,14 @@ public class NotationUtils {
/**
* Gets the NotationModel for the currently selected editor. <br>
- * Warning: This method is designed to be call from ui.handlers. It is not designed to
- * be call from Editors. This method can return null if called during the MultiEditor initialization.
+ * Warning: This method is designed to be call from ui.handlers. It is not
+ * designed to be call from Editors. This method can return null if called
+ * during the MultiEditor initialization.
*
* @see ServiceUtilsForActionHandlers.getInstance().getModelSet()
*
- * @return The {@link NotationModel} of the current editor, or null if not found.
+ * @return The {@link NotationModel} of the current editor, or null if not
+ * found.
*/
public static NotationModel getNotationModel() {
@@ -61,12 +63,14 @@ public class NotationUtils {
/**
* Gets the NotationModel for the currently selected editor. <br>
- * Warning: This method is designed to be call from ui.handlers. It is not designed to
- * be call from Editors. This method can return null if called during the MultiEditor initialization.
+ * Warning: This method is designed to be call from ui.handlers. It is not
+ * designed to be call from Editors. This method can return null if called
+ * during the MultiEditor initialization.
*
* @see ServiceUtilsForActionHandlers.getInstance().getModelSet()
*
- * @return The {@link NotationModel} of the current editor, or null if not found.
+ * @return The {@link NotationModel} of the current editor, or null if not
+ * found.
* @throws ServiceException
* If an error occurs while getting or starting the service.
*/
@@ -76,12 +80,13 @@ public class NotationUtils {
}
/**
- * Gets the NotationModel from the {@link ModelSet}.
- * <br>
+ * Gets the NotationModel from the {@link ModelSet}. <br>
*
- * @param modelsManager The modelManager containing the requested model.
+ * @param modelsManager
+ * The modelManager containing the requested model.
*
- * @return The {@link NotationModel} registered in modelManager, or null if not found.
+ * @return The {@link NotationModel} registered in modelManager, or null if
+ * not found.
*/
public static NotationModel getNotationModel(ModelSet modelsManager) {
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/DiModel.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/DiModel.java
index 9b08906314c..4ddd5c73837 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/DiModel.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/DiModel.java
@@ -6,10 +6,9 @@ package org.eclipse.papyrus.resource.sasheditor;
import org.eclipse.papyrus.resource.AbstractBaseModel;
import org.eclipse.papyrus.resource.IModel;
-
/**
* @author dumoulin
- *
+ *
*/
public class DiModel extends AbstractBaseModel implements IModel {
@@ -24,14 +23,15 @@ public class DiModel extends AbstractBaseModel implements IModel {
public static final String DI_FILE_EXTENSION = MODEL_FILE_EXTENSION;
/**
- * Model ID.
+ * Model ID.
*/
public static final String MODEL_ID = "org.eclipse.papyrus.resource.sasheditor.SashModel"; //$NON-NLS-1$
/**
* Get the file extension used for this model.
+ *
* @see org.eclipse.papyrus.resource.AbstractBaseModel#getModelFileExtension()
- *
+ *
* @return
*/
@Override
@@ -41,8 +41,9 @@ public class DiModel extends AbstractBaseModel implements IModel {
/**
* Get the identifier used to register this model.
+ *
* @see org.eclipse.papyrus.resource.AbstractBaseModel#getIdentifier()
- *
+ *
* @return
*/
@Override
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/DiModelUtils.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/DiModelUtils.java
index 35f0489f0d5..dd20a104e14 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/DiModelUtils.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/DiModelUtils.java
@@ -6,18 +6,18 @@ package org.eclipse.papyrus.resource.sasheditor;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
-
/**
* Set of utility methods linked to Di resource.
+ *
* @author cedric dumoulin
- *
+ *
*/
public class DiModelUtils {
-
/**
- * Returns the related di file.
- * Warning : this method is here for historical reasons. It should be removed asap.
+ * Returns the related di file. Warning : this method is here for historical
+ * reasons. It should be removed asap.
+ *
* @param file
* A file (di, model or notation).
* @return The associated DI file.
@@ -38,5 +38,4 @@ public class DiModelUtils {
return diFile;
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/SashModel.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/SashModel.java
index a41ff0db6d4..b828ed37f61 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/SashModel.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/SashModel.java
@@ -8,17 +8,15 @@ import org.eclipse.papyrus.resource.AbstractModelWithSharedResource;
import org.eclipse.papyrus.resource.AbstractModelWithSharedResource.ModelKind;
import org.eclipse.papyrus.resource.IModel;
-
/**
- * Model for the sash system.
- * <br>
- * This model can share its resource with other model. This model is declared as {@link ModelKind#master}.
- * Other model whishing to share the resource should subclass {@link AbstractModelWithSharedResource},
- * be declared as {@link ModelKind#slave} (which is the default.), and set {@link #getModelFileExtension()}
- * to return the same file extension as this model ({@link #MODEL_FILE_EXTENSION}).
+ * Model for the sash system. <br>
+ * This model can share its resource with other model. This model is declared as {@link ModelKind#master}. Other model whishing to share the resource
+ * should
+ * subclass {@link AbstractModelWithSharedResource}, be declared as {@link ModelKind#slave} (which is the default.), and set {@link #getModelFileExtension()} to return the same file extension as this
+ * model ({@link #MODEL_FILE_EXTENSION}).
*
* @author cedric dumoulin
- *
+ *
*/
public class SashModel extends AbstractModelWithSharedResource<org.eclipse.papyrus.sashwindows.di.SashModel> implements IModel {
@@ -27,26 +25,25 @@ public class SashModel extends AbstractModelWithSharedResource<org.eclipse.papyr
*/
public static final String MODEL_FILE_EXTENSION = "di"; //$NON-NLS-1$
-
/**
- * Model ID.
+ * Model ID.
*/
public static final String MODEL_ID = "org.eclipse.papyrus.resource.sasheditor.SashModel"; //$NON-NLS-1$
-
/**
*
* Constructor.
- *
+ *
*/
public SashModel() {
super(ModelKind.master);
}
-
+
/**
* Get the file extension used for this model.
+ *
* @see org.eclipse.papyrus.resource.AbstractBaseModel#getModelFileExtension()
- *
+ *
* @return
*/
@Override
@@ -56,8 +53,9 @@ public class SashModel extends AbstractModelWithSharedResource<org.eclipse.papyr
/**
* Get the identifier used to register this model.
+ *
* @see org.eclipse.papyrus.resource.AbstractBaseModel#getIdentifier()
- *
+ *
* @return
*/
@Override
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/SashModelUtils.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/SashModelUtils.java
index 359d5d9e2a2..77961f82751 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/SashModelUtils.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/sasheditor/SashModelUtils.java
@@ -11,7 +11,6 @@ import org.eclipse.papyrus.resource.ModelSet;
import org.eclipse.papyrus.resource.ModelUtils;
import org.eclipse.papyrus.resource.uml.UmlUtils;
-
/**
* Set of utility methods linked to Trace for ControlMode
*
@@ -20,15 +19,16 @@ import org.eclipse.papyrus.resource.uml.UmlUtils;
*/
public class SashModelUtils {
-
/**
* Gets the SashModel for the currently selected editor. <br>
- * Warning: This method is designed to be call from ui.handlers. It is not designed to
- * be call from Editors. This method can return null if called during the MultiEditor initialization.
+ * Warning: This method is designed to be call from ui.handlers. It is not
+ * designed to be call from Editors. This method can return null if called
+ * during the MultiEditor initialization.
*
* @see ServiceUtilsForActionHandlers.getInstance().getModelSet()
*
- * @return The {@link SashModel} of the current editor, or null if not found.
+ * @return The {@link SashModel} of the current editor, or null if not
+ * found.
*/
public static SashModel getSashModel() {
@@ -41,12 +41,14 @@ public class SashModelUtils {
/**
* Gets the SashModel for the currently selected editor. <br>
- * Warning: This method is designed to be call from ui.handlers. It is not designed to
- * be call from Editors. This method can return null if called during the MultiEditor initialization.
+ * Warning: This method is designed to be call from ui.handlers. It is not
+ * designed to be call from Editors. This method can return null if called
+ * during the MultiEditor initialization.
*
* @see ServiceUtilsForActionHandlers.getInstance().getModelSet()
*
- * @return The {@link SashModel} of the current editor, or null if not found.
+ * @return The {@link SashModel} of the current editor, or null if not
+ * found.
* @throws ServiceException
* If an error occurs while getting or starting the service.
*/
@@ -61,7 +63,8 @@ public class SashModelUtils {
* @param modelsManager
* The modelManager containing the requested model.
*
- * @return The {@link SashModel} registered in modelManager, or null if not found.
+ * @return The {@link SashModel} registered in modelManager, or null if not
+ * found.
*/
public static SashModel getSashModel(ModelSet modelsManager) {
@@ -74,7 +77,8 @@ public class SashModelUtils {
* @param ServicesRegistry
* The servie registry under which the ModelSet is registered.
*
- * @return The {@link SashModel} registered in modelManager, or null if not found.
+ * @return The {@link SashModel} registered in modelManager, or null if not
+ * found.
*/
public static SashModel getSashModel(ServicesRegistry servicesRegistry) {
@@ -91,7 +95,8 @@ public class SashModelUtils {
* @param ServicesRegistry
* The servie registry under which the ModelSet is registered.
*
- * @return The {@link SashModel} registered in modelManager, or null if not found.
+ * @return The {@link SashModel} registered in modelManager, or null if not
+ * found.
* @throws ServiceException
* If the service can't be returned.
*/
@@ -104,8 +109,7 @@ public class SashModelUtils {
* Retrieve the uri of the initial di opened
*
* @param modelSet
- * @return
- * FIXME improve how to get the initial model opened
+ * @return FIXME improve how to get the initial model opened
*/
public static URI getInitialURI(ModelSet modelSet) {
return UmlUtils.getUmlModel(modelSet).getResourceURI().trimFileExtension().appendFileExtension(SashModel.MODEL_FILE_EXTENSION);
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/ExtendedUmlModel.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/ExtendedUmlModel.java
index 77d09ef4606..f9fd72bdac2 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/ExtendedUmlModel.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/ExtendedUmlModel.java
@@ -10,26 +10,25 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.emf.ecore.resource.Resource;
-
/**
* A UML model whose resource is either a uml file or a profile(?).
*
* @author cedric dumoulin
- *
+ *
*/
public class ExtendedUmlModel extends UmlModel {
-
/**
- * Load the first resource with a supported extension
- * TODO: (question from Cedric) fix what is a supported extension ?
+ * Load the first resource with a supported extension TODO: (question from
+ * Cedric) fix what is a supported extension ?
+ *
* @see org.eclipse.papyrus.resource.AbstractBaseModel#loadModel(org.eclipse.core.runtime.IPath)
- *
+ *
* @param fullPath
*/
@Override
public void loadModel(IFile file) {
-
+
// Extract file name, without extension
IPath fullPath = file.getFullPath().removeFileExtension();
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/UmlModel.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/UmlModel.java
index d42c2c6f341..a6767c83df0 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/UmlModel.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/UmlModel.java
@@ -9,11 +9,11 @@ import org.eclipse.papyrus.resource.AbstractBaseModel;
import org.eclipse.papyrus.resource.IModel;
import org.eclipse.papyrus.resource.NotFoundException;
-
/**
- * A UML model.
+ * A UML model.
+ *
* @author cedric dumoulin
- *
+ *
*/
public class UmlModel extends AbstractBaseModel implements IModel {
@@ -29,11 +29,11 @@ public class UmlModel extends AbstractBaseModel implements IModel {
/**
* @see org.eclipse.papyrus.resource.IModel#createModel(org.eclipse.core.runtime.IPath)
- *
+ *
* @param fullPath
*/
public void createModel(IPath fullPath) {
-
+
// Compute model URI
resourceURI = getPlatformURI(fullPath.addFileExtension(UML_FILE_EXTENSION));
@@ -50,11 +50,12 @@ public class UmlModel extends AbstractBaseModel implements IModel {
// return UMLPackage.eCONTENT_TYPE;
return "org.eclipse.uml2.uml";
}
-
+
/**
* Get the file extension used for this model.
+ *
* @see org.eclipse.papyrus.resource.AbstractBaseModel#getModelFileExtension()
- *
+ *
* @return
*/
@Override
@@ -64,8 +65,9 @@ public class UmlModel extends AbstractBaseModel implements IModel {
/**
* Get the identifier used to register this model.
+ *
* @see org.eclipse.papyrus.resource.AbstractBaseModel#getIdentifier()
- *
+ *
* @return
*/
@Override
@@ -75,6 +77,7 @@ public class UmlModel extends AbstractBaseModel implements IModel {
/**
* Lookup the root of the model. Throw an exception if not found.
+ *
* @return
*/
public EObject lookupRoot() throws NotFoundException {
@@ -87,5 +90,4 @@ public class UmlModel extends AbstractBaseModel implements IModel {
}
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/UmlSnippet.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/UmlSnippet.java
index 9bb33b19f3d..0eec8a19d9c 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/UmlSnippet.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/UmlSnippet.java
@@ -7,7 +7,6 @@ import org.eclipse.papyrus.core.listenerservice.ModelListenerManager;
import org.eclipse.papyrus.resource.IModel;
import org.eclipse.papyrus.resource.IModelSnippet;
-
/**
* A snippet registering adapters to the UML model.
*
@@ -27,7 +26,6 @@ public class UmlSnippet implements IModelSnippet {
*/
public void start(IModel startingModel) {
-
// Modl should be an uml one
UmlModel umlModel = (UmlModel)startingModel;
// add adapters
diff --git a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/UmlUtils.java b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/UmlUtils.java
index 73b719b3b0a..d8a18560300 100644
--- a/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/UmlUtils.java
+++ b/plugins/core/org.eclipse.papyrus.core/src/org/eclipse/papyrus/resource/uml/UmlUtils.java
@@ -12,23 +12,22 @@ import org.eclipse.papyrus.resource.ModelUtils;
import org.eclipse.papyrus.resource.ModelSet;
import org.eclipse.papyrus.resource.sasheditor.SashModel;
-
/**
* Set of utility methods linked to Trace for ControlMode
+ *
* @author cedric dumoulin
- *
+ *
*/
public class UmlUtils {
-
/**
- * Gets the UmlModel for the currently selected editor.
- * <br>
- * Warning: This method is designed to be call from ui.handlers. It is not designed to
- * be call from Editors. This method can return null if called during the MultiEditor initialization.
+ * Gets the UmlModel for the currently selected editor. <br>
+ * Warning: This method is designed to be call from ui.handlers. It is not
+ * designed to be call from Editors. This method can return null if called
+ * during the MultiEditor initialization.
*
* @see ServiceUtilsForActionHandlers.getInstance().getModelSet()
- *
+ *
*
* @return The {@link UmlModel} of the current editor, or null if not found.
*/
@@ -40,28 +39,30 @@ public class UmlUtils {
return null;
}
}
-
+
/**
- * Gets the UmlModel for the currently selected editor.
- * <br>
- * Warning: this method can return null if called during the MultiEditor initialization.
- *
+ * Gets the UmlModel for the currently selected editor. <br>
+ * Warning: this method can return null if called during the MultiEditor
+ * initialization.
+ *
*
* @return The {@link UmlModel} of the current editor, or null if not found.
- * @throws ServiceException If an error occurs while getting or starting the service.
+ * @throws ServiceException
+ * If an error occurs while getting or starting the service.
*/
public static UmlModel getUmlModelChecked() throws ServiceException {
return (UmlModel)ServiceUtilsForActionHandlers.getInstance().getModelSet().getModel(UmlModel.MODEL_ID);
}
-
+
/**
- * Gets the UmlModel from the {@link ModelSet}.
- * <br>
+ * Gets the UmlModel from the {@link ModelSet}. <br>
*
- * @param modelSet The modelManager containing the requested model.
+ * @param modelSet
+ * The modelManager containing the requested model.
*
- * @return The {@link SashModel} registered in modelManager, or null if not found.
+ * @return The {@link SashModel} registered in modelManager, or null if not
+ * found.
*/
public static UmlModel getUmlModel(ModelSet modelSet) {
@@ -71,7 +72,8 @@ public class UmlUtils {
/**
* Gets the UmlModel from the {@link ServiceRegistry}.
*
- * @return ServicesRegistry The service registry under which the ModelSet is registered.
+ * @return ServicesRegistry The service registry under which the ModelSet is
+ * registered.
*/
public static UmlModel getUmlModel(ServicesRegistry servicesRegistry) {
@@ -85,12 +87,13 @@ public class UmlUtils {
/**
* Gets the UmlModel from the {@link ServiceRegistry}.
*
- * @return ServicesRegistry The service registry under which the ModelSet is registered.
- * @throws ServiceException If the service can't be returned.
+ * @return ServicesRegistry The service registry under which the ModelSet is
+ * registered.
+ * @throws ServiceException
+ * If the service can't be returned.
*/
public static UmlModel getUmlModelChecked(ServicesRegistry servicesRegistry) throws ServiceException {
- return (UmlModel)ModelUtils.getModelSetChecked(servicesRegistry).getModel(UmlModel.MODEL_ID);
+ return (UmlModel)ModelUtils.getModelSetChecked(servicesRegistry).getModel(UmlModel.MODEL_ID);
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.navigation/META-INF/MANIFEST.MF b/plugins/core/org.eclipse.papyrus.navigation/META-INF/MANIFEST.MF
index c6cf78529ab..13787829129 100644
--- a/plugins/core/org.eclipse.papyrus.navigation/META-INF/MANIFEST.MF
+++ b/plugins/core/org.eclipse.papyrus.navigation/META-INF/MANIFEST.MF
@@ -1,17 +1,23 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.papyrus.navigation;singleton:=true
-Bundle-Version: 0.9.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.papyrus.core;bundle-version="0.8.0";visibility:=reexport,
- org.eclipse.papyrus.preferences;bundle-version="0.8.0",
- org.eclipse.papyrus.core.adaptor.gmf;bundle-version="0.8.0",
- org.eclipse.papyrus.ui.toolbox;bundle-version="0.8.0"
-Export-Package: org.eclipse.papyrus.navigation,
- org.eclipse.papyrus.navigation.decorator,
- org.eclipse.papyrus.navigation.preference
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.papyrus.navigation.Activator
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.navigation;singleton:=true
+Bundle-Version: 0.8.1.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.papyrus.core;bundle-version="0.8.0";visibility:=reexport,
+ org.eclipse.papyrus.commands,
+ org.eclipse.papyrus.preferences;bundle-version="0.8.0",
+ org.eclipse.papyrus.core.adaptor.gmf;bundle-version="0.8.0",
+ org.eclipse.papyrus.ui.toolbox;bundle-version="0.8.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.papyrus.modelexplorer;bundle-version="0.8.1",
+ org.eclipse.ui.navigator;bundle-version="3.5.100",
+ org.eclipse.emf.facet.infra.browser.uicore;bundle-version="0.1.0",
+ org.eclipse.papyrus.ui.perspectiveconfiguration
+Export-Package: org.eclipse.papyrus.navigation,
+ org.eclipse.papyrus.navigation.decorator,
+ org.eclipse.papyrus.navigation.preference
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-ActivationPolicy: lazy
+Bundle-Activator: org.eclipse.papyrus.navigation.Activator
diff --git a/plugins/core/org.eclipse.papyrus.navigation/icons/BACK.png b/plugins/core/org.eclipse.papyrus.navigation/icons/BACK.png
new file mode 100644
index 00000000000..659cd90d7f8
--- /dev/null
+++ b/plugins/core/org.eclipse.papyrus.navigation/icons/BACK.png
Binary files differ
diff --git a/plugins/core/org.eclipse.papyrus.navigation/icons/NEXT.png b/plugins/core/org.eclipse.papyrus.navigation/icons/NEXT.png
new file mode 100644
index 00000000000..6ef8de76e0f
--- /dev/null
+++ b/plugins/core/org.eclipse.papyrus.navigation/icons/NEXT.png
Binary files differ
diff --git a/plugins/core/org.eclipse.papyrus.navigation/icons/TOP.png b/plugins/core/org.eclipse.papyrus.navigation/icons/TOP.png
new file mode 100644
index 00000000000..70f2c996cd7
--- /dev/null
+++ b/plugins/core/org.eclipse.papyrus.navigation/icons/TOP.png
Binary files differ
diff --git a/plugins/core/org.eclipse.papyrus.navigation/icons/UP.png b/plugins/core/org.eclipse.papyrus.navigation/icons/UP.png
new file mode 100644
index 00000000000..fa9a7d71b56
--- /dev/null
+++ b/plugins/core/org.eclipse.papyrus.navigation/icons/UP.png
Binary files differ
diff --git a/plugins/core/org.eclipse.papyrus.navigation/plugin.xml b/plugins/core/org.eclipse.papyrus.navigation/plugin.xml
index 21227caf819..75f4a22b0ed 100644
--- a/plugins/core/org.eclipse.papyrus.navigation/plugin.xml
+++ b/plugins/core/org.eclipse.papyrus.navigation/plugin.xml
@@ -29,5 +29,216 @@
</decoratorProvider>
</extension>
-
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ name="Navigation Command"
+ id="org.eclipse.papyrus.navigation.commands.category">
+ </category>
+ <command
+ name="Back Navigation Command"
+ categoryId="org.eclipse.papyrus.navigation.commands.category"
+ id="org.eclipse.papyrus.navigation.commands.backNavigationCommand">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.navigation.commands.category"
+ id="org.eclipse.papyrus.navigation.commands.upNavigationCommand"
+ name="Up Navigation Command">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.navigation.commands.category"
+ id="org.eclipse.papyrus.navigation.commands.topNavigationCommand"
+ name="Top Navigation Command">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.navigation.commands.category"
+ id="org.eclipse.papyrus.navigation.commands.nextNavigationCommand"
+ name="Next Navigation Command">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ commandId="org.eclipse.papyrus.navigation.commands.backNavigationCommand"
+ class="org.eclipse.papyrus.navigation.handlers.BackNavigateHandler">
+ <enabledWhen>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.navigation.isBackCommandPossible">
+ </test>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.navigation.handlers.NextNavigateHandler"
+ commandId="org.eclipse.papyrus.navigation.commands.nextNavigationCommand">
+ <enabledWhen>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.navigation.isNextCommandPossible">
+ </test>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.navigation.handlers.UpNavigateHandler"
+ commandId="org.eclipse.papyrus.navigation.commands.upNavigationCommand">
+ <enabledWhen>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.navigation.isUpCommandPossible">
+ </test>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.navigation.handlers.TopNavigateHandler"
+ commandId="org.eclipse.papyrus.navigation.commands.topNavigationCommand">
+ <enabledWhen>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.navigation.isTopCommandPossible">
+ </test>
+ </with>
+ </enabledWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
+ <toolbar
+ id="org.eclipse.papyrus.navigation.toolbars.navigationToolbar"
+ label="Navigation Papyrus Diagram">
+ <command
+ commandId="org.eclipse.papyrus.navigation.commands.backNavigationCommand"
+ icon="icons/BACK.png"
+ id="org.eclipse.papyrus.navigation.toolbars.BackCommand"
+ style="push"
+ tooltip="BACK">
+ <visibleWhen>
+ <or>
+ <reference
+ definitionId="org.eclipse.papyrus.diagram.common.IsPapyrusActiveWithUMLModel">
+ </reference>
+ <reference
+ definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML">
+ </reference>
+ </or>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.navigation.commands.nextNavigationCommand"
+ icon="icons/NEXT.png"
+ id="org.eclipse.papyrus.navigation.toolbars.NextCommand"
+ style="push"
+ tooltip="NEXT">
+ <visibleWhen>
+ <or>
+ <reference
+ definitionId="org.eclipse.papyrus.diagram.common.IsPapyrusActiveWithUMLModel">
+ </reference>
+ <reference
+ definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML">
+ </reference>
+ </or>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.navigation.commands.upNavigationCommand"
+ icon="icons/UP.png"
+ id="org.eclipse.papyrus.navigation.toolbars.UpCommand"
+ style="push"
+ tooltip="UP">
+ <visibleWhen>
+ <or>
+ <reference
+ definitionId="org.eclipse.papyrus.diagram.common.IsPapyrusActiveWithUMLModel">
+ </reference>
+ <reference
+ definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML">
+ </reference>
+ </or>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.navigation.commands.topNavigationCommand"
+ icon="icons/TOP.png"
+ id="org.eclipse.papyrus.navigation.toolbars.TopCommand"
+ style="push"
+ tooltip="TOP">
+ <visibleWhen>
+ <or>
+ <reference
+ definitionId="org.eclipse.papyrus.diagram.common.IsPapyrusActiveWithUMLModel">
+ </reference>
+ <reference
+ definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML">
+ </reference>
+ </or>
+ </visibleWhen>
+ </command>
+ </toolbar>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.papyrus.navigation.utils.PropertyTester"
+ id="org.eclipse.papyrus.navigation.PropertyTester"
+ namespace="org.eclipse.papyrus.navigation"
+ properties="isNextCommandPossible"
+ type="org.eclipse.jface.viewers.ISelection">
+ </propertyTester>
+ <propertyTester
+ class="org.eclipse.papyrus.navigation.utils.PropertyTester"
+ id="org.eclipse.papyrus.navigation.PropertyTester"
+ namespace="org.eclipse.papyrus.navigation"
+ properties="isBackCommandPossible"
+ type="org.eclipse.jface.viewers.ISelection">
+ </propertyTester>
+ <propertyTester
+ class="org.eclipse.papyrus.navigation.utils.PropertyTester"
+ id="org.eclipse.papyrus.navigation.PropertyTester"
+ namespace="org.eclipse.papyrus.navigation"
+ properties="isUpCommandPossible"
+ type="org.eclipse.jface.viewers.ISelection">
+ </propertyTester>
+ <propertyTester
+ class="org.eclipse.papyrus.navigation.utils.PropertyTester"
+ id="org.eclipse.papyrus.navigation.PropertyTester"
+ namespace="org.eclipse.papyrus.navigation"
+ properties="isTopCommandPossible"
+ type="org.eclipse.jface.viewers.ISelection">
+ </propertyTester>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.ui.perspectiveconfiguration">
+ <configuration
+ perspectiveID="org.eclipse.papyrus.core.perspective">
+ <toolbar
+ toolbarID="org.eclipse.papyrus.navigation.toolbars.navigationToolbar">
+ </toolbar>
+ <command
+ commandID="org.eclipse.papyrus.navigation.commands.backNavigationCommand">
+ </command>
+ <command
+ commandID="org.eclipse.papyrus.navigation.commands.nextNavigationCommand">
+ </command>
+ <command
+ commandID="org.eclipse.papyrus.navigation.commands.topNavigationCommand">
+ </command>
+ <command
+ commandID="org.eclipse.papyrus.navigation.commands.upNavigationCommand">
+ </command>
+ </configuration>
+ </extension>
</plugin>
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/Activator.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/Activator.java
index 709769ac16a..08a476750a8 100644
--- a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/Activator.java
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/Activator.java
@@ -13,11 +13,12 @@
package org.eclipse.papyrus.navigation;
import org.eclipse.papyrus.navigation.preference.NavigationPreferenceInitializer;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
-
-
public class Activator extends AbstractUIPlugin {
// The plug-in ID
@@ -35,7 +36,8 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
*
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ * @see
+ * org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
@@ -47,7 +49,8 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
*
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ * @see
+ * org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
@@ -63,5 +66,33 @@ public class Activator extends AbstractUIPlugin {
return plugin;
}
+ /**
+ * Returns the active workbench shell
+ *
+ * @return the active workbench shell
+ */
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow workBenchWindow = getActiveWorkbenchWindow();
+ if(workBenchWindow == null) {
+ return null;
+ }
+ return workBenchWindow.getShell();
+ }
+
+ /**
+ * Returns the active workbench window
+ *
+ * @return the active workbench window
+ */
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ if(getDefault() == null) {
+ return null;
+ }
+ IWorkbench workBench = getDefault().getWorkbench();
+ if(workBench == null) {
+ return null;
+ }
+ return workBench.getActiveWorkbenchWindow();
+ }
}
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/CreateDiagramWithNavigationHandler.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/CreateDiagramWithNavigationHandler.java
index 802b2f40be9..4843b43c427 100644
--- a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/CreateDiagramWithNavigationHandler.java
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/CreateDiagramWithNavigationHandler.java
@@ -37,10 +37,10 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
/**
- * This command handler will try to create a diagram on the currently selected element,
- * using navigation if necessary.
- * The action is always available and the check is done in the run
- * to avoid heavy navigation computation on each selection change.
+ * This command handler will try to create a diagram on the currently selected
+ * element, using navigation if necessary. The action is always available and
+ * the check is done in the run to avoid heavy navigation computation on each
+ * selection change.
*
* @author mvelten
*
@@ -65,8 +65,8 @@ public abstract class CreateDiagramWithNavigationHandler extends AbstractHandler
public Object execute(ExecutionEvent event) throws ExecutionException {
NavigableElement navElement = getNavigableElementWhereToCreateDiagram();
- if (navElement == null) {
- InformationDialog dialog = new InformationDialog(Display.getCurrent().getActiveShell(), "Impossible diagram creation", "It is not possible to create this diagram on the selected element.", null, null, SWT.OK, MessageDialog.WARNING, new String[] { IDialogConstants.OK_LABEL });
+ if(navElement == null) {
+ InformationDialog dialog = new InformationDialog(Display.getCurrent().getActiveShell(), "Impossible diagram creation", "It is not possible to create this diagram on the selected element.", null, null, SWT.OK, MessageDialog.WARNING, new String[]{ IDialogConstants.OK_LABEL });
dialog.open();
} else {
createDiagram(navElement);
@@ -87,7 +87,8 @@ public abstract class CreateDiagramWithNavigationHandler extends AbstractHandler
Collections.sort(navElements);
for(NavigableElement navElement : navElements) {
- // ignore existing elements because we want a hierarchy to be created if it is not on the current element
+ // ignore existing elements because we want a hierarchy to
+ // be created if it is not on the current element
if(navElement instanceof CreatedNavigableElement && creationCondition.create(navElement.getElement())) {
return navElement;
}
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/CreatedNavigableElement.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/CreatedNavigableElement.java
index 0c7ad6373f6..907f0436f25 100644
--- a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/CreatedNavigableElement.java
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/CreatedNavigableElement.java
@@ -18,9 +18,9 @@ import org.eclipse.emf.ecore.EStructuralFeature;
/**
* This class represents an element that have been created by the navigation.
- * This element is not currently linked to the model, but it can be
- * by using linkToModel if the user decides to navigate to it,
- * to create a diagram on it for example.
+ * This element is not currently linked to the model, but it can be by using
+ * linkToModel if the user decides to navigate to it, to create a diagram on it
+ * for example.
*
* @author mvelten
*
@@ -34,8 +34,8 @@ public class CreatedNavigableElement extends NavigableElement {
private IBaseNameSetter baseNameSetter = null;
/**
- * This constructor initiates a navigable element from a newly created element.
- * This element is not directly linked to its container.
+ * This constructor initiates a navigable element from a newly created
+ * element. This element is not directly linked to its container.
* linkToModel() needs to be defined and call when you want to link it.
*
* @param element
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/ExistingNavigableElement.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/ExistingNavigableElement.java
index 8fee9ecf790..729569f9947 100644
--- a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/ExistingNavigableElement.java
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/ExistingNavigableElement.java
@@ -25,7 +25,8 @@ import org.eclipse.emf.ecore.EStructuralFeature;
public class ExistingNavigableElement extends NavigableElement {
/**
- * This constructor initiates a navigable element from an existing model element.
+ * This constructor initiates a navigable element from an existing model
+ * element.
*
* @param element
*/
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/IBaseNameSetter.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/IBaseNameSetter.java
index 0fc0a136eea..6b03450c0b5 100644
--- a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/IBaseNameSetter.java
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/IBaseNameSetter.java
@@ -16,9 +16,9 @@ package org.eclipse.papyrus.navigation;
import org.eclipse.emf.ecore.EObject;
/**
- * This interface allows to set the base name of an element.
- * The base can then be used to derive a more useful name,
- * containing the name of the element type for example.
+ * This interface allows to set the base name of an element. The base can then
+ * be used to derive a more useful name, containing the name of the element type
+ * for example.
*
* @author mvelten
*
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/NavigableElement.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/NavigableElement.java
index 837374b2052..a776559f333 100644
--- a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/NavigableElement.java
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/NavigableElement.java
@@ -17,8 +17,8 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
/**
- * This class represents an element which can be accessed
- * from an other element throught a feature using defined navigation rules.
+ * This class represents an element which can be accessed from an other element
+ * throught a feature using defined navigation rules.
*
* @author mvelten
*
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/NavigationHelper.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/NavigationHelper.java
index 7f27fe6fe2c..5b5d5f0f705 100644
--- a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/NavigationHelper.java
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/NavigationHelper.java
@@ -32,7 +32,6 @@ import org.eclipse.papyrus.core.extension.commands.ICreationCommand;
import org.eclipse.papyrus.core.utils.DiResourceSet;
import org.eclipse.papyrus.core.utils.OpenDiagramCommand;
-
public class NavigationHelper {
private static class NavigationHelperHolder {
@@ -45,7 +44,7 @@ public class NavigationHelper {
}
private static final String EXTENSION_ID = "org.eclipse.papyrus.navigation.navigationRules";
-
+
private static final String NAVIGATIONRULE_ID = "navigationRule";
private static final String RULE_ID = "rule";
@@ -56,7 +55,7 @@ public class NavigationHelper {
// Reading data from plugins
IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_ID);
for(IConfigurationElement configElement : configElements) {
- if (NAVIGATIONRULE_ID.equals(configElement.getName())) {
+ if(NAVIGATIONRULE_ID.equals(configElement.getName())) {
try {
Object obj = configElement.createExecutableExtension(RULE_ID);
if(obj instanceof INavigationRule) {
@@ -83,7 +82,8 @@ public class NavigationHelper {
}
/**
- * get all navigation possibilities (existing or "to create" elements) from the specified element.
+ * get all navigation possibilities (existing or "to create" elements) from
+ * the specified element.
*
* @param element
* the element
@@ -98,10 +98,10 @@ public class NavigationHelper {
}
/**
- * This method link the created element with its parent
- * and browse the hierarchy to link the parents between them.
- * Ultimately the hierarchy will be attached to an {@link ExistingNavigableElement},
- * so to the original model.
+ * This method link the created element with its parent and browse the
+ * hierarchy to link the parents between them. Ultimately the hierarchy will
+ * be attached to an {@link ExistingNavigableElement}, so to the original
+ * model.
*
* @param createdNavElement
*/
@@ -115,7 +115,8 @@ public class NavigationHelper {
}
/**
- * Same behavior as {@link NavigationHelper#linkToModel(CreatedNavigableElement)} but set the base name of the elements.
+ * Same behavior as {@link NavigationHelper#linkToModel(CreatedNavigableElement)} but set the
+ * base name of the elements.
*
* @param createdNavElement
* @param base
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/decorator/NavigationDecorator.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/decorator/NavigationDecorator.java
index 52fe8e7390d..27ab0aa2d42 100644
--- a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/decorator/NavigationDecorator.java
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/decorator/NavigationDecorator.java
@@ -46,9 +46,8 @@ import org.eclipse.papyrus.preferences.Activator;
import org.eclipse.papyrus.ui.toolbox.draw2d.ManuallyDrawnShortcutDecorationFigure;
import org.eclipse.swt.graphics.Color;
-
public class NavigationDecorator extends AbstractDecorator implements Adapter {
-
+
private static final String EXTENSION_ID = "org.eclipse.papyrus.navigation.navigationColorProviders";
private static final String COLORPROVIDER_ID = "navigationColorProvider";
@@ -56,12 +55,12 @@ public class NavigationDecorator extends AbstractDecorator implements Adapter {
private static final String PROVIDER_ID = "provider";
private static List<IColorProvider> navigationColorProviders = new LinkedList<IColorProvider>();
-
+
static {
// Reading data from plugins
IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_ID);
for(IConfigurationElement configElement : configElements) {
- if (COLORPROVIDER_ID.equals(configElement.getName())) {
+ if(COLORPROVIDER_ID.equals(configElement.getName())) {
try {
Object obj = configElement.createExecutableExtension(PROVIDER_ID);
if(obj instanceof IColorProvider) {
@@ -78,7 +77,7 @@ public class NavigationDecorator extends AbstractDecorator implements Adapter {
private ManuallyDrawnShortcutDecorationFigure shortcutFigure = new ManuallyDrawnShortcutDecorationFigure();
private IGraphicalEditPart gep = null;
-
+
private boolean displayOnly;
public NavigationDecorator(IDecoratorTarget decoratorTarget) {
@@ -101,7 +100,6 @@ public class NavigationDecorator extends AbstractDecorator implements Adapter {
if(editPart instanceof IGraphicalEditPart) {
gep = (IGraphicalEditPart)editPart;
-
if(editPart instanceof ShapeEditPart) {
setDecoration(getDecoratorTarget().addShapeDecoration(shortcutFigure, IDecoratorTarget.Direction.NORTH_EAST, -5, displayOnly));
} else if(editPart instanceof ConnectionEditPart) {
@@ -123,12 +121,12 @@ public class NavigationDecorator extends AbstractDecorator implements Adapter {
currentDiagram = view.getDiagram();
}
- if (currentDiagram != null) {
+ if(currentDiagram != null) {
addResourceListener(currentDiagram.eResource());
}
List<NavigableElement> navElements = NavigationHelper.getInstance().getAllNavigableElements(element);
-
+
Color shortcutColor = null;
for(NavigableElement navElement : navElements) {
@@ -146,13 +144,14 @@ public class NavigationDecorator extends AbstractDecorator implements Adapter {
for(Diagram diag : associatedDiagrams) {
addResourceListener(diag.eResource());
if(!diag.equals(currentDiagram)) {
- for (IColorProvider provider : navigationColorProviders) {
+ for(IColorProvider provider : navigationColorProviders) {
Color color = provider.getBackground(navElement);
- if (color != null) {
- if (shortcutColor == null) {
+ if(color != null) {
+ if(shortcutColor == null) {
shortcutColor = color;
- } else if (!shortcutColor.equals(color)) {
- // more than one color for this element :
+ } else if(!shortcutColor.equals(color)) {
+ // more than one color for this
+ // element :
// just use white in this case
shortcutColor = ColorConstants.white;
}
@@ -165,8 +164,8 @@ public class NavigationDecorator extends AbstractDecorator implements Adapter {
}
}
}
-
- if (shortcutColor == null) {
+
+ if(shortcutColor == null) {
shortcutFigure.setVisible(false);
} else {
shortcutFigure.setVisible(true);
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/decorator/NavigationDecoratorProvider.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/decorator/NavigationDecoratorProvider.java
index 94dc52d9c84..4812a674be5 100644
--- a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/decorator/NavigationDecoratorProvider.java
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/decorator/NavigationDecoratorProvider.java
@@ -33,11 +33,13 @@ import org.eclipse.papyrus.preferences.Activator;
public class NavigationDecoratorProvider extends AbstractProvider implements IDecoratorProvider {
private static Set<Class<?>> forbiddenClasses = new HashSet<Class<?>>();
+
private static Set<Class<?>> decoratedClasses = new HashSet<Class<?>>();
private static final String EXTENSION_ID = "org.eclipse.papyrus.navigation.navigationDecoratorRules";
private static final String FORBIDDENCLASS_ID = "forbiddenClass";
+
private static final String DECORATEDCLASS_ID = "decoratedClass";
private static final String CLASS_ID = "class";
@@ -50,12 +52,13 @@ public class NavigationDecoratorProvider extends AbstractProvider implements IDe
Class<?> class_ = null;
try {
class_ = Platform.getBundle(configElement.getContributor().getName()).loadClass(className);
- } catch(Exception e) {}
+ } catch (Exception e) {
+ }
if(class_ != null) {
- if (FORBIDDENCLASS_ID.equals(configElement.getName())) {
+ if(FORBIDDENCLASS_ID.equals(configElement.getName())) {
forbiddenClasses.add(class_);
- } else if (DECORATEDCLASS_ID.equals(configElement.getName())) {
+ } else if(DECORATEDCLASS_ID.equals(configElement.getName())) {
decoratedClasses.add(class_);
}
}
@@ -64,20 +67,20 @@ public class NavigationDecoratorProvider extends AbstractProvider implements IDe
public boolean provides(IOperation operation) {
String decoratorVisibility = Activator.getDefault().getPreferenceStore().getString(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DECORATOR_VISIBILITY);
- if (operation instanceof CreateDecoratorsOperation && !INavigationPreferenceConstant.DISABLED.equals(decoratorVisibility)) {
- IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation) operation).getDecoratorTarget();
+ if(operation instanceof CreateDecoratorsOperation && !INavigationPreferenceConstant.DISABLED.equals(decoratorVisibility)) {
+ IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation)operation).getDecoratorTarget();
EditPart editPart = (EditPart)decoratorTarget.getAdapter(EditPart.class);
if(editPart instanceof IPrimaryEditPart) {
- EObject element = ((IGraphicalEditPart) editPart).resolveSemanticElement();
+ EObject element = ((IGraphicalEditPart)editPart).resolveSemanticElement();
boolean decorate = false;
- for (Class<?> class_ : decoratedClasses) {
- if (class_.isInstance(element)) {
+ for(Class<?> class_ : decoratedClasses) {
+ if(class_.isInstance(element)) {
decorate = true;
break;
}
}
- for (Class<?> class_ : forbiddenClasses) {
- if (class_.isInstance(element)) {
+ for(Class<?> class_ : forbiddenClasses) {
+ if(class_.isInstance(element)) {
decorate = false;
break;
}
@@ -92,5 +95,4 @@ public class NavigationDecoratorProvider extends AbstractProvider implements IDe
new NavigationDecorator(decoratorTarget);
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/BackNavigateHandler.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/BackNavigateHandler.java
new file mode 100644
index 00000000000..eb3f3df020f
--- /dev/null
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/BackNavigateHandler.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2011 AtoS
+ * 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:
+ * Anass RADOUANI (AtoS)
+ *******************************************************************************/
+
+package org.eclipse.papyrus.navigation.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.core.editor.CoreMultiDiagramEditor;
+import org.eclipse.papyrus.core.services.ServiceException;
+import org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * handler for Up command
+ *
+ */
+public class BackNavigateHandler extends AbstractHandler {
+
+ private IEditorPart editor;
+
+ private IPageMngr pageMngr;
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ editor = HandlerUtil.getActiveEditor(event);
+
+ if(editor instanceof CoreMultiDiagramEditor) {
+ CoreMultiDiagramEditor papyrusEditor = (CoreMultiDiagramEditor)editor;
+ EditingDomain editingDomain = papyrusEditor.getEditingDomain();
+ if(editingDomain instanceof TransactionalEditingDomain) {
+ try {
+ pageMngr = papyrusEditor.getServicesRegistry().getService(IPageMngr.class);
+ pageMngr.openPrevious();
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ return null;
+ }
+
+}
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/NextNavigateHandler.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/NextNavigateHandler.java
new file mode 100644
index 00000000000..4a3d3bb8f7d
--- /dev/null
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/NextNavigateHandler.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2011 AtoS
+ * 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:
+ * Anass RADOUANI (AtoS)
+ *******************************************************************************/
+
+package org.eclipse.papyrus.navigation.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.core.editor.CoreMultiDiagramEditor;
+import org.eclipse.papyrus.core.services.ServiceException;
+import org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * handler for Next command
+ *
+ */
+public class NextNavigateHandler extends AbstractHandler {
+
+ private IEditorPart editor;
+
+ private IPageMngr pageMngr;
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ editor = HandlerUtil.getActiveEditor(event);
+ if(editor instanceof CoreMultiDiagramEditor) {
+ CoreMultiDiagramEditor papyrusEditor = (CoreMultiDiagramEditor)editor;
+ EditingDomain editingDomain = papyrusEditor.getEditingDomain();
+ if(editingDomain instanceof TransactionalEditingDomain) {
+ try {
+ pageMngr = papyrusEditor.getServicesRegistry().getService(IPageMngr.class);
+ pageMngr.openNext();
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ return null;
+ }
+
+}
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/TopNavigateHandler.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/TopNavigateHandler.java
new file mode 100644
index 00000000000..50fc5fbe1f4
--- /dev/null
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/TopNavigateHandler.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2011 AtoS
+ * 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:
+ * Anass RADOUANI (AtoS)
+ *******************************************************************************/
+
+package org.eclipse.papyrus.navigation.handlers;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.core.adaptor.gmf.DiagramsUtil;
+import org.eclipse.papyrus.core.editor.CoreMultiDiagramEditor;
+import org.eclipse.papyrus.core.utils.OpenDiagramCommand;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.navigation.Activator;
+import org.eclipse.papyrus.navigation.utils.MultiDiagramDialog;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.window.Window;
+
+/**
+ * handler for Up command
+ *
+ */
+public class TopNavigateHandler extends AbstractHandler {
+
+ private IEditorPart editor;
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ editor = HandlerUtil.getActiveEditor(event);
+ if(editor instanceof CoreMultiDiagramEditor) {
+ CoreMultiDiagramEditor papyrusEditor = (CoreMultiDiagramEditor)editor;
+ EObject parent = papyrusEditor.getDiagram().getElement().eContainer();
+ List<List<Diagram>> diagramsTemp = new Vector<List<Diagram>>();
+ List<Diagram> diagrams = Collections.emptyList();
+ List<Diagram> associatedDiag = Collections.emptyList();
+ if(parent != null) {
+ while(parent != null) {
+ associatedDiag = DiagramsUtil.getAssociatedDiagrams(parent, null);
+ if(!associatedDiag.isEmpty()) {
+ diagramsTemp.add(associatedDiag);
+ }
+ parent = parent.eContainer();
+ }
+
+ while(diagrams.size() == 0 && diagramsTemp.size() != 0) {
+ diagrams = diagramsTemp.get(diagramsTemp.size() - 1);
+ diagramsTemp.remove(diagramsTemp.size() - 1);
+
+ }
+ openDialog(papyrusEditor, diagrams);
+
+ }
+ }
+ return null;
+ }
+
+ /**
+ * open the diagram if there is just one or open a dialog to choose the
+ * diagram to open if there is more than one
+ *
+ * @param papyrusEditor
+ * @param diagrams
+ */
+ private void openDialog(CoreMultiDiagramEditor papyrusEditor, List<Diagram> diagrams) {
+ if(diagrams != null) {
+ if(diagrams.size() == 1) {
+ openDiagram(papyrusEditor, diagrams.get(0));
+ } else if(diagrams.size() > 1) {
+ MultiDiagramDialog multiDiagramDialog = new MultiDiagramDialog(Activator.getActiveWorkbenchShell(), diagrams);
+ if(multiDiagramDialog.open() == Window.OK) {
+ openDiagram(papyrusEditor, diagrams.get(multiDiagramDialog.getSelectedDiagram()));
+ }
+ }
+ }
+ }
+
+ /**
+ * open a dialog to choose which diagram have to be opened
+ *
+ * @param papyrusEditor
+ * @param diagram
+ */
+ private void openDiagram(CoreMultiDiagramEditor papyrusEditor, Diagram diagram) {
+ if(papyrusEditor.getEditingDomain() instanceof TransactionalEditingDomain) {
+ TransactionalEditingDomain domain = (TransactionalEditingDomain)papyrusEditor.getEditingDomain();
+ OpenDiagramCommand openDiagramCommand = new OpenDiagramCommand(domain, diagram);
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(openDiagramCommand));
+ }
+ }
+
+}
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/UpNavigateHandler.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/UpNavigateHandler.java
new file mode 100644
index 00000000000..2e595addb94
--- /dev/null
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/handlers/UpNavigateHandler.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2011 AtoS
+ * 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:
+ * Anass RADOUANI (AtoS)
+ *******************************************************************************/
+
+package org.eclipse.papyrus.navigation.handlers;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.core.adaptor.gmf.DiagramsUtil;
+import org.eclipse.papyrus.core.editor.CoreMultiDiagramEditor;
+import org.eclipse.papyrus.core.utils.OpenDiagramCommand;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.navigation.Activator;
+import org.eclipse.papyrus.navigation.utils.MultiDiagramDialog;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.window.Window;
+
+/**
+ * handler for Up command
+ *
+ */
+public class UpNavigateHandler extends AbstractHandler {
+
+ private IEditorPart editor;
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ editor = HandlerUtil.getActiveEditor(event);
+ if(editor instanceof CoreMultiDiagramEditor) {
+ CoreMultiDiagramEditor papyrusEditor = (CoreMultiDiagramEditor)editor;
+ EObject parent = papyrusEditor.getDiagram().getElement().eContainer();
+ List<Diagram> diagrams = Collections.emptyList();
+ if(parent != null) {
+ while(parent != null && diagrams.size() == 0) {
+ diagrams = DiagramsUtil.getAssociatedDiagrams(parent, null);
+ parent = parent.eContainer();
+ }
+ openDialog(papyrusEditor, diagrams);
+
+ }
+ }
+ return null;
+ }
+
+ /**
+ * open the diagram if there is just one or open a dialog to choose the
+ * diagram to open if there is more than one
+ *
+ * @param papyrusEditor
+ * @param diagrams
+ */
+ private void openDialog(CoreMultiDiagramEditor papyrusEditor, List<Diagram> diagrams) {
+ if(diagrams != null) {
+ if(diagrams.size() == 1) {
+ openDiagram(papyrusEditor, diagrams.get(0));
+ } else if(diagrams.size() > 1) {
+ MultiDiagramDialog multiDiagramDialog = new MultiDiagramDialog(Activator.getActiveWorkbenchShell(), diagrams);
+ if(multiDiagramDialog.open() == Window.OK) {
+ openDiagram(papyrusEditor, diagrams.get(multiDiagramDialog.getSelectedDiagram()));
+ }
+ }
+ }
+ }
+
+ /**
+ * open a dialog to choose which diagram have to be opened
+ *
+ * @param papyrusEditor
+ * @param diagram
+ */
+ private void openDiagram(CoreMultiDiagramEditor papyrusEditor, Diagram diagram) {
+ if(papyrusEditor.getEditingDomain() instanceof TransactionalEditingDomain) {
+ TransactionalEditingDomain domain = (TransactionalEditingDomain)papyrusEditor.getEditingDomain();
+ OpenDiagramCommand openDiagramCommand = new OpenDiagramCommand(domain, diagram);
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(openDiagramCommand));
+ }
+ }
+
+}
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/preference/INavigationPreferenceConstant.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/preference/INavigationPreferenceConstant.java
index 4a226f35fd7..bdaba3dc752 100644
--- a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/preference/INavigationPreferenceConstant.java
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/preference/INavigationPreferenceConstant.java
@@ -17,15 +17,21 @@ package org.eclipse.papyrus.navigation.preference;
*/
public interface INavigationPreferenceConstant {
-
- public String PAPYRUS_NAVIGATION_DOUBLECLICK_KIND ="PAPYRUS_NAVIGATION_DOUBLECLICK_KIND";
- public String NO_NAVIGATION="NO_NAVIGATION";
- public String EXPLICIT_NAVIGATION="EXPLICIT_NAVIGATION";
- public String EXPLICIT_IMPLICIT_NAVIGATION="EXPLICIT_IMPLICIT_NAVIGATION";
+
+ public String PAPYRUS_NAVIGATION_DOUBLECLICK_KIND = "PAPYRUS_NAVIGATION_DOUBLECLICK_KIND";
+
+ public String NO_NAVIGATION = "NO_NAVIGATION";
+
+ public String EXPLICIT_NAVIGATION = "EXPLICIT_NAVIGATION";
+
+ public String EXPLICIT_IMPLICIT_NAVIGATION = "EXPLICIT_IMPLICIT_NAVIGATION";
public String PAPYRUS_NAVIGATION_DECORATOR_VISIBILITY = "PAPYRUS_NAVIGATION_DECORATOR_VISIBILITY";
+
public String DISABLED = "DISABLED";
- public String DISPLAY_ONLY="DISPLAY_ONLY";
- public String EVERYWHERE="EVERYWHERE";
+
+ public String DISPLAY_ONLY = "DISPLAY_ONLY";
+
+ public String EVERYWHERE = "EVERYWHERE";
}
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/preference/NavigationPreferenceInitializer.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/preference/NavigationPreferenceInitializer.java
index 76434387149..e6755c35572 100644
--- a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/preference/NavigationPreferenceInitializer.java
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/preference/NavigationPreferenceInitializer.java
@@ -27,8 +27,8 @@ public class NavigationPreferenceInitializer extends AbstractPreferenceInitializ
*/
public void initializeDefaultPreferences() {
IPreferenceStore store = getPreferenceStore();
- store.setDefault(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DOUBLECLICK_KIND,INavigationPreferenceConstant.EXPLICIT_IMPLICIT_NAVIGATION);
- store.setDefault(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DECORATOR_VISIBILITY,INavigationPreferenceConstant.DISPLAY_ONLY);
+ store.setDefault(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DOUBLECLICK_KIND, INavigationPreferenceConstant.EXPLICIT_IMPLICIT_NAVIGATION);
+ store.setDefault(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DECORATOR_VISIBILITY, INavigationPreferenceConstant.DISPLAY_ONLY);
}
/**
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/preference/NavigationPreferencePage.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/preference/NavigationPreferencePage.java
index ce440e5b37d..8071f5e8884 100644
--- a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/preference/NavigationPreferencePage.java
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/preference/NavigationPreferencePage.java
@@ -19,15 +19,16 @@ import org.eclipse.papyrus.preferences.Activator;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
-
/**
- * preference page for the navigation
- * It proposes to choose among 3 possibilities: no navigation, explicit navigation, or explicit + implicit naviagation
- *
+ * preference page for the navigation It proposes to choose among 3
+ * possibilities: no navigation, explicit navigation, or explicit + implicit
+ * naviagation
+ *
*/
public class NavigationPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
protected RadioGroupFieldEditor dblClkFieldEditor;
+
protected RadioGroupFieldEditor decoratorVisibilityFieldEditor;
public void init(IWorkbench workbench) {
@@ -36,31 +37,13 @@ public class NavigationPreferencePage extends FieldEditorPreferencePage implemen
@Override
protected void createFieldEditors() {
- dblClkFieldEditor = new RadioGroupFieldEditor(
- INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DOUBLECLICK_KIND,
- Messages.DoubleClickNavigationText,
- 1,
- new String[][] {
- {Messages.No_Navigation_Text,INavigationPreferenceConstant.NO_NAVIGATION},
- {Messages.ExplicitNavigation_Text,INavigationPreferenceConstant.EXPLICIT_NAVIGATION},
- {Messages.Explicit_ImplicitNavigation_Text,INavigationPreferenceConstant.EXPLICIT_IMPLICIT_NAVIGATION}
- },
- getFieldEditorParent());
+ dblClkFieldEditor = new RadioGroupFieldEditor(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DOUBLECLICK_KIND, Messages.DoubleClickNavigationText, 1, new String[][]{ { Messages.No_Navigation_Text, INavigationPreferenceConstant.NO_NAVIGATION }, { Messages.ExplicitNavigation_Text, INavigationPreferenceConstant.EXPLICIT_NAVIGATION }, { Messages.Explicit_ImplicitNavigation_Text, INavigationPreferenceConstant.EXPLICIT_IMPLICIT_NAVIGATION } }, getFieldEditorParent());
addField(dblClkFieldEditor);
dblClkFieldEditor.setPreferenceStore(Activator.getDefault().getPreferenceStore());
-
- decoratorVisibilityFieldEditor = new RadioGroupFieldEditor(
- INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DECORATOR_VISIBILITY,
- Messages.DecoratorVisibilityText,
- 1,
- new String[][] {
- {Messages.DecoratorDisabled_Text,INavigationPreferenceConstant.DISABLED},
- {Messages.DisplayOnly_Text,INavigationPreferenceConstant.DISPLAY_ONLY},
- {Messages.Everywhere_Text,INavigationPreferenceConstant.EVERYWHERE}
- },
- getFieldEditorParent());
- addField(decoratorVisibilityFieldEditor);
- decoratorVisibilityFieldEditor.setPreferenceStore(Activator.getDefault().getPreferenceStore());
+
+ decoratorVisibilityFieldEditor = new RadioGroupFieldEditor(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DECORATOR_VISIBILITY, Messages.DecoratorVisibilityText, 1, new String[][]{ { Messages.DecoratorDisabled_Text, INavigationPreferenceConstant.DISABLED }, { Messages.DisplayOnly_Text, INavigationPreferenceConstant.DISPLAY_ONLY }, { Messages.Everywhere_Text, INavigationPreferenceConstant.EVERYWHERE } }, getFieldEditorParent());
+ addField(decoratorVisibilityFieldEditor);
+ decoratorVisibilityFieldEditor.setPreferenceStore(Activator.getDefault().getPreferenceStore());
}
}
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/Messages.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/Messages.java
new file mode 100644
index 00000000000..a521f925a9f
--- /dev/null
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/Messages.java
@@ -0,0 +1,27 @@
+package org.eclipse.papyrus.navigation.utils;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.navigation.utils.messages"; //$NON-NLS-1$
+
+ public static String MultiDiagramDialog_0;
+
+ public static String MultiDiagramDialog_1;
+
+ public static String IS_BACK_POSSIBLE;
+
+ public static String IS_NEXT_POSSIBLE;
+
+ public static String IS_UP_POSSIBLE;
+
+ public static String IS_TOP_POSSIBLE;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/MultiDiagramDialog.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/MultiDiagramDialog.java
new file mode 100644
index 00000000000..2f3cdef1f61
--- /dev/null
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/MultiDiagramDialog.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright (c) 2011 AtoS
+ * 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:
+ * Anass RADOUANI (AtoS)
+ *******************************************************************************/
+
+package org.eclipse.papyrus.navigation.utils;
+
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.papyrus.core.services.ServiceException;
+import org.eclipse.papyrus.core.utils.EditorUtils;
+import org.eclipse.papyrus.modelexplorer.MoDiscoLabelProvider;
+import org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr;
+import org.eclipse.swt.SWT;
+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.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.jface.viewers.TableViewer;
+
+/**
+ * This class Provide a dialog filled with a list of reachable diagrams
+ *
+ * @author aradouan
+ *
+ */
+public class MultiDiagramDialog extends Dialog {
+
+ private List<Diagram> diagrams;
+
+ private Composite dialogComposite;
+
+ protected int selectedDiagram;
+
+ private Table table;
+
+ private TableViewer list;
+
+ public int getSelectedDiagram() {
+ return selectedDiagram;
+ }
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(Messages.MultiDiagramDialog_0);
+ }
+
+ public MultiDiagramDialog(Shell parentShell, List<Diagram> diagrams) {
+ super(parentShell);
+ this.diagrams = diagrams;
+ setShellStyle(getShellStyle() | SWT.RESIZE);
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ dialogComposite = (Composite)super.createDialogArea(parent);
+ parent.setLayout(new GridLayout());
+ dialogComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ createDialogComposite();
+ createDialogContents(dialogComposite);
+ hookListeners();
+ loadData();
+ defaultSelection();
+
+ return dialogComposite;
+ }
+
+ private void createDialogContents(Composite parent) {
+ dialogComposite.setLayout(new GridLayout(1, false));
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new FillLayout(SWT.HORIZONTAL));
+ composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
+
+ Label lblDiagrams = new Label(composite, SWT.NONE);
+ lblDiagrams.setText(Messages.MultiDiagramDialog_1);
+
+ Composite composite_1 = new Composite(parent, SWT.NONE);
+ composite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+ composite_1.setLayout(new GridLayout(1, false));
+
+ list = new TableViewer(composite_1, SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.H_SCROLL);
+ list.setUseHashlookup(true);
+ table = list.getTable();
+ table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+ list.setLabelProvider(new MoDiscoLabelProvider());
+ list.setContentProvider(new IStructuredContentProvider() {
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ public void dispose() {
+ }
+
+ public Object[] getElements(Object inputElement) {
+ if(inputElement instanceof List) {
+ return ((List)inputElement).toArray();
+ } else {
+ return new Object[]{ inputElement };
+ }
+ }
+ });
+ }
+
+ private void createDialogComposite() {
+ GridData dialogLayoutData = new GridData(GridData.FILL_BOTH);
+ dialogComposite.setLayoutData(dialogLayoutData);
+
+ }
+
+ private void hookListeners() {
+ table.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ MultiDiagramDialog.this.selectedDiagram = table.getSelectionIndex();
+ }
+
+ });
+ }
+
+ private void loadData() {
+ list.setInput(diagrams);
+ }
+
+ private void defaultSelection() {
+ boolean found = false;
+ IPageMngr pageMngr;
+ try {
+ pageMngr = EditorUtils.getServiceRegistry().getService(IPageMngr.class);
+
+ for(Diagram diagram : diagrams) {
+ if(pageMngr.isOpen(diagram)) {
+ table.select(diagrams.indexOf(diagram));
+ found = true;
+ break;
+ }
+ }
+
+ if(!found) {
+ int diagFound = 0;
+ int diagFoundTemp = 0;
+ for(Diagram diagram : diagrams) {
+ diagFoundTemp = pageMngr.isInHsitory(diagram);
+ if(diagFoundTemp > diagFound) {
+ diagFound = diagFoundTemp;
+ table.select(diagrams.indexOf(diagram));
+ found = true;
+ }
+ }
+ }
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ }
+
+ if(!found) {
+ table.select(0);
+ }
+ }
+}
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/PropertyTester.java b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/PropertyTester.java
new file mode 100644
index 00000000000..46d3d41a57d
--- /dev/null
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/PropertyTester.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2011 AtoS
+ * 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:
+ * Anass RADOUANI (AtoS) - test property to enable or disable Navigation Icons
+ *******************************************************************************/
+package org.eclipse.papyrus.navigation.utils;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.core.adaptor.gmf.DiagramsUtil;
+import org.eclipse.papyrus.core.editor.CoreMultiDiagramEditor;
+import org.eclipse.papyrus.core.services.ServiceException;
+import org.eclipse.papyrus.core.services.ServicesRegistry;
+import org.eclipse.papyrus.core.utils.EditorUtils;
+import org.eclipse.papyrus.navigation.Activator;
+import org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+
+public class PropertyTester extends org.eclipse.core.expressions.PropertyTester {
+
+ @SuppressWarnings("deprecation")
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ boolean result = false;
+
+ ServicesRegistry serviceRegistry = EditorUtils.getServiceRegistry();
+ if(serviceRegistry != null && Messages.IS_BACK_POSSIBLE.equals(property)) {
+ try {
+ IPageMngr pageMngr = serviceRegistry.getService(IPageMngr.class);
+ result = pageMngr.hasPreviousHistory();
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ }
+
+ } else if(serviceRegistry != null && Messages.IS_NEXT_POSSIBLE.equals(property)) {
+ try {
+ IPageMngr pageMngr = serviceRegistry.getService(IPageMngr.class);
+ result = pageMngr.hasNextHistory();
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ }
+
+ } else if(Messages.IS_UP_POSSIBLE.equals(property) || Messages.IS_TOP_POSSIBLE.equals(property)) {
+ IWorkbenchWindow activeWorkbenchWindow = Activator.getActiveWorkbenchWindow();
+ if (activeWorkbenchWindow != null)
+ {
+ IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
+ if (activePage != null)
+ {
+ IEditorPart editor = activePage.getActiveEditor();
+ if(editor instanceof CoreMultiDiagramEditor) {
+ CoreMultiDiagramEditor papyrusEditor = (CoreMultiDiagramEditor)editor;
+ EObject parent = null;
+ if(papyrusEditor.getDiagram() != null && papyrusEditor.getDiagram().getElement() != null) {
+ parent = papyrusEditor.getDiagram().getElement().eContainer();
+ }
+
+ if(parent != null) {
+ while(parent != null && !result) {
+ result = !DiagramsUtil.getAssociatedDiagrams(parent, null).isEmpty();
+ parent = parent.eContainer();
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+}
diff --git a/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/messages.properties b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/messages.properties
new file mode 100644
index 00000000000..c230b60594c
--- /dev/null
+++ b/plugins/core/org.eclipse.papyrus.navigation/src/org/eclipse/papyrus/navigation/utils/messages.properties
@@ -0,0 +1,6 @@
+MultiDiagramDialog_0=Diagrams
+MultiDiagramDialog_1=Select a diagram :
+IS_BACK_POSSIBLE=isBackCommandPossible
+IS_NEXT_POSSIBLE=isNextCommandPossible
+IS_UP_POSSIBLE=isUpCommandPossible
+IS_TOP_POSSIBLE=isTopCommandPossible
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/META-INF/MANIFEST.MF b/plugins/core/org.eclipse.papyrus.sasheditor.di/META-INF/MANIFEST.MF
index b7952c133a1..7d1f7480b29 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/META-INF/MANIFEST.MF
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/META-INF/MANIFEST.MF
@@ -1,24 +1,26 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.papyrus.sasheditor.di;singleton:=true
-Bundle-Version: 0.9.0.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.papyrus.sasheditor.contentprovider.di,
- org.eclipse.papyrus.sasheditor.contentprovider.di.commands,
- org.eclipse.papyrus.sasheditor.contentprovider.di.utils,
- org.eclipse.papyrus.sashwindows.di,
- org.eclipse.papyrus.sashwindows.di.exception,
- org.eclipse.papyrus.sashwindows.di.impl,
- org.eclipse.papyrus.sashwindows.di.util
-Require-Bundle: org.eclipse.swt;bundle-version="3.5.0";visibility:=reexport,
- org.eclipse.papyrus.sasheditor;bundle-version="0.8.0";visibility:=reexport,
- org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime;bundle-version="3.6.0",
- org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.emf.ecore.xmi;bundle-version="2.5.0",
- org.eclipse.emf.transaction;bundle-version="1.4.0"
-Bundle-ActivationPolicy: lazy
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.sasheditor.di;singleton:=true
+Bundle-Version: 0.8.1.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.papyrus.sasheditor.contentprovider.di,
+ org.eclipse.papyrus.sasheditor.contentprovider.di.commands,
+ org.eclipse.papyrus.sasheditor.contentprovider.di.utils,
+ org.eclipse.papyrus.sashwindows.di,
+ org.eclipse.papyrus.sashwindows.di.exception,
+ org.eclipse.papyrus.sashwindows.di.impl,
+ org.eclipse.papyrus.sashwindows.di.util
+Require-Bundle: org.eclipse.swt;bundle-version="3.5.0";visibility:=reexport,
+ org.eclipse.papyrus.sasheditor;bundle-version="0.8.0";visibility:=reexport,
+ org.eclipse.ui;bundle-version="3.6.0",
+ org.eclipse.core.runtime;bundle-version="3.6.0",
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;bundle-version="2.5.0",
+ org.eclipse.emf.transaction;bundle-version="1.4.0",
+ org.eclipse.gmf.runtime.notation;bundle-version="1.5.0"
+Bundle-ActivationPolicy: lazy
+
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/DiSashModelMngr.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/DiSashModelMngr.java
index b8a8a4592b8..60b3b6d10ac 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/DiSashModelMngr.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/DiSashModelMngr.java
@@ -24,7 +24,6 @@ import org.eclipse.papyrus.sasheditor.contentprovider.di.internal.PageMngrImpl;
import org.eclipse.papyrus.sashwindows.di.SashWindowsMngr;
import org.eclipse.papyrus.sashwindows.di.util.DiUtils;
-
/**
* Class used as main entry point to access a sash model build on EMF / di
*
@@ -44,21 +43,21 @@ public class DiSashModelMngr {
* Instance of the DiContentProvider used to manipulate SashModel.
*/
private DiContentProvider contentProvider;
-
+
/**
- * Object used externally listen to model changes.
- * The object is also used internally to control how events are fired (limit multiple events).
+ * Object used externally listen to model changes. The object is also used
+ * internally to control how events are fired (limit multiple events).
*/
protected ContentChangedEventProvider contentChangedEventProvider;
/** The factory used to create IPageModel */
private IPageModelFactory pageModelFactory;
-
/**
- * Constructor.
- * Create a DiSashModelMngr with the specified factory. A SashModel is created but not attached to a resource.
- * This constructor is for subclasses. The subclasses should initialize the sashWindowMngr
+ * Constructor. Create a DiSashModelMngr with the specified factory. A
+ * SashModel is created but not attached to a resource. This constructor is
+ * for subclasses. The subclasses should initialize the sashWindowMngr
+ *
* @param pageModelFactory
* @param createDefaultSashModel
* If true, create the default SashModel by calling {@link #createDefaultSashModel()}
@@ -66,15 +65,14 @@ public class DiSashModelMngr {
protected DiSashModelMngr(IPageModelFactory pageModelFactory, boolean createDefaultSashModel) {
this.pageModelFactory = pageModelFactory;
// Create a SashModel
- if(createDefaultSashModel)
- {
+ if(createDefaultSashModel) {
sashWindowMngr = createDefaultSashModel();
}
}
/**
- * Constructor.
- * Create a DiSashModelMngr with the specified factory. A SashModel is created but not attached to a resource.
+ * Constructor. Create a DiSashModelMngr with the specified factory. A
+ * SashModel is created but not attached to a resource.
*
* @param pageModelFactory
*/
@@ -85,9 +83,9 @@ public class DiSashModelMngr {
}
/**
- * Constructor.
- * Create a DiSashModelMngr with the specified factory. The SashModel is searched in the Resource. If not found,
- * create one in the resource.
+ * Constructor. Create a DiSashModelMngr with the specified factory. The
+ * SashModel is searched in the Resource. If not found, create one in the
+ * resource.
*
* @param pageModelFactory
* @param diResource
@@ -105,8 +103,8 @@ public class DiSashModelMngr {
}
/**
- * Constructor.
- * Create a DiSashModelMngr with the specified factory and sashModel.
+ * Constructor. Create a DiSashModelMngr with the specified factory and
+ * sashModel.
*
* @param pageModelFactory
* @param sashModel
@@ -117,8 +115,7 @@ public class DiSashModelMngr {
}
/**
- * Get the internal EMF implementation.
- * Intended to be used by tests.
+ * Get the internal EMF implementation. Intended to be used by tests.
*
* @return the sashWindowMngr
*/
@@ -126,11 +123,9 @@ public class DiSashModelMngr {
return sashWindowMngr;
}
-
/**
- * Return the internal implementation of ContentProvider.
- * Create if if needed.
- * This method should not be subclassed
+ * Return the internal implementation of ContentProvider. Create if if
+ * needed. This method should not be subclassed
*
* @return the contentProvider
*/
@@ -142,9 +137,8 @@ public class DiSashModelMngr {
}
/**
- * Return the internal implementation of PageMngr.
- * Create if if needed.
- * This method should not be subclassed
+ * Return the internal implementation of PageMngr. Create if if needed. This
+ * method should not be subclassed
*
* @return the PageMngrImpl
*/
@@ -157,9 +151,8 @@ public class DiSashModelMngr {
}
/**
- * Return the internal implementation of ContentChangedEventProvider.
- * Create if if needed.
- * This method should not be subclassed
+ * Return the internal implementation of ContentChangedEventProvider. Create
+ * if if needed. This method should not be subclassed
*
* @return the PageMngrImpl
*/
@@ -172,7 +165,8 @@ public class DiSashModelMngr {
}
/**
- * Get the IPageMngr providing basic methods to manage Pages in the sash model.
+ * Get the IPageMngr providing basic methods to manage Pages in the sash
+ * model.
*
* @return
*/
@@ -181,8 +175,8 @@ public class DiSashModelMngr {
}
/**
- * Get the ContentProvider used by the SashWindows system.
- * This class can also be used to accurately manage the sash model.
+ * Get the ContentProvider used by the SashWindows system. This class can
+ * also be used to accurately manage the sash model.
*
* @return
*/
@@ -223,8 +217,8 @@ public class DiSashModelMngr {
}
/**
- * Create an instance of IPageMngr acting on the provided resource.
- * This instance is suitable to add, remove, close or open diagrams.
+ * Create an instance of IPageMngr acting on the provided resource. This
+ * instance is suitable to add, remove, close or open diagrams.
*
* @param diResource
* @return The non transactional version of the IPageMngr
@@ -232,10 +226,10 @@ public class DiSashModelMngr {
public static IPageMngr createIPageMngr(Resource diResource) {
// Create an instance of the DiSashModelMngr with no factory.
- // The factory is not needed since we don't get the ISashWindowsContentProvider.
+ // The factory is not needed since we don't get the
+ // ISashWindowsContentProvider.
return new DiSashModelMngr(null, diResource).getIPageMngr();
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/IPageModelFactory.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/IPageModelFactory.java
index 35b214fc6c7..ee16f061b8d 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/IPageModelFactory.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/IPageModelFactory.java
@@ -18,7 +18,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr;
import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel;
-
/**
* Factory used to create IPageModel from an object identifying a page.
* IPageModel are objects used by the Sash Windows to create a page.
@@ -28,10 +27,10 @@ import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel;
public interface IPageModelFactory {
/**
- * Create the IPageModel for the pageIdentifier. The pageIdentifier is the object passed to
- * the {@link IPageMngr#addEditor(EObject)}.
- * This factory method is called by the Sash Windows whenever it needs to create a page. The identifier
- * is found in the sash model.
+ * Create the IPageModel for the pageIdentifier. The pageIdentifier is the
+ * object passed to the {@link IPageMngr#addEditor(EObject)}. This factory
+ * method is called by the Sash Windows whenever it needs to create a page.
+ * The identifier is found in the sash model.
*
* @param pageIdentifier
* The identifier identifying the page to create.
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/TransactionalDiSashModelMngr.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/TransactionalDiSashModelMngr.java
index 190705fa752..f7072add1dd 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/TransactionalDiSashModelMngr.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/TransactionalDiSashModelMngr.java
@@ -11,7 +11,6 @@ import org.eclipse.papyrus.sasheditor.contentprovider.ISashWindowsContentProvide
import org.eclipse.papyrus.sasheditor.contentprovider.di.internal.TransactionalDiContentProvider;
import org.eclipse.papyrus.sasheditor.contentprovider.di.internal.TransactionalPageMngrImpl;
-
/**
* DiSashModelMngr providing transactional commands to modify SashModel.
*
@@ -34,11 +33,10 @@ public class TransactionalDiSashModelMngr extends DiSashModelMngr {
public TransactionalDiSashModelMngr(IPageModelFactory pageModelFactory, final Resource diResource, TransactionalEditingDomain editingDomain) {
super(pageModelFactory, false);
-
-
// lookup the SashModel
sashWindowMngr = lookupSashWindowMngr(diResource);
- // If no SashWindow structure is found, create a new one using a transaction.
+ // If no SashWindow structure is found, create a new one using a
+ // transaction.
if(sashWindowMngr == null) {
RecordingCommand command = new RecordingCommand(editingDomain) {
@@ -61,9 +59,8 @@ public class TransactionalDiSashModelMngr extends DiSashModelMngr {
/**
*
- * Constructor.
- * Only create a {@link IPageMngr} impl. Do not create the DiContentProvider as there is no factory provided.
- * Internal use.
+ * Constructor. Only create a {@link IPageMngr} impl. Do not create the
+ * DiContentProvider as there is no factory provided. Internal use.
*
* @param pageModelFactory
* @param diResource
@@ -73,7 +70,8 @@ public class TransactionalDiSashModelMngr extends DiSashModelMngr {
// lookup the SashModel
sashWindowMngr = lookupSashWindowMngr(diResource);
- // If no SashWindow structure is found, create a new one using a transaction.
+ // If no SashWindow structure is found, create a new one using a
+ // transaction.
if(sashWindowMngr == null) {
RecordingCommand command = new RecordingCommand(editingDomain) {
@@ -116,8 +114,8 @@ public class TransactionalDiSashModelMngr extends DiSashModelMngr {
}
/**
- * Create an instance of IPageMngr acting on the provided resource.
- * This instance is suitable to add, remove, close or open diagrams.
+ * Create an instance of IPageMngr acting on the provided resource. This
+ * instance is suitable to add, remove, close or open diagrams.
*
* @param diResource
* @return The non transactional version of the IPageMngr
@@ -125,7 +123,8 @@ public class TransactionalDiSashModelMngr extends DiSashModelMngr {
public static IPageMngr createIPageMngr(Resource diResource, TransactionalEditingDomain editingDomain) {
// Create an instance of the DiSashModelMngr with no factory.
- // The factory is not needed since we don't get the ISashWindowsContentProvider.
+ // The factory is not needed since we don't get the
+ // ISashWindowsContentProvider.
return new TransactionalDiSashModelMngr(diResource, editingDomain).getIPageMngr();
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/commands/CloseAllDiagramsCommand.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/commands/CloseAllDiagramsCommand.java
index 69f5de19b87..fbd8c573cab 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/commands/CloseAllDiagramsCommand.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/commands/CloseAllDiagramsCommand.java
@@ -11,12 +11,12 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.handlers.HandlerUtil;
/**
- * A command to be used with the Eclipse Commands Framework.
- * This command allows to close all diagrams openened in the current SashContainer implemented
- * on di.
+ * A command to be used with the Eclipse Commands Framework. This command allows
+ * to close all diagrams openened in the current SashContainer implemented on
+ * di.
*
* @author cedric dumoulin
- *
+ *
*/
public class CloseAllDiagramsCommand extends AbstractHandler {
@@ -25,15 +25,16 @@ public class CloseAllDiagramsCommand extends AbstractHandler {
*/
@Override
public void setEnabled(Object evaluationContext) {
-// System.out.println("call to CloseAllDiagramsCommand.setEnable(" + evaluationContext + ")");
+ // System.out.println("call to CloseAllDiagramsCommand.setEnable(" +
+ // evaluationContext + ")");
}
-
+
/**
* Execute the command. This method is called when the action is triggered.
*
*/
public Object execute(ExecutionEvent event) throws ExecutionException {
-
+
IPageMngr pageMngr;
try {
pageMngr = getPageMngr(event);
@@ -42,31 +43,34 @@ public class CloseAllDiagramsCommand extends AbstractHandler {
return null;
}
execute(pageMngr);
-
+
return null;
}
-
+
/**
* Get the PageMngr used to interact with the content provider.
+ *
* @param event
* @return
- * @throws NullPointerException if the PageMngr can't be found.
+ * @throws NullPointerException
+ * if the PageMngr can't be found.
*/
private IPageMngr getPageMngr(ExecutionEvent event) {
-
+
IEditorPart part = HandlerUtil.getActiveEditor(event);
IPageMngr pageMngr = (IPageMngr)part.getAdapter(IPageMngr.class);
-
+
return pageMngr;
-
+
}
/**
* Close all the diagrams.
+ *
* @param pageMngr
*/
public void execute(IPageMngr pageMngr) {
-
+
pageMngr.closeAllOpenedPages();
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/commands/CloseDiagramCommand.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/commands/CloseDiagramCommand.java
index 3faf6693aee..268fc6c9543 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/commands/CloseDiagramCommand.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/commands/CloseDiagramCommand.java
@@ -13,12 +13,12 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.handlers.HandlerUtil;
/**
- * A command to be used with the Eclipse Commands Framework.
- * This command is to be used with {@link SashWindowsContainer} implemented with the Di model.
- * This command allows to close the currently openened diagram.
+ * A command to be used with the Eclipse Commands Framework. This command is to
+ * be used with {@link SashWindowsContainer} implemented with the Di model. This
+ * command allows to close the currently openened diagram.
*
* @author cedric dumoulin
- *
+ *
*/
public class CloseDiagramCommand extends AbstractHandler {
@@ -27,47 +27,46 @@ public class CloseDiagramCommand extends AbstractHandler {
*/
@Override
public void setEnabled(Object evaluationContext) {
- // System.out.println("call to CloseDiagramCommand.setEnable(" + evaluationContext + ")");
+ // System.out.println("call to CloseDiagramCommand.setEnable(" +
+ // evaluationContext + ")");
}
-
+
/**
* Execute the command. This method is called when the action is triggered.
*
*/
public Object execute(ExecutionEvent event) throws ExecutionException {
-
+
try {
IEditorPart part = HandlerUtil.getActiveEditor(event);
IPageMngr pageMngr = (IPageMngr)part.getAdapter(IPageMngr.class);
ISashWindowsContainer container = (ISashWindowsContainer)part.getAdapter(ISashWindowsContainer.class);
Object pageIdentifier = container.getActiveSashWindowsPage().getRawModel();
// Bug from sash Di to be corrected
- if(pageIdentifier instanceof PageRef)
- {
+ if(pageIdentifier instanceof PageRef) {
pageIdentifier = ((PageRef)pageIdentifier).getPageIdentifier();
}
-
+
execute(pageMngr, pageIdentifier);
} catch (NullPointerException e) {
// PageMngr can't be found
return null;
}
-
-
-
+
return null;
}
-
+
/**
* Close selected page.
+ *
* @param pageMngr
*/
public void execute(IPageMngr pageMngr, Object pageIdentifier) {
-
- if(pageMngr.isOpen(pageIdentifier)) {
- pageMngr.closePage(pageIdentifier);
- }
+
+ if(pageMngr.isOpen(pageIdentifier)) {
+ pageMngr.closePage(pageIdentifier);
+ }
}
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/commands/CloseOtherDiagramsCommand.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/commands/CloseOtherDiagramsCommand.java
index f574a2832b4..b3f1020888d 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/commands/CloseOtherDiagramsCommand.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/commands/CloseOtherDiagramsCommand.java
@@ -13,9 +13,10 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.handlers.HandlerUtil;
/**
- * A command to be used with the Eclipse Commands Framework.
- * This command is to be used with {@link SashWindowsContainer} implemented with the Di model.
- * This command allows to close all diagrams in the folder, except the currently openened one.
+ * A command to be used with the Eclipse Commands Framework. This command is to
+ * be used with {@link SashWindowsContainer} implemented with the Di model. This
+ * command allows to close all diagrams in the folder, except the currently
+ * openened one.
*
* @author cedric dumoulin
*
@@ -27,7 +28,8 @@ public class CloseOtherDiagramsCommand extends AbstractHandler {
*/
@Override
public void setEnabled(Object evaluationContext) {
- // System.out.println("call to CloseDiagramCommand.setEnable(" + evaluationContext + ")");
+ // System.out.println("call to CloseDiagramCommand.setEnable(" +
+ // evaluationContext + ")");
}
/**
@@ -42,8 +44,7 @@ public class CloseOtherDiagramsCommand extends AbstractHandler {
ISashWindowsContainer container = (ISashWindowsContainer)part.getAdapter(ISashWindowsContainer.class);
Object pageIdentifier = container.getActiveSashWindowsPage().getRawModel();
// Bug from sash Di to be corrected
- if(pageIdentifier instanceof PageRef)
- {
+ if(pageIdentifier instanceof PageRef) {
pageIdentifier = ((PageRef)pageIdentifier).getPageIdentifier();
}
execute(pageMngr, pageIdentifier);
@@ -53,8 +54,6 @@ public class CloseOtherDiagramsCommand extends AbstractHandler {
return null;
}
-
-
return null;
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/ContentChangedEventProvider.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/ContentChangedEventProvider.java
index 1c26c34fd04..3134c9c0372 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/ContentChangedEventProvider.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/ContentChangedEventProvider.java
@@ -17,15 +17,15 @@ import org.eclipse.papyrus.sashwindows.di.SashModel;
import org.eclipse.papyrus.sashwindows.di.SashWindowsMngr;
import org.eclipse.papyrus.sashwindows.di.Window;
-
/**
- * A class listening on changes on the internal model and delivering events to registered listeners.
+ * A class listening on changes on the internal model and delivering events to
+ * registered listeners.
*
* @author cedric dumoulin
- *
+ *
*/
public class ContentChangedEventProvider implements IContentChangedProvider {
-
+
private List<IContentChangedListener> listeners;
/** Is this mngr delivering events ? */
@@ -40,31 +40,32 @@ public class ContentChangedEventProvider implements IContentChangedProvider {
* The model firing events
*/
private SashModel diSashModel;
-
+
/**
*
* Constructor.
- *
+ *
* @param diSashModel
*/
public ContentChangedEventProvider(SashModel diSashModel) {
this.diSashModel = diSashModel;
activate();
}
-
+
/**
*
* Constructor.
- *
+ *
* @param diSashModel
*/
public ContentChangedEventProvider(SashWindowsMngr sashWindowMngr) {
this(sashWindowMngr.getSashModel());
}
-
+
/**
* Connect EMF changeListener to the {@link ContentChangeListenerManager}.
- * Changes in the EMF di model will be fired by the ContentChangeListenerManager.
+ * Changes in the EMF di model will be fired by the
+ * ContentChangeListenerManager.
*/
protected void activate() {
diSashModel.eAdapters().add(emfAdapter);
@@ -164,16 +165,15 @@ public class ContentChangedEventProvider implements IContentChangedProvider {
}
/**
- * Change event Adapter.
- * Forward EMF changeEvent to the {@link ContentChangeListenerManager}.
+ * Change event Adapter. Forward EMF changeEvent to the {@link ContentChangeListenerManager}.
*
* @author cedric dumoulin
*/
public class EMFAdapter extends EContentAdapter {
/**
- * ContentProvider Model has changed.
- * Changes includes : ADD, REMOVE and MOVE of elements
+ * ContentProvider Model has changed. Changes includes : ADD, REMOVE and
+ * MOVE of elements
*
* @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification)
*
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/DiContentProvider.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/DiContentProvider.java
index fbd263a39f6..76e55fc4bdd 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/DiContentProvider.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/DiContentProvider.java
@@ -24,7 +24,6 @@ import org.eclipse.papyrus.sashwindows.di.SashModel;
import org.eclipse.papyrus.sashwindows.di.SashPanel;
import org.eclipse.papyrus.sashwindows.di.TabFolder;
-
/**
* EMF implementation of the {@link ISashWindowsContentProvider}.
*
@@ -38,15 +37,18 @@ public class DiContentProvider implements ISashWindowsContentProvider {
/** Factory used to create SWT Editor or Component from Page Identifiers. */
private IPageModelFactory pageModelFactory;
- /** Object delivering event to listeners. Used to control how the events are triggered */
+ /**
+ * Object delivering event to listeners. Used to control how the events are
+ * triggered
+ */
private ContentChangedEventProvider contentChangedEventProvider;
-
/**
* Create a ContentProvider
*
* @param diSashModel
- * @param pageModelFactory The factory that will be used when a page will be created.
+ * @param pageModelFactory
+ * The factory that will be used when a page will be created.
* @throws IllegalArgumentException
* If the factory is null.
*/
@@ -59,7 +61,8 @@ public class DiContentProvider implements ISashWindowsContentProvider {
* Create a ContentProvider
*
* @param diSashModel
- * @param pageModelFactory The factory that will be used when a page will be created.
+ * @param pageModelFactory
+ * The factory that will be used when a page will be created.
* @throws IllegalArgumentException
* If the factory is null.
*/
@@ -74,8 +77,8 @@ public class DiContentProvider implements ISashWindowsContentProvider {
}
/**
- * Access to internal structure for tests.
- * This method is not intended to be used for other purpose.
+ * Access to internal structure for tests. This method is not intended to be
+ * used for other purpose.
*
* @return the diSashModel
*/
@@ -83,7 +86,6 @@ public class DiContentProvider implements ISashWindowsContentProvider {
return diSashModel;
}
-
/**
* @return the contentChangedEventProvider
*/
@@ -92,8 +94,8 @@ public class DiContentProvider implements ISashWindowsContentProvider {
}
/**
- * Add a page identifier to the SashModel. This page identifier will be added as "child" of the current
- * TabFolder.
+ * Add a page identifier to the SashModel. This page identifier will be
+ * added as "child" of the current TabFolder.
*
* @param pageIdentifier
*/
@@ -102,8 +104,8 @@ public class DiContentProvider implements ISashWindowsContentProvider {
}
/**
- * Add a page to the current folder.
- * Create the Page (Editor or Component) with the help of the factory.
+ * Add a page to the current folder. Create the Page (Editor or Component)
+ * with the help of the factory.
*
* @see org.eclipse.papyrus.sasheditor.contentprovider.ISashWindowsContentProvider#addPage(int,
* org.eclipse.papyrus.sasheditor.contentprovider.IPageModel)
@@ -166,8 +168,8 @@ public class DiContentProvider implements ISashWindowsContentProvider {
}
/**
- * Get the node used as root of the SashWindows.
- * For now, this is the first window.
+ * Get the node used as root of the SashWindows. For now, this is the first
+ * window.
*
* @see org.eclipse.papyrus.sasheditor.contentprovider.ISashWindowsContentProvider#getRootModel()
*
@@ -188,7 +190,6 @@ public class DiContentProvider implements ISashWindowsContentProvider {
*/
public IAbstractPanelModel createChildSashModel(Object root) {
-
if(root instanceof SashPanel)
return new SashPanelModel((SashPanel)root, pageModelFactory);
else if(root instanceof TabFolder)
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/PageMngrImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/PageMngrImpl.java
index 747f6e3c5be..a38cee57d76 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/PageMngrImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/PageMngrImpl.java
@@ -9,6 +9,7 @@
*
* Contributors:
* Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Anass Radouani (Atos) - add history management
*
*****************************************************************************/
@@ -17,16 +18,20 @@ package org.eclipse.papyrus.sasheditor.contentprovider.di.internal;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import java.util.Stack;
+import org.eclipse.jface.viewers.ISelection;
import org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr;
+import org.eclipse.papyrus.sasheditor.editor.IPage;
import org.eclipse.papyrus.sashwindows.di.PageRef;
import org.eclipse.papyrus.sashwindows.di.SashWindowsMngr;
-
+import org.eclipse.ui.ISelectionService;
+import org.eclipse.ui.PlatformUI;
/**
- * Implementation of the page manager.
- * The page manager provides basic methods to access the DiSashModel and its PageList.
- * This is the users interface to add, open, close and remove pages.
+ * Implementation of the page manager. The page manager provides basic methods
+ * to access the DiSashModel and its PageList. This is the users interface to
+ * add, open, close and remove pages.
*
* @author cedric dumoulin
*/
@@ -34,17 +39,64 @@ public class PageMngrImpl implements IPageMngr {
/** Internal EMF model */
private SashWindowsMngr diSashModel;
-
+
+ /** Contains the current page and previously opened pages */
+ private Stack<Object> previousStack = new Stack<Object>();
+
+ private Stack<Object> nextStack = new Stack<Object>();
+
+ /**
+ * true when an update is currently performed to not add a page two times to
+ * the stack
+ */
+ private boolean updating = false;
+
+ /** true when a page closing is currently performed */
+ private boolean closingPage = false;
+
ContentChangedEventProvider contentChangedEventProvider;
+ /**
+ * @return the updating
+ */
+ public boolean isUpdating() {
+ return updating;
+ }
+
+ /**
+ * @param updating
+ * the boolean to set
+ */
+ public void setUpdating(boolean updating) {
+ this.updating = updating;
+ }
+
+ /**
+ * @return the closingPage
+ */
+ public boolean isClosingPage() {
+ return closingPage;
+ }
+
+ /**
+ * @param closingPage
+ * the boolean to set
+ */
+ public void setClosingPage(boolean closingPage) {
+ this.closingPage = closingPage;
+ }
+
public PageMngrImpl(SashWindowsMngr diSashModel, ContentChangedEventProvider contentChangedEventProvider) {
this.diSashModel = diSashModel;
this.contentChangedEventProvider = contentChangedEventProvider;
+ if(diSashModel.getSashModel() != null && diSashModel.getSashModel().getCurrentSelection() != null && !diSashModel.getSashModel().getCurrentSelection().getChildren().isEmpty()) {
+ addToPreviousStack(diSashModel.getSashModel().getCurrentSelection().getChildren().get(0).getPageIdentifier());
+ }
}
/**
- * Add a page to the PageList. Do not open the corresponding editor.
- * The page will be visible in the list.
+ * Add a page to the PageList. Do not open the corresponding editor. The
+ * page will be visible in the list.
*
* @see org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr#addEditor(org.eclipse.emf.ecore.EObject)
*
@@ -52,7 +104,7 @@ public class PageMngrImpl implements IPageMngr {
*/
public void addPage(Object pageIdentifier) {
- // We do not need to disable event delivering,
+ // We do not need to disable event delivering,
// as addition to pageList doesn't fire events.
diSashModel.getPageList().addPage(pageIdentifier);
}
@@ -82,7 +134,7 @@ public class PageMngrImpl implements IPageMngr {
* @param pageIdentifier
*/
public void closePage(Object pageIdentifier) {
-
+
contentChangedEventProvider.setDeliver(false);
diSashModel.getSashModel().removePage(pageIdentifier);
contentChangedEventProvider.setDeliver(true);
@@ -96,7 +148,7 @@ public class PageMngrImpl implements IPageMngr {
* @param pageIdentifier
*/
public void closeAllOpenedPages() {
-
+
contentChangedEventProvider.setDeliver(false);
diSashModel.getSashModel().removeAllPages();
contentChangedEventProvider.setDeliver(true);
@@ -124,9 +176,37 @@ public class PageMngrImpl implements IPageMngr {
public void openPage(Object pageIdentifier) {
// Add the page to the SashModel and to the PageList
- // We do not need to disable event delivering as the operation already fired
+ // We do not need to disable event delivering as the operation already
+ // fired
// one single event.
+ addToPreviousStack(pageIdentifier);
+
+ Iterator<PageRef> iterator = diSashModel.getPageList().getAvailablePage().iterator();
+ boolean found = false;
+ while(iterator.hasNext() && found == false) {
+ // Bug #288806 : the test should be inversed
+ if(pageIdentifier.equals(iterator.next().getPageIdentifier())) {
+ found = true;
+ }
+ }
+ if(!found) {
+ diSashModel.getPageList().addPage(pageIdentifier);
+ }
+ diSashModel.getSashModel().addPage(pageIdentifier);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr#openPage(org.eclipse.emf.ecore.EObject)
+ *
+ * @param pageIdentifier
+ */
+ private void openPageWithoutStack(Object pageIdentifier) {
+ // Add the page to the SashModel and to the PageList
+
+ // We do not need to disable event delivering as the operation already
+ // fired
+ // one single event.
Iterator<PageRef> iterator = diSashModel.getPageList().getAvailablePage().iterator();
boolean found = false;
while(iterator.hasNext() && found == false) {
@@ -149,7 +229,7 @@ public class PageMngrImpl implements IPageMngr {
public void removePage(Object pageIdentifier) {
// remove from pageList and from SashModel
diSashModel.getPageList().removePage(pageIdentifier);
-
+
contentChangedEventProvider.setDeliver(false);
diSashModel.getSashModel().removePage(pageIdentifier);
contentChangedEventProvider.setDeliver(true);
@@ -166,4 +246,128 @@ public class PageMngrImpl implements IPageMngr {
return diSashModel.getSashModel().lookupPage(pageIdentifier) != null;
}
+ /**
+ *
+ * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr#openPrevious()
+ *
+ */
+ public void openPrevious() {
+
+ setUpdating(true);
+
+ if(previousStack.size() > 1) {
+ nextStack.push(previousStack.pop());
+ Object pageIdentifier = previousStack.peek();
+ if(isOpen(pageIdentifier)) {
+
+ closePage(pageIdentifier);
+ }
+ openPageWithoutStack(pageIdentifier);
+ }
+
+ setUpdating(false);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr#openNext()
+ *
+ */
+ public void openNext() {
+ setUpdating(true);
+ if(!nextStack.isEmpty()) {
+ Object pageIdentifier = nextStack.pop();
+ previousStack.push(pageIdentifier);
+ if(isOpen(pageIdentifier)) {
+ closePage(pageIdentifier);
+ }
+ openPageWithoutStack(pageIdentifier);
+ }
+ setUpdating(false);
+ }
+
+ /**
+ * Add a page to the previous Stack
+ *
+ * @param page
+ * the page to add
+ */
+ private void addToPreviousStack(Object page) {
+ if(previousStack.isEmpty() || previousStack.peek() != page) {
+ if(!nextStack.isEmpty()) {
+ nextStack.clear();
+ }
+ previousStack.push(page);
+ }
+ }
+
+ public void pageChanged(IPage newPage) {
+ if(newPage != null) {
+ if(!isUpdating() && !isClosingPage()) {
+ Object md = newPage.getRawModel();
+ if(md instanceof PageRef) {
+ Object page = ((PageRef)md).getPageIdentifier();// .getEmfPageIdentifier();
+ addToPreviousStack(page);
+ }
+ } else if(!isUpdating() && isClosingPage()) {
+ setClosingPage(false);
+ Object md = newPage.getRawModel();
+ if(md instanceof PageRef) {
+ Object page = ((PageRef)md).getPageIdentifier();
+ if(!previousStack.isEmpty()) {
+ previousStack.pop();
+ }
+ addToPreviousStack(page);
+ }
+ }
+ }
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr#hasPreviousHistory()
+ *
+ */
+ public boolean hasPreviousHistory() {
+ return previousStack.size() > 1;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr#hasNextHistory()
+ *
+ */
+ public boolean hasNextHistory() {
+ return !nextStack.isEmpty();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr#isInHsitory()
+ *
+ */
+ public int isInHsitory(Object pageIdentifier) {
+ return previousStack.lastIndexOf(pageIdentifier);
+ }
+
+ public void pageOpened(IPage page) {
+ setClosingPage(false);
+ }
+
+ public void pageClosed(IPage page) {
+ setClosingPage(true);
+ }
+
+ public void pageActivated(IPage page) {
+ }
+
+ public void pageDeactivated(IPage page) {
+ }
+
+ public void pageAboutToBeOpened(IPage page) {
+ }
+
+ public void pageAboutToBeClosed(IPage page) {
+ }
+
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/SashPanelModel.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/SashPanelModel.java
index 791a97bd150..f8f95a74400 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/SashPanelModel.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/SashPanelModel.java
@@ -22,7 +22,6 @@ import org.eclipse.papyrus.sasheditor.contentprovider.di.IPageModelFactory;
import org.eclipse.papyrus.sashwindows.di.SashPanel;
import org.eclipse.papyrus.sashwindows.di.TabFolder;
-
/**
* @author cedric dumoulin
*/
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/TabFolderModel.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/TabFolderModel.java
index ee0c1a47917..3bd82c7709c 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/TabFolderModel.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/TabFolderModel.java
@@ -22,7 +22,6 @@ import org.eclipse.papyrus.sasheditor.contentprovider.di.IPageModelFactory;
import org.eclipse.papyrus.sashwindows.di.PageRef;
import org.eclipse.papyrus.sashwindows.di.TabFolder;
-
/**
* @author dumoulin
*/
@@ -67,7 +66,6 @@ public class TabFolderModel implements ITabFolderModel {
return pageModelFactory.createIPageModel(pageRef.getPageIdentifier());
}
-
/**
* @return the tabFolder
*/
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/TransactionalDiContentProvider.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/TransactionalDiContentProvider.java
index df1faf4df18..540004320aa 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/TransactionalDiContentProvider.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/TransactionalDiContentProvider.java
@@ -9,11 +9,10 @@ import org.eclipse.papyrus.sasheditor.contentprovider.IAbstractPanelModel;
import org.eclipse.papyrus.sasheditor.contentprovider.ISashWindowsContentProvider;
import org.eclipse.papyrus.sasheditor.contentprovider.ITabFolderModel;
-
/**
- * A content provider based on EMF di and using Transactions.
- * This implementation is a wrapper on {@link DiContentProvider}.
- * Each method is wrapped in a {@link RecordingCommand}.
+ * A content provider based on EMF di and using Transactions. This
+ * implementation is a wrapper on {@link DiContentProvider}. Each method is
+ * wrapped in a {@link RecordingCommand}.
*
* @author cedric dumoulin
*
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/TransactionalPageMngrImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/TransactionalPageMngrImpl.java
index f7fa58e9be4..3bfe51eecb7 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/TransactionalPageMngrImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/internal/TransactionalPageMngrImpl.java
@@ -19,12 +19,11 @@ import java.util.List;
import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr;
-
+import org.eclipse.papyrus.sasheditor.editor.IPage;
/**
- * A PageMngr based on EMF di and using Transactions.
- * This implementation is a wrapper on {@link PageMngrImpl}.
- * Each method is wrapped in a {@link RecordingCommand}.
+ * A PageMngr based on EMF di and using Transactions. This implementation is a
+ * wrapper on {@link PageMngrImpl}. Each method is wrapped in a {@link RecordingCommand}.
*
* @author cedric dumoulin
*/
@@ -63,18 +62,14 @@ public class TransactionalPageMngrImpl implements IPageMngr {
* @param pageIdentifier
*/
public void addPage(final Object pageIdentifier) {
- TransactionalEditingDomain editingDomain = getTransactionalEditingDomain();
- RecordingCommand command = new RecordingCommand(editingDomain) {
+ new TransactionPageMngrRunnable() {
@Override
- protected void doExecute() {
+ public void doRun() {
pageMngr.addPage(pageIdentifier);
-
}
- };
-
- editingDomain.getCommandStack().execute(command);
+ }.run();
}
/**
@@ -92,18 +87,14 @@ public class TransactionalPageMngrImpl implements IPageMngr {
* @param pageIdentifier
*/
public void closePage(final Object pageIdentifier) {
- TransactionalEditingDomain editingDomain = getTransactionalEditingDomain();
- RecordingCommand command = new RecordingCommand(editingDomain) {
+ new TransactionPageMngrRunnable() {
@Override
- protected void doExecute() {
+ public void doRun() {
pageMngr.closePage(pageIdentifier);
-
}
- };
-
- editingDomain.getCommandStack().execute(command);
+ }.run();
}
/**
@@ -114,18 +105,14 @@ public class TransactionalPageMngrImpl implements IPageMngr {
* @param pageIdentifier
*/
public void closeAllOpenedPages() {
- TransactionalEditingDomain editingDomain = getTransactionalEditingDomain();
- RecordingCommand command = new RecordingCommand(editingDomain) {
+ new TransactionPageMngrRunnable() {
@Override
- protected void doExecute() {
+ public void doRun() {
pageMngr.closeAllOpenedPages();
-
}
- };
-
- editingDomain.getCommandStack().execute(command);
+ }.run();
}
/**
@@ -135,18 +122,14 @@ public class TransactionalPageMngrImpl implements IPageMngr {
* @param pageIdentifier
*/
public void closeOtherPages(final Object pageIdentifier) {
- TransactionalEditingDomain editingDomain = getTransactionalEditingDomain();
- RecordingCommand command = new RecordingCommand(editingDomain) {
+ new TransactionPageMngrRunnable() {
@Override
- protected void doExecute() {
+ public void doRun() {
pageMngr.closeOtherPages(pageIdentifier);
-
}
- };
-
- editingDomain.getCommandStack().execute(command);
+ }.run();
}
/**
@@ -155,18 +138,14 @@ public class TransactionalPageMngrImpl implements IPageMngr {
* @param pageIdentifier
*/
public void openPage(final Object pageIdentifier) {
- TransactionalEditingDomain editingDomain = getTransactionalEditingDomain();
- RecordingCommand command = new RecordingCommand(editingDomain) {
+ new TransactionPageMngrRunnable() {
@Override
- protected void doExecute() {
+ public void doRun() {
pageMngr.openPage(pageIdentifier);
-
}
- };
-
- editingDomain.getCommandStack().execute(command);
+ }.run();
}
/**
@@ -175,18 +154,14 @@ public class TransactionalPageMngrImpl implements IPageMngr {
* @param pageIdentifier
*/
public void removePage(final Object pageIdentifier) {
- TransactionalEditingDomain editingDomain = getTransactionalEditingDomain();
- RecordingCommand command = new RecordingCommand(editingDomain) {
+ new TransactionPageMngrRunnable() {
@Override
- protected void doExecute() {
+ public void doRun() {
pageMngr.removePage(pageIdentifier);
-
}
- };
-
- editingDomain.getCommandStack().execute(command);
+ }.run();
}
/**
@@ -200,4 +175,143 @@ public class TransactionalPageMngrImpl implements IPageMngr {
return pageMngr.isOpen(pageIdentifier);
}
+ /**
+ *
+ * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr#openPrevious()
+ *
+ */
+ public void openPrevious() {
+
+ new TransactionPageMngrRunnable() {
+
+ @Override
+ public void doRun() {
+ pageMngr.openPrevious();
+ }
+ }.run();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr#openNext()
+ *
+ */
+ public void openNext() {
+
+ new TransactionPageMngrRunnable() {
+
+ @Override
+ public void doRun() {
+ pageMngr.openNext();
+ }
+ }.run();
+ }
+
+ public void pageChanged(final IPage page) {
+ new TransactionPageMngrRunnable() {
+
+ @Override
+ public void doRun() {
+ pageMngr.pageChanged(page);
+ }
+ }.run();
+
+ }
+
+ /**
+ * class runnable to encapsulate a command
+ *
+ * @author aradouan
+ *
+ */
+ public abstract class TransactionPageMngrRunnable implements Runnable {
+
+ public void run() {
+ TransactionalEditingDomain editingDomain = getTransactionalEditingDomain();
+ RecordingCommand command = new RecordingCommand(editingDomain) {
+
+ @Override
+ protected void doExecute() {
+ doRun();
+ }
+ };
+ editingDomain.getCommandStack().execute(command);
+ }
+
+ public abstract void doRun();
+
+ }
+
+ public void pageOpened(final IPage page) {
+ new TransactionPageMngrRunnable() {
+
+ @Override
+ public void doRun() {
+ pageMngr.pageOpened(page);
+ }
+ }.run();
+ }
+
+ public void pageClosed(final IPage page) {
+ new TransactionPageMngrRunnable() {
+
+ @Override
+ public void doRun() {
+ pageMngr.pageClosed(page);
+ }
+ }.run();
+ }
+
+ public void pageActivated(final IPage page) {
+ new TransactionPageMngrRunnable() {
+
+ @Override
+ public void doRun() {
+ pageMngr.pageActivated(page);
+ }
+ }.run();
+ }
+
+ public void pageDeactivated(final IPage page) {
+ new TransactionPageMngrRunnable() {
+
+ @Override
+ public void doRun() {
+ pageMngr.pageDeactivated(page);
+ }
+ }.run();
+ }
+
+ public void pageAboutToBeOpened(final IPage page) {
+ new TransactionPageMngrRunnable() {
+
+ @Override
+ public void doRun() {
+ pageMngr.pageAboutToBeOpened(page);
+ }
+ }.run();
+ }
+
+ public void pageAboutToBeClosed(final IPage page) {
+ new TransactionPageMngrRunnable() {
+
+ @Override
+ public void doRun() {
+ pageMngr.pageAboutToBeClosed(page);
+ }
+ }.run();
+ }
+
+ public boolean hasPreviousHistory() {
+ return pageMngr.hasPreviousHistory();
+ }
+
+ public boolean hasNextHistory() {
+ return pageMngr.hasNextHistory();
+ }
+
+ public int isInHsitory(Object pageIdentifier) {
+ return pageMngr.isInHsitory(pageIdentifier);
+ }
+
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/utils/IPageUtils.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/utils/IPageUtils.java
index f179b1166e8..ddf15195761 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/utils/IPageUtils.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/custom-src/org/eclipse/papyrus/sasheditor/contentprovider/di/utils/IPageUtils.java
@@ -17,30 +17,30 @@ package org.eclipse.papyrus.sasheditor.contentprovider.di.utils;
import org.eclipse.papyrus.sasheditor.editor.IPage;
import org.eclipse.papyrus.sashwindows.di.PageRef;
-
/**
- * Class providing a utility methods allowing to get the real Model from the {@link IPage#getRawModel()}.
- * The utility takes into account the bug 309943.
+ * Class providing a utility methods allowing to get the real Model from the {@link IPage#getRawModel()}. The utility takes into account the bug
+ * 309943.
*
* @author cedric dumoulin
- *
+ *
*/
public class IPageUtils {
-
+
/**
- * Get the real model rather than the PageRef. This method is a trick to temporally solve the bug 309943.
+ * Get the real model rather than the PageRef. This method is a trick to
+ * temporally solve the bug 309943.
+ *
* @param page
* @return
*/
public static Object getRawModel(IPage page) {
-
+
if(page == null)
return null;
-
+
Object pageModel = page.getRawModel();
// Get the real model because of bug
- if( pageModel instanceof PageRef)
- {
+ if(pageModel instanceof PageRef) {
return ((PageRef)pageModel).getPageIdentifier();
}
// do not use trick
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/AbstractPage.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/AbstractPage.java
index d123cd0ee02..15b0d907d99 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/AbstractPage.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/AbstractPage.java
@@ -9,14 +9,13 @@ package org.eclipse.papyrus.sashwindows.di;
import org.eclipse.emf.ecore.EObject;
/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Abstract Page</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Abstract Page</b></em>'. <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.AbstractPage#getPageIdentifier <em>Page Identifier</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.AbstractPage#getPageIdentifier
+ * <em>Page Identifier</em>}</li>
* </ul>
* </p>
*
@@ -37,15 +36,17 @@ public interface AbstractPage extends EObject {
* @return the value of the '<em>Page Identifier</em>' attribute.
* @see #setPageIdentifier(Object)
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#getAbstractPage_PageIdentifier()
- * @model unique="false" dataType="org.eclipse.papyrus.sashwindows.di.JavaObject" required="true" ordered="false"
+ * @model unique="false"
+ * dataType="org.eclipse.papyrus.sashwindows.di.JavaObject"
+ * required="true" ordered="false"
* @generated
*/
Object getPageIdentifier();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.AbstractPage#getPageIdentifier <em>Page Identifier</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.AbstractPage#getPageIdentifier
+ * <em>Page Identifier</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @param value
* the new value of the '<em>Page Identifier</em>' attribute.
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/AbstractPanel.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/AbstractPanel.java
index c3a04c39539..6113ae01962 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/AbstractPanel.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/AbstractPanel.java
@@ -9,14 +9,12 @@ package org.eclipse.papyrus.sashwindows.di;
import org.eclipse.emf.ecore.EObject;
/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Abstract Panel</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Abstract Panel</b></em>'. <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.AbstractPanel#getParent <em>Parent</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.AbstractPanel#getParent <em> Parent</em>}</li>
* </ul>
* </p>
*
@@ -27,9 +25,9 @@ import org.eclipse.emf.ecore.EObject;
public interface AbstractPanel extends EObject {
/**
- * Returns the value of the '<em><b>Parent</b></em>' container reference.
- * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.sashwindows.di.PanelParent#getChildren <em>Children</em>}'.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Parent</b></em>' container reference. It
+ * is bidirectional and its opposite is ' {@link org.eclipse.papyrus.sashwindows.di.PanelParent#getChildren
+ * <em>Children</em>}'. <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Parent</em>' container reference isn't clear, there really should be more of a description here...
* </p>
@@ -39,15 +37,16 @@ public interface AbstractPanel extends EObject {
* @see #setParent(PanelParent)
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#getAbstractPanel_Parent()
* @see org.eclipse.papyrus.sashwindows.di.PanelParent#getChildren
- * @model opposite="children" required="true" transient="false" ordered="false"
+ * @model opposite="children" required="true" transient="false"
+ * ordered="false"
* @generated
*/
PanelParent getParent();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.AbstractPanel#getParent <em>Parent</em>}' container reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.AbstractPanel#getParent
+ * <em>Parent</em>}' container reference. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @param value
* the new value of the '<em>Parent</em>' container reference.
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/DiFactory.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/DiFactory.java
index 9530671bd97..74958488500 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/DiFactory.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/DiFactory.java
@@ -9,120 +9,119 @@ package org.eclipse.papyrus.sashwindows.di;
import org.eclipse.emf.ecore.EFactory;
/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a
+ * create method for each non-abstract class of the model. <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.DiPackage
* @generated
*/
public interface DiFactory extends EFactory {
/**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The singleton instance of the factory. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
DiFactory eINSTANCE = org.eclipse.papyrus.sashwindows.di.impl.DiFactoryImpl.init();
/**
- * Returns a new object of class '<em>Sash Model</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns a new object of class '<em>Sash Model</em>'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Sash Model</em>'.
* @generated
*/
SashModel createSashModel();
/**
- * Returns a new object of class '<em>Window</em>'.
- * <!-- begin-user-doc -->
+ * Returns a new object of class '<em>Window</em>'. <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Window</em>'.
* @generated
*/
Window createWindow();
/**
- * Returns a new object of class '<em>Position</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns a new object of class '<em>Position</em>'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Position</em>'.
* @generated
*/
Position createPosition();
/**
- * Returns a new object of class '<em>Size</em>'.
- * <!-- begin-user-doc -->
+ * Returns a new object of class '<em>Size</em>'. <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Size</em>'.
* @generated
*/
Size createSize();
/**
- * Returns a new object of class '<em>Tab Folder</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns a new object of class '<em>Tab Folder</em>'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Tab Folder</em>'.
* @generated
*/
TabFolder createTabFolder();
/**
- * Returns a new object of class '<em>Page Ref</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns a new object of class '<em>Page Ref</em>'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Page Ref</em>'.
* @generated
*/
PageRef createPageRef();
/**
- * Returns a new object of class '<em>Sash Panel</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns a new object of class '<em>Sash Panel</em>'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Sash Panel</em>'.
* @generated
*/
SashPanel createSashPanel();
/**
- * Returns a new object of class '<em>Abstract Page</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns a new object of class '<em>Abstract Page</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Abstract Page</em>'.
* @generated
*/
AbstractPage createAbstractPage();
/**
- * Returns a new object of class '<em>Page List</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns a new object of class '<em>Page List</em>'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Page List</em>'.
* @generated
*/
PageList createPageList();
/**
- * Returns a new object of class '<em>Sash Windows Mngr</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns a new object of class '<em>Sash Windows Mngr</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Sash Windows Mngr</em>'.
* @generated
*/
SashWindowsMngr createSashWindowsMngr();
/**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
+ * Returns the package supported by this factory. <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the package supported by this factory.
* @generated
*/
DiPackage getDiPackage();
-} //DiFactory
+} // DiFactory
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/DiPackage.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/DiPackage.java
index 8caa2db690e..35029867070 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/DiPackage.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/DiPackage.java
@@ -13,9 +13,8 @@ import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
+ * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains
+ * accessors for the meta objects to represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
@@ -23,6 +22,7 @@ import org.eclipse.emf.ecore.EReference;
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.DiFactory
* @model kind="package"
* @generated
@@ -30,41 +30,39 @@ import org.eclipse.emf.ecore.EReference;
public interface DiPackage extends EPackage {
/**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The package name. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
String eNAME = "di";
/**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
String eNS_URI = "http://www.eclipse.org/papyrus/0.7.0/sashdi";
/**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
String eNS_PREFIX = "di";
/**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The singleton instance of the package. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
DiPackage eINSTANCE = org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl.init();
/**
- * The meta object id for the '{@link org.eclipse.papyrus.sashwindows.di.impl.SashModelImpl <em>Sash Model</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.SashModelImpl
+ * <em>Sash Model</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.SashModelImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getSashModel()
* @generated
@@ -72,9 +70,9 @@ public interface DiPackage extends EPackage {
int SASH_MODEL = 0;
/**
- * The feature id for the '<em><b>Windows</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Windows</b></em>' containment reference
+ * list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -82,8 +80,8 @@ public interface DiPackage extends EPackage {
/**
* The feature id for the '<em><b>Current Selection</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -91,17 +89,18 @@ public interface DiPackage extends EPackage {
/**
* The number of structural features of the '<em>Sash Model</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int SASH_MODEL_FEATURE_COUNT = 2;
/**
- * The meta object id for the '{@link org.eclipse.papyrus.sashwindows.di.impl.PanelParentImpl <em>Panel Parent</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.PanelParentImpl
+ * <em>Panel Parent</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.PanelParentImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getPanelParent()
* @generated
@@ -109,9 +108,9 @@ public interface DiPackage extends EPackage {
int PANEL_PARENT = 2;
/**
- * The feature id for the '<em><b>Children</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Children</b></em>' containment reference
+ * list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -119,17 +118,17 @@ public interface DiPackage extends EPackage {
/**
* The number of structural features of the '<em>Panel Parent</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int PANEL_PARENT_FEATURE_COUNT = 1;
/**
- * The meta object id for the '{@link org.eclipse.papyrus.sashwindows.di.impl.WindowImpl <em>Window</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.WindowImpl
+ * <em>Window</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.WindowImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getWindow()
* @generated
@@ -137,54 +136,55 @@ public interface DiPackage extends EPackage {
int WINDOW = 1;
/**
- * The feature id for the '<em><b>Children</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Children</b></em>' containment reference
+ * list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int WINDOW__CHILDREN = PANEL_PARENT__CHILDREN;
/**
- * The feature id for the '<em><b>Position</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Position</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int WINDOW__POSITION = PANEL_PARENT_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>Size</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Size</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int WINDOW__SIZE = PANEL_PARENT_FEATURE_COUNT + 1;
/**
- * The feature id for the '<em><b>Panel</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Panel</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int WINDOW__PANEL = PANEL_PARENT_FEATURE_COUNT + 2;
/**
- * The number of structural features of the '<em>Window</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The number of structural features of the '<em>Window</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int WINDOW_FEATURE_COUNT = PANEL_PARENT_FEATURE_COUNT + 3;
/**
- * The meta object id for the '{@link org.eclipse.papyrus.sashwindows.di.impl.AbstractPanelImpl <em>Abstract Panel</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.AbstractPanelImpl
+ * <em>Abstract Panel</em>}' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.AbstractPanelImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getAbstractPanel()
* @generated
@@ -192,9 +192,9 @@ public interface DiPackage extends EPackage {
int ABSTRACT_PANEL = 3;
/**
- * The feature id for the '<em><b>Parent</b></em>' container reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Parent</b></em>' container reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -202,17 +202,17 @@ public interface DiPackage extends EPackage {
/**
* The number of structural features of the '<em>Abstract Panel</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int ABSTRACT_PANEL_FEATURE_COUNT = 1;
/**
- * The meta object id for the '{@link org.eclipse.papyrus.sashwindows.di.impl.PositionImpl <em>Position</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.PositionImpl
+ * <em>Position</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.PositionImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getPosition()
* @generated
@@ -220,36 +220,36 @@ public interface DiPackage extends EPackage {
int POSITION = 4;
/**
- * The feature id for the '<em><b>X</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>X</b></em>' attribute. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int POSITION__X = 0;
/**
- * The feature id for the '<em><b>Y</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Y</b></em>' attribute. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int POSITION__Y = 1;
/**
- * The number of structural features of the '<em>Position</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The number of structural features of the '<em>Position</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int POSITION_FEATURE_COUNT = 2;
/**
- * The meta object id for the '{@link org.eclipse.papyrus.sashwindows.di.impl.SizeImpl <em>Size</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.SizeImpl <em>Size</em>}'
+ * class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.SizeImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getSize()
* @generated
@@ -257,36 +257,37 @@ public interface DiPackage extends EPackage {
int SIZE = 5;
/**
- * The feature id for the '<em><b>Width</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Width</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int SIZE__WIDTH = 0;
/**
- * The feature id for the '<em><b>Length</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Length</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int SIZE__LENGTH = 1;
/**
- * The number of structural features of the '<em>Size</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The number of structural features of the '<em>Size</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int SIZE_FEATURE_COUNT = 2;
/**
- * The meta object id for the '{@link org.eclipse.papyrus.sashwindows.di.impl.TabFolderImpl <em>Tab Folder</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.TabFolderImpl
+ * <em>Tab Folder</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.TabFolderImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getTabFolder()
* @generated
@@ -294,18 +295,18 @@ public interface DiPackage extends EPackage {
int TAB_FOLDER = 6;
/**
- * The feature id for the '<em><b>Parent</b></em>' container reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Parent</b></em>' container reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int TAB_FOLDER__PARENT = ABSTRACT_PANEL__PARENT;
/**
- * The feature id for the '<em><b>Children</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Children</b></em>' containment reference
+ * list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -313,17 +314,17 @@ public interface DiPackage extends EPackage {
/**
* The number of structural features of the '<em>Tab Folder</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int TAB_FOLDER_FEATURE_COUNT = ABSTRACT_PANEL_FEATURE_COUNT + 1;
/**
- * The meta object id for the '{@link org.eclipse.papyrus.sashwindows.di.impl.PageRefImpl <em>Page Ref</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.PageRefImpl
+ * <em>Page Ref</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.PageRefImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getPageRef()
* @generated
@@ -332,53 +333,54 @@ public interface DiPackage extends EPackage {
/**
* The feature id for the '<em><b>Emf Page Identifier</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int PAGE_REF__EMF_PAGE_IDENTIFIER = 0;
/**
- * The feature id for the '<em><b>Page Identifier</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Page Identifier</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int PAGE_REF__PAGE_IDENTIFIER = 1;
/**
- * The feature id for the '<em><b>Object Page Identifier</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Object Page Identifier</b></em>'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int PAGE_REF__OBJECT_PAGE_IDENTIFIER = 2;
/**
- * The feature id for the '<em><b>Parent</b></em>' container reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Parent</b></em>' container reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int PAGE_REF__PARENT = 3;
/**
- * The number of structural features of the '<em>Page Ref</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The number of structural features of the '<em>Page Ref</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int PAGE_REF_FEATURE_COUNT = 4;
/**
- * The meta object id for the '{@link org.eclipse.papyrus.sashwindows.di.impl.SashPanelImpl <em>Sash Panel</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.SashPanelImpl
+ * <em>Sash Panel</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.SashPanelImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getSashPanel()
* @generated
@@ -386,36 +388,36 @@ public interface DiPackage extends EPackage {
int SASH_PANEL = 8;
/**
- * The feature id for the '<em><b>Parent</b></em>' container reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Parent</b></em>' container reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int SASH_PANEL__PARENT = ABSTRACT_PANEL__PARENT;
/**
- * The feature id for the '<em><b>Children</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Children</b></em>' containment reference
+ * list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int SASH_PANEL__CHILDREN = ABSTRACT_PANEL_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>Sash Position</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Sash Position</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int SASH_PANEL__SASH_POSITION = ABSTRACT_PANEL_FEATURE_COUNT + 1;
/**
- * The feature id for the '<em><b>Direction</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Direction</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -423,17 +425,18 @@ public interface DiPackage extends EPackage {
/**
* The number of structural features of the '<em>Sash Panel</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int SASH_PANEL_FEATURE_COUNT = ABSTRACT_PANEL_FEATURE_COUNT + 3;
/**
- * The meta object id for the '{@link org.eclipse.papyrus.sashwindows.di.impl.AbstractPageImpl <em>Abstract Page</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.AbstractPageImpl
+ * <em>Abstract Page</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.AbstractPageImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getAbstractPage()
* @generated
@@ -441,9 +444,9 @@ public interface DiPackage extends EPackage {
int ABSTRACT_PAGE = 9;
/**
- * The feature id for the '<em><b>Page Identifier</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Page Identifier</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -451,17 +454,17 @@ public interface DiPackage extends EPackage {
/**
* The number of structural features of the '<em>Abstract Page</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int ABSTRACT_PAGE_FEATURE_COUNT = 1;
/**
- * The meta object id for the '{@link org.eclipse.papyrus.sashwindows.di.impl.PageListImpl <em>Page List</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.PageListImpl
+ * <em>Page List</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.PageListImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getPageList()
* @generated
@@ -469,27 +472,28 @@ public interface DiPackage extends EPackage {
int PAGE_LIST = 10;
/**
- * The feature id for the '<em><b>Available Page</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Available Page</b></em>' containment
+ * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int PAGE_LIST__AVAILABLE_PAGE = 0;
/**
- * The number of structural features of the '<em>Page List</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The number of structural features of the '<em>Page List</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int PAGE_LIST_FEATURE_COUNT = 1;
/**
- * The meta object id for the '{@link org.eclipse.papyrus.sashwindows.di.impl.SashWindowsMngrImpl <em>Sash Windows Mngr</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.SashWindowsMngrImpl
+ * <em>Sash Windows Mngr</em>}' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.SashWindowsMngrImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getSashWindowsMngr()
* @generated
@@ -498,44 +502,44 @@ public interface DiPackage extends EPackage {
/**
* The feature id for the '<em><b>Page List</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int SASH_WINDOWS_MNGR__PAGE_LIST = 0;
/**
- * The feature id for the '<em><b>Sash Model</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The feature id for the '<em><b>Sash Model</b></em>' containment
+ * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int SASH_WINDOWS_MNGR__SASH_MODEL = 1;
/**
- * The number of structural features of the '<em>Sash Windows Mngr</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The number of structural features of the '<em>Sash Windows Mngr</em>'
+ * class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
int SASH_WINDOWS_MNGR_FEATURE_COUNT = 2;
/**
- * The meta object id for the '<em>int</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the '<em>int</em>' data type. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getint()
* @generated
*/
int INT = 12;
/**
- * The meta object id for the '<em>Java Object</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the '<em>Java Object</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @see java.lang.Object
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getJavaObject()
* @generated
@@ -543,28 +547,27 @@ public interface DiPackage extends EPackage {
int JAVA_OBJECT = 13;
/**
- * The meta object id for the '<em>Float</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the '<em>Float</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getFloat()
* @generated
*/
int FLOAT = 14;
/**
- * The meta object id for the '<em>boolean</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object id for the '<em>boolean</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getboolean()
* @generated
*/
int BOOLEAN = 15;
-
/**
- * Returns the meta object for class '{@link org.eclipse.papyrus.sashwindows.di.SashModel <em>Sash Model</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sashwindows.di.SashModel <em>Sash Model</em>} '. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @return the meta object for class '<em>Sash Model</em>'.
* @see org.eclipse.papyrus.sashwindows.di.SashModel
* @generated
@@ -572,10 +575,10 @@ public interface DiPackage extends EPackage {
EClass getSashModel();
/**
- * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.sashwindows.di.SashModel#getWindows <em>Windows</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Windows</em>'.
+ * Returns the meta object for the containment reference list ' {@link org.eclipse.papyrus.sashwindows.di.SashModel#getWindows
+ * <em>Windows</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list ' <em>Windows</em>'.
* @see org.eclipse.papyrus.sashwindows.di.SashModel#getWindows()
* @see #getSashModel()
* @generated
@@ -583,9 +586,10 @@ public interface DiPackage extends EPackage {
EReference getSashModel_Windows();
/**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.sashwindows.di.SashModel#getCurrentSelection <em>Current Selection</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for the reference ' {@link org.eclipse.papyrus.sashwindows.di.SashModel#getCurrentSelection
+ * <em>Current Selection</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @return the meta object for the reference '<em>Current Selection</em>'.
* @see org.eclipse.papyrus.sashwindows.di.SashModel#getCurrentSelection()
* @see #getSashModel()
@@ -594,9 +598,9 @@ public interface DiPackage extends EPackage {
EReference getSashModel_CurrentSelection();
/**
- * Returns the meta object for class '{@link org.eclipse.papyrus.sashwindows.di.Window <em>Window</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sashwindows.di.Window <em>Window</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Window</em>'.
* @see org.eclipse.papyrus.sashwindows.di.Window
* @generated
@@ -604,9 +608,9 @@ public interface DiPackage extends EPackage {
EClass getWindow();
/**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.sashwindows.di.Window#getPosition <em>Position</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for the reference ' {@link org.eclipse.papyrus.sashwindows.di.Window#getPosition
+ * <em>Position</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for the reference '<em>Position</em>'.
* @see org.eclipse.papyrus.sashwindows.di.Window#getPosition()
* @see #getWindow()
@@ -615,9 +619,9 @@ public interface DiPackage extends EPackage {
EReference getWindow_Position();
/**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.sashwindows.di.Window#getSize <em>Size</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for the reference ' {@link org.eclipse.papyrus.sashwindows.di.Window#getSize <em>Size</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for the reference '<em>Size</em>'.
* @see org.eclipse.papyrus.sashwindows.di.Window#getSize()
* @see #getWindow()
@@ -626,9 +630,9 @@ public interface DiPackage extends EPackage {
EReference getWindow_Size();
/**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.sashwindows.di.Window#getPanel <em>Panel</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for the reference ' {@link org.eclipse.papyrus.sashwindows.di.Window#getPanel <em>Panel</em>} '. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @return the meta object for the reference '<em>Panel</em>'.
* @see org.eclipse.papyrus.sashwindows.di.Window#getPanel()
* @see #getWindow()
@@ -637,9 +641,9 @@ public interface DiPackage extends EPackage {
EReference getWindow_Panel();
/**
- * Returns the meta object for class '{@link org.eclipse.papyrus.sashwindows.di.PanelParent <em>Panel Parent</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sashwindows.di.PanelParent
+ * <em>Panel Parent</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Panel Parent</em>'.
* @see org.eclipse.papyrus.sashwindows.di.PanelParent
* @generated
@@ -647,10 +651,10 @@ public interface DiPackage extends EPackage {
EClass getPanelParent();
/**
- * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.sashwindows.di.PanelParent#getChildren <em>Children</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Children</em>'.
+ * Returns the meta object for the containment reference list ' {@link org.eclipse.papyrus.sashwindows.di.PanelParent#getChildren
+ * <em>Children</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list ' <em>Children</em>'.
* @see org.eclipse.papyrus.sashwindows.di.PanelParent#getChildren()
* @see #getPanelParent()
* @generated
@@ -658,9 +662,9 @@ public interface DiPackage extends EPackage {
EReference getPanelParent_Children();
/**
- * Returns the meta object for class '{@link org.eclipse.papyrus.sashwindows.di.AbstractPanel <em>Abstract Panel</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sashwindows.di.AbstractPanel
+ * <em>Abstract Panel</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Abstract Panel</em>'.
* @see org.eclipse.papyrus.sashwindows.di.AbstractPanel
* @generated
@@ -668,9 +672,9 @@ public interface DiPackage extends EPackage {
EClass getAbstractPanel();
/**
- * Returns the meta object for the container reference '{@link org.eclipse.papyrus.sashwindows.di.AbstractPanel#getParent <em>Parent</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for the container reference ' {@link org.eclipse.papyrus.sashwindows.di.AbstractPanel#getParent
+ * <em>Parent</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for the container reference '<em>Parent</em>'.
* @see org.eclipse.papyrus.sashwindows.di.AbstractPanel#getParent()
* @see #getAbstractPanel()
@@ -679,9 +683,9 @@ public interface DiPackage extends EPackage {
EReference getAbstractPanel_Parent();
/**
- * Returns the meta object for class '{@link org.eclipse.papyrus.sashwindows.di.Position <em>Position</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sashwindows.di.Position <em>Position</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Position</em>'.
* @see org.eclipse.papyrus.sashwindows.di.Position
* @generated
@@ -689,9 +693,9 @@ public interface DiPackage extends EPackage {
EClass getPosition();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sashwindows.di.Position#getX <em>X</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.sashwindows.di.Position#getX <em>X</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>X</em>'.
* @see org.eclipse.papyrus.sashwindows.di.Position#getX()
* @see #getPosition()
@@ -700,9 +704,9 @@ public interface DiPackage extends EPackage {
EAttribute getPosition_X();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sashwindows.di.Position#getY <em>Y</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.sashwindows.di.Position#getY <em>Y</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Y</em>'.
* @see org.eclipse.papyrus.sashwindows.di.Position#getY()
* @see #getPosition()
@@ -711,9 +715,9 @@ public interface DiPackage extends EPackage {
EAttribute getPosition_Y();
/**
- * Returns the meta object for class '{@link org.eclipse.papyrus.sashwindows.di.Size <em>Size</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sashwindows.di.Size <em>Size</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Size</em>'.
* @see org.eclipse.papyrus.sashwindows.di.Size
* @generated
@@ -721,9 +725,9 @@ public interface DiPackage extends EPackage {
EClass getSize();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sashwindows.di.Size#getWidth <em>Width</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.sashwindows.di.Size#getWidth <em>Width</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Width</em>'.
* @see org.eclipse.papyrus.sashwindows.di.Size#getWidth()
* @see #getSize()
@@ -732,9 +736,9 @@ public interface DiPackage extends EPackage {
EAttribute getSize_Width();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sashwindows.di.Size#getLength <em>Length</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.sashwindows.di.Size#getLength <em>Length</em>} '. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Length</em>'.
* @see org.eclipse.papyrus.sashwindows.di.Size#getLength()
* @see #getSize()
@@ -743,9 +747,9 @@ public interface DiPackage extends EPackage {
EAttribute getSize_Length();
/**
- * Returns the meta object for class '{@link org.eclipse.papyrus.sashwindows.di.TabFolder <em>Tab Folder</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sashwindows.di.TabFolder <em>Tab Folder</em>} '. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @return the meta object for class '<em>Tab Folder</em>'.
* @see org.eclipse.papyrus.sashwindows.di.TabFolder
* @generated
@@ -753,10 +757,10 @@ public interface DiPackage extends EPackage {
EClass getTabFolder();
/**
- * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.sashwindows.di.TabFolder#getChildren <em>Children</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Children</em>'.
+ * Returns the meta object for the containment reference list ' {@link org.eclipse.papyrus.sashwindows.di.TabFolder#getChildren
+ * <em>Children</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list ' <em>Children</em>'.
* @see org.eclipse.papyrus.sashwindows.di.TabFolder#getChildren()
* @see #getTabFolder()
* @generated
@@ -764,9 +768,9 @@ public interface DiPackage extends EPackage {
EReference getTabFolder_Children();
/**
- * Returns the meta object for class '{@link org.eclipse.papyrus.sashwindows.di.PageRef <em>Page Ref</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sashwindows.di.PageRef <em>Page Ref</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Page Ref</em>'.
* @see org.eclipse.papyrus.sashwindows.di.PageRef
* @generated
@@ -774,9 +778,10 @@ public interface DiPackage extends EPackage {
EClass getPageRef();
/**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.sashwindows.di.PageRef#getEmfPageIdentifier <em>Emf Page Identifier</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for the reference ' {@link org.eclipse.papyrus.sashwindows.di.PageRef#getEmfPageIdentifier
+ * <em>Emf Page Identifier</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @return the meta object for the reference '<em>Emf Page Identifier</em>'.
* @see org.eclipse.papyrus.sashwindows.di.PageRef#getEmfPageIdentifier()
* @see #getPageRef()
@@ -785,9 +790,9 @@ public interface DiPackage extends EPackage {
EReference getPageRef_EmfPageIdentifier();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sashwindows.di.PageRef#getPageIdentifier <em>Page Identifier</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.sashwindows.di.PageRef#getPageIdentifier
+ * <em>Page Identifier</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Page Identifier</em>'.
* @see org.eclipse.papyrus.sashwindows.di.PageRef#getPageIdentifier()
* @see #getPageRef()
@@ -796,10 +801,11 @@ public interface DiPackage extends EPackage {
EAttribute getPageRef_PageIdentifier();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sashwindows.di.PageRef#getObjectPageIdentifier <em>Object Page Identifier</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Object Page Identifier</em>'.
+ * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.sashwindows.di.PageRef#getObjectPageIdentifier
+ * <em>Object Page Identifier</em>}'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the attribute ' <em>Object Page Identifier</em>'.
* @see org.eclipse.papyrus.sashwindows.di.PageRef#getObjectPageIdentifier()
* @see #getPageRef()
* @generated
@@ -807,9 +813,9 @@ public interface DiPackage extends EPackage {
EAttribute getPageRef_ObjectPageIdentifier();
/**
- * Returns the meta object for the container reference '{@link org.eclipse.papyrus.sashwindows.di.PageRef#getParent <em>Parent</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for the container reference ' {@link org.eclipse.papyrus.sashwindows.di.PageRef#getParent
+ * <em>Parent</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for the container reference '<em>Parent</em>'.
* @see org.eclipse.papyrus.sashwindows.di.PageRef#getParent()
* @see #getPageRef()
@@ -818,9 +824,9 @@ public interface DiPackage extends EPackage {
EReference getPageRef_Parent();
/**
- * Returns the meta object for class '{@link org.eclipse.papyrus.sashwindows.di.SashPanel <em>Sash Panel</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sashwindows.di.SashPanel <em>Sash Panel</em>} '. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @return the meta object for class '<em>Sash Panel</em>'.
* @see org.eclipse.papyrus.sashwindows.di.SashPanel
* @generated
@@ -828,9 +834,9 @@ public interface DiPackage extends EPackage {
EClass getSashPanel();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sashwindows.di.SashPanel#getSashPosition <em>Sash Position</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.sashwindows.di.SashPanel#getSashPosition
+ * <em>Sash Position</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Sash Position</em>'.
* @see org.eclipse.papyrus.sashwindows.di.SashPanel#getSashPosition()
* @see #getSashPanel()
@@ -839,9 +845,9 @@ public interface DiPackage extends EPackage {
EAttribute getSashPanel_SashPosition();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sashwindows.di.SashPanel#getDirection <em>Direction</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.sashwindows.di.SashPanel#getDirection
+ * <em>Direction</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Direction</em>'.
* @see org.eclipse.papyrus.sashwindows.di.SashPanel#getDirection()
* @see #getSashPanel()
@@ -850,9 +856,9 @@ public interface DiPackage extends EPackage {
EAttribute getSashPanel_Direction();
/**
- * Returns the meta object for class '{@link org.eclipse.papyrus.sashwindows.di.AbstractPage <em>Abstract Page</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sashwindows.di.AbstractPage
+ * <em>Abstract Page</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Abstract Page</em>'.
* @see org.eclipse.papyrus.sashwindows.di.AbstractPage
* @generated
@@ -860,9 +866,9 @@ public interface DiPackage extends EPackage {
EClass getAbstractPage();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sashwindows.di.AbstractPage#getPageIdentifier <em>Page Identifier</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.sashwindows.di.AbstractPage#getPageIdentifier
+ * <em>Page Identifier</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Page Identifier</em>'.
* @see org.eclipse.papyrus.sashwindows.di.AbstractPage#getPageIdentifier()
* @see #getAbstractPage()
@@ -871,9 +877,9 @@ public interface DiPackage extends EPackage {
EAttribute getAbstractPage_PageIdentifier();
/**
- * Returns the meta object for class '{@link org.eclipse.papyrus.sashwindows.di.PageList <em>Page List</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sashwindows.di.PageList <em>Page List</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Page List</em>'.
* @see org.eclipse.papyrus.sashwindows.di.PageList
* @generated
@@ -881,10 +887,10 @@ public interface DiPackage extends EPackage {
EClass getPageList();
/**
- * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.sashwindows.di.PageList#getAvailablePage <em>Available Page</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Available Page</em>'.
+ * Returns the meta object for the containment reference list ' {@link org.eclipse.papyrus.sashwindows.di.PageList#getAvailablePage
+ * <em>Available Page</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list ' <em>Available Page</em>'.
* @see org.eclipse.papyrus.sashwindows.di.PageList#getAvailablePage()
* @see #getPageList()
* @generated
@@ -892,9 +898,10 @@ public interface DiPackage extends EPackage {
EReference getPageList_AvailablePage();
/**
- * Returns the meta object for class '{@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr <em>Sash Windows Mngr</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr
+ * <em>Sash Windows Mngr</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @return the meta object for class '<em>Sash Windows Mngr</em>'.
* @see org.eclipse.papyrus.sashwindows.di.SashWindowsMngr
* @generated
@@ -902,10 +909,10 @@ public interface DiPackage extends EPackage {
EClass getSashWindowsMngr();
/**
- * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr#getPageList <em>Page List</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Page List</em>'.
+ * Returns the meta object for the containment reference ' {@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr#getPageList
+ * <em>Page List</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference '<em>Page List</em> '.
* @see org.eclipse.papyrus.sashwindows.di.SashWindowsMngr#getPageList()
* @see #getSashWindowsMngr()
* @generated
@@ -913,10 +920,10 @@ public interface DiPackage extends EPackage {
EReference getSashWindowsMngr_PageList();
/**
- * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr#getSashModel <em>Sash Model</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Sash Model</em>'.
+ * Returns the meta object for the containment reference ' {@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr#getSashModel
+ * <em>Sash Model</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference ' <em>Sash Model</em>'.
* @see org.eclipse.papyrus.sashwindows.di.SashWindowsMngr#getSashModel()
* @see #getSashWindowsMngr()
* @generated
@@ -924,9 +931,9 @@ public interface DiPackage extends EPackage {
EReference getSashWindowsMngr_SashModel();
/**
- * Returns the meta object for data type '<em>int</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for data type '<em>int</em>'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @return the meta object for data type '<em>int</em>'.
* @model instanceClass="int"
* @generated
@@ -934,9 +941,9 @@ public interface DiPackage extends EPackage {
EDataType getint();
/**
- * Returns the meta object for data type '{@link java.lang.Object <em>Java Object</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for data type '{@link java.lang.Object
+ * <em>Java Object</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for data type '<em>Java Object</em>'.
* @see java.lang.Object
* @model instanceClass="java.lang.Object"
@@ -945,9 +952,9 @@ public interface DiPackage extends EPackage {
EDataType getJavaObject();
/**
- * Returns the meta object for data type '<em>Float</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for data type '<em>Float</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for data type '<em>Float</em>'.
* @model instanceClass="float"
* @generated
@@ -955,9 +962,9 @@ public interface DiPackage extends EPackage {
EDataType getFloat();
/**
- * Returns the meta object for data type '<em>boolean</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the meta object for data type '<em>boolean</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the meta object for data type '<em>boolean</em>'.
* @model instanceClass="boolean"
* @generated
@@ -965,17 +972,17 @@ public interface DiPackage extends EPackage {
EDataType getboolean();
/**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the factory that creates the instances of the model. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the factory that creates the instances of the model.
* @generated
*/
DiFactory getDiFactory();
/**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
+ * <!-- begin-user-doc --> Defines literals for the meta objects that
+ * represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
@@ -983,14 +990,16 @@ public interface DiPackage extends EPackage {
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
+ *
* @generated
*/
interface Literals {
/**
- * The meta object literal for the '{@link org.eclipse.papyrus.sashwindows.di.impl.SashModelImpl <em>Sash Model</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.SashModelImpl
+ * <em>Sash Model</em>}' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.SashModelImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getSashModel()
* @generated
@@ -998,25 +1007,26 @@ public interface DiPackage extends EPackage {
EClass SASH_MODEL = eINSTANCE.getSashModel();
/**
- * The meta object literal for the '<em><b>Windows</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Windows</b></em>' containment
+ * reference list feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EReference SASH_MODEL__WINDOWS = eINSTANCE.getSashModel_Windows();
/**
- * The meta object literal for the '<em><b>Current Selection</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Current Selection</b></em>'
+ * reference feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EReference SASH_MODEL__CURRENT_SELECTION = eINSTANCE.getSashModel_CurrentSelection();
/**
- * The meta object literal for the '{@link org.eclipse.papyrus.sashwindows.di.impl.WindowImpl <em>Window</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.WindowImpl
+ * <em>Window</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.WindowImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getWindow()
* @generated
@@ -1024,33 +1034,34 @@ public interface DiPackage extends EPackage {
EClass WINDOW = eINSTANCE.getWindow();
/**
- * The meta object literal for the '<em><b>Position</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Position</b></em>' reference
+ * feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EReference WINDOW__POSITION = eINSTANCE.getWindow_Position();
/**
- * The meta object literal for the '<em><b>Size</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Size</b></em>' reference
+ * feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EReference WINDOW__SIZE = eINSTANCE.getWindow_Size();
/**
- * The meta object literal for the '<em><b>Panel</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Panel</b></em>' reference
+ * feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EReference WINDOW__PANEL = eINSTANCE.getWindow_Panel();
/**
- * The meta object literal for the '{@link org.eclipse.papyrus.sashwindows.di.impl.PanelParentImpl <em>Panel Parent</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.PanelParentImpl
+ * <em>Panel Parent</em>}' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.PanelParentImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getPanelParent()
* @generated
@@ -1058,17 +1069,19 @@ public interface DiPackage extends EPackage {
EClass PANEL_PARENT = eINSTANCE.getPanelParent();
/**
- * The meta object literal for the '<em><b>Children</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Children</b></em>'
+ * containment reference list feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
EReference PANEL_PARENT__CHILDREN = eINSTANCE.getPanelParent_Children();
/**
- * The meta object literal for the '{@link org.eclipse.papyrus.sashwindows.di.impl.AbstractPanelImpl <em>Abstract Panel</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.AbstractPanelImpl
+ * <em>Abstract Panel</em>}' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.AbstractPanelImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getAbstractPanel()
* @generated
@@ -1076,17 +1089,18 @@ public interface DiPackage extends EPackage {
EClass ABSTRACT_PANEL = eINSTANCE.getAbstractPanel();
/**
- * The meta object literal for the '<em><b>Parent</b></em>' container reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Parent</b></em>' container
+ * reference feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EReference ABSTRACT_PANEL__PARENT = eINSTANCE.getAbstractPanel_Parent();
/**
- * The meta object literal for the '{@link org.eclipse.papyrus.sashwindows.di.impl.PositionImpl <em>Position</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.PositionImpl
+ * <em>Position</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.PositionImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getPosition()
* @generated
@@ -1094,25 +1108,25 @@ public interface DiPackage extends EPackage {
EClass POSITION = eINSTANCE.getPosition();
/**
- * The meta object literal for the '<em><b>X</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>X</b></em>' attribute
+ * feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute POSITION__X = eINSTANCE.getPosition_X();
/**
- * The meta object literal for the '<em><b>Y</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Y</b></em>' attribute
+ * feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute POSITION__Y = eINSTANCE.getPosition_Y();
/**
- * The meta object literal for the '{@link org.eclipse.papyrus.sashwindows.di.impl.SizeImpl <em>Size</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.SizeImpl
+ * <em>Size</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.SizeImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getSize()
* @generated
@@ -1120,25 +1134,26 @@ public interface DiPackage extends EPackage {
EClass SIZE = eINSTANCE.getSize();
/**
- * The meta object literal for the '<em><b>Width</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Width</b></em>' attribute
+ * feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute SIZE__WIDTH = eINSTANCE.getSize_Width();
/**
- * The meta object literal for the '<em><b>Length</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Length</b></em>' attribute
+ * feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute SIZE__LENGTH = eINSTANCE.getSize_Length();
/**
- * The meta object literal for the '{@link org.eclipse.papyrus.sashwindows.di.impl.TabFolderImpl <em>Tab Folder</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.TabFolderImpl
+ * <em>Tab Folder</em>}' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.TabFolderImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getTabFolder()
* @generated
@@ -1146,17 +1161,19 @@ public interface DiPackage extends EPackage {
EClass TAB_FOLDER = eINSTANCE.getTabFolder();
/**
- * The meta object literal for the '<em><b>Children</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Children</b></em>'
+ * containment reference list feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
EReference TAB_FOLDER__CHILDREN = eINSTANCE.getTabFolder_Children();
/**
- * The meta object literal for the '{@link org.eclipse.papyrus.sashwindows.di.impl.PageRefImpl <em>Page Ref</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.PageRefImpl
+ * <em>Page Ref</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.PageRefImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getPageRef()
* @generated
@@ -1164,41 +1181,42 @@ public interface DiPackage extends EPackage {
EClass PAGE_REF = eINSTANCE.getPageRef();
/**
- * The meta object literal for the '<em><b>Emf Page Identifier</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Emf Page Identifier</b></em>'
+ * reference feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EReference PAGE_REF__EMF_PAGE_IDENTIFIER = eINSTANCE.getPageRef_EmfPageIdentifier();
/**
- * The meta object literal for the '<em><b>Page Identifier</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Page Identifier</b></em>'
+ * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute PAGE_REF__PAGE_IDENTIFIER = eINSTANCE.getPageRef_PageIdentifier();
/**
- * The meta object literal for the '<em><b>Object Page Identifier</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the ' <em><b>Object Page Identifier</b></em>' attribute feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute PAGE_REF__OBJECT_PAGE_IDENTIFIER = eINSTANCE.getPageRef_ObjectPageIdentifier();
/**
- * The meta object literal for the '<em><b>Parent</b></em>' container reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Parent</b></em>' container
+ * reference feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EReference PAGE_REF__PARENT = eINSTANCE.getPageRef_Parent();
/**
- * The meta object literal for the '{@link org.eclipse.papyrus.sashwindows.di.impl.SashPanelImpl <em>Sash Panel</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.SashPanelImpl
+ * <em>Sash Panel</em>}' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.SashPanelImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getSashPanel()
* @generated
@@ -1206,25 +1224,26 @@ public interface DiPackage extends EPackage {
EClass SASH_PANEL = eINSTANCE.getSashPanel();
/**
- * The meta object literal for the '<em><b>Sash Position</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Sash Position</b></em>'
+ * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute SASH_PANEL__SASH_POSITION = eINSTANCE.getSashPanel_SashPosition();
/**
- * The meta object literal for the '<em><b>Direction</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Direction</b></em>' attribute
+ * feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute SASH_PANEL__DIRECTION = eINSTANCE.getSashPanel_Direction();
/**
- * The meta object literal for the '{@link org.eclipse.papyrus.sashwindows.di.impl.AbstractPageImpl <em>Abstract Page</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.AbstractPageImpl
+ * <em>Abstract Page</em>}' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.AbstractPageImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getAbstractPage()
* @generated
@@ -1232,17 +1251,18 @@ public interface DiPackage extends EPackage {
EClass ABSTRACT_PAGE = eINSTANCE.getAbstractPage();
/**
- * The meta object literal for the '<em><b>Page Identifier</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Page Identifier</b></em>'
+ * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute ABSTRACT_PAGE__PAGE_IDENTIFIER = eINSTANCE.getAbstractPage_PageIdentifier();
/**
- * The meta object literal for the '{@link org.eclipse.papyrus.sashwindows.di.impl.PageListImpl <em>Page List</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.PageListImpl
+ * <em>Page List</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.PageListImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getPageList()
* @generated
@@ -1250,17 +1270,19 @@ public interface DiPackage extends EPackage {
EClass PAGE_LIST = eINSTANCE.getPageList();
/**
- * The meta object literal for the '<em><b>Available Page</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Available Page</b></em>'
+ * containment reference list feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
EReference PAGE_LIST__AVAILABLE_PAGE = eINSTANCE.getPageList_AvailablePage();
/**
- * The meta object literal for the '{@link org.eclipse.papyrus.sashwindows.di.impl.SashWindowsMngrImpl <em>Sash Windows Mngr</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sashwindows.di.impl.SashWindowsMngrImpl
+ * <em>Sash Windows Mngr</em>}' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.SashWindowsMngrImpl
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getSashWindowsMngr()
* @generated
@@ -1268,25 +1290,27 @@ public interface DiPackage extends EPackage {
EClass SASH_WINDOWS_MNGR = eINSTANCE.getSashWindowsMngr();
/**
- * The meta object literal for the '<em><b>Page List</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Page List</b></em>'
+ * containment reference feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
EReference SASH_WINDOWS_MNGR__PAGE_LIST = eINSTANCE.getSashWindowsMngr_PageList();
/**
- * The meta object literal for the '<em><b>Sash Model</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Sash Model</b></em>'
+ * containment reference feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
EReference SASH_WINDOWS_MNGR__SASH_MODEL = eINSTANCE.getSashWindowsMngr_SashModel();
/**
- * The meta object literal for the '<em>int</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em>int</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getint()
* @generated
*/
@@ -1294,8 +1318,8 @@ public interface DiPackage extends EPackage {
/**
* The meta object literal for the '<em>Java Object</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @see java.lang.Object
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getJavaObject()
* @generated
@@ -1303,18 +1327,18 @@ public interface DiPackage extends EPackage {
EDataType JAVA_OBJECT = eINSTANCE.getJavaObject();
/**
- * The meta object literal for the '<em>Float</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em>Float</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getFloat()
* @generated
*/
EDataType FLOAT = eINSTANCE.getFloat();
/**
- * The meta object literal for the '<em>boolean</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The meta object literal for the '<em>boolean</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.impl.DiPackageImpl#getboolean()
* @generated
*/
@@ -1322,4 +1346,4 @@ public interface DiPackage extends EPackage {
}
-} //DiPackage
+} // DiPackage
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/PageList.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/PageList.java
index 8b5ccf63940..5adeab8fd16 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/PageList.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/PageList.java
@@ -10,14 +10,12 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Page List</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Page List</b></em>'. <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.PageList#getAvailablePage <em>Available Page</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.PageList#getAvailablePage <em> Available Page</em>}</li>
* </ul>
* </p>
*
@@ -28,15 +26,16 @@ import org.eclipse.emf.ecore.EObject;
public interface PageList extends EObject {
/**
- * Returns the value of the '<em><b>Available Page</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.papyrus.sashwindows.di.PageRef}.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Available Page</b></em>' containment
+ * reference list. The list contents are of type {@link org.eclipse.papyrus.sashwindows.di.PageRef}. <!-- begin-user-doc
+ * -->
* <p>
* If the meaning of the '<em>Available Page</em>' containment reference list isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
*
- * @return the value of the '<em>Available Page</em>' containment reference list.
+ * @return the value of the '<em>Available Page</em>' containment reference
+ * list.
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#getPageList_AvailablePage()
* @model containment="true" ordered="false"
* @generated
@@ -44,19 +43,21 @@ public interface PageList extends EObject {
EList<PageRef> getAvailablePage();
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
- * @model pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject" pageIdentifierRequired="true" pageIdentifierOrdered="false"
+ * @model
+ * pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject"
+ * pageIdentifierRequired="true" pageIdentifierOrdered="false"
* @generated
*/
void addPage(Object pageIdentifier);
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
- * @model pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject" pageIdentifierRequired="true" pageIdentifierOrdered="false"
+ * @model
+ * pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject"
+ * pageIdentifierRequired="true" pageIdentifierOrdered="false"
* @generated
*/
void removePage(Object pageIdentifier);
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/PageRef.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/PageRef.java
index 6e503242966..ead3f96cba2 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/PageRef.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/PageRef.java
@@ -9,17 +9,18 @@ package org.eclipse.papyrus.sashwindows.di;
import org.eclipse.emf.ecore.EObject;
/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Page Ref</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Page Ref</b></em>'. <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.PageRef#getEmfPageIdentifier <em>Emf Page Identifier</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.PageRef#getPageIdentifier <em>Page Identifier</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.PageRef#getObjectPageIdentifier <em>Object Page Identifier</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.PageRef#getParent <em>Parent</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.PageRef#getEmfPageIdentifier
+ * <em>Emf Page Identifier</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.PageRef#getPageIdentifier <em> Page Identifier</em>}</li>
+ * <li>
+ * {@link org.eclipse.papyrus.sashwindows.di.PageRef#getObjectPageIdentifier
+ * <em>Object Page Identifier</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.PageRef#getParent <em>Parent </em>}</li>
* </ul>
* </p>
*
@@ -46,9 +47,9 @@ public interface PageRef extends EObject {
EObject getEmfPageIdentifier();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.PageRef#getEmfPageIdentifier <em>Emf Page Identifier</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.PageRef#getEmfPageIdentifier
+ * <em>Emf Page Identifier</em>}' reference. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @param value
* the new value of the '<em>Emf Page Identifier</em>' reference.
@@ -59,26 +60,25 @@ public interface PageRef extends EObject {
/**
* Returns the value of the '<em><b>Page Identifier</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * pageIdentifier can be a plain JavaObject or an EObject.
- * They are not stored in the same place.
- * <!-- end-model-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc -->
+ * pageIdentifier can be a plain JavaObject or an EObject. They are not
+ * stored in the same place. <!-- end-model-doc -->
*
* @return the value of the '<em>Page Identifier</em>' attribute.
* @see #setPageIdentifier(Object)
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#getPageRef_PageIdentifier()
- * @model unique="false" dataType="org.eclipse.papyrus.sashwindows.di.JavaObject" required="true" transient="true" volatile="true" derived="true"
+ * @model unique="false"
+ * dataType="org.eclipse.papyrus.sashwindows.di.JavaObject"
+ * required="true" transient="true" volatile="true" derived="true"
* ordered="false"
* @generated
*/
Object getPageIdentifier();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.PageRef#getPageIdentifier <em>Page Identifier</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.PageRef#getPageIdentifier
+ * <em>Page Identifier</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @param value
* the new value of the '<em>Page Identifier</em>' attribute.
@@ -88,37 +88,38 @@ public interface PageRef extends EObject {
void setPageIdentifier(Object value);
/**
- * Returns the value of the '<em><b>Object Page Identifier</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * Storage to store Identifier that are not EObject.
+ * Returns the value of the '<em><b>Object Page Identifier</b></em>'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> <!--
+ * begin-model-doc --> Storage to store Identifier that are not EObject.
* <!-- end-model-doc -->
*
* @return the value of the '<em>Object Page Identifier</em>' attribute.
* @see #setObjectPageIdentifier(Object)
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#getPageRef_ObjectPageIdentifier()
- * @model unique="false" dataType="org.eclipse.papyrus.sashwindows.di.JavaObject" required="true" ordered="false"
+ * @model unique="false"
+ * dataType="org.eclipse.papyrus.sashwindows.di.JavaObject"
+ * required="true" ordered="false"
* @generated
*/
Object getObjectPageIdentifier();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.PageRef#getObjectPageIdentifier <em>Object Page Identifier</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.PageRef#getObjectPageIdentifier
+ * <em>Object Page Identifier</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @param value
- * the new value of the '<em>Object Page Identifier</em>' attribute.
+ * the new value of the '<em>Object Page Identifier</em>'
+ * attribute.
* @see #getObjectPageIdentifier()
* @generated
*/
void setObjectPageIdentifier(Object value);
/**
- * Returns the value of the '<em><b>Parent</b></em>' container reference.
- * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.sashwindows.di.TabFolder#getChildren <em>Children</em>}'.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Parent</b></em>' container reference. It
+ * is bidirectional and its opposite is ' {@link org.eclipse.papyrus.sashwindows.di.TabFolder#getChildren
+ * <em>Children</em>}'. <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Parent</em>' container reference isn't clear, there really should be more of a description here...
* </p>
@@ -128,15 +129,16 @@ public interface PageRef extends EObject {
* @see #setParent(TabFolder)
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#getPageRef_Parent()
* @see org.eclipse.papyrus.sashwindows.di.TabFolder#getChildren
- * @model opposite="children" required="true" transient="false" ordered="false"
+ * @model opposite="children" required="true" transient="false"
+ * ordered="false"
* @generated
*/
TabFolder getParent();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.PageRef#getParent <em>Parent</em>}' container reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.PageRef#getParent
+ * <em>Parent</em>}' container reference. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @param value
* the new value of the '<em>Parent</em>' container reference.
@@ -146,11 +148,11 @@ public interface PageRef extends EObject {
void setParent(TabFolder value);
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
- * @model required="true" ordered="false" pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject" pageIdentifierRequired="true"
- * pageIdentifierOrdered="false"
+ * @model required="true" ordered="false"
+ * pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject"
+ * pageIdentifierRequired="true" pageIdentifierOrdered="false"
* @generated
*/
boolean isForIdentifier(Object pageIdentifier);
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/PanelParent.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/PanelParent.java
index ea86fdb0bc8..d89e850c058 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/PanelParent.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/PanelParent.java
@@ -10,14 +10,12 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Panel Parent</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Panel Parent</b></em>'. <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.PanelParent#getChildren <em>Children</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.PanelParent#getChildren <em> Children</em>}</li>
* </ul>
* </p>
*
@@ -28,10 +26,10 @@ import org.eclipse.emf.ecore.EObject;
public interface PanelParent extends EObject {
/**
- * Returns the value of the '<em><b>Children</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.papyrus.sashwindows.di.AbstractPanel}.
- * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.sashwindows.di.AbstractPanel#getParent <em>Parent</em>}'.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Children</b></em>' containment reference
+ * list. The list contents are of type {@link org.eclipse.papyrus.sashwindows.di.AbstractPanel}. It is
+ * bidirectional and its opposite is ' {@link org.eclipse.papyrus.sashwindows.di.AbstractPanel#getParent
+ * <em>Parent</em>}'. <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Children</em>' containment reference list isn't clear, there really should be more of a description here...
* </p>
@@ -40,21 +38,20 @@ public interface PanelParent extends EObject {
* @return the value of the '<em>Children</em>' containment reference list.
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#getPanelParent_Children()
* @see org.eclipse.papyrus.sashwindows.di.AbstractPanel#getParent
- * @model opposite="parent" containment="true" lower="2" upper="2" ordered="false"
+ * @model opposite="parent" containment="true" lower="2" upper="2"
+ * ordered="false"
* @generated
*/
EList<AbstractPanel> getChildren();
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * Replace the specified child by the new value.
- * Don't need to be implemented in TabFolder.
- * Used to insert a new SashPanel.
- * <!-- end-model-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc -->
+ * Replace the specified child by the new value. Don't need to be
+ * implemented in TabFolder. Used to insert a new SashPanel. <!--
+ * end-model-doc -->
*
- * @model oldChildRequired="true" oldChildOrdered="false" newChildRequired="true" newChildOrdered="false"
+ * @model oldChildRequired="true" oldChildOrdered="false"
+ * newChildRequired="true" newChildOrdered="false"
* @generated
*/
void replaceChild(AbstractPanel oldChild, AbstractPanel newChild);
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/Position.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/Position.java
index 98145c96672..bd5562514af 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/Position.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/Position.java
@@ -9,9 +9,7 @@ package org.eclipse.papyrus.sashwindows.di;
import org.eclipse.emf.ecore.EObject;
/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Position</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Position</b></em>'. <!-- end-user-doc -->
*
* <p>
* The following features are supported:
@@ -28,8 +26,8 @@ import org.eclipse.emf.ecore.EObject;
public interface Position extends EObject {
/**
- * Returns the value of the '<em><b>X</b></em>' attribute.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>X</b></em>' attribute. <!--
+ * begin-user-doc -->
* <p>
* If the meaning of the '<em>X</em>' attribute isn't clear, there really should be more of a description here...
* </p>
@@ -44,9 +42,8 @@ public interface Position extends EObject {
int getX();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.Position#getX <em>X</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.Position#getX <em>X</em>}'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @param value
* the new value of the '<em>X</em>' attribute.
@@ -56,8 +53,8 @@ public interface Position extends EObject {
void setX(int value);
/**
- * Returns the value of the '<em><b>Y</b></em>' attribute.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Y</b></em>' attribute. <!--
+ * begin-user-doc -->
* <p>
* If the meaning of the '<em>Y</em>' attribute isn't clear, there really should be more of a description here...
* </p>
@@ -66,15 +63,15 @@ public interface Position extends EObject {
* @return the value of the '<em>Y</em>' attribute.
* @see #setY(int)
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#getPosition_Y()
- * @model unique="false" dataType="org.eclipse.papyrus.sashwindows.di.int" required="true" ordered="false"
+ * @model unique="false" dataType="org.eclipse.papyrus.sashwindows.di.int"
+ * required="true" ordered="false"
* @generated
*/
int getY();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.Position#getY <em>Y</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.Position#getY <em>Y</em>}'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @param value
* the new value of the '<em>Y</em>' attribute.
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/SashModel.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/SashModel.java
index dd9002fb1d8..d3e4fa9f24b 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/SashModel.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/SashModel.java
@@ -10,24 +10,22 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Sash Model</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Root node of the model describing the sash windows, panels and pages.
- * A SashModel can have several windows containing panels separated by sashes. Such panels can be folders
- * containing pages.
- * <!-- end-model-doc -->
- *
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Sash Model</b></em>'. <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc --> Root node of the model describing the sash windows,
+ * panels and pages. A SashModel can have several windows containing panels
+ * separated by sashes. Such panels can be folders containing pages. <!--
+ * end-model-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.SashModel#getWindows <em>Windows</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.SashModel#getCurrentSelection <em>Current Selection</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.SashModel#getWindows <em> Windows</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.SashModel#getCurrentSelection
+ * <em>Current Selection</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#getSashModel()
* @model
* @generated
@@ -35,13 +33,14 @@ import org.eclipse.emf.ecore.EObject;
public interface SashModel extends EObject {
/**
- * Returns the value of the '<em><b>Windows</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.papyrus.sashwindows.di.Window}.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Windows</b></em>' containment reference
+ * list. The list contents are of type {@link org.eclipse.papyrus.sashwindows.di.Window}. <!-- begin-user-doc
+ * -->
* <p>
* If the meaning of the '<em>Windows</em>' containment reference list isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Windows</em>' containment reference list.
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#getSashModel_Windows()
* @model containment="true" ordered="false"
@@ -56,6 +55,7 @@ public interface SashModel extends EObject {
* If the meaning of the '<em>Current Selection</em>' reference isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Current Selection</em>' reference.
* @see #setCurrentSelection(TabFolder)
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#getSashModel_CurrentSelection()
@@ -65,115 +65,128 @@ public interface SashModel extends EObject {
TabFolder getCurrentSelection();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.SashModel#getCurrentSelection <em>Current Selection</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Current Selection</em>' reference.
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.SashModel#getCurrentSelection
+ * <em>Current Selection</em>}' reference. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Current Selection</em>' reference.
* @see #getCurrentSelection()
* @generated
*/
void setCurrentSelection(TabFolder value);
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject" pageIdentifierRequired="true" pageIdentifierOrdered="false"
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @model
+ * pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject"
+ * pageIdentifierRequired="true" pageIdentifierOrdered="false"
* @generated
*/
void addPage(Object pageIdentifier);
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject" pageIdentifierRequired="true" pageIdentifierOrdered="false"
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @model
+ * pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject"
+ * pageIdentifierRequired="true" pageIdentifierOrdered="false"
* @generated
*/
void removePage(Object pageIdentifier);
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * Lookup the pageRef identified by the pageIdentifier.
- * Return the pageRef or null if not found.
- * Lookup in the entire SashModel structure.
- * <!-- end-model-doc -->
- * @model required="true" ordered="false" pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject" pageIdentifierRequired="true" pageIdentifierOrdered="false"
+ * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc -->
+ * Lookup the pageRef identified by the pageIdentifier. Return the pageRef
+ * or null if not found. Lookup in the entire SashModel structure. <!--
+ * end-model-doc -->
+ *
+ * @model required="true" ordered="false"
+ * pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject"
+ * pageIdentifierRequired="true" pageIdentifierOrdered="false"
* @generated
*/
PageRef lookupPage(Object pageIdentifier);
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model srcParentFolderRequired="true" srcParentFolderOrdered="false" srcIndexDataType="org.eclipse.papyrus.sashwindows.di.int" srcIndexRequired="true" srcIndexOrdered="false" targetParentFolderRequired="true" targetParentFolderOrdered="false" targetIndexRequired="true" targetIndexOrdered="false"
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @model srcParentFolderRequired="true" srcParentFolderOrdered="false"
+ * srcIndexDataType="org.eclipse.papyrus.sashwindows.di.int"
+ * srcIndexRequired="true" srcIndexOrdered="false"
+ * targetParentFolderRequired="true"
+ * targetParentFolderOrdered="false" targetIndexRequired="true"
+ * targetIndexOrdered="false"
* @generated
*/
void movePage(TabFolder srcParentFolder, int srcIndex, TabFolder targetParentFolder, int targetIndex);
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model folderToInsertRequired="true" folderToInsertOrdered="false" refFolderRequired="true" refFolderOrdered="false" refFolderSideRequired="true" refFolderSideOrdered="false"
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @model folderToInsertRequired="true" folderToInsertOrdered="false"
+ * refFolderRequired="true" refFolderOrdered="false"
+ * refFolderSideRequired="true" refFolderSideOrdered="false"
* @generated
*/
void insertFolder(TabFolder folderToInsert, TabFolder refFolder, int refFolderSide);
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model srcParentFolderRequired="true" srcParentFolderOrdered="false" srcIndexDataType="org.eclipse.papyrus.sashwindows.di.int" srcIndexRequired="true" srcIndexOrdered="false" targetParentFolderRequired="true" targetParentFolderOrdered="false"
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @model srcParentFolderRequired="true" srcParentFolderOrdered="false"
+ * srcIndexDataType="org.eclipse.papyrus.sashwindows.di.int"
+ * srcIndexRequired="true" srcIndexOrdered="false"
+ * targetParentFolderRequired="true"
+ * targetParentFolderOrdered="false"
* @generated
*/
void movePage(TabFolder srcParentFolder, int srcIndex, TabFolder targetParentFolder);
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @model folderRequired="true" folderOrdered="false"
* @generated
*/
void removeEmptyFolder(TabFolder folder);
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc -->
* Remove all pages from the model. Only left one empty top level folder.
* <!-- end-model-doc -->
+ *
* @model
* @generated
*/
void removeAllPages();
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * Remove pages other than the one specified from the model. Intermediate folders are also removed.
- * <!-- end-model-doc -->
- * @model pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject" pageIdentifierRequired="true" pageIdentifierOrdered="false"
+ * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc -->
+ * Remove pages other than the one specified from the model. Intermediate
+ * folders are also removed. <!-- end-model-doc -->
+ *
+ * @model
+ * pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject"
+ * pageIdentifierRequired="true" pageIdentifierOrdered="false"
* @generated
*/
void removeOtherPages(Object pageIdentifier);
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * Get the first available window.
- * <!-- end-model-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc -->
+ * Get the first available window. <!-- end-model-doc -->
+ *
* @model required="true" ordered="false"
* @generated
*/
Window lookupFirstWindow();
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * Lookup the first available folder.
- * <!-- end-model-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc -->
+ * Lookup the first available folder. <!-- end-model-doc -->
+ *
* @model required="true" ordered="false"
* @generated
*/
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/SashPanel.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/SashPanel.java
index 64257babde9..5b247621ced 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/SashPanel.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/SashPanel.java
@@ -6,17 +6,14 @@
*/
package org.eclipse.papyrus.sashwindows.di;
-
/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Sash Panel</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Sash Panel</b></em>'. <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.SashPanel#getSashPosition <em>Sash Position</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.SashPanel#getDirection <em>Direction</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.SashPanel#getSashPosition <em> Sash Position</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.SashPanel#getDirection <em> Direction</em>}</li>
* </ul>
* </p>
*
@@ -27,25 +24,24 @@ package org.eclipse.papyrus.sashwindows.di;
public interface SashPanel extends AbstractPanel, PanelParent {
/**
- * Returns the value of the '<em><b>Sash Position</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * Position of the sash in the panel. The position is in percent. The value should be between 0 and 100.
- * <!-- end-model-doc -->
+ * Returns the value of the '<em><b>Sash Position</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc -->
+ * Position of the sash in the panel. The position is in percent. The value
+ * should be between 0 and 100. <!-- end-model-doc -->
*
* @return the value of the '<em>Sash Position</em>' attribute.
* @see #setSashPosition(float)
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#getSashPanel_SashPosition()
- * @model unique="false" dataType="org.eclipse.papyrus.sashwindows.di.Float" required="true" ordered="false"
+ * @model unique="false" dataType="org.eclipse.papyrus.sashwindows.di.Float"
+ * required="true" ordered="false"
* @generated
*/
float getSashPosition();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.SashPanel#getSashPosition <em>Sash Position</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.SashPanel#getSashPosition
+ * <em>Sash Position</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @param value
* the new value of the '<em>Sash Position</em>' attribute.
@@ -55,8 +51,8 @@ public interface SashPanel extends AbstractPanel, PanelParent {
void setSashPosition(float value);
/**
- * Returns the value of the '<em><b>Direction</b></em>' attribute.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Direction</b></em>' attribute. <!--
+ * begin-user-doc -->
* <p>
* If the meaning of the '<em>Direction</em>' attribute isn't clear, there really should be more of a description here...
* </p>
@@ -71,9 +67,9 @@ public interface SashPanel extends AbstractPanel, PanelParent {
int getDirection();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.SashPanel#getDirection <em>Direction</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.SashPanel#getDirection
+ * <em>Direction</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
*
* @param value
* the new value of the '<em>Direction</em>' attribute.
@@ -83,18 +79,18 @@ public interface SashPanel extends AbstractPanel, PanelParent {
void setDirection(int value);
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
- * @model leftChildRequired="true" leftChildOrdered="false" rightChildRequired="true" rightChildOrdered="false"
- * directionDataType="org.eclipse.papyrus.sashwindows.di.int" directionRequired="true" directionOrdered="false"
+ * @model leftChildRequired="true" leftChildOrdered="false"
+ * rightChildRequired="true" rightChildOrdered="false"
+ * directionDataType="org.eclipse.papyrus.sashwindows.di.int"
+ * directionRequired="true" directionOrdered="false"
* @generated
*/
void setChildren(AbstractPanel leftChild, AbstractPanel rightChild, int direction);
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @model childToDeleteRequired="true" childToDeleteOrdered="false"
* @generated
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/SashWindowsMngr.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/SashWindowsMngr.java
index 0404523b14f..748f20ad63f 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/SashWindowsMngr.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/SashWindowsMngr.java
@@ -9,15 +9,15 @@ package org.eclipse.papyrus.sashwindows.di;
import org.eclipse.emf.ecore.EObject;
/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Sash Windows Mngr</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Sash Windows Mngr</b></em>'. <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr#getPageList <em>Page List</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr#getSashModel <em>Sash Model</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr#getPageList
+ * <em>Page List</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr#getSashModel
+ * <em>Sash Model</em>}</li>
* </ul>
* </p>
*
@@ -28,8 +28,8 @@ import org.eclipse.emf.ecore.EObject;
public interface SashWindowsMngr extends EObject {
/**
- * Returns the value of the '<em><b>Page List</b></em>' containment reference.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Page List</b></em>' containment
+ * reference. <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Page List</em>' containment reference isn't clear, there really should be more of a description here...
* </p>
@@ -44,20 +44,21 @@ public interface SashWindowsMngr extends EObject {
PageList getPageList();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr#getPageList <em>Page List</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr#getPageList
+ * <em>Page List</em>}' containment reference. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @param value
- * the new value of the '<em>Page List</em>' containment reference.
+ * the new value of the '<em>Page List</em>' containment
+ * reference.
* @see #getPageList()
* @generated
*/
void setPageList(PageList value);
/**
- * Returns the value of the '<em><b>Sash Model</b></em>' containment reference.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Sash Model</b></em>' containment
+ * reference. <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Sash Model</em>' containment reference isn't clear, there really should be more of a description here...
* </p>
@@ -72,12 +73,13 @@ public interface SashWindowsMngr extends EObject {
SashModel getSashModel();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr#getSashModel <em>Sash Model</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr#getSashModel
+ * <em>Sash Model</em>}' containment reference. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @param value
- * the new value of the '<em>Sash Model</em>' containment reference.
+ * the new value of the '<em>Sash Model</em>' containment
+ * reference.
* @see #getSashModel()
* @generated
*/
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/Size.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/Size.java
index aa5f7cfd779..68181915663 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/Size.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/Size.java
@@ -9,9 +9,7 @@ package org.eclipse.papyrus.sashwindows.di;
import org.eclipse.emf.ecore.EObject;
/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Size</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Size</b></em>'. <!-- end-user-doc -->
*
* <p>
* The following features are supported:
@@ -28,8 +26,8 @@ import org.eclipse.emf.ecore.EObject;
public interface Size extends EObject {
/**
- * Returns the value of the '<em><b>Width</b></em>' attribute.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Width</b></em>' attribute. <!--
+ * begin-user-doc -->
* <p>
* If the meaning of the '<em>Width</em>' attribute isn't clear, there really should be more of a description here...
* </p>
@@ -38,15 +36,15 @@ public interface Size extends EObject {
* @return the value of the '<em>Width</em>' attribute.
* @see #setWidth(int)
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#getSize_Width()
- * @model unique="false" dataType="org.eclipse.papyrus.sashwindows.di.int" required="true" ordered="false"
+ * @model unique="false" dataType="org.eclipse.papyrus.sashwindows.di.int"
+ * required="true" ordered="false"
* @generated
*/
int getWidth();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.Size#getWidth <em>Width</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.Size#getWidth <em>Width</em>}'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @param value
* the new value of the '<em>Width</em>' attribute.
@@ -56,8 +54,8 @@ public interface Size extends EObject {
void setWidth(int value);
/**
- * Returns the value of the '<em><b>Length</b></em>' attribute.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Length</b></em>' attribute. <!--
+ * begin-user-doc -->
* <p>
* If the meaning of the '<em>Length</em>' attribute isn't clear, there really should be more of a description here...
* </p>
@@ -66,15 +64,15 @@ public interface Size extends EObject {
* @return the value of the '<em>Length</em>' attribute.
* @see #setLength(int)
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#getSize_Length()
- * @model unique="false" dataType="org.eclipse.papyrus.sashwindows.di.int" required="true" ordered="false"
+ * @model unique="false" dataType="org.eclipse.papyrus.sashwindows.di.int"
+ * required="true" ordered="false"
* @generated
*/
int getLength();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.Size#getLength <em>Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.Size#getLength <em>Length</em>} ' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @param value
* the new value of the '<em>Length</em>' attribute.
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/TabFolder.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/TabFolder.java
index f2d188caa38..404bf40d269 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/TabFolder.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/TabFolder.java
@@ -9,14 +9,12 @@ package org.eclipse.papyrus.sashwindows.di;
import org.eclipse.emf.common.util.EList;
/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Tab Folder</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Tab Folder</b></em>'. <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.TabFolder#getChildren <em>Children</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.TabFolder#getChildren <em> Children</em>}</li>
* </ul>
* </p>
*
@@ -27,10 +25,10 @@ import org.eclipse.emf.common.util.EList;
public interface TabFolder extends AbstractPanel {
/**
- * Returns the value of the '<em><b>Children</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.papyrus.sashwindows.di.PageRef}.
- * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.sashwindows.di.PageRef#getParent <em>Parent</em>}'.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Children</b></em>' containment reference
+ * list. The list contents are of type {@link org.eclipse.papyrus.sashwindows.di.PageRef}. It is bidirectional
+ * and its opposite is ' {@link org.eclipse.papyrus.sashwindows.di.PageRef#getParent
+ * <em>Parent</em>}'. <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Children</em>' containment reference list isn't clear, there really should be more of a description here...
* </p>
@@ -45,29 +43,30 @@ public interface TabFolder extends AbstractPanel {
EList<PageRef> getChildren();
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
- * @model oldIndexRequired="true" oldIndexOrdered="false" newIndexDataType="org.eclipse.papyrus.sashwindows.di.int" newIndexRequired="true"
- * newIndexOrdered="false"
+ * @model oldIndexRequired="true" oldIndexOrdered="false"
+ * newIndexDataType="org.eclipse.papyrus.sashwindows.di.int"
+ * newIndexRequired="true" newIndexOrdered="false"
* @generated
*/
void movePage(int oldIndex, int newIndex);
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
- * @model pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject" pageIdentifierRequired="true" pageIdentifierOrdered="false"
+ * @model
+ * pageIdentifierDataType="org.eclipse.papyrus.sashwindows.di.JavaObject"
+ * pageIdentifierRequired="true" pageIdentifierOrdered="false"
* @generated
*/
void addPage(Object pageIdentifier);
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
- * @model pageIndexDataType="org.eclipse.papyrus.sashwindows.di.int" pageIndexRequired="true" pageIndexOrdered="false"
+ * @model pageIndexDataType="org.eclipse.papyrus.sashwindows.di.int"
+ * pageIndexRequired="true" pageIndexOrdered="false"
* @generated
*/
void removePage(int pageIndex);
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/Window.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/Window.java
index ea1c83e3879..258468affef 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/Window.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/Window.java
@@ -6,16 +6,13 @@
*/
package org.eclipse.papyrus.sashwindows.di;
-
/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Window</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Window</b></em>'. <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.Window#getPosition <em>Position</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.Window#getPosition <em>Position </em>}</li>
* <li>{@link org.eclipse.papyrus.sashwindows.di.Window#getSize <em>Size</em>}</li>
* <li>{@link org.eclipse.papyrus.sashwindows.di.Window#getPanel <em>Panel</em>}</li>
* </ul>
@@ -28,8 +25,8 @@ package org.eclipse.papyrus.sashwindows.di;
public interface Window extends PanelParent {
/**
- * Returns the value of the '<em><b>Position</b></em>' reference.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Position</b></em>' reference. <!--
+ * begin-user-doc -->
* <p>
* If the meaning of the '<em>Position</em>' reference isn't clear, there really should be more of a description here...
* </p>
@@ -44,9 +41,9 @@ public interface Window extends PanelParent {
Position getPosition();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.Window#getPosition <em>Position</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.Window#getPosition
+ * <em>Position</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
*
* @param value
* the new value of the '<em>Position</em>' reference.
@@ -56,8 +53,8 @@ public interface Window extends PanelParent {
void setPosition(Position value);
/**
- * Returns the value of the '<em><b>Size</b></em>' reference.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Size</b></em>' reference. <!--
+ * begin-user-doc -->
* <p>
* If the meaning of the '<em>Size</em>' reference isn't clear, there really should be more of a description here...
* </p>
@@ -72,9 +69,8 @@ public interface Window extends PanelParent {
Size getSize();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.Window#getSize <em>Size</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.Window#getSize <em>Size</em>}'
+ * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @param value
* the new value of the '<em>Size</em>' reference.
@@ -84,25 +80,22 @@ public interface Window extends PanelParent {
void setSize(Size value);
/**
- * Returns the value of the '<em><b>Panel</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * Redefine children.
- * <!-- end-model-doc -->
+ * Returns the value of the '<em><b>Panel</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc -->
+ * Redefine children. <!-- end-model-doc -->
*
* @return the value of the '<em>Panel</em>' reference.
* @see #setPanel(AbstractPanel)
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#getWindow_Panel()
- * @model required="true" transient="true" volatile="true" derived="true" ordered="false"
+ * @model required="true" transient="true" volatile="true" derived="true"
+ * ordered="false"
* @generated
*/
AbstractPanel getPanel();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.sashwindows.di.Window#getPanel <em>Panel</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Sets the value of the ' {@link org.eclipse.papyrus.sashwindows.di.Window#getPanel <em>Panel</em>} ' reference. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @param value
* the new value of the '<em>Panel</em>' reference.
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/exception/SashEditorException.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/exception/SashEditorException.java
index c069ee63b61..886dbac1bda 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/exception/SashEditorException.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/exception/SashEditorException.java
@@ -13,7 +13,6 @@
*****************************************************************************/
package org.eclipse.papyrus.sashwindows.di.exception;
-
/**
* Exception for the Sash editor system
*
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/AbstractPageImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/AbstractPageImpl.java
index 76b8196370f..e23205ce530 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/AbstractPageImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/AbstractPageImpl.java
@@ -14,13 +14,13 @@ import org.eclipse.papyrus.sashwindows.di.AbstractPage;
import org.eclipse.papyrus.sashwindows.di.DiPackage;
/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Abstract Page</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Abstract Page</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.AbstractPageImpl#getPageIdentifier <em>Page Identifier</em>}</li>
+ * <li>
+ * {@link org.eclipse.papyrus.sashwindows.di.impl.AbstractPageImpl#getPageIdentifier
+ * <em>Page Identifier</em>}</li>
* </ul>
* </p>
*
@@ -29,9 +29,9 @@ import org.eclipse.papyrus.sashwindows.di.DiPackage;
public class AbstractPageImpl extends EObjectImpl implements AbstractPage {
/**
- * The default value of the '{@link #getPageIdentifier() <em>Page Identifier</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The default value of the '{@link #getPageIdentifier()
+ * <em>Page Identifier</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @see #getPageIdentifier()
* @generated
@@ -40,9 +40,9 @@ public class AbstractPageImpl extends EObjectImpl implements AbstractPage {
protected static final Object PAGE_IDENTIFIER_EDEFAULT = null;
/**
- * The cached value of the '{@link #getPageIdentifier() <em>Page Identifier</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getPageIdentifier()
+ * <em>Page Identifier</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @see #getPageIdentifier()
* @generated
@@ -51,8 +51,7 @@ public class AbstractPageImpl extends EObjectImpl implements AbstractPage {
protected Object pageIdentifier = PAGE_IDENTIFIER_EDEFAULT;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -61,8 +60,7 @@ public class AbstractPageImpl extends EObjectImpl implements AbstractPage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -72,8 +70,7 @@ public class AbstractPageImpl extends EObjectImpl implements AbstractPage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -82,8 +79,7 @@ public class AbstractPageImpl extends EObjectImpl implements AbstractPage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -95,8 +91,7 @@ public class AbstractPageImpl extends EObjectImpl implements AbstractPage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -110,8 +105,7 @@ public class AbstractPageImpl extends EObjectImpl implements AbstractPage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -126,8 +120,7 @@ public class AbstractPageImpl extends EObjectImpl implements AbstractPage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -142,8 +135,7 @@ public class AbstractPageImpl extends EObjectImpl implements AbstractPage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -157,8 +149,7 @@ public class AbstractPageImpl extends EObjectImpl implements AbstractPage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -174,4 +165,4 @@ public class AbstractPageImpl extends EObjectImpl implements AbstractPage {
return result.toString();
}
-} //AbstractPageImpl
+} // AbstractPageImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/AbstractPanelImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/AbstractPanelImpl.java
index b2409fedf14..b0ebf5d9571 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/AbstractPanelImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/AbstractPanelImpl.java
@@ -18,13 +18,13 @@ import org.eclipse.papyrus.sashwindows.di.DiPackage;
import org.eclipse.papyrus.sashwindows.di.PanelParent;
/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Abstract Panel</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Abstract Panel</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.AbstractPanelImpl#getParent <em>Parent</em>}</li>
+ * <li>
+ * {@link org.eclipse.papyrus.sashwindows.di.impl.AbstractPanelImpl#getParent
+ * <em>Parent</em>}</li>
* </ul>
* </p>
*
@@ -33,8 +33,7 @@ import org.eclipse.papyrus.sashwindows.di.PanelParent;
public abstract class AbstractPanelImpl extends EObjectImpl implements AbstractPanel {
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -43,8 +42,7 @@ public abstract class AbstractPanelImpl extends EObjectImpl implements AbstractP
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -54,8 +52,7 @@ public abstract class AbstractPanelImpl extends EObjectImpl implements AbstractP
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -66,8 +63,7 @@ public abstract class AbstractPanelImpl extends EObjectImpl implements AbstractP
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -77,8 +73,7 @@ public abstract class AbstractPanelImpl extends EObjectImpl implements AbstractP
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -99,8 +94,7 @@ public abstract class AbstractPanelImpl extends EObjectImpl implements AbstractP
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -116,8 +110,7 @@ public abstract class AbstractPanelImpl extends EObjectImpl implements AbstractP
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -131,8 +124,7 @@ public abstract class AbstractPanelImpl extends EObjectImpl implements AbstractP
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -146,8 +138,7 @@ public abstract class AbstractPanelImpl extends EObjectImpl implements AbstractP
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -161,8 +152,7 @@ public abstract class AbstractPanelImpl extends EObjectImpl implements AbstractP
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -177,8 +167,7 @@ public abstract class AbstractPanelImpl extends EObjectImpl implements AbstractP
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -193,8 +182,7 @@ public abstract class AbstractPanelImpl extends EObjectImpl implements AbstractP
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -207,4 +195,4 @@ public abstract class AbstractPanelImpl extends EObjectImpl implements AbstractP
return super.eIsSet(featureID);
}
-} //AbstractPanelImpl
+} // AbstractPanelImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/DiFactoryImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/DiFactoryImpl.java
index 83369fb12c8..4d5899f3956 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/DiFactoryImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/DiFactoryImpl.java
@@ -26,36 +26,35 @@ import org.eclipse.papyrus.sashwindows.di.TabFolder;
import org.eclipse.papyrus.sashwindows.di.Window;
/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
+ * end-user-doc -->
+ *
* @generated
*/
public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
/**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Creates the default factory implementation. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
public static DiFactory init() {
try {
- DiFactory theDiFactory = (DiFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/0.7.0/sashdi");
- if (theDiFactory != null) {
+ DiFactory theDiFactory = (DiFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/0.7.0/sashdi");
+ if(theDiFactory != null) {
return theDiFactory;
}
- }
- catch (Exception exception) {
+ } catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new DiFactoryImpl();
}
/**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Creates an instance of the factory. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
public DiFactoryImpl() {
@@ -63,73 +62,83 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case DiPackage.SASH_MODEL: return createSashModel();
- case DiPackage.WINDOW: return createWindow();
- case DiPackage.POSITION: return createPosition();
- case DiPackage.SIZE: return createSize();
- case DiPackage.TAB_FOLDER: return createTabFolder();
- case DiPackage.PAGE_REF: return createPageRef();
- case DiPackage.SASH_PANEL: return createSashPanel();
- case DiPackage.ABSTRACT_PAGE: return createAbstractPage();
- case DiPackage.PAGE_LIST: return createPageList();
- case DiPackage.SASH_WINDOWS_MNGR: return createSashWindowsMngr();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ switch(eClass.getClassifierID()) {
+ case DiPackage.SASH_MODEL:
+ return createSashModel();
+ case DiPackage.WINDOW:
+ return createWindow();
+ case DiPackage.POSITION:
+ return createPosition();
+ case DiPackage.SIZE:
+ return createSize();
+ case DiPackage.TAB_FOLDER:
+ return createTabFolder();
+ case DiPackage.PAGE_REF:
+ return createPageRef();
+ case DiPackage.SASH_PANEL:
+ return createSashPanel();
+ case DiPackage.ABSTRACT_PAGE:
+ return createAbstractPage();
+ case DiPackage.PAGE_LIST:
+ return createPageList();
+ case DiPackage.SASH_WINDOWS_MNGR:
+ return createSashWindowsMngr();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public Object createFromString(EDataType eDataType, String initialValue) {
- switch (eDataType.getClassifierID()) {
- case DiPackage.INT:
- return createintFromString(eDataType, initialValue);
- case DiPackage.JAVA_OBJECT:
- return createJavaObjectFromString(eDataType, initialValue);
- case DiPackage.FLOAT:
- return createFloatFromString(eDataType, initialValue);
- case DiPackage.BOOLEAN:
- return createbooleanFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ switch(eDataType.getClassifierID()) {
+ case DiPackage.INT:
+ return createintFromString(eDataType, initialValue);
+ case DiPackage.JAVA_OBJECT:
+ return createJavaObjectFromString(eDataType, initialValue);
+ case DiPackage.FLOAT:
+ return createFloatFromString(eDataType, initialValue);
+ case DiPackage.BOOLEAN:
+ return createbooleanFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public String convertToString(EDataType eDataType, Object instanceValue) {
- switch (eDataType.getClassifierID()) {
- case DiPackage.INT:
- return convertintToString(eDataType, instanceValue);
- case DiPackage.JAVA_OBJECT:
- return convertJavaObjectToString(eDataType, instanceValue);
- case DiPackage.FLOAT:
- return convertFloatToString(eDataType, instanceValue);
- case DiPackage.BOOLEAN:
- return convertbooleanToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ switch(eDataType.getClassifierID()) {
+ case DiPackage.INT:
+ return convertintToString(eDataType, instanceValue);
+ case DiPackage.JAVA_OBJECT:
+ return convertJavaObjectToString(eDataType, instanceValue);
+ case DiPackage.FLOAT:
+ return convertFloatToString(eDataType, instanceValue);
+ case DiPackage.BOOLEAN:
+ return convertbooleanToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public SashModel createSashModel() {
@@ -138,8 +147,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public Window createWindow() {
@@ -148,8 +157,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public Position createPosition() {
@@ -158,8 +167,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public Size createSize() {
@@ -168,8 +177,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public TabFolder createTabFolder() {
@@ -178,8 +187,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public PageRef createPageRef() {
@@ -188,8 +197,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public SashPanel createSashPanel() {
@@ -198,8 +207,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public AbstractPage createAbstractPage() {
@@ -208,8 +217,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public PageList createPageList() {
@@ -218,8 +227,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public SashWindowsMngr createSashWindowsMngr() {
@@ -228,8 +237,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public Integer createintFromString(EDataType eDataType, String initialValue) {
@@ -237,8 +246,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public String convertintToString(EDataType eDataType, Object instanceValue) {
@@ -246,8 +255,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public Object createJavaObjectFromString(EDataType eDataType, String initialValue) {
@@ -255,8 +264,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public String convertJavaObjectToString(EDataType eDataType, Object instanceValue) {
@@ -264,8 +273,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public Float createFloatFromString(EDataType eDataType, String initialValue) {
@@ -273,8 +282,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public String convertFloatToString(EDataType eDataType, Object instanceValue) {
@@ -282,8 +291,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public Boolean createbooleanFromString(EDataType eDataType, String initialValue) {
@@ -291,8 +300,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public String convertbooleanToString(EDataType eDataType, Object instanceValue) {
@@ -300,8 +309,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public DiPackage getDiPackage() {
@@ -309,8 +318,8 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @deprecated
* @generated
*/
@@ -319,4 +328,4 @@ public class DiFactoryImpl extends EFactoryImpl implements DiFactory {
return DiPackage.eINSTANCE;
}
-} //DiFactoryImpl
+} // DiFactoryImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/DiPackageImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/DiPackageImpl.java
index 232a075d7d5..186f5db9175 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/DiPackageImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/DiPackageImpl.java
@@ -30,134 +30,132 @@ import org.eclipse.papyrus.sashwindows.di.TabFolder;
import org.eclipse.papyrus.sashwindows.di.Window;
/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
+ * end-user-doc -->
+ *
* @generated
*/
public class DiPackageImpl extends EPackageImpl implements DiPackage {
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EClass sashModelEClass = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EClass windowEClass = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EClass panelParentEClass = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EClass abstractPanelEClass = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EClass positionEClass = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EClass sizeEClass = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EClass tabFolderEClass = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EClass pageRefEClass = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EClass sashPanelEClass = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EClass abstractPageEClass = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EClass pageListEClass = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EClass sashWindowsMngrEClass = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EDataType intEDataType = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EDataType javaObjectEDataType = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EDataType floatEDataType = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private EDataType booleanEDataType = null;
/**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
+ * package package URI value.
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the
+ * package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see org.eclipse.papyrus.sashwindows.di.DiPackage#eNS_URI
* @see #init()
@@ -168,25 +166,28 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private static boolean isInited = false;
/**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ * Creates, registers, and initializes the <b>Package</b> for this model,
+ * and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link DiPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they
+ * should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc -->
*
- * <p>This method is used to initialize {@link DiPackage#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static DiPackage init() {
- if (isInited) return (DiPackage)EPackage.Registry.INSTANCE.getEPackage(DiPackage.eNS_URI);
+ if(isInited)
+ return (DiPackage)EPackage.Registry.INSTANCE.getEPackage(DiPackage.eNS_URI);
// Obtain or create and register package
DiPackageImpl theDiPackage = (DiPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DiPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DiPackageImpl());
@@ -205,15 +206,14 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
// Mark meta-data to indicate it can't be changed
theDiPackage.freeze();
-
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(DiPackage.eNS_URI, theDiPackage);
return theDiPackage;
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getSashModel() {
@@ -221,8 +221,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getSashModel_Windows() {
@@ -230,8 +230,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getSashModel_CurrentSelection() {
@@ -239,8 +239,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getWindow() {
@@ -248,8 +248,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getWindow_Position() {
@@ -257,8 +257,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getWindow_Size() {
@@ -266,8 +266,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getWindow_Panel() {
@@ -275,8 +275,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getPanelParent() {
@@ -284,8 +284,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getPanelParent_Children() {
@@ -293,8 +293,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getAbstractPanel() {
@@ -302,8 +302,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getAbstractPanel_Parent() {
@@ -311,8 +311,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getPosition() {
@@ -320,8 +320,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getPosition_X() {
@@ -329,8 +329,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getPosition_Y() {
@@ -338,8 +338,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getSize() {
@@ -347,8 +347,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getSize_Width() {
@@ -356,8 +356,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getSize_Length() {
@@ -365,8 +365,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getTabFolder() {
@@ -374,8 +374,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getTabFolder_Children() {
@@ -383,8 +383,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getPageRef() {
@@ -392,8 +392,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getPageRef_EmfPageIdentifier() {
@@ -401,8 +401,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getPageRef_PageIdentifier() {
@@ -410,8 +410,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getPageRef_ObjectPageIdentifier() {
@@ -419,8 +419,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getPageRef_Parent() {
@@ -428,8 +428,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getSashPanel() {
@@ -437,8 +437,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getSashPanel_SashPosition() {
@@ -446,8 +446,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getSashPanel_Direction() {
@@ -455,8 +455,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getAbstractPage() {
@@ -464,8 +464,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getAbstractPage_PageIdentifier() {
@@ -473,8 +473,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getPageList() {
@@ -482,8 +482,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getPageList_AvailablePage() {
@@ -491,8 +491,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getSashWindowsMngr() {
@@ -500,8 +500,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getSashWindowsMngr_PageList() {
@@ -509,8 +509,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getSashWindowsMngr_SashModel() {
@@ -518,8 +518,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EDataType getint() {
@@ -527,8 +527,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EDataType getJavaObject() {
@@ -536,8 +536,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EDataType getFloat() {
@@ -545,8 +545,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EDataType getboolean() {
@@ -554,8 +554,8 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public DiFactory getDiFactory() {
@@ -563,21 +563,22 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private boolean isCreated = false;
/**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
+ * Creates the meta-model objects for the package. This method is guarded to
+ * have no affect on any invocation but its first. <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void createPackageContents() {
- if (isCreated) return;
+ if(isCreated)
+ return;
isCreated = true;
// Create classes and their features
@@ -635,21 +636,22 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
private boolean isInitialized = false;
/**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public void initializePackageContents() {
- if (isInitialized) return;
+ if(isInitialized)
+ return;
isInitialized = true;
// Initialize package
@@ -800,18 +802,14 @@ public class DiPackageImpl extends EPackageImpl implements DiPackage {
}
/**
- * Initializes the annotations for <b>resource=XMI</b>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Initializes the annotations for <b>resource=XMI</b>. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
protected void createResourceXMIAnnotations() {
- String source = "resource=XMI";
- addAnnotation
- (this,
- source,
- new String[] {
- });
+ String source = "resource=XMI";
+ addAnnotation(this, source, new String[]{});
}
-} //DiPackageImpl
+} // DiPackageImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PageListImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PageListImpl.java
index caf2d585c2b..6892142dd75 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PageListImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PageListImpl.java
@@ -21,13 +21,13 @@ import org.eclipse.papyrus.sashwindows.di.PageList;
import org.eclipse.papyrus.sashwindows.di.PageRef;
/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Page List</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Page List</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.PageListImpl#getAvailablePage <em>Available Page</em>}</li>
+ * <li>
+ * {@link org.eclipse.papyrus.sashwindows.di.impl.PageListImpl#getAvailablePage
+ * <em>Available Page</em>}</li>
* </ul>
* </p>
*
@@ -36,9 +36,9 @@ import org.eclipse.papyrus.sashwindows.di.PageRef;
public class PageListImpl extends EObjectImpl implements PageList {
/**
- * The cached value of the '{@link #getAvailablePage() <em>Available Page</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getAvailablePage()
+ * <em>Available Page</em>}' containment reference list. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
*
* @see #getAvailablePage()
* @generated
@@ -47,8 +47,7 @@ public class PageListImpl extends EObjectImpl implements PageList {
protected EList<PageRef> availablePage;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -57,8 +56,7 @@ public class PageListImpl extends EObjectImpl implements PageList {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -68,8 +66,7 @@ public class PageListImpl extends EObjectImpl implements PageList {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -81,8 +78,7 @@ public class PageListImpl extends EObjectImpl implements PageList {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -95,8 +91,7 @@ public class PageListImpl extends EObjectImpl implements PageList {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -111,8 +106,7 @@ public class PageListImpl extends EObjectImpl implements PageList {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -126,8 +120,7 @@ public class PageListImpl extends EObjectImpl implements PageList {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -141,8 +134,7 @@ public class PageListImpl extends EObjectImpl implements PageList {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -159,8 +151,7 @@ public class PageListImpl extends EObjectImpl implements PageList {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -175,8 +166,7 @@ public class PageListImpl extends EObjectImpl implements PageList {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -189,4 +179,4 @@ public class PageListImpl extends EObjectImpl implements PageList {
return super.eIsSet(featureID);
}
-} //PageListImpl
+} // PageListImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PageRefImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PageRefImpl.java
index 47903ff9039..d7d8c70ff2b 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PageRefImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PageRefImpl.java
@@ -19,16 +19,20 @@ import org.eclipse.papyrus.sashwindows.di.PageRef;
import org.eclipse.papyrus.sashwindows.di.TabFolder;
/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Page Ref</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Page Ref</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.PageRefImpl#getEmfPageIdentifier <em>Emf Page Identifier</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.PageRefImpl#getPageIdentifier <em>Page Identifier</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.PageRefImpl#getObjectPageIdentifier <em>Object Page Identifier</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.PageRefImpl#getParent <em>Parent</em>}</li>
+ * <li>
+ * {@link org.eclipse.papyrus.sashwindows.di.impl.PageRefImpl#getEmfPageIdentifier
+ * <em>Emf Page Identifier</em>}</li>
+ * <li>
+ * {@link org.eclipse.papyrus.sashwindows.di.impl.PageRefImpl#getPageIdentifier
+ * <em>Page Identifier</em>}</li>
+ * <li>
+ * {@link org.eclipse.papyrus.sashwindows.di.impl.PageRefImpl#getObjectPageIdentifier
+ * <em>Object Page Identifier</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.PageRefImpl#getParent <em> Parent</em>}</li>
* </ul>
* </p>
*
@@ -37,9 +41,9 @@ import org.eclipse.papyrus.sashwindows.di.TabFolder;
public class PageRefImpl extends EObjectImpl implements PageRef {
/**
- * The cached value of the '{@link #getEmfPageIdentifier() <em>Emf Page Identifier</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getEmfPageIdentifier()
+ * <em>Emf Page Identifier</em>}' reference. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @see #getEmfPageIdentifier()
* @generated
@@ -48,9 +52,9 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
protected EObject emfPageIdentifier;
/**
- * The default value of the '{@link #getPageIdentifier() <em>Page Identifier</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The default value of the '{@link #getPageIdentifier()
+ * <em>Page Identifier</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @see #getPageIdentifier()
* @generated
@@ -59,9 +63,9 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
protected static final Object PAGE_IDENTIFIER_EDEFAULT = null;
/**
- * The default value of the '{@link #getObjectPageIdentifier() <em>Object Page Identifier</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The default value of the '{@link #getObjectPageIdentifier()
+ * <em>Object Page Identifier</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @see #getObjectPageIdentifier()
* @generated
@@ -70,9 +74,9 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
protected static final Object OBJECT_PAGE_IDENTIFIER_EDEFAULT = null;
/**
- * The cached value of the '{@link #getObjectPageIdentifier() <em>Object Page Identifier</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getObjectPageIdentifier()
+ * <em>Object Page Identifier</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @see #getObjectPageIdentifier()
* @generated
@@ -81,8 +85,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
protected Object objectPageIdentifier = OBJECT_PAGE_IDENTIFIER_EDEFAULT;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -91,8 +94,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -102,8 +104,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -120,8 +121,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -130,8 +130,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -143,8 +142,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -158,8 +156,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -168,8 +165,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -185,8 +181,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -200,8 +195,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -215,8 +209,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -238,8 +231,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -263,8 +255,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -288,8 +279,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -309,8 +299,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -327,8 +316,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -350,8 +338,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -360,8 +347,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -373,8 +359,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -385,8 +370,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -396,8 +380,7 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -417,4 +400,4 @@ public class PageRefImpl extends EObjectImpl implements PageRef {
eNotify(new ENotificationImpl(this, Notification.SET, DiPackage.PAGE_REF__PARENT, newParent, newParent));
}
-} //PageRefImpl
+} // PageRefImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PanelParentImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PanelParentImpl.java
index 68d34f53bfe..7c2267121ff 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PanelParentImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PanelParentImpl.java
@@ -20,13 +20,13 @@ import org.eclipse.papyrus.sashwindows.di.DiPackage;
import org.eclipse.papyrus.sashwindows.di.PanelParent;
/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Panel Parent</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Panel Parent</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.PanelParentImpl#getChildren <em>Children</em>}</li>
+ * <li>
+ * {@link org.eclipse.papyrus.sashwindows.di.impl.PanelParentImpl#getChildren
+ * <em>Children</em>}</li>
* </ul>
* </p>
*
@@ -35,9 +35,8 @@ import org.eclipse.papyrus.sashwindows.di.PanelParent;
public abstract class PanelParentImpl extends EObjectImpl implements PanelParent {
/**
- * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getChildren() <em>Children</em>}'
+ * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #getChildren()
* @generated
@@ -46,8 +45,7 @@ public abstract class PanelParentImpl extends EObjectImpl implements PanelParent
protected EList<AbstractPanel> children;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -56,8 +54,7 @@ public abstract class PanelParentImpl extends EObjectImpl implements PanelParent
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -67,8 +64,7 @@ public abstract class PanelParentImpl extends EObjectImpl implements PanelParent
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -80,8 +76,7 @@ public abstract class PanelParentImpl extends EObjectImpl implements PanelParent
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -92,8 +87,7 @@ public abstract class PanelParentImpl extends EObjectImpl implements PanelParent
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -108,8 +102,7 @@ public abstract class PanelParentImpl extends EObjectImpl implements PanelParent
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -123,8 +116,7 @@ public abstract class PanelParentImpl extends EObjectImpl implements PanelParent
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -138,8 +130,7 @@ public abstract class PanelParentImpl extends EObjectImpl implements PanelParent
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -156,8 +147,7 @@ public abstract class PanelParentImpl extends EObjectImpl implements PanelParent
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -172,8 +162,7 @@ public abstract class PanelParentImpl extends EObjectImpl implements PanelParent
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -186,4 +175,4 @@ public abstract class PanelParentImpl extends EObjectImpl implements PanelParent
return super.eIsSet(featureID);
}
-} //PanelParentImpl
+} // PanelParentImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PositionImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PositionImpl.java
index f322136b58b..a71cb442356 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PositionImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/PositionImpl.java
@@ -14,14 +14,12 @@ import org.eclipse.papyrus.sashwindows.di.DiPackage;
import org.eclipse.papyrus.sashwindows.di.Position;
/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Position</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Position</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.PositionImpl#getX <em>X</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.PositionImpl#getY <em>Y</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.PositionImpl#getX <em>X </em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.PositionImpl#getY <em>Y </em>}</li>
* </ul>
* </p>
*
@@ -30,9 +28,8 @@ import org.eclipse.papyrus.sashwindows.di.Position;
public class PositionImpl extends EObjectImpl implements Position {
/**
- * The default value of the '{@link #getX() <em>X</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The default value of the '{@link #getX() <em>X</em>}' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
*
* @see #getX()
* @generated
@@ -41,9 +38,8 @@ public class PositionImpl extends EObjectImpl implements Position {
protected static final int X_EDEFAULT = 0;
/**
- * The cached value of the '{@link #getX() <em>X</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getX() <em>X</em>}' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
*
* @see #getX()
* @generated
@@ -52,9 +48,8 @@ public class PositionImpl extends EObjectImpl implements Position {
protected int x = X_EDEFAULT;
/**
- * The default value of the '{@link #getY() <em>Y</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The default value of the '{@link #getY() <em>Y</em>}' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
*
* @see #getY()
* @generated
@@ -63,9 +58,8 @@ public class PositionImpl extends EObjectImpl implements Position {
protected static final int Y_EDEFAULT = 0;
/**
- * The cached value of the '{@link #getY() <em>Y</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getY() <em>Y</em>}' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
*
* @see #getY()
* @generated
@@ -74,8 +68,7 @@ public class PositionImpl extends EObjectImpl implements Position {
protected int y = Y_EDEFAULT;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -84,8 +77,7 @@ public class PositionImpl extends EObjectImpl implements Position {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -95,8 +87,7 @@ public class PositionImpl extends EObjectImpl implements Position {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -105,8 +96,7 @@ public class PositionImpl extends EObjectImpl implements Position {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -118,8 +108,7 @@ public class PositionImpl extends EObjectImpl implements Position {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -128,8 +117,7 @@ public class PositionImpl extends EObjectImpl implements Position {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -141,8 +129,7 @@ public class PositionImpl extends EObjectImpl implements Position {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -158,8 +145,7 @@ public class PositionImpl extends EObjectImpl implements Position {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -177,8 +163,7 @@ public class PositionImpl extends EObjectImpl implements Position {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -196,8 +181,7 @@ public class PositionImpl extends EObjectImpl implements Position {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -213,8 +197,7 @@ public class PositionImpl extends EObjectImpl implements Position {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -232,4 +215,4 @@ public class PositionImpl extends EObjectImpl implements Position {
return result.toString();
}
-} //PositionImpl
+} // PositionImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SashModelImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SashModelImpl.java
index d6191c6fe10..90536345fb0 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SashModelImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SashModelImpl.java
@@ -31,25 +31,26 @@ import org.eclipse.papyrus.sashwindows.di.util.DiSwitch;
import org.eclipse.swt.SWT;
/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Sash Model</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Sash Model</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.SashModelImpl#getWindows <em>Windows</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.SashModelImpl#getCurrentSelection <em>Current Selection</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.SashModelImpl#getWindows
+ * <em>Windows</em>}</li>
+ * <li>
+ * {@link org.eclipse.papyrus.sashwindows.di.impl.SashModelImpl#getCurrentSelection
+ * <em>Current Selection</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class SashModelImpl extends EObjectImpl implements SashModel {
/**
- * The cached value of the '{@link #getWindows() <em>Windows</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getWindows() <em>Windows</em>}'
+ * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @see #getWindows()
* @generated
* @ordered
@@ -57,9 +58,10 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
protected EList<Window> windows;
/**
- * The cached value of the '{@link #getCurrentSelection() <em>Current Selection</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getCurrentSelection()
+ * <em>Current Selection</em>}' reference. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @see #getCurrentSelection()
* @generated
* @ordered
@@ -67,8 +69,8 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
protected TabFolder currentSelection;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
protected SashModelImpl() {
@@ -76,8 +78,8 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -86,28 +88,28 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EList<Window> getWindows() {
- if (windows == null) {
+ if(windows == null) {
windows = new EObjectContainmentEList<Window>(Window.class, this, DiPackage.SASH_MODEL__WINDOWS);
}
return windows;
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public TabFolder getCurrentSelection() {
- if (currentSelection != null && currentSelection.eIsProxy()) {
+ if(currentSelection != null && currentSelection.eIsProxy()) {
InternalEObject oldCurrentSelection = (InternalEObject)currentSelection;
currentSelection = (TabFolder)eResolveProxy(oldCurrentSelection);
- if (currentSelection != oldCurrentSelection) {
- if (eNotificationRequired())
+ if(currentSelection != oldCurrentSelection) {
+ if(eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, DiPackage.SASH_MODEL__CURRENT_SELECTION, oldCurrentSelection, currentSelection));
}
}
@@ -115,8 +117,8 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public TabFolder basicGetCurrentSelection() {
@@ -124,20 +126,19 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public void setCurrentSelection(TabFolder newCurrentSelection) {
TabFolder oldCurrentSelection = currentSelection;
currentSelection = newCurrentSelection;
- if (eNotificationRequired())
+ if(eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DiPackage.SASH_MODEL__CURRENT_SELECTION, oldCurrentSelection, currentSelection));
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -146,8 +147,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -161,8 +161,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -181,8 +180,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
*/
public PageRef caseSashModel(SashModel object) {
PageRef res = null;
- for(Window window : object.getWindows())
- {
+ for(Window window : object.getWindows()) {
res = this.doSwitch(window);
if(res != null)
return res;
@@ -204,7 +202,6 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
if(panel == null)
return null;
-
PageRef res = this.doSwitch(panel);
if(res != null)
return res;
@@ -222,8 +219,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
*/
public PageRef caseSashPanel(SashPanel object) {
PageRef res = null;
- for(AbstractPanel panel : object.getChildren())
- {
+ for(AbstractPanel panel : object.getChildren()) {
res = this.doSwitch(panel);
if(res != null)
return res;
@@ -241,8 +237,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
* @return
*/
public PageRef caseTabFolder(TabFolder object) {
- for(PageRef pageRef : object.getChildren())
- {
+ for(PageRef pageRef : object.getChildren()) {
if(pageRef.isForIdentifier(pageIdentifier))
return pageRef;
@@ -260,9 +255,8 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * TODO Add method to metamodel
+ * <!-- begin-user-doc --> <!-- end-user-doc --> TODO Add method to
+ * metamodel
*
* @generated NOT
*/
@@ -281,8 +275,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
*/
public TabFolder caseSashModel(SashModel object) {
TabFolder res = null;
- for(Window window : object.getWindows())
- {
+ for(Window window : object.getWindows()) {
res = this.doSwitch(window);
if(res != null)
return res;
@@ -304,7 +297,6 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
if(panel == null)
return null;
-
TabFolder res = this.doSwitch(panel);
if(res != null)
return res;
@@ -322,8 +314,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
*/
public TabFolder caseSashPanel(SashPanel object) {
TabFolder res = null;
- for(AbstractPanel panel : object.getChildren())
- {
+ for(AbstractPanel panel : object.getChildren()) {
res = this.doSwitch(panel);
if(res != null)
return res;
@@ -353,30 +344,27 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * TODO Add method to metamodel
+ * <!-- begin-user-doc --> <!-- end-user-doc --> TODO Add method to
+ * metamodel
*
* @generated NOT
*/
public Window lookupFirstWindow() {
-
+
List<Window> list = getWindows();
if(list.size() == 0)
return null;
-
+
return list.get(0);
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
public void movePage(TabFolder srcParentFolder, int srcIndex, TabFolder targetParentFolder, int targetIndex) {
-
// Check if we move all pages of srcFolder
if(srcIndex == -1) {
// move all
@@ -401,8 +389,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -421,7 +408,8 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
direction = SWT.VERTICAL;
// Create sash
newSash = DiFactory.eINSTANCE.createSashPanel();
- // Insert in parent. Should be done before setting childrens, otherwise, the child can't be
+ // Insert in parent. Should be done before setting childrens, otherwise,
+ // the child can't be
// replaced as it will not belong to parent anymore.
refParent.replaceChild(refFolder, newSash);
@@ -434,8 +422,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -449,8 +436,7 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -476,25 +462,25 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated NOT
*/
public void removeAllPages() {
-
+
// Get a the first window and a folder.
// Clear the folder and set it as the root folder.
// This disguard all other folder and pages ...
Window firstWindow = lookupFirstWindow();
TabFolder folder = lookupFirstFolder();
-
+
folder.getChildren().clear();
firstWindow.setPanel(folder);
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated NOT
*/
public void removeOtherPages(Object pageIdentifier) {
@@ -504,99 +490,98 @@ public class SashModelImpl extends EObjectImpl implements SashModel {
Window firstWindow = lookupFirstWindow();
TabFolder folder = lookupFirstFolder();
PageRef page = lookupPage(pageIdentifier);
-
+
folder.getChildren().clear();
- if( page != null)
- {
+ if(page != null) {
folder.getChildren().add(page);
}
firstWindow.setPanel(folder);
}
-
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case DiPackage.SASH_MODEL__WINDOWS:
- return ((InternalEList<?>)getWindows()).basicRemove(otherEnd, msgs);
+ switch(featureID) {
+ case DiPackage.SASH_MODEL__WINDOWS:
+ return ((InternalEList<?>)getWindows()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case DiPackage.SASH_MODEL__WINDOWS:
- return getWindows();
- case DiPackage.SASH_MODEL__CURRENT_SELECTION:
- if (resolve) return getCurrentSelection();
- return basicGetCurrentSelection();
+ switch(featureID) {
+ case DiPackage.SASH_MODEL__WINDOWS:
+ return getWindows();
+ case DiPackage.SASH_MODEL__CURRENT_SELECTION:
+ if(resolve)
+ return getCurrentSelection();
+ return basicGetCurrentSelection();
}
return super.eGet(featureID, resolve, coreType);
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case DiPackage.SASH_MODEL__WINDOWS:
- getWindows().clear();
- getWindows().addAll((Collection<? extends Window>)newValue);
- return;
- case DiPackage.SASH_MODEL__CURRENT_SELECTION:
- setCurrentSelection((TabFolder)newValue);
- return;
+ switch(featureID) {
+ case DiPackage.SASH_MODEL__WINDOWS:
+ getWindows().clear();
+ getWindows().addAll((Collection<? extends Window>)newValue);
+ return;
+ case DiPackage.SASH_MODEL__CURRENT_SELECTION:
+ setCurrentSelection((TabFolder)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
- switch (featureID) {
- case DiPackage.SASH_MODEL__WINDOWS:
- getWindows().clear();
- return;
- case DiPackage.SASH_MODEL__CURRENT_SELECTION:
- setCurrentSelection((TabFolder)null);
- return;
+ switch(featureID) {
+ case DiPackage.SASH_MODEL__WINDOWS:
+ getWindows().clear();
+ return;
+ case DiPackage.SASH_MODEL__CURRENT_SELECTION:
+ setCurrentSelection((TabFolder)null);
+ return;
}
super.eUnset(featureID);
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
- switch (featureID) {
- case DiPackage.SASH_MODEL__WINDOWS:
- return windows != null && !windows.isEmpty();
- case DiPackage.SASH_MODEL__CURRENT_SELECTION:
- return currentSelection != null;
+ switch(featureID) {
+ case DiPackage.SASH_MODEL__WINDOWS:
+ return windows != null && !windows.isEmpty();
+ case DiPackage.SASH_MODEL__CURRENT_SELECTION:
+ return currentSelection != null;
}
return super.eIsSet(featureID);
}
-} //SashModelImpl
+} // SashModelImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SashPanelImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SashPanelImpl.java
index ea41c6a50c2..27785ae9ea0 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SashPanelImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SashPanelImpl.java
@@ -23,15 +23,18 @@ import org.eclipse.papyrus.sashwindows.di.PanelParent;
import org.eclipse.papyrus.sashwindows.di.SashPanel;
/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Sash Panel</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Sash Panel</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.SashPanelImpl#getChildren <em>Children</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.SashPanelImpl#getSashPosition <em>Sash Position</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.SashPanelImpl#getDirection <em>Direction</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.SashPanelImpl#getChildren
+ * <em>Children</em>}</li>
+ * <li>
+ * {@link org.eclipse.papyrus.sashwindows.di.impl.SashPanelImpl#getSashPosition
+ * <em>Sash Position</em>}</li>
+ * <li>
+ * {@link org.eclipse.papyrus.sashwindows.di.impl.SashPanelImpl#getDirection
+ * <em>Direction</em>}</li>
* </ul>
* </p>
*
@@ -40,9 +43,8 @@ import org.eclipse.papyrus.sashwindows.di.SashPanel;
public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
/**
- * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getChildren() <em>Children</em>}'
+ * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #getChildren()
* @generated
@@ -51,9 +53,9 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
protected EList<AbstractPanel> children;
/**
- * The default value of the '{@link #getSashPosition() <em>Sash Position</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The default value of the '{@link #getSashPosition()
+ * <em>Sash Position</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @see #getSashPosition()
* @generated
@@ -62,9 +64,9 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
protected static final float SASH_POSITION_EDEFAULT = 0.0F;
/**
- * The cached value of the '{@link #getSashPosition() <em>Sash Position</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getSashPosition()
+ * <em>Sash Position</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
*
* @see #getSashPosition()
* @generated
@@ -73,9 +75,8 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
protected float sashPosition = SASH_POSITION_EDEFAULT;
/**
- * The default value of the '{@link #getDirection() <em>Direction</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The default value of the '{@link #getDirection() <em>Direction</em>}'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #getDirection()
* @generated
@@ -84,9 +85,8 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
protected static final int DIRECTION_EDEFAULT = 0;
/**
- * The cached value of the '{@link #getDirection() <em>Direction</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getDirection() <em>Direction</em>}'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #getDirection()
* @generated
@@ -95,8 +95,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
protected int direction = DIRECTION_EDEFAULT;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -105,8 +104,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -116,8 +114,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -129,8 +126,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -139,8 +135,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -152,8 +147,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -162,8 +156,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -197,8 +190,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -209,13 +201,12 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
PanelParent parent = getParent();
// Change parent
- // otherChild.setParent( parent );
+ // otherChild.setParent( parent );
parent.replaceChild(this, otherChild);
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -230,8 +221,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -245,8 +235,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -264,8 +253,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -288,8 +276,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -310,8 +297,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -329,8 +315,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -348,8 +333,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -367,8 +351,7 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -387,9 +370,8 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
}
/**
- * <!-- begin-user-doc -->
- * Set both ends (parent and child).
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> Set both ends (parent and child). <!--
+ * end-user-doc -->
*
* @generated NOT
*/
@@ -404,4 +386,4 @@ public class SashPanelImpl extends AbstractPanelImpl implements SashPanel {
throw new IndexOutOfBoundsException("Child '" + oldChild + "' not found in sash. Can't replace it.");
}
-} //SashPanelImpl
+} // SashPanelImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SashWindowsMngrImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SashWindowsMngrImpl.java
index 5a006654b70..5eab0b6166e 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SashWindowsMngrImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SashWindowsMngrImpl.java
@@ -18,14 +18,16 @@ import org.eclipse.papyrus.sashwindows.di.SashModel;
import org.eclipse.papyrus.sashwindows.di.SashWindowsMngr;
/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Sash Windows Mngr</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Sash Windows Mngr</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.SashWindowsMngrImpl#getPageList <em>Page List</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.SashWindowsMngrImpl#getSashModel <em>Sash Model</em>}</li>
+ * <li>
+ * {@link org.eclipse.papyrus.sashwindows.di.impl.SashWindowsMngrImpl#getPageList
+ * <em>Page List</em>}</li>
+ * <li>
+ * {@link org.eclipse.papyrus.sashwindows.di.impl.SashWindowsMngrImpl#getSashModel
+ * <em>Sash Model</em>}</li>
* </ul>
* </p>
*
@@ -34,9 +36,8 @@ import org.eclipse.papyrus.sashwindows.di.SashWindowsMngr;
public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr {
/**
- * The cached value of the '{@link #getPageList() <em>Page List</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getPageList() <em>Page List</em>}'
+ * containment reference. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #getPageList()
* @generated
@@ -45,9 +46,8 @@ public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr
protected PageList pageList;
/**
- * The cached value of the '{@link #getSashModel() <em>Sash Model</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getSashModel() <em>Sash Model</em>}'
+ * containment reference. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #getSashModel()
* @generated
@@ -56,8 +56,7 @@ public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr
protected SashModel sashModel;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -66,8 +65,7 @@ public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -77,8 +75,7 @@ public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -87,8 +84,7 @@ public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -106,8 +102,7 @@ public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -126,8 +121,7 @@ public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -136,8 +130,7 @@ public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -155,8 +148,7 @@ public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -175,8 +167,7 @@ public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -192,8 +183,7 @@ public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -209,8 +199,7 @@ public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -228,8 +217,7 @@ public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -247,8 +235,7 @@ public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -263,4 +250,4 @@ public class SashWindowsMngrImpl extends EObjectImpl implements SashWindowsMngr
return super.eIsSet(featureID);
}
-} //SashWindowsMngrImpl
+} // SashWindowsMngrImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SizeImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SizeImpl.java
index 68150ef02da..c9f21d134b5 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SizeImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/SizeImpl.java
@@ -14,14 +14,12 @@ import org.eclipse.papyrus.sashwindows.di.DiPackage;
import org.eclipse.papyrus.sashwindows.di.Size;
/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Size</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Size</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.SizeImpl#getWidth <em>Width</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.SizeImpl#getLength <em>Length</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.SizeImpl#getWidth <em> Width</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.SizeImpl#getLength <em> Length</em>}</li>
* </ul>
* </p>
*
@@ -31,8 +29,7 @@ public class SizeImpl extends EObjectImpl implements Size {
/**
* The default value of the '{@link #getWidth() <em>Width</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #getWidth()
* @generated
@@ -42,8 +39,7 @@ public class SizeImpl extends EObjectImpl implements Size {
/**
* The cached value of the '{@link #getWidth() <em>Width</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #getWidth()
* @generated
@@ -52,9 +48,8 @@ public class SizeImpl extends EObjectImpl implements Size {
protected int width = WIDTH_EDEFAULT;
/**
- * The default value of the '{@link #getLength() <em>Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The default value of the '{@link #getLength() <em>Length</em>}'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #getLength()
* @generated
@@ -64,8 +59,7 @@ public class SizeImpl extends EObjectImpl implements Size {
/**
* The cached value of the '{@link #getLength() <em>Length</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #getLength()
* @generated
@@ -74,8 +68,7 @@ public class SizeImpl extends EObjectImpl implements Size {
protected int length = LENGTH_EDEFAULT;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -84,8 +77,7 @@ public class SizeImpl extends EObjectImpl implements Size {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -95,8 +87,7 @@ public class SizeImpl extends EObjectImpl implements Size {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -105,8 +96,7 @@ public class SizeImpl extends EObjectImpl implements Size {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -118,8 +108,7 @@ public class SizeImpl extends EObjectImpl implements Size {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -128,8 +117,7 @@ public class SizeImpl extends EObjectImpl implements Size {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -141,8 +129,7 @@ public class SizeImpl extends EObjectImpl implements Size {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -158,8 +145,7 @@ public class SizeImpl extends EObjectImpl implements Size {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -177,8 +163,7 @@ public class SizeImpl extends EObjectImpl implements Size {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -196,8 +181,7 @@ public class SizeImpl extends EObjectImpl implements Size {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -213,8 +197,7 @@ public class SizeImpl extends EObjectImpl implements Size {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -232,4 +215,4 @@ public class SizeImpl extends EObjectImpl implements Size {
return result.toString();
}
-} //SizeImpl
+} // SizeImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/TabFolderImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/TabFolderImpl.java
index 562e6e86744..d34ae761bd8 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/TabFolderImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/TabFolderImpl.java
@@ -20,13 +20,12 @@ import org.eclipse.papyrus.sashwindows.di.PageRef;
import org.eclipse.papyrus.sashwindows.di.TabFolder;
/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Tab Folder</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Tab Folder</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.TabFolderImpl#getChildren <em>Children</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.TabFolderImpl#getChildren
+ * <em>Children</em>}</li>
* </ul>
* </p>
*
@@ -35,9 +34,8 @@ import org.eclipse.papyrus.sashwindows.di.TabFolder;
public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
/**
- * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getChildren() <em>Children</em>}'
+ * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #getChildren()
* @generated
@@ -46,8 +44,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
protected EList<PageRef> children;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -56,8 +53,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -67,8 +63,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -80,8 +75,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -92,8 +86,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -102,8 +95,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -118,8 +110,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -133,8 +124,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -148,8 +138,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -166,8 +155,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -182,8 +170,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -219,8 +206,7 @@ public class TabFolderImpl extends AbstractPanelImpl implements TabFolder {
if(listSize == 0)
return;
-
getChildren().move(newIndex, oldIndex);
}
-} //TabFolderImpl
+} // TabFolderImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/WindowImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/WindowImpl.java
index 811904ba936..facc3f33e50 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/WindowImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/impl/WindowImpl.java
@@ -18,15 +18,14 @@ import org.eclipse.papyrus.sashwindows.di.Size;
import org.eclipse.papyrus.sashwindows.di.Window;
/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Window</b></em>'.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Window</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.WindowImpl#getPosition <em>Position</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.WindowImpl#getSize <em>Size</em>}</li>
- * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.WindowImpl#getPanel <em>Panel</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.WindowImpl#getPosition
+ * <em>Position</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.WindowImpl#getSize <em> Size</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sashwindows.di.impl.WindowImpl#getPanel <em> Panel</em>}</li>
* </ul>
* </p>
*
@@ -35,9 +34,8 @@ import org.eclipse.papyrus.sashwindows.di.Window;
public class WindowImpl extends PanelParentImpl implements Window {
/**
- * The cached value of the '{@link #getPosition() <em>Position</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached value of the '{@link #getPosition() <em>Position</em>}'
+ * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #getPosition()
* @generated
@@ -47,8 +45,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
/**
* The cached value of the '{@link #getSize() <em>Size</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see #getSize()
* @generated
@@ -57,8 +54,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
protected Size size;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -67,8 +63,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -78,8 +73,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -96,8 +90,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -106,8 +99,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -119,8 +111,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -137,8 +128,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -147,8 +137,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -160,8 +149,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -171,8 +159,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -185,8 +172,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -199,8 +185,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -224,8 +209,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -246,8 +230,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -268,8 +251,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@@ -287,8 +269,7 @@ public class WindowImpl extends PanelParentImpl implements Window {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@@ -296,5 +277,4 @@ public class WindowImpl extends PanelParentImpl implements Window {
setPanel(newChild);
}
-
-} //WindowImpl
+} // WindowImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiAdapterFactory.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiAdapterFactory.java
index 45a7c258b0c..dfbc7aa800d 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiAdapterFactory.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiAdapterFactory.java
@@ -25,121 +25,134 @@ import org.eclipse.papyrus.sashwindows.di.TabFolder;
import org.eclipse.papyrus.sashwindows.di.Window;
/**
- * <!-- begin-user-doc -->
- * The <b>Adapter Factory</b> for the model.
- * It provides an adapter <code>createXXX</code> method for each class of the model.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides
+ * an adapter <code>createXXX</code> method for each class of the model. <!--
+ * end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.DiPackage
* @generated
*/
public class DiAdapterFactory extends AdapterFactoryImpl {
/**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
protected static DiPackage modelPackage;
/**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
public DiAdapterFactory() {
- if (modelPackage == null) {
+ if(modelPackage == null) {
modelPackage = DiPackage.eINSTANCE;
}
}
/**
* Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc -->
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> This implementation returns <code>true</code> if
+ * the object is either the model's package or is an instance object of the
+ * model. <!-- end-user-doc -->
+ *
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@Override
public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
+ if(object == modelPackage) {
return true;
}
- if (object instanceof EObject) {
+ if(object instanceof EObject) {
return ((EObject)object).eClass().getEPackage() == modelPackage;
}
return false;
}
/**
- * The switch that delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The switch that delegates to the <code>createXXX</code> methods. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected DiSwitch<Adapter> modelSwitch =
- new DiSwitch<Adapter>() {
- @Override
- public Adapter caseSashModel(SashModel object) {
- return createSashModelAdapter();
- }
- @Override
- public Adapter caseWindow(Window object) {
- return createWindowAdapter();
- }
- @Override
- public Adapter casePanelParent(PanelParent object) {
- return createPanelParentAdapter();
- }
- @Override
- public Adapter caseAbstractPanel(AbstractPanel object) {
- return createAbstractPanelAdapter();
- }
- @Override
- public Adapter casePosition(Position object) {
- return createPositionAdapter();
- }
- @Override
- public Adapter caseSize(Size object) {
- return createSizeAdapter();
- }
- @Override
- public Adapter caseTabFolder(TabFolder object) {
- return createTabFolderAdapter();
- }
- @Override
- public Adapter casePageRef(PageRef object) {
- return createPageRefAdapter();
- }
- @Override
- public Adapter caseSashPanel(SashPanel object) {
- return createSashPanelAdapter();
- }
- @Override
- public Adapter caseAbstractPage(AbstractPage object) {
- return createAbstractPageAdapter();
- }
- @Override
- public Adapter casePageList(PageList object) {
- return createPageListAdapter();
- }
- @Override
- public Adapter caseSashWindowsMngr(SashWindowsMngr object) {
- return createSashWindowsMngrAdapter();
- }
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
+ protected DiSwitch<Adapter> modelSwitch = new DiSwitch<Adapter>() {
+
+ @Override
+ public Adapter caseSashModel(SashModel object) {
+ return createSashModelAdapter();
+ }
+
+ @Override
+ public Adapter caseWindow(Window object) {
+ return createWindowAdapter();
+ }
+
+ @Override
+ public Adapter casePanelParent(PanelParent object) {
+ return createPanelParentAdapter();
+ }
+
+ @Override
+ public Adapter caseAbstractPanel(AbstractPanel object) {
+ return createAbstractPanelAdapter();
+ }
+
+ @Override
+ public Adapter casePosition(Position object) {
+ return createPositionAdapter();
+ }
+
+ @Override
+ public Adapter caseSize(Size object) {
+ return createSizeAdapter();
+ }
+
+ @Override
+ public Adapter caseTabFolder(TabFolder object) {
+ return createTabFolderAdapter();
+ }
+
+ @Override
+ public Adapter casePageRef(PageRef object) {
+ return createPageRefAdapter();
+ }
+
+ @Override
+ public Adapter caseSashPanel(SashPanel object) {
+ return createSashPanelAdapter();
+ }
+
+ @Override
+ public Adapter caseAbstractPage(AbstractPage object) {
+ return createAbstractPageAdapter();
+ }
+
+ @Override
+ public Adapter casePageList(PageList object) {
+ return createPageListAdapter();
+ }
+
+ @Override
+ public Adapter caseSashWindowsMngr(SashWindowsMngr object) {
+ return createSashWindowsMngrAdapter();
+ }
+
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
/**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc -->
+ * Creates an adapter for the <code>target</code>. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param target the object to adapt.
+ *
+ * @param target
+ * the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@@ -148,13 +161,12 @@ public class DiAdapterFactory extends AdapterFactoryImpl {
return modelSwitch.doSwitch((EObject)target);
}
-
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sashwindows.di.SashModel <em>Sash Model</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sashwindows.di.SashModel <em>Sash Model</em>} '. <!-- begin-user-doc
+ * --> This default implementation returns null so
+ * that we can easily ignore cases; it's useful to ignore a case when
+ * inheritance will catch all the cases anyway. <!-- end-user-doc -->
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.sashwindows.di.SashModel
* @generated
@@ -164,11 +176,11 @@ public class DiAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sashwindows.di.Window <em>Window</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sashwindows.di.Window <em>Window</em>}'. <!--
+ * begin-user-doc --> This default implementation returns null so that we
+ * can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.sashwindows.di.Window
* @generated
@@ -178,11 +190,12 @@ public class DiAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sashwindows.di.PanelParent <em>Panel Parent</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sashwindows.di.PanelParent
+ * <em>Panel Parent</em>}'. <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.sashwindows.di.PanelParent
* @generated
@@ -192,11 +205,12 @@ public class DiAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sashwindows.di.AbstractPanel <em>Abstract Panel</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sashwindows.di.AbstractPanel
+ * <em>Abstract Panel</em>}'. <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.sashwindows.di.AbstractPanel
* @generated
@@ -206,11 +220,11 @@ public class DiAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sashwindows.di.Position <em>Position</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sashwindows.di.Position <em>Position</em>}'.
+ * <!-- begin-user-doc --> This default implementation returns null so that
+ * we can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.sashwindows.di.Position
* @generated
@@ -220,11 +234,11 @@ public class DiAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sashwindows.di.Size <em>Size</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sashwindows.di.Size <em>Size</em>}'. <!--
+ * begin-user-doc --> This default implementation returns null so that we
+ * can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.sashwindows.di.Size
* @generated
@@ -234,11 +248,11 @@ public class DiAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sashwindows.di.TabFolder <em>Tab Folder</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sashwindows.di.TabFolder <em>Tab Folder</em>} '. <!-- begin-user-doc
+ * --> This default implementation returns null so
+ * that we can easily ignore cases; it's useful to ignore a case when
+ * inheritance will catch all the cases anyway. <!-- end-user-doc -->
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.sashwindows.di.TabFolder
* @generated
@@ -248,11 +262,11 @@ public class DiAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sashwindows.di.PageRef <em>Page Ref</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sashwindows.di.PageRef <em>Page Ref</em>}'.
+ * <!-- begin-user-doc --> This default implementation returns null so that
+ * we can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.sashwindows.di.PageRef
* @generated
@@ -262,11 +276,11 @@ public class DiAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sashwindows.di.SashPanel <em>Sash Panel</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sashwindows.di.SashPanel <em>Sash Panel</em>} '. <!-- begin-user-doc
+ * --> This default implementation returns null so
+ * that we can easily ignore cases; it's useful to ignore a case when
+ * inheritance will catch all the cases anyway. <!-- end-user-doc -->
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.sashwindows.di.SashPanel
* @generated
@@ -276,11 +290,12 @@ public class DiAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sashwindows.di.AbstractPage <em>Abstract Page</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sashwindows.di.AbstractPage
+ * <em>Abstract Page</em>}'. <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.sashwindows.di.AbstractPage
* @generated
@@ -290,11 +305,11 @@ public class DiAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sashwindows.di.PageList <em>Page List</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sashwindows.di.PageList <em>Page List</em>}'.
+ * <!-- begin-user-doc --> This default implementation returns null so that
+ * we can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.sashwindows.di.PageList
* @generated
@@ -304,11 +319,12 @@ public class DiAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr <em>Sash Windows Mngr</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sashwindows.di.SashWindowsMngr
+ * <em>Sash Windows Mngr</em>}'. <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.sashwindows.di.SashWindowsMngr
* @generated
@@ -318,10 +334,9 @@ public class DiAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for the default case.
- * <!-- begin-user-doc -->
- * This default implementation returns null.
- * <!-- end-user-doc -->
+ * Creates a new adapter for the default case. <!-- begin-user-doc --> This
+ * default implementation returns null. <!-- end-user-doc -->
+ *
* @return the new adapter.
* @generated
*/
@@ -329,4 +344,4 @@ public class DiAdapterFactory extends AdapterFactoryImpl {
return null;
}
-} //DiAdapterFactory
+} // DiAdapterFactory
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiResourceFactoryImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiResourceFactoryImpl.java
index 13e3886c29f..6c5a9f534ad 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiResourceFactoryImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiResourceFactoryImpl.java
@@ -15,17 +15,18 @@ import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
import org.eclipse.emf.ecore.xmi.XMLResource;
/**
- * <!-- begin-user-doc -->
- * The <b>Resource Factory</b> associated with the package.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> The <b>Resource Factory</b> associated with the
+ * package. <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.util.DiResourceImpl
* @generated
*/
public class DiResourceFactoryImpl extends ResourceFactoryImpl {
+
/**
- * Creates an instance of the resource factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Creates an instance of the resource factory. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
public DiResourceFactoryImpl() {
@@ -33,9 +34,9 @@ public class DiResourceFactoryImpl extends ResourceFactoryImpl {
}
/**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Creates an instance of the resource. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
@Override
@@ -44,4 +45,4 @@ public class DiResourceFactoryImpl extends ResourceFactoryImpl {
return result;
}
-} //DiResourceFactoryImpl
+} // DiResourceFactoryImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiResourceImpl.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiResourceImpl.java
index 1c3ce2f8a8e..82185bd6c72 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiResourceImpl.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiResourceImpl.java
@@ -11,22 +11,24 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
/**
- * <!-- begin-user-doc -->
- * The <b>Resource </b> associated with the package.
+ * <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.util.DiResourceFactoryImpl
* @generated
*/
public class DiResourceImpl extends XMIResourceImpl {
+
/**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param uri the URI of the new resource.
+ * Creates an instance of the resource. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
* @generated
*/
public DiResourceImpl(URI uri) {
super(uri);
}
-} //DiResourceImpl
+} // DiResourceImpl
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiSwitch.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiSwitch.java
index a53c1ebc668..a3d1b247220 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiSwitch.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiSwitch.java
@@ -25,43 +25,41 @@ import org.eclipse.papyrus.sashwindows.di.TabFolder;
import org.eclipse.papyrus.sashwindows.di.Window;
/**
- * <!-- begin-user-doc -->
- * The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object
- * and proceeding up the inheritance hierarchy
- * until a non-null result is returned,
- * which is the result of the switch.
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance
+ * hierarchy. It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object and proceeding up the
+ * inheritance hierarchy until a non-null result is returned, which is the
+ * result of the switch. <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.sashwindows.di.DiPackage
* @generated
*/
public class DiSwitch<T> {
/**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
protected static DiPackage modelPackage;
/**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Creates an instance of the switch. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
public DiSwitch() {
- if (modelPackage == null) {
+ if(modelPackage == null) {
modelPackage = DiPackage.eINSTANCE;
}
}
/**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Calls <code>caseXXX</code> for each class of the model until one returns
+ * a non null result; it yields that result. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@@ -70,122 +68,149 @@ public class DiSwitch<T> {
}
/**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Calls <code>caseXXX</code> for each class of the model until one returns
+ * a non null result; it yields that result. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
protected T doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
+ if(theEClass.eContainer() == modelPackage) {
return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else {
+ } else {
List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
- defaultCase(theEObject) :
- doSwitch(eSuperTypes.get(0), theEObject);
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
}
}
/**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Calls <code>caseXXX</code> for each class of the model until one returns
+ * a non null result; it yields that result. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
protected T doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case DiPackage.SASH_MODEL: {
- SashModel sashModel = (SashModel)theEObject;
- T result = caseSashModel(sashModel);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case DiPackage.WINDOW: {
- Window window = (Window)theEObject;
- T result = caseWindow(window);
- if (result == null) result = casePanelParent(window);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case DiPackage.PANEL_PARENT: {
- PanelParent panelParent = (PanelParent)theEObject;
- T result = casePanelParent(panelParent);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case DiPackage.ABSTRACT_PANEL: {
- AbstractPanel abstractPanel = (AbstractPanel)theEObject;
- T result = caseAbstractPanel(abstractPanel);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case DiPackage.POSITION: {
- Position position = (Position)theEObject;
- T result = casePosition(position);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case DiPackage.SIZE: {
- Size size = (Size)theEObject;
- T result = caseSize(size);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case DiPackage.TAB_FOLDER: {
- TabFolder tabFolder = (TabFolder)theEObject;
- T result = caseTabFolder(tabFolder);
- if (result == null) result = caseAbstractPanel(tabFolder);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case DiPackage.PAGE_REF: {
- PageRef pageRef = (PageRef)theEObject;
- T result = casePageRef(pageRef);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case DiPackage.SASH_PANEL: {
- SashPanel sashPanel = (SashPanel)theEObject;
- T result = caseSashPanel(sashPanel);
- if (result == null) result = caseAbstractPanel(sashPanel);
- if (result == null) result = casePanelParent(sashPanel);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case DiPackage.ABSTRACT_PAGE: {
- AbstractPage abstractPage = (AbstractPage)theEObject;
- T result = caseAbstractPage(abstractPage);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case DiPackage.PAGE_LIST: {
- PageList pageList = (PageList)theEObject;
- T result = casePageList(pageList);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case DiPackage.SASH_WINDOWS_MNGR: {
- SashWindowsMngr sashWindowsMngr = (SashWindowsMngr)theEObject;
- T result = caseSashWindowsMngr(sashWindowsMngr);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
+ switch(classifierID) {
+ case DiPackage.SASH_MODEL:
+ {
+ SashModel sashModel = (SashModel)theEObject;
+ T result = caseSashModel(sashModel);
+ if(result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DiPackage.WINDOW:
+ {
+ Window window = (Window)theEObject;
+ T result = caseWindow(window);
+ if(result == null)
+ result = casePanelParent(window);
+ if(result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DiPackage.PANEL_PARENT:
+ {
+ PanelParent panelParent = (PanelParent)theEObject;
+ T result = casePanelParent(panelParent);
+ if(result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DiPackage.ABSTRACT_PANEL:
+ {
+ AbstractPanel abstractPanel = (AbstractPanel)theEObject;
+ T result = caseAbstractPanel(abstractPanel);
+ if(result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DiPackage.POSITION:
+ {
+ Position position = (Position)theEObject;
+ T result = casePosition(position);
+ if(result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DiPackage.SIZE:
+ {
+ Size size = (Size)theEObject;
+ T result = caseSize(size);
+ if(result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DiPackage.TAB_FOLDER:
+ {
+ TabFolder tabFolder = (TabFolder)theEObject;
+ T result = caseTabFolder(tabFolder);
+ if(result == null)
+ result = caseAbstractPanel(tabFolder);
+ if(result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DiPackage.PAGE_REF:
+ {
+ PageRef pageRef = (PageRef)theEObject;
+ T result = casePageRef(pageRef);
+ if(result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DiPackage.SASH_PANEL:
+ {
+ SashPanel sashPanel = (SashPanel)theEObject;
+ T result = caseSashPanel(sashPanel);
+ if(result == null)
+ result = caseAbstractPanel(sashPanel);
+ if(result == null)
+ result = casePanelParent(sashPanel);
+ if(result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DiPackage.ABSTRACT_PAGE:
+ {
+ AbstractPage abstractPage = (AbstractPage)theEObject;
+ T result = caseAbstractPage(abstractPage);
+ if(result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DiPackage.PAGE_LIST:
+ {
+ PageList pageList = (PageList)theEObject;
+ T result = casePageList(pageList);
+ if(result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DiPackage.SASH_WINDOWS_MNGR:
+ {
+ SashWindowsMngr sashWindowsMngr = (SashWindowsMngr)theEObject;
+ T result = caseSashWindowsMngr(sashWindowsMngr);
+ if(result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
}
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Sash Model</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Sash Model</em>'.
+ * Returns the result of interpreting the object as an instance of ' <em>Sash Model</em>'. <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>Sash Model</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
@@ -194,13 +219,13 @@ public class DiSwitch<T> {
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Window</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Window</em>'.
+ * Returns the result of interpreting the object as an instance of ' <em>Window</em>'. <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>Window</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
@@ -209,13 +234,13 @@ public class DiSwitch<T> {
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Panel Parent</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Panel Parent</em>'.
+ * Returns the result of interpreting the object as an instance of ' <em>Panel Parent</em>'. <!-- begin-user-doc --> This implementation
+ * returns null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>Panel Parent</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
@@ -224,13 +249,13 @@ public class DiSwitch<T> {
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Abstract Panel</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Abstract Panel</em>'.
+ * Returns the result of interpreting the object as an instance of ' <em>Abstract Panel</em>'. <!-- begin-user-doc --> This implementation
+ * returns null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>Abstract Panel</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
@@ -239,13 +264,13 @@ public class DiSwitch<T> {
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Position</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Position</em>'.
+ * Returns the result of interpreting the object as an instance of ' <em>Position</em>'. <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>Position</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
@@ -254,13 +279,13 @@ public class DiSwitch<T> {
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Size</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Size</em>'.
+ * Returns the result of interpreting the object as an instance of ' <em>Size</em>'. <!-- begin-user-doc --> This implementation returns null;
+ * returning a non-null result will terminate the switch. <!-- end-user-doc
+ * -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>Size</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
@@ -269,13 +294,13 @@ public class DiSwitch<T> {
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Tab Folder</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Tab Folder</em>'.
+ * Returns the result of interpreting the object as an instance of ' <em>Tab Folder</em>'. <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>Tab Folder</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
@@ -284,13 +309,13 @@ public class DiSwitch<T> {
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Page Ref</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Page Ref</em>'.
+ * Returns the result of interpreting the object as an instance of ' <em>Page Ref</em>'. <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>Page Ref</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
@@ -299,13 +324,13 @@ public class DiSwitch<T> {
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Sash Panel</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Sash Panel</em>'.
+ * Returns the result of interpreting the object as an instance of ' <em>Sash Panel</em>'. <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>Sash Panel</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
@@ -314,13 +339,13 @@ public class DiSwitch<T> {
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Abstract Page</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Abstract Page</em>'.
+ * Returns the result of interpreting the object as an instance of ' <em>Abstract Page</em>'. <!-- begin-user-doc --> This implementation
+ * returns null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>Abstract Page</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
@@ -329,13 +354,13 @@ public class DiSwitch<T> {
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Page List</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Page List</em>'.
+ * Returns the result of interpreting the object as an instance of ' <em>Page List</em>'. <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>Page List</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
@@ -344,13 +369,13 @@ public class DiSwitch<T> {
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Sash Windows Mngr</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Sash Windows Mngr</em>'.
+ * Returns the result of interpreting the object as an instance of ' <em>Sash Windows Mngr</em>'. <!-- begin-user-doc --> This implementation
+ * returns null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>Sash Windows Mngr</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
@@ -359,13 +384,13 @@ public class DiSwitch<T> {
}
/**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * Returns the result of interpreting the object as an instance of ' <em>EObject</em>'. <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch, but this is
+ * the last case anyway. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
@@ -373,4 +398,4 @@ public class DiSwitch<T> {
return null;
}
-} //DiSwitch
+} // DiSwitch
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiUtils.java b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiUtils.java
index 746b657329e..143152efdd5 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiUtils.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor.di/src/org/eclipse/papyrus/sashwindows/di/util/DiUtils.java
@@ -26,7 +26,6 @@ import org.eclipse.papyrus.sashwindows.di.TabFolder;
import org.eclipse.papyrus.sashwindows.di.Window;
import org.eclipse.papyrus.sashwindows.di.exception.SashEditorException;
-
/**
* Set of utility methods
*
@@ -35,8 +34,8 @@ import org.eclipse.papyrus.sashwindows.di.exception.SashEditorException;
public class DiUtils {
/**
- * Create a default SashModel with one window and one folder.
- * Set the current folder.
+ * Create a default SashModel with one window and one folder. Set the
+ * current folder.
*
* @param diResource
* @return
@@ -57,8 +56,8 @@ public class DiUtils {
}
/**
- * Create a default SashWindowsMngr with one PageLit and one default SashModel.
- * Set the current folder.
+ * Create a default SashWindowsMngr with one PageLit and one default
+ * SashModel. Set the current folder.
*
* @param diResource
* @return
@@ -100,10 +99,10 @@ public class DiUtils {
* @param diResource
* @param eObject
*
- * @return the page ref of eObject, null if not found
- * TODO This method use too low level mechanism for its implementation. Consider to move it in a
- * more appropriate class. Furthermore, some similar methods already exist. Can't we use them
- * instead ?
+ * @return the page ref of eObject, null if not found TODO This method use
+ * too low level mechanism for its implementation. Consider to move
+ * it in a more appropriate class. Furthermore, some similar methods
+ * already exist. Can't we use them instead ?
*/
static public PageRef getPageRef(Resource diResource, EObject eObject) {
SashWindowsMngr windowsMngr = lookupSashWindowsMngr(diResource);
@@ -126,9 +125,10 @@ public class DiUtils {
* @param diResource
* @param pageRef
* @throws SashEditorException
- * TODO This method use too low level mechanism for its implementation. Consider to move it in a
- * more appropriate class. Furthermore, some similar methods already exist. Can't we use them
- * instead ?
+ * TODO This method use too low level mechanism for its
+ * implementation. Consider to move it in a more appropriate
+ * class. Furthermore, some similar methods already exist. Can't
+ * we use them instead ?
*/
static public void addPageToPageList(Resource diResource, PageRef pageRef) throws SashEditorException {
SashWindowsMngr windowsMngr = lookupSashWindowsMngr(diResource);
@@ -141,9 +141,10 @@ public class DiUtils {
* @param pageRef
* @param windowsMngr
* @throws SashEditorException
- * TODO This method use too low level mechanism for its implementation. Consider to move it in a
- * more appropriate class. Furthermore, some similar methods already exist. Can't we use them
- * instead ?
+ * TODO This method use too low level mechanism for its
+ * implementation. Consider to move it in a more appropriate
+ * class. Furthermore, some similar methods already exist. Can't
+ * we use them instead ?
*/
static public void addPageToPageList(SashWindowsMngr windowsMngr, PageRef pageRef) throws SashEditorException {
if(windowsMngr != null && windowsMngr.getPageList() != null) {
@@ -159,9 +160,10 @@ public class DiUtils {
* @param windowsMngr
* @param pageRef
* @throws SashEditorException
- * TODO This method use too low level mechanism for its implementation. Consider to move it in a
- * more appropriate class. Furthermore, some similar methods already exist. Can't we use them
- * instead ?
+ * TODO This method use too low level mechanism for its
+ * implementation. Consider to move it in a more appropriate
+ * class. Furthermore, some similar methods already exist. Can't
+ * we use them instead ?
*/
static public void addPageToTabFolder(SashWindowsMngr windowsMngr, PageRef pageRef) throws SashEditorException {
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/Activator.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/Activator.java
index 9896659abb4..080fb0096bf 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/Activator.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/Activator.java
@@ -28,9 +28,9 @@ public class Activator extends AbstractUIPlugin {
/** shared instance of the plugin */
private static Activator plugin;
- /** Logging helper */
- public static LogHelper log = new LogHelper();
-
+ /** Logging helper */
+ public static LogHelper log = new LogHelper();
+
/**
* The constructor
*/
@@ -45,7 +45,7 @@ public class Activator extends AbstractUIPlugin {
super.start(context);
plugin = this;
// register the login helper
- log.setPlugin(plugin);
+ log.setPlugin(plugin);
}
/**
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IAbstractPanelModel.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IAbstractPanelModel.java
index d12895033ed..b356dd43ed6 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IAbstractPanelModel.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IAbstractPanelModel.java
@@ -4,13 +4,12 @@
package org.eclipse.papyrus.sasheditor.contentprovider;
/**
- * A Panel represent a SashPanel or a TabFolder.
- * This interface is the common ancestor of the Panel models used in sash system.
+ * A Panel represent a SashPanel or a TabFolder. This interface is the common
+ * ancestor of the Panel models used in sash system.
*
* @author dumoulin
*
*/
public abstract interface IAbstractPanelModel {
-
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IContentChangedListener.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IContentChangedListener.java
index 5628848fd40..3339af725be 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IContentChangedListener.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IContentChangedListener.java
@@ -3,20 +3,19 @@
*/
package org.eclipse.papyrus.sasheditor.contentprovider;
-
/**
- * Interface to be implemented by classes needing to be notified
- * when the SashContent model has changed.
- * This interface is not used by the sashesWindows itself. It exists to allows ContentProvider
- * implementation to provide a common notification mechanism.
+ * Interface to be implemented by classes needing to be notified when the
+ * SashContent model has changed. This interface is not used by the
+ * sashesWindows itself. It exists to allows ContentProvider implementation to
+ * provide a common notification mechanism.
*
* @author dumoulin
*/
public interface IContentChangedListener {
/**
- * Event indicating the change.
- * TODO The types are not set correctly from user like DI model. But anyway there aren't used by clients.
+ * Event indicating the change. TODO The types are not set correctly from
+ * user like DI model. But anyway there aren't used by clients.
*
* @author dumoulin
*/
@@ -50,7 +49,6 @@ public interface IContentChangedListener {
this.object = object;
}
-
/**
* @return the type
*/
@@ -58,7 +56,6 @@ public interface IContentChangedListener {
return type;
}
-
/**
* @return the model
*/
@@ -66,7 +63,6 @@ public interface IContentChangedListener {
return model;
}
-
/**
* @return the object
*/
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IContentChangedProvider.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IContentChangedProvider.java
index d13f3ab8ee6..718420b124a 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IContentChangedProvider.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IContentChangedProvider.java
@@ -1,11 +1,9 @@
package org.eclipse.papyrus.sasheditor.contentprovider;
-
/**
- * Interface implemented by classes firing events when the ContentProvider content
- * change.
- * This interface can be used by client of ContentProvider.
- * It is not use directly by the SashSystem.
+ * Interface implemented by classes firing events when the ContentProvider
+ * content change. This interface can be used by client of ContentProvider. It
+ * is not use directly by the SashSystem.
*
* @author dumoulin
*/
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IEditorModel.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IEditorModel.java
index e4274525d7c..804174b4367 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IEditorModel.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IEditorModel.java
@@ -26,15 +26,16 @@ import org.eclipse.ui.part.EditorActionBarContributor;
public interface IEditorModel extends IPageModel {
/**
- * Create the IEditor that should be shown.
- * Editor life cycle methods are not called.
+ * Create the IEditor that should be shown. Editor life cycle methods are
+ * not called.
*
* @return A new instance of the IEditor.
*/
public IEditorPart createIEditorPart() throws PartInitException;
/**
- * Get the EditorActionBarContributor that should be associated with the editor .
+ * Get the EditorActionBarContributor that should be associated with the
+ * editor .
*
* @return
*/
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IPageMngr.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IPageMngr.java
index 0d6dc33becb..8b3bd6a1f53 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IPageMngr.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IPageMngr.java
@@ -9,6 +9,7 @@
*
* Contributors:
* Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Anass Radouani (Atos) - Add History management
*
*****************************************************************************/
@@ -16,29 +17,31 @@ package org.eclipse.papyrus.sasheditor.contentprovider;
import java.util.List;
-import org.eclipse.papyrus.sasheditor.internal.SashWindowsContainer;
-
+import org.eclipse.papyrus.sasheditor.editor.IPageChangedListener;
+import org.eclipse.papyrus.sasheditor.editor.SashContainerEventsListener;
+import org.eclipse.papyrus.sasheditor.editor.SashWindowsContainer;
/**
- * Interface providing method to manage pages in the Sash Windows system.
- * This interface can be provided by ContentProvider whishing to provide a standard
- * way to manage pages. This interface is not mandatory for the Sasheditor.
- * This interface provide basic access to the Sash Windows system.
- * It is intended to be used from the application in order to interact with the ContentProvider. Then,
- * the {@link SashWindowsContainer} will refresh its views.
+ * Interface providing method to manage pages in the Sash Windows system. This
+ * interface can be provided by ContentProvider whishing to provide a standard
+ * way to manage pages. This interface is not mandatory for the Sasheditor. This
+ * interface provide basic access to the Sash Windows system. It is intended to
+ * be used from the application in order to interact with the ContentProvider.
+ * Then, the {@link SashWindowsContainer} will refresh its views.
*
*
* @author dumoulin
*/
-public interface IPageMngr {
+public interface IPageMngr extends IPageChangedListener, SashContainerEventsListener {
/**
* Add a Page identifier to the list of pages, do not open it.
*
* @param page
- * The object identifying the page to add. This object will be passed to the {@link IPageModelFactory#createIPageModel(EObject)}. This
- * identifier is stored in the sash model.
- * It should be a reference on a EMF object identifying the page.
+ * The object identifying the page to add. This object will be
+ * passed to the {@link IPageModelFactory#createIPageModel(EObject)}. This
+ * identifier is stored in the sash model. It should be a
+ * reference on a EMF object identifying the page.
*/
public void addPage(Object pageIdentifier);
@@ -52,15 +55,14 @@ public interface IPageMngr {
public void removePage(Object pageIdentifier);
/**
- * Close the page corresponding to the identifier.
- * The identifier is removed from the Sash Windows, but not from the list of pages.
+ * Close the page corresponding to the identifier. The identifier is removed
+ * from the Sash Windows, but not from the list of pages.
*
* @param pageIdentifier
* The object identifying the page
*/
public void closePage(Object pageIdentifier);
-
/**
* Close all opened pages.
*
@@ -75,16 +77,16 @@ public interface IPageMngr {
public void closeOtherPages(Object pageIdentifier);
/**
- * Open a Page corresponding to the identifier. If the page is not in the list of pages, add it.
- * The identifier is first added to the current folder model. Then the Sash Windows should react and
- * ask the {@link IPageModelFactory} to create the IPageModel. This later is then used to create the
- * SWT page.
- * If
+ * Open a Page corresponding to the identifier. If the page is not in the
+ * list of pages, add it. The identifier is first added to the current
+ * folder model. Then the Sash Windows should react and ask the {@link IPageModelFactory} to create the IPageModel. This later is then
+ * used to create the SWT page. If
*
* @param page
- * The object identifying the page to add. This object will be passed to the {@link IPageModelFactory#createIPageModel(EObject)}. This
- * identifier is stored in the sash model.
- * It should be a reference on a EMF object identifying the page.
+ * The object identifying the page to add. This object will be
+ * passed to the {@link IPageModelFactory#createIPageModel(EObject)}. This
+ * identifier is stored in the sash model. It should be a
+ * reference on a EMF object identifying the page.
*/
public void openPage(Object pageIdentifier);
@@ -103,4 +105,37 @@ public interface IPageMngr {
*/
public boolean isOpen(Object pageIdentifier);
+ /**
+ * Open the previously opened page
+ */
+ public void openPrevious();
+
+ /**
+ * Open the next page after a previous
+ */
+ public void openNext();
+
+ /**
+ * Verify if the PageMngr car backward in history
+ *
+ * @return
+ */
+ public boolean hasPreviousHistory();
+
+ /**
+ * Verify if the PageMngr car forward in history
+ *
+ * @return
+ */
+ public boolean hasNextHistory();
+
+ /**
+ * add a page to PageMngr History
+ *
+ * @param pageIdentifier
+ * identifying the page to add
+ * @return
+ */
+ public int isInHsitory(Object pageIdentifier);
+
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IPageModel.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IPageModel.java
index 7d2a1e5cf4b..b692ab3f457 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IPageModel.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/IPageModel.java
@@ -7,10 +7,9 @@ import org.eclipse.swt.graphics.Image;
/**
* This interface is the root of the hierarchy of models representing Pages.
- * This represent the final element shown in the sashes window.
- * It can be an Editor or a simple control.
- * This interface is used by the sashes window to interact with the model describing the element to be
- * shown in the TabItem.
+ * This represent the final element shown in the sashes window. It can be an
+ * Editor or a simple control. This interface is used by the sashes window to
+ * interact with the model describing the element to be shown in the TabItem.
*
* @author dumoulin
*
@@ -32,8 +31,8 @@ public abstract interface IPageModel {
public Image getTabIcon();
/**
- * Get the raw model corresponding to this node.
- * This is the object provided to {@link ITabFolderModel.getChildren()}
+ * Get the raw model corresponding to this node. This is the object provided
+ * to {@link ITabFolderModel.getChildren()}
*
* @return
*/
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/ISashPanelModel.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/ISashPanelModel.java
index 9ac740aae14..d2bb3a4d716 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/ISashPanelModel.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/ISashPanelModel.java
@@ -3,8 +3,9 @@ package org.eclipse.papyrus.sasheditor.contentprovider;
import java.util.List;
/**
- * A sash node contains two children separated by a sash. The sash can be moved, resizing the children.
- * This interface is used to specify that a sash with two children should be drawn.
+ * A sash node contains two children separated by a sash. The sash can be moved,
+ * resizing the children. This interface is used to specify that a sash with two
+ * children should be drawn.
*
* @author dumoulin
*
@@ -19,9 +20,9 @@ public interface ISashPanelModel extends IAbstractPanelModel {
public List<?> getChildren();
/**
- * Create the Interface used to access the real model.
- * This method is called by the sashes window to get the interface.
- * The method is called only once for a given object.
+ * Create the Interface used to access the real model. This method is called
+ * by the sashes window to get the interface. The method is called only once
+ * for a given object.
*
* @param child
* A child returned by getChildren().
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/ISashWindowsContentProvider.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/ISashWindowsContentProvider.java
index 21547c65966..85a4b334684 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/ISashWindowsContentProvider.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/ISashWindowsContentProvider.java
@@ -1,12 +1,12 @@
package org.eclipse.papyrus.sasheditor.contentprovider;
/**
- * This interface is used by the sash windows system to discover its content. It is considered
- * as the root of the sash windows models.
- * The sashsystem is able to retrieve all its content from this interface, and associated interfaces {@link ITabFolderModel}, {@link ISashPanelModel},
- * {@link IPageModel}.
- * The interface is also used by the sashsystem to communicate, by sending event, with the
- * effective implementation or upper level.
+ * This interface is used by the sash windows system to discover its content. It
+ * is considered as the root of the sash windows models. The sashsystem is able
+ * to retrieve all its content from this interface, and associated interfaces {@link ITabFolderModel}, {@link ISashPanelModel}, {@link IPageModel}.
+ * The
+ * interface is also used by the sashsystem to communicate, by sending event,
+ * with the effective implementation or upper level.
*
* @author dumoulin
*
@@ -14,10 +14,10 @@ package org.eclipse.papyrus.sasheditor.contentprovider;
public interface ISashWindowsContentProvider {
/**
- * Get the root object shown in the sashes window.
- * The type of the returned object is left to the implementation.
- * The sashes window will ask for an interface used to interact with the object.
- * In normal implementation, this method should return the model used by the implementation.
+ * Get the root object shown in the sashes window. The type of the returned
+ * object is left to the implementation. The sashes window will ask for an
+ * interface used to interact with the object. In normal implementation,
+ * this method should return the model used by the implementation.
*
* @return The object representing the root of the sashes window.
*/
@@ -25,8 +25,8 @@ public interface ISashWindowsContentProvider {
/**
* create the interface used by the sashes window to access the root model.
- * This method is called by the sashes window to get the interface.
- * The method is called only once for a given object.
+ * This method is called by the sashes window to get the interface. The
+ * method is called only once for a given object.
*
* @param root
* @return The SashModel corresponding to the specified root object.
@@ -34,12 +34,12 @@ public interface ISashWindowsContentProvider {
public IAbstractPanelModel createChildSashModel(Object root);
/**
- * Add a page to the current TabFolder.
- * The Page is added at the end of the tab list.
+ * Add a page to the current TabFolder. The Page is added at the end of the
+ * tab list.
*
* @param page
- * An object identifying the page to add. The object could be anything. It will be
- * passed to the {@link ITabFolderModel#createChildSashModel(Object)} method.
+ * An object identifying the page to add. The object could be
+ * anything. It will be passed to the {@link ITabFolderModel#createChildSashModel(Object)} method.
*/
public void addPage(Object page);
@@ -47,8 +47,8 @@ public interface ISashWindowsContentProvider {
* Add a page at the specified index of TabFolder.
*
* @param page
- * An object identifying the page to add. The object could be anything. It will be
- * passed to the {@link ITabFolderModel#createChildSashModel(Object)} method.
+ * An object identifying the page to add. The object could be
+ * anything. It will be passed to the {@link ITabFolderModel#createChildSashModel(Object)} method.
* @param index
* Index to where the tabItem should be added.
*/
@@ -81,8 +81,8 @@ public interface ISashWindowsContentProvider {
public void removePage(int index);
/**
- * Remove the page from the sashes window.
- * Look for the folder containing the page.
+ * Remove the page from the sashes window. Look for the folder containing
+ * the page.
*
* @param page
* The Object identifying the page. This is the object used in {@link #addPage(Object)}.
@@ -97,11 +97,11 @@ public interface ISashWindowsContentProvider {
public void removePage(ITabFolderModel parentFolder, int tabIndex);
/**
- * Ask the model to move the specified tab to the specified side of the specified targetFolder.
- * This method
- * is called by the the SashTileContainer when the user
- * have drag a tab in a correct place. The SashTileContainer has not change is presentation yet. This
- * will be done when the corresponding event will occur.
+ * Ask the model to move the specified tab to the specified side of the
+ * specified targetFolder. This method is called by the the
+ * SashTileContainer when the user have drag a tab in a correct place. The
+ * SashTileContainer has not change is presentation yet. This will be done
+ * when the corresponding event will occur.
*
* @param tabFolder
* The folder containing the tab to move
@@ -110,21 +110,22 @@ public interface ISashWindowsContentProvider {
* @param targetFolder
* The folder to which the side refer to
* @param side
- * Side where node should be inserted : SWT.LEFT, SWT.RIGHT, SWT.TOP, SWT.DOWN.
+ * Side where node should be inserted : SWT.LEFT, SWT.RIGHT,
+ * SWT.TOP, SWT.DOWN.
*/
public void createFolder(ITabFolderModel tabFolder, int tabIndex, ITabFolderModel targetFolder, int side);
/**
- * Ask the model to keep trace of the Current Folder.
- * The notion of Current Folder is used by {@link #addPage(Object)}.
- * Calling this method should not fire a Change Event.
+ * Ask the model to keep trace of the Current Folder. The notion of Current
+ * Folder is used by {@link #addPage(Object)}. Calling this method should
+ * not fire a Change Event.
*
- * This method is used by the SashSystem when the user select a new folder by clicking on one of
- * the tabs.
+ * This method is used by the SashSystem when the user select a new folder
+ * by clicking on one of the tabs.
*
* @param rawModel
- * The Raw model identifying the folder. This is the same object as the one
- * returned by {@link ISashPanelModel#getChildren()} when the child denote a folder.
+ * The Raw model identifying the folder. This is the same object
+ * as the one returned by {@link ISashPanelModel#getChildren()} when the child denote a folder.
*/
public void setCurrentFolder(Object rawModel);
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/ITabFolderModel.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/ITabFolderModel.java
index a19b7485c46..ead64a94024 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/ITabFolderModel.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/ITabFolderModel.java
@@ -3,8 +3,8 @@ package org.eclipse.papyrus.sasheditor.contentprovider;
import java.util.List;
/**
- * A folder containing tabItem.
- * This interface is used to specify that a TabFolder should be drawn.
+ * A folder containing tabItem. This interface is used to specify that a
+ * TabFolder should be drawn.
*
* @author dumoulin
*
@@ -22,9 +22,9 @@ public interface ITabFolderModel extends IAbstractPanelModel {
public List<?> getChildren();
/**
- * Create the Interface used to access the real model.
- * This method is called by the sashes window to get the interface.
- * The method is called only once for a given object.
+ * Create the Interface used to access the real model. This method is called
+ * by the sashes window to get the interface. The method is called only once
+ * for a given object.
*
* @param child
* A child returned by getChildren().
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/AbstractModel.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/AbstractModel.java
index b76fd527cc0..8cf1745019e 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/AbstractModel.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/AbstractModel.java
@@ -13,13 +13,11 @@
*****************************************************************************/
package org.eclipse.papyrus.sasheditor.contentprovider.simple;
-
/**
* @author dumoulin
*/
public abstract class AbstractModel {
-
/**
* Return the parent of the model. Can be null in the case of rootModel.
*
@@ -27,7 +25,6 @@ public abstract class AbstractModel {
*/
abstract public AbstractModel getParent();
-
/**
* @param parent
* the parent to set
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/AbstractPanelModel.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/AbstractPanelModel.java
index 02453aa5f20..10409b68d83 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/AbstractPanelModel.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/AbstractPanelModel.java
@@ -16,7 +16,6 @@ package org.eclipse.papyrus.sasheditor.contentprovider.simple;
import org.eclipse.papyrus.sasheditor.contentprovider.IAbstractPanelModel;
import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel;
-
/**
* @author dumoulin
*/
@@ -36,7 +35,6 @@ public abstract class AbstractPanelModel extends AbstractModel implements IAbstr
this.parent = parent;
}
-
/**
* Return the parent of the model. Can be null in the case of rootModel.
*
@@ -46,7 +44,6 @@ public abstract class AbstractPanelModel extends AbstractModel implements IAbstr
return parent;
}
-
/**
* @param parent
* the parent to set
@@ -55,7 +52,6 @@ public abstract class AbstractPanelModel extends AbstractModel implements IAbstr
this.parent = parent;
}
-
/**
* Lookup the folder containing the specified tabItem.
*
@@ -64,5 +60,4 @@ public abstract class AbstractPanelModel extends AbstractModel implements IAbstr
*/
abstract protected TabFolderModel lookupTabFolder(IPageModel tabItem);
-
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/SashPanelModel.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/SashPanelModel.java
index 4cbbb35c93d..fd378209b8d 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/SashPanelModel.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/SashPanelModel.java
@@ -20,7 +20,6 @@ import org.eclipse.papyrus.sasheditor.contentprovider.IAbstractPanelModel;
import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel;
import org.eclipse.papyrus.sasheditor.contentprovider.ISashPanelModel;
-
/**
* Simple implementation of the {@link ISashPanelModel}.
*
@@ -36,8 +35,6 @@ public class SashPanelModel extends AbstractPanelModel implements ISashPanelMode
protected int sashDirection;
-
-
/**
* @param children
* @param sashDirection
@@ -50,7 +47,6 @@ public class SashPanelModel extends AbstractPanelModel implements ISashPanelMode
this.sashDirection = sashDirection;
}
-
/**
* Set the left child.
*
@@ -87,12 +83,10 @@ public class SashPanelModel extends AbstractPanelModel implements ISashPanelMode
return children[1];
}
-
-
/**
- * Create the SashPanelModel from the raw model.
- * In this implementation, the rawModel is the SashPanelModel.
- * This default implementation return directly the child which is already of the appropriate type.
+ * Create the SashPanelModel from the raw model. In this implementation, the
+ * rawModel is the SashPanelModel. This default implementation return
+ * directly the child which is already of the appropriate type.
*/
public IAbstractPanelModel createChildSashModel(Object rawModel) {
return (IAbstractPanelModel)rawModel;
@@ -118,7 +112,6 @@ public class SashPanelModel extends AbstractPanelModel implements ISashPanelMode
*/
public void replaceChild(AbstractPanelModel oldChild, AbstractPanelModel newChild) {
-
if(getLeftChild() == oldChild)
setLeftChild(newChild);
else if(getRightChild() == oldChild)
@@ -126,7 +119,6 @@ public class SashPanelModel extends AbstractPanelModel implements ISashPanelMode
}
-
/**
*
* {@inheritDoc}
@@ -140,10 +132,9 @@ public class SashPanelModel extends AbstractPanelModel implements ISashPanelMode
return getRightChild().lookupTabFolder(tabItem);
}
-
/**
- * Delete the sashModel.
- * The childToDelete is removed from the tree, bypass the sashnode : the other child parent is set to sashnode parent.
+ * Delete the sashModel. The childToDelete is removed from the tree, bypass
+ * the sashnode : the other child parent is set to sashnode parent.
*
* @param tabFolder
*/
@@ -157,8 +148,6 @@ public class SashPanelModel extends AbstractPanelModel implements ISashPanelMode
otherChild.setParent(parent);
parent.replaceChild(this, otherChild);
-
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/SimpleSashWindowsContentProvider.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/SimpleSashWindowsContentProvider.java
index 7bc6c377673..97eb83f42f6 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/SimpleSashWindowsContentProvider.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/SimpleSashWindowsContentProvider.java
@@ -23,12 +23,12 @@ import org.eclipse.papyrus.sasheditor.contentprovider.IContentChangedProvider;
import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel;
import org.eclipse.papyrus.sasheditor.contentprovider.ISashWindowsContentProvider;
import org.eclipse.papyrus.sasheditor.contentprovider.ITabFolderModel;
-import org.eclipse.papyrus.sasheditor.internal.SashWindowsContainer;
+import org.eclipse.papyrus.sasheditor.editor.SashWindowsContainer;
import org.eclipse.swt.SWT;
/**
- * A simple implementation of providers allowing sashes and folders.
- * The tabs can be added and removed.
+ * A simple implementation of providers allowing sashes and folders. The tabs
+ * can be added and removed.
*
* @author dumoulin
*
@@ -54,7 +54,6 @@ public class SimpleSashWindowsContentProvider implements ISashWindowsContentProv
rootModel = new RootModel(currentTabFolder);
}
-
/**
* Add a listener listening on content changed. This listener will be
* notified each time the content change.
@@ -127,8 +126,8 @@ public class SimpleSashWindowsContentProvider implements ISashWindowsContentProv
}
/**
- * Move a tab from folder to folder.
- * The change event is sent only once after the complete operation is performed. {@inheritDoc}
+ * Move a tab from folder to folder. The change event is sent only once
+ * after the complete operation is performed. {@inheritDoc}
*/
public void movePage(ITabFolderModel srcFolderModel, int sourceIndex, ITabFolderModel targetFolderModel, int targetIndex) {
// This implementation use (TabFolderModel), so we can cast safely
@@ -169,29 +168,41 @@ public class SimpleSashWindowsContentProvider implements ISashWindowsContentProv
}
/**
- * Create a new folder and insert it at the specified side. Move the specified tab into the created Folder.
+ * Create a new folder and insert it at the specified side. Move the
+ * specified tab into the created Folder.
*
- * The change event is sent only once after the complete operation is performed. {@inheritDoc}
+ * The change event is sent only once after the complete operation is
+ * performed. {@inheritDoc}
*
- * @param referenceFolder The folder used as reference to insert the newly created Folder.
- * @param side The side to which the created folder is inserted. Can be SWT.TOP, DOWN, LEFT, RIGHT.
+ * @param referenceFolder
+ * The folder used as reference to insert the newly created
+ * Folder.
+ * @param side
+ * The side to which the created folder is inserted. Can be
+ * SWT.TOP, DOWN, LEFT, RIGHT.
*/
public void createFolder(ITabFolderModel sourceFolder, int tabIndex, ITabFolderModel referenceFolder, int side) {
org.eclipse.papyrus.sasheditor.Activator.log.debug("createFolder()");
ITabFolderModel newFolder = doCreateFolder((TabFolderModel)sourceFolder, tabIndex, (TabFolderModel)referenceFolder, side);
contentChangedListenerManager.fireContentChanged(new ContentEvent(ContentEvent.CHANGED, this, sourceFolder));
- // return newFolder;
+ // return newFolder;
}
/**
- * Create a new folder and insert it at the specified side of the reference folder.
- * The change event is sent only once after the complete operation is performed.
+ * Create a new folder and insert it at the specified side of the reference
+ * folder. The change event is sent only once after the complete operation
+ * is performed.
*
- * This method is not part of the {@link SashWindowsContainer} API. It is here to help writing junit tests.
+ * This method is not part of the {@link SashWindowsContainer} API. It is
+ * here to help writing junit tests.
*
- * @param referenceFolder The folder used as reference to insert the newly created Folder.
- * @param side The side to which the created folder is inserted. Can be SWT.TOP, DOWN, LEFT, RIGHT.
+ * @param referenceFolder
+ * The folder used as reference to insert the newly created
+ * Folder.
+ * @param side
+ * The side to which the created folder is inserted. Can be
+ * SWT.TOP, DOWN, LEFT, RIGHT.
*/
public ITabFolderModel createFolder(ITabFolderModel referenceFolder, int side) {
org.eclipse.papyrus.sasheditor.Activator.log.debug("createFolder()");
@@ -202,8 +213,8 @@ public class SimpleSashWindowsContentProvider implements ISashWindowsContentProv
}
/**
- * Move a tab from folder to folder.
- * The change event is sent only once after the complete operation is performed.
+ * Move a tab from folder to folder. The change event is sent only once
+ * after the complete operation is performed.
*
* @return The moved tab.
*/
@@ -215,9 +226,9 @@ public class SimpleSashWindowsContentProvider implements ISashWindowsContentProv
}
/**
- * Move a tab from folder to folder.
- * The tab is added at the end of the target folder.
- * The change event is sent only once after the complete operation is performed. {@inheritDoc}
+ * Move a tab from folder to folder. The tab is added at the end of the
+ * target folder. The change event is sent only once after the complete
+ * operation is performed. {@inheritDoc}
*/
private void doMoveTab(TabFolderModel srcFolderModel, int sourceIndex, TabFolderModel targetFolderModel) {
@@ -279,8 +290,8 @@ public class SimpleSashWindowsContentProvider implements ISashWindowsContentProv
}
/**
- * Insert the folderToInsert on the specified side of the refFolder. Create and insert the
- * requested SashModel.
+ * Insert the folderToInsert on the specified side of the refFolder. Create
+ * and insert the requested SashModel.
*
* @param folderToInsert
* @param refFolder
@@ -370,9 +381,10 @@ public class SimpleSashWindowsContentProvider implements ISashWindowsContentProv
* Lookup the folder containing the specified tabItem.
*
* @param tabItem
- * Item for which a folder is looked for. If the item is null, return
- * the first folder encountered.
- * @return The folder containing the item, or the first encountered folder if item is null.
+ * Item for which a folder is looked for. If the item is null,
+ * return the first folder encountered.
+ * @return The folder containing the item, or the first encountered folder
+ * if item is null.
*/
private TabFolderModel lookupPageFolder(IPageModel tabItem) {
return rootModel.lookupTabFolder(tabItem);
@@ -412,7 +424,8 @@ public class SimpleSashWindowsContentProvider implements ISashWindowsContentProv
* @see org.eclipse.papyrus.sasheditor.contentprovider.ISashWindowsContentProvider#setCurrentFolder(java.lang.Object)
*
* @param rawModel
- * Object identifying the current folder. In this implementation, the object is the FolderModel.
+ * Object identifying the current folder. In this implementation,
+ * the object is the FolderModel.
*/
public void setCurrentFolder(Object rawModel) {
if(!(rawModel instanceof TabFolderModel)) {
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/TabFolderModel.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/TabFolderModel.java
index 4d74a6cd65d..2d69cc3cc2d 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/TabFolderModel.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/simple/TabFolderModel.java
@@ -55,10 +55,12 @@ public class TabFolderModel extends AbstractPanelModel implements ITabFolderMode
}
/**
- * This default implementation return directly the child which is already of the appropriate type.
+ * This default implementation return directly the child which is already of
+ * the appropriate type.
*/
public IPageModel createChildSashModel(Object child) {
- // In this default implementation, the child is already of the appropriate type.
+ // In this default implementation, the child is already of the
+ // appropriate type.
return (IPageModel)child;
}
@@ -107,8 +109,8 @@ public class TabFolderModel extends AbstractPanelModel implements ITabFolderMode
}
/**
- * Move a tab inside the folder.
- * Moves the tab from the old position to the new position.
+ * Move a tab inside the folder. Moves the tab from the old position to the
+ * new position.
*
* @param oldIndex
* the position of the tab before the move.
@@ -130,7 +132,6 @@ public class TabFolderModel extends AbstractPanelModel implements ITabFolderMode
if(listSize == 0)
return;
-
// Move
IPageModel toMove = children.remove(oldIndex);
children.add(newIndex, toMove);
@@ -138,8 +139,7 @@ public class TabFolderModel extends AbstractPanelModel implements ITabFolderMode
}
/**
- * Add a new model.
- * Do not fire change Event
+ * Add a new model. Do not fire change Event
*
* @param newModel
*/
@@ -148,8 +148,7 @@ public class TabFolderModel extends AbstractPanelModel implements ITabFolderMode
}
/**
- * Add a model at the specified position.
- * Do not fire change Event
+ * Add a model at the specified position. Do not fire change Event
*
* @param index
* @param newModel
@@ -162,8 +161,7 @@ public class TabFolderModel extends AbstractPanelModel implements ITabFolderMode
}
/**
- * Remove the specified tab.
- * Do not fire change Event
+ * Remove the specified tab. Do not fire change Event
*
* @param index
* @return
@@ -195,8 +193,7 @@ public class TabFolderModel extends AbstractPanelModel implements ITabFolderMode
}
/**
- * Remove the specified tab.
- * Do not fire change Event
+ * Remove the specified tab. Do not fire change Event
*
* @param tabItem
*/
@@ -217,8 +214,8 @@ public class TabFolderModel extends AbstractPanelModel implements ITabFolderMode
* Get a folder by one of its tab.
*
* @param tabItem
- * Item for which a folder is looked for. If the item is null, return
- * the first folder encountered.
+ * Item for which a folder is looked for. If the item is null,
+ * return the first folder encountered.
* @return The folder if it contains the item, or if item is null.
*/
@Override
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/singlefolder/SingleFolderContentProvider.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/singlefolder/SingleFolderContentProvider.java
index a318a507fe9..a2a6ca51a3a 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/singlefolder/SingleFolderContentProvider.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/singlefolder/SingleFolderContentProvider.java
@@ -25,8 +25,8 @@ import org.eclipse.papyrus.sasheditor.contentprovider.ISashWindowsContentProvide
import org.eclipse.papyrus.sasheditor.contentprovider.ITabFolderModel;
/**
- * A simple implementation of providers allowing only one single folder containing tabs.
- * The tabs can be added and removed.
+ * A simple implementation of providers allowing only one single folder
+ * containing tabs. The tabs can be added and removed.
*
* @author dumoulin
*/
@@ -154,7 +154,8 @@ public class SingleFolderContentProvider implements ISashWindowsContentProvider,
}
/**
- * Remove the specified tab. As we have only one folder, this should be from the currentFolder {@inheritDoc}
+ * Remove the specified tab. As we have only one folder, this should be from
+ * the currentFolder {@inheritDoc}
*/
public void removePage(ITabFolderModel parentFolder, int tabIndex) {
removePage(tabIndex);
@@ -251,8 +252,8 @@ public class SingleFolderContentProvider implements ISashWindowsContentProvider,
}
/**
- * Move a tab from folder to folder.
- * As this implementation has only one folder, this can't happen. Do nothing. {@inheritDoc}
+ * Move a tab from folder to folder. As this implementation has only one
+ * folder, this can't happen. Do nothing. {@inheritDoc}
*/
public void movePage(ITabFolderModel srcFolderModel, int sourceIndex, ITabFolderModel targetFolderModel, int targetIndex) {
return;
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/singlefolder/SingleFolderModel.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/singlefolder/SingleFolderModel.java
index b4d133f10dd..caf77cddc3b 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/singlefolder/SingleFolderModel.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/contentprovider/singlefolder/SingleFolderModel.java
@@ -53,10 +53,12 @@ public class SingleFolderModel implements ITabFolderModel {
}
/**
- * This default implementation return directly the child which is already of the appropriate type.
+ * This default implementation return directly the child which is already of
+ * the appropriate type.
*/
public IPageModel createChildSashModel(Object child) {
- // In this default implementation, the child is already of the appropriate type.
+ // In this default implementation, the child is already of the
+ // appropriate type.
return (IPageModel)child;
}
@@ -105,8 +107,8 @@ public class SingleFolderModel implements ITabFolderModel {
}
/**
- * Move a tab inside the folder.
- * Moves the tab from the old position to the new position.
+ * Move a tab inside the folder. Moves the tab from the old position to the
+ * new position.
*
* @param oldIndex
* the position of the tab before the move.
@@ -129,7 +131,6 @@ public class SingleFolderModel implements ITabFolderModel {
if(listSize == 0)
return;
-
// Move
IPageModel toMove = itemModels.remove(oldIndex);
itemModels.add(newIndex, toMove);
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/AbstractMultiPageSashEditor.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/AbstractMultiPageSashEditor.java
index 2d15d9338d5..57152130a33 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/AbstractMultiPageSashEditor.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/AbstractMultiPageSashEditor.java
@@ -18,8 +18,6 @@ import java.util.List;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.papyrus.sasheditor.contentprovider.ISashWindowsContentProvider;
-import org.eclipse.papyrus.sasheditor.internal.IMultiEditorManager;
-import org.eclipse.papyrus.sasheditor.internal.SashWindowsContainer;
import org.eclipse.papyrus.sasheditor.internal.eclipsecopy.MultiPageSelectionProvider;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
@@ -31,7 +29,8 @@ import org.eclipse.ui.internal.util.Util;
import org.eclipse.ui.part.EditorPart;
/**
- * Base editor that can be subclassed to provide a multi page editor with sash windows.
+ * Base editor that can be subclassed to provide a multi page editor with sash
+ * windows.
*
* @author dumoulin
*/
@@ -62,7 +61,8 @@ public abstract class AbstractMultiPageSashEditor extends EditorPart implements
}
/**
- * Set the contentProvider if not set. If it is already set, this method do not change it.
+ * Set the contentProvider if not set. If it is already set, this method do
+ * not change it.
*
* @param contentProvider
*/
@@ -73,23 +73,27 @@ public abstract class AbstractMultiPageSashEditor extends EditorPart implements
}
/**
- * Create the provider.
- * Subclass must implements this method. It should return the provider used by the editor.
+ * Create the provider. Subclass must implements this method. It should
+ * return the provider used by the editor.
*
*/
abstract protected ISashWindowsContentProvider createPageProvider();
/**
- * Handles a property change notification from a nested editor. The default implementation simply forwards the change to
- * listeners on this multi-page editor by calling <code>firePropertyChange</code> with the same property id. For example, if
- * the dirty state of a nested editor changes (property id <code>IEditorPart.PROP_DIRTY</code>), this method handles it
- * by firing a property change event for <code>IEditorPart.PROP_DIRTY</code> to property listeners on this multi-page
- * editor.
+ * Handles a property change notification from a nested editor. The default
+ * implementation simply forwards the change to listeners on this multi-page
+ * editor by calling <code>firePropertyChange</code> with the same property
+ * id. For example, if the dirty state of a nested editor changes (property
+ * id <code>IEditorPart.PROP_DIRTY</code>), this method handles it by firing
+ * a property change event for <code>IEditorPart.PROP_DIRTY</code> to
+ * property listeners on this multi-page editor.
* <p>
* Subclasses may extend or reimplement this method.
* </p>
*
- * @copiedfrom org.eclipse.ui.part.MultiPageEditorPart.handlePropertyChange(int)
+ * @copiedfrom
+ * org.eclipse.ui.part.MultiPageEditorPart.handlePropertyChange(int
+ * )
*
* @param propertyId
* the id of the property that changed
@@ -99,9 +103,9 @@ public abstract class AbstractMultiPageSashEditor extends EditorPart implements
}
/**
- * The <code>MultiPageEditorPart</code> implementation of this <code>IEditorPart</code> method sets its site to the given
- * site, its input to the given input, and the site's selection provider to a <code>MultiPageSelectionProvider</code>.
- * Subclasses may extend this method.
+ * The <code>MultiPageEditorPart</code> implementation of this <code>IEditorPart</code> method sets its site to the given site, its
+ * input to the given input, and the site's selection provider to a <code>MultiPageSelectionProvider</code>. Subclasses may extend this
+ * method.
*
* @copiedfrom org.eclipse.ui.part.MultiPageEditorPart
* @param site
@@ -132,9 +136,9 @@ public abstract class AbstractMultiPageSashEditor extends EditorPart implements
}
/**
- * Method to activate the editor.
- * Called immediately after createPartControl() is complete.
- * To be implemented by subclasses. Default implementation do nothing.
+ * Method to activate the editor. Called immediately after
+ * createPartControl() is complete. To be implemented by subclasses. Default
+ * implementation do nothing.
*/
protected void activate() {
@@ -142,9 +146,8 @@ public abstract class AbstractMultiPageSashEditor extends EditorPart implements
}
/**
- * Method to deactivate the editor.
- * Called when dispose() is called.
- * To be implemented by subclasses. Default implementation do nothing.
+ * Method to deactivate the editor. Called when dispose() is called. To be
+ * implemented by subclasses. Default implementation do nothing.
*/
protected void deactivate() {
@@ -174,8 +177,9 @@ public abstract class AbstractMultiPageSashEditor extends EditorPart implements
}
/**
- * If there is an adapter registered against the subclass of MultiPageEditorPart return that. Otherwise, delegate to the
- * internal editor.
+ * If there is an adapter registered against the subclass of
+ * MultiPageEditorPart return that. Otherwise, delegate to the internal
+ * editor.
*
* @copiedfrom org.eclipse.ui.part.MultiPageEditorPart
*
@@ -216,8 +220,8 @@ public abstract class AbstractMultiPageSashEditor extends EditorPart implements
}
/**
- * Get the {@link ISashWindowsContainer}.
- * Note the the ISashWindowsContainer can also be acuired with getAdapter(ISashWindowsContainer.class).
+ * Get the {@link ISashWindowsContainer}. Note the the ISashWindowsContainer
+ * can also be acuired with getAdapter(ISashWindowsContainer.class).
*/
public ISashWindowsContainer getISashWindowsContainer() {
return sashContainer;
@@ -238,15 +242,16 @@ public abstract class AbstractMultiPageSashEditor extends EditorPart implements
*
* {@inheritDoc}
*
- * TODO Move this method aways. This method is too tightly coupled to the Papyrus GMF UML IEditor.
- * It doesn't work on other kind of IEditor. It introduce problems in IEditor of other kinds
+ * TODO Move this method aways. This method is too tightly coupled to the
+ * Papyrus GMF UML IEditor. It doesn't work on other kind of IEditor. It
+ * introduce problems in IEditor of other kinds
*
* @see org.eclipse.papyrus.sasheditor.editor.ISashWindowsContainer#isDirty()
* @deprecated A SaveAndDirtyService is used instead.
*/
@Override
public boolean isDirty() {
- // return sashContainer.isDirty();
+ // return sashContainer.isDirty();
EditorVisitor visitor = new EditorVisitor();
sashContainer.visit(visitor);
@@ -263,12 +268,14 @@ public abstract class AbstractMultiPageSashEditor extends EditorPart implements
* Notify all the editors that the multi editor has been saved.<BR>
* Fires the PROP_DIRTY property change.
*
- * TODO Move this method aways. This method is too tightly coupled to the Papyrus GMF UML IEditor.
- * It doesn't work on other kind of IEditor. It introduce problems in IEditor of other kinds
+ * TODO Move this method aways. This method is too tightly coupled to the
+ * Papyrus GMF UML IEditor. It doesn't work on other kind of IEditor. It
+ * introduce problems in IEditor of other kinds
+ *
* @deprecated A SaveAndDirtyService is used instead.
*/
protected void markSaveLocation() {
- // return sashContainer.isDirty();
+ // return sashContainer.isDirty();
EditorVisitor visitor = new EditorVisitor();
sashContainer.visit(visitor);
@@ -279,8 +286,7 @@ public abstract class AbstractMultiPageSashEditor extends EditorPart implements
}
/**
- * A visitor allowing to collect the available IEditor.
- * TODO : Remove
+ * A visitor allowing to collect the available IEditor. TODO : Remove
*
* @author dumoulin
*
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IComponentPage.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IComponentPage.java
index 18784ffb6cb..d8d8ee812d8 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IComponentPage.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IComponentPage.java
@@ -3,12 +3,11 @@
*/
package org.eclipse.papyrus.sasheditor.editor;
-
/**
- * Allows to access to properties of a Sash ComponentPage.
- * This interface allows to read the data. User should not attent to modifiy or write the data in anyway.
- * This interface is provided as parameter of the {@link IPageChangedListener#pageChanged(IPage)} event and
- * in the SashContainer Visitor.
+ * Allows to access to properties of a Sash ComponentPage. This interface allows
+ * to read the data. User should not attent to modifiy or write the data in
+ * anyway. This interface is provided as parameter of the {@link IPageChangedListener#pageChanged(IPage)} event and in the
+ * SashContainer Visitor.
*
* @author cedric dumoulin
*
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IEditorPage.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IEditorPage.java
index a6e42ec74ff..2b37cab9260 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IEditorPage.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IEditorPage.java
@@ -5,12 +5,11 @@ package org.eclipse.papyrus.sasheditor.editor;
import org.eclipse.ui.IEditorPart;
-
/**
- * Allows to access to properties of a Sash IEditor Page.
- * This interface allows to read the data. User should not attent to modifiy or write the data in anyway.
- * This interface is provided as parameter of the {@link IPageChangedListener#pageChanged(IPage)} event and
- * in the SashContainer Visitor.
+ * Allows to access to properties of a Sash IEditor Page. This interface allows
+ * to read the data. User should not attent to modifiy or write the data in
+ * anyway. This interface is provided as parameter of the {@link IPageChangedListener#pageChanged(IPage)} event and in the
+ * SashContainer Visitor.
*
* @author cedric dumoulin
*
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/IMultiEditorManager.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IMultiEditorManager.java
index 9f07d244b32..4417541b6e4 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/IMultiEditorManager.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IMultiEditorManager.java
@@ -11,32 +11,35 @@
* Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.sasheditor.internal;
+package org.eclipse.papyrus.sasheditor.editor;
+import org.eclipse.papyrus.sasheditor.internal.EditorPart;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IWorkbenchPartSite;
-
/**
- * This interface allows EditorPart to access objects provided by the real editor.
- * Implementation of this interface is provided to the {@link SashWindowsContainer} and used by {@link EditorPart}.
- * The EditorPart will call {@link #getEditorInput()} and pass the result to input of the created nested IEditorPart.
- * The site provided by {@link #getEditorSite()} is used to initialize a specific site for the nested IEditorPart.
- * It is also used by the {@link SashWindowsContainer}.
+ * This interface allows EditorPart to access objects provided by the real
+ * editor. Implementation of this interface is provided to the {@link SashWindowsContainer} and used by {@link EditorPart}. The EditorPart
+ * will call {@link #getEditorInput()} and pass the result to input of the
+ * created nested IEditorPart. The site provided by {@link #getEditorSite()} is
+ * used to initialize a specific site for the nested IEditorPart. It is also
+ * used by the {@link SashWindowsContainer}.
*
* @author dumoulin
*/
public interface IMultiEditorManager {
/**
- * Get the EditorActionBarContributor for the editor associated to the specified model.
+ * Get the EditorActionBarContributor for the editor associated to the
+ * specified model.
*
* @param editorModel
* @return
* @throws MultiDiagramException
*/
- // public EditorActionBarContributor getActionBarContributor(Object editorModel);
+ // public EditorActionBarContributor getActionBarContributor(Object
+ // editorModel);
/**
* Fires a property changed event.
@@ -44,7 +47,7 @@ public interface IMultiEditorManager {
* @param propertyId
* the id of the property that changed
*/
- // public void firePropertyChange(int propertyId);
+ // public void firePropertyChange(int propertyId);
/**
* Get the editor input associated to the main IMultiPageEditorPart.
@@ -61,8 +64,8 @@ public interface IMultiEditorManager {
public IWorkbenchPartSite getSite();
/**
- * Get the IEditorSite associated to this MultiPageEditorPart.
- * This return the same object as getSite().
+ * Get the IEditorSite associated to this MultiPageEditorPart. This return
+ * the same object as getSite().
*
* @return
*/
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IMultiPageEditorPart.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IMultiPageEditorPart.java
index 467f0735d49..3111bf2ee07 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IMultiPageEditorPart.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IMultiPageEditorPart.java
@@ -18,8 +18,8 @@ import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IWorkbenchPartSite;
/**
- * Marker to mark a EditorPart as a MultiPartEditor. Provides methods needed by classes
- * like MultiPageActionBarContributor and MultiPageSelectionProvider.
+ * Marker to mark a EditorPart as a MultiPartEditor. Provides methods needed by
+ * classes like MultiPageActionBarContributor and MultiPageSelectionProvider.
*/
public interface IMultiPageEditorPart {
@@ -38,8 +38,8 @@ public interface IMultiPageEditorPart {
public IWorkbenchPartSite getSite();
/**
- * Get the IEditorSite associated to this MultiPageEditorPart.
- * This return the same object as getSite().
+ * Get the IEditorSite associated to this MultiPageEditorPart. This return
+ * the same object as getSite().
*
* @return
*/
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IPage.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IPage.java
index 886946dbe42..243c2038507 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IPage.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IPage.java
@@ -6,11 +6,10 @@ package org.eclipse.papyrus.sasheditor.editor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Control;
-
/**
- * Allows to access to properties of a Sash Page.
- * This interface allows to read the data. User should not attent to modifiy or write the data in anyway.
- * This interface is provided as parameter of the {@link IPageChangedListener#pageChanged(IPage)} event.
+ * Allows to access to properties of a Sash Page. This interface allows to read
+ * the data. User should not attent to modifiy or write the data in anyway. This
+ * interface is provided as parameter of the {@link IPageChangedListener#pageChanged(IPage)} event.
*
* @author cedric dumoulin
*
@@ -32,8 +31,8 @@ public interface IPage {
public Image getPageIcon();
/**
- * Get the raw model corresponding to this node.
- * This is the object provided to {@link ITabFolderModel.getChildren()}
+ * Get the raw model corresponding to this node. This is the object provided
+ * to {@link ITabFolderModel.getChildren()}
*
* @return
*/
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IPageChangedListener.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IPageChangedListener.java
index 4707a6c0d9d..036f9efe3d4 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IPageChangedListener.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IPageChangedListener.java
@@ -3,8 +3,6 @@
*/
package org.eclipse.papyrus.sasheditor.editor;
-
-
/**
* @author cedric dumoulin
*
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IPageVisitor.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IPageVisitor.java
index dad06cd01a0..1aab9135b8d 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IPageVisitor.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/IPageVisitor.java
@@ -3,9 +3,6 @@
*/
package org.eclipse.papyrus.sasheditor.editor;
-import org.eclipse.papyrus.sasheditor.internal.SashWindowsContainer;
-
-
/**
* A Visitor used to visit all the {@link IPage} of a {@link SashWindowsContainer}.
*
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/ISashWindowsContainer.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/ISashWindowsContainer.java
index 07f81f41aaa..07e8cc87812 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/ISashWindowsContainer.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/ISashWindowsContainer.java
@@ -4,7 +4,6 @@ import java.util.List;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.papyrus.sasheditor.contentprovider.ISashWindowsContentProvider;
-import org.eclipse.papyrus.sasheditor.internal.SashContainerEventsListener;
import org.eclipse.ui.IEditorPart;
public interface ISashWindowsContainer {
@@ -17,30 +16,29 @@ public interface ISashWindowsContainer {
public abstract IEditorPart getActiveEditor();
/**
- * Get the currently active SashWindows Page.
- * This is s
+ * Get the currently active SashWindows Page. This is s
*
* @return An {@link IPage} allowing to access current page data.
*/
public abstract IPage getActiveSashWindowsPage();
/**
- * Get the list of visible IPages. The visible IPages are the one that have there diagram area
- * visible.
+ * Get the list of visible IPages. The visible IPages are the one that have
+ * there diagram area visible.
*
* @return
*/
public List<IPage> getVisiblePages();
/**
- * Get the list of visible IEditorPart obtain from the pages of type IEditorPage.
- * The visible IPages are the one that have there diagram area
+ * Get the list of visible IEditorPart obtain from the pages of type
+ * IEditorPage. The visible IPages are the one that have there diagram area
* visible.
*
* @return
*/
public List<IEditorPart> getVisibleIEditorParts();
-
+
/**
* The <code>AbstractMultiPageSashEditor</code> implementation of this <code>IWorkbenchPart</code> method sets focus on the active nested
* editor, if there is one.
@@ -51,8 +49,7 @@ public interface ISashWindowsContainer {
public abstract void setFocus();
/**
- * Refresh the SashWindows.
- * Synchronize the internal structure with the {@link ISashWindowsContentProvider}.
+ * Refresh the SashWindows. Synchronize the internal structure with the {@link ISashWindowsContentProvider}.
*/
public abstract void refreshTabs();
@@ -71,8 +68,8 @@ public interface ISashWindowsContainer {
public abstract void removePageChangedListener(IPageChangedListener pageChangedListener);
/**
- * Add a listener on Page LifeCycle events.
- * This implementation delegates to the internal PageTracker.
+ * Add a listener on Page LifeCycle events. This implementation delegates to
+ * the internal PageTracker.
*
* @see org.eclipse.papyrus.sasheditor.editor.ISashWindowsContainer#addPageChangedListener(org.eclipse.papyrus.sasheditor.editor.IPageChangedListener)
* @param listener
@@ -88,9 +85,14 @@ public interface ISashWindowsContainer {
*
*/
public void removeLifeCycleListener(SashContainerEventsListener listener);
+
/**
- * Set a {@link MenuManager} used to manage a contextual menu that is shown on the tabs area of the folders.
- * @param menuManager The {@link MenuManager} used to create the menu on the tab area.
+ * Set a {@link MenuManager} used to manage a contextual menu that is shown
+ * on the tabs area of the folders.
+ *
+ * @param menuManager
+ * The {@link MenuManager} used to create the menu on the tab
+ * area.
*/
- public abstract void setFolderTabMenuManager( MenuManager menuManager );
+ public abstract void setFolderTabMenuManager(MenuManager menuManager);
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/ISashWindowsContainerChangedListener.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/ISashWindowsContainerChangedListener.java
index d494aaf4277..fc51c1cff83 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/ISashWindowsContainerChangedListener.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/ISashWindowsContainerChangedListener.java
@@ -3,8 +3,6 @@
*/
package org.eclipse.papyrus.sasheditor.editor;
-
-
/**
* @author dumoulin
*
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashContainerEventsListener.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashContainerEventsListener.java
index a934e0a27d7..ab61acb4b19 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashContainerEventsListener.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashContainerEventsListener.java
@@ -1,11 +1,7 @@
/**
*
*/
-package org.eclipse.papyrus.sasheditor.internal;
-
-import org.eclipse.papyrus.sasheditor.editor.IPage;
-import org.eclipse.papyrus.sasheditor.editor.IPageChangedListener;
-
+package org.eclipse.papyrus.sasheditor.editor;
/**
* Interface to be implemented by listeners on {@link SashWindowsContainer} life
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashTabDecorationSynchronizer.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashTabDecorationSynchronizer.java
index 5a688cdc488..ec33c3a008a 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashTabDecorationSynchronizer.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashTabDecorationSynchronizer.java
@@ -5,64 +5,60 @@ package org.eclipse.papyrus.sasheditor.editor;
import java.util.logging.Logger;
-import org.eclipse.papyrus.sasheditor.internal.SashContainerEventsListener;
-import org.eclipse.papyrus.sasheditor.internal.SashWindowsContainer;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.IWorkbenchPart;
-
/**
- * This class take care to refresh a Sash Tab (name and icon) when its model change.
- * The class listen to IEditor property change, and refresh the corresponding tab
- * accordingly.
- * The class also listen on {@link SashWindowsContainer} page's life cycle in order to
- * attach/remove the listener on pages.
+ * This class take care to refresh a Sash Tab (name and icon) when its model
+ * change. The class listen to IEditor property change, and refresh the
+ * corresponding tab accordingly. The class also listen on {@link SashWindowsContainer} page's life cycle in order to attach/remove the
+ * listener on pages.
*
- * The class can be extended.
+ * The class can be extended.
*
* @author cedric dumoulin
- *
+ *
*/
public class SashTabDecorationSynchronizer {
/**
* Logger for debug purpose.
*/
- Logger log = Logger.getLogger(this.getClass().getName() );
-
+ Logger log = Logger.getLogger(this.getClass().getName());
+
/**
* The container to synchronize.
*/
private SashWindowsContainer container;
-
+
/**
* Listener on Container'pages life cycle.
*/
SashContainerEventsListener pageLifeCycleListener = new SashContainerEventsListener() {
-
+
public void pageChanged(IPage newPage) {
}
-
+
public void pageOpened(IPage page) {
attachPage(page);
-
+
}
-
+
public void pageDeactivated(IPage page) {
}
-
+
public void pageClosed(IPage page) {
detachPage(page);
-
+
}
-
+
public void pageActivated(IPage page) {
}
-
+
public void pageAboutToBeOpened(IPage page) {
}
-
+
public void pageAboutToBeClosed(IPage page) {
}
};
@@ -71,28 +67,29 @@ public class SashTabDecorationSynchronizer {
* Listener on changes of an {@link IEditorPart}
*/
private IPropertyListener editorPartPropertyListener = new IPropertyListener() {
-
+
public void propertyChanged(Object source, int propId) {
- if(propId == IWorkbenchPart.PROP_TITLE && source instanceof IEditorPart )
- {
+ if(propId == IWorkbenchPart.PROP_TITLE && source instanceof IEditorPart) {
refreshContainerTabForPage((IEditorPart)source);
}
-
+
}
};
/**
*
* Constructor.
- * @param container The container to synchronize.
+ *
+ * @param container
+ * The container to synchronize.
*
*/
- public SashTabDecorationSynchronizer( SashWindowsContainer container) {
+ public SashTabDecorationSynchronizer(SashWindowsContainer container) {
this.container = container;
attachContainerPages();
attachListeners();
}
-
+
/**
* Detach any listeners.
*/
@@ -100,42 +97,42 @@ public class SashTabDecorationSynchronizer {
detachListeners();
detachContainerPages();
}
-
+
/**
* Attach listeners requested by the class.
*/
protected void attachListeners() {
container.addLifeCycleListener(pageLifeCycleListener);
}
-
+
/**
* Detach listeners requested by the class.
*/
protected void detachListeners() {
container.removeLifeCycleListener(pageLifeCycleListener);
}
-
+
/**
* Start listening on change for the specified page.
+ *
* @param page
*/
protected void attachPage(IPage page) {
- if( page instanceof IEditorPage )
- {
+ if(page instanceof IEditorPage) {
log.fine("attachPage( " + page + " )");
IEditorPage editorPage = (IEditorPage)page;
editorPage.getIEditorPart().addPropertyListener(editorPartPropertyListener);
}
-
+
}
/**
* Stop listening onchange for the specified page.
+ *
* @param page
*/
protected void detachPage(IPage page) {
- if( page instanceof IEditorPage )
- {
+ if(page instanceof IEditorPage) {
log.fine("attachPage( " + page + " )");
IEditorPage editorPage = (IEditorPage)page;
editorPage.getIEditorPart().removePropertyListener(editorPartPropertyListener);
@@ -146,24 +143,25 @@ public class SashTabDecorationSynchronizer {
// lookup page
IPage page = container.lookupIPageByIEditorPart(source);
refreshContainerTabForPage(page);
-
+
}
/**
* Refresh the tab for the specified page
+ *
* @param page
*/
- protected void refreshContainerTabForPage( IPage page ) {
+ protected void refreshContainerTabForPage(IPage page) {
container.refreshPageTab(page);
}
-
+
/**
* Iterate on pages owned by the container, and call detachPage for each.
*/
private void detachContainerPages() {
// Visit all pages of the container.
container.visit(new DetachVisitor());
-
+
}
/**
@@ -172,40 +170,42 @@ public class SashTabDecorationSynchronizer {
private void attachContainerPages() {
// Visit all pages of the container.
container.visit(new AttachVisitor());
-
+
}
/**
* Visitor to visit all pages of the container and attach the page.
+ *
* @author dumoulin
- *
+ *
*/
- private class AttachVisitor implements IPageVisitor {
+ private class AttachVisitor implements IPageVisitor {
- public void accept(IComponentPage page) {
- }
+ public void accept(IComponentPage page) {
+ }
+
+ public void accept(IEditorPage page) {
+ attachPage(page);
+
+ }
- public void accept(IEditorPage page) {
- attachPage(page);
-
}
-
- }
-
+
/**
* Visitor to visit all pages of the container and attach the page.
+ *
* @author dumoulin
- *
+ *
*/
- private class DetachVisitor implements IPageVisitor {
+ private class DetachVisitor implements IPageVisitor {
- public void accept(IComponentPage page) {
- }
+ public void accept(IComponentPage page) {
+ }
+
+ public void accept(IEditorPage page) {
+ detachPage(page);
+
+ }
- public void accept(IEditorPage page) {
- detachPage(page);
-
}
-
- }
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashWindowsContainer.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashWindowsContainer.java
index 7c6817ef523..740d01436ee 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashWindowsContainer.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashWindowsContainer.java
@@ -11,7 +11,7 @@
* Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.sasheditor.internal;
+package org.eclipse.papyrus.sasheditor.editor;
import static org.eclipse.papyrus.sasheditor.Activator.log;
@@ -25,11 +25,24 @@ import org.eclipse.papyrus.sasheditor.contentprovider.IComponentModel;
import org.eclipse.papyrus.sasheditor.contentprovider.IEditorModel;
import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel;
import org.eclipse.papyrus.sasheditor.contentprovider.ISashWindowsContentProvider;
-import org.eclipse.papyrus.sasheditor.editor.IEditorPage;
-import org.eclipse.papyrus.sasheditor.editor.IPage;
-import org.eclipse.papyrus.sasheditor.editor.IPageChangedListener;
-import org.eclipse.papyrus.sasheditor.editor.IPageVisitor;
-import org.eclipse.papyrus.sasheditor.editor.ISashWindowsContainer;
+import org.eclipse.papyrus.sasheditor.internal.AbstractPanelPart;
+import org.eclipse.papyrus.sasheditor.internal.AbstractPart;
+import org.eclipse.papyrus.sasheditor.internal.ActiveEditorServicesSwitcher;
+import org.eclipse.papyrus.sasheditor.internal.ActivePageTracker;
+import org.eclipse.papyrus.sasheditor.internal.ComponentPart;
+import org.eclipse.papyrus.sasheditor.internal.EditorPart;
+import org.eclipse.papyrus.sasheditor.internal.IPartVisitor;
+import org.eclipse.papyrus.sasheditor.internal.LookupIPageByIEditorPartVisitor;
+import org.eclipse.papyrus.sasheditor.internal.LookupModelPageVisitor;
+import org.eclipse.papyrus.sasheditor.internal.PTabFolder;
+import org.eclipse.papyrus.sasheditor.internal.PagePart;
+import org.eclipse.papyrus.sasheditor.internal.PageVisitorWrapper;
+import org.eclipse.papyrus.sasheditor.internal.PartLists;
+import org.eclipse.papyrus.sasheditor.internal.PartVisitor;
+import org.eclipse.papyrus.sasheditor.internal.RootPart;
+import org.eclipse.papyrus.sasheditor.internal.SashContainerEventsProvider;
+import org.eclipse.papyrus.sasheditor.internal.ShowPartStatusVisitor;
+import org.eclipse.papyrus.sasheditor.internal.TabFolderPart;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Cursor;
import org.eclipse.swt.graphics.Point;
@@ -42,11 +55,10 @@ import org.eclipse.ui.internal.dnd.DragUtil;
import org.eclipse.ui.internal.dnd.IDragOverListener;
import org.eclipse.ui.internal.dnd.IDropTarget;
-
/**
- * Main entry class of the SashWindows system.
- * This class allows to have a multitab window with sashes.
- * The class require a ContentProvider describing the content to be shown.
+ * Main entry class of the SashWindows system. This class allows to have a
+ * multitab window with sashes. The class require a ContentProvider describing
+ * the content to be shown.
*
* @author dumoulin
*/
@@ -64,26 +76,26 @@ public class SashWindowsContainer implements ISashWindowsContainer {
private IMultiEditorManager multiEditorManager;
/**
- * Tracker tracking the current active page. The tracker also disconnect last active page and connect
- * the new one.
+ * Tracker tracking the current active page. The tracker also disconnect
+ * last active page and connect the new one.
*/
private ActivePageTracker activePageTracker;
/**
- * Event provider firing Pages life cycle events to registered listeners. Inner parts call the fireXxxEvents
- * when appropriate.
+ * Event provider firing Pages life cycle events to registered listeners.
+ * Inner parts call the fireXxxEvents when appropriate.
*/
private SashContainerEventsProvider lifeCycleEventProvider;
-
+
/**
- * The part used as root. We use an extra class as root in order to separate the code dedicated to
- * ITilePart.
+ * The part used as root. We use an extra class as root in order to separate
+ * the code dedicated to ITilePart.
*/
private RootPart rootPart;
/**
- * The SWT container associated to this part. This is generally the container of the
- * parent.
+ * The SWT container associated to this part. This is generally the
+ * container of the parent.
*/
private Composite container;
@@ -101,18 +113,18 @@ public class SashWindowsContainer implements ISashWindowsContainer {
private MenuManager folderTabMenuManager;
/**
- * Constructor.
- * Build a Container without IEditor management. Trying to add a EditorPart will result in an Exception.
- * The ContentProvider should not contain IEditorModel.
+ * Constructor. Build a Container without IEditor management. Trying to add
+ * a EditorPart will result in an Exception. The ContentProvider should not
+ * contain IEditorModel.
*/
public SashWindowsContainer() {
this(null);
}
/**
- * Constructor.
- * Build a container with EditorPart management. The container will allow to add EditorPart
- * (and thus IEditorModel to the ContentProvider).
+ * Constructor. Build a container with EditorPart management. The container
+ * will allow to add EditorPart (and thus IEditorModel to the
+ * ContentProvider).
*
* @param multiEditorManager
* The manager allowing to use {@link IEditorModel} in the model.
@@ -128,7 +140,7 @@ public class SashWindowsContainer implements ISashWindowsContainer {
// This listener will take in charge editor services switching.
activePageTracker.addActiveEditorChangedListener(new ActiveEditorServicesSwitcher(multiEditorManager.getEditorSite()));
}
-
+
// Life cycle event provider
lifeCycleEventProvider = new SashContainerEventsProvider();
}
@@ -136,7 +148,7 @@ public class SashWindowsContainer implements ISashWindowsContainer {
/**
* @return the contentProvider
*/
- protected ISashWindowsContentProvider getContentProvider() {
+ public ISashWindowsContentProvider getContentProvider() {
// Content provider should have been set.
assert (contentProvider != null);
// Double check for developement
@@ -157,8 +169,8 @@ public class SashWindowsContainer implements ISashWindowsContainer {
}
/**
- * Creates control associated to this Container.
- * This method should be called when the parent is build.
+ * Creates control associated to this Container. This method should be
+ * called when the parent is build.
*
* @param parent
* The parent in which the editor should be created; must not be <code>null</code>.
@@ -189,33 +201,36 @@ public class SashWindowsContainer implements ISashWindowsContainer {
}
/**
- * Notifies this page container that the specified page has been activated. This method
- * is called after the current tabs has been changed, either by refreshing the tabs, or by a user
- * UI action.
- * This method just set correctly the active page value in the Container, and fire pageChanged events if needed.
- * It does not change the selected page in the Part.
+ * Notifies this page container that the specified page has been activated.
+ * This method is called after the current tabs has been changed, either by
+ * refreshing the tabs, or by a user UI action. This method just set
+ * correctly the active page value in the Container, and fire pageChanged
+ * events if needed. It does not change the selected page in the Part.
*
* Propagate the event to activePageTracker.
*
* @param childPart
*/
- protected void pageChanged(PagePart childPart) {
+ public void pageChanged(PagePart childPart) {
activePageTracker.setActiveEditor(childPart);
lifeCycleEventProvider.firePageActivatedEvent(childPart);
}
/**
- * Notifies this page container that a pageChanged event has been fired by one swt Control.
- * This method is usually called after the user selects a different tab.
+ * Notifies this page container that a pageChanged event has been fired by
+ * one swt Control. This method is usually called after the user selects a
+ * different tab.
*
* The method record the new active folder in the ContentProvider, and calls {@link #pageChanged(PagePart)}.
*
* @param childPart
*/
- protected void pageChangedEvent(PagePart childPart) {
+ public void pageChangedEvent(PagePart childPart) {
- // Check if it is really a change before changing the model (which can throw change event)
- // The folder model change is done before the tracker fires the listeners, like this
+ // Check if it is really a change before changing the model (which can
+ // throw change event)
+ // The folder model change is done before the tracker fires the
+ // listeners, like this
// listeners can check the model.
if(getActivePage() == childPart)
return;
@@ -237,13 +252,14 @@ public class SashWindowsContainer implements ISashWindowsContainer {
}
/**
- * A change has happen in one of the inner parts. Relay the event.
- * This method is called by inner parts whenever the event happen in one of the part.
- * It collects and relay the firePropertyChange(int propertyId) calls from the inner IEditor.
+ * A change has happen in one of the inner parts. Relay the event. This
+ * method is called by inner parts whenever the event happen in one of the
+ * part. It collects and relay the firePropertyChange(int propertyId) calls
+ * from the inner IEditor.
*
* @param propertyId
*/
- protected void firePropertyChange(int propertyId) {
+ public void firePropertyChange(int propertyId) {
// For now, we do nothing with this event.
}
@@ -256,8 +272,7 @@ public class SashWindowsContainer implements ISashWindowsContainer {
* The model for which a part should be created.
* @return
*/
- protected PagePart createPagePart(TabFolderPart parent, IPageModel partModel, Object rawModel) {
-
+ public PagePart createPagePart(TabFolderPart parent, IPageModel partModel, Object rawModel) {
if(partModel instanceof IEditorModel) {
// Check if we can use IEditorModel
@@ -307,47 +322,47 @@ public class SashWindowsContainer implements ISashWindowsContainer {
}
/**
- * Get the list of visible IPages. The visible IPages are the one that have there diagram area
- * visible.
+ * Get the list of visible IPages. The visible IPages are the one that have
+ * there diagram area visible.
*
* @return
*/
public List<IPage> getVisiblePages() {
CollectVisiblePageVisitor visitor = new CollectVisiblePageVisitor();
-
+
rootPart.visit(visitor);
-
+
return visitor.getVisiblePages();
}
/**
- * Get the list of visible IPages. The visible IPages are the one that have there diagram area
- * visible.
+ * Get the list of visible IPages. The visible IPages are the one that have
+ * there diagram area visible.
*
* @return
*/
-// public List<IEditorPage> getVisibleIEditorPages() {
-// CollectVisiblePageVisitor visitor = new CollectVisiblePageVisitor( IEditorPage.class);
-//
-// rootPart.visit(visitor);
-//
-// return visitor.getVisiblePages();
-// }
+ // public List<IEditorPage> getVisibleIEditorPages() {
+ // CollectVisiblePageVisitor visitor = new CollectVisiblePageVisitor(
+ // IEditorPage.class);
+ //
+ // rootPart.visit(visitor);
+ //
+ // return visitor.getVisiblePages();
+ // }
/**
- * Get the list of visible IPages. The visible IPages are the one that have there diagram area
- * visible.
+ * Get the list of visible IPages. The visible IPages are the one that have
+ * there diagram area visible.
*
* @return
*/
public List<IEditorPart> getVisibleIEditorParts() {
CollectVisibleIEditorPart visitor = new CollectVisibleIEditorPart();
rootPart.visit(visitor);
-
+
return visitor.getVisiblePages();
}
-
/**
* @see org.eclipse.papyrus.sasheditor.editor.ISashWindowsContainer#setFocus()
*
@@ -368,10 +383,8 @@ public class SashWindowsContainer implements ISashWindowsContainer {
part.setFocus();
}
-
/**
- * Refresh the tabs.
- * Is we are already currently refreshing, simply return.
+ * Refresh the tabs. Is we are already currently refreshing, simply return.
*
* @see org.eclipse.papyrus.sasheditor.editor.ISashWindowsContainer#refreshTabs()
*
@@ -394,19 +407,18 @@ public class SashWindowsContainer implements ISashWindowsContainer {
/**
* Refresh the tab of the page, (i.e the name and icon in the page's tab).
*
- * @param page The page for which the name and icon should be refreshed.
+ * @param page
+ * The page for which the name and icon should be refreshed.
*/
public void refreshPageTab(IPage page) {
- if( page instanceof PagePart)
- {
+ if(page instanceof PagePart) {
((PagePart)page).refreshTab();
- }
- else
- {
+ } else {
// TODO : lookup for the corresponding PagePart, and call refresh.
-
+
}
}
+
/**
* Real implementation of refreshTab.
*
@@ -414,8 +426,8 @@ public class SashWindowsContainer implements ISashWindowsContainer {
*
*/
private void refreshTabsInternal() {
- // System.out.println("start synchronize2() ------------------------");
- // showTilesStatus();
+ // System.out.println("start synchronize2() ------------------------");
+ // showTilesStatus();
// Get the currently selected folder
PagePart oldActivePage = getActivePage();
@@ -430,7 +442,6 @@ public class SashWindowsContainer implements ISashWindowsContainer {
// Synchronize parts
rootPart.synchronize2(garbageMaps);
-
// Remove orphaned parts (no more used)
garbageMaps.garbage();
@@ -440,15 +451,15 @@ public class SashWindowsContainer implements ISashWindowsContainer {
// Reenable SWT and force layout
container.setRedraw(true);
container.layout(true, true);
- // System.out.println("end synchronize2() ------------------------");
- // showTilesStatus();
+ // System.out.println("end synchronize2() ------------------------");
+ // showTilesStatus();
}
/**
- * Select the specified page in the Parts. The specified page will becomes the active one.
- * Appropriate events are fired.
- * This is the programatic counterpart of selecting a page in the UI.
- * If the provided page is null, do nothing.
+ * Select the specified page in the Parts. The specified page will becomes
+ * the active one. Appropriate events are fired. This is the programatic
+ * counterpart of selecting a page in the UI. If the provided page is null,
+ * do nothing.
*
* @param page
* The page to select or null.
@@ -461,14 +472,14 @@ public class SashWindowsContainer implements ISashWindowsContainer {
}
/**
- * Select the specified page in the Parts. The specified page will becomes the active one.
- * Appropriate events are fired.
- * This is the programatic counterpart of selecting a page in the UI.
- * If the provided page is null, do nothing.
+ * Select the specified page in the Parts. The specified page will becomes
+ * the active one. Appropriate events are fired. This is the programatic
+ * counterpart of selecting a page in the UI. If the provided page is null,
+ * do nothing.
*
* @param page
- * The page to select or null. The IPage should
- * be an instance previously returned by the SashContainer.
+ * The page to select or null. The IPage should be an instance
+ * previously returned by the SashContainer.
*/
public void selectPage(IPage page) {
if(page == null)
@@ -485,8 +496,8 @@ public class SashWindowsContainer implements ISashWindowsContainer {
* Lookup the {@link IPage} used to render the specified rawModel.
*
* @param rawModel
- * The model for which the IPage is requested.
- * If the model is not rendered, return null;
+ * The model for which the IPage is requested. If the model is
+ * not rendered, return null;
*
* @return The corresponding IPage or null if not found.
*/
@@ -501,8 +512,8 @@ public class SashWindowsContainer implements ISashWindowsContainer {
* Lookup the {@link IPage} used to render the specified IEditorPart.
*
* @param editor
- * The IEditorPart for which the IPage is requested.
- * If the IEditorPart is not rendered, return null;
+ * The IEditorPart for which the IPage is requested. If the
+ * IEditorPart is not rendered, return null;
*
* @return The corresponding IPage or null if not found.
*/
@@ -514,10 +525,10 @@ public class SashWindowsContainer implements ISashWindowsContainer {
}
/**
- * Check if the oldActivePage still alive, and set it if needed.
- * If the oldActivePage is null, set an active page if one exist.
- * If the oldActivePage still alive, let it as the active one. If it is
- * disposed, get arbitrarily an active page if one exist.
+ * Check if the oldActivePage still alive, and set it if needed. If the
+ * oldActivePage is null, set an active page if one exist. If the
+ * oldActivePage still alive, let it as the active one. If it is disposed,
+ * get arbitrarily an active page if one exist.
*
* @param oldActivePage
* @param partLists
@@ -540,8 +551,8 @@ public class SashWindowsContainer implements ISashWindowsContainer {
}
/**
- * Lookup for a valid active Page. Return null if none is found.
- * TODO Use a visitor to implements this method.
+ * Lookup for a valid active Page. Return null if none is found. TODO Use a
+ * visitor to implements this method.
*
* @return
*/
@@ -553,10 +564,12 @@ public class SashWindowsContainer implements ISashWindowsContainer {
}
/**
- * Set a {@link MenuManager} used to manage a contextual menu that is shown on the tabs area of the folders.
+ * Set a {@link MenuManager} used to manage a contextual menu that is shown
+ * on the tabs area of the folders.
*
* @param menuManager
- * The {@link MenuManager} used to create the menu on the tab area.
+ * The {@link MenuManager} used to create the menu on the tab
+ * area.
*/
public void setFolderTabMenuManager(MenuManager menuManager) {
this.folderTabMenuManager = menuManager;
@@ -569,22 +582,22 @@ public class SashWindowsContainer implements ISashWindowsContainer {
/**
* @return the menuManager
*/
- protected MenuManager getFolderTabMenuManager() {
+ public MenuManager getFolderTabMenuManager() {
return folderTabMenuManager;
}
/**
- * Show the status of the different Tiles composing the sash system.
- * Used for debug purpose.
+ * Show the status of the different Tiles composing the sash system. Used
+ * for debug purpose.
*/
public void showTilesStatus() {
ShowPartStatusVisitor visitor = new ShowPartStatusVisitor();
rootPart.visit(visitor);
}
-
/**
- * Visit all the Pages (IEditorPage and IComponentPage), allowing to access to the public interface.
+ * Visit all the Pages (IEditorPage and IComponentPage), allowing to access
+ * to the public interface.
*/
public void visit(IPageVisitor pageVisitor) {
PageVisitorWrapper visitor = new PageVisitorWrapper(pageVisitor);
@@ -592,9 +605,9 @@ public class SashWindowsContainer implements ISashWindowsContainer {
}
/**
- * Visit the Part associated to the container. This method visibility is protected in order to be able to access it
- * from junit tests.
- * It is not intended to be used by public API or from outside.
+ * Visit the Part associated to the container. This method visibility is
+ * protected in order to be able to access it from junit tests. It is not
+ * intended to be used by public API or from outside.
*/
protected void visit(IPartVisitor visitor) {
rootPart.visit(visitor);
@@ -620,13 +633,15 @@ public class SashWindowsContainer implements ISashWindowsContainer {
* org.eclipse.swt.graphics.Rectangle)
*/
public IDropTarget drag(Control currentControl, Object draggedObject, Point position, Rectangle dragRectangle) {
- // TODO remove the cast by changing the method. Only folder can be source and target
+ // TODO remove the cast by changing the method. Only folder can be
+ // source and target
final TabFolderPart sourcePart = (TabFolderPart)rootPart.findPart(draggedObject); // (ITilePart) draggedObject;
// Compute src tab index
- // TODO move that and previous in the sender of drag event. Use a class containing both as draggedObject.
+ // TODO move that and previous in the sender of drag event. Use a
+ // class containing both as draggedObject.
final int srcTabIndex = PTabFolder.getDraggedObjectTabIndex(draggedObject);
-// System.out.println("drag to position=" + position);
+ // System.out.println("drag to position=" + position);
Rectangle containerDisplayBounds = DragUtil.getDisplayBounds(container);
AbstractPanelPart targetPart = null;
@@ -637,7 +652,8 @@ public class SashWindowsContainer implements ISashWindowsContainer {
targetPart = (AbstractPanelPart)rootPart.findPart(position);
// System.out.println("targetPart=" + targetPart
// + ", position=" + position
- // + "container.toControl(position)=" + container.toControl(position));
+ // + "container.toControl(position)=" +
+ // container.toControl(position));
}
if(targetPart != null) {
@@ -648,29 +664,34 @@ public class SashWindowsContainer implements ISashWindowsContainer {
int side = Geometry.getClosestSide(targetBounds, position);
int distance = Geometry.getDistanceFromEdge(targetBounds, position, side);
- // Reserve the 5 pixels around the edge of the part for the drop-on-edge cursor
+ // Reserve the 5 pixels around the edge of the part for the
+ // drop-on-edge cursor
// Check if the target can handle the drop.
if(distance >= 5) {
- // Otherwise, ask the part if it has any special meaning for this drop location
+ // Otherwise, ask the part if it has any special meaning
+ // for this drop location
// TODO remove cast; change return type of findPart()
IDropTarget target = targetPart.getDropTarget(draggedObject, (TabFolderPart)sourcePart, position);
if(target != null) {
return target;
}
} else {
- // We are on the boarder, try to drop on the parent
+ // We are on the boarder, try to drop on the parent
// Warning : the parent could be the rootPart
-// System.out.println("DropTarget near the border");
+ // System.out.println("DropTarget near the border");
}
- //
+ //
if(distance > 30) {
side = SWT.CENTER;
}
- //
- // // If the part doesn't want to override this drop location then drop on the edge
- //
- // // A "pointless drop" would be one that will put the dragged object back where it started.
- // // Note that it should be perfectly valid to drag an object back to where it came from -- however,
+ //
+ // // If the part doesn't want to override this drop
+ // location then drop on the edge
+ //
+ // // A "pointless drop" would be one that will put the
+ // dragged object back where it started.
+ // // Note that it should be perfectly valid to drag an
+ // object back to where it came from -- however,
// // the drop should be ignored.
//
@SuppressWarnings("unused")
@@ -684,7 +705,7 @@ public class SashWindowsContainer implements ISashWindowsContainer {
}
} else {
// Cursor is outside the container
-// System.out.println("Outside container bounds");
+ // System.out.println("Outside container bounds");
// This will be used to create a new Window.
// We only allow dropping into a stack, not creating one
// if (differentWindows)
@@ -774,13 +795,16 @@ public class SashWindowsContainer implements ISashWindowsContainer {
* @see org.eclipse.ui.internal.dnd.IDropTarget#getCursor()
*/
public Cursor getCursor() {
-// System.out.println(SashWindowsContainer.this.getClass().getSimpleName() + ".getCursor()-" + count++);
+ // System.out.println(SashWindowsContainer.this.getClass().getSimpleName()
+ // + ".getCursor()-" + count++);
return DragCursors.getCursor(DragCursors.positionToDragCursor(cursor));
}
public Rectangle getSnapRectangle() {
-// System.out.println(SashWindowsContainer.this.getClass().getSimpleName() + ".getSnapRectangle(" + "sourcePart=" + sourcePart + ", targetPart=" + targetPart + ", side=" + side);
+ // System.out.println(SashWindowsContainer.this.getClass().getSimpleName()
+ // + ".getSnapRectangle(" + "sourcePart=" + sourcePart +
+ // ", targetPart=" + targetPart + ", side=" + side);
Rectangle targetDisplayBounds;
if(targetPart != null) {
@@ -805,17 +829,16 @@ public class SashWindowsContainer implements ISashWindowsContainer {
}
-
/**
* @return the lifeCycleEventProvider
*/
- protected SashContainerEventsProvider getLifeCycleEventProvider() {
+ public SashContainerEventsProvider getLifeCycleEventProvider() {
return lifeCycleEventProvider;
}
/**
- * Add a listener on pageChanged event.
- * This implementation delegates to the internal PageTracker.
+ * Add a listener on pageChanged event. This implementation delegates to the
+ * internal PageTracker.
*
* @see org.eclipse.papyrus.sasheditor.editor.ISashWindowsContainer#addPageChangedListener(org.eclipse.papyrus.sasheditor.editor.IPageChangedListener)
* @param pageChangedListener
@@ -837,8 +860,8 @@ public class SashWindowsContainer implements ISashWindowsContainer {
}
/**
- * Add a listener on Page LifeCycle events.
- * This implementation delegates to the internal PageTracker.
+ * Add a listener on Page LifeCycle events. This implementation delegates to
+ * the internal PageTracker.
*
* @see org.eclipse.papyrus.sasheditor.editor.ISashWindowsContainer#addPageChangedListener(org.eclipse.papyrus.sasheditor.editor.IPageChangedListener)
* @param listener
@@ -863,14 +886,11 @@ public class SashWindowsContainer implements ISashWindowsContainer {
/* Internal Visitors */
/* ***************************************************** */
-
/**
- * Inner class.
- * A visitor setting the {@link MenuManager} on each folder.
+ * Inner class. A visitor setting the {@link MenuManager} on each folder.
*/
private class SetFolderTabMenuVisitor extends PartVisitor {
-
private MenuManager menuManager;
/**
@@ -894,23 +914,23 @@ public class SashWindowsContainer implements ISashWindowsContainer {
}
/**
- * Inner class.
- * A visitor used to collect all visible page in the sashcontainer.
- * A visible page is a page whose the diagram area is visible.
+ * Inner class. A visitor used to collect all visible page in the
+ * sashcontainer. A visible page is a page whose the diagram area is
+ * visible.
*/
- private class CollectVisiblePageVisitor extends PartVisitor {
-
+ private class CollectVisiblePageVisitor extends PartVisitor {
+
private List<IPage> visiblePages = new ArrayList<IPage>();
private Class<? extends IPage> expectedClass;
-
+
/**
* Constructor.
*
* @param menuManager
*/
public CollectVisiblePageVisitor() {
-
+
}
/**
@@ -925,6 +945,7 @@ public class SashWindowsContainer implements ISashWindowsContainer {
/**
* Get the result list.
+ *
* @param <T>
* @return
*/
@@ -938,42 +959,43 @@ public class SashWindowsContainer implements ISashWindowsContainer {
*/
@Override
public boolean accept(TabFolderPart part) {
-
+
IPage page = part.getVisiblePagePart();
- if( part != null) {
- if( expectedClass != null && expectedClass.isInstance(page)) {
+ if(part != null) {
+ if(expectedClass != null && expectedClass.isInstance(page)) {
visiblePages.add(page);
- }
- else {
+ } else {
visiblePages.add(page);
}
-
+
}
-
+
return true;
}
}
/**
- * Inner class.
- * A visitor used to collect all visible page in the sashcontainer.
- * A visible page is a page whose the diagram area is visible.
+ * Inner class. A visitor used to collect all visible page in the
+ * sashcontainer. A visible page is a page whose the diagram area is
+ * visible.
*/
- private class CollectVisibleIEditorPart extends PartVisitor {
-
+ private class CollectVisibleIEditorPart extends PartVisitor {
+
private List<IEditorPart> visiblePages = new ArrayList<IEditorPart>();
+
/**
* Constructor.
*
* @param menuManager
*/
public CollectVisibleIEditorPart() {
-
+
}
/**
* Get the result list.
+ *
* @param <T>
* @return
*/
@@ -986,12 +1008,12 @@ public class SashWindowsContainer implements ISashWindowsContainer {
*/
@Override
public boolean accept(TabFolderPart part) {
-
+
IPage page = part.getVisiblePagePart();
- if( page != null && page instanceof IEditorPage ) {
- IEditorPage editorPage = (IEditorPage) page;
- visiblePages.add(editorPage.getIEditorPart());
-
+ if(page != null && page instanceof IEditorPage) {
+ IEditorPage editorPage = (IEditorPage)page;
+ visiblePages.add(editorPage.getIEditorPart());
+
}
// continue searching
return true;
@@ -999,5 +1021,4 @@ public class SashWindowsContainer implements ISashWindowsContainer {
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashWindowsEventsProvider.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashWindowsEventsProvider.java
index ae60cf0dd54..e2c392d6601 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashWindowsEventsProvider.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/SashWindowsEventsProvider.java
@@ -6,7 +6,6 @@ package org.eclipse.papyrus.sasheditor.editor;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.papyrus.sasheditor.internal.SashWindowsContainer;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IWorkbenchPage;
@@ -19,10 +18,12 @@ import org.eclipse.ui.IWorkbenchPart;
* <li>- containerChanged - the active editor has changed, and so the currently active container.</li>
* </ul>
*
- * This class require the current Eclipse page in order to listen on active editor changed.
- * This class connect itself to the Workbench editor changed event. Then, it ask the current editor for a ISashWindowsContainer (using getAdaptor() ).
- * If the editor return a ISashWindowsContainer,
- * this class listen to the pageChanged events. This class takes care to connect itself to the new ISashWindowsContainer when the editor changes.
+ * This class require the current Eclipse page in order to listen on active
+ * editor changed. This class connect itself to the Workbench editor changed
+ * event. Then, it ask the current editor for a ISashWindowsContainer (using
+ * getAdaptor() ). If the editor return a ISashWindowsContainer, this class
+ * listen to the pageChanged events. This class takes care to connect itself to
+ * the new ISashWindowsContainer when the editor changes.
*
* @TODO rename as SashWindowsEventsNotifier
* @author cedric dumoulin
@@ -31,12 +32,14 @@ import org.eclipse.ui.IWorkbenchPart;
public class SashWindowsEventsProvider {
/**
- * List of listeners that will be notified when the current Sash Page has changed.
+ * List of listeners that will be notified when the current Sash Page has
+ * changed.
*/
private PageChangedListeners pageEventsManager = new PageChangedListeners();
/**
- * List of listeners that will be notified when the SashWindowsContainer has changed.
+ * List of listeners that will be notified when the SashWindowsContainer has
+ * changed.
*/
private SashWindowsContainerChangedListeners containerEventsManager = new SashWindowsContainerChangedListeners();
@@ -58,28 +61,28 @@ public class SashWindowsEventsProvider {
/** Currently active page, or null if no container is active */
private IPage activePage = null;
-
private IPartListener workbenchPartListener = new IPartListener() {
public void partOpened(IWorkbenchPart part) {
- // System.out.println("partOpened("+ part +")");
+ // System.out.println("partOpened("+ part +")");
}
public void partDeactivated(IWorkbenchPart part) {
- // System.out.println("partDeactivated("+ part +")");
+ // System.out.println("partDeactivated("+ part +")");
}
public void partClosed(IWorkbenchPart part) {
- // System.out.println("("+ part +")");
+ // System.out.println("("+ part +")");
}
public void partBroughtToTop(IWorkbenchPart part) {
- // System.out.println("partClosed("+ part +")");
+ // System.out.println("partClosed("+ part +")");
}
public void partActivated(IWorkbenchPart part) {
- // System.out.println("partActivated(" + part + ") - activeEditor: " + workbenchPage.getActiveEditor());
+ // System.out.println("partActivated(" + part + ") - activeEditor: "
+ // + workbenchPage.getActiveEditor());
checkActiveEditorChange();
}
};
@@ -96,8 +99,8 @@ public class SashWindowsEventsProvider {
/**
*
- * Constructor.
- * Page can be acquired with : <code>IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();</code>
+ * Constructor. Page can be acquired with :
+ * <code>IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();</code>
*/
public SashWindowsEventsProvider(IWorkbenchPage page) {
@@ -126,18 +129,19 @@ public class SashWindowsEventsProvider {
newContainer = (ISashWindowsContainer)editorPart.getAdapter(ISashWindowsContainer.class);
}
- // // Set SashContainer and ActivePage
- // currentContainer = newContainer;
- // if( currentContainer != null)
- // {
- // activePage = newContainer.getActiveSashWindowsPage();
- // System.err.println("activePage=" + activePage.getPageTitle()
- // + ", tab index=" + currentContainer.);
- // }
+ // // Set SashContainer and ActivePage
+ // currentContainer = newContainer;
+ // if( currentContainer != null)
+ // {
+ // activePage = newContainer.getActiveSashWindowsPage();
+ // System.err.println("activePage=" + activePage.getPageTitle()
+ // + ", tab index=" + currentContainer.);
+ // }
}
/**
- * Return the currently active ISashWindowsContainer or null if none is actif.
+ * Return the currently active ISashWindowsContainer or null if none is
+ * actif.
*
* @return
*/
@@ -146,8 +150,8 @@ public class SashWindowsEventsProvider {
}
/**
- * Return the currently active {@link IEditorPart} owning the currently active ISashWindowsContaineror.
- * Return null if no container is actif.
+ * Return the currently active {@link IEditorPart} owning the currently
+ * active ISashWindowsContaineror. Return null if no container is actif.
*
* @return
*/
@@ -158,8 +162,8 @@ public class SashWindowsEventsProvider {
}
/**
- * Return the currently active page associated to the currently active Container.
- * Return null if no container is actif.
+ * Return the currently active page associated to the currently active
+ * Container. Return null if no container is actif.
*
* @return
*/
@@ -188,9 +192,9 @@ public class SashWindowsEventsProvider {
}
/**
- * Register a listener listeneing on editor change.
- * Page can be acuired with :
- * IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ * Register a listener listeneing on editor change. Page can be acuired with
+ * : IWorkbenchPage page =
+ * PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
*/
private void registerEditorChangedListener() {
@@ -198,9 +202,9 @@ public class SashWindowsEventsProvider {
}
/**
- * This method is called when the active editor has change.
- * The method checks the new editor and send appropriate events.
- * The editor can be null.
+ * This method is called when the active editor has change. The method
+ * checks the new editor and send appropriate events. The editor can be
+ * null.
*
* @param newEditor
* The new editor of null if none is set.
@@ -220,8 +224,9 @@ public class SashWindowsEventsProvider {
}
/**
- * This method is called when the active container has changed.
- * The pageChangedListener is removed from the oldContainer, and attached to the newContainer.
+ * This method is called when the active container has changed. The
+ * pageChangedListener is removed from the oldContainer, and attached to the
+ * newContainer.
*
* @param newContainer
*/
@@ -246,8 +251,8 @@ public class SashWindowsEventsProvider {
}
/**
- * Send an event indicating a containerChanged.
- * Propagate the event to all the listeners.
+ * Send an event indicating a containerChanged. Propagate the event to all
+ * the listeners.
*
* @param activeEditor
*/
@@ -257,8 +262,8 @@ public class SashWindowsEventsProvider {
}
/**
- * Send an event indicating a pageChanged.
- * Propagate the event to all the listeners.
+ * Send an event indicating a pageChanged. Propagate the event to all the
+ * listeners.
*
* @param activeEditor
*/
@@ -400,7 +405,8 @@ public class SashWindowsEventsProvider {
}
/**
- * A list of {@link ISashWindowsContainerChangedListener} listening on container changed event.
+ * A list of {@link ISashWindowsContainerChangedListener} listening on
+ * container changed event.
*
* @author dumoulin
*
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/actionbarcontributor/ComposedActionBarContributor.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/actionbarcontributor/ComposedActionBarContributor.java
index 95cf4c23c13..2637e6bafe3 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/actionbarcontributor/ComposedActionBarContributor.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/actionbarcontributor/ComposedActionBarContributor.java
@@ -9,34 +9,34 @@ import org.eclipse.ui.IEditorActionBarContributor;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.part.EditorActionBarContributor;
-
/**
*
* An ActionBarContributor composed of ActionBarContributor from multi editor.
- * This ActionBarContributor switch to the contributor dedicated to the active editor in
- * a MultiPageEditor environement.
+ * This ActionBarContributor switch to the contributor dedicated to the active
+ * editor in a MultiPageEditor environement.
*
* @author dumoulin
*
*/
public class ComposedActionBarContributor extends MultiPageEditorActionBarContributor {
- // /**
- // * List of contributors.
- // */
- // protected ContributorMap<Class<? extends IEditorPart>, EditorActionBarContributor> contributors = new ContributorMap<Class<? extends IEditorPart>, EditorActionBarContributor>();
- //
- //
- // /**
- // * Contributor used as default.
- // */
- // protected EditorActionBarContributor defaultContributor;
- //
- // /**
- // * The currently active contributor.
- // */
- // protected EditorActionBarContributor activeContributor;
-
+ // /**
+ // * List of contributors.
+ // */
+ // protected ContributorMap<Class<? extends IEditorPart>,
+ // EditorActionBarContributor> contributors = new ContributorMap<Class<?
+ // extends IEditorPart>, EditorActionBarContributor>();
+ //
+ //
+ // /**
+ // * Contributor used as default.
+ // */
+ // protected EditorActionBarContributor defaultContributor;
+ //
+ // /**
+ // * The currently active contributor.
+ // */
+ // protected EditorActionBarContributor activeContributor;
/** The currently active nested editor */
protected IEditorPart activeNestedEditor;
@@ -56,8 +56,9 @@ public class ComposedActionBarContributor extends MultiPageEditorActionBarContri
* </p>
*
* @param activeEditor
- * the new active editor, or <code>null</code> if there is no active page, or if the
- * active page does not have a corresponding editor
+ * the new active editor, or <code>null</code> if there is no
+ * active page, or if the active page does not have a
+ * corresponding editor
*/
@Override
public void setActivePage(IEditorPart activeEditor) {
@@ -76,9 +77,9 @@ public class ComposedActionBarContributor extends MultiPageEditorActionBarContri
activeNestedEditor = activeEditor;
-// System.out.println(this.getClass().getSimpleName()
-// + ".setActivePage(" + activeEditor
-// + ") :" + getActiveContributor());
+ // System.out.println(this.getClass().getSimpleName()
+ // + ".setActivePage(" + activeEditor
+ // + ") :" + getActiveContributor());
// Propagate call if possible
// Call setActiveEditor() on nested contributor.
@@ -86,8 +87,9 @@ public class ComposedActionBarContributor extends MultiPageEditorActionBarContri
if(contributor != this && contributor instanceof EditorActionBarContributor)
((EditorActionBarContributor)contributor).setActiveEditor(activeEditor);
- // if(contributor != this && contributor instanceof IMultiPageEditorActionBarContributor)
- // ((IMultiPageEditorActionBarContributor)contributor).setActivePage(activeEditor);
+ // if(contributor != this && contributor instanceof
+ // IMultiPageEditorActionBarContributor)
+ // ((IMultiPageEditorActionBarContributor)contributor).setActivePage(activeEditor);
}
@@ -109,10 +111,11 @@ public class ComposedActionBarContributor extends MultiPageEditorActionBarContri
// Switch the editor and activeContributor.
super.setActiveEditor(part);
// Now, propagate to the new activeContributor
- // IEditorActionBarContributor activeContributor = getActiveContributor();
+ // IEditorActionBarContributor activeContributor =
+ // getActiveContributor();
//
- // if(activeContributor!=this)
- // activeContributor.setActiveEditor(part);
+ // if(activeContributor!=this)
+ // activeContributor.setActiveEditor(part);
}
/**
@@ -126,13 +129,12 @@ public class ComposedActionBarContributor extends MultiPageEditorActionBarContri
if(activeNestedEditor == null)
return this;
- //
+ //
return activeNestedEditor.getEditorSite().getActionBarContributor();
}
-
// ************************************************ //
- // Propagate method calls //
+ // Propagate method calls //
// ************************************************ //
/**
@@ -140,13 +142,14 @@ public class ComposedActionBarContributor extends MultiPageEditorActionBarContri
*
* @return the action bars
*/
- // public IActionBars getActionBars() {
- // IEditorActionBarContributor activeContributor = getActiveContributor();
- // if( activeContributor!=this && activeContributor instanceof EditorActionBarContributor)
- // return ((EditorActionBarContributor)getActiveContributor()).getActionBars();
- // else
- // return super.getActionBars();
- // }
-
+ // public IActionBars getActionBars() {
+ // IEditorActionBarContributor activeContributor = getActiveContributor();
+ // if( activeContributor!=this && activeContributor instanceof
+ // EditorActionBarContributor)
+ // return
+ // ((EditorActionBarContributor)getActiveContributor()).getActionBars();
+ // else
+ // return super.getActionBars();
+ // }
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/actionbarcontributor/IMultiPageEditorActionBarContributor.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/actionbarcontributor/IMultiPageEditorActionBarContributor.java
index 895ce3f7549..cd4a4f5b045 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/actionbarcontributor/IMultiPageEditorActionBarContributor.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/actionbarcontributor/IMultiPageEditorActionBarContributor.java
@@ -17,9 +17,10 @@ import org.eclipse.ui.IEditorPart;
/**
* Interface implemented by ActionBarContributor dedicated to MultiEditor.
- * ActionBarContributor that want to be advised of a page change should implement this interface.
- * Another way should be to use a Observer/Observee mechanism, allowing to remove the dependancy
- * from the editor to the ActionBarContributor ?
+ * ActionBarContributor that want to be advised of a page change should
+ * implement this interface. Another way should be to use a Observer/Observee
+ * mechanism, allowing to remove the dependancy from the editor to the
+ * ActionBarContributor ?
*
* @author dumoulin
*
@@ -27,7 +28,8 @@ import org.eclipse.ui.IEditorPart;
public interface IMultiPageEditorActionBarContributor {
/**
- * Sets the active page of the the multi-page editor to be the given editor. Redirect actions to the given editor if actions are not already being
+ * Sets the active page of the the multi-page editor to be the given editor.
+ * Redirect actions to the given editor if actions are not already being
* sent to it.
* <p>
* This method is called whenever the page changes. Subclasses must implement this method to redirect actions to the given editor (if not already
@@ -35,7 +37,9 @@ public interface IMultiPageEditorActionBarContributor {
* </p>
*
* @param activeEditor
- * the new active editor, or <code>null</code> if there is no active page, or if the active page does not have a corresponding editor
+ * the new active editor, or <code>null</code> if there is no
+ * active page, or if the active page does not have a
+ * corresponding editor
*/
public abstract void setActivePage(IEditorPart activeEditor);
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/actionbarcontributor/MultiPageEditorActionBarContributor.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/actionbarcontributor/MultiPageEditorActionBarContributor.java
index dfc3b290f41..21a1f34c092 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/actionbarcontributor/MultiPageEditorActionBarContributor.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/actionbarcontributor/MultiPageEditorActionBarContributor.java
@@ -17,7 +17,8 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.part.EditorActionBarContributor;
/**
- * Abstract base class for managing the installation/deinstallation of global actions for multi-page editors.
+ * Abstract base class for managing the installation/deinstallation of global
+ * actions for multi-page editors.
* <p>
* Subclasses must implement <code>setActivePage</code>, and may reimplement any of the following methods:
* <ul>
@@ -41,10 +42,9 @@ public abstract class MultiPageEditorActionBarContributor extends EditorActionBa
}
/**
- * Method declared on EditorActionBarContributor.
- * Registers the contributor with the multi-page
- * editor for future editor action redirection when the active page is changed, and sets
- * the active page.
+ * Method declared on EditorActionBarContributor. Registers the contributor
+ * with the multi-page editor for future editor action redirection when the
+ * active page is changed, and sets the active page.
*/
public void setActiveEditor(IEditorPart part) {
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/gef/MultiDiagramEditorGefDelegate.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/gef/MultiDiagramEditorGefDelegate.java
index 3c2ec027fd5..ec2a1d58c30 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/gef/MultiDiagramEditorGefDelegate.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/editor/gef/MultiDiagramEditorGefDelegate.java
@@ -20,10 +20,9 @@ import org.eclipse.gef.ui.actions.ActionRegistry;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
-
/**
- * Provide methods and services needed for Gef Editors.
- * This class is intended to be used as a delegate inside classes providing MultiDiagramEditor.
+ * Provide methods and services needed for Gef Editors. This class is intended
+ * to be used as a delegate inside classes providing MultiDiagramEditor.
*
* @author dumoulin
*
@@ -34,12 +33,11 @@ public class MultiDiagramEditorGefDelegate {
protected ActionRegistry actionRegistry;
/** Synchronizer object */
- // private MultiPageSelectionSynchronizer synchronizer;
+ // private MultiPageSelectionSynchronizer synchronizer;
/** List of listeners on SelectionChanged event */
private List<ISelectionChangedListener> selectionListeners = new ArrayList<ISelectionChangedListener>(1);
-
/**
* This method should be called by the containing class.
*/
@@ -50,9 +48,9 @@ public class MultiDiagramEditorGefDelegate {
}
}
-
/**
- * Adds a listener for selection changes in this selection provider. Has no effect if an identical listener is already registered.
+ * Adds a listener for selection changes in this selection provider. Has no
+ * effect if an identical listener is already registered.
*
* @param listener
* a selection changed listener
@@ -72,22 +70,24 @@ public class MultiDiagramEditorGefDelegate {
return actionRegistry;
}
- // /**
- // * Returns the selection synchronizer object. The synchronizer can be used to sync the selection of 2 or more EditPartViewers.
- // *
- // * @return the syncrhonizer
- // */
- // public MultiPageSelectionSynchronizer getSelectionSynchronizer() {
- // if (synchronizer == null) {
- // synchronizer = new MultiPageSelectionSynchronizer();
- // // Hook this editor.
- //// synchronizer.addViewer(this);
- // }
- // return synchronizer;
- // }
+ // /**
+ // * Returns the selection synchronizer object. The synchronizer can be used
+ // to sync the selection of 2 or more EditPartViewers.
+ // *
+ // * @return the syncrhonizer
+ // */
+ // public MultiPageSelectionSynchronizer getSelectionSynchronizer() {
+ // if (synchronizer == null) {
+ // synchronizer = new MultiPageSelectionSynchronizer();
+ // // Hook this editor.
+ // // synchronizer.addViewer(this);
+ // }
+ // return synchronizer;
+ // }
/**
- * Removes the given selection change listener from this selection provider. Has no affect if an identical listener is not registered.
+ * Removes the given selection change listener from this selection provider.
+ * Has no affect if an identical listener is not registered.
*
* @param listener
* the selection changed listener to be removed
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/AbstractPanelPart.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/AbstractPanelPart.java
index 19d3ab0d88d..8900e34dc64 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/AbstractPanelPart.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/AbstractPanelPart.java
@@ -18,10 +18,8 @@ import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.internal.dnd.IDropTarget;
-
/**
- * Common ancestor of Panel Parts.
- * Panels are sashes and folders.
+ * Common ancestor of Panel Parts. Panels are sashes and folders.
*
* @author cedric dumoulin
*/
@@ -43,8 +41,7 @@ public abstract class AbstractPanelPart extends AbstractPart {
}
/**
- * Create the SWT controls.
- * This method is called by the SWT parent.
+ * Create the SWT controls. This method is called by the SWT parent.
*
* @param container
*/
@@ -71,8 +68,8 @@ public abstract class AbstractPanelPart extends AbstractPart {
abstract public void synchronize2(PartLists existingParts);
/**
- * Return true is the part is for the specified raw model.
- * Return false otherwise.
+ * Return true is the part is for the specified raw model. Return false
+ * otherwise.
*
* @param rawModel
* @return
@@ -80,9 +77,10 @@ public abstract class AbstractPanelPart extends AbstractPart {
abstract public boolean isPartFor(Object rawModel);
/**
- * Orphan this node. The parent is set to null, but control is left unchanged.
- * The node can be reattached with reparent(). Change garbage state to {@link GarbageState.ORPHANED}.
- * This method as no effect if the Tile has already been reparented.
+ * Orphan this node. The parent is set to null, but control is left
+ * unchanged. The node can be reattached with reparent(). Change garbage
+ * state to {@link GarbageState.ORPHANED}. This method as no effect if the
+ * Tile has already been reparented.
*/
public void orphan() {
// orphan only if we are in UNCHANGED state
@@ -92,10 +90,8 @@ public abstract class AbstractPanelPart extends AbstractPart {
}
}
-
/**
- * Mark this Page as UNCHANGED.
- * The PAge should be in the COLLECTED state.
+ * Mark this Page as UNCHANGED. The PAge should be in the COLLECTED state.
*
* @see
* @return the parent
@@ -121,7 +117,8 @@ public abstract class AbstractPanelPart extends AbstractPart {
abstract public void reparent(IPanelParent newParent, Composite swtParent);
/**
- * Collect all the parts. The method is called recursively in the tree of parts.
+ * Collect all the parts. The method is called recursively in the tree of
+ * parts.
*
* @param parts
* The list into which parts are added.
@@ -147,7 +144,8 @@ public abstract class AbstractPanelPart extends AbstractPart {
abstract public AbstractPart findPart(Object control);
/**
- * Locates the part that intersects the given point and that have the expected type
+ * Locates the part that intersects the given point and that have the
+ * expected type
*
* @param toFind
* Position in Display coordinate.
@@ -165,10 +163,8 @@ public abstract class AbstractPanelPart extends AbstractPart {
abstract public Composite getControl();
/**
- * Get the drop target.
- * Used by the drag tab mechanism.
+ * Get the drop target. Used by the drag tab mechanism.
*/
abstract public IDropTarget getDropTarget(Object draggedObject, TabFolderPart sourcePart, Point position);
-
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/AbstractPart.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/AbstractPart.java
index 00ee3724e5f..d2c77276629 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/AbstractPart.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/AbstractPart.java
@@ -14,11 +14,11 @@
package org.eclipse.papyrus.sasheditor.internal;
import org.eclipse.papyrus.sasheditor.contentprovider.ISashWindowsContentProvider;
-
+import org.eclipse.papyrus.sasheditor.editor.SashWindowsContainer;
/**
- * Base class of the Part hierarchy.
- * This class provides common methods for sashwindows Parts.
+ * Base class of the Part hierarchy. This class provides common methods for
+ * sashwindows Parts.
*
*
* @author dumoulin
@@ -40,7 +40,6 @@ public abstract class AbstractPart {
UNVISITED, ORPHANED, REPARENTED, CREATED, UNCHANGED
}
-
/**
* The main container.
*/
@@ -49,7 +48,6 @@ public abstract class AbstractPart {
/** Garbage state used during refresh */
protected GarbageState garbageState = GarbageState.CREATED;
-
/**
* @param sashWindowsContainer
*/
@@ -57,7 +55,6 @@ public abstract class AbstractPart {
this.sashWindowsContainer = sashWindowsContainer;
}
-
/**
* Get the {@link SashWindowsContainer}.
*
@@ -67,7 +64,6 @@ public abstract class AbstractPart {
return sashWindowsContainer;
}
-
/**
* Get the content provider of the sashwindows.
*
@@ -102,5 +98,4 @@ public abstract class AbstractPart {
return garbageState;
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ActiveEditorServicesSwitcher.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ActiveEditorServicesSwitcher.java
index 7156949f3e4..bc2bc2af923 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ActiveEditorServicesSwitcher.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ActiveEditorServicesSwitcher.java
@@ -18,6 +18,7 @@ import java.util.logging.Logger;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.papyrus.sasheditor.editor.SashWindowsContainer;
import org.eclipse.papyrus.sasheditor.editor.actionbarcontributor.IMultiPageEditorActionBarContributor;
import org.eclipse.papyrus.sasheditor.internal.ActivePageTracker.IActiveEditorChangedListener;
import org.eclipse.papyrus.sasheditor.internal.eclipsecopy.MultiPageSelectionProvider;
@@ -32,14 +33,12 @@ import org.eclipse.ui.internal.services.INestable;
import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
import org.eclipse.ui.services.IServiceLocator;
-
/**
- * This class is used to switch the services of a nested editor when the active nested editor change.
- * This class is a {@link IActiveEditorChangedListener} registered to the {@link ActivePageTracker}
- * by the {@link SashWindowsContainer}.
+ * This class is used to switch the services of a nested editor when the active
+ * nested editor change. This class is a {@link IActiveEditorChangedListener} registered to the {@link ActivePageTracker} by the
+ * {@link SashWindowsContainer}.
*
- * When a new Editor is set active, by calling {@link #setActiveEditor(PagePart)}, following actions are
- * performed:
+ * When a new Editor is set active, by calling {@link #setActiveEditor(PagePart)}, following actions are performed:
* <ul>
* <li>deactivate services: nested site and keybinding</li>
* <li>An event is sent to the ActionBarContributor if it accept it (by implementing {@link IMultiPageEditorActionBarContributor})</li>
@@ -65,8 +64,8 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
private IEditorSite outerEditorSite;
/**
- * The active service locator. This value may be <code>null</code> if there is no selected page, or if the selected page is a control with no
- * site.
+ * The active service locator. This value may be <code>null</code> if there
+ * is no selected page, or if the selected page is a control with no site.
*/
private INestable activeServiceLocator;
@@ -81,9 +80,9 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
}
/**
- * Get the currently active IEditorPart, if any.
- * Return null if there is no active IeditorPart.
- * Method check if the active leaf encapsulate an IEditorPart. Return it if true.
+ * Get the currently active IEditorPart, if any. Return null if there is no
+ * active IeditorPart. Method check if the active leaf encapsulate an
+ * IEditorPart. Return it if true.
*
* @return The currentlyactive IEditorPart or null.
*/
@@ -92,9 +91,9 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
}
/**
- * Get IEditorPart of the specified PagePart, if any.
- * Return null if there is no IeditorPart.
- * Method check if the leaf encapsulate an IEditorPart. Return it if true.
+ * Get IEditorPart of the specified PagePart, if any. Return null if there
+ * is no IeditorPart. Method check if the leaf encapsulate an IEditorPart.
+ * Return it if true.
*
* @return The IEditorPart or null.
*/
@@ -110,8 +109,7 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
}
/**
- * Called when the active editor is changed.
- * Perform requested operations.
+ * Called when the active editor is changed. Perform requested operations.
*
* @param oldEditor
* @param newEditor
@@ -121,7 +119,9 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
return;
}
- // System.out.println(getClass().getSimpleName() + ".activeEditorChange('" + (newEditor != null ? newEditor.getPageTitle() : "null") + "')");
+ // System.out.println(getClass().getSimpleName() +
+ // ".activeEditorChange('" + (newEditor != null ?
+ // newEditor.getPageTitle() : "null") + "')");
activeEditor = newEditor;
@@ -137,15 +137,15 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
propagateSelectionChanged();
activateServices();
- //
+ //
if(newEditor != null)
newEditor.setFocus();
}
/**
* Change the current selection of the outermost editor (the main editor).
- * Send a {@link SelectionChangedEvent} event to the outerProvider. The event contains the current selection
- * of the new activeEditor.
+ * Send a {@link SelectionChangedEvent} event to the outerProvider. The
+ * event contains the current selection of the new activeEditor.
*
* @param editor
* The new activeEditor.
@@ -156,7 +156,8 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
IEditorPart editorPart = getActiveIEditorPart();
// Propagate the selection change event.
- // Get the selection of the new activeEditor and send an SelectionChangedEvent to the outerProvider (provider of the main
+ // Get the selection of the new activeEditor and send an
+ // SelectionChangedEvent to the outerProvider (provider of the main
// editor) with the selection.
if(editorPart != null) {
ISelectionProvider selectionProvider = editorPart.getSite().getSelectionProvider();
@@ -170,9 +171,8 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
provider.firePostSelectionChanged(event);
} else {
if(log.isLoggable(Level.WARNING)) {
- log.warning(this.getClass().getSimpleName()
- + " did not propogate selection for " //$NON-NLS-1$
- + editorPart.getTitle());
+ log.warning(this.getClass().getSimpleName() + " did not propogate selection for " //$NON-NLS-1$
+ + editorPart.getTitle());
}
}
}
@@ -180,8 +180,8 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
}
/**
- * Activates services of the active editor: site, keybinding
- * deactivate old active site.
+ * Activates services of the active editor: site, keybinding deactivate old
+ * active site.
*/
@SuppressWarnings({ "restriction", "deprecation" })
private void activateServices() {
@@ -191,11 +191,9 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
activeServiceLocator = null;
}
-
// Get the service
final IKeyBindingService service = getOuterEditorSite().getKeyBindingService();
-
final IEditorPart editor = getActiveIEditorPart();
if(editor != null) {
@@ -218,9 +216,9 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
}
/**
- * Deactivate services: old nested site if any and keybinding service if there is no active editor.
- * Deactivate the key binding service.
- * Deactivate it only if there is no editor selected.
+ * Deactivate services: old nested site if any and keybinding service if
+ * there is no active editor. Deactivate the key binding service. Deactivate
+ * it only if there is no editor selected.
*/
@SuppressWarnings({ "restriction", "deprecation" })
private void deactivateServices(boolean immediate) {
@@ -244,7 +242,8 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
}
/**
- * Send message to the ActionBarContributor, like this it can switch the active editor.
+ * Send message to the ActionBarContributor, like this it can switch the
+ * active editor.
*/
private void fireChangeEventToActionBarContributor() {
IEditorActionBarContributor contributor = getOuterEditorSite().getActionBarContributor();
@@ -268,5 +267,4 @@ public class ActiveEditorServicesSwitcher implements IActiveEditorChangedListene
return outerEditorSite;
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ActivePageTracker.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ActivePageTracker.java
index a0beaedfb1d..b8b11a93ae8 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ActivePageTracker.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ActivePageTracker.java
@@ -20,10 +20,10 @@ import java.util.logging.Logger;
import org.eclipse.papyrus.sasheditor.editor.IPageChangedListener;
import org.eclipse.papyrus.sasheditor.internal.ActivePageTracker.IActiveEditorChangedListener;
-
/**
- * Instance of this class track the active Page.
- * When the active Page change, the tracker receive an event on {@link #setActiveEditor(PagePart)}, and perform following tasks:
+ * Instance of this class track the active Page. When the active Page change,
+ * the tracker receive an event on {@link #setActiveEditor(PagePart)}, and
+ * perform following tasks:
* <ul>
* <li>- call {@link #fireEditorChangeEvent(PagePart, PagePart)}</li>
* <li>- fire events to all registered listeners.</li>
@@ -55,7 +55,8 @@ public class ActivePageTracker {
protected PagePart activeEditor;
/**
- * Interface that must be implemented by listeners on activeEditorChange event.
+ * Interface that must be implemented by listeners on activeEditorChange
+ * event.
*
* @author dumoulin
*
@@ -71,10 +72,9 @@ public class ActivePageTracker {
public void activeEditorChanged(PagePart oldEditor, PagePart newEditor);
}
-
/**
- * Constructor.
- * The activeEditor will be set by the first TabFolder that will call TabFolderPart.setPage().
+ * Constructor. The activeEditor will be set by the first TabFolder that
+ * will call TabFolderPart.setPage().
*
* @param multiPartEditor
*/
@@ -91,8 +91,8 @@ public class ActivePageTracker {
}
/**
- * Set the active editor with the specified editor.
- * This will notify all registered listeners
+ * Set the active editor with the specified editor. This will notify all
+ * registered listeners
*
* @param editor
*/
@@ -162,8 +162,8 @@ public class ActivePageTracker {
*/
private void fireEditorChangeEvent(PagePart oldEditor, PagePart newEditor) {
// Fire only if really change
-// if(oldEditor == newEditor)
-// return;
+ // if(oldEditor == newEditor)
+ // return;
// Fire events to internal listeners
for(IActiveEditorChangedListener listener : activeEditorChangedListeners) {
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ComponentPart.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ComponentPart.java
index 34840ca25f5..95ecc23a805 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ComponentPart.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ComponentPart.java
@@ -26,10 +26,8 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.internal.dnd.IDropTarget;
-
/**
- * This is a controler/part for an SWT Control. It is associated to a {@link IComponentModel}.
- * This Part encapsulate a SWT Control.
+ * This is a controler/part for an SWT Control. It is associated to a {@link IComponentModel}. This Part encapsulate a SWT Control.
*
* @author dumoulin
*
@@ -68,7 +66,7 @@ public class ComponentPart extends PagePart implements IComponentPage {
try {
// Initialize it and create its controls.
editorControl = createEditorPartControl(parent);
- // attachListeners(editorControl, true);
+ // attachListeners(editorControl, true);
} catch (PartInitException e) {
Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getLocalizedMessage()));
@@ -76,8 +74,7 @@ public class ComponentPart extends PagePart implements IComponentPage {
}
/**
- * Create the controls required by the editor.
- * Init the editor.
+ * Create the controls required by the editor. Init the editor.
*
* @param viewer
* @param editorInput
@@ -85,8 +82,7 @@ public class ComponentPart extends PagePart implements IComponentPage {
* @return
* @throws PartInitException
*/
- private Composite createEditorPartControl(Composite parentControl)
- throws PartInitException {
+ private Composite createEditorPartControl(Composite parentControl) throws PartInitException {
Composite editorParent = new Composite(parentControl, SWT.NONE);
editorParent.setLayout(new FillLayout());
partModel.createPartControl(editorParent);
@@ -99,15 +95,14 @@ public class ComponentPart extends PagePart implements IComponentPage {
*/
public void dispose() {
- // detachListeners(editorControl, true);
+ // detachListeners(editorControl, true);
// dispose the SWT root control
editorControl.dispose();
}
-
/**
- * As we are a final Tile, we should be the requested part.
- * Return this TilePart.
+ * As we are a final Tile, we should be the requested part. Return this
+ * TilePart.
*
* @param toFind
* @return
@@ -117,7 +112,8 @@ public class ComponentPart extends PagePart implements IComponentPage {
}
/**
- * Locates the part that intersects the given point and that have the expected type
+ * Locates the part that intersects the given point and that have the
+ * expected type
*
* @param toFind
* @return
@@ -129,10 +125,7 @@ public class ComponentPart extends PagePart implements IComponentPage {
// Not found !!
// The tile contains the position, but the type is not found.
- throw new UnsupportedOperationException("Tile match the expected position '"
- + toFind
- + "' but there is no Tile of requested type '"
- + expectedTileType.getClass().getName() + "'");
+ throw new UnsupportedOperationException("Tile match the expected position '" + toFind + "' but there is no Tile of requested type '" + expectedTileType.getClass().getName() + "'");
}
/**
@@ -156,10 +149,9 @@ public class ComponentPart extends PagePart implements IComponentPage {
return editorControl;
}
-
/**
- * This is a container method. Not necessary in Leaf Tile.
- * TODO: change the interface.
+ * This is a container method. Not necessary in Leaf Tile. TODO: change the
+ * interface.
*
* @param draggedObject
* @param sourcePart
@@ -170,11 +162,10 @@ public class ComponentPart extends PagePart implements IComponentPage {
return null;
}
-
/**
* Change the parent of the Tile. The parent is changed, and the control is
- * attached to the parent control. Change garbage state to {@link GarbageState.REPARENTED}.
- * Do not detach the Tile from its old parent.
+ * attached to the parent control. Change garbage state to {@link GarbageState.REPARENTED}. Do not detach the Tile from its old
+ * parent.
*
* @param newParent
* The tilePart that should be used as part parent.
@@ -198,22 +189,20 @@ public class ComponentPart extends PagePart implements IComponentPage {
}
}
-
/**
- * Asks this part to take focus within the workbench.
- * Set the focus on the active nested part if the part is a container.
+ * Asks this part to take focus within the workbench. Set the focus on the
+ * active nested part if the part is a container.
*/
public void setFocus() {
editorControl.setFocus();
}
-
/**
- * Synchronize the Part, and its children. PartMap contains a snapshot of the available part before
- * the synchronization. After synchronization, unreachable parts should be marked "orphaned" (= no
- * parent).
- * Do nothing in this implementation, as we are a final leaf, and there is nothing to synchronize
- * with the underlying model.
+ * Synchronize the Part, and its children. PartMap contains a snapshot of
+ * the available part before the synchronization. After synchronization,
+ * unreachable parts should be marked "orphaned" (= no parent). Do nothing
+ * in this implementation, as we are a final leaf, and there is nothing to
+ * synchronize with the underlying model.
*
* @param partMap
*/
@@ -221,11 +210,9 @@ public class ComponentPart extends PagePart implements IComponentPage {
}
-
/**
- * Garbage this part.
- * The part is already marked as ORPHANED. It is not used anymore. It is already detached
- * from its parent.
+ * Garbage this part. The part is already marked as ORPHANED. It is not used
+ * anymore. It is already detached from its parent.
*
*/
public void garbage() {
@@ -234,10 +221,9 @@ public class ComponentPart extends PagePart implements IComponentPage {
getSashWindowContainer().getLifeCycleEventProvider().firePageClosedEvent(this);
}
-
/**
- * Accept the provided visitor.
- * Call the corresponding accept method in the visitor.
+ * Accept the provided visitor. Call the corresponding accept method in the
+ * visitor.
*
* @param visitor
* @return
@@ -247,8 +233,7 @@ public class ComponentPart extends PagePart implements IComponentPage {
}
/**
- * Visit the children of this Tile.
- * There is no child, so do nothing.
+ * Visit the children of this Tile. There is no child, so do nothing.
*
* @param visitor
*/
@@ -256,20 +241,18 @@ public class ComponentPart extends PagePart implements IComponentPage {
return true;
}
-
/**
* Show item status.
*/
protected void showStatus() {
- // System.out.println( "EditorTile: "
- // + " disposed=" + editorControl.isDisposed()
- // + ", visible=" + editorControl.isVisible()
- // + ", garbState=" + garbageState
- // + ", '" + editorPart.getTitle()
- // + "', " + this);
-
- System.out.printf("ComponentPart: disposed=%-5b, visible=%-5b, garbState=%-10s, %s, %s\n"
- , editorControl.isDisposed(), (editorControl.isDisposed() ? false : editorControl.isVisible()), garbageState, getPageTitle(), this);
+ // System.out.println( "EditorTile: "
+ // + " disposed=" + editorControl.isDisposed()
+ // + ", visible=" + editorControl.isVisible()
+ // + ", garbState=" + garbageState
+ // + ", '" + editorPart.getTitle()
+ // + "', " + this);
+
+ System.out.printf("ComponentPart: disposed=%-5b, visible=%-5b, garbState=%-10s, %s, %s\n", editorControl.isDisposed(), (editorControl.isDisposed() ? false : editorControl.isVisible()), garbageState, getPageTitle(), this);
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/Copyright.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/Copyright.java
index 6b7685c1820..dad56534512 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/Copyright.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/Copyright.java
@@ -14,7 +14,6 @@
package org.eclipse.papyrus.sasheditor.internal;
-
/**
* @author dumoulin
*/
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/EditorPart.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/EditorPart.java
index f64503fa19a..918ad9c921b 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/EditorPart.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/EditorPart.java
@@ -22,6 +22,8 @@ import org.eclipse.jface.window.Window;
import org.eclipse.papyrus.sasheditor.Activator;
import org.eclipse.papyrus.sasheditor.contentprovider.IEditorModel;
import org.eclipse.papyrus.sasheditor.editor.IEditorPage;
+import org.eclipse.papyrus.sasheditor.editor.IMultiEditorManager;
+import org.eclipse.papyrus.sasheditor.editor.SashWindowsContainer;
import org.eclipse.papyrus.sasheditor.internal.eclipsecopy.MultiPageEditorSite;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
@@ -42,17 +44,17 @@ import org.eclipse.ui.internal.misc.StatusUtil;
import org.eclipse.ui.part.EditorActionBarContributor;
import org.eclipse.ui.part.IWorkbenchPartOrientation;
-
/**
- * This is a controler/part for an Editor. It is associated to a {@link IEditorModel}.
- * This Part encapsulate an Eclipse Editor implementing {@link IEditorPart}.
+ * This is a controler/part for an Editor. It is associated to a {@link IEditorModel}. This Part encapsulate an Eclipse Editor implementing
+ * {@link IEditorPart}.
*
* @author dumoulin
- * @author <a href="mailto:thomas.szadel@atosorigin.com">Thomas SZADEL</a> Improve the error text (avoid NPE)
+ * @author <a href="mailto:thomas.szadel@atosorigin.com">Thomas SZADEL</a>
+ * Improve the error text (avoid NPE)
*/
@SuppressWarnings("restriction")
public class EditorPart extends PagePart implements IEditorPage {
-
+
/**
* The model representing the editor.
*/
@@ -74,21 +76,21 @@ public class EditorPart extends PagePart implements IEditorPage {
private SashWindowsContainer tilesContainer;
/**
- * The manager used to access main editor properties like site, actionbars, ...
+ * The manager used to access main editor properties like site, actionbars,
+ * ...
*/
private IMultiEditorManager multiEditorManager;
/**
- * Parent owning this PagePart.
- * Can be null if the Part is orphaned. Even if it is orphaned, the Item still set.
+ * Parent owning this PagePart. Can be null if the Part is orphaned. Even if
+ * it is orphaned, the Item still set.
*/
- // protected TabFolderPart parent;
+ // protected TabFolderPart parent;
/**
- * Listen on mouse enter event.
- * Try to get an event indicating that the mouse enter over the editor.
- * This can be used to switch the active editor.
- * TODO This doesn't work yet.
+ * Listen on mouse enter event. Try to get an event indicating that the
+ * mouse enter over the editor. This can be used to switch the active
+ * editor. TODO This doesn't work yet.
*/
private Listener mouseEnterListener = new Listener() {
@@ -98,8 +100,10 @@ public class EditorPart extends PagePart implements IEditorPage {
* @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
*/
public void handleEvent(Event event) {
- // Point globalPos = new Point(event.x, event.y);
- // System.out.println(this.getClass().getSimpleName() + ".handleEvent(" + eventName(event.type) + ", " + globalPos + ")");
+ // Point globalPos = new Point(event.x, event.y);
+ // System.out.println(this.getClass().getSimpleName() +
+ // ".handleEvent(" + eventName(event.type) + ", " + globalPos +
+ // ")");
}
};
@@ -140,19 +144,17 @@ public class EditorPart extends PagePart implements IEditorPage {
this.multiEditorManager = multiEditorManager;
}
-
/**
- * Create the control of this part.
- * For a this implementations, also create the children's controls.
- * This method forward to {@link createPartControl(Composite)}.
+ * Create the control of this part. For a this implementations, also create
+ * the children's controls. This method forward to {@link
+ * createPartControl(Composite)}.
*
* @param parent
* TODO remove ?
*/
- // public void createControl(Composite parent) {
- // createPartControl(parent);
- // }
-
+ // public void createControl(Composite parent) {
+ // createPartControl(parent);
+ // }
/**
* Create the control of this Part, and children's controls.
@@ -171,14 +173,14 @@ public class EditorPart extends PagePart implements IEditorPage {
} catch (PartInitException e) {
Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getLocalizedMessage(), e));
// TODO Create a fake Error Page and initialize this part with.
- // editorPart = new ErrorEditorPart();
- // editorControl = createEditorPartControl(parent, editorPart);
-// editorControl = createErrorPartControl(parent, e);
+ // editorPart = new ErrorEditorPart();
+ // editorControl = createEditorPartControl(parent, editorPart);
+ // editorControl = createErrorPartControl(parent, e);
createErrorEditorPart(parent, e);
} catch (Exception e) {
Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getLocalizedMessage(), e));
// TODO Create a fake Error Page and initialize this part with.
-// editorControl = createErrorPartControl(parent, e);
+ // editorControl = createErrorPartControl(parent, e);
createErrorEditorPart(parent, e);
}
}
@@ -210,14 +212,15 @@ public class EditorPart extends PagePart implements IEditorPage {
}
/**
- * Create an EditorPart showing the Exception.
- * This is used when the creation of the regular IEditorPart failed.
+ * Create an EditorPart showing the Exception. This is used when the
+ * creation of the regular IEditorPart failed.
+ *
* @param e
*/
private void createErrorEditorPart(Composite parent, Exception e) {
-
+
try {
- PartInitException partInitException = new PartInitException( StatusUtil.getLocalizedMessage(e), StatusUtil.getCause(e));
+ PartInitException partInitException = new PartInitException(StatusUtil.getLocalizedMessage(e), StatusUtil.getCause(e));
editorPart = new ErrorEditorPart(partInitException.getStatus());
// Initialize it and create its controls.
editorControl = createEditorPartControl(parent, editorPart);
@@ -231,7 +234,7 @@ public class EditorPart extends PagePart implements IEditorPage {
}
}
-
+
/**
* Create the editor associated to this TabPart.
*
@@ -244,8 +247,7 @@ public class EditorPart extends PagePart implements IEditorPage {
}
/**
- * Create the controls required by the editor.
- * Init the editor.
+ * Create the controls required by the editor. Init the editor.
*
* @param viewer
* @param editorInput
@@ -269,7 +271,7 @@ public class EditorPart extends PagePart implements IEditorPage {
});
// TODO test to be removed
- // attachListeners(editorParent, false);
+ // attachListeners(editorParent, false);
return editorParent;
}
@@ -278,61 +280,61 @@ public class EditorPart extends PagePart implements IEditorPage {
*/
private void attachListeners(Control theControl, boolean recursive) {
- // All following methods listen to the same event.
+ // All following methods listen to the same event.
// So use only one of them
- // theControl.addListener(SWT.MouseEnter, mouseEnterListener);
- //
- // theControl.addListener(SWT.FocusIn, mouseEnterListener);
- // theControl.addListener(SWT.MouseMove, mouseEnterListener);
- // theControl.addListener(SWT.MouseHover, mouseEnterListener);
- // theControl.addListener(SWT.MouseUp, mouseEnterListener);
- // theControl.addListener(SWT.MouseDown, mouseEnterListener);
+ // theControl.addListener(SWT.MouseEnter, mouseEnterListener);
+ //
+ // theControl.addListener(SWT.FocusIn, mouseEnterListener);
+ // theControl.addListener(SWT.MouseMove, mouseEnterListener);
+ // theControl.addListener(SWT.MouseHover, mouseEnterListener);
+ // theControl.addListener(SWT.MouseUp, mouseEnterListener);
+ // theControl.addListener(SWT.MouseDown, mouseEnterListener);
theControl.addListener(SWT.Activate, mouseEnterListener);
- // if (recursive && theControl instanceof Composite) {
- // Composite composite = (Composite) theControl;
- // Control[] children = composite.getChildren();
+ // if (recursive && theControl instanceof Composite) {
+ // Composite composite = (Composite) theControl;
+ // Control[] children = composite.getChildren();
//
- // for (int i = 0; i < children.length; i++) {
- // Control control = children[i];
+ // for (int i = 0; i < children.length; i++) {
+ // Control control = children[i];
//
- // attachListeners(control, true);
- // }
- // }
+ // attachListeners(control, true);
+ // }
+ // }
}
/**
* Detach SWT listeners
*/
private void detachListeners(Control theControl, boolean recursive) {
- // theControl.removeListener(SWT.MouseEnter, mouseEnterListener);
- // theControl.removeListener(SWT.FocusIn, mouseEnterListener);
- // theControl.removeListener(SWT.MouseMove, mouseEnterListener);
- // theControl.removeListener(SWT.MouseHover, mouseEnterListener);
- // theControl.removeListener(SWT.MouseUp, mouseEnterListener);
- // theControl.removeListener(SWT.MouseDown, mouseEnterListener);
+ // theControl.removeListener(SWT.MouseEnter, mouseEnterListener);
+ // theControl.removeListener(SWT.FocusIn, mouseEnterListener);
+ // theControl.removeListener(SWT.MouseMove, mouseEnterListener);
+ // theControl.removeListener(SWT.MouseHover, mouseEnterListener);
+ // theControl.removeListener(SWT.MouseUp, mouseEnterListener);
+ // theControl.removeListener(SWT.MouseDown, mouseEnterListener);
theControl.removeListener(SWT.Activate, mouseEnterListener);
- // if (recursive && theControl instanceof Composite) {
- // Composite composite = (Composite) theControl;
- // Control[] children = composite.getChildren();
+ // if (recursive && theControl instanceof Composite) {
+ // Composite composite = (Composite) theControl;
+ // Control[] children = composite.getChildren();
//
- // for (int i = 0; i < children.length; i++) {
- // Control control = children[i];
+ // for (int i = 0; i < children.length; i++) {
+ // Control control = children[i];
//
- // detachListeners(control, false);
- // }
- // }
+ // detachListeners(control, false);
+ // }
+ // }
}
-
/**
- * Handles a property change notification from a nested editor. The default implementation simply forwards
- * the change to listeners on this multi-page editor by calling <code>firePropertyChange</code> with the same property id. For example, if the
- * dirty state of a nested
- * editor changes (property id <code>IEditorPart.PROP_DIRTY</code>), this method handles it
- * by firing a property change event for <code>IEditorPart.PROP_DIRTY</code> to property listeners on this
- * multi-page editor.
+ * Handles a property change notification from a nested editor. The default
+ * implementation simply forwards the change to listeners on this multi-page
+ * editor by calling <code>firePropertyChange</code> with the same property
+ * id. For example, if the dirty state of a nested editor changes (property
+ * id <code>IEditorPart.PROP_DIRTY</code>), this method handles it by firing
+ * a property change event for <code>IEditorPart.PROP_DIRTY</code> to
+ * property listeners on this multi-page editor.
* <p>
* Subclasses may extend or reimplement this method.
* </p>
@@ -345,9 +347,9 @@ public class EditorPart extends PagePart implements IEditorPage {
}
/**
- * Creates the site for the given nested editor. The <code>MultiPageEditorPart</code> implementation
- * of this method creates an instance of <code>MultiPageEditorSite</code>. Subclasses may
- * reimplement to create more specialized sites.
+ * Creates the site for the given nested editor. The <code>MultiPageEditorPart</code> implementation of this method creates an
+ * instance of <code>MultiPageEditorSite</code>. Subclasses may reimplement
+ * to create more specialized sites.
*
* @param editor
* the nested editor
@@ -359,8 +361,8 @@ public class EditorPart extends PagePart implements IEditorPage {
}
/**
- * Create the EditorActionBarContributor requested by the editor.
- * Creation is done by delegating to the IMultiEditorNestedPartManager.
+ * Create the EditorActionBarContributor requested by the editor. Creation
+ * is done by delegating to the IMultiEditorNestedPartManager.
*
* @return
*/
@@ -394,7 +396,6 @@ public class EditorPart extends PagePart implements IEditorPage {
return multiEditorManager;
}
-
/**
* @param isRecursive
*/
@@ -407,10 +408,9 @@ public class EditorPart extends PagePart implements IEditorPage {
editorPart.dispose();
}
-
/**
- * As we are a final Tile, we should be the requested part.
- * Return this TilePart.
+ * As we are a final Tile, we should be the requested part. Return this
+ * TilePart.
*
* @param toFind
* @return
@@ -420,7 +420,8 @@ public class EditorPart extends PagePart implements IEditorPage {
}
/**
- * Locates the part that intersects the given point and that have the expected type
+ * Locates the part that intersects the given point and that have the
+ * expected type
*
* @param toFind
* @return
@@ -472,10 +473,9 @@ public class EditorPart extends PagePart implements IEditorPage {
return editorControl;
}
-
/**
- * This is a container method. Not necessary in Leaf Tile.
- * TODO: change the interface.
+ * This is a container method. Not necessary in Leaf Tile. TODO: change the
+ * interface.
*
* @param draggedObject
* @param sourcePart
@@ -486,7 +486,6 @@ public class EditorPart extends PagePart implements IEditorPage {
return null;
}
-
/**
* @return
*/
@@ -495,10 +494,9 @@ public class EditorPart extends PagePart implements IEditorPage {
return garbageState;
}
-
/**
- * Is the associated editor dirty ?
- * Delegate to {@link IEditorPart.isDirty()}
+ * Is the associated editor dirty ? Delegate to {@link
+ * IEditorPart.isDirty()}
*
* @return true if the associated editor is dirty.
*
@@ -508,12 +506,10 @@ public class EditorPart extends PagePart implements IEditorPage {
return editorPart.isDirty();
}
-
-
/**
* Change the parent of the Tile. The parent is changed, and the control is
- * attached to the parent control. Change garbage state to {@link GarbageState.REPARENTED}.
- * Do not detach the Tile from its old parent.
+ * attached to the parent control. Change garbage state to {@link GarbageState.REPARENTED}. Do not detach the Tile from its old
+ * parent.
*
* @param newParent
* The tilePart that should be used as part parent.
@@ -539,23 +535,21 @@ public class EditorPart extends PagePart implements IEditorPage {
}
-
/**
- * Asks this part to take focus within the workbench.
- * Set the focus on the active nested part if the part is a container.
+ * Asks this part to take focus within the workbench. Set the focus on the
+ * active nested part if the part is a container.
*/
@Override
public void setFocus() {
editorPart.setFocus();
}
-
/**
- * Synchronize the Part, and its children. PartMap contains a snapshot of the available part before
- * the synchronization. After synchronization, unreachable parts should be marked "orphaned" (= no
- * parent).
- * Do nothing in this implementation, as we are a final leaf, and there is nothing to synchronize
- * with the underlying model.
+ * Synchronize the Part, and its children. PartMap contains a snapshot of
+ * the available part before the synchronization. After synchronization,
+ * unreachable parts should be marked "orphaned" (= no parent). Do nothing
+ * in this implementation, as we are a final leaf, and there is nothing to
+ * synchronize with the underlying model.
*
* @param partMap
*/
@@ -563,12 +557,10 @@ public class EditorPart extends PagePart implements IEditorPage {
}
-
/**
- * Garbage this part.
- * This part will be not used anymore.
- * The part is already marked as ORPHANED. It is not used anymore. It is already detached
- * from its parent.
+ * Garbage this part. This part will be not used anymore. The part is
+ * already marked as ORPHANED. It is not used anymore. It is already
+ * detached from its parent.
*
*/
@Override
@@ -578,10 +570,9 @@ public class EditorPart extends PagePart implements IEditorPage {
getSashWindowContainer().getLifeCycleEventProvider().firePageClosedEvent(this);
}
-
/**
- * Accept the provided visitor.
- * Call the corresponding accept method in the visitor.
+ * Accept the provided visitor. Call the corresponding accept method in the
+ * visitor.
*
* @param visitor
* @return
@@ -592,8 +583,7 @@ public class EditorPart extends PagePart implements IEditorPage {
}
/**
- * Visit the children of this Tile.
- * There is no child, so do nothing.
+ * Visit the children of this Tile. There is no child, so do nothing.
*
* @param visitor
*/
@@ -601,17 +591,16 @@ public class EditorPart extends PagePart implements IEditorPage {
return true;
}
-
/**
* Show item status.
*/
protected void showStatus() {
- // System.out.println( "EditorTile: "
- // + " disposed=" + editorControl.isDisposed()
- // + ", visible=" + editorControl.isVisible()
- // + ", garbState=" + garbageState
- // + ", '" + editorPart.getTitle()
- // + "', " + this);
+ // System.out.println( "EditorTile: "
+ // + " disposed=" + editorControl.isDisposed()
+ // + ", visible=" + editorControl.isVisible()
+ // + ", garbState=" + garbageState
+ // + ", '" + editorPart.getTitle()
+ // + "', " + this);
String title = (editorPart != null ? editorPart.getTitle() : "no editorPart");
System.out.printf("EditorTile: disposed=%-5b, visible=%-5b, garbState=%-10s, %s, %s\n", editorControl.isDisposed(), (editorControl.isDisposed() ? false : editorControl.isVisible()), garbageState, title, this);
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/IPanelParent.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/IPanelParent.java
index accadf0e16f..d3c02a1f8d6 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/IPanelParent.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/IPanelParent.java
@@ -13,11 +13,14 @@
*****************************************************************************/
package org.eclipse.papyrus.sasheditor.internal;
+import org.eclipse.papyrus.sasheditor.editor.SashWindowsContainer;
import org.eclipse.swt.widgets.Composite;
/**
- * Interface implemented by Part that can be parent of a Panel (Sashes or Folders). The interface allows to restrict the classes that can be parent of
- * a Panel. For now, only {@link RootPart} and {@link SashPanelPart} can be parent of a Panel.
+ * Interface implemented by Part that can be parent of a Panel (Sashes or
+ * Folders). The interface allows to restrict the classes that can be parent of
+ * a Panel. For now, only {@link RootPart} and {@link SashPanelPart} can be
+ * parent of a Panel.
*
* @author dumoulin
*/
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/IPartVisitor.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/IPartVisitor.java
index e9e8dfdd2a9..538851f11ea 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/IPartVisitor.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/IPartVisitor.java
@@ -13,10 +13,9 @@
*****************************************************************************/
package org.eclipse.papyrus.sasheditor.internal;
-
/**
- * Visitor used to visit the hierarchy of Parts.
- * Visit can be stopped by returning false from the visit() method.
+ * Visitor used to visit the hierarchy of Parts. Visit can be stopped by
+ * returning false from the visit() method.
*
* @author dumoulin
*
@@ -27,7 +26,8 @@ public interface IPartVisitor {
* Accept the node of specified type.
*
* @param folder
- * @return true if the visit should continue, false if the visit should be stopped.
+ * @return true if the visit should continue, false if the visit should be
+ * stopped.
*/
public boolean accept(RootPart tile);
@@ -36,7 +36,8 @@ public interface IPartVisitor {
* Accept the node of specified type.
*
* @param folder
- * @return true if the visit should continue, false if the visit should be stopped.
+ * @return true if the visit should continue, false if the visit should be
+ * stopped.
*/
public boolean accept(SashPanelPart tile);
@@ -44,7 +45,8 @@ public interface IPartVisitor {
* Accept the node of specified type.
*
* @param folder
- * @return true if the visit should continue, false if the visit should be stopped.
+ * @return true if the visit should continue, false if the visit should be
+ * stopped.
*/
public boolean accept(TabFolderPart folder);
@@ -52,7 +54,8 @@ public interface IPartVisitor {
* Accept the node of specified type.
*
* @param folder
- * @return true if the visit should continue, false if the visit should be stopped.
+ * @return true if the visit should continue, false if the visit should be
+ * stopped.
*/
public boolean accept(TabItemPart tile);
@@ -60,7 +63,8 @@ public interface IPartVisitor {
* Accept the node of specified type.
*
* @param folder
- * @return true if the visit should continue, false if the visit should be stopped.
+ * @return true if the visit should continue, false if the visit should be
+ * stopped.
*/
public boolean accept(EditorPart tile);
@@ -68,9 +72,9 @@ public interface IPartVisitor {
* Accept the node of specified type.
*
* @param componentPart
- * @return true if the visit should continue, false if the visit should be stopped.
+ * @return true if the visit should continue, false if the visit should be
+ * stopped.
*/
public boolean accept(ComponentPart componentPart);
-
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/LookupFolderPartByRawModelVisitor.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/LookupFolderPartByRawModelVisitor.java
index 5b583190419..4f2a6960c69 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/LookupFolderPartByRawModelVisitor.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/LookupFolderPartByRawModelVisitor.java
@@ -3,8 +3,6 @@
*/
package org.eclipse.papyrus.sasheditor.internal;
-
-
/**
* A visitor used to lookup a {@link TabFolderPart} by its raw model.
*
@@ -17,7 +15,6 @@ public class LookupFolderPartByRawModelVisitor extends PartVisitor {
private TabFolderPart result;
-
public LookupFolderPartByRawModelVisitor(Object rawModel) {
this.rawModel = rawModel;
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/LookupIPageByIEditorPartVisitor.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/LookupIPageByIEditorPartVisitor.java
index 3a34b107215..a5f2e1171bf 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/LookupIPageByIEditorPartVisitor.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/LookupIPageByIEditorPartVisitor.java
@@ -6,7 +6,6 @@ package org.eclipse.papyrus.sasheditor.internal;
import org.eclipse.papyrus.sasheditor.editor.IPage;
import org.eclipse.ui.IEditorPart;
-
/**
* A visitor used to lookup a PagePart by its IEditorPart.
*
@@ -19,7 +18,6 @@ public class LookupIPageByIEditorPartVisitor extends PartVisitor {
private IPage result;
-
public LookupIPageByIEditorPartVisitor(IEditorPart editorPart) {
this.editorPart = editorPart;
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/LookupModelPageVisitor.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/LookupModelPageVisitor.java
index b4079d09eb6..f78a8456981 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/LookupModelPageVisitor.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/LookupModelPageVisitor.java
@@ -5,7 +5,6 @@ package org.eclipse.papyrus.sasheditor.internal;
import org.eclipse.papyrus.sasheditor.editor.IPage;
-
/**
* A visitor used to lookup a PagePart from its raw model.
*
@@ -18,7 +17,6 @@ public class LookupModelPageVisitor extends PartVisitor {
private IPage result;
-
public LookupModelPageVisitor(Object rawModel) {
this.rawModel = rawModel;
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/NotFoundException.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/NotFoundException.java
index bc9d33a711f..e24e901069d 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/NotFoundException.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/NotFoundException.java
@@ -13,7 +13,6 @@
*****************************************************************************/
package org.eclipse.papyrus.sasheditor.internal;
-
/**
* Exception thrown when a search or lookup fails.
*
@@ -21,7 +20,6 @@ package org.eclipse.papyrus.sasheditor.internal;
*/
public class NotFoundException extends SashWindowsException {
-
/**
*
*/
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PTabFolder.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PTabFolder.java
index ef03d2729ad..1c28a352ad6 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PTabFolder.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PTabFolder.java
@@ -38,8 +38,7 @@ import org.eclipse.ui.internal.dnd.DragUtil;
import org.eclipse.ui.presentations.PresentationUtil;
/**
- * Papyrus wrapper for CTabFolder.
- * Provides miscelaneous methods for dragging.
+ * Papyrus wrapper for CTabFolder. Provides miscelaneous methods for dragging.
* Provides different fireEvents for: menu detected, pageChange, itemClosed.
* TODO : add listeners mechanism to listen on events ?
*/
@@ -65,8 +64,8 @@ public class PTabFolder {
};
/**
- * Listener on control activated event.
- * This event is used to set the tab as the active page.
+ * Listener on control activated event. This event is used to set the tab as
+ * the active page.
*/
private Listener activateListener = new Listener() {
@@ -77,14 +76,13 @@ public class PTabFolder {
};
/**
- * Listen on menu detect.
- * The event is forwarded.
- * TODO [20100417] deprecated ?
+ * Listen on menu detect. The event is forwarded. TODO [20100417] deprecated
+ * ?
*/
private MenuDetectListener menuDetectListener = new MenuDetectListener() {
public void menuDetected(MenuDetectEvent e) {
- // Point globalPos = ((Control) e.widget).toDisplay(e.x, e.y);
+ // Point globalPos = ((Control) e.widget).toDisplay(e.x, e.y);
Point globalPos = new Point(e.x, e.y);
handleMenuDetect(globalPos, e);
}
@@ -109,11 +107,12 @@ public class PTabFolder {
}
/**
- * Creates an empty container. Creates a CTabFolder with no style bits set, and hooks a selection listener which calls <code>pageChange()</code>
- * whenever the selected tab changes.
+ * Creates an empty container. Creates a CTabFolder with no style bits set,
+ * and hooks a selection listener which calls <code>pageChange()</code> whenever the selected tab changes.
*
* @param parent
- * The composite in which the container tab folder should be created; must not be <code>null</code>.
+ * The composite in which the container tab folder should be
+ * created; must not be <code>null</code>.
* @return a new container
*/
private CTabFolder createContainer(Composite parent) {
@@ -159,7 +158,8 @@ public class PTabFolder {
}
/**
- * Copied from org.eclipse.ui.internal.presentations.util.AbstractTabFolder.attachListeners(Control, boolean)
+ * Copied from org.eclipse.ui.internal.presentations.util.AbstractTabFolder.
+ * attachListeners(Control, boolean)
*/
protected void attachListeners(CTabFolder theControl, boolean recursive) {
@@ -173,20 +173,21 @@ public class PTabFolder {
}
/**
- * Copied from org.eclipse.ui.internal.presentations.util.AbstractTabFolder.detachListeners(Control, boolean)
+ * Copied from org.eclipse.ui.internal.presentations.util.AbstractTabFolder.
+ * detachListeners(Control, boolean)
*/
private void detachListeners(Control theControl) {
theControl.removeMenuDetectListener(menuDetectListener);
//
PresentationUtil.removeDragListener(theControl, dragListener);
// theControl.removeDragDetectListener(dragDetectListener);
- // theControl.removeListener(SWT.MouseUp, mouseUpListener);
+ // theControl.removeListener(SWT.MouseUp, mouseUpListener);
theControl.removeListener(SWT.Activate, activateListener);
}
/**
- * The context menu event has been fired, handle it.
- * Actually, it is forwarded to the {@link EventsManager}.
+ * The context menu event has been fired, handle it. Actually, it is
+ * forwarded to the {@link EventsManager}.
*
* @param displayPos
* @param e
@@ -198,8 +199,9 @@ public class PTabFolder {
}
/**
- * Called when drag start. From here, DragUtil.performDrag() is called, which start the
- * dragging process. DragUtil.performDrag() will contains the tabFolder or the dragged tab.
+ * Called when drag start. From here, DragUtil.performDrag() is called,
+ * which start the dragging process. DragUtil.performDrag() will contains
+ * the tabFolder or the dragged tab.
*/
protected void handleDragStarted(Point displayPos, Event e) {
@@ -215,28 +217,27 @@ public class PTabFolder {
}
/**
- * Handle menu detect.
- * TODO Connect menu staff here.
+ * Handle menu detect. TODO Connect menu staff here.
*
* @param displayPos
* @param e
*/
private void handleMenuDetect(Point displayPos, MenuDetectEvent e) {
- // if(isOnBorder(displayPos)) {
- // return;
- // }
+ // if(isOnBorder(displayPos)) {
+ // return;
+ // }
CTabItem tab = getItem(displayPos);
listenersManager.fireMenuDetectEvent(tab, e);
}
/**
- * Handle folder reselected.
- * A folder is reselected by clicking on the active tabs, on the page or on the empty tabs area.
- * In each case a PageChangeEvent is fired.
- * When mouse click happen on the empty area, or on the page, the last selected tabs is used.
- * Used to switch the Active tab when user click on already opened tabs.
+ * Handle folder reselected. A folder is reselected by clicking on the
+ * active tabs, on the page or on the empty tabs area. In each case a
+ * PageChangeEvent is fired. When mouse click happen on the empty area, or
+ * on the page, the last selected tabs is used. Used to switch the Active
+ * tab when user click on already opened tabs.
*
* @param displayPos
* @param e
@@ -254,8 +255,9 @@ public class PTabFolder {
}
/**
- * Returns true iff the given point is on the border of the folder. By default, double-clicking,
- * context menus, and drag/drop are disabled on the folder's border.
+ * Returns true iff the given point is on the border of the folder. By
+ * default, double-clicking, context menus, and drag/drop are disabled on
+ * the folder's border.
*
* @param toTest
* a point (display coordinates)
@@ -302,16 +304,17 @@ public class PTabFolder {
}
/**
- * Get the rectangle bounding the item, in the parent coordinates. Utility method. Can be moved somewhere else.
+ * Get the rectangle bounding the item, in the parent coordinates. Utility
+ * method. Can be moved somewhere else.
*/
public Rectangle getItemBounds(CTabItem item) {
return Geometry.toDisplay(item.getParent(), item.getBounds());
}
/**
- * Fire a page closed event. This event is fired when the close item is pressed. The item is not closed yet. By default, the item is closed after
- * the event. The item is not closed if event.doit is
- * set to false.
+ * Fire a page closed event. This event is fired when the close item is
+ * pressed. The item is not closed yet. By default, the item is closed after
+ * the event. The item is not closed if event.doit is set to false.
*
*/
protected void fireItemClosed(CTabFolderEvent event, int pageIndex) {
@@ -353,7 +356,8 @@ public class PTabFolder {
* Get the index of the draggedObject
*
* @param draggedObject
- * draggedObject should be of type CTabFolder or CTabItem (as provided by handleDragStarted())
+ * draggedObject should be of type CTabFolder or CTabItem (as
+ * provided by handleDragStarted())
*/
static public int getDraggedObjectTabIndex(Object draggedObject) {
if(draggedObject instanceof CTabItem) {
@@ -385,8 +389,7 @@ public class PTabFolder {
}
/**
- * Get the event manager.
- * The event manager can be used to listen to events.
+ * Get the event manager. The event manager can be used to listen to events.
*
* @return
*/
@@ -417,8 +420,7 @@ public class PTabFolder {
}
/**
- * Internal implementations.
- * Implements a list of listeners.
+ * Internal implementations. Implements a list of listeners.
*
* @author dumoulin
*
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PagePart.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PagePart.java
index bb992b09c57..9de1c0941e6 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PagePart.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PagePart.java
@@ -23,19 +23,22 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
/**
- * This class represent a leaf part that is a part containing an editor or a component.
+ * This class represent a leaf part that is a part containing an editor or a
+ * component.
*
* @author dumoulin
*/
public abstract class PagePart extends AbstractPart implements IPage {
- /** Raw model associated to this part. We store it because the PartModel do not provide it */
+ /**
+ * Raw model associated to this part. We store it because the PartModel do
+ * not provide it
+ */
protected Object rawModel;
/** Parent part of this Part */
protected TabFolderPart parent;
-
/**
* Constructor.
*
@@ -47,18 +50,18 @@ public abstract class PagePart extends AbstractPart implements IPage {
this.rawModel = rawModel;
}
-
/**
* @return the parent
*/
- protected TabFolderPart getParent() {
+ public TabFolderPart getParent() {
return parent;
}
/**
- * Orphan this node. The parent is set to null, but control is left unchanged.
- * The node can be reattached with reparent(). Change garbage state to {@link GarbageState.ORPHANED}.
- * This method as no effect if the Page has already been reparented.
+ * Orphan this node. The parent is set to null, but control is left
+ * unchanged. The node can be reattached with reparent(). Change garbage
+ * state to {@link GarbageState.ORPHANED}. This method as no effect if the
+ * Page has already been reparented.
*
* @see
* @return the parent
@@ -72,8 +75,7 @@ public abstract class PagePart extends AbstractPart implements IPage {
}
/**
- * Mark this Page as UNCHANGED.
- * The PAge should be in the COLLECTED state.
+ * Mark this Page as UNCHANGED. The PAge should be in the COLLECTED state.
*
* @see
* @return the parent
@@ -98,8 +100,8 @@ public abstract class PagePart extends AbstractPart implements IPage {
abstract boolean visit(IPartVisitor visitor);
/**
- * Locates the part that intersects the given point and that have the expected type.
- * For a leaf, return the leaf if it is of the expected type.
+ * Locates the part that intersects the given point and that have the
+ * expected type. For a leaf, return the leaf if it is of the expected type.
*
* @param position
* @param expectedTileType
@@ -128,16 +130,16 @@ public abstract class PagePart extends AbstractPart implements IPage {
abstract public Control getControl();
/**
- * reparent this Part with the specified new parent.
- * The part is marked as reparented.
+ * reparent this Part with the specified new parent. The part is marked as
+ * reparented.
*
* @param parent
*/
abstract public void reparent(TabFolderPart parent);
/**
- * Add the tree of parts starting from this part.
- * As we are a leaf, add itself only.
+ * Add the tree of parts starting from this part. As we are a leaf, add
+ * itself only.
*
* @param partMap
*/
@@ -156,9 +158,8 @@ public abstract class PagePart extends AbstractPart implements IPage {
}
/**
- * Return a title for this part. This title can be used by parent to be shown
- * in tabs ...
- * To be implemented by subclasses.
+ * Return a title for this part. This title can be used by parent to be
+ * shown in tabs ... To be implemented by subclasses.
*
* @return The title or null.
*/
@@ -168,8 +169,7 @@ public abstract class PagePart extends AbstractPart implements IPage {
/**
* Return a icon for this part. This title can be used by parent to be shown
- * in tabs ...
- * To be implemented by subclasses.
+ * in tabs ... To be implemented by subclasses.
*
* @return The icon or null.
*/
@@ -183,9 +183,10 @@ public abstract class PagePart extends AbstractPart implements IPage {
public void refreshTab() {
getParent().refreshPageTab(this);
}
+
/**
- * Set focus on the SWT control associated to this PagePart.
- * Used by the ActivePageTracker.
+ * Set focus on the SWT control associated to this PagePart. Used by the
+ * ActivePageTracker.
*/
abstract public void setFocus();
@@ -195,8 +196,8 @@ public abstract class PagePart extends AbstractPart implements IPage {
abstract public void garbage();
/**
- * Return true if the part is associated to the specified rawModel.
- * Return false otherwise.
+ * Return true if the part is associated to the specified rawModel. Return
+ * false otherwise.
*
* @param realModel
* @return
@@ -205,5 +206,4 @@ public abstract class PagePart extends AbstractPart implements IPage {
return this.rawModel == realModel;
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PageVisitorWrapper.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PageVisitorWrapper.java
index dd9ca4c8ba8..0a900678b5d 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PageVisitorWrapper.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PageVisitorWrapper.java
@@ -6,7 +6,6 @@ package org.eclipse.papyrus.sasheditor.internal;
import org.eclipse.papyrus.sasheditor.editor.IEditorPage;
import org.eclipse.papyrus.sasheditor.editor.IPageVisitor;
-
/**
* A wrapper used to let the provided public visitor use the internal visitor to
* visit {@link ComponentPart} and {@link EditorPart}.
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PartLists.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PartLists.java
index d93ae6d2494..0c33340a245 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PartLists.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PartLists.java
@@ -16,12 +16,12 @@ package org.eclipse.papyrus.sasheditor.internal;
import java.util.ArrayList;
import java.util.List;
-
/**
- * This class contains lists of parts, regardless of the part parents.
- * There are two lists: one for the pane Parts and one for the Page Parts (leafs).
- * This class is used when refreshing the SashContainer: a new instance is created
- * and filled with existing parts. Then the list is carried in each pane refresh method.
+ * This class contains lists of parts, regardless of the part parents. There are
+ * two lists: one for the pane Parts and one for the Page Parts (leafs). This
+ * class is used when refreshing the SashContainer: a new instance is created
+ * and filled with existing parts. Then the list is carried in each pane refresh
+ * method.
*
* @author cedric dumoulin
*/
@@ -35,8 +35,8 @@ public class PartLists {
private List<PagePart> createdPages /* = new ArrayList<PagePart>() */;
/**
- * Search for a Part associated to the specified newModel.
- * Return the part or null if none is found.
+ * Search for a Part associated to the specified newModel. Return the part
+ * or null if none is found.
*
* @param rawModel
* @return
@@ -51,8 +51,8 @@ public class PartLists {
}
/**
- * Find the pane part for the specified rawModel.
- * Return the found part or null
+ * Find the pane part for the specified rawModel. Return the found part or
+ * null
*
* @param rawModel
* The raw model for which a part is lookup.
@@ -110,7 +110,7 @@ public class PartLists {
* @return a valid active page, or null if none exists.
*/
public PagePart getFirstValidPage() {
-
+
for(PagePart part : pageParts) {
if(!part.isOrphaned())
return part;
@@ -138,8 +138,8 @@ public class PartLists {
}
/**
- * Add a PagePart to the list of created Page.
- * This is called from the TabFolder when a new page is created.
+ * Add a PagePart to the list of created Page. This is called from the
+ * TabFolder when a new page is created.
*
* @param modelPart
*/
@@ -152,5 +152,4 @@ public class PartLists {
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PartVisitor.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PartVisitor.java
index 9ca6cdb9205..968520e4264 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PartVisitor.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/PartVisitor.java
@@ -13,7 +13,6 @@
*****************************************************************************/
package org.eclipse.papyrus.sasheditor.internal;
-
/**
* Visitor implementation allowing to visit the hierarchy of Parts.
*
@@ -29,7 +28,6 @@ public class PartVisitor implements IPartVisitor {
*/
public boolean accept(TabFolderPart part) {
-
if(acceptTabFolderPart(part)) {
// Visit the children
return part.visitChildren(this);
@@ -110,7 +108,6 @@ public class PartVisitor implements IPartVisitor {
return false;
}
-
// ----------------------------------------------
/**
@@ -167,5 +164,4 @@ public class PartVisitor implements IPartVisitor {
return true;
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/RootPart.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/RootPart.java
index e495147a7d1..b984cbf5c71 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/RootPart.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/RootPart.java
@@ -17,20 +17,22 @@ import org.eclipse.papyrus.sasheditor.contentprovider.IAbstractPanelModel;
import org.eclipse.papyrus.sasheditor.contentprovider.ISashPanelModel;
import org.eclipse.papyrus.sasheditor.contentprovider.ISashWindowsContentProvider;
import org.eclipse.papyrus.sasheditor.contentprovider.ITabFolderModel;
+import org.eclipse.papyrus.sasheditor.editor.SashWindowsContainer;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
/**
- * Part used as root. This is the one with no parent and no model. This class is intended for local
- * use only.
+ * Part used as root. This is the one with no parent and no model. This class is
+ * intended for local use only.
*
* @author dumoulin
*
* @param T
- * Common ancestor for the model provided for the sash windows by the application.
- * This is the type used externally by the application. Sash implementation don't use this type,
- * it just carry it to ask for the appropriate wrapper. Concrete implementation can specify
- * a type.
+ * Common ancestor for the model provided for the sash windows by the
+ * application. This is the type used externally by the application.
+ * Sash implementation don't use this type, it just carry it to ask
+ * for the appropriate wrapper. Concrete implementation can specify a
+ * type.
*/
@SuppressWarnings("restriction")
public class RootPart extends AbstractPart implements IPanelParent {
@@ -43,7 +45,10 @@ public class RootPart extends AbstractPart implements IPanelParent {
*/
private AbstractPanelPart child;
- /** Raw model associated to this part. We store it because the PartModel do not provide it */
+ /**
+ * Raw model associated to this part. We store it because the PartModel do
+ * not provide it
+ */
private Object rawModel;
/**
@@ -54,15 +59,15 @@ public class RootPart extends AbstractPart implements IPanelParent {
}
/**
- * Create the SWT controls.
- * This Root as no control. Create the child part and call the same method on the child.
+ * Create the SWT controls. This Root as no control. Create the child part
+ * and call the same method on the child.
*/
public void createPartControl(Composite parent) {
this.container = parent;
Object rawModel = getContentProvider().getRootModel();
// Create child part
- // child = createChildPart(rawModel);
+ // child = createChildPart(rawModel);
}
/**
@@ -80,10 +85,9 @@ public class RootPart extends AbstractPart implements IPanelParent {
return container;
}
-
/**
- * Create the part for the specified child model.
- * The controls are also builds.
+ * Create the part for the specified child model. The controls are also
+ * builds.
*
* TODO: delegate to sashContainer.
*
@@ -103,10 +107,9 @@ public class RootPart extends AbstractPart implements IPanelParent {
createdPart = new SashPanelPart(this, (ISashPanelModel)model, rawModel);
} else {
// error
- throw new IllegalArgumentException("Can't create child part for model of type '"
- + model.getClass().getName()
- + "'");
- // TODO: Return an error Part showing the exception instead of throwing it ?
+ throw new IllegalArgumentException("Can't create child part for model of type '" + model.getClass().getName() + "'");
+ // TODO: Return an error Part showing the exception instead of
+ // throwing it ?
}
// Create controls
@@ -151,8 +154,9 @@ public class RootPart extends AbstractPart implements IPanelParent {
Object rawModel = getContentProvider().getRootModel();
// Check if old child exist
- // If exist, check if the current part is associated to the checked model
- //
+ // If exist, check if the current part is associated to the checked
+ // model
+ //
if(child != null) {
// If the tile is already for the model, there is nothing to do.
if(child.isPartFor(rawModel)) {
@@ -179,7 +183,8 @@ public class RootPart extends AbstractPart implements IPanelParent {
}
/**
- * Set the child. If a child already exist at the specified index, it is lost.
+ * Set the child. If a child already exist at the specified index, it is
+ * lost.
*
* @param newTile
*/
@@ -223,15 +228,16 @@ public class RootPart extends AbstractPart implements IPanelParent {
return null;
}
- // /**
- // * Locates the part that intersects the given point and that have the expected type
- // *
- // * @param toFind
- // * @return
- // */
- // public AbstractPart findPartAt(Point toFind, Class<?> tileType) {
- // return child.findPartAt(toFind, tileType);
- // }
+ // /**
+ // * Locates the part that intersects the given point and that have the
+ // expected type
+ // *
+ // * @param toFind
+ // * @return
+ // */
+ // public AbstractPart findPartAt(Point toFind, Class<?> tileType) {
+ // return child.findPartAt(toFind, tileType);
+ // }
/**
*
@@ -243,12 +249,16 @@ public class RootPart extends AbstractPart implements IPanelParent {
return null;
}
- // /**
- // * @see org.eclipse.papyrus.sasheditor.sash.ITilePart#getDropTarget(java.lang.Object, org.eclipse.papyrus.sasheditor.sash.TabFolderPart, org.eclipse.swt.graphics.Point)
- // */
- // public IDropTarget getDropTarget(Object draggedObject, TabFolderPart sourcePart, Point position) {
- // return child.getDropTarget(draggedObject, sourcePart, position);
- // }
+ // /**
+ // * @see
+ // org.eclipse.papyrus.sasheditor.sash.ITilePart#getDropTarget(java.lang.Object,
+ // org.eclipse.papyrus.sasheditor.sash.TabFolderPart,
+ // org.eclipse.swt.graphics.Point)
+ // */
+ // public IDropTarget getDropTarget(Object draggedObject, TabFolderPart
+ // sourcePart, Point position) {
+ // return child.getDropTarget(draggedObject, sourcePart, position);
+ // }
/**
* Do nothing. This node can't be orphaned
@@ -281,8 +291,8 @@ public class RootPart extends AbstractPart implements IPanelParent {
}
/**
- * Accept the provided visitor.
- * Call the corresponding accept method in the visitor.
+ * Accept the provided visitor. Call the corresponding accept method in the
+ * visitor.
*
* @param visitor
* @return
@@ -308,11 +318,7 @@ public class RootPart extends AbstractPart implements IPanelParent {
* Show tile status.
*/
protected void showStatus() {
- org.eclipse.papyrus.sasheditor.Activator.log.debug("rootPart (1)"
- + ", disposed=" + container.isDisposed()
- + ", visible=" + container.isVisible()
- + ", " + this);
+ org.eclipse.papyrus.sasheditor.Activator.log.debug("rootPart (1)" + ", disposed=" + container.isDisposed() + ", visible=" + container.isVisible() + ", " + this);
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashContainerEventsProvider.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashContainerEventsProvider.java
index 9f0878384a7..e93c1c92085 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashContainerEventsProvider.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashContainerEventsProvider.java
@@ -6,14 +6,16 @@ package org.eclipse.papyrus.sasheditor.internal;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.papyrus.sasheditor.editor.SashContainerEventsListener;
+import org.eclipse.papyrus.sasheditor.editor.SashWindowsContainer;
/**
- * A class managing events of the {@link SashWindowsContainer}.
- * This class dispatch events fired by the {@link SashWindowsContainer} to any listeners
+ * A class managing events of the {@link SashWindowsContainer}. This class
+ * dispatch events fired by the {@link SashWindowsContainer} to any listeners
* implementing {@link SashContainerEventsProvider}.
*
* @author cedric dumoulin
- *
+ *
*/
public class SashContainerEventsProvider {
@@ -41,9 +43,9 @@ public class SashContainerEventsProvider {
listeners.remove(listener);
}
-
/**
* Notify all listener with event.
+ *
* @param newEditor
*/
public void firePageOpenedEvent(PagePart page) {
@@ -55,6 +57,7 @@ public class SashContainerEventsProvider {
/**
* Notify all listener with event.
+ *
* @param newEditor
*/
public void firePageClosedEvent(PagePart page) {
@@ -66,6 +69,7 @@ public class SashContainerEventsProvider {
/**
* Notify all listener with event.
+ *
* @param newEditor
*/
public void firePageAboutToBeOpenedEvent(PagePart page) {
@@ -77,6 +81,7 @@ public class SashContainerEventsProvider {
/**
* Notify all listener with event.
+ *
* @param newEditor
*/
public void firePageAboutToBeClosedEvent(PagePart page) {
@@ -88,6 +93,7 @@ public class SashContainerEventsProvider {
/**
* Notify all listener with event.
+ *
* @param newEditor
*/
public void firePageActivatedEvent(PagePart page) {
@@ -99,6 +105,7 @@ public class SashContainerEventsProvider {
/**
* Notify all listener with event.
+ *
* @param newEditor
*/
public void firePageDeactivatedEvent(PagePart page) {
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashPanelPart.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashPanelPart.java
index 7e5795c6d6b..de1cce38a7b 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashPanelPart.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashPanelPart.java
@@ -26,10 +26,9 @@ import org.eclipse.ui.internal.dnd.DragUtil;
import org.eclipse.ui.internal.dnd.IDropTarget;
/**
- * Controller for a sash panel.
- * A sash panel contain 2 children. It shows them in two windows separated by a sash.
- * Implementation use one model, a {@link ISashPanelModel}. This model encapsulate the real model which
- * is of an unknown type.
+ * Controller for a sash panel. A sash panel contain 2 children. It shows them
+ * in two windows separated by a sash. Implementation use one model, a {@link ISashPanelModel}. This model encapsulate the real model which is of an
+ * unknown type.
*
*
* @author dumoulin
@@ -46,10 +45,16 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
/** Interface to the model */
protected ISashPanelModel model;
- /** Raw model associated to this part. We store it because the PartModel do not provide it */
+ /**
+ * Raw model associated to this part. We store it because the PartModel do
+ * not provide it
+ */
private Object rawModel;
- /** Ordered set of currently shown diagrams (a left and right child, or upper and lower) TODO rename as children */
+ /**
+ * Ordered set of currently shown diagrams (a left and right child, or upper
+ * and lower) TODO rename as children
+ */
protected AbstractPanelPart[] currentChildParts = new AbstractPanelPart[2];
/**
@@ -58,7 +63,8 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
private ReplaceableSashForm container;
/**
- * Direction of the sash: SWT.HORIZONTAL or SWT.VERTICAL. Default = SWT.HORIZONTAL
+ * Direction of the sash: SWT.HORIZONTAL or SWT.VERTICAL. Default =
+ * SWT.HORIZONTAL
*/
private int sashDirection = SWT.HORIZONTAL;
@@ -80,7 +86,8 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
}
/**
- * Fill the provided part map with this parts and recursively call children to fillin.
+ * Fill the provided part map with this parts and recursively call children
+ * to fillin.
*
* @param partMap
*/
@@ -93,7 +100,8 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
}
/**
- * Create local control, and the tree of children (TileParts AND controls). Create this TilePart control, and then Tile childs of this TilePart.
+ * Create local control, and the tree of children (TileParts AND controls).
+ * Create this TilePart control, and then Tile childs of this TilePart.
*
* @param parent
* @return Control
@@ -101,8 +109,8 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
public void createPartControl(Composite parent) {
createControl(parent);
- // activate();
- // createChildrenControl();
+ // activate();
+ // createChildrenControl();
}
/**
@@ -115,10 +123,11 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
}
/**
- * Create the part for the specified child model.
- * The controls are NOT build.
+ * Create the part for the specified child model. The controls are NOT
+ * build.
*
- * TODO: delegate to sashContainer, remove duplication from here and RootPart.
+ * TODO: delegate to sashContainer, remove duplication from here and
+ * RootPart.
*
* @param rootPart
* @param partModel
@@ -136,20 +145,19 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
createdPart = new SashPanelPart(this, (ISashPanelModel)model, rawModel);
} else {
// error
- throw new IllegalArgumentException("Can't create child part for model of type '"
- + model.getClass().getName()
- + "'");
- // TODO: Return an error Part showing the exception instead of throwing it ?
+ throw new IllegalArgumentException("Can't create child part for model of type '" + model.getClass().getName() + "'");
+ // TODO: Return an error Part showing the exception instead of
+ // throwing it ?
}
return createdPart;
}
/**
- * Create the part for the specified child model.
- * The controls are build.
+ * Create the part for the specified child model. The controls are build.
*
- * TODO: delegate to sashContainer, remove duplication from here and RootPart.
+ * TODO: delegate to sashContainer, remove duplication from here and
+ * RootPart.
*
* @param rootPart
* @param partModel
@@ -163,7 +171,6 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
return createdPart;
}
-
/**
* Get the sash container.
*
@@ -176,7 +183,8 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
}
/**
- * Change the parent of this method. Reparent the Tile and the control. Normally, the control already exists.
+ * Change the parent of this method. Reparent the Tile and the control.
+ * Normally, the control already exists.
*
*/
@Override
@@ -196,7 +204,8 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
}
/**
- * Orphan this node, and children. The parent is set to null, but control is left unchanged. The node can be reattached with reparent().
+ * Orphan this node, and children. The parent is set to null, but control is
+ * left unchanged. The node can be reattached with reparent().
*
* @see
* @return the parent
@@ -247,11 +256,11 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
throw new NotFoundException("Can't find a part at '" + toFind + "'");
-
}
/**
- * Locates the part that intersects the given point and that have the expected type
+ * Locates the part that intersects the given point and that have the
+ * expected type
*
* @param toFind
* Position in Display coordinate.
@@ -277,7 +286,6 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
}
}
-
/**
* Return true if this sash is vertical, false otherwise.
*/
@@ -316,7 +324,8 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
}
/**
- * Return true if the Part is for the specified real model. Return false otherwise.
+ * Return true if the Part is for the specified real model. Return false
+ * otherwise.
*
* @param realModel
* The raw model to check
@@ -377,8 +386,9 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
Object newModel = model.getChildren().get(childIndex);
// Check if old child exist
- // If exist, check if the current part is associated to the checked model
- //
+ // If exist, check if the current part is associated to the checked
+ // model
+ //
AbstractPanelPart currentChildPart = currentChildParts[childIndex];
if(currentChildPart != null) {
// If the tile is already for the model, there is nothing to do.
@@ -422,7 +432,8 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
}
/**
- * Set the provided child at the specified index. If a child already exist at the specified index, it is lost. The controls are set accordingly
+ * Set the provided child at the specified index. If a child already exist
+ * at the specified index, it is lost. The controls are set accordingly
*
* @param newTile
* @param childIndex
@@ -433,8 +444,8 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
}
/**
- * Accept the provided visitor.
- * Call the corresponding accept method in the visitor.
+ * Accept the provided visitor. Call the corresponding accept method in the
+ * visitor.
*
* @param visitor
* @return
@@ -460,15 +471,10 @@ public class SashPanelPart extends AbstractPanelPart implements IPanelParent {
}
/**
- * Show tile status.
- * Used for debug purpose
+ * Show tile status. Used for debug purpose
*/
protected void showStatus() {
- org.eclipse.papyrus.sasheditor.Activator.log.debug("sash[" + currentChildParts.length + "]:"
- + ", disposed=" + container.isDisposed()
- + ", visible=" + container.isVisible()
- + ", garbState=" + garbageState
- + ", " + this);
+ org.eclipse.papyrus.sasheditor.Activator.log.debug("sash[" + currentChildParts.length + "]:" + ", disposed=" + container.isDisposed() + ", visible=" + container.isVisible() + ", garbState=" + garbageState + ", " + this);
}
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashWindowsException.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashWindowsException.java
index d5631d5008a..947b04bcbc9 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashWindowsException.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/SashWindowsException.java
@@ -13,7 +13,6 @@
*****************************************************************************/
package org.eclipse.papyrus.sasheditor.internal;
-
/**
* Main Exception from the SashWindowsSystem.
*
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ShowPartStatusVisitor.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ShowPartStatusVisitor.java
index 541cd0dad9e..bac2c993d3e 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ShowPartStatusVisitor.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/ShowPartStatusVisitor.java
@@ -13,9 +13,9 @@
*****************************************************************************/
package org.eclipse.papyrus.sasheditor.internal;
-
/**
- * Visitor used to show the status of the different Tiles composing the sash system.
+ * Visitor used to show the status of the different Tiles composing the sash
+ * system.
*
* @author dumoulin
*
@@ -33,7 +33,7 @@ public class ShowPartStatusVisitor extends PartVisitor {
public boolean accept(RootPart tile) {
indent();
tile.showStatus();
- // System.out.println( "root:" + tile );
+ // System.out.println( "root:" + tile );
level++;
super.accept(tile);
level--;
@@ -45,7 +45,7 @@ public class ShowPartStatusVisitor extends PartVisitor {
*/
private void indent() {
if(level < 1) {
- //error
+ // error
return;
}
@@ -63,7 +63,7 @@ public class ShowPartStatusVisitor extends PartVisitor {
public boolean accept(SashPanelPart tile) {
indent();
tile.showStatus();
- // System.out.println( "sash:" + tile );
+ // System.out.println( "sash:" + tile );
level++;
super.accept(tile);
level--;
@@ -77,7 +77,7 @@ public class ShowPartStatusVisitor extends PartVisitor {
public boolean accept(TabFolderPart tile) {
indent();
tile.showStatus();
- // System.out.println( "folder:" + tile );
+ // System.out.println( "folder:" + tile );
level++;
super.accept(tile);
level--;
@@ -91,7 +91,7 @@ public class ShowPartStatusVisitor extends PartVisitor {
public boolean accept(EditorPart tile) {
indent();
tile.showStatus();
- // System.out.println( "editor:" + tile );
+ // System.out.println( "editor:" + tile );
level++;
super.accept(tile);
level--;
@@ -105,12 +105,11 @@ public class ShowPartStatusVisitor extends PartVisitor {
public boolean accept(ComponentPart tile) {
indent();
tile.showStatus();
- // System.out.println( "editor:" + tile );
+ // System.out.println( "editor:" + tile );
level++;
super.accept(tile);
level--;
return true;
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/TabFolderPart.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/TabFolderPart.java
index b3a06a326e5..b8c9283b43a 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/TabFolderPart.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/TabFolderPart.java
@@ -21,6 +21,7 @@ import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.util.Geometry;
import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel;
import org.eclipse.papyrus.sasheditor.contentprovider.ITabFolderModel;
+import org.eclipse.papyrus.sasheditor.editor.SashWindowsContainer;
import org.eclipse.papyrus.sasheditor.internal.eclipsecopy.AbstractTabFolderPart;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
@@ -50,13 +51,14 @@ import org.eclipse.ui.internal.dnd.IDropTarget;
* Extends MultiPageEditor to inherit methods implementations.
*
* @param T
- * Common ancestor for the model provided for the sash windows by the application.
- * This is the type used externally by the application. Sash implementation don't use this type,
- * it just carry it to ask for the appropriate wrapper. Concrete implementation can specify
- * a type.
+ * Common ancestor for the model provided for the sash windows by the
+ * application. This is the type used externally by the application.
+ * Sash implementation don't use this type, it just carry it to ask
+ * for the appropriate wrapper. Concrete implementation can specify a
+ * type.
*
- * TODO : be more precise for the generic type ?
- * TODO : Listen to the page change event, and call setActivePage().
+ * TODO : be more precise for the generic type ? TODO : Listen to the
+ * page change event, and call setActivePage().
*/
@SuppressWarnings("restriction")
public class TabFolderPart extends AbstractTabFolderPart {
@@ -67,13 +69,22 @@ public class TabFolderPart extends AbstractTabFolderPart {
/** Interface to the model */
protected ITabFolderModel partModel;
- /** Raw model associated to this part. We store it because the PartModel do not provide it */
+ /**
+ * Raw model associated to this part. We store it because the PartModel do
+ * not provide it
+ */
private Object rawModel;
- /** The wrapper around the CTabFolder. This represent the SWT control associated to this part. */
+ /**
+ * The wrapper around the CTabFolder. This represent the SWT control
+ * associated to this part.
+ */
protected PTabFolder pTabFolder;
- /** Ordered set of currently shown diagrams (list of their models) TODO remove */
+ /**
+ * Ordered set of currently shown diagrams (list of their models) TODO
+ * remove
+ */
protected TabPartList currentTabItems = new TabPartList();
/** The drop target associated to this folderPart */
@@ -84,7 +95,6 @@ public class TabFolderPart extends AbstractTabFolderPart {
*/
private MouseHoverTracker mouseHoverTracker;
-
/**
* Listener on DragOver event.
*/
@@ -96,8 +106,9 @@ public class TabFolderPart extends AbstractTabFolderPart {
* org.eclipse.swt.graphics.Rectangle)
*/
public IDropTarget drag(Control currentControl, Object draggedObject, Point position, Rectangle dragRectangle) {
- // System.out.println(TabFolderPart.this.getClass().getSimpleName() + ".drag()");
-// System.out.println(this + ".drag()");
+ // System.out.println(TabFolderPart.this.getClass().getSimpleName()
+ // + ".drag()");
+ // System.out.println(this + ".drag()");
return null;
}
};
@@ -108,22 +119,23 @@ public class TabFolderPart extends AbstractTabFolderPart {
private PTabFolder.IPTabFolderListener cTabFolderEventListener = new PTabFolder.IPTabFolderListener() {
public void contextMenuDetectEvent(CTabItem tab, Event event) {
-// System.out.println("contextMenuDetect()");
+ // System.out.println("contextMenuDetect()");
}
/**
* The close cross has been pressed. Remove the corresponding tab. {@inheritDoc}
*/
public void itemClosedEvent(CTabFolderEvent event, int pageIndex) {
-// System.out.println("itemClosedEvent()");
+ // System.out.println("itemClosedEvent()");
// TODO: call appropriate method (to be determine)
- // model.removeTab(pageIndex);
- // getSashWindowContainer().getContentProvider().removeTab(model, pageIndex);
+ // model.removeTab(pageIndex);
+ // getSashWindowContainer().getContentProvider().removeTab(model,
+ // pageIndex);
getContentProvider().removePage(partModel, pageIndex);
}
public void menuDetectEvent(CTabItem tab, MenuDetectEvent event) {
-// System.out.println("menuDetectEvent()");
+ // System.out.println("menuDetectEvent()");
}
/**
@@ -154,7 +166,7 @@ public class TabFolderPart extends AbstractTabFolderPart {
/**
* Get the associated model.
*/
- protected ITabFolderModel getPartModel() {
+ public ITabFolderModel getPartModel() {
return partModel;
}
@@ -169,8 +181,8 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * Deactivate this part.
- * Unregistered from required service. Do not dispose the part.
+ * Deactivate this part. Unregistered from required service. Do not dispose
+ * the part.
*/
private void deactivate() {
// Listen to page changes
@@ -179,7 +191,8 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * Fill the provided part map with this parts and recursively call children to fillin.
+ * Fill the provided part map with this parts and recursively call children
+ * to fillin.
*
* @param partMap
*/
@@ -193,36 +206,37 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * Creates the control tree associated to this part.
- * Create the control for this part, and eventually recursively call the method for the childs, if any.
+ * Creates the control tree associated to this part. Create the control for
+ * this part, and eventually recursively call the method for the childs, if
+ * any.
*
*/
@Override
public void createPartControl(Composite parent) {
createControl(parent);
- // createPages();
+ // createPages();
// model.addChangeListener(modelListener);
// model.activate();
activate();
}
/**
- * Add a new page at the end of pages. A new tab is created for the page, and
- * the page control is created.
+ * Add a new page at the end of pages. A new tab is created for the page,
+ * and the page control is created.
*
* @param pageModel
* @param index
*/
- // private void addPage(Object pageModel)
- // {
- // int index = currentTabItems.size();
- // createTabItem(pageModel, index);
- // }
+ // private void addPage(Object pageModel)
+ // {
+ // int index = currentTabItems.size();
+ // createTabItem(pageModel, index);
+ // }
/**
- * Create the control for this Part. Does not create children.
- * This method is called by the parent after this folder is created.
+ * Create the control for this Part. Does not create children. This method
+ * is called by the parent after this folder is created.
*
*/
public void createControl(Composite parent) {
@@ -235,22 +249,24 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * Init the menuManager after the control has been created.
- * Get the {@link MenuManager} from the {@link SashWindowsContainer}. Set it to this folder if it
- * is not null.
+ * Init the menuManager after the control has been created. Get the {@link MenuManager} from the {@link SashWindowsContainer}. Set it to this
+ * folder if it is not null.
*/
private void initMenuManager() {
MenuManager menuManager = getSashWindowContainer().getFolderTabMenuManager();
- if(menuManager != null)
- {
+ if(menuManager != null) {
setFolderTabMenuManager(menuManager);
}
-
+
}
/**
- * Set a {@link MenuManager} used to manage a contextual menu that is shown on the tabs area of this folder.
- * @param menuManager The {@link MenuManager} used to create the menu on the tab area.
+ * Set a {@link MenuManager} used to manage a contextual menu that is shown
+ * on the tabs area of this folder.
+ *
+ * @param menuManager
+ * The {@link MenuManager} used to create the menu on the tab
+ * area.
*/
public void setFolderTabMenuManager(MenuManager menuManager) {
Composite folderControl = getControl();
@@ -258,7 +274,6 @@ public class TabFolderPart extends AbstractTabFolderPart {
folderControl.setMenu(menu);
}
-
/**
* The page has change. Propagate the event to the container.
*
@@ -267,7 +282,8 @@ public class TabFolderPart extends AbstractTabFolderPart {
@Override
protected void pageChange(int newPageIndex) {
- // System.out.println(this.getClass().getSimpleName() + ".pageChange("+ newPageIndex +")");
+ // System.out.println(this.getClass().getSimpleName() + ".pageChange("+
+ // newPageIndex +")");
// Do nothing if out of range.
if(newPageIndex < 0 || newPageIndex > currentTabItems.size() - 1)
return;
@@ -276,14 +292,15 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * An event signaling that the selected page is changed has been caught. Propagate the event to
- * the container.
+ * An event signaling that the selected page is changed has been caught.
+ * Propagate the event to the container.
*
* @param newPageIndex
*/
protected void pageChangedEvent(int newPageIndex) {
- // System.out.println(this.getClass().getSimpleName() + ".pageChange("+ newPageIndex +")");
+ // System.out.println(this.getClass().getSimpleName() + ".pageChange("+
+ // newPageIndex +")");
// Do nothing if out of range.
if(newPageIndex < 0 || newPageIndex > currentTabItems.size() - 1)
return;
@@ -302,7 +319,6 @@ public class TabFolderPart extends AbstractTabFolderPart {
deactivate();
-
// getControl().dispose();
pTabFolder.dispose();
}
@@ -314,7 +330,6 @@ public class TabFolderPart extends AbstractTabFolderPart {
DragUtil.addDragTarget(container, dragOverListener);
}
-
/**
* Get the associated CTabFolder
*/
@@ -331,8 +346,8 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * The <code>MultiPageEditor</code> implementation of this <code>IWorkbenchPart</code> method sets focus on
- * the active nested editor, if there is one.
+ * The <code>MultiPageEditor</code> implementation of this <code>IWorkbenchPart</code> method sets focus on the active nested
+ * editor, if there is one.
* <p>
* Subclasses may extend or reimplement.
* </p>
@@ -342,8 +357,8 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * Sets focus to the control for the given page. If the page has an editor, this calls its <code>setFocus()</code> method. Otherwise, this calls
- * <code>setFocus</code> on the control for the page.
+ * Sets focus to the control for the given page. If the page has an editor,
+ * this calls its <code>setFocus()</code> method. Otherwise, this calls <code>setFocus</code> on the control for the page.
*
* @param pageIndex
* the index of the page
@@ -357,8 +372,9 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * Set the active page of this multi-page editor to the page that contains the given editor part. This method has no effect of the given editor
- * part is not contained in this multi-page editor.
+ * Set the active page of this multi-page editor to the page that contains
+ * the given editor part. This method has no effect of the given editor part
+ * is not contained in this multi-page editor.
*
* @param editorPart
* the editor part
@@ -376,8 +392,8 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * Return the part containing specified point. Normally return this part, because the caller has
- * already determine that this contain the part.
+ * Return the part containing specified point. Normally return this part,
+ * because the caller has already determine that this contain the part.
*
*/
@Override
@@ -386,7 +402,8 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * Locates the part that intersects the given point and that have the expected type
+ * Locates the part that intersects the given point and that have the
+ * expected type
*
* @param toFind
* @return
@@ -430,9 +447,10 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * Get the visible PagePart (from the Container point of view).
- * The visible PagePart is the one that has its diagram area visible.
- * From the folder point of view, this is the active PagePart.
+ * Get the visible PagePart (from the Container point of view). The visible
+ * PagePart is the one that has its diagram area visible. From the folder
+ * point of view, this is the active PagePart.
+ *
* @return
*/
public PagePart getVisiblePagePart() {
@@ -442,7 +460,7 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
return null;
}
-
+
/**
* Find the part associated to the provided control.
*
@@ -460,7 +478,6 @@ public class TabFolderPart extends AbstractTabFolderPart {
return null;
}
-
/**
*
* @see org.eclipse.papyrus.sasheditor.internal.AbstractPanelPart#getDropTarget(java.lang.Object,
@@ -483,7 +500,8 @@ public class TabFolderPart extends AbstractTabFolderPart {
if(tabUnderPointer == null) {
Rectangle titleArea = pTabFolder.getTabArea();
- // If we're dragging over the title area, treat this as a drop in the last
+ // If we're dragging over the title area, treat this as a drop in
+ // the last
// tab position.
if(titleArea.contains(position) && pTabFolder.getTabFolder().getItemCount() > 0) {
int dragOverIndex = pTabFolder.getTabFolder().getItemCount();
@@ -494,7 +512,8 @@ public class TabFolderPart extends AbstractTabFolderPart {
return null;
}
- // If we are unable to compute the bounds for this tab, then ignore the drop
+ // If we are unable to compute the bounds for this tab, then
+ // ignore the drop
Rectangle lastTabBounds = lastTab.getBounds();
if(lastTabBounds.isEmpty()) {
return null;
@@ -503,24 +522,32 @@ public class TabFolderPart extends AbstractTabFolderPart {
// if (dragStart >= 0) {
// dragOverIndex--;
//
- // return createDropTarget( sourcePart, lastTabBounds, dragOverIndex);
- // // return new StackDropResult(lastTabBounds, new Integer(dragOverIndex));
+ // return createDropTarget( sourcePart, lastTabBounds,
+ // dragOverIndex);
+ // // return new StackDropResult(lastTabBounds, new
+ // Integer(dragOverIndex));
// }
- // Make the drag-over rectangle look like a tab at the end of the tab region.
- // We don't actually know how wide the tab will be when it's dropped, so just
+ // Make the drag-over rectangle look like a tab at the end of
+ // the tab region.
+ // We don't actually know how wide the tab will be when it's
+ // dropped, so just
// make it 3 times wider than it is tall.
- // titleArea is in Display coordinate, lastTabBounds in parent coordinate
+ // titleArea is in Display coordinate, lastTabBounds in parent
+ // coordinate
Rectangle dropRectangle = titleArea;
dropRectangle.x = dropRectangle.x + lastTabBounds.x + lastTabBounds.width;
dropRectangle.width = 3 * dropRectangle.height;
return createDropTarget(sourcePart, sourceIndex, dropRectangle, dragOverIndex);
- // return new StackDropResult(dropRectangle, new Integer(dragOverIndex));
+ // return new StackDropResult(dropRectangle, new
+ // Integer(dragOverIndex));
} else {
- // If the closest side is the side with the tabs, consider this a stack operation.
- // Otherwise, let the drop fall through to whatever the default behavior is
+ // If the closest side is the side with the tabs, consider this
+ // a stack operation.
+ // Otherwise, let the drop fall through to whatever the default
+ // behavior is
Rectangle displayBounds = DragUtil.getDisplayBounds(pTabFolder.getControl());
int closestSide = Geometry.getClosestSide(displayBounds, position);
if(closestSide == pTabFolder.getTabFolder().getTabPosition()) {
@@ -560,7 +587,8 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * Class implementing methods required by drop targets. Drop target use when the drop occur on one of the thumbnail of the folder.
+ * Class implementing methods required by drop targets. Drop target use when
+ * the drop occur on one of the thumbnail of the folder.
*/
protected class DropTarget implements IDropTarget {
@@ -621,20 +649,23 @@ public class TabFolderPart extends AbstractTabFolderPart {
* @see org.eclipse.ui.internal.dnd.IDropTarget#getCursor()
*/
public Cursor getCursor() {
- // System.out.println(TabFolderPart.this.getClass().getSimpleName() + ".getCursor()-" + count++);
+ // System.out.println(TabFolderPart.this.getClass().getSimpleName()
+ // + ".getCursor()-" + count++);
return DragCursors.getCursor(DragCursors.positionToDragCursor(cursor));
}
public Rectangle getSnapRectangle() {
- // System.out.println(TabFolderPart.this.getClass().getSimpleName() + ".getSnapRectangle()-" + count);
+ // System.out.println(TabFolderPart.this.getClass().getSimpleName()
+ // + ".getSnapRectangle()-" + count);
return snapRectangle;
}
}
/**
- * Orphan this node. The parent is set to null, but control is left unchanged. The node can be reattached with reparent().
+ * Orphan this node. The parent is set to null, but control is left
+ * unchanged. The node can be reattached with reparent().
*
* @see
* @return the parent
@@ -680,7 +711,8 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * Return true if the Part is for the specified real model. Return false otherwise.
+ * Return true if the Part is for the specified real model. Return false
+ * otherwise.
*
* @param realModel
* The raw model to check
@@ -695,29 +727,30 @@ public class TabFolderPart extends AbstractTabFolderPart {
*
* @return
*/
- protected Object getRawModel() {
+ public Object getRawModel() {
return rawModel;
}
/**
* Refresh the tab of this page (I.e the name and icon in the tab).
*
- * @param page The page to be refreshed
+ * @param page
+ * The page to be refreshed
*/
- public void refreshPageTab( PagePart page) {
+ public void refreshPageTab(PagePart page) {
TabItemPart itemPart = currentTabItems.getByPagePart(page);
- if(itemPart==null)
+ if(itemPart == null)
return;
-
+
itemPart.refreshTabDecorations();
}
-
+
/**
- * Synchronize the TabFolder with the models.
- * The Tabs order is fixed and can't be moved. So, we move the associated ITilepart if needed.
- * For each existing Tab, compare its model and the requested model. Synchronize if necessary.
- * If their is more new model, add new Tab
- * If their is less newModel, remove unused Tabs.
+ * Synchronize the TabFolder with the models. The Tabs order is fixed and
+ * can't be moved. So, we move the associated ITilepart if needed. For each
+ * existing Tab, compare its model and the requested model. Synchronize if
+ * necessary. If their is more new model, add new Tab If their is less
+ * newModel, remove unused Tabs.
*
* @param partLists
*/
@@ -779,23 +812,24 @@ public class TabFolderPart extends AbstractTabFolderPart {
activePageIndex = currentTabItems.size() - 1;
}
-
folder.setRedraw(true);
- // folder.setSelection(activePageIndex);
+ // folder.setSelection(activePageIndex);
folder.redraw();
if(activePageIndex >= 0) {
- // System.err.println("setActivePage(" + activePageIndex + ") : " + this);
+ // System.err.println("setActivePage(" + activePageIndex + ") : " +
+ // this);
// Set the activeTab has visible.
// Do it here because otherwise the active tab could be not visible.
- // This come from an undefined bug setting the tab.isVisible(false) in some case.
+ // This come from an undefined bug setting the tab.isVisible(false)
+ // in some case.
folder.getItem(activePageIndex).getControl().setVisible(true);
setActivePage(activePageIndex);
} else {
// Check if there is item in the CTabFolder.
// If true, we have a trouble
if(getTabFolder().getItemCount() > 0) {
- // System.err.println("Active page not set while synchronizing !");
+ // System.err.println("Active page not set while synchronizing !");
// We have items, but none is selected.
// Select the first one.
if(getTabFolder().getSelectionIndex() < 0) {
@@ -803,14 +837,14 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
}
}
- // folder.update();
- // folder.showSelection();
+ // folder.update();
+ // folder.showSelection();
}
/**
- * Remove the specified tabItem.
- * Also call appropriate remove() method on the tabItem.
+ * Remove the specified tabItem. Also call appropriate remove() method on
+ * the tabItem.
*
* @param curTab
*/
@@ -820,9 +854,10 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * Create a new TabItem associated to the part corresponding to the specified newModel.
- * The TabItem is created at the specified index.
- * The associated parts is searched in the existingParts or created if none is found.
+ * Create a new TabItem associated to the part corresponding to the
+ * specified newModel. The TabItem is created at the specified index. The
+ * associated parts is searched in the existingParts or created if none is
+ * found.
*
* @param existingParts
* List of existing parts.
@@ -851,30 +886,32 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
- // /**
- // * Create a new TabItem and associated part corresponding to the specified newModel.
- // * The TabItem is created at the specified index.
- // * The associated parts is created.
- // *
- // * @param existingParts List of existing parts.
- // * @param newModel
- // * @param index
- // * @param i
- // */
- // private void createTabItem(Object newModel, int index) {
- // TabItemPart newTab;
+ // /**
+ // * Create a new TabItem and associated part corresponding to the specified
+ // newModel.
+ // * The TabItem is created at the specified index.
+ // * The associated parts is created.
+ // *
+ // * @param existingParts List of existing parts.
+ // * @param newModel
+ // * @param index
+ // * @param i
+ // */
+ // private void createTabItem(Object newModel, int index) {
+ // TabItemPart newTab;
//
- // PagePart modelPart = createChildPart( newModel );
- // // Attach it to the tabItem
- // newTab = new TabItemPart(this, modelPart, index);
+ // PagePart modelPart = createChildPart( newModel );
+ // // Attach it to the tabItem
+ // newTab = new TabItemPart(this, modelPart, index);
//
- // // Add to the list of items.
- // currentTabItems.add(index, newTab);
- // }
+ // // Add to the list of items.
+ // currentTabItems.add(index, newTab);
+ // }
/**
- * Instruct the specified tabItem to use the new model. Check if a part already exist for the model
- * and use it if any. Otherwise create a new Part.
+ * Instruct the specified tabItem to use the new model. Check if a part
+ * already exist for the model and use it if any. Otherwise create a new
+ * Part.
*
* @param curTab
* @param existingParts
@@ -896,10 +933,10 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * Factory method to create a new Part for the specified newModel.
- * The method should always return a valid Part. In case of error while creating the requested part,
- * the method should return a default part, maybe showing the encountered error.
- * The control for the child is created.
+ * Factory method to create a new Part for the specified newModel. The
+ * method should always return a valid Part. In case of error while creating
+ * the requested part, the method should return a default part, maybe
+ * showing the encountered error. The control for the child is created.
*
* @param newModel
* @return The new part
@@ -909,7 +946,8 @@ public class TabFolderPart extends AbstractTabFolderPart {
// Create the child PartModel. Delegate creation to this part PartModel.
IPageModel partModel = getPartModel().createChildSashModel(newModel);
- // Delegate part creation to the container. This allow the container to provide appropriate
+ // Delegate part creation to the container. This allow the container to
+ // provide appropriate
// objects not available from the part.
PagePart newPart = getSashWindowContainer().createPagePart(this, partModel, newModel);
// Create control.
@@ -959,20 +997,20 @@ public class TabFolderPart extends AbstractTabFolderPart {
System.out.println();
//
- // System.out.printf("tabs.ctrl :" );
- // for( TabItemPart tab : currentModels)
- // {
- // System.out.printf( "%10s |", tab.childPart.getControl());
- // }
- // System.out.println();
-
- //
- // System.out.printf("tab.editor:" );
- // for( TabItemPart tab : currentModels)
- // {
- // System.out.printf( "%10s |", tab.childPart.getIEditorPart());
- // }
- // System.out.println();
+ // System.out.printf("tabs.ctrl :" );
+ // for( TabItemPart tab : currentModels)
+ // {
+ // System.out.printf( "%10s |", tab.childPart.getControl());
+ // }
+ // System.out.println();
+
+ //
+ // System.out.printf("tab.editor:" );
+ // for( TabItemPart tab : currentModels)
+ // {
+ // System.out.printf( "%10s |", tab.childPart.getIEditorPart());
+ // }
+ // System.out.println();
//
System.out.printf("tabs %2d :", currentTabItems.size());
@@ -987,20 +1025,19 @@ public class TabFolderPart extends AbstractTabFolderPart {
* Show tile status.
*/
protected void showStatus() {
- // System.out.println( "tabfolder[" + currentModels.size() + "]:"
- // + ", disposed=" + getCTabFolder().isDisposed()
- // + ", visible=" + getCTabFolder().isVisible()
- // + ", garbState=" + garbageState
- // + ", " + this);
+ // System.out.println( "tabfolder[" + currentModels.size() + "]:"
+ // + ", disposed=" + getCTabFolder().isDisposed()
+ // + ", visible=" + getCTabFolder().isVisible()
+ // + ", garbState=" + garbageState
+ // + ", " + this);
CTabFolder ctrl = getTabFolder();
- System.out.printf("tabfolder[%2d]: disposed=%-5b, visible=%-5b, garbState=%-10s, %s\n"
- , currentTabItems.size(), ctrl.isDisposed(), (ctrl.isDisposed() ? false : getTabFolder().isVisible()), garbageState, this);
+ System.out.printf("tabfolder[%2d]: disposed=%-5b, visible=%-5b, garbState=%-10s, %s\n", currentTabItems.size(), ctrl.isDisposed(), (ctrl.isDisposed() ? false : getTabFolder().isVisible()), garbageState, this);
}
/**
- * Accept the provided visitor.
- * Call the corresponding accept method in the visitor.
+ * Accept the provided visitor. Call the corresponding accept method in the
+ * visitor.
*
* @param visitor
* @return
@@ -1024,10 +1061,8 @@ public class TabFolderPart extends AbstractTabFolderPart {
return true;
}
-
/**
- * Collection of tabpart.
- * Add miscelenaous methods.
+ * Collection of tabpart. Add miscelenaous methods.
*
* @author dumoulin
*
@@ -1046,10 +1081,10 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * Returns the index of the first occurrence of the specified element
- * in this list, or -1 if this list does not contain the element.
- * More formally, returns the lowest index <tt>i</tt> such that <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt>,
- * or -1 if there is no such index.
+ * Returns the index of the first occurrence of the specified element in
+ * this list, or -1 if this list does not contain the element. More
+ * formally, returns the lowest index <tt>i</tt> such that <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt> , or -1 if
+ * there is no such index.
*/
public int indexOfModel(Object o) {
if(o == null) {
@@ -1064,7 +1099,6 @@ public class TabFolderPart extends AbstractTabFolderPart {
return -1;
}
-
/**
* Get the TabPart by its model.
*
@@ -1088,10 +1122,9 @@ public class TabFolderPart extends AbstractTabFolderPart {
}
/**
- * Track the mouse for flying over the tabs and show tooltip.
- * Show the tooltip when the mouse stop over a tab.
- * Disable the tooltip if mouse is clicked.
- * Reenable the tooltip when exiting the tab.
+ * Track the mouse for flying over the tabs and show tooltip. Show the
+ * tooltip when the mouse stop over a tab. Disable the tooltip if mouse is
+ * clicked. Reenable the tooltip when exiting the tab.
*
* @author dumoulin
*
@@ -1112,33 +1145,32 @@ public class TabFolderPart extends AbstractTabFolderPart {
private int count = 0;
public void mouseEnter(MouseEvent e) {
- // System.out.println("MouseEnter()" + count++);
+ // System.out.println("MouseEnter()" + count++);
}
public void mouseExit(MouseEvent e) {
- // System.out.println("MouseExit()" + count++);
+ // System.out.println("MouseExit()" + count++);
toolTipManager.closeToolTip();
}
public void mouseHover(MouseEvent e) {
CTabFolder folder = getTabFolder();
- // Point pt = folder.toDisplay(e.x, e.y);
+ // Point pt = folder.toDisplay(e.x, e.y);
Point pt = new Point(e.x, e.y);
CTabItem item = folder.getItem(pt);
int index = pTabFolder.getItemIndex(pt);
- if(index == -1)
- {
+ if(index == -1) {
toolTipManager.closeToolTip();
return;
}
PagePart part = currentTabItems.get(index).getChildPart();
-// System.out.println("MouseHover(" + e.widget
-// + ", part=" + part.getPageTitle()
-// + ", item=" + item
-// + ") - " + count++);
- // TODO move it away
+ // System.out.println("MouseHover(" + e.widget
+ // + ", part=" + part.getPartTitle()
+ // + ", item=" + item
+ // + ") - " + count++);
+ // TODO move it away
//toolTipManager.showToolTip(item.getBounds(), part.getControl(), pt);
toolTipManager.showToolTip(part, item.getBounds(), pt);
}
@@ -1147,8 +1179,7 @@ public class TabFolderPart extends AbstractTabFolderPart {
};
/**
- * Listener on mouse clicked.
- * Used to disable the current tooltip.
+ * Listener on mouse clicked. Used to disable the current tooltip.
*/
private Listener mouseClickedListener = new Listener() {
@@ -1157,7 +1188,7 @@ public class TabFolderPart extends AbstractTabFolderPart {
public void handleEvent(Event event) {
switch(event.type) {
case SWT.MouseUp:
-// System.out.println("MouseUp()" + count++);
+ // System.out.println("MouseUp()" + count++);
toolTipManager.disableToolTip();
break;
}
@@ -1165,8 +1196,7 @@ public class TabFolderPart extends AbstractTabFolderPart {
};
/**
- * Build a tracker for the specified control.
- * Constructor.
+ * Build a tracker for the specified control. Constructor.
*
* @param control
*/
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/TabItemPart.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/TabItemPart.java
index eb5cfec36c9..cca4c7c1220 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/TabItemPart.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/TabItemPart.java
@@ -22,9 +22,9 @@ import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Control;
/**
- * A controller associated to a tabitem in a tabfolder. This controller contains a reference to
- * a PagePart.
- * This class is used exclusively by the TabFolderPart. It should be not used from elsewhere.
+ * A controller associated to a tabitem in a tabfolder. This controller contains
+ * a reference to a PagePart. This class is used exclusively by the
+ * TabFolderPart. It should be not used from elsewhere.
*
* @author dumoulin
*
@@ -34,10 +34,11 @@ public class TabItemPart {
/**
* The associated model TODO : change the type
*/
- // protected Object model;
+ // protected Object model;
/**
- * The child associated to this tabitem. The child is rendered by the tabitem.
+ * The child associated to this tabitem. The child is rendered by the
+ * tabitem.
*/
protected PagePart childPart;
@@ -48,8 +49,8 @@ public class TabItemPart {
protected TabFolderPart parent;
/**
- * The SWT item associated to this part. This item contains the control of the
- * associated editor.
+ * The SWT item associated to this part. This item contains the control of
+ * the associated editor.
*/
protected CTabItem control;
@@ -57,8 +58,7 @@ public class TabItemPart {
protected GarbageState garbageState;
/**
- * Constructor.
- * Create a TabItem for the provided modelPart.
+ * Constructor. Create a TabItem for the provided modelPart.
*
* @param tabFolderPart
* @param modelPart
@@ -96,7 +96,8 @@ public class TabItemPart {
}
/**
- * Reset this TabItem to use the new part. Reparent the new part and orphan the old part.
+ * Reset this TabItem to use the new part. Reparent the new part and orphan
+ * the old part.
*
* @param modelPart
*/
@@ -131,10 +132,8 @@ public class TabItemPart {
}
/**
- * Remove the TabPart.
- * Dispose the associated SWT CTabItem.
- * (TODO Remove from the parent list.)
- * Orphan the associated ITilePart
+ * Remove the TabPart. Dispose the associated SWT CTabItem. (TODO Remove
+ * from the parent list.) Orphan the associated ITilePart
*
* @see
* @return the parent
@@ -187,8 +186,8 @@ public class TabItemPart {
}
/**
- * Dispose the associated control.
- * Only dispose this tabitem, not the childpart.
+ * Dispose the associated control. Only dispose this tabitem, not the
+ * childpart.
*/
public void dispose() {
Control itemControl = control.getControl();
@@ -233,23 +232,23 @@ public class TabItemPart {
}
/**
- * Locates the part that intersects the given point and that have the expected type
+ * Locates the part that intersects the given point and that have the
+ * expected type
*
* @param position
* @return
*/
public AbstractPart findPartAt(Point position, Class<?> expectedTileType) {
- // if(expectedTileType == this.getClass())
- // return this;
+ // if(expectedTileType == this.getClass())
+ // return this;
return childPart.findPartAt(position, expectedTileType);
}
-
/**
- * Accept the provided visitor.
- * Call the corresponding accept method in the visitor.
+ * Accept the provided visitor. Call the corresponding accept method in the
+ * visitor.
*
* @param visitor
* @return
@@ -277,5 +276,4 @@ public class TabItemPart {
return rawModel.equals(getChildPart().getRawModel());
}
-
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/eclipsecopy/AbstractTabFolderPart.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/eclipsecopy/AbstractTabFolderPart.java
index aace9b4280e..bd1a2a0d57b 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/eclipsecopy/AbstractTabFolderPart.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/eclipsecopy/AbstractTabFolderPart.java
@@ -18,9 +18,9 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
/**
- * Copy of org.eclipse.ui.part.MultiPageEditorPart. Change if to be suitable has a sash leaf. A multi-page editor is an editor with multiple pages,
- * each of which may contain an editor or an arbitrary
- * SWT control.
+ * Copy of org.eclipse.ui.part.MultiPageEditorPart. Change if to be suitable has
+ * a sash leaf. A multi-page editor is an editor with multiple pages, each of
+ * which may contain an editor or an arbitrary SWT control.
* <p>
* This class is intented to separate folder stuff into 2 classes. Subclasses must implement the following methods:
* <ul>
@@ -42,7 +42,8 @@ import org.eclipse.swt.widgets.Control;
public abstract class AbstractTabFolderPart extends AbstractPanelPart {
/**
- * Subclasses that override {@link #createPageContainer(Composite)} can use this constant to get a site for the container that can be active while
+ * Subclasses that override {@link #createPageContainer(Composite)} can use
+ * this constant to get a site for the container that can be active while
* the current page is deactivated.
*
* @since 3.4
@@ -52,18 +53,20 @@ public abstract class AbstractTabFolderPart extends AbstractPanelPart {
*/
protected static final int PAGE_CONTAINER_SITE = 65535;
- // /**
- // * Private tracing output.
- // */
+ // /**
+ // * Private tracing output.
+ // */
// private static final String TRACING_COMPONENT = "MPE"; //$NON-NLS-1$
- // /**
- // * The active service locator. This value may be <code>null</code> if there is no selected page, or if the selected page is a control with no site.
- // */
- // private INestable activeServiceLocator;
+ // /**
+ // * The active service locator. This value may be <code>null</code> if
+ // there is no selected page, or if the selected page is a control with no
+ // site.
+ // */
+ // private INestable activeServiceLocator;
//
//
- // private IServiceLocator pageContainerSite;
+ // private IServiceLocator pageContainerSite;
/**
* Creates an empty multi-page editor with no pages.
@@ -73,8 +76,8 @@ public abstract class AbstractTabFolderPart extends AbstractPanelPart {
}
/**
- * The <code>MultiPageEditor</code> implementation of this <code>IWorkbenchPart</code> method creates the control for the multi-page editor by
- * calling <code>createContainer</code>, then <code>createPages</code>. Subclasses should implement <code>createPages</code> rather than
+ * The <code>MultiPageEditor</code> implementation of this <code>IWorkbenchPart</code> method creates the control for the multi-page
+ * editor by calling <code>createContainer</code>, then <code>createPages</code>. Subclasses should implement <code>createPages</code> rather than
* overriding this method.
*
* @param parent
@@ -91,16 +94,17 @@ public abstract class AbstractTabFolderPart extends AbstractPanelPart {
*
* @return the active nested editor, or <code>null</code> if none
*/
- // public IEditorPart getActiveEditor() {
- // int index = getActivePage();
- // if (index != -1) {
- // return getEditor(index);
- // }
- // return null;
- // }
+ // public IEditorPart getActiveEditor() {
+ // int index = getActivePage();
+ // if (index != -1) {
+ // return getEditor(index);
+ // }
+ // return null;
+ // }
/**
- * Returns the index of the currently active page of this folder, or -1 if there is no active page.
+ * Returns the index of the currently active page of this folder, or -1 if
+ * there is no active page.
* <p>
* Subclasses should not override this method
* </p>
@@ -116,31 +120,35 @@ public abstract class AbstractTabFolderPart extends AbstractPanelPart {
}
/**
- * Returns the control for the given page index, or <code>null</code> if no control has been set for the page. The page index must be valid.
+ * Returns the control for the given page index, or <code>null</code> if no
+ * control has been set for the page. The page index must be valid.
* <p>
* Subclasses should not override this method
* </p>
*
* @param pageIndex
* the index of the page
- * @return the control for the specified page, or <code>null</code> if none has been set
+ * @return the control for the specified page, or <code>null</code> if none
+ * has been set
*/
protected Control getControl(int pageIndex) {
return getItem(pageIndex).getControl();
}
/**
- * Returns the editor for the given page index. The page index must be valid.
+ * Returns the editor for the given page index. The page index must be
+ * valid.
*
* @param pageIndex
* the index of the page
- * @return the editor for the specified page, or <code>null</code> if the specified page was not created with
- * <code>addPage(IEditorPart,IEditorInput)</code>
+ * @return the editor for the specified page, or <code>null</code> if the
+ * specified page was not created with <code>addPage(IEditorPart,IEditorInput)</code>
*/
- // abstract protected IEditorPart getEditor(int pageIndex);
+ // abstract protected IEditorPart getEditor(int pageIndex);
/**
- * Returns the service locator for the given page index. This method can be used to create service locators for pages that are just controls. The
+ * Returns the service locator for the given page index. This method can be
+ * used to create service locators for pages that are just controls. The
* page index must be valid.
* <p>
* This will return the editor site service locator for an editor, and create one for a page that is just a control.
@@ -148,20 +156,20 @@ public abstract class AbstractTabFolderPart extends AbstractPanelPart {
*
* @param pageIndex
* the index of the page
- * @return the editor for the specified page, or <code>null</code> if the specified page was not created with
- * <code>addPage(IEditorPart,IEditorInput)</code>
+ * @return the editor for the specified page, or <code>null</code> if the
+ * specified page was not created with <code>addPage(IEditorPart,IEditorInput)</code>
* @since 3.4
*/
- // protected final IServiceLocator getPageSite(int pageIndex) {
- // if (pageIndex == PAGE_CONTAINER_SITE) {
- // return getPageContainerSite();
- // }
+ // protected final IServiceLocator getPageSite(int pageIndex) {
+ // if (pageIndex == PAGE_CONTAINER_SITE) {
+ // return getPageContainerSite();
+ // }
//
- // /**
- // * Return the site associated to the editor.
- // */
- // return getEditor(pageIndex).getSite();
- // }
+ // /**
+ // * Return the site associated to the editor.
+ // */
+ // return getEditor(pageIndex).getSite();
+ // }
/**
* @return A site that can be used with a header.
@@ -170,24 +178,27 @@ public abstract class AbstractTabFolderPart extends AbstractPanelPart {
* @see #PAGE_CONTAINER_SITE
* @see #getPageSite(int)
*/
- // private IServiceLocator getPageContainerSite() {
- // if (pageContainerSite == null) {
- // IServiceLocatorCreator slc = (IServiceLocatorCreator) getSite().getService(IServiceLocatorCreator.class);
- // pageContainerSite = slc.createServiceLocator(getSite(), null, new IDisposable() {
+ // private IServiceLocator getPageContainerSite() {
+ // if (pageContainerSite == null) {
+ // IServiceLocatorCreator slc = (IServiceLocatorCreator)
+ // getSite().getService(IServiceLocatorCreator.class);
+ // pageContainerSite = slc.createServiceLocator(getSite(), null, new
+ // IDisposable() {
//
- // public void dispose() {
- // final Control control = ((PartSite) getSite()).getPane().getControl();
- // if (control != null && !control.isDisposed()) {
- // ((PartSite) getSite()).getPane().doHide();
- // }
- // }
- // });
- // }
- // return pageContainerSite;
- // }
+ // public void dispose() {
+ // final Control control = ((PartSite) getSite()).getPane().getControl();
+ // if (control != null && !control.isDisposed()) {
+ // ((PartSite) getSite()).getPane().doHide();
+ // }
+ // }
+ // });
+ // }
+ // return pageContainerSite;
+ // }
/**
- * Returns the tab item for the given page index (page index is 0-based). The page index must be valid.
+ * Returns the tab item for the given page index (page index is 0-based).
+ * The page index must be valid.
*
* @param pageIndex
* the index of the page
@@ -219,8 +230,8 @@ public abstract class AbstractTabFolderPart extends AbstractPanelPart {
protected abstract CTabFolder getTabFolder();
/**
- * Notifies this multi-page editor that the page with the given id has been activated. This method is called when the user selects a different
- * tab.
+ * Notifies this multi-page editor that the page with the given id has been
+ * activated. This method is called when the user selects a different tab.
* <p>
* The <code>MultiPageEditorPart</code> implementation of this method sets focus to the new page, and notifies the action bar contributor (if
* there is one). This checks whether the action bar contributor is an instance of <code>MultiPageEditorActionBarContributor</code>, and, if so,
@@ -234,48 +245,57 @@ public abstract class AbstractTabFolderPart extends AbstractPanelPart {
* the index of the activated page
*/
protected void pageChange(int newPageIndex) {
- // System.out.println(this.getClass().getSimpleName() + "pageChange()");
- // deactivateSite(false, false);
+ // System.out.println(this.getClass().getSimpleName() + "pageChange()");
+ // deactivateSite(false, false);
//
- // IPartService partService = (IPartService) getSite().getService(IPartService.class);
- // if (partService.getActivePart() == this) {
- // setFocus(newPageIndex);
- // }
+ // IPartService partService = (IPartService)
+ // getSite().getService(IPartService.class);
+ // if (partService.getActivePart() == this) {
+ // setFocus(newPageIndex);
+ // }
//
- // IEditorPart activeEditor = getEditor(newPageIndex);
+ // IEditorPart activeEditor = getEditor(newPageIndex);
//
- // IEditorActionBarContributor contributor = getEditorSite().getActionBarContributor();
- // if (contributor != null && contributor instanceof MultiPageEditorActionBarContributor) {
- // ((MultiPageEditorActionBarContributor) contributor).setActivePage(activeEditor);
- // }
+ // IEditorActionBarContributor contributor =
+ // getEditorSite().getActionBarContributor();
+ // if (contributor != null && contributor instanceof
+ // MultiPageEditorActionBarContributor) {
+ // ((MultiPageEditorActionBarContributor)
+ // contributor).setActivePage(activeEditor);
+ // }
//
- // if (activeEditor != null) {
- // ISelectionProvider selectionProvider = activeEditor.getSite().getSelectionProvider();
- // if (selectionProvider != null) {
- // ISelectionProvider outerProvider = getSite().getSelectionProvider();
- // if (outerProvider instanceof MultiPageSelectionProvider) {
- // SelectionChangedEvent event = new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection());
+ // if (activeEditor != null) {
+ // ISelectionProvider selectionProvider =
+ // activeEditor.getSite().getSelectionProvider();
+ // if (selectionProvider != null) {
+ // ISelectionProvider outerProvider = getSite().getSelectionProvider();
+ // if (outerProvider instanceof MultiPageSelectionProvider) {
+ // SelectionChangedEvent event = new
+ // SelectionChangedEvent(selectionProvider,
+ // selectionProvider.getSelection());
//
- // MultiPageSelectionProvider provider = (MultiPageSelectionProvider) outerProvider;
- // provider.fireSelectionChanged(event);
- // provider.firePostSelectionChanged(event);
- // } else {
- // if (Policy.DEBUG_MPE) {
+ // MultiPageSelectionProvider provider = (MultiPageSelectionProvider)
+ // outerProvider;
+ // provider.fireSelectionChanged(event);
+ // provider.firePostSelectionChanged(event);
+ // } else {
+ // if (Policy.DEBUG_MPE) {
// Tracing.printTrace(TRACING_COMPONENT, "MultiPageEditorPart " + getTitle() //$NON-NLS-1$
// + " did not propogate selection for " //$NON-NLS-1$
- // + activeEditor.getTitle());
- // }
- // }
- // }
- // }
+ // + activeEditor.getTitle());
+ // }
+ // }
+ // }
+ // }
//
- // activateSite();
+ // activateSite();
}
/**
- * This method can be used by implementors of {@link AbstractTabFolderPart#createPageContainer(Composite)} to deactivate the active inner editor
- * services while their header has focus. A
- * deactivateSite() must have a matching call to activateSite() when appropriate.
+ * This method can be used by implementors of {@link AbstractTabFolderPart#createPageContainer(Composite)} to
+ * deactivate the active inner editor services while their header has focus.
+ * A deactivateSite() must have a matching call to activateSite() when
+ * appropriate.
* <p>
* An new inner editor will have its site activated on a {@link AbstractTabFolderPart#pageChange(int)}.
* </p>
@@ -293,38 +313,40 @@ public abstract class AbstractTabFolderPart extends AbstractPanelPart {
* @see #getPageSite(int)
* @see #PAGE_CONTAINER_SITE
*/
- // protected final void deactivateSite(boolean immediate, boolean containerSiteActive) {
- // // Deactivate the nested services from the last active service locator.
- // if (activeServiceLocator != null) {
- // activeServiceLocator.deactivate();
- // activeServiceLocator = null;
- // }
+ // protected final void deactivateSite(boolean immediate, boolean
+ // containerSiteActive) {
+ // // Deactivate the nested services from the last active service locator.
+ // if (activeServiceLocator != null) {
+ // activeServiceLocator.deactivate();
+ // activeServiceLocator = null;
+ // }
//
- // final int pageIndex = getActivePage();
- // final IKeyBindingService service = getSite().getKeyBindingService();
- // if (pageIndex < 0 || pageIndex >= getPageCount() || immediate) {
- // // There is no selected page, so deactivate the active service.
- // if (service instanceof INestableKeyBindingService) {
- // final INestableKeyBindingService nestableService = (INestableKeyBindingService) service;
- // nestableService.activateKeyBindingService(null);
- // } else {
- // WorkbenchPlugin
+ // final int pageIndex = getActivePage();
+ // final IKeyBindingService service = getSite().getKeyBindingService();
+ // if (pageIndex < 0 || pageIndex >= getPageCount() || immediate) {
+ // // There is no selected page, so deactivate the active service.
+ // if (service instanceof INestableKeyBindingService) {
+ // final INestableKeyBindingService nestableService =
+ // (INestableKeyBindingService) service;
+ // nestableService.activateKeyBindingService(null);
+ // } else {
+ // WorkbenchPlugin
// .log("MultiPageEditorPart.deactivateSite() Parent key binding service was not an instance of INestableKeyBindingService. It was an instance of " + service.getClass().getName() + " instead."); //$NON-NLS-1$ //$NON-NLS-2$
- // }
- // }
+ // }
+ // }
//
- // if (containerSiteActive) {
- // IServiceLocator containerSite = getPageContainerSite();
- // if (containerSite instanceof INestable) {
- // activeServiceLocator = (INestable) containerSite;
- // activeServiceLocator.activate();
- // }
- // }
- // }
+ // if (containerSiteActive) {
+ // IServiceLocator containerSite = getPageContainerSite();
+ // if (containerSite instanceof INestable) {
+ // activeServiceLocator = (INestable) containerSite;
+ // activeServiceLocator.activate();
+ // }
+ // }
+ // }
/**
- * This method can be used by implementors of {@link #createPageContainer(Composite)} to activate the active inner editor services when their
- * header loses focus.
+ * This method can be used by implementors of {@link #createPageContainer(Composite)} to activate the active inner
+ * editor services when their header loses focus.
* <p>
* An new inner editor will have its site activated on a {@link #pageChange(int)}.
* </p>
@@ -337,74 +359,76 @@ public abstract class AbstractTabFolderPart extends AbstractPanelPart {
* @see #createPageContainer(Composite)
* @see #getPageSite(int)
*/
- // protected final void activateSite() {
- // if (activeServiceLocator != null) {
- // activeServiceLocator.deactivate();
- // activeServiceLocator = null;
- // }
+ // protected final void activateSite() {
+ // if (activeServiceLocator != null) {
+ // activeServiceLocator.deactivate();
+ // activeServiceLocator = null;
+ // }
//
- // final IKeyBindingService service = getSite().getKeyBindingService();
- // final int pageIndex = getActivePage();
- // final IEditorPart editor = getEditor(pageIndex);
+ // final IKeyBindingService service = getSite().getKeyBindingService();
+ // final int pageIndex = getActivePage();
+ // final IEditorPart editor = getEditor(pageIndex);
//
- // if (editor != null) {
- // // active the service for this inner editor
- // if (service instanceof INestableKeyBindingService) {
- // final INestableKeyBindingService nestableService = (INestableKeyBindingService) service;
- // nestableService.activateKeyBindingService(editor.getEditorSite());
+ // if (editor != null) {
+ // // active the service for this inner editor
+ // if (service instanceof INestableKeyBindingService) {
+ // final INestableKeyBindingService nestableService =
+ // (INestableKeyBindingService) service;
+ // nestableService.activateKeyBindingService(editor.getEditorSite());
//
- // } else {
- // WorkbenchPlugin
+ // } else {
+ // WorkbenchPlugin
// .log("MultiPageEditorPart.activateSite() Parent key binding service was not an instance of INestableKeyBindingService. It was an instance of " + service.getClass().getName() + " instead."); //$NON-NLS-1$ //$NON-NLS-2$
- // }
- // // Activate the services for the new service locator.
- // final IServiceLocator serviceLocator = editor.getEditorSite();
- // if (serviceLocator instanceof INestable) {
- // activeServiceLocator = (INestable) serviceLocator;
- // activeServiceLocator.activate();
- // }
+ // }
+ // // Activate the services for the new service locator.
+ // final IServiceLocator serviceLocator = editor.getEditorSite();
+ // if (serviceLocator instanceof INestable) {
+ // activeServiceLocator = (INestable) serviceLocator;
+ // activeServiceLocator.activate();
+ // }
//
- // } else {
- // Item item = getItem(pageIndex);
+ // } else {
+ // Item item = getItem(pageIndex);
//
- // // There is no selected editor, so deactivate the active service.
- // if (service instanceof INestableKeyBindingService) {
- // final INestableKeyBindingService nestableService = (INestableKeyBindingService) service;
- // nestableService.activateKeyBindingService(null);
- // } else {
- // WorkbenchPlugin
+ // // There is no selected editor, so deactivate the active service.
+ // if (service instanceof INestableKeyBindingService) {
+ // final INestableKeyBindingService nestableService =
+ // (INestableKeyBindingService) service;
+ // nestableService.activateKeyBindingService(null);
+ // } else {
+ // WorkbenchPlugin
// .log("MultiPageEditorPart.activateSite() Parent key binding service was not an instance of INestableKeyBindingService. It was an instance of " + service.getClass().getName() + " instead."); //$NON-NLS-1$ //$NON-NLS-2$
- // }
+ // }
//
- // if (item.getData() instanceof INestable) {
- // activeServiceLocator = (INestable) item.getData();
- // activeServiceLocator.activate();
- // }
- // }
- // }
+ // if (item.getData() instanceof INestable) {
+ // activeServiceLocator = (INestable) item.getData();
+ // activeServiceLocator.activate();
+ // }
+ // }
+ // }
- // /**
- // * Disposes the given part and its site.
- // *
- // * @param part
- // * The part to dispose; must not be <code>null</code>.
- // */
- // private void disposePart(final IWorkbenchPart part) {
- // SafeRunner.run(new ISafeRunnable() {
+ // /**
+ // * Disposes the given part and its site.
+ // *
+ // * @param part
+ // * The part to dispose; must not be <code>null</code>.
+ // */
+ // private void disposePart(final IWorkbenchPart part) {
+ // SafeRunner.run(new ISafeRunnable() {
//
- // public void run() {
- // IWorkbenchPartSite partSite = part.getSite();
- // part.dispose();
- // if (partSite instanceof MultiPageEditorSite) {
- // ((MultiPageEditorSite) partSite).dispose();
- // }
- // }
+ // public void run() {
+ // IWorkbenchPartSite partSite = part.getSite();
+ // part.dispose();
+ // if (partSite instanceof MultiPageEditorSite) {
+ // ((MultiPageEditorSite) partSite).dispose();
+ // }
+ // }
//
- // public void handleException(Throwable e) {
- // // Exception has already being logged by Core. Do nothing.
- // }
- // });
- // }
+ // public void handleException(Throwable e) {
+ // // Exception has already being logged by Core. Do nothing.
+ // }
+ // });
+ // }
/**
* Sets the currently active page for this folder.
@@ -413,7 +437,7 @@ public abstract class AbstractTabFolderPart extends AbstractPanelPart {
* the index of the page to be activated; the index must be valid
*/
public void setActivePage(int pageIndex) {
- // Assert.isTrue(pageIndex >= 0 && pageIndex < getPageCount());
+ // Assert.isTrue(pageIndex >= 0 && pageIndex < getPageCount());
if(!isValidPageIndex(pageIndex))
return;
@@ -422,9 +446,8 @@ public abstract class AbstractTabFolderPart extends AbstractPanelPart {
}
/**
- * Return true if the specified index is valid.
- * The index should be between 0 and pageCount.
- * If there is no page, return false.
+ * Return true if the specified index is valid. The index should be between
+ * 0 and pageCount. If there is no page, return false.
*
* @param pageIndex
* @return
@@ -440,40 +463,39 @@ public abstract class AbstractTabFolderPart extends AbstractPanelPart {
* @param pageIndex
* the index of the page
* @param control
- * the control for the specified page, or <code>null</code> to clear the control
+ * the control for the specified page, or <code>null</code> to
+ * clear the control
*/
protected void setControl(int pageIndex, Control control) {
getItem(pageIndex).setControl(control);
}
-
/* *************************************** */
/* Added method. */
/* *************************************** */
- // /**
- // * Title of this TilePart ? Needed by a trace message.
- // */
- // protected String getTitle() {
- // return getClass().toString();
- // }
+ // /**
+ // * Title of this TilePart ? Needed by a trace message.
+ // */
+ // protected String getTitle() {
+ // return getClass().toString();
+ // }
//
- // /**
- // *
- // */
- // protected IWorkbenchPartSite getSite() {
- // return getEditorSite();
- // }
+ // /**
+ // *
+ // */
+ // protected IWorkbenchPartSite getSite() {
+ // return getEditorSite();
+ // }
//
- // /**
- // *
- // */
- // abstract protected void firePropertyChange(int propertyId);
+ // /**
+ // *
+ // */
+ // abstract protected void firePropertyChange(int propertyId);
//
- // /**
- // *
- // */
- // abstract protected IEditorSite getEditorSite();
-
+ // /**
+ // *
+ // */
+ // abstract protected IEditorSite getEditorSite();
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/eclipsecopy/MultiPageEditorSite.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/eclipsecopy/MultiPageEditorSite.java
index 222c9f0940e..81b3712533f 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/eclipsecopy/MultiPageEditorSite.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/eclipsecopy/MultiPageEditorSite.java
@@ -56,12 +56,11 @@ import org.eclipse.ui.services.IServiceScopes;
*/
public class MultiPageEditorSite implements IEditorSite, INestable {
-
org.eclipse.ui.part.MultiPageEditorSite e;
-
+
/**
- * The actionBarContributor associated to the site. Can be null. In this case,
- * use the multiEditor ActionBarContributor.
+ * The actionBarContributor associated to the site. Can be null. In this
+ * case, use the multiEditor ActionBarContributor.
*/
protected EditorActionBarContributor actionBarContributor;
@@ -154,9 +153,8 @@ public class MultiPageEditorSite implements IEditorSite, INestable {
}
/**
- * Return the EditorSite of the main editor.
- * This is the same object as getMainEditorSite.
- * TODO: Remove this one.
+ * Return the EditorSite of the main editor. This is the same object as
+ * getMainEditorSite. TODO: Remove this one.
*
* @return
*/
@@ -211,7 +209,7 @@ public class MultiPageEditorSite implements IEditorSite, INestable {
nestableParent.removeKeyBindingService(this);
}
// TODO : dispose service ?
-
+
service = null;
}
@@ -221,30 +219,34 @@ public class MultiPageEditorSite implements IEditorSite, INestable {
}
/**
- * The <code>MultiPageEditorSite</code> implementation of this <code>IEditorSite</code> method returns the EditorActionBarContributor associated
- * to the site if one is defined,
- * or the EditorActionBarContributor of the multiEditor.
+ * The <code>MultiPageEditorSite</code> implementation of this <code>IEditorSite</code> method returns the EditorActionBarContributor
+ * associated to the site if one is defined, or the
+ * EditorActionBarContributor of the multiEditor.
*
* @return <code>null</code>
*/
public IEditorActionBarContributor getActionBarContributor() {
- // If we use an action bar contributor, look for a registered ActionBarContributor.
+ // If we use an action bar contributor, look for a registered
+ // ActionBarContributor.
// TODO : enable next asap
- // ActionBarContributor contributor = multiPageEditor.getEditorSite().getActionBarContributor();
- // if(contributor instanceof ComposedActionBarContributor)
- // {
- // ComposedActionBarContributor composedContributor = (ComposedActionBarContributor)contributor;
- // return composedContributor.getContributorFor(editor);
- // }
-
- // Return the main ActionBarContributor, usually ComposedActionBarContributor
+ // ActionBarContributor contributor =
+ // multiPageEditor.getEditorSite().getActionBarContributor();
+ // if(contributor instanceof ComposedActionBarContributor)
+ // {
+ // ComposedActionBarContributor composedContributor =
+ // (ComposedActionBarContributor)contributor;
+ // return composedContributor.getContributorFor(editor);
+ // }
+
+ // Return the main ActionBarContributor, usually
+ // ComposedActionBarContributor
if(actionBarContributor != null)
return actionBarContributor;
else
return getMainEditorEditorSite().getActionBarContributor();
- // return null;
+ // return null;
}
/**
@@ -312,8 +314,7 @@ public class MultiPageEditorSite implements IEditorSite, INestable {
* client code. If you are thinking of copying this, DON'T DO
* IT.
*/
- WorkbenchPlugin
- .log("MultiPageEditorSite.getKeyBindingService() Parent key binding service was not an instance of INestableKeyBindingService. It was an instance of " + service.getClass().getName() + " instead."); //$NON-NLS-1$ //$NON-NLS-2$
+ WorkbenchPlugin.log("MultiPageEditorSite.getKeyBindingService() Parent key binding service was not an instance of INestableKeyBindingService. It was an instance of " + service.getClass().getName() + " instead."); //$NON-NLS-1$ //$NON-NLS-2$
}
}
return service;
@@ -440,7 +441,7 @@ public class MultiPageEditorSite implements IEditorSite, INestable {
*/
protected void handlePostSelectionChanged(SelectionChangedEvent event) {
ISelectionProvider parentProvider = getMainEditorSite().getSelectionProvider();
-
+
// TODO : use org.eclipse.ui.part.MultiPageSelectionProvider ?
if(parentProvider instanceof MultiPageSelectionProvider) {
SelectionChangedEvent newEvent = new SelectionChangedEvent(parentProvider, event.getSelection());
@@ -530,13 +531,13 @@ public class MultiPageEditorSite implements IEditorSite, INestable {
ISelectionProvider oldSelectionProvider = selectionProvider;
selectionProvider = provider;
if(oldSelectionProvider != null) {
- //see code WindowSelectionService (line287)
- // in some case as GraphicalView do not implement IPostSelectionProvider
+ // see code WindowSelectionService (line287)
+ // in some case as GraphicalView do not implement
+ // IPostSelectionProvider
oldSelectionProvider.removeSelectionChangedListener(getSelectionChangedListener());
if(oldSelectionProvider instanceof IPostSelectionProvider) {
((IPostSelectionProvider)oldSelectionProvider).removePostSelectionChangedListener(getPostSelectionChangedListener());
- }
- else{
+ } else {
oldSelectionProvider.removeSelectionChangedListener(getPostSelectionChangedListener());
}
}
@@ -544,10 +545,9 @@ public class MultiPageEditorSite implements IEditorSite, INestable {
selectionProvider.addSelectionChangedListener(getSelectionChangedListener());
if(selectionProvider instanceof IPostSelectionProvider) {
((IPostSelectionProvider)selectionProvider).addPostSelectionChangedListener(getPostSelectionChangedListener());
- }
- else{
+ } else {
selectionProvider.addSelectionChangedListener(getPostSelectionChangedListener());
-
+
}
}
}
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/eclipsecopy/MultiPageSelectionProvider.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/eclipsecopy/MultiPageSelectionProvider.java
index e8cae5303d2..3b6c9bed10c 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/eclipsecopy/MultiPageSelectionProvider.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/internal/eclipsecopy/MultiPageSelectionProvider.java
@@ -24,9 +24,9 @@ import org.eclipse.papyrus.sasheditor.editor.IMultiPageEditorPart;
import org.eclipse.ui.IEditorPart;
/**
- * Manages the current selection in a multi-page editor by tracking the active nested editor within the multi-page editor. When the selection changes,
- * notifications are sent to all registered
- * listeners.
+ * Manages the current selection in a multi-page editor by tracking the active
+ * nested editor within the multi-page editor. When the selection changes,
+ * notifications are sent to all registered listeners.
* <p>
* This class may be instantiated; it is not intended to be subclassed. The base implementation of <code>MultiPageEditor.init</code> creates an
* instance of this class.
@@ -70,7 +70,8 @@ public class MultiPageSelectionProvider implements IPostSelectionProvider {
}
/**
- * Adds a listener for post selection changes in this multi page selection provider.
+ * Adds a listener for post selection changes in this multi page selection
+ * provider.
*
* @param listener
* a selection changed listener
@@ -81,7 +82,8 @@ public class MultiPageSelectionProvider implements IPostSelectionProvider {
}
/**
- * Notifies all registered selection changed listeners that the editor's selection has changed. Only listeners registered at the time this method
+ * Notifies all registered selection changed listeners that the editor's
+ * selection has changed. Only listeners registered at the time this method
* is called are notified.
*
* @param event
@@ -93,7 +95,8 @@ public class MultiPageSelectionProvider implements IPostSelectionProvider {
}
/**
- * Notifies all post selection changed listeners that the editor's selection has changed.
+ * Notifies all post selection changed listeners that the editor's selection
+ * has changed.
*
* @param event
* the event to propogate.
@@ -116,14 +119,14 @@ public class MultiPageSelectionProvider implements IPostSelectionProvider {
}
}
- // /**
- // * Returns the multi-page editor.
- // *
- // * @return the multi-page editor.
- // */
- // private IMultiPageEditorPart getMultiPageEditor() {
- // return multiPageEditor;
- // }
+ // /**
+ // * Returns the multi-page editor.
+ // *
+ // * @return the multi-page editor.
+ // */
+ // private IMultiPageEditorPart getMultiPageEditor() {
+ // return multiPageEditor;
+ // }
/*
* (non-Javadoc) Method declared on <code>ISelectionProvider</code>.
@@ -147,7 +150,8 @@ public class MultiPageSelectionProvider implements IPostSelectionProvider {
}
/**
- * Removes a listener for post selection changes in this multi page selection provider.
+ * Removes a listener for post selection changes in this multi page
+ * selection provider.
*
* @param listener
* a selection changed listener
diff --git a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/multipage/editor/MultiPageEditor.java b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/multipage/editor/MultiPageEditor.java
index 5d3a57cc111..c685998fdf0 100644
--- a/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/multipage/editor/MultiPageEditor.java
+++ b/plugins/core/org.eclipse.papyrus.sasheditor/src/org/eclipse/papyrus/sasheditor/multipage/editor/MultiPageEditor.java
@@ -34,19 +34,19 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.part.MultiPageEditorPart;
/**
- * A MultiPageEditor implementation accepting IMultiSashContentProvider as content provider.
- * This implementation extends the regular eclipse MultiPageEditorPart.
- * The refresh() method allows to refresh the tabs.
+ * A MultiPageEditor implementation accepting IMultiSashContentProvider as
+ * content provider. This implementation extends the regular eclipse
+ * MultiPageEditorPart. The refresh() method allows to refresh the tabs.
*
- * The implementation do not listen on model change. This can be done by subclasses.
- * To add a new tab, one should add it as a model in the ContentProvider. The addPage()
- * methods should not be used for this purpose.
+ * The implementation do not listen on model change. This can be done by
+ * subclasses. To add a new tab, one should add it as a model in the
+ * ContentProvider. The addPage() methods should not be used for this purpose.
*
- * This implementation is intended for debug and testing purpose : it can be used in place
- * of the AbstractMultiPageSashEditor. It takes the same arguments and ContentProvider, but
- * it only allows one folder and don't deal with multisashes.
- * Also, the implementation use the regular Eclipse EditorSite management. This allows to check for problems from this
- * site management.
+ * This implementation is intended for debug and testing purpose : it can be
+ * used in place of the AbstractMultiPageSashEditor. It takes the same arguments
+ * and ContentProvider, but it only allows one folder and don't deal with
+ * multisashes. Also, the implementation use the regular Eclipse EditorSite
+ * management. This allows to check for problems from this site management.
*
* @author dumoulin
*/
@@ -74,9 +74,8 @@ public abstract class MultiPageEditor extends MultiPageEditorPart {
}
/**
- * This method is called at the end of createPartControl().
- * Just intercept the call in order to call activate().
- * Create the part controls. {@inheritDoc}
+ * This method is called at the end of createPartControl(). Just intercept
+ * the call in order to call activate(). Create the part controls. {@inheritDoc}
*/
@Override
protected void initializePageSwitching() {
@@ -86,18 +85,17 @@ public abstract class MultiPageEditor extends MultiPageEditorPart {
}
/**
- * Method to activate the editor.
- * Called immediately after createPartControl() is complete.
- * To be implemented by subclasses. Default implementation do nothing.
+ * Method to activate the editor. Called immediately after
+ * createPartControl() is complete. To be implemented by subclasses. Default
+ * implementation do nothing.
*/
protected void activate() {
}
/**
- * Method to deactivate the editor.
- * Called when dispose() is called.
- * To be implemented by subclasses. Default implementation do nothing.
+ * Method to deactivate the editor. Called when dispose() is called. To be
+ * implemented by subclasses. Default implementation do nothing.
*/
protected void deactivate() {
@@ -113,7 +111,7 @@ public abstract class MultiPageEditor extends MultiPageEditorPart {
public void dispose() {
deactivate();
super.dispose();
- // sashContainer.dispose();
+ // sashContainer.dispose();
}
@Override
@@ -138,8 +136,6 @@ public abstract class MultiPageEditor extends MultiPageEditorPart {
return pageProvider;
}
-
-
/**
* @param pageProvider
* the pageProvider to set
@@ -179,11 +175,7 @@ public abstract class MultiPageEditor extends MultiPageEditorPart {
setPageImage(index, image);
return index;
} catch (PartInitException e) {
- ErrorDialog.openError(
- getSite().getShell(),
- "Error creating nested text editor",
- null,
- e.getStatus());
+ ErrorDialog.openError(getSite().getShell(), "Error creating nested text editor", null, e.getStatus());
return -1;
}
@@ -196,29 +188,31 @@ public abstract class MultiPageEditor extends MultiPageEditorPart {
// get the page descriptions
pageProvider = getContentProvider();
// Get the current tabFolder
- //
+ //
tabFolderModel = lookupFolder();
refreshTabs();
- // // iterate over pages to be show
- // for( Object rawPageModel : tabFolderModel.getChildren() )
- // {
- // // Get the model interface
- // ITabItemModel tabItem = tabFolderModel.createChildSashModel( rawPageModel);
- // if(tabItem instanceof IEditorModel )
- // {
- // addPage((IEditorModel)tabItem );
- // }
- // else if(tabItem instanceof IComponentModel )
- // {
- // addPage((IComponentModel)tabItem );
- // }
- // else
- // {
- // System.err.println("Can't create page for model '" + tabItem + "'. Skipp it.");
- // }
- // }
+ // // iterate over pages to be show
+ // for( Object rawPageModel : tabFolderModel.getChildren() )
+ // {
+ // // Get the model interface
+ // ITabItemModel tabItem = tabFolderModel.createChildSashModel(
+ // rawPageModel);
+ // if(tabItem instanceof IEditorModel )
+ // {
+ // addPage((IEditorModel)tabItem );
+ // }
+ // else if(tabItem instanceof IComponentModel )
+ // {
+ // addPage((IComponentModel)tabItem );
+ // }
+ // else
+ // {
+ // System.err.println("Can't create page for model '" + tabItem +
+ // "'. Skipp it.");
+ // }
+ // }
}
/**
@@ -237,8 +231,8 @@ public abstract class MultiPageEditor extends MultiPageEditorPart {
}
/**
- * Recursively search in sash models for a FolderModel.
- * Return the first encountered folder.
+ * Recursively search in sash models for a FolderModel. Return the first
+ * encountered folder.
*
* @param panelModel
* @return
@@ -262,21 +256,22 @@ public abstract class MultiPageEditor extends MultiPageEditorPart {
}
/**
- * Create the provider.
- * Subclass must implements this method. It should return the provider used by the editor.
+ * Create the provider. Subclass must implements this method. It should
+ * return the provider used by the editor.
*
*/
abstract protected ISashWindowsContentProvider createPageProvider();
/**
- * Refresh the tabs order.
- * This method should be called after the model list is modified.
+ * Refresh the tabs order. This method should be called after the model list
+ * is modified.
*/
protected void refreshTabs() {
// get list of diagrams to be displayed
List<?> newModels = tabFolderModel.getChildren();
- // Check if each model has an open pageEditor. If not, create the editor.
+ // Check if each model has an open pageEditor. If not, create the
+ // editor.
Iterator<?> newIter = newModels.iterator();
while(newIter.hasNext()) {
Object model = newIter.next();
@@ -285,7 +280,7 @@ public abstract class MultiPageEditor extends MultiPageEditorPart {
}
}
- // If open editor count is the same has models count,
+ // If open editor count is the same has models count,
// all models have an editor. So, end the refresh process.
if(newModels.size() == getPageCount())
return;
@@ -325,7 +320,6 @@ public abstract class MultiPageEditor extends MultiPageEditorPart {
return false;
}
-
/*
* (non-Javadoc)
*
@@ -350,8 +344,8 @@ public abstract class MultiPageEditor extends MultiPageEditorPart {
}
/**
- * Add a new editor at the end of existing editors.
- * First, create the editor, then add it to the tabs.
+ * Add a new editor at the end of existing editors. First, create the
+ * editor, then add it to the tabs.
*
* @param contentProvider
* the diagram (model) to be displayed in the editor
@@ -376,10 +370,9 @@ public abstract class MultiPageEditor extends MultiPageEditorPart {
// Add the model in the list of current tabs.
currentTabs.add(tabItem);
- // set active page
+ // set active page
setActivePage(editorIndex);
}
-
}

Back to the top