Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/Messages.java34
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/AbstractAction.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/AbstractShowHideAction.java42
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/FilterViewsLabelsAction.java11
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/FilterViewsLabelsPopupMenuContributionPolicy.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/PasteWithModelAction.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/ShowHideContentsAction.java97
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/handlers/AbstractShowHideHandler.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/handlers/ClipboardActionHandler.java55
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/handlers/ClipboardActionHandlerProvider.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/CommandProxyWithResult.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/EMFtoGEFCommandWrapper.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/EMFtoGMFCommandWrapper.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/GEFtoEMFCommandWrapper.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/GMFtoEMFCommandWrapper.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/AbstractCommonTransactionalCommmand.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/AddEObjectReferencesToDiagram.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/AnnotateNodeStyleCommand.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ChangeZOrderOfCreatedEP.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CleanDiagram.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CommonDeferredCreateConnectionViewCommand.java18
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateBehavioredClassifierDiagramCommand.java42
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateElementAndInitializeFeatureCommand.java14
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateHyperLinkDiagramCommand.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateHyperLinkDocumentCommand.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateHyperLinkWebCommand.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateUMLModelCommand.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DefferedAppliedStereotypeToDisplayCommand.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DeleteHyperLinkDiagramCommand.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DeleteHyperLinkDocumentCommand.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DeleteLinkDuringCreationCommand.java33
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DestroyElementPapyrusCommand.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DuplicateNamedElementCommand.java9
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/EObjectInheritanceCopyCommand.java15
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/EmptyAllHyperLinkCommand.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/FixPortLocationCommand.java11
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/GMFToEMFCommand.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/PapyrusDuplicateViewsCommand.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/PreserveAnchorsPositionCommand.java52
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/RemoveEObjectReferencesFromDiagram.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/RemoveValueCommand.java11
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/RemoveValueRequest.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/SemanticAdapter.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideCompartmentRequest.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideConnectionLabelsRequest.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideElementsRequest.java9
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideLabelsRequest.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/SupplementCommand.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/UpdateLifelineRepresentsCommand.java11
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/UpdatePortLocationCommand.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/setLayoutKindCommand.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/AbstractCheckedTreeColumnViewerSelectionDialog.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/CustomCheckedTreeSelectionDialog.java9
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/DiagramNavigationDialog.java60
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/SelectModelElementsForDiagramDialog.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/FigureControler.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/ILabelControler.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/LabelDirectEditManager.java11
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/MultiLineCellEditor.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/MultilineLabelDirectEditManager.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/PropertyAccessor.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/TextFlowCellEditorLocator.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LaneLayout.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LeftToolbarLayout.java87
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LifelineDotLineFigure.java22
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LinesBorder.java29
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/ManuallyDrawnShortcutDecorator.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/PileLayout.java14
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/RoundedRectangleDashedBorder.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/SplitEllipseLayout.java32
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/anchors/FixedAnchor.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/anchors/LifelineAnchor.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/AbstractLabelEditPart.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/AbstractShapeEditPart.java25
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/AbstractShortCutDiagramEditPart.java26
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/CompositeEditPart.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/DeploymentNodeEditPart.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/IEditpartListenerAccess.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/ILabelRoleProvider.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/IUMLEditPart.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/NamedElementEditPart.java9
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/PapyrusStereotypeListener.java40
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/PrimaryShapeEditPart.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/ResizeableListCompartmentEditPart.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/UMLCompartmentEditPart.java20
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/UMLConnectionNodeEditPart.java45
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/UMLNodeEditPart.java22
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AbstractAppliedStereotypeDisplayEditPolicy.java28
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AbstractMaskManagedEditPolicy.java31
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AffixedNodeAlignmentEditPolicy.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeAbstractionLabelDisplayEditPolicy.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeExternalNodeEditPolicy.java21
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeIconlDisplayEditPolicy.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeLabelDisplayEditPolicy.java67
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeLinkLabelDisplayEditPolicy.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeNodeLabelDisplayEditPolicy.java35
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypePackageImportLabelDisplayEditPolicy.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypePackageMergeLabelDisplayEditPolicy.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeUsageLabelDisplayEditPolicy.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ApplyStereotypeEditPolicy.java27
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/BorderItemResizableEditPolicy.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CResizableCompartmentEditPolicy.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CommonDiagramDragDropEditPolicy.java102
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ConstrainedItemBorderLayoutEditPolicy.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CustomConnectionLabelsEditPolicy.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CustomContainerEditPolicy.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DeleteOnlyViewComponentEditPolicy.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DiagramDragDropEditPolicy.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DragDropEditPolicy.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DuplicatePasteEditPolicy.java42
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ExtendedDirectEditPolicy.java14
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/HyperLinkPopupBarEditPolicy.java61
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/IDirectEdition.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/IMaskManagedLabelEditPolicy.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/NavigationEditPolicy.java48
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/OldCommonDiagramDragDropEditPolicy.java449
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/OrphanViewPolicy.java105
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/PapyrusCreationEditPolicy.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/QualifiedNameDisplayEditPolicy.java12
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShortCutDiagramEditPolicy.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideClassifierContentsEditPolicy.java16
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideCompartmentEditPolicy.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideLabelEditPolicy.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideRelatedContentsEditPolicy.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowViewEditPolicy.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/UMLBaseItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/edge/CAssociationFigure.java49
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/edge/DashedEdgeFigure.java16
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/edge/UMLEdgeFigure.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/layout/AutomaticCompartmentToolBox.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/layout/ILayoutToolBox.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/layout/PropertiesCompartmentLayoutManager.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/AffixedNamedElementFigure.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java26
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/CenteredWrappedLabel.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ClassifierFigure.java35
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ConstraintFigure.java16
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ContainerBorder.java17
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/CornerBentFigure.java15
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/DiagramNodeFigure.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/DiamondNode.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/FinalNode.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/FlowFinalNode.java9
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ForkNode.java9
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/HTMLCommentParser.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/HTMLCornerBentBodyFigure.java14
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/HTMLCornerBentFigure.java34
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/IAbstractElementFigure.java11
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ILabelFigure.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/IMultilineEditableFigure.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/IPapyrusNodeUMLElementFigure.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ManualCompartmentLayoutManager.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/NodeNamedElementFigure.java114
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/OLDCompartmentFigure.java12
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PackageFigure.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PackageNodePlateFigure.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusNodeFigure.java31
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusReceiveNodeFigure.java11
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusRoundedNodeFigure.java11
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusSendNodeFigure.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusSendNodeShadowBorder.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PrimitiveTypeFigure.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ProfileFigure.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/Rectangular3DBorder.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/RoundedRectangleDashedShadowBorder.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ShapeNamedElementFigure.java20
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/StereotypePropertiesCompartment.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/SubCompartmentLayoutManager.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/DeleteFromDiagramCommandHandler.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/DeleteFromModelCommandHandler.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/GraphicalCommandHandler.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/LoadHandler.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/ParametricAndListeningHandler.java20
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/PasteWithModelHandler.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/RenamedElementHandler.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/UnloadHandler.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/AbstractHyperLinkHelper.java29
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/AlignmentLinkHelper.java40
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/AssociationHelper.java9
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/BasicClassifierCompartmentLayoutHelper.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/CleanDiagramHelper.java11
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/DocumentHyperLinkHelper.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/DurationConstraintHelper.java12
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/DurationObservationHelper.java9
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/HyperlinkHelperFactory.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/InteractionFragmentHelper.java22
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/LinkMappingHelper.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/OperationLabelHelper.java11
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/PreferenceInitializerForElementHelper.java21
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/PropertyLabelHelper.java11
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/StereotypeFigureHelper.java38
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/StereotypedElementLabelHelper.java74
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/AlignmentTree.java31
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/DistributionConstants.java23
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/DistributionTree.java9
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/EditPartRepresentation.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/EditPartTree.java91
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LayoutUtils.java271
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LinkRepresentation.java90
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LinkRepresentationForLayoutAction.java42
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/OverlayLocator.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/RoutingConstants.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/SameAlignment.java48
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/listeners/DropTargetListener.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/listeners/RemoveStereotypeApplicationListener.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/AdvancedBorderItemLocator.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/ExternalLabelPositionLocator.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/PortPositionLocatorUtils.java31
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/TemplateBorderItemLocator.java14
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/CommentParser.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/ConstraintParser.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/HTMLCleaner.java17
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/assist/EObjectCompletionProcessor.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/custom/AbstractAssociationEndParser.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/custom/AssociationEndParser.java17
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/custom/AssociationMultiplicityParser.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/lookup/DefaultOclLookups.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/CachedResourcesDiagramEditor.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/CachedResourcesDocumentProvider.java18
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/CreateLinkToolBase.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/DiagramCanvasSwitch.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/EditingDomainRegistry.java24
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PaletteMenuAction.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PaletteUtil.java23
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteContextMenuProvider.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteCustomizer.java81
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteEntryState.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPalettePreferences.java36
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteViewer.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/UMLDiagramActionBarContributor.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/UmlGmfDiagramEditor.java19
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/preferences/UMLPreferencesConstants.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/AbstractActionStateSourceProvider.java34
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/ActionStateSourceProvider.java21
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/BaseViewInfo.java14
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/BaseViewInfoContentProvider.java20
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/BaseViewInfoLabelProvider.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/EditorLabelProvider.java60
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/PapyrusDiagramGlobalActionHandler.java26
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/PapyrusGlobalActionHandlerProvider.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/UIAdapterImpl.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/assistant/ModelingAssistantRegistry.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/PartActivationListener.java38
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/ResourceUpdateService.java46
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/SaveListener.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/ApplyStereotypeRequest.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/AspectCreationEntry.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/AspectUnspecifiedTypeConnectionTool.java116
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/AspectUnspecifiedTypeCreationTool.java14
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/ExtendedPaletteProviderConfiguration.java15
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/IProfileDependantPaletteProvider.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/InheritedDecorator.java139
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/InheritedDecoratorProvider.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/LocalPaletteProvider.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/PaletteProfileApplicationListener.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/PapyrusPaletteService.java104
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/PluginPaletteProvider.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLDefinitionPaletteFactory.java24
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLDefinitionPaletteParser.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLPaletteProviderConfiguration.java28
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLRequiredProfileFactory.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AbstractAspectActionProvider.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AspectActionFactoryRegistry.java22
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AspectToolProviderConfiguration.java11
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AspectToolService.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AssociationEndAspectActionProvider.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AssociationEndPostAction.java44
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/ChangeStereotypeDisplayAspectActionProvider.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/ChangeStereotypeDisplayPostAction.java14
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/Configuration.java110
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DefinedPropertiesAtRuntimeDialog.java26
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DisplayAppliedStereotypeAspectActionProvider.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DisplayAppliedStereotypePostAction.java22
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DynamicConfigureRequest.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/GetAllAspectToolProvidersOperation.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/GetAspectToolProviderOperation.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/GraphicalPostAction.java14
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IAspectAction.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IAspectActionProvider.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IAspectToolProviderService.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IFeatureSetterAspectAction.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPaletteAspectToolEntryProxy.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPaletteEntryProxy.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPostAction.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPreAction.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/ModelPostAction.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/PropertyRepresentation.java66
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/SemanticPostAction.java34
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/SetDynamicValueCommand.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/StereotypeAspectActionProvider.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/StereotypePostAction.java322
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/StereotypeRepresentation.java35
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/Value.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/sheet/UMLPropertySection.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/sheet/UMLPropertySource.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/AbstractChooseElement.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/ComboDialogWithMessage.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/ComboInputDialog.java9
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/InputDialog.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/InputDialogMessage.java14
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/PropertyEditors.java83
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/helper/HelpComponentFactory.java19
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/helper/HelpDialog.java11
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractEditHyperlinkDiagramShell.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractEditHyperlinkDocumentShell.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractEditHyperlinkShell.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractLookForDiagramShell.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/CustomAdapterFactoryContentProvider.java12
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/DownElementListener.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/EditorHyperlinkDiagramShell.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/EditorHyperlinkWebShell.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/EditorLookForDiagram.java27
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/HyperLinkContentProvider.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/HyperLinkDiagram.java15
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/HyperLinkLabelProvider.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ColorManager.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CompartmentTitleRepresentation.java13
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CompartmentUtils.java20
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CrossReferencerUtil.java12
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/DiagramEditPartsUtil.java16
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/DiagramTester.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/EcoreSwitch.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ExtensionPointParser.java35
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/FontManager.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/MDTUtil.java32
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/MultiDiagramUtil.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/PathsUtil.java3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ServiceUtilsForGMF.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/StringComparator.java1
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/Util.java45
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ViewServiceUtil.java15
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/Visitor.java11
590 files changed, 10082 insertions, 8386 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);
}
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/Messages.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/Messages.java
index 845ad0df7ce..cd2f3265f6f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/Messages.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/Messages.java
@@ -73,10 +73,15 @@ public class Messages extends NLS {
/** Label to be displayed on {@link org.eclipse.uml2.uml.Abstraction} links */
public static String AppliedStereotypeLabel_AbstractionTag;
- /** Label to be displayed on {@link org.eclipse.uml2.uml.PackageImport} links */
+ /**
+ * Label to be displayed on {@link org.eclipse.uml2.uml.PackageImport} links
+ */
public static String AppliedStereotypeLabel_PackageImportTag;
- /** Label to be displayed on {@link org.eclipse.uml2.uml.PackageImport} links with reduced visibility */
+ /**
+ * Label to be displayed on {@link org.eclipse.uml2.uml.PackageImport} links
+ * with reduced visibility
+ */
public static String AppliedStereotypeLabel_PackageImportAccessTag;
/** Label to be displayed on {@link org.eclipse.uml2.uml.PackageMerge} links */
@@ -85,7 +90,8 @@ public class Messages extends NLS {
/** Label to be displayed on {@link org.eclipse.uml2.uml.Usage} links */
public static String AppliedStereotypeLabel_UsageTag;
- // ///////////////////////// Palette Customisation /////////////////////////////////////
+ // ///////////////////////// Palette Customisation
+ // /////////////////////////////////////
/** Tooltip for the add button */
public static String PapyrusPaletteCustomizerDialog_AddButtonTooltip;
@@ -131,8 +137,6 @@ public class Messages extends NLS {
/** tooltip for the provider priority in the palette wizard */
public static String Local_Palette_Priority_Tooltip;
-
-
/** label for the advanced button, when advanced are not shown */
public static String Dialog_Advanced_Button_Closed;
@@ -142,13 +146,18 @@ public class Messages extends NLS {
/** Error message for the wizard page, when priority is not correctly filled */
public static String Local_Palette_Error_Priority;
- /** Error message for the wizard page, when palette ID is not correctly filled */
+ /**
+ * Error message for the wizard page, when palette ID is not correctly
+ * filled
+ */
public static String Local_Palette_Error_PaletteId;
/** Error message for the wizard page, when name is not correctly filled */
public static String Local_Palette_Error_Name;
- /** Error message for the wizard page, when Editor ID is not correctly filled */
+ /**
+ * Error message for the wizard page, when Editor ID is not correctly filled
+ */
public static String Local_Palette_Error_EditorId;
/** Name of the information page */
@@ -253,13 +262,19 @@ public class Messages extends NLS {
/** tooltip for the disabled action because of missing profiles */
public static String PaletteContextMenu_MissingProfile;
- /** tooltip for the edit local palette action disabled because of bad selection */
+ /**
+ * tooltip for the edit local palette action disabled because of bad
+ * selection
+ */
public static String PapyrusPaletteCustomizerDialog_EditButtonTooltip_LocalPaletteNotSelected;
/** tooltip for the edit local palette action */
public static String PapyrusPaletteCustomizerDialog_EditButtonTooltip_LocalPaletteSelected;
- /** tooltip for the edit local palette action disabled because of missing profiles */
+ /**
+ * tooltip for the edit local palette action disabled because of missing
+ * profiles
+ */
public static String PapyrusPaletteCustomizerDialog_EditButtonTooltip_MissingProfile;
/** label for the name text editor for a given proxy */
@@ -382,7 +397,6 @@ public class Messages extends NLS {
/** The string No Name for the ShowHideCompartment Action */
public static String EditorLabelProvider_No_name;
-
public static String ShowHideContentsAction_Message;
public static String ShowHideContentsAction_Title;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/AbstractAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/AbstractAction.java
index 2cca59a1fb1..d85dedd9bf0 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/AbstractAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/AbstractAction.java
@@ -27,8 +27,8 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
/**
- * This class is the common base for actions. It provide helper to access to current diagram and
- * selection.
+ * This class is the common base for actions. It provide helper to access to
+ * current diagram and selection.
*
* @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
*/
@@ -38,8 +38,8 @@ public abstract class AbstractAction extends Action {
private IGraphicalEditPart host;
/**
- * @return the current diagram or null if not found. TODO : throw appropriate exception if not
- * found ?
+ * @return the current diagram or null if not found. TODO : throw
+ * appropriate exception if not found ?
*/
protected Diagram getCurrentDiagram() {
IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/AbstractShowHideAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/AbstractShowHideAction.java
index 21728dbccb4..92f5a0dce12 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/AbstractShowHideAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/AbstractShowHideAction.java
@@ -14,7 +14,6 @@ package org.eclipse.papyrus.diagram.common.actions;
*
*****************************************************************************/
-
import java.util.ArrayList;
import java.util.List;
@@ -147,7 +146,7 @@ public abstract class AbstractShowHideAction implements IActionDelegate, IWorkbe
public void run() {
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- //executing the command
+ // executing the command
public void run() {
domain.getCommandStack().execute(new GEFtoEMFCommandWrapper(command));
}
@@ -174,11 +173,10 @@ public abstract class AbstractShowHideAction implements IActionDelegate, IWorkbe
/**
*
- * Test if the action can be run!
- * Useful when we press F4 and it's the first action in Papyrus
+ * Test if the action can be run! Useful when we press F4 and it's the first
+ * action in Papyrus
*
- * @return
- * if the action can be run or not
+ * @return if the action can be run or not
*/
public boolean canRun() {
@@ -196,7 +194,6 @@ public abstract class AbstractShowHideAction implements IActionDelegate, IWorkbe
}
}
-
return true;
}
@@ -247,12 +244,10 @@ public abstract class AbstractShowHideAction implements IActionDelegate, IWorkbe
this.representations = new ArrayList<AbstractShowHideAction.EditPartRepresentation>();
}
-
/**
* Returns the initial selection for the Tree Dialog.
*
- * @return
- * The initial selection for the Tree Dialog
+ * @return The initial selection for the Tree Dialog
*/
public List<Object> getInitialSelection() {
return this.initialSelection;
@@ -272,13 +267,13 @@ public abstract class AbstractShowHideAction implements IActionDelegate, IWorkbe
/**
* Returns the input for the TreeDialog
*
- * @return
- * the input for the TreeDialog
+ * @return the input for the TreeDialog
*/
abstract protected List<Object> getInput();
/**
- * Fill the following fields with the elements to show and the elements to hide
+ * Fill the following fields with the elements to show and the elements to
+ * hide
* <ul>
* <li>{@link #viewsToCreate}</li>
* <li> {@link #viewsToDestroy}</li>
@@ -295,8 +290,7 @@ public abstract class AbstractShowHideAction implements IActionDelegate, IWorkbe
/**
* Returns the command done by this action
*
- * @return
- * the command done by this action
+ * @return the command done by this action
*/
abstract protected Command getActionCommand();
@@ -315,9 +309,9 @@ public abstract class AbstractShowHideAction implements IActionDelegate, IWorkbe
}
/**
- * Setter for {@link #selectedElements}.
- * When this action is called by a popup menu, {@link #selectedElements} is filled by {@link #selectionChanged(IAction, ISelection)} When this
- * action is called by a Handler, {@link #selectedElements} is filled with this method
+ * Setter for {@link #selectedElements}. When this action is called by a
+ * popup menu, {@link #selectedElements} is filled by {@link #selectionChanged(IAction, ISelection)} When this action is called
+ * by a Handler, {@link #selectedElements} is filled with this method
*
* @param selection
* the current selection
@@ -374,8 +368,7 @@ public abstract class AbstractShowHideAction implements IActionDelegate, IWorkbe
/**
* Getter for {@link #representedEditPart}
*
- * @return
- * the represented editpart, {@link #representedEditPart}
+ * @return the represented editpart, {@link #representedEditPart}
*/
public EditPart getRepresentedEditPart() {
return this.representedEditPart;
@@ -384,8 +377,7 @@ public abstract class AbstractShowHideAction implements IActionDelegate, IWorkbe
/**
* Getter for {@link #UMLElement}
*
- * @return
- * {@link #UMLElement}
+ * @return {@link #UMLElement}
*/
public Element getUMLElement() {
return this.UMLElement;
@@ -394,8 +386,7 @@ public abstract class AbstractShowHideAction implements IActionDelegate, IWorkbe
/**
* Getter for {@link #initialSelection}
*
- * @return
- * {@link #initialSelection}
+ * @return {@link #initialSelection}
*/
public List<Object> getInitialSelection() {
return this.initialSelection;
@@ -416,8 +407,7 @@ public abstract class AbstractShowHideAction implements IActionDelegate, IWorkbe
/**
* Setter for {@link #elementsToSelect}
*
- * @return
- * {@link #elementsToSelect}
+ * @return {@link #elementsToSelect}
*/
public List<Object> getPossibleElement() {
return this.elementsToSelect;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/FilterViewsLabelsAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/FilterViewsLabelsAction.java
index def0c2e26e3..1e8bac93e90 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/FilterViewsLabelsAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/FilterViewsLabelsAction.java
@@ -68,7 +68,9 @@ public class FilterViewsLabelsAction extends DiagramAction {
/*
* (non-Javadoc)
*
- * @see org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction#createTargetRequest ()
+ * @see
+ * org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction#createTargetRequest
+ * ()
*/
@Override
protected Request createTargetRequest() {
@@ -78,7 +80,9 @@ public class FilterViewsLabelsAction extends DiagramAction {
/*
* (non-Javadoc)
*
- * @see org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction#isSelectionListener ()
+ * @see
+ * org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction#isSelectionListener
+ * ()
*/
@Override
protected boolean isSelectionListener() {
@@ -98,7 +102,8 @@ public class FilterViewsLabelsAction extends DiagramAction {
/*
* (non-Javadoc)
*
- * @see org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler#runWithEvent
+ * @see
+ * org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler#runWithEvent
* (org.eclipse.swt .widgets.Event)
*/
@Override
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/FilterViewsLabelsPopupMenuContributionPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/FilterViewsLabelsPopupMenuContributionPolicy.java
index 3985c678412..762853de97a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/FilterViewsLabelsPopupMenuContributionPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/FilterViewsLabelsPopupMenuContributionPolicy.java
@@ -29,8 +29,8 @@ public class FilterViewsLabelsPopupMenuContributionPolicy implements IPopupMenuC
/*
* (non-Javadoc)
*
- * @see
- * org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.IPopupMenuContributionPolicy
+ * @see org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.
+ * IPopupMenuContributionPolicy
* #appliesTo(org.eclipse.jface.viewers.ISelection,
* org.eclipse.core.runtime.IConfigurationElement)
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/PasteWithModelAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/PasteWithModelAction.java
index 5402fd60179..044f0816ee1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/PasteWithModelAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/PasteWithModelAction.java
@@ -15,7 +15,6 @@ import org.eclipse.papyrus.pastemanager.service.PasteCommandService;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
-
public class PasteWithModelAction implements IObjectActionDelegate {
protected GraphicalEditPart targetEditPart = null;
@@ -25,7 +24,7 @@ public class PasteWithModelAction implements IObjectActionDelegate {
/* Get the selected edit parts */
if(targetEditPart != null) {
- //get the paste command with model form the service
+ // get the paste command with model form the service
ICommand pastecommand = PasteCommandService.getInstance().getPasteWithModelCommand(targetEditPart, Toolkit.getDefaultToolkit().getSystemClipboard(), targetEditPart.getEditingDomain().getClipboard());
if(pastecommand.canExecute()) {
@@ -38,7 +37,6 @@ public class PasteWithModelAction implements IObjectActionDelegate {
}
}
-
public void selectionChanged(IAction action, ISelection selection) {
if(selection instanceof IStructuredSelection) {
Object selectedElement = ((IStructuredSelection)selection).getFirstElement();
@@ -49,7 +47,6 @@ public class PasteWithModelAction implements IObjectActionDelegate {
}
-
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
// TODO Auto-generated method stub
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/ShowHideContentsAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/ShowHideContentsAction.java
index bc0bfc85d19..6056b0c0d95 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/ShowHideContentsAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/ShowHideContentsAction.java
@@ -59,7 +59,8 @@ import org.eclipse.uml2.uml.Type;
/**
*
- * This class provides an action to show/hide the owned members and the inherited members for a Classifier
+ * This class provides an action to show/hide the owned members and the
+ * inherited members for a Classifier
*
*/
public class ShowHideContentsAction extends AbstractShowHideAction implements IActionDelegate, IWorkbenchWindowActionDelegate {
@@ -97,7 +98,6 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
super(title, message, editPolicyKey);
}
-
/**
*
* @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
@@ -162,7 +162,7 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
protected void initAction() {
super.initAction();
for(EditPart current : this.selectedElements) {
- //the selected elements which aren't Classifier are ignored
+ // the selected elements which aren't Classifier are ignored
if(((View)current.getModel()).getElement() instanceof Classifier) {
this.representations.add(new CustomEditPartRepresentation(current, (Classifier)((View)current.getModel()).getElement()));
}
@@ -171,7 +171,6 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
this.setContentProvider(new ContentProvider());
}
-
/**
*
* @see org.eclipse.papyrus.diagram.common.actions.AbstractShowHideAction#getInput()
@@ -188,7 +187,6 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
return list;
}
-
/**
*
* @see org.eclipse.papyrus.diagram.common.actions.AbstractShowHideAction#getActionCommand()
@@ -202,8 +200,7 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
CompoundCommand completeCmd = new CompoundCommand("Show/Hide Inherited Elements Command"); //$NON-NLS-1$
/*
- * the command to hide elements
- * we need the corresponding editpart
+ * the command to hide elements we need the corresponding editpart
*/
for(Object current : this.viewsToDestroy) {
EditPart ep = findEditPart(current);
@@ -220,7 +217,7 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
}
}
- //the command to show element
+ // the command to show element
Point propertyLocation = new Point();
Point portLocation = new Point(-10, -2 * increment + 1);
for(Object current : this.viewsToCreate) {
@@ -253,17 +250,16 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
}
/**
- * Test if the child is represented by an affixed child node
- * TODO
- * This method will not work if we have an UML element E1 which inherits from another element E2 and if E2 is represented by an affixed child node
- * and not E1!
+ * Test if the child is represented by an affixed child node TODO This
+ * method will not work if we have an UML element E1 which inherits from
+ * another element E2 and if E2 is represented by an affixed child node and
+ * not E1!
*
* @param ep
* the parent EditPart
* @param child
* the child to show
- * @return
- * <ul>
+ * @return <ul>
* <li><code>true</code> if child is represented by an affixed child node</li>
* <li> <code>false</code> if not</li>
* </ul>
@@ -274,14 +270,14 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
CreateCommand cmd = new CreateCommand(domain, viewDescriptor, (View)ep.getModel());
if(cmd.canExecute()) {
/*
- * the EditPart can own the child -> it's maybe an affixed child node
+ * the EditPart can own the child -> it's maybe an affixed child
+ * node
*/
return true;
}
return false;
}
-
/**
* Test if the layout for this compartment is a XYLayout
*
@@ -289,8 +285,7 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
* the compartment to test
* @param ep
* the editpart owning this compartment
- * @return
- * <ul>
+ * @return <ul>
* <li><code>true</code> if the layout for this compartment is a XYLayout</li>
* <li> <code>false</code> if not</li>
* </ul>
@@ -310,29 +305,27 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
return false;
}
-
/**
- * Return the EditParts owned by this EditPart.
- * When the owned EditPart is a CompartmentEditPart, we return its containing EditPart
+ * Return the EditParts owned by this EditPart. When the owned EditPart is a
+ * CompartmentEditPart, we return its containing EditPart
*
*
* @param ep
* an editpart
- * @return
- * The EditParts owned by this EditPart.
- * When the owned EditPart is a CompartmentEditPart, we return its containing EditPart
+ * @return The EditParts owned by this EditPart. When the owned EditPart is
+ * a CompartmentEditPart, we return its containing EditPart
*/
protected List<EditPart> getChildrenEditPart(EditPart ep) {
List<EditPart> children = new ArrayList<EditPart>();
List<?> tmp = ep.getChildren();
for(Object current : tmp) {
- //we don't want the compartment used for the name
+ // we don't want the compartment used for the name
if(current instanceof ITextAwareEditPart) {
continue;
- //if it's a compartment, we want it's children
+ // if it's a compartment, we want it's children
} else if(current instanceof CompartmentEditPart) {
children.addAll(((CompartmentEditPart)current).getChildren());
- //it's an affixed child node?!
+ // it's an affixed child node?!
} else {
children.add((EditPart)current);
}
@@ -348,8 +341,7 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
* an editpart
* @param child
* an object to create
- * @return
- * the compartment which allows the creation of this EObject or <code>null</code>
+ * @return the compartment which allows the creation of this EObject or <code>null</code>
*/
protected View getCompartmentForCreation(EditPart editPart, EObject child) {
if(isAffixedChildNode(editPart, child)) {
@@ -372,8 +364,7 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
* Return the EditPart owning the Object or <code>null</code>
*
* @param obj
- * @return
- * the EditPart owning the Object or <code>null</code>
+ * @return the EditPart owning the Object or <code>null</code>
*/
protected EditPart findEditPart(Object obj) {
EditPart ep = null;
@@ -405,7 +396,7 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
super.buildShowHideElementsList(results);
List<Object> result = new ArrayList<Object>();
- //we remove the EditPartRepresentation from the result
+ // we remove the EditPartRepresentation from the result
for(int i = 0; i < results.length; i++) {
if((results[i] instanceof EditPartRepresentation) || (results[i] instanceof ClassifierRepresentation)) {
continue;
@@ -414,17 +405,17 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
}
}
- //we are looking for the objects to show
+ // we are looking for the objects to show
for(Object element : result) {
if(initialSelection.contains(element)) {
- //we do nothing
+ // we do nothing
continue;
} else {
viewsToCreate.add(element);
}
}
- //we are looking for the view to destroy
+ // we are looking for the view to destroy
for(Object current : this.initialSelection) {
if(!result.contains(current)) {
viewsToDestroy.add(current);
@@ -432,15 +423,12 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
}
}
-
-
/**
* Return the editpart representation owning the element
*
* @param element
* the element which we are looking for
- * @return
- * the editpart representation owning the element
+ * @return the editpart representation owning the element
*/
protected EditPartRepresentation findEditPartRepresentation(Object element) {
for(EditPartRepresentation current : representations) {
@@ -498,7 +486,6 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
}
-
}
public class CustomComparator implements Comparator<Object> {
@@ -569,7 +556,6 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
return 0;
}
-
}
/**
@@ -698,7 +684,10 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
*/
protected class CustomEditPartRepresentation extends EditPartRepresentation {
- /** this list contains the representation of all classifier which are superclass of the classifier represented by EditPartRepresentaiton */
+ /**
+ * this list contains the representation of all classifier which are
+ * superclass of the classifier represented by EditPartRepresentaiton
+ */
protected List<ClassifierRepresentation> superClasses;
/**
@@ -727,10 +716,9 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
superClasses.add(new ClassifierRepresentation(classifier, this));
}
-
/*
- * build the list of the elements to select
- * we suggest only the elements which can be displayed in the shown compartments
+ * build the list of the elements to select we suggest only the
+ * elements which can be displayed in the shown compartments
*/
this.elementsToSelect = new ArrayList<Object>();
EList<NamedElement> members = ((Classifier)UMLElement).getMembers();
@@ -739,7 +727,7 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
if(compartment != null) {
this.elementsToSelect.add(namedElement);
- //build the initial selection
+ // build the initial selection
EList<?> childrenView = compartment.getVisibleChildren();
for(Object object : childrenView) {
if(object instanceof View) {
@@ -754,11 +742,10 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
}
}
-
/**
*
- * @return
- * a list containing the {@link ClassifierRepresentation} for each superclass of the {@link #representedEditPart}
+ * @return a list containing the {@link ClassifierRepresentation} for
+ * each superclass of the {@link #representedEditPart}
*/
public List<ClassifierRepresentation> getSuperClasses() {
return this.superClasses;
@@ -768,8 +755,9 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
/**
*
- * This class is used to do easily the difference between the nested classifiers and the superclass of the selected class in the Tree
- * The superclass are represented with this class
+ * This class is used to do easily the difference between the nested
+ * classifiers and the superclass of the selected class in the Tree The
+ * superclass are represented with this class
*/
protected class ClassifierRepresentation {
@@ -798,12 +786,10 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
return false;
}
-
/**
* Getter for {@link #representedClassifier}
*
- * @return
- * {@link #representedClassifier}
+ * @return {@link #representedClassifier}
*/
public Classifier getRepresentedClassifier() {
return this.representedClassifier;
@@ -812,8 +798,7 @@ public class ShowHideContentsAction extends AbstractShowHideAction implements IA
/**
* Getter for {@link #rep}
*
- * @return
- * {@link #rep}
+ * @return {@link #rep}
*/
public EditPartRepresentation getEditPartRepresentation() {
return this.rep;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/handlers/AbstractShowHideHandler.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/handlers/AbstractShowHideHandler.java
index 7027e3d2fc6..86d0063f36d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/handlers/AbstractShowHideHandler.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/handlers/AbstractShowHideHandler.java
@@ -28,7 +28,6 @@ import org.eclipse.papyrus.diagram.common.actions.AbstractShowHideAction;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.PlatformUI;
-
/**
*
* Abstract Handler for the ShowHideActions
@@ -69,7 +68,7 @@ abstract public class AbstractShowHideHandler extends AbstractHandler {
* @throws ExecutionException
*/
public Object execute(ExecutionEvent event) throws ExecutionException {
- // buildSelection();
+ // buildSelection();
if(!selection.isEmpty()) {
this.action.setSelection(selection);
this.action.run(null);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/handlers/ClipboardActionHandler.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/handlers/ClipboardActionHandler.java
index a98d93892cd..9d731ee50ed 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/handlers/ClipboardActionHandler.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/handlers/ClipboardActionHandler.java
@@ -63,8 +63,8 @@ import org.eclipse.ui.PlatformUI;
public/* abstract */class ClipboardActionHandler extends DiagramGlobalActionHandler {
/*
- * Specifies whether the last executed action was a cut action or not. This is needed because
- * the paste action will vary depending on it
+ * Specifies whether the last executed action was a cut action or not. This
+ * is needed because the paste action will vary depending on it
*/
/** The is cut. */
private static boolean isCut = false;
@@ -106,8 +106,10 @@ public/* abstract */class ClipboardActionHandler extends DiagramGlobalActionHand
/*
* (non-Javadoc)
*
- * @see org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
- * #canCopy(org.eclipse.gmf.runtime.common.ui.services.action.global. IGlobalActionContext)
+ * @see
+ * org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
+ * #canCopy(org.eclipse.gmf.runtime.common.ui.services.action.global.
+ * IGlobalActionContext)
*/
@Override
protected boolean canCopy(IGlobalActionContext cntxt) {
@@ -143,8 +145,10 @@ public/* abstract */class ClipboardActionHandler extends DiagramGlobalActionHand
/*
* (non-Javadoc)
*
- * @see org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
- * #canCut(org.eclipse.gmf.runtime.common.ui.services.action.global. IGlobalActionContext)
+ * @see
+ * org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
+ * #canCut(org.eclipse.gmf.runtime.common.ui.services.action.global.
+ * IGlobalActionContext)
*/
@Override
protected boolean canCut(IGlobalActionContext cntxt) {
@@ -155,8 +159,10 @@ public/* abstract */class ClipboardActionHandler extends DiagramGlobalActionHand
/*
* (non-Javadoc)
*
- * @see org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
- * #canPaste(org.eclipse.gmf.runtime.common.ui.services.action.global. IGlobalActionContext)
+ * @see
+ * org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
+ * #canPaste(org.eclipse.gmf.runtime.common.ui.services.action.global.
+ * IGlobalActionContext)
*/
@Override
protected boolean canPaste(IGlobalActionContext cntxt) {
@@ -189,8 +195,10 @@ public/* abstract */class ClipboardActionHandler extends DiagramGlobalActionHand
/*
* (non-Javadoc)
*
- * @see org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
- * #getCommand(org.eclipse.gmf.runtime.common.ui.services.action.global. IGlobalActionContext)
+ * @see
+ * org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
+ * #getCommand(org.eclipse.gmf.runtime.common.ui.services.action.global.
+ * IGlobalActionContext)
*/
@Override
public ICommand getCommand(IGlobalActionContext cntxt) {
@@ -227,10 +235,11 @@ public/* abstract */class ClipboardActionHandler extends DiagramGlobalActionHand
/*
* (non-Javadoc)
*
- * @see org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
+ * @see
+ * org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
* #getCopyCommand(org.eclipse.gmf.runtime.common.ui.services.action.global.
- * IGlobalActionContext, org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart,
- * boolean)
+ * IGlobalActionContext,
+ * org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart, boolean)
*/
@Override
protected ICommand getCopyCommand(IGlobalActionContext cntxt, IDiagramWorkbenchPart diagramPart, boolean isUndoable) {
@@ -268,8 +277,9 @@ public/* abstract */class ClipboardActionHandler extends DiagramGlobalActionHand
public void doExecute() {
/**
- * @author mgil : Don't use a different command to copy every element, use the
- * copy function from EcoreUtil
+ * @author mgil : Don't use a different command to copy
+ * every element, use the copy function from
+ * EcoreUtil
*/
ArrayList<Object> list = new ArrayList<Object>();
for(EObject eobj : eobjects2) {
@@ -294,9 +304,11 @@ public/* abstract */class ClipboardActionHandler extends DiagramGlobalActionHand
/*
* (non-Javadoc)
*
- * @see org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
+ * @see
+ * org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler
* #getCutCommand(org.eclipse.gmf.runtime.common.ui.services.action.global.
- * IGlobalActionContext, org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart)
+ * IGlobalActionContext,
+ * org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart)
*/
@Override
protected ICommand getCutCommand(IGlobalActionContext cntxt, IDiagramWorkbenchPart diagramPart) {
@@ -334,8 +346,9 @@ public/* abstract */class ClipboardActionHandler extends DiagramGlobalActionHand
public void doExecute() {
/**
- * @author mgil : Don't use a different command to copy every element, use the
- * copy function from EcoreUtil
+ * @author mgil : Don't use a different command to copy
+ * every element, use the copy function from
+ * EcoreUtil
*/
ArrayList<Object> list = new ArrayList<Object>();
for(EObject eobj : eobjects2) {
@@ -544,8 +557,8 @@ public/* abstract */class ClipboardActionHandler extends DiagramGlobalActionHand
}
/*
- * Checks if all the objects contained in the list are of the same type than the eobject passed
- * as parameter
+ * Checks if all the objects contained in the list are of the same type than
+ * the eobject passed as parameter
*/
/**
* All elements same type.
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/handlers/ClipboardActionHandlerProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/handlers/ClipboardActionHandlerProvider.java
index 2ff4af8283c..7dbaed8055d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/handlers/ClipboardActionHandlerProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/handlers/ClipboardActionHandlerProvider.java
@@ -28,7 +28,8 @@ public class ClipboardActionHandlerProvider extends AbstractGlobalActionHandlerP
private Hashtable handlerList = new Hashtable();
/**
- * Returns a global action handler that supports operations (cut, copy, and paste).
+ * Returns a global action handler that supports operations (cut, copy, and
+ * paste).
*
* @param context
* the context
@@ -45,8 +46,8 @@ public class ClipboardActionHandlerProvider extends AbstractGlobalActionHandlerP
getHandlerList().put(context.getActivePart(), getClipboardActionHandler());
/*
- * Register as a part listener so that the cache can be cleared when the part is
- * disposed
+ * Register as a part listener so that the cache can be cleared when
+ * the part is disposed
*/
context.getActivePart().getSite().getPage().addPartListener(new IPartListener() {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/CommandProxyWithResult.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/CommandProxyWithResult.java
index 679776478d8..bd913fff527 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/CommandProxyWithResult.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/CommandProxyWithResult.java
@@ -16,8 +16,8 @@ package org.eclipse.papyrus.diagram.common.command.wrappers;
import org.eclipse.gef.commands.Command;
/**
- * This command proxy wraps a GEF command into a GMF one,
- * with result stored in the CommandResult.
+ * This command proxy wraps a GEF command into a GMF one, with result stored in
+ * the CommandResult.
* @author mvelten
*
* @deprecated use {@link org.eclipse.papyrus.commands.wrappers.CommandProxyWithResult} instead
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/EMFtoGEFCommandWrapper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/EMFtoGEFCommandWrapper.java
index 593b9f4a410..8c048334291 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/EMFtoGEFCommandWrapper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/EMFtoGEFCommandWrapper.java
@@ -11,16 +11,17 @@
*******************************************************************************/
package org.eclipse.papyrus.diagram.common.command.wrappers;
-
// TODO: Auto-generated Javadoc
/**
- * A GEF Command that wraps an EMF command. Each method is redirected to the EMF one. <br>
+ * A GEF Command that wraps an EMF command. Each method is redirected to the EMF
+ * one. <br>
* Adapts an {@link org.eclipse.emf.common.command.Command EMF Command} to be a {@link org.eclipse.gef.commands.Command GEF Command}.
*
* Creation : 21 fev. 2006
*
* @deprecated use {@link org.eclipse.papyrus.commands.wrappers.EMFtoGEFCommandWrapper} instead
- * @author aarong, <a href="mailto:jacques.lescot@anyware-tech.com">Jacques LESCOT</a>
+ * @author aarong, <a href="mailto:jacques.lescot@anyware-tech.com">Jacques
+ * LESCOT</a>
*/
public class EMFtoGEFCommandWrapper extends org.eclipse.papyrus.commands.wrappers.EMFtoGEFCommandWrapper {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/EMFtoGMFCommandWrapper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/EMFtoGMFCommandWrapper.java
index 6702d2283ef..20abe6afe95 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/EMFtoGMFCommandWrapper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/EMFtoGMFCommandWrapper.java
@@ -14,7 +14,8 @@ import org.eclipse.emf.common.command.Command;
// TODO: Auto-generated Javadoc
/**
- * A GMF Command that wraps an EMF command. Each method is redirected to the EMF one.
+ * A GMF Command that wraps an EMF command. Each method is redirected to the EMF
+ * one.
*
* @deprecated use {@link org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper} instead
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/GEFtoEMFCommandWrapper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/GEFtoEMFCommandWrapper.java
index 673b026d0e2..b0cbdc506fe 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/GEFtoEMFCommandWrapper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/GEFtoEMFCommandWrapper.java
@@ -14,7 +14,8 @@ import org.eclipse.gef.commands.Command;
// TODO: Auto-generated Javadoc
/**
- * A EMF Command that wraps a GEF command. Each method is redirected to the GEF one.
+ * A EMF Command that wraps a GEF command. Each method is redirected to the GEF
+ * one.
*
* @deprecated use {@link org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper} instead
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/GMFtoEMFCommandWrapper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/GMFtoEMFCommandWrapper.java
index 24feb91eb32..2f7afa278d3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/GMFtoEMFCommandWrapper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/command/wrappers/GMFtoEMFCommandWrapper.java
@@ -14,7 +14,8 @@ import org.eclipse.gmf.runtime.common.core.command.ICommand;
// TODO: Auto-generated Javadoc
/**
- * 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/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/AbstractCommonTransactionalCommmand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/AbstractCommonTransactionalCommmand.java
index dfd2778de70..02e4c25bb27 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/AbstractCommonTransactionalCommmand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/AbstractCommonTransactionalCommmand.java
@@ -58,7 +58,8 @@ public abstract class AbstractCommonTransactionalCommmand extends AbstractTransa
}
/**
- * Execute this command in the <EditingDomain>'s <CommandStack> as a transaction.
+ * Execute this command in the <EditingDomain>'s <CommandStack> as a
+ * transaction.
*/
// @unused
public void executeInTransaction() {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/AddEObjectReferencesToDiagram.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/AddEObjectReferencesToDiagram.java
index 59d1ed84809..50a266a422f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/AddEObjectReferencesToDiagram.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/AddEObjectReferencesToDiagram.java
@@ -80,7 +80,8 @@ public class AddEObjectReferencesToDiagram extends AbstractTransactionalCommand
/*
* (non-Javadoc)
*
- * @seeorg.eclipse.gmf.runtime.emf.commands.core.command. AbstractTransactionalCommand
+ * @seeorg.eclipse.gmf.runtime.emf.commands.core.command.
+ * AbstractTransactionalCommand
* #doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor,
* org.eclipse.core.runtime.IAdaptable)
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/AnnotateNodeStyleCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/AnnotateNodeStyleCommand.java
index 485ced5f5fc..9a97f6f0a85 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/AnnotateNodeStyleCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/AnnotateNodeStyleCommand.java
@@ -25,9 +25,10 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.notation.NotationPackage;
/**
- * Command that adds an EAnnotation to the EditPart's Node in order to know which styles have been
- * changed by the user (in respect of the default style). The EAttributes stored within the
- * EAnnotation are taken into account when the EditPart's figure is refreshed.
+ * Command that adds an EAnnotation to the EditPart's Node in order to know
+ * which styles have been changed by the user (in respect of the default style).
+ * The EAttributes stored within the EAnnotation are taken into account when the
+ * EditPart's figure is refreshed.
*
* @author gmerin
*
@@ -115,7 +116,8 @@ public class AnnotateNodeStyleCommand extends AbstractCommonTransactionalCommman
}
/**
- * Adds the new style change to the EAnnotation that stores the changed styles
+ * Adds the new style change to the EAnnotation that stores the changed
+ * styles
*
* @param attribute
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ChangeZOrderOfCreatedEP.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ChangeZOrderOfCreatedEP.java
index a2311a4e733..dd24b56031e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ChangeZOrderOfCreatedEP.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ChangeZOrderOfCreatedEP.java
@@ -29,9 +29,9 @@ import org.eclipse.gmf.runtime.notation.View;
// TODO: Auto-generated Javadoc
/**
- * Command to change the ZOrdering of the new created EditPart. The possible actions are Send to
- * back, Bring to the front, Send backward and Bring forward. Check ZOrderRequest class for the list
- * of strings.
+ * Command to change the ZOrdering of the new created EditPart. The possible
+ * actions are Send to back, Bring to the front, Send backward and Bring
+ * forward. Check ZOrderRequest class for the list of strings.
*
* @author <a href="mailto:gmerin@prodevelop.es">Gabriel Merin</a>
*/
@@ -98,7 +98,8 @@ public class ChangeZOrderOfCreatedEP extends AbstractTransactionalCommand {
/*
* (non-Javadoc)
*
- * @seeorg.eclipse.gmf.runtime.emf.commands.core.command. AbstractTransactionalCommand#
+ * @seeorg.eclipse.gmf.runtime.emf.commands.core.command.
+ * AbstractTransactionalCommand#
* doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor,
* org.eclipse.core.runtime.IAdaptable)
*/
@@ -125,8 +126,8 @@ public class ChangeZOrderOfCreatedEP extends AbstractTransactionalCommand {
* @param view
* the view
*
- * @return the appropriate ZOrder command depending on the requestString passed during the
- * constructor of the class.
+ * @return the appropriate ZOrder command depending on the requestString
+ * passed during the constructor of the class.
*/
private Command getZOrderCommand(View view) {
IGraphicalEditPart newElementEP = (IGraphicalEditPart)viewer.getEditPartRegistry().get(view);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CleanDiagram.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CleanDiagram.java
index 7eeb3246319..1bd4367eeae 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CleanDiagram.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CleanDiagram.java
@@ -24,7 +24,6 @@ import org.eclipse.papyrus.diagram.common.helper.CleanDiagramHelper;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
-
/**
* The Class CleanDiagram.
*/
@@ -33,7 +32,6 @@ public class CleanDiagram implements IObjectActionDelegate {
/** The view to remove. */
protected ArrayList<View> viewToRemove = new ArrayList<View>();
-
/** The selected element. */
private DiagramEditPart selectedElement;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CommonDeferredCreateConnectionViewCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CommonDeferredCreateConnectionViewCommand.java
index 0daa9a1c731..bc4bab72c25 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CommonDeferredCreateConnectionViewCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CommonDeferredCreateConnectionViewCommand.java
@@ -66,7 +66,8 @@ public class CommonDeferredCreateConnectionViewCommand extends DeferredCreateCon
* @param preferencesHint
* the preferencehint of the diagram
* @param command
- * the command in which we look for the result for the target (may be null)
+ * the command in which we look for the result for the target
+ * (may be null)
*/
public CommonDeferredCreateConnectionViewCommand(TransactionalEditingDomain editingDomain, EObject element, IAdaptable sourceViewAdapter, IAdaptable targetViewAdapter, EditPartViewer viewer, PreferencesHint preferencesHint, ICommand command) {
super(editingDomain, element, sourceViewAdapter, targetViewAdapter, viewer, preferencesHint);
@@ -92,7 +93,8 @@ public class CommonDeferredCreateConnectionViewCommand extends DeferredCreateCon
* @param viewDescriptor
* the view descriptor
* @param command
- * the command in which we look for the result for the target (may be null)
+ * the command in which we look for the result for the target
+ * (may be null)
*/
public CommonDeferredCreateConnectionViewCommand(TransactionalEditingDomain editingDomain, String semanticHint, IAdaptable sourceViewAdapter, IAdaptable targetViewAdapter, EditPartViewer viewer, PreferencesHint preferencesHint, ConnectionViewDescriptor viewDescriptor, ICommand command) {
super(editingDomain, semanticHint, sourceViewAdapter, targetViewAdapter, viewer, preferencesHint);
@@ -110,10 +112,10 @@ public class CommonDeferredCreateConnectionViewCommand extends DeferredCreateCon
IGraphicalEditPart sourceEP = (IGraphicalEditPart)epRegistry.get(sourceViewAdapter.getAdapter(View.class));
IGraphicalEditPart targetEP = (IGraphicalEditPart)epRegistry.get(targetViewAdapter.getAdapter(View.class));
-
/*
- * when the source or the target of a link is an other link, the previous method returns something like ElementNameEditPart
- * A such EditPart does not allow to get a Command for the creation of the link
+ * when the source or the target of a link is an other link, the
+ * previous method returns something like ElementNameEditPart A such
+ * EditPart does not allow to get a Command for the creation of the link
*/
if(sourceEP instanceof LabelEditPart) {
sourceEP = findEditPartForCreation((View)sourceViewAdapter.getAdapter(View.class));
@@ -130,9 +132,9 @@ public class CommonDeferredCreateConnectionViewCommand extends DeferredCreateCon
* Returns the EditPart for the creation
*
* @param adapter
- * the view of the element for which we are looking for a valid EditPart
- * @return
- * the EditPart for the creation
+ * the view of the element for which we are looking for a valid
+ * EditPart
+ * @return the EditPart for the creation
*/
protected IGraphicalEditPart findEditPartForCreation(View view) {
Iterator<?> editPartIterator = viewer.getEditPartRegistry().values().iterator();
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateBehavioredClassifierDiagramCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateBehavioredClassifierDiagramCommand.java
index fff5979bd27..c771fbb41a5 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateBehavioredClassifierDiagramCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateBehavioredClassifierDiagramCommand.java
@@ -26,9 +26,9 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
/**
- * Define a command to create a new Behavioral Diagram. This command is used by all UI (toolbar,
- * outline, creation wizards) to create a new Behavioral Diagram.
- * This class should be extended by behavioral diagram only.
+ * Define a command to create a new Behavioral Diagram. This command is used by
+ * all UI (toolbar, outline, creation wizards) to create a new Behavioral
+ * Diagram. This class should be extended by behavioral diagram only.
*/
public abstract class CreateBehavioredClassifierDiagramCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
@@ -98,7 +98,6 @@ public abstract class CreateBehavioredClassifierDiagramCommand extends AbstractP
ViewService.getInstance().createView(Node.class, new EObjectAdapter(behavior), diagram, null, ViewUtil.APPEND, true, getPreferenceHint());
}
-
/**
* {@inheritDoc}
*/
@@ -137,24 +136,27 @@ public abstract class CreateBehavioredClassifierDiagramCommand extends AbstractP
return name;
}
- // @Override
- // protected void runAsTransaction(DiResourceSet diResourceSet, EObject container, String name) {
- // if(name == null && container instanceof NamedElement) {
- // setName(((NamedElement)container).getName());
- // if(!"".equals(getName())) {
- // // initialize name with activity's name
- // name = openDiagramNameDialog(getName());
- // if(name == null) {
- // // operation canceled
- // return;
- // }
- // }
- // }
- // super.runAsTransaction(diResourceSet, container, getDefaultDiagramName());
- // }
+ // @Override
+ // protected void runAsTransaction(DiResourceSet diResourceSet, EObject
+ // container, String name) {
+ // if(name == null && container instanceof NamedElement) {
+ // setName(((NamedElement)container).getName());
+ // if(!"".equals(getName())) {
+ // // initialize name with activity's name
+ // name = openDiagramNameDialog(getName());
+ // if(name == null) {
+ // // operation canceled
+ // return;
+ // }
+ // }
+ // }
+ // super.runAsTransaction(diResourceSet, container,
+ // getDefaultDiagramName());
+ // }
/**
- * 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/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateElementAndInitializeFeatureCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateElementAndInitializeFeatureCommand.java
index 1a500c7adaa..82dfd6569e1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateElementAndInitializeFeatureCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateElementAndInitializeFeatureCommand.java
@@ -81,7 +81,8 @@ public class CreateElementAndInitializeFeatureCommand extends Command {
/*
* (non-Javadoc)
*
- * @see org.eclipse.gef.commands.Command#chain(org.eclipse.gef.commands.Command)
+ * @see
+ * org.eclipse.gef.commands.Command#chain(org.eclipse.gef.commands.Command)
*/
@Override
public Command chain(Command command) {
@@ -109,11 +110,12 @@ public class CreateElementAndInitializeFeatureCommand extends Command {
public void execute() {
/**
- * 1) Create element via createElementCommand 2) Retrieve created element via
- * createElementCommand.getNewElement() 3) Create SetValueCommand on newElement with
- * indicated feature and value on construction 4) Set feature value via setValueCommand 5)
- * both the createElementCommand and the setValueCommand are stored in a CompoundCommand to
- * undo() and redo() easily
+ * 1) Create element via createElementCommand 2) Retrieve created
+ * element via createElementCommand.getNewElement() 3) Create
+ * SetValueCommand on newElement with indicated feature and value on
+ * construction 4) Set feature value via setValueCommand 5) both the
+ * createElementCommand and the setValueCommand are stored in a
+ * CompoundCommand to undo() and redo() easily
*/
try {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateHyperLinkDiagramCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateHyperLinkDiagramCommand.java
index 8977181fd20..5f25a3024c2 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateHyperLinkDiagramCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateHyperLinkDiagramCommand.java
@@ -20,7 +20,8 @@ import org.eclipse.papyrus.umlutils.ui.VisualInformationPapyrusConstant;
import org.eclipse.papyrus.umlutils.ui.command.CreateEAnnotationCommand;
/**
- * The Class CreateHyperLinkCommand. this has in charge to add a new entry list of hyperlinks
+ * The Class CreateHyperLinkCommand. this has in charge to add a new entry list
+ * of hyperlinks
*
*/
public class CreateHyperLinkDiagramCommand extends CreateEAnnotationCommand {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateHyperLinkDocumentCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateHyperLinkDocumentCommand.java
index afda85a1b3b..977cd88a00a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateHyperLinkDocumentCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateHyperLinkDocumentCommand.java
@@ -20,7 +20,8 @@ import org.eclipse.papyrus.umlutils.ui.VisualInformationPapyrusConstant;
import org.eclipse.papyrus.umlutils.ui.command.CreateEAnnotationCommand;
/**
- * The Class CreateHyperLinkCommand. this has in charge to add a new entry list of hyperlinks
+ * The Class CreateHyperLinkCommand. this has in charge to add a new entry list
+ * of hyperlinks
*
*/
public class CreateHyperLinkDocumentCommand extends CreateEAnnotationCommand {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateHyperLinkWebCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateHyperLinkWebCommand.java
index 292dfa55b90..f2b356c5275 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateHyperLinkWebCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateHyperLinkWebCommand.java
@@ -20,7 +20,8 @@ import org.eclipse.papyrus.umlutils.ui.VisualInformationPapyrusConstant;
import org.eclipse.papyrus.umlutils.ui.command.CreateEAnnotationCommand;
/**
- * The Class CreateHyperLinkCommand. this has in charge to add a new entry list of hyperlinks
+ * The Class CreateHyperLinkCommand. this has in charge to add a new entry list
+ * of hyperlinks
*
*/
public class CreateHyperLinkWebCommand extends CreateEAnnotationCommand {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateUMLModelCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateUMLModelCommand.java
index 918e2a5fa14..eea0ee2af17 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateUMLModelCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/CreateUMLModelCommand.java
@@ -17,7 +17,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.core.extension.commands.ModelCreationCommandBase;
import org.eclipse.uml2.uml.UMLFactory;
-
/**
* The Class CreateUMLModelCommand.
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DefferedAppliedStereotypeToDisplayCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DefferedAppliedStereotypeToDisplayCommand.java
index 1558c08d784..04595702fe5 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DefferedAppliedStereotypeToDisplayCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DefferedAppliedStereotypeToDisplayCommand.java
@@ -27,8 +27,8 @@ import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Stereotype;
/**
- * The Class AddAppliedStereotypeToDisplayCommand used to set the list of applied stereotype to
- * display
+ * The Class AddAppliedStereotypeToDisplayCommand used to set the list of
+ * applied stereotype to display
*/
public class DefferedAppliedStereotypeToDisplayCommand extends CreateEAnnotationCommand {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DeleteHyperLinkDiagramCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DeleteHyperLinkDiagramCommand.java
index 6b46221d050..396512c0722 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DeleteHyperLinkDiagramCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DeleteHyperLinkDiagramCommand.java
@@ -23,8 +23,9 @@ import org.eclipse.papyrus.umlutils.ui.VisualInformationPapyrusConstant;
import org.eclipse.papyrus.umlutils.ui.command.CreateEAnnotationCommand;
/**
- * The Class DeleteHyperLinkCommand. it can be used also to remove an hyperlink web. It will remove
- * the first eannotation that corresponds to the link or the localization of the hyperlink
+ * The Class DeleteHyperLinkCommand. it can be used also to remove an hyperlink
+ * web. It will remove the first eannotation that corresponds to the link or the
+ * localization of the hyperlink
*/
public class DeleteHyperLinkDiagramCommand extends CreateEAnnotationCommand {
@@ -32,7 +33,8 @@ public class DeleteHyperLinkDiagramCommand extends CreateEAnnotationCommand {
public EModelElement diagram;
/**
- * Instantiates a new delete hyper link command used to suppress a link in the view
+ * Instantiates a new delete hyper link command used to suppress a link in
+ * the view
*
* @param domain
* the domain
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DeleteHyperLinkDocumentCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DeleteHyperLinkDocumentCommand.java
index 80be092483b..6fab3a84b18 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DeleteHyperLinkDocumentCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DeleteHyperLinkDocumentCommand.java
@@ -23,8 +23,9 @@ import org.eclipse.papyrus.umlutils.ui.VisualInformationPapyrusConstant;
import org.eclipse.papyrus.umlutils.ui.command.CreateEAnnotationCommand;
/**
- * The Class DeleteHyperLinkCommand. it can be used also to remove an hyperlink web. It will remove
- * the first eannotation that corresponds to the link or the localization of the hyperlink
+ * The Class DeleteHyperLinkCommand. it can be used also to remove an hyperlink
+ * web. It will remove the first eannotation that corresponds to the link or the
+ * localization of the hyperlink
*/
public class DeleteHyperLinkDocumentCommand extends CreateEAnnotationCommand {
@@ -32,7 +33,8 @@ public class DeleteHyperLinkDocumentCommand extends CreateEAnnotationCommand {
public String link;
/**
- * Instantiates a new delete hyper link command used to suppress a link in the view
+ * Instantiates a new delete hyper link command used to suppress a link in
+ * the view
*
* @param domain
* the domain
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DeleteLinkDuringCreationCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DeleteLinkDuringCreationCommand.java
index 4b1439d1767..2c3e7429f41 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DeleteLinkDuringCreationCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DeleteLinkDuringCreationCommand.java
@@ -33,20 +33,21 @@ import org.eclipse.papyrus.diagram.common.editparts.IEditpartListenerAccess;
import org.eclipse.papyrus.diagram.common.editparts.UMLConnectionNodeEditPart;
/**
- * this class has to be used at very specific situation:
- * During the transformation of a binary link to multi -nary links, you need to remove the link that is the source
- * or the target of the new link.
- * during the delete, several listener has trigger (a cycle is created) and finally the active tool close the transaction
+ * this class has to be used at very specific situation: During the
+ * transformation of a binary link to multi -nary links, you need to remove the
+ * link that is the source or the target of the new link. during the delete,
+ * several listener has trigger (a cycle is created) and finally the active tool
+ * close the transaction
*
- * In order to avoid the raise of the listener, one of editpartlisteners is removed in the connectioneditpart before doing the deletion
- * This listener is created by the active tool.
- * In this class, the listener editpart of AbstractConnectionCreationTool is removed.
- * in order to remove the editpart listener the editpart must implements IEditpartListenerAccess
+ * In order to avoid the raise of the listener, one of editpartlisteners is
+ * removed in the connectioneditpart before doing the deletion This listener is
+ * created by the active tool. In this class, the listener editpart of
+ * AbstractConnectionCreationTool is removed. in order to remove the editpart
+ * listener the editpart must implements IEditpartListenerAccess
*
*
*/
-
public class DeleteLinkDuringCreationCommand extends DeleteCommand {
/** the view that will suppressed **/
@@ -80,14 +81,13 @@ public class DeleteLinkDuringCreationCommand extends DeleteCommand {
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- //find editpartlistener to remove
+ // find editpartlistener to remove
Map epRegistry = viewer.getEditPartRegistry();
// the listener to remove
EditPartListener listenerToRemove = null;
- //the graphical editpart to delete
+ // the graphical editpart to delete
IGraphicalEditPart editPart = (IGraphicalEditPart)epRegistry.get(edge);
-
if(editPart instanceof IEditpartListenerAccess) {
Iterator iterlistener = ((UMLConnectionNodeEditPart)editPart).getEventListenerIterator(EditPartListener.class);
while(iterlistener.hasNext()) {
@@ -97,19 +97,20 @@ public class DeleteLinkDuringCreationCommand extends DeleteCommand {
Class activeToolClass = AbstractConnectionCreationTool.class;
String activeToolClassName = activeToolClass.getName();
- //compare the name of the listener.
- //because it was a inner class private we cannot test the type or access to it
+ // compare the name of the listener.
+ // because it was a inner class private we cannot test the type
+ // or access to it
if(classobject.getName().contains(activeToolClassName)) {
listenerToRemove = (EditPartListener)currentObject;
}
}
}
if(listenerToRemove!=null){
- //Finally we remove the listener
+ // Finally we remove the listener
editPart.removeEditPartListener(listenerToRemove);
}
- //we can do now the job
+ // we can do now the job
CommandResult commandResult = super.doExecuteWithResult(progressMonitor, info);
return commandResult;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DestroyElementPapyrusCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DestroyElementPapyrusCommand.java
index 16bff412fcc..980d38d89e3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DestroyElementPapyrusCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DestroyElementPapyrusCommand.java
@@ -24,9 +24,10 @@ import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
/**
- * This destroy command uses the first generic cross referencer founded instead of using only the GMF one.
- * This is useful because elements that don't have a corresponding GMF type (like MOS in the sequence diagram)
- * don't have the GMF cross referencer registered after a reload.
+ * This destroy command uses the first generic cross referencer founded instead
+ * of using only the GMF one. This is useful because elements that don't have a
+ * corresponding GMF type (like MOS in the sequence diagram) don't have the GMF
+ * cross referencer registered after a reload.
*
* @author mvelten
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DuplicateNamedElementCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DuplicateNamedElementCommand.java
index 7b4c3ef596e..c08b6280824 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DuplicateNamedElementCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/DuplicateNamedElementCommand.java
@@ -41,7 +41,6 @@ import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
*/
public class DuplicateNamedElementCommand extends DuplicateEObjectsCommand {
-
protected static final String COPY_OF = "Copy_Of_";
protected Object diagram;
@@ -75,10 +74,9 @@ public class DuplicateNamedElementCommand extends DuplicateEObjectsCommand {
}
-
if(currentObject instanceof NamedElement) {
namedElement = ((NamedElement)currentObject);
- //some literal has not name
+ // some literal has not name
if(namedElement.getName() != null && !namedElement.getName().startsWith(COPY_OF)) {
namedElement.setName(COPY_OF + namedElement.getName());
}
@@ -94,12 +92,7 @@ public class DuplicateNamedElementCommand extends DuplicateEObjectsCommand {
}
}
-
return CommandResult.newOKCommandResult(getAllDuplicatedObjectsMap());
}
-
-
-
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/EObjectInheritanceCopyCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/EObjectInheritanceCopyCommand.java
index 19702a8dd68..99fe120c11e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/EObjectInheritanceCopyCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/EObjectInheritanceCopyCommand.java
@@ -39,8 +39,9 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.core.utils.PapyrusEcoreUtils;
/**
- * The Class EObjectInheritanceCopyCommand. it takes an eobject in parameter and copy all the elements contained in the
- * source to the target and adds the target to the container of the source
+ * The Class EObjectInheritanceCopyCommand. it takes an eobject in parameter and
+ * copy all the elements contained in the source to the target and adds the
+ * target to the container of the source
*/
public class EObjectInheritanceCopyCommand extends CompositeCommand {
@@ -97,8 +98,8 @@ public class EObjectInheritanceCopyCommand extends CompositeCommand {
}
/**
- * Contains. check if the target eclass contains a estructuralfeature with the same name less rigorous can work for
- * many cases
+ * Contains. check if the target eclass contains a estructuralfeature with
+ * the same name less rigorous can work for many cases
*
* @param target
* the target
@@ -326,7 +327,8 @@ public class EObjectInheritanceCopyCommand extends CompositeCommand {
}
/**
- * The Class CustomSetCommand. permits to change a value from an eobject to eanother
+ * The Class CustomSetCommand. permits to change a value from an eobject to
+ * eanother
*/
private class CustomSetCommand extends SetValueCommand {
@@ -353,7 +355,8 @@ public class EObjectInheritanceCopyCommand extends CompositeCommand {
}
/**
- * The Class CustomSetCommand. permits to change a value from an eobject to eanother
+ * The Class CustomSetCommand. permits to change a value from an eobject to
+ * eanother
*/
private class CustomAddCommand extends SetValueCommand {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/EmptyAllHyperLinkCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/EmptyAllHyperLinkCommand.java
index 67ebe91b530..8f517069de2 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/EmptyAllHyperLinkCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/EmptyAllHyperLinkCommand.java
@@ -23,13 +23,15 @@ import org.eclipse.papyrus.umlutils.ui.VisualInformationPapyrusConstant;
import org.eclipse.papyrus.umlutils.ui.command.CreateEAnnotationCommand;
/**
- * The Class DeleteHyperLinkCommand. it can be used also to remove an hyperlink web. It will remove
- * the first eannotation that corresponds to the link or the localization of the hyperlink
+ * The Class DeleteHyperLinkCommand. it can be used also to remove an hyperlink
+ * web. It will remove the first eannotation that corresponds to the link or the
+ * localization of the hyperlink
*/
public class EmptyAllHyperLinkCommand extends CreateEAnnotationCommand {
/**
- * Instantiates a new delete hyper link command used to suppress a link in the view
+ * Instantiates a new delete hyper link command used to suppress a link in
+ * the view
*
* @param domain
* the domain
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/FixPortLocationCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/FixPortLocationCommand.java
index e6e962aec36..d8b25e99028 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/FixPortLocationCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/FixPortLocationCommand.java
@@ -49,9 +49,14 @@ public class FixPortLocationCommand extends AbstractTransactionalCommand {
/**
* Constructor for the command.
- * @param domain the editing domain.
- * @param borderItemEP assumed to be a Port due to the use of {@link PortPositionLocatorUtils} to calculate the correct location.
- * @param parentEP the edit part of the graphical parent of borderItemEP.
+ *
+ * @param domain
+ * the editing domain.
+ * @param borderItemEP
+ * assumed to be a Port due to the use of {@link PortPositionLocatorUtils} to calculate the correct
+ * location.
+ * @param parentEP
+ * the edit part of the graphical parent of borderItemEP.
*/
public FixPortLocationCommand(TransactionalEditingDomain domain, IBorderItemEditPart borderItemEditPart, GraphicalEditPart parentEditPart) {
super(domain, "Fix port location command", null);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/GMFToEMFCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/GMFToEMFCommand.java
index 0411ac249dc..e9398d75396 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/GMFToEMFCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/GMFToEMFCommand.java
@@ -63,7 +63,9 @@ public class GMFToEMFCommand implements Command {
/*
* (non-Javadoc)
*
- * @see org.eclipse.emf.common.command.Command#chain(org.eclipse.emf.common.command.Command)
+ * @see
+ * org.eclipse.emf.common.command.Command#chain(org.eclipse.emf.common.command
+ * .Command)
*/
public Command chain(Command command) {
throw new UnsupportedOperationException("Cannot compose GMF command with EMF command");
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/PapyrusDuplicateViewsCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/PapyrusDuplicateViewsCommand.java
index 659e70fe189..73c701412e8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/PapyrusDuplicateViewsCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/PapyrusDuplicateViewsCommand.java
@@ -32,7 +32,6 @@ import org.eclipse.gmf.runtime.diagram.ui.internal.commands.DuplicateViewsComman
import org.eclipse.gmf.runtime.diagram.ui.requests.DuplicateRequest;
import org.eclipse.gmf.runtime.notation.View;
-
/**
* this command is used to copy view and to reassociate to a new container
*/
@@ -42,7 +41,6 @@ public class PapyrusDuplicateViewsCommand extends DuplicateViewsCommand implemen
// the new container
protected View container = null;
-
@SuppressWarnings("rawtypes")
public PapyrusDuplicateViewsCommand(TransactionalEditingDomain editingDomain, String label, DuplicateRequest request, List viewsToDuplicate, Map duplicatedElements, Point offset, View container) {
super(editingDomain, label, request, viewsToDuplicate, duplicatedElements, offset);
@@ -58,7 +56,7 @@ public class PapyrusDuplicateViewsCommand extends DuplicateViewsCommand implemen
public boolean canExecute() {
for(Iterator iter = getObjectsToBeDuplicated().iterator(); iter.hasNext();) {
EObject original = (EObject)iter.next();
- //In the case of cut the owner does not exist
+ // In the case of cut the owner does not exist
if(original.eContainer() == null) {
return true;
@@ -85,7 +83,7 @@ public class PapyrusDuplicateViewsCommand extends DuplicateViewsCommand implemen
@SuppressWarnings("rawtypes")
protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
CommandResult result = super.doExecuteWithResult(progressMonitor, info);
- //reassociation to the new container
+ // reassociation to the new container
if(result.getReturnValue() instanceof List) {
List duplicatedObject = (List)result.getReturnValue();
Iterator iterator = duplicatedObject.iterator();
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/PreserveAnchorsPositionCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/PreserveAnchorsPositionCommand.java
index eb181a5cb9a..110b65c49e1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/PreserveAnchorsPositionCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/PreserveAnchorsPositionCommand.java
@@ -32,11 +32,13 @@ import org.eclipse.gmf.runtime.notation.IdentityAnchor;
import org.eclipse.gmf.runtime.notation.View;
/**
- * This class modifies the anchors of the edges connected to the passed element so that they can
- * preserve their position after the resize of the figure. If any of the anchors does not fit in the
- * new size, it will be positioned at the nearest bound.
+ * This class modifies the anchors of the edges connected to the passed element
+ * so that they can preserve their position after the resize of the figure. If
+ * any of the anchors does not fit in the new size, it will be positioned at the
+ * nearest bound.
*
- * This class allows to preserve the position in the Y axis, in the X axis or in both axis.
+ * This class allows to preserve the position in the Y axis, in the X axis or in
+ * both axis.
*
* @author gmerin
*
@@ -52,7 +54,7 @@ public class PreserveAnchorsPositionCommand extends AbstractTransactionalCommand
private int preserveAxis;
- //
+ //
private IFigure figure;
// The resize direction
@@ -72,8 +74,9 @@ public class PreserveAnchorsPositionCommand extends AbstractTransactionalCommand
public final static int PRESERVE_XY = 2;
/**
- * Constructor. It needs the shape being resized, it's re-size delta and the axis where the
- * position should be preserved. The different preserveAxis values are the following:
+ * Constructor. It needs the shape being resized, it's re-size delta and the
+ * axis where the position should be preserved. The different preserveAxis
+ * values are the following:
* <ul>
* <li>ModifyAnchorsToPreservePosition.PRESERVE_Y</li>
* <li>ModifyAnchorsToPreservePosition.PRESERVE_X</li>
@@ -85,8 +88,8 @@ public class PreserveAnchorsPositionCommand extends AbstractTransactionalCommand
* @param sizeDelta
* the re-size delta
* @param preserveAxis
- * the axis where the position should be preserved. If the given value is not valid,
- * then PRESERVE_Y will be taken as default
+ * the axis where the position should be preserved. If the given
+ * value is not valid, then PRESERVE_Y will be taken as default
*/
public PreserveAnchorsPositionCommand(ShapeNodeEditPart shapeEP, Dimension sizeDelta, int preserveAxis) {
super(shapeEP.getEditingDomain(), COMMAND_LABEL, null);
@@ -96,8 +99,9 @@ public class PreserveAnchorsPositionCommand extends AbstractTransactionalCommand
}
/**
- * Constructor. It needs the shape being resized, it's re-size delta and the axis where the
- * position should be preserved. The different preserveAxis values are the following:
+ * Constructor. It needs the shape being resized, it's re-size delta and the
+ * axis where the position should be preserved. The different preserveAxis
+ * values are the following:
* <ul>
* <li>ModifyAnchorsToPreservePosition.PRESERVE_Y</li>
* <li>ModifyAnchorsToPreservePosition.PRESERVE_X</li>
@@ -110,10 +114,11 @@ public class PreserveAnchorsPositionCommand extends AbstractTransactionalCommand
* @param sizeDelta
* the re-size delta
* @param preserveAxis
- * the axis where the position should be preserved. If the given value is not valid,
- * then PRESERVE_Y will be taken as default
+ * the axis where the position should be preserved. If the given
+ * value is not valid, then PRESERVE_Y will be taken as default
* @param figure
- * the figure where the anchors are (when it is not the getShapeEP().getFigure()).
+ * the figure where the anchors are (when it is not the
+ * getShapeEP().getFigure()).
* @param resizeDirection
* the resize direction. Possible values are
* <ul>
@@ -259,7 +264,8 @@ public class PreserveAnchorsPositionCommand extends AbstractTransactionalCommand
pp.preciseY = (double)anchorYPos / (figureBounds.height + sizeDelta.height);
- // If the resize direction is NORTH, the location of the figure move, but the anchor stay visually at the same location
+ // If the resize direction is NORTH, the location of the figure
+ // move, but the anchor stay visually at the same location
if(PositionConstants.NORTH == resizeDirection || PositionConstants.NORTH_EAST == resizeDirection || PositionConstants.NORTH_WEST == resizeDirection) {
pp.preciseY = pp.preciseY + ((double)sizeDelta.height / (figureBounds.height + sizeDelta.height));
}
@@ -276,7 +282,8 @@ public class PreserveAnchorsPositionCommand extends AbstractTransactionalCommand
pp.preciseX = (double)anchorXPos / (figureBounds.width + sizeDelta.width);
- // If the resize direction is WEST, the location of the figure move, but the anchor stay visually at the same location
+ // If the resize direction is WEST, the location of the figure move,
+ // but the anchor stay visually at the same location
if(PositionConstants.WEST == resizeDirection || PositionConstants.NORTH_WEST == resizeDirection || PositionConstants.SOUTH_WEST == resizeDirection) {
pp.preciseX = pp.preciseX + ((double)sizeDelta.width / (figureBounds.width + sizeDelta.width));
}
@@ -293,8 +300,8 @@ public class PreserveAnchorsPositionCommand extends AbstractTransactionalCommand
}
/**
- * This operation checks if, after resizing the ShapeNodeEditPart, all links anchors will fit
- * inside the figure in case their positions are preserved
+ * This operation checks if, after resizing the ShapeNodeEditPart, all links
+ * anchors will fit inside the figure in case their positions are preserved
*
* @param shapeEP
* That shape being resized
@@ -326,8 +333,9 @@ public class PreserveAnchorsPositionCommand extends AbstractTransactionalCommand
}
/**
- * Used inside the getSizeDeltaToFitAnchors operation. It's goal is to modify a SizeDelta in
- * order to keep fitting an anchor within the figureBounds
+ * Used inside the getSizeDeltaToFitAnchors operation. It's goal is to
+ * modify a SizeDelta in order to keep fitting an anchor within the
+ * figureBounds
*
* @param anchor
* The anchor whose position will be kept
@@ -367,8 +375,8 @@ public class PreserveAnchorsPositionCommand extends AbstractTransactionalCommand
}
/**
- * Creations of a new request in order to have a correct visualization of the feedback in order
- * to preserve links's anchors.
+ * Creations of a new request in order to have a correct visualization of
+ * the feedback in order to preserve links's anchors.
*
* @param request
* @param editPart
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/RemoveEObjectReferencesFromDiagram.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/RemoveEObjectReferencesFromDiagram.java
index 4e97abc1d0a..c045e6cf372 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/RemoveEObjectReferencesFromDiagram.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/RemoveEObjectReferencesFromDiagram.java
@@ -67,7 +67,8 @@ public class RemoveEObjectReferencesFromDiagram extends AbstractTransactionalCom
/*
* (non-Javadoc)
*
- * @seeorg.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#
+ * @seeorg.eclipse.gmf.runtime.emf.commands.core.command.
+ * AbstractTransactionalCommand#
* doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor,
* org.eclipse.core.runtime.IAdaptable)
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/RemoveValueCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/RemoveValueCommand.java
index a8b9434bba7..7f55b7779a7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/RemoveValueCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/RemoveValueCommand.java
@@ -40,7 +40,8 @@ public class RemoveValueCommand extends EditElementCommand {
private final Object value;
/**
- * Constructs a new command to remove the value of a feature of a model element.
+ * Constructs a new command to remove the value of a feature of a model
+ * element.
*
* @param request
* the set value request
@@ -55,7 +56,8 @@ public class RemoveValueCommand extends EditElementCommand {
/*
* (non-Javadoc)
*
- * @seeorg.eclipse.gmf.runtime.emf.commands.core.command. AbstractTransactionalCommand#
+ * @seeorg.eclipse.gmf.runtime.emf.commands.core.command.
+ * AbstractTransactionalCommand#
* doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor,
* org.eclipse.core.runtime.IAdaptable)
*/
@@ -86,8 +88,9 @@ public class RemoveValueCommand extends EditElementCommand {
}
/**
- * Checks that the feature is a modifiable feature of the element whose value will be removed by
- * this command. Also checks that the value is of the correct type for the feature.
+ * Checks that the feature is a modifiable feature of the element whose
+ * value will be removed by this command. Also checks that the value is of
+ * the correct type for the feature.
*
* @return true, if can execute
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/RemoveValueRequest.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/RemoveValueRequest.java
index 24e060d9815..a610ba68250 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/RemoveValueRequest.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/RemoveValueRequest.java
@@ -41,7 +41,8 @@ public class RemoveValueRequest extends AbstractEditCommandRequest {
private final Object value;
/**
- * Constructs a new request to remove the value of a structural feature in a model element.
+ * Constructs a new request to remove the value of a structural feature in a
+ * model element.
*
* @param editingDomain
* the editing domain in which I am requesting to make model
@@ -61,8 +62,8 @@ public class RemoveValueRequest extends AbstractEditCommandRequest {
}
/**
- * Constructs a new request to remove the value of a structural feature in a model element. The
- * editing domain will be derived from the <code>elementToEdit</code>.
+ * Constructs a new request to remove the value of a structural feature in a
+ * model element. The editing domain will be derived from the <code>elementToEdit</code>.
*
* @param elementToEdit
* the owner of the structural feature
@@ -107,7 +108,8 @@ public class RemoveValueRequest extends AbstractEditCommandRequest {
/*
* (non-Javadoc)
*
- * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditCommandRequest#
+ * @see
+ * org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditCommandRequest#
* getElementsToEdit()
*/
@Override
@@ -122,7 +124,8 @@ public class RemoveValueRequest extends AbstractEditCommandRequest {
/*
* (non-Javadoc)
*
- * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditCommandRequest#
+ * @see
+ * org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditCommandRequest#
* getEditHelperContext()
*/
public Object getEditHelperContext() {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/SemanticAdapter.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/SemanticAdapter.java
index 194a3660481..6a70319493f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/SemanticAdapter.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/SemanticAdapter.java
@@ -18,7 +18,8 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.notation.View;
/**
- * The Class SemanticAdapter used to package semantic or view element in a deferred command
+ * The Class SemanticAdapter used to package semantic or view element in a
+ * deferred command
*/
public class SemanticAdapter implements IAdaptable {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideCompartmentRequest.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideCompartmentRequest.java
index ab94b0b9ca3..eaabba40b74 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideCompartmentRequest.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideCompartmentRequest.java
@@ -61,14 +61,10 @@ public class ShowHideCompartmentRequest extends ChangePropertyValueRequest {
/**
* Return {@link #compartmentType}
*
- * @return
- * {@link #compartmentType}
+ * @return {@link #compartmentType}
*/
public String getCompartmentType() {
return this.compartmentType;
}
-
-
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideConnectionLabelsRequest.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideConnectionLabelsRequest.java
index ed81029d5e3..202dbdbdb02 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideConnectionLabelsRequest.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideConnectionLabelsRequest.java
@@ -17,7 +17,8 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.ToggleConnectionLabelsRequest
import org.eclipse.gmf.runtime.notation.View;
/**
- * This request is used to manage the display (or not) of ONE label for the connection
+ * This request is used to manage the display (or not) of ONE label for the
+ * connection
*
*
*
@@ -52,8 +53,7 @@ public class ShowHideConnectionLabelsRequest extends ToggleConnectionLabelsReque
/**
* Returns the view to show/hide
*
- * @return
- * the view to show/hide
+ * @return the view to show/hide
*/
public View getView() {
return this.view;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideElementsRequest.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideElementsRequest.java
index 40cf24b1010..7f56de7f446 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideElementsRequest.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideElementsRequest.java
@@ -86,8 +86,7 @@ public class ShowHideElementsRequest extends Request {
/**
* Getter for {@link #container}
*
- * @return
- * {@link #container}
+ * @return {@link #container}
*/
public View getContainer() {
return this.container;
@@ -96,8 +95,7 @@ public class ShowHideElementsRequest extends Request {
/**
* Getter for {@link #semanticElement}
*
- * @return
- * {@link #semanticElement}
+ * @return {@link #semanticElement}
*/
public EObject getSemanticElement() {
return this.semanticElement;
@@ -116,8 +114,7 @@ public class ShowHideElementsRequest extends Request {
/**
* Getter for {@link #location}
*
- * @return
- * The location for the EditPart to show
+ * @return The location for the EditPart to show
*/
public Point getLocation() {
return this.location;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideLabelsRequest.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideLabelsRequest.java
index 2560bcecf10..78ed96c7c10 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideLabelsRequest.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/ShowHideLabelsRequest.java
@@ -17,7 +17,8 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.ToggleConnectionLabelsRequest
import org.eclipse.gmf.runtime.notation.View;
/**
- * This request is used to manage the display (or not) of ONE label for the connection
+ * This request is used to manage the display (or not) of ONE label for the
+ * connection
*
*
*
@@ -52,8 +53,7 @@ public class ShowHideLabelsRequest extends ToggleConnectionLabelsRequest {
/**
* Returns the view to show/hide
*
- * @return
- * the view to show/hide
+ * @return the view to show/hide
*/
public View getView() {
return this.view;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/SupplementCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/SupplementCommand.java
index c04222df799..feaed6a3892 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/SupplementCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/SupplementCommand.java
@@ -33,7 +33,8 @@ public abstract class SupplementCommand {
private final EObject target;
/**
- * the supplement command has the same parameter as connection create command of gmf command
+ * the supplement command has the same parameter as connection create
+ * command of gmf command
*
* @param container
* the container of the link
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/UpdateLifelineRepresentsCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/UpdateLifelineRepresentsCommand.java
index 7c3da882c42..c57e59a05ca 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/UpdateLifelineRepresentsCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/UpdateLifelineRepresentsCommand.java
@@ -56,7 +56,8 @@ public class UpdateLifelineRepresentsCommand extends AbstractCommand {
private boolean createConnectorEnd;
/**
- * The Property used to link the Classifier with the Lifeline through the Represents property
+ * The Property used to link the Classifier with the Lifeline through the
+ * Represents property
*/
private ConnectableElement newProperty;
@@ -88,8 +89,8 @@ public class UpdateLifelineRepresentsCommand extends AbstractCommand {
}
/**
- * Return the connector end which has the correct property as role, owned by a connector in the
- * interaction
+ * Return the connector end which has the correct property as role, owned by
+ * a connector in the interaction
*
* @param interaction
* the owning interaction
@@ -123,8 +124,8 @@ public class UpdateLifelineRepresentsCommand extends AbstractCommand {
}
/**
- * Store the old Property associated with the represents property of the Lifeline and then make
- * the redo
+ * Store the old Property associated with the represents property of the
+ * Lifeline and then make the redo
*
* @see org.eclipse.gef.commands.Command#execute()
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/UpdatePortLocationCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/UpdatePortLocationCommand.java
index d1e57c70f22..6c6e15f7ccb 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/UpdatePortLocationCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/UpdatePortLocationCommand.java
@@ -74,10 +74,12 @@ public class UpdatePortLocationCommand extends AbstractTransactionalCommand {
// Retrieve borderItemBounds
int borderItemOffset = 10; // see PortPositionLocator.
- Shape borderItemShape = (Shape) borderItemEditPart.getNotationView();
- Bounds borderItemBounds = (Bounds) borderItemShape.getLayoutConstraint();
- switch (borderItemSide) { // The borderItemSide is not supposed to change during a parent resize.
+ Shape borderItemShape = (Shape)borderItemEditPart.getNotationView();
+ Bounds borderItemBounds = (Bounds)borderItemShape.getLayoutConstraint();
+
+ switch(borderItemSide) { // The borderItemSide is not supposed to
+ // change during a parent resize.
case PositionConstants.NORTH:
borderItemBounds.setY(-borderItemOffset);
break;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/setLayoutKindCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/setLayoutKindCommand.java
index 720769a57e6..2f1574b69aa 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/setLayoutKindCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/commands/setLayoutKindCommand.java
@@ -24,7 +24,6 @@ import org.eclipse.papyrus.umlutils.ui.command.CreateEAnnotationCommand;
*/
public class setLayoutKindCommand extends CreateEAnnotationCommand {
-
/** The shadowFigure. */
private String layoutKind;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/AbstractCheckedTreeColumnViewerSelectionDialog.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/AbstractCheckedTreeColumnViewerSelectionDialog.java
index b912d36a2d5..98b2443c4a5 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/AbstractCheckedTreeColumnViewerSelectionDialog.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/AbstractCheckedTreeColumnViewerSelectionDialog.java
@@ -32,8 +32,8 @@ import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
/**
- * This abstract class allows to create columns with a tree viewer.
- * A double Click on an element of the tree allows to expand/collapse the node!
+ * This abstract class allows to create columns with a tree viewer. A double
+ * Click on an element of the tree allows to expand/collapse the node!
*
*
*/
@@ -138,7 +138,7 @@ public abstract class AbstractCheckedTreeColumnViewerSelectionDialog extends Cus
* @param e
*/
public void mouseUp(MouseEvent e) {
- //nothing to do
+ // nothing to do
}
/**
@@ -148,7 +148,7 @@ public abstract class AbstractCheckedTreeColumnViewerSelectionDialog extends Cus
* @param e
*/
public void mouseDown(MouseEvent e) {
- //nothing to do
+ // nothing to do
}
@@ -159,7 +159,7 @@ public abstract class AbstractCheckedTreeColumnViewerSelectionDialog extends Cus
* @param e
*/
public void mouseDoubleClick(MouseEvent e) {
- //we expand the selected element
+ // we expand the selected element
Tree source = (Tree)e.getSource();
TreeItem[] item = source.getSelection();
List<?> expandedElements = Arrays.asList(getTreeViewer().getExpandedElements());
@@ -176,8 +176,7 @@ public abstract class AbstractCheckedTreeColumnViewerSelectionDialog extends Cus
* Returns the {@link EditingSupport} for the column.
*
* @param columnIndex
- * @return
- * the {@link EditingSupport} for the column or <code>null</code>
+ * @return the {@link EditingSupport} for the column or <code>null</code>
*/
abstract protected EditingSupport getEditingSupport(int columnIndex);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/CustomCheckedTreeSelectionDialog.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/CustomCheckedTreeSelectionDialog.java
index 89f20d49e4b..2c60fe29511 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/CustomCheckedTreeSelectionDialog.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/CustomCheckedTreeSelectionDialog.java
@@ -50,8 +50,9 @@ import org.eclipse.ui.internal.WorkbenchMessages;
/**
*
- * This class is copied from {@link org.eclipse.ui.dialogs.CheckedTreeSelectionDialog} We add it the possibility to change the style of the
- * TreeViewer! (we want use SWT.FULL_SELECTION)
+ * This class is copied from {@link org.eclipse.ui.dialogs.CheckedTreeSelectionDialog} We add it the
+ * possibility to change the style of the TreeViewer! (we want use
+ * SWT.FULL_SELECTION)
*
* A patch has been provided to the Platform/SWT project (bug 341923)
*
@@ -299,7 +300,9 @@ public class CustomCheckedTreeSelectionDialog extends SelectionStatusDialog {
/*
* (non-Javadoc)
*
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ * @see
+ * org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets
+ * .Composite)
*/
@Override
protected Control createDialogArea(Composite parent) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/DiagramNavigationDialog.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/DiagramNavigationDialog.java
index 3bb24a96309..6332344b366 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/DiagramNavigationDialog.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/DiagramNavigationDialog.java
@@ -35,13 +35,13 @@ import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
/**
- * dialog to display a list of hyperlinks.
- * the button ok is use to excute the action linked to the hyperlink (open new diagram, open new editor...)
- *
+ * dialog to display a list of hyperlinks. the button ok is use to excute the
+ * action linked to the hyperlink (open new diagram, open new editor...)
+ *
*/
public class DiagramNavigationDialog extends Dialog {
- //prefered dimension
+ // prefered dimension
protected int width=350;
protected int height=150;
@@ -55,11 +55,13 @@ public class DiagramNavigationDialog extends Dialog {
/**
*
- *dialog to display a list of hyperlinks.
- * the button ok is use to excute the action linked to the hyperlink (open new diagram, open new editor...)
- *
- * @param parentShell a shell
- * @param hyperlinkObjects the list of hyperlinkObjects
+ * dialog to display a list of hyperlinks. the button ok is use to excute
+ * the action linked to the hyperlink (open new diagram, open new editor...)
+ *
+ * @param parentShell
+ * a shell
+ * @param hyperlinkObjects
+ * the list of hyperlinkObjects
*/
public DiagramNavigationDialog(Shell parentShell, ArrayList<HyperlinkObject> hyperlinkObjects) {
super(parentShell);
@@ -72,36 +74,32 @@ public class DiagramNavigationDialog extends Dialog {
parent.setBounds(parent.getBounds().x, parent.getBounds().y, width+50, height+120);
Composite defaultHyperlinkComposite = new Composite(parent, SWT.NONE);
-
Label lblHyperlinks = new Label(defaultHyperlinkComposite, SWT.NONE);
lblHyperlinks.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_BLACK));
lblHyperlinks.setBounds(23, 10,width , 13);
lblHyperlinks.setText("Which hyperlinks would you like to navigate to?");
-
- //creation of the table
+ // creation of the table
availableHyperLink = new Table(defaultHyperlinkComposite, SWT.CHECK|SWT.BORDER | SWT.FULL_SELECTION);
availableHyperLink.setBounds(30, 29, width, height);
super.createContents(parent);
-
- //set the content provider
- this.contentProvider= new HyperLinkContentProvider();
- tableViewer = new TableViewer(availableHyperLink);
- tableViewer.setContentProvider(contentProvider);
-
-
- //set the label provider
- IPageIconsRegistry editorRegistry=null;
- IMultiDiagramEditor papyrusEditor=EditorUtils.getMultiDiagramEditor();
- try {
- editorRegistry= papyrusEditor.getServicesRegistry().getService(IPageIconsRegistry.class);
- } catch (ServiceException e) {
- e.printStackTrace();
- }
- tableViewer.setLabelProvider(new HyperLinkLabelProvider(editorRegistry));
- tableViewer.setInput(this.hyperlinkObjects);
-
- return defaultHyperlinkComposite;
+ // set the content provider
+ this.contentProvider = new HyperLinkContentProvider();
+ tableViewer = new TableViewer(availableHyperLink);
+ tableViewer.setContentProvider(contentProvider);
+
+ // set the label provider
+ IPageIconsRegistry editorRegistry = null;
+ IMultiDiagramEditor papyrusEditor = EditorUtils.getMultiDiagramEditor();
+ try {
+ editorRegistry = papyrusEditor.getServicesRegistry().getService(IPageIconsRegistry.class);
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ }
+ tableViewer.setLabelProvider(new HyperLinkLabelProvider(editorRegistry));
+ tableViewer.setInput(this.hyperlinkObjects);
+
+ return defaultHyperlinkComposite;
}
/**
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/SelectModelElementsForDiagramDialog.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/SelectModelElementsForDiagramDialog.java
index 3bc1f85a341..6bee188c24e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/SelectModelElementsForDiagramDialog.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/dialogs/SelectModelElementsForDiagramDialog.java
@@ -108,7 +108,9 @@ public class SelectModelElementsForDiagramDialog extends WizardPage {
/*
* (non-Javadoc)
*
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets .Composite)
+ * @see
+ * org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets
+ * .Composite)
*/
public void createControl(Composite parent) {
Composite root = new Composite(parent, SWT.NONE);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/FigureControler.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/FigureControler.java
index 15bbdca2767..ce79abcf70b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/FigureControler.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/FigureControler.java
@@ -16,7 +16,8 @@ package org.eclipse.papyrus.diagram.common.directedit;
import org.eclipse.draw2d.IFigure;
/**
- * A figure controler is used to associate a IFigure to model properties in a lightweight way.
+ * A figure controler is used to associate a IFigure to model properties in a
+ * lightweight way.
*/
public class FigureControler implements ILabelControler {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/ILabelControler.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/ILabelControler.java
index ad289e4ebb1..16be3538658 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/ILabelControler.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/ILabelControler.java
@@ -16,8 +16,8 @@ package org.eclipse.papyrus.diagram.common.directedit;
import org.eclipse.draw2d.IFigure;
/**
- * Interface for a controler that is used to associate a IFigure to model properties in a
- * lightweight way.
+ * Interface for a controler that is used to associate a IFigure to model
+ * properties in a lightweight way.
*/
public interface ILabelControler {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/LabelDirectEditManager.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/LabelDirectEditManager.java
index 910ea7779db..2e85c592789 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/LabelDirectEditManager.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/LabelDirectEditManager.java
@@ -28,8 +28,9 @@ import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.part.CellEditorActionHandler;
/**
- * DirectEdit manager for label managed by a LabelControlerManager. It is intended to be used in
- * conjunction with LabelDirectEditPolicy and LabelControler.
+ * DirectEdit manager for label managed by a LabelControlerManager. It is
+ * intended to be used in conjunction with LabelDirectEditPolicy and
+ * LabelControler.
*/
public class LabelDirectEditManager extends DirectEditManager {
@@ -93,7 +94,8 @@ public class LabelDirectEditManager extends DirectEditManager {
* (non-Javadoc)
*
* @see
- * org.eclipse.gef.tools.DirectEditManager#createCellEditorOn(org.eclipse.swt.widgets.Composite)
+ * org.eclipse.gef.tools.DirectEditManager#createCellEditorOn(org.eclipse
+ * .swt.widgets.Composite)
*/
/**
*
@@ -136,7 +138,8 @@ public class LabelDirectEditManager extends DirectEditManager {
getCellEditor().setValue(labelCtrl.getPropertyAccessor().getValue());
getCellEditor().getControl().setFont(labelCtrl.getLabel().getFont());
- // Hook the cell editor's copy/paste actions to the actionBars so that they can
+ // Hook the cell editor's copy/paste actions to the actionBars so that
+ // they can
// be invoked via keyboard shortcuts.
actionBars = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getEditorSite().getActionBars();
saveCurrentActions(actionBars);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/MultiLineCellEditor.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/MultiLineCellEditor.java
index 7c347393ca1..f37df42fe45 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/MultiLineCellEditor.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/MultiLineCellEditor.java
@@ -13,7 +13,6 @@ package org.eclipse.papyrus.diagram.common.directedit;
import org.eclipse.gmf.runtime.gef.ui.internal.parts.TextCellEditorEx;
-
/**
* Specific cell editor for multiline figures.
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/MultilineLabelDirectEditManager.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/MultilineLabelDirectEditManager.java
index 34a89dc10ee..c7e22a7b79b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/MultilineLabelDirectEditManager.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/MultilineLabelDirectEditManager.java
@@ -24,14 +24,14 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
/**
- * DirectEdit manager for multi lines label managed by a LabelControlerManager. It is intended to be
- * used in conjunction with LabelDirectEditPolicy and LabelControler.
+ * DirectEdit manager for multi lines label managed by a LabelControlerManager.
+ * It is intended to be used in conjunction with LabelDirectEditPolicy and
+ * LabelControler.
*/
public class MultilineLabelDirectEditManager extends TextDirectEditManager {
protected boolean multiLine = false;
-
/**
* Constructor.
*
@@ -52,8 +52,8 @@ public class MultilineLabelDirectEditManager extends TextDirectEditManager {
* @param source
* the <code>GraphicalEditPart</code> that is used to determine
* which <code>CellEditor</code> class to use.
- * @return the <code>Class</code> of the <code>CellEditor</code> to use
- * for the text editing.
+ * @return the <code>Class</code> of the <code>CellEditor</code> to use for
+ * the text editing.
*/
public static Class getTextCellEditorClass(GraphicalEditPart source) {
IFigure figure = source.getFigure();
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/PropertyAccessor.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/PropertyAccessor.java
index cd45492c65d..93d42dc8048 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/PropertyAccessor.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/PropertyAccessor.java
@@ -21,7 +21,9 @@ public abstract class PropertyAccessor implements IPropertyAccessor {
/*
* (non-Javadoc)
*
- * @see com.cea.papyrus.core.common.directedit.IPropertyAccessor#getPropertyName()
+ * @see
+ * com.cea.papyrus.core.common.directedit.IPropertyAccessor#getPropertyName
+ * ()
*/
/**
*
@@ -47,7 +49,9 @@ public abstract class PropertyAccessor implements IPropertyAccessor {
/*
* (non-Javadoc)
*
- * @see com.cea.papyrus.core.common.directedit.IPropertyAccessor#setValue(java.lang.String)
+ * @see
+ * com.cea.papyrus.core.common.directedit.IPropertyAccessor#setValue(java
+ * .lang.String)
*/
/**
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/TextFlowCellEditorLocator.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/TextFlowCellEditorLocator.java
index 6c3d42488ac..70dbf99c343 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/TextFlowCellEditorLocator.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/directedit/TextFlowCellEditorLocator.java
@@ -44,7 +44,9 @@ final public class TextFlowCellEditorLocator implements CellEditorLocator {
/*
* (non-Javadoc)
*
- * @see org.eclipse.gef.tools.CellEditorLocator#relocate(org.eclipse.jface.viewers .CellEditor)
+ * @see
+ * org.eclipse.gef.tools.CellEditorLocator#relocate(org.eclipse.jface.viewers
+ * .CellEditor)
*/
/**
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LaneLayout.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LaneLayout.java
index 4e0b33f441b..99985c4deb1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LaneLayout.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LaneLayout.java
@@ -175,8 +175,9 @@ public class LaneLayout extends AbstractHintLayout {
newBounds.width = Math.max(minWidth, clientArea.width);
if(isResizedByUser) {
/*
- * If all element are resized by user and summary preferred heigh is less then
- * client area, last element should cover spare space.
+ * If all element are resized by user and summary preferred
+ * heigh is less then client area, last element should cover
+ * spare space.
*/
if(numChildren == nonExpansibleNum && totalPrefHeight < clientArea.height && i == numChildren - 1) {
newBounds.height += clientArea.height - totalPrefHeight;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LeftToolbarLayout.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LeftToolbarLayout.java
index bcfa459ef30..e62efc4a029 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LeftToolbarLayout.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LeftToolbarLayout.java
@@ -14,11 +14,12 @@ import org.eclipse.draw2d.geometry.Transposer;
// TODO: Auto-generated Javadoc
/**
- * Arranges figures in a single row or column. Orientation can be set to produce either a row or
- * column layout. This layout tries to fit all children within the parent's client area. To do this,
- * it compresses the children by some amount, but will not compress them smaller than their minimum
- * size. If a child's preferred size is smaller than the row's or column's minor dimension, the
- * layout can be configured to stretch the child.
+ * Arranges figures in a single row or column. Orientation can be set to produce
+ * either a row or column layout. This layout tries to fit all children within
+ * the parent's client area. To do this, it compresses the children by some
+ * amount, but will not compress them smaller than their minimum size. If a
+ * child's preferred size is smaller than the row's or column's minor dimension,
+ * the layout can be configured to stretch the child.
*/
public class LeftToolbarLayout extends AbstractHintLayout {
@@ -59,8 +60,8 @@ public class LeftToolbarLayout extends AbstractHintLayout {
}
/**
- * Constructs a vertically oriented ToolbarLayout with child spacing of 0 pixels, matchWidth <code>true</code>, and {@link #ALIGN_TOPLEFT}
- * alignment.
+ * Constructs a vertically oriented ToolbarLayout with child spacing of 0
+ * pixels, matchWidth <code>true</code>, and {@link #ALIGN_TOPLEFT} alignment.
*
* @since 2.0
*/
@@ -72,8 +73,8 @@ public class LeftToolbarLayout extends AbstractHintLayout {
}
/**
- * Constructs a ToolbarLayout with a specified orientation. Default values are: child spacing 0
- * pixels, matchWidth <code>false</code>, and {@link #ALIGN_TOPLEFT} alignment.
+ * Constructs a ToolbarLayout with a specified orientation. Default values
+ * are: child spacing 0 pixels, matchWidth <code>false</code>, and {@link #ALIGN_TOPLEFT} alignment.
*
* @param isHorizontal
* whether the children are oriented horizontally
@@ -117,12 +118,13 @@ public class LeftToolbarLayout extends AbstractHintLayout {
}
/**
- * Calculates the minimum size of the container based on the given hints. If this is a
- * vertically-oriented Toolbar Layout, then only the widthHint is respected (which means that
- * the children can be as tall as they desire). In this case, the minimum width is that of the
- * widest child, and the minimum height is the sum of the minimum heights of all children, plus
- * the spacing between them. The border and insets of the container figure are also accounted
- * for.
+ * Calculates the minimum size of the container based on the given hints. If
+ * this is a vertically-oriented Toolbar Layout, then only the widthHint is
+ * respected (which means that the children can be as tall as they desire).
+ * In this case, the minimum width is that of the widest child, and the
+ * minimum height is the sum of the minimum heights of all children, plus
+ * the spacing between them. The border and insets of the container figure
+ * are also accounted for.
*
* @param container
* the figure whose minimum size has to be calculated
@@ -165,12 +167,13 @@ public class LeftToolbarLayout extends AbstractHintLayout {
}
/**
- * Calculates the preferred size of the container based on the given hints. If this is a
- * vertically-oriented Toolbar Layout, then only the widthHint is respected (which means that
- * the children can be as tall as they desire). In this case, the preferred width is that of the
- * widest child, and the preferred height is the sum of the preferred heights of all children,
- * plus the spacing between them. The border and insets of the container figure are also
- * accounted for.
+ * Calculates the preferred size of the container based on the given hints.
+ * If this is a vertically-oriented Toolbar Layout, then only the widthHint
+ * is respected (which means that the children can be as tall as they
+ * desire). In this case, the preferred width is that of the widest child,
+ * and the preferred height is the sum of the preferred heights of all
+ * children, plus the spacing between them. The border and insets of the
+ * container figure are also accounted for.
*
* @param container
* the figure whose preferred size has to be calculated
@@ -213,8 +216,8 @@ public class LeftToolbarLayout extends AbstractHintLayout {
}
/**
- * Returns the minor aligment of the layout. Minor minor axis is the axis perpindicular to the
- * overall orientation set in the contructor.
+ * Returns the minor aligment of the layout. Minor minor axis is the axis
+ * perpindicular to the overall orientation set in the contructor.
*
* @return the minor aligment
*/
@@ -234,7 +237,8 @@ public class LeftToolbarLayout extends AbstractHintLayout {
}
/**
- * Returns <code>true</code> if stretch minor axis has been enabled. The default value is false.
+ * Returns <code>true</code> if stretch minor axis has been enabled. The
+ * default value is false.
*
* @return <code>true</code> if stretch minor axis is enabled
*/
@@ -319,13 +323,14 @@ public class LeftToolbarLayout extends AbstractHintLayout {
}
/*
- * Calculate sum of preferred heights of all children(totalHeight). Calculate sum of minimum
- * heights of all children(minHeight). Cache Preferred Sizes and Minimum Sizes of all
- * children.
+ * Calculate sum of preferred heights of all children(totalHeight).
+ * Calculate sum of minimum heights of all children(minHeight). Cache
+ * Preferred Sizes and Minimum Sizes of all children.
*
- * totalHeight is the sum of the preferred heights of all children totalMinHeight is the sum
- * of the minimum heights of all children prefMinSumHeight is the sum of the difference
- * between all children's preferred heights and minimum heights. (This is used as a ratio to
+ * totalHeight is the sum of the preferred heights of all children
+ * totalMinHeight is the sum of the minimum heights of all children
+ * prefMinSumHeight is the sum of the difference between all children's
+ * preferred heights and minimum heights. (This is used as a ratio to
* calculate how much each child will shrink).
*/
IFigure child;
@@ -346,12 +351,13 @@ public class LeftToolbarLayout extends AbstractHintLayout {
totalMinHeight += (numChildren - 1) * spacing;
prefMinSumHeight = totalHeight - totalMinHeight;
/*
- * The total amount that the children must be shrunk is the sum of the preferred Heights of
- * the children minus Max(the available area and the sum of the minimum heights of the
- * children).
+ * The total amount that the children must be shrunk is the sum of the
+ * preferred Heights of the children minus Max(the available area and
+ * the sum of the minimum heights of the children).
*
* amntShrinkHeight is the combined amount that the children must shrink
- * amntShrinkCurrentHeight is the amount each child will shrink respectively
+ * amntShrinkCurrentHeight is the amount each child will shrink
+ * respectively
*/
int amntShrinkHeight = totalHeight - Math.max(availableHeight, totalMinHeight);
@@ -401,8 +407,8 @@ public class LeftToolbarLayout extends AbstractHintLayout {
}
/**
- * Sets the alignment of the children contained in the layout. Possible values are {@link #ALIGN_CENTER}, {@link #ALIGN_BOTTOMRIGHT} and
- * {@link #ALIGN_TOPLEFT}.
+ * Sets the alignment of the children contained in the layout. Possible
+ * values are {@link #ALIGN_CENTER}, {@link #ALIGN_BOTTOMRIGHT} and {@link #ALIGN_TOPLEFT}.
*
* @param align
* the minor alignment
@@ -428,8 +434,8 @@ public class LeftToolbarLayout extends AbstractHintLayout {
}
/**
- * Sets children's width (if vertically oriented) or height (if horizontally oriented) to
- * stretch with their container.
+ * Sets children's width (if vertically oriented) or height (if horizontally
+ * oriented) to stretch with their container.
*
* @param match
* whether to stretch children
@@ -443,8 +449,9 @@ public class LeftToolbarLayout extends AbstractHintLayout {
}
/**
- * Causes children that are smaller in the dimension of the minor axis to be stretched to fill
- * the minor axis. The minor axis is the opposite of the orientation.
+ * Causes children that are smaller in the dimension of the minor axis to be
+ * stretched to fill the minor axis. The minor axis is the opposite of the
+ * orientation.
*
* @param stretch
* whether to stretch children
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LifelineDotLineFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LifelineDotLineFigure.java
index 9fb4a884f5e..748b8dad855 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LifelineDotLineFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LifelineDotLineFigure.java
@@ -32,7 +32,6 @@ public class LifelineDotLineFigure extends Shape {
/** The DASHE d_ size. */
private final int DASHED_SIZE = 10;
-
/** The DashLine figure where elements will be attached */
private NodeFigure dashLineRectangle;
@@ -50,7 +49,6 @@ public class LifelineDotLineFigure extends Shape {
}
-
/*
* (non-Javadoc)
*
@@ -98,10 +96,10 @@ public class LifelineDotLineFigure extends Shape {
pAux.y = pAux.y + DASHED_SIZE;
}
- //int pixels = 10;
+ // int pixels = 10;
-
- // Update the size and the location of the rectangle representing the dash line
+ // Update the size and the location of the rectangle representing the
+ // dash line
dashLineRectangle.setSize(1, pEnd.y - pStart.y);
dashLineRectangle.setLocation(pStart);
@@ -116,7 +114,8 @@ public class LifelineDotLineFigure extends Shape {
@Override
public void setBounds(Rectangle rect) {
super.setBounds(rect);
- // set bounds for child dash line to avoid problems during connected edges drawing
+ // set bounds for child dash line to avoid problems during connected
+ // edges drawing
Point pStart = new Point();
Point pEnd = new Point();
@@ -126,22 +125,23 @@ public class LifelineDotLineFigure extends Shape {
pEnd.x = pStart.x;
pEnd.y = pStart.y + rect.height - 1;
-
- // Update the size and the location of the rectangle representing the dash line
+ // Update the size and the location of the rectangle representing the
+ // dash line
dashLineRectangle.setSize(1, pEnd.y - pStart.y);
dashLineRectangle.setLocation(pStart);
}
/**
- * Create a cross at the end of the figure.
- * The cross will be drawn at the pEnd - pixels position
+ * Create a cross at the end of the figure. The cross will be drawn at the
+ * pEnd - pixels position
*
* @param graphics
* the graphics
* @param pEnd
* the point used to position the cross
* @param pixels
- * the height which will be deduce from the pEnd to position the cross
+ * the height which will be deduce from the pEnd to position the
+ * cross
*/
private void drawCrossAtEnd(Graphics graphics, Point pEnd, int pixels) {
Point p1Start = new Point();
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LinesBorder.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LinesBorder.java
index 67e0cba43b9..906d7455d83 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LinesBorder.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/LinesBorder.java
@@ -21,7 +21,8 @@ import org.eclipse.draw2d.geometry.Insets;
import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
/**
- * This is a border that draws lines at the given border positions around the shape.
+ * This is a border that draws lines at the given border positions around the
+ * shape.
*/
public class LinesBorder extends LineBorder {
@@ -55,8 +56,10 @@ public class LinesBorder extends LineBorder {
* @param width
* the width of the line in relative coordinates
* @param sides
- * the sides to draw. The value should be a bitwise composition of PositionConstants.NONE, PositionConstants.TOP, PositionConstants.BOTTOM,
- * PositionConstants.LEFT, PositionConstants.RIGHT
+ * the sides to draw. The value should be a bitwise composition
+ * of PositionConstants.NONE, PositionConstants.TOP,
+ * PositionConstants.BOTTOM, PositionConstants.LEFT,
+ * PositionConstants.RIGHT
*/
public LinesBorder(int width, int sides) {
super(width);
@@ -76,8 +79,10 @@ public class LinesBorder extends LineBorder {
* Change drawn sides
*
* @param sides
- * the sides to draw. The value should be a bitwise composition of PositionConstants.NONE, PositionConstants.TOP, PositionConstants.BOTTOM,
- * PositionConstants.LEFT, PositionConstants.RIGHT
+ * the sides to draw. The value should be a bitwise composition
+ * of PositionConstants.NONE, PositionConstants.TOP,
+ * PositionConstants.BOTTOM, PositionConstants.LEFT,
+ * PositionConstants.RIGHT
*/
public void setSides(int sides) {
this.positions = sides;
@@ -133,17 +138,14 @@ public class LinesBorder extends LineBorder {
}
}
-
public int getPositions() {
return positions;
}
-
public void setPositions(int positions) {
this.positions = positions;
}
-
public int getLeftInset() {
if (leftInset < getWidth() && (positions & PositionConstants.LEFT) > 0){
return getWidth();
@@ -151,12 +153,10 @@ public class LinesBorder extends LineBorder {
return leftInset;
}
-
public void setLeftInset(int leftInset) {
this.leftInset = leftInset;
}
-
public int getRightInset() {
if (rightInset < getWidth() && (positions & PositionConstants.RIGHT) > 0){
return getWidth();
@@ -164,12 +164,10 @@ public class LinesBorder extends LineBorder {
return rightInset;
}
-
public void setRightInset(int rightInset) {
this.rightInset = rightInset;
}
-
public int getTopInset() {
if (topInset < getWidth() && (positions & PositionConstants.TOP) > 0){
return getWidth();
@@ -177,12 +175,10 @@ public class LinesBorder extends LineBorder {
return topInset;
}
-
public void setTopInset(int topInset) {
this.topInset = topInset;
}
-
public int getBottomInset() {
if (bottomInset < getWidth() && (positions & PositionConstants.TOP) > 0){
return getWidth();
@@ -190,12 +186,7 @@ public class LinesBorder extends LineBorder {
return bottomInset;
}
-
public void setBottomInset(int bottomInset) {
this.bottomInset = bottomInset;
}
-
-
-
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/ManuallyDrawnShortcutDecorator.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/ManuallyDrawnShortcutDecorator.java
index 97679d9eeef..0e7ea16f1f1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/ManuallyDrawnShortcutDecorator.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/ManuallyDrawnShortcutDecorator.java
@@ -19,8 +19,9 @@ import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
import org.eclipse.papyrus.ui.toolbox.draw2d.ManuallyDrawnShortcutDecorationFigure;
/**
- * Workaround for #214160 and #209802 -- in some cases SWT fails to paint Images correctly. Until
- * its fixed, we are going to show draw2d polyline based decorations instead of image-based
+ * Workaround for #214160 and #209802 -- in some cases SWT fails to paint Images
+ * correctly. Until its fixed, we are going to show draw2d polyline based
+ * decorations instead of image-based
*/
// @unused
public class ManuallyDrawnShortcutDecorator extends AbstractDecorator {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/PileLayout.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/PileLayout.java
index 83c2a22718f..47c7c7ec7c6 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/PileLayout.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/PileLayout.java
@@ -11,7 +11,8 @@ import org.eclipse.draw2d.geometry.Insets;
import org.eclipse.draw2d.geometry.Rectangle;
/**
- * All children are placed on top of each other. Gap may be set between children.
+ * All children are placed on top of each other. Gap may be set between
+ * children.
*
* @author dstadnik
*/
@@ -33,7 +34,8 @@ public class PileLayout extends AbstractHintLayout {
}
/**
- * The last (bottom) figure should be stretched to cover the rest of the container client area.
+ * The last (bottom) figure should be stretched to cover the rest of the
+ * container client area.
*/
public final boolean isStretchBottom() {
return myStretchBottom;
@@ -60,8 +62,8 @@ public class PileLayout extends AbstractHintLayout {
}
/**
- * Returns list constraint for specified figure. If constraint is null or not list constraint
- * returns FILL list constraint by default.
+ * Returns list constraint for specified figure. If constraint is null or
+ * not list constraint returns FILL list constraint by default.
*/
protected PileConstraint getPileConstraint(IFigure figure) {
Object constraint = getConstraint(figure);
@@ -154,8 +156,8 @@ public class PileLayout extends AbstractHintLayout {
public interface PileConstraint {
/**
- * Changes bounds of child with specified preferred size. New bounds should fit in specified
- * bounds.
+ * Changes bounds of child with specified preferred size. New bounds
+ * should fit in specified bounds.
*
* @param preferred
* Prefferred size of a child.
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/RoundedRectangleDashedBorder.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/RoundedRectangleDashedBorder.java
index 1783b9fe764..bdd91659dc0 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/RoundedRectangleDashedBorder.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/RoundedRectangleDashedBorder.java
@@ -27,7 +27,8 @@ import org.eclipse.swt.SWT;
public class RoundedRectangleDashedBorder extends RoundedRectangleBorder {
/**
- * Creates an instance of this class with the given arc width and arc height in pixels
+ * Creates an instance of this class with the given arc width and arc height
+ * in pixels
*
* @param arcWidth
* The width of the corner arc
@@ -50,7 +51,8 @@ public class RoundedRectangleDashedBorder extends RoundedRectangleBorder {
}
/**
- * Paints rounded rectangular dashed border taking into account arcWidth, arcHeight, line width and line style
+ * Paints rounded rectangular dashed border taking into account arcWidth,
+ * arcHeight, line width and line style
*
* @see org.eclipse.gmf.runtime.draw2d.ui.figures.RoundedRectangleBorder#paint(org.eclipse.draw2d.IFigure, org.eclipse.draw2d.Graphics,
* org.eclipse.draw2d.geometry.Insets)
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/SplitEllipseLayout.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/SplitEllipseLayout.java
index ffd40114300..8cf23a4d9f1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/SplitEllipseLayout.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/SplitEllipseLayout.java
@@ -30,8 +30,7 @@ public class SplitEllipseLayout extends GravityConstrainedFlowLayout {
private int myYMargin;
/**
- * Constructor.
- * Calls super and configures this layout.
+ * Constructor. Calls super and configures this layout.
*/
public SplitEllipseLayout() {
super();
@@ -76,10 +75,11 @@ public class SplitEllipseLayout extends GravityConstrainedFlowLayout {
Dimension minSizes[] = new Dimension[numChildren];
Dimension maxSizes[] = new Dimension[numChildren];
- // Calculate the width and height hints. If it's a vertical ToolBarLayout,
- // then ignore the height hint (set it to -1); otherwise, ignore the
- // width hint. These hints will be passed to the children of the parent
- // figure when getting their preferred size.
+ // Calculate the width and height hints. If it's a vertical
+ // ToolBarLayout,
+ // then ignore the height hint (set it to -1); otherwise, ignore the
+ // width hint. These hints will be passed to the children of the parent
+ // figure when getting their preferred size.
int wHint = -1;
int hHint = -1;
if(isHorizontal()) {
@@ -90,8 +90,8 @@ public class SplitEllipseLayout extends GravityConstrainedFlowLayout {
/*
* Calculate sum of preferred heights of all children(totalHeight).
- * Calculate sum of minimum heights of all children(minHeight).
- * Cache Preferred Sizes and Minimum Sizes of all children.
+ * Calculate sum of minimum heights of all children(minHeight). Cache
+ * Preferred Sizes and Minimum Sizes of all children.
*
* totalHeight is the sum of the preferred heights of all children
* totalMinHeight is the sum of the minimum heights of all children
@@ -132,12 +132,13 @@ public class SplitEllipseLayout extends GravityConstrainedFlowLayout {
prefMaxSumHeight = totalMaxHeight - totalHeight;
/*
- * The total amount that the children must be shrunk is the
- * sum of the preferred Heights of the children minus
- * Max(the available area and the sum of the minimum heights of the children).
+ * The total amount that the children must be shrunk is the sum of the
+ * preferred Heights of the children minus Max(the available area and
+ * the sum of the minimum heights of the children).
*
* amntShrinkHeight is the combined amount that the children must shrink
- * amntShrinkCurrentHeight is the amount each child will shrink respectively
+ * amntShrinkCurrentHeight is the amount each child will shrink
+ * respectively
*/
int amntShrinkHeight = totalHeight - Math.max(availableHeight, totalMinHeight);
@@ -152,7 +153,8 @@ public class SplitEllipseLayout extends GravityConstrainedFlowLayout {
Rectangle newBounds = new Rectangle(x, y, prefWidth, prefHeight);
child = (IFigure)children.get(i);
- // only difference with super : stretch the last item, whatever the policy.
+ // only difference with super : stretch the last item, whatever the
+ // policy.
// this enables to draw scrollbars for the last compartment.
if(getStretchMajorAxis() || i == numChildren - 1) {
if(amntShrinkHeight > 0 && prefMinSumHeight != 0)
@@ -193,8 +195,8 @@ public class SplitEllipseLayout extends GravityConstrainedFlowLayout {
}
/**
- * Gets the list of children after applying the layout options of
- * ignore invisible children & reverse children
+ * Gets the list of children after applying the layout options of ignore
+ * invisible children & reverse children
*/
private List getChildren(IFigure container) {
List children = new ArrayList(container.getChildren());
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/anchors/FixedAnchor.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/anchors/FixedAnchor.java
index 3b8844bcfa8..5e54f9a8cb7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/anchors/FixedAnchor.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/anchors/FixedAnchor.java
@@ -17,7 +17,6 @@ import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.PrecisionPoint;
import org.eclipse.gmf.runtime.gef.ui.figures.SlidableAnchor;
-
/**
* An anchor that is attached to the top or the bottom of a figure.
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/anchors/LifelineAnchor.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/anchors/LifelineAnchor.java
index d9e816730a6..ce1d193dfd4 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/anchors/LifelineAnchor.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/draw2d/anchors/LifelineAnchor.java
@@ -19,8 +19,8 @@ import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
/**
- * A specific anchor to attach "create message" to the middle of the rectangle representing the
- * header of the lifeline
+ * A specific anchor to attach "create message" to the middle of the rectangle
+ * representing the header of the lifeline
*
*/
public class LifelineAnchor extends AbstractConnectionAnchor {
@@ -47,7 +47,8 @@ public class LifelineAnchor extends AbstractConnectionAnchor {
p.x = r.getLeft().x;
if(reference != null) {
- // If the reference point is located at the right of the figure means the point should be attached to the right side.
+ // If the reference point is located at the right of the figure
+ // means the point should be attached to the right side.
if(reference.x > r.x) {
p.x = r.getRight().x;
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/AbstractLabelEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/AbstractLabelEditPart.java
index 28c7051067a..84e6f14c037 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/AbstractLabelEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/AbstractLabelEditPart.java
@@ -19,8 +19,8 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
import org.eclipse.gmf.runtime.notation.View;
/**
- * This is an editpart in which we can access to the wrapping label
- * for example it can be use to display stereotype as external node
+ * This is an editpart in which we can access to the wrapping label for example
+ * it can be use to display stereotype as external node
*/
public abstract class AbstractLabelEditPart extends LabelEditPart implements IPapyrusEditPart {
@@ -36,6 +36,4 @@ public abstract class AbstractLabelEditPart extends LabelEditPart implements IPa
return (IFigure)getFigure();
}
-
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/AbstractShapeEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/AbstractShapeEditPart.java
index 605361ce9aa..be38b5363ab 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/AbstractShapeEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/AbstractShapeEditPart.java
@@ -31,15 +31,14 @@ import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Stereotype;
/**
- * this is an abstract class used to display an element as a shape. it looks for image in the associated stereotype
+ * this is an abstract class used to display an element as a shape. it looks for
+ * image in the associated stereotype
*
*/
public abstract class AbstractShapeEditPart extends AbstractBorderedShapeEditPart implements IPapyrusEditPart {
-
private static final String SHAPE_CONSTANT = "shape";
-
public AbstractShapeEditPart(View view) {
super(view);
}
@@ -51,10 +50,10 @@ public abstract class AbstractShapeEditPart extends AbstractBorderedShapeEditPar
private IPageIconsRegistry editorRegistry;
-
/**
- * Return the EditorRegistry for nested editor descriptors. Subclass should implements this
- * method in order to return the registry associated to the extension point namespace.
+ * Return the EditorRegistry for nested editor descriptors. Subclass should
+ * implements this method in order to return the registry associated to the
+ * extension point namespace.
*
* @return the EditorRegistry for nested editor descriptors
*
@@ -63,18 +62,21 @@ public abstract class AbstractShapeEditPart extends AbstractBorderedShapeEditPar
try {
return EditorUtils.getServiceRegistry().getService(IPageIconsRegistry.class);
} catch (ServiceException e) {
- // Not found, return an empty one which return null for each request.
+ // Not found, return an empty one which return null for each
+ // request.
return new PageIconsRegistry();
} catch (NullPointerException e) {
- //if the editor is null null pointer exception is raised
- // Not found, return an empty one which return null for each request.
+ // if the editor is null null pointer exception is raised
+ // Not found, return an empty one which return null for each
+ // request.
return new PageIconsRegistry();
}
}
/**
- * Get the EditorRegistry used to create editor instances. This default implementation return
- * the singleton eINSTANCE. This method can be subclassed to return another registry.
+ * Get the EditorRegistry used to create editor instances. This default
+ * implementation return the singleton eINSTANCE. This method can be
+ * subclassed to return another registry.
*
* @return the singleton eINSTANCE of editor registry
*
@@ -107,7 +109,6 @@ public abstract class AbstractShapeEditPart extends AbstractBorderedShapeEditPar
return (Element)resolveSemanticElement();
}
-
/**
* refresh the icon by taking in account the type of the diagram
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/AbstractShortCutDiagramEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/AbstractShortCutDiagramEditPart.java
index 58e5aa013d2..dc0deecb93b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/AbstractShortCutDiagramEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/AbstractShortCutDiagramEditPart.java
@@ -38,7 +38,8 @@ import org.eclipse.papyrus.diagram.common.part.UmlGmfDiagramEditor;
import org.eclipse.ui.IWorkbenchPart;
/**
- * this class is used to constraint the behavior of a node to obtain the behavior a short cut
+ * this class is used to constraint the behavior of a node to obtain the
+ * behavior a short cut
*/
public abstract class AbstractShortCutDiagramEditPart extends AbstractBorderedShapeEditPart implements Adapter {
@@ -56,8 +57,8 @@ public abstract class AbstractShortCutDiagramEditPart extends AbstractBorderedSh
/**
*
- * @return the service registry from the backbone.
- * it can return null if it does not found the {@link DiagramEditDomain}
+ * @return the service registry from the backbone. it can return null if it
+ * does not found the {@link DiagramEditDomain}
*/
public ServicesRegistry getServicesRegistry() {
IDiagramEditDomain domain = getDiagramEditDomain();
@@ -71,8 +72,9 @@ public abstract class AbstractShortCutDiagramEditPart extends AbstractBorderedSh
}
/**
- * Return the EditorRegistry for nested editor descriptors. Subclass should implements this
- * method in order to return the registry associated to the extension point namespace.
+ * Return the EditorRegistry for nested editor descriptors. Subclass should
+ * implements this method in order to return the registry associated to the
+ * extension point namespace.
*
* @return the EditorRegistry for nested editor descriptors
*
@@ -87,11 +89,13 @@ public abstract class AbstractShortCutDiagramEditPart extends AbstractBorderedSh
return EditorUtils.getServiceRegistry().getService(IPageIconsRegistry.class);
}
} catch (ServiceException e) {
- // Not found, return an empty one which return null for each request.
+ // Not found, return an empty one which return null for each
+ // request.
return new PageIconsRegistry();
} catch (NullPointerException e) {
- //if the editor is null null pointer exception is raised
- // Not found, return an empty one which return null for each request.
+ // if the editor is null null pointer exception is raised
+ // Not found, return an empty one which return null for each
+ // request.
return new PageIconsRegistry();
}
}
@@ -104,12 +108,12 @@ public abstract class AbstractShortCutDiagramEditPart extends AbstractBorderedSh
resourceToListen = eObject.eResource();
resourceToListen.eAdapters().add(this);
-
}
/**
- * Get the EditorRegistry used to create editor instances. This default implementation return
- * the singleton eINSTANCE. This method can be subclassed to return another registry.
+ * Get the EditorRegistry used to create editor instances. This default
+ * implementation return the singleton eINSTANCE. This method can be
+ * subclassed to return another registry.
*
* @return the singleton eINSTANCE of editor registry
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/CompositeEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/CompositeEditPart.java
index a0a9c6da323..9bdd2bd3e04 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/CompositeEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/CompositeEditPart.java
@@ -16,7 +16,6 @@ import org.eclipse.swt.graphics.Color;
*/
public abstract class CompositeEditPart extends AbstractBorderedShapeEditPart {
-
public CompositeEditPart(View view) {
super(view);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/DeploymentNodeEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/DeploymentNodeEditPart.java
index 300f0376116..ad0559ea1ae 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/DeploymentNodeEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/DeploymentNodeEditPart.java
@@ -10,10 +10,8 @@ import org.eclipse.gmf.runtime.notation.datatype.GradientData;
import org.eclipse.papyrus.diagram.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.swt.graphics.Color;
-
public abstract class DeploymentNodeEditPart extends AbstractBorderedShapeEditPart implements IPapyrusEditPart {
-
public DeploymentNodeEditPart(View view) {
super(view);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/IEditpartListenerAccess.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/IEditpartListenerAccess.java
index 156c0073edf..9d2156a931b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/IEditpartListenerAccess.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/IEditpartListenerAccess.java
@@ -5,7 +5,8 @@ import java.util.Iterator;
import org.eclipse.gef.editparts.AbstractEditPart;
/**
- * All edit part that implements this interface make accessible the set of eventListener
+ * All edit part that implements this interface make accessible the set of
+ * eventListener
*
* @see AbstractEditPart
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/ILabelRoleProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/ILabelRoleProvider.java
index 6997e3ae0f9..8fe78390b63 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/ILabelRoleProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/ILabelRoleProvider.java
@@ -24,16 +24,14 @@ public interface ILabelRoleProvider {
/**
* Returns the label role
*
- * @return
- * the label role
+ * @return the label role
*/
public String getLabelRole();
/**
* Returns an icon illustrating the label role
*
- * @return
- * an icon illustrating the label role
+ * @return an icon illustrating the label role
*/
public String getIconPathRole();
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/IUMLEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/IUMLEditPart.java
index 320e2c70a42..2af94bb6fd6 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/IUMLEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/IUMLEditPart.java
@@ -23,14 +23,14 @@ import org.eclipse.uml2.uml.Element;
public interface IUMLEditPart {
/**
- * Constant for filters of the {@link DiagramEventBroker} that listen to stereotype
- * application/unapplication
+ * Constant for filters of the {@link DiagramEventBroker} that listen to
+ * stereotype application/unapplication
*/
public final String STEREOTYPED_ELEMENT = "StereotypedElement";
/**
- * Constant for filters of the {@link DiagramEventBroker} that listen to applied stereotype
- * modifications (property changes, etc.)
+ * Constant for filters of the {@link DiagramEventBroker} that listen to
+ * applied stereotype modifications (property changes, etc.)
*/
public final String STEREOTYPABLE_ELEMENT = "StereotypableElement";
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/NamedElementEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/NamedElementEditPart.java
index 885854a8d3f..76d32e9f47f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/NamedElementEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/NamedElementEditPart.java
@@ -22,7 +22,8 @@ import org.eclipse.swt.graphics.Font;
import org.eclipse.uml2.uml.NamedElement;
/**
- * this editpart manage the font and icon of the name label and qualified name label.
+ * this editpart manage the font and icon of the name label and qualified name
+ * label.
*
*/
public abstract class NamedElementEditPart extends UMLNodeEditPart implements IUMLNamedElementEditPart {
@@ -56,8 +57,6 @@ public abstract class NamedElementEditPart extends UMLNodeEditPart implements IU
getNodeNamedElementFigure().setNameLabelIcon(NameLabelIconHelper.getNameLabelIconValue((View)getModel()));
}
-
-
protected void refreshVisuals() {
super.refreshVisuals();
if(getNodeNamedElementFigure() != null && resolveSemanticElement() != null) {
@@ -68,8 +67,8 @@ public abstract class NamedElementEditPart extends UMLNodeEditPart implements IU
}
/**
- * A method to specify the labels to be update when the font is refreshed. Subclasses should
- * call super.refreshLabelsFont(font)
+ * A method to specify the labels to be update when the font is refreshed.
+ * Subclasses should call super.refreshLabelsFont(font)
*
* @param font
* the font to use
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/PapyrusStereotypeListener.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/PapyrusStereotypeListener.java
index 265148c3a16..191b94b2b04 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/PapyrusStereotypeListener.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/PapyrusStereotypeListener.java
@@ -31,24 +31,24 @@ import org.eclipse.uml2.uml.util.UMLUtil;
public class PapyrusStereotypeListener implements IPapyrusListener {
/**
- * An {@link Notification#getEventType event type} indicating that a stereotype has been applied
- * to the notifier
+ * An {@link Notification#getEventType event type} indicating that a
+ * stereotype has been applied to the notifier
*
* @see Notification#getEventType
*/
public static final int APPLIED_STEREOTYPE = 20;
/**
- * An {@link Notification#getEventType event type} indicating that a stereotype has been
- * unapplied to the notifier
+ * An {@link Notification#getEventType event type} indicating that a
+ * stereotype has been unapplied to the notifier
*
* @see Notification#getEventType
*/
public static final int UNAPPLIED_STEREOTYPE = 21;
/**
- * An {@link Notification#getEventType event type} indicating that a stereotype has been
- * unapplied to the notifier
+ * An {@link Notification#getEventType event type} indicating that a
+ * stereotype has been unapplied to the notifier
*
* @see Notification#getEventType
*/
@@ -65,7 +65,8 @@ public class PapyrusStereotypeListener implements IPapyrusListener {
*/
public void notifyChanged(Notification notification) {
// feature should be the base_class feature
- // check this is a EStructuralFeature that is changed. Could be something else ?!
+ // check this is a EStructuralFeature that is changed. Could be
+ // something else ?!
final EStructuralFeature feature;
if(!(notification.getFeature() instanceof EStructuralFeature)) {
@@ -89,17 +90,21 @@ public class PapyrusStereotypeListener implements IPapyrusListener {
return;
}
- // check the SET base Element for stereotype elements.... if this is this kind of element
+ // check the SET base Element for stereotype elements.... if this is
+ // this kind of element
if(Notification.SET != notification.getEventType()) {
return;
}
- // should retrieve the element on which modification is done. This should be the new value
+ // should retrieve the element on which modification is done. This
+ // should be the new value
// of the notification
int notificationValue;
- Object value = notification.getNewValue(); // this should be the stereotyped element
+ Object value = notification.getNewValue(); // this should be the
+ // stereotyped element
if(value instanceof Element) {
- // check the notifier (stereotype application) is in the list of stereotypes for the
+ // check the notifier (stereotype application) is in the list of
+ // stereotypes for the
// element
boolean isStereoApplication = ((Element)value).getStereotypeApplications().contains(notification.getNotifier());
if(!isStereoApplication) {
@@ -113,7 +118,8 @@ public class PapyrusStereotypeListener implements IPapyrusListener {
if (!(value instanceof Element)) {
return;
}
- // check that the notifier (stereotype application) is NOT in the list of stereotypes for the
+ // check that the notifier (stereotype application) is NOT in the
+ // list of stereotypes for the
// element
boolean isStereoApplication = ((Element)value).getStereotypeApplications().contains(notification.getNotifier());
if(isStereoApplication) {
@@ -129,14 +135,16 @@ public class PapyrusStereotypeListener implements IPapyrusListener {
}
/**
- * checks if the notifier modified feature is the feature modified by stereotype applications
+ * checks if the notifier modified feature is the feature modified by
+ * stereotype applications
*
- * @return <code>true</code> if the feature of the notification is the "base_XXX" feature, else
- * return <code>false</code>.
+ * @return <code>true</code> if the feature of the notification is the
+ * "base_XXX" feature, else return <code>false</code>.
*/
private boolean isBaseElementChanged(EStructuralFeature feature) {
return feature.getName().startsWith(Extension.METACLASS_ROLE_PREFIX);
- // && (element == null || eStructuralFeature.getEType().isInstance(element))) {
+ // && (element == null ||
+ // eStructuralFeature.getEType().isInstance(element))) {
}
/**
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/PrimaryShapeEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/PrimaryShapeEditPart.java
index f85f22cb051..6fa1af02aab 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/PrimaryShapeEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/PrimaryShapeEditPart.java
@@ -15,8 +15,9 @@ import org.eclipse.draw2d.IFigure;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
/**
- * This editpart has primary shape decorated by the DefaultSizeNodeFigure or other GMF-runtime
- * figures. Most of the generated node' editparts are PrimaryShapeEditPart's.
+ * This editpart has primary shape decorated by the DefaultSizeNodeFigure or
+ * other GMF-runtime figures. Most of the generated node' editparts are
+ * PrimaryShapeEditPart's.
*/
public interface PrimaryShapeEditPart extends IGraphicalEditPart {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/ResizeableListCompartmentEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/ResizeableListCompartmentEditPart.java
index f3312030614..e6f9cd89213 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/ResizeableListCompartmentEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/ResizeableListCompartmentEditPart.java
@@ -22,11 +22,8 @@ import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
import org.eclipse.gmf.runtime.notation.NotationPackage;
-
public abstract class ResizeableListCompartmentEditPart extends ListCompartmentEditPart {
-
-
public ResizeableListCompartmentEditPart(EObject model) {
super(model);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/UMLCompartmentEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/UMLCompartmentEditPart.java
index 87691a319a8..5365bb2bec2 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/UMLCompartmentEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/UMLCompartmentEditPart.java
@@ -18,9 +18,9 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
import org.eclipse.papyrus.diagram.common.editpolicies.ApplyStereotypeEditPolicy;
import org.eclipse.papyrus.diagram.common.service.ApplyStereotypeRequest;
-
/**
- * This edit part manages the application and unapplication of stereotypes on creation.
+ * This edit part manages the application and unapplication of stereotypes on
+ * creation.
*/
public class UMLCompartmentEditPart extends CompartmentEditPart {
@@ -36,13 +36,15 @@ public class UMLCompartmentEditPart extends CompartmentEditPart {
@Override
public boolean isSelectable() {
- //See bug 351433 : https://bugs.eclipse.org/bugs/show_bug.cgi?id=351433
- //This fix changes the behavior of selecting a Class : until now, we had
- //to select a class before being able to select one of its operations or
- //attributes. With this fix, we can select directly the operations or
- //attributes, which means it is now harder to select the class
- //(For Drag&Drop or resizing)
- return getFigure().isShowing(); //FIXME : This is a temporary fix
+ // See bug 351433 : https://bugs.eclipse.org/bugs/show_bug.cgi?id=351433
+ // This fix changes the behavior of selecting a Class : until now, we
+ // had
+ // to select a class before being able to select one of its operations
+ // or
+ // attributes. With this fix, we can select directly the operations or
+ // attributes, which means it is now harder to select the class
+ // (For Drag&Drop or resizing)
+ return getFigure().isShowing(); // FIXME : This is a temporary fix
}
/**
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/UMLConnectionNodeEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/UMLConnectionNodeEditPart.java
index a4dc732cf74..b2887e5d0f3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/UMLConnectionNodeEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/UMLConnectionNodeEditPart.java
@@ -35,9 +35,10 @@ import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Stereotype;
/**
- * Abstract edit part for all connection nodes that control UML elements represented by edges. It
- * then defines basic behavior for Stereotype management. It has facilities to retrieve UML element
- * controlled by this edit part
+ * Abstract edit part for all connection nodes that control UML elements
+ * represented by edges. It then defines basic behavior for Stereotype
+ * management. It has facilities to retrieve UML element controlled by this edit
+ * part
*/
public abstract class UMLConnectionNodeEditPart extends ConnectionNodeEditPart implements IUMLEditPart, IEditpartListenerAccess {
@@ -110,8 +111,9 @@ public abstract class UMLConnectionNodeEditPart extends ConnectionNodeEditPart i
// adds the stereotype application edit policy
installEditPolicy(ApplyStereotypeRequest.APPLY_STEREOTYPE_REQUEST, new ApplyStereotypeEditPolicy());
- //adds a custom EditPolicy to manage the displaying of each label on the connector
- //this editpolicy erase ConnectionLabelsEditPolicy
+ // adds a custom EditPolicy to manage the displaying of each label on
+ // the connector
+ // this editpolicy erase ConnectionLabelsEditPolicy
installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
}
@@ -145,7 +147,8 @@ public abstract class UMLConnectionNodeEditPart extends ConnectionNodeEditPart i
// computes the icon to be displayed
final Image imageToDisplay = stereotypeIconToDisplay();
- // if the string is not empty, then, the figure has to display it. Else, it displays nothing
+ // if the string is not empty, then, the figure has to display it. Else,
+ // it displays nothing
if(stereotypesToDisplay != "" || imageToDisplay != null) {
getPrimaryShape().setStereotypeDisplay(stereotypesToDisplay, imageToDisplay);
} else {
@@ -160,7 +163,8 @@ public abstract class UMLConnectionNodeEditPart extends ConnectionNodeEditPart i
protected void removeSemanticListeners() {
super.removeSemanticListeners();
- // remove listeners to react to the application and remove of stereotypes
+ // remove listeners to react to the application and remove of
+ // stereotypes
removeListenerFilter(STEREOTYPABLE_ELEMENT);
removeListenerFilter(STEREOTYPED_ELEMENT);
}
@@ -181,9 +185,11 @@ public abstract class UMLConnectionNodeEditPart extends ConnectionNodeEditPart i
String stereotypesToDisplay = AppliedStereotypeHelper.getStereotypesToDisplay((View)getModel());
String stereotypespresentationKind = AppliedStereotypeHelper.getAppliedStereotypePresentationKind((View)getModel());
- // check the presentation kind. if only icon => do not display stereotypes
+ // check the presentation kind. if only icon => do not display
+ // stereotypes
if(VisualInformationPapyrusConstant.ICON_STEREOTYPE_PRESENTATION.equals(stereotypespresentationKind)) {
- return ""; // empty string, so stereotype label should not be displayed
+ return ""; // empty string, so stereotype label should not be
+ // displayed
}
String stereotypesToDisplayWithQN = AppliedStereotypeHelper.getStereotypesQNToDisplay(((View)getModel()));
@@ -197,8 +203,7 @@ public abstract class UMLConnectionNodeEditPart extends ConnectionNodeEditPart i
/**
* Returns the image to be displayed for the applied stereotypes.
*
- * @return the image that represents the first applied stereotype or <code>null</code> if no
- * image has to be displayed
+ * @return the image that represents the first applied stereotype or <code>null</code> if no image has to be displayed
*/
public Image stereotypeIconToDisplay() {
String stereotypespresentationKind = AppliedStereotypeHelper.getAppliedStereotypePresentationKind((View)getModel());
@@ -223,7 +228,8 @@ public abstract class UMLConnectionNodeEditPart extends ConnectionNodeEditPart i
* Computes the string that displays the stereotypes for the current element
*
* @param separator
- * the separator used to split the string representing the stereotypes.
+ * the separator used to split the string representing the
+ * stereotypes.
* @param stereotypesToDisplay
* the list of stereotypes displayed
* @param stereotypeWithQualifiedName
@@ -233,8 +239,10 @@ public abstract class UMLConnectionNodeEditPart extends ConnectionNodeEditPart i
public String stereotypesToDisplay(String separator, String stereotypesToDisplay, String stereotypeWithQualifiedName) {
// AL Changes Feb. 07 - Beg
- // Style Handling for STEREOTYPE_NAME_APPEARANCE from ProfileApplicationPreferencePage
- // Stereotype displayed according to UML standard (first letter forced to lower case) -
+ // Style Handling for STEREOTYPE_NAME_APPEARANCE from
+ // ProfileApplicationPreferencePage
+ // Stereotype displayed according to UML standard (first letter forced
+ // to lower case) -
// default -
// or kept as entered by user (user controlled)
@@ -257,7 +265,8 @@ public abstract class UMLConnectionNodeEditPart extends ConnectionNodeEditPart i
if(stereotype != null) {
String name = currentStereotype;
if((stereotypeWithQualifiedName.indexOf(currentStereotype)) == -1) {
- // property value contains qualifiedName ==> extract name from it
+ // property value contains qualifiedName ==> extract name
+ // from it
StringTokenizer strToken = new StringTokenizer(currentStereotype, "::");
while(strToken.hasMoreTokens()) {
@@ -269,9 +278,11 @@ public abstract class UMLConnectionNodeEditPart extends ConnectionNodeEditPart i
// ProfileApplicationPreferencePage)
// Previously lowercase forced onto first letter (standard UML)
// stereotypesToDisplay = stereotypesToDisplay+name.substring(0,
- // 1).toLowerCase()+name.substring(1, name.length())+","+separator;
+ // 1).toLowerCase()+name.substring(1,
+ // name.length())+","+separator;
- // check that the name has not already been added to the displayed string
+ // check that the name has not already been added to the
+ // displayed string
if(sNameAppearance.equals(VisualInformationPapyrusConstant.P_STEREOTYPE_NAME_DISPLAY_USER_CONTROLLED)) {
if(out.indexOf(name) == -1) {
out = out + name + separator;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/UMLNodeEditPart.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/UMLNodeEditPart.java
index b1a187f52a1..42b26767ed9 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/UMLNodeEditPart.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editparts/UMLNodeEditPart.java
@@ -39,8 +39,8 @@ import org.eclipse.swt.graphics.FontData;
import org.eclipse.uml2.uml.Element;
/**
- * this uml edit part that can manage node and compartments. It also manages the application of
- * stereotypes on uml elements represented by nodes
+ * This UML edit part that can manage node and compartments. It also manages the
+ * application of stereotypes on UML elements represented by nodes
*
*/
public abstract class UMLNodeEditPart extends NodeEditPart implements IUMLEditPart {
@@ -135,11 +135,11 @@ public abstract class UMLNodeEditPart extends NodeEditPart implements IUMLEditPa
}
/**
- * Models created with Papyrus 0.7.x do not have a TitleStyle in the compartment views.
- * In this case, the GMF code does not touch the visibility of the title, i.e. it
- * remains true by default. This does not correspond to the diagrams in Papyrus
- * 0.7.x having no title visible.
- * See bug 351084
+ * Models created with Papyrus 0.7.x do not have a TitleStyle in the
+ * compartment views. In this case, the GMF code does not touch the
+ * visibility of the title, i.e. it remains true by default. This does not
+ * correspond to the diagrams in Papyrus 0.7.x having no title visible. See
+ * bug 351084
*/
public void fixCompartmentTitleVisibility() {
for (Object currentEditPart : getChildren()) {
@@ -179,8 +179,8 @@ public abstract class UMLNodeEditPart extends NodeEditPart implements IUMLEditPa
}
/**
- * Refresh the font. This method shouldn't be overriden by subclasses. To refresh labels font,
- * the method refreshLabelsFont should be used. {@inheritDoc}
+ * Refresh the font. This method shouldn't be overriden by subclasses. To
+ * refresh labels font, the method refreshLabelsFont should be used. {@inheritDoc}
*/
@Override
protected void refreshFont() {
@@ -201,8 +201,8 @@ public abstract class UMLNodeEditPart extends NodeEditPart implements IUMLEditPa
}
/**
- * A method to specify the labels to be update when the font is refreshed. Subclasses should
- * call super.refreshLabelsFont(font)
+ * A method to specify the labels to be update when the font is refreshed.
+ * Subclasses should call super.refreshLabelsFont(font)
*
* @param font
* the font to use
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AbstractAppliedStereotypeDisplayEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AbstractAppliedStereotypeDisplayEditPolicy.java
index 24452cfe6a1..d92036ff6be 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AbstractAppliedStereotypeDisplayEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AbstractAppliedStereotypeDisplayEditPolicy.java
@@ -39,8 +39,8 @@ import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Stereotype;
/**
- * Specific edit policy for label displaying stereotypes and their properties for representing UML
- * elements.
+ * Specific edit policy for label displaying stereotypes and their properties
+ * for representing UML elements.
*/
public abstract class AbstractAppliedStereotypeDisplayEditPolicy extends GraphicalEditPolicy implements NotificationListener, IPapyrusListener {
@@ -69,7 +69,8 @@ public abstract class AbstractAppliedStereotypeDisplayEditPolicy extends Graphic
}
hostSemanticElement = getUMLElement();
- // adds a listener on the view and the element controlled by the editpart
+ // adds a listener on the view and the element controlled by the
+ // editpart
getDiagramEventBroker().addNotificationListener(view, this);
if(hostSemanticElement == null) {
@@ -151,10 +152,12 @@ public abstract class AbstractAppliedStereotypeDisplayEditPolicy extends Graphic
* {@inheritedDoc}
*/
public void notifyChanged(Notification notification) {
- // change the label of the figure managed by the host edit part (managed by the parent edit
+ // change the label of the figure managed by the host edit part (managed
+ // by the parent edit
// part in general...)
// it must be changed only if:
- // - the annotation corresponding to the display of the stereotype changes
+ // - the annotation corresponding to the display of the stereotype
+ // changes
// - the stereotype application list has changed
final int eventType = notification.getEventType();
@@ -180,20 +183,22 @@ public abstract class AbstractAppliedStereotypeDisplayEditPolicy extends Graphic
}
/**
- * Refreshes the display for the element controlled by the edit part with this edit policies
+ * Refreshes the display for the element controlled by the edit part with
+ * this edit policies
*/
public abstract void refreshDisplay();
/**
- * Parses the string containing the complete definition of properties to be displayed, and
- * generates a map.
+ * Parses the string containing the complete definition of properties to be
+ * displayed, and generates a map.
*
* @param stereotypesToDisplay
* the list of stereotypes to display
* @param stereotypesPropertiesToDisplay
* the properties of stereotypes to display
- * @return a map. The keys are the name of displayed stereotypes, the corresponding data is a
- * collection of its properties to be displayed
+ * @return a map. The keys are the name of displayed stereotypes, the
+ * corresponding data is a collection of its properties to be
+ * displayed
*/
protected Map<String, List<String>> parseStereotypeProperties(String stereotypesToDisplay, String stereotypesPropertiesToDisplay) {
Map<String, List<String>> propertiesMap = new HashMap<String, List<String>>();
@@ -215,8 +220,7 @@ public abstract class AbstractAppliedStereotypeDisplayEditPolicy extends Graphic
/**
* Returns the image to be displayed for the applied stereotypes.
*
- * @return the image that represents the first applied stereotype or <code>null</code> if no
- * image has to be displayed
+ * @return the image that represents the first applied stereotype or <code>null</code> if no image has to be displayed
*/
public Image stereotypeIconToDisplay() {
String stereotypespresentationKind = AppliedStereotypeHelper.getAppliedStereotypePresentationKind((View)getHost().getModel());
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AbstractMaskManagedEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AbstractMaskManagedEditPolicy.java
index 28328177a0a..536d2cfb029 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AbstractMaskManagedEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AbstractMaskManagedEditPolicy.java
@@ -35,8 +35,10 @@ import org.eclipse.uml2.uml.Element;
public abstract class AbstractMaskManagedEditPolicy extends GraphicalEditPolicyEx implements NotificationListener, IPapyrusListener, IMaskManagedLabelEditPolicy {
/**
- * Stores the semantic element related to the edit policy. If resolveSemanticElement is used, there are problems when the edit part is getting
- * destroyed, i.e. the link to the semantic element is removed, but the listeners should still be removed
+ * Stores the semantic element related to the edit policy. If
+ * resolveSemanticElement is used, there are problems when the edit part is
+ * getting destroyed, i.e. the link to the semantic element is removed, but
+ * the listeners should still be removed
*/
protected Element hostSemanticElement;
@@ -53,7 +55,8 @@ public abstract class AbstractMaskManagedEditPolicy extends GraphicalEditPolicyE
hostSemanticElement = initSemanticElement();
if(hostSemanticElement != null) {
- // adds a listener on the view and the element controlled by the editpart
+ // adds a listener on the view and the element controlled by the
+ // editpart
getDiagramEventBroker().addNotificationListener(view, this);
getDiagramEventBroker().addNotificationListener(hostSemanticElement, this);
@@ -113,7 +116,8 @@ public abstract class AbstractMaskManagedEditPolicy extends GraphicalEditPolicyE
}
/**
- * Remove additional listeners that were added during activation of the edit policy
+ * Remove additional listeners that were added during activation of the edit
+ * policy
*/
protected void removeAdditionalListeners() {
// default implementation does nothing
@@ -151,19 +155,20 @@ public abstract class AbstractMaskManagedEditPolicy extends GraphicalEditPolicyE
}
/**
- * Returns <code>true</code> if the specified object is the annotation in charge of the mask
- * managed label.
+ * Returns <code>true</code> if the specified object is the annotation in
+ * charge of the mask managed label.
*
* @param object
* the object to be checked
- * @return <code>true</code> if the object is an {@link EAnnotation} and its source is the
- * correct one.
+ * @return <code>true</code> if the object is an {@link EAnnotation} and its
+ * source is the correct one.
*/
protected boolean isMaskManagedAnnotation(Object object) {
// check the notifier is an annotation
if((object instanceof EAnnotation)) {
- // notifier is the eannotation. Check this is the annotation in charge of the property
+ // notifier is the eannotation. Check this is the annotation in
+ // charge of the property
// label display
if(VisualInformationPapyrusConstant.CUSTOM_APPEARENCE_ANNOTATION.equals(((EAnnotation)object).getSource())) {
return true;
@@ -173,15 +178,15 @@ public abstract class AbstractMaskManagedEditPolicy extends GraphicalEditPolicyE
}
/**
- * Returns <code>true</code> if the the annotation in charge of the mask managed label is
- * removed from the given object which should be a View.
+ * Returns <code>true</code> if the the annotation in charge of the mask
+ * managed label is removed from the given object which should be a View.
*
* @param object
* the object to be checked
* @param notification
* the notification passed to the policy (which is a listener)
- * @return <code>true</code> if the object is an {@link EAnnotation} and its source is the
- * correct one.
+ * @return <code>true</code> if the object is an {@link EAnnotation} and its
+ * source is the correct one.
*/
protected boolean isRemovedMaskManagedLabelAnnotation(Object object, Notification notification) {
// object is a model element, that means it has EAnnotations
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AffixedNodeAlignmentEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AffixedNodeAlignmentEditPolicy.java
index 755b00f8c84..6f35d856158 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AffixedNodeAlignmentEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AffixedNodeAlignmentEditPolicy.java
@@ -19,9 +19,10 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
/**
*
- * This EditPolicy provides the command for the alignment.
- * In the case of AffixedNode, the parent is not a {@link CompartmentEditPart}, but directly the object.
- * For example, a port is owned by a ClassCompositeEditPart and not by a ClassCompositeCompartmentEditPart
+ * This EditPolicy provides the command for the alignment. In the case of
+ * AffixedNode, the parent is not a {@link CompartmentEditPart}, but directly
+ * the object. For example, a port is owned by a ClassCompositeEditPart and not
+ * by a ClassCompositeCompartmentEditPart
*/
public class AffixedNodeAlignmentEditPolicy extends ConstrainedItemBorderLayoutEditPolicy {
@@ -29,7 +30,8 @@ public class AffixedNodeAlignmentEditPolicy extends ConstrainedItemBorderLayoutE
public static final String AFFIXED_CHILD_ALIGNMENT_ROLE = "affixed node alignment editpolicy"; //$NON-NLS-1$
/**
- * Creates command for <tt>REQ_ALIGN_CHILDREN</tt> requests only; all others requests are ignored
+ * Creates command for <tt>REQ_ALIGN_CHILDREN</tt> requests only; all others
+ * requests are ignored
*
* @see #getCommand(Request)
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeAbstractionLabelDisplayEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeAbstractionLabelDisplayEditPolicy.java
index c0cf696c0d3..9ef3ea5f7f3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeAbstractionLabelDisplayEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeAbstractionLabelDisplayEditPolicy.java
@@ -26,7 +26,8 @@ import org.eclipse.uml2.uml.Abstraction;
public class AppliedStereotypeAbstractionLabelDisplayEditPolicy extends AppliedStereotypeLinkLabelDisplayEditPolicy {
/**
- * Creates a new AppliedStereotypeAbstractionLabelDisplayEditPolicy, with the correct tag.
+ * Creates a new AppliedStereotypeAbstractionLabelDisplayEditPolicy, with
+ * the correct tag.
*/
public AppliedStereotypeAbstractionLabelDisplayEditPolicy() {
super(Messages.AppliedStereotypeLabel_AbstractionTag);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeExternalNodeEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeExternalNodeEditPolicy.java
index 6fe46834d75..d238ddf605f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeExternalNodeEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeExternalNodeEditPolicy.java
@@ -23,8 +23,9 @@ import org.eclipse.papyrus.umlutils.ui.VisualInformationPapyrusConstant;
import org.eclipse.papyrus.umlutils.ui.helper.AppliedStereotypeHelper;
/**
- * This edit policy is used to display only applied stereotypes and properties in a external node (that is a labelEditPart)
- * In order to use it, the edit part has to be {@link IPapyrusEditPart} and the associated figure has to be {@link IPapyrusUMLElementFigure}
+ * This edit policy is used to display only applied stereotypes and properties
+ * in a external node (that is a labelEditPart) In order to use it, the edit
+ * part has to be {@link IPapyrusEditPart} and the associated figure has to be {@link IPapyrusUMLElementFigure}
*/
public class AppliedStereotypeExternalNodeEditPolicy extends AppliedStereotypeLabelDisplayEditPolicy {
@@ -59,7 +60,8 @@ public class AppliedStereotypeExternalNodeEditPolicy extends AppliedStereotypeLa
/**
*
*
- * @return the list of stereotypes to display with properties if there are selected to be displayed
+ * @return the list of stereotypes to display with properties if there are
+ * selected to be displayed
*/
public String stereotypesToDisplay() {
@@ -71,12 +73,15 @@ public class AppliedStereotypeExternalNodeEditPolicy extends AppliedStereotypeLa
String stereotypespresentationKind = AppliedStereotypeHelper.getAppliedStereotypePresentationKind((View)((View)getHost().getModel()).eContainer());
// now check presentation.
- // if horizontal => equivalent to the inBrace visualization in nodes (i.e. only name =
+ // if horizontal => equivalent to the inBrace visualization in nodes
+ // (i.e. only name =
// value, separator = comma, delimited with brace
- // if vertical => equivalent to compartment visualization name of stereotype, NL, property =
+ // if vertical => equivalent to compartment visualization name of
+ // stereotype, NL, property =
// value, NL, etC.
- // check the presentation kind. if only icon => do not display stereotype, only values
+ // check the presentation kind. if only icon => do not display
+ // stereotype, only values
if(VisualInformationPapyrusConstant.ICON_STEREOTYPE_PRESENTATION.equals(stereotypespresentationKind)) {
return StereotypeUtil.getPropertiesValuesInBrace(stereotypesPropertiesToDisplay, getUMLElement());
}
@@ -109,7 +114,9 @@ public class AppliedStereotypeExternalNodeEditPolicy extends AppliedStereotypeLa
if(getHost() instanceof IPapyrusEditPart) {
IFigure figure = ((IPapyrusEditPart)getHost()).getPrimaryShape();
- if(figure instanceof IPapyrusUMLElementFigure) {// calculate text and icon to display
+ if(figure instanceof IPapyrusUMLElementFigure) {// calculate text
+ // and icon to
+ // display
final String stereotypesToDisplay = stereotypesToDisplay();
((IPapyrusUMLElementFigure)figure).setStereotypeDisplay(tag + (stereotypesToDisplay), null);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeIconlDisplayEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeIconlDisplayEditPolicy.java
index 29888a9bb78..91b7564da45 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeIconlDisplayEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeIconlDisplayEditPolicy.java
@@ -17,10 +17,10 @@ import org.eclipse.draw2d.IFigure;
import org.eclipse.papyrus.diagram.common.editparts.IPapyrusEditPart;
import org.eclipse.papyrus.diagram.common.figure.node.IPapyrusUMLElementFigure;
-
/**
* This edit policy displays only icon of applied stereotypes if its exists *.
- * In order to use it, the edit part has to be {@link IPapyrusEditPart} and the associated figure has to be {@link IPapyrusUMLElementFigure}
+ * In order to use it, the edit part has to be {@link IPapyrusEditPart} and the
+ * associated figure has to be {@link IPapyrusUMLElementFigure}
*/
public class AppliedStereotypeIconlDisplayEditPolicy extends AppliedStereotypeLabelDisplayEditPolicy {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeLabelDisplayEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeLabelDisplayEditPolicy.java
index a7cd4640c31..303b91da3b0 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeLabelDisplayEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeLabelDisplayEditPolicy.java
@@ -29,8 +29,8 @@ import org.eclipse.uml2.uml.Stereotype;
import org.eclipse.uml2.uml.Usage;
/**
- * Specific edit policy for label displaying stereotypes and their properties for edges representing
- * UML elements.
+ * Specific edit policy for label displaying stereotypes and their properties
+ * for edges representing UML elements.
* <p>
* It also displays the tag for the links, for example "use" for {@link Usage}.
*
@@ -44,8 +44,8 @@ public abstract class AppliedStereotypeLabelDisplayEditPolicy extends AbstractAp
public String tag;
/**
- * Creates a new AppliedStereotypeLabelDisplayEditPolicy, with the specified tag for the
- * element.
+ * Creates a new AppliedStereotypeLabelDisplayEditPolicy, with the specified
+ * tag for the element.
*
* @param tag
* the tag for element, for example "use" for {@link Usage}.
@@ -56,7 +56,8 @@ public abstract class AppliedStereotypeLabelDisplayEditPolicy extends AbstractAp
}
/**
- * Creates a new AppliedStereotypeLabelDisplayEditPolicy, with no tag for the element.
+ * Creates a new AppliedStereotypeLabelDisplayEditPolicy, with no tag for
+ * the element.
*/
public AppliedStereotypeLabelDisplayEditPolicy() {
super();
@@ -79,8 +80,7 @@ public abstract class AppliedStereotypeLabelDisplayEditPolicy extends AbstractAp
/**
* Returns the image to be displayed for the applied stereotypes.
*
- * @return the image that represents the first applied stereotype or <code>null</code> if no
- * image has to be displayed
+ * @return the image that represents the first applied stereotype or <code>null</code> if no image has to be displayed
*/
public Image stereotypeIconToDisplay() {
String stereotypespresentationKind = AppliedStereotypeHelper.getAppliedStereotypePresentationKind((View)getHost().getModel());
@@ -102,19 +102,20 @@ public abstract class AppliedStereotypeLabelDisplayEditPolicy extends AbstractAp
}
/**
- * Returns a String that displays stereotypes (using their simple name or their qualified name)
- * and their properties
+ * Returns a String that displays stereotypes (using their simple name or
+ * their qualified name) and their properties
*
* @param separator
- * the separator used to split the string representing the stereotypes.
+ * the separator used to split the string representing the
+ * stereotypes.
* @param stereotypesToDisplay
* the list of stereotypes displayed
* @param stereotypeWithQualifiedName
* the list of stereotypes displayed using their qualified names
* @param stereotypesPropertiesToDisplay
* the list of properties to display
- * @return a string that displays stereotypes (using their simple name or their qualified name)
- * and their properties
+ * @return a string that displays stereotypes (using their simple name or
+ * their qualified name) and their properties
*/
public String stereotypesAndPropertiesToDisplay(String separator, String stereotypesToDisplay, String stereotypeWithQualifiedName, String stereotypesPropertiesToDisplay) {
// Get the preference from PreferenceStore. there should be an assert
@@ -123,10 +124,12 @@ public abstract class AppliedStereotypeLabelDisplayEditPolicy extends AbstractAp
if(store == null) {
return "";
}
- // retrieve if the name of the stereotype has to put to lower case or not
+ // retrieve if the name of the stereotype has to put to lower case or
+ // not
String sNameAppearance = store.getString(VisualInformationPapyrusConstant.P_STEREOTYPE_NAME_APPEARANCE);
- // changes the string of properties into a map, where the entries of the map are the
+ // changes the string of properties into a map, where the entries of the
+ // map are the
// stereotype qualified name, and the properties to display are the data
Map<String, List<String>> propertiesToDisplay = parseStereotypeProperties(stereotypesToDisplay, stereotypesPropertiesToDisplay);
@@ -141,7 +144,8 @@ public abstract class AppliedStereotypeLabelDisplayEditPolicy extends AbstractAp
if(stereotype != null) {
String name = currentStereotype;
if((stereotypeWithQualifiedName.indexOf(currentStereotype)) == -1) {
- // property value contains qualifiedName ==> extract name from it
+ // property value contains qualifiedName ==> extract name
+ // from it
StringTokenizer strToken = new StringTokenizer(currentStereotype, "::");
while(strToken.hasMoreTokens()) {
@@ -153,9 +157,11 @@ public abstract class AppliedStereotypeLabelDisplayEditPolicy extends AbstractAp
// ProfileApplicationPreferencePage)
// Previously lowercase forced onto first letter (standard UML)
// stereotypesToDisplay = stereotypesToDisplay+name.substring(0,
- // 1).toLowerCase()+name.substring(1, name.length())+","+separator;
+ // 1).toLowerCase()+name.substring(1,
+ // name.length())+","+separator;
- // check that the name has not already been added to the displayed string
+ // check that the name has not already been added to the
+ // displayed string
if(sNameAppearance.equals(VisualInformationPapyrusConstant.P_STEREOTYPE_NAME_DISPLAY_USER_CONTROLLED)) {
if(out.indexOf(name) == -1) {
out = out + Activator.ST_LEFT + name + Activator.ST_RIGHT + separator;
@@ -202,12 +208,15 @@ public abstract class AppliedStereotypeLabelDisplayEditPolicy extends AbstractAp
String stereotypespresentationKind = AppliedStereotypeHelper.getAppliedStereotypePresentationKind((View)getHost().getModel());
// now check presentation.
- // if horizontal => equivalent to the inBrace visualization in nodes (i.e. only name =
+ // if horizontal => equivalent to the inBrace visualization in nodes
+ // (i.e. only name =
// value, separator = comma, delimited with brace
- // if vertical => equivalent to compartment visualization name of stereotype, NL, property =
+ // if vertical => equivalent to compartment visualization name of
+ // stereotype, NL, property =
// value, NL, etC.
- // check the presentation kind. if only icon => do not display stereotype, only values
+ // check the presentation kind. if only icon => do not display
+ // stereotype, only values
if(VisualInformationPapyrusConstant.ICON_STEREOTYPE_PRESENTATION.equals(stereotypespresentationKind)) {
return StereotypeUtil.getPropertiesValuesInBrace(stereotypesPropertiesToDisplay, getUMLElement());
}
@@ -236,7 +245,8 @@ public abstract class AppliedStereotypeLabelDisplayEditPolicy extends AbstractAp
* Computes the string that displays the stereotypes for the current element
*
* @param separator
- * the separator used to split the string representing the stereotypes.
+ * the separator used to split the string representing the
+ * stereotypes.
* @param stereotypesToDisplay
* the list of stereotypes displayed
* @param stereotypeWithQualifiedName
@@ -246,8 +256,10 @@ public abstract class AppliedStereotypeLabelDisplayEditPolicy extends AbstractAp
public String stereotypesToDisplay(String separator, String stereotypesToDisplay, String stereotypeWithQualifiedName) {
// AL Changes Feb. 07 - Beg
- // Style Handling for STEREOTYPE_NAME_APPEARANCE from ProfileApplicationPreferencePage
- // Stereotype displayed according to UML standard (first letter forced to lower case) -
+ // Style Handling for STEREOTYPE_NAME_APPEARANCE from
+ // ProfileApplicationPreferencePage
+ // Stereotype displayed according to UML standard (first letter forced
+ // to lower case) -
// default -
// or kept as entered by user (user controlled)
@@ -270,7 +282,8 @@ public abstract class AppliedStereotypeLabelDisplayEditPolicy extends AbstractAp
if(stereotype != null) {
String name = currentStereotype;
if((stereotypeWithQualifiedName.indexOf(currentStereotype)) == -1) {
- // property value contains qualifiedName ==> extract name from it
+ // property value contains qualifiedName ==> extract name
+ // from it
StringTokenizer strToken = new StringTokenizer(currentStereotype, "::");
while(strToken.hasMoreTokens()) {
@@ -282,9 +295,11 @@ public abstract class AppliedStereotypeLabelDisplayEditPolicy extends AbstractAp
// ProfileApplicationPreferencePage)
// Previously lowercase forced onto first letter (standard UML)
// stereotypesToDisplay = stereotypesToDisplay+name.substring(0,
- // 1).toLowerCase()+name.substring(1, name.length())+","+separator;
+ // 1).toLowerCase()+name.substring(1,
+ // name.length())+","+separator;
- // check that the name has not already been added to the displayed string
+ // check that the name has not already been added to the
+ // displayed string
if(sNameAppearance.equals(VisualInformationPapyrusConstant.P_STEREOTYPE_NAME_DISPLAY_USER_CONTROLLED)) {
if(out.indexOf(name) == -1) {
out = out + name + separator;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeLinkLabelDisplayEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeLinkLabelDisplayEditPolicy.java
index a4106b53578..30d3ef8338f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeLinkLabelDisplayEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeLinkLabelDisplayEditPolicy.java
@@ -19,8 +19,9 @@ import org.eclipse.papyrus.diagram.common.figure.node.IPapyrusUMLElementFigure;
import org.eclipse.swt.graphics.Image;
/**
- * the goal of this edit policy is to display applied stereotype and properties of stereotypes in to
- * a label attached to a link the edge figure figure has to be a {@link IPapyrusUMLElementFigure}
+ * the goal of this edit policy is to display applied stereotype and properties
+ * of stereotypes in to a label attached to a link the edge figure figure has to
+ * be a {@link IPapyrusUMLElementFigure}
*/
public class AppliedStereotypeLinkLabelDisplayEditPolicy extends AppliedStereotypeLabelDisplayEditPolicy {
@@ -44,7 +45,8 @@ public class AppliedStereotypeLinkLabelDisplayEditPolicy extends AppliedStereoty
// computes the icon to be displayed
final Image imageToDisplay = stereotypeIconToDisplay();
- // if the string is not empty, then, the figure has to display it. Else, it displays nothing
+ // if the string is not empty, then, the figure has to display it. Else,
+ // it displays nothing
// if (stereotypesToDisplay != "" || imageToDisplay != null) {
if(figure instanceof IPapyrusUMLElementFigure) {
((IPapyrusUMLElementFigure)figure).setStereotypeDisplay(tag + (stereotypesToDisplay.equals("") ? stereotypesToDisplay : "\n" + stereotypesToDisplay), imageToDisplay);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeNodeLabelDisplayEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeNodeLabelDisplayEditPolicy.java
index ec40b56058e..22fca5a94ee 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeNodeLabelDisplayEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeNodeLabelDisplayEditPolicy.java
@@ -24,8 +24,8 @@ import org.eclipse.papyrus.umlutils.ui.helper.AppliedStereotypeHelper;
import org.eclipse.swt.graphics.Image;
/**
- * this edit policy can be apply only on {@link IPapyrusEditPart} in order to access to primary figure.
- * the primary figure has to be a {@link IPapyrusNodeUMLElementFigure}
+ * this edit policy can be apply only on {@link IPapyrusEditPart} in order to
+ * access to primary figure. the primary figure has to be a {@link IPapyrusNodeUMLElementFigure}
*/
public class AppliedStereotypeNodeLabelDisplayEditPolicy extends AppliedStereotypeLabelDisplayEditPolicy {
@@ -49,14 +49,16 @@ public class AppliedStereotypeNodeLabelDisplayEditPolicy extends AppliedStereoty
// computes the icon to be displayed
final Image imageToDisplay = stereotypeIconToDisplay();
- // if the string is not empty, then, the figure has to display it. Else, it displays
+ // if the string is not empty, then, the figure has to display it.
+ // Else, it displays
// nothing
// if (stereotypesToDisplay != "" || imageToDisplay != null) {
if(figure instanceof IPapyrusNodeUMLElementFigure) {
((IPapyrusNodeUMLElementFigure)figure).setStereotypeDisplay(tag + (stereotypesOnlyToDisplay().equals("") ? stereotypesToDisplay : stereotypesToDisplay), imageToDisplay);
refreshAppliedStereotypesProperties(((IPapyrusNodeUMLElementFigure)figure));
}
- // TODO we should manage PapyrusNodeFigure here too (and WrappingLabel ?)
+ // TODO we should manage PapyrusNodeFigure here too (and
+ // WrappingLabel ?)
}
}
@@ -71,7 +73,8 @@ public class AppliedStereotypeNodeLabelDisplayEditPolicy extends AppliedStereoty
}
/**
- * Refreshes the stereotypes properties displayed in a compartment of this edit part.
+ * Refreshes the stereotypes properties displayed in a compartment of this
+ * edit part.
*
* @param stereotypesPropertiesToDisplay
* list of properties to display
@@ -83,7 +86,8 @@ public class AppliedStereotypeNodeLabelDisplayEditPolicy extends AppliedStereoty
final boolean displayInCompartment = AppliedStereotypeHelper.hasAppliedStereotypesPropertiesToDisplay((View)(View)getHost().getModel(), VisualInformationPapyrusConstant.STEREOTYPE_COMPARTMENT_LOCATION);
- // if the string is not empty, then, the figure has to display it. Else, it displays nothing
+ // if the string is not empty, then, the figure has to display it. Else,
+ // it displays nothing
if(displayInCompartment) {
String todisplay = StereotypeUtil.getPropertiesValues(stereotypesPropertiesToDisplay, getUMLElement());
figure.setStereotypePropertiesInCompartment(todisplay);
@@ -93,15 +97,18 @@ public class AppliedStereotypeNodeLabelDisplayEditPolicy extends AppliedStereoty
}
/**
- * Refreshes the stereotypes properties displayed above name of the element in this edit part.
+ * Refreshes the stereotypes properties displayed above name of the element
+ * in this edit part.
*/
protected void refreshAppliedStereotypesPropertiesInBrace(String stereotypesPropertiesToDisplay, IPapyrusNodeUMLElementFigure figure) {
// check if properties have to be displayed in braces.
final boolean displayInBrace = AppliedStereotypeHelper.hasAppliedStereotypesPropertiesToDisplay((View)getHost().getModel(), VisualInformationPapyrusConstant.STEREOTYPE_BRACE_LOCATION);
- // if the string is not empty, then, the figure has to display it. Else, it displays nothing
+ // if the string is not empty, then, the figure has to display it. Else,
+ // it displays nothing
if(displayInBrace) {
- // it has to be displayed in braces, so compute the string to display
+ // it has to be displayed in braces, so compute the string to
+ // display
String todisplay = StereotypeUtil.getPropertiesValuesInBrace(stereotypesPropertiesToDisplay, getUMLElement());
figure.setStereotypePropertiesInBrace(todisplay);
} else {
@@ -112,8 +119,8 @@ public class AppliedStereotypeNodeLabelDisplayEditPolicy extends AppliedStereoty
/**
* this method is used to display only applied stereotypes
*
- * @return the string with applied stereotypes. It can return "" if there is no stereotypes to
- * display
+ * @return the string with applied stereotypes. It can return "" if there is
+ * no stereotypes to display
*/
public String stereotypesOnlyToDisplay() {
// list of stereotypes to display
@@ -121,9 +128,11 @@ public class AppliedStereotypeNodeLabelDisplayEditPolicy extends AppliedStereoty
// Kind of the representation
String stereotypespresentationKind = AppliedStereotypeHelper.getAppliedStereotypePresentationKind((View)getHost().getModel());
- // check the presentation kind. if only icon => do not display stereotypes
+ // check the presentation kind. if only icon => do not display
+ // stereotypes
if(VisualInformationPapyrusConstant.ICON_STEREOTYPE_PRESENTATION.equals(stereotypespresentationKind)) {
- return ""; // empty string, so stereotype label should not be displayed
+ return ""; // empty string, so stereotype label should not be
+ // displayed
}
// stereotypes with qualified name to display
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypePackageImportLabelDisplayEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypePackageImportLabelDisplayEditPolicy.java
index bf1a40edb71..9ab0807b277 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypePackageImportLabelDisplayEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypePackageImportLabelDisplayEditPolicy.java
@@ -30,25 +30,26 @@ import org.eclipse.uml2.uml.VisibilityKind;
public class AppliedStereotypePackageImportLabelDisplayEditPolicy extends AppliedStereotypeLinkLabelDisplayEditPolicy {
String importTag = Activator.ST_LEFT + Messages.AppliedStereotypeLabel_PackageImportTag + Activator.ST_RIGHT;
+
String accessTag = Activator.ST_LEFT + Messages.AppliedStereotypeLabel_PackageImportAccessTag + Activator.ST_RIGHT;
@Override
public void activate() {
super.activate();
- if (hostSemanticElement instanceof PackageImport) {
+ if(hostSemanticElement instanceof PackageImport) {
changeTag(((PackageImport)hostSemanticElement).getVisibility());
}
}
public void notifyChanged(Notification notification) {
super.notifyChanged(notification);
- if (UMLPackage.Literals.PACKAGE_IMPORT__VISIBILITY.equals(notification.getFeature())) {
+ if(UMLPackage.Literals.PACKAGE_IMPORT__VISIBILITY.equals(notification.getFeature())) {
changeTag((VisibilityKind)notification.getNewValue());
}
}
protected void changeTag(VisibilityKind visibility) {
- if (VisibilityKind.PUBLIC_LITERAL.equals(visibility)) {
+ if(VisibilityKind.PUBLIC_LITERAL.equals(visibility)) {
tag = importTag;
} else {
tag = accessTag;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypePackageMergeLabelDisplayEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypePackageMergeLabelDisplayEditPolicy.java
index 4aa55bbaa01..588e5a57172 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypePackageMergeLabelDisplayEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypePackageMergeLabelDisplayEditPolicy.java
@@ -26,7 +26,8 @@ import org.eclipse.uml2.uml.PackageMerge;
public class AppliedStereotypePackageMergeLabelDisplayEditPolicy extends AppliedStereotypeLinkLabelDisplayEditPolicy {
/**
- * Creates a new AppliedStereotypePackageMergeLabelDisplayEditPolicy, with the correct tag.
+ * Creates a new AppliedStereotypePackageMergeLabelDisplayEditPolicy, with
+ * the correct tag.
*/
public AppliedStereotypePackageMergeLabelDisplayEditPolicy() {
super(Messages.AppliedStereotypeLabel_PackageMergeTag);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeUsageLabelDisplayEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeUsageLabelDisplayEditPolicy.java
index 355a70104d7..b547e7c0577 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeUsageLabelDisplayEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/AppliedStereotypeUsageLabelDisplayEditPolicy.java
@@ -26,7 +26,8 @@ import org.eclipse.uml2.uml.Usage;
public class AppliedStereotypeUsageLabelDisplayEditPolicy extends AppliedStereotypeLinkLabelDisplayEditPolicy {
/**
- * Creates a new AppliedStereotypeUsageLabelDisplayEditPolicy, with the correct tag.
+ * Creates a new AppliedStereotypeUsageLabelDisplayEditPolicy, with the
+ * correct tag.
*/
public AppliedStereotypeUsageLabelDisplayEditPolicy() {
super(Messages.AppliedStereotypeLabel_UsageTag);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ApplyStereotypeEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ApplyStereotypeEditPolicy.java
index e784a6fb39e..ef18806ebc0 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ApplyStereotypeEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ApplyStereotypeEditPolicy.java
@@ -104,9 +104,11 @@ public class ApplyStereotypeEditPolicy extends AbstractEditPolicy {
// */
// @Override
// public Command getCommand(Request request) {
- // // command should be a composed command: apply stereotype, display stereotype and eventually
+ // // command should be a composed command: apply stereotype, display
+ // stereotype and eventually
// // change the name of the semantic element
- // if (ApplyStereotypeRequest.APPLY_STEREOTYPE_REQUEST.equals(request.getType()))
+ // if
+ // (ApplyStereotypeRequest.APPLY_STEREOTYPE_REQUEST.equals(request.getType()))
// return getApplyStereotypeCommand((ApplyStereotypeRequest) request);
//
// return super.getCommand(request);
@@ -123,7 +125,8 @@ public class ApplyStereotypeEditPolicy extends AbstractEditPolicy {
EditPart ep = getHost();
boolean isActivating = true;
// use the viewer to determine if we are still initializing the diagram
- // do not use the DiagramEditPart.isActivating since ConnectionEditPart's
+ // do not use the DiagramEditPart.isActivating since
+ // ConnectionEditPart's
// parent will not be a diagram edit part
EditPartViewer viewer = ep.getViewer();
if(viewer instanceof DiagramGraphicalViewer) {
@@ -192,7 +195,8 @@ public class ApplyStereotypeEditPolicy extends AbstractEditPolicy {
// retrieve the stereotype to apply
Stereotype stereotype = element.getApplicableStereotype(stereotypeQName);
if(stereotype == null) {
- // stereotype has no been found. should ask for profile application ?
+ // stereotype has no been found. should ask for
+ // profile application ?
PapyrusTrace.log(IStatus.WARNING, "impossible to retrieve the stereotype " + stereotypeQName);
} else {
result.add(element.applyStereotype(stereotype));
@@ -204,7 +208,8 @@ public class ApplyStereotypeEditPolicy extends AbstractEditPolicy {
}
});
- // check if the name of base element must be changed (don't bother what is the value of the
+ // check if the name of base element must be changed (don't bother what
+ // is the value of the
// element, only the key is needed
Object newName = request.getExtendedData().get(ApplyStereotypeRequest.NEW_EDIT_PART_NAME);
if(newName != null) {
@@ -213,13 +218,15 @@ public class ApplyStereotypeEditPolicy extends AbstractEditPolicy {
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // retrieves the edit part on which stereotype request is made
+ // retrieves the edit part on which stereotype request is
+ // made
if(getHost() instanceof IUMLEditPart || ((getHost().getModel() instanceof View) && (((View)getHost().getModel()).getElement()) instanceof Element)) {
if(!(element instanceof NamedElement)) {
return null;
}
- // retrieves the list of stereotypes to be applied (qualified names)
+ // retrieves the list of stereotypes to be applied
+ // (qualified names)
List<String> stereotypeQNames = _request.getStereotypesToApply();
String stereotypeName = NamedElementUtil.getNameFromQualifiedName(stereotypeQNames.get(0));
// find a new name for the element
@@ -234,7 +241,8 @@ public class ApplyStereotypeEditPolicy extends AbstractEditPolicy {
// 2. display stereotypes
String presentationKind = AppliedStereotypeHelper.getAppliedStereotypePresentationKind(element);
- // should display real applied stereotypes and not the list of stereotypes to apply...
+ // should display real applied stereotypes and not the list of
+ // stereotypes to apply...
cc.compose(new EMFtoGMFCommandWrapper(new DefferedAppliedStereotypeToDisplayCommand(editingDomain, getHost(), "", presentationKind)));
return new ICommandProxy(cc.reduce());
@@ -248,7 +256,8 @@ public class ApplyStereotypeEditPolicy extends AbstractEditPolicy {
* @return the list of stereotypes to display
*/
public String getStereotypeList(ApplyStereotypeRequest request) {
- // transforms the list of stereotypes in the request into a string corresponding to the
+ // transforms the list of stereotypes in the request into a string
+ // corresponding to the
// string input of the display stereotype command.
StringBuffer buffer = new StringBuffer();
Iterator<String> it = request.getStereotypesToApply().iterator();
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/BorderItemResizableEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/BorderItemResizableEditPolicy.java
index ad3852aa5bd..71f036f51ea 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/BorderItemResizableEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/BorderItemResizableEditPolicy.java
@@ -35,7 +35,8 @@ import org.eclipse.gmf.runtime.notation.View;
/**
*
- * @author Patrick Tessier Policy that allows resizing border item code comes form {@link BorderItemSelectionEditPolicy} and modify in order to use
+ * @author Patrick Tessier Policy that allows resizing border item code comes
+ * form {@link BorderItemSelectionEditPolicy} and modify in order to use
* resize behavior
*/
public class BorderItemResizableEditPolicy extends ResizableShapeEditPolicy {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CResizableCompartmentEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CResizableCompartmentEditPolicy.java
index 7d4d9e5dbb8..afe9bc9d8ec 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CResizableCompartmentEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CResizableCompartmentEditPolicy.java
@@ -31,7 +31,8 @@ import org.eclipse.gmf.runtime.diagram.ui.internal.handles.CompartmentResizeHand
/**
*
- * this class is used to display an handle and command to make a compartment resizable by the user
+ * this class is used to display an handle and command to make a compartment
+ * resizable by the user
*/
// @unused
public class CResizableCompartmentEditPolicy extends ResizableCompartmentEditPolicy {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CommonDiagramDragDropEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CommonDiagramDragDropEditPolicy.java
index 80bd0dbe358..c70d41618f3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CommonDiagramDragDropEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CommonDiagramDragDropEditPolicy.java
@@ -59,8 +59,8 @@ import org.eclipse.papyrus.diagram.common.util.ViewServiceUtil;
import org.eclipse.uml2.uml.Element;
/**
- * This class is used to execute the drag and drop from the outline. It can manage the drop of nodes
- * and binary links.
+ * This class is used to execute the drag and drop from the outline. It can
+ * manage the drop of nodes and binary links.
*/
public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEditPolicy {
@@ -121,12 +121,13 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
}
/**
- * the method provides command to create the binary link into the diagram. If the source and the
- * target views do not exist, these views will be created.
+ * the method provides command to create the binary link into the diagram.
+ * If the source and the target views do not exist, these views will be
+ * created.
*
* @param cc
- * the composite command that will contain the set of command to create the binary
- * link
+ * the composite command that will contain the set of command to
+ * create the binary link
* @param source
* the source the element source of the link
* @param target
@@ -175,8 +176,9 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
}
/**
- * This method allows to specify a location for the creation of a node at the source of a dropped link.
- * Overriding implementations must not modify the absoluteLocation parameter (use {@link Point#getCopy()})
+ * This method allows to specify a location for the creation of a node at
+ * the source of a dropped link. Overriding implementations must not modify
+ * the absoluteLocation parameter (use {@link Point#getCopy()})
*
* @param absoluteLocation the request's drop location
* @param source the source of the dropped link
@@ -188,8 +190,9 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
}
/**
- * This method allows to specify a location for the creation of a node at the target of a dropped link.
- * Overriding implementations must not modify the absoluteLocation parameter (use {@link Point#getCopy()})
+ * This method allows to specify a location for the creation of a node at
+ * the target of a dropped link. Overriding implementations must not modify
+ * the absoluteLocation parameter (use {@link Point#getCopy()})
*
* @param absoluteLocation the request's drop location
* @param source the source of the dropped link
@@ -218,31 +221,27 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
@Override
public Command getDropObjectsCommand(DropObjectsRequest dropRequest) {
/*
- * when it's the first action after the opening of Papyrus, the viewService is not loaded!
- * see bug 302555
+ * when it's the first action after the opening of Papyrus, the
+ * viewService is not loaded! see bug 302555
*
- * Duration test for 100000 creations of DropCommand :
- * Here 2 solutions :
- * - call ViewServiceUtil.forceLoad(); for each drop -> ~2500ms
+ * Duration test for 100000 creations of DropCommand : Here 2 solutions
+ * : - call ViewServiceUtil.forceLoad(); for each drop -> ~2500ms
*
- * - test if the command cc can be executed at the end of the method, and if not :
- * - call ViewServiceUtil.forceLoad();
- * - and return getDropObjectsCommand(getDropObjectsCommand)
- * -> ~4700ms
+ * - test if the command cc can be executed at the end of the method,
+ * and if not : - call ViewServiceUtil.forceLoad(); - and return
+ * getDropObjectsCommand(getDropObjectsCommand) -> ~4700ms
*
- * - for information : without call ViewServiceUtil.forceLoad();
- * -> ~1600ms
+ * - for information : without call ViewServiceUtil.forceLoad(); ->
+ * ~1600ms
*
* It's better don't test if the command is executable!
*/
ViewServiceUtil.forceLoad();
-
if(dropRequest.getObjects().size() > 0 && dropRequest.getObjects().get(0) instanceof String) {
return getDropFileCommand(dropRequest);
}
-
// Create a view request from the drop request and then forward getting
// the command for that.
CompositeCommand cc = new CompositeCommand("Drop"); //$NON-NLS-1$
@@ -314,8 +313,9 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
}
/**
- * This method returns the default drop command for node. It create the view at the specified location,
- * using the gmf command framework so the policies are used.
+ * This method returns the default drop command for node. It create the view
+ * at the specified location, using the gmf command framework so the
+ * policies are used.
*
* @param nodeVISUALID
* the node visual identifier
@@ -330,8 +330,9 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
}
/**
- * This method returns the default drop command for node. It create the view at the specified location,
- * using the gmf command framework so the policies are used.
+ * This method returns the default drop command for node. It create the view
+ * at the specified location, using the gmf command framework so the
+ * policies are used.
*
* @param location
* the drop location
@@ -344,8 +345,9 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
}
/**
- * This method returns the default drop command for node. It create the view at the specified location,
- * using the gmf command framework so the policies are used.
+ * This method returns the default drop command for node. It create the view
+ * at the specified location, using the gmf command framework so the
+ * policies are used.
*
* @param hostEP
* The host edit part which will be the parent of the new node
@@ -360,8 +362,9 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
}
/**
- * This method returns the default drop command for node. It create the view at the specified location,
- * using the gmf command framework so the policies are used.
+ * This method returns the default drop command for node. It create the view
+ * at the specified location, using the gmf command framework so the
+ * policies are used.
*
* @param hostEP
* The host edit part which will be the parent of the new node
@@ -385,8 +388,9 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
}
/**
- * This method returns the default drop command for node. It create the view at the specified location,
- * using the gmf command framework so the policies are used.
+ * This method returns the default drop command for node. It create the view
+ * at the specified location, using the gmf command framework so the
+ * policies are used.
*
* @param hostEP
* The host edit part which will be the parent of the new node
@@ -409,7 +413,8 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
createViewRequest.setLocation(absoluteLocation);
- // "ask" the host for a command associated with the CreateViewRequest
+ // "ask" the host for a command associated with the
+ // CreateViewRequest
Command command = hostEP.getCommand(createViewRequest);
// set the viewdescriptor as result
// it then can be used as an adaptable to retrieve the View
@@ -429,8 +434,9 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
}
/**
- * for specific case of drop, the designers has to write the algorithm of its own drop. for
- * example case of associationClass, multi dependency etc....
+ * for specific case of drop, the designers has to write the algorithm of
+ * its own drop. for example case of associationClass, multi dependency
+ * etc....
*
* @param dropRequest
* the drop request
@@ -479,7 +485,8 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
}
/**
- * Check if the edit part type is the best one to represent an object of the given EClass type
+ * Check if the edit part type is the best one to represent an object of the
+ * given EClass type
*
* @param editPartClass
* the type of EditPart which may represent a semantic element
@@ -489,7 +496,8 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
*/
private boolean isEditPartTypeAdapted(Class<? extends EditPart> editPartClass, EClass eClass) {
if(DiagramEditPart.class.isAssignableFrom(editPartClass) || CompartmentEditPart.class.isAssignableFrom(editPartClass)) {
- // the edit part is disqualified, as a compartment or a diagram can not be dropped
+ // the edit part is disqualified, as a compartment or a diagram can
+ // not be dropped
return false;
} else if(GraphicalEditPart.class.isAssignableFrom(editPartClass)) {
// check the edit part type against advised ones
@@ -501,18 +509,20 @@ public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEdi
}
/**
- * Check if an edit part type correctly represent a semantic element of the given EClass.
- * Subclasses should implement this method to restrict the possibilities during drop of a link.
- * If an edit part is not of a suitable type, returning false will eliminate it to represent the
- * element as a source or target edit part. This can be used for example to disable label edit
- * parts, which may represent the same model element as the main node.
+ * Check if an edit part type correctly represent a semantic element of the
+ * given EClass. Subclasses should implement this method to restrict the
+ * possibilities during drop of a link. If an edit part is not of a suitable
+ * type, returning false will eliminate it to represent the element as a
+ * source or target edit part. This can be used for example to disable label
+ * edit parts, which may represent the same model element as the main node.
*
* @param editPartClass
* the type of EditPart which must be checked
* @param eClass
- * the EClass type of the element which the edit part must represent
- * @return the only edit part type which can be selected (return a common super type if several
- * edit parts can be chosen)
+ * the EClass type of the element which the edit part must
+ * represent
+ * @return the only edit part type which can be selected (return a common
+ * super type if several edit parts can be chosen)
*/
protected boolean isEditPartTypeSuitableForEClass(Class<? extends GraphicalEditPart> editPartClass, EClass eClass) {
return true;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ConstrainedItemBorderLayoutEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ConstrainedItemBorderLayoutEditPolicy.java
index af1d6655da7..b749e19bd0e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ConstrainedItemBorderLayoutEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ConstrainedItemBorderLayoutEditPolicy.java
@@ -37,7 +37,8 @@ import org.eclipse.gmf.runtime.notation.View;
/**
* @author Patrick Tessier
*
- * this class is used to create a resize command for border items and add the {@link BorderItemResizableEditPolicy} on border Item
+ * this class is used to create a resize command for border items and
+ * add the {@link BorderItemResizableEditPolicy} on border Item
*/
public class ConstrainedItemBorderLayoutEditPolicy extends ConstrainedLayoutEditPolicy {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CustomConnectionLabelsEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CustomConnectionLabelsEditPolicy.java
index a09dd273e2d..f30b1049cd6 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CustomConnectionLabelsEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CustomConnectionLabelsEditPolicy.java
@@ -26,8 +26,8 @@ import org.eclipse.papyrus.diagram.common.commands.ShowHideConnectionLabelsReque
/**
* This EditPolicy is used to show or hide only one Label View for a connection.
- * The EditPolicy {@link ConnectionLabelsEditPolicy} provided by GMF allows only show or hide
- * all the labels for a connection and not only some of them
+ * The EditPolicy {@link ConnectionLabelsEditPolicy} provided by GMF allows only
+ * show or hide all the labels for a connection and not only some of them
*
*
*
@@ -78,7 +78,7 @@ public class CustomConnectionLabelsEditPolicy extends ConnectionLabelsEditPolicy
*/
@Override
public EditPart getTargetEditPart(Request request) {
- //nothing to do here!
+ // nothing to do here!
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CustomContainerEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CustomContainerEditPolicy.java
index 967a101780c..5f213bb3ef8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CustomContainerEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/CustomContainerEditPolicy.java
@@ -18,9 +18,10 @@ import org.eclipse.gef.Request;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ContainerNodeEditPolicy;
/**
- * this class is used in order to trace link between elements even if the element contains a
- * XYlayout. the method ContainerEditPolicy is overloaded the method has to return null in order to
- * select the editpart parent. this policy has to be associated to container XY layout
+ * this class is used in order to trace link between elements even if the
+ * element contains a XYlayout. the method ContainerEditPolicy is overloaded the
+ * method has to return null in order to select the editpart parent. this policy
+ * has to be associated to container XY layout
*/
public class CustomContainerEditPolicy extends ContainerNodeEditPolicy {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DeleteOnlyViewComponentEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DeleteOnlyViewComponentEditPolicy.java
index 86fb1ecadde..a326f774f4b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DeleteOnlyViewComponentEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DeleteOnlyViewComponentEditPolicy.java
@@ -55,8 +55,8 @@ public class DeleteOnlyViewComponentEditPolicy extends ComponentEditPolicy {
}
/**
- * Will delete the view and remove the EObject's reference from the diagram's list of elements
- * to show.
+ * Will delete the view and remove the EObject's reference from the
+ * diagram's list of elements to show.
*
* @param request
* the request
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DiagramDragDropEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DiagramDragDropEditPolicy.java
index 1960767f926..71be633e9ff 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DiagramDragDropEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DiagramDragDropEditPolicy.java
@@ -66,8 +66,10 @@ public class DiagramDragDropEditPolicy extends org.eclipse.gmf.runtime.diagram.u
/*
* (non-Javadoc)
*
- * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.DiagramDragDropEditPolicy
- * #getDropObjectsCommand (org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest)
+ * @see
+ * org.eclipse.gmf.runtime.diagram.ui.editpolicies.DiagramDragDropEditPolicy
+ * #getDropObjectsCommand
+ * (org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest)
*/
@Override
public Command getDropObjectsCommand(DropObjectsRequest dropRequest) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DragDropEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DragDropEditPolicy.java
index fc29bb5775f..90a0fd251d2 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DragDropEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DragDropEditPolicy.java
@@ -104,7 +104,8 @@ public class DragDropEditPolicy extends org.eclipse.gmf.runtime.diagram.ui.editp
* (non-Javadoc)
*
* @seeorg.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy#
- * getDropObjectsCommand( org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest)
+ * getDropObjectsCommand(
+ * org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest)
*/
@Override
public Command getDropObjectsCommand(DropObjectsRequest dropRequest) {
@@ -232,8 +233,8 @@ public class DragDropEditPolicy extends org.eclipse.gmf.runtime.diagram.ui.editp
}
/**
- * createViewsAndArrangeCommand Method to create all the view based on the viewDescriptors list
- * and provide a default arrangement of them.
+ * createViewsAndArrangeCommand Method to create all the view based on the
+ * viewDescriptors list and provide a default arrangement of them.
*
* @param dropRequest
* the drop request
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DuplicatePasteEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DuplicatePasteEditPolicy.java
index 522d0ba9afd..408c05ca7be 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DuplicatePasteEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/DuplicatePasteEditPolicy.java
@@ -51,7 +51,8 @@ import org.eclipse.papyrus.pastemanager.request.PasteRequest;
import org.eclipse.uml2.uml.Element;
/**
- * this class has in charge to give a paste command, ie to copy graphically element
+ * this class has in charge to give a paste command, ie to copy graphically
+ * element
*/
@SuppressWarnings({ "rawtypes", "restriction" })
@@ -59,13 +60,11 @@ public class DuplicatePasteEditPolicy extends ContainerEditPolicy {
public final static String PASTE_ROLE = "PASTE_ROLE";
-
/**
* @see org.eclipse.gef.EditPolicy#getCommand(Request)
*/
public Command getCommand(Request request) {
-
if(PasteRequest.REQ_PAPYRUS_PASTE.equals(request.getType())) {
if(request instanceof PasteRequest) {
@@ -98,8 +97,9 @@ public class DuplicatePasteEditPolicy extends ContainerEditPolicy {
* elements (if applicable) of the given editparts.
*
* @param request
- * the <code>DuplicateElementsRequest</code> whose list of duplicated
- * views will be populated when the command is executed
+ * the <code>DuplicateElementsRequest</code> whose list of
+ * duplicated views will be populated when the command is
+ * executed
* @return the command to perform the duplication
*/
@SuppressWarnings("unchecked")
@@ -110,7 +110,7 @@ public class DuplicatePasteEditPolicy extends ContainerEditPolicy {
for(Iterator iter = request.getEditParts().iterator(); iter.hasNext();) {
Object ep = iter.next();
- // Disable duplicate on groups for now. See bugzilla 182972.
+ // Disable duplicate on groups for now. See bugzilla 182972.
if(ep instanceof GroupEditPart) {
return UnexecutableCommand.INSTANCE;
}
@@ -150,27 +150,29 @@ public class DuplicatePasteEditPolicy extends ContainerEditPolicy {
@SuppressWarnings("unchecked")
protected Command constructDuplicationCommand(List notationViewsToDuplicate, Set elementsToDuplicate, DuplicateRequest request, TransactionalEditingDomain editingDomain) {
/*
- * We must append all inner edges of a node being duplicated. Edges are non-containment
- * references, hence they won't be duplicated for free. Therefore, we add them here to
- * the list views to duplicate.
- * We don't add semantic elements of the edges to the list of semantic elements to duplicate
- * since we assume that their semantic elements are owned by source or target or their semantic
- * containers.
+ * We must append all inner edges of a node being duplicated. Edges are
+ * non-containment references, hence they won't be duplicated for free.
+ * Therefore, we add them here to the list views to duplicate. We don't
+ * add semantic elements of the edges to the list of semantic elements
+ * to duplicate since we assume that their semantic elements are owned
+ * by source or target or their semantic containers.
*/
/**
- * Until duplicate views action enablement is driven by the created duplicate views command,
- * we can't look for edges to duplicate. It's a performance hit.
+ * Until duplicate views action enablement is driven by the created
+ * duplicate views command, we can't look for edges to duplicate. It's a
+ * performance hit.
*/
- // List<Edge> allInnerEdges = new LinkedList<Edge>();
- // for (Iterator itr = notationViewsToDuplicate.iterator(); itr.hasNext();) {
- // allInnerEdges.addAll(ViewUtil.getAllInnerEdges((View) itr.next()));
- // }
- // notationViewsToDuplicate.addAll(allInnerEdges);
+ // List<Edge> allInnerEdges = new LinkedList<Edge>();
+ // for (Iterator itr = notationViewsToDuplicate.iterator();
+ // itr.hasNext();) {
+ // allInnerEdges.addAll(ViewUtil.getAllInnerEdges((View) itr.next()));
+ // }
+ // notationViewsToDuplicate.addAll(allInnerEdges);
if(!notationViewsToDuplicate.isEmpty()) {
if(!elementsToDuplicate.isEmpty()) {
ArrayList<EObject> stereotypedSelection = new ArrayList<EObject>();
- //copy stereotype contained into
+ // copy stereotype contained into
Iterator<EObject> iter=elementsToDuplicate.iterator();
while (iter.hasNext()) {
EObject subeObject = (EObject) iter.next();
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ExtendedDirectEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ExtendedDirectEditPolicy.java
index f8d4fc4d426..7c910f43aca 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ExtendedDirectEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ExtendedDirectEditPolicy.java
@@ -49,8 +49,8 @@ import org.eclipse.uml2.uml.ElementImport;
import org.eclipse.uml2.uml.NamedElement;
/**
- * Extended edit policy for direct edit. this policy checks if an editor is available in the editor
- * registry for the given edited element
+ * Extended edit policy for direct edit. this policy checks if an editor is
+ * available in the editor registry for the given edited element
*/
public class ExtendedDirectEditPolicy extends LabelDirectEditPolicy {
@@ -69,7 +69,8 @@ public class ExtendedDirectEditPolicy extends LabelDirectEditPolicy {
}
/**
- * The direct edit mechanism requires the edit part to handle the direct edit request.
+ * The direct edit mechanism requires the edit part to handle the direct
+ * edit request.
*
* @param req
* the request that called the direct edit.
@@ -195,8 +196,8 @@ public class ExtendedDirectEditPolicy extends LabelDirectEditPolicy {
}
/**
- * Init the label direct edit manager. This method should be called when a Direct Edit request
- * is performed.
+ * Init the label direct edit manager. This method should be called when a
+ * Direct Edit request is performed.
*/
// @unused
protected void initLabelEditManager() {
@@ -263,7 +264,8 @@ public class ExtendedDirectEditPolicy extends LabelDirectEditPolicy {
/**
* Returns the element associated to the edit part hosting this edit policy
*
- * @return the element associated to the edit part hosting this edit policy or <code>null</code> if the element is not an element import
+ * @return the element associated to the edit part hosting this edit policy
+ * or <code>null</code> if the element is not an element import
*/
public ElementImport getElementImport() {
if(isElementImport()) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/HyperLinkPopupBarEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/HyperLinkPopupBarEditPolicy.java
index 3510fb58999..5e05e9adf78 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/HyperLinkPopupBarEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/HyperLinkPopupBarEditPolicy.java
@@ -58,12 +58,11 @@ import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Package;
/**
- * The Class HyperLinkPopupBarEditPolicy can be applied on edit part to display shortcuts on
- * sub-diagrams or to associate hyper-link of files
+ * The Class HyperLinkPopupBarEditPolicy can be applied on edit part to display
+ * shortcuts on sub-diagrams or to associate hyper-link of files
*/
public class HyperLinkPopupBarEditPolicy extends DiagramAssistantEditPolicy {
-
public static Package topPackage(Element element) {
if(element.getOwner() == null) {
return (Package)element;
@@ -81,7 +80,8 @@ public class HyperLinkPopupBarEditPolicy extends DiagramAssistantEditPolicy {
private class PopupBarLabelHandle extends Label implements Handle {
/**
- * flag to drawFocus rect around the handle when the mouse rolls over it.
+ * flag to drawFocus rect around the handle when the mouse rolls over
+ * it.
*/
private boolean myMouseOver = false;
@@ -149,8 +149,8 @@ public class HyperLinkPopupBarEditPolicy extends DiagramAssistantEditPolicy {
* @param event
* the event
*
- * @see org.eclipse.draw2d.IFigure#handleMouseEntered(org.eclipse.draw2d.MouseEvent) flip
- * myMouseOver bit and repaint
+ * @see org.eclipse.draw2d.IFigure#handleMouseEntered(org.eclipse.draw2d.MouseEvent)
+ * flip myMouseOver bit and repaint
*/
@Override
public void handleMouseEntered(MouseEvent event) {
@@ -167,8 +167,8 @@ public class HyperLinkPopupBarEditPolicy extends DiagramAssistantEditPolicy {
* @param event
* the event
*
- * @see org.eclipse.draw2d.IFigure#handleMouseExited(org.eclipse.draw2d.MouseEvent) flip
- * myMouseOver bit and repaint
+ * @see org.eclipse.draw2d.IFigure#handleMouseExited(org.eclipse.draw2d.MouseEvent)
+ * flip myMouseOver bit and repaint
*/
@Override
public void handleMouseExited(MouseEvent event) {
@@ -185,9 +185,9 @@ public class HyperLinkPopupBarEditPolicy extends DiagramAssistantEditPolicy {
* @param event
* the event
*
- * @see org.eclipse.draw2d.IFigure#handleMousePressed(org.eclipse.draw2d.MouseEvent) set
- * PopupBarEditPolicy.myActionMoveFigure bit so the popup bar is not dismissed after
- * creating an item in the editpart
+ * @see org.eclipse.draw2d.IFigure#handleMousePressed(org.eclipse.draw2d.MouseEvent)
+ * set PopupBarEditPolicy.myActionMoveFigure bit so the popup bar
+ * is not dismissed after creating an item in the editpart
*/
@Override
public void handleMousePressed(MouseEvent event) {
@@ -202,8 +202,9 @@ public class HyperLinkPopupBarEditPolicy extends DiagramAssistantEditPolicy {
* @param graphics
* the graphics
*
- * @see org.eclipse.draw2d.Figure#paintBorder(org.eclipse.draw2d.Graphics) paint a focus
- * rectangle for the label if the mouse is inside the label
+ * @see org.eclipse.draw2d.Figure#paintBorder(org.eclipse.draw2d.Graphics)
+ * paint a focus rectangle for the label if the mouse is inside the
+ * label
*/
@Override
protected void paintBorder(Graphics graphics) {
@@ -261,8 +262,8 @@ public class HyperLinkPopupBarEditPolicy extends DiagramAssistantEditPolicy {
}
/**
- * Listens for mouse key presses so the popup bar can be dismissed if the context menu is
- * displayed.
+ * Listens for mouse key presses so the popup bar can be dismissed if the
+ * context menu is displayed.
*
* @author affrantz@us.ibm.com
*/
@@ -371,19 +372,24 @@ public class HyperLinkPopupBarEditPolicy extends DiagramAssistantEditPolicy {
/** The POPUPBA r_ mov e_ figure. */
// @unused
static private int POPUPBAR_MOVE_FIGURE = 0x02; /*
- * Ignore the first figureMoved event when
- * creating elements inside a shape via a popup
- * bar
+ * Ignore the first
+ * figureMoved event when
+ * creating elements inside
+ * a shape via a popup bar
*/
/** The POPUPBA r_ ondiagramactivated. */
// @unused
static private int POPUPBAR_ONDIAGRAMACTIVATED = 0x10; /*
- * For popup bars on diagram and machine
- * edit parts, where we
+ * For popup bars on
+ * diagram and
+ * machine edit
+ * parts, where we
* POPUPBAR_DISPLAYATMOUSEHOVERLOCATION
- * , don't display popup bar until user
- * clicks on surface
+ * , don't display
+ * popup bar until
+ * user clicks on
+ * surface
*/
/** The editor registry. */
@@ -461,8 +467,9 @@ public class HyperLinkPopupBarEditPolicy extends DiagramAssistantEditPolicy {
}
/**
- * Return the EditorRegistry for nested editor descriptors. Subclass should implements this
- * method in order to return the registry associated to the extension point namespace.
+ * Return the EditorRegistry for nested editor descriptors. Subclass should
+ * implements this method in order to return the registry associated to the
+ * extension point namespace.
*
* @return the EditorRegistry for nested editor descriptors
*
@@ -492,9 +499,9 @@ public class HyperLinkPopupBarEditPolicy extends DiagramAssistantEditPolicy {
*
* @return the singleton eINSTANCE of editor registry
*
- * @generated NOT Get the EditorRegistry used to create editor instances. This default
- * implementation return the singleton eINSTANCE. This method can be subclassed to
- * return another registry.
+ * @generated NOT Get the EditorRegistry used to create editor instances.
+ * This default implementation return the singleton eINSTANCE.
+ * This method can be subclassed to return another registry.
*/
protected IPageIconsRegistry getEditorRegistry() {
if(editorRegistry == null) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/IDirectEdition.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/IDirectEdition.java
index 5be745a82aa..eda692b72f0 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/IDirectEdition.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/IDirectEdition.java
@@ -15,7 +15,10 @@ package org.eclipse.papyrus.diagram.common.editpolicies;
*/
public interface IDirectEdition {
- /** constant for undefined role. no editors have been checked for this element */
+ /**
+ * constant for undefined role. no editors have been checked for this
+ * element
+ */
final int UNDEFINED_DIRECT_EDITOR = 0;
/** default direct editor (in diagram edition) */
@@ -24,6 +27,9 @@ public interface IDirectEdition {
/** extended editor, i.e opens a new dialog window */
final int EXTENDED_DIRECT_EDITOR = 1 << 2;
- /** no editor for this element. this element does not respond to a direct edit request */
+ /**
+ * no editor for this element. this element does not respond to a direct
+ * edit request
+ */
final int NO_DIRECT_EDITION = 1 << 3;
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/IMaskManagedLabelEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/IMaskManagedLabelEditPolicy.java
index 394f4eacd85..84f12eb1869 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/IMaskManagedLabelEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/IMaskManagedLabelEditPolicy.java
@@ -18,8 +18,8 @@ import java.util.Map;
import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
/**
- * Interface for all edit policies that manage the label of a {@link GraphicalEditPart}. The label
- * must be controlled by a system of mask, i.e. the label shows or not some part of the string.
+ * Interface for all edit policies that manage the label of a {@link GraphicalEditPart}. The label must be controlled by a system of mask,
+ * i.e. the label shows or not some part of the string.
*/
public interface IMaskManagedLabelEditPolicy {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/NavigationEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/NavigationEditPolicy.java
index 496be86836e..2cc1a9ed882 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/NavigationEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/NavigationEditPolicy.java
@@ -54,8 +54,8 @@ import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Package;
/**
- * This class is used to open a new diagram when the double click is detected. It is dependent of
- * papyrus environment
+ * This class is used to open a new diagram when the double click is detected.
+ * It is dependent of papyrus environment
*/
public class NavigationEditPolicy extends OpenEditPolicy {
@@ -84,9 +84,10 @@ public class NavigationEditPolicy extends OpenEditPolicy {
protected Command getOpenCommand(Request request) {
final IGraphicalEditPart gep;
- //in order to obtain the list of default diagram we need to fin the edit part that refers to default diagram
+ // in order to obtain the list of default diagram we need to fin the
+ // edit part that refers to default diagram
- //if this a label of a compartment, the good editpart is the parent
+ // if this a label of a compartment, the good editpart is the parent
if((IGraphicalEditPart)getHost() instanceof CompartmentEditPart ){
gep=(IGraphicalEditPart)getHost().getParent();
}
@@ -96,20 +97,20 @@ public class NavigationEditPolicy extends OpenEditPolicy {
}
final EObject semanticElement=gep.resolveSemanticElement();
- //navigable element by using heuristic
+ // navigable element by using heuristic
List<NavigableElement> navElements=null;
- //defaultHyperlinks
+ // defaultHyperlinks
final ArrayList<HyperlinkObject> defaultHyperLinkObject=new ArrayList<HyperlinkObject>();
final ArrayList<HyperlinkObject> hyperLinkObjectList;
- //Diagrams that will be found by using heuristic
+ // Diagrams that will be found by using heuristic
HashMap<NavigableElement, List<Diagram>> existingDiagrams = new HashMap<NavigableElement, List<Diagram>>();
-
- if(semanticElement==null){
+ if(semanticElement == null) {
return UnexecutableCommand.INSTANCE;
}
- //initialition of code to extract hyperlinks, in the future to do with extension points
+ // initialition of code to extract hyperlinks, in the future to do with
+ // extension points
ArrayList<AbstractHyperLinkHelper> hyperLinkHelpers= new ArrayList<AbstractHyperLinkHelper>();
hyperLinkHelpers.add(new DiagramHyperLinkHelper());
hyperLinkHelpers.add(new DocumentHyperLinkHelper());
@@ -118,7 +119,7 @@ public class NavigationEditPolicy extends OpenEditPolicy {
final HyperlinkHelperFactory hyperlinkHelperFactory= new HyperlinkHelperFactory(hyperLinkHelpers);
try{
- //fill the list of default hyperlinks
+ // fill the list of default hyperlinks
hyperLinkObjectList = (ArrayList<HyperlinkObject>)hyperlinkHelperFactory.getAllreferenced(gep.getNotationView());
Iterator<HyperlinkObject> iterator= hyperLinkObjectList.iterator();
@@ -131,21 +132,21 @@ public class NavigationEditPolicy extends OpenEditPolicy {
}
- //fill navigation by using heuristics
+ // fill navigation by using heuristics
navElements = NavigationHelper.getInstance().getAllNavigableElements(semanticElement);
HashMap<NavigableElement, List<CreationCommandDescriptor>> possibleCreations = new HashMap<NavigableElement, List<CreationCommandDescriptor>>();
- //test which kind of navigation by consulting preference
+ // test which kind of navigation by consulting preference
String navigationKind=Activator.getDefault().getPreferenceStore().getString(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DOUBLECLICK_KIND);
- //no naviagation
+ // no naviagation
if(navigationKind.equals(INavigationPreferenceConstant.NO_NAVIGATION)){
- //do nothing
+ // do nothing
return UnexecutableCommand.INSTANCE;
}
- //navigation by using heuristic
- //add list of diagram navigables by using heuristic
+ // navigation by using heuristic
+ // add list of diagram navigables by using heuristic
if(navigationKind.equals(INavigationPreferenceConstant.EXPLICIT_IMPLICIT_NAVIGATION)){
for(NavigableElement navElement : navElements) {
final EObject element = navElement.getElement();
@@ -169,14 +170,15 @@ public class NavigationEditPolicy extends OpenEditPolicy {
HyperLinkDiagram hyperLinkDiagram= new HyperLinkDiagram();
hyperLinkDiagram.setDiagram(diagram);
hyperLinkDiagram.setTooltipText(diagram.getName()+" (found by heuristic)");
- //look for if a hyperlink already exists
+ // look for if a hyperlink already exists
HyperlinkObject foundHyperlink=null;
for(int i=0; i<defaultHyperLinkObject.size()&&foundHyperlink==null;i++){
if (defaultHyperLinkObject.get(i).getObject().equals(diagram)){
foundHyperlink=defaultHyperLinkObject.get(i);
}
}
- //the diagram was not into the list of existing default hyperlink
+ // the diagram was not into the list of existing default
+ // hyperlink
if( foundHyperlink==null){
defaultHyperLinkObject.add(hyperLinkDiagram);
}
@@ -207,7 +209,7 @@ public class NavigationEditPolicy extends OpenEditPolicy {
}
if(defaultHyperLinkObject.size()>1){
- //open a dialog to choose a diagram
+ // open a dialog to choose a diagram
DiagramNavigationDialog diagramNavigationDialog= new DiagramNavigationDialog(new Shell(),defaultHyperLinkObject);
diagramNavigationDialog.open();
final ArrayList<HyperlinkObject> hList=diagramNavigationDialog.getSelectedHyperlinks();
@@ -234,10 +236,10 @@ public class NavigationEditPolicy extends OpenEditPolicy {
return UnexecutableCommand.INSTANCE;
}
-
/**
- * Return the EditorRegistry for nested editor descriptors. Subclass should implements this
- * method in order to return the registry associated to the extension point namespace.
+ * Return the EditorRegistry for nested editor descriptors. Subclass should
+ * implements this method in order to return the registry associated to the
+ * extension point namespace.
*
* @return the EditorRegistry for nested editor descriptors
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/OldCommonDiagramDragDropEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/OldCommonDiagramDragDropEditPolicy.java
index 4f162bc4f68..8d75bfcfbfe 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/OldCommonDiagramDragDropEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/OldCommonDiagramDragDropEditPolicy.java
@@ -62,11 +62,11 @@ import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Element;
/**
- * @deprecated
- * This class is used to execute the drag and drop from the outline. It can manage the drop of nodes
- * and binary links.
+ * @deprecated This class is used to execute the drag and drop from the outline.
+ * It can manage the drop of nodes and binary links.
*/
-public abstract class OldCommonDiagramDragDropEditPolicy extends DiagramDragDropEditPolicy {
+public abstract class OldCommonDiagramDragDropEditPolicy extends
+ DiagramDragDropEditPolicy {
/** The specific drop. */
private Set<Integer> specificDrop = null;
@@ -78,7 +78,7 @@ public abstract class OldCommonDiagramDragDropEditPolicy extends DiagramDragDrop
* Instantiates a new custom diagram drag drop edit policy.
*
* @param mappingHelper
- * the mapping helper
+ * the mapping helper
*/
public OldCommonDiagramDragDropEditPolicy(ILinkMappingHelper mappingHelper) {
linkmappingHelper = mappingHelper;
@@ -88,7 +88,7 @@ public abstract class OldCommonDiagramDragDropEditPolicy extends DiagramDragDrop
* Gets elements visual id that can be dropped in the diagram
*/
private Set<Integer> getSpecificDrop() {
- if(specificDrop == null) {
+ if (specificDrop == null) {
specificDrop = getDroppableElementVisualId();
}
return specificDrop;
@@ -98,13 +98,14 @@ public abstract class OldCommonDiagramDragDropEditPolicy extends DiagramDragDrop
* Gets the UML element type for the specified
*
* @param elementID
- * the element id
+ * the element id
*
* @return the uML element type
*/
public abstract IElementType getUMLElementType(int elementID);
- public abstract int getNodeVisualID(View containerView, EObject domainElement);
+ public abstract int getNodeVisualID(View containerView,
+ EObject domainElement);
public abstract int getLinkWithClassVisualID(EObject domainElement);
@@ -117,73 +118,101 @@ public abstract class OldCommonDiagramDragDropEditPolicy extends DiagramDragDrop
* {@inheritedDoc}
*/
@Override
- protected Command createViewsAndArrangeCommand(DropObjectsRequest dropRequest, List viewDescriptors) {
- CreateViewRequest createViewRequest = new CreateViewRequest(viewDescriptors);
+ protected Command createViewsAndArrangeCommand(
+ DropObjectsRequest dropRequest, List viewDescriptors) {
+ CreateViewRequest createViewRequest = new CreateViewRequest(
+ viewDescriptors);
createViewRequest.setLocation(dropRequest.getLocation());
Command createCommand = getHost().getCommand(createViewRequest);
return createCommand;
}
/**
- * the method provides command to create the binary link into the diagram. If the source and the
- * target views do not exist, these views will be created.
+ * the method provides command to create the binary link into the diagram.
+ * If the source and the target views do not exist, these views will be
+ * created.
*
* @param cc
- * the composite command that will contain the set of command to create the binary
- * link
+ * the composite command that will contain the set of command to
+ * create the binary link
* @param source
- * the source the element source of the link
+ * the source the element source of the link
* @param target
- * the target the element target of the link
+ * the target the element target of the link
* @param linkVISUALID
- * the link VISUALID used to create the view
+ * the link VISUALID used to create the view
* @param location
- * the location the location where the view will be be created
+ * the location the location where the view will be be created
* @param semanticLink
- * the semantic link that will be attached to the view
+ * the semantic link that will be attached to the view
*
* @return the composite command
*/
- public CompositeCommand dropBinaryLink(CompositeCommand cc, Element source, Element target, int linkVISUALID, Point location, Element semanticLink) {
+ public CompositeCommand dropBinaryLink(CompositeCommand cc, Element source,
+ Element target, int linkVISUALID, Point location,
+ Element semanticLink) {
// look for editpart
- GraphicalEditPart sourceEditPart = (GraphicalEditPart)lookForEditPart(source);
- GraphicalEditPart targetEditPart = (GraphicalEditPart)lookForEditPart(target);
+ GraphicalEditPart sourceEditPart = (GraphicalEditPart) lookForEditPart(source);
+ GraphicalEditPart targetEditPart = (GraphicalEditPart) lookForEditPart(target);
// descriptor of the link
- CreateConnectionViewRequest.ConnectionViewDescriptor linkdescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(getUMLElementType(linkVISUALID), ((IHintedType)getUMLElementType(linkVISUALID)).getSemanticHint(), getDiagramPreferencesHint());
+ CreateConnectionViewRequest.ConnectionViewDescriptor linkdescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
+ getUMLElementType(linkVISUALID),
+ ((IHintedType) getUMLElementType(linkVISUALID))
+ .getSemanticHint(), getDiagramPreferencesHint());
IAdaptable sourceAdapter = null;
IAdaptable targetAdapter = null;
- if(sourceEditPart == null) {
+ if (sourceEditPart == null) {
// creation of the node
- ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(source), Node.class, null, ViewUtil.APPEND, false, ((IGraphicalEditPart)getHost()).getDiagramPreferencesHint());
+ ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(
+ source), Node.class, null, ViewUtil.APPEND, false,
+ ((IGraphicalEditPart) getHost())
+ .getDiagramPreferencesHint());
// get the command and execute it.
- CreateCommand nodeCreationCommand = new CreateCommand(((IGraphicalEditPart)getHost()).getEditingDomain(), descriptor, ((View)getHost().getModel()));
+ CreateCommand nodeCreationCommand = new CreateCommand(
+ ((IGraphicalEditPart) getHost()).getEditingDomain(),
+ descriptor, ((View) getHost().getModel()));
cc.compose(nodeCreationCommand);
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y + 100)); //$NON-NLS-1$
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(
+ getEditingDomain(),
+ "move", (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y + 100)); //$NON-NLS-1$
cc.compose(setBoundsCommand);
- sourceAdapter = (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue();
+ sourceAdapter = (IAdaptable) nodeCreationCommand.getCommandResult()
+ .getReturnValue();
} else {
sourceAdapter = new SemanticAdapter(null, sourceEditPart.getModel());
}
- if(targetEditPart == null) {
+ if (targetEditPart == null) {
// creation of the node
- ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(target), Node.class, null, ViewUtil.APPEND, false, ((IGraphicalEditPart)getHost()).getDiagramPreferencesHint());
+ ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(
+ target), Node.class, null, ViewUtil.APPEND, false,
+ ((IGraphicalEditPart) getHost())
+ .getDiagramPreferencesHint());
// get the command and execute it.
- CreateCommand nodeCreationCommand = new CreateCommand(((IGraphicalEditPart)getHost()).getEditingDomain(), descriptor, ((View)getHost().getModel()));
+ CreateCommand nodeCreationCommand = new CreateCommand(
+ ((IGraphicalEditPart) getHost()).getEditingDomain(),
+ descriptor, ((View) getHost().getModel()));
cc.compose(nodeCreationCommand);
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y - 100)); //$NON-NLS-1$
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(
+ getEditingDomain(),
+ "move", (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y - 100)); //$NON-NLS-1$
cc.compose(setBoundsCommand);
- targetAdapter = (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue();
+ targetAdapter = (IAdaptable) nodeCreationCommand.getCommandResult()
+ .getReturnValue();
} else {
targetAdapter = new SemanticAdapter(null, targetEditPart.getModel());
}
- CommonDeferredCreateConnectionViewCommand aLinkCommand = new CommonDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)getUMLElementType(linkVISUALID)).getSemanticHint(), sourceAdapter, targetAdapter, getViewer(), getDiagramPreferencesHint(), linkdescriptor, null);
+ CommonDeferredCreateConnectionViewCommand aLinkCommand = new CommonDeferredCreateConnectionViewCommand(
+ getEditingDomain(),
+ ((IHintedType) getUMLElementType(linkVISUALID))
+ .getSemanticHint(), sourceAdapter, targetAdapter,
+ getViewer(), getDiagramPreferencesHint(), linkdescriptor, null);
aLinkCommand.setElement(semanticLink);
cc.compose(aLinkCommand);
return cc;
@@ -196,7 +225,7 @@ public abstract class OldCommonDiagramDragDropEditPolicy extends DiagramDragDrop
* @return the diagram preferences hint
*/
protected PreferencesHint getDiagramPreferencesHint() {
- return ((IGraphicalEditPart)getHost()).getDiagramPreferencesHint();
+ return ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint();
}
/**
@@ -205,83 +234,94 @@ public abstract class OldCommonDiagramDragDropEditPolicy extends DiagramDragDrop
@Override
public Command getDropObjectsCommand(DropObjectsRequest dropRequest) {
/*
- * when it's the first action after the opening of Papyrus, the viewService is not loaded!
- * see bug 302555
+ * when it's the first action after the opening of Papyrus, the
+ * viewService is not loaded! see bug 302555
*
- * Duration test for 100000 creations of DropCommand :
- * Here 2 solutions :
- * - call ViewServiceUtil.forceLoad(); for each drop -> ~2500ms
+ * Duration test for 100000 creations of DropCommand : Here 2 solutions
+ * : - call ViewServiceUtil.forceLoad(); for each drop -> ~2500ms
*
- * - test if the command cc can be executed at the end of the method, and if not :
- * - call ViewServiceUtil.forceLoad();
- * - and return getDropObjectsCommand(getDropObjectsCommand)
- * -> ~4700ms
+ * - test if the command cc can be executed at the end of the method,
+ * and if not : - call ViewServiceUtil.forceLoad(); - and return
+ * getDropObjectsCommand(getDropObjectsCommand) -> ~4700ms
*
- * - for information : without call ViewServiceUtil.forceLoad();
- * -> ~1600ms
+ * - for information : without call ViewServiceUtil.forceLoad(); ->
+ * ~1600ms
*
* It's better don't test if the command is executable!
*/
ViewServiceUtil.forceLoad();
-
- if(dropRequest.getObjects().size() > 0 && dropRequest.getObjects().get(0) instanceof String) {
+ if (dropRequest.getObjects().size() > 0
+ && dropRequest.getObjects().get(0) instanceof String) {
return getDropFileCommand(dropRequest);
}
-
// Create a view request from the drop request and then forward getting
// the command for that.
CompositeCommand cc = new CompositeCommand("Drop"); //$NON-NLS-1$
Iterator<?> iter = dropRequest.getObjects().iterator();
Point location = getTranslatedLocation(dropRequest);
- while(iter.hasNext()) {
- EObject droppedObject = (EObject)iter.next();
+ while (iter.hasNext()) {
+ EObject droppedObject = (EObject) iter.next();
cc.add(getDropObjectCommand(dropRequest, droppedObject, location));
}
return new ICommandProxy(cc);
}
- protected IUndoableOperation getDropObjectCommand(DropObjectsRequest dropRequest, EObject droppedObject, Point location) {
- int nodeVISUALID = getNodeVisualID(((IGraphicalEditPart)getHost()).getNotationView(), droppedObject);
+ protected IUndoableOperation getDropObjectCommand(
+ DropObjectsRequest dropRequest, EObject droppedObject,
+ Point location) {
+ int nodeVISUALID = getNodeVisualID(
+ ((IGraphicalEditPart) getHost()).getNotationView(),
+ droppedObject);
int linkVISUALID = getLinkWithClassVisualID(droppedObject);
- if(getSpecificDrop().contains(nodeVISUALID) || getSpecificDrop().contains(linkVISUALID)) {
+ if (getSpecificDrop().contains(nodeVISUALID)
+ || getSpecificDrop().contains(linkVISUALID)) {
dropRequest.setLocation(location);
// TODO: add to composite command ?
- return new CommandProxy(getSpecificDropCommand(dropRequest, (Element)droppedObject, nodeVISUALID, linkVISUALID));
+ return new CommandProxy(getSpecificDropCommand(dropRequest,
+ (Element) droppedObject, nodeVISUALID, linkVISUALID));
}
- if(linkVISUALID == -1 && nodeVISUALID != -1) {
+ if (linkVISUALID == -1 && nodeVISUALID != -1) {
// The element to drop is a node
// Retrieve it's expected graphical parent
- EObject graphicalParent = ((GraphicalEditPart)getHost()).resolveSemanticElement();
+ EObject graphicalParent = ((GraphicalEditPart) getHost())
+ .resolveSemanticElement();
// Restrict the default node creation to the following cases:
// . Take the containment relationship into consideration
// . Release the constraint when GraphicalParent is a diagram
- if(getHost().getModel() instanceof Diagram) {
- return getDefaultDropNodeCommand(nodeVISUALID, location, droppedObject);
+ if (getHost().getModel() instanceof Diagram) {
+ return getDefaultDropNodeCommand(nodeVISUALID, location,
+ droppedObject);
- } else if((graphicalParent instanceof Element) && ((Element)graphicalParent).getOwnedElements().contains(droppedObject)) {
- return getDefaultDropNodeCommand(nodeVISUALID, location, droppedObject);
+ } else if ((graphicalParent instanceof Element)
+ && ((Element) graphicalParent).getOwnedElements().contains(
+ droppedObject)) {
+ return getDefaultDropNodeCommand(nodeVISUALID, location,
+ droppedObject);
}
return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
}
- if(linkVISUALID != -1) {
- Collection<?> sources = linkmappingHelper.getSource((Element)droppedObject);
- Collection<?> targets = linkmappingHelper.getTarget((Element)droppedObject);
- if(sources.size() == 0 || targets.size() == 0) {
+ if (linkVISUALID != -1) {
+ Collection<?> sources = linkmappingHelper
+ .getSource((Element) droppedObject);
+ Collection<?> targets = linkmappingHelper
+ .getTarget((Element) droppedObject);
+ if (sources.size() == 0 || targets.size() == 0) {
return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
}
// binary association
- Element source = (Element)sources.toArray()[0];
- Element target = (Element)targets.toArray()[0];
+ Element source = (Element) sources.toArray()[0];
+ Element target = (Element) targets.toArray()[0];
CompositeCommand cc = new CompositeCommand("Add Link"); //$NON-NLS-1$
- dropBinaryLink(cc, source, target, linkVISUALID, dropRequest.getLocation(), (Element)droppedObject);
+ dropBinaryLink(cc, source, target, linkVISUALID,
+ dropRequest.getLocation(), (Element) droppedObject);
return cc;
}
return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
@@ -289,34 +329,45 @@ public abstract class OldCommonDiagramDragDropEditPolicy extends DiagramDragDrop
protected Point getTranslatedLocation(DropObjectsRequest dropRequest) {
Point location = dropRequest.getLocation().getCopy();
- ((GraphicalEditPart)getHost()).getContentPane().translateToRelative(location);
- ((GraphicalEditPart)getHost()).getContentPane().translateFromParent(location);
- location.translate(((GraphicalEditPart)getHost()).getContentPane().getClientArea().getLocation().getNegated());
+ ((GraphicalEditPart) getHost()).getContentPane().translateToRelative(
+ location);
+ ((GraphicalEditPart) getHost()).getContentPane().translateFromParent(
+ location);
+ location.translate(((GraphicalEditPart) getHost()).getContentPane()
+ .getClientArea().getLocation().getNegated());
return location;
}
/**
- * This method returns the default drop command for node. Default here means the no
- * consideration is made regarding the semantic elements, the expected figure is basically
- * created where expected.
+ * This method returns the default drop command for node. Default here means
+ * the no consideration is made regarding the semantic elements, the
+ * expected figure is basically created where expected.
*
* @param nodeVISUALID
- * the node visual identifier
+ * the node visual identifier
* @param location
- * the drop location
+ * the drop location
* @param droppedObject
- * the object to drop
+ * the object to drop
* @return a CompositeCommand for Drop
*/
- protected CompositeCommand getDefaultDropNodeCommand(int nodeVISUALID, Point location, EObject droppedObject) {
+ protected CompositeCommand getDefaultDropNodeCommand(int nodeVISUALID,
+ Point location, EObject droppedObject) {
CompositeCommand cc = new CompositeCommand("Drop"); //$NON-NLS-1$
IAdaptable elementAdapter = new EObjectAdapter(droppedObject);
- ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, ((IHintedType)getUMLElementType(nodeVISUALID)).getSemanticHint(), ViewUtil.APPEND, false, getDiagramPreferencesHint());
- CreateCommand createCommand = new CreateCommand(getEditingDomain(), descriptor, ((View)(getHost().getModel())));
+ ViewDescriptor descriptor = new ViewDescriptor(elementAdapter,
+ Node.class,
+ ((IHintedType) getUMLElementType(nodeVISUALID))
+ .getSemanticHint(), ViewUtil.APPEND, false,
+ getDiagramPreferencesHint());
+ CreateCommand createCommand = new CreateCommand(getEditingDomain(),
+ descriptor, ((View) (getHost().getModel())));
cc.compose(createCommand);
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)createCommand.getCommandResult().getReturnValue(), location); //$NON-NLS-1$
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(
+ getEditingDomain(),
+ "move", (IAdaptable) createCommand.getCommandResult().getReturnValue(), location); //$NON-NLS-1$
cc.compose(setBoundsCommand);
return cc;
}
@@ -327,25 +378,27 @@ public abstract class OldCommonDiagramDragDropEditPolicy extends DiagramDragDrop
* @return the editing domain
*/
protected TransactionalEditingDomain getEditingDomain() {
- return ((IGraphicalEditPart)getHost()).getEditingDomain();
+ return ((IGraphicalEditPart) getHost()).getEditingDomain();
}
/**
- * for specific case of drop, the designers has to write the algorithm of its own drop. for
- * example case of associationClass, multi dependency etc....
+ * for specific case of drop, the designers has to write the algorithm of
+ * its own drop. for example case of associationClass, multi dependency
+ * etc....
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param nodeVISUALID
- * the node visualid
+ * the node visualid
* @param linkVISUALID
- * the link visualid
+ * the link visualid
* @param semanticLink
- * the semantic link
+ * the semantic link
*
* @return the specific drop command
*/
- protected Command getSpecificDropCommand(DropObjectsRequest dropRequest, Element semanticLink, int nodeVISUALID, int linkVISUALID) {
+ protected Command getSpecificDropCommand(DropObjectsRequest dropRequest,
+ Element semanticLink, int nodeVISUALID, int linkVISUALID) {
return UnexecutableCommand.INSTANCE;
}
@@ -355,25 +408,29 @@ public abstract class OldCommonDiagramDragDropEditPolicy extends DiagramDragDrop
* @return the viewer
*/
protected EditPartViewer getViewer() {
- return ((IGraphicalEditPart)getHost()).getViewer();
+ return ((IGraphicalEditPart) getHost()).getViewer();
}
/**
* Look for editPart from its semantic.
*
* @param semantic
- * the semantic
+ * the semantic
*
* @return the edits the part or null if not found
*/
protected EditPart lookForEditPart(EObject semantic) {
- Collection<EditPart> editPartSet = getHost().getViewer().getEditPartRegistry().values();
+ Collection<EditPart> editPartSet = getHost().getViewer()
+ .getEditPartRegistry().values();
Iterator<EditPart> editPartIterator = editPartSet.iterator();
EditPart existedEditPart = null;
- while(editPartIterator.hasNext() && existedEditPart == null) {
+ while (editPartIterator.hasNext() && existedEditPart == null) {
EditPart currentEditPart = editPartIterator.next();
- if(isEditPartTypeAdapted(currentEditPart.getClass(), semantic.eClass()) && semantic.equals(((GraphicalEditPart)currentEditPart).resolveSemanticElement())) {
+ if (isEditPartTypeAdapted(currentEditPart.getClass(),
+ semantic.eClass())
+ && semantic.equals(((GraphicalEditPart) currentEditPart)
+ .resolveSemanticElement())) {
existedEditPart = currentEditPart;
}
}
@@ -381,21 +438,26 @@ public abstract class OldCommonDiagramDragDropEditPolicy extends DiagramDragDrop
}
/**
- * Check if the edit part type is the best one to represent an object of the given EClass type
+ * Check if the edit part type is the best one to represent an object of the
+ * given EClass type
*
* @param editPartClass
- * the type of EditPart which may represent a semantic element
+ * the type of EditPart which may represent a semantic element
* @param eClass
- * the EClass type of the represented semantic element
+ * the EClass type of the represented semantic element
* @return true if an edit part of this type should be selected
*/
- private boolean isEditPartTypeAdapted(Class<? extends EditPart> editPartClass, EClass eClass) {
- if(DiagramEditPart.class.isAssignableFrom(editPartClass) || CompartmentEditPart.class.isAssignableFrom(editPartClass)) {
- // the edit part is disqualified, as a compartment or a diagram can not be dropped
+ private boolean isEditPartTypeAdapted(
+ Class<? extends EditPart> editPartClass, EClass eClass) {
+ if (DiagramEditPart.class.isAssignableFrom(editPartClass)
+ || CompartmentEditPart.class.isAssignableFrom(editPartClass)) {
+ // the edit part is disqualified, as a compartment or a diagram can
+ // not be dropped
return false;
- } else if(GraphicalEditPart.class.isAssignableFrom(editPartClass)) {
+ } else if (GraphicalEditPart.class.isAssignableFrom(editPartClass)) {
// check the edit part type against advised ones
- return isEditPartTypeSuitableForEClass(editPartClass.asSubclass(GraphicalEditPart.class), eClass);
+ return isEditPartTypeSuitableForEClass(
+ editPartClass.asSubclass(GraphicalEditPart.class), eClass);
} else {
// only a GraphicalEditPart must be selected
return false;
@@ -403,88 +465,112 @@ public abstract class OldCommonDiagramDragDropEditPolicy extends DiagramDragDrop
}
/**
- * Check if an edit part type correctly represent a semantic element of the given EClass.
- * Subclasses should implement this method to restrict the possibilities during drop of a link.
- * If an edit part is not of a suitable type, returning false will eliminate it to represent the
- * element as a source or target edit part. This can be used for example to disable label edit
- * parts, which may represent the same model element as the main node.
+ * Check if an edit part type correctly represent a semantic element of the
+ * given EClass. Subclasses should implement this method to restrict the
+ * possibilities during drop of a link. If an edit part is not of a suitable
+ * type, returning false will eliminate it to represent the element as a
+ * source or target edit part. This can be used for example to disable label
+ * edit parts, which may represent the same model element as the main node.
*
* @param editPartClass
- * the type of EditPart which must be checked
+ * the type of EditPart which must be checked
* @param eClass
- * the EClass type of the element which the edit part must represent
- * @return the only edit part type which can be selected (return a common super type if several
- * edit parts can be chosen)
+ * the EClass type of the element which the edit part must
+ * represent
+ * @return the only edit part type which can be selected (return a common
+ * super type if several edit parts can be chosen)
*/
- protected boolean isEditPartTypeSuitableForEClass(Class<? extends GraphicalEditPart> editPartClass, EClass eClass) {
+ protected boolean isEditPartTypeSuitableForEClass(
+ Class<? extends GraphicalEditPart> editPartClass, EClass eClass) {
return true;
}
/**
- * Returns The command to drop the {@link Constraint} and the links, if the constraints elements are on the diagram
+ * Returns The command to drop the {@link Constraint} and the links, if the
+ * constraints elements are on the diagram
*
* @param comment
- * the comment to drop
+ * the comment to drop
* @param viewer
- * the viewer
+ * the viewer
* @param diagramPreferencesHint
- * the diagram preference hint
+ * the diagram preference hint
* @param location
- * the location for the drop
+ * the location for the drop
* @param containerView
- * the container view for the drop
+ * the container view for the drop
* @param commentType
- * the IHintedType for the {@link Comment}
+ * the IHintedType for the {@link Comment}
* @param linkForComment
- * the IHintedType for the link which attach the {@link Comment} to the annotated Element
- * @return
- * The command to drop the {@link Constraint} and the links, if the constraints elements are on the diagram
+ * the IHintedType for the link which attach the {@link Comment}
+ * to the annotated Element
+ * @return The command to drop the {@link Constraint} and the links, if the
+ * constraints elements are on the diagram
*/
- protected Command getDropConstraintCommand(Constraint constraint, EditPartViewer viewer, PreferencesHint diagramPreferencesHint, Point location, View containerView, IHintedType commentType, IHintedType linkForComment) {
+ protected Command getDropConstraintCommand(Constraint constraint,
+ EditPartViewer viewer, PreferencesHint diagramPreferencesHint,
+ Point location, View containerView, IHintedType commentType,
+ IHintedType linkForComment) {
/* for further information, see bug 302555 */
CompositeCommand cc = new CompositeCommand("dropConstraint");
int nbAnnotated = constraint.getConstrainedElements().size();
// 0. Obtain list of the annotatedElement
- ArrayList<Element> endToConnect = new ArrayList<Element>(constraint.getConstrainedElements());
+ ArrayList<Element> endToConnect = new ArrayList<Element>(
+ constraint.getConstrainedElements());
GraphicalEditPart[] endEditPart = new GraphicalEditPart[nbAnnotated];
// 1. Look for if each annotated element is on the diagram
Iterator<Element> iteratorProp = endToConnect.iterator();
int index = 0;
- while(iteratorProp.hasNext()) {
+ while (iteratorProp.hasNext()) {
Element currentAnnotatedElement = iteratorProp.next();
- endEditPart[index] = (GraphicalEditPart)lookForEditPart(currentAnnotatedElement);
+ endEditPart[index] = (GraphicalEditPart) lookForEditPart(currentAnnotatedElement);
index += 1;
}
// 2. creation of the node Comment
IAdaptable elementAdapter = new EObjectAdapter(constraint);
- ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, commentType.getSemanticHint(), ViewUtil.APPEND, false, diagramPreferencesHint);
- CreateCommand nodeCreationCommand = new CreateCommand(getEditingDomain(), descriptor, (containerView));
+ ViewDescriptor descriptor = new ViewDescriptor(elementAdapter,
+ Node.class, commentType.getSemanticHint(), ViewUtil.APPEND,
+ false, diagramPreferencesHint);
+ CreateCommand nodeCreationCommand = new CreateCommand(
+ getEditingDomain(), descriptor, (containerView));
cc.compose(nodeCreationCommand);
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), location);
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(
+ getEditingDomain(), "move", (IAdaptable) nodeCreationCommand
+ .getCommandResult().getReturnValue(), location);
cc.compose(setBoundsCommand);
- if(nbAnnotated != 0) {
+ if (nbAnnotated != 0) {
IAdaptable sourceEventAdapter = null;
IAdaptable targetEventAdapter = null;
// obtain the node figure
- sourceEventAdapter = (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue();
+ sourceEventAdapter = (IAdaptable) nodeCreationCommand
+ .getCommandResult().getReturnValue();
// used in the creation command of each event
- ConnectionViewDescriptor dashedLineViewDescriptor = new ConnectionViewDescriptor(linkForComment, linkForComment.getSemanticHint(), diagramPreferencesHint);
-
- // 3. creation of the dashed line between the Comment and the annotated element
- for(GraphicalEditPart current : endEditPart) {
- if(current != null) {
- targetEventAdapter = new SemanticAdapter(null, current.getModel());
- CommonDeferredCreateConnectionViewCommand dashedLineCmd = new CommonDeferredCreateConnectionViewCommand(getEditingDomain(), linkForComment.getSemanticHint(), (sourceEventAdapter), (targetEventAdapter), viewer, diagramPreferencesHint, dashedLineViewDescriptor, null);
- // dashedLineCmd.setElement(constraint);
+ ConnectionViewDescriptor dashedLineViewDescriptor = new ConnectionViewDescriptor(
+ linkForComment, linkForComment.getSemanticHint(),
+ diagramPreferencesHint);
+
+ // 3. creation of the dashed line between the Comment and the
+ // annotated element
+ for (GraphicalEditPart current : endEditPart) {
+ if (current != null) {
+ targetEventAdapter = new SemanticAdapter(null,
+ current.getModel());
+ CommonDeferredCreateConnectionViewCommand dashedLineCmd = new CommonDeferredCreateConnectionViewCommand(
+ getEditingDomain(),
+ linkForComment.getSemanticHint(),
+ (sourceEventAdapter), (targetEventAdapter), viewer,
+ diagramPreferencesHint, dashedLineViewDescriptor,
+ null);
+ // dashedLineCmd.setElement(constraint);
dashedLineCmd.setElement(null);
- if(dashedLineCmd.canExecute()) {
+ if (dashedLineCmd.canExecute()) {
cc.compose(dashedLineCmd);
}
}
@@ -495,72 +581,89 @@ public abstract class OldCommonDiagramDragDropEditPolicy extends DiagramDragDrop
}
/**
- * Returns The command to drop the {@link Comment} and the links, if the attached elements are on the diagram
+ * Returns The command to drop the {@link Comment} and the links, if the
+ * attached elements are on the diagram
*
* @param comment
- * the comment to drop
+ * the comment to drop
* @param viewer
- * the viewer
+ * the viewer
* @param diagramPreferencesHint
- * the diagram preference hint
+ * the diagram preference hint
* @param location
- * the location for the drop
+ * the location for the drop
* @param containerView
- * the container view for the drop
+ * the container view for the drop
* @param commentType
- * the IHintedType for the {@link Comment}
+ * the IHintedType for the {@link Comment}
* @param linkForComment
- * the IHintedType for the link which attach the {@link Comment} to the annotated Element
- * @return
- * The command to drop the {@link Comment} and the link, if the attached elements are on the diagram
+ * the IHintedType for the link which attach the {@link Comment}
+ * to the annotated Element
+ * @return The command to drop the {@link Comment} and the link, if the
+ * attached elements are on the diagram
*/
- protected Command getDropCommentCommand(Comment comment, EditPartViewer viewer, PreferencesHint diagramPreferencesHint, Point location, View containerView, IHintedType commentType, IHintedType linkForComment) {
+ protected Command getDropCommentCommand(Comment comment,
+ EditPartViewer viewer, PreferencesHint diagramPreferencesHint,
+ Point location, View containerView, IHintedType commentType,
+ IHintedType linkForComment) {
/* for further information, see bug 302555 */
ViewServiceUtil.forceLoad();
CompositeCommand cc = new CompositeCommand("dropComment");
int nbAnnotated = comment.getAnnotatedElements().size();
// 0. Obtain list of the annotatedElement
- ArrayList<Element> endToConnect = new ArrayList<Element>(comment.getAnnotatedElements());
+ ArrayList<Element> endToConnect = new ArrayList<Element>(
+ comment.getAnnotatedElements());
GraphicalEditPart[] endEditPart = new GraphicalEditPart[nbAnnotated];
// 1. Look for if each annotated element is on the diagram
Iterator<Element> iteratorProp = endToConnect.iterator();
int index = 0;
- while(iteratorProp.hasNext()) {
+ while (iteratorProp.hasNext()) {
Element currentAnnotatedElement = iteratorProp.next();
- endEditPart[index] = (GraphicalEditPart)lookForEditPart(currentAnnotatedElement);
+ endEditPart[index] = (GraphicalEditPart) lookForEditPart(currentAnnotatedElement);
index += 1;
}
-
// 2. creation of the node Comment
IAdaptable elementAdapter = new EObjectAdapter(comment);
- ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, commentType.getSemanticHint(), ViewUtil.APPEND, false, diagramPreferencesHint);
- CreateCommand nodeCreationCommand = new CreateCommand(getEditingDomain(), descriptor, (containerView));
+ ViewDescriptor descriptor = new ViewDescriptor(elementAdapter,
+ Node.class, commentType.getSemanticHint(), ViewUtil.APPEND,
+ false, diagramPreferencesHint);
+ CreateCommand nodeCreationCommand = new CreateCommand(
+ getEditingDomain(), descriptor, (containerView));
cc.compose(nodeCreationCommand);
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), location);
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(
+ getEditingDomain(), "move", (IAdaptable) nodeCreationCommand
+ .getCommandResult().getReturnValue(), location);
cc.compose(setBoundsCommand);
// obtain the node figure
- IAdaptable sourceEventAdapter = (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue();
+ IAdaptable sourceEventAdapter = (IAdaptable) nodeCreationCommand
+ .getCommandResult().getReturnValue();
IAdaptable targetEventAdapter = null;
- if(nbAnnotated != 0) {
-
-
-
+ if (nbAnnotated != 0) {
// used in the creation command of each event
- ConnectionViewDescriptor dashedLineViewDescriptor = new ConnectionViewDescriptor(linkForComment, linkForComment.getSemanticHint(), diagramPreferencesHint);
-
- // 3. creation of the dashed line between the Constraint and the constrained element
- for(GraphicalEditPart current : endEditPart) {
- if(current != null) {
- targetEventAdapter = new SemanticAdapter(null, current.getModel());
- CommonDeferredCreateConnectionViewCommand dashedLineCmd = new CommonDeferredCreateConnectionViewCommand(getEditingDomain(), linkForComment.getSemanticHint(), (sourceEventAdapter), (targetEventAdapter), viewer, diagramPreferencesHint, dashedLineViewDescriptor, null);
- //dashedLineCmd.setElement(comment);
+ ConnectionViewDescriptor dashedLineViewDescriptor = new ConnectionViewDescriptor(
+ linkForComment, linkForComment.getSemanticHint(),
+ diagramPreferencesHint);
+
+ // 3. creation of the dashed line between the Constraint and the
+ // constrained element
+ for (GraphicalEditPart current : endEditPart) {
+ if (current != null) {
+ targetEventAdapter = new SemanticAdapter(null,
+ current.getModel());
+ CommonDeferredCreateConnectionViewCommand dashedLineCmd = new CommonDeferredCreateConnectionViewCommand(
+ getEditingDomain(),
+ linkForComment.getSemanticHint(),
+ (sourceEventAdapter), (targetEventAdapter), viewer,
+ diagramPreferencesHint, dashedLineViewDescriptor,
+ null);
+ // dashedLineCmd.setElement(comment);
dashedLineCmd.setElement(null);
- if(dashedLineCmd.canExecute()) {
+ if (dashedLineCmd.canExecute()) {
cc.compose(dashedLineCmd);
}
}
@@ -570,6 +673,4 @@ public abstract class OldCommonDiagramDragDropEditPolicy extends DiagramDragDrop
return new ICommandProxy(cc);
}
-
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/OrphanViewPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/OrphanViewPolicy.java
index 2ab3115388d..76199b985a8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/OrphanViewPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/OrphanViewPolicy.java
@@ -54,10 +54,11 @@ import org.eclipse.papyrus.core.listenerservice.IPapyrusListener;
import org.eclipse.uml2.uml.Comment;
/**
- * Edit Policy in charge of the removal of views that are not linked to semantic elements, when they should be linked to semantic elements.
+ * Edit Policy in charge of the removal of views that are not linked to semantic
+ * elements, when they should be linked to semantic elements.
* <P>
* Sometimes, {@link View}s are not linked to semantic elements, like the comment link. This link represents the annotated element feature for a
- * {@link Comment}, but they are not themselves connected to a semantic element.<BR/>
+ * {@link Comment}, but they are not themselves connected to a semantic element. <BR/>
* Thus, when this policy is created, it reads a table of integer that corresponds to the set of visual IDs, ids linked to views that are never linked
* to a semantic element.
* </P>
@@ -74,7 +75,10 @@ import org.eclipse.uml2.uml.Comment;
*/
public class OrphanViewPolicy extends AbstractEditPolicy implements NotificationListener, IPapyrusListener {
- /** array list of visual id that correspond to views that are not linked to semantic elements. For example, comment links */
+ /**
+ * array list of visual id that correspond to views that are not linked to
+ * semantic elements. For example, comment links
+ */
private ArrayList<Integer> notOrphanList = new ArrayList<Integer>();
/** the pattern that checks visual ids are valid integers */
@@ -97,12 +101,15 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
final View hostView = (View)getHost().getModel();
hostSemanticElement = hostView.getElement();
- // adds listener to the event broker, listening for the view and the semantic element associated to the host edit part
+ // adds listener to the event broker, listening for the view and the
+ // semantic element associated to the host edit part
getDiagramEventBroker().addNotificationListener(hostView, this);
getDiagramEventBroker().addNotificationListener(hostSemanticElement, this);
- // retrieve the list of parent semantic element to listen in case of modification
- // for each child views, checks which parent has the semantic element associated to the view
+ // retrieve the list of parent semantic element to listen in case of
+ // modification
+ // for each child views, checks which parent has the semantic element
+ // associated to the view
// if dif
Iterator<View> it = hostView.getChildren().listIterator();
while(it.hasNext()) {
@@ -118,9 +125,9 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
super.activate();
}
-
/**
- * Adds this edit policy as listener for changes to the specified semanticParent
+ * Adds this edit policy as listener for changes to the specified
+ * semanticParent
*
* @param semanticParent
* the semantic parent to listen
@@ -129,7 +136,8 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
*/
protected void addAdditionalParentToListen(EObject semanticParent, View childView) {
// check if the list already contains the semantic Parent
- // if it already contains the parent, adds the view to the list of views responsible of this parent
+ // if it already contains the parent, adds the view to the list of views
+ // responsible of this parent
// if not, it creates a new entry in the map
if(additionalParentToListen.containsKey(semanticParent)) {
List<View> views = additionalParentToListen.get(semanticParent);
@@ -137,7 +145,9 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
views.add(childView);
// no need to add listener, it should already be done
} else {
- // creates the list of views associated to this parent and adds it to the additional parent to listen, with the key "semantic parent"
+ // creates the list of views associated to this parent and adds it
+ // to the additional parent to listen, with the key
+ // "semantic parent"
ArrayList<View> views = new ArrayList<View>();
views.add(childView);
additionalParentToListen.put(semanticParent, views);
@@ -146,7 +156,8 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
}
/**
- * Removes this edit policy as listener for changes to the specified semanticParent
+ * Removes this edit policy as listener for changes to the specified
+ * semanticParent
*
* @param semanticParent
* the semantic parent to stop listen
@@ -154,14 +165,16 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
* the view that does not requires this additional listener
*/
protected void removeAdditionalParentToListen(EObject semanticParent, View childView) {
- // removes the view from the list of views that requires a listener for the semantic parent
+ // removes the view from the list of views that requires a listener for
+ // the semantic parent
if(additionalParentToListen.containsKey(semanticParent)) {
List<View> views = additionalParentToListen.get(semanticParent);
assert (views != null) : "list should not be null";
views.remove(childView);
if(views.isEmpty()) {
additionalParentToListen.remove(semanticParent);
- // check this is not the parent semantic element of the host's semantic element
+ // check this is not the parent semantic element of the host's
+ // semantic element
if(!semanticParent.equals(((View)getHost().getModel()).getElement())) {
getDiagramEventBroker().removeNotificationListener(semanticParent, this);
}
@@ -177,7 +190,8 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
// retrieve the view and the element associated to the host edit part
final View hostView = (View)getHost().getModel();
- // removes all notification listeners for the additional parent to listen
+ // removes all notification listeners for the additional parent to
+ // listen
for(EObject parent : additionalParentToListen.keySet()) {
getDiagramEventBroker().removeNotificationListener(parent, this);
}
@@ -194,13 +208,13 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
}
/**
- * Deletes a list of views. The views will be deleted <tt>iff</tt> their semantic element has
- * also been deleted.
+ * Deletes a list of views. The views will be deleted <tt>iff</tt> their
+ * semantic element has also been deleted.
*
* @param views
* an iterator on a list of views.
- * @return <tt>true</tt> if the host editpart should be refreshed; either one one of the
- * supplied views was deleted or has been reparented.
+ * @return <tt>true</tt> if the host editpart should be refreshed; either
+ * one one of the supplied views was deleted or has been reparented.
*/
protected final boolean deleteViews(Iterator<View> views) {
@@ -228,7 +242,8 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
EditPart ep = getHost();
boolean isActivating = true;
// use the viewer to determine if we are still initializing the diagram
- // do not use the DiagramEditPart.isActivating since ConnectionEditPart's
+ // do not use the DiagramEditPart.isActivating since
+ // ConnectionEditPart's
// parent will not be a diagram edit part
EditPartViewer viewer = ep.getViewer();
if(viewer instanceof DiagramGraphicalViewer) {
@@ -300,10 +315,12 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
}
/**
- * Inits the list of children that should never be attached to a semantic element, for example comment links.
+ * Inits the list of children that should never be attached to a semantic
+ * element, for example comment links.
*
* @param notOrphanVisualID
- * the list of visual id of views that should never be attached to a semantic element
+ * the list of visual id of views that should never be attached
+ * to a semantic element
*/
public void init(int[] notOrphanVisualID) {
for(int i = 0; i < notOrphanVisualID.length; i++) {
@@ -312,7 +329,8 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
}
/**
- * Tests if the view is orphaned, i.e. it is still attached to a semantic element.
+ * Tests if the view is orphaned, i.e. it is still attached to a semantic
+ * element.
* <P>
* It checks also that it is not a view that is never attached to a semantic element (For example, comment links do not have semantic elements
* attached...)
@@ -320,8 +338,9 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
*
* @param view
* the view to check
- * @return <code>true</code> if the view is not attached to a semantic element. <code>false</code> if it is still attached to a semantic element
- * or if it should never be attached to a semantic element
+ * @return <code>true</code> if the view is not attached to a semantic
+ * element. <code>false</code> if it is still attached to a semantic
+ * element or if it should never be attached to a semantic element
*/
protected boolean isOrphaned(View view) {
String semanticHint = view.getType();
@@ -353,7 +372,8 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
*/
public void notifyChanged(Notification notification) {
// something has change. What ? :)
- // check who is responsible of notification. If this is host edit part related semantic element, act as standard
+ // check who is responsible of notification. If this is host edit part
+ // related semantic element, act as standard
Object notifier = notification.getNotifier();
// View hostView = (View)getHost().getModel();
if(notifier.equals(hostSemanticElement)) {
@@ -366,15 +386,19 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
if(!(notifier instanceof View)) {
if(Notification.REMOVE == notification.getEventType()) {
- // 2 cases... remove or simple move ?
- // this can be checked with the view, if it is now orphaned or not
- // if it is orphaned, element has to be destroyed, remove from parent listener, etc.
- // if not, this was just a move => change listener using new parent
+ // 2 cases... remove or simple move ?
+ // this can be checked with the view, if it is now
+ // orphaned or not
+ // if it is orphaned, element has to be destroyed,
+ // remove from parent listener, etc.
+ // if not, this was just a move => change listener using
+ // new parent
// checks also for whole hierarchy...
EObject parentNotifier = (EObject)notifier;
if(additionalParentToListen.containsKey(parentNotifier)) {
- // this should be one of the elements that are inside the
+ // this should be one of the elements that are
+ // inside the
List<View> views = additionalParentToListen.get(parentNotifier);
List<View> orphaned = findOrphanView(views.iterator());
@@ -387,7 +411,8 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
}
} else { // Notifier is a View
// REMOVE or ADD are interesting events:
- // if remove, remove the list (perhaps) from the views contributing to the delete action
+ // if remove, remove the list (perhaps) from the views
+ // contributing to the delete action
// if add, checks it does not need to be watched
if(Notification.REMOVE == notification.getEventType()) {
if(notification.getNewValue() instanceof View) {
@@ -421,12 +446,14 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
// get semantic element attached to the host edit part
View hostView = (View)getHost().getModel();
- // get the parent of the new view. if it is the same as current parent, does not add additional listeners
+ // get the parent of the new view. if it is the same as current parent,
+ // does not add additional listeners
if(newView.getElement() != null) {
EObject semanticParent = newView.getElement().eContainer();
if(semanticParent != null) {
if(!semanticParent.equals(hostSemanticElement)) {
- // add each parent of the semantic parent to the list of additional listeners
+ // add each parent of the semantic parent to the list of
+ // additional listeners
for(EObject parent : getElementHierarchy(semanticParent)) {
addAdditionalParentToListen(parent, newView);
}
@@ -442,7 +469,8 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
* the old view to check
*/
protected void removeListenerForView(View oldView) {
- // create a temp list of elements to delete (iterator concurrent modification..)
+ // create a temp list of elements to delete (iterator concurrent
+ // modification..)
Map<EObject, List<View>> parentsToDelete = new HashMap<EObject, List<View>>();
for(EObject parent : additionalParentToListen.keySet()) {
@@ -463,7 +491,8 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
* Updates the listeners for the specified semantic parent
*/
protected void removeListeners(List<View> impactedViews) {
- // create a temp list of elements to delete (iterator concurrent modification..)
+ // create a temp list of elements to delete (iterator concurrent
+ // modification..)
Map<EObject, List<View>> parentsToDelete = new HashMap<EObject, List<View>>();
// collect the elements to delete
@@ -494,7 +523,8 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
/**
* Returns the list of parent for the specified element
*
- * @return the list of parent for the specified element, with the element itself
+ * @return the list of parent for the specified element, with the element
+ * itself
*/
public List<EObject> getElementHierarchy(EObject eObject) {
List<EObject> list = new ArrayList<EObject>();
@@ -531,7 +561,8 @@ public class OrphanViewPolicy extends AbstractEditPolicy implements Notification
}
/**
- * launch a weak synchronization. It could be useful in order to clean a diagram by an external tool.
+ * launch a weak synchronization. It could be useful in order to clean a
+ * diagram by an external tool.
*/
public void forceRefresh() {
refreshViews();
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/PapyrusCreationEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/PapyrusCreationEditPolicy.java
index 36788979952..d56ab6e1217 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/PapyrusCreationEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/PapyrusCreationEditPolicy.java
@@ -31,9 +31,9 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.RefreshConnectionsRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.notation.View;
-
/**
- * Specific creation edit policy for Papyrus. It checks that the view creation can be done before returning the result of the getCommand
+ * Specific creation edit policy for Papyrus. It checks that the view creation
+ * can be done before returning the result of the getCommand
*/
public class PapyrusCreationEditPolicy extends CreationEditPolicy {
@@ -92,7 +92,6 @@ public class PapyrusCreationEditPolicy extends CreationEditPolicy {
Command refreshConnectionCommand = getHost().getCommand(new RefreshConnectionsRequest(((List)request.getNewObject())));
-
// form the compound command and return
CompositeCommand cc = new CompositeCommand(semanticCommand.getLabel());
cc.compose(semanticCommand);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/QualifiedNameDisplayEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/QualifiedNameDisplayEditPolicy.java
index adc6988e8b9..fd235321a7d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/QualifiedNameDisplayEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/QualifiedNameDisplayEditPolicy.java
@@ -35,7 +35,8 @@ import org.eclipse.uml2.uml.UMLPackage;
/**
* this edit policy has in charge to display the qualified name of an element.
- * To display it, the editpart must be a {@link IPapyrusEditPart} and the associated figure has to be a {@link NodeNamedElementFigure}
+ * To display it, the editpart must be a {@link IPapyrusEditPart} and the
+ * associated figure has to be a {@link NodeNamedElementFigure}
*/
public class QualifiedNameDisplayEditPolicy extends GraphicalEditPolicy implements NotificationListener, IPapyrusListener {
@@ -70,7 +71,8 @@ public class QualifiedNameDisplayEditPolicy extends GraphicalEditPolicy implemen
hostSemanticNamedElement = getNamedElement();
if(hostSemanticNamedElement != null) {
- // adds a listener on the view and the element controlled by the editpart
+ // adds a listener on the view and the element controlled by the
+ // editpart
getDiagramEventBroker().addNotificationListener(view, this);
if(hostSemanticNamedElement == null) {
@@ -140,8 +142,8 @@ public class QualifiedNameDisplayEditPolicy extends GraphicalEditPolicy implemen
/**
*
- * @return the associated named element to the editpart.
- * it can return null if this not a named element
+ * @return the associated named element to the editpart. it can return null
+ * if this not a named element
*/
protected NamedElement getNamedElement() {
View view = (View)getHost().getModel();
@@ -198,7 +200,7 @@ public class QualifiedNameDisplayEditPolicy extends GraphicalEditPolicy implemen
if(parentListeners == null) {
parentListeners = new ArrayList<Object>();
}
- if (getNamedElement() != null) {
+ if(getNamedElement() != null) {
EObject parentEOBject = getNamedElement().eContainer();
while(parentEOBject != null) {
diagramEventBroker.addNotificationListener(parentEOBject, this);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShortCutDiagramEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShortCutDiagramEditPolicy.java
index 4a4fbd519bd..da4b348960b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShortCutDiagramEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShortCutDiagramEditPolicy.java
@@ -30,8 +30,8 @@ import org.eclipse.papyrus.core.utils.EditorUtils;
import org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr;
/**
- * This class is used to open a new diagram when the double click is detected. It is dependent of
- * papyrus environment
+ * This class is used to open a new diagram when the double click is detected.
+ * It is dependent of papyrus environment
*/
public class ShortCutDiagramEditPolicy extends OpenEditPolicy {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideClassifierContentsEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideClassifierContentsEditPolicy.java
index 93803287f4d..2b9b4ba3452 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideClassifierContentsEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideClassifierContentsEditPolicy.java
@@ -38,8 +38,8 @@ import org.eclipse.papyrus.diagram.common.commands.ShowHideElementsRequest;
/**
*
- * This EditPolicy provides the same commands that {@link PropertyHandlerEditPolicy},
- * more the command to Show/Hide a given compartment
+ * This EditPolicy provides the same commands that {@link PropertyHandlerEditPolicy}, more the command to Show/Hide a given
+ * compartment
*
*/
public class ShowHideClassifierContentsEditPolicy extends AbstractEditPolicy {
@@ -72,8 +72,7 @@ public class ShowHideClassifierContentsEditPolicy extends AbstractEditPolicy {
* @param container
* the container for the element
* @param semanticElement
- * @return
- * The command to create the view
+ * @return The command to create the view
*/
protected Command getCreateViewCommand(View container, EObject semanticElement, Point location) {
@@ -84,7 +83,7 @@ public class ShowHideClassifierContentsEditPolicy extends AbstractEditPolicy {
if(cmd.canExecute()) {
compositeCmd.add(new ICommandProxy(cmd));
}
- //set the location
+ // set the location
if(location != null) {
SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)cmd.getCommandResult().getReturnValue(), location); //$NON-NLS-1$
if(setBoundsCommand.canExecute()) {
@@ -100,20 +99,17 @@ public class ShowHideClassifierContentsEditPolicy extends AbstractEditPolicy {
*
* @param hidedEditPart
* the EditPart to hide
- * @return
- * the command to the EditPart
+ * @return the command to the EditPart
*/
protected Command getDestroyViewCommand(EditPart hidedEditPart) {
DeleteCommand cmd = new DeleteCommand(getEditingDomain(), (View)hidedEditPart.getModel());
return new ICommandProxy(cmd);
}
-
/**
* Return the current {@link EditingDomain}
*
- * @return
- * the current {@link EditingDomain}
+ * @return the current {@link EditingDomain}
*/
protected TransactionalEditingDomain getEditingDomain() {
return ((IGraphicalEditPart)getHost()).getEditingDomain();
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideCompartmentEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideCompartmentEditPolicy.java
index fdeb4f66b95..5aa4834bbb5 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideCompartmentEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideCompartmentEditPolicy.java
@@ -36,8 +36,8 @@ import org.eclipse.papyrus.diagram.common.commands.ShowHideCompartmentRequest;
/**
*
- * This EditPolicy provides the same commands that {@link PropertyHandlerEditPolicy},
- * more the command to Show/Hide a given compartment
+ * This EditPolicy provides the same commands that {@link PropertyHandlerEditPolicy}, more the command to Show/Hide a given
+ * compartment
*
*/
public class ShowHideCompartmentEditPolicy extends AbstractEditPolicy {
@@ -65,8 +65,7 @@ public class ShowHideCompartmentEditPolicy extends AbstractEditPolicy {
*
* @param request
* the request
- * @return
- * the command to show/hide a compartment
+ * @return the command to show/hide a compartment
*/
protected Command getShowHideCompartmentCommand(ShowHideCompartmentRequest request) {
if(getHost() instanceof TopGraphicEditPart) {
@@ -88,8 +87,7 @@ public class ShowHideCompartmentEditPolicy extends AbstractEditPolicy {
*
* @param ep
* a {@link TopGraphicEditPart}
- * @return
- * all the views associated to this editpart
+ * @return all the views associated to this editpart
*/
public List<?> getAllNotationViews(TopGraphicEditPart ep) {
View view = ep.getNotationView();
@@ -110,8 +108,7 @@ public class ShowHideCompartmentEditPolicy extends AbstractEditPolicy {
/**
* Return the current {@link EditingDomain}
*
- * @return
- * the current {@link EditingDomain}
+ * @return the current {@link EditingDomain}
*/
protected TransactionalEditingDomain getEditingDomain() {
return ((IGraphicalEditPart)getHost()).getEditingDomain();
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideLabelEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideLabelEditPolicy.java
index 5f1dd5fd3b3..96f294815d2 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideLabelEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideLabelEditPolicy.java
@@ -27,9 +27,9 @@ import org.eclipse.papyrus.diagram.common.commands.ShowHideLabelsRequest;
/**
* This EditPolicy is used to show or hide only one Label View for a connection.
- * The EditPolicy {@link ConnectionLabelsEditPolicy} provided by GMF allows only show or hide
- * all the labels for a connection (or an affixed child node!)and not only some of them
- * This EditPolicy replaces it!
+ * The EditPolicy {@link ConnectionLabelsEditPolicy} provided by GMF allows only
+ * show or hide all the labels for a connection (or an affixed child node!)and
+ * not only some of them This EditPolicy replaces it!
*
*
*/
@@ -82,7 +82,7 @@ public class ShowHideLabelEditPolicy extends ConnectionLabelsEditPolicy {
*/
@Override
public EditPart getTargetEditPart(Request request) {
- //nothing to do here!
+ // nothing to do here!
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideRelatedContentsEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideRelatedContentsEditPolicy.java
index 01d8d822cf3..db9a0329fdd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideRelatedContentsEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowHideRelatedContentsEditPolicy.java
@@ -13,11 +13,11 @@
*****************************************************************************/
package org.eclipse.papyrus.diagram.common.editpolicies;
-
/**
*
- * This EditPolicy provides the same behavior that ShowHideClassifierContentsEditPolicy.
- * Currently its used in the Composite Structure Diagram to Show/Hide the related Contents for the properties
+ * This EditPolicy provides the same behavior that
+ * ShowHideClassifierContentsEditPolicy. Currently its used in the Composite
+ * Structure Diagram to Show/Hide the related Contents for the properties
*
*/
public class ShowHideRelatedContentsEditPolicy extends ShowHideClassifierContentsEditPolicy {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowViewEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowViewEditPolicy.java
index 941cf80806e..9c15a7ad29e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowViewEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/ShowViewEditPolicy.java
@@ -53,7 +53,8 @@ public class ShowViewEditPolicy {
}
/**
- * Listens to double-click event over some element of the diagram and shows properties tab.
+ * Listens to double-click event over some element of the diagram and shows
+ * properties tab.
*
* @return the open edit policy
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/UMLBaseItemSemanticEditPolicy.java
index c092e43057b..fd971d48c8b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/editpolicies/UMLBaseItemSemanticEditPolicy.java
@@ -26,7 +26,8 @@ package org.eclipse.papyrus.diagram.common.editpolicies;
public abstract class UMLBaseItemSemanticEditPolicy {
/**
- * Extended request data key to hold the edge view during a reconnect request.
+ * Extended request data key to hold the edge view during a reconnect
+ * request.
*/
public static final String GRAPHICAL_RECONNECTED_EDGE = "graphical_edge"; //$NON-NLS-1$
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/edge/CAssociationFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/edge/CAssociationFigure.java
index f718085b34b..a819256e829 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/edge/CAssociationFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/edge/CAssociationFigure.java
@@ -22,7 +22,8 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
import org.eclipse.swt.SWT;
/**
- * This edge figure is painted using dashes. This is the base figure for dependencies, for example
+ * This edge figure is painted using dashes. This is the base figure for
+ * dependencies, for example
*
* @author Patrick Tessier
* @deprecated
@@ -31,7 +32,8 @@ import org.eclipse.swt.SWT;
public class CAssociationFigure extends PolylineConnectionEx {
/**
- * the end of the association is an aggregation i.e. this a translucide diamond.
+ * the end of the association is an aggregation i.e. this a translucide
+ * diamond.
*/
public static final int aggregation = 1;
@@ -181,24 +183,25 @@ public class CAssociationFigure extends PolylineConnectionEx {
// circle
/*
- * PointList decorationPointList = new PointList(); decorationPointList.addPoint(0,1);
- * decorationPointList.addPoint(-2,3); decorationPointList.addPoint(-4,3);
- * decorationPointList.addPoint(-6,1); decorationPointList.addPoint(-6,-1);
- * decorationPointList.addPoint(-4,-3); decorationPointList.addPoint(-2,-3);
- * decorationPointList.addPoint(0,-1);
+ * PointList decorationPointList = new PointList();
+ * decorationPointList.addPoint(0,1); decorationPointList.addPoint(-2,3);
+ * decorationPointList.addPoint(-4,3); decorationPointList.addPoint(-6,1);
+ * decorationPointList.addPoint(-6,-1); decorationPointList.addPoint(-4,-3);
+ * decorationPointList.addPoint(-2,-3); decorationPointList.addPoint(0,-1);
*
* decoration.setScale(1, 1);
*/
// this.setTargetDecoration(decoration);
// composition+ circle
/*
- * PointList decorationPointList = new PointList(); decorationPointList.addPoint(0,1);
- * decorationPointList.addPoint(-2,3); decorationPointList.addPoint(-4,3);
- * decorationPointList.addPoint(-6,1); decorationPointList.addPoint(-6,0);
- * decorationPointList.addPoint(-18,6); decorationPointList.addPoint(-30,0);
- * decorationPointList.addPoint(-18,-6); decorationPointList.addPoint(-6,0);
- * decorationPointList.addPoint(-6,-1); decorationPointList.addPoint(-4,-3);
- * decorationPointList.addPoint(-2,-3); decorationPointList.addPoint(0,-1); //color Point
+ * PointList decorationPointList = new PointList();
+ * decorationPointList.addPoint(0,1); decorationPointList.addPoint(-2,3);
+ * decorationPointList.addPoint(-4,3); decorationPointList.addPoint(-6,1);
+ * decorationPointList.addPoint(-6,0); decorationPointList.addPoint(-18,6);
+ * decorationPointList.addPoint(-30,0); decorationPointList.addPoint(-18,-6);
+ * decorationPointList.addPoint(-6,0); decorationPointList.addPoint(-6,-1);
+ * decorationPointList.addPoint(-4,-3); decorationPointList.addPoint(-2,-3);
+ * decorationPointList.addPoint(0,-1); //color Point
* decorationPointList.addPoint(-1,-1); decorationPointList.addPoint(-1,1);
* decorationPointList.addPoint(-2,3); decorationPointList.addPoint(-2,-3);
* decorationPointList.addPoint(-3,-3); decorationPointList.addPoint(-3,3);
@@ -207,17 +210,19 @@ public class CAssociationFigure extends PolylineConnectionEx {
* decorationPointList.addPoint(-6,1); decorationPointList.addPoint(-6,-1);
*
* decoration.setScale(1, 1); decoration.setTemplate(decorationPointList);
- * decoration.setBackgroundColor(ColorConstants.white); this.setSourceDecoration(decoration);
+ * decoration.setBackgroundColor(ColorConstants.white);
+ * this.setSourceDecoration(decoration);
*/
// circle +arrow
/*
- * PointList decorationPointList = new PointList(); decorationPointList.addPoint(0,1);
- * decorationPointList.addPoint(-2,3); decorationPointList.addPoint(-4,3);
- * decorationPointList.addPoint(-6,1); decorationPointList.addPoint(-6,0);
- * decorationPointList.addPoint(-18,6); decorationPointList.addPoint(-6,0);
- * decorationPointList.addPoint(-18,-6); decorationPointList.addPoint(-6,0);
- * decorationPointList.addPoint(-6,-1); decorationPointList.addPoint(-4,-3);
- * decorationPointList.addPoint(-2,-3); decorationPointList.addPoint(0,-1);
+ * PointList decorationPointList = new PointList();
+ * decorationPointList.addPoint(0,1); decorationPointList.addPoint(-2,3);
+ * decorationPointList.addPoint(-4,3); decorationPointList.addPoint(-6,1);
+ * decorationPointList.addPoint(-6,0); decorationPointList.addPoint(-18,6);
+ * decorationPointList.addPoint(-6,0); decorationPointList.addPoint(-18,-6);
+ * decorationPointList.addPoint(-6,0); decorationPointList.addPoint(-6,-1);
+ * decorationPointList.addPoint(-4,-3); decorationPointList.addPoint(-2,-3);
+ * decorationPointList.addPoint(0,-1);
*
* decoration.setScale(1, 1); decoration.setTemplate(decorationPointList);
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/edge/DashedEdgeFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/edge/DashedEdgeFigure.java
index 6e468429121..314d327514d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/edge/DashedEdgeFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/edge/DashedEdgeFigure.java
@@ -20,8 +20,9 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
import org.eclipse.swt.graphics.Color;
/**
- * This is a custom figure to represents a default edge. This code was used in Papyrus 1.
- * This edge figure is painted using dashes. This is the base figure for dependencies, for exempale
+ * This is a custom figure to represents a default edge. This code was used in
+ * Papyrus 1. This edge figure is painted using dashes. This is the base figure
+ * for dependencies, for exempale
*/
public class DashedEdgeFigure extends UMLEdgeFigure {
@@ -90,8 +91,9 @@ public class DashedEdgeFigure extends UMLEdgeFigure {
}
/**
- * Sets initial Style for the figure. It does not give any special Color for Background and
- * Foreground. This is the style used for classic arrows: ------>
+ * Sets initial Style for the figure. It does not give any special Color for
+ * Background and Foreground. This is the style used for classic arrows:
+ * ------>
*/
protected void setStyle() {
PolylineDecoration dec = new PolylineDecoration();
@@ -113,7 +115,8 @@ public class DashedEdgeFigure extends UMLEdgeFigure {
}
/**
- * Sets initial style for this figure. This is the style used for full arrows: ------|>
+ * Sets initial style for this figure. This is the style used for full
+ * arrows: ------|>
*
* @param lineWidth
* the width of the link
@@ -126,7 +129,8 @@ public class DashedEdgeFigure extends UMLEdgeFigure {
}
/**
- * Sets initial style for this figure. This is the style used for full arrows: ------|>
+ * Sets initial style for this figure. This is the style used for full
+ * arrows: ------|>
*
* @param lineWidth
* the width of the link
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/edge/UMLEdgeFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/edge/UMLEdgeFigure.java
index cb0b8985cd4..80c03e0f12b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/edge/UMLEdgeFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/edge/UMLEdgeFigure.java
@@ -47,8 +47,8 @@ public class UMLEdgeFigure extends PolylineConnectionEx implements IPapyrusUMLEl
}
/**
- * Creates the contents of the figure, i.e. child node. This basic implementation creates only a
- * new stereotype label.
+ * Creates the contents of the figure, i.e. child node. This basic
+ * implementation creates only a new stereotype label.
* <p>
* This method should be called when the parent figure is created, or when the label was removed and a string has to be displayed.
* </p>
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/layout/AutomaticCompartmentToolBox.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/layout/AutomaticCompartmentToolBox.java
index b145f735cfd..7f674fc0a11 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/layout/AutomaticCompartmentToolBox.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/layout/AutomaticCompartmentToolBox.java
@@ -18,17 +18,14 @@ import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
import org.eclipse.papyrus.diagram.common.figure.node.AutomaticCompartmentLayoutManager;
-
/**
* The Class AutomaticCompartmentToolBox.
*/
public class AutomaticCompartmentToolBox implements ILayoutToolBox {
-
/** The AUTOMATI c_ layout. */
protected final String AUTOMATIC_LAYOUT = "Automatic_Layout";
-
/**
* {@inheritDoc}
*/
@@ -50,5 +47,4 @@ public class AutomaticCompartmentToolBox implements ILayoutToolBox {
return new AutomaticCompartmentLayoutManager();
}
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/layout/ILayoutToolBox.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/layout/ILayoutToolBox.java
index f40552b4d25..a86151811ab 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/layout/ILayoutToolBox.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/layout/ILayoutToolBox.java
@@ -17,8 +17,8 @@ import org.eclipse.draw2d.AbstractLayout;
import org.eclipse.gef.EditPolicy;
/**
- * this goal of this kind of class is to provide the good editpolicy and the good layout to attach
- * at the figure.
+ * this goal of this kind of class is to provide the good editpolicy and the
+ * good layout to attach at the figure.
*/
public interface ILayoutToolBox {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/layout/PropertiesCompartmentLayoutManager.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/layout/PropertiesCompartmentLayoutManager.java
index 58436a1f61e..4c9deb530a3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/layout/PropertiesCompartmentLayoutManager.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/layout/PropertiesCompartmentLayoutManager.java
@@ -17,7 +17,6 @@ import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Rectangle;
-
public class PropertiesCompartmentLayoutManager extends AbstractLayout {
protected static int MARGIN_X = 5;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/AffixedNamedElementFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/AffixedNamedElementFigure.java
index b6ea8832c89..5488c1ff1ec 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/AffixedNamedElementFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/AffixedNamedElementFigure.java
@@ -19,8 +19,8 @@ import org.eclipse.draw2d.ImageFigure;
import org.eclipse.swt.graphics.Image;
/**
- * Figure for Affixed NamedElement representation.
- * The name label is shown as an external label.
+ * Figure for Affixed NamedElement representation. The name label is shown as an
+ * external label.
*/
public class AffixedNamedElementFigure extends NodeNamedElementFigure {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java
index ac570da20ae..89bc20c19f0 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java
@@ -27,8 +27,9 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
/**
* this is the layout manager in charge to place element in compartment element.
- * A modification of the code has been done in order to manage none visible compartment.
- * if a compartment becomes invisible, its size and its height are equal to 1.
+ * A modification of the code has been done in order to manage none visible
+ * compartment. if a compartment becomes invisible, its size and its height are
+ * equal to 1.
*
*/
@@ -129,13 +130,15 @@ public class AutomaticCompartmentLayoutManager extends AbstractLayout {
public void layout(IFigure container) {
collectInformationOnChildren(container);
- // this list contains the visible compartments (that is to say : notCompartmentList + compartmentsList
+ // this list contains the visible compartments (that is to say :
+ // notCompartmentList + compartmentsList
List<IFigure> visibleCompartments = new ArrayList<IFigure>();
visibleCompartments.addAll(notCompartmentList);
visibleCompartments.addAll(compartmentList);
- // choose the good layout by taking in account if it exist GMF compartment
+ // choose the good layout by taking in account if it exist GMF
+ // compartment
if(compartmentList.size() != 0) {
// visit all compartment
for(int i = 0; i < container.getChildren().size(); i++) {
@@ -157,7 +160,7 @@ public class AutomaticCompartmentLayoutManager extends AbstractLayout {
currentCompartment.setBounds(bound);
}
else{
- //this is a none visible compartment
+ // this is a none visible compartment
Rectangle bound = new Rectangle(currentCompartment.getBounds());
bound.setSize(1,1);
currentCompartment.setBounds(bound);
@@ -170,9 +173,10 @@ public class AutomaticCompartmentLayoutManager extends AbstractLayout {
}
/**
- * Optimize the size of each compartment depending on the size of the compartments container,
- * and the size of each compartment. If a compartment is empty, or not expanded, then a default
- * size is applied to this compartment
+ * Optimize the size of each compartment depending on the size of the
+ * compartments container, and the size of each compartment. If a
+ * compartment is empty, or not expanded, then a default size is applied to
+ * this compartment
*
* @param compartmentsDimension
* an hashmap containing each compartment dimension.
@@ -189,7 +193,8 @@ public class AutomaticCompartmentLayoutManager extends AbstractLayout {
}
int remainingspace = container.getBounds().height - notCompartmentsHeight;
- // ratio between the height of all compartments and the size of the compartments container.
+ // ratio between the height of all compartments and the size of the
+ // compartments container.
double ratio = new Integer(compartmentsHeight).doubleValue() / new Integer(remainingspace).doubleValue();
for(int i = 0; i < compartmentList.size(); i++) {
@@ -208,7 +213,8 @@ public class AutomaticCompartmentLayoutManager extends AbstractLayout {
}
/**
- * use to know what kind of element we have in order to apply the good policy for the disposition
+ * use to know what kind of element we have in order to apply the good
+ * policy for the disposition
* @param container
*/
public void collectInformationOnChildren(IFigure container) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/CenteredWrappedLabel.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/CenteredWrappedLabel.java
index bc023336d54..94759c6eccd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/CenteredWrappedLabel.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/CenteredWrappedLabel.java
@@ -16,7 +16,8 @@ package org.eclipse.papyrus.diagram.common.figure.node;
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
/**
- * This class is a {@link WrappingLabel}, which default behavior is set differently :
+ * This class is a {@link WrappingLabel}, which default behavior is set
+ * differently :
*
* The text is centered and automatically wraps on several lines.
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ClassifierFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ClassifierFigure.java
index 1d8acca201d..c90792a5096 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ClassifierFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ClassifierFigure.java
@@ -75,23 +75,24 @@ public class ClassifierFigure extends CompartmentFigure {
*/
public void paint(Graphics graphics) {
super.paint(graphics);
- if(active){
- Rectangle rect= this.getBounds();
- graphics.pushState();
- graphics.setForegroundColor(getForegroundColor());
- //do not forget to set line width to 1, if not the color will change because of the anti-aliasing
- graphics.setLineWidth(1);
-
- graphics.drawLine(new Point(rect.x+SPACE_FOR_ACTIVE_CLASS,rect.y), new Point(rect.x+SPACE_FOR_ACTIVE_CLASS,rect.y+ rect.height-1));
- graphics.drawLine(new Point(rect.x-SPACE_FOR_ACTIVE_CLASS-1+rect.width,rect.y), new Point(rect.x-SPACE_FOR_ACTIVE_CLASS-1+rect.width,rect.y+ rect.height-1));
- graphics.setBackgroundColor(getBackgroundColor());
- graphics.setForegroundColor(getBackgroundColor());
- graphics.setLineWidth(3);
-
- graphics.drawLine(new Point(rect.x+2,rect.y+1), new Point(rect.x+2,rect.y+ rect.height-2));
- graphics.drawLine(new Point(rect.x-3+rect.width,rect.y+1), new Point(rect.x-3+rect.width,rect.y+ rect.height-2));
-
- graphics.popState();
+ if(active) {
+ Rectangle rect = this.getBounds();
+ graphics.pushState();
+ graphics.setForegroundColor(getForegroundColor());
+ // do not forget to set line width to 1, if not the color will
+ // change because of the anti-aliasing
+ graphics.setLineWidth(1);
+
+ graphics.drawLine(new Point(rect.x + SPACE_FOR_ACTIVE_CLASS, rect.y), new Point(rect.x + SPACE_FOR_ACTIVE_CLASS, rect.y + rect.height - 1));
+ graphics.drawLine(new Point(rect.x - SPACE_FOR_ACTIVE_CLASS - 1 + rect.width, rect.y), new Point(rect.x - SPACE_FOR_ACTIVE_CLASS - 1 + rect.width, rect.y + rect.height - 1));
+ graphics.setBackgroundColor(getBackgroundColor());
+ graphics.setForegroundColor(getBackgroundColor());
+ graphics.setLineWidth(3);
+
+ graphics.drawLine(new Point(rect.x + 2, rect.y + 1), new Point(rect.x + 2, rect.y + rect.height - 2));
+ graphics.drawLine(new Point(rect.x - 3 + rect.width, rect.y + 1), new Point(rect.x - 3 + rect.width, rect.y + rect.height - 2));
+
+ graphics.popState();
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ConstraintFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ConstraintFigure.java
index 0b208e3677c..21a5e4b4b5e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ConstraintFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ConstraintFigure.java
@@ -23,7 +23,8 @@ import org.eclipse.gmf.runtime.draw2d.ui.text.TextFlowEx;
import org.eclipse.swt.graphics.Image;
/**
- * this class is used to display the a constraint with the possibility of gradient qualified name
+ * this class is used to display the a constraint with the possibility of
+ * gradient qualified name
*
*/
public class ConstraintFigure extends CornerBentFigure implements IPapyrusNodeNamedElementFigure, ILabelFigure, IMultilineEditableFigure {
@@ -50,8 +51,7 @@ public class ConstraintFigure extends CornerBentFigure implements IPapyrusNodeNa
* Calculate the partial qualified name with a specified depth.
*
* @param qualifiedName
- * the qualified name
- * can return null
+ * the qualified name can return null
*/
public String getQualifiedName(String qualifiedName, int depth) {
int n = -1;
@@ -158,7 +158,8 @@ public class ConstraintFigure extends CornerBentFigure implements IPapyrusNodeNa
}
/**
- * Create the tag label in the figure. The tag label is created if value is not null.
+ * Create the tag label in the figure. The tag label is created if value is
+ * not null.
*
* @param value
* the value to use
@@ -227,8 +228,8 @@ public class ConstraintFigure extends CornerBentFigure implements IPapyrusNodeNa
}
/**
- * use to obtain the reference of this figure
- * (use in order to launch an edit request)
+ * use to obtain the reference of this figure (use in order to launch an
+ * edit request)
*
* @return the constraintfigure
*/
@@ -249,7 +250,8 @@ public class ConstraintFigure extends CornerBentFigure implements IPapyrusNodeNa
/**
*
- * @return the textflow of the constraint that contain the string of the specification
+ * @return the textflow of the constraint that contain the string of the
+ * specification
*/
public TextFlowEx getTextFlow() {
return textFlow;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ContainerBorder.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ContainerBorder.java
index 1407b0b6567..a2d55077a5a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ContainerBorder.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ContainerBorder.java
@@ -43,7 +43,8 @@ public class ContainerBorder extends AbstractBorder {
protected Insets insets;
/**
- * Constructs a LineBorder with the specified color and of the specified width.
+ * Constructs a LineBorder with the specified color and of the specified
+ * width.
*
* @param lineWidth
* The width of the line in pixels.
@@ -72,7 +73,8 @@ public class ContainerBorder extends AbstractBorder {
}
/**
- * Constructs a LineBorder with the specified color and of the specified width.
+ * Constructs a LineBorder with the specified color and of the specified
+ * width.
*
* @param allMargin
* The width of the margin in pixels.
@@ -88,7 +90,8 @@ public class ContainerBorder extends AbstractBorder {
}
/**
- * Constructs a LineBorder with the specified color and of the specified width.
+ * Constructs a LineBorder with the specified color and of the specified
+ * width.
*
* @param lineWidth
* The width of the line in pixels.
@@ -154,8 +157,8 @@ public class ContainerBorder extends AbstractBorder {
}
/**
- * Returns the space used by the border for the figure provided as input. In this border all
- * sides always have equal width.
+ * Returns the space used by the border for the figure provided as input. In
+ * this border all sides always have equal width.
*
* @param figure
* The figure this border belongs to
@@ -176,8 +179,8 @@ public class ContainerBorder extends AbstractBorder {
}
/**
- * Returns <code>true</code> since this border is opaque. Being opaque it is responsible to fill
- * in the area within its boundaries.
+ * Returns <code>true</code> since this border is opaque. Being opaque it is
+ * responsible to fill in the area within its boundaries.
*
* @return <code>true</code> since this border is opaque
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/CornerBentFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/CornerBentFigure.java
index 62d39a49f7b..c581185b0dc 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/CornerBentFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/CornerBentFigure.java
@@ -81,7 +81,6 @@ public class CornerBentFigure extends NoteFigure implements IPapyrusNodeUMLEleme
this.add(stereotypesLabel, getStereotypeLabelPosition());
}
-
protected void createStereotypePropertiesContent() {
stereotypePropertiesContent = new StereotypePropertiesCompartment();
stereotypePropertiesContent.setFill(false);
@@ -133,8 +132,8 @@ public class CornerBentFigure extends NoteFigure implements IPapyrusNodeUMLEleme
}
/**
- * Returns the position of the stereotype properties location. this is just after stereotype
- * position
+ * Returns the position of the stereotype properties location. this is just
+ * after stereotype position
*
* @return the position of the stereotype properties label in the figure
*/
@@ -189,8 +188,8 @@ public class CornerBentFigure extends NoteFigure implements IPapyrusNodeUMLEleme
/**
* displays the new string corresponding to the list of stereotypes.
*
- * if the string is <code>null</code>, then the figure that displays the stereotype label is
- * removed from the NodeNamedElementFigure.
+ * if the string is <code>null</code>, then the figure that displays the
+ * stereotype label is removed from the NodeNamedElementFigure.
*
* @param stereotypeProperties
* the string to be displayed.
@@ -307,15 +306,13 @@ public class CornerBentFigure extends NoteFigure implements IPapyrusNodeUMLEleme
iconLabel.setLabelAlignment(PositionConstants.LEFT);
}
-
-
public Color getBorderColor() {
return borderColor;
}
public void setBorderColor(Color borderColor) {
- // this.borderColor = borderColor;
- // super.setBorder(new LineBorder(borderColor));
+ // this.borderColor = borderColor;
+ // super.setBorder(new LineBorder(borderColor));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/DiagramNodeFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/DiagramNodeFigure.java
index 7c0f7a48bfc..7a271bf1e09 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/DiagramNodeFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/DiagramNodeFigure.java
@@ -21,7 +21,8 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
public class DiagramNodeFigure extends RectangleFigure {
/**
- * @deprecated use org.eclipse.papyrus.diagram.common.figure.layout.PropertiesCompartmentLayoutManager instead
+ * @deprecated use org.eclipse.papyrus.diagram.common.figure.layout.
+ * PropertiesCompartmentLayoutManager instead
*/
private class PropertiesCompatmentLayoutManager extends AbstractLayout {
@@ -98,7 +99,8 @@ public class DiagramNodeFigure extends RectangleFigure {
ImageDescriptor visDesc = AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.papyrus.diagram.common", "/icons/obj16/call.gif");
// Overlay custom image over base image
- // OverlayVisibilityIcon overlayIcon = new OverlayVisibilityIcon(initialImage, visDesc);
+ // OverlayVisibilityIcon overlayIcon = new
+ // OverlayVisibilityIcon(initialImage, visDesc);
// image = overlayIcon.getImage();
getIconContainer().setIcon(image, 0);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/DiamondNode.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/DiamondNode.java
index 8a7fe2453ed..e5e996a698e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/DiamondNode.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/DiamondNode.java
@@ -60,11 +60,10 @@ public class DiamondNode extends PapyrusNodeFigure implements IPapyrusNodeUMLEle
if(isUsingGradient()) {
graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2()));
- //graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2()));
- }
- else{
- graphics.setBackgroundColor(getBackgroundColor());
- //graphics.setForegroundColor(getBackgroundColor);
+ // graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2()));
+ } else {
+ graphics.setBackgroundColor(getBackgroundColor());
+ // graphics.setForegroundColor(getBackgroundColor);
}
graphics.fillPolygon(ptList);
graphics.setLineWidth(1);
@@ -72,7 +71,6 @@ public class DiamondNode extends PapyrusNodeFigure implements IPapyrusNodeUMLEle
graphics.drawPolygon(ptList);
graphics.popState();
-
}
/**
* {@inheritDoc}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/FinalNode.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/FinalNode.java
index db5ee42b236..31cbfaf88d9 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/FinalNode.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/FinalNode.java
@@ -49,7 +49,7 @@ public class FinalNode extends PapyrusNodeFigure implements IPapyrusNodeUMLEleme
final int space = 5;
Rectangle f = Rectangle.SINGLETON;
- //to be in adequation with the figure node plate
+ // to be in adequation with the figure node plate
Rectangle r = getBounds().getCopy().crop(new Insets(0,0,1,1));
graphics.setBackgroundColor(getForegroundColor());
graphics.drawOval(r);
@@ -60,7 +60,6 @@ public class FinalNode extends PapyrusNodeFigure implements IPapyrusNodeUMLEleme
graphics.setBackgroundColor(getForegroundColor());
graphics.fillOval(f);
-
}
/**
* {@inheritDoc}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/FlowFinalNode.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/FlowFinalNode.java
index 66c656a8900..0167c7df583 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/FlowFinalNode.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/FlowFinalNode.java
@@ -49,11 +49,10 @@ public class FlowFinalNode extends PapyrusNodeFigure implements IPapyrusNodeUMLE
Rectangle r = getBounds().getCopy().crop(new Insets(0, 0, 1, 1));
if(isUsingGradient()) {
graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2()));
- //graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2()));
- }
- else{
- graphics.setBackgroundColor(getBackgroundColor());
- //graphics.setForegroundColor(getForegroundColor());
+ // graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2()));
+ } else {
+ graphics.setBackgroundColor(getBackgroundColor());
+ // graphics.setForegroundColor(getForegroundColor());
}
graphics.setLineWidth(1);
graphics.drawOval(r);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ForkNode.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ForkNode.java
index fd92a20b2f1..06e48f23f42 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ForkNode.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ForkNode.java
@@ -48,11 +48,10 @@ public class ForkNode extends PapyrusNodeFigure implements IPapyrusNodeUMLElemen
Rectangle r = getBounds().getCopy().crop(new Insets(0,0,1,1));
if(isUsingGradient()) {
graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2()));
- //graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2()));
- }
- else{
- graphics.setBackgroundColor(getBackgroundColor());
- //graphics.setForegroundColor(getForegroundColor());
+ // graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2()));
+ } else {
+ graphics.setBackgroundColor(getBackgroundColor());
+ // graphics.setForegroundColor(getForegroundColor());
}
graphics.fillRectangle(r);
graphics.setLineWidth(1);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/HTMLCommentParser.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/HTMLCommentParser.java
index c35b84275fa..f11e54812a7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/HTMLCommentParser.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/HTMLCommentParser.java
@@ -26,7 +26,6 @@ import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
-
/**
* Parser for simple html comments
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/HTMLCornerBentBodyFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/HTMLCornerBentBodyFigure.java
index cc7f1ed5e1c..33448b72e3d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/HTMLCornerBentBodyFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/HTMLCornerBentBodyFigure.java
@@ -15,9 +15,9 @@ import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.text.FlowPage;
import org.eclipse.swt.graphics.Image;
-
/**
- * Flow Page that accept a text formatted in html, and displays it under a styled form
+ * Flow Page that accept a text formatted in html, and displays it under a
+ * styled form
*/
public class HTMLCornerBentBodyFigure extends Figure implements ILabelFigure {
@@ -30,13 +30,13 @@ public class HTMLCornerBentBodyFigure extends Figure implements ILabelFigure {
/** main flow page for this figure */
private FlowPage flowPage;
-
/**
* Creates a new HTMLCornerBentBodyFigure.
*/
public HTMLCornerBentBodyFigure() {
// flowPage = new FlowPage();
- // flowPage.setBackgroundColor(new Color(Display.getCurrent(), new RGB(100, 100, 100)));
+ // flowPage.setBackgroundColor(new Color(Display.getCurrent(), new
+ // RGB(100, 100, 100)));
// this.add(flowPage);
}
@@ -49,9 +49,9 @@ public class HTMLCornerBentBodyFigure extends Figure implements ILabelFigure {
public void setText(String text) {
this.text = text;
- // TextFlowEx textFlow1 = new TextFlowEx();
- // textFlow1.setText("textFlow1 ");
- // this.add(textFlow1);
+ // TextFlowEx textFlow1 = new TextFlowEx();
+ // textFlow1.setText("textFlow1 ");
+ // this.add(textFlow1);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/HTMLCornerBentFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/HTMLCornerBentFigure.java
index aef0c255c87..83749639b06 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/HTMLCornerBentFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/HTMLCornerBentFigure.java
@@ -37,7 +37,6 @@ import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-
/**
* Corner bend figure able to display styled text formatted in html
*/
@@ -67,7 +66,10 @@ public class HTMLCornerBentFigure extends CornerBentFigure implements ILabelFigu
/** font used for the figure */
private FontData currentFontData;
- /** set of font datas used by this comment. It will be cleaned juste after the creation of the comment */
+ /**
+ * set of font datas used by this comment. It will be cleaned juste after
+ * the creation of the comment
+ */
private Set<FontData> cachedFontDatas = new HashSet<FontData>();
/**
@@ -93,7 +95,8 @@ public class HTMLCornerBentFigure extends CornerBentFigure implements ILabelFigu
* Generates the basic contents for this figure
*/
protected void createContents() {
- // simply creates a Flow page, that will contains BlockFlows representing the html content
+ // simply creates a Flow page, that will contains BlockFlows
+ // representing the html content
page = new FlowPage();
page.setForegroundColor(getForegroundColor());
this.add(page);
@@ -155,7 +158,7 @@ public class HTMLCornerBentFigure extends CornerBentFigure implements ILabelFigu
*/
public void setText(String text) {
- // remove all children from page.
+ // remove all children from page.
page.removeAll();
// init the first font data
@@ -167,13 +170,15 @@ public class HTMLCornerBentFigure extends CornerBentFigure implements ILabelFigu
}
/**
- * Generates block list for the given text, and adds it to the root flow page
+ * Generates block list for the given text, and adds it to the root flow
+ * page
*
* @param text
* the string to display
*/
protected void generateBlockForText(String text, FlowPage page) {
- // parse the HMTL text and transforms it into a tree. "Body" tags enforce the character chain to be a valid xml chain
+ // parse the HMTL text and transforms it into a tree. "Body" tags
+ // enforce the character chain to be a valid xml chain
NodeList nodeList = generateNodeList("<body>" + text + "</body>");
// generate blocks from this list and adds it to the flow page children
@@ -334,7 +339,8 @@ public class HTMLCornerBentFigure extends CornerBentFigure implements ILabelFigu
fontData = new FontData("Monotype Corsiva", 10, style);
textFlow.setBackgroundColor(DisplayUtils.getDisplay().getSystemColor(SWT.COLOR_RED));
} else {
- // font size = [1..7] in html, but does not correspond to system size... 2 by default => 8 in real size.
+ // font size = [1..7] in html, but does not correspond to system
+ // size... 2 by default => 8 in real size.
// so: real size = (html font size)+6
fontData = new FontData(fontName, 2 * fontSize + 4, style);
}
@@ -513,7 +519,8 @@ public class HTMLCornerBentFigure extends CornerBentFigure implements ILabelFigu
protected void generateBlocksFromParagraphNode(Node node, BlockFlow parentFlow) {
BlockFlow blockFlow = new BlockFlow();
- // perhaps a style is associated to the paragraph (class="code sample" for example)
+ // perhaps a style is associated to the paragraph (class="code sample"
+ // for example)
NamedNodeMap attributes = node.getAttributes();
Node classNode = attributes.getNamedItem("class");
boolean hasToPop = false;
@@ -552,7 +559,6 @@ public class HTMLCornerBentFigure extends CornerBentFigure implements ILabelFigu
parentFlow.add(blockFlow);
}
-
/**
* Generates a list of nodes from the parse of an html text
*
@@ -564,14 +570,13 @@ public class HTMLCornerBentFigure extends CornerBentFigure implements ILabelFigu
return HTMLCommentParser.parse(text);
}
-
/**
* Valid HTML tags enumeration
*/
protected enum HTMLTags {
body(""), // main tag for the comment body
- h3(""), // section heading
+ h3(""), // section heading
h4(""), // sub section heading
h5(""), // sub sub section heading
strong(""), // bold character
@@ -580,12 +585,11 @@ public class HTMLCornerBentFigure extends CornerBentFigure implements ILabelFigu
sub(""), // subscript
sup(""), // superscript
blockquote(""), // indent left or right
- table(""), // table
+ table(""), // table
p(""), // paragraph
br(""), // new line
font(""); // specific font
-
/** additional data for this enum */
protected String data;
@@ -593,7 +597,6 @@ public class HTMLCornerBentFigure extends CornerBentFigure implements ILabelFigu
this.data = data;
}
-
/**
* Sets the data for this enum
*
@@ -604,7 +607,6 @@ public class HTMLCornerBentFigure extends CornerBentFigure implements ILabelFigu
this.data = data;
}
-
/**
* Returns the data associated to this enum
*
@@ -633,7 +635,6 @@ public class HTMLCornerBentFigure extends CornerBentFigure implements ILabelFigu
this.data = data;
}
-
/**
* sets the data associated to this enum
*
@@ -644,7 +645,6 @@ public class HTMLCornerBentFigure extends CornerBentFigure implements ILabelFigu
this.data = data;
}
-
/**
* Returns the data for this enum
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/IAbstractElementFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/IAbstractElementFigure.java
index 612d1379ea1..6bcd2511f9d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/IAbstractElementFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/IAbstractElementFigure.java
@@ -63,8 +63,8 @@ public interface IAbstractElementFigure extends IFigure {
public void setBorderColor(Color borderColor);
/**
- * in order to set the icon in the figure this method is used in the case where the stereotype
- * has got an image (icon).
+ * in order to set the icon in the figure this method is used in the case
+ * where the stereotype has got an image (icon).
*
* @param img
* the icon that we want to display
@@ -83,7 +83,8 @@ public interface IAbstractElementFigure extends IFigure {
* set the font of the figure.
*
* @param font
- * the font of the figure that we want to see. For instance, "Arial"
+ * the font of the figure that we want to see. For instance,
+ * "Arial"
*/
public void setfigureFont(String font);
@@ -133,8 +134,8 @@ public interface IAbstractElementFigure extends IFigure {
public void setFontColor(Color fontColor);
/**
- * Refresh list of stereotypes of current EditPart if required either with or without the first
- * stereotype.
+ * Refresh list of stereotypes of current EditPart if required either with
+ * or without the first stereotype.
*
* @param presentation
* type of presentation
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ILabelFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ILabelFigure.java
index ac555f1fa9e..b483ef39af5 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ILabelFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ILabelFigure.java
@@ -13,7 +13,6 @@ package org.eclipse.papyrus.diagram.common.figure.node;
import org.eclipse.swt.graphics.Image;
-
/**
* Standard interface for custom figures displaying text and icon
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/IMultilineEditableFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/IMultilineEditableFigure.java
index 70e718800a0..38a9a77a548 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/IMultilineEditableFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/IMultilineEditableFigure.java
@@ -18,8 +18,9 @@ import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.Point;
/**
- * This interface is used to indicate that this kind of figure contains a multiline field.
- * It provides method to edit and the position to edit this field.
+ * This interface is used to indicate that this kind of figure contains a
+ * multiline field. It provides method to edit and the position to edit this
+ * field.
*/
public interface IMultilineEditableFigure extends IFigure {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/IPapyrusNodeUMLElementFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/IPapyrusNodeUMLElementFigure.java
index dc48070858b..a7dce6fa3f4 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/IPapyrusNodeUMLElementFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/IPapyrusNodeUMLElementFigure.java
@@ -31,23 +31,22 @@ public interface IPapyrusNodeUMLElementFigure extends IPapyrusUMLElementFigure {
* </p>
*
* @param stereotypeProperties
- * the string representing the stereotype properties to be displayed
+ * the string representing the stereotype properties to be
+ * displayed
*/
public void setStereotypePropertiesInBrace(String stereotypeProperties);
/**
* displays the new string corresponding to the list of stereotypes.
*
- * if the string is <code>null</code>, then the figure that displays the stereotype label is
- * removed from the NodeNamedElementFigure.
+ * if the string is <code>null</code>, then the figure that displays the
+ * stereotype label is removed from the NodeNamedElementFigure.
*
* @param stereotypeProperties
* the string to be displayed.
*/
public void setStereotypePropertiesInCompartment(String stereotypeProperties);
-
-
/**
* Gets the stereotypes label.
*
@@ -55,5 +54,4 @@ public interface IPapyrusNodeUMLElementFigure extends IPapyrusUMLElementFigure {
*/
public Label getStereotypesLabel();
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ManualCompartmentLayoutManager.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ManualCompartmentLayoutManager.java
index 83b70fb5044..7fc4509164f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ManualCompartmentLayoutManager.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ManualCompartmentLayoutManager.java
@@ -146,9 +146,10 @@ public class ManualCompartmentLayoutManager extends AbstractLayout {
}
/**
- * Optimize the size of each compartment depending on the size of the compartments container,
- * and the size of each compartment. If a compartment is empty, or not expanded, then a default
- * size is applied to this compartment
+ * Optimize the size of each compartment depending on the size of the
+ * compartments container, and the size of each compartment. If a
+ * compartment is empty, or not expanded, then a default size is applied to
+ * this compartment
*
* @param compartmentsDimension
* an hashmap containing each compartment dimension.
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/NodeNamedElementFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/NodeNamedElementFigure.java
index 6967e16dc8c..ee57a28c7f8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/NodeNamedElementFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/NodeNamedElementFigure.java
@@ -33,8 +33,8 @@ import org.eclipse.papyrus.umlutils.ui.VisualInformationPapyrusConstant;
import org.eclipse.swt.graphics.Image;
/**
- * This class is top graphNode figure. It contains: 1 icone label + 1 stereotype label + 1 qualified
- * nale label + 1 name label
+ * This class is top graphNode figure. It contains: 1 icone label + 1 stereotype
+ * label + 1 qualified nale label + 1 name label
*/
public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyrusNodeNamedElementFigure, IPapyrusNodeUMLElementFigure {
@@ -117,8 +117,9 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Get the constraint for adding the name label.
- * Children should override and implement this method in case the label must be drawn with a specific constraint.
+ * Get the constraint for adding the name label. Children should override
+ * and implement this method in case the label must be drawn with a specific
+ * constraint.
*
* @return figure containing the name label
* @see #getNameLabelContainer()
@@ -129,8 +130,9 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Get the constraint for adding the icon label.
- * Children should override and implement this method in case the label must be drawn with a specific constraint.
+ * Get the constraint for adding the icon label. Children should override
+ * and implement this method in case the label must be drawn with a specific
+ * constraint.
*
* @return figure containing the icon label
* @see #getIconLabelContainer()
@@ -141,8 +143,9 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Get the constraint for adding the qualified name label.
- * Children should override and implement this method in case the label must be drawn with a specific constraint.
+ * Get the constraint for adding the qualified name label. Children should
+ * override and implement this method in case the label must be drawn with a
+ * specific constraint.
*
* @return figure containing the qualified name label
* @see #getQualifiedNameLabelContainer()
@@ -153,8 +156,9 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Get the constraint for adding the stereotype label.
- * Children should override and implement this method in case the label must be drawn with a specific constraint.
+ * Get the constraint for adding the stereotype label. Children should
+ * override and implement this method in case the label must be drawn with a
+ * specific constraint.
*
* @return figure containing the qualified name label
* @see #getStereotypeLabelContainer()
@@ -166,7 +170,8 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
/**
* Get the constraint for adding the stereotype properties in brace label.
- * Children should override and implement this method in case the label must be drawn with a specific constraint.
+ * Children should override and implement this method in case the label must
+ * be drawn with a specific constraint.
*
* @return figure containing the stereotype properties in brace label
* @see #getStereotypePropertiesInBraceLabelContainer()
@@ -178,7 +183,8 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
/**
* Get the constraint for adding the stereotype properties compartment.
- * Children should override and implement this method in case the label must be drawn with a specific constraint.
+ * Children should override and implement this method in case the label must
+ * be drawn with a specific constraint.
*
* @return figure containing the stereotype properties compartment
* @see #getStereotypePropertiesCompartmentContainer()
@@ -189,8 +195,9 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Get the constraint for adding the tag label.
- * Children should override and implement this method in case the label must be drawn with a specific constraint.
+ * Get the constraint for adding the tag label. Children should override and
+ * implement this method in case the label must be drawn with a specific
+ * constraint.
*
* @return figure containing the qualified name label
* @see #getTagLabelContainer()
@@ -201,8 +208,9 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Get the default constraint for all labels.
- * Children should override and implement this method in case the label must be drawn with a specific constraint.
+ * Get the default constraint for all labels. Children should override and
+ * implement this method in case the label must be drawn with a specific
+ * constraint.
*
* @return constraint for all labels by default
* @see #getDefaultLabelsContainer()
@@ -212,9 +220,9 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Get the container for the name label.
- * Children should override and implement this method in case the label must not be drawn in the overall figure. The returned figure shall be
- * created in the method {@link #createCompositeFigureStructure()}.
+ * Get the container for the name label. Children should override and
+ * implement this method in case the label must not be drawn in the overall
+ * figure. The returned figure shall be created in the method {@link #createCompositeFigureStructure()}.
*
* @return figure containing the name label
* @see #getDefaultLabelsContainer()
@@ -224,9 +232,9 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Get the container for the icon label.
- * Children should override and implement this method in case the label must not be drawn in the overall figure. The returned figure shall be
- * created in the method {@link #createCompositeFigureStructure()}.
+ * Get the container for the icon label. Children should override and
+ * implement this method in case the label must not be drawn in the overall
+ * figure. The returned figure shall be created in the method {@link #createCompositeFigureStructure()}.
*
* @return figure containing the icon label
* @see #getDefaultLabelsContainer()
@@ -236,9 +244,9 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Get the container for the qualified name label.
- * Children should override and implement this method in case the label must not be drawn in the overall figure. The returned figure shall be
- * created in the method {@link #createCompositeFigureStructure()}.
+ * Get the container for the qualified name label. Children should override
+ * and implement this method in case the label must not be drawn in the
+ * overall figure. The returned figure shall be created in the method {@link #createCompositeFigureStructure()}.
*
* @return figure containing the qualified name label
* @see #getDefaultLabelsContainer()
@@ -248,9 +256,9 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Get the container for the stereotype label.
- * Children should override and implement this method in case the label must not be drawn in the overall figure. The returned figure shall be
- * created in the method {@link #createCompositeFigureStructure()}.
+ * Get the container for the stereotype label. Children should override and
+ * implement this method in case the label must not be drawn in the overall
+ * figure. The returned figure shall be created in the method {@link #createCompositeFigureStructure()}.
*
* @return figure containing the qualified name label
* @see #getDefaultLabelsContainer()
@@ -260,9 +268,10 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Get the container for the stereotype properties in brace label.
- * Children should override and implement this method in case the label must not be drawn in the overall figure. The returned figure shall be
- * created in the method {@link #createCompositeFigureStructure()}.
+ * Get the container for the stereotype properties in brace label. Children
+ * should override and implement this method in case the label must not be
+ * drawn in the overall figure. The returned figure shall be created in the
+ * method {@link #createCompositeFigureStructure()}.
*
* @return figure containing the stereotype properties in brace label
* @see #getDefaultLabelsContainer()
@@ -272,9 +281,10 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Get the container for the stereotype properties compartment.
- * Children should override and implement this method in case the compartment must not be drawn in the overall figure. The returned figure shall
- * be created in the method {@link #createCompositeFigureStructure()}.
+ * Get the container for the stereotype properties compartment. Children
+ * should override and implement this method in case the compartment must
+ * not be drawn in the overall figure. The returned figure shall be created
+ * in the method {@link #createCompositeFigureStructure()}.
*
* @return figure containing the stereotype properties compartment
* @see #getDefaultLabelsContainer()
@@ -284,9 +294,9 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Get the container for the tag label.
- * Children should override and implement this method in case the label must not be drawn in the overall figure. The returned figure shall be
- * created in the method {@link #createCompositeFigureStructure()}.
+ * Get the container for the tag label. Children should override and
+ * implement this method in case the label must not be drawn in the overall
+ * figure. The returned figure shall be created in the method {@link #createCompositeFigureStructure()}.
*
* @return figure containing the qualified name label
* @see #getDefaultLabelsContainer()
@@ -296,9 +306,9 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Get the default container for all labels.
- * Children should override and implement this method in case the label must not be drawn in the overall figure. The returned figure shall be
- * created in the method {@link #createCompositeFigureStructure()}.
+ * Get the default container for all labels. Children should override and
+ * implement this method in case the label must not be drawn in the overall
+ * figure. The returned figure shall be created in the method {@link #createCompositeFigureStructure()}.
*
* @return figure containing labels by default
*/
@@ -387,8 +397,8 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Get layout to display content of properties compartment.
- * Children may override this method.
+ * Get layout to display content of properties compartment. Children may
+ * override this method.
*
* @return the layout
*/
@@ -441,7 +451,8 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Create the tag label in the figure. The tag label is created if value is not null.
+ * Create the tag label in the figure. The tag label is created if value is
+ * not null.
*
* @param value
* the value to use
@@ -518,8 +529,7 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
* Calculate the partial qualified name with a specified depth.
*
* @param qualifiedName
- * the qualified name
- * can return null
+ * the qualified name can return null
*/
public String getQualifiedName(String qualifiedName, int depth) {
int n = -1;
@@ -580,8 +590,8 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
/**
- * Returns the position of the stereotype properties location. this is just after stereotype
- * position
+ * Returns the position of the stereotype properties location. this is just
+ * after stereotype position
*
* @return the position of the stereotype properties in brace label
*/
@@ -855,7 +865,8 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
* </p>
*
* @param stereotypeProperties
- * the string representing the stereotype properties to be displayed
+ * the string representing the stereotype properties to be
+ * displayed
*/
public void setStereotypePropertiesInBrace(String stereotypeProperties) {
if(stereotypeProperties == null) {
@@ -883,8 +894,8 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
/**
* displays the new string corresponding to the list of stereotypes.
*
- * if the string is <code>null</code>, then the figure that displays the stereotype label is
- * removed from the NodeNamedElementFigure.
+ * if the string is <code>null</code>, then the figure that displays the
+ * stereotype label is removed from the NodeNamedElementFigure.
*
* @param stereotypeProperties
* the string to be displayed.
@@ -986,7 +997,8 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
return;
}
- // Set the stereotype label with position parameter if it does not already exist
+ // Set the stereotype label with position parameter if it does not
+ // already exist
if(this.iconLabel == null) {
this.createIconLabel(position);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/OLDCompartmentFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/OLDCompartmentFigure.java
index 7c59be48fb0..ddf510eff5e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/OLDCompartmentFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/OLDCompartmentFigure.java
@@ -207,8 +207,9 @@ public class OLDCompartmentFigure extends NodeNamedElementFigure {
}
/**
- * Calculate the location of the compartment. It depends on its previous compartment
- * location and size if it has any. Otherwise it is the location of the contentPane
+ * Calculate the location of the compartment. It depends on its previous
+ * compartment location and size if it has any. Otherwise it is the
+ * location of the contentPane
*
* @param index
* the index of the compartment in the containerFigures list
@@ -227,9 +228,10 @@ public class OLDCompartmentFigure extends NodeNamedElementFigure {
}
/**
- * Optimize the size of each compartment depending on the size of the compartments
- * container, and the size of each compartment. If a compartment is empty, or not expanded,
- * then a default size is applied to this compartment
+ * Optimize the size of each compartment depending on the size of the
+ * compartments container, and the size of each compartment. If a
+ * compartment is empty, or not expanded, then a default size is applied
+ * to this compartment
*
* @param compartmentsDimension
* an hashmap containing each compartment dimension.
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PackageFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PackageFigure.java
index 829a215c823..d32962630da 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PackageFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PackageFigure.java
@@ -50,7 +50,6 @@ public class PackageFigure extends NodeNamedElementFigure {
*/
private class PackageLayoutManager extends AbstractLayout {
-
/**
*
* {@inheritDoc}
@@ -127,12 +126,11 @@ public class PackageFigure extends NodeNamedElementFigure {
setBorder(null);
getPackageableElementFigure().setFill(false);
-
-
}
/**
- * this method is used to display a symabol image for an element package as triangle for the model
+ * this method is used to display a symabol image for an element package as
+ * triangle for the model
*
* @param image
*/
@@ -162,7 +160,8 @@ public class PackageFigure extends NodeNamedElementFigure {
/**
* use to obtain the coordinates of the package header
*
- * @return coordinate of the package header, maybe null if the figure has never be painted.
+ * @return coordinate of the package header, maybe null if the figure has
+ * never be painted.
*/
public Rectangle getHeader() {
// the index of the shape container
@@ -209,7 +208,6 @@ public class PackageFigure extends NodeNamedElementFigure {
super.paintBorder(graphics);
}
-
/**
*
* {@inheritDoc}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PackageNodePlateFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PackageNodePlateFigure.java
index a662990b3cd..a63329d8356 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PackageNodePlateFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PackageNodePlateFigure.java
@@ -19,7 +19,8 @@ import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
/**
- * this figure is used to display at the good positionn acnhor on the packageable element
+ * this figure is used to display at the good positionn acnhor on the
+ * packageable element
*
* @author PT202707
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusNodeFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusNodeFigure.java
index edb4b98baa9..8ecf782a498 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusNodeFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusNodeFigure.java
@@ -26,7 +26,8 @@ import org.eclipse.gmf.runtime.notation.GradientStyle;
import org.eclipse.swt.graphics.Color;
/**
- * Common node figure. In charge of background, font, gradient, foreground, border, shadow
+ * Common node figure. In charge of background, font, gradient, foreground,
+ * border, shadow
*/
public class PapyrusNodeFigure extends NodeFigure implements IPapyrusNodeFigure {
@@ -71,17 +72,18 @@ public class PapyrusNodeFigure extends NodeFigure implements IPapyrusNodeFigure
}
/**
- * Create the composite structure of this figure, by adding it its necessary children.
- * Children should override and implement this method in case they have a composite figure, to add children forming the overall structure.
+ * Create the composite structure of this figure, by adding it its necessary
+ * children. Children should override and implement this method in case they
+ * have a composite figure, to add children forming the overall structure.
*/
protected void createCompositeFigureStructure() {
// By default, do nothing : the figure is not composite
}
/**
- * Get the figure on which the border must be drawn.
- * Children should override and implement this method in case the border must not be drawn on the overall figure. The returned figure shall be
- * created in the method {@link #createCompositeFigureStructure()}.
+ * Get the figure on which the border must be drawn. Children should
+ * override and implement this method in case the border must not be drawn
+ * on the overall figure. The returned figure shall be created in the method {@link #createCompositeFigureStructure()}.
*
* @return the figure to draw the border on
* @see #createCompositeFigureStructure()
@@ -92,11 +94,12 @@ public class PapyrusNodeFigure extends NodeFigure implements IPapyrusNodeFigure
}
/**
- * Sets the border to the bordered figure.
- * This method is not intended to be overridden. Override {@link #getBorderedFigure()} instead.
+ * Sets the border to the bordered figure. This method is not intended to be
+ * overridden. Override {@link #getBorderedFigure()} instead.
*
* @param borderedFigure
- * the figure on which the border shall be drawn (or null for this figure)
+ * the figure on which the border shall be drawn (or null for
+ * this figure)
* @param border
* The new border
* @see IFigure#setBorder(Border)
@@ -134,8 +137,9 @@ public class PapyrusNodeFigure extends NodeFigure implements IPapyrusNodeFigure
}
/**
- * Get the default non shadow border to use.
- * Children can override and implement this method if necessary, taking care not to fail if borderColor is null
+ * Get the default non shadow border to use. Children can override and
+ * implement this method if necessary, taking care not to fail if
+ * borderColor is null
*
* @param borderColor
* the color of the border to take if possible or null
@@ -184,8 +188,9 @@ public class PapyrusNodeFigure extends NodeFigure implements IPapyrusNodeFigure
}
/**
- * Paint the background of the figure. If this figure uses gradient, then it will paint the
- * background with the gradient informations. Otherwise it will use the background color.
+ * Paint the background of the figure. If this figure uses gradient, then it
+ * will paint the background with the gradient informations. Otherwise it
+ * will use the background color.
*
* @param graphics
* the graphics
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusReceiveNodeFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusReceiveNodeFigure.java
index d7e17e8dc82..7d21ffa8af9 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusReceiveNodeFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusReceiveNodeFigure.java
@@ -23,8 +23,8 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.RoundedRectangleBorder;
import org.eclipse.gmf.runtime.notation.GradientStyle;
import org.eclipse.swt.graphics.Color;
/**
- * this class is used to display a rounded rectangle
- * with gradient and intherits from the hierarchy of papyrus nodes
+ * this class is used to display a rounded rectangle with gradient and intherits
+ * from the hierarchy of papyrus nodes
*
*/
@@ -37,7 +37,6 @@ public class PapyrusReceiveNodeFigure extends NodeNamedElementFigure {
setBorder(this.shadowborder);
}
public int corner=15;
-
@Override
protected Border getDefaultBorder(Color borderColor) {
@@ -82,7 +81,6 @@ public class PapyrusReceiveNodeFigure extends NodeNamedElementFigure {
graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1()));
graphics.fillRoundRectangle(rect2,corner,corner);
-
graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1()));
graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2()));
Rectangle rect= new Rectangle(rectangle.x,rectangle.y+corner/2,rectangle.width,rectangle.height-corner);
@@ -96,7 +94,6 @@ public class PapyrusReceiveNodeFigure extends NodeNamedElementFigure {
graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1()));
graphics.fillRoundRectangle(rect2,corner,corner);
-
graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1()));
graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2()));
Rectangle rect= new Rectangle(rectangle.x+corner/2, rectangle.y,rectangle.width-corner,rectangle.height);
@@ -115,8 +112,4 @@ public class PapyrusReceiveNodeFigure extends NodeNamedElementFigure {
}
}
-
-
-
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusRoundedNodeFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusRoundedNodeFigure.java
index fe70bb91363..619d7195553 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusRoundedNodeFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusRoundedNodeFigure.java
@@ -23,8 +23,8 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.RoundedRectangleBorder;
import org.eclipse.gmf.runtime.notation.GradientStyle;
import org.eclipse.swt.graphics.Color;
/**
- * this class is used to display a rounded rectangle
- * with gradient and intherits from the hierarchy of papyrus nodes
+ * this class is used to display a rounded rectangle with gradient and intherits
+ * from the hierarchy of papyrus nodes
*
*/
@@ -37,7 +37,6 @@ public class PapyrusRoundedNodeFigure extends NodeNamedElementFigure {
setBorder(this.shadowborder);
}
public int corner=15;
-
@Override
protected Border getDefaultBorder(Color borderColor) {
@@ -82,7 +81,6 @@ public class PapyrusRoundedNodeFigure extends NodeNamedElementFigure {
graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1()));
graphics.fillRoundRectangle(rect2,corner,corner);
-
graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1()));
graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2()));
Rectangle rect= new Rectangle(rectangle.x,rectangle.y+corner/2,rectangle.width,rectangle.height-corner);
@@ -96,7 +94,6 @@ public class PapyrusRoundedNodeFigure extends NodeNamedElementFigure {
graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1()));
graphics.fillRoundRectangle(rect2,corner,corner);
-
graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1()));
graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2()));
Rectangle rect= new Rectangle(rectangle.x+corner/2, rectangle.y,rectangle.width-corner,rectangle.height);
@@ -115,8 +112,4 @@ public class PapyrusRoundedNodeFigure extends NodeNamedElementFigure {
}
}
-
-
-
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusSendNodeFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusSendNodeFigure.java
index a058024f5f7..e70bcb7efa7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusSendNodeFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusSendNodeFigure.java
@@ -24,7 +24,8 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.RoundedRectangleBorder;
import org.eclipse.gmf.runtime.notation.GradientStyle;
import org.eclipse.swt.graphics.Color;
/**
- * this class is used to display a sendNodeFigure, the gradient can be only horizontal
+ * this class is used to display a sendNodeFigure, the gradient can be only
+ * horizontal
*
*/
@@ -37,7 +38,6 @@ public class PapyrusSendNodeFigure extends NodeNamedElementFigure {
setBorder(this.shadowborder);
}
public int widthArrow=15;
-
@Override
protected Border getDefaultBorder(Color borderColor) {
@@ -96,8 +96,4 @@ public class PapyrusSendNodeFigure extends NodeNamedElementFigure {
}
}
-
-
-
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusSendNodeShadowBorder.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusSendNodeShadowBorder.java
index 18f0d50a2ae..47bff5f789c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusSendNodeShadowBorder.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusSendNodeShadowBorder.java
@@ -22,15 +22,14 @@ import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
-
public class PapyrusSendNodeShadowBorder extends RectangularShadowBorder {
/** the width of the widthArrow */
protected int widthArrow;
-
/**
- * Creates an instance of this class with the given arc width and arc height in pixels
+ * Creates an instance of this class with the given arc width and arc height
+ * in pixels
*
* @param borderwidth
* the width of the border line
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PrimitiveTypeFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PrimitiveTypeFigure.java
index 4bfb25c5f2e..d08fb2c2070 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PrimitiveTypeFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PrimitiveTypeFigure.java
@@ -74,7 +74,8 @@ public class PrimitiveTypeFigure extends NodeNamedElementFigure {
/*
* (non-Javadoc)
*
- * @see com.cea.papyrus.core.common.figures.NodeFigure#getIconLabelPosition()
+ * @see
+ * com.cea.papyrus.core.common.figures.NodeFigure#getIconLabelPosition()
*/
/**
*
@@ -100,7 +101,8 @@ public class PrimitiveTypeFigure extends NodeNamedElementFigure {
}
/**
- * Helper method to draw separate line between name and stereotypes properties displays
+ * Helper method to draw separate line between name and stereotypes
+ * properties displays
*
* @param graphics
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ProfileFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ProfileFigure.java
index 3db2de9e558..bb55352699b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ProfileFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ProfileFigure.java
@@ -13,7 +13,6 @@
*****************************************************************************/
package org.eclipse.papyrus.diagram.common.figure.node;
-
public class ProfileFigure extends PackageFigure {
protected static final String PROFILE_TAG = "Profile"; //$NON-NLS-1$
@@ -26,5 +25,4 @@ public class ProfileFigure extends PackageFigure {
initTagLabel(PROFILE_TAG);
}
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/Rectangular3DBorder.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/Rectangular3DBorder.java
index 5cad94fb7b8..7b7051832bf 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/Rectangular3DBorder.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/Rectangular3DBorder.java
@@ -87,7 +87,6 @@ public class Rectangular3DBorder extends LineBorder {
else
graphics.setForegroundColor(ColorConstants.black);
-
graphics.drawRectangle(tempRect);
// draw the shadow
@@ -107,14 +106,11 @@ public class Rectangular3DBorder extends LineBorder {
plt.addPoint(tempRect.x, tempRect.y + tempRect.height);
plt.addPoint(tempRect.x + tempRect.width, tempRect.y + tempRect.height);
-
-
if(getColor() != null)
graphics.setBackgroundColor(getColor());
else
graphics.setBackgroundColor(ColorConstants.gray);
-
graphics.fillPolygon(plt);
graphics.popState();
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/RoundedRectangleDashedShadowBorder.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/RoundedRectangleDashedShadowBorder.java
index 611e97016f6..081b1e7b55f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/RoundedRectangleDashedShadowBorder.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/RoundedRectangleDashedShadowBorder.java
@@ -9,7 +9,6 @@ import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
-
public class RoundedRectangleDashedShadowBorder extends RectangularShadowBorder {
/** the width of the rounded corner */
@@ -19,7 +18,8 @@ public class RoundedRectangleDashedShadowBorder extends RectangularShadowBorder
protected int cornerHeight;
/**
- * Creates an instance of this class with the given arc width and arc height in pixels
+ * Creates an instance of this class with the given arc width and arc height
+ * in pixels
*
* @param borderwidth
* the width of the border line
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ShapeNamedElementFigure.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ShapeNamedElementFigure.java
index 32b25b730e7..4ff81aac3a7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ShapeNamedElementFigure.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/ShapeNamedElementFigure.java
@@ -19,10 +19,8 @@ import org.eclipse.papyrus.diagram.common.figure.layout.PropertiesCompartmentLay
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
-
public class ShapeNamedElementFigure extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure {
-
public class ShapeLayoutManager extends AbstractLayout {
/**
@@ -35,7 +33,6 @@ public class ShapeNamedElementFigure extends PapyrusNodeFigure implements IPapyr
int minimumWith = 50;
int minimumHeight = 50;
-
return new Dimension(minimumWith, minimumHeight);
}
@@ -77,7 +74,8 @@ public class ShapeNamedElementFigure extends PapyrusNodeFigure implements IPapyr
Activator.getDefault().getImageRegistry().put(key, ImageDescriptor.createFromImageData(imdata));
imm = Activator.getDefault().getImageRegistry().get(key);
}
- // there is an image but we would like replace it by our new image
+ // there is an image but we would like replace it by our new
+ // image
else {
// imm.dispose();
Activator.getDefault().getImageRegistry().remove(key);
@@ -94,7 +92,6 @@ public class ShapeNamedElementFigure extends PapyrusNodeFigure implements IPapyr
label.setIcon(adaptedImage);
}
-
}
}
@@ -113,7 +110,6 @@ public class ShapeNamedElementFigure extends PapyrusNodeFigure implements IPapyr
*/
private RectangleFigure stereotypePropertiesContent;
-
/**
* Added for stereptypes properties
*/
@@ -134,27 +130,25 @@ public class ShapeNamedElementFigure extends PapyrusNodeFigure implements IPapyr
*/
protected int numerNode;
-
/**
* create an icon figure.
*
* @param numberNode
- * is used to spcify a unique identfier tha t is associated to the image thanks to
- * the graphNode.hashCode()
+ * is used to spcify a unique identfier tha t is associated to
+ * the image thanks to the graphNode.hashCode()
* @param image
* the image (GIF) that we want to see
*/
public ShapeNamedElementFigure(Image image) {
super();
-
this.originalimage = image;
label = new Label("");
label.setIconAlignment(PositionConstants.CENTER);
label.setTextAlignment(PositionConstants.CENTER);
label.setIconTextGap(2);
this.add(label);
- //the image can be null, if we display a SVG file
+ // the image can be null, if we display a SVG file
if(image != null) {
label.setIcon(image);
}
@@ -180,7 +174,6 @@ public class ShapeNamedElementFigure extends PapyrusNodeFigure implements IPapyr
this.add(scalableImageFigure);
}
-
/**
* display icon from an image
*
@@ -196,7 +189,7 @@ public class ShapeNamedElementFigure extends PapyrusNodeFigure implements IPapyr
}
public void setStereotypeDisplay(String stereotypes, Image image) {
- //do nothing
+ // do nothing
}
@@ -290,5 +283,4 @@ public class ShapeNamedElementFigure extends PapyrusNodeFigure implements IPapyr
this.add(stereotypePropertiesBrace, getStereotypePropertiesCompartmentPosition());
}
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/StereotypePropertiesCompartment.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/StereotypePropertiesCompartment.java
index e520acf84f0..7b04bec1b58 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/StereotypePropertiesCompartment.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/StereotypePropertiesCompartment.java
@@ -46,7 +46,7 @@ public class StereotypePropertiesCompartment extends RectangleFigure {
} else {
target = new Point(parentFigure.getBounds().x + parentFigure.getBounds().width, ((IFigure)getChildren().get(i)).getBounds().getTopRight().y);
}
- //graphics.setForegroundColor(ColorConstants.black);
+ // graphics.setForegroundColor(ColorConstants.black);
graphics.setLineWidth(1);
graphics.drawLine(source, target);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/SubCompartmentLayoutManager.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/SubCompartmentLayoutManager.java
index 4eac8da9129..ae096384651 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/SubCompartmentLayoutManager.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/SubCompartmentLayoutManager.java
@@ -31,7 +31,6 @@ public class SubCompartmentLayoutManager extends AbstractLayout {
protected int preferedHeight = MINIMUMCOMPARTMENTSIZE;
-
@Override
protected Dimension calculatePreferredSize(IFigure figure, int wHint, int hHint) {
Dimension dim = new Dimension(10, preferedHeight);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/DeleteFromDiagramCommandHandler.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/DeleteFromDiagramCommandHandler.java
index 4b1e37bdb80..406ed4700a6 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/DeleteFromDiagramCommandHandler.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/DeleteFromDiagramCommandHandler.java
@@ -92,8 +92,10 @@ public class DeleteFromDiagramCommandHandler extends GraphicalCommandHandler imp
View view = (View)child.getAdapter(View.class);
if(view == null || view.getElement() == null || view.getElement() instanceof View) {
- // If there is no element or the element is a view (e.g. diagram
- // link) than we want to support delete from diagram. See bugzilla#148453.
+ // If there is no element or the element is a view (e.g.
+ // diagram
+ // link) than we want to support delete from diagram. See
+ // bugzilla#148453.
isCanonical = false;
continue;
}
@@ -115,7 +117,7 @@ public class DeleteFromDiagramCommandHandler extends GraphicalCommandHandler imp
protected boolean isCanonical(EditPart ep) {
EObject eObject = (EObject)ep.getAdapter(EObject.class);
EditPart parent = ep.getParent();
- if(eObject != null && parent != null) { //sanity checks
+ if(eObject != null && parent != null) { // sanity checks
CanonicalEditPolicy cep = (CanonicalEditPolicy)parent.getEditPolicy(EditPolicyRoles.CANONICAL_ROLE);
return cep != null && cep.isEnabled() && cep.canCreate(eObject);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/DeleteFromModelCommandHandler.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/DeleteFromModelCommandHandler.java
index a9ee3123e8f..dcf31ef2b58 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/DeleteFromModelCommandHandler.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/DeleteFromModelCommandHandler.java
@@ -41,7 +41,8 @@ public class DeleteFromModelCommandHandler extends GraphicalCommandHandler imple
return UnexecutableCommand.INSTANCE;
}
- // Iterate over selection and retrieve the deletion command from each edit part
+ // Iterate over selection and retrieve the deletion command from each
+ // edit part
// Add each returned command to the composite command
CompositeTransactionalCommand command = new CompositeTransactionalCommand(getEditingDomain(), "Delete From Model");
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/GraphicalCommandHandler.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/GraphicalCommandHandler.java
index 4b681d57707..bd20e9fb733 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/GraphicalCommandHandler.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/GraphicalCommandHandler.java
@@ -32,10 +32,9 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
/**
- * This abstract command handler:
- * - calculates the current selection
- * - calculates the visibility and enablement based on command executability
- * - executes the command in Papyrus command stack
+ * This abstract command handler: - calculates the current selection -
+ * calculates the visibility and enablement based on command executability -
+ * executes the command in Papyrus command stack
*
*/
public abstract class GraphicalCommandHandler extends AbstractHandler {
@@ -43,8 +42,7 @@ public abstract class GraphicalCommandHandler extends AbstractHandler {
protected abstract Command getCommand() throws ExecutionException;
/**
- * Iterate over current selection and build a list of the {@link IGraphicalEditPart} contained in
- * the selection.
+ * Iterate over current selection and build a list of the {@link IGraphicalEditPart} contained in the selection.
*
* @return the currently selected {@link IGraphicalEditPart}
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/LoadHandler.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/LoadHandler.java
index 5a470288aef..fb98d40cff3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/LoadHandler.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/LoadHandler.java
@@ -33,12 +33,11 @@ import org.eclipse.papyrus.core.resourceloading.util.LoadingUtils;
import org.eclipse.papyrus.resource.ModelSet;
/**
- * Handler for the load resource action.
- * This actions load a resource in the model set, which is not yet loaded (due to resource loading strategy).
+ * Handler for the load resource action. This actions load a resource in the
+ * model set, which is not yet loaded (due to resource loading strategy).
*/
public class LoadHandler extends GraphicalCommandHandler {
-
/**
* Get the command to load resource of selected model object
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/ParametricAndListeningHandler.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/ParametricAndListeningHandler.java
index 5629650181d..a8d9cc0135d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/ParametricAndListeningHandler.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/ParametricAndListeningHandler.java
@@ -32,11 +32,10 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
/**
- * This abstract command handler:
- * - calculates the current selection
- * - calculates the visibility and enablement based on command executability
- * - executes the command in Papyrus command stack
- * - listen the SelectionService (usefull when the action is inside a Menu (like Diagram)
+ * This abstract command handler: - calculates the current selection -
+ * calculates the visibility and enablement based on command executability -
+ * executes the command in Papyrus command stack - listen the SelectionService
+ * (usefull when the action is inside a Menu (like Diagram)
*/
public abstract class ParametricAndListeningHandler extends GraphicalCommandHandler implements IExecutableExtension {
@@ -79,8 +78,7 @@ public abstract class ParametricAndListeningHandler extends GraphicalCommandHand
*
* @see org.eclipse.papyrus.diagram.common.handlers.GraphicalCommandHandler#getCommand()
*
- * @return
- * {@link UnexecutableCommand}
+ * @return {@link UnexecutableCommand}
* @throws ExecutionException
*/
@Override
@@ -90,11 +88,13 @@ public abstract class ParametricAndListeningHandler extends GraphicalCommandHand
}
/***
- * Add a listener on the selection, in order to refresh the status of the action when the selection changes
+ * Add a listener on the selection, in order to refresh the status of the
+ * action when the selection changes
*/
protected void addSelectionListener() {
- //when we are in the Menu, we need to refresh
- if(serv == null) {//should be always!=null after the first call to getCommand()
+ // when we are in the Menu, we need to refresh
+ if(serv == null) {// should be always!=null after the first call to
+ // getCommand()
IWorkbench workbench = PlatformUI.getWorkbench();
if(workbench != null) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/PasteWithModelHandler.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/PasteWithModelHandler.java
index 8241bff5fc3..338302c63dc 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/PasteWithModelHandler.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/PasteWithModelHandler.java
@@ -43,7 +43,7 @@ public class PasteWithModelHandler extends AbstractHandler {
if(((IStructuredSelection)selection).getFirstElement() instanceof GraphicalEditPart) {
GraphicalEditPart targetEditPart = (GraphicalEditPart)((IStructuredSelection)selection).getFirstElement();
if(targetEditPart != null) {
- //get the paste command with model form the service
+ // get the paste command with model form the service
ICommand pastecommand = PasteCommandService.getInstance().getPasteWithModelCommand(targetEditPart, Toolkit.getDefaultToolkit().getSystemClipboard(), targetEditPart.getEditingDomain().getClipboard());
if(pastecommand.canExecute()) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/RenamedElementHandler.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/RenamedElementHandler.java
index 31e8ab342b1..fb27b611467 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/RenamedElementHandler.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/RenamedElementHandler.java
@@ -30,10 +30,9 @@ import org.eclipse.papyrus.diagram.common.util.DiagramEditPartsUtil;
import org.eclipse.ui.PlatformUI;
/**
- * This handler allows to rename element in the Diagram.
- * It works with the org.eclipse.ui.edit.rename command.
- * It is created to replace the initial keybinding done by GMF.
- * see bug 317424
+ * This handler allows to rename element in the Diagram. It works with the
+ * org.eclipse.ui.edit.rename command. It is created to replace the initial
+ * keybinding done by GMF. see bug 317424
*
*/
public class RenamedElementHandler extends AbstractHandler {
@@ -64,16 +63,14 @@ public class RenamedElementHandler extends AbstractHandler {
if(selection.size() == 1) {
IGraphicalEditPart editpart = selection.get(0);
DiagramEditPart diagramEP = DiagramEditPartsUtil.getDiagramEditPart(editpart);
- //we don't rename the diagram
+ // we don't rename the diagram
return editpart != diagramEP;
}
return false;
}
-
/**
- * Iterate over current selection and build a list of the {@link IGraphicalEditPart} contained in
- * the selection.
+ * Iterate over current selection and build a list of the {@link IGraphicalEditPart} contained in the selection.
*
* @return the currently selected {@link IGraphicalEditPart}
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/UnloadHandler.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/UnloadHandler.java
index a90c02e7f86..78102e9c2bd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/UnloadHandler.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/handlers/UnloadHandler.java
@@ -35,12 +35,11 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
/**
- * Handler for the load resource action.
- * This actions load a resource in the model set, which is not yet loaded (due to resource loading strategy).
+ * Handler for the load resource action. This actions load a resource in the
+ * model set, which is not yet loaded (due to resource loading strategy).
*/
public class UnloadHandler extends GraphicalCommandHandler {
-
/**
* @see org.eclipse.papyrus.modelexplorer.handler.AbstractCommandHandler#getCommand()
* @return the command
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/AbstractHyperLinkHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/AbstractHyperLinkHelper.java
index 843e8fc49a8..cdf55b03cd3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/AbstractHyperLinkHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/AbstractHyperLinkHelper.java
@@ -24,7 +24,6 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.papyrus.diagram.common.ui.hyperlinkshell.HyperlinkObject;
import org.eclipse.uml2.uml.Package;
-
/**
* this class is an abstract use to serialize and deserialize a HyperLink Object
*
@@ -37,22 +36,29 @@ public abstract class AbstractHyperLinkHelper {
*/
public abstract String getNameofManagedHyperLink();
/**
- * this method is called in order to create an hyperlinkObject and add into a given hyperlinkObject list
+ * this method is called in order to create an hyperlinkObject and add into
+ * a given hyperlinkObject list
* @param list a list of hyperlink Object
* @param amodel the root model
*/
public abstract void executeNewMousePressed(List<HyperlinkObject> list, org.eclipse.uml2.uml.Package amodel);
/**
- *this method is called in order to edit an hyperlinkObject and add into a given hyperlinkObject list
- * @param list a list of hyperlink Object
- * @param amodel the root model
- * @param hyperlinkObject the hyperlinkObject to edit
+ * this method is called in order to edit an hyperlinkObject and add into a
+ * given hyperlinkObject list
+ *
+ * @param list
+ * a list of hyperlink Object
+ * @param amodel
+ * the root model
+ * @param hyperlinkObject
+ * the hyperlinkObject to edit
*/
public void executeEditMousePressed(List<HyperlinkObject> list, HyperlinkObject hyperlinkObject,Package amodel){
hyperlinkObject.executeEditMousePressed(list, amodel);
}
/**
- * this method is called when the element is selected an clicked in order to open a diagram in the case of hyperlink diagram
+ * this method is called when the element is selected an clicked in order to
+ * open a diagram in the case of hyperlink diagram
* @param hyperlinkObject the hyperlink object that is selected
*/
public void executeSelectPressed(HyperlinkObject hyperlinkObject){
@@ -60,8 +66,8 @@ public abstract class AbstractHyperLinkHelper {
}
/**
- * from a list of hyperlinks, it return a list of hyperlink with the same kind.
- * for example return a list of diagramhyperlink
+ * from a list of hyperlinks, it return a list of hyperlink with the same
+ * kind. for example return a list of diagramhyperlink
* @param hyperlinkObjects the list of hyperlinkobjects
* @return a list of hyperlink object with the same kind
*/
@@ -72,9 +78,8 @@ public abstract class AbstractHyperLinkHelper {
* @param eAnnotation that represents a hyperlink object
* @return the hyperlink object from the eannotation
*/
- public abstract HyperlinkObject getHyperLinkObject(EAnnotation eAnnotation);
-
-
+ public abstract HyperlinkObject getHyperLinkObject(EAnnotation eAnnotation);
+
/**
* get a command to serailize a hyperlink object
* @param domain the editing domain
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/AlignmentLinkHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/AlignmentLinkHelper.java
index 05fd41b3797..bdb2d0331d0 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/AlignmentLinkHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/AlignmentLinkHelper.java
@@ -27,8 +27,9 @@ import org.eclipse.papyrus.diagram.common.layout.EditPartRepresentation;
import org.eclipse.papyrus.diagram.common.layout.SameAlignment;
/**
- * This class provides a custom method to do an align action using links and not nodes.
- * This action moves node to set the selected link vertically or horizontally. The anchor connection don't move on the node.
+ * This class provides a custom method to do an align action using links and not
+ * nodes. This action moves node to set the selected link vertically or
+ * horizontally. The anchor connection don't move on the node.
*
*/
public class AlignmentLinkHelper {
@@ -59,8 +60,7 @@ public class AlignmentLinkHelper {
/**
* Returns the command for this link representation
*
- * @return
- * <ul>
+ * @return <ul>
* <li>the command for this link representation</li>
* <li> {@linkplain UnexecutableCommand#INSTANCE} if the alignment is {@linkplain PositionConstants#MIDDLE} or
* {@linkplain PositionConstants#CENTER}</li>
@@ -77,12 +77,10 @@ public class AlignmentLinkHelper {
return getCommand();
}
-
/**
* Tests if a parent and one of these children are selected
*
- * @return
- * <ul>
+ * @return <ul>
* <li>{@code true}</li>if a parent and one of these children are selected
* <li>{@code false}</li>if not
* </ul>
@@ -90,14 +88,14 @@ public class AlignmentLinkHelper {
*/
protected boolean isAncestorSelected() {
List<EditPart> nodesEditPart = new ArrayList<EditPart>();
- //get all the sources and target for the selected links
+ // get all the sources and target for the selected links
for(Object currentEP : linkEditparts) {
EditPart source = ((AbstractConnectionEditPart)currentEP).getSource();
EditPart target = ((AbstractConnectionEditPart)currentEP).getTarget();
nodesEditPart.add(source);
nodesEditPart.add(target);
}
- //test if a selected editpart is included another selected editpart
+ // test if a selected editpart is included another selected editpart
for(EditPart ep : nodesEditPart) {
if(ToolUtilities.isAncestorContainedIn(nodesEditPart, ep)) {
return true;
@@ -109,8 +107,7 @@ public class AlignmentLinkHelper {
/**
* Builds and returns the command for this link representation
*
- * @return
- * the command for this link representation
+ * @return the command for this link representation
*/
protected Command getCommand() {
CompoundCommand cmd = new CompoundCommand("Command for alignment by links"); //$NON-NLS-1$
@@ -126,12 +123,12 @@ public class AlignmentLinkHelper {
}
/**
- * This function organizes the selection following the links :
- * all selected links which share nodes are owned by the same {@linkplain SameAlignment}.
+ * This function organizes the selection following the links : all selected
+ * links which share nodes are owned by the same {@linkplain SameAlignment}.
*/
protected void organizeSelection() {
for(Object currentEP : this.linkEditparts) {
- //get the editPart source and target for the link
+ // get the editPart source and target for the link
EditPart source = ((AbstractConnectionEditPart)currentEP).getSource();
EditPart target = ((AbstractConnectionEditPart)currentEP).getTarget();
@@ -140,7 +137,7 @@ public class AlignmentLinkHelper {
EditPartRepresentation sourceRep = null;
EditPartRepresentation targetRep = null;
- //we look for a representation of these source and target
+ // we look for a representation of these source and target
for(SameAlignment family : families) {
if(family.getEditPartRepresentationFor(source) != null) {
sourceRep = family.getEditPartRepresentationFor(source);
@@ -157,17 +154,20 @@ public class AlignmentLinkHelper {
}
/*
- * if source and target representation exist, we keep the source representation, and we add it the element containing by the target
- * representation
+ * if source and target representation exist, we keep the source
+ * representation, and we add it the element containing by the
+ * target representation
*/
if(familySource != null && familyTarget != null) {
familySource.addFamily(familyTarget);
families.remove(familyTarget);
- } else if(familySource != null) {//a source representation exists yet, we add it this link
+ } else if(familySource != null) {// a source representation exists
+ // yet, we add it this link
familySource.addTriplet((EditPart)currentEP, sourceRep, new EditPartRepresentation(target));
- } else if(familyTarget != null) {//a target representation exists yet, we add it this link
+ } else if(familyTarget != null) {// a target representation exists
+ // yet, we add it this link
familyTarget.addTriplet((EditPart)currentEP, new EditPartRepresentation(source), targetRep);
- } else {//nothing exists, we create a new link representation
+ } else {// nothing exists, we create a new link representation
SameAlignment newFamily = new SameAlignment(this.alignment);
newFamily.addTriplet((EditPart)currentEP, new EditPartRepresentation(source), new EditPartRepresentation(target));
families.add(newFamily);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/AssociationHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/AssociationHelper.java
index 2d8d294eb0b..9575132f757 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/AssociationHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/AssociationHelper.java
@@ -75,14 +75,16 @@ public class AssociationHelper {
}
/**
- * Creates the command to set the owner of a given property in an association
+ * Creates the command to set the owner of a given property in an
+ * association
*
* @param association
* the association to modify
* @param property
* the property to modify
* @param belongsToClass
- * boolean set to <code>true</code> if the property belongs to the class, <code>false</code> if it belongs to the association
+ * boolean set to <code>true</code> if the property belongs to
+ * the class, <code>false</code> if it belongs to the association
* @return the command that will perform modifications or <code>null</code>!
*/
public static IUndoableOperation createSetOwnerCommand(Association association, Property property, boolean belongsToClass) {
@@ -92,7 +94,7 @@ public class AssociationHelper {
if(!(property.getOwner() instanceof Association)) {
return null;
} else {
- //look for the owner of the property to Set
+ // look for the owner of the property to Set
List<Type> ownerList = association.getEndTypes();
if(ownerList.get(0).equals(property.getType()) && ownerList.size() > 1) {
owner = (Type)ownerList.get(1);
@@ -149,7 +151,6 @@ public class AssociationHelper {
return compositeCommand;
-
}
/**
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/BasicClassifierCompartmentLayoutHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/BasicClassifierCompartmentLayoutHelper.java
index df89877c194..d9878645f90 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/BasicClassifierCompartmentLayoutHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/BasicClassifierCompartmentLayoutHelper.java
@@ -21,7 +21,8 @@ import org.eclipse.papyrus.diagram.common.figure.layout.ILayoutToolBox;
import org.eclipse.papyrus.diagram.common.figure.layout.ManualCompartmentToolBox;
/**
- * The Class BasicClassifierCompartmentLayoutHelper offer automatic layout or manual layout
+ * The Class BasicClassifierCompartmentLayoutHelper offer automatic layout or
+ * manual layout
*/
public class BasicClassifierCompartmentLayoutHelper extends ClassifierCompartmentLayoutHelper {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/CleanDiagramHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/CleanDiagramHelper.java
index 3a14fac7e09..3b7e45215ae 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/CleanDiagramHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/CleanDiagramHelper.java
@@ -48,7 +48,6 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.diagram.common.Activator;
import org.eclipse.papyrus.diagram.common.editpolicies.OrphanViewPolicy;
-
@SuppressWarnings("restriction")
public class CleanDiagramHelper {
@@ -59,9 +58,6 @@ public class CleanDiagramHelper {
protected DiagramEditPart selectedElement;
-
-
-
public static CleanDiagramHelper getInstance() {
if(cleanDiagramHelper == null) {
cleanDiagramHelper = new CleanDiagramHelper();
@@ -93,7 +89,6 @@ public class CleanDiagramHelper {
}
}
-
/**
* comes from {@link OrphanViewPolicy}.
*
@@ -107,7 +102,8 @@ public class CleanDiagramHelper {
EditPart ep = selectedElement;
boolean isActivating = true;
// use the viewer to determine if we are still initializing the diagram
- // do not use the DiagramEditPart.isActivating since ConnectionEditPart's
+ // do not use the DiagramEditPart.isActivating since
+ // ConnectionEditPart's
// parent will not be a diagram edit part
EditPartViewer viewer = ep.getViewer();
if(viewer instanceof DiagramGraphicalViewer) {
@@ -157,7 +153,6 @@ public class CleanDiagramHelper {
return null;
}
-
/**
* gets a {@link Command} to delete the supplied {@link View}.
*
@@ -171,8 +166,6 @@ public class CleanDiagramHelper {
return new ICommandProxy(new DeleteCommand(editingDomain, view));
}
-
-
/**
* Scan.
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/DocumentHyperLinkHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/DocumentHyperLinkHelper.java
index c1a49627922..18fb4c832a3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/DocumentHyperLinkHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/DocumentHyperLinkHelper.java
@@ -31,7 +31,6 @@ import org.eclipse.papyrus.diagram.common.ui.hyperlinkshell.HyperlinkObject;
import org.eclipse.papyrus.umlutils.ui.VisualInformationPapyrusConstant;
import org.eclipse.uml2.uml.Package;
-
/**
* this an helper to manage hyperlink document
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/DurationConstraintHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/DurationConstraintHelper.java
index 1d1ce4f12aa..8406a54d317 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/DurationConstraintHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/DurationConstraintHelper.java
@@ -53,7 +53,8 @@ public class DurationConstraintHelper {
}
/**
- * Get the list of all DurationConstraint constraining duration between the two elements (order of parameters does not matter)
+ * Get the list of all DurationConstraint constraining duration between the
+ * two elements (order of parameters does not matter)
*
* @param element1
* the first observed element
@@ -68,7 +69,8 @@ public class DurationConstraintHelper {
}
/**
- * Check whether two occurrences cover the same lifeline for enabling duration constraint creation
+ * Check whether two occurrences cover the same lifeline for enabling
+ * duration constraint creation
*
* @param occurrence
* first occurrence specification
@@ -77,14 +79,16 @@ public class DurationConstraintHelper {
* @return true if occurrences cover the same lifeline
*/
public static boolean coversSameLifeline(OccurrenceSpecification occurrence, OccurrenceSpecification occurrence2) {
- // In fact, the covered lifeline(s) should be a size 1 list (UML constraint on OccurrenceSpecification).
+ // In fact, the covered lifeline(s) should be a size 1 list (UML
+ // constraint on OccurrenceSpecification).
List<Lifeline> coveredLifeline = new ArrayList<Lifeline>(occurrence.getCovereds());
coveredLifeline.retainAll(occurrence2.getCovereds());
return !coveredLifeline.isEmpty();
}
/**
- * Check whether two occurrences are ends of the same message for enabling duration constraint creation
+ * Check whether two occurrences are ends of the same message for enabling
+ * duration constraint creation
*
* @param occurrence
* first occurrence specification
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/DurationObservationHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/DurationObservationHelper.java
index 27fe11b1c68..56ff3851445 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/DurationObservationHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/DurationObservationHelper.java
@@ -33,7 +33,8 @@ public class DurationObservationHelper {
private static final String DURATION_OBSERVATION_LABEL_FORMAT = "&%s";
/**
- * Get the list of all DurationObservation observing duration between the two elements (order of parameters does not matter)
+ * Get the list of all DurationObservation observing duration between the
+ * two elements (order of parameters does not matter)
*
* @param element1
* the first observed element
@@ -51,7 +52,8 @@ public class DurationObservationHelper {
}
/**
- * Get the list of all DurationObservation observing duration from or to an element
+ * Get the list of all DurationObservation observing duration from or to an
+ * element
*
* @param element
* the observed element
@@ -81,7 +83,8 @@ public class DurationObservationHelper {
}
/**
- * Check whether two occurrences are ends of the same message for enabling duration constraint creation
+ * Check whether two occurrences are ends of the same message for enabling
+ * duration constraint creation
*
* @param occurrence
* first occurrence specification
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/HyperlinkHelperFactory.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/HyperlinkHelperFactory.java
index b00eeab8b5f..adc0a51dec8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/HyperlinkHelperFactory.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/HyperlinkHelperFactory.java
@@ -28,13 +28,12 @@ import org.eclipse.papyrus.diagram.common.ui.hyperlinkshell.HyperLinkException;
import org.eclipse.papyrus.diagram.common.ui.hyperlinkshell.HyperlinkObject;
/**
- * The Class HyperlinkHelper, contains all methods to manipulate information about hyperlinks in a
- * model
+ * The Class HyperlinkHelper, contains all methods to manipulate information
+ * about hyperlinks in a model
*/
public class HyperlinkHelperFactory {
protected ArrayList<AbstractHyperLinkHelper> hyperLinkHelpers= new ArrayList<AbstractHyperLinkHelper>();
-
public ArrayList<AbstractHyperLinkHelper> getHyperLinkHelpers() {
return hyperLinkHelpers;
@@ -80,9 +79,6 @@ public class HyperlinkHelperFactory {
}
-
-
-
/**
* use to remove a hyperlink web or document
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/InteractionFragmentHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/InteractionFragmentHelper.java
index 1d4c71eb526..1e4391ae986 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/InteractionFragmentHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/InteractionFragmentHelper.java
@@ -36,7 +36,8 @@ public class InteractionFragmentHelper {
* @param interactionFragment
* interaction fragment to search the one before
* @param uppestContainerToSearchInto
- * the container which we will not search further if encountered (may be null)
+ * the container which we will not search further if encountered
+ * (may be null)
* @return the fragment found happening just before, or null
*/
public static InteractionFragment findPreviousFragment(InteractionFragment interactionFragment, EObject uppestContainerToSearchInto) {
@@ -63,7 +64,8 @@ public class InteractionFragmentHelper {
* @param interactionFragment
* interaction fragment to search the one after
* @param uppestContainerToSearchInto
- * the container which we will not search further if encountered (may be null)
+ * the container which we will not search further if encountered
+ * (may be null)
* @return the fragment found happening just after, or null
*/
public static InteractionFragment findNextFragment(InteractionFragment interactionFragment, EObject uppestContainerToSearchInto) {
@@ -94,8 +96,10 @@ public class InteractionFragmentHelper {
* @param fragmentToStartFrom
* the reference fragment
* @param startFragmentFound
- * use false for an external call, true for recursive internal call when the fragmentToStartFrom has already been found
- * @return the found interaction fragment or null if it is not in uppestContainerToSearchInto
+ * use false for an external call, true for recursive internal
+ * call when the fragmentToStartFrom has already been found
+ * @return the found interaction fragment or null if it is not in
+ * uppestContainerToSearchInto
*/
private static InteractionFragment findInteractionFragment(Element uppestContainerToSearchInto, boolean reverseOrder, InteractionFragment fragmentToStartFrom, boolean startFragmentFound) {
List<? extends Element> listToSearchInto;
@@ -114,17 +118,18 @@ public class InteractionFragmentHelper {
}
Element searchElement = listToSearchInto.get(searchIndex);
-
if(fragmentToStartFrom.equals(searchElement)) {
startFragmentFound = true;
if(reverseOrder) {
// search in the previous child
continue;
} else {
- // search deeper for children (which we consider they come after)
+ // search deeper for children (which we consider they come
+ // after)
}
} else if(!startFragmentFound) {
- // go quicker to skip every node until we find the appropriate starting fragment
+ // go quicker to skip every node until we find the appropriate
+ // starting fragment
if(!EcoreUtil.isAncestor(searchElement, fragmentToStartFrom)) {
continue;
} else {
@@ -140,7 +145,8 @@ public class InteractionFragmentHelper {
if(fragment != null) {
return fragment;
} else if(reverseOrder && searchElement instanceof InteractionFragment) {
- // we searched ineffectively in the children, stop here and return the element
+ // we searched ineffectively in the children, stop here and
+ // return the element
return (InteractionFragment)searchElement;
}
// else, continue
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/LinkMappingHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/LinkMappingHelper.java
index 43d63cba196..144084191b5 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/LinkMappingHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/LinkMappingHelper.java
@@ -22,8 +22,9 @@ import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.util.UMLSwitch;
/**
- * The Class LinkMappingHelper is used as a declaration of contract. This class is used to express
- * the mapping of link at semantic level. for a semantic what is the source what is the target?
+ * The Class LinkMappingHelper is used as a declaration of contract. This class
+ * is used to express the mapping of link at semantic level. for a semantic what
+ * is the source what is the target?
*/
public class LinkMappingHelper {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/OperationLabelHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/OperationLabelHelper.java
index 90ea381c5f9..65c3ba66212 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/OperationLabelHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/OperationLabelHelper.java
@@ -70,12 +70,15 @@ public class OperationLabelHelper extends StereotypedElementLabelHelper {
}
/**
- * Computes the label that should be displayed by the figure managed by this edit part.
+ * Computes the label that should be displayed by the figure managed by this
+ * edit part.
*
* @param editPart
- * the edit part that controls the {@link Property} to be displayed
- * @return the label corresponding to the specific display of the property ("default" display
- * given by preferences or specific display given by eAnnotation).
+ * the edit part that controls the {@link Property} to be
+ * displayed
+ * @return the label corresponding to the specific display of the property
+ * ("default" display given by preferences or specific display given
+ * by eAnnotation).
*/
protected String elementLabel(GraphicalEditPart editPart) {
int displayValue = ICustomAppearence.DEFAULT_UML_OPERATION;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/PreferenceInitializerForElementHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/PreferenceInitializerForElementHelper.java
index f7e4bc7d9b3..2e7f5a21503 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/PreferenceInitializerForElementHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/PreferenceInitializerForElementHelper.java
@@ -50,12 +50,12 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.FontData;
/**
- * this is an helper that contains method use to initialize font color etc in the view provider
+ * this is an helper that contains method use to initialize font color etc in
+ * the view provider
*
*/
public class PreferenceInitializerForElementHelper {
-
public static String getpreferenceKey(View view, String elementName, int pref) {
return PreferenceConstantHelper.getElementConstant(view.getDiagram().getType() + "_" + elementName, pref); //$NON-NLS-1$
}
@@ -78,7 +78,6 @@ public class PreferenceInitializerForElementHelper {
String elementIcon = getpreferenceKey(view, elementName, PreferenceConstantHelper.ELEMENTICON);
String qualifiedName = getpreferenceKey(view, elementName, PreferenceConstantHelper.QUALIFIEDNAME);
-
org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(store, fillColorConstant);
ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB));
@@ -92,17 +91,17 @@ public class PreferenceInitializerForElementHelper {
}
if(EditorUtils.getTransactionalEditingDomain() != null) {
- //shadow
+ // shadow
RecordingCommand shadowcommand = ShadowFigureHelper.getShadowColorCommand(EditorUtils.getTransactionalEditingDomain(), view, store.getBoolean(shadowConstant));
if(shadowcommand.canExecute()) {
shadowcommand.execute();
}
- //icon label
+ // icon label
RecordingCommand namelabelIconCommand = NameLabelIconHelper.getNameLabelIconCommand(EditorUtils.getTransactionalEditingDomain(), view, store.getBoolean(elementIcon));
if(namelabelIconCommand.canExecute()) {
namelabelIconCommand.execute();
}
- //qualified name
+ // qualified name
if(!store.getBoolean(qualifiedName)) {
RecordingCommand qualifiedNameCommand = QualifiedNameHelper.getSetQualifedNameDepthCommand(EditorUtils.getTransactionalEditingDomain(), view, 1000);
if(qualifiedNameCommand.canExecute()) {
@@ -224,7 +223,7 @@ public class PreferenceInitializerForElementHelper {
if(children != null) {
for(Object object : children) {
- //we look for the name of the compartment for this view
+ // we look for the name of the compartment for this view
EditPart dummyEP = EditPartService.getInstance().createGraphicEditPart((View)object);
IGraphicalEditPart epp = (IGraphicalEditPart)dummyEP;
IFigure fig1 = epp.getFigure();
@@ -236,7 +235,8 @@ public class PreferenceInitializerForElementHelper {
String preferenceKey = PreferenceConstantHelper.getCompartmentElementConstant(diagramKind + "_" + elementName, compartmentName, PreferenceConstantHelper.COMPARTMENT_VISIBILITY); //$NON-NLS-1$
boolean value = store.getBoolean(preferenceKey);
- if(!value) {//the default value is true : nothing to do
+ if(!value) {// the default value is true : nothing to
+ // do
ENamedElement namedElement = PackageUtil.getElement("notation.View.visible"); //$NON-NLS-1$
ViewUtil.setStructuralFeatureValue((View)object, (EStructuralFeature)namedElement, value);
}
@@ -256,7 +256,8 @@ public class PreferenceInitializerForElementHelper {
}
/**
- * initialize the status of each label for the node or for the link (Showed or hidden)
+ * initialize the status of each label for the node or for the link (Showed
+ * or hidden)
*
* @param view
* the element to initialize
@@ -270,7 +271,7 @@ public class PreferenceInitializerForElementHelper {
if(children != null) {
for(Object object : children) {
- //we look for the name of the label for this view
+ // we look for the name of the label for this view
EditPart dummyEP = EditPartService.getInstance().createGraphicEditPart((View)object);
if(dummyEP instanceof ILabelRoleProvider) {
String role = ((ILabelRoleProvider)dummyEP).getLabelRole();
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/PropertyLabelHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/PropertyLabelHelper.java
index 90983690596..37a53465431 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/PropertyLabelHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/PropertyLabelHelper.java
@@ -55,12 +55,15 @@ public class PropertyLabelHelper extends StereotypedElementLabelHelper {
}
/**
- * Computes the label that should be displayed by the figure managed by this edit part.
+ * Computes the label that should be displayed by the figure managed by this
+ * edit part.
*
* @param editPart
- * the edit part that controls the {@link Property} to be displayed
- * @return the label corresponding to the specific display of the property ("default" display
- * given by preferences or specific display given by eAnnotation).
+ * the edit part that controls the {@link Property} to be
+ * displayed
+ * @return the label corresponding to the specific display of the property
+ * ("default" display given by preferences or specific display given
+ * by eAnnotation).
*/
protected String elementLabel(GraphicalEditPart editPart) {
int displayValue = ICustomAppearence.DEFAULT_UML_PROPERTY;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/StereotypeFigureHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/StereotypeFigureHelper.java
index 83c0ac017dc..e4886a1d79c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/StereotypeFigureHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/StereotypeFigureHelper.java
@@ -26,7 +26,8 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
/**
- * StereotypeFigureHelper helps a Figure implement IPapyrusNodeUMLElementFigure class to support stereotypes
+ * StereotypeFigureHelper helps a Figure implement IPapyrusNodeUMLElementFigure
+ * class to support stereotypes
*/
public abstract class StereotypeFigureHelper {
@@ -58,7 +59,6 @@ public abstract class StereotypeFigureHelper {
*/
private boolean isStereotypeContainerFilled = false;
-
/**
* @generated
*/
@@ -93,7 +93,8 @@ public abstract class StereotypeFigureHelper {
}
/**
- * This method is used to draw the rectangle displaying stereotype elements if not displayed
+ * This method is used to draw the rectangle displaying stereotype elements
+ * if not displayed
*/
protected void ensureStereotypeRectanglePrinted() {
if(!stereotypePrinted) {
@@ -105,7 +106,8 @@ public abstract class StereotypeFigureHelper {
}
/**
- * This method is used to ensure the rectangle displaying stereotype elements is not displayed if empty
+ * This method is used to ensure the rectangle displaying stereotype
+ * elements is not displayed if empty
*/
protected void cleanStereotypeRectangle() {
if(stereotypePrinted && stereotypeRectangle.getChildren().isEmpty()) {
@@ -172,9 +174,9 @@ public abstract class StereotypeFigureHelper {
cleanStereotypeRectangle();
}
-
/**
- * Create properties compartment for displaying visible properties of applied stereotypes
+ * Create properties compartment for displaying visible properties of
+ * applied stereotypes
*/
protected void createStereotypePropertiesInCompartment() {
ensureStereotypeRectanglePrinted();
@@ -232,7 +234,7 @@ public abstract class StereotypeFigureHelper {
// Set stereotype icon on figure
fActionStereotypeLabel.setIcon(image);
}
- //refreshLayout();
+ // refreshLayout();
}
/**
@@ -246,7 +248,8 @@ public abstract class StereotypeFigureHelper {
* </p>
*
* @param stereotypeProperties
- * the string representing the stereotype properties to be displayed
+ * the string representing the stereotype properties to be
+ * displayed
*/
public void setStereotypePropertiesInBrace(String stereotypeProperties) {
if("".equals(stereotypeProperties) || stereotypeProperties == null) {
@@ -259,14 +262,14 @@ public abstract class StereotypeFigureHelper {
// Set stereotype text on figure
stereotypePropertiesInBraceContent.setText("{" + stereotypeProperties + "}");
}
- //refreshLayout();
+ // refreshLayout();
}
/**
* displays the new string corresponding to the list of stereotypes.
*
- * if the string is <code>null</code>, then the figure that displays the stereotype label is
- * removed from the NodeNamedElementFigure.
+ * if the string is <code>null</code>, then the figure that displays the
+ * stereotype label is removed from the NodeNamedElementFigure.
*
* @param stereotypeProperties
* the string to be displayed.
@@ -281,7 +284,7 @@ public abstract class StereotypeFigureHelper {
}
fillStereotypePropertiesInCompartment(stereotypeProperties);
}
- //refreshLayout();
+ // refreshLayout();
}
/**
@@ -292,7 +295,8 @@ public abstract class StereotypeFigureHelper {
}
/**
- * Make the layout constraint which must be used to layout the stereotype rectangle
+ * Make the layout constraint which must be used to layout the stereotype
+ * rectangle
*/
public abstract Object getStereotypeRectangleConstraint();
@@ -301,7 +305,6 @@ public abstract class StereotypeFigureHelper {
*/
public abstract IMapMode getMapMode();
-
public int getTopInset() {
return topInset;
}
@@ -314,7 +317,6 @@ public abstract class StereotypeFigureHelper {
this.topInset = topInset;
}
-
/**
*
* @return
@@ -364,7 +366,8 @@ public abstract class StereotypeFigureHelper {
}
/**
- * Return true if the Rectangle containing the the stereotype has to be filled
+ * Return true if the Rectangle containing the the stereotype has to be
+ * filled
* @return
*/
public boolean isStereotypeContainerFilled() {
@@ -378,7 +381,4 @@ public abstract class StereotypeFigureHelper {
public void setStereotypeContainerFilled(boolean isStereotypeContainerFilled) {
this.isStereotypeContainerFilled = isStereotypeContainerFilled;
}
-
-
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/StereotypedElementLabelHelper.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/StereotypedElementLabelHelper.java
index cbe7cf76cbd..1d2992fc6b8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/StereotypedElementLabelHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/helper/StereotypedElementLabelHelper.java
@@ -52,8 +52,8 @@ public abstract class StereotypedElementLabelHelper {
}
/**
- * Parses the string containing the complete definition of properties to be displayed, and
- * generates a map.
+ * Parses the string containing the complete definition of properties to be
+ * displayed, and generates a map.
*
* @param editPart
* the edit part for which the label is edited
@@ -61,8 +61,9 @@ public abstract class StereotypedElementLabelHelper {
* the list of stereotypes to display
* @param stereotypesPropertiesToDisplay
* the properties of stereotypes to display
- * @return a map. The keys are the name of displayed stereotypes, the corresponding data is a
- * collection of its properties to be displayed
+ * @return a map. The keys are the name of displayed stereotypes, the
+ * corresponding data is a collection of its properties to be
+ * displayed
*/
protected Map<String, List<String>> parseStereotypeProperties(GraphicalEditPart editPart, String stereotypesToDisplay, String stereotypesPropertiesToDisplay) {
Map<String, List<String>> propertiesMap = new HashMap<String, List<String>>();
@@ -84,8 +85,7 @@ public abstract class StereotypedElementLabelHelper {
/**
* Returns the image to be displayed for the applied stereotypes.
*
- * @return the image that represents the first applied stereotype or <code>null</code> if no
- * image has to be displayed
+ * @return the image that represents the first applied stereotype or <code>null</code> if no image has to be displayed
*/
public Collection<Image> stereotypeIconsToDisplay(GraphicalEditPart editPart) {
String stereotypespresentationKind = AppliedStereotypeHelper.getAppliedStereotypePresentationKind((View)editPart.getModel());
@@ -108,21 +108,22 @@ public abstract class StereotypedElementLabelHelper {
}
/**
- * Returns a String that displays stereotypes (using their simple name or their qualified name)
- * and their properties
+ * Returns a String that displays stereotypes (using their simple name or
+ * their qualified name) and their properties
*
* @param editPart
* the edit part for which the label is edited
* @param separator
- * the separator used to split the string representing the stereotypes.
+ * the separator used to split the string representing the
+ * stereotypes.
* @param stereotypesToDisplay
* the list of stereotypes displayed
* @param stereotypeWithQualifiedName
* the list of stereotypes displayed using their qualified names
* @param stereotypesPropertiesToDisplay
* the list of properties to display
- * @return a string that displays stereotypes (using their simple name or their qualified name)
- * and their properties
+ * @return a string that displays stereotypes (using their simple name or
+ * their qualified name) and their properties
*/
public String stereotypesAndPropertiesToDisplay(GraphicalEditPart editPart, String separator, String stereotypesToDisplay, String stereotypeWithQualifiedName, String stereotypesPropertiesToDisplay) {
// Get the preference from PreferenceStore. there should be an assert
@@ -131,10 +132,12 @@ public abstract class StereotypedElementLabelHelper {
if(store == null) {
return "";
}
- // retrieve if the name of the stereotype has to put to lower case or not
+ // retrieve if the name of the stereotype has to put to lower case or
+ // not
String sNameAppearance = store.getString(VisualInformationPapyrusConstant.P_STEREOTYPE_NAME_APPEARANCE);
- // changes the string of properties into a map, where the entries of the map are the
+ // changes the string of properties into a map, where the entries of the
+ // map are the
// stereotype qualified name, and the properties to display are the data
Map<String, List<String>> propertiesToDisplay = parseStereotypeProperties(editPart, stereotypesToDisplay, stereotypesPropertiesToDisplay);
@@ -149,7 +152,8 @@ public abstract class StereotypedElementLabelHelper {
if(stereotype != null) {
String name = currentStereotype;
if((stereotypeWithQualifiedName.indexOf(currentStereotype)) == -1) {
- // property value contains qualifiedName ==> extract name from it
+ // property value contains qualifiedName ==> extract name
+ // from it
StringTokenizer strToken = new StringTokenizer(currentStereotype, "::");
while(strToken.hasMoreTokens()) {
@@ -161,9 +165,11 @@ public abstract class StereotypedElementLabelHelper {
// ProfileApplicationPreferencePage)
// Previously lowercase forced onto first letter (standard UML)
// stereotypesToDisplay = stereotypesToDisplay+name.substring(0,
- // 1).toLowerCase()+name.substring(1, name.length())+","+separator;
+ // 1).toLowerCase()+name.substring(1,
+ // name.length())+","+separator;
- // check that the name has not already been added to the displayed string
+ // check that the name has not already been added to the
+ // displayed string
if(sNameAppearance.equals(VisualInformationPapyrusConstant.P_STEREOTYPE_NAME_DISPLAY_USER_CONTROLLED)) {
if(out.indexOf(name) == -1) {
out = out + Activator.ST_LEFT + name + Activator.ST_RIGHT + separator;
@@ -210,12 +216,15 @@ public abstract class StereotypedElementLabelHelper {
String stereotypespresentationKind = AppliedStereotypeHelper.getAppliedStereotypePresentationKind(view);
// now check presentation.
- // if horizontal => equivalent to the inBrace visualization in nodes (i.e. only name =
+ // if horizontal => equivalent to the inBrace visualization in nodes
+ // (i.e. only name =
// value, separator = comma, delimited with brace
- // if vertical => equivalent to compartment visualization name of stereotype, NL, property =
+ // if vertical => equivalent to compartment visualization name of
+ // stereotype, NL, property =
// value, NL, etC.
- // check the presentation kind. if only icon => do not display stereotype, only values
+ // check the presentation kind. if only icon => do not display
+ // stereotype, only values
if(VisualInformationPapyrusConstant.ICON_STEREOTYPE_PRESENTATION.equals(stereotypespresentationKind)) {
return StereotypeUtil.getPropertiesValuesInBrace(stereotypesPropertiesToDisplay, getUMLElement(editPart));
}
@@ -244,7 +253,8 @@ public abstract class StereotypedElementLabelHelper {
* Computes the string that displays the stereotypes for the current element
*
* @param separator
- * the separator used to split the string representing the stereotypes.
+ * the separator used to split the string representing the
+ * stereotypes.
* @param stereotypesToDisplay
* the list of stereotypes displayed
* @param stereotypeWithQualifiedName
@@ -254,8 +264,10 @@ public abstract class StereotypedElementLabelHelper {
public String stereotypesToDisplay(GraphicalEditPart editPart, String separator, String stereotypesToDisplay, String stereotypeWithQualifiedName) {
// AL Changes Feb. 07 - Beg
- // Style Handling for STEREOTYPE_NAME_APPEARANCE from ProfileApplicationPreferencePage
- // Stereotype displayed according to UML standard (first letter forced to lower case) -
+ // Style Handling for STEREOTYPE_NAME_APPEARANCE from
+ // ProfileApplicationPreferencePage
+ // Stereotype displayed according to UML standard (first letter forced
+ // to lower case) -
// default -
// or kept as entered by user (user controlled)
@@ -278,7 +290,8 @@ public abstract class StereotypedElementLabelHelper {
if(stereotype != null) {
String name = currentStereotype;
if((stereotypeWithQualifiedName.indexOf(currentStereotype)) == -1) {
- // property value contains qualifiedName ==> extract name from it
+ // property value contains qualifiedName ==> extract name
+ // from it
StringTokenizer strToken = new StringTokenizer(currentStereotype, "::");
while(strToken.hasMoreTokens()) {
@@ -290,9 +303,11 @@ public abstract class StereotypedElementLabelHelper {
// ProfileApplicationPreferencePage)
// Previously lowercase forced onto first letter (standard UML)
// stereotypesToDisplay = stereotypesToDisplay+name.substring(0,
- // 1).toLowerCase()+name.substring(1, name.length())+","+separator;
+ // 1).toLowerCase()+name.substring(1,
+ // name.length())+","+separator;
- // check that the name has not already been added to the displayed string
+ // check that the name has not already been added to the
+ // displayed string
if(sNameAppearance.equals(VisualInformationPapyrusConstant.P_STEREOTYPE_NAME_DISPLAY_USER_CONTROLLED)) {
if(out.indexOf(name) == -1) {
out = out + name + separator;
@@ -332,10 +347,13 @@ public abstract class StereotypedElementLabelHelper {
imageToDisplay.add(getImage(editPart));
}
- // for each element in the list of stereotype icon, adds it to the icons list of the
+ // for each element in the list of stereotype icon, adds it to the icons
+ // list of the
// wrapping label
- // problem (RS - CEA LIST): more icons were displayed before refresh: has to clean
- // problem 2 (RS - CEA LIST): no method to know how many icons were displayed => should fix
+ // problem (RS - CEA LIST): more icons were displayed before refresh:
+ // has to clean
+ // problem 2 (RS - CEA LIST): no method to know how many icons were
+ // displayed => should fix
// a max number ?!
// solution: set all images to null, and then add the correct icons
int i = 0;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/AlignmentTree.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/AlignmentTree.java
index 6652ca4797a..4d1c33fa3cd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/AlignmentTree.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/AlignmentTree.java
@@ -27,7 +27,6 @@ import org.eclipse.gef.tools.ToolUtilities;
*/
public class AlignmentTree extends EditPartTree {
-
/**
* this UDI can be used to serialize this class
*/
@@ -75,8 +74,7 @@ public class AlignmentTree extends EditPartTree {
/**
* Returns the new bounds of the container
*
- * @return
- * <ul>
+ * @return <ul>
* <li>{@link EditPartTree#diagramRect} if the container is the diagram</li>
* <li>the bounds of the container after the shift</li>
* </ul>
@@ -89,29 +87,26 @@ public class AlignmentTree extends EditPartTree {
Point oldParentLocation = LayoutUtils.getAbsolutePosition(treeParent.getEditPart()).getLocation();
Point newParentLocation = treeParent.getNewPosition().getLocation();
- //shift between the two positions
+ // shift between the two positions
Point shift = newParentLocation.getTranslated(oldParentLocation.getNegated());
// we want know the final position for the container
PrecisionRectangle oldContainerBounds = LayoutUtils.getAbsolutePosition(this.getEditPart().getParent());
newContainerBounds = new PrecisionRectangle(oldContainerBounds);
newContainerBounds.translate(shift);
- } else {//treeParent is the root of the tree
+ } else {// treeParent is the root of the tree
EditPart containerEditPart = this.getEditPart().getParent();
newContainerBounds = LayoutUtils.getAbsolutePosition(containerEditPart);
}
return newContainerBounds;
}
-
-
-
/**
* Returns the absolute position for the editpart in the new container
*
- * @return
- * the absolute position for the editpart in the new container. That's to say the intermediate position, when the container has moved, and
- * the editpart hasn't moved
+ * @return the absolute position for the editpart in the new container.
+ * That's to say the intermediate position, when the container has
+ * moved, and the editpart hasn't moved
*/
public PrecisionRectangle getAbsolutePositionInTheNewContainerPosition() {
PrecisionRectangle newPosition = new PrecisionRectangle(LayoutUtils.getAbsolutePosition(getEditPart()));
@@ -138,7 +133,8 @@ public class AlignmentTree extends EditPartTree {
* @param editparts
* the selected editpart
* @param parentsList
- * parents of editparts which could be interesting to add to the tree
+ * parents of editparts which could be interesting to add to the
+ * tree
* @return
*/
@Override
@@ -147,13 +143,15 @@ public class AlignmentTree extends EditPartTree {
for(EditPart editpart : parentsList) {
/*
- * the editparts are interesting only if they are selected or if its parent is selected!
+ * the editparts are interesting only if they are selected or if its
+ * parent is selected!
*/
if(editparts.contains(editpart) || ((!editparts.contains(editpart)) && ToolUtilities.isAncestorContainedIn(editparts, editpart))) {
boolean isSelected = editparts.contains(editpart);
AlignmentTree parentTree = new AlignmentTree(editpart, isSelected);
if(!isSelected) {
- //this editpart won't move, so we can precise now its position
+ // this editpart won't move, so we can precise now its
+ // position
parentTree.setNewPosition(LayoutUtils.getAbsolutePosition(editpart));
}
if(childTree != null) {
@@ -166,7 +164,8 @@ public class AlignmentTree extends EditPartTree {
}
/**
- * Specifies in the tree which editpart in the selected editpart is used like reference to do the alignment action
+ * Specifies in the tree which editpart in the selected editpart is used
+ * like reference to do the alignment action
*
* @see org.eclipse.papyrus.diagram.common.layout.EditPartTree#postBuildOperations(java.util.List)
*
@@ -175,7 +174,7 @@ public class AlignmentTree extends EditPartTree {
*/
@Override
protected void postBuildOperations(List<EditPart> editparts) {
- //the reference for the alignment is the last selected element
+ // the reference for the alignment is the last selected element
((AlignmentTree)this.getTree(editparts.get(editparts.size() - 1))).setNewPosition(LayoutUtils.getAbsolutePosition(editparts.get(editparts.size() - 1)));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/DistributionConstants.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/DistributionConstants.java
index ad6d80d0f37..61daccc99b9 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/DistributionConstants.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/DistributionConstants.java
@@ -26,19 +26,31 @@ import org.eclipse.papyrus.diagram.common.Messages;
*/
public class DistributionConstants {
- /** the list of the horizontal values for the distribution and the alignment actions */
+ /**
+ * the list of the horizontal values for the distribution and the alignment
+ * actions
+ */
public static final List<Integer> horizontalValuesList = createArrayList(new int[]{ PositionConstants.NORTH, PositionConstants.SOUTH, PositionConstants.NORTH_EAST, PositionConstants.NORTH_WEST, PositionConstants.SOUTH_EAST, PositionConstants.SOUTH_WEST });
- /** the list of the vertical values for the distribution and the alignment actions */
+ /**
+ * the list of the vertical values for the distribution and the alignment
+ * actions
+ */
public static final List<Integer> verticalValuesList = createArrayList(new int[]{ PositionConstants.EAST, PositionConstants.WEST, PositionConstants.NORTH_EAST, PositionConstants.NORTH_WEST, PositionConstants.SOUTH_EAST, PositionConstants.SOUTH_WEST });
- /** Constant used to identify the horizontal distribution in the parent container */
+ /**
+ * Constant used to identify the horizontal distribution in the parent
+ * container
+ */
public static final int DISTRIBUTE_H_CONTAINER_INT = PositionConstants.HORIZONTAL;
/** Constant used to identify the horizontal distribution between nodes */
public static final int DISTRIBUTE_H_NODES_INT = PositionConstants.HORIZONTAL | PositionConstants.CENTER;
- /** Constant used to identify the vertical distribution in the parent container */
+ /**
+ * Constant used to identify the vertical distribution in the parent
+ * container
+ */
public static final int DISTRIBUTE_V_CONTAINER_INT = PositionConstants.VERTICAL;
/** Constant used to identify the vertical distribution between nodes */
@@ -105,8 +117,7 @@ public class DistributionConstants {
*
* @param array
* the array used to create an {@link ArrayList}<{@link Integer}>
- * @return
- * an {@link ArrayList}<{@link Integer}> filled with {@code array}
+ * @return an {@link ArrayList}<{@link Integer}> filled with {@code array}
*/
private static List<Integer> createArrayList(int[] array) {
ArrayList<Integer> values = new ArrayList<Integer>();
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/DistributionTree.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/DistributionTree.java
index 9be6188e09d..d6fb7925538 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/DistributionTree.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/DistributionTree.java
@@ -62,9 +62,9 @@ public class DistributionTree extends EditPartTree {
* @param editparts
* the selected editpart
* @param childrenList
- * parents of editparts which could be interesting to add to the tree
- * @return
- * a new tree
+ * parents of editparts which could be interesting to add to the
+ * tree
+ * @return a new tree
*/
@Override
protected EditPartTree createChildrenTree(List<EditPart> editparts, List<EditPart> childrenList) {
@@ -89,9 +89,8 @@ public class DistributionTree extends EditPartTree {
*/
@Override
protected void postBuildOperations(List<EditPart> editparts) {
- //nothing to do
+ // nothing to do
}
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/EditPartRepresentation.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/EditPartRepresentation.java
index db7987979b9..87347bd05ae 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/EditPartRepresentation.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/EditPartRepresentation.java
@@ -46,12 +46,10 @@ public class EditPartRepresentation {
this.representedEditPart = ep;
}
-
/**
* Getter for {@link #representedEditPart}
*
- * @return
- * {@link #representedEditPart}
+ * @return {@link #representedEditPart}
*/
public EditPart getRepresentedEditPart() {
return representedEditPart;
@@ -61,8 +59,7 @@ public class EditPartRepresentation {
* Returns the position of the {@link EditPart} before its shift
*
*
- * @return
- * the position of the {@link EditPart} before its shift
+ * @return the position of the {@link EditPart} before its shift
*/
public PrecisionRectangle getPosition() {
return LayoutUtils.getAbsolutePosition(representedEditPart);
@@ -72,8 +69,7 @@ public class EditPartRepresentation {
*
* Returns the command for this {@link EditPart}
*
- * @return
- * the command for this {@link EditPart}
+ * @return the command for this {@link EditPart}
*/
public Command getCommand() {
if(request != null) {
@@ -107,8 +103,7 @@ public class EditPartRepresentation {
/**
* Getter for {@link EditPartRepresentation#delta}
*
- * @return
- * {@link #delta}
+ * @return {@link #delta}
*/
public Dimension getMoveDelta() {
return this.delta;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/EditPartTree.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/EditPartTree.java
index 48ef1cb606c..584d1e8c94f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/EditPartTree.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/EditPartTree.java
@@ -25,8 +25,6 @@ import org.eclipse.gef.Request;
import org.eclipse.gef.RootEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-
-
/**
* This class is used to represent the hierarchy between selected editparts
*
@@ -59,7 +57,6 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
*/
private Request request;
-
/**
*
* Constructor.
@@ -106,12 +103,12 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
this.request = request;
}
-
/**
* Sets the used to precise if this tree is the reference of the alignment.
*
* @param isReference
- * the new used to precise if this tree is the reference of the alignment
+ * the new used to precise if this tree is the reference of the
+ * alignment
*/
public void setIsReference(boolean isReference) {
this.isReference = true;
@@ -120,8 +117,7 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
/**
* Gets {@link #isReference()}
*
- * @return
- * the {@link #isReference()} value
+ * @return the {@link #isReference()} value
*/
public boolean isReference() {
return isReference;
@@ -140,14 +136,12 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
/**
* Gets {@link #isSelected}
*
- * @return
- * the {@link #isSelected} value
+ * @return the {@link #isSelected} value
*/
public boolean isSelected() {
return isSelected;
}
-
/**
* Gets the editpart represented by this tree
*
@@ -157,12 +151,10 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
return (EditPart)getUserObject();
}
-
/**
* @see javax.swing.tree.DefaultMutableTreeNode#toString()
*
- * @return
- * the string representing the tree with its children
+ * @return the string representing the tree with its children
*/
@Override
@@ -221,8 +213,7 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
*
* @param editpart
* the editpart that we look for
- * @return
- * <ul>
+ * @return <ul>
* <li> {@code true}</li> if the tree contains the editpart
* <li> {@code false}</li> if not
* </ul>
@@ -273,20 +264,19 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
return this.isFirstSelected;
}
-
/**
- * Gets the level for the first selected element in the full tree. This level is calculated from the root of this node.
+ * Gets the level for the first selected element in the full tree. This
+ * level is calculated from the root of this node.
*
* @param index
* the index
- * @return
- * <ul>
+ * @return <ul>
* <li>the level for first selected element</li>
* <li> {@code -1}</li> if the first selected element can't be found
* </ul>
*/
public int getLevelForFirstSelectedElement() {
- //We search the first level in the tree
+ // We search the first level in the tree
TreeNode[] path = this.getPath();
if(path.length > 1) {
EditPartTree result = getSelectedFirstEditPart((EditPartTree)path[1]);
@@ -301,7 +291,8 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
* Gets the selected first edit part.
*
* @param treeNode
- * the tree node (level one of a tree) where we search the first selected element
+ * the tree node (level one of a tree) where we search the first
+ * selected element
* @return the selected first edit part or {@code null} if not found
*/
protected EditPartTree getSelectedFirstEditPart(EditPartTree treeNode) {
@@ -321,8 +312,7 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
/**
* Test if this node have child that are not selected
*
- * @return
- * <ul>
+ * @return <ul>
* <li>{@code true}</li> it exists a child which is not selected
* <li>{@code false}</li> all the children are selected
* </ul>
@@ -334,8 +324,7 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
/**
* Returns the distance between the tree and the first unselected child
*
- * @return
- * <ul>
+ * @return <ul>
* <li>the distance between this tree and the first unselected child</li>
* <li> {@code -1} when all the children are selected</li>
* </ul>
@@ -354,10 +343,11 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
}
/**
- * Returns the first unselected child or {@code null} if all the children are selected
+ * Returns the first unselected child or {@code null} if all the children
+ * are selected
*
- * @return
- * the first unselected child or {@code null} if all the children are selected
+ * @return the first unselected child or {@code null} if all the children
+ * are selected
*/
public EditPartTree getFirstUnselectedChild() {
int depth = this.getDepth();
@@ -373,10 +363,11 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
}
/**
- * Sorts the editparts in the tree
- * In this tree, we have the selected editparts.
- * Moreover, we add the intermediate packages, even if they aren't selected.
- * These intermediate packages are used to determine the final position of their parents, if the reference is inside on of these packages
+ * Sorts the editparts in the tree In this tree, we have the selected
+ * editparts. Moreover, we add the intermediate packages, even if they
+ * aren't selected. These intermediate packages are used to determine the
+ * final position of their parents, if the reference is inside on of these
+ * packages
*
* @param editparts
* the editparts to sort
@@ -385,7 +376,7 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
List<EditPart> parentsList;
if(editparts.size() >= 2) {
- //we build the tree
+ // we build the tree
for(EditPart currentEP : editparts) {
parentsList = new ArrayList<EditPart>();
EditPart parent = currentEP;
@@ -394,15 +385,16 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
while(parent != null) {
if(this.contains(parent)) {
grandFatherTree = this.getTree(parent);
- break; //on sort du while
+ break; // on sort du while
} else {
- //we add all the parent in this list!
+ // we add all the parent in this list!
/*
- * we don't add the parent if it's a comparment , except if the parent is the selected element (property, enumeration
- * literal...),
- * of course, a property or a enumeration literal can't move in there compartment (in class diagram) but this choice allows
- * avoid some NullPointerException.
- * (see bug 317691)
+ * we don't add the parent if it's a comparment , except
+ * if the parent is the selected element (property,
+ * enumeration literal...), of course, a property or a
+ * enumeration literal can't move in there compartment
+ * (in class diagram) but this choice allows avoid some
+ * NullPointerException. (see bug 317691)
*/
if(!(parent instanceof CompartmentEditPart) || (parent instanceof CompartmentEditPart && parent == currentEP)) {
if(!(parent instanceof RootEditPart)) {
@@ -416,23 +408,24 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
parent = parent.getParent();
}
-
- //We add all the node in the rootTree
+ // We add all the node in the rootTree
EditPartTree childTree = createChildrenTree(editparts, parentsList);
- //we add the node to the tree
+ // we add the node to the tree
if(childTree != null) {
grandFatherTree.add(childTree);
}
}
- //we precise which element is the reference (the last selected element)
+ // we precise which element is the reference (the last selected
+ // element)
this.getTree(editparts.get(editparts.size() - 1)).setIsReference(true);
/*
- * we precise for each branch the first selected element
- * it's this element (and its brothers) which are really align on the reference
+ * we precise for each branch the first selected element it's this
+ * element (and its brothers) which are really align on the
+ * reference
*/
Enumeration childrenEnum = this.children();
@@ -457,9 +450,9 @@ public abstract class EditPartTree extends DefaultMutableTreeNode {
* @param editparts
* the selected editparts for this action
* @param children
- * intermediate children which could be interesting to add like node in the tree
- * @return
- * a new EditPartTree
+ * intermediate children which could be interesting to add like
+ * node in the tree
+ * @return a new EditPartTree
*/
protected abstract EditPartTree createChildrenTree(List<EditPart> editparts, List<EditPart> children);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LayoutUtils.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LayoutUtils.java
index 787bf8d0125..fe03fca8c2c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LayoutUtils.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LayoutUtils.java
@@ -75,8 +75,8 @@ public class LayoutUtils {
final public static String VERTICALLY_BETWEEN_NODES = "parameter_vertically_between_nodes"; //$NON-NLS-1$
/**
- * the shift to avoid the scrollbar
- * If there is no scrollBar, set scrollBarSize to 0.0!
+ * the shift to avoid the scrollbar If there is no scrollBar, set
+ * scrollBarSize to 0.0!
*/
public static final double scrollBarSize = 6;
@@ -86,8 +86,7 @@ public class LayoutUtils {
*
* @param ep
* the {@link EditPart} that we want the position
- * @return
- * a {@link Rectangle} with the absolute position from the {@link EditPart}
+ * @return a {@link Rectangle} with the absolute position from the {@link EditPart}
*
*/
public static PrecisionRectangle getAbsolutePosition(EditPart ep) {
@@ -97,16 +96,16 @@ public class LayoutUtils {
return rect;
}
-
/**
* Returns the side on which the anchor is on the {@link EditPart}
*
* @param node
* the node where is located the anchor
* @param anchor
- * the anchor. the anchor must in absolute coordinate before call this method.
- * @return
- * the side on which the anchor is on the {@link EditPart} The returned values can be :
+ * the anchor. the anchor must in absolute coordinate before call
+ * this method.
+ * @return the side on which the anchor is on the {@link EditPart} The
+ * returned values can be :
* <ul>
* <li>{@linkplain PositionConstants#NONE}
* <ul>
@@ -131,47 +130,52 @@ public class LayoutUtils {
int position = PositionConstants.NONE;
PrecisionRectangle bounds = LayoutUtils.getAbsolutePosition(node);
- //we are not on EAST, not on WEST, but we are on the NORTH
+ // we are not on EAST, not on WEST, but we are on the NORTH
if((anchor.y == bounds.y) && (anchor.x != bounds.x) && (anchor.x != bounds.getRight().x)) {
position = PositionConstants.NORTH;
- //we are not on the EAST and not on the WEST, but we are on the SOUTH
+ // we are not on the EAST and not on the WEST, but we are on the
+ // SOUTH
} else if((anchor.y == bounds.getBottom().y) && (anchor.x != bounds.x) && (anchor.x != bounds.getRight().x)) {
position = PositionConstants.SOUTH;
- //we are on the EAST, but we are not on the NORTH and not on the SOUTH
+ // we are on the EAST, but we are not on the NORTH and not on the
+ // SOUTH
} else if((anchor.x == bounds.getRight().x) && (anchor.y != bounds.y) && (anchor.y != bounds.getBottom().y)) {
position = PositionConstants.EAST;
- //we are on the WEST, but we are not on the on the NORTH and not on the SOUTH
+ // we are on the WEST, but we are not on the on the NORTH and not on
+ // the SOUTH
} else if((anchor.x == bounds.x) && (anchor.y != bounds.getTop().y) && (anchor.y != bounds.getBottom().y)) {
position = PositionConstants.WEST;
- //we are on the NORTH and on the EAST
+ // we are on the NORTH and on the EAST
} else if(anchor.equals(bounds.getLeft())) {
position = PositionConstants.NORTH_EAST;
- //we are on the NORTH and on the WEST
+ // we are on the NORTH and on the WEST
} else if(anchor.equals(bounds.getRight())) {
position = PositionConstants.NORTH_WEST;
- //we are on the EAST and on the SOUTH
+ // we are on the EAST and on the SOUTH
} else if(anchor.equals(bounds.getBottomRight())) {
position = PositionConstants.SOUTH_EAST;
- //we are on the WEST and on the SOUTH
+ // we are on the WEST and on the SOUTH
} else if(anchor.equals(bounds.getBottomLeft())) {
position = PositionConstants.SOUTH_WEST;
}
- if(position == PositionConstants.NONE) {//the figure is not a rectangle
+ if(position == PositionConstants.NONE) {// the figure is not a
+ // rectangle
if(node instanceof ShapeEditPart) {
for(Object obj : node.getChildren()) {
if(obj instanceof CompartmentEditPart && position == PositionConstants.NONE) {
position = getAnchorPosition((EditPart)obj, anchor);
}
}
- if(position == PositionConstants.NONE) {//the figure is not a rectangle
+ if(position == PositionConstants.NONE) {// the figure is not a
+ // rectangle
IFigure figure = ((ShapeEditPart)node).getFigure();
if(figure instanceof IOvalAnchorableFigure) {
Rectangle bounds2 = ((IOvalAnchorableFigure)figure).getOvalBounds().getCopy();
@@ -220,24 +224,23 @@ public class LayoutUtils {
return list;
}
-
/**
- * This method return the position of the ends for the link to have a nice representation.
- * Some cases can be distinguish :
+ * This method return the position of the ends for the link to have a nice
+ * representation. Some cases can be distinguish :
* <ul>
* <li>The 2 EditParts do not have intersection</li>
* <li>An EditPart is included in the other</li>
* <li>An EditPart intersects a part of the other : we calculate nothing</li>
* </ul>
*
- * Moreover this method includes a specific algorithm when the EditPart is an Affixed Child Node
+ * Moreover this method includes a specific algorithm when the EditPart is
+ * an Affixed Child Node
*
* @param sourceEditPart
* he source EditPart
* @param targetEditPart
* the targetEditPart
- * @return
- * <ul>
+ * @return <ul>
* <li>Point[0] is the source Anchor</li>
* <li>Point[1] is the target Anchor</li>
* </ul>
@@ -256,17 +259,17 @@ public class LayoutUtils {
if(!sourceBounds.intersects(targetBounds)) {
/*
- * there is no intersection between the 2 EditParts
- * we look for the position of targetEditPart/sourceEditPart
+ * there is no intersection between the 2 EditParts we look for the
+ * position of targetEditPart/sourceEditPart
*/
targetPosition = getRelativePositionFor(sourceBounds, targetBounds, diagramBounds);
- //calculate source location
+ // calculate source location
if(!Util.isAffixedChildNode(sourceEditPart)) {
switch(targetPosition) {
- case PositionConstants.NORTH://1
+ case PositionConstants.NORTH:// 1
sourceLocation = sourceBounds.getTop();
if(sourceBounds.preciseX() >= targetBounds.preciseX() && sourceBounds.getRight().preciseX() <= targetBounds.getRight().preciseX()) {
- //nothing to do
+ // nothing to do
} else if(sourceBounds.preciseX() <= targetBounds.preciseX() && sourceBounds.getRight().preciseX() >= targetBounds.getRight().preciseX()) {
sourceLocation.x = (int)targetBounds.getBottom().preciseX();
} else if(sourceBounds.preciseX() <= targetBounds.preciseX() && sourceBounds.getRight().preciseX() <= targetBounds.getRight().preciseX()) {
@@ -275,10 +278,10 @@ public class LayoutUtils {
sourceLocation.x = (int)(((sourceBounds.preciseX() + targetBounds.getRight().preciseX()) / 2));
}
break;
- case PositionConstants.SOUTH://4
+ case PositionConstants.SOUTH:// 4
sourceLocation = sourceBounds.getBottom();
if(sourceBounds.preciseX() >= targetBounds.preciseX() && sourceBounds.getRight().preciseX() <= targetBounds.getRight().preciseX()) {
- //nothing to do
+ // nothing to do
} else if(sourceBounds.preciseX() <= targetBounds.preciseX() && sourceBounds.getRight().preciseX() >= targetBounds.getRight().preciseX()) {
sourceLocation.x = (int)targetBounds.getBottom().preciseX();
} else if(sourceBounds.preciseX() <= targetBounds.preciseX() && sourceBounds.getRight().preciseX() <= targetBounds.getRight().preciseX()) {
@@ -286,12 +289,12 @@ public class LayoutUtils {
} else {
sourceLocation.x = (int)(((sourceBounds.preciseX() + targetBounds.getRight().preciseX()) / 2));
}
- //sourceLocation = sourceBounds.getBottom();
+ // sourceLocation = sourceBounds.getBottom();
break;
- case PositionConstants.EAST://16
+ case PositionConstants.EAST:// 16
sourceLocation = sourceBounds.getRight();
if(sourceBounds.preciseY() >= targetBounds.preciseY() && sourceBounds.getBottom().preciseY() <= targetBounds.getBottom().preciseY()) {
- //nothing to do
+ // nothing to do
} else if(sourceBounds.preciseY() <= targetBounds.preciseY() && sourceBounds.getBottom().preciseY() >= targetBounds.getBottom().preciseY()) {
sourceLocation.y = (int)targetBounds.getLeft().preciseY();
} else if(sourceBounds.preciseY() >= targetBounds.preciseY() && sourceBounds.getBottom().preciseY() >= targetBounds.getBottom().preciseY()) {
@@ -299,12 +302,12 @@ public class LayoutUtils {
} else {
sourceLocation.y = (int)((sourceBounds.getBottom().preciseY() + targetBounds.preciseY()) / 2);
}
- //sourceLocation = sourceBounds.getRight();
+ // sourceLocation = sourceBounds.getRight();
break;
- case PositionConstants.WEST://8
+ case PositionConstants.WEST:// 8
sourceLocation = sourceBounds.getLeft();
if(sourceBounds.preciseY() > targetBounds.preciseY() && sourceBounds.getBottom().preciseY() < targetBounds.getBottom().preciseY()) {
- //nothing to do
+ // nothing to do
} else if(sourceBounds.preciseY() < targetBounds.preciseY() && sourceBounds.getBottom().preciseY() > targetBounds.getBottom().preciseY()) {
sourceLocation.y = (int)targetBounds.getLeft().preciseY();
} else if(sourceBounds.preciseY() > targetBounds.preciseY() && sourceBounds.getBottom().preciseY() > targetBounds.getBottom().preciseY()) {
@@ -312,18 +315,18 @@ public class LayoutUtils {
} else {
sourceLocation.y = (int)((sourceBounds.getBottom().preciseY() + targetBounds.preciseY()) / 2);
}
- //sourceLocation = sourceBounds.getLeft();
+ // sourceLocation = sourceBounds.getLeft();
break;
- case PositionConstants.NORTH_EAST://17
+ case PositionConstants.NORTH_EAST:// 17
sourceLocation = sourceBounds.getTop();
break;
- case PositionConstants.NORTH_WEST://9
+ case PositionConstants.NORTH_WEST:// 9
sourceLocation = sourceBounds.getTop();
break;
- case PositionConstants.SOUTH_EAST://20
+ case PositionConstants.SOUTH_EAST:// 20
sourceLocation = sourceBounds.getBottom();
break;
- case PositionConstants.SOUTH_WEST://12
+ case PositionConstants.SOUTH_WEST:// 12
sourceLocation = sourceBounds.getBottom();
break;
default:
@@ -333,51 +336,51 @@ public class LayoutUtils {
IBorderItemLocator loc = ((IBorderItemEditPart)sourceEditPart).getBorderItemLocator();
int side = loc.getCurrentSideOfParent();
switch(targetPosition) {
- case PositionConstants.NORTH://1
+ case PositionConstants.NORTH:// 1
sourceLocation = sourceBounds.getTop();
break;
- case PositionConstants.SOUTH://4
+ case PositionConstants.SOUTH:// 4
sourceLocation = sourceBounds.getBottom();
break;
- case PositionConstants.EAST://16
+ case PositionConstants.EAST:// 16
sourceLocation = sourceBounds.getRight();
break;
- case PositionConstants.WEST://8
+ case PositionConstants.WEST:// 8
sourceLocation = sourceBounds.getLeft();
break;
- case PositionConstants.NORTH_EAST://17
+ case PositionConstants.NORTH_EAST:// 17
if(eastPositions.contains(new Integer(side))) {
sourceLocation = sourceBounds.getRight();
} else if(westPositions.contains(new Integer(side))) {
sourceLocation = sourceBounds.getRight();
- } else {//side is NORTH or SOUTH
+ } else {// side is NORTH or SOUTH
sourceLocation = sourceBounds.getTop();
}
break;
- case PositionConstants.NORTH_WEST://9
+ case PositionConstants.NORTH_WEST:// 9
if(eastPositions.contains(new Integer(side))) {
sourceLocation = sourceBounds.getLeft();
} else if(westPositions.contains(new Integer(side))) {
sourceLocation = sourceBounds.getLeft();
- } else {//side is NORTH or SOUTH
+ } else {// side is NORTH or SOUTH
sourceLocation = sourceBounds.getTop();
}
break;
- case PositionConstants.SOUTH_EAST://20
+ case PositionConstants.SOUTH_EAST:// 20
if(northPositions.contains(new Integer(side))) {
sourceLocation = sourceBounds.getBottom();
} else if(southPositions.contains(new Integer(side))) {
sourceLocation = sourceBounds.getBottom();
- } else {//SIDE is EAST or WEST
+ } else {// SIDE is EAST or WEST
sourceLocation = sourceBounds.getRight();
}
break;
- case PositionConstants.SOUTH_WEST://12
+ case PositionConstants.SOUTH_WEST:// 12
if(northPositions.contains(new Integer(side))) {
sourceLocation = sourceBounds.getBottom();
} else if(southPositions.contains(new Integer(side))) {
sourceLocation = sourceBounds.getBottom();
- } else {//SIDE is EAST or WEST
+ } else {// SIDE is EAST or WEST
sourceLocation = sourceBounds.getLeft();
}
break;
@@ -386,35 +389,35 @@ public class LayoutUtils {
}
}
- //calculate target location
+ // calculate target location
if(!Util.isAffixedChildNode(targetEditPart)) {
switch(targetPosition) {
- case PositionConstants.NORTH://1
+ case PositionConstants.NORTH:// 1
targetLocation.setLocation(sourceLocation.x, (int)targetBounds.getBottom().preciseY());
- //targetLocation = targetBounds.getBottom();
+ // targetLocation = targetBounds.getBottom();
break;
- case PositionConstants.SOUTH://4
+ case PositionConstants.SOUTH:// 4
targetLocation.setLocation(sourceLocation.x, (int)targetBounds.getTop().preciseY());
- // targetLocation = targetBounds.getTop();
+ // targetLocation = targetBounds.getTop();
break;
- case PositionConstants.EAST://16
+ case PositionConstants.EAST:// 16
targetLocation.setLocation((int)targetBounds.preciseX(), (int)sourceLocation.preciseY());
- //targetLocation = targetBounds.getLeft();
+ // targetLocation = targetBounds.getLeft();
break;
- case PositionConstants.WEST://8
+ case PositionConstants.WEST:// 8
targetLocation.setLocation((int)targetBounds.preciseX(), (int)sourceLocation.preciseY());
- //targetLocation = targetBounds.getRight();
+ // targetLocation = targetBounds.getRight();
break;
- case PositionConstants.NORTH_EAST://17
+ case PositionConstants.NORTH_EAST:// 17
targetLocation = targetBounds.getLeft();
break;
- case PositionConstants.NORTH_WEST://9
+ case PositionConstants.NORTH_WEST:// 9
targetLocation = targetBounds.getRight();
break;
- case PositionConstants.SOUTH_EAST://20
+ case PositionConstants.SOUTH_EAST:// 20
targetLocation = targetBounds.getLeft();
break;
- case PositionConstants.SOUTH_WEST://12
+ case PositionConstants.SOUTH_WEST:// 12
targetLocation = targetBounds.getRight();
break;
default:
@@ -424,19 +427,19 @@ public class LayoutUtils {
IBorderItemLocator loc = ((IBorderItemEditPart)targetEditPart).getBorderItemLocator();
int side = loc.getCurrentSideOfParent();
switch(targetPosition) {
- case PositionConstants.NORTH://1
+ case PositionConstants.NORTH:// 1
targetLocation = targetBounds.getBottom();
break;
- case PositionConstants.SOUTH://4
+ case PositionConstants.SOUTH:// 4
targetLocation = targetBounds.getTop();
break;
- case PositionConstants.EAST://16
+ case PositionConstants.EAST:// 16
targetLocation = targetBounds.getLeft();
break;
- case PositionConstants.WEST://8
+ case PositionConstants.WEST:// 8
targetLocation = targetBounds.getRight();
break;
- case PositionConstants.NORTH_EAST://17
+ case PositionConstants.NORTH_EAST:// 17
if(eastPositions.contains(new Integer(side))) {
targetLocation = targetBounds.getRight();
} else if(westPositions.contains(new Integer(side))) {
@@ -445,7 +448,7 @@ public class LayoutUtils {
targetLocation = targetBounds.getTop();
}
break;
- case PositionConstants.NORTH_WEST://9
+ case PositionConstants.NORTH_WEST:// 9
if(eastPositions.contains(new Integer(side))) {
targetLocation = targetBounds.getLeft();
} else if(westPositions.contains(new Integer(side))) {
@@ -454,7 +457,7 @@ public class LayoutUtils {
targetLocation = targetBounds.getTop();
}
break;
- case PositionConstants.SOUTH_EAST://20
+ case PositionConstants.SOUTH_EAST:// 20
if(northPositions.contains(new Integer(side))) {
targetLocation = targetBounds.getTop();
} else if(southPositions.contains(new Integer(side))) {
@@ -463,7 +466,7 @@ public class LayoutUtils {
targetLocation = targetBounds.getLeft();
}
break;
- case PositionConstants.SOUTH_WEST://12
+ case PositionConstants.SOUTH_WEST:// 12
if(northPositions.contains(new Integer(side))) {
targetLocation = targetBounds.getTop();
} else if(southPositions.contains(new Integer(side))) {
@@ -477,10 +480,9 @@ public class LayoutUtils {
}
}
-
} else {
- //source and target intersect them
- //test if one editpart is included in other
+ // source and target intersect them
+ // test if one editpart is included in other
if(sourceBounds.contains(targetBounds)) {
sourceLocation.setLocation((int)targetBounds.getBottom().preciseX(), (int)sourceBounds.getBottom().preciseY());
targetLocation = targetBounds.getBottom();
@@ -491,10 +493,10 @@ public class LayoutUtils {
Rectangle rect = new Rectangle(sourceBounds);
Rectangle intersection = rect.getCopy().intersect(targetBounds);
int intersectPosition = getRelativePositionFor(sourceBounds, new PrecisionRectangle(intersection), diagramBounds);
- //Currently we do nothing in this case
+ // Currently we do nothing in this case
}
}
- // return new Point[]{ new Point(), new Point() };
+ // return new Point[]{ new Point(), new Point() };
return new Point[]{ sourceLocation, targetLocation };
}
@@ -505,9 +507,8 @@ public class LayoutUtils {
* the reference
* @param rect
* another rectangle
- * @return
- * the position of rect compared with reference
- * Returned values can be :
+ * @return the position of rect compared with reference Returned values can
+ * be :
* <ul>
* <li> {@link PositionConstants#NORTH}</li>
* <li> {@link PositionConstants#SOUTH}</li>
@@ -518,116 +519,116 @@ public class LayoutUtils {
* <li> {@link PositionConstants#SOUTH_EAST}</li>
* <li> {@link PositionConstants#SOUTH_WEST}</li>
* </ul>
- * If the 2 Rectangles intersect between them, the answer will be one of NORTH_EAST or SOUTH_EAST or NORTH_WEST or SOUTH_WEST
+ * If the 2 Rectangles intersect between them, the answer will be
+ * one of NORTH_EAST or SOUTH_EAST or NORTH_WEST or SOUTH_WEST
*/
public static int getRelativePositionFor(PrecisionRectangle reference, PrecisionRectangle rect, PrecisionRectangle diagramBounds) {
- // | |
- // NOTHING | NORTH |NOTHING
- // | |
- //----------------- +-+-+-+-+-+-+-+-+-+-+-+-+ --------------------
- // | |
- // + +
- // | |
- // WEST + REFERENCE + EAST
- // | |
- // + +
- // | |
- //----------------- +-+-+-+-+-+-+-+-+-+-+-+-+ -------------------
- // NOTHING | |NOTHING
- // SOUTH
+ // | |
+ // NOTHING | NORTH |NOTHING
+ // | |
+ // ----------------- +-+-+-+-+-+-+-+-+-+-+-+-+ --------------------
+ // | |
+ // + +
+ // | |
+ // WEST + REFERENCE + EAST
+ // | |
+ // + +
+ // | |
+ // ----------------- +-+-+-+-+-+-+-+-+-+-+-+-+ -------------------
+ // NOTHING | |NOTHING
+ // SOUTH
PrecisionRectangle pos = new PrecisionRectangle();
- //NORTH
+ // NORTH
pos.setX(reference.preciseX());
pos.setY(0);
pos.setHeight(reference.preciseY());
pos.setWidth(reference.preciseWidth());
if(pos.intersects(rect)) {
- return PositionConstants.NORTH;//1
+ return PositionConstants.NORTH;// 1
}
- //SOUTH
+ // SOUTH
pos.setX(reference.preciseX());
pos.setY(reference.getBottom().preciseY());
pos.setHeight(diagramBounds.preciseHeight() - reference.getBottom().preciseY());
pos.setWidth(reference.preciseWidth());
if(pos.intersects(rect)) {
- return PositionConstants.SOUTH;//4
+ return PositionConstants.SOUTH;// 4
}
- //EAST
+ // EAST
pos.setX(reference.getRight().preciseX());
pos.setY(reference.getTop().preciseY());
pos.setHeight(reference.preciseHeight());
pos.setWidth(diagramBounds.preciseWidth() - reference.getLeft().preciseY());
if(pos.intersects(rect)) {
- return PositionConstants.EAST;//16
+ return PositionConstants.EAST;// 16
}
- //WEST
+ // WEST
pos.setX(0);
pos.setY(reference.preciseY());
pos.setHeight(reference.preciseHeight());
pos.setWidth(reference.preciseX());
if(pos.intersects(rect)) {
- return PositionConstants.WEST;//8
+ return PositionConstants.WEST;// 8
}
- // |
- // NORTH-WEST | NORTH-EAST
- // |
- // |
- // |
- // +-+-+-+-+-+-+-+-+-+-+-+-+
- // | | |
- // + REF | REF +
- // | | |
- // --------------- + ----------+---------- + ----------------------
- // | | |
- // + REF | REF +
- // | | |
- // +-+-+-+-+-+-+-+-+-+-+-+-+
- // |
- // SOUTH-WEST | SOUTH-EAST
- // |
- // |
- // |
-
-
- //NORTH_EAST
+ // |
+ // NORTH-WEST | NORTH-EAST
+ // |
+ // |
+ // |
+ // +-+-+-+-+-+-+-+-+-+-+-+-+
+ // | | |
+ // + REF | REF +
+ // | | |
+ // --------------- + ----------+---------- + ----------------------
+ // | | |
+ // + REF | REF +
+ // | | |
+ // +-+-+-+-+-+-+-+-+-+-+-+-+
+ // |
+ // SOUTH-WEST | SOUTH-EAST
+ // |
+ // |
+ // |
+
+ // NORTH_EAST
pos.setX(reference.getTop().preciseX());
pos.setY(0);
pos.setHeight(reference.getRight().preciseY());
pos.setWidth(diagramBounds.preciseWidth() - reference.getTop().preciseX());
if(pos.intersects(rect)) {
- return PositionConstants.NORTH_EAST;//17
+ return PositionConstants.NORTH_EAST;// 17
}
- //NORTH_WEST
+ // NORTH_WEST
pos = new PrecisionRectangle();
pos.setX(0);
pos.setY(0);
pos.setHeight(reference.getLeft().preciseY());
pos.setWidth(reference.getTop().preciseX());
if(pos.intersects(rect)) {
- return PositionConstants.NORTH_WEST;//9
+ return PositionConstants.NORTH_WEST;// 9
}
- //SOUTH_EAST
+ // SOUTH_EAST
pos = new PrecisionRectangle();
pos.setX(reference.getBottom().preciseX());
pos.setY(reference.getRight().preciseY());
pos.setHeight(diagramBounds.preciseHeight() - reference.getRight().preciseY());
pos.setWidth(diagramBounds.preciseWidth() - reference.getBottom().preciseX());
if(pos.intersects(rect)) {
- return PositionConstants.SOUTH_EAST;//20
+ return PositionConstants.SOUTH_EAST;// 20
}
- //SOUTH_WEST
+ // SOUTH_WEST
pos = new PrecisionRectangle();
pos.setX(0);
pos.setY(reference.getLeft().preciseY());
pos.setHeight(diagramBounds.preciseHeight() - reference.getLeft().preciseY());
pos.setWidth(reference.getBottom().preciseX());
if(pos.intersects(rect)) {
- return PositionConstants.SOUTH_WEST;//12
+ return PositionConstants.SOUTH_WEST;// 12
}
Activator.log("I can't find the relative position for " + rect + " compared to " + reference + " ."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LinkRepresentation.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LinkRepresentation.java
index 01c7649bc64..97ef423198e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LinkRepresentation.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LinkRepresentation.java
@@ -21,8 +21,9 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
/**
*
- * This class is used to represent a link, to allow an alignment action.
- * Its provides fields to store the sources and the target and methods to do the needed action to align the link extremities.
+ * This class is used to represent a link, to allow an alignment action. Its
+ * provides fields to store the sources and the target and methods to do the
+ * needed action to align the link extremities.
*
* This alignment align the two anchors of a link. To do this, only one {@link EditPart} can moves.
*
@@ -77,8 +78,7 @@ public class LinkRepresentation {
/**
* Getter for {@link #link}
*
- * @return
- * {@link #link}
+ * @return {@link #link}
*/
public EditPart getLink() {
return this.link;
@@ -87,8 +87,7 @@ public class LinkRepresentation {
/**
* Getter for {@link #source}
*
- * @return
- * {@link #source}
+ * @return {@link #source}
*/
public EditPartRepresentation getSource() {
return this.source;
@@ -97,8 +96,7 @@ public class LinkRepresentation {
/**
* Getter for {@link #target}
*
- * @return
- * {@link #target}
+ * @return {@link #target}
*/
public EditPartRepresentation getTarget() {
return this.target;
@@ -107,8 +105,7 @@ public class LinkRepresentation {
/**
* Returns the command to align the node with a common link
*
- * @return
- * the command to align the node with a common link
+ * @return the command to align the node with a common link
*/
public Command getCommand() {
initializeReferences();
@@ -116,27 +113,25 @@ public class LinkRepresentation {
CompoundCommand command = new CompoundCommand("Align with a link"); //$NON-NLS-1$
Command cmd;
- //the command to align the node
+ // the command to align the node
cmd = movedEditPart.getCommand();
if(cmd != null && cmd.canExecute()) {
command.add(cmd);
}
-
- //the command to reset the anchor location
+ // the command to reset the anchor location
cmd = preserveAnchorLocationCommand();
if(cmd.canExecute()) {
command.add(cmd);
}
- //we want zero bendpoint, and keep the current source and target
+ // we want zero bendpoint, and keep the current source and target
Request onlyTwoBendpoints = new SetAllBendpointRequest(org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants.REQ_SET_ALL_BENDPOINT, new PointList(), null, null);
command.add(link.getCommand(onlyTwoBendpoints));
return command;
}
-
/**
* Builds the requests for this {@link LinkRepresentation}
*/
@@ -148,32 +143,31 @@ public class LinkRepresentation {
/* we calculate the shift for the editpart */
switch(this.align) {
- case PositionConstants.LEFT://it's the left figure we move
+ case PositionConstants.LEFT:// it's the left figure we move
shift = referencePoint.y - movedPoint.y;
movedPoint.y += shift;
newLocation.setLocation(newLocation.x, newLocation.y + shift);
break;
- case PositionConstants.RIGHT://it's the right figure we move
+ case PositionConstants.RIGHT:// it's the right figure we move
shift = referencePoint.y - movedPoint.y;
movedPoint.y += shift;
newLocation.setLocation(newLocation.x, newLocation.y + shift);
break;
- case PositionConstants.TOP://it's the top figure we move
+ case PositionConstants.TOP:// it's the top figure we move
shift = referencePoint.x - movedPoint.x;
movedPoint.x += shift;
newLocation.setLocation(newLocation.x + shift, newLocation.y);
break;
- case PositionConstants.BOTTOM://it's the bottom figure we move
+ case PositionConstants.BOTTOM:// it's the bottom figure we move
shift = referencePoint.x - movedPoint.x;
movedPoint.x += shift;
newLocation.setLocation(newLocation.x + shift, newLocation.y);
break;
}
-
- //we correct the location to avoid the scrollbar!
- //the parent bounds
+ // we correct the location to avoid the scrollbar!
+ // the parent bounds
PrecisionRectangle parentBounds = LayoutUtils.getAbsolutePosition(movedEditPart.getRepresentedEditPart().getParent());
if(this.align == PositionConstants.LEFT || this.align == PositionConstants.RIGHT) {
if((newLocation.y < (parentBounds.y + LayoutUtils.scrollBarSize)) && (shift < 0)) {
@@ -189,8 +183,7 @@ public class LinkRepresentation {
}
}
-
- //request creation
+ // request creation
ChangeBoundsRequest req = new ChangeBoundsRequest(RequestConstants.REQ_MOVE);
req.setEditParts(movedEditPart.getRepresentedEditPart());
@@ -210,37 +203,49 @@ public class LinkRepresentation {
* <li> {@link #movedPoint}</li>
* </ul>
*
- * It determines the reference point and the reference editpart for the alignment
+ * It determines the reference point and the reference editpart for the
+ * alignment
*/
protected void initializeReferences() {
PrecisionRectangle absolutePositionSource = LayoutUtils.getAbsolutePosition(source.getRepresentedEditPart());
PrecisionRectangle absolutePositionTarget = LayoutUtils.getAbsolutePosition(target.getRepresentedEditPart());
-
switch(this.align) {
case PositionConstants.LEFT:
- if(absolutePositionSource.preciseX < absolutePositionTarget.preciseX) {//the left node moves
+ if(absolutePositionSource.preciseX < absolutePositionTarget.preciseX) {// the
+ // left
+ // node
+ // moves
fixedEditPart = target;
} else {
fixedEditPart = source;
}
break;
case PositionConstants.RIGHT:
- if(absolutePositionSource.preciseX > absolutePositionTarget.preciseX) {//the right node moves
+ if(absolutePositionSource.preciseX > absolutePositionTarget.preciseX) {// the
+ // right
+ // node
+ // moves
fixedEditPart = target;
} else {
fixedEditPart = source;
}
break;
case PositionConstants.TOP:
- if(absolutePositionSource.preciseY < absolutePositionTarget.preciseY) {//the top node moves
+ if(absolutePositionSource.preciseY < absolutePositionTarget.preciseY) {// the
+ // top
+ // node
+ // moves
fixedEditPart = target;
} else {
fixedEditPart = source;
}
break;
case PositionConstants.BOTTOM:
- if(absolutePositionSource.preciseY > absolutePositionTarget.preciseY) {//the bottom node moves
+ if(absolutePositionSource.preciseY > absolutePositionTarget.preciseY) {// the
+ // bottom
+ // node
+ // moves
fixedEditPart = target;
} else {
fixedEditPart = source;
@@ -260,7 +265,9 @@ public class LinkRepresentation {
movedPoint = figure.getStart();
}
- //we move the reference point with its delta. This delta comes from another shift, were the editpart was the moved editpart and not the reference
+ // we move the reference point with its delta. This delta comes from
+ // another shift, were the editpart was the moved editpart and not the
+ // reference
Dimension delta = fixedEditPart.getMoveDelta();
referencePoint.translate(delta);
@@ -271,8 +278,7 @@ public class LinkRepresentation {
/**
* Returns the side on which the anchor is on the {@link #source}
*
- * @return
- * the side on which the anchor is on the {@link #source}
+ * @return the side on which the anchor is on the {@link #source}
*/
public int getLinkSideOnSource() {
@@ -285,8 +291,7 @@ public class LinkRepresentation {
/**
* Returns the side on which the anchor is on the {@link #target}
*
- * @return
- * the side on which the anchor is on the {@link #target}
+ * @return the side on which the anchor is on the {@link #target}
*/
public int getLinkSideOnTarget() {
@@ -297,12 +302,13 @@ public class LinkRepresentation {
}
/**
- * Creates and returns the command to reset the connection anchors after alignment to their initial location
+ * Creates and returns the command to reset the connection anchors after
+ * alignment to their initial location
*
*
*
- * @return
- * the command to reset the connection anchors to their initial location after the node shifting
+ * @return the command to reset the connection anchors to their initial
+ * location after the node shifting
*
*/
protected Command preserveAnchorLocationCommand() {
@@ -310,7 +316,7 @@ public class LinkRepresentation {
Command cmd;
if(movedEditPart == source) {
- //the moved editpart is the source
+ // the moved editpart is the source
ReconnectRequest reconnectRequest = new ReconnectRequest();
reconnectRequest.setType(GraphicalNodeEditPolicy.REQ_RECONNECT_SOURCE);
reconnectRequest.setConnectionEditPart((ConnectionEditPart)this.link);
@@ -319,7 +325,7 @@ public class LinkRepresentation {
cmd = source.getRepresentedEditPart().getCommand(reconnectRequest);
command.add(cmd);
- //the fixed editpart is the target
+ // the fixed editpart is the target
ReconnectRequest reconnectRequestTarget = new ReconnectRequest();
reconnectRequestTarget.setType(GraphicalNodeEditPolicy.REQ_RECONNECT_TARGET);
reconnectRequestTarget.setConnectionEditPart((ConnectionEditPart)this.link);
@@ -328,7 +334,7 @@ public class LinkRepresentation {
cmd = target.getRepresentedEditPart().getCommand(reconnectRequestTarget);
command.add(cmd);
} else {
- //the moved editpart is the target
+ // the moved editpart is the target
ReconnectRequest reconnectRequest = new ReconnectRequest();
reconnectRequest.setType(GraphicalNodeEditPolicy.REQ_RECONNECT_TARGET);
reconnectRequest.setConnectionEditPart((ConnectionEditPart)this.link);
@@ -337,7 +343,7 @@ public class LinkRepresentation {
cmd = target.getRepresentedEditPart().getCommand(reconnectRequest);
command.add(cmd);
- //the fixed editpart is the source
+ // the fixed editpart is the source
ReconnectRequest reconnectRequestTarget = new ReconnectRequest();
reconnectRequestTarget.setType(GraphicalNodeEditPolicy.REQ_RECONNECT_SOURCE);
reconnectRequestTarget.setConnectionEditPart((ConnectionEditPart)this.link);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LinkRepresentationForLayoutAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LinkRepresentationForLayoutAction.java
index 8b150cce40e..3e57aa4ff24 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LinkRepresentationForLayoutAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LinkRepresentationForLayoutAction.java
@@ -77,16 +77,14 @@ public class LinkRepresentationForLayoutAction {
Assert.isTrue(fig instanceof PolylineConnectionEx);
PolylineConnectionEx linkFigure = (PolylineConnectionEx)fig;
- Point start = linkFigure.getStart();//source
- Point end = linkFigure.getEnd();//target
+ Point start = linkFigure.getStart();// source
+ Point end = linkFigure.getEnd();// target
linkFigure.translateToAbsolute(start);
linkFigure.translateToAbsolute(end);
oldSourcePosition = start;
oldTargetPosition = end;
}
-
-
/**
*
* @see java.lang.Object#toString()
@@ -98,18 +96,15 @@ public class LinkRepresentationForLayoutAction {
return ((View)(link.getModel())).getElement().toString();
}
-
-
/**
* Return the command to move this link, following {@link #newSourcePosition} and {@link #newTargetPosition}
*
- * @return
- * the command to move this link, following {@link #newSourcePosition} and {@link #newTargetPosition}
+ * @return the command to move this link, following {@link #newSourcePosition} and {@link #newTargetPosition}
*/
public Command getCommand() {
/*
- * Sometimes, the anchors of the link move on the diagram, even if the location is the same!
- * see GMF bug 324208
+ * Sometimes, the anchors of the link move on the diagram, even if the
+ * location is the same! see GMF bug 324208
*/
if((newSourcePosition == null && newTargetPosition == null) || (oldSourcePosition.equals(newSourcePosition)) && oldTargetPosition.equals(newTargetPosition)) {
return new EMFtoGEFCommandWrapper(new IdentityCommand());
@@ -124,8 +119,7 @@ public class LinkRepresentationForLayoutAction {
/**
* Returns the request to move the source anchor.
*
- * @return
- * the request to move the source anchor.
+ * @return the request to move the source anchor.
*/
public Request getRequestForSource() {
ReconnectRequest request = new ReconnectRequest(GraphicalNodeEditPolicy.REQ_RECONNECT_SOURCE);
@@ -138,8 +132,7 @@ public class LinkRepresentationForLayoutAction {
/**
* Return the source location to move this link
*
- * @return
- * the source location to move this link
+ * @return the source location to move this link
* <ul>
* <li> {@link #newSourcePosition} if not <code>null</code></li>
* <li>{@link #oldSourcePosition} if {@link #newSourcePosition} is <code>null</code></li>
@@ -156,8 +149,7 @@ public class LinkRepresentationForLayoutAction {
/**
* Return the target location to move this link
*
- * @return
- * the target location to move this link
+ * @return the target location to move this link
* <ul>
* <li> {@link #newTargetPosition} if not <code>null</code></li>
* <li>{@link #oldTargetPosition} if {@link #newTargetPosition} is <code>null</code></li>
@@ -189,13 +181,10 @@ public class LinkRepresentationForLayoutAction {
}
}
-
-
/**
* Returns the request to relocate the fixed anchor.
*
- * @return
- * The request to locate the fixed anchor.
+ * @return The request to locate the fixed anchor.
*/
public Request getRequestForTarget() {
ReconnectRequest request = new ReconnectRequest(GraphicalNodeEditPolicy.REQ_RECONNECT_TARGET);
@@ -224,7 +213,6 @@ public class LinkRepresentationForLayoutAction {
return 0;
}
-
/**
* Gets the represented link.
*
@@ -234,14 +222,14 @@ public class LinkRepresentationForLayoutAction {
return this.link;
}
-
/**
- * Return a PrecisionRectangle representing the current position of the anchor on this node (with width=height=1)
+ * Return a PrecisionRectangle representing the current position of the
+ * anchor on this node (with width=height=1)
*
* @param node
* node should be the source or the target of the link
- * @return
- * A PrecisionRectangle representing the current position of the anchor on this node (with width=height=1)
+ * @return A PrecisionRectangle representing the current position of the
+ * anchor on this node (with width=height=1)
*/
public PrecisionRectangle getAbsolutePositionOn(EditPart node) {
PrecisionRectangle rect = new PrecisionRectangle();
@@ -258,14 +246,12 @@ public class LinkRepresentationForLayoutAction {
return rect;
}
-
/**
* Return the current absolute location of the anchor on this node
*
* @param node
* node should be the source or the target of the link
- * @return
- * the current absolute location of the anchor on this node
+ * @return the current absolute location of the anchor on this node
*/
public Point getAbsoluteLocationOn(EditPart node) {
if(source == node) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/OverlayLocator.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/OverlayLocator.java
index 48340c8d868..d52711b0edf 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/OverlayLocator.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/OverlayLocator.java
@@ -23,8 +23,8 @@ import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget.Di
/**
*
- * A locator to add an overlay to an IFigure.
- * The Overlay can be located following theses value :
+ * A locator to add an overlay to an IFigure. The Overlay can be located
+ * following theses value :
* <ul>
* <li> {@link Direction#NORTH}</li>
* <li> {@link Direction#NORTH_EAST}</li>
@@ -81,7 +81,6 @@ public class OverlayLocator implements Locator {
int height = target.getBounds().height;
int halfHeight = height / 2;
-
if(Direction.NORTH_WEST.equals(this.position)) {
target.setLocation(bounds.getTopLeft().getTranslated(-halfWidth, -halfHeight));
} else if(Direction.NORTH.equals(this.position)) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/RoutingConstants.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/RoutingConstants.java
index 7fe85817e78..1146b61e8a1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/RoutingConstants.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/RoutingConstants.java
@@ -40,7 +40,9 @@ public class RoutingConstants {
/** id for the vertical routing moving the left anchor for popup menu action */
public static final String ROUTING_HORIZONTALLY_BY_LEFT_ACTION = "org.eclipse.papyrus.diagram.common.routing_horizontally_by_left_action";; //$NON-NLS-1$
- /** id for the vertical routing moving the right anchor for popup menu action */
+ /**
+ * id for the vertical routing moving the right anchor for popup menu action
+ */
public static final String ROUTING_HORIZONTALLY_BY_RIGHT_ACTION = "org.eclipse.papyrus.diagram.common.routing_horizontally_by_right_action"; //$NON-NLS-1$
/** id for the vertical routing moving the top anchor for popup menu action */
@@ -106,6 +108,4 @@ public class RoutingConstants {
/** Tooltip message for horizontal routing by bottom */
public static String RouteVerticallyByBottomToolTipText = RouteVerticallyByBottom;
-
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/SameAlignment.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/SameAlignment.java
index 97d2e3ba549..e0355c2681e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/SameAlignment.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/SameAlignment.java
@@ -28,7 +28,8 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
/**
*
- * This class allows to regroup all the nodes which are linked by the selected links.
+ * This class allows to regroup all the nodes which are linked by the selected
+ * links.
*
*/
public class SameAlignment {
@@ -57,15 +58,19 @@ public class SameAlignment {
/**
* Returns the command to align all the selected {@linkplain EditPart}
*
- * @return
- * the command to align all the selected {@linkplain EditPart}
+ * @return the command to align all the selected {@linkplain EditPart}
*/
public Command getCommand() {
Collections.sort(linksRepresentation, new LinkComparator());
- if(this.alignment == PositionConstants.RIGHT || this.alignment == PositionConstants.BOTTOM) {//we need to inverse the selection to do the correct action
+ if(this.alignment == PositionConstants.RIGHT || this.alignment == PositionConstants.BOTTOM) {// we need to
+ // inverse the
+ // selection to
+ // do the
+ // correct
+ // action
Collections.reverse(linksRepresentation);
}
- //we remove the selected link which are not interesting
+ // we remove the selected link which are not interesting
removeBadSideLink();
CompoundCommand cmd = new CompoundCommand("command for alignment"); //$NON-NLS-1$
@@ -81,14 +86,12 @@ public class SameAlignment {
return cmd;
}
-
/**
* Returns a list with the link linked to the {@link EditPartRepresentation} {@code epRepresentation}
*
* @param epRepresentation
* an {@linkplain EditPartRepresentation}
- * @return
- * a list with the link linked to the {@link EditPartRepresentation} {@code epRepresentation}
+ * @return a list with the link linked to the {@link EditPartRepresentation} {@code epRepresentation}
*/
protected List<LinkRepresentation> getLinkFor(EditPartRepresentation epRepresentation) {
List<LinkRepresentation> list = new ArrayList<LinkRepresentation>();
@@ -103,8 +106,7 @@ public class SameAlignment {
/**
* Tests if each editpart is linked with only one or two other editparts
*
- * @return
- * <ul>
+ * @return <ul>
* <li>{@code true}</li> all the node are linked with only one or two other editparts
* <li> {@code false}</li> if not
*
@@ -177,8 +179,7 @@ public class SameAlignment {
/**
* Getter for {@link #linksRepresentation}
*
- * @return
- * {@link #linksRepresentation}
+ * @return {@link #linksRepresentation}
*/
public List<LinkRepresentation> getLinks() {
return this.linksRepresentation;
@@ -188,8 +189,7 @@ public class SameAlignment {
*
* @param representedEditPart
* the {@linkplain EditPart} that we are looking for
- * @return
- * <ul>
+ * @return <ul>
* <li>the {@linkplain EditPartRepresentation} for this editpart if it exists</li>
* <li>{@code null}if the representation for this editpart doesn't exist</li>
* </ul>
@@ -214,7 +214,7 @@ public class SameAlignment {
protected void removeBadSideLink() {
List<LinkRepresentation> linksToRemove = new ArrayList<LinkRepresentation>();
- //we test if the tow anchors for the selected link are opposite or not
+ // we test if the tow anchors for the selected link are opposite or not
for(LinkRepresentation link : linksRepresentation) {
int side1 = link.getLinkSideOnSource();
int side2 = link.getLinkSideOnTarget();
@@ -237,7 +237,8 @@ public class SameAlignment {
/**
*
- * This class provides a comparator for the {@link EditPart}, using the coordinates of the representing {@link EditPart} The used coordinate is
+ * This class provides a comparator for the {@link EditPart}, using the
+ * coordinates of the representing {@link EditPart} The used coordinate is
* the top left corner
*/
protected class LinkComparator implements Comparator<Object> {
@@ -252,19 +253,19 @@ public class SameAlignment {
* @return
*/
public int compare(Object o1, Object o2) {
- //the two figures to compare
+ // the two figures to compare
PolylineConnectionEx figure1 = (PolylineConnectionEx)((AbstractConnectionEditPart)((LinkRepresentation)o1).getLink()).getFigure();
PolylineConnectionEx figure2 = (PolylineConnectionEx)((AbstractConnectionEditPart)((LinkRepresentation)o2).getLink()).getFigure();
- //the point for the first figure
+ // the point for the first figure
Point pt11;
Point pt12;
- //the point for the second figure
+ // the point for the second figure
Point pt21;
Point pt22;
- //we want pt11.x<pt12.x<pt21.x<pt22.x
+ // we want pt11.x<pt12.x<pt21.x<pt22.x
if(alignment == PositionConstants.LEFT || alignment == PositionConstants.RIGHT) {
pt11 = (figure1.getStart().x < figure1.getEnd().x) ? figure1.getStart() : figure1.getEnd();
if(pt11.equals(figure1.getStart())) {
@@ -287,10 +288,9 @@ public class SameAlignment {
} else if(pt11.x > pt21.x && pt12.x > pt22.x) {
return 1;
} else {
- return 0; //it's a strange model, if we come here
+ return 0; // it's a strange model, if we come here
}
-
} else if(alignment == PositionConstants.TOP || alignment == PositionConstants.BOTTOM) {
pt11 = (figure1.getStart().y < figure1.getEnd().y) ? figure1.getStart() : figure1.getEnd();
if(pt11.equals(figure1.getStart())) {
@@ -312,7 +312,7 @@ public class SameAlignment {
} else if(pt11.y > pt21.y && pt12.y > pt22.y) {
return 1;
} else {
- return 0; //it's a strange model, if we come here
+ return 0; // it's a strange model, if we come here
}
}
@@ -320,6 +320,4 @@ public class SameAlignment {
}
}
-
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/listeners/DropTargetListener.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/listeners/DropTargetListener.java
index f023eebadb8..6589217cb59 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/listeners/DropTargetListener.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/listeners/DropTargetListener.java
@@ -43,7 +43,8 @@ public abstract class DropTargetListener extends DiagramDropTargetListener {
protected List<EObject> getObjectsBeingDropped() {
// get objects from transfer
TransferData data = getCurrentEvent().currentDataType;
- ArrayList<URI> uris = new ArrayList<URI>(); //Array list to keep the order of the selection
+ ArrayList<URI> uris = new ArrayList<URI>(); // Array list to keep the
+ // order of the selection
Object transferedObject = getJavaObject(data);
if(transferedObject instanceof IStructuredSelection) {
@@ -51,7 +52,8 @@ public abstract class DropTargetListener extends DiagramDropTargetListener {
for(Iterator<?> it = selection.iterator(); it.hasNext();) {
Object nextSelectedObject = it.next();
// if (nextSelectedObject instanceof UMLNavigatorItem) {
- // View view = ((UMLNavigatorItem) nextSelectedObject).getView();
+ // View view = ((UMLNavigatorItem)
+ // nextSelectedObject).getView();
// nextSelectedObject = view.getElement();
// } else
if(nextSelectedObject instanceof IAdaptable) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/listeners/RemoveStereotypeApplicationListener.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/listeners/RemoveStereotypeApplicationListener.java
index d13ecefe556..bf24db17375 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/listeners/RemoveStereotypeApplicationListener.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/listeners/RemoveStereotypeApplicationListener.java
@@ -24,9 +24,9 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.papyrus.core.listenerservice.IPapyrusListener;
import org.eclipse.uml2.uml.util.UMLUtil;
-
/**
- * this class is used to listen remove element and has in charge to remove application of stereotype that are not used
+ * this class is used to listen remove element and has in charge to remove
+ * application of stereotype that are not used
*
*/
public class RemoveStereotypeApplicationListener implements IPapyrusListener {
@@ -45,16 +45,16 @@ public class RemoveStereotypeApplicationListener implements IPapyrusListener {
public void notifyChanged(Notification notification) {
Resource resource = null;
ArrayList<DynamicEObjectImpl> appliedstereotypeToRemove = new ArrayList<DynamicEObjectImpl>();
- //listen remove and Set notification
+ // listen remove and Set notification
if(notification.getEventType() == Notification.REMOVE || notification.getEventType() == Notification.SET) {
- //listen if the the notifier is an eObject
+ // listen if the the notifier is an eObject
if(notification.getNotifier() instanceof EObject) {
resource = ((EObject)notification.getNotifier()).eResource();
if(resource != null) {
TreeIterator<EObject> iterator = resource.getAllContents();
- //look for applied stereotype without based element
+ // look for applied stereotype without based element
while(iterator.hasNext()) {
EObject eObject = (EObject)iterator.next();
if(eObject instanceof DynamicEObjectImpl && UMLUtil.getBaseElement(eObject) == null) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/AdvancedBorderItemLocator.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/AdvancedBorderItemLocator.java
index 1c845934aca..62fa6b69a8f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/AdvancedBorderItemLocator.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/AdvancedBorderItemLocator.java
@@ -19,8 +19,8 @@ import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
/**
- * this is a border item locator that can be used to place childreen where you want I order to
- * constraint movement and localization, specialize {@link ItemBorderLocagetValidLocation.getValidLocation}
+ * this is a border item locator that can be used to place childreen where you
+ * want I order to constraint movement and localization, specialize {@link ItemBorderLocagetValidLocation.getValidLocation}
*
* @author Patrick Tessier
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/ExternalLabelPositionLocator.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/ExternalLabelPositionLocator.java
index 14cf62317d8..66da35fa003 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/ExternalLabelPositionLocator.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/ExternalLabelPositionLocator.java
@@ -19,9 +19,9 @@ import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
/**
- * This class is used to constrain the position of ExternalNodeLabel.
- * The locator let the external node label be freely located by used anywhere around the
- * parent figure.
+ * This class is used to constrain the position of ExternalNodeLabel. The
+ * locator let the external node label be freely located by used anywhere around
+ * the parent figure.
*/
public class ExternalLabelPositionLocator implements IBorderItemLocator {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/PortPositionLocatorUtils.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/PortPositionLocatorUtils.java
index b98dddd6898..39475523149 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/PortPositionLocatorUtils.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/PortPositionLocatorUtils.java
@@ -27,11 +27,13 @@ import org.eclipse.draw2d.geometry.Rectangle;
public class PortPositionLocatorUtils {
/**
- * Get the valid border location of the Port with the proposed location on the parent.
+ * Get the valid border location of the Port with the proposed location on
+ * the parent.
* @param parentFigureBounds the parent bounds.
* @param proposedFigureBounds the proposed Port bounds.
* @param borderItemOffset the overlapping size of the Port over its parent figure.
- * @return the allowed bounds for the Port (location relative to parent TopLeft point).
+ * @return the allowed bounds for the Port (location relative to parent
+ * TopLeft point).
*/
public static Rectangle getBorderLocation(Rectangle parentFigureBounds, Rectangle proposedFigureBounds, int borderItemOffset) {
@@ -41,7 +43,8 @@ public class PortPositionLocatorUtils {
Rectangle parentRec = parentFigureBounds.getCopy();
- // Calculate Max position around the graphical parent (1/2 size or the port around
+ // Calculate Max position around the graphical parent (1/2 size or the
+ // port around
// the graphical parent bounds.
int xMin = - borderItemOffset;
int xMax = - borderItemOffset + parentRec.width;
@@ -65,7 +68,8 @@ public class PortPositionLocatorUtils {
realLocation.y = yMax;
}
- // Ensure the port is positioned on its parent borders and not in the middle.
+ // Ensure the port is positioned on its parent borders and not in the
+ // middle.
// Modify position if needed.
if((realLocation.y != yMin) && (realLocation.y != yMax)) {
if((realLocation.x != xMin) && (realLocation.x != xMax)) {
@@ -103,35 +107,38 @@ public class PortPositionLocatorUtils {
public static int getCurrentSideOfParent(Rectangle parentFigureBounds, Rectangle figureBounds, int borderItemOffset) {
int position = PositionConstants.NONE;
- //we are not on EAST, not on WEST, but we are on the NORTH
+ // we are not on EAST, not on WEST, but we are on the NORTH
if((figureBounds.x != parentFigureBounds.width - borderItemOffset) && (figureBounds.x != -borderItemOffset) && (figureBounds.y == -borderItemOffset)) {
position = PositionConstants.NORTH;
- //we are not on the EAST and not on the WEST, but we are on the SOUTH
+ // we are not on the EAST and not on the WEST, but we are on the
+ // SOUTH
} else if((figureBounds.x != parentFigureBounds.width - borderItemOffset) && (figureBounds.x != -borderItemOffset) && (figureBounds.y == parentFigureBounds.height - borderItemOffset)) {
position = PositionConstants.SOUTH;
- //we are on the EAST, but we are not on the NORTH and not on the SOUTH
+ // we are on the EAST, but we are not on the NORTH and not on the
+ // SOUTH
} else if((figureBounds.x == parentFigureBounds.width - borderItemOffset) && (figureBounds.y != -borderItemOffset) && (figureBounds.y != parentFigureBounds.height - borderItemOffset)) {
position = PositionConstants.EAST;
- //we are on the WEST, but we are not on the on the NORTH and not on the SOUTH
+ // we are on the WEST, but we are not on the on the NORTH and not on
+ // the SOUTH
} else if((figureBounds.x == -borderItemOffset) && (figureBounds.y != -borderItemOffset) && (figureBounds.y != parentFigureBounds.height - borderItemOffset)) {
position = PositionConstants.WEST;
- //we are on the NORTH and on the EAST
+ // we are on the NORTH and on the EAST
} else if((figureBounds.x == parentFigureBounds.width - borderItemOffset) && (figureBounds.y == -borderItemOffset)) {
position = PositionConstants.NORTH_EAST;
- //we are on the NORTH and on the WEST
+ // we are on the NORTH and on the WEST
} else if((figureBounds.x == -borderItemOffset) && (figureBounds.y == -borderItemOffset)) {
position = PositionConstants.NORTH_WEST;
- //we are on the EAST and on the SOUTH
+ // we are on the EAST and on the SOUTH
} else if((figureBounds.x == parentFigureBounds.width - borderItemOffset) && (figureBounds.y == parentFigureBounds.height - borderItemOffset)) {
position = PositionConstants.SOUTH_EAST;
- //we are on the WEST and on the SOUTH
+ // we are on the WEST and on the SOUTH
} else if((figureBounds.x == -borderItemOffset) && (figureBounds.y == parentFigureBounds.height - borderItemOffset)) {
position = PositionConstants.SOUTH_WEST;
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/TemplateBorderItemLocator.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/TemplateBorderItemLocator.java
index c4882f72d8e..9d0dbb41fad 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/TemplateBorderItemLocator.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/locator/TemplateBorderItemLocator.java
@@ -16,7 +16,6 @@ package org.eclipse.papyrus.diagram.common.locator;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.Rectangle;
-
/**
*
* This code comes form composite diagram. I was copied to avoid dependencies
@@ -39,9 +38,10 @@ import org.eclipse.draw2d.geometry.Rectangle;
* </pre>
*/
public class TemplateBorderItemLocator extends PortPositionLocator{
-
-
- /** the width of the area surrounding the parent figure where border item can be put */
+ /**
+ * the width of the area surrounding the parent figure where border item can
+ * be put
+ */
protected int borderItemOffset = 10;
public TemplateBorderItemLocator(IFigure parentFigure, int preferredSide) {
@@ -62,7 +62,8 @@ public class TemplateBorderItemLocator extends PortPositionLocator{
Rectangle parentRec = getParentFigure().getBounds().getCopy();
- // Calculate Max position around the graphical parent (1/2 size or the port around
+ // Calculate Max position around the graphical parent (1/2 size or the
+ // port around
// the graphical parent bounds.
int xMin = parentRec.x - borderItemOffset+parentRec.width/2;
int xMax = parentRec.x - borderItemOffset + parentRec.width;
@@ -86,7 +87,8 @@ public class TemplateBorderItemLocator extends PortPositionLocator{
realLocation.y = yMax;
}
- // Ensure the port is positioned on its parent borders and not in the middle.
+ // Ensure the port is positioned on its parent borders and not in the
+ // middle.
// Modify position if needed.
if((realLocation.y != yMin) && (realLocation.y != yMax)) {
if((realLocation.x != xMin) && (realLocation.x != xMax)) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/CommentParser.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/CommentParser.java
index 513cd9d9c36..8dad66ff95f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/CommentParser.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/CommentParser.java
@@ -32,7 +32,6 @@ import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.UMLPackage;
-
/**
* Specific Parser for the comment, in case they have a html format.
*/
@@ -107,7 +106,6 @@ public class CommentParser implements IParser {
// comment not null, comment not empty, do the parse...
-
return roughBody;
}
@@ -131,9 +129,9 @@ public class CommentParser implements IParser {
return ParserEditStatus.EDITABLE_STATUS;
}
-
/**
- * Get the property associated with the given IAdaptable and the memberEndIndex .
+ * Get the property associated with the given IAdaptable and the
+ * memberEndIndex .
*
* @param element
* the given IAdaptable
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/ConstraintParser.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/ConstraintParser.java
index f9db9f4567a..6d8c39d71b8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/ConstraintParser.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/ConstraintParser.java
@@ -193,10 +193,8 @@ public class ConstraintParser implements IParser, ISemanticParser {
Interval specif = (Interval)constraint.getSpecification();
command = new CompositeTransactionalCommand(editingDomain, "Set Value Constraint"); //$NON-NLS-1$
-
-
- LiteralInteger min =UMLFactory.eINSTANCE.createLiteralInteger();
- LiteralInteger max =UMLFactory.eINSTANCE.createLiteralInteger();
+ LiteralInteger min = UMLFactory.eINSTANCE.createLiteralInteger();
+ LiteralInteger max = UMLFactory.eINSTANCE.createLiteralInteger();
min.setName(NamedElementHelper.EINSTANCE.getNewUMLElementName(min, min.eClass()));
max.setName(NamedElementHelper.EINSTANCE.getNewUMLElementName(max, max.eClass()));
Integer minInt= new Integer(newString.substring(0, newString.indexOf("..")));
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/HTMLCleaner.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/HTMLCleaner.java
index 4030bdc93f9..c7bb4a23896 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/HTMLCleaner.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/HTMLCleaner.java
@@ -18,7 +18,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
/**
* Class that provides a html cleaner.
*/
@@ -187,7 +186,8 @@ public class HTMLCleaner {
if(c == '<') { // opening a new tag...
inTag = true;
- // should do specific check for new lines (<BR>, <P>, <H1>, <H2>, etc..)
+ // should do specific check for new lines (<BR>, <P>, <H1>,
+ // <H2>, etc..)
// get tag value
String tagValue = htmlString.substring(i + 1, htmlString.indexOf('>', i));
if(newLine.contains(tagValue)) {
@@ -198,7 +198,8 @@ public class HTMLCleaner {
keepWhitespace = false;
}
- } else if(c == '>' && inTag) { // closing tag. must be in tag to close it...
+ } else if(c == '>' && inTag) { // closing tag. must be in tag to
+ // close it...
inTag = false;
skip = true;
} else if(c == '&') {
@@ -207,7 +208,7 @@ public class HTMLCleaner {
// look for next ';', which closes the special character
String specialCharacter = htmlString.substring(i + 1, htmlString.indexOf(';', i));
- // replace the value with the specified
+ // replace the value with the specified
String replacement = specials.get(specialCharacter);
if(replacement == null) {
replacement = xmlSpecials.get(specialCharacter);
@@ -241,10 +242,12 @@ public class HTMLCleaner {
}
/**
- * Returns a string derived from the specified string. It removes htlm tags, adding new line separator when useful.
+ * Returns a string derived from the specified string. It removes htlm tags,
+ * adding new line separator when useful.
*
* @param htmlString
- * the string to clean. It should be neither <code>null</code>, nor empty
+ * the string to clean. It should be neither <code>null</code>,
+ * nor empty
* @return a cleaned string.
*/
public static String cleanHTMLTags(String htmlString) {
@@ -321,7 +324,7 @@ public class HTMLCleaner {
// look for next ';', which closes the special character
String specialCharacter = htmlString.substring(i + 1, htmlString.indexOf(';', i));
- // replace the value with the specified
+ // replace the value with the specified
String replacement = specials.get(specialCharacter);
if(replacement != null) {
buffer.append(replacement);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/assist/EObjectCompletionProcessor.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/assist/EObjectCompletionProcessor.java
index 7093ffc0595..ee2688561ab 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/assist/EObjectCompletionProcessor.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/assist/EObjectCompletionProcessor.java
@@ -30,8 +30,9 @@ import org.eclipse.swt.graphics.Point;
/**
* Computes completion proposals for given context EObject.
*
- * Intended to be used in case if the whole set of proposals does not depend on the suggested prefix
- * text and only filtering by given string prefix is required to compute the result list.
+ * Intended to be used in case if the whole set of proposals does not depend on
+ * the suggested prefix text and only filtering by given string prefix is
+ * required to compute the result list.
*/
public abstract class EObjectCompletionProcessor implements IContentAssistProcessor, ISubjectControlContentAssistProcessor {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/custom/AbstractAssociationEndParser.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/custom/AbstractAssociationEndParser.java
index 37b431f2e96..6e3638aa180 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/custom/AbstractAssociationEndParser.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/custom/AbstractAssociationEndParser.java
@@ -87,7 +87,8 @@ public abstract class AbstractAssociationEndParser implements IParser {
}
/**
- * Get the property associated with the given IAdaptable and the memberEndIndex .
+ * Get the property associated with the given IAdaptable and the
+ * memberEndIndex .
*
* @param element
* the given IAdaptable
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/custom/AssociationEndParser.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/custom/AssociationEndParser.java
index ff64084438d..c07d514d3e9 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/custom/AssociationEndParser.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/custom/AssociationEndParser.java
@@ -37,15 +37,20 @@ public class AssociationEndParser extends AbstractAssociationEndParser {
/**
* Test if the model changed on one of the following property's attributes :
* <ul>
- * <li>{@link org.eclipse.uml2.uml.UMLPackage#NAMED_ELEMENT__NAME <em>Name</em>}</li>
- * <li>{@link org.eclipse.uml2.uml.UMLPackage#PROPERTY__REDEFINED_PROPERTY <em>Redefined Property</em>}</li>
- * <li>{@link org.eclipse.uml2.uml.UMLPackage#PROPERTY__SUBSETTED_PROPERTY <em>Ordered Property </em>}</li>
+ * <li>{@link org.eclipse.uml2.uml.UMLPackage#NAMED_ELEMENT__NAME <em>Name </em>}</li>
+ * <li>{@link org.eclipse.uml2.uml.UMLPackage#PROPERTY__REDEFINED_PROPERTY
+ * <em>Redefined Property</em>}</li>
+ * <li>{@link org.eclipse.uml2.uml.UMLPackage#PROPERTY__SUBSETTED_PROPERTY
+ * <em>Ordered Property </em>}</li>
* <li>{@link org.eclipse.uml2.uml.UMLPackage#PROPERTY__IS_DERIVED <em>is Derived</em>}</li>
- * <li>{@link org.eclipse.uml2.uml.UMLPackage#PROPERTY__IS_DERIVED_UNION <em>is Derived Union </em>}</li>
+ * <li>{@link org.eclipse.uml2.uml.UMLPackage#PROPERTY__IS_DERIVED_UNION
+ * <em>is Derived Union </em>}</li>
* <li>{@link org.eclipse.uml2.uml.UMLPackage#PROPERTY__IS_ORDERED <em>is Ordered</em>}</li>
* <li>{@link org.eclipse.uml2.uml.UMLPackage#PROPERTY__IS_UNIQUE <em>is Unique</em>}</li>
- * <li>{@link org.eclipse.uml2.uml.UMLPackage#NAMED_ELEMENT__VISIBILITY <em>Visibility</em>}</li>
- * <li>{@link org.eclipse.uml2.uml.UMLPackage#STRUCTURAL_FEATURE__IS_READ_ONLY <em>is ReadOnly </em>}</li>
+ * <li>{@link org.eclipse.uml2.uml.UMLPackage#NAMED_ELEMENT__VISIBILITY <em> Visibility</em>}</li>
+ * <li>
+ * {@link org.eclipse.uml2.uml.UMLPackage#STRUCTURAL_FEATURE__IS_READ_ONLY
+ * <em>is ReadOnly </em>}</li>
* </ul> {@inheritDoc}
*/
public boolean isAffectingEvent(Object event, int flags) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/custom/AssociationMultiplicityParser.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/custom/AssociationMultiplicityParser.java
index cf59c85edbc..bfd81d56c15 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/custom/AssociationMultiplicityParser.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/custom/AssociationMultiplicityParser.java
@@ -54,7 +54,8 @@ public class AssociationMultiplicityParser extends AbstractAssociationEndParser
}
/**
- * Convert the int to a valid String to display. If the value is -1, then it is converted to *
+ * Convert the int to a valid String to display. If the value is -1, then it
+ * is converted to *
*
* @param val
* the int to convert to String
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/lookup/DefaultOclLookups.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/lookup/DefaultOclLookups.java
index 5fc61f43e14..4cf1d480ebf 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/lookup/DefaultOclLookups.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/parser/lookup/DefaultOclLookups.java
@@ -15,17 +15,17 @@ package org.eclipse.papyrus.diagram.common.parser.lookup;
public class DefaultOclLookups {
// @unused
- public static final String DEFAULT_TYPE_LOOKUP = "" + //
+ public static final String DEFAULT_TYPE_LOOKUP = "" + //
" let result : Set(Type) = Set{} in " + //
- " let pakkage : Package = self.getNearestPackage() in " + //
- " let siblings : Set(Type) = pakkage.ownedType in " + //
+ " let pakkage : Package = self.getNearestPackage() in " + //
+ " let siblings : Set(Type) = pakkage.ownedType in " + //
" let imports : Bag(Type) = " + //
" pakkage.elementImport->select( " + //
" importedElement.oclIsKindOf(Type) " + //
" and (importedElement.oclIsKindOf(Class) implies not importedElement.oclAsType(Class).isMetaclass()) " + //
" )->collect(" + //
" importedElement.oclAsType(Type)" + //
- " ) in " + //
+ " ) in " + //
" result->union(siblings)->union(imports->asSet()) ";
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/CachedResourcesDiagramEditor.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/CachedResourcesDiagramEditor.java
index 817a997bcd5..6a190c82be6 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/CachedResourcesDiagramEditor.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/CachedResourcesDiagramEditor.java
@@ -54,8 +54,8 @@ public abstract class CachedResourcesDiagramEditor extends DiagramDocumentEditor
}
/**
- * We want the EditingDomainRegistry to listen to editors closing. At each initialization we add
- * the EditingDomainRegistry as a PartListener.
+ * We want the EditingDomainRegistry to listen to editors closing. At each
+ * initialization we add the EditingDomainRegistry as a PartListener.
*
* @param site
* the site
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/CachedResourcesDocumentProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/CachedResourcesDocumentProvider.java
index 07a64ee7476..24efecd67d7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/CachedResourcesDocumentProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/CachedResourcesDocumentProvider.java
@@ -131,8 +131,10 @@ public class CachedResourcesDocumentProvider extends AbstractDocumentProvider im
* (non-Javadoc)
*
* @seeorg.eclipse.gmf.runtime.diagram.ui.resources.editor.document.
- * AbstractDocumentProvider#disposeElementInfo(java.lang.Object, org.eclipse.
- * gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider .ElementInfo)
+ * AbstractDocumentProvider#disposeElementInfo(java.lang.Object,
+ * org.eclipse.
+ * gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider
+ * .ElementInfo)
*/
@Override
protected void disposeElementInfo(Object element, ElementInfo info) {
@@ -547,9 +549,10 @@ public class CachedResourcesDocumentProvider extends AbstractDocumentProvider im
}
/**
- * The listener interface for receiving resourceSetModification events. The class that is
- * interested in processing a resourceSetModification event implements this interface, and the
- * object created with that class is registered with a component using the component's <code>addResourceSetModificationListener<code> method. When
+ * The listener interface for receiving resourceSetModification events. The
+ * class that is interested in processing a resourceSetModification event
+ * implements this interface, and the object created with that class is
+ * registered with a component using the component's <code>addResourceSetModificationListener<code> method. When
* the resourceSetModification event occurs, that object's appropriate
* method is invoked.
*
@@ -650,8 +653,9 @@ public class CachedResourcesDocumentProvider extends AbstractDocumentProvider im
}
/**
- * Sets up the given document as it would be provided for the given element. The content of the
- * document is not changed. This default implementation is empty. Subclasses may reimplement.
+ * Sets up the given document as it would be provided for the given element.
+ * The content of the document is not changed. This default implementation
+ * is empty. Subclasses may reimplement.
*/
protected void setupDocument(Object element, IDocument document) {
// for subclasses
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/CreateLinkToolBase.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/CreateLinkToolBase.java
index 18105e2c03b..480e44b0c8d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/CreateLinkToolBase.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/CreateLinkToolBase.java
@@ -47,7 +47,8 @@ public abstract class CreateLinkToolBase extends UnspecifiedTypeConnectionTool {
}
/**
- * Creates additional data that should be passed into IEditCommandRequest#parameters
+ * Creates additional data that should be passed into
+ * IEditCommandRequest#parameters
*
* @return not <code>null</code>
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/DiagramCanvasSwitch.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/DiagramCanvasSwitch.java
index d9d6a5f0e6f..bb0a43b985f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/DiagramCanvasSwitch.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/DiagramCanvasSwitch.java
@@ -39,8 +39,8 @@ public class DiagramCanvasSwitch {
}
/**
- * Gets the element to edit in a mutating canvas <Diagram>. By default, it's the canvas semantic
- * <EObject>.
+ * Gets the element to edit in a mutating canvas <Diagram>. By default, it's
+ * the canvas semantic <EObject>.
*
* @param editPolicy
* the edit policy
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/EditingDomainRegistry.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/EditingDomainRegistry.java
index 2eb912febb5..91d005b0424 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/EditingDomainRegistry.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/EditingDomainRegistry.java
@@ -269,7 +269,8 @@ public class EditingDomainRegistry extends HashMap<String, TransactionalEditingD
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.IPartListener2#partActivated(org.eclipse.ui.IWorkbenchPartReference)
+ * @see org.eclipse.ui.IPartListener2#partActivated(org.eclipse.ui.
+ * IWorkbenchPartReference)
*/
public void partActivated(IWorkbenchPartReference partRef) {
// nothing to do
@@ -278,7 +279,8 @@ public class EditingDomainRegistry extends HashMap<String, TransactionalEditingD
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.IPartListener2#partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference)
+ * @see org.eclipse.ui.IPartListener2#partBroughtToTop(org.eclipse.ui.
+ * IWorkbenchPartReference)
*/
public void partBroughtToTop(IWorkbenchPartReference partRef) {
// nothing to do
@@ -287,7 +289,8 @@ public class EditingDomainRegistry extends HashMap<String, TransactionalEditingD
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.IPartListener2#partClosed(org.eclipse.ui.IWorkbenchPartReference)
+ * @see org.eclipse.ui.IPartListener2#partClosed(org.eclipse.ui.
+ * IWorkbenchPartReference)
*/
public void partClosed(IWorkbenchPartReference partRef) {
cleanRegistry(partRef);
@@ -296,7 +299,8 @@ public class EditingDomainRegistry extends HashMap<String, TransactionalEditingD
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.IPartListener2#partDeactivated(org.eclipse.ui.IWorkbenchPartReference)
+ * @see org.eclipse.ui.IPartListener2#partDeactivated(org.eclipse.ui.
+ * IWorkbenchPartReference)
*/
public void partDeactivated(IWorkbenchPartReference partRef) {
// nothing to do
@@ -305,7 +309,8 @@ public class EditingDomainRegistry extends HashMap<String, TransactionalEditingD
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.IPartListener2#partHidden(org.eclipse.ui.IWorkbenchPartReference)
+ * @see org.eclipse.ui.IPartListener2#partHidden(org.eclipse.ui.
+ * IWorkbenchPartReference)
*/
public void partHidden(IWorkbenchPartReference partRef) {
// nothing to do
@@ -314,7 +319,8 @@ public class EditingDomainRegistry extends HashMap<String, TransactionalEditingD
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.IPartListener2#partInputChanged(org.eclipse.ui.IWorkbenchPartReference)
+ * @see org.eclipse.ui.IPartListener2#partInputChanged(org.eclipse.ui.
+ * IWorkbenchPartReference)
*/
public void partInputChanged(IWorkbenchPartReference partRef) {
cleanRegistry(partRef);
@@ -323,7 +329,8 @@ public class EditingDomainRegistry extends HashMap<String, TransactionalEditingD
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.IPartListener2#partOpened(org.eclipse.ui.IWorkbenchPartReference)
+ * @see org.eclipse.ui.IPartListener2#partOpened(org.eclipse.ui.
+ * IWorkbenchPartReference)
*/
public void partOpened(IWorkbenchPartReference partRef) {
// nothing to do
@@ -332,7 +339,8 @@ public class EditingDomainRegistry extends HashMap<String, TransactionalEditingD
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.IPartListener2#partVisible(org.eclipse.ui.IWorkbenchPartReference)
+ * @see org.eclipse.ui.IPartListener2#partVisible(org.eclipse.ui.
+ * IWorkbenchPartReference)
*/
public void partVisible(IWorkbenchPartReference partRef) {
// nothing to do
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PaletteMenuAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PaletteMenuAction.java
index ef9eb97bed8..33f78bc26fb 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PaletteMenuAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PaletteMenuAction.java
@@ -31,7 +31,8 @@ import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
/**
- * Action that builds the sub-menu for the palette viewer to configure the palettes seen or not
+ * Action that builds the sub-menu for the palette viewer to configure the
+ * palettes seen or not
*/
public class PaletteMenuAction extends Action implements IMenuCreator {
@@ -68,8 +69,8 @@ public class PaletteMenuAction extends Action implements IMenuCreator {
}
/**
- * Helper method that wraps the given action in an ActionContributionItem and then adds it to
- * the given menu.
+ * Helper method that wraps the given action in an ActionContributionItem
+ * and then adds it to the given menu.
*
* @param parent
* The menu to which the given action is to be added
@@ -82,7 +83,8 @@ public class PaletteMenuAction extends Action implements IMenuCreator {
}
/**
- * Creates and returns a list of actions that can toggle palette providers visiblity
+ * Creates and returns a list of actions that can toggle palette providers
+ * visiblity
*
* @return a list of actions that can toggle palette providers visiblity
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PaletteUtil.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PaletteUtil.java
index c88ac28de63..a3be4074cda 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PaletteUtil.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PaletteUtil.java
@@ -172,7 +172,8 @@ public class PaletteUtil {
}
/**
- * Default constructor. Should never be used, as method are static in this class.
+ * Default constructor. Should never be used, as method are static in this
+ * class.
*/
// @unused
private PaletteUtil() {
@@ -180,7 +181,8 @@ public class PaletteUtil {
}
/**
- * return tool entries for the given {@link PaletteContainer} and its sub-containers
+ * return tool entries for the given {@link PaletteContainer} and its
+ * sub-containers
*
* @param container
* the container that contains the ToolEntries
@@ -208,7 +210,8 @@ public class PaletteUtil {
* the root memento from which the memento is searched
* @param id
* the id of the memento to search
- * @return the memento with the given ID or <code>null</code> if no memento was found
+ * @return the memento with the given ID or <code>null</code> if no memento
+ * was found
*/
// @unused
public static IMemento getMemento(IMemento rootMemento, String id) {
@@ -254,7 +257,6 @@ public class PaletteUtil {
List<? extends PapyrusPaletteService.ProviderDescriptor> providers = (List<? extends ProviderDescriptor>)PapyrusPaletteService.getInstance().getProviders();
ContributeToPaletteOperation operation = new ContributeToPaletteOperation(part, part.getEditorInput(), root, new HashMap<Object, Object>());
-
// generate for each provider, according to priority
@SuppressWarnings("unchecked")
List<PapyrusPaletteService.ProviderDescriptor> providerList = (List<PapyrusPaletteService.ProviderDescriptor>)PapyrusPaletteService.getInstance().getProviders();
@@ -286,7 +288,6 @@ public class PaletteUtil {
List<? extends PapyrusPaletteService.ProviderDescriptor> providers = (List<? extends ProviderDescriptor>)PapyrusPaletteService.getInstance().getProviders();
ContributeToPaletteOperation operation = new ContributeToPaletteOperation(part, part.getEditorInput(), root, entries);
-
// generate for each provider, according to priority
@SuppressWarnings("unchecked")
List<PapyrusPaletteService.ProviderDescriptor> providerList = (List<PapyrusPaletteService.ProviderDescriptor>)PapyrusPaletteService.getInstance().getProviders();
@@ -341,14 +342,16 @@ public class PaletteUtil {
*
* @param stereotypeName
* the name of the stereotype to parse
- * @return the qualified name of the profile from the given stereotype qualified Name
+ * @return the qualified name of the profile from the given stereotype
+ * qualified Name
*/
public static String findProfileNameFromStereotypeName(String stereotypeName) {
return stereotypeName.substring(0, stereotypeName.lastIndexOf(NamedElement.SEPARATOR));
}
/**
- * Returns the list of profile Qualified Names String under a serialized form
+ * Returns the list of profile Qualified Names String under a serialized
+ * form
*
* @param list
* the list of profiles to serialize
@@ -414,7 +417,8 @@ public class PaletteUtil {
if(description != null) {
String requiredProfilesList = properties.get(IPapyrusPaletteConstant.PROFILE_LIST);
if(requiredProfilesList != null) {
- // parse requiredProfile string (profile1QN, profile2QN, etc.)
+ // parse requiredProfile string (profile1QN, profile2QN,
+ // etc.)
Set<String> requiredProfiles = PaletteUtil.getProfileSetFromString(requiredProfilesList);
for(String requiredProfileName : requiredProfiles) {
if(!appliedProfilesNames.contains(requiredProfileName)) {
@@ -447,7 +451,8 @@ public class PaletteUtil {
return true;
}
}
- // by default, returns true if the descriptor is not a local descriptor, as they do not use
+ // by default, returns true if the descriptor is not a local descriptor,
+ // as they do not use
// profile
return true;
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteContextMenuProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteContextMenuProvider.java
index 44f23a228b1..3179edc1eaa 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteContextMenuProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteContextMenuProvider.java
@@ -40,7 +40,8 @@ public class PapyrusPaletteContextMenuProvider extends PaletteContextMenuProvide
public void buildContextMenu(IMenuManager menu) {
super.buildContextMenu(menu);
- // adds a new action with sub-menu to display which providers must be displayed and which
+ // adds a new action with sub-menu to display which providers must be
+ // displayed and which
// ones should be hidden
menu.appendToGroup(GEFActionConstants.GROUP_REST, new PaletteMenuAction(getPaletteViewer()));
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteCustomizer.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteCustomizer.java
index 8f8f964531a..399aca203d9 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteCustomizer.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteCustomizer.java
@@ -58,7 +58,6 @@ public class PapyrusPaletteCustomizer extends PaletteCustomizerEx {
this.preferences = preferenceStore;
}
-
/**
* Returns the change parents
*
@@ -78,13 +77,16 @@ public class PapyrusPaletteCustomizer extends PaletteCustomizerEx {
applyCustomizations(rootMemento, paletteRoot, rootMemento);
}
- // must now clean the palette, as the element whose parent container is changed is not
+ // must now clean the palette, as the element whose parent container is
+ // changed is not
// removed from its old container...
// 1. ContainerA -< PaletteA, ContainerB
- // 2. apply customization => ContainerA -< PaletteA, ContainerB -< PaletteA (setParent =
+ // 2. apply customization => ContainerA -< PaletteA, ContainerB -<
+ // PaletteA (setParent =
// ContainerB)
// 3. clean => remove PaletteA from ContainerA.
- // issue => cannot modify the list of children of containerA in applyCustomization because
+ // issue => cannot modify the list of children of containerA in
+ // applyCustomization because
// of the iterator system (concurrent modification)
// so, clean palette using a specific method
// 4. goal: ContainerA, ContainerB -< PaletteA
@@ -99,14 +101,16 @@ public class PapyrusPaletteCustomizer extends PaletteCustomizerEx {
* @param paletteRoot
*/
protected void cleanPalette(PaletteContainer paletteContainer) {
- // copy children list, then iterate, so the original children list can be modified...
+ // copy children list, then iterate, so the original children list can
+ // be modified...
List<PaletteEntry> children = new ArrayList<PaletteEntry>(paletteContainer.getChildren().size());
for(Object o : paletteContainer.getChildren()) {
children.add((PaletteEntry)o);
}
for(PaletteEntry entry : children) {
- // if parent is not the correct one, delete this child from the children list
+ // if parent is not the correct one, delete this child from the
+ // children list
if(entry.getParent() != paletteContainer) {
paletteContainer.getChildren().remove(entry);
}
@@ -118,8 +122,8 @@ public class PapyrusPaletteCustomizer extends PaletteCustomizerEx {
}
/**
- * Creation factory method for the <code>IPaletteState</code>. Clients may override to provide
- * custom <code>IPaletteStates</code>.
+ * Creation factory method for the <code>IPaletteState</code>. Clients may
+ * override to provide custom <code>IPaletteStates</code>.
*
* @param entry
* the palette entry
@@ -129,7 +133,8 @@ public class PapyrusPaletteCustomizer extends PaletteCustomizerEx {
if(entry instanceof PaletteDrawer) {
return new PaletteDrawerState((PaletteDrawer)entry);
} else {
- // specific papyrus entry state. It manages at least the parent customization
+ // specific papyrus entry state. It manages at least the parent
+ // customization
return new PapyrusPaletteEntryState(entry);
}
}
@@ -145,7 +150,8 @@ public class PapyrusPaletteCustomizer extends PaletteCustomizerEx {
private HashMap<PaletteEntry, IPaletteState> paletteStates = new HashMap<PaletteEntry, IPaletteState>();
/**
- * the preference store in which the palette customizations are to be saved and retrieved from
+ * the preference store in which the palette customizations are to be saved
+ * and retrieved from
*/
private IPreferenceStore preferences;
@@ -157,7 +163,8 @@ public class PapyrusPaletteCustomizer extends PaletteCustomizerEx {
}
/**
- * Stores the palette state for a given palette entry if the state has not yet been stored.
+ * Stores the palette state for a given palette entry if the state has not
+ * yet been stored.
*
* @param entry
* the palette entry
@@ -218,27 +225,31 @@ public class PapyrusPaletteCustomizer extends PaletteCustomizerEx {
}
/**
- * Given the rootMemento, gets the memento that already exists for the palette entry or creates
- * a new one in the rootMemento (and the necessary palette container mementos) if one does not
- * exist yet. The root memento's tree structure matches that of the palette root. If a palette
- * entry in stack A, in drawer B is customized, the root memento will have a child memento for
- * drawer B which has a child memento for stack A which has a child memento for the entry. The
- * memento's use the palette entry's id.
+ * Given the rootMemento, gets the memento that already exists for the
+ * palette entry or creates a new one in the rootMemento (and the necessary
+ * palette container mementos) if one does not exist yet. The root memento's
+ * tree structure matches that of the palette root. If a palette entry in
+ * stack A, in drawer B is customized, the root memento will have a child
+ * memento for drawer B which has a child memento for stack A which has a
+ * child memento for the entry. The memento's use the palette entry's id.
*
* @param rootMemento
* the root memento representing the palette root
* @param paletteEntry
- * the palette entry for which a memento should be retrieved or created
- * @return returns the memento that already exists for the palette entry or creates a new one in
- * the rootMemento if one does not exist yet or null if the memento could not be created
- * (most likely because the palete id is not acceptable).
+ * the palette entry for which a memento should be retrieved or
+ * created
+ * @return returns the memento that already exists for the palette entry or
+ * creates a new one in the rootMemento if one does not exist yet or
+ * null if the memento could not be created (most likely because the
+ * palete id is not acceptable).
*/
private IMemento getMementoForEntry(IMemento rootMemento, PaletteEntry paletteEntry) {
ArrayList<String> idList = new ArrayList<String>();
idList.add(paletteEntry.getId());
- // modification of GMF code to have the parent. takes the default parent instead of the
+ // modification of GMF code to have the parent. takes the default parent
+ // instead of the
// actual one...
PaletteContainer parent = changedParents.get(paletteEntry);
if(parent == null) {
@@ -269,8 +280,8 @@ public class PapyrusPaletteCustomizer extends PaletteCustomizerEx {
}
/**
- * Recursive helper method to apply the palette customizations in a memento to a palette
- * container.
+ * Recursive helper method to apply the palette customizations in a memento
+ * to a palette container.
*
* @param containerMemento
* the mememto where the container's customizations are stored
@@ -283,7 +294,8 @@ public class PapyrusPaletteCustomizer extends PaletteCustomizerEx {
PaletteEntry entry = (PaletteEntry)iterator.next();
IMemento childMemento = containerMemento.getChild(entry.getId());
if(childMemento != null) {
- // check that the memento does not change the parent of the entry
+ // check that the memento does not change the parent of the
+ // entry
if(isChangingParent(entry, childMemento)) {
changedParents.put(entry, entry.getParent());
}
@@ -307,10 +319,11 @@ public class PapyrusPaletteCustomizer extends PaletteCustomizerEx {
}
/**
- * Retrieves the root memento from the workspace preferences if there were existing palette
- * customizations.
+ * Retrieves the root memento from the workspace preferences if there were
+ * existing palette customizations.
*
- * @return the root memento if there were existing customizations; null otherwise
+ * @return the root memento if there were existing customizations; null
+ * otherwise
*/
private XMLMemento getExistingCustomizations() {
if(preferences != null) {
@@ -328,9 +341,9 @@ public class PapyrusPaletteCustomizer extends PaletteCustomizerEx {
}
/**
- * Customized so that the palette state can be saved before the change is made to the palette
- * model so that: <li>when the cancel button is pressed, the stored state can be restored</li> <li>when the save button is pressed, the
- * customizations made since the state was stored can be written to the workspace preferences</li>
+ * Customized so that the palette state can be saved before the change is
+ * made to the palette model so that: <li>when the cancel button is pressed, the stored state can be restored</li> <li>when the save button is
+ * pressed, the customizations made since the state was stored can be written to the workspace preferences</li>
*/
private class PapyrusDefaultEntryPage extends DefaultEntryPage {
@@ -352,9 +365,9 @@ public class PapyrusPaletteCustomizer extends PaletteCustomizerEx {
}
/**
- * Customized so that the palette state can be saved before the change is made to the palette
- * model so that: <li>when the cancel button is pressed, the stored state can be restored</li> <li>when the save button is pressed, the
- * customizations made since the state was stored can be written to the workspace preferences</li>
+ * Customized so that the palette state can be saved before the change is
+ * made to the palette model so that: <li>when the cancel button is pressed, the stored state can be restored</li> <li>when the save button is
+ * pressed, the customizations made since the state was stored can be written to the workspace preferences</li>
*/
public class PapyrusDrawerEntryPage extends DrawerEntryPage {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteEntryState.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteEntryState.java
index d2ce7583f6e..d338a8d15e7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteEntryState.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteEntryState.java
@@ -46,7 +46,8 @@ public class PapyrusPaletteEntryState extends PaletteEntryState {
String sValue = entryMemento.getString(PARENT_ID_KEY);
if(sValue != null) {
if(!entry.getParent().getId().equals(sValue)) {
- // adds to the new container, but does nto remove from old one, because of
+ // adds to the new container, but does nto remove from old one,
+ // because of
// iterator...
PaletteContainer container = PaletteUtil.getContainerByID(entry, sValue);
container.add(entry);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPalettePreferences.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPalettePreferences.java
index 7c537904191..05e97b8f58e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPalettePreferences.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPalettePreferences.java
@@ -75,10 +75,11 @@ public class PapyrusPalettePreferences implements IPapyrusPaletteConstant {
}
/**
- * Retrieves the root memento from the plugin preferences if there were existing palette
- * customizations.
+ * Retrieves the root memento from the plugin preferences if there were
+ * existing palette customizations.
*
- * @return the root memento if there were existing customizations; null otherwise
+ * @return the root memento if there were existing customizations; null
+ * otherwise
*/
protected static XMLMemento getExistingCustomizations() {
String sValue = getPreferenceStore().getString(PALETTE_CUSTOMIZATIONS_ID);
@@ -96,10 +97,11 @@ public class PapyrusPalettePreferences implements IPapyrusPaletteConstant {
}
/**
- * Retrieves the root memento from the plugin preferences if there were existing local palette
- * redefinitions.
+ * Retrieves the root memento from the plugin preferences if there were
+ * existing local palette redefinitions.
*
- * @return the root memento if there were existing customizations, a newly created one otherwise (empty one)
+ * @return the root memento if there were existing customizations, a newly
+ * created one otherwise (empty one)
*/
protected static XMLMemento getLocalRedefinitions() {
String sValue = getPreferenceStore().getString(PALETTE_REDEFINITIONS);
@@ -146,7 +148,6 @@ public class PapyrusPalettePreferences implements IPapyrusPaletteConstant {
return newMemento;
}
-
/**
* Unregister a specific local redefinition
*
@@ -247,7 +248,8 @@ public class PapyrusPalettePreferences implements IPapyrusPaletteConstant {
}
/**
- * Retrieves the memento corresponding to the list of hidden palettes for a given editor part
+ * Retrieves the memento corresponding to the list of hidden palettes for a
+ * given editor part
*
* @param part
* the editor for which preferences should be found
@@ -292,18 +294,21 @@ public class PapyrusPalettePreferences implements IPapyrusPaletteConstant {
}
/**
- * Returns the memento associated to the palette, or <code>null</code> if none exists
+ * Returns the memento associated to the palette, or <code>null</code> if
+ * none exists
*
* @param paletteID
* the identifier of the palette to find
- * @return the memento found or <code>null</code> if no customization exists for this palette
+ * @return the memento found or <code>null</code> if no customization exists
+ * for this palette
*/
private static IMemento getPaletteRedefinitionNode(String paletteID) {
XMLMemento rootMemento = getLocalRedefinitions();
IMemento[] redefinitions = rootMemento.getChildren(PALETTE_REDEFINITION);
for(IMemento redefinitionMemento : redefinitions) {
String paletteNodeID = redefinitionMemento.getString(ID);
- // check equals. Palette ID is not null, as checked at the begining of the method.
+ // check equals. Palette ID is not null, as checked at the begining
+ // of the method.
if(paletteID.equals(paletteNodeID)) {
return redefinitionMemento;
}
@@ -410,9 +415,11 @@ public class PapyrusPalettePreferences implements IPapyrusPaletteConstant {
}
/**
- * Retrieves the root memento from the plugin preferences if there were existing local palettes.
+ * Retrieves the root memento from the plugin preferences if there were
+ * existing local palettes.
*
- * @return the root memento if there were existing customizations; null otherwise
+ * @return the root memento if there were existing customizations; null
+ * otherwise
*/
protected static XMLMemento getExistingLocalPalettes() {
String sValue = getPreferenceStore().getString(PALETTE_LOCAL_DEFINITIONS);
@@ -522,7 +529,8 @@ public class PapyrusPalettePreferences implements IPapyrusPaletteConstant {
}
/**
- * Creates the palette memento for the given palette ID, in the given memento
+ * Creates the palette memento for the given palette ID, in the given
+ * memento
*
* @param rootMemento
* the memento parent of the newly created memento
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteViewer.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteViewer.java
index 7dc7d9cca31..40fe4611a09 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteViewer.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/PapyrusPaletteViewer.java
@@ -45,7 +45,7 @@ public class PapyrusPaletteViewer extends PaletteViewerEx {
if(constructor != null) {
customizerDialog = constructor.newInstance(getControl().getShell(), getCustomizer(), getPaletteRoot());
if(customizerDialog == null) {
- //be sure it is not null
+ // be sure it is not null
customizerDialog = new PaletteCustomizerDialogEx(getControl().getShell(), getCustomizer(), getPaletteRoot());
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/UMLDiagramActionBarContributor.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/UMLDiagramActionBarContributor.java
index 1797842f5ba..2a891e80b42 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/UMLDiagramActionBarContributor.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/UMLDiagramActionBarContributor.java
@@ -43,8 +43,9 @@ public class UMLDiagramActionBarContributor extends DiagramActionBarContributor
public void init(IActionBars bars, IWorkbenchPage page) {
super.init(bars, page);
// print preview
- //IMenuManager fileMenu = bars.getMenuManager().findMenuUsingPath(IWorkbenchActionConstants.M_FILE);
- //assert fileMenu != null;
+ // IMenuManager fileMenu =
+ // bars.getMenuManager().findMenuUsingPath(IWorkbenchActionConstants.M_FILE);
+ // assert fileMenu != null;
//fileMenu.remove("pageSetupAction"); //$NON-NLS-1$
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/UmlGmfDiagramEditor.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/UmlGmfDiagramEditor.java
index cc34dbc14a4..03bcdf77643 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/UmlGmfDiagramEditor.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/part/UmlGmfDiagramEditor.java
@@ -14,24 +14,23 @@ import org.eclipse.papyrus.core.lifecycleevents.ISaveAndDirtyService;
import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.services.ServicesRegistry;
-
/**
- * Common ancestor of GMF based editors for UML.
- * This class allows to declare stuff commons to all this kind of editors.
+ * Common ancestor of GMF based editors for UML. This class allows to declare
+ * stuff commons to all this kind of editors.
*
* @author cedric dumoulin
*
*/
public class UmlGmfDiagramEditor extends SynchronizableGmfDiagramEditor {
-
/**
* The associated Diagram.
*/
private Diagram diagram;
/**
- * Object used to synchronize the name of the editor with the name of the diagram.
+ * Object used to synchronize the name of the editor with the name of the
+ * diagram.
*/
private PartNameSynchronizer partNameSynchronizer;
@@ -55,7 +54,8 @@ public class UmlGmfDiagramEditor extends SynchronizableGmfDiagramEditor {
partNameSynchronizer = new PartNameSynchronizer(diagram);
// Register this part to the ISaveAndDirtyService.
- // This will allows to be notified of saveAs events, and the isDirty flag will be taken into
+ // This will allows to be notified of saveAs events, and the isDirty
+ // flag will be taken into
// account.
ISaveAndDirtyService saveAndDirtyService = servicesRegistry.getService(ISaveAndDirtyService.class);
saveAndDirtyService.registerIsaveablePart(this);
@@ -117,14 +117,15 @@ public class UmlGmfDiagramEditor extends SynchronizableGmfDiagramEditor {
*/
@Override
protected KeyHandler getKeyHandler() {
- //we remove all keybinding provided by GMF
+ // we remove all keybinding provided by GMF
KeyHandler keyHandler = new KeyHandler();
return keyHandler;
}
/**
- * A class taking in charge the synchronization of the partName and the diagram name.
- * When diagram name change, the other is automatically updated.
+ * A class taking in charge the synchronization of the partName and the
+ * diagram name. When diagram name change, the other is automatically
+ * updated.
*
* @author cedric dumoulin
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/preferences/UMLPreferencesConstants.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/preferences/UMLPreferencesConstants.java
index 2fc63a19de1..f6839b9fd43 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/preferences/UMLPreferencesConstants.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/preferences/UMLPreferencesConstants.java
@@ -19,8 +19,6 @@ public interface UMLPreferencesConstants {
String PREF_ICON_STYLE = "iconstyle"; //$NON-NLS-1$
-
-
// @unused
String HIGHLIGHT_COLOR = "org.eclipse.uml2.diagram.highlight.color"; //$NON-NLS-1$
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/AbstractActionStateSourceProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/AbstractActionStateSourceProvider.java
index 5ac9d91af15..ccbcf8c7a9a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/AbstractActionStateSourceProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/AbstractActionStateSourceProvider.java
@@ -30,12 +30,14 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
/**
- * This abstract class is used to provide the state of the actions. It's used to refresh
- * the status of these actions in the menu. (in toolbar and popup, it's not needed)
+ * This abstract class is used to provide the state of the actions. It's used to
+ * refresh the status of these actions in the menu. (in toolbar and popup, it's
+ * not needed)
*
- * To get the status, we listen the selection service AND the part service!
- * The part service is used to know if the selection is in the Model Explorer or not!
- * When the selection is not in the model explorer, the handlers listening the variable need to be disabled
+ * To get the status, we listen the selection service AND the part service! The
+ * part service is used to know if the selection is in the Model Explorer or
+ * not! When the selection is not in the model explorer, the handlers listening
+ * the variable need to be disabled
*/
public abstract class AbstractActionStateSourceProvider extends AbstractSourceProvider {
@@ -67,12 +69,14 @@ public abstract class AbstractActionStateSourceProvider extends AbstractSourcePr
/**
* The listener for the selection service
*/
- private ISelectionListener listener; //we can't set the listener as a static field -> doesn't work
+ private ISelectionListener listener; // we can't set the listener as a
+ // static field -> doesn't work
/**
* The listener for the part service
*/
- private IPartListener partListener; //we can't set the listener as a static field -> doesn't work
+ private IPartListener partListener; // we can't set the listener as a static
+ // field -> doesn't work
/**
* The activated part
@@ -125,9 +129,9 @@ public abstract class AbstractActionStateSourceProvider extends AbstractSourcePr
public abstract String[] getProvidedSourceNames();
- // public String[] getProvidedSourceNames() {
- // return new String[]{};
- // }
+ // public String[] getProvidedSourceNames() {
+ // return new String[]{};
+ // }
/**
* Adds a listener on the selection service if the field {@link #selectionService} is <code>null</code>
@@ -138,7 +142,8 @@ public abstract class AbstractActionStateSourceProvider extends AbstractSourcePr
public void run() {
IWorkbench workbench = PlatformUI.getWorkbench();
- // selectionService = (ISelectionService)workbench.getService(ISelectionService.class);
+ // selectionService =
+ // (ISelectionService)workbench.getService(ISelectionService.class);
IWorkbenchWindow activeWorkbench = workbench.getActiveWorkbenchWindow();
if(activeWorkbench != null) {
selectionService = activeWorkbench.getSelectionService();
@@ -160,7 +165,8 @@ public abstract class AbstractActionStateSourceProvider extends AbstractSourcePr
public void run() {
IWorkbench workbench = PlatformUI.getWorkbench();
- // partService = (IPartService)workbench.getService(IPartService.class);
+ // partService =
+ // (IPartService)workbench.getService(IPartService.class);
IWorkbenchWindow activeWorkbench = workbench.getActiveWorkbenchWindow();
if(activeWorkbench != null) {
partService = activeWorkbench.getPartService();
@@ -176,8 +182,7 @@ public abstract class AbstractActionStateSourceProvider extends AbstractSourcePr
/**
* Test if the current ActivePart is the Model Explorer
*
- * @return
- * <code>true</code> if the current activePart is the Model Explorer <code>false</code> if not
+ * @return <code>true</code> if the current activePart is the Model Explorer <code>false</code> if not
*/
protected boolean isSelectionInDiagram() {
return (workbenchPart instanceof PapyrusMultiDiagramEditor);
@@ -244,7 +249,6 @@ public abstract class AbstractActionStateSourceProvider extends AbstractSourcePr
refreshActions();
}
-
}
/**
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/ActionStateSourceProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/ActionStateSourceProvider.java
index c3ec93fbe24..5b1da817009 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/ActionStateSourceProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/ActionStateSourceProvider.java
@@ -18,12 +18,13 @@ import org.eclipse.papyrus.diagram.common.handlers.RenamedElementHandler;
import org.eclipse.ui.ISources;
/**
- * This class provides the state of the actions. It's used to refresh
- * the status of these actions in the menu. (in toolbar and popup, it's not needed)
+ * This class provides the state of the actions. It's used to refresh the status
+ * of these actions in the menu. (in toolbar and popup, it's not needed)
*
- * To get the status, we listen the selection service AND the part service!
- * The part service is used to know if the selection is in the Model Explorer or not!
- * When the selection is not in the model explorer, the handlers listening the variable need to be disabled
+ * To get the status, we listen the selection service AND the part service! The
+ * part service is used to know if the selection is in the Model Explorer or
+ * not! When the selection is not in the model explorer, the handlers listening
+ * the variable need to be disabled
*/
public class ActionStateSourceProvider extends AbstractActionStateSourceProvider {
@@ -45,7 +46,6 @@ public class ActionStateSourceProvider extends AbstractActionStateSourceProvider
currentState.put(RENAME_NAMED_ELEMENT, DISABLED);
}
-
/**
*
* @see org.eclipse.ui.ISourceProvider#getProvidedSourceNames()
@@ -57,7 +57,6 @@ public class ActionStateSourceProvider extends AbstractActionStateSourceProvider
return new String[]{ DELETE_IN_DIAGRAM, RENAME_NAMED_ELEMENT };
}
-
/**
* Refresh the state of the Delete Action
*/
@@ -72,10 +71,11 @@ public class ActionStateSourceProvider extends AbstractActionStateSourceProvider
}
/**
- * Tests if the action DeleteFromDiagram (now called Delete Selected Element can be executed
+ * Tests if the action DeleteFromDiagram (now called Delete Selected Element
+ * can be executed
*
- * @return
- * <code>true</code> if the action DeleteFromDiagram (now called Delete Selected Element can be executed <code>false</code> if not
+ * @return <code>true</code> if the action DeleteFromDiagram (now called
+ * Delete Selected Element can be executed <code>false</code> if not
*/
protected boolean testDeleteFromDiagram() {
DeleteFromDiagramCommandHandler handler = new DeleteFromDiagramCommandHandler();
@@ -93,7 +93,6 @@ public class ActionStateSourceProvider extends AbstractActionStateSourceProvider
refreshRenamedNamedElement();
}
-
/**
* Refresh the status of the handlers which listen {@link #RENAME_NAMED_ELEMENT}
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/BaseViewInfo.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/BaseViewInfo.java
index 2f951530090..1e7468de403 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/BaseViewInfo.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/BaseViewInfo.java
@@ -263,9 +263,9 @@ public class BaseViewInfo implements ViewInfo {
// // add a node
/**
- * Adds a node in its corresponding place in the hierarchy. The parent node needs not exist yet
- * in the hierarchy. Orphan nodes are stored in a temporary storage, that is revisited when a
- * new node is added.
+ * Adds a node in its corresponding place in the hierarchy. The parent node
+ * needs not exist yet in the hierarchy. Orphan nodes are stored in a
+ * temporary storage, that is revisited when a new node is added.
*
* @see es.cv.gvcase.mdt.common.provider.ViewInfo#addNode(int, es.cv.gvcase.mdt.common.provider.ViewInfo)
*/
@@ -324,8 +324,8 @@ public class BaseViewInfo implements ViewInfo {
}
/**
- * Adds a node that was in the temporary storage and its parent node has just been added to the
- * hierarchy.
+ * Adds a node that was in the temporary storage and its parent node has
+ * just been added to the hierarchy.
*
* @param parentID
* the parent id
@@ -343,8 +343,8 @@ public class BaseViewInfo implements ViewInfo {
}
/**
- * Revise pending nodes in the temporary storage. Nodes whose parent has been added will be put
- * in their corresponding in the hierarchy.
+ * Revise pending nodes in the temporary storage. Nodes whose parent has
+ * been added will be put in their corresponding in the hierarchy.
*
* @param info
* the info
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/BaseViewInfoContentProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/BaseViewInfoContentProvider.java
index 58a7115aa3d..04d57d85a74 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/BaseViewInfoContentProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/BaseViewInfoContentProvider.java
@@ -25,7 +25,9 @@ public class BaseViewInfoContentProvider implements ITreeContentProvider {
/*
* (non-Javadoc)
*
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ * @see
+ * org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.
+ * Object)
*/
public Object[] getChildren(Object parentElement) {
if(parentElement instanceof ViewInfo) {
@@ -38,7 +40,9 @@ public class BaseViewInfoContentProvider implements ITreeContentProvider {
/*
* (non-Javadoc)
*
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ * @see
+ * org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object
+ * )
*/
public Object getParent(Object element) {
if(element instanceof ViewInfo) {
@@ -51,7 +55,9 @@ public class BaseViewInfoContentProvider implements ITreeContentProvider {
/*
* (non-Javadoc)
*
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ * @see
+ * org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.
+ * Object)
*/
public boolean hasChildren(Object element) {
if(element instanceof ViewInfo) {
@@ -64,7 +70,9 @@ public class BaseViewInfoContentProvider implements ITreeContentProvider {
/*
* (non-Javadoc)
*
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ * @see
+ * org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java
+ * .lang.Object)
*/
public Object[] getElements(Object inputElement) {
return getChildren(inputElement);
@@ -83,8 +91,8 @@ public class BaseViewInfoContentProvider implements ITreeContentProvider {
* (non-Javadoc)
*
* @see
- * org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
- * java.lang.Object, java.lang.Object)
+ * org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface
+ * .viewers.Viewer, java.lang.Object, java.lang.Object)
*/
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
// nothing to do
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/BaseViewInfoLabelProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/BaseViewInfoLabelProvider.java
index 797d96fd243..aee0ad5b6c0 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/BaseViewInfoLabelProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/BaseViewInfoLabelProvider.java
@@ -50,8 +50,8 @@ public class BaseViewInfoLabelProvider implements IBaseLabelProvider, ILabelProv
/*
* (non-Javadoc)
*
- * @seeorg.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.
- * ILabelProviderListener)
+ * @seeorg.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.
+ * jface.viewers. ILabelProviderListener)
*/
public void addListener(ILabelProviderListener listener) {
// nothing to do
@@ -69,8 +69,9 @@ public class BaseViewInfoLabelProvider implements IBaseLabelProvider, ILabelProv
/*
* (non-Javadoc)
*
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object,
- * java.lang.String)
+ * @see
+ * org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang
+ * .Object, java.lang.String)
*/
public boolean isLabelProperty(Object element, String property) {
// TODO Auto-generated method stub
@@ -80,8 +81,8 @@ public class BaseViewInfoLabelProvider implements IBaseLabelProvider, ILabelProv
/*
* (non-Javadoc)
*
- * @seeorg.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.
- * ILabelProviderListener)
+ * @seeorg.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse
+ * .jface.viewers. ILabelProviderListener)
*/
public void removeListener(ILabelProviderListener listener) {
// nothing to do
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/EditorLabelProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/EditorLabelProvider.java
index 765eeeab9b3..da0e2af5dd5 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/EditorLabelProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/EditorLabelProvider.java
@@ -55,10 +55,9 @@ import org.eclipse.uml2.uml.Type;
import org.eclipse.uml2.uml.ValueSpecification;
import org.eclipse.uml2.uml.util.UMLUtil;
-
/**
- * The Class EditorLabelProvider.
- * This class provides Label and Image for UML Element
+ * The Class EditorLabelProvider. This class provides Label and Image for UML
+ * Element
*
*/
public class EditorLabelProvider implements ILabelProvider {
@@ -69,7 +68,6 @@ public class EditorLabelProvider implements ILabelProvider {
*/
private Map<String, Integer> index = new HashMap<String, Integer>();
-
/** the plugin where owning the icons for the UML Element */
public static final String pluginID = "org.eclipse.uml2.uml.edit"; //$NON-NLS-1$
@@ -92,7 +90,7 @@ public class EditorLabelProvider implements ILabelProvider {
* @param listener
*/
public void addListener(ILabelProviderListener listener) {
- //TODO
+ // TODO
}
/**
@@ -115,7 +113,7 @@ public class EditorLabelProvider implements ILabelProvider {
* @param listener
*/
public void removeListener(ILabelProviderListener listener) {
- //TODO
+ // TODO
}
/**
@@ -123,8 +121,7 @@ public class EditorLabelProvider implements ILabelProvider {
* @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
*
* @param element
- * @return
- * <ul>
+ * @return <ul>
* <li>if stereotypes are applied on the elements : return the image corresponding to the first applied stereotype</li>
* <li>if the element is a MetaClass return the image representing a metaclass</li>
* <li>if the element is a {@link DecorationNode}, returns the image corresponding to a compartment</li>
@@ -139,16 +136,17 @@ public class EditorLabelProvider implements ILabelProvider {
}
}
- //test for Metaclass
+ // test for Metaclass
if(element instanceof Class) {
if(org.eclipse.papyrus.diagram.common.util.Util.isMetaclass((Type)element)) {
return Activator.getPluginIconImage(Activator.ID, ICON_METACLASS);
}
}
- //test for other UML Elements
+ // test for other UML Elements
if(element instanceof Element) {
- //return the stereotype image if a stereotype is applied on the element
+ // return the stereotype image if a stereotype is applied on the
+ // element
Image im = Activator.getIconElement((Element)element);
String imagePath = new String(imageFolder);
if(im == null) {
@@ -162,7 +160,7 @@ public class EditorLabelProvider implements ILabelProvider {
return im;
}
- //if the element is a compartment
+ // if the element is a compartment
if(element instanceof BasicCompartment || element instanceof DecorationNode) {
return Activator.getPluginIconImage(Activator.ID, ICON_COMPARTMENT);
} else if(element instanceof Diagram) {
@@ -170,7 +168,7 @@ public class EditorLabelProvider implements ILabelProvider {
try {
registry = ServiceUtilsForActionHandlers.getInstance().getServiceRegistry().getService(IPageIconsRegistry.class);
} catch (ServiceException e) {
- //nothing to do
+ // nothing to do
}
if(registry == null) {
registry = new PageIconsRegistry();
@@ -178,7 +176,7 @@ public class EditorLabelProvider implements ILabelProvider {
return registry.getEditorIcon(element);
}
- //Standard EMF image
+ // Standard EMF image
if(element instanceof EObject) {
EObject eObject = (EObject)element;
//
@@ -215,8 +213,7 @@ public class EditorLabelProvider implements ILabelProvider {
* @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
*
* @param element
- * @return
- * <ul>
+ * @return <ul>
* <li>if element is a {@link NamedElement}, we return its name</li>
* <li>else if element is a {@link Element}, we return its type + a index</li>
* <li>else return {@link Messages#EditorLabelProvider_No_name}</li>
@@ -234,18 +231,20 @@ public class EditorLabelProvider implements ILabelProvider {
}
}
- // if(element instanceof EditPart) {
- // element = ((View)((EditPart)element).getModel()).getElement();
- // }
+ // if(element instanceof EditPart) {
+ // element = ((View)((EditPart)element).getModel()).getElement();
+ // }
- if(element instanceof EObject && UMLUtil.getBaseElement((EObject)element) != null) { //Stereotype Application
- //We return the label of the Stereotyped element, not of the Stereotype itself
+ if(element instanceof EObject && UMLUtil.getBaseElement((EObject)element) != null) { // Stereotype
+ // Application
+ // We return the label of the Stereotyped element, not of the
+ // Stereotype itself
return getText(UMLUtil.getBaseElement((EObject)element));
} else if(element instanceof org.eclipse.uml2.uml.Image) {
- //imageName
- //location
- //imageName : location
- //Image
+ // imageName
+ // location
+ // imageName : location
+ // Image
org.eclipse.uml2.uml.Image image = ((org.eclipse.uml2.uml.Image)element);
String imageName = ImageUtil.getName(image);
@@ -278,7 +277,8 @@ public class EditorLabelProvider implements ILabelProvider {
return "<Element Import> " + importedElement.getName();
}
} else if(element instanceof NamedElement) {
- if(element instanceof ValueSpecification) { //Format : [name=]value
+ if(element instanceof ValueSpecification) { // Format :
+ // [name=]value
String value = null;
if(element instanceof InstanceValue) {
InstanceSpecification specification = ((InstanceValue)element).getInstance();
@@ -310,7 +310,8 @@ public class EditorLabelProvider implements ILabelProvider {
return ((NamedElement)element).getName();
}
} else if(element instanceof Element) {
- //when the element is not a NamedElement, we return its Type + a index
+ // when the element is not a NamedElement, we return its Type + a
+ // index
String className = element.getClass().getName();
int i = className.lastIndexOf(".");
className = className.substring(i + 1);
@@ -324,7 +325,8 @@ public class EditorLabelProvider implements ILabelProvider {
return className + " " + number;
} else if(element instanceof Diagram) {
return ((Diagram)element).getName();
- } else if(element instanceof View) { //maybe it is a view of a compartment
+ } else if(element instanceof View) { // maybe it is a view of a
+ // compartment
EditPart dummyEP = EditPartService.getInstance().createGraphicEditPart((View)element);
if(dummyEP instanceof ResizableCompartmentEditPart) {
return ((ResizableCompartmentEditPart)dummyEP).getCompartmentName();
@@ -346,6 +348,6 @@ public class EditorLabelProvider implements ILabelProvider {
*
*/
public void dispose() {
- //TODO
+ // TODO
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/PapyrusDiagramGlobalActionHandler.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/PapyrusDiagramGlobalActionHandler.java
index 9b1e460ff4d..53b29a60bbb 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/PapyrusDiagramGlobalActionHandler.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/PapyrusDiagramGlobalActionHandler.java
@@ -50,13 +50,13 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPart;
/**
- * this class has in charge to launch command for cut copy paste (graphically) it is also used to launch the copy into bmp like as writer software
+ * this class has in charge to launch command for cut copy paste (graphically)
+ * it is also used to launch the copy into bmp like as writer software
*
*/
@SuppressWarnings("restriction")
public class PapyrusDiagramGlobalActionHandler extends ImageSupportGlobalActionHandler {
-
protected boolean canPaste(IGlobalActionContext cntxt) {
/* Get the selected edit parts */
Object[] objectsArray = ((IStructuredSelection)cntxt.getSelection()).toArray();
@@ -78,7 +78,8 @@ public class PapyrusDiagramGlobalActionHandler extends ImageSupportGlobalActionH
* (non-Javadoc)
*
* @see
- * org.eclipse.gmf.runtime.common.ui.services.action.global.IGlobalActionHandler#getCommand(org.eclipse.gmf.runtime.common.ui.services.action.
+ * org.eclipse.gmf.runtime.common.ui.services.action.global.IGlobalActionHandler
+ * #getCommand(org.eclipse.gmf.runtime.common.ui.services.action.
* global.IGlobalActionContext)
*/
public ICommand getCommand(IGlobalActionContext cntxt) {
@@ -136,8 +137,8 @@ public class PapyrusDiagramGlobalActionHandler extends ImageSupportGlobalActionH
/**
* @see org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler#getCopyCommand(org.eclipse.gmf.runtime.common.ui.services.action.global.IGlobalActionContext,
- * org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart, boolean)
- * this class also copy in the clipboard of the editing domain selected elements
+ * org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart, boolean) this class also copy in the clipboard of the editing domain
+ * selected elements
*
*/
@@ -147,11 +148,13 @@ public class PapyrusDiagramGlobalActionHandler extends ImageSupportGlobalActionH
Object[] objectsArray = ((IStructuredSelection)cntxt.getSelection()).toArray();
CompositeCommand compositeCommand = new CompositeCommand(GlobalActionId.COPY);
if(objectsArray.length > 0 && objectsArray[0] instanceof GraphicalEditPart) {
- //((GraphicalEditPart)objectsArray[0]).getEditingDomain().setClipboard(((IStructuredSelection) cntxt.getSelection()).toList());
+ // ((GraphicalEditPart)objectsArray[0]).getEditingDomain().setClipboard(((IStructuredSelection)
+ // cntxt.getSelection()).toList());
compositeCommand.add(new EMFtoGMFCommandWrapper(CopyToClipboardCommand.create(((GraphicalEditPart)objectsArray[0]).getEditingDomain(), getNotation(((IStructuredSelection)cntxt.getSelection()).toList()))));
}
if(objectsArray.length > 0 && objectsArray[0] instanceof ConnectionEditPart) {
- //((GraphicalEditPart)objectsArray[0]).getEditingDomain().setClipboard(((IStructuredSelection) cntxt.getSelection()).toList());
+ // ((GraphicalEditPart)objectsArray[0]).getEditingDomain().setClipboard(((IStructuredSelection)
+ // cntxt.getSelection()).toList());
compositeCommand.add(new EMFtoGMFCommandWrapper(CopyToClipboardCommand.create(((ConnectionEditPart)objectsArray[0]).getEditingDomain(), getNotation(((IStructuredSelection)cntxt.getSelection()).toList()))));
}
compositeCommand.add(super.getCopyCommand(cntxt, diagramPart, isUndoable));
@@ -172,12 +175,14 @@ public class PapyrusDiagramGlobalActionHandler extends ImageSupportGlobalActionH
Object[] objectsArray = ((IStructuredSelection)cntxt.getSelection()).toArray();
CompositeCommand compositeCommand = new CompositeCommand(GlobalActionId.CUT);
if(objectsArray.length > 0 && objectsArray[0] instanceof GraphicalEditPart) {
- //((GraphicalEditPart)objectsArray[0]).getEditingDomain().setClipboard(((IStructuredSelection) cntxt.getSelection()).toList());
+ // ((GraphicalEditPart)objectsArray[0]).getEditingDomain().setClipboard(((IStructuredSelection)
+ // cntxt.getSelection()).toList());
compositeCommand.add(new EMFtoGMFCommandWrapper(CopyToClipboardCommand.create(((GraphicalEditPart)objectsArray[0]).getEditingDomain(), getNotation(((IStructuredSelection)cntxt.getSelection()).toList()))));
}
if(objectsArray.length > 0 && objectsArray[0] instanceof ConnectionEditPart) {
- //((GraphicalEditPart)objectsArray[0]).getEditingDomain().setClipboard(((IStructuredSelection) cntxt.getSelection()).toList());
+ // ((GraphicalEditPart)objectsArray[0]).getEditingDomain().setClipboard(((IStructuredSelection)
+ // cntxt.getSelection()).toList());
compositeCommand.add(new EMFtoGMFCommandWrapper(CopyToClipboardCommand.create(((ConnectionEditPart)objectsArray[0]).getEditingDomain(), getNotation(((IStructuredSelection)cntxt.getSelection()).toList()))));
}
ICommand cutCommand = super.getCutCommand(cntxt, diagramPart);
@@ -187,8 +192,6 @@ public class PapyrusDiagramGlobalActionHandler extends ImageSupportGlobalActionH
return compositeCommand;
}
-
-
/**
* Returns appropriate delete command for this context.
*
@@ -255,7 +258,6 @@ public class PapyrusDiagramGlobalActionHandler extends ImageSupportGlobalActionH
return result;
}
-
/**
* get the list of notation element from the a list of editpart
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/PapyrusGlobalActionHandlerProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/PapyrusGlobalActionHandlerProvider.java
index d2c934cee97..220ce0552a8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/PapyrusGlobalActionHandlerProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/PapyrusGlobalActionHandlerProvider.java
@@ -10,7 +10,8 @@ import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IWorkbenchPart;
/**
- * this is the provider is charge to give the handler in order to have the functionnality cut copy paste
+ * this is the provider is charge to give the handler in order to have the
+ * functionnality cut copy paste
*
*/
public class PapyrusGlobalActionHandlerProvider extends AbstractGlobalActionHandlerProvider {
@@ -32,8 +33,9 @@ public class PapyrusGlobalActionHandlerProvider extends AbstractGlobalActionHand
/*
* (non-Javadoc)
*
- * @see
- * org.eclipse.gmf.runtime.common.ui.services.action.global.IGlobalActionHandlerProvider#getGlobalActionHandler(org.eclipse.gmf.runtime.common
+ * @see org.eclipse.gmf.runtime.common.ui.services.action.global.
+ * IGlobalActionHandlerProvider
+ * #getGlobalActionHandler(org.eclipse.gmf.runtime.common
* .ui.services.action.global.IGlobalActionHandlerContext)
*/
@SuppressWarnings("unchecked")
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/UIAdapterImpl.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/UIAdapterImpl.java
index f12c56fe40f..9d27162b634 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/UIAdapterImpl.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/UIAdapterImpl.java
@@ -17,7 +17,8 @@ import org.eclipse.emf.common.notify.impl.AdapterImpl;
import org.eclipse.swt.widgets.Display;
/**
- * This EMF listener receives an event and then handles this event in the UI thread
+ * This EMF listener receives an event and then handles this event in the UI
+ * thread
*
* @author <a href="david.sciamma@anyware-tech.com">David Sciamma</a>
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/assistant/ModelingAssistantRegistry.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/assistant/ModelingAssistantRegistry.java
index a1a84925496..243b7112b70 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/assistant/ModelingAssistantRegistry.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/assistant/ModelingAssistantRegistry.java
@@ -93,7 +93,8 @@ public class ModelingAssistantRegistry {
// Types for an EditPart customization
/**
- * Customizes the list of types for an edit part according to the extensions.
+ * Customizes the list of types for an edit part according to the
+ * extensions.
*
* @param editorID
* @param editPart
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/PartActivationListener.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/PartActivationListener.java
index 352645109fa..788743b0acd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/PartActivationListener.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/PartActivationListener.java
@@ -32,8 +32,9 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
/**
- * A listener for part activation. Will ask the user whether to reload when he enters an editor
- * whose underlying resources have changed, used to trigger an update of
+ * A listener for part activation. Will ask the user whether to reload when he
+ * enters an editor whose underlying resources have changed, used to trigger an
+ * update of
*
* @author Ansgar Radermacher (CEA LIST)
*/
@@ -66,7 +67,8 @@ public class PartActivationListener implements IPartListener {
}
public void partActivated(IWorkbenchPart part) {
- // don't use (part == editor.getSite().getPart()), since different views (e.g. model explorer or property)
+ // don't use (part == editor.getSite().getPart()), since different views
+ // (e.g. model explorer or property)
// of an active editor may actually be selected
IMultiDiagramEditor activeEditor = EditorUtils.getMultiDiagramEditor();
if((editor == activeEditor) && modifiedMainResource) {
@@ -75,17 +77,21 @@ public class PartActivationListener implements IPartListener {
case IResourceDelta.ADDED:
break;
case IResourceDelta.REMOVED:
- // asynchronous notification to avoid that the removal of multiple resource files
- // belonging to the editor (e.g. .uml and .notation) at the same time leads to multiple
+ // asynchronous notification to avoid that the removal of
+ // multiple resource files
+ // belonging to the editor (e.g. .uml and .notation) at the same
+ // time leads to multiple
// user feedback.
MessageDialog.openInformation(new Shell(), "Resource removal", "The resource " + changedResourcePath + " that is in use by a Papyrus editor has been removed. Use save/save as, if you want to keep the model");
break;
case IResourceDelta.CHANGED:
- // reopen the editor asynchronously to avoid that changes of multiple resource files
- // belonging to the editor (e.g. .uml and .notation) lead to multiple reloads.
- // de-activate until user responds to message dialog
+ // reopen the editor asynchronously to avoid that changes of
+ // multiple resource files
+ // belonging to the editor (e.g. .uml and .notation) lead to
+ // multiple reloads.
+ // de-activate until user responds to message dialog
String message = "The resource " + changedResourcePath + " that is in use by a Papyrus editor has changed. Do you want to reopen the editor in order to update its contents?";
if(editor.isDirty()) {
@@ -93,12 +99,16 @@ public class PartActivationListener implements IPartListener {
}
if(MessageDialog.openQuestion(new Shell(), "Resource change", message)) {
- // unloading and reloading all resources of the main causes the following problems
- // - since resources are removed during the modelSets unload operation, the call eResource().getContents ()
- // used by the model explorer leads to a null pointer exception
- // - diagrams in model explorer are not shown
- // - would need to reset dirty flags
- // => clean & simple option is to close and reopen the editor.
+ // unloading and reloading all resources of the main causes
+ // the following problems
+ // - since resources are removed during the modelSets unload
+ // operation, the call eResource().getContents ()
+ // used by the model explorer leads to a null pointer
+ // exception
+ // - diagrams in model explorer are not shown
+ // - would need to reset dirty flags
+ // => clean & simple option is to close and reopen the
+ // editor.
Display.getCurrent().asyncExec(new Runnable() {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/ResourceUpdateService.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/ResourceUpdateService.java
index 83ed7c7f448..be02c369355 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/ResourceUpdateService.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/ResourceUpdateService.java
@@ -43,8 +43,8 @@ import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.uml2.uml.Profile;
/**
- * A listener for resource changes, used to trigger an update of
- * models whose underlying resources have been changed.
+ * A listener for resource changes, used to trigger an update of models whose
+ * underlying resources have been changed.
*
* @author Ansgar Radermacher (CEA LIST)
*/
@@ -52,7 +52,8 @@ public class ResourceUpdateService implements IService, IResourceChangeListener,
public static final String RESOURCE_UPDATE_ID = Activator.ID + ".resourceUpdate";
- // public init (CoreMultiDiagramEditor editor, ISaveAndDirtyService saveAndDirty, ModelSet modelSet) {
+ // public init (CoreMultiDiagramEditor editor, ISaveAndDirtyService
+ // saveAndDirty, ModelSet modelSet) {
public void init(ServicesRegistry serviceRegistry) throws ServiceException {
modelSet = serviceRegistry.getService(ModelSet.class);
editor = serviceRegistry.getService(IMultiDiagramEditor.class);
@@ -77,7 +78,8 @@ public class ResourceUpdateService implements IService, IResourceChangeListener,
break;
case IResourceChangeEvent.POST_CHANGE:
try {
- // delegate to visitor (event.getResource is typically null) and there
+ // delegate to visitor (event.getResource is typically null) and
+ // there
// might be a tree of changed resources
event.getDelta().accept(this);
} catch (CoreException coreException) {
@@ -89,17 +91,21 @@ public class ResourceUpdateService implements IService, IResourceChangeListener,
}
/**
- * A visitor for resource changes. Detects, whether a changed resource belongs to an opened editor
+ * A visitor for resource changes. Detects, whether a changed resource
+ * belongs to an opened editor
*/
public boolean visit(IResourceDelta delta) {
IResource changedResource = delta.getResource();
if(delta.getFlags() == IResourceDelta.MARKERS) {
- // only markers have been changed. Refresh their display only (no need to reload resources)
- // TODO called once for each new marker => assure asynchronous refresh
+ // only markers have been changed. Refresh their display only (no
+ // need to reload resources)
+ // TODO called once for each new marker => assure asynchronous
+ // refresh
modelSet.eNotify(new NotificationImpl(Notification.SET, new Object(), delta.getMarkerDeltas()));
return false;
}
- // only proceed in case of Files (not projects, folders, ...) for the moment
+ // only proceed in case of Files (not projects, folders, ...) for the
+ // moment
if(!(changedResource instanceof IFile)) {
return true;
}
@@ -111,22 +117,29 @@ public class ResourceUpdateService implements IService, IResourceChangeListener,
URI uri = resource.getURI();
URI normalizedURI = uriConverter.normalize(uri);
- // URI path is prefixed with /resource or /plugin (registered model), therefore compare with
+ // URI path is prefixed with /resource or /plugin (registered
+ // model), therefore compare with
// endsWith.
- // Comparison is done on path level since resource and changedResource are never
- // identical. The latter is a generic system resource (File, ...), the former a
+ // Comparison is done on path level since resource and
+ // changedResource are never
+ // identical. The latter is a generic system resource (File, ...),
+ // the former a
// model-aware representation of the resource
if(normalizedURI.path().endsWith(changedResourcePath)) {
if(changedResourcePathWOExt.equals(modelSet.getFilenameWithoutExtension())) {
// model itself has changed.
- // mark main resource as changed. User will asked later, when he activates the editor.
+ // mark main resource as changed. User will asked later,
+ // when he activates the editor.
if(!saveListener.isSaveActive() && !partActivationListener.isModied()) {
partActivationListener.setModificationData(changedResourcePath, delta);
}
}
- // changed resource does not belong to the model, it might however belong to a referenced
- // model. Since the referenced model is not editable (TODO: might change? see bug 317430),
- // it can be unloaded without asking the user (it will be reloaded on demand)
+ // changed resource does not belong to the model, it might
+ // however belong to a referenced
+ // model. Since the referenced model is not editable (TODO:
+ // might change? see bug 317430),
+ // it can be unloaded without asking the user (it will be
+ // reloaded on demand)
else if(resource.isLoaded()) {
EList<EObject> contents = resource.getContents();
@@ -148,7 +161,8 @@ public class ResourceUpdateService implements IService, IResourceChangeListener,
// private ILifeCycleEventsProvider lifeCycleEvents;
/**
- * Activate the listeners. It will listen to resource changes and to changes of the active editor
+ * Activate the listeners. It will listen to resource changes and to changes
+ * of the active editor
*/
private void activate() {
// ... add service to the workspace
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/SaveListener.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/SaveListener.java
index 82b6456b65d..bf78539e949 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/SaveListener.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/SaveListener.java
@@ -19,8 +19,9 @@ import org.eclipse.papyrus.core.lifecycleevents.ISaveEventListener;
import org.eclipse.swt.widgets.Display;
/**
- * A listener for save actions. The goal is to track te editors save operations in order to
- * distinguish external resource modifications and those triggered by the save operation
+ * A listener for save actions. The goal is to track te editors save operations
+ * in order to distinguish external resource modifications and those triggered
+ * by the save operation
*
* @author Ansgar Radermacher (CEA LIST)
*/
@@ -47,7 +48,8 @@ public class SaveListener {
class PostSaveListener implements ISaveEventListener {
public void doSaveAs(DoSaveEvent event) {
- // do not reset saveActive directly to avoid eventual race conditions (avoid that the
+ // do not reset saveActive directly to avoid eventual race
+ // conditions (avoid that the
// resource change listener executes after the flag has been reset)
Display.getDefault().asyncExec(postSaveRunnable);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/ApplyStereotypeRequest.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/ApplyStereotypeRequest.java
index 0d7f5061078..49a3c5489f7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/ApplyStereotypeRequest.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/ApplyStereotypeRequest.java
@@ -35,7 +35,8 @@ public class ApplyStereotypeRequest extends CreateRequest {
* Creates a new ApplyStereotypeRequest
*
* @param objects
- * the list of stereotypes to apply, identified by their qualified names
+ * the list of stereotypes to apply, identified by their
+ * qualified names
*/
public ApplyStereotypeRequest(List<String> stereotypes) {
super();
@@ -45,10 +46,11 @@ public class ApplyStereotypeRequest extends CreateRequest {
}
/**
- * Returns the list of stereotypes to apply, identified by their qualified names
+ * Returns the list of stereotypes to apply, identified by their qualified
+ * names
*
- * @return the list of stereotypes to apply, identified by their qualified names, or an empty
- * list
+ * @return the list of stereotypes to apply, identified by their qualified
+ * names, or an empty list
*/
public List<String> getStereotypesToApply() {
return stereotypes;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/AspectCreationEntry.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/AspectCreationEntry.java
index a813f4c2e0c..22bd63ce3f8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/AspectCreationEntry.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/AspectCreationEntry.java
@@ -22,7 +22,8 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.diagram.common.Activator;
/**
- * Entry that uses the functionality of another entry, but adds some actions to it
+ * Entry that uses the functionality of another entry, but adds some actions to
+ * it
*/
public class AspectCreationEntry extends CombinedTemplateCreationEntry implements Cloneable {
@@ -57,7 +58,8 @@ public class AspectCreationEntry extends CombinedTemplateCreationEntry implement
super(name, desc, null, descriptor, descriptor);
setId(id);
// computes the icon path
- // due to visibility problems on URL image descriptor, use the toString() method...
+ // due to visibility problems on URL image descriptor, use the
+ // toString() method...
computeIconPathFromImageDescriptor(descriptor);
this.entry = entry;
this.properties = properties;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/AspectUnspecifiedTypeConnectionTool.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/AspectUnspecifiedTypeConnectionTool.java
index 624707d945b..b11c1b513f7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/AspectUnspecifiedTypeConnectionTool.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/AspectUnspecifiedTypeConnectionTool.java
@@ -70,7 +70,9 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
private static final int STATE_CONNECTION_WAITING_END = STATE_CONNECTION_STARTED + 1;
- /** List of element types of which one will be created (of type <code>IElementType</code>). */
+ /**
+ * List of element types of which one will be created (of type <code>IElementType</code>).
+ */
// protected List elementTypes;
/** post action list */
@@ -134,7 +136,7 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
if(!selectedEditParts.isEmpty()) {
IGraphicalEditPart targetEditPart = (IGraphicalEditPart)selectedEditParts.get(selectedEditParts.size() - 1);
- //allow add the listener only one time the target
+ // allow add the listener only one time the target
boolean done = false;
for(int i = 0; i < selectedEditParts.size(); i++) {
IGraphicalEditPart sourceEditPart = (IGraphicalEditPart)selectedEditParts.get(i);
@@ -145,7 +147,7 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
}
CreateConnectionRequest connectionRequest = (CreateConnectionRequest)createTargetRequest();
- //get the anchors locations
+ // get the anchors locations
Point[] newLocation = LayoutUtils.getLinkAnchor(sourceEditPart, targetEditPart);
connectionRequest.setTargetEditPart(sourceEditPart);
connectionRequest.setType(RequestConstants.REQ_CONNECTION_START);
@@ -170,7 +172,8 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
// adds the listener
if(requiresPostAction) {
- // register a listener to have information about element creation
+ // register a listener to have information about element
+ // creation
// retrieves editing domain
TransactionalEditingDomain domain;
try {
@@ -193,7 +196,8 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
}
};
- //we need to add only one time the listener of the target (eobject)
+ // we need to add only one time the listener of the
+ // target (eobject)
if(!done) {
listeners.add(listener);
eobjects.add(eObject);
@@ -205,7 +209,6 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
}
}
-
Command command = targetEditPart.getCommand(connectionRequest);
cmd.add(command);
}
@@ -243,7 +246,6 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
// deactivation flag.
setAvoidDeactivation(true);
-
if(getTargetEditPart() == null) {
return false;
}
@@ -326,7 +328,8 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
Node childNode = nodeList.item(i);
String childName = childNode.getNodeName();
if(IPapyrusPaletteConstant.POST_ACTION.equals(childName)) {
- // node is a post action => retrieve the id of the provider in charge of this configuration
+ // node is a post action => retrieve the id of the
+ // provider in charge of this configuration
IAspectActionProvider provider = AspectToolService.getInstance().getProvider(AspectToolService.getProviderId(childNode));
if(provider != null) {
IAspectAction action = provider.createAction(childNode);
@@ -352,9 +355,9 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
return new CreateAspectUnspecifiedTypeConnectionRequest(getElementTypes(), false, getPreferencesHint());
}
-
/**
- * Copy of the class {@link CreateUnspecifiedTypeConnectionRequest} to use the Papyrus request factory instead of the gmf one.
+ * Copy of the class {@link CreateUnspecifiedTypeConnectionRequest} to use
+ * the Papyrus request factory instead of the gmf one.
*/
public class CreateAspectUnspecifiedTypeConnectionRequest extends CreateUnspecifiedTypeConnectionRequest {
@@ -370,22 +373,22 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
private Map requests = new HashMap();
/**
- * A flag to indicate if the Modeling Assistant Service should be used to
- * find the types when the other end of the connection is known.
+ * A flag to indicate if the Modeling Assistant Service should be used
+ * to find the types when the other end of the connection is known.
*/
private boolean useModelingAssistantService;
/**
- * A flag to indicate if this request is to create a connection from target
- * to source.
+ * A flag to indicate if this request is to create a connection from
+ * target to source.
*/
private boolean directionReversed = false;
/**
- * The hint used to find the appropriate preference store from which general
- * diagramming preference values for properties of shapes, connections, and
- * diagrams can be retrieved. This hint is mapped to a preference store in
- * the {@link DiagramPreferencesRegistry}.
+ * The hint used to find the appropriate preference store from which
+ * general diagramming preference values for properties of shapes,
+ * connections, and diagrams can be retrieved. This hint is mapped to a
+ * preference store in the {@link DiagramPreferencesRegistry}.
*/
private PreferencesHint preferencesHint;
@@ -393,16 +396,18 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
* Creates a new <code>CreateUnspecifiedTypeConnectionRequest</code>.
*
* @param relationshipTypes
- * List of relationship types of which one will be created (of
- * type <code>IElementType</code>).
+ * List of relationship types of which one will be created
+ * (of type <code>IElementType</code>).
* @param useModelingAssistantService
- * True if the Modeling Assistant Service should be used to find
- * the types when the other end of the connection is known.
+ * True if the Modeling Assistant Service should be used to
+ * find the types when the other end of the connection is
+ * known.
* @param preferencesHint
- * The preference hint that is to be used to find the appropriate
- * preference store from which to retrieve diagram preference
- * values. The preference hint is mapped to a preference store in
- * the preference registry <@link DiagramPreferencesRegistry>.
+ * The preference hint that is to be used to find the
+ * appropriate preference store from which to retrieve
+ * diagram preference values. The preference hint is mapped
+ * to a preference store in the preference registry <@link
+ * DiagramPreferencesRegistry>.
*/
public CreateAspectUnspecifiedTypeConnectionRequest(List<IElementType> relationshipTypes, boolean useModelingAssistantService, PreferencesHint preferencesHint) {
super(relationshipTypes, useModelingAssistantService, preferencesHint);
@@ -425,7 +430,8 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
}
/**
- * Returns the <code>CreateRequest</code> for the relationship type passed in.
+ * Returns the <code>CreateRequest</code> for the relationship type
+ * passed in.
*
* @param relationshipType
* @return the <code>CreateRequest</code>
@@ -437,7 +443,6 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
return null;
}
-
public void addRequest(IElementType relationshipType, Request request) {
if(requests != null) {
requests.put(relationshipType, request);
@@ -456,14 +461,14 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
return Collections.EMPTY_LIST;
}
- // /**
- // * Returns the list of element types.
- // *
- // * @return Returns the list of element types.
- // */
- // public List getElementTypes() {
- // return relationshipTypes;
- // }
+ // /**
+ // * Returns the list of element types.
+ // *
+ // * @return Returns the list of element types.
+ // */
+ // public List getElementTypes() {
+ // return relationshipTypes;
+ // }
/**
* @see org.eclipse.gef.requests.CreateConnectionRequest#setSourceEditPart(org.eclipse.gef.EditPart)
@@ -540,8 +545,9 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
/**
* Should the Modeling Assistant Service be used?
*
- * @return Returns true if the Modeling Assistant Service should be used to
- * find the types when the other end of the connection is known.
+ * @return Returns true if the Modeling Assistant Service should be used
+ * to find the types when the other end of the connection is
+ * known.
*/
public boolean useModelingAssistantService() {
return useModelingAssistantService;
@@ -549,8 +555,8 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
/**
* Gets the preferences hint that is to be used to find the appropriate
- * preference store from which to retrieve diagram preference values. The
- * preference hint is mapped to a preference store in the preference
+ * preference store from which to retrieve diagram preference values.
+ * The preference hint is mapped to a preference store in the preference
* registry <@link DiagramPreferencesRegistry>.
*
* @return the preferences hint
@@ -568,10 +574,11 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
* @param type
* the <code>IElementType</code>
* @param preferencesHint
- * The preference hint that is to be used to find the appropriate
- * preference store from which to retrieve diagram preference
- * values. The preference hint is mapped to a preference store in
- * the preference registry <@link DiagramPreferencesRegistry>.
+ * The preference hint that is to be used to find the
+ * appropriate preference store from which to retrieve
+ * diagram preference values. The preference hint is mapped
+ * to a preference store in the preference registry <@link
+ * DiagramPreferencesRegistry>.
* @return the new request
*/
public static CreateViewRequest getCreateShapeRequest(IElementType type, PreferencesHint preferencesHint) {
@@ -593,10 +600,11 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
* @param type
* the <code>IElementType</code>
* @param preferencesHint
- * The preference hint that is to be used to find the appropriate
- * preference store from which to retrieve diagram preference
- * values. The preference hint is mapped to a preference store in
- * the preference registry <@link DiagramPreferencesRegistry>.
+ * The preference hint that is to be used to find the
+ * appropriate preference store from which to retrieve
+ * diagram preference values. The preference hint is mapped
+ * to a preference store in the preference registry <@link
+ * DiagramPreferencesRegistry>.
* @return the new request
*/
public static CreateConnectionViewRequest getCreateConnectionRequest(IElementType type, PreferencesHint preferencesHint) {
@@ -622,10 +630,11 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
* @param graphicalHint
* graphical hint for the view to create
* @param preferencesHint
- * The preference hint that is to be used to find the appropriate
- * preference store from which to retrieve diagram preference
- * values. The preference hint is mapped to a preference store in
- * the preference registry <@link DiagramPreferencesRegistry>.
+ * The preference hint that is to be used to find the
+ * appropriate preference store from which to retrieve
+ * diagram preference values. The preference hint is mapped
+ * to a preference store in the preference registry <@link
+ * DiagramPreferencesRegistry>.
* @return the new request
*/
public static CreateConnectionViewRequest getCreateConnectionRequest(IElementType type, String graphicalHint, PreferencesHint preferencesHint) {
@@ -636,7 +645,8 @@ public class AspectUnspecifiedTypeConnectionTool extends UnspecifiedTypeConnecti
ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(type, graphicalHint, preferencesHint);
return new CreateConnectionViewRequest(viewDescriptor);
} else if(type instanceof IHintedType) {
- // force the graphical hint instead of the hint of the hinted element
+ // force the graphical hint instead of the hint of the hinted
+ // element
return new CreateConnectionViewAndElementRequest(type, graphicalHint, preferencesHint);
} else {
return new CreateConnectionViewAndElementRequest(type, preferencesHint);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/AspectUnspecifiedTypeCreationTool.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/AspectUnspecifiedTypeCreationTool.java
index c758edda66c..f05138a1498 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/AspectUnspecifiedTypeCreationTool.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/AspectUnspecifiedTypeCreationTool.java
@@ -58,7 +58,9 @@ import org.w3c.dom.NodeList;
*/
public class AspectUnspecifiedTypeCreationTool extends UnspecifiedTypeCreationTool {
- /** List of element types of which one will be created (of type <code>IElementType</code>). */
+ /**
+ * List of element types of which one will be created (of type <code>IElementType</code>).
+ */
protected List<IElementType> elementTypes;
/** post action list */
@@ -164,8 +166,10 @@ public class AspectUnspecifiedTypeCreationTool extends UnspecifiedTypeCreationTo
org.w3c.dom.Node childNode = nodeList.item(i);
String childName = childNode.getNodeName();
if(IPapyrusPaletteConstant.POST_ACTION.equals(childName)) {
- // node is a post action => retrieve the id of the factory in charge of this configuration
- // node is a post action => retrieve the id of the provider in charge of this configuration
+ // node is a post action => retrieve the id of the
+ // factory in charge of this configuration
+ // node is a post action => retrieve the id of the
+ // provider in charge of this configuration
IAspectActionProvider provider = AspectToolService.getInstance().getProvider(AspectToolService.getProviderId(childNode));
if(provider != null) {
IAspectAction action = provider.createAction(childNode);
@@ -240,7 +244,6 @@ public class AspectUnspecifiedTypeCreationTool extends UnspecifiedTypeCreationTo
return buffer.toString();
}
-
public class CreateAspectUnspecifiedTypeRequest extends CreateUnspecifiedTypeRequest {
/**
@@ -281,7 +284,8 @@ public class AspectUnspecifiedTypeCreationTool extends UnspecifiedTypeCreationTo
}
/**
- * Returns the semantic hint for the given type. In case of extended type, it returns the hint of the super type
+ * Returns the semantic hint for the given type. In case of extended
+ * type, it returns the hint of the super type
*
* @param elementType
* the hinted element type from which hint is retrieved
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/ExtendedPaletteProviderConfiguration.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/ExtendedPaletteProviderConfiguration.java
index 0fe4393801f..41a553ab6ce 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/ExtendedPaletteProviderConfiguration.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/ExtendedPaletteProviderConfiguration.java
@@ -29,8 +29,8 @@ public class ExtendedPaletteProviderConfiguration extends XMLPaletteProviderConf
private final String path;
/**
- * Creates a new <code>ProviderContributionDescriptor</code> instance given a provider
- * configuration element
+ * Creates a new <code>ProviderContributionDescriptor</code> instance given
+ * a provider configuration element
*
* @param configElement
* The provider XML configuration element
@@ -51,7 +51,8 @@ public class ExtendedPaletteProviderConfiguration extends XMLPaletteProviderConf
}
/**
- * Builds a new provider contribution descriptor by parsing its configuration element
+ * Builds a new provider contribution descriptor by parsing its
+ * configuration element
*
* @param configElement
* A provider configuration element
@@ -63,9 +64,11 @@ public class ExtendedPaletteProviderConfiguration extends XMLPaletteProviderConf
}
/**
- * Returns the unique identifier of the bundle that contains the configuration file
+ * Returns the unique identifier of the bundle that contains the
+ * configuration file
*
- * @return the unique identifier of the bundle that contains the configuration file
+ * @return the unique identifier of the bundle that contains the
+ * configuration file
*/
public String getBundleID() {
return bundleID;
@@ -80,6 +83,4 @@ public class ExtendedPaletteProviderConfiguration extends XMLPaletteProviderConf
return path;
}
-
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/IProfileDependantPaletteProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/IProfileDependantPaletteProvider.java
index 230dd0bb7d9..7e59fd4331a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/IProfileDependantPaletteProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/IProfileDependantPaletteProvider.java
@@ -15,9 +15,9 @@ import java.util.Collection;
import org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider;
-
/**
- * Interface implemented by all palette providers that requires some profiles applied to be shown
+ * Interface implemented by all palette providers that requires some profiles
+ * applied to be shown
*/
public interface IProfileDependantPaletteProvider extends IPaletteProvider {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/InheritedDecorator.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/InheritedDecorator.java
index 4c5bc78f453..995b6b12380 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/InheritedDecorator.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/InheritedDecorator.java
@@ -51,11 +51,10 @@ import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Type;
import org.eclipse.uml2.uml.UMLPackage;
-
/**
*
- * The decorator to represent inherited element
- * This decorator adds a small image ( the generalization icon) next to the UML Element which are inherited.
+ * The decorator to represent inherited element This decorator adds a small
+ * image ( the generalization icon) next to the UML Element which are inherited.
* 3 positions are defined for the decoration :
* <ul>
* <li>if the UML Element is represented like an affixed child node : in {@link PositionConstants#NORTH_WEST} or {@link PositionConstants#SOUTH_EAST}
@@ -81,7 +80,6 @@ public class InheritedDecorator implements IDecorator {
/** the image used added to represent an inherited element */
private static final Image ICON_HYPERLINK = Activator.getPluginIconImage(pluginID, imagePath);
-
/**
* Creates a new <code>AbstractDecorator</code> for the decorator target
* passed in.
@@ -134,8 +132,7 @@ public class InheritedDecorator implements IDecorator {
*
* @param decoratorTarget
* IDecoratorTarget to check and return valid Classifier target.
- * @return node Node if IDecoratorTarget can be supported, null
- * otherwise.
+ * @return node Node if IDecoratorTarget can be supported, null otherwise.
*/
static public Node getDecoratorTargetNode(IDecoratorTarget decoratorTarget) {
DescriptionStyle descStyle = null;
@@ -151,7 +148,6 @@ public class InheritedDecorator implements IDecorator {
}
-
/**
* Creates the appropriate review decoration if all the criteria is
* satisfied by the view passed in.
@@ -168,15 +164,27 @@ public class InheritedDecorator implements IDecorator {
if(descStyle != null) {
if(isInherited(node)) {
- // if(Util.isAffixedChildNode(gep)) {
-
- // setDecoration(getDecoratorTarget().addDecoration(figure, locator, false));
- // } else {
- // setDecoration(getDecoratorTarget().addShapeDecoration(figure, getDirection(node), -1, false));
- // }
-
-
- if(gep != null && gep.getRoot() != null) {//if the gep has no parent, we can't test if the container is a compartment list (because, we call the method DiagramEditPartsUtil.getEditPartFromView((View)container, gep);
+ // if(Util.isAffixedChildNode(gep)) {
+
+ // setDecoration(getDecoratorTarget().addDecoration(figure,
+ // locator, false));
+ // } else {
+ // setDecoration(getDecoratorTarget().addShapeDecoration(figure,
+ // getDirection(node), -1, false));
+ // }
+
+ if(gep != null && gep.getRoot() != null) {// if the gep has
+ // no parent, we
+ // can't test if
+ // the container
+ // is a
+ // compartment
+ // list
+ // (because, we
+ // call the
+ // method
+ // DiagramEditPartsUtil.getEditPartFromView((View)container,
+ // gep);
IFigure figure = getFigure(ICON_HYPERLINK);
if(isInCompartmentList(node) && !Util.isAffixedChildNode(gep)) {
setDecoration(getDecoratorTarget().addShapeDecoration(figure, getDirection(node), -1, false));
@@ -186,22 +194,17 @@ public class InheritedDecorator implements IDecorator {
}
}
-
}
}
}
}
-
-
-
/**
* Returns a figure corresponding to this image
*
* @param image
* a image
- * @return
- * a figure corresponding to this image
+ * @return a figure corresponding to this image
*/
public IFigure getFigure(Image image) {
IMapMode mm = MapModeUtil.getMapMode(((IGraphicalEditPart)getDecoratorTarget().getAdapter(IGraphicalEditPart.class)).getFigure());
@@ -216,9 +219,8 @@ public class InheritedDecorator implements IDecorator {
*
* @param node
* the node
- * @return
- * the direction to set the decorator for the node
- * direction can be :
+ * @return the direction to set the decorator for the node direction can be
+ * :
* <ul>
* <li> {@link PositionConstants#NORTH_WEST} or {@link PositionConstants#SOUTH_EAST}</li> if the node is an Affixed Child Node
* <li>{@link PositionConstants#EAST}</li> if the node is in a compartment list
@@ -228,24 +230,26 @@ public class InheritedDecorator implements IDecorator {
protected Direction getDirection(Node node) {
IGraphicalEditPart gep = (IGraphicalEditPart)getDecoratorTarget().getAdapter(IGraphicalEditPart.class);
assert gep != null;
- //test if its an affixed ChildNode
- // if(Util.isAffixedChildNode(gep)) {
+ // test if its an affixed ChildNode
+ // if(Util.isAffixedChildNode(gep)) {
//
- // IBorderItemLocator loc = ((BorderNamedElementEditPart)gep).getBorderItemLocator();
- // int location = loc.getCurrentSideOfParent();
- // if(PositionConstants.NONE == location) { //sometimes getBorderItemLocator doesn't work correctly!
- // location = PositionConstants.NORTH_WEST;
- // }
- // switch(location) {
- // case PositionConstants.NORTH:
- // case PositionConstants.NORTH_WEST:
- // case PositionConstants.WEST:
- // case PositionConstants.SOUTH_WEST:
- // // return IDecoratorTarget.Direction.NORTH_WEST;
- // default:
- // return IDecoratorTarget.Direction.SOUTH_EAST;
- // }
- // }
+ // IBorderItemLocator loc =
+ // ((BorderNamedElementEditPart)gep).getBorderItemLocator();
+ // int location = loc.getCurrentSideOfParent();
+ // if(PositionConstants.NONE == location) { //sometimes
+ // getBorderItemLocator doesn't work correctly!
+ // location = PositionConstants.NORTH_WEST;
+ // }
+ // switch(location) {
+ // case PositionConstants.NORTH:
+ // case PositionConstants.NORTH_WEST:
+ // case PositionConstants.WEST:
+ // case PositionConstants.SOUTH_WEST:
+ // // return IDecoratorTarget.Direction.NORTH_WEST;
+ // default:
+ // return IDecoratorTarget.Direction.SOUTH_EAST;
+ // }
+ // }
if(gep.getParent() != null) {
if(isInCompartmentList(node) && !Util.isAffixedChildNode(gep)) {
return IDecoratorTarget.Direction.EAST;
@@ -259,8 +263,7 @@ public class InheritedDecorator implements IDecorator {
*
* @param node
* the node on which we want add an Overlay
- * @return
- * <code>true</code> if the compartment is managed by an {@link XYLayoutEditPolicy}
+ * @return <code>true</code> if the compartment is managed by an {@link XYLayoutEditPolicy}
*/
protected boolean isInCompartmentList(Node node) {
IGraphicalEditPart gep = (IGraphicalEditPart)getDecoratorTarget().getAdapter(IGraphicalEditPart.class);
@@ -269,7 +272,9 @@ public class InheritedDecorator implements IDecorator {
if(container instanceof View) {
EditPart EP = DiagramEditPartsUtil.getEditPartFromView((View)container, gep);
EditPolicy editPolicy = EP.getEditPolicy(EditPolicy.LAYOUT_ROLE);
- if(!(editPolicy instanceof XYLayoutEditPolicy)) {//we are in a compartment list
+ if(!(editPolicy instanceof XYLayoutEditPolicy)) {// we are in a
+ // compartment
+ // list
return true;
}
}
@@ -282,8 +287,7 @@ public class InheritedDecorator implements IDecorator {
*
* @param node
* a node
- * @return
- * <code>true</code> if the node is an inherited element <code>false</code> if not
+ * @return <code>true</code> if the node is an inherited element <code>false</code> if not
*/
protected boolean isInherited(Node node) {
EObject element = node.getElement();
@@ -315,8 +319,8 @@ public class InheritedDecorator implements IDecorator {
}
/**
- * getDescriptionStyle
- * Accessor to retrieve the description style from a Node.
+ * getDescriptionStyle Accessor to retrieve the description style from a
+ * Node.
*
* @param node
* Node to retrieve the description style from.
@@ -339,17 +343,17 @@ public class InheritedDecorator implements IDecorator {
*/
public void notifyChanged(Notification notification) {
-
-
if(notification.getEventType() == Notification.REMOVE) {
if(notification.getNotifier() instanceof Classifier) {
IGraphicalEditPart gep = (IGraphicalEditPart)getDecoratorTarget().getAdapter(IGraphicalEditPart.class);
assert gep != null;
- //we remove the listener on the container (because it's changing
+ // we remove the listener on the container (because it's
+ // changing
DiagramEventBroker.getInstance(gep.getEditingDomain()).removeNotificationListener((EObject)notification.getNotifier(), notificationListener);
}
}
- //we update the listeners It's useful when an Element with overlay changes of parent
+ // we update the listeners It's useful when an Element with overlay
+ // changes of parent
deactivate();
activate();
refresh();
@@ -357,7 +361,6 @@ public class InheritedDecorator implements IDecorator {
};
-
/**
* Adds listeners on
* <ul>
@@ -372,13 +375,15 @@ public class InheritedDecorator implements IDecorator {
View view = ((View)gep.getModel());
if(view instanceof Node) {
- //the location of the decorator can change if it's an Affixed Child Node
+ // the location of the decorator can change if it's an Affixed Child
+ // Node
if(isInherited((Node)view) && Util.isAffixedChildNode(gep)) {
DiagramEventBroker.getInstance(gep.getEditingDomain()).addNotificationListener(gep.getNotationView(), notificationListener);
}
}
- //if the graphical parent is a Property, we add a listener on the type of the property, to refresh the decoration
+ // if the graphical parent is a Property, we add a listener on the type
+ // of the property, to refresh the decoration
EObject parent = view.eContainer();
if(parent instanceof DecorationNode) {
parent = parent.eContainer();
@@ -391,21 +396,22 @@ public class InheritedDecorator implements IDecorator {
}
/*
- * We listen the changes on the UML parent, in order to know if the element is changing of parent
- * Adding a listener using the following EReference doesn't work
- * UMLPackage.eINSTANCE.getElement_Owner();
+ * We listen the changes on the UML parent, in order to know if the
+ * element is changing of parent Adding a listener using the following
+ * EReference doesn't work UMLPackage.eINSTANCE.getElement_Owner();
* UMLPackage.eINSTANCE.getProperty_Class();
- * UMLPackage.eINSTANCE.getNamedElement_Namespace();
- * that's why we listen the parent
+ * UMLPackage.eINSTANCE.getNamedElement_Namespace(); that's why we
+ * listen the parent
*/
if(view.getElement() instanceof Element) {
Element semanticElement = (Element)view.getElement();
/*
- * We need add a listener only if the element is an element which can be inherited, like Property, Operation, Signal, Classifier...
+ * We need add a listener only if the element is an element which
+ * can be inherited, like Property, Operation, Signal, Classifier...
*/
if(semanticElement != null && canBeInherited(semanticElement)) {
- //we listen if the container of the element changes!
+ // we listen if the container of the element changes!
if(semanticElement.eContainer() != null) {
DiagramEventBroker.getInstance(gep.getEditingDomain()).addNotificationListener(semanticElement.eContainer(), notificationListener);
}
@@ -418,8 +424,7 @@ public class InheritedDecorator implements IDecorator {
*
* @param semanticElement
* the element to test
- * @return
- * <code>true</code> if the element can be inherited
+ * @return <code>true</code> if the element can be inherited
*/
protected boolean canBeInherited(Element semanticElement) {
/*
@@ -442,14 +447,14 @@ public class InheritedDecorator implements IDecorator {
public void deactivate() {
removeDecoration();
-
IGraphicalEditPart gep = (IGraphicalEditPart)getDecoratorTarget().getAdapter(IGraphicalEditPart.class);
assert gep != null;
DiagramEventBroker.getInstance(gep.getEditingDomain()).removeNotificationListener(gep.getNotationView(), notificationListener);
View view = ((View)gep.getModel());
if(view instanceof Node) {
- //the location of the decorator can change if it's an Affixed Child Node
+ // the location of the decorator can change if it's an Affixed Child
+ // Node
if(isInherited((Node)view) && Util.isAffixedChildNode(gep)) {
DiagramEventBroker.getInstance(gep.getEditingDomain()).removeNotificationListener(gep.getNotationView(), notificationListener);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/InheritedDecoratorProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/InheritedDecoratorProvider.java
index 704ae6d8b27..f40fc8ee42a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/InheritedDecoratorProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/InheritedDecoratorProvider.java
@@ -47,7 +47,9 @@ public class InheritedDecoratorProvider extends AbstractProvider implements IDec
/*
* (non-Javadoc)
*
- * @see org.eclipse.gmf.runtime.common.core.internal.service.IProvider#provides(org.eclipse.gmf.runtime.common.core.service.IOperation)
+ * @see
+ * org.eclipse.gmf.runtime.common.core.internal.service.IProvider#provides
+ * (org.eclipse.gmf.runtime.common.core.service.IOperation)
*/
public boolean provides(IOperation operation) {
Assert.isNotNull(operation);
@@ -60,5 +62,4 @@ public class InheritedDecoratorProvider extends AbstractProvider implements IDec
return InheritedDecorator.getDecoratorTargetNode(decoratorTarget) != null;
}
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/LocalPaletteProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/LocalPaletteProvider.java
index 0c6336d363f..ec3cab68d8c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/LocalPaletteProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/LocalPaletteProvider.java
@@ -64,7 +64,8 @@ public class LocalPaletteProvider extends AbstractProvider implements IPalettePr
}
/**
- * Adds the configuration elements to the list of palette provider XML contributions
+ * Adds the configuration elements to the list of palette provider XML
+ * contributions
*
* @param configElement
* the configuration element from which information are retrieved
@@ -109,7 +110,8 @@ public class LocalPaletteProvider extends AbstractProvider implements IPalettePr
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
InputStream inputStream = getXmlFile(path);
- // the file should never be null in this implementation, but sub-classes could return null
+ // the file should never be null in this implementation, but
+ // sub-classes could return null
if(inputStream == null) {
throw new IOException("Impossible to load file: " + path);
} else {
@@ -133,8 +135,8 @@ public class LocalPaletteProvider extends AbstractProvider implements IPalettePr
*
* @param path
* the path to the file
- * @return the file using the specified path in the plugin state location, even if it does not exists. In the latter case, the method
- * {@link File#exists()} returns <code>false</code>.
+ * @return the file using the specified path in the plugin state location,
+ * even if it does not exists. In the latter case, the method {@link File#exists()} returns <code>false</code>.
*/
public InputStream getXmlFile(String path) throws IOException {
return new FileInputStream(Activator.getDefault().getStateLocation().append(path).toFile());
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/PaletteProfileApplicationListener.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/PaletteProfileApplicationListener.java
index f2dde018ae3..ebf47a71b16 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/PaletteProfileApplicationListener.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/PaletteProfileApplicationListener.java
@@ -19,8 +19,8 @@ import org.eclipse.papyrus.core.listenerservice.IPapyrusListener;
import org.eclipse.uml2.uml.ProfileApplication;
/**
- * Listener for the palette Service that updates palette contribution in case of profile
- * application/unapplication
+ * Listener for the palette Service that updates palette contribution in case of
+ * profile application/unapplication
*/
public class PaletteProfileApplicationListener implements IPapyrusListener {
@@ -35,7 +35,8 @@ public class PaletteProfileApplicationListener implements IPapyrusListener {
*/
public void notifyChanged(Notification notification) {
// check notification is relevant for us
- // notifier shoud be instance of profileApplication. In this case, reload the palette
+ // notifier shoud be instance of profileApplication. In this case,
+ // reload the palette
if(notification.getNotifier() instanceof ProfileApplication) {
if(Notification.SET == notification.getEventType()) {
PapyrusPaletteService.getInstance().providerChanged(new ProviderChangeEvent(PapyrusPaletteService.getInstance()));
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/PapyrusPaletteService.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/PapyrusPaletteService.java
index ec5a39b1eb2..11e6c99667a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/PapyrusPaletteService.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/PapyrusPaletteService.java
@@ -71,7 +71,8 @@ import org.eclipse.ui.IEditorPart;
import org.osgi.framework.Bundle;
/**
- * Service that contributes to the palette of a given editor with a given content.
+ * Service that contributes to the palette of a given editor with a given
+ * content.
* <p>
* It replaces the standard palette service. It provides better preferences management, and better customization possibilities.
*/
@@ -86,8 +87,8 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
protected XMLPaletteProviderConfiguration providerConfiguration;
/**
- * Constructs a <code>ISemanticProvider</code> descriptor for the specified configuration
- * element.
+ * Constructs a <code>ISemanticProvider</code> descriptor for the
+ * specified configuration element.
*
* @param element
* The configuration element describing the provider.
@@ -112,7 +113,6 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
return XMLPaletteProviderConfiguration.parse(element);
}
-
/**
* Returns the provider configuration for this descriptor
*
@@ -123,11 +123,13 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
}
/**
- * Returns <code>true</code> if this configuration provides only predefinition of entries
- * and neither use predefined entries nor creates new entries.
+ * Returns <code>true</code> if this configuration provides only
+ * predefinition of entries and neither use predefined entries nor
+ * creates new entries.
*
- * @return <code>true</code> if this configuration provides only predefinition of entries
- * and neither use predefined entries nor creates new entries.
+ * @return <code>true</code> if this configuration provides only
+ * predefinition of entries and neither use predefined entries
+ * nor creates new entries.
*/
// @unused
public boolean hasOnlyEntriesDefinition() {
@@ -217,11 +219,13 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
}
/**
- * checks if this provider is providing elements, even if this should be hidden
+ * checks if this provider is providing elements, even if this should be
+ * hidden
*
* @param operation
* the operation to contribute
- * @return <code>true</code> if this provider contributes to the operation
+ * @return <code>true</code> if this provider contributes to the
+ * operation
*/
public boolean providesWithVisibility(ContributeToPaletteOperation operation) {
if(!super.provides(operation)) {
@@ -235,7 +239,8 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
return policy.provides(operation);
}
- // FIXME: that statement is always true (let's see the method's parameter).
+ // FIXME: that statement is always true (let's see the method's
+ // parameter).
// => Remove the test
if(operation instanceof ContributeToPaletteOperation) {
ContributeToPaletteOperation o = operation;
@@ -293,7 +298,6 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
return ExtendedPaletteProviderConfiguration.parse(element);
}
-
/**
* {@inheritDoc}
*/
@@ -339,7 +343,7 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
}
}
- // check the stream
+ // check the stream
if(stream == null) {
Activator.log.error("Impossible to read initial file", null);
return null;
@@ -349,10 +353,14 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
File bundleFolder = new File(stateLocationRootFile, realId);
bundleFolder.mkdir();
- // for all intermediate folders in filePath, create a folder in plugin state location
+ // for all intermediate folders in filePath, create a folder in
+ // plugin state location
File root = bundleFolder;
String[] folders = filePath.split("/");
- for(int i = 0; i < folders.length - 1; i++) { // all intermediate folders. Last one is the file name itself...
+ for(int i = 0; i < folders.length - 1; i++) { // all intermediate
+ // folders. Last one
+ // is the file name
+ // itself...
String folderName = folders[i];
if(folderName != null && folderName.length() != 0) {
File newFolder = new File(root, folders[i]);
@@ -441,7 +449,8 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
/**
* Returns the redefinition file URI
*
- * @return the redefinition file URI or <code>null</code> if no local redefinition can be found.
+ * @return the redefinition file URI or <code>null</code> if no local
+ * redefinition can be found.
*/
public URI getRedefinitionFileURI() {
String path = PapyrusPalettePreferences.getPaletteRedefinition(getContributionID());
@@ -492,8 +501,9 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
}
/**
- * Returns <code>true</code> if this configuration provides only predefinition of entries
- * and neither use predefined entries nor creates new entries.
+ * Returns <code>true</code> if this configuration provides only
+ * predefinition of entries and neither use predefined entries nor
+ * creates new entries.
*
* @return <code>false</code> as local palettes are never defining tools
*/
@@ -564,7 +574,8 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
return false;
}
- // will never work, ID of the site is the multi diagram editor...
+ // will never work, ID of the site is the multi diagram
+ // editor...
if(description.getContributionEditorID() != null) {
if(!description.getContributionEditorID().equals(((DiagramEditorWithFlyOutPalette)part).getContributorId())) {
return false;
@@ -597,7 +608,8 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
if(!isEnable) {
return false;
}
- // FIXME: that statement is always true (let's see the method's parameter).
+ // FIXME: that statement is always true (let's see the method's
+ // parameter).
// => Remove the test
if(operation instanceof ContributeToPaletteOperation) {
ContributeToPaletteOperation o = operation;
@@ -607,7 +619,8 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
return false;
}
- // will never work, ID of the site is the multi diagram editor...
+ // will never work, ID of the site is the multi diagram
+ // editor...
if(description.getContributionEditorID() != null) {
if(!description.getContributionEditorID().equals(((DiagramEditorWithFlyOutPalette)part).getContributorId())) {
return false;
@@ -639,7 +652,7 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
*/
@Override
public void setContributions(IConfigurationElement configElement) {
- //
+ //
}
/** the singleton instance of the palette service */
@@ -715,7 +728,8 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
*/
@Override
protected Service.ProviderDescriptor newProviderDescriptor(IConfigurationElement element) {
- // if provider is coming from palette definition extension point : define an extended palette provider...
+ // if provider is coming from palette definition extension point :
+ // define an extended palette provider...
String extensionPointId = element.getDeclaringExtension().getExtensionPointUniqueIdentifier();
if(PALETTE_DEFINITION_FULL_ID.equals(extensionPointId)) {
return new ExtendedProviderDescriptor(element);
@@ -746,7 +760,6 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
execute(new ContributeToPaletteOperation(editor, content, root, predefinedEntries));
}
-
/**
* Returns the list of providers for this service
*
@@ -803,16 +816,18 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
}
/**
- * Updates the children of an existing palette container to match the palette entries in a new
- * palette container by adding or removing new palette entries only. This method works
- * recursively on any children that are palette container entries. Existing leaf palette entries
- * that are to be kept remain the same -- they are not replaced with the new palette entry. This
- * is so that palette state (such as whether a drawer is pinned or expanded) can be preserved
- * when the palette is updated.
+ * Updates the children of an existing palette container to match the
+ * palette entries in a new palette container by adding or removing new
+ * palette entries only. This method works recursively on any children that
+ * are palette container entries. Existing leaf palette entries that are to
+ * be kept remain the same -- they are not replaced with the new palette
+ * entry. This is so that palette state (such as whether a drawer is pinned
+ * or expanded) can be preserved when the palette is updated.
*
* @param existingContainer
- * the palette container to be updated with new entries, have obsolete entries
- * removed, and whose existing entries will remain the same
+ * the palette container to be updated with new entries, have
+ * obsolete entries removed, and whose existing entries will
+ * remain the same
* @param newContainer
* the new palette entries
*/
@@ -855,13 +870,15 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
}
/**
- * Returns the list of all providers that are really contributing to the palette
+ * Returns the list of all providers that are really contributing to the
+ * palette
*
* @param part
* the editor part fopr which the palette is displayed
* @param root
* the palette root of the current palette
- * @return the list of all providers that are really contributing to the palette
+ * @return the list of all providers that are really contributing to the
+ * palette
*/
public List<PapyrusPaletteService.ProviderDescriptor> getContributingProviders(IEditorPart part, PaletteRoot root) {
// init...
@@ -872,7 +889,8 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
// 3. inits the list of ids of hidden palettes
List<PapyrusPaletteService.ProviderDescriptor> descriptors = new ArrayList<PapyrusPaletteService.ProviderDescriptor>();
final ContributeToPaletteOperation o = new ContributeToPaletteOperation(part, part.getEditorInput(), root, new HashMap());
- // For each provider, checks it contributes to the palette of this editor part
+ // For each provider, checks it contributes to the palette of this
+ // editor part
Iterator<? extends Service.ProviderDescriptor> it = getProviders().iterator();
while(it.hasNext()) {
Service.ProviderDescriptor provider = it.next();
@@ -886,7 +904,8 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
name = papyrusProviderDesc.getContributionID();
}
- // check if the name of the descriptor does not correspond to the name of a palette
+ // check if the name of the descriptor does not correspond to
+ // the name of a palette
// that should not be removed
boolean add = isChangeable(papyrusProviderDesc, name);
@@ -905,13 +924,15 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
}
/**
- * Checks if the name does not belong to a set of names that should not be in the action list
+ * Checks if the name does not belong to a set of names that should not be
+ * in the action list
*
* @param provider
* the provider to check
* @param name
* the name of the provider to check
- * @return <code>true</code> if the provider should appear in the list of actions
+ * @return <code>true</code> if the provider should appear in the list of
+ * actions
*/
protected boolean isChangeable(PapyrusPaletteService.ProviderDescriptor provider, String name) {
assert name != null;
@@ -927,12 +948,13 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
}
/**
- * Checks if the provider descriptor is able to fill the palette for the current active diagram
+ * Checks if the provider descriptor is able to fill the palette for the
+ * current active diagram
*
* @param provider
* the provider to check
- * @return <code>true</code> if the provider is able to fill the palette for the current active
- * diagram
+ * @return <code>true</code> if the provider is able to fill the palette for
+ * the current active diagram
*/
protected boolean isContributing(PapyrusPaletteService.ProviderDescriptor provider, ContributeToPaletteOperation o) {
return provider.providesWithVisibility(o);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/PluginPaletteProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/PluginPaletteProvider.java
index 533e70bf822..c2a28715bc8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/PluginPaletteProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/PluginPaletteProvider.java
@@ -29,9 +29,9 @@ import org.eclipse.papyrus.diagram.common.Activator;
import org.osgi.framework.Bundle;
import org.w3c.dom.Node;
-
/**
- * Provider extending the {@link LocalPaletteProvider} to reference xml-defined palettes into plugins, using the papyrus palette extension point
+ * Provider extending the {@link LocalPaletteProvider} to reference xml-defined
+ * palettes into plugins, using the papyrus palette extension point
*/
public class PluginPaletteProvider extends LocalPaletteProvider implements IProfileDependantPaletteProvider {
@@ -44,7 +44,8 @@ public class PluginPaletteProvider extends LocalPaletteProvider implements IProf
/**
* Return the provider ID that declares this provider
*
- * @return the id of the plugin that realizes this contribution to the palette
+ * @return the id of the plugin that realizes this contribution to the
+ * palette
*/
protected String getProviderID() {
return providerID;
@@ -85,7 +86,8 @@ public class PluginPaletteProvider extends LocalPaletteProvider implements IProf
}
/**
- * Adds the configuration elements to the list of palette provider XML contributions
+ * Adds the configuration elements to the list of palette provider XML
+ * contributions
*
* @param configElement
* the configuration element from which information are retrieved
@@ -103,7 +105,8 @@ public class PluginPaletteProvider extends LocalPaletteProvider implements IProf
requiredProfiles = new HashSet<String>();
try {
- // parse the content of the file to discover the required profiles
+ // parse the content of the file to discover the required
+ // profiles
// using safe computation
XMLDefinitionPaletteParser profileParser = new XMLDefinitionPaletteParser(new XMLRequiredProfileFactory(requiredProfiles));
for(int i = 0; i < contributions.getLength(); i++) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLDefinitionPaletteFactory.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLDefinitionPaletteFactory.java
index 92ef4f47cc2..47eaf27546f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLDefinitionPaletteFactory.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLDefinitionPaletteFactory.java
@@ -32,7 +32,8 @@ import org.eclipse.papyrus.diagram.common.Activator;
import org.w3c.dom.Node;
/**
- * Standard implementation of the palette factory. This one should be use to provide palette content
+ * Standard implementation of the palette factory. This one should be use to
+ * provide palette content
*/
public class XMLDefinitionPaletteFactory extends AbstractXMLDefinitionPaletteFactory implements IPapyrusPaletteConstant {
@@ -193,13 +194,13 @@ public class XMLDefinitionPaletteFactory extends AbstractXMLDefinitionPaletteFac
}
/**
- * Appends the given palette entry to the appropriate location in either a predefined palette
- * entry or the palette root.
+ * Appends the given palette entry to the appropriate location in either a
+ * predefined palette entry or the palette root.
*
* @param root
* @param predefinedEntries
- * map of predefined palette entries where the key is the palette entry id and the
- * value is the palette entry
+ * map of predefined palette entries where the key is the palette
+ * entry id and the value is the palette entry
* @param path
* @param paletteEntry
*/
@@ -222,7 +223,8 @@ public class XMLDefinitionPaletteFactory extends AbstractXMLDefinitionPaletteFac
}
/**
- * Finds a palette container starting from the given root and using the given path
+ * Finds a palette container starting from the given root and using the
+ * given path
*
* @param root
* @param aPath
@@ -240,7 +242,8 @@ public class XMLDefinitionPaletteFactory extends AbstractXMLDefinitionPaletteFac
}
/**
- * Finds a palette entry starting from the given container and using the given path
+ * Finds a palette entry starting from the given container and using the
+ * given path
*
* @param root
* @param path
@@ -257,11 +260,12 @@ public class XMLDefinitionPaletteFactory extends AbstractXMLDefinitionPaletteFac
}
/**
- * Searches the predefined entries for a palette entry given the full path as it was predefined.
+ * Searches the predefined entries for a palette entry given the full path
+ * as it was predefined.
*
* @param predefinedEntries
- * map of predefined palette entries where the key is the palette entry id and the
- * value is the palette entry
+ * map of predefined palette entries where the key is the palette
+ * entry id and the value is the palette entry
* @param path
* the path to the palette entry starting as it was predefined
* @return the palette entry if one exists; null otherwise.
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLDefinitionPaletteParser.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLDefinitionPaletteParser.java
index c042d28cf3b..0b2deda5a43 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLDefinitionPaletteParser.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLDefinitionPaletteParser.java
@@ -28,7 +28,8 @@ public class XMLDefinitionPaletteParser implements IPapyrusPaletteConstant {
* Create a new XMLDefinitionPaletteParser
*
* @param factory
- * the factory used to create elements from the parsing of the xml file
+ * the factory used to create elements from the parsing of the
+ * xml file
*/
public XMLDefinitionPaletteParser(AbstractXMLDefinitionPaletteFactory factory) {
this.factory = factory;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLPaletteProviderConfiguration.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLPaletteProviderConfiguration.java
index 3e96e68c84b..5af8db44d8a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLPaletteProviderConfiguration.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLPaletteProviderConfiguration.java
@@ -38,14 +38,13 @@ public class XMLPaletteProviderConfiguration extends AbstractProviderConfigurati
private ProviderPriority priority = ProviderPriority.LOWEST;
/**
- * boolean set to true if the {@link XMLPaletteProviderConfiguration} creates new entries or
- * uses predefined ones.
+ * boolean set to true if the {@link XMLPaletteProviderConfiguration} creates new entries or uses predefined ones.
*/
protected boolean displayEntries = false;
/**
- * Creates a new <code>ProviderContributionDescriptor</code> instance given a provider
- * configuration element
+ * Creates a new <code>ProviderContributionDescriptor</code> instance given
+ * a provider configuration element
*
* @param configElement
* The provider XML configuration element
@@ -78,7 +77,7 @@ public class XMLPaletteProviderConfiguration extends AbstractProviderConfigurati
}
configChildren = configElement.getChildren(IPapyrusPaletteConstant.PRIORITY);
- // sometimes, there is a confusion between priority and Priority...
+ // sometimes, there is a confusion between priority and Priority...
if(configChildren.length > 0) {
configChildren = configElement.getChildren("Priority");
}
@@ -111,7 +110,8 @@ public class XMLPaletteProviderConfiguration extends AbstractProviderConfigurati
}
/**
- * Builds a new provider contribution descriptor by parsing its configuration element
+ * Builds a new provider contribution descriptor by parsing its
+ * configuration element
*
* @param configElement
* A provider configuration element
@@ -146,7 +146,8 @@ public class XMLPaletteProviderConfiguration extends AbstractProviderConfigurati
private final String targetId;
/**
- * Initializes a new editor descriptor by reading the configuration element
+ * Initializes a new editor descriptor by reading the configuration
+ * element
*
* @param configElement
* The contribution configuration element
@@ -157,7 +158,8 @@ public class XMLPaletteProviderConfiguration extends AbstractProviderConfigurati
}
/**
- * Determines whether this contribution is applicable to the given editor
+ * Determines whether this contribution is applicable to the given
+ * editor
*
* @param editor
* The target editor
@@ -179,11 +181,13 @@ public class XMLPaletteProviderConfiguration extends AbstractProviderConfigurati
}
/**
- * Returns <code>true</code> if this configuration provides only predefinition of entries and
- * neither use predefined entries nor creates new entries.
+ * Returns <code>true</code> if this configuration provides only
+ * predefinition of entries and neither use predefined entries nor creates
+ * new entries.
*
- * @return <code>true</code> if this configuration provides only predefinition of entries and
- * neither use predefined entries nor creates new entries.
+ * @return <code>true</code> if this configuration provides only
+ * predefinition of entries and neither use predefined entries nor
+ * creates new entries.
*/
public boolean hasOnlyEntriesDefinition() {
return !displayEntries;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLRequiredProfileFactory.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLRequiredProfileFactory.java
index 3a5679e0adf..7b8a7c9e074 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLRequiredProfileFactory.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/XMLRequiredProfileFactory.java
@@ -91,7 +91,8 @@ public class XMLRequiredProfileFactory extends AbstractXMLDefinitionPaletteFacto
Node childNode = children.item(i);
String childName = childNode.getNodeName();
if(IPapyrusPaletteConstant.POST_ACTION.equals(childName)) {
- // node is a post action => retrieve the id of the provider in charge of this configuration
+ // node is a post action => retrieve the id of the provider
+ // in charge of this configuration
IAspectActionProvider provider = AspectToolService.getInstance().getProvider(AspectToolService.getProviderId(childNode));
if(provider != null) {
IAspectAction action = provider.createAction(childNode);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AbstractAspectActionProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AbstractAspectActionProvider.java
index 59593c1802d..30b5a908c37 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AbstractAspectActionProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AbstractAspectActionProvider.java
@@ -17,7 +17,6 @@ import org.eclipse.gmf.runtime.common.core.service.IOperation;
import org.eclipse.papyrus.diagram.common.Activator;
import org.eclipse.swt.graphics.Image;
-
/**
* Abstract class for the aspect action providers
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AspectActionFactoryRegistry.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AspectActionFactoryRegistry.java
index 116026fcfbe..d6716017ebb 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AspectActionFactoryRegistry.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AspectActionFactoryRegistry.java
@@ -15,7 +15,6 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-
/**
* Registry for the Aspect action factories.
* <p>
@@ -44,12 +43,18 @@ public class AspectActionFactoryRegistry {
* Initialize the factory
*/
protected void init() {
- // factories.put(StereotypeAspectActionProvider.FACTORY_ID, new StereotypeAspectActionProvider());
- //factories.put(SemanticAspectActionProvider.FACTORY_ID, new SemanticAspectActionProvider());
- //factories.put(GraphicalAspectActionFactory.GraphicalAspectActionProvider, new GraphicalAspectActionProvider());
- // factories.put(DisplayAppliedStereotypeAspectActionProvider.FACTORY_ID, new DisplayAppliedStereotypeAspectActionProvider());
- // factories.put(ChangeStereotypeDisplayAspectActionProvider.FACTORY_ID, new ChangeStereotypeDisplayAspectActionProvider());
- // factories.put(AssociationEndAspectActionProvider.FACTORY_ID, new AssociationEndAspectActionProvider());
+ // factories.put(StereotypeAspectActionProvider.FACTORY_ID, new
+ // StereotypeAspectActionProvider());
+ // factories.put(SemanticAspectActionProvider.FACTORY_ID, new
+ // SemanticAspectActionProvider());
+ // factories.put(GraphicalAspectActionFactory.GraphicalAspectActionProvider,
+ // new GraphicalAspectActionProvider());
+ // factories.put(DisplayAppliedStereotypeAspectActionProvider.FACTORY_ID,
+ // new DisplayAppliedStereotypeAspectActionProvider());
+ // factories.put(ChangeStereotypeDisplayAspectActionProvider.FACTORY_ID,
+ // new ChangeStereotypeDisplayAspectActionProvider());
+ // factories.put(AssociationEndAspectActionProvider.FACTORY_ID, new
+ // AssociationEndAspectActionProvider());
}
/**
@@ -68,9 +73,6 @@ public class AspectActionFactoryRegistry {
return factories.get(id);
}
-
-
-
/**
* Returns the list of registered aspect actions
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AspectToolProviderConfiguration.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AspectToolProviderConfiguration.java
index ee306677f79..bff0964e02a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AspectToolProviderConfiguration.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AspectToolProviderConfiguration.java
@@ -27,7 +27,8 @@ public class AspectToolProviderConfiguration extends AbstractProviderConfigurati
protected final String id;
/**
- * Creates and builds a new provider contribution descriptor (<code>DecoratorProviderConfiguration</code>) by parsing its configuration element.
+ * Creates and builds a new provider contribution descriptor ( <code>DecoratorProviderConfiguration</code>) by parsing its configuration
+ * element.
*
* @param configElement
* A provider XML configuration element
@@ -39,19 +40,19 @@ public class AspectToolProviderConfiguration extends AbstractProviderConfigurati
}
/**
- * Creates a new <code>ProviderContributionDescriptor</code> instance
- * by parsing its configuration element.
+ * Creates a new <code>ProviderContributionDescriptor</code> instance by
+ * parsing its configuration element.
*
* @param configElement
* The provider XML configuration element
*/
protected AspectToolProviderConfiguration(IConfigurationElement configElement) {
- // retrieve only ID, to test if the factory is the right one before creating whole element
+ // retrieve only ID, to test if the factory is the right one before
+ // creating whole element
id = configElement.getAttribute(ID);
Assert.isNotNull(id, "impossible to get the identifier for the factory");
}
-
/**
* Returns the ID of the factory configured by this configuration
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AspectToolService.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AspectToolService.java
index 0e5b71cb8b3..3cc46453d6a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AspectToolService.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AspectToolService.java
@@ -79,7 +79,8 @@ public class AspectToolService extends Service implements IAspectToolProviderSer
public IAspectActionProvider getProvider(String id) {
List<IAspectActionProvider> providers = (List)execute(ExecutionStrategy.REVERSE, new GetAspectToolProviderOperation(id));
if(providers == null) {
- return new StereotypeAspectActionProvider(); // backward compatibility
+ return new StereotypeAspectActionProvider(); // backward
+ // compatibility
}
Iterator<IAspectActionProvider> it = providers.iterator();
while(it.hasNext()) {
@@ -92,7 +93,8 @@ public class AspectToolService extends Service implements IAspectToolProviderSer
}
/**
- * A descriptor for aspect tool providers defined by a configuration element.
+ * A descriptor for aspect tool providers defined by a configuration
+ * element.
*/
protected static class ProviderDescriptor extends ActivityFilterProviderDescriptor {
@@ -100,8 +102,8 @@ public class AspectToolService extends Service implements IAspectToolProviderSer
protected AspectToolProviderConfiguration providerConfiguration;
/**
- * Constructs a <code>ISemanticProvider</code> descriptor for
- * the specified configuration element.
+ * Constructs a <code>ISemanticProvider</code> descriptor for the
+ * specified configuration element.
*
* @param element
* The configuration element describing the provider.
@@ -155,7 +157,8 @@ public class AspectToolService extends Service implements IAspectToolProviderSer
String id = "";
Node node = actionNode.getAttributes().getNamedItem(IPapyrusPaletteConstant.ID);
if(node == null) {
- return StereotypeAspectActionProvider.FACTORY_ID; // backward compatibility
+ return StereotypeAspectActionProvider.FACTORY_ID; // backward
+ // compatibility
} else {
id = node.getNodeValue();
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AssociationEndAspectActionProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AssociationEndAspectActionProvider.java
index 350b5001b45..4b70c81a639 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AssociationEndAspectActionProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AssociationEndAspectActionProvider.java
@@ -78,5 +78,4 @@ public class AssociationEndAspectActionProvider extends AbstractAspectActionProv
return false;
}
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AssociationEndPostAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AssociationEndPostAction.java
index 64fa9c924ca..dacb704b00c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AssociationEndPostAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/AssociationEndPostAction.java
@@ -64,13 +64,15 @@ import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-
/**
* Aspect action that modifies association end on creation
*/
public class AssociationEndPostAction extends ModelPostAction {
- /** list of property configurations, identified by their positions in the association end list */
+ /**
+ * list of property configurations, identified by their positions in the
+ * association end list
+ */
protected List<PropertyEndConfiguration> configurations;
/** entry proxy "parent" of this action when configuring the action */
@@ -82,7 +84,10 @@ public class AssociationEndPostAction extends ModelPostAction {
/** viewer for the attributes to initialize */
protected TableViewer attributeViewer;
- /** this attribute caches the value of the metaclass linked to the creation entry (performance optimization) */
+ /**
+ * this attribute caches the value of the metaclass linked to the creation
+ * entry (performance optimization)
+ */
protected EClass metaclass = null;
/** path to the checked box image */
@@ -127,7 +132,6 @@ public class AssociationEndPostAction extends ModelPostAction {
/** list of composites */
protected List<PropertyEndComposite> configurationComposites = new ArrayList<PropertyEndComposite>();
-
/**
* Constructor.
*/
@@ -203,7 +207,6 @@ public class AssociationEndPostAction extends ModelPostAction {
final CompositeCommand compositeCommand = new CompositeCommand("Modify Association End");
EObject objectToEdit = ((View)editPart.getModel()).getElement();
-
// object to edit should be an association...
if(objectToEdit instanceof Association) {
for(PropertyEndConfiguration configuration : configurations) {
@@ -251,8 +254,10 @@ public class AssociationEndPostAction extends ModelPostAction {
if(compositeCommand.canExecute()) {
boolean isActivating = true;
Map<String, Boolean> options = null;
- // use the viewer to determine if we are still initializing the diagram
- // do not use the DiagramEditPart.isActivating since ConnectionEditPart's
+ // use the viewer to determine if we are still initializing the
+ // diagram
+ // do not use the DiagramEditPart.isActivating since
+ // ConnectionEditPart's
// parent will not be a diagram edit part
EditPartViewer viewer = editPart.getViewer();
if(viewer instanceof DiagramGraphicalViewer) {
@@ -443,7 +448,6 @@ public class AssociationEndPostAction extends ModelPostAction {
}
});
-
// owner elements
Label ownerLabel = new Label(mainComposite, SWT.NONE);
ownerLabel.setText("Owner");
@@ -508,7 +512,8 @@ public class AssociationEndPostAction extends ModelPostAction {
* @{inheritDoc
*/
public void focusLost(FocusEvent e) {
- // check validity. open a window to ask if we should stay on multiplicity combo or left.
+ // check validity. open a window to ask if we should stay on
+ // multiplicity combo or left.
String newValue = multiplicityCombo.getText();
if(isMultiplicityValid(newValue.trim())) {
configuration.setMultiplicity(newValue.trim());
@@ -536,7 +541,8 @@ public class AssociationEndPostAction extends ModelPostAction {
}
/**
- * update the values in the various composites, given the currently hold values
+ * update the values in the various composites, given the currently hold
+ * values
*/
public void update() {
navigationCombo.select(navigationItems.indexOf(configuration.getNavigation()));
@@ -563,7 +569,8 @@ public class AssociationEndPostAction extends ModelPostAction {
int lower = values[0];
int upper = values[1];
- // returns true if upper = *, otherwise, returns true if upper > lower
+ // returns true if upper = *, otherwise, returns true if
+ // upper > lower
return (upper == -1) ? true : upper >= lower;
}
return false;
@@ -573,7 +580,6 @@ public class AssociationEndPostAction extends ModelPostAction {
}
}
-
protected class PropertyEndConfiguration {
/** current value of the aggregation kind attribute */
@@ -594,7 +600,6 @@ public class AssociationEndPostAction extends ModelPostAction {
/** name of the property end */
protected final String name;
-
/**
* Returns the name of this configuration (the name of the property end)
*
@@ -605,9 +610,11 @@ public class AssociationEndPostAction extends ModelPostAction {
}
/**
- * Returns the index of this configuration (the index of the property end)
+ * Returns the index of this configuration (the index of the property
+ * end)
*
- * @return the index of this configuration (the index of the property end
+ * @return the index of this configuration (the index of the property
+ * end
*/
public int getIndex() {
return index;
@@ -633,7 +640,6 @@ public class AssociationEndPostAction extends ModelPostAction {
return aggregationKind;
}
-
/**
* Sets the current value of aggregationKind
*
@@ -644,7 +650,6 @@ public class AssociationEndPostAction extends ModelPostAction {
this.aggregationKind = aggregationKind;
}
-
/**
* Returns the current value of owner
*
@@ -654,7 +659,6 @@ public class AssociationEndPostAction extends ModelPostAction {
return owner;
}
-
/**
* Sets the current value of owner
*
@@ -665,7 +669,6 @@ public class AssociationEndPostAction extends ModelPostAction {
this.owner = owner;
}
-
/**
* Returns the current value of navigation
*
@@ -675,7 +678,6 @@ public class AssociationEndPostAction extends ModelPostAction {
return navigation;
}
-
/**
* Sets the current value of navigation
*
@@ -686,7 +688,6 @@ public class AssociationEndPostAction extends ModelPostAction {
this.navigation = navigation;
}
-
/**
* Returns the current value of multiplicity
*
@@ -696,7 +697,6 @@ public class AssociationEndPostAction extends ModelPostAction {
return multiplicity;
}
-
/**
* Sets the current value of multiplicity
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/ChangeStereotypeDisplayAspectActionProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/ChangeStereotypeDisplayAspectActionProvider.java
index b43842fcf37..d750e8a4837 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/ChangeStereotypeDisplayAspectActionProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/ChangeStereotypeDisplayAspectActionProvider.java
@@ -14,7 +14,8 @@ package org.eclipse.papyrus.diagram.common.service.palette;
import org.w3c.dom.Node;
/**
- * Factory in charge of changing the display of stereotypes after palette actions
+ * Factory in charge of changing the display of stereotypes after palette
+ * actions
*/
public class ChangeStereotypeDisplayAspectActionProvider extends AbstractAspectActionProvider {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/ChangeStereotypeDisplayPostAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/ChangeStereotypeDisplayPostAction.java
index ef5973506e7..cb162c8a6a3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/ChangeStereotypeDisplayPostAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/ChangeStereotypeDisplayPostAction.java
@@ -155,7 +155,7 @@ public class ChangeStereotypeDisplayPostAction extends GraphicalPostAction {
public void run(final EditPart editPart) {
final CompositeCommand compositeCommand = new CompositeCommand("Modify Stereotype Display");
- // View view = (View)editPart.getModel();
+ // View view = (View)editPart.getModel();
final EModelElement view = (EModelElement)((GraphicalEditPart)editPart).getModel();
final TransactionalEditingDomain editingDomain = org.eclipse.papyrus.core.utils.EditorUtils.getTransactionalEditingDomain();
@@ -175,8 +175,10 @@ public class ChangeStereotypeDisplayPostAction extends GraphicalPostAction {
if(compositeCommand.canExecute()) {
boolean isActivating = true;
Map<String, Boolean> options = null;
- // use the viewer to determine if we are still initializing the diagram
- // do not use the DiagramEditPart.isActivating since ConnectionEditPart's
+ // use the viewer to determine if we are still
+ // initializing the diagram
+ // do not use the DiagramEditPart.isActivating
+ // since ConnectionEditPart's
// parent will not be a diagram edit part
EditPartViewer viewer = editPart.getViewer();
if(viewer instanceof DiagramGraphicalViewer) {
@@ -347,8 +349,10 @@ public class ChangeStereotypeDisplayPostAction extends GraphicalPostAction {
* VisualInformationPapyrusConstant.TEXT_ICON_STEREOTYPE_PRESENTATION,
* VisualInformationPapyrusConstant.ICON_STEREOTYPE_PRESENTATION,
* VisualInformationPapyrusConstant.IMAGE_STEREOTYPE_PRESENTATION,
- * VisualInformationPapyrusConstant.STEREOTYPE_TEXT_HORIZONTAL_PRESENTATION,
- * VisualInformationPapyrusConstant.STEREOTYPE_TEXT_VERTICAL_PRESENTATION
+ * VisualInformationPapyrusConstant
+ * .STEREOTYPE_TEXT_HORIZONTAL_PRESENTATION,
+ * VisualInformationPapyrusConstant
+ * .STEREOTYPE_TEXT_VERTICAL_PRESENTATION
*/
if(VisualInformationPapyrusConstant.TEXT_ICON_STEREOTYPE_PRESENTATION.equals(displayKind)) {
displayCombo.select(DISPLAY_LIST.indexOf(TEXT_AND_ICON));
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/Configuration.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/Configuration.java
index edc3374eca1..e9a6f325ab5 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/Configuration.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/Configuration.java
@@ -32,12 +32,12 @@ import org.w3c.dom.NodeList;
/**
*
- * This class provides methods to store the palette configuration concerning the stereotypes application
+ * This class provides methods to store the palette configuration concerning the
+ * stereotypes application
*
*/
public class Configuration {
-
/** name of the property node */
public static final String PROPERTY = "property"; //$NON-NLS-1$
@@ -70,7 +70,6 @@ public class Configuration {
*/
private List<Profile> appliedProfiles;
-
/**
*
* Constructor.
@@ -83,22 +82,24 @@ public class Configuration {
}
/**
- * builds the configuration with the configurationNode contents
- * That's to say create :
+ * builds the configuration with the configurationNode contents That's to
+ * say create :
* <ul>
* <li> {@link StereotypeRepresentation}</li>
* <li> {@link PropertyRepresentation}</li>
* <li> {@link Value}</li>
* </ul>
- * corresponding to the configuration node contents to populate the configuration
+ * corresponding to the configuration node contents to populate the
+ * configuration
*/
public void buildConfiguration() {
if(configurationNode == null) {
return;
}
NamedNodeMap nodeAttributes = configurationNode.getAttributes();
- //transform old version in new version!
- if(null != nodeAttributes.getNamedItem(IPapyrusPaletteConstant.STEREOTYPES_TO_APPLY)) {//old version
+ // transform old version in new version!
+ if(null != nodeAttributes.getNamedItem(IPapyrusPaletteConstant.STEREOTYPES_TO_APPLY)) {// old
+ // version
String stereotypesToApplyQN = configurationNode.getAttributes().getNamedItem(IPapyrusPaletteConstant.STEREOTYPES_TO_APPLY).getNodeValue();
if(stereotypesToApplyQN != null && !"".equals(stereotypesToApplyQN)) { //$NON-NLS-1$
List<String> stereotypesToApply = PaletteUtil.getStereotypeListFromString(stereotypesToApplyQN);
@@ -106,9 +107,10 @@ public class Configuration {
myStereotypesList.add(new StereotypeRepresentation(qualifiedName));
}
}
- } else {//new version
+ } else {// new version
- NodeList configurationChildren = configurationNode.getChildNodes();//stereotypesToApply Node
+ NodeList configurationChildren = configurationNode.getChildNodes();// stereotypesToApply
+ // Node
Node stereotypesToApplyNode = null;
for(int i = 0; i < configurationChildren.getLength(); i++) {
@@ -122,7 +124,10 @@ public class Configuration {
NodeList childNodes = stereotypesToApplyNode.getChildNodes();
for(int iter = 0; iter < childNodes.getLength(); iter++) {
Node steNode = childNodes.item(iter);
- if(STEREOTYPE.equals(steNode.getLocalName())) {//this node is really a stereotype?
+ if(STEREOTYPE.equals(steNode.getLocalName())) {// this node
+ // is really
+ // a
+ // stereotype?
String stereotypeName = steNode.getAttributes().getNamedItem(STEREOTYPE_NAME).getNodeValue();
StereotypeRepresentation mySte = null;
@@ -134,11 +139,19 @@ public class Configuration {
}
// we store the stereotype
- if(steNode.hasChildNodes()) {//there are associated properties and values
+ if(steNode.hasChildNodes()) {// there are associated
+ // properties and values
NodeList properties = steNode.getChildNodes();
- for(int i = 0; i < properties.getLength(); i++) {//we iterate on the properties
+ for(int i = 0; i < properties.getLength(); i++) {// we
+ // iterate
+ // on
+ // the
+ // properties
Node propertyNode = properties.item(i);
- if(PROPERTY.equals(propertyNode.getLocalName())) {//ist' a property node?
+ if(PROPERTY.equals(propertyNode.getLocalName())) {// ist'
+ // a
+ // property
+ // node?
String propertyName = propertyNode.getAttributes().getNamedItem(PROPERTY_NAME).getNodeValue();
PropertyRepresentation proper = null;
if(mySte.getPropertyRepresentation(stereotypeName, propertyName) != null) {
@@ -148,18 +161,22 @@ public class Configuration {
mySte.addProperty(proper);
}
-
NodeList valuesList = propertyNode.getChildNodes();
- for(int ii = 0; ii < valuesList.getLength(); ii++) {//we iterate on the values
+ for(int ii = 0; ii < valuesList.getLength(); ii++) {// we iterate
+ // on the
+ // values
Node valueNode = valuesList.item(ii);
- if(VALUE.equals(valueNode.getLocalName())) {//this node is really a value?
+ if(VALUE.equals(valueNode.getLocalName())) {// this node
+ // is really
+ // a value?
Value myValue = new Value(valueNode.getTextContent());
proper.addValue(myValue);
}
}
- } else if(RUNTIME_PROPERTY.equals(propertyNode.getLocalName())) {//it's a runtime property
+ } else if(RUNTIME_PROPERTY.equals(propertyNode.getLocalName())) {// it's a runtime
+ // property
String propertyName = propertyNode.getAttributes().getNamedItem(PROPERTY_NAME).getNodeValue();
propertyName = propertyNode.getAttributes().getNamedItem(PROPERTY_NAME).getNodeValue();
PropertyRepresentation prop = null;
@@ -180,12 +197,10 @@ public class Configuration {
}
}
-
-
/**
- * This method completes the {@link Configuration} object with the properties owned by each stereotype.
- * It completes the contents obtained with the {@link #buildConfiguration()} method.
- * This method is called by :
+ * This method completes the {@link Configuration} object with the
+ * properties owned by each stereotype. It completes the contents obtained
+ * with the {@link #buildConfiguration()} method. This method is called by :
* <ul>
* <li>{@link #setAppliedProfiles(List)}</li>
* <li>{@link #setStereotypesRepresentations(ArrayList)}</li>
@@ -198,7 +213,7 @@ public class Configuration {
for(Stereotype ste : stereotypeList) {
if(ste != null) {
StereotypeRepresentation currentSte = null;
- //does this stereotype exist?
+ // does this stereotype exist?
if(getStereotypeRepresentation(ste.getQualifiedName()) == null) {
currentSte = new StereotypeRepresentation(ste.getQualifiedName());
myStereotypesList.add(currentSte);
@@ -225,7 +240,6 @@ public class Configuration {
}
}
-
/**
* Saves the configuration in the parentNode}
*
@@ -235,18 +249,20 @@ public class Configuration {
public void save(Node parentNode) {
ListIterator<StereotypeRepresentation> it = getStereotypesRepresentations().listIterator();
Element appliedStereotypeNode = ((Element)parentNode).getOwnerDocument().createElement(STEREOTYPE_TO_APPLY);
- while(it.hasNext()) {//iteration on stereotypes
+ while(it.hasNext()) {// iteration on stereotypes
StereotypeRepresentation currentStereotype = it.next();
Element stereotypeNode = ((Element)parentNode).getOwnerDocument().createElement(STEREOTYPE);
stereotypeNode.setAttribute(STEREOTYPE_NAME, currentStereotype.getStereotypeQualifiedName());
- //the properties with value
+ // the properties with value
for(PropertyRepresentation prop : currentStereotype.getPropertiesWithValues()) {
Element propertyNode = ((Element)parentNode).getOwnerDocument().createElement(PROPERTY);
propertyNode.setAttribute(PROPERTY_NAME, prop.getQualifiedName());
ArrayList<Value> values = prop.getValues();
- for(int i = 0; i < ((ArrayList<?>)values).size(); i++) {//iteration on values
+ for(int i = 0; i < ((ArrayList<?>)values).size(); i++) {// iteration
+ // on
+ // values
Element valueNode = ((Element)parentNode).getOwnerDocument().createElement(VALUE);
valueNode.setTextContent(((ArrayList<?>)values).get(i).toString());
propertyNode.appendChild(valueNode);
@@ -256,7 +272,7 @@ public class Configuration {
}
- //the runtime properties
+ // the runtime properties
for(PropertyRepresentation prop : currentStereotype.getRuntimeProperties()) {
Element propertyNode = ((Element)parentNode).getOwnerDocument().createElement(RUNTIME_PROPERTY);
propertyNode.setAttribute(PROPERTY_NAME, prop.getQualifiedName());
@@ -265,19 +281,17 @@ public class Configuration {
appliedStereotypeNode.appendChild(stereotypeNode);
- }//end of iteration on stereotype
+ }// end of iteration on stereotype
parentNode.appendChild(appliedStereotypeNode);
}
-
-
-
/**
* Adds new stereotypes to the {@link Configuration}
*
* @param stereotypesQNList
- * the list of stereotypes to add, identified by the qualified name
+ * the list of stereotypes to add, identified by the qualified
+ * name
*/
public void setStereotypesRepresentations(ArrayList<String> stereotypesQNList) {
// 1. remove unused stereotype
@@ -291,17 +305,16 @@ public class Configuration {
this.myStereotypesList.add(new StereotypeRepresentation(ste));
}
- //3. complete datas
+ // 3. complete datas
completeData();
}
-
/**
*
* @param stereotypeQN
- * the stereotype to find in the configuration, identified by its qualified name
- * @return
- * <ul>
+ * the stereotype to find in the configuration, identified by its
+ * qualified name
+ * @return <ul>
* <li> {@link StereotypeRepresentation} if it exits
* <li> {@code null} if not</li>
* </ul>
@@ -318,8 +331,7 @@ public class Configuration {
/**
* Returns the list of stereotypes contained by the {@link Configuration}
*
- * @return
- * all the {@link StereotypeRepresentation} owned by the {@link Configuration}
+ * @return all the {@link StereotypeRepresentation} owned by the {@link Configuration}
*/
public ArrayList<StereotypeRepresentation> getStereotypesRepresentations() {
return myStereotypesList;
@@ -328,8 +340,7 @@ public class Configuration {
/**
* Returns the list of applied stereotypes contained by the {@link Configuration}
*
- * @return
- * the list of applied stereotypes identified by its qualified name
+ * @return the list of applied stereotypes identified by its qualified name
*/
public ArrayList<String> getStereotypesToApplyQN() {
ArrayList<String> stereotypesList = new ArrayList<String>();
@@ -363,8 +374,7 @@ public class Configuration {
/**
* Returns the list of the applied {@link Profile}
*
- * @return
- * the applied profiles
+ * @return the applied profiles
*/
public List<Profile> getAppliedProfiles() {
return this.appliedProfiles;
@@ -392,7 +402,6 @@ public class Configuration {
return stereotypes;
}
-
/**
* Retrieves a Stereotype in a profile, given its qualified name.
*
@@ -414,8 +423,7 @@ public class Configuration {
/**
* Returns all the stereotypes
*
- * @return
- * all the stereotypes
+ * @return all the stereotypes
*/
public List<Stereotype> getUMLStereotypes() {
ArrayList<Stereotype> list = new ArrayList<Stereotype>();
@@ -427,8 +435,7 @@ public class Configuration {
/**
*
- * @return
- * <ul>
+ * @return <ul>
* <li> {@code true} if there is runtime properties
* <li> {@code false} if not</li>
* </ul>
@@ -445,8 +452,7 @@ public class Configuration {
/**
* Returns the configuration node
*
- * @return
- * the configuration node
+ * @return the configuration node
*/
public Node getConfigurationNode() {
return configurationNode;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DefinedPropertiesAtRuntimeDialog.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DefinedPropertiesAtRuntimeDialog.java
index fbf532135db..68073e6bf6c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DefinedPropertiesAtRuntimeDialog.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DefinedPropertiesAtRuntimeDialog.java
@@ -43,10 +43,9 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Stereotype;
-
/**
- * This Class provides a dialog to edit meta-elements properties. The editor is chosen following the property type.
- * The editor order is the following :
+ * This Class provides a dialog to edit meta-elements properties. The editor is
+ * chosen following the property type. The editor order is the following :
* <ul>
* <li> {@link Text}</li>
* <li> {@link Combo}</li>
@@ -80,8 +79,6 @@ public class DefinedPropertiesAtRuntimeDialog extends Dialog {
/** The enumeration meta properties. */
private ArrayList<EAttribute> enumerationMetaProperties = new ArrayList<EAttribute>();
-
-
/**
* Instantiates a new dialog.
*
@@ -109,7 +106,7 @@ public class DefinedPropertiesAtRuntimeDialog extends Dialog {
EList<EAttribute> allAttributs = currentEClass.getEAllAttributes();
for(EAttribute eAttribute : allAttributs) {
if((!eAttribute.isDerived()) && eAttribute.isChangeable()) {
- //we class the properties following its type
+ // we class the properties following its type
EClassifier eType = eAttribute.getEType();
String instanceTypeName = eType.getInstanceClassName();
if(runtimeProperties.contains(eAttribute.getName())) {
@@ -165,14 +162,15 @@ public class DefinedPropertiesAtRuntimeDialog extends Dialog {
@Override
protected Control createDialogArea(Composite parent) {
- //create the composite
+ // create the composite
Composite composite = (Composite)super.createDialogArea(parent);
GridLayout layout = new GridLayout(2, false);
composite.setLayout(layout);
GridData data = new GridData(GridData.FILL_HORIZONTAL);
composite.setLayoutData(data);
- //trick to have the message on the two columns!(a GridData with horizontalSpan = 2 on label doesn't work)
+ // trick to have the message on the two columns!(a GridData with
+ // horizontalSpan = 2 on label doesn't work)
Composite compo = new Composite(composite, SWT.NONE);
GridLayout compoLayout = new GridLayout(1, false);
compo.setLayout(compoLayout);
@@ -180,11 +178,10 @@ public class DefinedPropertiesAtRuntimeDialog extends Dialog {
compoData.horizontalSpan = 2;
compo.setLayoutData(compoData);
-
Label label = new Label(compo, SWT.NONE);
label.setText(message);
- //create the editors
+ // create the editors
if(stringMetaProperties.size() != 0) {
createTextArea(composite);
}
@@ -195,7 +192,6 @@ public class DefinedPropertiesAtRuntimeDialog extends Dialog {
createCheckBox(composite);
}
-
return composite;
}
@@ -266,7 +262,7 @@ public class DefinedPropertiesAtRuntimeDialog extends Dialog {
label.setText(fieldTitle);
Combo combo = new Combo(composite, SWT.READ_ONLY);
- //get the items
+ // get the items
EAttribute currentAttributes = enumerationMetaProperties.get(iter);
EEnum eType = (EEnum)currentAttributes.getEType();
@@ -281,7 +277,7 @@ public class DefinedPropertiesAtRuntimeDialog extends Dialog {
list.add(i + 1, literals.get(i).getLiteral());
}
combo.setItems(proposals);
- //get initial value
+ // get initial value
Object selection = ((EObject)elementToEdit).eGet(currentAttributes);
combo.select(list.indexOf(selection.toString()));
GridData textData = new GridData(GridData.FILL_HORIZONTAL);
@@ -331,7 +327,7 @@ public class DefinedPropertiesAtRuntimeDialog extends Dialog {
Label label = new Label(grp, SWT.NONE);
String fieldTitle = makeTitle(booleanMetaProperties.get(iter).getName());
label.setText(fieldTitle);
- //get button state
+ // get button state
Boolean state = (Boolean)((EObject)elementToEdit).eGet(booleanMetaProperties.get(iter));
button.setSelection(state);
final int iterFinal = iter;
@@ -343,7 +339,7 @@ public class DefinedPropertiesAtRuntimeDialog extends Dialog {
* @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
*/
public void widgetSelected(SelectionEvent e) {
- //get the old value
+ // get the old value
Boolean oldValue = (Boolean)((EObject)elementToEdit).eGet(booleanMetaProperties.get(iterFinal));
((EObject)elementToEdit).eSet(booleanMetaProperties.get(iterFinal), !oldValue);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DisplayAppliedStereotypeAspectActionProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DisplayAppliedStereotypeAspectActionProvider.java
index 841546c73de..82419709141 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DisplayAppliedStereotypeAspectActionProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DisplayAppliedStereotypeAspectActionProvider.java
@@ -21,7 +21,6 @@ public class DisplayAppliedStereotypeAspectActionProvider extends AbstractAspect
/** semantic action key */
public final static String DISPLAY_APPLIED_STEREOTYPE_ACTION_KEY = "org.eclipse.papyrus.postaction.displayAppliedStereotypeaction";
-
/**
* Constructor.
*/
@@ -44,5 +43,4 @@ public class DisplayAppliedStereotypeAspectActionProvider extends AbstractAspect
return true;
}
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DisplayAppliedStereotypePostAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DisplayAppliedStereotypePostAction.java
index 9c88be42325..6dd332b50fd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DisplayAppliedStereotypePostAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DisplayAppliedStereotypePostAction.java
@@ -171,7 +171,7 @@ public class DisplayAppliedStereotypePostAction extends GraphicalPostAction {
compositeCommand.add(new EMFtoGMFCommandWrapper(command));
}
- // creates the commands to display qualified names of stereotypes
+ // creates the commands to display qualified names of stereotypes
for(String stereotypeName : stereotypesQNToDisplay) {
RecordingCommand command = AppliedStereotypeHelper.getAddAppliedStereotypeToDisplayWithQNCommand(editingDomain, view, stereotypeName);
compositeCommand.add(new EMFtoGMFCommandWrapper(command));
@@ -188,14 +188,15 @@ public class DisplayAppliedStereotypePostAction extends GraphicalPostAction {
compositeCommand.reduce();
- // AppliedStereotypeHelper.ge
-
+ // AppliedStereotypeHelper.ge
if(compositeCommand.canExecute()) {
boolean isActivating = true;
Map<String, Boolean> options = null;
- // use the viewer to determine if we are still initializing the diagram
- // do not use the DiagramEditPart.isActivating since ConnectionEditPart's
+ // use the viewer to determine if we are still initializing the
+ // diagram
+ // do not use the DiagramEditPart.isActivating since
+ // ConnectionEditPart's
// parent will not be a diagram edit part
EditPartViewer viewer = editPart.getViewer();
if(viewer instanceof DiagramGraphicalViewer) {
@@ -233,7 +234,7 @@ public class DisplayAppliedStereotypePostAction extends GraphicalPostAction {
this.appliedProfiles = appliedProfiles;
this.entryProxy = entryProxy;
- //retrieve displayable stereotypes
+ // retrieve displayable stereotypes
if(entryProxy instanceof IPaletteAspectToolEntryProxy) {
for(IPostAction postAction : ((IPaletteAspectToolEntryProxy)entryProxy).getPostActions()) {
if(postAction instanceof StereotypePostAction) {
@@ -246,7 +247,7 @@ public class DisplayAppliedStereotypePostAction extends GraphicalPostAction {
}
}
- //Load from config
+ // Load from config
for(String stereotypeName : stereotypesToDisplay) {
if(listOfDisplayableStereotypes.containsKey(stereotypeName)) {
listOfDisplayableStereotypes.put(stereotypeName, DISPLAY_SIMPLE_NAME);
@@ -295,12 +296,12 @@ public class DisplayAppliedStereotypePostAction extends GraphicalPostAction {
stereotypesToShowTableViewer.setInput(listOfDisplayableStereotypes);
-
return composite;
}
/**
- * The label provider for the tableviewer : one columns shows the stereotype name and the other shows the display option
+ * The label provider for the tableviewer : one columns shows the stereotype
+ * name and the other shows the display option
*/
class StereotypeToDisplayLabelProvider extends LabelProvider implements ITableLabelProvider {
@@ -358,7 +359,8 @@ public class DisplayAppliedStereotypePostAction extends GraphicalPostAction {
}
/**
- * Creates appropriate columns : one for the stereotype and one for its display options
+ * Creates appropriate columns : one for the stereotype and one for its
+ * display options
*
* @param viewer
* the table to create the columns in
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DynamicConfigureRequest.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DynamicConfigureRequest.java
index d21a50054f6..50899be8bb7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DynamicConfigureRequest.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/DynamicConfigureRequest.java
@@ -19,9 +19,9 @@ import org.eclipse.gmf.runtime.emf.type.core.EditHelperContext;
import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
-
/**
- * Request to edit values of an object, after a dialog is opened to ask for the values to set
+ * Request to edit values of an object, after a dialog is opened to ask for the
+ * values to set
*/
public class DynamicConfigureRequest extends AbstractEditCommandRequest {
@@ -67,7 +67,6 @@ public class DynamicConfigureRequest extends AbstractEditCommandRequest {
return elementToEdit;
}
-
/**
* Returns the list of properties to define, identified by their name
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/GetAllAspectToolProvidersOperation.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/GetAllAspectToolProvidersOperation.java
index 2ddca1b59c6..d87012cc592 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/GetAllAspectToolProvidersOperation.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/GetAllAspectToolProvidersOperation.java
@@ -16,7 +16,6 @@ import java.util.List;
import org.eclipse.gmf.runtime.common.core.service.IOperation;
import org.eclipse.gmf.runtime.common.core.service.IProvider;
-
/**
* Operation to find an aspect tool provider, given its unique identifier
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/GetAspectToolProviderOperation.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/GetAspectToolProviderOperation.java
index 2438c52d55d..f05f8ae744c 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/GetAspectToolProviderOperation.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/GetAspectToolProviderOperation.java
@@ -14,7 +14,6 @@ package org.eclipse.papyrus.diagram.common.service.palette;
import org.eclipse.gmf.runtime.common.core.service.IOperation;
import org.eclipse.gmf.runtime.common.core.service.IProvider;
-
/**
* Operation to find an aspect tool provider, given its unique identifier
*/
@@ -43,7 +42,6 @@ public class GetAspectToolProviderOperation implements IOperation {
return (identifier.equals(id) ? provider : null);
}
-
/**
* Returns the identifier of the provider this operation is looking for
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/GraphicalPostAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/GraphicalPostAction.java
index 725fe84331d..6fc8f0235c0 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/GraphicalPostAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/GraphicalPostAction.java
@@ -48,9 +48,9 @@ import org.eclipse.uml2.uml.Profile;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-
/**
- * Aspect action that modifies graphical appearance on the edit part newly created
+ * Aspect action that modifies graphical appearance on the edit part newly
+ * created
*/
public class GraphicalPostAction extends ModelPostAction {
@@ -102,7 +102,6 @@ public class GraphicalPostAction extends ModelPostAction {
final CompositeCommand compositeCommand = new CompositeCommand("Modify Graphic");
EObject objectToEdit = (View)editPart.getModel();
-
for(String featureName : propertiesToUpdate.keySet()) {
// retrieve feature to set
EStructuralFeature feature = objectToEdit.eClass().getEStructuralFeature(featureName);
@@ -112,7 +111,8 @@ public class GraphicalPostAction extends ModelPostAction {
} else {
SetRequest request = new SetRequest(objectToEdit, feature, getValue(feature, propertiesToUpdate.get(featureName)));
- // request.getExtendedData().put(ApplyStereotypeRequest.NEW_EDIT_PART_NAME, "NEW");
+ // request.getExtendedData().put(ApplyStereotypeRequest.NEW_EDIT_PART_NAME,
+ // "NEW");
compositeCommand.compose(new SetValueCommand(request));
}
}
@@ -121,8 +121,10 @@ public class GraphicalPostAction extends ModelPostAction {
if(compositeCommand.canExecute()) {
boolean isActivating = true;
Map<String, Boolean> options = null;
- // use the viewer to determine if we are still initializing the diagram
- // do not use the DiagramEditPart.isActivating since ConnectionEditPart's
+ // use the viewer to determine if we are still initializing the
+ // diagram
+ // do not use the DiagramEditPart.isActivating since
+ // ConnectionEditPart's
// parent will not be a diagram edit part
EditPartViewer viewer = editPart.getViewer();
if(viewer instanceof DiagramGraphicalViewer) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IAspectAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IAspectAction.java
index 81b3d73dea4..695936ea64e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IAspectAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IAspectAction.java
@@ -21,7 +21,6 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.uml2.uml.Profile;
import org.w3c.dom.Node;
-
/**
* Interface implemented by actions run after or before palette creation
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IAspectActionProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IAspectActionProvider.java
index f11e6249393..f094787e3e6 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IAspectActionProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IAspectActionProvider.java
@@ -16,7 +16,6 @@ import org.eclipse.gmf.runtime.common.core.service.IProvider;
import org.eclipse.swt.graphics.Image;
import org.w3c.dom.Node;
-
/**
* Interface for aspect action factories
*/
@@ -55,7 +54,8 @@ public interface IAspectActionProvider extends IProvider {
* returns <code>true</code> if this factory is enabled
*
* @param entryProxy
- * the entry proxy for which aspect action will be added or removed
+ * the entry proxy for which aspect action will be added or
+ * removed
*
* @return <code>true</code> if this factory is enabled
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IAspectToolProviderService.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IAspectToolProviderService.java
index e876a7421e6..ba33499152e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IAspectToolProviderService.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IAspectToolProviderService.java
@@ -13,7 +13,6 @@ package org.eclipse.papyrus.diagram.common.service.palette;
import java.util.List;
-
/**
* Interface that should be implemented by all aspect tool factory providers
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IFeatureSetterAspectAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IFeatureSetterAspectAction.java
index ef7ccea485b..e71d9065d82 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IFeatureSetterAspectAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IFeatureSetterAspectAction.java
@@ -78,9 +78,9 @@ public interface IFeatureSetterAspectAction {
return getAllImpactedFeatures(request.getParameters());
}
-
/**
- * Determine if the features in parameters are managed by Pre/Post Action in the request
+ * Determine if the features in parameters are managed by Pre/Post
+ * Action in the request
* @param request
* @param features
* @return true if they are ALL managed
@@ -91,7 +91,8 @@ public interface IFeatureSetterAspectAction {
}
/**
- * Determine if the features in parameters are managed by Pre/Post Action in the request
+ * Determine if the features in parameters are managed by Pre/Post
+ * Action in the request
* @param request
* @param features
* @return true if they are ALL managed
@@ -114,7 +115,6 @@ public interface IFeatureSetterAspectAction {
return true ;
}
-
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPaletteAspectToolEntryProxy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPaletteAspectToolEntryProxy.java
index 6e45a0d303e..72fef3a1183 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPaletteAspectToolEntryProxy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPaletteAspectToolEntryProxy.java
@@ -13,9 +13,9 @@ package org.eclipse.papyrus.diagram.common.service.palette;
import java.util.List;
-
/**
- * Interface implemented by all proxies for entries that contain pre/post actions
+ * Interface implemented by all proxies for entries that contain pre/post
+ * actions
*/
public interface IPaletteAspectToolEntryProxy extends IPaletteEntryProxy {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPaletteEntryProxy.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPaletteEntryProxy.java
index 0d3b843510b..606137a564f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPaletteEntryProxy.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPaletteEntryProxy.java
@@ -13,7 +13,6 @@ package org.eclipse.papyrus.diagram.common.service.palette;
import org.eclipse.gef.palette.PaletteEntry;
-
/**
* Interface implemented by all proxies for the palette customization dialog
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPostAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPostAction.java
index b96389ba3d8..15362b54ccd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPostAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPostAction.java
@@ -11,7 +11,6 @@
*****************************************************************************/
package org.eclipse.papyrus.diagram.common.service.palette;
-
/**
* Interface implemented by post exectuion actions
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPreAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPreAction.java
index 415ac8b1f0a..5283742a606 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPreAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/IPreAction.java
@@ -11,7 +11,6 @@
*****************************************************************************/
package org.eclipse.papyrus.diagram.common.service.palette;
-
/**
* Interface implemented by pre execution actions
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/ModelPostAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/ModelPostAction.java
index d095b3183f9..e61a3c0c257 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/ModelPostAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/ModelPostAction.java
@@ -23,9 +23,9 @@ import org.eclipse.papyrus.diagram.common.Activator;
import org.eclipse.swt.graphics.Image;
import org.w3c.dom.Node;
-
/**
- * Generic class for actions modifying directly the models (graphic or semantic model)
+ * Generic class for actions modifying directly the models (graphic or semantic
+ * model)
*/
public abstract class ModelPostAction implements IPostAction {
@@ -74,14 +74,14 @@ public abstract class ModelPostAction implements IPostAction {
return factory.getName();
}
-
/**
* @{inheritDoc
*/
public abstract void run(EditPart editPart);
/**
- * Retrieves the valid type of an object given the structural feature for which it gives a value
+ * Retrieves the valid type of an object given the structural feature for
+ * which it gives a value
*
* @param feature
* the valued feature
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/PropertyRepresentation.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/PropertyRepresentation.java
index 1e5b3faa552..bf935e099b1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/PropertyRepresentation.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/PropertyRepresentation.java
@@ -27,8 +27,8 @@ import org.eclipse.uml2.uml.Type;
public class PropertyRepresentation {
/**
- * The property ID is used to represent a unique property.
- * It's composed by : stereotype qualified name + {@link #separator} + {@link #propertyQualifiedName}
+ * The property ID is used to represent a unique property. It's composed by
+ * : stereotype qualified name + {@link #separator} + {@link #propertyQualifiedName}
*/
private String propID;
@@ -41,7 +41,11 @@ public class PropertyRepresentation {
/** Is it a runtime property? */
private boolean isRuntimeProperty = false;
- /** the {@link StereotypeRepresentation owning this {@link PropertyRepresentation} */
+/**
+ * the {@link StereotypeRepresentation owning this
+ *
+ * @link PropertyRepresentation}
+ */
private StereotypeRepresentation stereotype;
/** the property qualified name */
@@ -50,7 +54,10 @@ public class PropertyRepresentation {
/** the name of the property */
private String name;
- /** separator used in the {@link #propID}. It's not useful, it's only to facilitate debug! */
+ /**
+ * separator used in the {@link #propID}. It's not useful, it's only to
+ * facilitate debug!
+ */
static public String separator = "|";; //$NON-NLS-1$
/**
@@ -70,11 +77,12 @@ public class PropertyRepresentation {
/**
*
- * Constructor.
- * Note : the values aren't not duplicated. The two PropertyRepresentation share the same instances of the values
+ * Constructor. Note : the values aren't not duplicated. The two
+ * PropertyRepresentation share the same instances of the values
*
* @param propRep
- * the PropertyRepresentation used to instantiate a new PropertyRepresentation
+ * the PropertyRepresentation used to instantiate a new
+ * PropertyRepresentation
*/
public PropertyRepresentation(PropertyRepresentation propRep) {
this.propertyQualifiedName = new String(propRep.getQualifiedName());
@@ -87,8 +95,7 @@ public class PropertyRepresentation {
/**
* Returns the property qualified name
*
- * @return
- * the property qualified name
+ * @return the property qualified name
*/
public String getQualifiedName() {
return propertyQualifiedName;
@@ -108,8 +115,7 @@ public class PropertyRepresentation {
/**
* Returns all the values owned by this property
*
- * @return
- * all the values owned by this property
+ * @return all the values owned by this property
*/
public ArrayList<Value> getValues() {
return values;
@@ -118,8 +124,7 @@ public class PropertyRepresentation {
/**
* Returns the type of the property
*
- * @return
- * the type of the property
+ * @return the type of the property
*/
public Type getType() {
Assert.isNotNull(UMLProperty, "The property has not been set!"); //$NON-NLS-1$
@@ -129,8 +134,7 @@ public class PropertyRepresentation {
/**
* Setter for {@link #propID}
*
- * @return
- * {@link #propID}
+ * @return {@link #propID}
*/
public String getPropertyId() {
return propID;
@@ -149,8 +153,7 @@ public class PropertyRepresentation {
/**
* Returns the string corresponding to the property multiplicity
*
- * @return
- * the string corresponding to the property multiplicity
+ * @return the string corresponding to the property multiplicity
*/
protected String getPropertyMultiplicity() {
Assert.isNotNull(UMLProperty, "The property has not been set!"); //$NON-NLS-1$
@@ -178,8 +181,7 @@ public class PropertyRepresentation {
/**
* Returns the string corresponding to the value to display for the property
*
- * @return
- * the string corresponding to the value to display for the property
+ * @return the string corresponding to the value to display for the property
*
*/
protected String getValueToDisplay() {
@@ -207,8 +209,7 @@ public class PropertyRepresentation {
/**
* Getter for {@link #isRuntimeProperty}
*
- * @return
- * {@link #isRuntimeProperty}
+ * @return {@link #isRuntimeProperty}
*/
public boolean isRuntime() {
return isRuntimeProperty;
@@ -246,8 +247,7 @@ public class PropertyRepresentation {
/**
*
- * @return
- * <ul>
+ * @return <ul>
* <li>{@code true} if the property has values</li>
* <li>{@code false} if not</li>
* </ul>
@@ -259,8 +259,7 @@ public class PropertyRepresentation {
/**
* Returns the {@link StereotypeRepresentation} owning this {@link PropertyRepresentation}
*
- * @return
- * the {@link StereotypeRepresentation} owning this {@link PropertyRepresentation}
+ * @return the {@link StereotypeRepresentation} owning this {@link PropertyRepresentation}
*/
public StereotypeRepresentation getStereotypeRepresentation() {
return stereotype;
@@ -269,8 +268,7 @@ public class PropertyRepresentation {
/**
* Returns the {@link org.eclipse.uml.uml.Property} represented by this {@link PropertyRepresentation}
*
- * @return
- * the {@link org.eclipse.uml.uml.Property} represented by this {@link PropertyRepresentation}
+ * @return the {@link org.eclipse.uml.uml.Property} represented by this {@link PropertyRepresentation}
*/
public Property getUMLProperty() {
Assert.isNotNull(UMLProperty, "The property has not been set!"); //$NON-NLS-1$
@@ -278,10 +276,11 @@ public class PropertyRepresentation {
}
/**
- * Returns the string representing this property, with this type and this value
+ * Returns the string representing this property, with this type and this
+ * value
*
- * @return
- * the string representing this property, with this type and this value
+ * @return the string representing this property, with this type and this
+ * value
*/
public String getLabel() {
String label = this.name;
@@ -294,10 +293,11 @@ public class PropertyRepresentation {
}
/**
- * Returns the values owned by this {@link PropertyRepresentation}, represented by a string
+ * Returns the values owned by this {@link PropertyRepresentation},
+ * represented by a string
*
- * @return
- * the values owned by this {@link PropertyRepresentation}, represented by a string
+ * @return the values owned by this {@link PropertyRepresentation},
+ * represented by a string
*/
public ArrayList<String> getStringValue() {
ArrayList<String> stringValues = new ArrayList<String>();
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/SemanticPostAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/SemanticPostAction.java
index cc2a3ad4a09..285ba673388 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/SemanticPostAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/SemanticPostAction.java
@@ -74,9 +74,9 @@ import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-
/**
- * Aspect action that modifies semantic information on the edit part newly created
+ * Aspect action that modifies semantic information on the edit part newly
+ * created
*/
public class SemanticPostAction extends ModelPostAction {
@@ -95,7 +95,10 @@ public class SemanticPostAction extends ModelPostAction {
/** viewer for the attributes to initialize */
protected TableViewer attributeViewer;
- /** this attribute caches the value of the metaclass linked to the creation entry (performance optimization) */
+ /**
+ * this attribute caches the value of the metaclass linked to the creation
+ * entry (performance optimization)
+ */
protected EClass metaclass = null;
/** path to the checked box image */
@@ -153,7 +156,8 @@ public class SemanticPostAction extends ModelPostAction {
* @param nodeValue
* the serialized value of the element
* @param separator
- * the separator used to serialized, in case the element is a list
+ * the separator used to serialized, in case the element is a
+ * list
* @return the value of the element
*/
protected Object parseValue(String nodeValue, String separator) {
@@ -182,7 +186,6 @@ public class SemanticPostAction extends ModelPostAction {
final CompositeCommand compositeCommand = new CompositeCommand("Modify Semantic");
EObject objectToEdit = ((View)editPart.getModel()).getElement();
-
for(String featureName : propertiesToUpdate.keySet()) {
// retrieve feature to set
EStructuralFeature feature = objectToEdit.eClass().getEStructuralFeature(featureName);
@@ -192,7 +195,8 @@ public class SemanticPostAction extends ModelPostAction {
} else {
SetRequest request = new SetRequest(objectToEdit, feature, getValue(feature, propertiesToUpdate.get(featureName)));
- // request.getExtendedData().put(ApplyStereotypeRequest.NEW_EDIT_PART_NAME, "NEW");
+ // request.getExtendedData().put(ApplyStereotypeRequest.NEW_EDIT_PART_NAME,
+ // "NEW");
compositeCommand.compose(new SetValueCommand(request));
}
}
@@ -208,8 +212,10 @@ public class SemanticPostAction extends ModelPostAction {
if(compositeCommand.canExecute()) {
boolean isActivating = true;
Map<String, Boolean> options = null;
- // use the viewer to determine if we are still initializing the diagram
- // do not use the DiagramEditPart.isActivating since ConnectionEditPart's
+ // use the viewer to determine if we are still initializing the
+ // diagram
+ // do not use the DiagramEditPart.isActivating since
+ // ConnectionEditPart's
// parent will not be a diagram edit part
EditPartViewer viewer = editPart.getViewer();
if(viewer instanceof DiagramGraphicalViewer) {
@@ -294,7 +300,6 @@ public class SemanticPostAction extends ModelPostAction {
nameColumn.getColumn().setResizable(true);
nameColumn.getColumn().setMoveable(false);
-
// runtime defined property column
TableViewerColumn runtimeColumn = new TableViewerColumn(viewer, SWT.NONE);
runtimeColumn.getColumn().setText("Runtime");
@@ -316,8 +321,6 @@ public class SemanticPostAction extends ModelPostAction {
table.setLinesVisible(true);
}
-
-
/**
* updates the stereotype viewer
*/
@@ -374,17 +377,18 @@ public class SemanticPostAction extends ModelPostAction {
}
/**
- * Returns <code>true</code> if the value of this feature is defined at runtime
+ * Returns <code>true</code> if the value of this feature is defined at
+ * runtime
*
* @param feature
* the feature to check
- * @return <code>true</code> if the value of this feature is defined at runtime, else <code>false</code>
+ * @return <code>true</code> if the value of this feature is defined at
+ * runtime, else <code>false</code>
*/
protected boolean isRuntimeDefined(EStructuralFeature feature) {
return runtimeDefinedProperties.contains(feature.getName());
}
-
/**
* Content provider for the attribute viewer
*/
@@ -588,7 +592,6 @@ public class SemanticPostAction extends ModelPostAction {
}
}
-
getViewer().update(element, null);
}
@@ -650,7 +653,6 @@ public class SemanticPostAction extends ModelPostAction {
*/
protected class DynamicFeatureEditingSupport extends EditingSupport {
-
/** editor */
private CellEditor editor;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/SetDynamicValueCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/SetDynamicValueCommand.java
index a0844933716..31e9517bc5a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/SetDynamicValueCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/SetDynamicValueCommand.java
@@ -55,14 +55,12 @@ public class SetDynamicValueCommand extends EditElementCommand implements IUndoa
this.request = request;
}
-
-
/**
* @{inheritDoc
*/
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- //we edit meta-element properties
+ // we edit meta-element properties
DefinedPropertiesAtRuntimeDialog dialog = new DefinedPropertiesAtRuntimeDialog(DisplayUtils.getDefaultShell(), title, message, propertiesToEdit, getElementToEdit());
dialog.open();
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/StereotypeAspectActionProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/StereotypeAspectActionProvider.java
index c5ce7ed07c3..2cfd100b2da 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/StereotypeAspectActionProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/StereotypeAspectActionProvider.java
@@ -22,7 +22,6 @@ import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-
/**
* Factory in charge of the aspect actions taken before/after palette actions
*/
@@ -50,7 +49,8 @@ public class StereotypeAspectActionProvider extends AbstractAspectActionProvider
}
/**
- * Creates a configuration node for this provider, given a list of stereotypes to apply.
+ * Creates a configuration node for this provider, given a list of
+ * stereotypes to apply.
* <P>
* This method is used in the customize palette dialog, when pre-creating all available tools with stereotypes applied
* </P>
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/StereotypePostAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/StereotypePostAction.java
index 8cab167d000..5401676944a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/StereotypePostAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/StereotypePostAction.java
@@ -87,12 +87,10 @@ import org.eclipse.uml2.uml.UMLPackage;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-
/**
* Aspect action that applies stereotypes on the edit part newly created
*
- * /!\ WARNING
- * use the setters and getters for manipulating the {@link #propertiesToUpdate} and {@link #valuesToProperties}
+ * /!\ WARNING use the setters and getters for manipulating the {@link #propertiesToUpdate} and {@link #valuesToProperties}
*
*
*/
@@ -149,7 +147,10 @@ public class StereotypePostAction extends ModelPostAction {
/** the configuration for the palette element */
protected Configuration config;
- /** Separator for displaying the different values owned by a multi-valued property */
+ /**
+ * Separator for displaying the different values owned by a multi-valued
+ * property
+ */
protected static final String SEPARATOR = ", "; //$NON-NLS-1$
/** viewer to display stereotypes to apply */
@@ -252,7 +253,6 @@ public class StereotypePostAction extends ModelPostAction {
config = new Configuration(configurationNode);
}
-
/**
* @{inheritDoc
*/
@@ -270,28 +270,28 @@ public class StereotypePostAction extends ModelPostAction {
@Override
@SuppressWarnings("unchecked")
public void run(final EditPart editPart) {
- //so, we doesn't need to save the default values which can be modified during the runtime
+ // so, we doesn't need to save the default values which can be modified
+ // during the runtime
config = new Configuration(config.getConfigurationNode());
-
// Apply the required stereotypes
ApplyStereotypeRequest request = new ApplyStereotypeRequest(config.getStereotypesToApplyQN());
request.getExtendedData().put(ApplyStereotypeRequest.NEW_EDIT_PART_NAME, "NEW"); //$NON-NLS-1$
editPart.performRequest(request);
/*
- * Looks like updateValue in ValueTreeObject and CompositeProperty
- * to apply the values properties to the elements
+ * Looks like updateValue in ValueTreeObject and CompositeProperty to
+ * apply the values properties to the elements
*/
- //element where are the properties
+ // element where are the properties
final EObject objectToEdit = ((View)editPart.getModel()).getElement();
if(!(objectToEdit instanceof org.eclipse.uml2.uml.NamedElement)) {
- //TODO for the Element which are not NamedElement
+ // TODO for the Element which are not NamedElement
return;
}
- //we search the container for the object
+ // we search the container for the object
org.eclipse.uml2.uml.Element packageContainerTmp = ((org.eclipse.uml2.uml.Element)objectToEdit);
do {
packageContainerTmp = packageContainerTmp.getOwner();
@@ -307,7 +307,7 @@ public class StereotypePostAction extends ModelPostAction {
final TransactionalEditingDomain editingDomain = org.eclipse.papyrus.core.utils.EditorUtils.getTransactionalEditingDomain();
- //-----------------create a composite command
+ // -----------------create a composite command
CompositeCommand cmd = new CompositeCommand("Apply values for properties");
ArrayList<StereotypeRepresentation> stereotypes = config.getStereotypesRepresentations();
for(StereotypeRepresentation stereotype : stereotypes) {
@@ -323,24 +323,24 @@ public class StereotypePostAction extends ModelPostAction {
newValue = Util.getValueFromString(property.getUMLProperty(), property.getStringValue());
} else if(Util.isMetaclass(type)) {
newValue = Util.retrievesMetaclassElementFromString(property.getUMLProperty(), property.getStringValue(), packageContainer);
- // property is an Enumeration
+ // property is an Enumeration
} else if(type instanceof org.eclipse.uml2.uml.Enumeration) {
newValue = Util.retrievesEnumerationLiteralFromString(property.getUMLProperty(), property.getStringValue(), packageContainer);
- // property is a DataType
+ // property is a DataType
} else if(type instanceof org.eclipse.uml2.uml.DataType) {
newValue = Util.getValueFromString(property.getUMLProperty(), property.getStringValue());
- // property is a Stereotype
+ // property is a Stereotype
} else if(type instanceof Stereotype) {
newValue = Util.retrievesStereotypedElementFromString(property.getUMLProperty(), property.getStringValue(), packageContainer);
// property is a composite class
} else if((type instanceof org.eclipse.uml2.uml.Class) && !(type instanceof Stereotype) && property.getUMLProperty().isMultivalued()) {
- //TODO
+ // TODO
newValue = null;
} else {
Activator.log.error("impossible to find a correct editor for the property" + property, null); //$NON-NLS-1$
return;
}
- //we create and execute the recording command
+ // we create and execute the recording command
RecordingCommand command = null;
if(newValue != null) {
command = new RecordingCommand(editingDomain) {
@@ -364,7 +364,7 @@ public class StereotypePostAction extends ModelPostAction {
final ICommand iCmd = cmd.reduce();
try {
if(iCmd.canExecute()) {
- //execute the command
+ // execute the command
editingDomain.runExclusive(new Runnable() {
//
@@ -416,7 +416,6 @@ public class StereotypePostAction extends ModelPostAction {
config.setAppliedProfiles(appliedProfiles);
this.entryProxy = entryProxy;
-
Composite mainComposite = new Composite(parent, SWT.BORDER);
GridLayout layout = new GridLayout(5, false);
mainComposite.setLayout(layout);
@@ -537,7 +536,7 @@ public class StereotypePostAction extends ModelPostAction {
});
downButton.setEnabled(false);
- // stereotype viewer creation
+ // stereotype viewer creation
stereotypesViewer = new TreeViewer(mainComposite, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
data = new GridData(SWT.FILL, SWT.FILL, true, true);
data.horizontalSpan = 5;
@@ -563,7 +562,9 @@ public class StereotypePostAction extends ModelPostAction {
performF2Action(stereotypesViewer);
} else if(e.character == SWT.DEL) {
performRemoveAction(stereotypesViewer);
- } else if(e.stateMask == SWT.CTRL && e.keyCode == 110) {//e.character=='N' doesn't work
+ } else if(e.stateMask == SWT.CTRL && e.keyCode == 110) {// e.character=='N'
+ // doesn't
+ // work
performCTRL_N_Action(e, stereotypesViewer);
}
selectionHasChange();
@@ -571,8 +572,8 @@ public class StereotypePostAction extends ModelPostAction {
});
/*
- * we can't do :
- * stereotypesViewer.addDoubleClickListener, because we can't know on which column we are to make something or nothing!
+ * we can't do : stereotypesViewer.addDoubleClickListener, because we
+ * can't know on which column we are to make something or nothing!
*/
stereotypesViewer.getControl().addMouseListener(new MouseListener() {
@@ -584,9 +585,14 @@ public class StereotypePostAction extends ModelPostAction {
public void mouseDoubleClick(MouseEvent e) {
if(stereotypeColumn != null) {
- if(e.x < stereotypeColumn.getColumn().getWidth()) {//we are on the stereotype column
+ if(e.x < stereotypeColumn.getColumn().getWidth()) {// we
+ // are
+ // on
+ // the
+ // stereotype
+ // column
performDoubleClickAction(stereotypesViewer);
- } else {//change the property value
+ } else {// change the property value
ViewerCell cell = runtimeColumn.getViewer().getCell(new Point(e.x, e.y));
if(cell != null) {
Object element = ((TreeSelection)stereotypesViewer.getSelection()).getFirstElement();
@@ -627,12 +633,11 @@ public class StereotypePostAction extends ModelPostAction {
}
/**
- * updates the stereotype viewer
- * set the expandedNode
- * refresh the status button
- * this method is called by
+ * updates the stereotype viewer set the expandedNode refresh the status
+ * button this method is called by
* <ul>
- * <li> {@link #createConfigurationComposite(Composite, PaletteEntryProxy, List)}</li>
+ * <li>
+ * {@link #createConfigurationComposite(Composite, PaletteEntryProxy, List)}</li>
* <li> {@link #performAddButtonPressed(TreeViewer)} when we add or remove stereotypes</li>
* </ul>
*/
@@ -662,13 +667,16 @@ public class StereotypePostAction extends ModelPostAction {
Object selectedElement = selection.getFirstElement();
if(selection != null && selection.size() == 1 && !(selectedElement instanceof StereotypeRepresentation)) {
if(selectedElement instanceof PropertyRepresentation) {
- //We want add a value to a multi-valued property or edit a value to a mono-valued property
+ // We want add a value to a multi-valued property or edit a
+ // value to a mono-valued property
PropertyRepresentation prop = (PropertyRepresentation)selectedElement;
if(prop.getUpperMultiplicity() != 1) {
- editMe(prop, null);//we add a value
- } else if(!prop.getValues().isEmpty()) { //mono-valued property and the valu exists
+ editMe(prop, null);// we add a value
+ } else if(!prop.getValues().isEmpty()) { // mono-valued
+ // property and the
+ // valu exists
editMe(prop, prop.getValues().get(0));
- } else {//monovalued property, the value doesn't exist
+ } else {// monovalued property, the value doesn't exist
editMe(prop, null);
}
tree.refresh(selectedElement);
@@ -676,8 +684,8 @@ public class StereotypePostAction extends ModelPostAction {
return;
}
-
- // pops-up a dialog window where users can select the additionnal stereotypes to apply
+ // pops-up a dialog window where users can select the additionnal
+ // stereotypes to apply
// it needs the metaclass information...
// for this, entry Proxy should be a Palette entry proxy
if(!(entryProxy instanceof IPaletteAspectToolEntryProxy)) {
@@ -699,9 +707,10 @@ public class StereotypePostAction extends ModelPostAction {
}
// retrieve the original stereotype list from the qualified names
- List<Stereotype> stereotypeList = config.getUMLStereotypes();//retrieveStereotypesFromQualifiedNames();
+ List<Stereotype> stereotypeList = config.getUMLStereotypes();// retrieveStereotypesFromQualifiedNames();
- // we have all applied profiles, the list of already applied stereotypes, the metaclass of the created element...
+ // we have all applied profiles, the list of already applied
+ // stereotypes, the metaclass of the created element...
// just have to open a selection dialog
final CheckedTreeSelectionDialog selectionDialog = new CheckedTreeSelectionDialog(DisplayUtils.getDisplay().getActiveShell(), editorLabelProvider, new ProfileContentProvider(metaClass));
selectionDialog.setTitle(Messages.StereotypePostAction_StereotypeSelectionTitle);
@@ -714,7 +723,6 @@ public class StereotypePostAction extends ModelPostAction {
ViewerComparator comparator = new ViewerComparator();
selectionDialog.setComparator(comparator);
-
if(CheckedTreeSelectionDialog.OK == selectionDialog.open()) {
// update the list of stereotype to apply
Object[] result = selectionDialog.getResult();
@@ -726,11 +734,10 @@ public class StereotypePostAction extends ModelPostAction {
}
}
config.setStereotypesRepresentations(stereotypesToApply);
- //it's not possible to use refresh or update here!
+ // it's not possible to use refresh or update here!
updateStereotypeViewer();
}
-
}
/**
@@ -745,7 +752,7 @@ public class StereotypePostAction extends ModelPostAction {
if(selection != null) {
List<?> selectedElements = ((TreeSelection)selection).toList();
if(sameLevelForFullSelection(selection)) {
- //all the element have the same type
+ // all the element have the same type
if(selection.getFirstElement() instanceof StereotypeRepresentation) {
for(Object object : selectedElements) {
if(object instanceof StereotypeRepresentation) {
@@ -754,7 +761,7 @@ public class StereotypePostAction extends ModelPostAction {
}
} else if(selection.getFirstElement() instanceof PropertyRepresentation) {
- //we delete the value for mono-valued property
+ // we delete the value for mono-valued property
for(Object object : selectedElements) {
if(object instanceof PropertyRepresentation) {
if(!((PropertyRepresentation)object).getUMLProperty().isMultivalued()) {
@@ -763,7 +770,7 @@ public class StereotypePostAction extends ModelPostAction {
}
}
} else if(selection.getFirstElement() instanceof Value) {
- //we remove value from a multivalued property
+ // we remove value from a multivalued property
for(Object object : selectedElements) {
if(object instanceof Value) {
((Value)object).getPropertyRepresentation().removeValue((Value)object);
@@ -796,7 +803,7 @@ public class StereotypePostAction extends ModelPostAction {
if((prop.getType() instanceof PrimitiveType) || (prop.getType() instanceof DataType)) {
viewer.editElement(prop, 0);
} else {
- //TODO
+ // TODO
}
}
} else if(objectToEdit instanceof Value) {
@@ -806,9 +813,10 @@ public class StereotypePostAction extends ModelPostAction {
if(type instanceof PrimitiveType || type instanceof DataType) {
viewer.editElement(objectToEdit, 0);
- //the refresh is do by the cellEditor! (if the resfresh is do here, there is a bug!)
- //viewer.refresh(property);
- } else {//popupEditor
+ // the refresh is do by the cellEditor! (if the resfresh
+ // is do here, there is a bug!)
+ // viewer.refresh(property);
+ } else {// popupEditor
editMe(propRep, (Value)objectToEdit);
viewer.refresh(propRep);
}
@@ -816,7 +824,6 @@ public class StereotypePostAction extends ModelPostAction {
}
}
-
}
/**
@@ -831,22 +838,21 @@ public class StereotypePostAction extends ModelPostAction {
if(selection != null && selection.size() == 1) {
Object selectedObject = selection.getFirstElement();
if(selectedObject instanceof StereotypeRepresentation) {
- //we expand or collapse the node
+ // we expand or collapse the node
viewer.setExpandedState(selectedObject, !viewer.getExpandedState(selectedObject));
} else if(selectedObject instanceof PropertyRepresentation) {
Property prop = ((PropertyRepresentation)selectedObject).getUMLProperty();
if(prop.isMultivalued()) {
- //we expand or collapse the node
+ // we expand or collapse the node
viewer.setExpandedState(selectedObject, !viewer.getExpandedState(selectedObject));
} else {
- //we edit a value
+ // we edit a value
if(((PropertyRepresentation)selectedObject).getValues().isEmpty()) {
editMe((PropertyRepresentation)selectedObject, null);
} else {
editMe((PropertyRepresentation)selectedObject, ((PropertyRepresentation)selectedObject).getValues().get(0));
}
-
viewer.update(selectedObject, null);
}
} else if(selectedObject instanceof Value) {
@@ -873,7 +879,7 @@ public class StereotypePostAction extends ModelPostAction {
if(selectedObject instanceof PropertyRepresentation) {
Property property = ((PropertyRepresentation)selectedObject).getUMLProperty();
if(property.isMultivalued()) {
- //can we add a new value?
+ // can we add a new value?
int upperMultiplicity = property.getUpper();
ArrayList<Value> values = ((PropertyRepresentation)selectedObject).getValues();
if(upperMultiplicity == -1 || values.size() < upperMultiplicity) {
@@ -889,8 +895,8 @@ public class StereotypePostAction extends ModelPostAction {
}
/**
- * Set the {@link Button#setEnabled(boolean)} parameter to true or false for the buttons following the selected element
- * in the {@link StereotypePostAction#stereotypeViewer}
+ * Set the {@link Button#setEnabled(boolean)} parameter to true or false for
+ * the buttons following the selected element in the {@link StereotypePostAction#stereotypeViewer}
* <ul>
* <li> {@link StereotypePostAction#addButton}</li>
* <li> {@link StereotypePostAction#removeButton}</li>
@@ -911,7 +917,7 @@ public class StereotypePostAction extends ModelPostAction {
downButton.setEnabled(false);
} else if(selectionSize == 1) {
Object selectedElement = selection.getFirstElement();
- //removeButton state
+ // removeButton state
if(selectedElement instanceof StereotypeRepresentation) {
removeButton.setEnabled(true);
} else if(selectedElement instanceof PropertyRepresentation) {
@@ -925,7 +931,7 @@ public class StereotypePostAction extends ModelPostAction {
}
- //addButton state
+ // addButton state
if(selectedElement instanceof StereotypeRepresentation) {
addButton.setEnabled(true);
} else if(selectedElement instanceof PropertyRepresentation) {
@@ -937,7 +943,7 @@ public class StereotypePostAction extends ModelPostAction {
} else {
addButton.setEnabled(false);
}
- } else {//multi-valued property}
+ } else {// multi-valued property}
int upper = prop.getUpper();
if(upper == -1) {
addButton.setEnabled(true);
@@ -950,7 +956,7 @@ public class StereotypePostAction extends ModelPostAction {
} else if(selectedElement instanceof Value) {
addButton.setEnabled(false);
}
- //upButton and downButton states
+ // upButton and downButton states
if(selectedElement instanceof StereotypeRepresentation) {
int index = config.getStereotypesRepresentations().indexOf(selectedElement);
if(config.getStereotypesRepresentations().size() == 1) {
@@ -987,7 +993,7 @@ public class StereotypePostAction extends ModelPostAction {
}
}
- } else {//all the elements are from the same level
+ } else {// all the elements are from the same level
List<?> selectedElements = ((TreeSelection)selection).toList();
if(selection.getFirstElement() instanceof StereotypeRepresentation) {
@@ -1031,7 +1037,6 @@ public class StereotypePostAction extends ModelPostAction {
/** it's a property value */
exchangeTwoValues(((Value)selectedElement).getPropertyRepresentation().getValues(), selectedElement, shiftValue);
-
viewer.refresh(((Value)selectedElement).getPropertyRepresentation());
} else if(selectedElement instanceof StereotypeRepresentation) {
@@ -1043,7 +1048,8 @@ public class StereotypePostAction extends ModelPostAction {
}
/**
- * Exchange the selectedElement with its neighbor, in arrayList, up or down following shiftValue
+ * Exchange the selectedElement with its neighbor, in arrayList, up or down
+ * following shiftValue
*
*
* @param arrayList
@@ -1064,11 +1070,11 @@ public class StereotypePostAction extends ModelPostAction {
* is it possible to move the objects ?
*/
if(arrayList == null || arrayList.size() < 2) {
- //the list is to small
+ // the list is to small
return;
}
if((shiftValue.equals(MOVE_UP) && index == 0) || (shiftValue.equals(MOVE_DOWN) && arrayList.size() == (index + 1))) {
- //the selected element is already the first or the last
+ // the selected element is already the first or the last
return;
}
@@ -1082,32 +1088,32 @@ public class StereotypePostAction extends ModelPostAction {
}
}
-
/**
* test if all the selected element in the selection are fron the same level
*
* @param selection
- * @return
- * <ul>
+ * @return <ul>
* <li>{@code true} if all the element are from the same level in the tree</li>
* <li>{@code false if not}</li>
* </ul>
*
*/
protected boolean sameLevelForFullSelection(ITreeSelection selection) {
- //ITreeSelection selection = (ITreeSelection)stereotypesViewer.getSelection();
- //we do the delete action, only if all the elements have the same level
+ // ITreeSelection selection =
+ // (ITreeSelection)stereotypesViewer.getSelection();
+ // we do the delete action, only if all the elements have the same level
List<?> selectedElements = ((TreeSelection)selection).toList();
if(!selectedElements.isEmpty()) {
TreePath[] path = selection.getPathsFor(selectedElements.get(0));
if(path != null) {
- //the level for the first selected Element
+ // the level for the first selected Element
int level = path[0].getSegmentCount();
for(Object object : selectedElements) {
path = selection.getPathsFor(object);
if(level != path[0].getSegmentCount()) {
/**
- * the selection is a mixed between different types of elements
+ * the selection is a mixed between different types of
+ * elements
*/
return false;
}
@@ -1118,9 +1124,6 @@ public class StereotypePostAction extends ModelPostAction {
return false;
}
-
-
-
/**
* Returns the list of stereotypes applied by this action
*
@@ -1131,8 +1134,9 @@ public class StereotypePostAction extends ModelPostAction {
}
/**
- * This class provides the methods for displaying the stereotypeViewer's column.
- * This class gives the correct Label and it's {@link Image} to display for each element
+ * This class provides the methods for displaying the stereotypeViewer's
+ * column. This class gives the correct Label and it's {@link Image} to
+ * display for each element
*
*
*/
@@ -1186,53 +1190,55 @@ public class StereotypePostAction extends ModelPostAction {
if(type != null) {
if(type instanceof PrimitiveType) {
String typeName = type.getQualifiedName();
- // property is a boolean property
+ // property is a boolean property
if(UMLPrimitiveTypes_BOOLEAN.equals(typeName)) {
return Activator.getPluginIconImage(Activator.ID, ICON_LITERALBOOLEAN);
- // property is a String
+ // property is a String
} else if(UMLPrimitiveTypes_STRING.equals(typeName)) {
return Activator.getPluginIconImage(Activator.ID, ICON_LITERALSTRING);
- // property is an Integer
+ // property is an Integer
} else if(UMLPrimitiveTypes_INTEGER.equals(typeName)) {
return Activator.getPluginIconImage(Activator.ID, ICON_LITERALINTEGER);
- // property is an unlimitedNatural
+ // property is an unlimitedNatural
} else if(UMLPrimitiveTypes_UNLIMITED_NATURAL.equals(typeName)) {
return Activator.getPluginIconImage(Activator.ID, ICON_LITERALUNLIMITEDNATURAL);
- // property is a user primitive Type
+ // property is a user primitive Type
} else {
- //never used!
- //newVTO = new UserPrimitiveTypeValueTreeObject(parent, newValue, domain);
+ // never used!
+ // newVTO = new
+ // UserPrimitiveTypeValueTreeObject(parent,
+ // newValue, domain);
}
- // property is a Metaclass property
+ // property is a Metaclass property
} else if(Util.isMetaclass(type)) {
return Activator.getPluginIconImage(Activator.ID, ICON_METACLASS);
- // property is an Enumeration
+ // property is an Enumeration
} else if(type instanceof org.eclipse.uml2.uml.Enumeration) {
return Activator.getPluginIconImage(Activator.ID, ICON_ENUMERATION);
- // property is a DataType
+ // property is a DataType
} else if(type instanceof org.eclipse.uml2.uml.DataType) {
return Activator.getPluginIconImage(Activator.ID, ICON_DATATYPE);
- // property is a Stereotype
+ // property is a Stereotype
} else if(type instanceof Stereotype) {
return Activator.getPluginIconImage(Activator.ID, ICON_STEREOTYPE);
- // property is a composite class
+ // property is a composite class
} else if((type instanceof org.eclipse.uml2.uml.Class) && !(type instanceof Stereotype) && property.isMultivalued()) {
- //TODO
+ // TODO
}
}
} else if(element instanceof Profile) {
return Activator.getPluginIconImage(Activator.ID, ICON_PROFILE);
- } else if(element instanceof Stereotype) {//it's a stereotype
+ } else if(element instanceof Stereotype) {// it's a stereotype
return Activator.getPluginIconImage(Activator.ID, ICON_STEREOTYPE);
}
@@ -1240,7 +1246,6 @@ public class StereotypePostAction extends ModelPostAction {
}
}
-
/**
* Content provider for the stereotype viewer
*/
@@ -1251,7 +1256,6 @@ public class StereotypePostAction extends ModelPostAction {
*/
public Object[] getChildren(Object parentElement) {
-
if(parentElement instanceof List<?>) {
return ((List<?>)parentElement).toArray();
} else if(parentElement instanceof StereotypeRepresentation) {
@@ -1282,7 +1286,6 @@ public class StereotypePostAction extends ModelPostAction {
public boolean hasChildren(Object element) {
return getChildren(element) != null && (getChildren(element).length > 0);
-
}
/**
@@ -1307,8 +1310,6 @@ public class StereotypePostAction extends ModelPostAction {
}
}
-
-
/**
* Content provider for the selection dialog
*/
@@ -1317,7 +1318,6 @@ public class StereotypePostAction extends ModelPostAction {
/** metaclass of the element created by the tool */
final protected EClass metaclass;
-
/**
* Constructor.
*
@@ -1400,12 +1400,9 @@ public class StereotypePostAction extends ModelPostAction {
}
-
-
-
/**
- * Give the correct editor to a property following the property type.
- * Fill the hashmaps with the new value
+ * Give the correct editor to a property following the property type. Fill
+ * the hashmaps with the new value
* <ul>
* <li>if {@code value==null}, we add a value to a multi-valued property</li>
* <li>if {@code value!=null}, we modify a value</li>
@@ -1422,47 +1419,47 @@ public class StereotypePostAction extends ModelPostAction {
// property is a a primitive type
if(type instanceof PrimitiveType) {
String typeName = type.getQualifiedName();
- // property is a boolean property
+ // property is a boolean property
if(UMLPrimitiveTypes_BOOLEAN.equals(typeName)) {
value = PropertyEditors.BooleanEditor(property, valueToEdit);
- // property is a String
+ // property is a String
} else if(UMLPrimitiveTypes_STRING.equals(typeName)) {
value = PropertyEditors.StringEditor(property, valueToEdit);
- // property is an Integer
+ // property is an Integer
} else if(UMLPrimitiveTypes_INTEGER.equals(typeName)) {
value = PropertyEditors.IntegerEditor(property, valueToEdit);
-
- // property is an unlimitedNatural
+ // property is an unlimitedNatural
} else if(UMLPrimitiveTypes_UNLIMITED_NATURAL.equals(typeName)) {
value = PropertyEditors.UnlimitedNaturalEditor(property, valueToEdit);
/** property is a user primitive Type */
} else {
- //never used!
- //newVTO = new UserPrimitiveTypeValueTreeObject(parent, newValue, domain);
+ // never used!
+ // newVTO = new UserPrimitiveTypeValueTreeObject(parent,
+ // newValue, domain);
}
- // property is a Metaclass property
+ // property is a Metaclass property
} else if(Util.isMetaclass(type)) {
value = PropertyEditors.MetaclassEditor(property, valueToEdit, config.getAppliedProfiles());
- // property is an Enumeration
+ // property is an Enumeration
} else if(type instanceof org.eclipse.uml2.uml.Enumeration) {
value = PropertyEditors.EnumerationEditor(property, valueToEdit);
- // property is a DataType
+ // property is a DataType
} else if(type instanceof org.eclipse.uml2.uml.DataType) {
value = PropertyEditors.DataTypeEditor(property, valueToEdit);
- // property is a Stereotype
+ // property is a Stereotype
} else if(type instanceof Stereotype) {
value = PropertyEditors.StereotypeEditor(property, valueToEdit, config.getAppliedProfiles());
- // property is a composite class
+ // property is a composite class
} else if((type instanceof org.eclipse.uml2.uml.Class) && !(type instanceof Stereotype) && property.isMultivalued()) {
value = PropertyEditors.CompositeClassEditor(property, valueToEdit);
} else {
@@ -1471,29 +1468,29 @@ public class StereotypePostAction extends ModelPostAction {
}
if(value == null && valueToEdit == null) {
- //nothing to do
+ // nothing to do
return;
} else if(value == null && valueToEdit != null) {
- //we delete a value
+ // we delete a value
valueToEdit.getPropertyRepresentation().getValues().remove(valueToEdit);
} else if(value != null && valueToEdit == null) {
- //we add a value
+ // we add a value
propRepresentation.addValue(new Value(value));
} else if(value != null && valueToEdit != null) {
- //we change a value
+ // we change a value
valueToEdit.setValue(value);
}
}
-
/**
- * search the object in the ArrayList list, using == and not the equals method
+ * search the object in the ArrayList list, using == and not the equals
+ * method
*
* @param list
* @param obj
- * @return
- * return the index of the object or -1 if it doesn't exist in the list
+ * @return return the index of the object or -1 if it doesn't exist in the
+ * list
*/
public int getIndexOf(ArrayList<?> list, Object obj) {
int index = -1;
@@ -1505,7 +1502,6 @@ public class StereotypePostAction extends ModelPostAction {
return index;
}
-
/**
* save the expanded Nodes
*/
@@ -1523,10 +1519,6 @@ public class StereotypePostAction extends ModelPostAction {
}
}
-
-
-
-
/**
* Class giving cell editors for the {@link stereotypesViewer} and for the {@link RuntimePropertiesDialog#tree}
*/
@@ -1535,7 +1527,6 @@ public class StereotypePostAction extends ModelPostAction {
/** proposals for boolean */
protected final String[] booleanProposals = new String[]{ "", "true", "false" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
protected TreeViewer treeViewer = null;
/**
@@ -1571,11 +1562,11 @@ public class StereotypePostAction extends ModelPostAction {
if(type instanceof PrimitiveType) {
String typeName = type.getQualifiedName();
- // property is a boolean property
+ // property is a boolean property
if(UMLPrimitiveTypes_BOOLEAN.equals(typeName)) {
editor = createBooleanEditor(treeViewer.getTree());
- // property is a String
+ // property is a String
} else if(UMLPrimitiveTypes_STRING.equals(typeName)) {
editor = new TextCellEditor(treeViewer.getTree());
@@ -1589,8 +1580,9 @@ public class StereotypePostAction extends ModelPostAction {
// property is a user primitive Type
} else {
- //never used!
- //newVTO = new UserPrimitiveTypeValueTreeObject(parent, newValue, domain);
+ // never used!
+ // newVTO = new UserPrimitiveTypeValueTreeObject(parent,
+ // newValue, domain);
}
}
@@ -1610,7 +1602,6 @@ public class StereotypePostAction extends ModelPostAction {
return new ComboBoxCellEditor(parent, booleanProposals, SWT.READ_ONLY);
}
-
/**
* @{inheritDoc
*/
@@ -1638,7 +1629,8 @@ public class StereotypePostAction extends ModelPostAction {
*/
@Override
protected void setValue(Object oldValue, Object newValue) {
- //property can't be null, because, we change a value, we never create a new value
+ // property can't be null, because, we change a value, we never
+ // create a new value
if(!"".equals(newValue)) { //$NON-NLS-1$
if(oldValue instanceof Value) {
Property property = ((Value)oldValue).getPropertyRepresentation().getUMLProperty();
@@ -1683,7 +1675,6 @@ public class StereotypePostAction extends ModelPostAction {
}
-
/**
* This class provides a {@link CheckboxCellEditor} for the {@link StereotypePostAction#runtimeColumn}
*
@@ -1765,8 +1756,9 @@ public class StereotypePostAction extends ModelPostAction {
}
/**
- * This class provides the methods for displaying the stereotypeViewer's column.
- * This class gives the correct Label and it's {@link Image} to display for each element
+ * This class provides the methods for displaying the stereotypeViewer's
+ * column. This class gives the correct Label and it's {@link Image} to
+ * display for each element
*
*/
protected class RuntimeLabelProvider extends CellLabelProvider implements ILabelProvider {
@@ -1794,7 +1786,8 @@ public class StereotypePostAction extends ModelPostAction {
* @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
*
* @param element
- * @return the image corresponding to the status (define or not at runtime)
+ * @return the image corresponding to the status (define or not at
+ * runtime)
*/
public Image getImage(Object element) {
@@ -1810,21 +1803,24 @@ public class StereotypePostAction extends ModelPostAction {
}
/**
- * This method does the action to define the properties defined at runtime, that's to say, open a dialog to propose editing the properties defined
+ * This method does the action to define the properties defined at runtime,
+ * that's to say, open a dialog to propose editing the properties defined
* during the palette customisation
*
* @param config
- * the configuration which contains all the applied stereotypes with properties and values
+ * the configuration which contains all the applied stereotypes
+ * with properties and values
* @param editPart
* the edit
*/
protected void defineRuntimeProperties(Configuration config) {
/*
- * we copy the stereotype with runtime properties
- * we copy the runtime properties (note that the values aren't not copied)
+ * we copy the stereotype with runtime properties we copy the runtime
+ * properties (note that the values aren't not copied)
*
- * so steWithPropToEdit contains only stereotypes with only their runtime properties.
+ * so steWithPropToEdit contains only stereotypes with only their
+ * runtime properties.
*/
List<StereotypeRepresentation> steWithPropToEdit = new ArrayList<StereotypeRepresentation>();
@@ -1844,15 +1840,14 @@ public class StereotypePostAction extends ModelPostAction {
}
-
/**
*
- * This class provides a Dialog to define the properties values during the element creation
+ * This class provides a Dialog to define the properties values during the
+ * element creation
*
*/
protected class RuntimePropertiesDialog extends Dialog {
-
/** the dialog title */
private String title = null;
@@ -1862,7 +1857,10 @@ public class StereotypePostAction extends ModelPostAction {
/** the viewer */
private TreeViewer tree = null;
- /** the list containing the {@link StereotypeRepresentation} with the runtime roperties */
+ /**
+ * the list containing the {@link StereotypeRepresentation} with the
+ * runtime roperties
+ */
private List<StereotypeRepresentation> stereotypesRep;
/**
@@ -1967,7 +1965,7 @@ public class StereotypePostAction extends ModelPostAction {
addButton.addMouseListener(new MouseListener() {
public void mouseUp(MouseEvent e) {
- //performedAddButtonRuntime(e);
+ // performedAddButtonRuntime(e);
performAddButtonPressed(tree);
tree.refresh();
runtimeSelectionHasChange();
@@ -2001,9 +1999,10 @@ public class StereotypePostAction extends ModelPostAction {
}
});
- //create the tree
+ // create the tree
tree = new TreeViewer(parent, SWT.BORDER | SWT.MULTI);
- //tree.setContentProvider(new RuntimePropertiesStereotypeContentProvider());
+ // tree.setContentProvider(new
+ // RuntimePropertiesStereotypeContentProvider());
tree.setContentProvider(new StereotypeContentProvider());
tree.getControl().setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
createColumn(tree);
@@ -2024,7 +2023,6 @@ public class StereotypePostAction extends ModelPostAction {
});
-
tree.getControl().addKeyListener(new KeyListener() {
public void keyReleased(KeyEvent e) {
@@ -2037,13 +2035,17 @@ public class StereotypePostAction extends ModelPostAction {
performF2Action(tree);
} else if(e.character == SWT.DEL) {
performRemoveAction(tree);
- } else if(e.stateMask == SWT.CTRL && e.keyCode == 110) {//e.character=='N' doesn't work on my computer
+ } else if(e.stateMask == SWT.CTRL && e.keyCode == 110) {// e.character=='N'
+ // doesn't
+ // work
+ // on
+ // my
+ // computer
performCTRL_N_Action(e, tree);
}
runtimeSelectionHasChange();
}
-
});
updateTreeViewer();
tree.expandAll();
@@ -2078,8 +2080,6 @@ public class StereotypePostAction extends ModelPostAction {
performSelectionChangeRuntime(new SelectionChangedEvent(this.tree, tree.getSelection()));
}
-
-
/**
* this function updates the buttons status
*
@@ -2096,7 +2096,7 @@ public class StereotypePostAction extends ModelPostAction {
downButton.setEnabled(false);
} else if(selectionSize == 1) {
Object selectedElement = selection.getFirstElement();
- //removeButton state
+ // removeButton state
if(selectedElement instanceof StereotypeRepresentation) {
removeButton.setEnabled(false);
} else if(selectedElement instanceof PropertyRepresentation) {
@@ -2110,7 +2110,7 @@ public class StereotypePostAction extends ModelPostAction {
}
- //addButton state
+ // addButton state
if(selectedElement instanceof StereotypeRepresentation) {
addButton.setEnabled(false);
} else if(selectedElement instanceof PropertyRepresentation) {
@@ -2122,7 +2122,7 @@ public class StereotypePostAction extends ModelPostAction {
} else {
addButton.setEnabled(false);
}
- } else {//multi-valued property}
+ } else {// multi-valued property}
int upper = prop.getUpper();
if(upper == -1) {
addButton.setEnabled(true);
@@ -2135,7 +2135,7 @@ public class StereotypePostAction extends ModelPostAction {
} else if(selectedElement instanceof Value) {
addButton.setEnabled(false);
}
- //upButton and downButton states
+ // upButton and downButton states
if(selectedElement instanceof StereotypeRepresentation) {
int index = stereotypesRep.indexOf(selectedElement);
if(config.getStereotypesRepresentations().size() == 1) {
@@ -2172,7 +2172,7 @@ public class StereotypePostAction extends ModelPostAction {
}
}
- } else {//all the elements are from the same level
+ } else {// all the elements are from the same level
if(selection.getFirstElement() instanceof StereotypeRepresentation) {
removeButton.setEnabled(true);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/StereotypeRepresentation.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/StereotypeRepresentation.java
index 5f8a7072b25..1efe67ffd77 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/StereotypeRepresentation.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/StereotypeRepresentation.java
@@ -29,7 +29,6 @@ public class StereotypeRepresentation {
*/
private String stereotypeQualifiedName;
-
/**
* the properties owned by the stereotype
*/
@@ -54,8 +53,7 @@ public class StereotypeRepresentation {
/**
*
- * Constructor.
- * Note : the properties are neither copied nor duplicated
+ * Constructor. Note : the properties are neither copied nor duplicated
*
* @param ste
* the {@link StereotypeRepresentation} uses to instantiate a new {@link StereotypeRepresentation}
@@ -67,8 +65,7 @@ public class StereotypeRepresentation {
}
/**
- * Adds a property to this stereotype
- * This method fills the field {@link StereotypeRepresentation} in the property
+ * Adds a property to this stereotype This method fills the field {@link StereotypeRepresentation} in the property
*
* @param property
* the property to add
@@ -81,8 +78,7 @@ public class StereotypeRepresentation {
/**
* Returns all the {@link PropertyRepresentation} owned by this stereotype
*
- * @return
- * all the {@link PropertyRepresentation} owned by this stereotype
+ * @return all the {@link PropertyRepresentation} owned by this stereotype
*/
public ArrayList<PropertyRepresentation> getPropertyRepresentations() {
return properties;
@@ -91,8 +87,7 @@ public class StereotypeRepresentation {
/**
* Returns all the properties containing values owned by this stereotype
*
- * @return
- * all the properties containing values owned by this stereotype
+ * @return all the properties containing values owned by this stereotype
*/
public ArrayList<PropertyRepresentation> getPropertiesWithValues() {
ArrayList<PropertyRepresentation> propertiesToSave = new ArrayList<PropertyRepresentation>();
@@ -107,14 +102,12 @@ public class StereotypeRepresentation {
/**
* Setter for {@link #stereotypeQualifiedName}
*
- * @return
- * the stereotype qualified name
+ * @return the stereotype qualified name
*/
public String getStereotypeQualifiedName() {
return stereotypeQualifiedName;
}
-
/**
* Returns the {@link PropertyRepresentation} corresponding the parameters
*
@@ -122,8 +115,7 @@ public class StereotypeRepresentation {
* the stereotype qualified name
* @param propertyQualifiedName
* the property qualified name
- * @return
- * <ul>
+ * @return <ul>
* <li>the corresponding {@link PropertyRepresentation}</li>
* <li>{@code null} if the corresponding property was not found</li>
* </ul>
@@ -138,10 +130,11 @@ public class StereotypeRepresentation {
}
/**
- * Returns the {@link PropertyRepresentation} which need to be defined at runtime
+ * Returns the {@link PropertyRepresentation} which need to be defined at
+ * runtime
*
- * @return
- * the {@link PropertyRepresentation} which need to be defined at runtime
+ * @return the {@link PropertyRepresentation} which need to be defined at
+ * runtime
*/
public ArrayList<PropertyRepresentation> getRuntimeProperties() {
ArrayList<PropertyRepresentation> propertiesToSave = new ArrayList<PropertyRepresentation>();
@@ -165,8 +158,7 @@ public class StereotypeRepresentation {
/**
* Getter for {@link #stereotype}
*
- * @return
- * {@link #stereotype}
+ * @return {@link #stereotype}
*/
public Stereotype getUMLStereotype() {
@@ -176,8 +168,7 @@ public class StereotypeRepresentation {
/**
*
- * @return
- * <ul>
+ * @return <ul>
* <li> {@code true} if there is runtime properties in this stereotype
* <li> {@code false} if not</li>
* </ul>
@@ -191,6 +182,4 @@ public class StereotypeRepresentation {
return false;
}
-
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/Value.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/Value.java
index 0c0ed0afc88..aa7a268b8c7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/Value.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/service/palette/Value.java
@@ -42,8 +42,8 @@ public class Value {
/**
*
- * Constructor.
- * Note : the field {@link PropertyRepresentation} is not copied
+ * Constructor. Note : the field {@link PropertyRepresentation} is not
+ * copied
*
* @param val
* The {@link Value} used to instantiate a new {@value}
@@ -66,8 +66,7 @@ public class Value {
/**
* Getter for {@link #property}
*
- * @return
- * the property owning this value
+ * @return the property owning this value
*/
public PropertyRepresentation getPropertyRepresentation() {
Assert.isNotNull(property);
@@ -77,8 +76,7 @@ public class Value {
/**
* Returns the string representing this value
*
- * @return
- * the string representing this value
+ * @return the string representing this value
*/
public String getValue() {
return value;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/sheet/UMLPropertySection.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/sheet/UMLPropertySection.java
index ddd29d5cd3a..afd9fd49f64 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/sheet/UMLPropertySection.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/sheet/UMLPropertySection.java
@@ -39,7 +39,8 @@ public class UMLPropertySection extends AdvancedPropertySection implements IProp
* (non-Javadoc)
*
* @see
- * org.eclipse.ui.views.properties.IPropertySourceProvider#getPropertySource(java.lang.Object)
+ * org.eclipse.ui.views.properties.IPropertySourceProvider#getPropertySource
+ * (java.lang.Object)
*/
public IPropertySource getPropertySource(Object object) {
if(object instanceof IPropertySource) {
@@ -61,8 +62,8 @@ public class UMLPropertySection extends AdvancedPropertySection implements IProp
/*
* (non-Javadoc)
*
- * @seeorg.eclipse.gmf.runtime.diagram.ui.properties.sections.AdvancedPropertySection#
- * getPropertySourceProvider()
+ * @seeorg.eclipse.gmf.runtime.diagram.ui.properties.sections.
+ * AdvancedPropertySection# getPropertySourceProvider()
*/
protected IPropertySourceProvider getPropertySourceProvider() {
return this;
@@ -100,9 +101,9 @@ public class UMLPropertySection extends AdvancedPropertySection implements IProp
/*
* (non-Javadoc)
*
- * @see
- * org.eclipse.gmf.runtime.diagram.ui.properties.sections.AdvancedPropertySection#setInput(org
- * .eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ * @see org.eclipse.gmf.runtime.diagram.ui.properties.sections.
+ * AdvancedPropertySection#setInput(org .eclipse.ui.IWorkbenchPart,
+ * org.eclipse.jface.viewers.ISelection)
*/
public void setInput(IWorkbenchPart part, ISelection selection) {
if(selection.isEmpty() || false == selection instanceof StructuredSelection) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/sheet/UMLPropertySource.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/sheet/UMLPropertySource.java
index a46745e8fa7..ebcf629d040 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/sheet/UMLPropertySource.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/sheet/UMLPropertySource.java
@@ -28,10 +28,9 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
/**
- * A specific property source for Papyrus.
- * It replaces the combo used to choose a single reference by a {@link ElementListSelectionDialog}
+ * A specific property source for Papyrus. It replaces the combo used to choose
+ * a single reference by a {@link ElementListSelectionDialog}
*
*/
public class UMLPropertySource extends PropertySource {
@@ -44,11 +43,12 @@ public class UMLPropertySource extends PropertySource {
super(object, ips);
}
-
/*
* (non-Javadoc)
*
- * @see org.eclipse.emf.edit.ui.provider.PropertySource#createPropertyDescriptor(org.eclipse.emf.edit.provider.IItemPropertyDescriptor)
+ * @see
+ * org.eclipse.emf.edit.ui.provider.PropertySource#createPropertyDescriptor
+ * (org.eclipse.emf.edit.provider.IItemPropertyDescriptor)
*/
@Override
protected IPropertyDescriptor createPropertyDescriptor(IItemPropertyDescriptor itemPropertyDescriptor) {
@@ -56,8 +56,7 @@ public class UMLPropertySource extends PropertySource {
}
/**
- * A custom property descriptor.
- * It replaces the Combo by the {@link ElementListSelectionDialog}
+ * A custom property descriptor. It replaces the Combo by the {@link ElementListSelectionDialog}
*/
private class CustomPropertyDescriptor extends PropertyDescriptor {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/AbstractChooseElement.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/AbstractChooseElement.java
index 20c6d3deb09..328b40786f8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/AbstractChooseElement.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/AbstractChooseElement.java
@@ -98,6 +98,5 @@ public class AbstractChooseElement extends Dialog {
filtercontrol =new FilteredTree(contentComposite, SWT.BORDER, new PatternFilter(), true);
filtercontrol.setBounds(10, 10, 424, 219);
-
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/ComboDialogWithMessage.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/ComboDialogWithMessage.java
index 6be076b9771..fdd051c4ce8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/ComboDialogWithMessage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/ComboDialogWithMessage.java
@@ -23,7 +23,6 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
-
/**
*
* this class provides a combo, with a warning message when the list is empty
@@ -40,14 +39,11 @@ public class ComboDialogWithMessage extends ComboInputDialog {
*/
private String warningMessage;
-
-
/**
* the warning icon
*/
private static final String ICON_WARNING = "/icons/warning.gif"; //$NON-NLS-1$
-
protected ComboDialogWithMessage(Shell parentShell, String title, String message, String initialValue, String[] elementsList, String warningMessage) {
super(parentShell, title, message, initialValue, elementsList);
this.warningMessage = warningMessage;
@@ -76,7 +72,6 @@ public class ComboDialogWithMessage extends ComboInputDialog {
return composite;
}
-
/**
* Set the warning message
*
@@ -100,7 +95,6 @@ public class ComboDialogWithMessage extends ComboInputDialog {
}
}
-
/**
* Returns the style bits that should be used for the input text field.
* Defaults to a single line entry. Subclasses may override.
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/ComboInputDialog.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/ComboInputDialog.java
index 82ad9890a05..39e22286cf8 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/ComboInputDialog.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/ComboInputDialog.java
@@ -20,7 +20,6 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
-
/**
* this class allows to have a list to choose one element!
*
@@ -52,7 +51,6 @@ public class ComboInputDialog extends InputDialog {
this.elementsList = elementsList;
}
-
/**
* Ok pressed.
*/
@@ -63,7 +61,6 @@ public class ComboInputDialog extends InputDialog {
super.okPressed();
}
-
/**
*
* @see org.eclipse.papyrus.diagram.common.ui.dialogs.InputDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
@@ -74,13 +71,15 @@ public class ComboInputDialog extends InputDialog {
@Override
protected Control createDialogArea(Composite parent) {
Composite comp = (Composite)super.createDialogArea(parent);
- combo = new Combo(comp, SWT.READ_ONLY);//with READ_ONLY, we can't edit the selection!
+ combo = new Combo(comp, SWT.READ_ONLY);// with READ_ONLY, we can't edit
+ // the selection!
if(elementsList == null) {
combo.setItems(new String[]{ "" }); //$NON-NLS-1$
} else {
combo.setItems(elementsList);
}
- //the width of the list depends of the windows size and note of the element from elementsList
+ // the width of the list depends of the windows size and note of the
+ // element from elementsList
GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER);
combo.setLayoutData(data);
return comp;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/InputDialog.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/InputDialog.java
index 1a996f6b315..dfadba0960a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/InputDialog.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/InputDialog.java
@@ -22,7 +22,6 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
-
/**
* This class provides a Window with :
* <ul>
@@ -34,7 +33,6 @@ import org.eclipse.swt.widgets.Shell;
*/
public class InputDialog extends Dialog {
-
/** The title of the dialog. */
private final String title;
@@ -43,13 +41,10 @@ public class InputDialog extends Dialog {
private final String message;
-
-
/** The initial value. */
protected String initialValue = ""; //$NON-NLS-1$
-
private String value = ""; //$NON-NLS-1$
/**
@@ -69,9 +64,6 @@ public class InputDialog extends Dialog {
}
}
-
-
-
/**
* Gets the value.
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/InputDialogMessage.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/InputDialogMessage.java
index e59a59ec901..2b0b6b9f2d3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/InputDialogMessage.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/InputDialogMessage.java
@@ -26,7 +26,6 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-
/**
* This class provides a text area, with a validator to edit a text
*/
@@ -39,7 +38,6 @@ public class InputDialogMessage extends InputDialog {
private Text text;
-
/** Error message label widget. */
private CLabel warningMessageText;
@@ -47,7 +45,6 @@ public class InputDialogMessage extends InputDialog {
private String warningMessage;
-
/** Input Validator, can be null */
private final IInputValidator validator;
@@ -61,7 +58,6 @@ public class InputDialogMessage extends InputDialog {
this.validator = validator;
}
-
/**
*
* @see org.eclipse.jface.dialogs.Dialog#okPressed()
@@ -171,15 +167,13 @@ public class InputDialogMessage extends InputDialog {
// button creation.
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=113643
-
- // Control button = getButton(IDialogConstants.OK_ID);
- // if(button != null) {
- // button.setEnabled(errorMessage == null);
- // }
+ // Control button = getButton(IDialogConstants.OK_ID);
+ // if(button != null) {
+ // button.setEnabled(errorMessage == null);
+ // }
}
}
-
/**
* Returns the style bits that should be used for the input text field.
* Defaults to a single line entry. Subclasses may override.
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/PropertyEditors.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/PropertyEditors.java
index feca25d1a6c..b4e8cb77d64 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/PropertyEditors.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/dialogs/PropertyEditors.java
@@ -33,7 +33,6 @@ import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Stereotype;
import org.eclipse.uml2.uml.Type;
-
/**
* this class provides editor for different types of properties
*/
@@ -96,10 +95,8 @@ public class PropertyEditors {
/** the UML elements who aren't NamedElement */
static String unNamedElements[] = new String[]{ "ActivityGroup", "Clause", "Comment", "ExceptionHandler", "Image", "LinkEndData", "MultiplicityElement", "ParameterableElement", "QualifierValue", "Relationship", "Slot", "TemplateableElement", "TemplateParameter", "TemplateParameterSubstitution", "TemplateableParameterSubsitution", }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$ //$NON-NLS-13$ //$NON-NLS-14$ //$NON-NLS-15$
-
-
- //TODO : we doesn't know edit a property if the initial value is a property
- //need implements this functionality is editors
+ // TODO : we doesn't know edit a property if the initial value is a property
+ // need implements this functionality is editors
/**
* Editor for the Type Integer.
*
@@ -131,8 +128,7 @@ public class PropertyEditors {
* (the property to edit)
* @param oldValue
* (can be null)
- * @return
- * the inital value for the property
+ * @return the inital value for the property
*/
private static String findInitialValue(Property property, Object oldValue) {
String initialValue = null;
@@ -144,7 +140,6 @@ public class PropertyEditors {
return initialValue;
}
-
/**
* Editor for the Type UnlimitedNatural.
*
@@ -212,7 +207,7 @@ public class PropertyEditors {
public static String DataTypeEditor(Property property, Object oldValue) {
String value = null;
String initialValue = null;
- if(oldValue != null) { //we are modifying an existing value
+ if(oldValue != null) { // we are modifying an existing value
initialValue = oldValue.toString();
} else if(property.isSetDefault()) {
initialValue = property.getDefault();
@@ -282,7 +277,6 @@ public class PropertyEditors {
String value = null;
String[] listOfChoice;
-
if(property.getLower() > 0) {
listOfChoice = new String[literals.size()];
for(int i = 0; i < listOfChoice.length; i++) {
@@ -316,13 +310,11 @@ public class PropertyEditors {
* @return
*/
public static String CompositeClassEditor(Property property, Object oldValue) {
- //TODO
- //we cannot do it!
+ // TODO
+ // we cannot do it!
return oldValue.toString();
}
-
-
/**
* Editor for the type DataType
*
@@ -352,11 +344,12 @@ public class PropertyEditors {
if((stereotypedElement.get(i)) instanceof NamedElement) {
proposals[i] = ((NamedElement)stereotypedElement.get(i)).getQualifiedName();
} else {
- //TODO need a solution!
- // String label = ((Element)stereotypedElement.get(i)).toString();
- // proposals[i + 1] = label;
- // //we don't obtain the ID from the XMI!
- // UML2Util.getXMIIdentifier((InternalEObject)(((Element)stereotypedElement.get(i))));
+ // TODO need a solution!
+ // String label =
+ // ((Element)stereotypedElement.get(i)).toString();
+ // proposals[i + 1] = label;
+ // //we don't obtain the ID from the XMI!
+ // UML2Util.getXMIIdentifier((InternalEObject)(((Element)stereotypedElement.get(i))));
}
}
} else {
@@ -366,16 +359,16 @@ public class PropertyEditors {
if((stereotypedElement.get(i - 1)) instanceof NamedElement) {
proposals[i] = ((NamedElement)stereotypedElement.get(i - 1)).getQualifiedName();
} else {
- //TODO need a solution!
- // String label = ((Element)stereotypedElement.get(i)).toString();
- // proposals[i + 1] = label;
- // //we don't obtain the ID from the XMI!
- // UML2Util.getXMIIdentifier((InternalEObject)(((Element)stereotypedElement.get(i))));
+ // TODO need a solution!
+ // String label =
+ // ((Element)stereotypedElement.get(i)).toString();
+ // proposals[i + 1] = label;
+ // //we don't obtain the ID from the XMI!
+ // UML2Util.getXMIIdentifier((InternalEObject)(((Element)stereotypedElement.get(i))));
}
}
}
-
ComboDialogWithMessage dialog = new ComboDialogWithMessage(new Shell(), StereotypeEditor_Title, Choice, initialValue, proposals, StereotypeEditor_WarningMessage);
if(dialog.open() != ComboInputDialog.CANCEL) {
int selection = dialog.getIndexOfSelection();
@@ -402,14 +395,12 @@ public class PropertyEditors {
public static String MetaclassEditor(Property property, Object oldValue, List<Profile> appliedProfiles) {
/*
- * 1/ find the interesting elements
- * 2/ check if they are problematic
- * 3/ create the proposals
+ * 1/ find the interesting elements 2/ check if they are problematic 3/
+ * create the proposals
*/
Type type = property.getType();
String returnedValue = null;
-
ArrayList<String> problematicMetaclasses = new ArrayList<String>(Arrays.asList(unNamedElements));
if(type != null && !problematicMetaclasses.contains(((org.eclipse.uml2.uml.Class)type).getName())) {
String[] proposals;
@@ -432,8 +423,6 @@ public class PropertyEditors {
metaclassElement.addAll(Util.getInstancesFilteredByType(profile, metaType, null));
}
-
-
/*
* we create the list of proposals
*/
@@ -445,10 +434,10 @@ public class PropertyEditors {
proposals[i + 1] = ((NamedElement)metaclassElement.get(i)).getQualifiedName();
} else {
- //TODO need a solution!
+ // TODO need a solution!
String label = ((Element)metaclassElement.get(i)).toString();
proposals[i + 1] = label;
- //we don't obtain the ID from the XMI!
+ // we don't obtain the ID from the XMI!
UML2Util.getXMIIdentifier((InternalEObject)(((Element)metaclassElement.get(i))));
}
}
@@ -459,10 +448,10 @@ public class PropertyEditors {
proposals[i] = ((NamedElement)metaclassElement.get(i)).getQualifiedName();
} else {
- //TODO need a solution!
+ // TODO need a solution!
String label = ((Element)metaclassElement.get(i)).toString();
proposals[i] = label;
- //We don't obtain the ID from the XMI
+ // We don't obtain the ID from the XMI
UML2Util.getXMIIdentifier((InternalEObject)(((Element)metaclassElement.get(i))));
}
@@ -494,16 +483,18 @@ public class PropertyEditors {
* @see org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String)
*
* @param newText
- * @return
- * null if the newText is valid
- * an error message when newText is invalid
+ * @return null if the newText is valid an error message when newText is
+ * invalid
*/
public String isValid(String newText) {
if(newText != null && newText != "") { //$NON-NLS-1$
for(int iter = 0; iter < newText.length(); iter++) {
if(!Character.isDigit(newText.charAt(iter))) {
if(iter == 0) {
- if((newText.charAt(iter) == '-')) { //the first character can be '-'
+ if((newText.charAt(iter) == '-')) { // the first
+ // character
+ // can be
+ // '-'
continue;
}
}
@@ -511,7 +502,7 @@ public class PropertyEditors {
}
}
}
- return null;//it's OK
+ return null;// it's OK
}
}
@@ -525,23 +516,25 @@ public class PropertyEditors {
* @see org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String)
*
* @param newText
- * @return
- * null if the newText is valid
- * an error message when newText is invalid
+ * @return null if the newText is valid an error message when newText is
+ * invalid
*/
public String isValid(String newText) {
if(newText != null && newText != "") { //$NON-NLS-1$
for(int iter = 0; iter < newText.length(); iter++) {
if(!Character.isDigit(newText.charAt(iter))) {
- if(newText.length() == 1 && newText.charAt(0) == '*') { //'*' means the infinity
+ if(newText.length() == 1 && newText.charAt(0) == '*') { // '*'
+ // means
+ // the
+ // infinity
break;
}
return UnlimitedNaturalValidator_WarningMessage;
}
}
}
- return null;//it's OK
+ return null;// it's OK
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/helper/HelpComponentFactory.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/helper/HelpComponentFactory.java
index cbdb8a2ae4c..79691c4a4ec 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/helper/HelpComponentFactory.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/helper/HelpComponentFactory.java
@@ -40,11 +40,11 @@ public class HelpComponentFactory {
}
/**
- * Creates help component that insert a new hyperlink icon to display additional help description
- * if tooltip is null, default value is "Help"
+ * Creates help component that insert a new hyperlink icon to display
+ * additional help description if tooltip is null, default value is "Help"
*
- * ParseTags parameter must be used if you want to define rich text content for the helpText.
- * For example use <form> tag to format your text
+ * ParseTags parameter must be used if you want to define rich text content
+ * for the helpText. For example use <form> tag to format your text
*
* @param parent
* the parent
@@ -82,11 +82,10 @@ public class HelpComponentFactory {
return helpImage;
}
-
/**
- * Creates a new HelpComponent object.
- * ParseTags parameter must be used if you want to define rich text content for the helpText.
- * For example use <form> tag to format your text
+ * Creates a new HelpComponent object. ParseTags parameter must be used if
+ * you want to define rich text content for the helpText. For example use
+ * <form> tag to format your text
*
* @param parent
* the parent
@@ -103,8 +102,8 @@ public class HelpComponentFactory {
}
/**
- * Creates a new HelpComponent object.
- * You must use method with parseTags parameter if you want to define rich text content for the helpText
+ * Creates a new HelpComponent object. You must use method with parseTags
+ * parameter if you want to define rich text content for the helpText
*
* @param parent
* the parent
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/helper/HelpDialog.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/helper/HelpDialog.java
index 40a73c27285..8f4f7d50833 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/helper/HelpDialog.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/helper/HelpDialog.java
@@ -27,7 +27,6 @@ import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.events.IHyperlinkListener;
import org.eclipse.ui.forms.widgets.FormText;
-
/**
* The Class HelpDialog.
*/
@@ -40,8 +39,8 @@ public class HelpDialog extends CustomPopupDialog {
private boolean parseTags;
/**
- * Instantiates a new help dialog.
- * You must use constructor with parseTags parameter if you want to define rich text content in your description
+ * Instantiates a new help dialog. You must use constructor with parseTags
+ * parameter if you want to define rich text content in your description
*
* @param parent
* the parent
@@ -59,9 +58,9 @@ public class HelpDialog extends CustomPopupDialog {
}
/**
- * Instantiates a new help dialog.
- * ParseTags parameter must be used if you want to define rich text content for the description.
- * For example use <form> tag to format your text
+ * Instantiates a new help dialog. ParseTags parameter must be used if you
+ * want to define rich text content for the description. For example use
+ * <form> tag to format your text
*
* @param parent
* the parent
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractEditHyperlinkDiagramShell.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractEditHyperlinkDiagramShell.java
index 906b170677c..f89d6538c44 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractEditHyperlinkDiagramShell.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractEditHyperlinkDiagramShell.java
@@ -27,9 +27,10 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
- * The Class AbstractEditHyperlinkDiagramShell. This Class has been generated from VisualEditor. Do
- * not modify it manually by adding behavior! you will lose the capacity to open with VE. So this
- * class is abstract and it contains set of getter in order to connect behavior in subclasses
+ * The Class AbstractEditHyperlinkDiagramShell. This Class has been generated
+ * from VisualEditor. Do not modify it manually by adding behavior! you will
+ * lose the capacity to open with VE. So this class is abstract and it contains
+ * set of getter in order to connect behavior in subclasses
*/
public class AbstractEditHyperlinkDiagramShell {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractEditHyperlinkDocumentShell.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractEditHyperlinkDocumentShell.java
index 7aec650fd9c..5c3cc771f9a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractEditHyperlinkDocumentShell.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractEditHyperlinkDocumentShell.java
@@ -28,9 +28,10 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
// TODO: Auto-generated Javadoc
/**
- * The Class AbstractEditHyperlinkDocumentShell. This Class has been generated from VisualEditor. Do
- * not modify it manually by adding behavior! you will lose the capacity to open with VE. So this
- * class is abstract and it contains set of getter in order to connect behavior in subclasses
+ * The Class AbstractEditHyperlinkDocumentShell. This Class has been generated
+ * from VisualEditor. Do not modify it manually by adding behavior! you will
+ * lose the capacity to open with VE. So this class is abstract and it contains
+ * set of getter in order to connect behavior in subclasses
*/
public class AbstractEditHyperlinkDocumentShell {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractEditHyperlinkShell.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractEditHyperlinkShell.java
index b6233c395ed..875d693df42 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractEditHyperlinkShell.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractEditHyperlinkShell.java
@@ -26,9 +26,10 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
/**
- * The Class EditHyperlinkShell. This Class has been generated from VisualEditor. Do not modify it
- * manually by adding behavior! you will lose the capacity to open with VE. So this class is
- * abstract and it contains set of getter in order to connect behavior in subclasses
+ * The Class EditHyperlinkShell. This Class has been generated from
+ * VisualEditor. Do not modify it manually by adding behavior! you will lose the
+ * capacity to open with VE. So this class is abstract and it contains set of
+ * getter in order to connect behavior in subclasses
*/
public abstract class AbstractEditHyperlinkShell {
@@ -89,7 +90,8 @@ public abstract class AbstractEditHyperlinkShell {
// this line has to be commented in order to open with VISUAL EDITOR
editHyperlinkShell = new Shell(PlatformUI.getWorkbench().getDisplay().getActiveShell());
- // editHyperlinkShell = new Shell(display, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
+ // editHyperlinkShell = new Shell(display, SWT.DIALOG_TRIM |
+ // SWT.APPLICATION_MODAL);
// editHyperlinkShell = new Shell();
editHyperlinkShell.setText("Edit Hyperlink");
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractLookForDiagramShell.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractLookForDiagramShell.java
index 10cc852840e..a983302f672 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractLookForDiagramShell.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/AbstractLookForDiagramShell.java
@@ -32,9 +32,10 @@ import org.eclipse.ui.dialogs.PatternFilter;
// TODO: Auto-generated Javadoc
/**
- * The Class AbstractLookForDiagramShell. This Class has been generated from VisualEditor. Do not
- * modify it manually by adding behavior! you will lose the capacity to open with VE. So this class
- * is abstract and it contains set of getter in order to connect behavior in subclasses
+ * The Class AbstractLookForDiagramShell. This Class has been generated from
+ * VisualEditor. Do not modify it manually by adding behavior! you will lose the
+ * capacity to open with VE. So this class is abstract and it contains set of
+ * getter in order to connect behavior in subclasses
*/
public class AbstractLookForDiagramShell {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/CustomAdapterFactoryContentProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/CustomAdapterFactoryContentProvider.java
index e834fffb6a4..8dd4065fb6f 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/CustomAdapterFactoryContentProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/CustomAdapterFactoryContentProvider.java
@@ -24,7 +24,8 @@ import org.eclipse.papyrus.core.utils.EditorUtils;
import org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr;
/**
- * The Class CustomAdapterFactoryContentProvider to display uml element + attached diagrams
+ * The Class CustomAdapterFactoryContentProvider to display uml element +
+ * attached diagrams
*/
public class CustomAdapterFactoryContentProvider extends AdapterFactoryContentProvider {
@@ -82,8 +83,13 @@ public class CustomAdapterFactoryContentProvider extends AdapterFactoryContentPr
Object current = iter.next();
if(current instanceof Diagram) {
Diagram diag = (Diagram)current;
- //sometimes diag can loose the link to the element, so we need to test it.
- if(diag != null && diag.getElement() != null) {//if the model is a little corrupted, we can have diag==null
+ // sometimes diag can loose the link to the element, so we need
+ // to test it.
+ if(diag != null && diag.getElement() != null) {// if the model
+ // is a little
+ // corrupted, we
+ // can have
+ // diag==null
if(diag.getElement().equals(object)) {
result.add(diag);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/DownElementListener.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/DownElementListener.java
index 06f53c4cfba..156560ed40e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/DownElementListener.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/DownElementListener.java
@@ -22,9 +22,10 @@ import org.eclipse.swt.events.MouseListener;
// TODO: Auto-generated Javadoc
/**
- * The listener interface for receiving downElement events. The class that is interested in
- * processing a downElement event implements this interface, and the object created with that class
- * is registered with a component using the component's <code>addDownElementListener<code> method. When
+ * The listener interface for receiving downElement events. The class that is
+ * interested in processing a downElement event implements this interface, and
+ * the object created with that class is registered with a component using the
+ * component's <code>addDownElementListener<code> method. When
* the downElement event occurs, that object's appropriate
* method is invoked.
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/EditorHyperlinkDiagramShell.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/EditorHyperlinkDiagramShell.java
index fb31b9f8081..0a3d2f98d32 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/EditorHyperlinkDiagramShell.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/EditorHyperlinkDiagramShell.java
@@ -145,7 +145,8 @@ public class EditorHyperlinkDiagramShell extends AbstractEditHyperlinkDocumentSh
if(hyperLinkDiagram != null) {
hyperLinkDiagram.setTooltipText(getTooltipInputText().getText().trim());
- // if diagram is null, maybe bad selection or other it return null!
+ // if diagram is null, maybe bad selection or other it
+ // return null!
if(hyperLinkDiagram.getDiagram() == null) {
hyperLinkDiagram = null;
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/EditorHyperlinkWebShell.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/EditorHyperlinkWebShell.java
index ea236237e97..9ce4cdc51cf 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/EditorHyperlinkWebShell.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/EditorHyperlinkWebShell.java
@@ -20,8 +20,8 @@ import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.widgets.Display;
/**
- * The Class HyperlinkWebEditor is used to add or modify an hyperlink web entry. you can use the
- * default button for the tooltip.
+ * The Class HyperlinkWebEditor is used to add or modify an hyperlink web entry.
+ * you can use the default button for the tooltip.
*/
public class EditorHyperlinkWebShell extends AbstractEditHyperlinkShell {
@@ -128,7 +128,8 @@ public class EditorHyperlinkWebShell extends AbstractEditHyperlinkShell {
}
});
- // add a key listener on inputText to synchronize with the tooltip in the case of use
+ // add a key listener on inputText to synchronize with the tooltip in
+ // the case of use
// default
getObjectLabeltext().addKeyListener(new KeyListener() {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/EditorLookForDiagram.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/EditorLookForDiagram.java
index c98d28638e2..4af0964ce85 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/EditorLookForDiagram.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/EditorLookForDiagram.java
@@ -102,9 +102,10 @@ public class EditorLookForDiagram extends AbstractLookForDiagramShell {
protected TreeViewer treeViewer;
/**
- * The listener interface for receiving diagramCreate events. The class that is interested in
- * processing a diagramCreate event implements this interface, and the object created with that
- * class is registered with a component using the component's <code>addDiagramCreateListener<code> method. When
+ * The listener interface for receiving diagramCreate events. The class that
+ * is interested in processing a diagramCreate event implements this
+ * interface, and the object created with that class is registered with a
+ * component using the component's <code>addDiagramCreateListener<code> method. When
* the diagramCreate event occurs, that object's appropriate
* method is invoked.
*
@@ -311,13 +312,29 @@ public class EditorLookForDiagram extends AbstractLookForDiagramShell {
List<Object> res = new ArrayList<Object>();
for(Object current : result) {
- if(current != null && current instanceof Diagram) { //if the model is a little bit corrupted, we can have a null element in the list
+ if(current != null && current instanceof Diagram) { // if
+ // the
+ // model
+ // is
+ // a
+ // little
+ // bit
+ // corrupted,
+ // we
+ // can
+ // have
+ // a
+ // null
+ // element
+ // in
+ // the
+ // list
res.add(current);
}
}
return res.toArray();
- // return result;
+ // return result;
} catch (Exception e) {
}
return null;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/HyperLinkContentProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/HyperLinkContentProvider.java
index 257075a2aa6..2033d1f0914 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/HyperLinkContentProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/HyperLinkContentProvider.java
@@ -18,10 +18,8 @@ import java.util.ArrayList;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;
-
/**
- * The Class HyperlinkContentProvider
- * the input has to be a collection.
+ * The Class HyperlinkContentProvider the input has to be a collection.
*/
public class HyperLinkContentProvider implements IStructuredContentProvider {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/HyperLinkDiagram.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/HyperLinkDiagram.java
index 4723b8f273b..14fbcc11c76 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/HyperLinkDiagram.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/HyperLinkDiagram.java
@@ -20,6 +20,7 @@ import org.eclipse.papyrus.core.editor.IMultiDiagramEditor;
import org.eclipse.papyrus.core.editorsfactory.IPageIconsRegistry;
import org.eclipse.papyrus.core.services.ServiceException;
import org.eclipse.papyrus.core.utils.EditorUtils;
+import org.eclipse.papyrus.core.utils.OpenDiagramCommand;
import org.eclipse.papyrus.core.utils.ServiceUtils;
import org.eclipse.papyrus.sasheditor.contentprovider.IPageMngr;
import org.eclipse.uml2.uml.Package;
@@ -27,6 +28,7 @@ import org.eclipse.uml2.uml.Package;
/**
* The Class HyperLinkDiagram a container of diagram
*/
+@SuppressWarnings("deprecation")
public class HyperLinkDiagram extends HyperlinkObject {
/**
@@ -59,16 +61,13 @@ public class HyperLinkDiagram extends HyperlinkObject {
IMultiDiagramEditor papyrusEditor=EditorUtils.getMultiDiagramEditor();
IPageMngr pageMngr=null;
try {
- pageMngr = ServiceUtils.getInstance().getIPageMngr(papyrusEditor.getServicesRegistry());
- } catch (ServiceException e) {
+ OpenDiagramCommand openCommand = new OpenDiagramCommand(ServiceUtils.getInstance().getTransactionalEditingDomain(papyrusEditor.getServicesRegistry()), getDiagram());
+ if(openCommand.canExecute()) {
+ openCommand.execute(null, null);
+ }
+ } catch (Exception e) {
e.printStackTrace();
}
- // better to set focus on existing page than close and
- // open
- if(pageMngr.isOpen(this.getDiagram())) {
- pageMngr.closePage(this.getDiagram());
- }
- pageMngr.openPage((this.getDiagram()));
}
/**
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/HyperLinkLabelProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/HyperLinkLabelProvider.java
index 8b911cea8a2..474bba9d463 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/HyperLinkLabelProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/ui/hyperlinkshell/HyperLinkLabelProvider.java
@@ -19,7 +19,6 @@ import org.eclipse.papyrus.core.editorsfactory.IPageIconsRegistry;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
-
/**
* The Class DocumentLabelProvider.
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ColorManager.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ColorManager.java
index 020df4a3046..2ece45cbefd 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ColorManager.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ColorManager.java
@@ -20,8 +20,9 @@ import org.eclipse.swt.graphics.RGB;
* @author Patrick Tessier
* @since 20 sept. 06
*
- * this aclass manage all colors of Papyrus. It is forbidden in this application to create a
- * color. SymbolicName is "R"_"G"_"B" where "R" "G" "B" are string that represent color (int)
+ * this aclass manage all colors of Papyrus. It is forbidden in this
+ * application to create a color. SymbolicName is "R"_"G"_"B" where "R"
+ * "G" "B" are string that represent color (int)
*/
public class ColorManager extends ColorRegistry {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CompartmentTitleRepresentation.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CompartmentTitleRepresentation.java
index 6cafb9bb54b..e6df0572325 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CompartmentTitleRepresentation.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CompartmentTitleRepresentation.java
@@ -17,7 +17,8 @@ import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.notation.View;
/**
- * This class allows to represent the title of a compartment in a the Show/Hide Compartment Action
+ * This class allows to represent the title of a compartment in a the Show/Hide
+ * Compartment Action
*
*
*
@@ -50,8 +51,8 @@ public class CompartmentTitleRepresentation {
/**
*
- * @return
- * <code>true</code> if the title of the compartment is displayed and <code>false</code> if not
+ * @return <code>true</code> if the title of the compartment is displayed
+ * and <code>false</code> if not
*/
public boolean isTitleVisible() {
return CompartmentUtils.isCompartmentTitleVisible(view);
@@ -59,8 +60,7 @@ public class CompartmentTitleRepresentation {
/**
*
- * @return
- * the real object represented by this class
+ * @return the real object represented by this class
*/
public Object getRealObject() {
return view;
@@ -68,8 +68,7 @@ public class CompartmentTitleRepresentation {
/**
*
- * @return
- * the parent editpart
+ * @return the parent editpart
*/
public EditPart getParent() {
return this.parent;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CompartmentUtils.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CompartmentUtils.java
index 1f226eff4b1..3877e9802c1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CompartmentUtils.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CompartmentUtils.java
@@ -47,8 +47,7 @@ public class CompartmentUtils {
* an editpart
* @param includeTitleCompartment
* if <code>true</code> we return the title compartment too
- * @return
- * all compartments of the EditPart
+ * @return all compartments of the EditPart
*/
public static List<View> getAllCompartments(EditPart editpart, boolean includeTitleCompartment) {
List<View> compartments = new ArrayList<View>();
@@ -89,8 +88,7 @@ public class CompartmentUtils {
* an editpart
* @param includeTitleCompartment
* if <code>true</code> we return the title compartment too
- * @return
- * all the displayed compartments for the EditPart
+ * @return all the displayed compartments for the EditPart
*/
public static List<View> getAllVisibleCompartments(EditPart editpart, boolean includeTitleCompartment) {
List<View> visibleCompartments = new ArrayList<View>();
@@ -116,8 +114,7 @@ public class CompartmentUtils {
* the editpart
* @param view
* a view of this editpart
- * @return
- * <code>true</code> if this view is compartment name
+ * @return <code>true</code> if this view is compartment name
*/
public static boolean isCompartmentName(EditPart editpart, View view) {
IGraphicalEditPart gep = EditPartService.getInstance().createGraphicEditPart(view);
@@ -131,8 +128,8 @@ public class CompartmentUtils {
*
* @param editpart
* an editpart
- * @return
- * A list of {@link CompartmentTitleRepresentation} which represents the visible titles of the compartments of the editpart
+ * @return A list of {@link CompartmentTitleRepresentation} which represents
+ * the visible titles of the compartments of the editpart
*/
public static List<CompartmentTitleRepresentation> getAllVisibleCompartmentName(EditPart editpart) {
List<View> allCompartments = getAllCompartments(editpart, false);
@@ -149,8 +146,7 @@ public class CompartmentUtils {
*
* @param compartmentView
* a view of a compartment
- * @return
- * <code>true</code> if the title of the compartment is visible
+ * @return <code>true</code> if the title of the compartment is visible
*/
public static boolean isCompartmentTitleVisible(View compartmentView) {
TitleStyle style = (TitleStyle)compartmentView.getStyle(NotationPackage.eINSTANCE.getTitleStyle());
@@ -166,8 +162,8 @@ public class CompartmentUtils {
* a list of {@link CompartmentTitleRepresentation}
* @param view
* a view
- * @return
- * the {@link CompartmentTitleRepresentation} which represents the view or <code>null</code> if not found
+ * @return the {@link CompartmentTitleRepresentation} which represents the
+ * view or <code>null</code> if not found
*/
public static CompartmentTitleRepresentation getCompartmentTitleRepresentation(List<CompartmentTitleRepresentation> representations, View view) {
for(CompartmentTitleRepresentation current : representations) {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CrossReferencerUtil.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CrossReferencerUtil.java
index a9a542b21b4..02446e54051 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CrossReferencerUtil.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CrossReferencerUtil.java
@@ -30,8 +30,7 @@ public class CrossReferencerUtil {
*
* @param element
* the {@link EObject} element
- * @return
- * the {@link CrossReferenceAdapter} corresponding to element
+ * @return the {@link CrossReferenceAdapter} corresponding to element
*/
public static CrossReferenceAdapter getCrossReferenceAdapter(EObject element) {
@@ -54,7 +53,8 @@ public class CrossReferencerUtil {
*
* @param referencedObject
* @param diagramType
- * type of diagram containing the list of {@link View} (may be null)
+ * type of diagram containing the list of {@link View} (may be
+ * null)
* @return the list of {@link View} referencing the referencedObject
*/
public static Set<View> getCrossReferencingViews(EObject referencedObject, String diagramType) {
@@ -69,9 +69,11 @@ public class CrossReferencerUtil {
while(views.hasNext()) {
View view = (View)views.next();
- if(diagramType != null) { // Filter to get only view from this kind of diagram
+ if(diagramType != null) { // Filter to get only view from this
+ // kind of diagram
- // Check if current view is owned by a diagram which type conforms to diagramType
+ // Check if current view is owned by a diagram which type
+ // conforms to diagramType
if(diagramType.equals(view.getDiagram().getType())) {
referencingObjects.add(view);
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/DiagramEditPartsUtil.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/DiagramEditPartsUtil.java
index acffbea121e..95c011ac189 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/DiagramEditPartsUtil.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/DiagramEditPartsUtil.java
@@ -54,13 +54,15 @@ public class DiagramEditPartsUtil {
public static final String DiagramsRelatedToElement = "es.cv.gvcase.mdt.uml2.diagram.common.DiagramsRelatedToElement";
/**
- * Gets a list of all GraphicalEditParts in the diagram of the given EditPart.
+ * Gets a list of all GraphicalEditParts in the diagram of the given
+ * EditPart.
*
* @param editPart
- * Any <code>EditPart</code> in the diagram. The TopGraphicalNode will be found from
- * this.
+ * Any <code>EditPart</code> in the diagram. The TopGraphicalNode
+ * will be found from this.
*
- * @return a list containing all <code>GraphicalEditPart</code> in the diagram.
+ * @return a list containing all <code>GraphicalEditPart</code> in the
+ * diagram.
*/
// @unused
public static List<IGraphicalEditPart> getAllEditParts(EditPart editPart) {
@@ -87,7 +89,8 @@ public class DiagramEditPartsUtil {
* @param editPart
* A non-null EditPart
*
- * @return The upper most EditPart in the hierarchy; may be the same EditPart
+ * @return The upper most EditPart in the hierarchy; may be the same
+ * EditPart
*/
public static EditPart getTopMostEditPart(EditPart editPart) {
@@ -281,7 +284,8 @@ public class DiagramEditPartsUtil {
}
/**
- * Update EditPart and all contained EditPart that share the same type of model element.
+ * Update EditPart and all contained EditPart that share the same type of
+ * model element.
*
* @param editPart
* the edit part
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/DiagramTester.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/DiagramTester.java
index ed15d469d2b..9541e5514cb 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/DiagramTester.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/DiagramTester.java
@@ -19,8 +19,8 @@ import org.eclipse.papyrus.diagram.common.part.UmlGmfDiagramEditor;
import org.eclipse.ui.IEditorPart;
/**
- * This class provides a Tester to know if the current diagram is the wanted diagram.
- * Test is done using {@link Diagram#getType()}
+ * This class provides a Tester to know if the current diagram is the wanted
+ * diagram. Test is done using {@link Diagram#getType()}
*
*
*
@@ -56,8 +56,7 @@ public class DiagramTester extends PropertyTester {
* the current editor
* @param expectedValue
* the expected value : the wanted diagram type
- * @return
- * <code>true</code> if the current diagram has the wanted type
+ * @return <code>true</code> if the current diagram has the wanted type
*/
protected boolean testDiagramType(IEditorPart iEditor, Object expectedValue) {
UmlGmfDiagramEditor editor = (UmlGmfDiagramEditor)iEditor.getAdapter(UmlGmfDiagramEditor.class);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/EcoreSwitch.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/EcoreSwitch.java
index 51f2bab3b6c..2246b00a803 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/EcoreSwitch.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/EcoreSwitch.java
@@ -38,7 +38,8 @@ public interface EcoreSwitch<T, I> {
void setInfo(I info);
/**
- * Performs the switch action. Extra necessary info is available via the getInfo() method.
+ * Performs the switch action. Extra necessary info is available via the
+ * getInfo() method.
*
* @param eObject
* the e object
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ExtensionPointParser.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ExtensionPointParser.java
index c853afbb2ad..2a1c9fd95a4 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ExtensionPointParser.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ExtensionPointParser.java
@@ -25,13 +25,14 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.papyrus.diagram.common.Activator;
/**
- * A basic simple IExtensionPoint parser. It parses an IExtensionPoint and stores values in
- * instances of the specified Classes specified. It uses java reflection to get the elements and
- * their attributes to parse. It can handle String, Boolean and Object attributes. It can handle any
- * IExtensionPoint as long as the proper Classes are provided. <br>
- * It needs the IExtensionPoint string ID. It needs an Array of Classes to create instances of that
- * kind. If the Classes are internal to another Class, an instance of the enclosing Class is
- * required. <br>
+ * A basic simple IExtensionPoint parser. It parses an IExtensionPoint and
+ * stores values in instances of the specified Classes specified. It uses java
+ * reflection to get the elements and their attributes to parse. It can handle
+ * String, Boolean and Object attributes. It can handle any IExtensionPoint as
+ * long as the proper Classes are provided. <br>
+ * It needs the IExtensionPoint string ID. It needs an Array of Classes to
+ * create instances of that kind. If the Classes are internal to another Class,
+ * an instance of the enclosing Class is required. <br>
* The Classes provided must follow these rules:
* <ul>
* <li>Each Class simple name must be equal to one of the elements defined in the IExtensionPoint to be parsed.</li>
@@ -111,9 +112,10 @@ public class ExtensionPointParser {
}
/**
- * Parses the <IExtensionPoint> specified in the constructor. Returns a <List> of <Object>
- * instances created from the <Class>es provided in the constructor. Fields with null value in
- * the returned <Object>s have not been initialized, as those values were not specified in the
+ * Parses the <IExtensionPoint> specified in the constructor. Returns a
+ * <List> of <Object> instances created from the <Class>es provided in the
+ * constructor. Fields with null value in the returned <Object>s have not
+ * been initialized, as those values were not specified in the
* <IExtensionPoint>.
*
* @return
@@ -145,7 +147,8 @@ public class ExtensionPointParser {
}
/**
- * Parse an <IConfigurationElement>, including its attributes and its children elements,
+ * Parse an <IConfigurationElement>, including its attributes and its
+ * children elements,
*
* @param element
* @return
@@ -246,7 +249,8 @@ public class ExtensionPointParser {
}
/**
- * Adds children instances to the proper <List> attribute of the instance parent.
+ * Adds children instances to the proper <List> attribute of the instance
+ * parent.
*
* @param instance
* @param children
@@ -275,9 +279,10 @@ public class ExtensionPointParser {
}
/**
- * Creates an instance of an <Object> searching for the matching <Class> by simple name. The
- * list of <Class>es to be used are provided in the constructor. Internal <Class>es must also
- * provide an enclosing instance in the constructor.
+ * Creates an instance of an <Object> searching for the matching <Class> by
+ * simple name. The list of <Class>es to be used are provided in the
+ * constructor. Internal <Class>es must also provide an enclosing instance
+ * in the constructor.
*
* @param element
* @return
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/FontManager.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/FontManager.java
index 2ec79b5b74e..7a92dbb1a1e 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/FontManager.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/FontManager.java
@@ -23,8 +23,8 @@ import org.eclipse.swt.graphics.FontData;
* @author Patrick Tessier
* @since 21 sept. 06
*
- * this class is a singletion to manage font in the papyrus Application. It is forbidden to
- * create a new font without use this class.
+ * this class is a singletion to manage font in the papyrus Application.
+ * It is forbidden to create a new font without use this class.
*/
public class FontManager extends FontRegistry {
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/MDTUtil.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/MDTUtil.java
index 744ccdf06a0..792ced475ac 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/MDTUtil.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/MDTUtil.java
@@ -90,7 +90,8 @@ public class MDTUtil {
public static String EDITOR_VERSION = "org.eclipse.papyrus.diagram.common.Editor";
/**
- * Add to a diagram the version of the first editor that will modify the diagram.
+ * Add to a diagram the version of the first editor that will modify the
+ * diagram.
*
* @param diagram
* the diagram
@@ -124,8 +125,8 @@ public class MDTUtil {
*
* @return the diagram version
*
- * @author <a href="mailto:gmerin@prodevelop.es">Gabriel Merin</a> The version of the first
- * editor that modified the diagram
+ * @author <a href="mailto:gmerin@prodevelop.es">Gabriel Merin</a> The
+ * version of the first editor that modified the diagram
*/
// @unused
public static String getDiagramVersion(Diagram diagram) {
@@ -145,7 +146,8 @@ public class MDTUtil {
*
* @return the editor version
*
- * @author <a href="mailto:gmerin@prodevelop.es">Gabriel Merin</a> The version of the editor
+ * @author <a href="mailto:gmerin@prodevelop.es">Gabriel Merin</a> The
+ * version of the editor
*/
// @unused
public static String getEditorVersion(IEditorPart editor) {
@@ -350,8 +352,8 @@ public class MDTUtil {
}
/**
- * Gets a Diagram from the Request looking for it in the extended data with key
- * <MultiDiagramUtil.BelongToDiagramSource>
+ * Gets a Diagram from the Request looking for it in the extended data with
+ * key <MultiDiagramUtil.BelongToDiagramSource>
*
* @param request
* @return
@@ -764,10 +766,10 @@ public class MDTUtil {
}
/**
- * Gets or builds a valid CachedResourcesEditorInput for a given URI. The given URI must point
- * to a valid GMFResource. <br>
- * This URI can have a fragment defined. If the fragment does not point to a valid Diagram, the
- * first Diagram of the Resource is returned as input.
+ * Gets or builds a valid CachedResourcesEditorInput for a given URI. The
+ * given URI must point to a valid GMFResource. <br>
+ * This URI can have a fragment defined. If the fragment does not point to a
+ * valid Diagram, the first Diagram of the Resource is returned as input.
*
* @param editorInput
* @param editorID
@@ -793,7 +795,8 @@ public class MDTUtil {
}
/**
- * Tries to get the given Diagram in URI. If not, it will get the first Diagram.
+ * Tries to get the given Diagram in URI. If not, it will get the first
+ * Diagram.
*
* @param resourceSet
* @param editorInput
@@ -885,7 +888,8 @@ public class MDTUtil {
}
/**
- * Looks in the class hierarchy for a Class or Interface with qualified name className.
+ * Looks in the class hierarchy for a Class or Interface with qualified name
+ * className.
*
* @param clazz
* @param className
@@ -962,8 +966,8 @@ public class MDTUtil {
* @param eObject
* <EObject> to begin the search
* @param gmfResource
- * <GMFResource> to look for <Diagram>s. If null, a <GMFResource> will be looked up
- * in the <EObject>'s <ResourceSet>, if any.
+ * <GMFResource> to look for <Diagram>s. If null, a <GMFResource>
+ * will be looked up in the <EObject>'s <ResourceSet>, if any.
*
* @return the diagrams in hierarchy
*/
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/MultiDiagramUtil.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/MultiDiagramUtil.java
index a37aa654761..47ecb00c1b1 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/MultiDiagramUtil.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/MultiDiagramUtil.java
@@ -85,7 +85,8 @@ public class MultiDiagramUtil {
public static final String DiagramsRelatedToElement = "es.cv.gvcase.mdt.uml2.diagram.common.DiagramsRelatedToElement";
/**
- * EAnnotation Source for diagrams that open the correct Upper Diagram <View>.
+ * EAnnotation Source for diagrams that open the correct Upper Diagram
+ * <View>.
*/
public static final String UpperDiagram = "es.cv.gvcase.mdt.diagram.common.UpperDiagram";
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/PathsUtil.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/PathsUtil.java
index 6abadccf89b..c0bd3e010b3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/PathsUtil.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/PathsUtil.java
@@ -228,7 +228,8 @@ public class PathsUtil {
}
/**
- * Gets the relative workspace from editor input. Does not remove <URI>'s fragments.
+ * Gets the relative workspace from editor input. Does not remove <URI>'s
+ * fragments.
*
* @param input
* the input
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ServiceUtilsForGMF.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ServiceUtilsForGMF.java
index ba636df0602..5063d432902 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ServiceUtilsForGMF.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ServiceUtilsForGMF.java
@@ -23,10 +23,9 @@ import org.eclipse.papyrus.core.utils.AbstractServiceUtils;
import org.eclipse.papyrus.diagram.common.part.UmlGmfDiagramEditor;
import org.eclipse.ui.IWorkbenchPart;
-
/**
- * Set of utility methods for accessing core Services.
- * This methods are designed to be used from code from Papyrus GMF diagrams.
+ * Set of utility methods for accessing core Services. This methods are designed
+ * to be used from code from Papyrus GMF diagrams.
*
*
* @author cedric dumoulin
@@ -48,8 +47,9 @@ public class ServiceUtilsForGMF extends AbstractServiceUtils<IDiagramEditDomain>
/**
* Get the {@link ServicesRegistry} from an {@link IDiagramEditDomain}.
* Throw an exception if the ServiceRegistry can't be found. <br>
- * This method get the ServiceRegistry from the IDiagramEditDomain associated to an GMF EditPart.
- * This IDiagramEditDomain can be obtained by calling:
+ * This method get the ServiceRegistry from the IDiagramEditDomain
+ * associated to an GMF EditPart. This IDiagramEditDomain can be obtained by
+ * calling:
* <ul>
* <li>from EditParts - editpart.getDiagramEditDomain()</li>
* <li>from EditPolicies - policy.getHost().getDiagramEditDomain()</li>
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/StringComparator.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/StringComparator.java
index 40ab8db1490..f0bb3c56f5b 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/StringComparator.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/StringComparator.java
@@ -69,5 +69,4 @@ public class StringComparator implements Comparator<String> {
return o1.toLowerCase().compareTo(o2.toLowerCase());
}
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/Util.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/Util.java
index c04b49ba289..6bee17e86e7 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/Util.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/Util.java
@@ -70,9 +70,8 @@ public class Util {
}
/**
- * Retrieve an arraylist of all instances in the model that
- * are instances of the java.lang.Class metaType or with a
- * stereotype applied
+ * Retrieve an arraylist of all instances in the model that are instances of
+ * the java.lang.Class metaType or with a stereotype applied
*
* @param metaType
* selected classes
@@ -84,15 +83,16 @@ public class Util {
*/
public static ArrayList getInstancesFilteredByType(Package topPackage, Class metaType, Stereotype appliedStereotype) {
// retrieve parent element
- // Package topPackage = Util.topPackage(element);
- // Assert.isNotNull(topPackage, "Top package should not be null for element " + element);
+ // Package topPackage = Util.topPackage(element);
+ // Assert.isNotNull(topPackage,
+ // "Top package should not be null for element " + element);
Iterator iter = topPackage.eAllContents();
ArrayList filteredElements = new ArrayList();
while(iter.hasNext()) {
Object currentElt = iter.next();
- // If currentElt is an ElementImport, it is replaced by the imported
+ // If currentElt is an ElementImport, it is replaced by the imported
// Element.
if(currentElt instanceof ElementImport) {
ElementImport elementImport = (ElementImport)currentElt;
@@ -172,7 +172,8 @@ public class Util {
}
/**
- * This method is used to look for the top package that contains this element.
+ * This method is used to look for the top package that contains this
+ * element.
*
* @param element
* the element for which top package must be returned
@@ -187,14 +188,16 @@ public class Util {
}
/**
- * This method is used to look for the nearest common parent of two elements.
+ * This method is used to look for the nearest common parent of two
+ * elements.
*
* @param element1
* the first element to find a parent
* @param element2
* the other element to find a parent
* @param parentClass
- * the class the common parent must be (otherwise, search in its parents)
+ * the class the common parent must be (otherwise, search in its
+ * parents)
* @return the common parent (not element1 or element2 themselves) or null
*/
@SuppressWarnings("unchecked")
@@ -305,12 +308,13 @@ public class Util {
* @param propertyValue
* : the value to find
* @param objectToEdit
- * @return the set of the element representing the value to apply to the property or <code>null</code>
+ * @return the set of the element representing the value to apply to the
+ * property or <code>null</code>
*
*/
public static Object retrievesMetaclassElementFromString(Property property, ArrayList<String> stringValues, org.eclipse.uml2.uml.Element packageContainer) {
- //the applied profiles
+ // the applied profiles
EList<Profile> profiles = ((org.eclipse.uml2.uml.Package)packageContainer).getAllAppliedProfiles();
ArrayList<Object> returnedValues = new ArrayList<Object>();
ArrayList<Object> metaclassElement = new ArrayList<Object>();
@@ -383,7 +387,7 @@ public class Util {
if(element instanceof NamedElement) {
if(((NamedElement)element).getQualifiedName().equals(valuesQualifiedName)) {
- //Like in AppliedStereotypePropertyEditor
+ // Like in AppliedStereotypePropertyEditor
EObject newValue = ((NamedElement)element).getStereotypeApplication((Stereotype)property.getType());
if(newValue == null) {
List<?> subStereotypes = ((NamedElement)element).getAppliedSubstereotypes((Stereotype)property.getType());
@@ -391,7 +395,7 @@ public class Util {
newValue = ((NamedElement)element).getStereotypeApplication((Stereotype)subStereotypes.get(0));
}
}
- //Like in StereotypeValueTreeObject
+ // Like in StereotypeValueTreeObject
if(newValue != null) {
returnedValues.add(newValue);
@@ -401,7 +405,7 @@ public class Util {
break;
}
} else {
- //TODO for the element which aren't NamedElement
+ // TODO for the element which aren't NamedElement
}
}
}
@@ -433,7 +437,7 @@ public class Util {
ArrayList<Object> returnedValues = new ArrayList<Object>();
- //we research the enumerationLiteral
+ // we research the enumerationLiteral
for(int i = 0; i < stringValues.size(); i++) {
Object obj = enume.getOwnedLiteral(stringValues.get(i));
returnedValues.add(obj);
@@ -452,8 +456,7 @@ public class Util {
*
* @param ep
* an editpart
- * @return
- * <ul>
+ * @return <ul>
* <li> <code>true</code> if the editpart is an Affixed Child Node</li>
* <li> <code>false</code>if not</li>
* </ul>
@@ -472,15 +475,15 @@ public class Util {
/**
*
- * Returns a {@link Set} owning all the level of super classes for the Classifier
- * With this method we don't have loop problems with {@link Generalization}
+ * Returns a {@link Set} owning all the level of super classes for the
+ * Classifier With this method we don't have loop problems with {@link Generalization}
*
* @param visitedClassifier
* the list of the visited Classifier (can be <code>null</code>)
* @param clazz
* the classifier to visit
- * @return
- * a {@link Set} owning all the level of super classes for the Classifier
+ * @return a {@link Set} owning all the level of super classes for the
+ * Classifier
*/
public static Set<Classifier> getAllSuperClasses(Set<Classifier> visitedClassifier, Classifier clazz) {
Assert.isNotNull(clazz);
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ViewServiceUtil.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ViewServiceUtil.java
index 00217267d79..2ef695166dc 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ViewServiceUtil.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/ViewServiceUtil.java
@@ -24,15 +24,15 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
import org.eclipse.ui.IEditorPart;
-
/**
- * This class provides method to force the load of the view service
- * see bug 302555
+ * This class provides method to force the load of the view service see bug
+ * 302555
*/
public class ViewServiceUtil {
/**
- * To load a service, we build a dummy command and we test if it can be executed
+ * To load a service, we build a dummy command and we test if it can be
+ * executed
*
*/
public static void forceLoad() {
@@ -44,12 +44,13 @@ public class ViewServiceUtil {
String diagramSemanticHint = diagram.getType();
DiagramEditPart host = ((PapyrusMultiDiagramEditor)activeEditor).getDiagramEditPart();
- //When we don't have the semanticHint, the command can't be executed, if the ViewService is not started
- //The goal of this class is to launch the view service
+ // When we don't have the semanticHint, the command can't be
+ // executed, if the ViewService is not started
+ // The goal of this class is to launch the view service
ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(diagram), Diagram.class, diagramSemanticHint, ViewUtil.APPEND, false, ((IGraphicalEditPart)host).getDiagramPreferencesHint());
CreateCommand dummyCommand = new CreateCommand(((IGraphicalEditPart)host).getEditingDomain(), descriptor, ((View)host.getModel()));
- //this action force the load of the ViewService
+ // this action force the load of the ViewService
dummyCommand.canExecute();
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/Visitor.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/Visitor.java
index 05ca6c4dbe6..f1a40cd14c9 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/Visitor.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/Visitor.java
@@ -47,8 +47,7 @@ public class Visitor {
*
* @param visited
* the visited namespace
- * @return
- * the owned and imported {@link Type} imported namespace
+ * @return the owned and imported {@link Type} imported namespace
*/
public static List<Element> getOwnedAndImportedElement(Namespace visited, Class<?> wantedClass) {
List<Element> visibleElements = new ArrayList<Element>();
@@ -77,8 +76,7 @@ public class Visitor {
*
* @param visited
* the visited namespace
- * @return
- * the imported {@link Namespace}
+ * @return the imported {@link Namespace}
*/
public static List<Namespace> getImportedNamespaces(Namespace visited) {
List<Namespace> namespaces = new ArrayList<Namespace>();
@@ -100,14 +98,13 @@ public class Visitor {
*
* @param visited
* the visited namespace
- * @return
- * the owned and imported {@link Namespace}
+ * @return the owned and imported {@link Namespace}
*/
public static List<Namespace> getOwnedAndImportedNamespaces(Namespace visited) {
List<Namespace> namespaces = new ArrayList<Namespace>();
// first retrieves imported namespaces
namespaces.addAll(getImportedNamespaces(visited));
- // then retrieves owned namespaces
+ // then retrieves owned namespaces
for(NamedElement n : visited.getOwnedMembers()) {
if(n instanceof Namespace)
namespaces.add((Namespace)n);

Back to the top