svn commit: r17753 - trunk/src: argouml-app/src/org/argouml/application/api argouml-app/src/org/argouml/application/events argouml-app/src/org/argouml/application/helpers argouml-app/src/org/argouml/cognitive/checklist/ui argouml-app/src/org/argouml/cognitive/critics/ui argouml-app/src/org/argouml/cognitive/ui argouml-app/src/org/argouml/gefext argouml-app/src/org/argouml/kernel argouml-app/src/org/argouml/moduleloader argouml-app/src/org/argouml/notation argouml-app/src/org/argouml/notation/providers argouml-app/src/org/argouml/notation/providers/java argouml-app/src/org/argouml/notation/providers/uml argouml-app/src/org/argouml/notation/ui argouml-app/src/org/argouml/pattern/cognitive/critics argouml-app/src/org/argouml/profile argouml-app/src/org/argouml/profile/init argouml-app/src/org/argouml/profile/internal argouml-app/src/org/argouml/profile/internal/ocl
Linus Tolke <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: linus
Date: 2010-01-11 11:49:55-0800
New Revision: 17753
Modified:
trunk/src/argouml-app/src/org/argouml/application/api/InitSubsystem.java (props changed)
trunk/src/argouml-app/src/org/argouml/application/events/ArgoDiagramAppearanceEvent.java (props changed)
trunk/src/argouml-app/src/org/argouml/application/events/ArgoDiagramAppearanceEventListener.java (props changed)
trunk/src/argouml-app/src/org/argouml/application/events/ArgoHelpEvent.java (props changed)
trunk/src/argouml-app/src/org/argouml/application/events/ArgoHelpEventListener.java (props changed)
trunk/src/argouml-app/src/org/argouml/application/events/ArgoProfileEvent.java (props changed)
trunk/src/argouml-app/src/org/argouml/application/events/ArgoProfileEventListener.java (props changed)
trunk/src/argouml-app/src/org/argouml/application/events/ArgoStatusEvent.java (props changed)
trunk/src/argouml-app/src/org/argouml/application/events/ArgoStatusEventListener.java (props changed)
trunk/src/argouml-app/src/org/argouml/application/helpers/ApplicationVersion.java (props changed)
trunk/src/argouml-app/src/org/argouml/cognitive/checklist/ui/InitCheckListUI.java (props changed)
trunk/src/argouml-app/src/org/argouml/cognitive/critics/ui/TableCritics.java (props changed)
trunk/src/argouml-app/src/org/argouml/cognitive/critics/ui/TableModelCritics.java (props changed)
trunk/src/argouml-app/src/org/argouml/cognitive/ui/AbstractGoList2.java (props changed)
trunk/src/argouml-app/src/org/argouml/cognitive/ui/ActionAutoCritique.java (props changed)
trunk/src/argouml-app/src/org/argouml/cognitive/ui/InitCognitiveUI.java (props changed)
trunk/src/argouml-app/src/org/argouml/gefext/ArgoFigCircle.java (props changed)
trunk/src/argouml-app/src/org/argouml/gefext/ArgoFigInk.java (props changed)
trunk/src/argouml-app/src/org/argouml/gefext/ArgoFigLine.java (props changed)
trunk/src/argouml-app/src/org/argouml/gefext/ArgoFigPoly.java (props changed)
trunk/src/argouml-app/src/org/argouml/gefext/ArgoFigRRect.java (props changed)
trunk/src/argouml-app/src/org/argouml/gefext/ArgoFigRect.java (props changed)
trunk/src/argouml-app/src/org/argouml/gefext/ArgoFigSpline.java (props changed)
trunk/src/argouml-app/src/org/argouml/gefext/ArgoModeCreateFigCircle.java (props changed)
trunk/src/argouml-app/src/org/argouml/gefext/ArgoModeCreateFigInk.java (props changed)
trunk/src/argouml-app/src/org/argouml/gefext/ArgoModeCreateFigLine.java (props changed)
trunk/src/argouml-app/src/org/argouml/gefext/ArgoModeCreateFigPoly.java (props changed)
trunk/src/argouml-app/src/org/argouml/gefext/ArgoModeCreateFigRRect.java (props changed)
trunk/src/argouml-app/src/org/argouml/gefext/ArgoModeCreateFigRect.java (props changed)
trunk/src/argouml-app/src/org/argouml/gefext/ArgoModeCreateFigSpline.java (props changed)
trunk/src/argouml-app/src/org/argouml/gefext/DeferredBufferedImage.java (props changed)
trunk/src/argouml-app/src/org/argouml/kernel/AbstractCommand.java (props changed)
trunk/src/argouml-app/src/org/argouml/kernel/Command.java (props changed)
trunk/src/argouml-app/src/org/argouml/kernel/DefaultUndoManager.java (props changed)
trunk/src/argouml-app/src/org/argouml/kernel/NonUndoableCommand.java (props changed)
trunk/src/argouml-app/src/org/argouml/kernel/ProfileConfiguration.java (props changed)
trunk/src/argouml-app/src/org/argouml/kernel/Project.java (props changed)
trunk/src/argouml-app/src/org/argouml/kernel/ProjectFactory.java (props changed)
trunk/src/argouml-app/src/org/argouml/kernel/UmlModelMutator.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/kernel/UndoManager.java (props changed)
trunk/src/argouml-app/src/org/argouml/moduleloader/DetailsTabProvider.java (props changed)
trunk/src/argouml-app/src/org/argouml/moduleloader/InitModuleLoader.java (props changed)
trunk/src/argouml-app/src/org/argouml/notation/InitNotation.java (props changed)
trunk/src/argouml-app/src/org/argouml/notation/NotationSettings.java (props changed)
trunk/src/argouml-app/src/org/argouml/notation/SDNotationSettings.java (props changed)
trunk/src/argouml-app/src/org/argouml/notation/providers/AssociationNameNotation.java (props changed)
trunk/src/argouml-app/src/org/argouml/notation/providers/EnumerationLiteralNotation.java (props changed)
trunk/src/argouml-app/src/org/argouml/notation/providers/MultiplicityNotation.java (props changed)
trunk/src/argouml-app/src/org/argouml/notation/providers/java/AssociationNameNotationJava.java (props changed)
trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AbstractMessageNotationUml.java (props changed)
trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AssociationNameNotationUml.java (props changed)
trunk/src/argouml-app/src/org/argouml/notation/providers/uml/EnumerationLiteralNotationUml.java (props changed)
trunk/src/argouml-app/src/org/argouml/notation/providers/uml/MultiplicityNotationUml.java (props changed)
trunk/src/argouml-app/src/org/argouml/notation/providers/uml/SDMessageNotationUml.java (props changed)
trunk/src/argouml-app/src/org/argouml/notation/ui/InitNotationUI.java (props changed)
trunk/src/argouml-app/src/org/argouml/pattern/cognitive/critics/InitPatternCritics.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/CoreProfileReference.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/DefaultTypeStrategy.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/FigNodeStrategy.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/FileModelLoader.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/FormatingStrategy.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/Profile.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/ProfileException.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/ProfileFacade.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/ProfileManager.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/ProfileModelLoader.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/ProfileReference.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/ReaderModelLoader.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/ResourceModelLoader.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/StreamModelLoader.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/URLModelLoader.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/UserDefinedProfile.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/UserDefinedProfileHelper.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/UserProfileReference.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/ZipModelLoader.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/init/InitProfileSubsystem.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/init/ProfileLoader.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/FormatingStrategyUML.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ModelUtils.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileManagerImpl.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileMeta.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ProfileUML.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/CompositeModelInterpreter.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/ComputeDesignMaterials.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/ComputeTriggers.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/ContextApplicable.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/CrOCL.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/DefaultOclEvaluator.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/EvaluateExpression.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/EvaluateInvariant.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/InvalidOclException.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/LambdaEvaluator.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/ModelInterpreter.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/OclExpressionEvaluator.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/OclInterpreter.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/uml14/Bag.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/uml14/CollectionsModelInterpreter.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/uml14/HashBag.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/uml14/ModelAccessModelInterpreter.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/uml14/OclAPIModelInterpreter.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/uml14/OclEnumLiteral.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/uml14/OclType.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ocl/uml14/Uml14ModelInterpreter.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ui/ProfilePropPanelFactory.java (props changed)
trunk/src/argouml-app/src/org/argouml/profile/internal/ui/PropPanelCritic.java (props changed)
trunk/src/argouml-app/src/org/argouml/swingext/GlassPane.java (props changed)
trunk/src/argouml-app/src/org/argouml/swingext/JLinkButton.java (props changed)
trunk/src/argouml-app/src/org/argouml/swingext/LeftArrowIcon.java (props changed)
trunk/src/argouml-app/src/org/argouml/swingext/UpArrowIcon.java (props changed)
trunk/src/argouml-app/src/org/argouml/taskmgmt/ProgressMonitor.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/ui/AbstractArgoJPanel.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/ui/ActionCreateContainedModelElement.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/ui/ActionCreateEdgeModelElement.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/ui/ActionRedo.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/ActionUndo.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/ArgoJFontChooser.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/ArgoStatusBar.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/ArgoToolbarManager.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/ChildGenSearch.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/ContextActionFactory.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/ui/ContextActionFactoryManager.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/ui/GUIProjectSettingsTabInterface.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/ui/HeapMonitor.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/HelpBox.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/HelpListener.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/MenuBar14.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/ui/MenuBar2.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/ui/MenuBarFactory.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/ui/ProjectActions.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/SettingsTabProfile.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/UndoableAction.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/cmd/ActionAdjustGrid.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/cmd/ActionAdjustPageBreaks.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/cmd/ActionAdjustSnap.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/cmd/ActionHelp.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/cmd/ActionNewProfile.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/cmd/ActionSelectAll.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/cmd/ActionSelectInvert.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/cmd/InitUiCmdSubsystem.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/cmd/ZoomActionProxy.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/explorer/ActionDeployProfile.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/explorer/ActionExportProfileXMI.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/explorer/ActionManageProfiles.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoCriticsToCritic.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoModelElementToTemplateParameter.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoPackageToElementImport.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoProfileConfigurationToProfile.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoProfileToModel.java (props changed)
trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoProjectToProfileConfiguration.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoProjectToRoots.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/GenCompositeClasses2.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/PredicateSearch.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/cognitive/ChildGenSearch.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/cognitive/critics/CrProfile.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/cognitive/critics/ProfileCodeGeneration.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/cognitive/critics/ProfileGoodPractices.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ArgoDiagram.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramAppearance.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramEdgeSettings.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramElement.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramElementSettings.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramFactoryInterface.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramFactoryInterface2.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramSettings.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramUndoManager.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramUtils.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/SequenceDiagram.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/ActionCreatePartition.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/ActivityDiagramPropPanelFactory.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/FigPool.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/InitActivityDiagram.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/activity/ui/ModePlacePartition.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/CollaborationDiagramPropPanelFactory.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/InitCollaborationDiagram.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigComponent.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigNode.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/DeploymentDiagramPropPanelFactory.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/InitDeploymentDiagram.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/InitSequenceDiagram.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/ModeContract.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/ModeExpand.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/SequenceDiagramPropPanelFactory.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/InitStateDiagram.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/StateDiagramPropPanelFactory.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/ClassDiagramPropPanelFactory.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigAttribute.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigClassifierBoxWithAttributes.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEnumerationLiteral.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigException.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigOperation.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigSignal.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/InitClassDiagram.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/SelectionException.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/SelectionGeneralizableElement.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/SelectionSignal.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddExistingNodes.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddStereotype.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionList.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionSetAddMessageMode.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionSetPath.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeView.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeViewBigIcon.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeViewSmallIcon.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeViewTextual.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ArgoFig.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ArgoFigGroup.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ArgoFigText.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ArgoFigUtil.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ArgoModeCreateFigText.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/Clarifiable.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEditableCompartment.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigExtensionPointsCompartment.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigKeyword.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigMultiLineTextWithBold.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNameWithAbstract.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigNameWithAbstractAndBold.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigProfileIcon.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigSingleLineTextWithNotation.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/InitDiagramAppearanceUI.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeAddToDiagram.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreateAssociation.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreateAssociationClass.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreateDependency.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreateGeneralization.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreateGraphEdge.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreatePermission.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreateUsage.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeLabelDrag.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeLabelDragFactory.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/PathItemPlacement.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/SelectionNodeClarifiers2.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/SettingsTabDiagramAppearance.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/StatusBarAdapter.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/StereotypeStyled.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/StylePanelFigAssociationClass.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/use_case/ui/InitUseCaseDiagram.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/diagram/use_case/ui/UseCaseDiagramPropPanelFactory.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/generator/TempFileUtils.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/reveng/ConfigPanelExtension.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/reveng/FileImportUtils.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportCommon.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportInterface.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportSettings.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportSettingsInternal.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/reveng/ImporterManager.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/reveng/MethodImportInterface.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/reveng/Setting.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/reveng/SettingsTypes.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportStatusScreen.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ProblemsDialog.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/AbstractActionAddModelElement2.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/ActionNavigateUpNextDown.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/ActionNavigateUpPreviousDown.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/ElementPropPanelFactory.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/InitUmlUI.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/LabelledLayout.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/PropPanelFactory.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/PropPanelFactoryManager.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/UMLDerivedCheckBox.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/UMLMultiplicityPanel.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/UMLSingleRowSelector.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/UMLTaggedValueCheckBox.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/UmlObjectPropPanelFactory.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/activity_graphs/ActionSetSynch.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/activity_graphs/UMLActionSynchCheckBox.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/ActionNewActionSequence.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/ActionNewException.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/PropPanelActionSequence.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/PropPanelException.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/ButtonActionNewGuard.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/use_cases/UMLIncludeListModel.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/ActionAddClientDependencyAction.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/ActionAddSupplierDependencyAction.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/PropPanelDirectedRelationship.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/PropPanelElementResidence.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/PropPanelTemplateParameter.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/UMLDirectedRelationshipSourceListModel.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/UMLDirectedRelationshipTargetListModel.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/foundation/core/UMLOperationRaisedExceptionsListModel.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/ui/model_management/PropPanelElementImport.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/util/PathComparator.java (props changed)
trunk/src/argouml-app/src/org/argouml/uml/util/SortedListModel.java (props changed)
trunk/src/argouml-app/src/org/argouml/util/ChildGenerator.java (props changed)
trunk/src/argouml-app/src/org/argouml/util/EnumerationIterator.java (props changed)
trunk/src/argouml-app/src/org/argouml/util/IItemUID.java (props changed)
trunk/src/argouml-app/src/org/argouml/util/IteratorEnumeration.java (props changed)
trunk/src/argouml-app/src/org/argouml/util/JavaRuntimeUtility.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/util/Predicate.java (props changed)
trunk/src/argouml-app/src/org/argouml/util/PredicateEquals.java (props changed)
trunk/src/argouml-app/src/org/argouml/util/PredicateStringMatch.java (props changed)
trunk/src/argouml-app/src/org/argouml/util/PredicateTrue.java (props changed)
trunk/src/argouml-app/src/org/argouml/util/PredicateType.java (props changed)
trunk/src/argouml-app/src/org/argouml/util/SingleElementIterator.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/util/ToolBarUtility.java (contents, props changed)
trunk/src/argouml-app/src/org/argouml/util/logging/AwtExceptionHandler.java (props changed)
trunk/src/argouml-app/src/org/argouml/util/osdep/OSXAdapter.java (props changed)
trunk/src/argouml-app/tests/org/argouml/FileHelper.java (props changed)
trunk/src/argouml-app/tests/org/argouml/TestDependencies.java (props changed)
trunk/src/argouml-app/tests/org/argouml/application/InitSubSystemForTest.java (props changed)
trunk/src/argouml-app/tests/org/argouml/application/api/GUITestInitSubsystem.java (props changed)
trunk/src/argouml-app/tests/org/argouml/application/events/TestArgoEventPump.java (props changed)
trunk/src/argouml-app/tests/org/argouml/cognitive/TestDecision.java (props changed)
trunk/src/argouml-app/tests/org/argouml/cognitive/TestGoal.java (props changed)
trunk/src/argouml-app/tests/org/argouml/cognitive/TestGoalModel.java (props changed)
trunk/src/argouml-app/tests/org/argouml/cognitive/TestStandardCM.java (props changed)
trunk/src/argouml-app/tests/org/argouml/cognitive/TestToDoItem.java (props changed)
trunk/src/argouml-app/tests/org/argouml/cognitive/TestToDoItemList.java (props changed)
trunk/src/argouml-app/tests/org/argouml/cognitive/checklist/TestCheckItem.java (props changed)
trunk/src/argouml-app/tests/org/argouml/cognitive/checklist/TestChecklist.java (props changed)
trunk/src/argouml-app/tests/org/argouml/cognitive/checklist/TestChecklistStatus.java (props changed)
trunk/src/argouml-app/tests/org/argouml/cognitive/checklist/ui/TestTabChecklist.java (props changed)
trunk/src/argouml-app/tests/org/argouml/cognitive/critics/TestSnoozeOrder.java (props changed)
trunk/src/argouml-app/tests/org/argouml/cognitive/ui/TestTabToDo.java (props changed)
trunk/src/argouml-app/tests/org/argouml/model/AllTests.java (props changed)
trunk/src/argouml-app/tests/org/argouml/model/InitializeModel.java (props changed)
trunk/src/argouml-app/tests/org/argouml/model/TestActivityGraphStateMachine.java (props changed)
trunk/src/argouml-app/tests/org/argouml/model/TestUmlFactory.java (contents, props changed)
trunk/src/argouml-app/tests/org/argouml/moduleloader/GUITestModuleLoader2.java (props changed)
trunk/src/argouml-app/tests/org/argouml/moduleloader/ModuleInterfaceForTesting1.java (props changed)
trunk/src/argouml-app/tests/org/argouml/notation/TestNotationProvider.java (contents, props changed)
trunk/src/argouml-app/tests/org/argouml/notation/TestNotationSettings.java (props changed)
trunk/src/argouml-app/tests/org/argouml/notation/providers/TestNotation.java (props changed)
trunk/src/argouml-app/tests/org/argouml/notation/providers/TestNotationProviderFactory2.java (props changed)
trunk/src/argouml-app/tests/org/argouml/notation/providers/java/TestModelElementNameNotationJava.java (props changed)
trunk/src/argouml-app/tests/org/argouml/notation/providers/uml/TestActionStateNotationUml.java (props changed)
trunk/src/argouml-app/tests/org/argouml/notation/providers/uml/TestCallStateNotationUml.java (props changed)
trunk/src/argouml-app/tests/org/argouml/notation/providers/uml/TestEnumerationLiteralNotationUml.java (props changed)
trunk/src/argouml-app/tests/org/argouml/persistence/TestProfileConfigurationFilePersister.java (props changed)
trunk/src/argouml-app/tests/org/argouml/profile/ProfileMother.java (props changed)
trunk/src/argouml-app/tests/org/argouml/profile/TestCoreProfileReference.java (props changed)
trunk/src/argouml-app/tests/org/argouml/profile/TestProfileFacade.java (props changed)
trunk/src/argouml-app/tests/org/argouml/profile/TestProfileManager.java (props changed)
trunk/src/argouml-app/tests/org/argouml/profile/TestProfileMother.java (props changed)
trunk/src/argouml-app/tests/org/argouml/profile/TestProfileReference.java (props changed)
trunk/src/argouml-app/tests/org/argouml/profile/TestReaderModelLoader.java (props changed)
trunk/src/argouml-app/tests/org/argouml/profile/TestSubsystemInit.java (props changed)
trunk/src/argouml-app/tests/org/argouml/profile/TestUserDefinedProfile.java (props changed)
trunk/src/argouml-app/tests/org/argouml/profile/TestUserProfileReference.java (props changed)
trunk/src/argouml-app/tests/org/argouml/profile/internal/TestFormatingStrategyUML.java (props changed)
trunk/src/argouml-app/tests/org/argouml/profile/internal/TestProfileManagerImpl.java (props changed)
trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestCrOCL.java (contents, props changed)
trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestCrOCL2.java (contents, props changed)
trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestDefaultOclEvaluator.java (contents, props changed)
trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestOclInterpreter.java (contents, props changed)
trunk/src/argouml-app/tests/org/argouml/ui/TestTabText.java (props changed)
trunk/src/argouml-app/tests/org/argouml/uml/diagram/TestDiagramFactory.java (props changed)
trunk/src/argouml-app/tests/org/argouml/uml/diagram/TestDiagramSettings.java (props changed)
trunk/src/argouml-app/tests/org/argouml/uml/diagram/activity/ui/TestUMLActivityDiagram.java (props changed)
trunk/src/argouml-app/tests/org/argouml/uml/diagram/collaboration/ui/TestUMLCollaborationDiagram.java (props changed)
trunk/src/argouml-app/tests/org/argouml/uml/diagram/deployment/ui/TestUMLDeploymentDiagram.java (props changed)
trunk/src/argouml-app/tests/org/argouml/uml/diagram/sequence/ui/TestUMLSequenceDiagram.java (props changed)
trunk/src/argouml-app/tests/org/argouml/uml/diagram/state/ui/TestUMLStateDiagram.java (props changed)
trunk/src/argouml-app/tests/org/argouml/uml/diagram/static_structure/ui/TestUMLClassDiagram.java (props changed)
trunk/src/argouml-app/tests/org/argouml/uml/diagram/use_case/ui/TestUMLUseCaseDiagram.java (props changed)
trunk/src/argouml-app/tests/org/argouml/uml/reveng/DummyImportSettings.java (props changed)
trunk/src/argouml-app/tests/org/argouml/uml/ui/TestActionActivityGraphDiagram.java (props changed)
trunk/src/argouml-app/tests/org/argouml/uml/ui/TestTabs.java (props changed)
trunk/src/argouml-app/tests/org/argouml/uml/ui/foundation/core/TestActionAddDependency.java (props changed)
trunk/src/argouml-app/tests/org/argouml/uml/ui/foundation/core/TestActionAddEnumerationLiteral.java (props changed)
trunk/src/argouml-app/tests/org/argouml/uml/util/TestPathComparator.java (props changed)
trunk/src/argouml-app/tests/org/argouml/util/ThreadHelper.java (props changed)
trunk/src/argouml-core-diagrams-activity2/src/org/argouml/activity2/ActivityDiagramModule.java (contents, props changed)
trunk/src/argouml-core-diagrams-activity2/src/org/argouml/activity2/diagram/ActivityDiagramFactory.java (contents, props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/SequenceDiagramModule.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/SequenceDiagramPropPanelFactory.java (contents, props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/ActionAddClassifierRole.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/ActionSetAddMessageMode.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/ActionSetOperation.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigActivation.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigClassifierRole.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigDestroy.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigHead.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigLifeLine.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigMessage.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigMessageComparator.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/FigMessageSpline.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/ModeBroomMessages.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/ModeCreateMessage.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/ModePlaceClassifierRole.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SelectionClassifierRole.java (contents, props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SelectionMessage.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SequenceDiagramFactory.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SequenceDiagramGraphModel.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SequenceDiagramRenderer.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/UMLSequenceDiagram.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/model/InitializeModel.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/persistence/TestDiagramUpdateAtLoad.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/sequence2/TestSequenceDiagramModule.java (contents, props changed)
trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/sequence2/TestSequenceDiagramPropPanelFactory.java (contents, props changed)
trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/sequence2/diagram/TestFigClassifierRole.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/sequence2/diagram/TestFigMessageSpline.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/sequence2/diagram/TestSequenceDiagramFactory.java (props changed)
trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/sequence2/diagram/TestUMLSequenceDiagram.java (props changed)
trunk/src/argouml-core-diagrams-structure2/src/org/argouml/structure2/StructureDiagram2Module.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/ClassDiagram2Factory.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/ClassDiagram2PropPanelFactory.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/ClassDiagram2Renderer.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAbstraction2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigActor2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAssociation2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAssociationClass2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAssociationEnd2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigClass2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigClassAssociationClass2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigComment2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigComponent2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigComponentInstance2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigDataType2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigDependency2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigEdgeAssociationClass2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigEdgeNote2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigEnumeration2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigException2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigExtend2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigGeneralization2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigInclude2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigInterface2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigLink2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigMNode2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigModel2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigNodeAssociation2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigNodeInstance2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigObject2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigPackage2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigPermission2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigSignal2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigStereotypeDeclaration2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigSubsystem2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigUsage2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigUseCase2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/StructureDiagram2Renderer.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/StructureDiagramFactory.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/UMLClassDiagram2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/UMLStructureDiagram2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/UMLUseCaseDiagram2.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/Uml2DiagramModule.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/UseCaseDiagram2Factory.java (contents, props changed)
trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/UseCaseDiagramRenderer2.java (contents, props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ActivityGraphsFactoryEUMLlImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ActivityGraphsHelperEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/AggregationKindEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ChangeCommand.java (contents, props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ChangeableKindEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CollaborationsFactoryEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CollaborationsHelperEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CommandStackImpl.java (contents, props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CommonBehaviorFactoryEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CommonBehaviorHelperEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ConcurrencyKindEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CopyHelperEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/DataTypesFactoryEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/DataTypesHelperEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/DirectionKindEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/EUMLModelImplementation.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ExtensionMechanismsFactoryEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ExtensionMechanismsHelperEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementFactoryEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/NotYetImplementedException.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/OrderingKindEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/PseudostateKindEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/RootContainerAdapter.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/RunnableClass.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/ScopeKindEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/StateMachinesHelperEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UMLUtil.java (contents, props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlHelperEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UseCasesFactoryEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UseCasesHelperEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/VisibilityKindEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/XmiReaderEUMLImpl.java (props changed)
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/XmiWriterEUMLImpl.java (props changed)
trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CollectionHelper.java (props changed)
trunk/src/argouml-core-model/src/org/argouml/model/DummyModelCommand.java (props changed)
trunk/src/argouml-core-model/src/org/argouml/model/XmiException.java (props changed)
trunk/src/argouml-core-model/src/org/argouml/model/XmiReferenceException.java (props changed)
trunk/src/argouml-core-model/src/org/argouml/model/XmiReferenceRuntimeException.java (props changed)
trunk/src/argouml-core-model/tests/org/argouml/model/InitializeModel.java (props changed)
trunk/src/argouml-core-model/tests/org/argouml/model/TestXmi.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/CheckBoxMeta.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/PanelMeta.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/PanelMetaCache.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/PropertyMeta.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/XMLPropertyPanelsHandler.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/XmlSinglePanelHandler.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/GetterSetterManager.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/GetterSetterManagerImpl.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/module/TempListener.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/module/TempTabPage.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/module/XmlPropertyPanelsModule.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ActionBuilder.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ActionNewAction.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/CheckBox.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ComponentFactory.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/EnumerationListModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ExpressionBodyField.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ExpressionLanguageField.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ExpressionModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/GenericUMLPlainTextDocument.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/LabelledComponent.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/LabelledLayout.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ListFactory.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/OldScrollList.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/Ordered.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/PopupMenuNewAction.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/PopupMenuNewEvent.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/RadioButtonPanel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/RowSelector.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ScrollList.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ScrollListFactory.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/ScrollListImpl.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SimpleListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SingleListFactory.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionArgumentListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionSequenceActionList.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActionSequenceActionListModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLActivityGraphPartitionListModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationAssociationRoleListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationConnectionListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationEndAssociationListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationEndQualifiersListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationEndRoleBaseListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationEndSpecificationListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationEndTypeComboBoxModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationLinkListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationRoleAssociationEndRoleListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationRoleBaseComboBoxModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationRoleMessageListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAttributeInitialValueListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLCallActionOperationComboBox.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLCallActionOperationComboBoxModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLCallEventOperationComboBox.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLCallEventOperationComboBoxModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLChangeExpressionModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassAttributeListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassOperationListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierAssociationEndListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierCreateActionListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierFeatureListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierPackageImportsListModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierParameterListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierPowertypeRangeListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierRoleAvailableContentsListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierRoleAvailableFeaturesListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLClassifierRoleBaseListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLCollaborationConstrainingElementListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLCollaborationInteractionListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLCollaborationRepresentedClassifierComboBoxModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLCollaborationRepresentedOperationComboBoxModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLComboBox.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLComboBoxModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLCommentAnnotatedElementListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLCommentBodyDocument.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLComponentResidentListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLCompositeStateSubvertexList.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLCompositeStateSubvertexListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLConditionExpressionModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLConstraintConstrainedElementListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLContainerResidentListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLCreateActionClassifierListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLDefaultValueExpressionModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLDependencyClientListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLDependencySupplierListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLDiscriminatorNameDocument.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLDocument.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLEditableComboBox.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLEnumerationLiteralsListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLEventParameterListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLEventTransitionListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExpressionBodyField.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExpressionExpressionModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExpressionLanguageField.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExpressionModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExpressionPanel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExtendBaseListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExtendExtensionListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExtendExtensionPointListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExtendedElementsListModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExtensionPointExtendListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExtensionPointLocationDocument.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLExtensionPointUseCaseListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLFeatureOwnerListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLGeneralizableElementGeneralizationListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLGeneralizableElementSpecializationListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLGeneralizationChildListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLGeneralizationParentListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLGeneralizationPowertypeComboBoxModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLGuardTransitionListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLIncludeAdditionListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLIncludeBaseListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLIncludeListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLInitialValueExpressionModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLInstanceClassifierListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLInstanceLinkEndListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLInteractionContextListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLInteractionMessagesListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLLinkAssociationComboBoxModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLLinkConnectionListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLLinkedList.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLMessageActionListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLMessageActivatorComboBox.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLMessageActivatorComboBoxModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLMessageInteractionListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLMessagePredecessorListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLMessageReceiverListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLMessageSenderListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLMetaClassComboBoxModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLMethodSpecificationComboBoxModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementClientDependencyListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementConstraintListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementElementResidenceListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementNameDocument.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementNamespaceComboBoxModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementNamespaceListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementSourceFlowListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementStereotypeListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementSupplierDependencyListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementTargetFlowListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementTemplateParameterListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLMultiplicityPanel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLMutableLinkedList.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLNamespaceOwnedElementListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLNodeDeployedComponentListModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLOFSStateListModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLObjectFlowStateParameterListModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLOperationMethodsListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLOperationRaisedSignalsListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLOperationSpecificationDocument.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLParameterBehavioralFeatListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLPartitionActivityGraphListModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLPartitionContentListModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLPlainTextDocument.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLRecurrenceExpressionModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLScriptExpressionModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLSearchableComboBox.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLSignalContextListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLSignalEventSignalList.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLSignalEventSignalListModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLSignalReceptionListModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateDeferrableEventList.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateDeferrableEventListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateDoActivityList.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateDoActivityListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateEntryList.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateEntryListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateExitList.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateExitListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateInternalTransitionListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateMachineContextComboBoxModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateMachineContextListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateMachineSubmachineStateListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateMachineTopListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateMachineTransitionListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateVertexContainerListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateVertexIncomingListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStateVertexOutgoingListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStereotypeBaseClassListModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStereotypeTagDefinitionListModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStimulusReceiverListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStimulusSenderListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStructuralFeatureTypeComboBoxModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLStubStateComboBoxModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLSubmachineStateComboBoxModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLSynchStateBoundDocument.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTagDefinitionTypedValuesListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTemplateParameterDefaultElementComboBoxModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTemplateParameterParameterComboBoxModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTemplateParameterParameterListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTemplateParameterTemplateListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTextArea.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTextField.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTimeExpressionModel.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTransitionEffectListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTransitionGuardListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTransitionSourceListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTransitionStateListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTransitionStatemachineListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTransitionTargetListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLTransitionTriggerListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLUseCaseExtendListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLUseCaseExtensionPointListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLUseCaseIncludeListModel.java (contents, props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/XMLPropPanelFactory.java (props changed)
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/XmlPropertyPanel.java (props changed)
Log:
Added and fixed svn:eol-style and svn:keywords.
Modified: trunk/src/argouml-app/src/org/argouml/kernel/UmlModelMutator.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/kernel/UmlModelMutator.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/kernel/UmlModelMutator.java (original)
+++ trunk/src/argouml-app/src/org/argouml/kernel/UmlModelMutator.java 2010-01-11 11:49:55-0800
@@ -1,40 +1,40 @@
-// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
-// Copyright (c) 2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.kernel;
-
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * <p>A marker interface to be implemented by Actions that will create some
- * modification to the UML model when it is executed.</p>
- * <p>Actions that implement this are filtered out or disabled in some
- * displays if the model element that would be effected is read only</p>
- * @author Bob Tarling
- */
-@Inherited
-@Retention(RetentionPolicy.RUNTIME)
-public @interface UmlModelMutator {};
+// $Id$
+// Copyright (c) 2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.kernel;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * <p>A marker interface to be implemented by Actions that will create some
+ * modification to the UML model when it is executed.</p>
+ * <p>Actions that implement this are filtered out or disabled in some
+ * displays if the model element that would be effected is read only</p>
+ * @author Bob Tarling
+ */
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+public @interface UmlModelMutator {};
Modified: trunk/src/argouml-app/src/org/argouml/taskmgmt/ProgressMonitor.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/taskmgmt/ProgressMonitor.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/taskmgmt/ProgressMonitor.java (original)
+++ trunk/src/argouml-app/src/org/argouml/taskmgmt/ProgressMonitor.java 2010-01-11 11:49:55-0800
@@ -1,100 +1,100 @@
-// $Id: ProgressListener.java 11208 2006-09-18 22:34:49Z tfmorris $
-// Copyright (c) 2006-2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.taskmgmt;
-
-
-/**
- * This is a generic progress notifier. Can be used with any GUI progress bar
- * or any other progress GUI. It's this way to be independent of the GUI
- * implementation.
- * @author Bogdan Pistol
- */
-public interface ProgressMonitor extends ProgressListener {
-
- /**
- * Informs the progress tool that the total progress was updated.
- *
- * @param progress the amount of progress done so far, this is the whole
- * progress until now, not just the subtask's progress or the
- * main task's progress
- */
- void updateProgress(int progress);
-
- /**
- * Updates the subtask that is in progress.
- * @param name the name of the subtask
- */
- void updateSubTask(String name);
-
- /**
- * Updates the major task that is going on.
- * @param name the new task
- */
- void updateMainTask(String name);
-
- /**
- * Determines if the user wants to cancel the current action.
- * If this happens the current action should be stopped.
- * <p>
- * So in a long running action, you should query this periodicaly to see
- * if the user still wants to continue or he canceled the action.
- * <p>
- * NOTE: It appears to be some kind of Java tradition to misspell
- * the name of this method, so we follow the Swing and Eclipse tradition
- * of spelling it with a single "L".
- * @return true if the user cancelled the action and false otherwise
- */
- boolean isCanceled();
-
- /**
- * Determines the maximum amount of progress that can be reached.
- * This should be set before the progress is updated.
- * @param max the maximum progress value or -1 if the value is unknown
- */
- void setMaximumProgress(int max);
-
- /**
- * This method notifies the GUI that the working thread determines that
- * there are no actions that could be done for various reasons.
- * The GUI should notify the user too.
- */
- void notifyNullAction();
-
- /**
- * If something happens the user should be notified.
- * @param title a title for the error/information/etc
- * @param introduction a short message that will continue with the message
- * @param message the actual message with all the details
- */
- void notifyMessage(String title, String introduction, String message);
-
- /**
- * Indicate that the operation is complete. This happens automatically
- * when the value set by setProgress is >= max, but it may be called
- * earlier if the operation ends early.
- */
- public void close();
-
-}
+// $Id$
+// Copyright (c) 2006-2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.taskmgmt;
+
+
+/**
+ * This is a generic progress notifier. Can be used with any GUI progress bar
+ * or any other progress GUI. It's this way to be independent of the GUI
+ * implementation.
+ * @author Bogdan Pistol
+ */
+public interface ProgressMonitor extends ProgressListener {
+
+ /**
+ * Informs the progress tool that the total progress was updated.
+ *
+ * @param progress the amount of progress done so far, this is the whole
+ * progress until now, not just the subtask's progress or the
+ * main task's progress
+ */
+ void updateProgress(int progress);
+
+ /**
+ * Updates the subtask that is in progress.
+ * @param name the name of the subtask
+ */
+ void updateSubTask(String name);
+
+ /**
+ * Updates the major task that is going on.
+ * @param name the new task
+ */
+ void updateMainTask(String name);
+
+ /**
+ * Determines if the user wants to cancel the current action.
+ * If this happens the current action should be stopped.
+ * <p>
+ * So in a long running action, you should query this periodicaly to see
+ * if the user still wants to continue or he canceled the action.
+ * <p>
+ * NOTE: It appears to be some kind of Java tradition to misspell
+ * the name of this method, so we follow the Swing and Eclipse tradition
+ * of spelling it with a single "L".
+ * @return true if the user cancelled the action and false otherwise
+ */
+ boolean isCanceled();
+
+ /**
+ * Determines the maximum amount of progress that can be reached.
+ * This should be set before the progress is updated.
+ * @param max the maximum progress value or -1 if the value is unknown
+ */
+ void setMaximumProgress(int max);
+
+ /**
+ * This method notifies the GUI that the working thread determines that
+ * there are no actions that could be done for various reasons.
+ * The GUI should notify the user too.
+ */
+ void notifyNullAction();
+
+ /**
+ * If something happens the user should be notified.
+ * @param title a title for the error/information/etc
+ * @param introduction a short message that will continue with the message
+ * @param message the actual message with all the details
+ */
+ void notifyMessage(String title, String introduction, String message);
+
+ /**
+ * Indicate that the operation is complete. This happens automatically
+ * when the value set by setProgress is >= max, but it may be called
+ * earlier if the operation ends early.
+ */
+ public void close();
+
+}
Modified: trunk/src/argouml-app/src/org/argouml/ui/AbstractArgoJPanel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/AbstractArgoJPanel.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/AbstractArgoJPanel.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/AbstractArgoJPanel.java 2010-01-11 11:49:55-0800
@@ -1,70 +1,70 @@
-// $Id: AbstractArgoJPanel.java 14168 2008-02-29 16:44:07Z mvw $
-// Copyright (c) 1996-2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.ui;
-
-/**
- * This exists purely for the backwards compatibility of modules. New code
- * should use {@link org.argouml.application.api.AbstractArgoJPanel}.
- *
- * @deprecated by Bob Tarling in 0.25.5. Use
- * {@link org.argouml.application.api.AbstractArgoJPanel}.
- * <p>
- * Because this is a widely used class it is recommended to retain
- * the deprecated class for at least two major releases (ie until
- * after 0.28 is released using the current numbering scheme).
- */
-@Deprecated
-public abstract class AbstractArgoJPanel extends
- org.argouml.application.api.AbstractArgoJPanel {
- /**
- * The constructor.
- *
- */
- @Deprecated
- public AbstractArgoJPanel() {
- super();
- }
-
- /**
- * The constructor.
- *
- * @param title The name as a localized string.
- */
- @Deprecated
- public AbstractArgoJPanel(String title) {
- super(title);
- }
-
- /**
- * The constructor.
- *
- * @param title The name (a localized string).
- * @param t if true, remove tab from parent JTabbedPane
- */
- @Deprecated
- public AbstractArgoJPanel(String title, boolean t) {
- super(title, t);
- }
-}
+// $Id$
+// Copyright (c) 1996-2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.ui;
+
+/**
+ * This exists purely for the backwards compatibility of modules. New code
+ * should use {@link org.argouml.application.api.AbstractArgoJPanel}.
+ *
+ * @deprecated by Bob Tarling in 0.25.5. Use
+ * {@link org.argouml.application.api.AbstractArgoJPanel}.
+ * <p>
+ * Because this is a widely used class it is recommended to retain
+ * the deprecated class for at least two major releases (ie until
+ * after 0.28 is released using the current numbering scheme).
+ */
+@Deprecated
+public abstract class AbstractArgoJPanel extends
+ org.argouml.application.api.AbstractArgoJPanel {
+ /**
+ * The constructor.
+ *
+ */
+ @Deprecated
+ public AbstractArgoJPanel() {
+ super();
+ }
+
+ /**
+ * The constructor.
+ *
+ * @param title The name as a localized string.
+ */
+ @Deprecated
+ public AbstractArgoJPanel(String title) {
+ super(title);
+ }
+
+ /**
+ * The constructor.
+ *
+ * @param title The name (a localized string).
+ * @param t if true, remove tab from parent JTabbedPane
+ */
+ @Deprecated
+ public AbstractArgoJPanel(String title, boolean t) {
+ super(title, t);
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/ui/ActionCreateContainedModelElement.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/ActionCreateContainedModelElement.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/ActionCreateContainedModelElement.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/ActionCreateContainedModelElement.java 2010-01-11 11:49:55-0800
@@ -1,83 +1,83 @@
-// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
-// Copyright (c) 2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.ui;
-
-import java.awt.event.ActionEvent;
-
-import org.argouml.model.Model;
-import org.argouml.ui.targetmanager.TargetManager;
-import org.argouml.uml.ui.AbstractActionNewModelElement;
-
-/**
- * An action to create a model element to be contained by the
- * target model element.
- *
- * @author Scott Roberts
- */
-public class ActionCreateContainedModelElement
- extends AbstractActionNewModelElement {
-
- private Object metaType;
-
- /**
- * Construct the action.
- *
- * @param theMetaType the element to be created
- * @param target the container that will own the new element
- */
- public ActionCreateContainedModelElement(
- Object theMetaType,
- Object target) {
- this(theMetaType, target,
- "button.new-"
- + Model.getMetaTypes().getName(theMetaType).toLowerCase());
- }
-
-
- /**
- * Construct the action.
- *
- * @param theMetaType the element to be created
- * @param target the container that will own the new element
- * @param menuDescr the description for the menu item label.
- */
- public ActionCreateContainedModelElement(
- Object theMetaType,
- Object target,
- String menuDescr) {
- super(menuDescr);
-
- metaType = theMetaType;
-
- setTarget(target);
- }
-
- public void actionPerformed(ActionEvent e) {
- Object newElement = Model.getUmlFactory().buildNode(metaType,
- getTarget());
-
- TargetManager.getInstance().setTarget(newElement);
- }
-}
+// $Id$
+// Copyright (c) 2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.ui;
+
+import java.awt.event.ActionEvent;
+
+import org.argouml.model.Model;
+import org.argouml.ui.targetmanager.TargetManager;
+import org.argouml.uml.ui.AbstractActionNewModelElement;
+
+/**
+ * An action to create a model element to be contained by the
+ * target model element.
+ *
+ * @author Scott Roberts
+ */
+public class ActionCreateContainedModelElement
+ extends AbstractActionNewModelElement {
+
+ private Object metaType;
+
+ /**
+ * Construct the action.
+ *
+ * @param theMetaType the element to be created
+ * @param target the container that will own the new element
+ */
+ public ActionCreateContainedModelElement(
+ Object theMetaType,
+ Object target) {
+ this(theMetaType, target,
+ "button.new-"
+ + Model.getMetaTypes().getName(theMetaType).toLowerCase());
+ }
+
+
+ /**
+ * Construct the action.
+ *
+ * @param theMetaType the element to be created
+ * @param target the container that will own the new element
+ * @param menuDescr the description for the menu item label.
+ */
+ public ActionCreateContainedModelElement(
+ Object theMetaType,
+ Object target,
+ String menuDescr) {
+ super(menuDescr);
+
+ metaType = theMetaType;
+
+ setTarget(target);
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ Object newElement = Model.getUmlFactory().buildNode(metaType,
+ getTarget());
+
+ TargetManager.getInstance().setTarget(newElement);
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/ui/ActionCreateEdgeModelElement.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/ActionCreateEdgeModelElement.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/ActionCreateEdgeModelElement.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/ActionCreateEdgeModelElement.java 2010-01-11 11:49:55-0800
@@ -1,95 +1,95 @@
-// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
-// Copyright (c) 2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.ui;
-
-import java.awt.event.ActionEvent;
-import java.text.MessageFormat;
-
-import javax.swing.AbstractAction;
-
-import org.apache.log4j.Logger;
-import org.argouml.kernel.ProjectManager;
-import org.argouml.model.IllegalModelElementConnectionException;
-import org.argouml.model.Model;
-import org.argouml.ui.explorer.ExplorerPopup;
-
-/**
- * An action to create a relation between 2 model elements.
- *
- * @author Bob Tarling
- */
-public class ActionCreateEdgeModelElement extends AbstractAction {
-
- private static final Logger LOG =
- Logger.getLogger(ExplorerPopup.class);
-
- private final Object metaType;
- private final Object source;
- private final Object dest;
-
- /**
- * Create a new model element which in graph terminology is an edge,
- * ie a model element that links two other model elements and makes
- * no sense to exist by itelf.
- * @param theMetaType The type of model element to create
- * @param theSource The source model element to link
- * @param theDestination The destination model element to link
- * @param relationshipDescr A textual description that describes how
- * source relates to destination
- */
- public ActionCreateEdgeModelElement(
- final Object theMetaType,
- final Object theSource,
- final Object theDestination,
- final String relationshipDescr) {
- super(MessageFormat.format(
- relationshipDescr,
- new Object[] {
- DisplayTextTree.getModelElementDisplayName(theSource),
- DisplayTextTree.getModelElementDisplayName(
- theDestination)}));
- this.metaType = theMetaType;
- this.source = theSource;
- this.dest = theDestination;
- }
-
- public void actionPerformed(ActionEvent e) {
- Object rootModel =
- ProjectManager.getManager().getCurrentProject().getModel();
- try {
- Model.getUmlFactory().buildConnection(
- metaType,
- source,
- null,
- dest,
- null,
- null,
- rootModel);
- } catch (IllegalModelElementConnectionException e1) {
- LOG.error("Exception", e1);
- }
- }
-}
-
+// $Id$
+// Copyright (c) 2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.ui;
+
+import java.awt.event.ActionEvent;
+import java.text.MessageFormat;
+
+import javax.swing.AbstractAction;
+
+import org.apache.log4j.Logger;
+import org.argouml.kernel.ProjectManager;
+import org.argouml.model.IllegalModelElementConnectionException;
+import org.argouml.model.Model;
+import org.argouml.ui.explorer.ExplorerPopup;
+
+/**
+ * An action to create a relation between 2 model elements.
+ *
+ * @author Bob Tarling
+ */
+public class ActionCreateEdgeModelElement extends AbstractAction {
+
+ private static final Logger LOG =
+ Logger.getLogger(ExplorerPopup.class);
+
+ private final Object metaType;
+ private final Object source;
+ private final Object dest;
+
+ /**
+ * Create a new model element which in graph terminology is an edge,
+ * ie a model element that links two other model elements and makes
+ * no sense to exist by itelf.
+ * @param theMetaType The type of model element to create
+ * @param theSource The source model element to link
+ * @param theDestination The destination model element to link
+ * @param relationshipDescr A textual description that describes how
+ * source relates to destination
+ */
+ public ActionCreateEdgeModelElement(
+ final Object theMetaType,
+ final Object theSource,
+ final Object theDestination,
+ final String relationshipDescr) {
+ super(MessageFormat.format(
+ relationshipDescr,
+ new Object[] {
+ DisplayTextTree.getModelElementDisplayName(theSource),
+ DisplayTextTree.getModelElementDisplayName(
+ theDestination)}));
+ this.metaType = theMetaType;
+ this.source = theSource;
+ this.dest = theDestination;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ Object rootModel =
+ ProjectManager.getManager().getCurrentProject().getModel();
+ try {
+ Model.getUmlFactory().buildConnection(
+ metaType,
+ source,
+ null,
+ dest,
+ null,
+ null,
+ rootModel);
+ } catch (IllegalModelElementConnectionException e1) {
+ LOG.error("Exception", e1);
+ }
+ }
+}
+
Modified: trunk/src/argouml-app/src/org/argouml/ui/ContextActionFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/ContextActionFactory.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/ContextActionFactory.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/ContextActionFactory.java 2010-01-11 11:49:55-0800
@@ -1,56 +1,56 @@
-// $Id: ContextActionFactory.java 16277 2008-12-07 20:36:40Z bobtarling $
-// Copyright (c) 1996-2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.ui;
-
-import java.util.List;
-
-/**
- * Interface for a factory of context popups, which are created based on a
- * given object.
- *
- * The factory creates an additional popup on the context menu for selected
- * elements
- * @author Enrico Da Ros
- */
-public interface ContextActionFactory {
- /**
- * This method shall test the type of the given object,
- * and if recognised, create a new Vector of Action
- * derived classes and null (for the separators). <p>
- *
- * If the object type is not something this factory
- * knows how to deal with, then null shall be returned
- * (do NOT throw an exception). <p>
- *
- * If the given object falls within a class of objects
- * that this factory is the exclusive factory for,
- * then it is allowed to throw an exception if
- * the object is invalid/unknown. However,
- * be careful not to break the possibility to extend ArgoUML.
- * @param element the object to create a new context popup for
- * @return the new menu structure or null
- */
- List createContextPopupActions(Object element);
-}
+// $Id$
+// Copyright (c) 1996-2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.ui;
+
+import java.util.List;
+
+/**
+ * Interface for a factory of context popups, which are created based on a
+ * given object.
+ *
+ * The factory creates an additional popup on the context menu for selected
+ * elements
+ * @author Enrico Da Ros
+ */
+public interface ContextActionFactory {
+ /**
+ * This method shall test the type of the given object,
+ * and if recognised, create a new Vector of Action
+ * derived classes and null (for the separators). <p>
+ *
+ * If the object type is not something this factory
+ * knows how to deal with, then null shall be returned
+ * (do NOT throw an exception). <p>
+ *
+ * If the given object falls within a class of objects
+ * that this factory is the exclusive factory for,
+ * then it is allowed to throw an exception if
+ * the object is invalid/unknown. However,
+ * be careful not to break the possibility to extend ArgoUML.
+ * @param element the object to create a new context popup for
+ * @return the new menu structure or null
+ */
+ List createContextPopupActions(Object element);
+}
Modified: trunk/src/argouml-app/src/org/argouml/ui/ContextActionFactoryManager.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/ContextActionFactoryManager.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/ContextActionFactoryManager.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/ContextActionFactoryManager.java 2010-01-11 11:49:55-0800
@@ -1,103 +1,103 @@
-// $Id: ContextActionFactoryManager.java 16277 2008-12-07 20:36:40Z bobtarling $
-// Copyright (c) 1996-2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.ui;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Vector;
-
-import javax.swing.Action;
-import javax.swing.JSeparator;
-
-import org.argouml.ui.targetmanager.TargetManager;
-
-/**
- * Manager of context meny factories registered in ArgoUML.
- * <p>
- *
- * You can add and remove a ContextPopupFactory instance to this central
- * registry. The registered factories are then used when a new Context menu has
- * to be build.
- *
- * The factory creates an additional popup on the context menu
- *
- * @author EnDaRos
- */
-public class ContextActionFactoryManager {
- private static List<ContextActionFactory> epfactories =
- new ArrayList<ContextActionFactory>();
-
- /**
- * @param factory
- * add the given factory
- */
- public static void addContextPopupFactory(ContextActionFactory factory) {
- epfactories.add(0, factory);
- }
-
- /**
- * For modules, it would be useful to be able to remove their factories.
- * <p>
- *
- * TODO: The effect of this method is not yet tested!
- *
- * @param factory
- * the factory to remove
- */
- public static void removeContextPopupFactory(ContextActionFactory factory) {
- epfactories.remove(factory);
- }
-
- /**
- * This method is not public since it is meant to be used exclusively by
- * TabProps.
- */
- static Collection<ContextActionFactory> getFactories() {
- return epfactories;
- }
-
- /**
- * Adds to the default actions the new menus for the registered factories
- * @return
- */
- public static List<Action> getContextPopupActions() {
- List<Action> allActionsFound = new ArrayList<Action>();
- Object element = TargetManager.getInstance().getSingleModelTarget();
-
- List tmpActionsContainer = null;
- for (ContextActionFactory factory : ContextActionFactoryManager
- .getFactories()) {
- tmpActionsContainer = factory.createContextPopupActions(element);
- if (tmpActionsContainer != null && tmpActionsContainer.size() > 0) {
- if (allActionsFound.size() > 0) {
- allActionsFound.add(null);
- }
- allActionsFound.addAll(tmpActionsContainer);
- }
- }
- return allActionsFound;
- }
-}
+// $Id$
+// Copyright (c) 1996-2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.ui;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Vector;
+
+import javax.swing.Action;
+import javax.swing.JSeparator;
+
+import org.argouml.ui.targetmanager.TargetManager;
+
+/**
+ * Manager of context meny factories registered in ArgoUML.
+ * <p>
+ *
+ * You can add and remove a ContextPopupFactory instance to this central
+ * registry. The registered factories are then used when a new Context menu has
+ * to be build.
+ *
+ * The factory creates an additional popup on the context menu
+ *
+ * @author EnDaRos
+ */
+public class ContextActionFactoryManager {
+ private static List<ContextActionFactory> epfactories =
+ new ArrayList<ContextActionFactory>();
+
+ /**
+ * @param factory
+ * add the given factory
+ */
+ public static void addContextPopupFactory(ContextActionFactory factory) {
+ epfactories.add(0, factory);
+ }
+
+ /**
+ * For modules, it would be useful to be able to remove their factories.
+ * <p>
+ *
+ * TODO: The effect of this method is not yet tested!
+ *
+ * @param factory
+ * the factory to remove
+ */
+ public static void removeContextPopupFactory(ContextActionFactory factory) {
+ epfactories.remove(factory);
+ }
+
+ /**
+ * This method is not public since it is meant to be used exclusively by
+ * TabProps.
+ */
+ static Collection<ContextActionFactory> getFactories() {
+ return epfactories;
+ }
+
+ /**
+ * Adds to the default actions the new menus for the registered factories
+ * @return
+ */
+ public static List<Action> getContextPopupActions() {
+ List<Action> allActionsFound = new ArrayList<Action>();
+ Object element = TargetManager.getInstance().getSingleModelTarget();
+
+ List tmpActionsContainer = null;
+ for (ContextActionFactory factory : ContextActionFactoryManager
+ .getFactories()) {
+ tmpActionsContainer = factory.createContextPopupActions(element);
+ if (tmpActionsContainer != null && tmpActionsContainer.size() > 0) {
+ if (allActionsFound.size() > 0) {
+ allActionsFound.add(null);
+ }
+ allActionsFound.addAll(tmpActionsContainer);
+ }
+ }
+ return allActionsFound;
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/ui/GUIProjectSettingsTabInterface.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/GUIProjectSettingsTabInterface.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/GUIProjectSettingsTabInterface.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/GUIProjectSettingsTabInterface.java 2010-01-11 11:49:55-0800
@@ -1,4 +1,4 @@
-// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
+// $Id$
// Copyright (c) 2009 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
Modified: trunk/src/argouml-app/src/org/argouml/ui/MenuBar14.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/MenuBar14.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/MenuBar14.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/MenuBar14.java 2010-01-11 11:49:55-0800
@@ -1,107 +1,107 @@
-// $Id:GenericArgoMenuBar.java 13104 2007-07-21 18:29:31Z mvw $
-// Copyright (c) 1996,2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.ui;
-
-import javax.swing.JMenuItem;
-
-import org.argouml.ui.cmd.GenericArgoMenuBar;
-import org.argouml.ui.cmd.ShortcutMgr;
-import org.argouml.uml.ui.ActionActivityDiagram;
-import org.argouml.uml.ui.ActionClassDiagram;
-import org.argouml.uml.ui.ActionCollaborationDiagram;
-import org.argouml.uml.ui.ActionDeploymentDiagram;
-import org.argouml.uml.ui.ActionSequenceDiagram;
-import org.argouml.uml.ui.ActionStateDiagram;
-import org.argouml.uml.ui.ActionUseCaseDiagram;
-
-/**
- * The Menu and Toolbar for UML1.4
- */
-public class MenuBar14 extends GenericArgoMenuBar {
-
- /**
- * Build the menu "Create" and the toolbar for diagram creation. These are
- * build together to guarantee that the same items are present in both, and
- * in the same sequence.
- * <p>
- *
- * The sequence of these items was determined by issue 1821.
- */
- protected void initMenuCreate() {
- super.initMenuCreate();
- getCreateDiagramMenu().removeAll();
- getCreateDiagramToolbar().removeAll();
- JMenuItem usecaseDiagram = getCreateDiagramMenu()
- .add(new ActionUseCaseDiagram());
- setMnemonic(usecaseDiagram, "Usecase Diagram");
- getCreateDiagramToolbar().add((new ActionUseCaseDiagram()));
- ShortcutMgr.assignAccelerator(usecaseDiagram,
- ShortcutMgr.ACTION_USE_CASE_DIAGRAM);
-
- JMenuItem classDiagram =
- getCreateDiagramMenu().add(new ActionClassDiagram());
- setMnemonic(classDiagram, "Class Diagram");
- getCreateDiagramToolbar().add((new ActionClassDiagram()));
- ShortcutMgr.assignAccelerator(classDiagram,
- ShortcutMgr.ACTION_CLASS_DIAGRAM);
-
- JMenuItem sequenzDiagram =
- getCreateDiagramMenu().add(new ActionSequenceDiagram());
- setMnemonic(sequenzDiagram, "Sequenz Diagram");
- getCreateDiagramToolbar().add((new ActionSequenceDiagram()));
- ShortcutMgr.assignAccelerator(sequenzDiagram,
- ShortcutMgr.ACTION_SEQUENCE_DIAGRAM);
-
- JMenuItem collaborationDiagram =
- getCreateDiagramMenu().add(new ActionCollaborationDiagram());
- setMnemonic(collaborationDiagram, "Collaboration Diagram");
- getCreateDiagramToolbar().add((new ActionCollaborationDiagram()));
- ShortcutMgr.assignAccelerator(collaborationDiagram,
- ShortcutMgr.ACTION_COLLABORATION_DIAGRAM);
-
- JMenuItem stateDiagram =
- getCreateDiagramMenu().add(new ActionStateDiagram());
- setMnemonic(stateDiagram, "Statechart Diagram");
- getCreateDiagramToolbar().add((new ActionStateDiagram()));
- ShortcutMgr.assignAccelerator(stateDiagram,
- ShortcutMgr.ACTION_STATE_DIAGRAM);
-
- JMenuItem activityDiagram =
- getCreateDiagramMenu().add(new ActionActivityDiagram());
- setMnemonic(activityDiagram, "Activity Diagram");
- getCreateDiagramToolbar().add((new ActionActivityDiagram()));
- ShortcutMgr.assignAccelerator(activityDiagram,
- ShortcutMgr.ACTION_ACTIVITY_DIAGRAM);
-
- JMenuItem deploymentDiagram =
- getCreateDiagramMenu().add(new ActionDeploymentDiagram());
- setMnemonic(deploymentDiagram, "Deployment Diagram");
- getCreateDiagramToolbar().add((new ActionDeploymentDiagram()));
- ShortcutMgr.assignAccelerator(deploymentDiagram,
- ShortcutMgr.ACTION_DEPLOYMENT_DIAGRAM);
-
- getCreateDiagramToolbar().setFloatable(true);
- }
-}
+// $Id:GenericArgoMenuBar.java 13104 2007-07-21 18:29:31Z mvw $
+// Copyright (c) 1996,2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.ui;
+
+import javax.swing.JMenuItem;
+
+import org.argouml.ui.cmd.GenericArgoMenuBar;
+import org.argouml.ui.cmd.ShortcutMgr;
+import org.argouml.uml.ui.ActionActivityDiagram;
+import org.argouml.uml.ui.ActionClassDiagram;
+import org.argouml.uml.ui.ActionCollaborationDiagram;
+import org.argouml.uml.ui.ActionDeploymentDiagram;
+import org.argouml.uml.ui.ActionSequenceDiagram;
+import org.argouml.uml.ui.ActionStateDiagram;
+import org.argouml.uml.ui.ActionUseCaseDiagram;
+
+/**
+ * The Menu and Toolbar for UML1.4
+ */
+public class MenuBar14 extends GenericArgoMenuBar {
+
+ /**
+ * Build the menu "Create" and the toolbar for diagram creation. These are
+ * build together to guarantee that the same items are present in both, and
+ * in the same sequence.
+ * <p>
+ *
+ * The sequence of these items was determined by issue 1821.
+ */
+ protected void initMenuCreate() {
+ super.initMenuCreate();
+ getCreateDiagramMenu().removeAll();
+ getCreateDiagramToolbar().removeAll();
+ JMenuItem usecaseDiagram = getCreateDiagramMenu()
+ .add(new ActionUseCaseDiagram());
+ setMnemonic(usecaseDiagram, "Usecase Diagram");
+ getCreateDiagramToolbar().add((new ActionUseCaseDiagram()));
+ ShortcutMgr.assignAccelerator(usecaseDiagram,
+ ShortcutMgr.ACTION_USE_CASE_DIAGRAM);
+
+ JMenuItem classDiagram =
+ getCreateDiagramMenu().add(new ActionClassDiagram());
+ setMnemonic(classDiagram, "Class Diagram");
+ getCreateDiagramToolbar().add((new ActionClassDiagram()));
+ ShortcutMgr.assignAccelerator(classDiagram,
+ ShortcutMgr.ACTION_CLASS_DIAGRAM);
+
+ JMenuItem sequenzDiagram =
+ getCreateDiagramMenu().add(new ActionSequenceDiagram());
+ setMnemonic(sequenzDiagram, "Sequenz Diagram");
+ getCreateDiagramToolbar().add((new ActionSequenceDiagram()));
+ ShortcutMgr.assignAccelerator(sequenzDiagram,
+ ShortcutMgr.ACTION_SEQUENCE_DIAGRAM);
+
+ JMenuItem collaborationDiagram =
+ getCreateDiagramMenu().add(new ActionCollaborationDiagram());
+ setMnemonic(collaborationDiagram, "Collaboration Diagram");
+ getCreateDiagramToolbar().add((new ActionCollaborationDiagram()));
+ ShortcutMgr.assignAccelerator(collaborationDiagram,
+ ShortcutMgr.ACTION_COLLABORATION_DIAGRAM);
+
+ JMenuItem stateDiagram =
+ getCreateDiagramMenu().add(new ActionStateDiagram());
+ setMnemonic(stateDiagram, "Statechart Diagram");
+ getCreateDiagramToolbar().add((new ActionStateDiagram()));
+ ShortcutMgr.assignAccelerator(stateDiagram,
+ ShortcutMgr.ACTION_STATE_DIAGRAM);
+
+ JMenuItem activityDiagram =
+ getCreateDiagramMenu().add(new ActionActivityDiagram());
+ setMnemonic(activityDiagram, "Activity Diagram");
+ getCreateDiagramToolbar().add((new ActionActivityDiagram()));
+ ShortcutMgr.assignAccelerator(activityDiagram,
+ ShortcutMgr.ACTION_ACTIVITY_DIAGRAM);
+
+ JMenuItem deploymentDiagram =
+ getCreateDiagramMenu().add(new ActionDeploymentDiagram());
+ setMnemonic(deploymentDiagram, "Deployment Diagram");
+ getCreateDiagramToolbar().add((new ActionDeploymentDiagram()));
+ ShortcutMgr.assignAccelerator(deploymentDiagram,
+ ShortcutMgr.ACTION_DEPLOYMENT_DIAGRAM);
+
+ getCreateDiagramToolbar().setFloatable(true);
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/ui/MenuBar2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/MenuBar2.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/MenuBar2.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/MenuBar2.java 2010-01-11 11:49:55-0800
@@ -1,99 +1,99 @@
-// $Id:GenericArgoMenuBar.java 13104 2007-07-21 18:29:31Z mvw $
-// Copyright (c) 1996,2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.ui;
-
-import javax.swing.JMenuItem;
-
-import org.argouml.ui.cmd.GenericArgoMenuBar;
-import org.argouml.ui.cmd.ShortcutMgr;
-import org.argouml.uml.ui.ActionActivityDiagram;
-import org.argouml.uml.ui.ActionClassDiagram;
-import org.argouml.uml.ui.ActionDeploymentDiagram;
-import org.argouml.uml.ui.ActionSequenceDiagram;
-import org.argouml.uml.ui.ActionStateDiagram;
-import org.argouml.uml.ui.ActionUseCaseDiagram;
-
-/**
- * The Menu and Toolbar for UML2.x
- */
-public class MenuBar2 extends GenericArgoMenuBar {
-
- /**
- * Build the menu "Create" and the toolbar for diagram creation. These are
- * build together to guarantee that the same items are present in both, and
- * in the same sequence.
- * <p>
- *
- * The sequence of these items was determined by issue 1821.
- */
- protected void initMenuCreate() {
- super.initMenuCreate();
- getCreateDiagramMenu().removeAll();
- getCreateDiagramToolbar().removeAll();
- JMenuItem usecaseDiagram = getCreateDiagramMenu()
- .add(new ActionUseCaseDiagram());
- setMnemonic(usecaseDiagram, "Usecase Diagram");
- getCreateDiagramToolbar().add((new ActionUseCaseDiagram()));
- ShortcutMgr.assignAccelerator(usecaseDiagram,
- ShortcutMgr.ACTION_USE_CASE_DIAGRAM);
-
- JMenuItem classDiagram =
- getCreateDiagramMenu().add(new ActionClassDiagram());
- setMnemonic(classDiagram, "Class Diagram");
- getCreateDiagramToolbar().add((new ActionClassDiagram()));
- ShortcutMgr.assignAccelerator(classDiagram,
- ShortcutMgr.ACTION_CLASS_DIAGRAM);
-
- JMenuItem sequenzDiagram =
- getCreateDiagramMenu().add(new ActionSequenceDiagram());
- setMnemonic(sequenzDiagram, "Sequenz Diagram");
- getCreateDiagramToolbar().add((new ActionSequenceDiagram()));
- ShortcutMgr.assignAccelerator(sequenzDiagram,
- ShortcutMgr.ACTION_SEQUENCE_DIAGRAM);
-
- JMenuItem stateDiagram =
- getCreateDiagramMenu().add(new ActionStateDiagram());
- setMnemonic(stateDiagram, "Statechart Diagram");
- getCreateDiagramToolbar().add((new ActionStateDiagram()));
- ShortcutMgr.assignAccelerator(stateDiagram,
- ShortcutMgr.ACTION_STATE_DIAGRAM);
-
- JMenuItem activityDiagram =
- getCreateDiagramMenu().add(new ActionActivityDiagram());
- setMnemonic(activityDiagram, "Activity Diagram");
- getCreateDiagramToolbar().add((new ActionActivityDiagram()));
- ShortcutMgr.assignAccelerator(activityDiagram,
- ShortcutMgr.ACTION_ACTIVITY_DIAGRAM);
-
- JMenuItem deploymentDiagram =
- getCreateDiagramMenu().add(new ActionDeploymentDiagram());
- setMnemonic(deploymentDiagram, "Deployment Diagram");
- getCreateDiagramToolbar().add((new ActionDeploymentDiagram()));
- ShortcutMgr.assignAccelerator(deploymentDiagram,
- ShortcutMgr.ACTION_DEPLOYMENT_DIAGRAM);
-
- getCreateDiagramToolbar().setFloatable(true);
- }
-}
+// $Id:GenericArgoMenuBar.java 13104 2007-07-21 18:29:31Z mvw $
+// Copyright (c) 1996,2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.ui;
+
+import javax.swing.JMenuItem;
+
+import org.argouml.ui.cmd.GenericArgoMenuBar;
+import org.argouml.ui.cmd.ShortcutMgr;
+import org.argouml.uml.ui.ActionActivityDiagram;
+import org.argouml.uml.ui.ActionClassDiagram;
+import org.argouml.uml.ui.ActionDeploymentDiagram;
+import org.argouml.uml.ui.ActionSequenceDiagram;
+import org.argouml.uml.ui.ActionStateDiagram;
+import org.argouml.uml.ui.ActionUseCaseDiagram;
+
+/**
+ * The Menu and Toolbar for UML2.x
+ */
+public class MenuBar2 extends GenericArgoMenuBar {
+
+ /**
+ * Build the menu "Create" and the toolbar for diagram creation. These are
+ * build together to guarantee that the same items are present in both, and
+ * in the same sequence.
+ * <p>
+ *
+ * The sequence of these items was determined by issue 1821.
+ */
+ protected void initMenuCreate() {
+ super.initMenuCreate();
+ getCreateDiagramMenu().removeAll();
+ getCreateDiagramToolbar().removeAll();
+ JMenuItem usecaseDiagram = getCreateDiagramMenu()
+ .add(new ActionUseCaseDiagram());
+ setMnemonic(usecaseDiagram, "Usecase Diagram");
+ getCreateDiagramToolbar().add((new ActionUseCaseDiagram()));
+ ShortcutMgr.assignAccelerator(usecaseDiagram,
+ ShortcutMgr.ACTION_USE_CASE_DIAGRAM);
+
+ JMenuItem classDiagram =
+ getCreateDiagramMenu().add(new ActionClassDiagram());
+ setMnemonic(classDiagram, "Class Diagram");
+ getCreateDiagramToolbar().add((new ActionClassDiagram()));
+ ShortcutMgr.assignAccelerator(classDiagram,
+ ShortcutMgr.ACTION_CLASS_DIAGRAM);
+
+ JMenuItem sequenzDiagram =
+ getCreateDiagramMenu().add(new ActionSequenceDiagram());
+ setMnemonic(sequenzDiagram, "Sequenz Diagram");
+ getCreateDiagramToolbar().add((new ActionSequenceDiagram()));
+ ShortcutMgr.assignAccelerator(sequenzDiagram,
+ ShortcutMgr.ACTION_SEQUENCE_DIAGRAM);
+
+ JMenuItem stateDiagram =
+ getCreateDiagramMenu().add(new ActionStateDiagram());
+ setMnemonic(stateDiagram, "Statechart Diagram");
+ getCreateDiagramToolbar().add((new ActionStateDiagram()));
+ ShortcutMgr.assignAccelerator(stateDiagram,
+ ShortcutMgr.ACTION_STATE_DIAGRAM);
+
+ JMenuItem activityDiagram =
+ getCreateDiagramMenu().add(new ActionActivityDiagram());
+ setMnemonic(activityDiagram, "Activity Diagram");
+ getCreateDiagramToolbar().add((new ActionActivityDiagram()));
+ ShortcutMgr.assignAccelerator(activityDiagram,
+ ShortcutMgr.ACTION_ACTIVITY_DIAGRAM);
+
+ JMenuItem deploymentDiagram =
+ getCreateDiagramMenu().add(new ActionDeploymentDiagram());
+ setMnemonic(deploymentDiagram, "Deployment Diagram");
+ getCreateDiagramToolbar().add((new ActionDeploymentDiagram()));
+ ShortcutMgr.assignAccelerator(deploymentDiagram,
+ ShortcutMgr.ACTION_DEPLOYMENT_DIAGRAM);
+
+ getCreateDiagramToolbar().setFloatable(true);
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/ui/MenuBarFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/MenuBarFactory.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/MenuBarFactory.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/MenuBarFactory.java 2010-01-11 11:49:55-0800
@@ -1,51 +1,51 @@
-// $Id:GenericArgoMenuBar.java 13104 2007-07-21 18:29:31Z mvw $
-// Copyright (c) 1996,2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.ui;
-
-import org.argouml.model.Model;
-import org.argouml.ui.cmd.GenericArgoMenuBar;
-
-/**
- * A factory to create the menu bar for the application
- * @since 0.29.2
- */
-class MenuBarFactory {
-
- /**
- * Build the menu "Create" and the toolbar for diagram creation. These are
- * build together to guarantee that the same items are present in both, and
- * in the same sequence.
- * <p>
- *
- * The sequence of these items was determined by issue 1821.
- */
- static GenericArgoMenuBar createApplicationMenuBar() {
- if (Model.getFacade().getUmlVersion().charAt(0) == '2') {
- return new MenuBar2();
- } else {
- return new MenuBar14();
- }
- }
-}
+// $Id:GenericArgoMenuBar.java 13104 2007-07-21 18:29:31Z mvw $
+// Copyright (c) 1996,2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.ui;
+
+import org.argouml.model.Model;
+import org.argouml.ui.cmd.GenericArgoMenuBar;
+
+/**
+ * A factory to create the menu bar for the application
+ * @since 0.29.2
+ */
+class MenuBarFactory {
+
+ /**
+ * Build the menu "Create" and the toolbar for diagram creation. These are
+ * build together to guarantee that the same items are present in both, and
+ * in the same sequence.
+ * <p>
+ *
+ * The sequence of these items was determined by issue 1821.
+ */
+ static GenericArgoMenuBar createApplicationMenuBar() {
+ if (Model.getFacade().getUmlVersion().charAt(0) == '2') {
+ return new MenuBar2();
+ } else {
+ return new MenuBar14();
+ }
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/ui/explorer/ActionManageProfiles.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/explorer/ActionManageProfiles.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/explorer/ActionManageProfiles.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/explorer/ActionManageProfiles.java 2010-01-11 11:49:55-0800
@@ -1,4 +1,4 @@
-// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
+// $Id$
// Copyright (c) 2008 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
Modified: trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoCriticsToCritic.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoCriticsToCritic.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoCriticsToCritic.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoCriticsToCritic.java 2010-01-11 11:49:55-0800
@@ -1,4 +1,4 @@
-// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
+// $Id$
// Copyright (c) 2008 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
Modified: trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoProfileConfigurationToProfile.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoProfileConfigurationToProfile.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoProfileConfigurationToProfile.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoProfileConfigurationToProfile.java 2010-01-11 11:49:55-0800
@@ -1,64 +1,64 @@
-// $Id: GoProjectToModel.java 13040 2007-07-10 20:00:25Z linus $
-// Copyright (c) 1996-2006 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.ui.explorer.rules;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Set;
-
-import org.argouml.i18n.Translator;
-import org.argouml.kernel.ProfileConfiguration;
-
-/**
- * Rule for Project->Profile.
- *
- */
-public class GoProfileConfigurationToProfile extends AbstractPerspectiveRule {
-
- /*
- * @see org.argouml.ui.explorer.rules.PerspectiveRule#getRuleName()
- */
- public String getRuleName() {
- return Translator.localize("misc.profileconfiguration.profile");
- }
-
- /*
- * @see org.argouml.ui.explorer.rules.PerspectiveRule#getChildren(java.lang.Object)
- */
- public Collection getChildren(Object parent) {
- if (parent instanceof ProfileConfiguration) {
- return ((ProfileConfiguration) parent).getProfiles();
- }
- return Collections.EMPTY_SET;
- }
-
- /*
- * @see org.argouml.ui.explorer.rules.PerspectiveRule#getDependencies(java.lang.Object)
- */
- public Set getDependencies(Object parent) {
- // TODO: What?
- return Collections.EMPTY_SET;
- }
-}
+// $Id$
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.ui.explorer.rules;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
+
+import org.argouml.i18n.Translator;
+import org.argouml.kernel.ProfileConfiguration;
+
+/**
+ * Rule for Project->Profile.
+ *
+ */
+public class GoProfileConfigurationToProfile extends AbstractPerspectiveRule {
+
+ /*
+ * @see org.argouml.ui.explorer.rules.PerspectiveRule#getRuleName()
+ */
+ public String getRuleName() {
+ return Translator.localize("misc.profileconfiguration.profile");
+ }
+
+ /*
+ * @see org.argouml.ui.explorer.rules.PerspectiveRule#getChildren(java.lang.Object)
+ */
+ public Collection getChildren(Object parent) {
+ if (parent instanceof ProfileConfiguration) {
+ return ((ProfileConfiguration) parent).getProfiles();
+ }
+ return Collections.EMPTY_SET;
+ }
+
+ /*
+ * @see org.argouml.ui.explorer.rules.PerspectiveRule#getDependencies(java.lang.Object)
+ */
+ public Set getDependencies(Object parent) {
+ // TODO: What?
+ return Collections.EMPTY_SET;
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoProjectToProfileConfiguration.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoProjectToProfileConfiguration.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoProjectToProfileConfiguration.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/explorer/rules/GoProjectToProfileConfiguration.java 2010-01-11 11:49:55-0800
@@ -1,67 +1,67 @@
-// $Id: GoProjectToModel.java 13040 2007-07-10 20:00:25Z linus $
-// Copyright (c) 1996-2006 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.ui.explorer.rules;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Set;
-
-import org.argouml.i18n.Translator;
-import org.argouml.kernel.Project;
-
-/**
- * Rule for Project->Profile.
- *
- */
-public class GoProjectToProfileConfiguration extends AbstractPerspectiveRule {
-
- /*
- * @see org.argouml.ui.explorer.rules.PerspectiveRule#getRuleName()
- */
- public String getRuleName() {
- return Translator.localize("misc.project.profileconfiguration");
- }
-
- /*
- * @see org.argouml.ui.explorer.rules.PerspectiveRule#getChildren(java.lang.Object)
- */
- public Collection getChildren(Object parent) {
- if (parent instanceof Project) {
- Collection l = new ArrayList();
- l.add(((Project) parent).getProfileConfiguration());
- return l;
- }
- return Collections.EMPTY_LIST;
- }
-
- /*
- * @see org.argouml.ui.explorer.rules.PerspectiveRule#getDependencies(java.lang.Object)
- */
- public Set getDependencies(Object parent) {
- // TODO: What?
- return Collections.EMPTY_SET;
- }
-}
+// $Id$
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.ui.explorer.rules;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
+
+import org.argouml.i18n.Translator;
+import org.argouml.kernel.Project;
+
+/**
+ * Rule for Project->Profile.
+ *
+ */
+public class GoProjectToProfileConfiguration extends AbstractPerspectiveRule {
+
+ /*
+ * @see org.argouml.ui.explorer.rules.PerspectiveRule#getRuleName()
+ */
+ public String getRuleName() {
+ return Translator.localize("misc.project.profileconfiguration");
+ }
+
+ /*
+ * @see org.argouml.ui.explorer.rules.PerspectiveRule#getChildren(java.lang.Object)
+ */
+ public Collection getChildren(Object parent) {
+ if (parent instanceof Project) {
+ Collection l = new ArrayList();
+ l.add(((Project) parent).getProfileConfiguration());
+ return l;
+ }
+ return Collections.EMPTY_LIST;
+ }
+
+ /*
+ * @see org.argouml.ui.explorer.rules.PerspectiveRule#getDependencies(java.lang.Object)
+ */
+ public Set getDependencies(Object parent) {
+ // TODO: What?
+ return Collections.EMPTY_SET;
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/cognitive/critics/CrProfile.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/cognitive/critics/CrProfile.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/cognitive/critics/CrProfile.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/cognitive/critics/CrProfile.java 2010-01-11 11:49:55-0800
@@ -1,75 +1,75 @@
-// $Id: CrProfile.java 13040 2007-07-10 20:00:25Z linus $
-// Copyright (c) 1996-2006 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.cognitive.critics;
-
-import org.argouml.cognitive.Translator;
-
-/**
- * "Abstract" Critic subclass that captures commonalities among all
- * critics defined by profiles. This class also defines and registers
- * the categories of design decisions that the critics can
- * address.
- *
- * @see org.argouml.cognitive.Designer
- * @see org.argouml.cognitive.DecisionModel
- *
- * @author maurelio1234
- */
-public class CrProfile extends CrUML {
- private String localizationPrefix;
-
- /**
- * The constructor for this class.<br>
- * <br>
- * By default, CrUML looks for localized strings under the <code>"critics"
- * </code> prefix. Since profiles cannot include their strings at the
- * <code>critics.profile</code> file located at the ArgoUML source code this
- * class allows critics defined on profile plug-ins to define look for
- * localized strings at other files.
- *
- * @param prefix the prefix of the localized strings
- */
- public CrProfile(final String prefix) {
- super();
-
- if (prefix == null || "".equals(prefix)) {
- this.localizationPrefix = "critics";
- } else {
- this.localizationPrefix = prefix;
- }
-
- setupHeadAndDesc();
- }
-
- @Override
- protected String getLocalizedString(String key, String suffix) {
- return Translator.localize(localizationPrefix + "." + key + suffix);
- }
-
- /**
- * The UID.
- */
- private static final long serialVersionUID = 1785043010468681602L;
-}
+// $Id$
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.cognitive.critics;
+
+import org.argouml.cognitive.Translator;
+
+/**
+ * "Abstract" Critic subclass that captures commonalities among all
+ * critics defined by profiles. This class also defines and registers
+ * the categories of design decisions that the critics can
+ * address.
+ *
+ * @see org.argouml.cognitive.Designer
+ * @see org.argouml.cognitive.DecisionModel
+ *
+ * @author maurelio1234
+ */
+public class CrProfile extends CrUML {
+ private String localizationPrefix;
+
+ /**
+ * The constructor for this class.<br>
+ * <br>
+ * By default, CrUML looks for localized strings under the <code>"critics"
+ * </code> prefix. Since profiles cannot include their strings at the
+ * <code>critics.profile</code> file located at the ArgoUML source code this
+ * class allows critics defined on profile plug-ins to define look for
+ * localized strings at other files.
+ *
+ * @param prefix the prefix of the localized strings
+ */
+ public CrProfile(final String prefix) {
+ super();
+
+ if (prefix == null || "".equals(prefix)) {
+ this.localizationPrefix = "critics";
+ } else {
+ this.localizationPrefix = prefix;
+ }
+
+ setupHeadAndDesc();
+ }
+
+ @Override
+ protected String getLocalizedString(String key, String suffix) {
+ return Translator.localize(localizationPrefix + "." + key + suffix);
+ }
+
+ /**
+ * The UID.
+ */
+ private static final long serialVersionUID = 1785043010468681602L;
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/cognitive/critics/ProfileCodeGeneration.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/cognitive/critics/ProfileCodeGeneration.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/cognitive/critics/ProfileCodeGeneration.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/cognitive/critics/ProfileCodeGeneration.java 2010-01-11 11:49:55-0800
@@ -1,4 +1,4 @@
-// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
+// $Id$
// Copyright (c) 2008 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
Modified: trunk/src/argouml-app/src/org/argouml/uml/cognitive/critics/ProfileGoodPractices.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/cognitive/critics/ProfileGoodPractices.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/cognitive/critics/ProfileGoodPractices.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/cognitive/critics/ProfileGoodPractices.java 2010-01-11 11:49:55-0800
@@ -1,4 +1,4 @@
-// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
+// $Id$
// Copyright (c) 2008 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramEdgeSettings.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramEdgeSettings.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramEdgeSettings.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramEdgeSettings.java 2010-01-11 11:49:55-0800
@@ -1,47 +1,47 @@
-// $Id: DiagramEdgeSettings.java 11347 2006-10-26 22:37:44Z linus $
-// Copyright (c) 2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.diagram;
-
-public class DiagramEdgeSettings extends DiagramElementSettings {
-
- private final Object sourceConnector;
- private final Object destinationConnector;
-
- public DiagramEdgeSettings(
- final Object modelElement,
- final Object sourceConnector,
- final Object destinationConnector) {
- super(modelElement);
- this.sourceConnector = sourceConnector;
- this.destinationConnector = destinationConnector;
- }
-
- public Object getSourceConnector() {
- return sourceConnector;
- }
- public Object getDestinationConnector() {
- return destinationConnector;
- }
-}
+// $Id$
+// Copyright (c) 2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.diagram;
+
+public class DiagramEdgeSettings extends DiagramElementSettings {
+
+ private final Object sourceConnector;
+ private final Object destinationConnector;
+
+ public DiagramEdgeSettings(
+ final Object modelElement,
+ final Object sourceConnector,
+ final Object destinationConnector) {
+ super(modelElement);
+ this.sourceConnector = sourceConnector;
+ this.destinationConnector = destinationConnector;
+ }
+
+ public Object getSourceConnector() {
+ return sourceConnector;
+ }
+ public Object getDestinationConnector() {
+ return destinationConnector;
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramElement.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramElement.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramElement.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramElement.java 2010-01-11 11:49:55-0800
@@ -1,36 +1,36 @@
-// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
-// Copyright (c) 2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.diagram;
-
-/**
- * The base class interface for all diagram elements. This interface is used
- * to abstract away the knowledge of what actual implementation is used
- * to store diagram elements. These are currently Figs from the GEF library.
- *
- * @author Bob Tarling
- */
-public interface DiagramElement {
-
-}
+// $Id$
+// Copyright (c) 2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.diagram;
+
+/**
+ * The base class interface for all diagram elements. This interface is used
+ * to abstract away the knowledge of what actual implementation is used
+ * to store diagram elements. These are currently Figs from the GEF library.
+ *
+ * @author Bob Tarling
+ */
+public interface DiagramElement {
+
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramElementSettings.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramElementSettings.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramElementSettings.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramElementSettings.java 2010-01-11 11:49:55-0800
@@ -1,45 +1,45 @@
-// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
-// Copyright (c) 2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.diagram;
-
-/**
- * Diagram element related settings to be supplied at construction of a
- * diagram element.
- *
- * @author Bob Tarling
- */
-public class DiagramElementSettings {
-
- private final Object owner;
-
- public DiagramElementSettings(final Object owner) {
- this.owner = owner;
- }
-
- public Object getOwner() {
- return owner;
- }
-
-}
+// $Id$
+// Copyright (c) 2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.diagram;
+
+/**
+ * Diagram element related settings to be supplied at construction of a
+ * diagram element.
+ *
+ * @author Bob Tarling
+ */
+public class DiagramElementSettings {
+
+ private final Object owner;
+
+ public DiagramElementSettings(final Object owner) {
+ this.owner = owner;
+ }
+
+ public Object getOwner() {
+ return owner;
+ }
+
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/ModeContract.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/ModeContract.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/ModeContract.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/ModeContract.java 2010-01-11 11:49:55-0800
@@ -1,123 +1,123 @@
-// $Id: ModeContract.java 11516 2006-11-25 04:30:15Z tfmorris $
-// Copyright (c) 1996-2006 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.diagram.sequence.ui;
-
-import java.awt.Color;
-import java.awt.Graphics;
-
-import java.awt.event.MouseEvent;
-
-import org.tigris.gef.base.Editor;
-import org.tigris.gef.base.FigModifyingModeImpl;
-import org.tigris.gef.base.Globals;
-
-import org.argouml.i18n.Translator;
-
-public class ModeContract extends FigModifyingModeImpl {
-
- private int startX, startY, currentY;
- private Editor editor;
- private Color rubberbandColor;
-
- /**
- * The constructor.
- *
- */
- public ModeContract() {
- editor = Globals.curEditor();
- rubberbandColor = Globals.getPrefs().getRubberbandColor();
- }
-
- /*
- * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
- */
- public void mousePressed(MouseEvent me) {
- if (me.isConsumed()) {
- return;
- }
-
- startY = me.getY();
- startX = me.getX();
- start();
- me.consume();
- }
-
- /*
- * @see java.awt.event.MouseMotionListener#mouseDragged(java.awt.event.MouseEvent)
- */
- public void mouseDragged(MouseEvent me) {
- if (me.isConsumed()) {
- return;
- }
-
- currentY = me.getY();
- editor.damageAll();
- me.consume();
- }
-
- /*
- * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
- */
- public void mouseReleased(MouseEvent me) {
- if (me.isConsumed()) {
- return;
- }
-
- SequenceDiagramLayer layer =
- (SequenceDiagramLayer) Globals.curEditor().getLayerManager()
- .getActiveLayer();
- int endY = me.getY();
- int startOffset = layer.getNodeIndex(startY);
- int endOffset;
- if (startY > endY) {
- endOffset = startOffset;
- startOffset = layer.getNodeIndex(endY);
- } else {
- endOffset = layer.getNodeIndex(endY);
- }
- int diff = endOffset - startOffset;
- if (diff > 0) {
- layer.contractDiagram(startOffset, diff);
- }
-
- me.consume();
- done();
- }
-
- /*
- * @see org.tigris.gef.base.FigModifyingMode#paint(java.awt.Graphics)
- */
- public void paint(Graphics g) {
- g.setColor(rubberbandColor);
- g.drawLine(startX, startY, startX, currentY);
- }
-
- /*
- * @see org.tigris.gef.base.FigModifyingMode#instructions()
- */
- public String instructions() {
- return Translator.localize("action.sequence-contract");
- }
-}
+// $Id$
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.diagram.sequence.ui;
+
+import java.awt.Color;
+import java.awt.Graphics;
+
+import java.awt.event.MouseEvent;
+
+import org.tigris.gef.base.Editor;
+import org.tigris.gef.base.FigModifyingModeImpl;
+import org.tigris.gef.base.Globals;
+
+import org.argouml.i18n.Translator;
+
+public class ModeContract extends FigModifyingModeImpl {
+
+ private int startX, startY, currentY;
+ private Editor editor;
+ private Color rubberbandColor;
+
+ /**
+ * The constructor.
+ *
+ */
+ public ModeContract() {
+ editor = Globals.curEditor();
+ rubberbandColor = Globals.getPrefs().getRubberbandColor();
+ }
+
+ /*
+ * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
+ */
+ public void mousePressed(MouseEvent me) {
+ if (me.isConsumed()) {
+ return;
+ }
+
+ startY = me.getY();
+ startX = me.getX();
+ start();
+ me.consume();
+ }
+
+ /*
+ * @see java.awt.event.MouseMotionListener#mouseDragged(java.awt.event.MouseEvent)
+ */
+ public void mouseDragged(MouseEvent me) {
+ if (me.isConsumed()) {
+ return;
+ }
+
+ currentY = me.getY();
+ editor.damageAll();
+ me.consume();
+ }
+
+ /*
+ * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
+ */
+ public void mouseReleased(MouseEvent me) {
+ if (me.isConsumed()) {
+ return;
+ }
+
+ SequenceDiagramLayer layer =
+ (SequenceDiagramLayer) Globals.curEditor().getLayerManager()
+ .getActiveLayer();
+ int endY = me.getY();
+ int startOffset = layer.getNodeIndex(startY);
+ int endOffset;
+ if (startY > endY) {
+ endOffset = startOffset;
+ startOffset = layer.getNodeIndex(endY);
+ } else {
+ endOffset = layer.getNodeIndex(endY);
+ }
+ int diff = endOffset - startOffset;
+ if (diff > 0) {
+ layer.contractDiagram(startOffset, diff);
+ }
+
+ me.consume();
+ done();
+ }
+
+ /*
+ * @see org.tigris.gef.base.FigModifyingMode#paint(java.awt.Graphics)
+ */
+ public void paint(Graphics g) {
+ g.setColor(rubberbandColor);
+ g.drawLine(startX, startY, startX, currentY);
+ }
+
+ /*
+ * @see org.tigris.gef.base.FigModifyingMode#instructions()
+ */
+ public String instructions() {
+ return Translator.localize("action.sequence-contract");
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/ModeExpand.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/ModeExpand.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/ModeExpand.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/ModeExpand.java 2010-01-11 11:49:55-0800
@@ -1,122 +1,122 @@
-// $Id: ModeChangeHeight.java 11516 2006-11-25 04:30:15Z tfmorris $
-// Copyright (c) 1996-2006 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.diagram.sequence.ui;
-
-import java.awt.Color;
-import java.awt.Graphics;
-
-import java.awt.event.MouseEvent;
-
-import org.tigris.gef.base.Editor;
-import org.tigris.gef.base.FigModifyingModeImpl;
-import org.tigris.gef.base.Globals;
-
-import org.argouml.i18n.Translator;
-
-public class ModeExpand extends FigModifyingModeImpl {
-
- private int startX, startY, currentY;
- private Editor editor;
- private Color rubberbandColor;
-
- /**
- * The constructor.
- *
- */
- public ModeExpand() {
- editor = Globals.curEditor();
- rubberbandColor = Globals.getPrefs().getRubberbandColor();
- }
-
- /*
- * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
- */
- public void mousePressed(MouseEvent me) {
- if (me.isConsumed()) {
- return;
- }
-
- startY = me.getY();
- startX = me.getX();
- start();
- me.consume();
- }
-
- /*
- * @see java.awt.event.MouseMotionListener#mouseDragged(java.awt.event.MouseEvent)
- */
- public void mouseDragged(MouseEvent me) {
- if (me.isConsumed()) {
- return;
- }
-
- currentY = me.getY();
- editor.damageAll();
- me.consume();
- }
-
- /*
- * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
- */
- public void mouseReleased(MouseEvent me) {
- if (me.isConsumed()) {
- return;
- }
-
- SequenceDiagramLayer layer =
- (SequenceDiagramLayer) Globals.curEditor().getLayerManager()
- .getActiveLayer();
- int endY = me.getY();
- int startOffset = layer.getNodeIndex(startY);
- if (startOffset > 0 && endY < startY) {
- startOffset--;
- }
- int diff = layer.getNodeIndex(endY) - startOffset;
- if (diff < 0) {
- diff = -diff;
- }
- if (diff > 0) {
- layer.expandDiagram(startOffset, diff);
- }
-
- me.consume();
- done();
- }
-
- /*
- * @see org.tigris.gef.base.FigModifyingMode#paint(java.awt.Graphics)
- */
- public void paint(Graphics g) {
- g.setColor(rubberbandColor);
- g.drawLine(startX, startY, startX, currentY);
- }
-
- /*
- * @see org.tigris.gef.base.FigModifyingMode#instructions()
- */
- public String instructions() {
- return Translator.localize("action.sequence-expand");
- }
-}
+// $Id$
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.diagram.sequence.ui;
+
+import java.awt.Color;
+import java.awt.Graphics;
+
+import java.awt.event.MouseEvent;
+
+import org.tigris.gef.base.Editor;
+import org.tigris.gef.base.FigModifyingModeImpl;
+import org.tigris.gef.base.Globals;
+
+import org.argouml.i18n.Translator;
+
+public class ModeExpand extends FigModifyingModeImpl {
+
+ private int startX, startY, currentY;
+ private Editor editor;
+ private Color rubberbandColor;
+
+ /**
+ * The constructor.
+ *
+ */
+ public ModeExpand() {
+ editor = Globals.curEditor();
+ rubberbandColor = Globals.getPrefs().getRubberbandColor();
+ }
+
+ /*
+ * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
+ */
+ public void mousePressed(MouseEvent me) {
+ if (me.isConsumed()) {
+ return;
+ }
+
+ startY = me.getY();
+ startX = me.getX();
+ start();
+ me.consume();
+ }
+
+ /*
+ * @see java.awt.event.MouseMotionListener#mouseDragged(java.awt.event.MouseEvent)
+ */
+ public void mouseDragged(MouseEvent me) {
+ if (me.isConsumed()) {
+ return;
+ }
+
+ currentY = me.getY();
+ editor.damageAll();
+ me.consume();
+ }
+
+ /*
+ * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
+ */
+ public void mouseReleased(MouseEvent me) {
+ if (me.isConsumed()) {
+ return;
+ }
+
+ SequenceDiagramLayer layer =
+ (SequenceDiagramLayer) Globals.curEditor().getLayerManager()
+ .getActiveLayer();
+ int endY = me.getY();
+ int startOffset = layer.getNodeIndex(startY);
+ if (startOffset > 0 && endY < startY) {
+ startOffset--;
+ }
+ int diff = layer.getNodeIndex(endY) - startOffset;
+ if (diff < 0) {
+ diff = -diff;
+ }
+ if (diff > 0) {
+ layer.expandDiagram(startOffset, diff);
+ }
+
+ me.consume();
+ done();
+ }
+
+ /*
+ * @see org.tigris.gef.base.FigModifyingMode#paint(java.awt.Graphics)
+ */
+ public void paint(Graphics g) {
+ g.setColor(rubberbandColor);
+ g.drawLine(startX, startY, startX, currentY);
+ }
+
+ /*
+ * @see org.tigris.gef.base.FigModifyingMode#instructions()
+ */
+ public String instructions() {
+ return Translator.localize("action.sequence-expand");
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddExistingNodes.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddExistingNodes.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddExistingNodes.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddExistingNodes.java 2010-01-11 11:49:55-0800
@@ -1,147 +1,147 @@
-// $Id$
-// Copyright (c) 2006-2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-
-package org.argouml.uml.diagram.ui;
-
-import java.awt.Point;
-import java.awt.event.ActionEvent;
-import java.util.Collection;
-
-import org.argouml.i18n.Translator;
-import org.argouml.model.Model;
-import org.argouml.ui.targetmanager.TargetManager;
-import org.argouml.uml.diagram.ArgoDiagram;
-import org.argouml.uml.diagram.DiagramUtils;
-import org.tigris.gef.base.Editor;
-import org.tigris.gef.base.Globals;
-import org.tigris.gef.graph.GraphModel;
-import org.tigris.gef.graph.MutableGraphModel;
-import org.argouml.ui.UndoableAction;
-
-/**
-* ActionAddExistingNodes enables pasting of existing nodes into a Diagram.
-*
-* @author Thomas Neustupny
-*/
-public class ActionAddExistingNodes extends UndoableAction {
-
- /**
- * The UML objects to be added to the diagram.
- */
- private Collection objects;
-
- /**
- * The Constructor.
- *
- * @param name the localized name of the action
- * @param coll the UML objects to be added
- */
- public ActionAddExistingNodes(String name, Collection coll) {
- super(name);
- objects = coll;
- }
-
- /*
- * @see javax.swing.Action#isEnabled()
- */
- @Override
- public boolean isEnabled() {
- ArgoDiagram dia = DiagramUtils.getActiveDiagram();
- if (dia == null) {
- return false;
- }
- MutableGraphModel gm = (MutableGraphModel) dia.getGraphModel();
- for (Object o : objects) {
- if (gm.canAddNode(o)) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public void actionPerformed(ActionEvent ae) {
- super.actionPerformed(ae);
- Editor ce = Globals.curEditor();
- GraphModel gm = ce.getGraphModel();
- if (!(gm instanceof MutableGraphModel)) {
- return;
- }
-
- String instructions =
- Translator.localize(
- "misc.message.click-on-diagram-to-add");
- Globals.showStatus(instructions);
-
- final ModeAddToDiagram placeMode = new ModeAddToDiagram(
- objects,
- instructions);
-
- Globals.mode(placeMode, false);
- }
-
- /**
- * @param modelElements the modelelements to add Nodes for
- * @param location the point where to drop the node.
- * Also <code>null</code> is acceptable.
- * @param diagram the diagram to add the nodes to
- */
- public static void addNodes(Collection modelElements,
- Point location, ArgoDiagram diagram) {
- MutableGraphModel gm = (MutableGraphModel) diagram.getGraphModel();
- Collection oldTargets = TargetManager.getInstance().getTargets();
- int count = 0;
- for (Object me : modelElements) {
- if (diagram instanceof UMLDiagram
- && ((UMLDiagram) diagram).doesAccept(me)) {
- ((UMLDiagram) diagram).drop(me, location);
- } else if (Model.getFacade().isANaryAssociation(me)) {
- AddExistingNodeCommand cmd =
- new AddExistingNodeCommand(me, location,
- count++);
- cmd.execute();
- } else if (Model.getFacade().isAUMLElement(me)) {
- if (gm.canAddEdge(me)) {
- gm.addEdge(me);
- // TODO: An AssociationClass should be possible to add
- // as a side effect of adding a node and its related
- // edges, but that doesn't work as things are currently
- // structured. - tfm 20061208
- if (Model.getFacade().isAAssociationClass(me)) {
- ModeCreateAssociationClass.buildInActiveLayer(
- Globals.curEditor(),
- me);
- }
- } else if (gm.canAddNode(me)) {
- AddExistingNodeCommand cmd =
- new AddExistingNodeCommand(me, location,
- count++);
- cmd.execute();
- }
- }
- }
- TargetManager.getInstance().setTargets(oldTargets);
- }
-}
+// $Id$
+// Copyright (c) 2006-2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+
+package org.argouml.uml.diagram.ui;
+
+import java.awt.Point;
+import java.awt.event.ActionEvent;
+import java.util.Collection;
+
+import org.argouml.i18n.Translator;
+import org.argouml.model.Model;
+import org.argouml.ui.targetmanager.TargetManager;
+import org.argouml.uml.diagram.ArgoDiagram;
+import org.argouml.uml.diagram.DiagramUtils;
+import org.tigris.gef.base.Editor;
+import org.tigris.gef.base.Globals;
+import org.tigris.gef.graph.GraphModel;
+import org.tigris.gef.graph.MutableGraphModel;
+import org.argouml.ui.UndoableAction;
+
+/**
+* ActionAddExistingNodes enables pasting of existing nodes into a Diagram.
+*
+* @author Thomas Neustupny
+*/
+public class ActionAddExistingNodes extends UndoableAction {
+
+ /**
+ * The UML objects to be added to the diagram.
+ */
+ private Collection objects;
+
+ /**
+ * The Constructor.
+ *
+ * @param name the localized name of the action
+ * @param coll the UML objects to be added
+ */
+ public ActionAddExistingNodes(String name, Collection coll) {
+ super(name);
+ objects = coll;
+ }
+
+ /*
+ * @see javax.swing.Action#isEnabled()
+ */
+ @Override
+ public boolean isEnabled() {
+ ArgoDiagram dia = DiagramUtils.getActiveDiagram();
+ if (dia == null) {
+ return false;
+ }
+ MutableGraphModel gm = (MutableGraphModel) dia.getGraphModel();
+ for (Object o : objects) {
+ if (gm.canAddNode(o)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent ae) {
+ super.actionPerformed(ae);
+ Editor ce = Globals.curEditor();
+ GraphModel gm = ce.getGraphModel();
+ if (!(gm instanceof MutableGraphModel)) {
+ return;
+ }
+
+ String instructions =
+ Translator.localize(
+ "misc.message.click-on-diagram-to-add");
+ Globals.showStatus(instructions);
+
+ final ModeAddToDiagram placeMode = new ModeAddToDiagram(
+ objects,
+ instructions);
+
+ Globals.mode(placeMode, false);
+ }
+
+ /**
+ * @param modelElements the modelelements to add Nodes for
+ * @param location the point where to drop the node.
+ * Also <code>null</code> is acceptable.
+ * @param diagram the diagram to add the nodes to
+ */
+ public static void addNodes(Collection modelElements,
+ Point location, ArgoDiagram diagram) {
+ MutableGraphModel gm = (MutableGraphModel) diagram.getGraphModel();
+ Collection oldTargets = TargetManager.getInstance().getTargets();
+ int count = 0;
+ for (Object me : modelElements) {
+ if (diagram instanceof UMLDiagram
+ && ((UMLDiagram) diagram).doesAccept(me)) {
+ ((UMLDiagram) diagram).drop(me, location);
+ } else if (Model.getFacade().isANaryAssociation(me)) {
+ AddExistingNodeCommand cmd =
+ new AddExistingNodeCommand(me, location,
+ count++);
+ cmd.execute();
+ } else if (Model.getFacade().isAUMLElement(me)) {
+ if (gm.canAddEdge(me)) {
+ gm.addEdge(me);
+ // TODO: An AssociationClass should be possible to add
+ // as a side effect of adding a node and its related
+ // edges, but that doesn't work as things are currently
+ // structured. - tfm 20061208
+ if (Model.getFacade().isAAssociationClass(me)) {
+ ModeCreateAssociationClass.buildInActiveLayer(
+ Globals.curEditor(),
+ me);
+ }
+ } else if (gm.canAddNode(me)) {
+ AddExistingNodeCommand cmd =
+ new AddExistingNodeCommand(me, location,
+ count++);
+ cmd.execute();
+ }
+ }
+ }
+ TargetManager.getInstance().setTargets(oldTargets);
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddStereotype.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddStereotype.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddStereotype.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionAddStereotype.java 2010-01-11 11:49:55-0800
@@ -1,108 +1,108 @@
-// $Id: ActionAddStereotype.java 13040 2007-07-10 20:00:25Z linus $
-// Copyright (c) 1996-2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.diagram.ui;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.Action;
-
-import org.argouml.i18n.Translator;
-import org.argouml.kernel.Project;
-import org.argouml.kernel.ProjectManager;
-import org.argouml.kernel.ProjectSettings;
-import org.argouml.kernel.UmlModelMutator;
-import org.argouml.model.Model;
-import org.argouml.notation.providers.uml.NotationUtilityUml;
-import org.argouml.ui.UndoableAction;
-
-
-/**
- * Action to add a stereotype to a model element.
- *
- * TODO: Appears to be unused?
- *
- * @author Bob Tarling
- * @deprecated for 0.27.2 by tfmorris. Use
- * {@link org.argouml.uml.ActionAddStereotype}.
- */
-@Deprecated
-@UmlModelMutator
-class ActionAddStereotype extends UndoableAction {
- private Object modelElement;
- private Object stereotype;
-
- /**
- * Constructor.
- *
- * @param me The model element.
- * @param st The stereotype.
- */
- public ActionAddStereotype(Object me, Object st) {
- super(Translator.localize(buildString(st)),
- null);
- // Set the tooltip string:
- putValue(Action.SHORT_DESCRIPTION,
- Translator.localize(buildString(st)));
- modelElement = me;
- stereotype = st;
- }
-
- private static String buildString(Object st) {
- Project p = ProjectManager.getManager().getCurrentProject();
- ProjectSettings ps = p.getProjectSettings();
- return NotationUtilityUml.generateStereotype(st,
- ps.getNotationSettings().isUseGuillemets());
- }
-
- /*
- * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
- */
- @Override
- public void actionPerformed(ActionEvent ae) {
- super.actionPerformed(ae);
- if (Model.getFacade().getStereotypes(modelElement)
- .contains(stereotype)) {
- Model.getCoreHelper().removeStereotype(modelElement, stereotype);
- } else {
- Model.getCoreHelper().addStereotype(modelElement, stereotype);
- }
- }
-
- /*
- * @see javax.swing.Action#getValue(java.lang.String)
- */
- @Override
- public Object getValue(String key) {
- if ("SELECTED".equals(key)) {
- if (Model.getFacade().getStereotypes(modelElement).contains(
- stereotype)) {
- return Boolean.TRUE;
- } else {
- return Boolean.FALSE;
- }
- }
- return super.getValue(key);
- }
-}
+// $Id$
+// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.diagram.ui;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.Action;
+
+import org.argouml.i18n.Translator;
+import org.argouml.kernel.Project;
+import org.argouml.kernel.ProjectManager;
+import org.argouml.kernel.ProjectSettings;
+import org.argouml.kernel.UmlModelMutator;
+import org.argouml.model.Model;
+import org.argouml.notation.providers.uml.NotationUtilityUml;
+import org.argouml.ui.UndoableAction;
+
+
+/**
+ * Action to add a stereotype to a model element.
+ *
+ * TODO: Appears to be unused?
+ *
+ * @author Bob Tarling
+ * @deprecated for 0.27.2 by tfmorris. Use
+ * {@link org.argouml.uml.ActionAddStereotype}.
+ */
+@Deprecated
+@UmlModelMutator
+class ActionAddStereotype extends UndoableAction {
+ private Object modelElement;
+ private Object stereotype;
+
+ /**
+ * Constructor.
+ *
+ * @param me The model element.
+ * @param st The stereotype.
+ */
+ public ActionAddStereotype(Object me, Object st) {
+ super(Translator.localize(buildString(st)),
+ null);
+ // Set the tooltip string:
+ putValue(Action.SHORT_DESCRIPTION,
+ Translator.localize(buildString(st)));
+ modelElement = me;
+ stereotype = st;
+ }
+
+ private static String buildString(Object st) {
+ Project p = ProjectManager.getManager().getCurrentProject();
+ ProjectSettings ps = p.getProjectSettings();
+ return NotationUtilityUml.generateStereotype(st,
+ ps.getNotationSettings().isUseGuillemets());
+ }
+
+ /*
+ * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+ */
+ @Override
+ public void actionPerformed(ActionEvent ae) {
+ super.actionPerformed(ae);
+ if (Model.getFacade().getStereotypes(modelElement)
+ .contains(stereotype)) {
+ Model.getCoreHelper().removeStereotype(modelElement, stereotype);
+ } else {
+ Model.getCoreHelper().addStereotype(modelElement, stereotype);
+ }
+ }
+
+ /*
+ * @see javax.swing.Action#getValue(java.lang.String)
+ */
+ @Override
+ public Object getValue(String key) {
+ if ("SELECTED".equals(key)) {
+ if (Model.getFacade().getStereotypes(modelElement).contains(
+ stereotype)) {
+ return Boolean.TRUE;
+ } else {
+ return Boolean.FALSE;
+ }
+ }
+ return super.getValue(key);
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeView.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeView.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeView.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeView.java 2010-01-11 11:49:55-0800
@@ -1,92 +1,92 @@
-// $Id: ActionStereotypeView.java 13040 2007-07-10 20:00:25Z linus $
-// Copyright (c) 2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.diagram.ui;
-
-/**
- * The UML 2.0 Profile specification allows three visualizations for the
- * stereotypes applied on a model element:
- *
- * <ul>
- * <li>The stereotype name in guilmets (<< >>'s)</li>
- * <li>An icon replacing the default visualization</li>
- * <li>A small icon flying over the default visualization</li>
- * </ul>
- *
- * An popup submenu is provided in order to allow the user switching between
- * these modes. This class keeps the code that should be commonly shared
- * among all the visualization options.
- *
- * @see FigNodeModelElement#getPopUpActions(java.awt.event.MouseEvent)
- *
- * @author maurelio1234
- */
-public abstract class ActionStereotypeView extends AbstractActionRadioMenuItem {
-
- private FigNodeModelElement targetNode;
- private int selectedStereotypeView;
-
- /**
- * The default constructor for this class
- *
- * @param node the selected node
- * @param key the internationalization key used to label this action
- * @param stereotypeView the stereotype view that is activated when this
- * action is triggered
- */
- public ActionStereotypeView(FigNodeModelElement node, String key,
- int stereotypeView) {
- super(key, false);
-
- this.targetNode = node;
- this.selectedStereotypeView = stereotypeView;
- updateSelection();
- }
-
- private void updateSelection() {
- putValue("SELECTED", Boolean
- .valueOf(targetNode.getStereotypeView()
- == selectedStereotypeView));
- }
-
- /**
- * @see org.argouml.uml.diagram.ui.AbstractActionRadioMenuItem#toggleValueOfTarget(java.lang.Object)
- */
- void toggleValueOfTarget(Object t) {
- targetNode.setStereotypeView(selectedStereotypeView);
- updateSelection();
- }
-
- /**
- * @see org.argouml.uml.diagram.ui.AbstractActionRadioMenuItem#valueOfTarget(java.lang.Object)
- */
- Object valueOfTarget(Object t) {
- if (t instanceof FigNodeModelElement) {
- return Integer.valueOf(((FigNodeModelElement) t).getStereotypeView());
- } else {
- return t;
- }
- }
-
-}
+// $Id$
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.diagram.ui;
+
+/**
+ * The UML 2.0 Profile specification allows three visualizations for the
+ * stereotypes applied on a model element:
+ *
+ * <ul>
+ * <li>The stereotype name in guilmets (<< >>'s)</li>
+ * <li>An icon replacing the default visualization</li>
+ * <li>A small icon flying over the default visualization</li>
+ * </ul>
+ *
+ * An popup submenu is provided in order to allow the user switching between
+ * these modes. This class keeps the code that should be commonly shared
+ * among all the visualization options.
+ *
+ * @see FigNodeModelElement#getPopUpActions(java.awt.event.MouseEvent)
+ *
+ * @author maurelio1234
+ */
+public abstract class ActionStereotypeView extends AbstractActionRadioMenuItem {
+
+ private FigNodeModelElement targetNode;
+ private int selectedStereotypeView;
+
+ /**
+ * The default constructor for this class
+ *
+ * @param node the selected node
+ * @param key the internationalization key used to label this action
+ * @param stereotypeView the stereotype view that is activated when this
+ * action is triggered
+ */
+ public ActionStereotypeView(FigNodeModelElement node, String key,
+ int stereotypeView) {
+ super(key, false);
+
+ this.targetNode = node;
+ this.selectedStereotypeView = stereotypeView;
+ updateSelection();
+ }
+
+ private void updateSelection() {
+ putValue("SELECTED", Boolean
+ .valueOf(targetNode.getStereotypeView()
+ == selectedStereotypeView));
+ }
+
+ /**
+ * @see org.argouml.uml.diagram.ui.AbstractActionRadioMenuItem#toggleValueOfTarget(java.lang.Object)
+ */
+ void toggleValueOfTarget(Object t) {
+ targetNode.setStereotypeView(selectedStereotypeView);
+ updateSelection();
+ }
+
+ /**
+ * @see org.argouml.uml.diagram.ui.AbstractActionRadioMenuItem#valueOfTarget(java.lang.Object)
+ */
+ Object valueOfTarget(Object t) {
+ if (t instanceof FigNodeModelElement) {
+ return Integer.valueOf(((FigNodeModelElement) t).getStereotypeView());
+ } else {
+ return t;
+ }
+ }
+
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeViewBigIcon.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeViewBigIcon.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeViewBigIcon.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeViewBigIcon.java 2010-01-11 11:49:55-0800
@@ -1,48 +1,48 @@
-// $Id: ActionStereotypeViewBigIcon.java 13040 2007-07-10 20:00:25Z linus $
-// Copyright (c) 2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.diagram.ui;
-
-import org.argouml.uml.diagram.DiagramAppearance;
-
-/**
- * When this action is triggered the selected node visualization changes into
- * <code>BigIcon</code> mode. If the node has more than one applied stereotype
- * it should be displayed exactly as its default visualization. If if has just
- * one stereotype and it provider an icon, this icon replaces the default
- * figure for the classifier.
- *
- * @author maurelio1234
- */
-public class ActionStereotypeViewBigIcon extends ActionStereotypeView {
- /**
- * Default constructor for this action
- *
- * @param node the current node
- */
- public ActionStereotypeViewBigIcon(FigNodeModelElement node) {
- super(node, "menu.popup.stereotype-view.big-icon",
- DiagramAppearance.STEREOTYPE_VIEW_BIG_ICON);
- }
-}
+// $Id$
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.diagram.ui;
+
+import org.argouml.uml.diagram.DiagramAppearance;
+
+/**
+ * When this action is triggered the selected node visualization changes into
+ * <code>BigIcon</code> mode. If the node has more than one applied stereotype
+ * it should be displayed exactly as its default visualization. If if has just
+ * one stereotype and it provider an icon, this icon replaces the default
+ * figure for the classifier.
+ *
+ * @author maurelio1234
+ */
+public class ActionStereotypeViewBigIcon extends ActionStereotypeView {
+ /**
+ * Default constructor for this action
+ *
+ * @param node the current node
+ */
+ public ActionStereotypeViewBigIcon(FigNodeModelElement node) {
+ super(node, "menu.popup.stereotype-view.big-icon",
+ DiagramAppearance.STEREOTYPE_VIEW_BIG_ICON);
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeViewSmallIcon.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeViewSmallIcon.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeViewSmallIcon.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeViewSmallIcon.java 2010-01-11 11:49:55-0800
@@ -1,46 +1,46 @@
-// $Id: ActionStereotypeViewSmallIcon.java 13040 2007-07-10 20:00:25Z linus $
-// Copyright (c) 2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.diagram.ui;
-
-import org.argouml.uml.diagram.DiagramAppearance;
-
-/**
- * When this action is triggered the selected node visualization changes into
- * <code>SmallIcon</code> mode. At this mode, all the stereotypes that provide
- * an alternate icon should be replaced by the a reduced version of the icon.
- *
- * @author maurelio1234
- */
-public class ActionStereotypeViewSmallIcon extends ActionStereotypeView {
- /**
- * Default constructor for this action
- *
- * @param node the current node
- */
- public ActionStereotypeViewSmallIcon(FigNodeModelElement node) {
- super(node, "menu.popup.stereotype-view.small-icon",
- DiagramAppearance.STEREOTYPE_VIEW_SMALL_ICON);
- }
-}
+// $Id$
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.diagram.ui;
+
+import org.argouml.uml.diagram.DiagramAppearance;
+
+/**
+ * When this action is triggered the selected node visualization changes into
+ * <code>SmallIcon</code> mode. At this mode, all the stereotypes that provide
+ * an alternate icon should be replaced by the a reduced version of the icon.
+ *
+ * @author maurelio1234
+ */
+public class ActionStereotypeViewSmallIcon extends ActionStereotypeView {
+ /**
+ * Default constructor for this action
+ *
+ * @param node the current node
+ */
+ public ActionStereotypeViewSmallIcon(FigNodeModelElement node) {
+ super(node, "menu.popup.stereotype-view.small-icon",
+ DiagramAppearance.STEREOTYPE_VIEW_SMALL_ICON);
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeViewTextual.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeViewTextual.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeViewTextual.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ActionStereotypeViewTextual.java 2010-01-11 11:49:55-0800
@@ -1,46 +1,46 @@
-// $Id: ActionStereotypeViewTextual.java 13040 2007-07-10 20:00:25Z linus $
-// Copyright (c) 2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.diagram.ui;
-
-import org.argouml.uml.diagram.DiagramAppearance;
-
-/**
- * When this action is triggered the selected node visualization changes into
- * <code>Textual</code> mode. This is the default mode for all nodes. The
- * stereotypes are displayed as the stereotype name between guillemets.
- *
- * @author maurelio1234
- */
-public class ActionStereotypeViewTextual extends ActionStereotypeView {
- /**
- * Default constructor for this action
- *
- * @param node the current node
- */
- public ActionStereotypeViewTextual(FigNodeModelElement node) {
- super(node, "menu.popup.stereotype-view.textual",
- DiagramAppearance.STEREOTYPE_VIEW_TEXTUAL);
- }
-}
+// $Id$
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.diagram.ui;
+
+import org.argouml.uml.diagram.DiagramAppearance;
+
+/**
+ * When this action is triggered the selected node visualization changes into
+ * <code>Textual</code> mode. This is the default mode for all nodes. The
+ * stereotypes are displayed as the stereotype name between guillemets.
+ *
+ * @author maurelio1234
+ */
+public class ActionStereotypeViewTextual extends ActionStereotypeView {
+ /**
+ * Default constructor for this action
+ *
+ * @param node the current node
+ */
+ public ActionStereotypeViewTextual(FigNodeModelElement node) {
+ super(node, "menu.popup.stereotype-view.textual",
+ DiagramAppearance.STEREOTYPE_VIEW_TEXTUAL);
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigExtensionPointsCompartment.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigExtensionPointsCompartment.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigExtensionPointsCompartment.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigExtensionPointsCompartment.java 2010-01-11 11:49:55-0800
@@ -1,4 +1,4 @@
-/* $Id: FigEditableCompartment.java 17718 2010-01-02 14:06:22Z bobtarling $
+/* $Id$
*******************************************************************************
* Copyright (c) 2009-2010 Contributors - see below
* All rights reserved. This program and the accompanying materials
@@ -14,7 +14,7 @@
* Some portions of this file was previously release using the BSD License:
*/
-// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
+// $Id$
// Copyright (c) 2009 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigProfileIcon.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigProfileIcon.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigProfileIcon.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigProfileIcon.java 2010-01-11 11:49:55-0800
@@ -1,106 +1,106 @@
-// $Id: FigProfileIcon.java 13040 2007-07-10 20:00:25Z linus $
-// Copyright (c) 2007-2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.diagram.ui;
-
-import java.awt.Image;
-import java.awt.Rectangle;
-
-import org.argouml.uml.diagram.DiagramSettings;
-import org.tigris.gef.presentation.FigImage;
-import org.tigris.gef.presentation.FigNode;
-import org.tigris.gef.presentation.FigText;
-
-/**
- * This FigNode displays the image and the name of a classifier with an
- * stereotype that provides an icon.
- *
- * @author Marcos Aur�lio
- */
-public class FigProfileIcon extends FigNode {
-
- private FigImage image = null;
-
- private FigText label = null;
-
- private static final int GAP = 2;
-
- /**
- * Default constructor.
- *
- * @param settings diagram settings
- * @param icon the icon
- * @param str the default name
- */
- public FigProfileIcon(DiagramSettings settings, Image icon, String str) {
- image = new FigImage(0, 0, icon);
- Rectangle bounds = new Rectangle(0, image.getHeight() + GAP, 0, 0);
- label = new FigSingleLineText(bounds, settings, true);
- label.setText(str);
- label.calcBounds();
-
- addFig(image);
- addFig(label);
-
- image.setResizable(false);
- image.setLocked(true);
- }
-
-
- @Override
- protected void setBoundsImpl(int x, int y, int w, int h) {
- int width = Math.max(image.getWidth(), label.getWidth());
-
- image.setLocation(x + (width - image.getWidth()) / 2, y);
- label.setLocation(x + (width - label.getWidth()) / 2, y
- + image.getHeight() + GAP);
-
- calcBounds();
- updateEdges();
- }
-
- /**
- * @return the FigText that contains the icon name
- */
- public FigText getLabelFig() {
- return label;
- }
-
- /**
- * @return the label of the label fig
- */
- public String getLabel() {
- return label.getText();
- }
-
- /**
- * Sets the label and updates the figure bounds
- * @param txt the label to set
- */
- public void setLabel(String txt) {
- this.label.setText(txt);
- this.label.calcBounds();
- this.calcBounds();
- }
-}
+// $Id$
+// Copyright (c) 2007-2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.diagram.ui;
+
+import java.awt.Image;
+import java.awt.Rectangle;
+
+import org.argouml.uml.diagram.DiagramSettings;
+import org.tigris.gef.presentation.FigImage;
+import org.tigris.gef.presentation.FigNode;
+import org.tigris.gef.presentation.FigText;
+
+/**
+ * This FigNode displays the image and the name of a classifier with an
+ * stereotype that provides an icon.
+ *
+ * @author Marcos Aur�lio
+ */
+public class FigProfileIcon extends FigNode {
+
+ private FigImage image = null;
+
+ private FigText label = null;
+
+ private static final int GAP = 2;
+
+ /**
+ * Default constructor.
+ *
+ * @param settings diagram settings
+ * @param icon the icon
+ * @param str the default name
+ */
+ public FigProfileIcon(DiagramSettings settings, Image icon, String str) {
+ image = new FigImage(0, 0, icon);
+ Rectangle bounds = new Rectangle(0, image.getHeight() + GAP, 0, 0);
+ label = new FigSingleLineText(bounds, settings, true);
+ label.setText(str);
+ label.calcBounds();
+
+ addFig(image);
+ addFig(label);
+
+ image.setResizable(false);
+ image.setLocked(true);
+ }
+
+
+ @Override
+ protected void setBoundsImpl(int x, int y, int w, int h) {
+ int width = Math.max(image.getWidth(), label.getWidth());
+
+ image.setLocation(x + (width - image.getWidth()) / 2, y);
+ label.setLocation(x + (width - label.getWidth()) / 2, y
+ + image.getHeight() + GAP);
+
+ calcBounds();
+ updateEdges();
+ }
+
+ /**
+ * @return the FigText that contains the icon name
+ */
+ public FigText getLabelFig() {
+ return label;
+ }
+
+ /**
+ * @return the label of the label fig
+ */
+ public String getLabel() {
+ return label.getText();
+ }
+
+ /**
+ * Sets the label and updates the figure bounds
+ * @param txt the label to set
+ */
+ public void setLabel(String txt) {
+ this.label.setText(txt);
+ this.label.calcBounds();
+ this.calcBounds();
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeAddToDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeAddToDiagram.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeAddToDiagram.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeAddToDiagram.java 2010-01-11 11:49:55-0800
@@ -1,245 +1,245 @@
-// $Id: ModeAddToDiagram.java 14844 2008-05-31 12:15:11Z bobtarling $
-// Copyright (c) 2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.diagram.ui;
-
-import java.awt.Cursor;
-import java.awt.Point;
-import java.awt.Rectangle;
-import java.awt.event.KeyEvent;
-import java.awt.event.MouseEvent;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.argouml.uml.diagram.ArgoDiagram;
-import org.argouml.uml.diagram.DiagramUtils;
-import org.tigris.gef.base.Editor;
-import org.tigris.gef.base.FigModifyingModeImpl;
-import org.tigris.gef.base.Layer;
-import org.tigris.gef.graph.GraphNodeRenderer;
-import org.tigris.gef.graph.MutableGraphModel;
-import org.tigris.gef.presentation.Fig;
-import org.tigris.gef.presentation.FigNode;
-import org.tigris.gef.undo.Memento;
-import org.tigris.gef.undo.UndoManager;
-
-/**
- * This is the mode the editor is in having selected a number of model elements
- * and executing Add To Diagram.
- */
-
-public class ModeAddToDiagram extends FigModifyingModeImpl {
-
- private static final long serialVersionUID = 8861862975789222877L;
-
- /**
- * The nodes to be added.
- */
- private final Collection<Object> modelElements;
-
- private final boolean addRelatedEdges = true;
-
- private final String instructions;
-
- private static final Logger LOG = Logger.getLogger(ModeAddToDiagram.class);
-
- /**
- * Create a mode to add the given elements to the diagram
- * @param modelElements the model elements to add
- * @param instructions the instruction to place in status bar
- */
- public ModeAddToDiagram(
- final Collection<Object> modelElements,
- final String instructions) {
- this.modelElements = modelElements;
- if (instructions == null) {
- this.instructions = "";
- } else {
- this.instructions = instructions;
- }
- }
-
- ////////////////////////////////////////////////////////////////
- // user feedback
-
- /**
- * @return A string to be shown in the status bar of the Editor when this
- * mode is on top of the ModeManager.
- */
- @Override
- public String instructions() {
- return instructions;
- }
-
- /**
- * @return a cross hair cursor
- */
- public Cursor getInitialCursor() {
- return Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR);
- }
-
- /**
- * On mouse release add the elements to the diagram
- * @param me the mouse event
- */
- @Override
- public void mouseReleased(final MouseEvent me) {
- if (me.isConsumed()) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("MouseReleased but rejected as already consumed");
- }
- return;
- }
- // TODO: Use per-project undo manager, not global
- UndoManager.getInstance().addMementoLock(this);
- start();
- MutableGraphModel gm = (MutableGraphModel) editor.getGraphModel();
-
- final int x = me.getX();
- final int y = me.getY();
- editor.damageAll();
- final Point snapPt = new Point(x, y);
- editor.snap(snapPt);
- editor.damageAll();
- int count = 0;
-
- Layer lay = editor.getLayerManager().getActiveLayer();
- GraphNodeRenderer renderer = editor.getGraphNodeRenderer();
-
- final List<FigNode> placedFigs =
- new ArrayList<FigNode>(modelElements.size());
-
- ArgoDiagram diag = DiagramUtils.getActiveDiagram();
- if (diag instanceof UMLDiagram) {
- for (final Object node : modelElements) {
- if (((UMLDiagram) diag).doesAccept(node)) {
- final FigNode pers =
- renderer.getFigNodeFor(gm, lay, node, null);
- pers.setLocation(snapPt.x + (count++ * 100), snapPt.y);
- if (LOG.isDebugEnabled()) {
- LOG.debug("mouseMoved: Location set ("
- + pers.getX() + "," + pers.getY() + ")");
- }
- // TODO: Use per-project undo manager, not global
- UndoManager.getInstance().startChain();
- editor.add(pers);
- gm.addNode(node);
- if (addRelatedEdges) {
- gm.addNodeRelatedEdges(node);
- }
-
- Fig encloser = null;
- final Rectangle bbox = pers.getBounds();
- final List<Fig> otherFigs = lay.getContents();
- for (final Fig otherFig : otherFigs) {
- if (!(otherFig.getUseTrapRect())) {
- continue;
- }
- if (!(otherFig instanceof FigNode)) {
- continue;
- }
- if (!otherFig.isVisible()) {
- continue;
- }
- if (otherFig.equals(pers)) {
- continue;
- }
- final Rectangle trap = otherFig.getTrapRect();
- if (trap != null
- && trap.contains(bbox.x, bbox.y)
- && trap.contains(
- bbox.x + bbox.width,
- bbox.y + bbox.height)) {
- encloser = otherFig;
- }
- }
- pers.setEnclosingFig(encloser);
-
- placedFigs.add(pers);
- }
- }
- }
-
- // TODO: Use per-project undo manager, not global
- UndoManager.getInstance().removeMementoLock(this);
- if (UndoManager.getInstance().isGenerateMementos()) {
- AddToDiagramMemento memento =
- new AddToDiagramMemento(editor, placedFigs);
- UndoManager.getInstance().addMemento(memento);
- }
- UndoManager.getInstance().addMementoLock(this);
- editor.getSelectionManager().select(placedFigs);
-
- done();
- me.consume();
- }
-
- public void keyTyped(KeyEvent ke) {
- if (ke.getKeyChar() == KeyEvent.VK_ESCAPE) {
- LOG.debug("ESC pressed");
- leave();
- }
- }
-}
-
-class AddToDiagramMemento extends Memento {
-
- private final List<FigNode> nodesPlaced;
- private final Editor editor;
- private final MutableGraphModel mgm;
-
- AddToDiagramMemento(final Editor ed, final List<FigNode> nodesPlaced) {
- this.nodesPlaced = nodesPlaced;
- this.editor = ed;
- this.mgm = (MutableGraphModel) editor.getGraphModel();
- }
-
- public void undo() {
- // TODO: Use per-project undo manager, not global
- UndoManager.getInstance().addMementoLock(this);
- for (FigNode figNode : nodesPlaced) {
- mgm.removeNode(figNode.getOwner());
- editor.remove(figNode);
- }
- UndoManager.getInstance().removeMementoLock(this);
- }
- public void redo() {
- // TODO: Use per-project undo manager, not global
- UndoManager.getInstance().addMementoLock(this);
- for (FigNode figNode : nodesPlaced) {
- editor.add(figNode);
- mgm.addNode(figNode.getOwner());
- }
- UndoManager.getInstance().removeMementoLock(this);
- }
- public void dispose() {
- }
-
- public String toString() {
- return (isStartChain() ? "*" : " ")
- + "AddToDiagramMemento";
- }
-}
+// $Id$
+// Copyright (c) 2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.diagram.ui;
+
+import java.awt.Cursor;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.argouml.uml.diagram.ArgoDiagram;
+import org.argouml.uml.diagram.DiagramUtils;
+import org.tigris.gef.base.Editor;
+import org.tigris.gef.base.FigModifyingModeImpl;
+import org.tigris.gef.base.Layer;
+import org.tigris.gef.graph.GraphNodeRenderer;
+import org.tigris.gef.graph.MutableGraphModel;
+import org.tigris.gef.presentation.Fig;
+import org.tigris.gef.presentation.FigNode;
+import org.tigris.gef.undo.Memento;
+import org.tigris.gef.undo.UndoManager;
+
+/**
+ * This is the mode the editor is in having selected a number of model elements
+ * and executing Add To Diagram.
+ */
+
+public class ModeAddToDiagram extends FigModifyingModeImpl {
+
+ private static final long serialVersionUID = 8861862975789222877L;
+
+ /**
+ * The nodes to be added.
+ */
+ private final Collection<Object> modelElements;
+
+ private final boolean addRelatedEdges = true;
+
+ private final String instructions;
+
+ private static final Logger LOG = Logger.getLogger(ModeAddToDiagram.class);
+
+ /**
+ * Create a mode to add the given elements to the diagram
+ * @param modelElements the model elements to add
+ * @param instructions the instruction to place in status bar
+ */
+ public ModeAddToDiagram(
+ final Collection<Object> modelElements,
+ final String instructions) {
+ this.modelElements = modelElements;
+ if (instructions == null) {
+ this.instructions = "";
+ } else {
+ this.instructions = instructions;
+ }
+ }
+
+ ////////////////////////////////////////////////////////////////
+ // user feedback
+
+ /**
+ * @return A string to be shown in the status bar of the Editor when this
+ * mode is on top of the ModeManager.
+ */
+ @Override
+ public String instructions() {
+ return instructions;
+ }
+
+ /**
+ * @return a cross hair cursor
+ */
+ public Cursor getInitialCursor() {
+ return Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR);
+ }
+
+ /**
+ * On mouse release add the elements to the diagram
+ * @param me the mouse event
+ */
+ @Override
+ public void mouseReleased(final MouseEvent me) {
+ if (me.isConsumed()) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("MouseReleased but rejected as already consumed");
+ }
+ return;
+ }
+ // TODO: Use per-project undo manager, not global
+ UndoManager.getInstance().addMementoLock(this);
+ start();
+ MutableGraphModel gm = (MutableGraphModel) editor.getGraphModel();
+
+ final int x = me.getX();
+ final int y = me.getY();
+ editor.damageAll();
+ final Point snapPt = new Point(x, y);
+ editor.snap(snapPt);
+ editor.damageAll();
+ int count = 0;
+
+ Layer lay = editor.getLayerManager().getActiveLayer();
+ GraphNodeRenderer renderer = editor.getGraphNodeRenderer();
+
+ final List<FigNode> placedFigs =
+ new ArrayList<FigNode>(modelElements.size());
+
+ ArgoDiagram diag = DiagramUtils.getActiveDiagram();
+ if (diag instanceof UMLDiagram) {
+ for (final Object node : modelElements) {
+ if (((UMLDiagram) diag).doesAccept(node)) {
+ final FigNode pers =
+ renderer.getFigNodeFor(gm, lay, node, null);
+ pers.setLocation(snapPt.x + (count++ * 100), snapPt.y);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("mouseMoved: Location set ("
+ + pers.getX() + "," + pers.getY() + ")");
+ }
+ // TODO: Use per-project undo manager, not global
+ UndoManager.getInstance().startChain();
+ editor.add(pers);
+ gm.addNode(node);
+ if (addRelatedEdges) {
+ gm.addNodeRelatedEdges(node);
+ }
+
+ Fig encloser = null;
+ final Rectangle bbox = pers.getBounds();
+ final List<Fig> otherFigs = lay.getContents();
+ for (final Fig otherFig : otherFigs) {
+ if (!(otherFig.getUseTrapRect())) {
+ continue;
+ }
+ if (!(otherFig instanceof FigNode)) {
+ continue;
+ }
+ if (!otherFig.isVisible()) {
+ continue;
+ }
+ if (otherFig.equals(pers)) {
+ continue;
+ }
+ final Rectangle trap = otherFig.getTrapRect();
+ if (trap != null
+ && trap.contains(bbox.x, bbox.y)
+ && trap.contains(
+ bbox.x + bbox.width,
+ bbox.y + bbox.height)) {
+ encloser = otherFig;
+ }
+ }
+ pers.setEnclosingFig(encloser);
+
+ placedFigs.add(pers);
+ }
+ }
+ }
+
+ // TODO: Use per-project undo manager, not global
+ UndoManager.getInstance().removeMementoLock(this);
+ if (UndoManager.getInstance().isGenerateMementos()) {
+ AddToDiagramMemento memento =
+ new AddToDiagramMemento(editor, placedFigs);
+ UndoManager.getInstance().addMemento(memento);
+ }
+ UndoManager.getInstance().addMementoLock(this);
+ editor.getSelectionManager().select(placedFigs);
+
+ done();
+ me.consume();
+ }
+
+ public void keyTyped(KeyEvent ke) {
+ if (ke.getKeyChar() == KeyEvent.VK_ESCAPE) {
+ LOG.debug("ESC pressed");
+ leave();
+ }
+ }
+}
+
+class AddToDiagramMemento extends Memento {
+
+ private final List<FigNode> nodesPlaced;
+ private final Editor editor;
+ private final MutableGraphModel mgm;
+
+ AddToDiagramMemento(final Editor ed, final List<FigNode> nodesPlaced) {
+ this.nodesPlaced = nodesPlaced;
+ this.editor = ed;
+ this.mgm = (MutableGraphModel) editor.getGraphModel();
+ }
+
+ public void undo() {
+ // TODO: Use per-project undo manager, not global
+ UndoManager.getInstance().addMementoLock(this);
+ for (FigNode figNode : nodesPlaced) {
+ mgm.removeNode(figNode.getOwner());
+ editor.remove(figNode);
+ }
+ UndoManager.getInstance().removeMementoLock(this);
+ }
+ public void redo() {
+ // TODO: Use per-project undo manager, not global
+ UndoManager.getInstance().addMementoLock(this);
+ for (FigNode figNode : nodesPlaced) {
+ editor.add(figNode);
+ mgm.addNode(figNode.getOwner());
+ }
+ UndoManager.getInstance().removeMementoLock(this);
+ }
+ public void dispose() {
+ }
+
+ public String toString() {
+ return (isStartChain() ? "*" : " ")
+ + "AddToDiagramMemento";
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreateAssociation.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreateAssociation.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreateAssociation.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreateAssociation.java 2010-01-11 11:49:55-0800
@@ -1,89 +1,89 @@
-// $Id: FigStereotype.java 11516 2006-11-25 04:30:15Z tfmorris $
-// Copyright (c) 2006 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.diagram.ui;
-
-import java.awt.Color;
-import org.argouml.model.Model;
-import org.tigris.gef.base.Layer;
-import org.tigris.gef.graph.MutableGraphModel;
-import org.tigris.gef.presentation.Fig;
-import org.tigris.gef.presentation.FigEdge;
-
-/**
- * A Mode to interpret user input while drawing a binary association.
- * The association can connect two existing classifiers.
- *
- * @author Bob Tarling
- */
-public class ModeCreateAssociation extends ModeCreateGraphEdge {
-
- public Object getMetaType() {
- return Model.getMetaTypes().getAssociation();
- }
-
- /**
- * Create an edge of the given type and connect it to the
- * given nodes.
- *
- * @param graphModel the graph model in which to create the connection
- * element
- * @param edgeType the UML object type of the connection
- * @param sourceFigNode the FigNode for the source element
- * @param destFigNode the FigNode for the destination element
- * @return The FigEdge representing the newly created model element
- */
- @Override
- protected FigEdge buildConnection(
- final MutableGraphModel graphModel,
- final Object edgeType,
- final Fig sourceFigNode,
- final Fig destFigNode) {
- Object association = graphModel.connect(
- sourceFigNode.getOwner(),
- destFigNode.getOwner(),
- edgeType);
-
- setNewEdge(association);
-
- // Calling connect() will add the edge to the GraphModel and
- // any LayerPersectives on that GraphModel will get a
- // edgeAdded event and will add an appropriate FigEdge
- // (determined by the GraphEdgeRenderer).
-
- if (getNewEdge() != null) {
- getSourceFigNode().damage();
- destFigNode.damage();
- final Layer lay = editor.getLayerManager().getActiveLayer();
- final FigEdge fe = (FigEdge) lay.presentationFor(getNewEdge());
- _newItem.setLineColor(Color.black);
- fe.setFig(_newItem);
- fe.computeRoute();
- return fe;
-
- } else {
- return null;
- }
- }
-}
+// $Id$
+// Copyright (c) 2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.diagram.ui;
+
+import java.awt.Color;
+import org.argouml.model.Model;
+import org.tigris.gef.base.Layer;
+import org.tigris.gef.graph.MutableGraphModel;
+import org.tigris.gef.presentation.Fig;
+import org.tigris.gef.presentation.FigEdge;
+
+/**
+ * A Mode to interpret user input while drawing a binary association.
+ * The association can connect two existing classifiers.
+ *
+ * @author Bob Tarling
+ */
+public class ModeCreateAssociation extends ModeCreateGraphEdge {
+
+ public Object getMetaType() {
+ return Model.getMetaTypes().getAssociation();
+ }
+
+ /**
+ * Create an edge of the given type and connect it to the
+ * given nodes.
+ *
+ * @param graphModel the graph model in which to create the connection
+ * element
+ * @param edgeType the UML object type of the connection
+ * @param sourceFigNode the FigNode for the source element
+ * @param destFigNode the FigNode for the destination element
+ * @return The FigEdge representing the newly created model element
+ */
+ @Override
+ protected FigEdge buildConnection(
+ final MutableGraphModel graphModel,
+ final Object edgeType,
+ final Fig sourceFigNode,
+ final Fig destFigNode) {
+ Object association = graphModel.connect(
+ sourceFigNode.getOwner(),
+ destFigNode.getOwner(),
+ edgeType);
+
+ setNewEdge(association);
+
+ // Calling connect() will add the edge to the GraphModel and
+ // any LayerPersectives on that GraphModel will get a
+ // edgeAdded event and will add an appropriate FigEdge
+ // (determined by the GraphEdgeRenderer).
+
+ if (getNewEdge() != null) {
+ getSourceFigNode().damage();
+ destFigNode.damage();
+ final Layer lay = editor.getLayerManager().getActiveLayer();
+ final FigEdge fe = (FigEdge) lay.presentationFor(getNewEdge());
+ _newItem.setLineColor(Color.black);
+ fe.setFig(_newItem);
+ fe.computeRoute();
+ return fe;
+
+ } else {
+ return null;
+ }
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreateAssociationClass.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreateAssociationClass.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreateAssociationClass.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreateAssociationClass.java 2010-01-11 11:49:55-0800
@@ -1,4 +1,4 @@
-// $Id: FigStereotype.java 11516 2006-11-25 04:30:15Z tfmorris $
+// $Id$
// Copyright (c) 2006 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
Modified: trunk/src/argouml-app/src/org/argouml/uml/generator/TempFileUtils.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/generator/TempFileUtils.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/generator/TempFileUtils.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/generator/TempFileUtils.java 2010-01-11 11:49:55-0800
@@ -1,179 +1,179 @@
-// $Id$
-// Copyright (c) 2006-2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.generator;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-
-/**
- * Utility class with methods to manage files in the temporary directory.
- */
-public class TempFileUtils {
-
- private static final Logger LOG = Logger.getLogger(TempFileUtils.class);
-
- /**
- * Create a temporary directory.
- *
- * @return a newly created, empty, temporary directory
- */
- public static File createTempDir() {
- File tmpdir = null;
- try {
- tmpdir = File.createTempFile("argouml", null);
- tmpdir.delete();
- if (!tmpdir.mkdir()) {
- return null;
- }
- return tmpdir;
- } catch (IOException ioe) {
- LOG.error("Error while creating a temporary directory", ioe);
- return null;
- }
- }
-
- private interface FileAction {
- /**
- * Execute some action on the specified file.
- *
- * @param file the file on which to perform the action
- * @throws IOException
- */
- void act(File file) throws IOException;
- }
-
- /**
- * Visit directory in post-order fashion.
- */
- private static void traverseDir(File dir, FileAction action)
- throws IOException {
- if (dir.exists()) {
- File[] files = dir.listFiles();
- for (int i = 0; i < files.length; i++) {
- if (files[i].isDirectory()) {
- traverseDir(files[i], action);
- } else {
- action.act(files[i]);
- }
- }
- action.act(dir);
- }
- }
-
- /**
- * Reads all files in a directory in memory.
- * @param dir directory to read files from
- * @return A collection of SourceUnit objects.
- */
- public static Collection<SourceUnit> readAllFiles(File dir) {
- try {
- final List<SourceUnit> ret = new ArrayList<SourceUnit>();
- final int prefix = dir.getPath().length() + 1;
- traverseDir(dir, new FileAction() {
-
- public void act(File f) throws IOException {
- // skip backup files. This is actually a workaround for the
- // cpp generator, which always creates backup files (it's a
- // bug).
- if (!f.isDirectory() && !f.getName().endsWith(".bak")) {
- // TODO: This is using the default platform character
- // encoding. Specifying an encoding will produce more
- // predictable results
- FileReader fr = new FileReader(f);
- BufferedReader bfr = new BufferedReader(fr);
- try {
- StringBuffer result =
- new StringBuffer((int) f.length());
- String line = bfr.readLine();
- do {
- result.append(line);
- line = bfr.readLine();
- if (line != null) {
- result.append('\n');
- }
- } while (line != null);
- ret.add(new SourceUnit(f.toString().substring(
- prefix), result.toString()));
- } finally {
- bfr.close();
- fr.close();
- }
- }
- }
-
- });
- return ret;
- } catch (IOException ioe) {
- LOG.error("Exception reading files", ioe);
- }
- return null;
- }
-
- /**
- * Deletes a directory and all of its contents.
- * @param dir The directory to delete.
- */
- public static void deleteDir(File dir) {
- try {
- traverseDir(dir, new FileAction() {
- public void act(File f) {
- f.delete();
- }
- });
- } catch (IOException ioe) {
- LOG.error("Exception deleting directory", ioe);
- }
- }
-
- /**
- * Reads all the files within a directory tree.
- * @param dir The base directory.
- * @return The collection of files.
- */
- public static Collection<String> readFileNames(File dir) {
- final List<String> ret = new ArrayList<String>();
- final int prefix = dir.getPath().length() + 1;
- try {
- traverseDir(dir, new FileAction() {
- public void act(File f) {
- if (!f.isDirectory()) {
- ret.add(f.toString().substring(prefix));
- }
- }
- });
- } catch (IOException ioe) {
- LOG.error("Exception reading file names", ioe);
- }
- return ret;
- }
-
-}
+// $Id$
+// Copyright (c) 2006-2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.generator;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+
+/**
+ * Utility class with methods to manage files in the temporary directory.
+ */
+public class TempFileUtils {
+
+ private static final Logger LOG = Logger.getLogger(TempFileUtils.class);
+
+ /**
+ * Create a temporary directory.
+ *
+ * @return a newly created, empty, temporary directory
+ */
+ public static File createTempDir() {
+ File tmpdir = null;
+ try {
+ tmpdir = File.createTempFile("argouml", null);
+ tmpdir.delete();
+ if (!tmpdir.mkdir()) {
+ return null;
+ }
+ return tmpdir;
+ } catch (IOException ioe) {
+ LOG.error("Error while creating a temporary directory", ioe);
+ return null;
+ }
+ }
+
+ private interface FileAction {
+ /**
+ * Execute some action on the specified file.
+ *
+ * @param file the file on which to perform the action
+ * @throws IOException
+ */
+ void act(File file) throws IOException;
+ }
+
+ /**
+ * Visit directory in post-order fashion.
+ */
+ private static void traverseDir(File dir, FileAction action)
+ throws IOException {
+ if (dir.exists()) {
+ File[] files = dir.listFiles();
+ for (int i = 0; i < files.length; i++) {
+ if (files[i].isDirectory()) {
+ traverseDir(files[i], action);
+ } else {
+ action.act(files[i]);
+ }
+ }
+ action.act(dir);
+ }
+ }
+
+ /**
+ * Reads all files in a directory in memory.
+ * @param dir directory to read files from
+ * @return A collection of SourceUnit objects.
+ */
+ public static Collection<SourceUnit> readAllFiles(File dir) {
+ try {
+ final List<SourceUnit> ret = new ArrayList<SourceUnit>();
+ final int prefix = dir.getPath().length() + 1;
+ traverseDir(dir, new FileAction() {
+
+ public void act(File f) throws IOException {
+ // skip backup files. This is actually a workaround for the
+ // cpp generator, which always creates backup files (it's a
+ // bug).
+ if (!f.isDirectory() && !f.getName().endsWith(".bak")) {
+ // TODO: This is using the default platform character
+ // encoding. Specifying an encoding will produce more
+ // predictable results
+ FileReader fr = new FileReader(f);
+ BufferedReader bfr = new BufferedReader(fr);
+ try {
+ StringBuffer result =
+ new StringBuffer((int) f.length());
+ String line = bfr.readLine();
+ do {
+ result.append(line);
+ line = bfr.readLine();
+ if (line != null) {
+ result.append('\n');
+ }
+ } while (line != null);
+ ret.add(new SourceUnit(f.toString().substring(
+ prefix), result.toString()));
+ } finally {
+ bfr.close();
+ fr.close();
+ }
+ }
+ }
+
+ });
+ return ret;
+ } catch (IOException ioe) {
+ LOG.error("Exception reading files", ioe);
+ }
+ return null;
+ }
+
+ /**
+ * Deletes a directory and all of its contents.
+ * @param dir The directory to delete.
+ */
+ public static void deleteDir(File dir) {
+ try {
+ traverseDir(dir, new FileAction() {
+ public void act(File f) {
+ f.delete();
+ }
+ });
+ } catch (IOException ioe) {
+ LOG.error("Exception deleting directory", ioe);
+ }
+ }
+
+ /**
+ * Reads all the files within a directory tree.
+ * @param dir The base directory.
+ * @return The collection of files.
+ */
+ public static Collection<String> readFileNames(File dir) {
+ final List<String> ret = new ArrayList<String>();
+ final int prefix = dir.getPath().length() + 1;
+ try {
+ traverseDir(dir, new FileAction() {
+ public void act(File f) {
+ if (!f.isDirectory()) {
+ ret.add(f.toString().substring(prefix));
+ }
+ }
+ });
+ } catch (IOException ioe) {
+ LOG.error("Exception reading file names", ioe);
+ }
+ return ret;
+ }
+
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/reveng/ConfigPanelExtension.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/reveng/ConfigPanelExtension.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/reveng/ConfigPanelExtension.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/reveng/ConfigPanelExtension.java 2010-01-11 11:49:55-0800
@@ -1,280 +1,280 @@
-// $Id: FileImportSupport.java 11168 2006-09-14 20:35:24Z andrea_nironi $
-// Copyright (c) 1996-2006 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.reveng;
-
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-
-import javax.swing.ButtonGroup;
-import javax.swing.JCheckBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-import javax.swing.JTextField;
-
-import org.argouml.configuration.Configuration;
-import org.argouml.configuration.ConfigurationKey;
-import org.argouml.i18n.Translator;
-
-/**
- * Default extended configuration panel for file import.
- */
-public class ConfigPanelExtension extends JPanel {
-
- /**
- * Key for RE extended settings: model attributes as:
- * 0: attibutes
- * 1: associations
- */
- public static final ConfigurationKey KEY_IMPORT_EXTENDED_MODEL_ATTR =
- Configuration
- .makeKey("import", "extended", "java", "model", "attributes");
-
- /**
- * Key for RE extended settings: model arrays as:
- * 0: datatype
- * 1: associations
- */
- public static final ConfigurationKey KEY_IMPORT_EXTENDED_MODEL_ARRAYS =
- Configuration.makeKey("import", "extended", "java", "model", "arrays");
-
- /**
- * Key for RE extended settings: flag for modelling of listed collections,
- * if to model them as associations with multiplicity *.
- */
- public static final ConfigurationKey KEY_IMPORT_EXTENDED_COLLECTIONS_FLAG =
- Configuration
- .makeKey("import", "extended", "java", "collections", "flag");
-
- /**
- * Key for RE extended settings: list of collections, that will be modelled
- * as associations with multiplicity *.
- */
- public static final ConfigurationKey KEY_IMPORT_EXTENDED_COLLECTIONS_LIST =
- Configuration
- .makeKey("import", "extended", "java", "collections", "list");
-
- /**
- * Key for RE extended settings: flag for modelling of listed collections,
- * if to model them as ordered associations with multiplicity *.
- */
- public static final ConfigurationKey KEY_IMPORT_EXTENDED_ORDEREDCOLLS_FLAG =
- Configuration
- .makeKey("import", "extended", "java", "orderedcolls", "flag");
-
- /**
- * Key for RE extended settings: list of collections, that will be modelled
- * as ordered associations with multiplicity *.
- */
- public static final ConfigurationKey KEY_IMPORT_EXTENDED_ORDEREDCOLLS_LIST =
- Configuration
- .makeKey("import", "extended", "java", "orderedcolls", "list");
-
- private JPanel configPanel;
-
- private JRadioButton attribute;
-
- private JRadioButton datatype;
-
- private JCheckBox modelcollections, modelorderedcollections;
-
- private JTextField collectionlist, orderedcollectionlist;
-
- /**
- * Construct a new default configuration extension panel.
- */
- public ConfigPanelExtension() {
-
- configPanel = this;
- configPanel.setLayout(new GridBagLayout());
-
- JLabel attributeLabel1 =
- new JLabel(
- Translator.localize("action.import-java-attr-model"));
- configPanel.add(attributeLabel1,
- createGridBagConstraints(true, false, false));
- ButtonGroup group1 = new ButtonGroup();
- attribute =
- new JRadioButton(
- Translator.localize("action.import-java-UML-attr"));
- group1.add(attribute);
- configPanel.add(attribute,
- createGridBagConstraints(false, false, false));
- JRadioButton association =
- new JRadioButton(
- Translator.localize("action.import-java-UML-assoc"));
- group1.add(association);
- configPanel.add(association,
- createGridBagConstraints(false, true, false));
- String modelattr =
- Configuration.getString(KEY_IMPORT_EXTENDED_MODEL_ATTR);
- if ("1".equals(modelattr)) {
- association.setSelected(true);
- } else {
- attribute.setSelected(true);
- }
-
- JLabel attributeLabel2 =
- new JLabel(
- Translator.localize("action.import-java-array-model"));
- configPanel.add(attributeLabel2,
- createGridBagConstraints(true, false, false));
- ButtonGroup group2 = new ButtonGroup();
- datatype =
- new JRadioButton(
- Translator.localize(
- "action.import-java-array-model-datatype"));
- group2.add(datatype);
- configPanel.add(datatype,
- createGridBagConstraints(false, false, false));
- JRadioButton multi =
- new JRadioButton(
- Translator.localize(
- "action.import-java-array-model-multi"));
- group2.add(multi);
- configPanel.add(multi,
- createGridBagConstraints(false, true, false));
- String modelarrays =
- Configuration.getString(KEY_IMPORT_EXTENDED_MODEL_ARRAYS);
- if ("1".equals(modelarrays)) {
- multi.setSelected(true);
- } else {
- datatype.setSelected(true);
- }
-
- String s = Configuration
- .getString(KEY_IMPORT_EXTENDED_COLLECTIONS_FLAG);
- boolean flag = ("true".equals(s));
- modelcollections =
- new JCheckBox(Translator.localize(
- "action.import-option-model-collections"), flag);
- configPanel.add(modelcollections,
- createGridBagConstraints(true, false, false));
-
- s = Configuration.getString(KEY_IMPORT_EXTENDED_COLLECTIONS_LIST);
- collectionlist = new JTextField(s);
- configPanel.add(collectionlist,
- createGridBagConstraints(false, false, true));
- JLabel listLabel =
- new JLabel(
- Translator.localize("action.import-comma-separated-names"));
- configPanel.add(listLabel,
- createGridBagConstraints(false, true, false));
-
- s = Configuration.getString(KEY_IMPORT_EXTENDED_ORDEREDCOLLS_FLAG);
- flag = ("true".equals(s));
- modelorderedcollections =
- new JCheckBox(Translator.localize(
- "action.import-option-model-ordered-collections"), flag);
- configPanel.add(modelorderedcollections,
- createGridBagConstraints(true, false, false));
-
- s = Configuration.getString(KEY_IMPORT_EXTENDED_ORDEREDCOLLS_LIST);
- orderedcollectionlist = new JTextField(s);
- configPanel.add(orderedcollectionlist,
- createGridBagConstraints(false, false, true));
- listLabel =
- new JLabel(
- Translator.localize("action.import-comma-separated-names"));
- configPanel.add(listLabel,
- createGridBagConstraintsFinal());
-
- // TODO: Get the list of extended settings from the current
- // language importer and add those too
- }
-
-
- /**
- * Create a GridBagConstraints object to use with the layout.
- *
- * @param topInset true to use a top inset
- * @param bottomInset true to use a bottom inset
- * @param fill true to fill (horizontally)
- * @return the grid bag constraints
- */
- private GridBagConstraints createGridBagConstraints(boolean topInset,
- boolean bottomInset, boolean fill) {
- GridBagConstraints gbc = new GridBagConstraints();
- gbc.gridx = GridBagConstraints.RELATIVE;
- gbc.gridy = GridBagConstraints.RELATIVE;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.gridheight = 1;
- gbc.weightx = 1.0;
- gbc.weighty = 0.0;
- gbc.anchor = GridBagConstraints.NORTHWEST;
- gbc.fill = fill ? GridBagConstraints.HORIZONTAL
- : GridBagConstraints.NONE;
- gbc.insets =
- new Insets(
- topInset ? 5 : 0,
- 5,
- bottomInset ? 5 : 0,
- 5);
- gbc.ipadx = 0;
- gbc.ipady = 0;
- return gbc;
- }
-
- /**
- * A GridBagConstraints for the last item to take up the rest of the space.
- * @return the GridBagConstraints object
- */
- private GridBagConstraints createGridBagConstraintsFinal() {
- GridBagConstraints gbc = createGridBagConstraints(false, true, false);
- gbc.gridheight = GridBagConstraints.REMAINDER;
- gbc.weighty = 1.0;
- return gbc;
- }
-
- /**
- * @return the attribute radio button
- */
- public JRadioButton getAttribute() {
- return attribute;
- }
-
- /**
- * @return the datatype radio button
- */
- public JRadioButton getDatatype() {
- return datatype;
- }
-
- public void disposeDialog() {
- Configuration.setString(KEY_IMPORT_EXTENDED_MODEL_ATTR,
- String.valueOf(getAttribute().isSelected() ? "0" : "1"));
- Configuration.setString(KEY_IMPORT_EXTENDED_MODEL_ARRAYS,
- String.valueOf(getDatatype().isSelected() ? "0" : "1"));
- Configuration.setString(KEY_IMPORT_EXTENDED_COLLECTIONS_FLAG,
- String.valueOf(modelcollections.isSelected()));
- Configuration.setString(KEY_IMPORT_EXTENDED_COLLECTIONS_LIST,
- String.valueOf(collectionlist.getText()));
- Configuration.setString(KEY_IMPORT_EXTENDED_ORDEREDCOLLS_FLAG,
- String.valueOf(modelorderedcollections.isSelected()));
- Configuration.setString(KEY_IMPORT_EXTENDED_ORDEREDCOLLS_LIST,
- String.valueOf(orderedcollectionlist.getText()));
- }
-}
+// $Id$
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.reveng;
+
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JTextField;
+
+import org.argouml.configuration.Configuration;
+import org.argouml.configuration.ConfigurationKey;
+import org.argouml.i18n.Translator;
+
+/**
+ * Default extended configuration panel for file import.
+ */
+public class ConfigPanelExtension extends JPanel {
+
+ /**
+ * Key for RE extended settings: model attributes as:
+ * 0: attibutes
+ * 1: associations
+ */
+ public static final ConfigurationKey KEY_IMPORT_EXTENDED_MODEL_ATTR =
+ Configuration
+ .makeKey("import", "extended", "java", "model", "attributes");
+
+ /**
+ * Key for RE extended settings: model arrays as:
+ * 0: datatype
+ * 1: associations
+ */
+ public static final ConfigurationKey KEY_IMPORT_EXTENDED_MODEL_ARRAYS =
+ Configuration.makeKey("import", "extended", "java", "model", "arrays");
+
+ /**
+ * Key for RE extended settings: flag for modelling of listed collections,
+ * if to model them as associations with multiplicity *.
+ */
+ public static final ConfigurationKey KEY_IMPORT_EXTENDED_COLLECTIONS_FLAG =
+ Configuration
+ .makeKey("import", "extended", "java", "collections", "flag");
+
+ /**
+ * Key for RE extended settings: list of collections, that will be modelled
+ * as associations with multiplicity *.
+ */
+ public static final ConfigurationKey KEY_IMPORT_EXTENDED_COLLECTIONS_LIST =
+ Configuration
+ .makeKey("import", "extended", "java", "collections", "list");
+
+ /**
+ * Key for RE extended settings: flag for modelling of listed collections,
+ * if to model them as ordered associations with multiplicity *.
+ */
+ public static final ConfigurationKey KEY_IMPORT_EXTENDED_ORDEREDCOLLS_FLAG =
+ Configuration
+ .makeKey("import", "extended", "java", "orderedcolls", "flag");
+
+ /**
+ * Key for RE extended settings: list of collections, that will be modelled
+ * as ordered associations with multiplicity *.
+ */
+ public static final ConfigurationKey KEY_IMPORT_EXTENDED_ORDEREDCOLLS_LIST =
+ Configuration
+ .makeKey("import", "extended", "java", "orderedcolls", "list");
+
+ private JPanel configPanel;
+
+ private JRadioButton attribute;
+
+ private JRadioButton datatype;
+
+ private JCheckBox modelcollections, modelorderedcollections;
+
+ private JTextField collectionlist, orderedcollectionlist;
+
+ /**
+ * Construct a new default configuration extension panel.
+ */
+ public ConfigPanelExtension() {
+
+ configPanel = this;
+ configPanel.setLayout(new GridBagLayout());
+
+ JLabel attributeLabel1 =
+ new JLabel(
+ Translator.localize("action.import-java-attr-model"));
+ configPanel.add(attributeLabel1,
+ createGridBagConstraints(true, false, false));
+ ButtonGroup group1 = new ButtonGroup();
+ attribute =
+ new JRadioButton(
+ Translator.localize("action.import-java-UML-attr"));
+ group1.add(attribute);
+ configPanel.add(attribute,
+ createGridBagConstraints(false, false, false));
+ JRadioButton association =
+ new JRadioButton(
+ Translator.localize("action.import-java-UML-assoc"));
+ group1.add(association);
+ configPanel.add(association,
+ createGridBagConstraints(false, true, false));
+ String modelattr =
+ Configuration.getString(KEY_IMPORT_EXTENDED_MODEL_ATTR);
+ if ("1".equals(modelattr)) {
+ association.setSelected(true);
+ } else {
+ attribute.setSelected(true);
+ }
+
+ JLabel attributeLabel2 =
+ new JLabel(
+ Translator.localize("action.import-java-array-model"));
+ configPanel.add(attributeLabel2,
+ createGridBagConstraints(true, false, false));
+ ButtonGroup group2 = new ButtonGroup();
+ datatype =
+ new JRadioButton(
+ Translator.localize(
+ "action.import-java-array-model-datatype"));
+ group2.add(datatype);
+ configPanel.add(datatype,
+ createGridBagConstraints(false, false, false));
+ JRadioButton multi =
+ new JRadioButton(
+ Translator.localize(
+ "action.import-java-array-model-multi"));
+ group2.add(multi);
+ configPanel.add(multi,
+ createGridBagConstraints(false, true, false));
+ String modelarrays =
+ Configuration.getString(KEY_IMPORT_EXTENDED_MODEL_ARRAYS);
+ if ("1".equals(modelarrays)) {
+ multi.setSelected(true);
+ } else {
+ datatype.setSelected(true);
+ }
+
+ String s = Configuration
+ .getString(KEY_IMPORT_EXTENDED_COLLECTIONS_FLAG);
+ boolean flag = ("true".equals(s));
+ modelcollections =
+ new JCheckBox(Translator.localize(
+ "action.import-option-model-collections"), flag);
+ configPanel.add(modelcollections,
+ createGridBagConstraints(true, false, false));
+
+ s = Configuration.getString(KEY_IMPORT_EXTENDED_COLLECTIONS_LIST);
+ collectionlist = new JTextField(s);
+ configPanel.add(collectionlist,
+ createGridBagConstraints(false, false, true));
+ JLabel listLabel =
+ new JLabel(
+ Translator.localize("action.import-comma-separated-names"));
+ configPanel.add(listLabel,
+ createGridBagConstraints(false, true, false));
+
+ s = Configuration.getString(KEY_IMPORT_EXTENDED_ORDEREDCOLLS_FLAG);
+ flag = ("true".equals(s));
+ modelorderedcollections =
+ new JCheckBox(Translator.localize(
+ "action.import-option-model-ordered-collections"), flag);
+ configPanel.add(modelorderedcollections,
+ createGridBagConstraints(true, false, false));
+
+ s = Configuration.getString(KEY_IMPORT_EXTENDED_ORDEREDCOLLS_LIST);
+ orderedcollectionlist = new JTextField(s);
+ configPanel.add(orderedcollectionlist,
+ createGridBagConstraints(false, false, true));
+ listLabel =
+ new JLabel(
+ Translator.localize("action.import-comma-separated-names"));
+ configPanel.add(listLabel,
+ createGridBagConstraintsFinal());
+
+ // TODO: Get the list of extended settings from the current
+ // language importer and add those too
+ }
+
+
+ /**
+ * Create a GridBagConstraints object to use with the layout.
+ *
+ * @param topInset true to use a top inset
+ * @param bottomInset true to use a bottom inset
+ * @param fill true to fill (horizontally)
+ * @return the grid bag constraints
+ */
+ private GridBagConstraints createGridBagConstraints(boolean topInset,
+ boolean bottomInset, boolean fill) {
+ GridBagConstraints gbc = new GridBagConstraints();
+ gbc.gridx = GridBagConstraints.RELATIVE;
+ gbc.gridy = GridBagConstraints.RELATIVE;
+ gbc.gridwidth = GridBagConstraints.REMAINDER;
+ gbc.gridheight = 1;
+ gbc.weightx = 1.0;
+ gbc.weighty = 0.0;
+ gbc.anchor = GridBagConstraints.NORTHWEST;
+ gbc.fill = fill ? GridBagConstraints.HORIZONTAL
+ : GridBagConstraints.NONE;
+ gbc.insets =
+ new Insets(
+ topInset ? 5 : 0,
+ 5,
+ bottomInset ? 5 : 0,
+ 5);
+ gbc.ipadx = 0;
+ gbc.ipady = 0;
+ return gbc;
+ }
+
+ /**
+ * A GridBagConstraints for the last item to take up the rest of the space.
+ * @return the GridBagConstraints object
+ */
+ private GridBagConstraints createGridBagConstraintsFinal() {
+ GridBagConstraints gbc = createGridBagConstraints(false, true, false);
+ gbc.gridheight = GridBagConstraints.REMAINDER;
+ gbc.weighty = 1.0;
+ return gbc;
+ }
+
+ /**
+ * @return the attribute radio button
+ */
+ public JRadioButton getAttribute() {
+ return attribute;
+ }
+
+ /**
+ * @return the datatype radio button
+ */
+ public JRadioButton getDatatype() {
+ return datatype;
+ }
+
+ public void disposeDialog() {
+ Configuration.setString(KEY_IMPORT_EXTENDED_MODEL_ATTR,
+ String.valueOf(getAttribute().isSelected() ? "0" : "1"));
+ Configuration.setString(KEY_IMPORT_EXTENDED_MODEL_ARRAYS,
+ String.valueOf(getDatatype().isSelected() ? "0" : "1"));
+ Configuration.setString(KEY_IMPORT_EXTENDED_COLLECTIONS_FLAG,
+ String.valueOf(modelcollections.isSelected()));
+ Configuration.setString(KEY_IMPORT_EXTENDED_COLLECTIONS_LIST,
+ String.valueOf(collectionlist.getText()));
+ Configuration.setString(KEY_IMPORT_EXTENDED_ORDEREDCOLLS_FLAG,
+ String.valueOf(modelorderedcollections.isSelected()));
+ Configuration.setString(KEY_IMPORT_EXTENDED_ORDEREDCOLLS_LIST,
+ String.valueOf(orderedcollectionlist.getText()));
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/reveng/FileImportUtils.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/reveng/FileImportUtils.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/reveng/FileImportUtils.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/reveng/FileImportUtils.java 2010-01-11 11:49:55-0800
@@ -1,140 +1,140 @@
-// $Id: FileImportSupport.java 11168 2006-09-14 20:35:24Z andrea_nironi $
-// Copyright (c) 1996-2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.reveng;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.argouml.taskmgmt.ProgressMonitor;
-import org.argouml.util.SuffixFilter;
-
-/**
- * Utility methods for source file importers.
- */
-public class FileImportUtils {
-
-
- /**
- * This method returns a List of source files to import.
- * <p>
- *
- * Processing each file in turn is equivalent to a breadth first search
- * through the directory structure.
- *
- * @param file
- * file or directory to import
- * @param recurse
- * if true, descend directory tree recursively
- * @param filters
- * array of file suffixes to match for filtering
- * @param monitor
- * a progress monitor which will be monitored for cancellation
- * requests. (Progress updates are not provided since the amount
- * of time required to get the files is non-deterministic).
- * @return a list of files to be imported
- */
- public static List<File> getList(File file, boolean recurse,
- SuffixFilter[] filters, ProgressMonitor monitor) {
- if (file == null) {
- return Collections.emptyList();
- }
-
- List<File> results = new ArrayList<File>();
-
- List<File> toDoDirectories = new LinkedList<File>();
- Set<File> seenDirectories = new HashSet<File>();
-
- toDoDirectories.add(file);
-
- while (!toDoDirectories.isEmpty()) {
- if (monitor != null && monitor.isCanceled()) {
- return Collections.emptyList();
- }
- File curDir = toDoDirectories.remove(0);
-
- if (!curDir.isDirectory()) {
- // For some reason, this alleged directory is a single file
- // This could be that there is some confusion or just
- // the normal, that a single file was selected and is
- // supposed to be imported.
- results.add(curDir);
- continue;
- }
-
- // Get the contents of the directory
- File[] files = curDir.listFiles();
- if (files != null) {
- for (File curFile : curDir.listFiles()) {
-
- // The following test can cause trouble with
- // links, because links are accepted as
- // directories, even if they link files. Links
- // could also result in infinite loops. For this
- // reason we don't do this traversing recursively.
- if (curFile.isDirectory()) {
- // If this file is a directory
- if (recurse && !seenDirectories.contains(curFile)) {
- toDoDirectories.add(curFile);
- seenDirectories.add(curFile);
- }
- } else {
- if (matchesSuffix(curFile, filters)) {
- results.add(curFile);
- }
- }
- }
- }
- }
-
- return results;
- }
-
- /**
- * Tells if the filename matches one of the given suffixes.
- *
- * @param file file to be tested.
- * @param filters array of filters to test against.
- * @return true if parseable, false if not.
- */
- public static boolean matchesSuffix(Object file, SuffixFilter[] filters) {
- if (!(file instanceof File)) {
- return false;
- }
- if (filters != null) {
- for (int i = 0; i < filters.length; i++) {
- if (filters[i].accept((File) file)) {
- return true;
- }
- }
- }
- return false;
- }
-
-}
+// $Id$
+// Copyright (c) 1996-2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.reveng;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.argouml.taskmgmt.ProgressMonitor;
+import org.argouml.util.SuffixFilter;
+
+/**
+ * Utility methods for source file importers.
+ */
+public class FileImportUtils {
+
+
+ /**
+ * This method returns a List of source files to import.
+ * <p>
+ *
+ * Processing each file in turn is equivalent to a breadth first search
+ * through the directory structure.
+ *
+ * @param file
+ * file or directory to import
+ * @param recurse
+ * if true, descend directory tree recursively
+ * @param filters
+ * array of file suffixes to match for filtering
+ * @param monitor
+ * a progress monitor which will be monitored for cancellation
+ * requests. (Progress updates are not provided since the amount
+ * of time required to get the files is non-deterministic).
+ * @return a list of files to be imported
+ */
+ public static List<File> getList(File file, boolean recurse,
+ SuffixFilter[] filters, ProgressMonitor monitor) {
+ if (file == null) {
+ return Collections.emptyList();
+ }
+
+ List<File> results = new ArrayList<File>();
+
+ List<File> toDoDirectories = new LinkedList<File>();
+ Set<File> seenDirectories = new HashSet<File>();
+
+ toDoDirectories.add(file);
+
+ while (!toDoDirectories.isEmpty()) {
+ if (monitor != null && monitor.isCanceled()) {
+ return Collections.emptyList();
+ }
+ File curDir = toDoDirectories.remove(0);
+
+ if (!curDir.isDirectory()) {
+ // For some reason, this alleged directory is a single file
+ // This could be that there is some confusion or just
+ // the normal, that a single file was selected and is
+ // supposed to be imported.
+ results.add(curDir);
+ continue;
+ }
+
+ // Get the contents of the directory
+ File[] files = curDir.listFiles();
+ if (files != null) {
+ for (File curFile : curDir.listFiles()) {
+
+ // The following test can cause trouble with
+ // links, because links are accepted as
+ // directories, even if they link files. Links
+ // could also result in infinite loops. For this
+ // reason we don't do this traversing recursively.
+ if (curFile.isDirectory()) {
+ // If this file is a directory
+ if (recurse && !seenDirectories.contains(curFile)) {
+ toDoDirectories.add(curFile);
+ seenDirectories.add(curFile);
+ }
+ } else {
+ if (matchesSuffix(curFile, filters)) {
+ results.add(curFile);
+ }
+ }
+ }
+ }
+ }
+
+ return results;
+ }
+
+ /**
+ * Tells if the filename matches one of the given suffixes.
+ *
+ * @param file file to be tested.
+ * @param filters array of filters to test against.
+ * @return true if parseable, false if not.
+ */
+ public static boolean matchesSuffix(Object file, SuffixFilter[] filters) {
+ if (!(file instanceof File)) {
+ return false;
+ }
+ if (filters != null) {
+ for (int i = 0; i < filters.length; i++) {
+ if (filters[i].accept((File) file)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportCommon.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportCommon.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportCommon.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportCommon.java 2010-01-11 11:49:55-0800
@@ -1,665 +1,665 @@
-// $Id$
-// Copyright (c) 2006, 2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.reveng;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.argouml.application.api.Argo;
-import org.argouml.cognitive.Designer;
-import org.argouml.configuration.Configuration;
-import org.argouml.i18n.Translator;
-import org.argouml.kernel.Project;
-import org.argouml.kernel.ProjectManager;
-import org.argouml.model.Model;
-import org.argouml.taskmgmt.ProgressMonitor;
-import org.argouml.ui.explorer.ExplorerEventAdaptor;
-import org.argouml.ui.targetmanager.TargetManager;
-import org.argouml.uml.diagram.ArgoDiagram;
-import org.argouml.uml.diagram.static_structure.ClassDiagramGraphModel;
-import org.argouml.uml.diagram.static_structure.layout.ClassdiagramLayouter;
-import org.argouml.util.SuffixFilter;
-import org.tigris.gef.base.Globals;
-
-/**
- * Source language import class - GUI independent superclass.
- * <p>
- * Specific Swing and SWT/Eclipse importers will extend this class.
- * <p>
- * <em>NOTE:</em>Any change to the public API here must be tested in both Swing
- * (standalone ArgoUML) and Eclipse (ArgoEclipse) environments.
- *
- * @author Tom Morris
- */
-public abstract class ImportCommon implements ImportSettingsInternal {
-
- /**
- * The % maximum progress required to preparing for import.
- */
- protected static final int MAX_PROGRESS_PREPARE = 1;
-
- /**
- * The % maximum progress required to import.
- */
- protected static final int MAX_PROGRESS_IMPORT = 99;
-
- protected static final int MAX_PROGRESS = MAX_PROGRESS_PREPARE
- + MAX_PROGRESS_IMPORT;
- /**
- * keys are module name, values are PluggableImport instance.
- */
- private Hashtable<String, ImportInterface> modules;
-
- /**
- * Current language module.
- */
- private ImportInterface currentModule;
-
-
- /**
- * Imported directory.
- */
- private String srcPath;
-
- /**
- * Create a interface to the current diagram.
- */
- private DiagramInterface diagramInterface;
-
- private File[] selectedFiles;
-
- private SuffixFilter selectedSuffixFilter;
-
- protected ImportCommon() {
- super();
- modules = new Hashtable<String, ImportInterface>();
-
- for (ImportInterface importer : ImporterManager.getInstance()
- .getImporters()) {
- modules.put(importer.getName(), importer);
- }
- if (modules.isEmpty()) {
- throw new RuntimeException("Internal error. "
- + "No importer modules found.");
- }
- // "Java" is the default module for historical reasons,
- // but it's not required to be there
- currentModule = modules.get("Java");
- if (currentModule == null) {
- currentModule = modules.elements().nextElement();
- }
- }
-
- /*
- * @see org.argouml.uml.reveng.ImportSettings#getImportLevel()
- */
- public abstract int getImportLevel();
-
-
- /**
- * Compute and cache the current diagram interface.
- */
- protected void initCurrentDiagram() {
- diagramInterface = getCurrentDiagram();
- }
-
- /**
- * Set target diagram.<p>
- *
- * @return selected diagram, if it is class diagram,
- * else return null.
- */
- private DiagramInterface getCurrentDiagram() {
- DiagramInterface result = null;
- if (Globals.curEditor().getGraphModel()
- instanceof ClassDiagramGraphModel) {
- result = new DiagramInterface(Globals.curEditor());
- } else {
- Project p = ProjectManager.getManager().getCurrentProject();
- TargetManager.getInstance().setTarget(p.getInitialTarget());
- // the previous line helps, but we better check again:
- if (Globals.curEditor().getGraphModel()
- instanceof ClassDiagramGraphModel) {
- result = new DiagramInterface(Globals.curEditor());
- }
- }
- return result;
- }
-
- /*
- * @see org.argouml.uml.reveng.ImportSettings#getInputSourceEncoding()
- */
- public abstract String getInputSourceEncoding();
-
-
- /**
- * Get the files. We generate it based on their specified
- * file suffixes.
- * @param monitor progress monitor which can be used to cancel long running
- * request
- * @return the list of files to be imported
- */
- protected List<File> getFileList(ProgressMonitor monitor) {
- List<File> files = Arrays.asList(getSelectedFiles());
- if (files.size() == 1) {
- File file = files.get(0);
- SuffixFilter suffixFilters[] = {selectedSuffixFilter};
- if (suffixFilters[0] == null) {
- // not a SuffixFilter selected, so we take all
- suffixFilters = currentModule.getSuffixFilters();
- }
- files =
- FileImportUtils.getList(
- file, isDescendSelected(),
- suffixFilters, monitor);
- if (file.isDirectory()) {
- setSrcPath(file.getAbsolutePath());
- } else {
- setSrcPath(null);
- }
- }
-
-
- if (isChangedOnlySelected()) {
- // filter out all unchanged files
- Object model =
- ProjectManager.getManager().getCurrentProject().getModel();
- for (int i = files.size() - 1; i >= 0; i--) {
- File f = files.get(i);
- String fn = f.getAbsolutePath();
- String lm = String.valueOf(f.lastModified());
-
- if (Model.getFacade().getUmlVersion().charAt(0) == '1') {
- // TODO: Not yet working for UML2
- if (lm.equals(
- Model.getFacade().getTaggedValueValue(model, fn))) {
- files.remove(i);
- }
- }
- }
- }
-
- return files;
- }
-
- /**
- * Set path for processed directory.
- *
- * @param path the given path
- */
- public void setSrcPath(String path) {
- srcPath = path;
- }
-
- /**
- * @return path for processed directory.
- */
- public String getSrcPath() {
- return srcPath;
- }
-
- /*
- * Create a TaggedValue with a tag/type matching our source module
- * filename and a value of the file's last modified timestamp.
- *
- * TODO: This functionality needs to be moved someplace useful if
- * it's needed, otherwise it can be deleted. - tfm - 20070217
- */
- private void setLastModified(Project project, File file) {
- // set the lastModified value
- String fn = file.getAbsolutePath();
- String lm = String.valueOf(file.lastModified());
- if (lm != null) {
- Model.getCoreHelper()
- .setTaggedValue(project.getModel(), fn, lm);
- }
- }
-
- /*
- * @see org.argouml.uml.reveng.ImportSettings#isCreateDiagramsSelected()
- */
- public abstract boolean isCreateDiagramsSelected();
-
- /*
- * @see org.argouml.uml.reveng.ImportSettings#isMinimiseFigsSelected()
- */
- public abstract boolean isMinimizeFigsSelected();
-
- /*
- * @see org.argouml.uml.reveng.ImportSettingsInternal#isDiagramLayoutSelected()
- */
- public abstract boolean isDiagramLayoutSelected();
-
- /*
- * @see org.argouml.uml.reveng.ImportSettingsInternal#isDescendSelected()
- */
- public abstract boolean isDescendSelected();
-
- /*
- * @see org.argouml.uml.reveng.ImportSettingsInternal#isChangedOnlySelected()
- */
- public abstract boolean isChangedOnlySelected();
-
- /**
- * Gets the specified import module.
- *
- * @param importerName The import module's name
- * @return The found import module, otherwise null
- */
- public ImportInterface getImporter(String importerName) {
- return getModules().get(importerName);
- }
-
- /**
- * Sets the files that will be imported.
- *
- * @param files The array of files.
- */
- public void setFiles(File[] files) {
- if (files != null) {
- setSelectedFiles(files);
- }
- }
-
- protected Hashtable<String, ImportInterface> getModules() {
- return modules;
- }
-
- protected void setSelectedFiles(final File[] files) {
- selectedFiles = files;
- }
-
- /**
- * Set the selected (file) suffix filter.
- *
- * @param suffixFilter the (file) suffix filter
- */
- protected void setSelectedSuffixFilter(final SuffixFilter suffixFilter) {
- selectedSuffixFilter = suffixFilter;
- }
-
- protected File[] getSelectedFiles() {
- File[] copy = new File[selectedFiles.length];
- for (int i = 0; i < selectedFiles.length; i++) {
- copy[i] = selectedFiles[i];
- }
- return copy;
- //return Arrays.copyOf(selectedFiles, selectedFiles.length);
- }
-
- /**
- * Sets the current import module.
- *
- * @param module
- */
- public void setCurrentModule(ImportInterface module) {
- currentModule = module;
- }
-
- protected ImportInterface getCurrentModule() {
- return currentModule;
- }
-
- /**
- * Returns the possible languages in which the user can import the sources.
- * @return a list of Strings with the names of the languages available
- */
- public List<String> getLanguages() {
- return Collections.unmodifiableList(
- new ArrayList<String>(modules.keySet()));
- }
-
- /**
- * The flag for: descend directories recursively.
- * This should be asked by the GUI for initialization.
- * @return the flag stored in KEY_IMPORT_GENERAL_SETTINGS_FLAGS key or
- * true if this is null.
- */
- public boolean isDescend() {
- String flags =
- Configuration.getString(
- Argo.KEY_IMPORT_GENERAL_SETTINGS_FLAGS);
- if (flags != null && flags.length() > 0) {
- StringTokenizer st = new StringTokenizer(flags, ",");
- if (st.hasMoreTokens() && st.nextToken().equals("false")) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * The flag for: changed/new files only.
- * This should be asked by the GUI for initialization.
- * @return the flag stored in KEY_IMPORT_GENERAL_SETTINGS_FLAGS key or
- * true if this is null.
- */
- public boolean isChangedOnly() {
- String flags =
- Configuration.getString(Argo.KEY_IMPORT_GENERAL_SETTINGS_FLAGS);
- if (flags != null && flags.length() > 0) {
- StringTokenizer st = new StringTokenizer(flags, ",");
- skipTokens(st, 1);
- if (st.hasMoreTokens() && st.nextToken().equals("false")) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * The flag for: create diagrams from imported code.
- * This should be asked by the GUI for initialization.
- * @return the flag stored in KEY_IMPORT_GENERAL_SETTINGS_FLAGS key or
- * true if this is null.
- */
- public boolean isCreateDiagrams() {
- String flags =
- Configuration.getString(
- Argo.KEY_IMPORT_GENERAL_SETTINGS_FLAGS);
- if (flags != null && flags.length() > 0) {
- StringTokenizer st = new StringTokenizer(flags, ",");
- skipTokens(st, 2);
- if (st.hasMoreTokens() && st.nextToken().equals("false")) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * The flag for: minimise class icons in diagrams.
- * This should be asked by the GUI for initialization.
- * @return the flag stored in KEY_IMPORT_GENERAL_SETTINGS_FLAGS key or
- * true if this is null.
- */
- public boolean isMinimizeFigs() {
- String flags =
- Configuration.getString(
- Argo.KEY_IMPORT_GENERAL_SETTINGS_FLAGS);
- if (flags != null && flags.length() > 0) {
- StringTokenizer st = new StringTokenizer(flags, ",");
- skipTokens(st, 3);
- if (st.hasMoreTokens() && st.nextToken().equals("false")) {
- return false;
- }
- }
- return true;
- }
-
- private void skipTokens(StringTokenizer st, int count) {
- for (int i = 0; i < count; i++) {
- if (st.hasMoreTokens()) {
- st.nextToken();
- }
- }
- }
-
- /**
- * The flag for: perform automatic diagram layout.
- * This should be asked by the GUI for initialization.
- * @return the flag stored in KEY_IMPORT_GENERAL_SETTINGS_FLAGS key or
- * true if this is null.
- */
- public boolean isDiagramLayout() {
- String flags =
- Configuration.getString(
- Argo.KEY_IMPORT_GENERAL_SETTINGS_FLAGS);
- if (flags != null && flags.length() > 0) {
- StringTokenizer st = new StringTokenizer(flags, ",");
- skipTokens(st, 4);
- if (st.hasMoreTokens() && st.nextToken().equals("false")) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * The default encoding. This should be asked by the GUI for
- * initialization.
- * @return the encoding stored in Argo.KEY_INPUT_SOURCE_ENCODING key or if
- * this is null the default system encoding
- */
- public String getEncoding() {
- String enc = Configuration.getString(Argo.KEY_INPUT_SOURCE_ENCODING);
- if (enc == null || enc.trim().equals("")) { //$NON-NLS-1$
- enc = System.getProperty("file.encoding"); //$NON-NLS-1$
- }
-
- return enc;
- }
-
-
- /**
- * Layouts the diagrams.
- *
- * @param monitor
- * the progress meter. Null if not progress updates desired.
- * @param startingProgress
- * the actual progress until now
- */
- public void layoutDiagrams(ProgressMonitor monitor, int startingProgress) {
-
- if (diagramInterface == null) {
- return;
- }
-// if (monitor != null) {
-// monitor.updateSubTask(ImportsMessages.layoutingAction);
-// }
- List<ArgoDiagram> diagrams = diagramInterface.getModifiedDiagramList();
- int total = startingProgress + diagrams.size()
- / 10;
- for (int i = 0; i < diagrams.size(); i++) {
- ArgoDiagram diagram = diagrams.get(i);
- ClassdiagramLayouter layouter = new ClassdiagramLayouter(diagram);
- layouter.layout();
- int act = startingProgress + (i + 1) / 10;
- int progress = MAX_PROGRESS_PREPARE
- + MAX_PROGRESS_IMPORT * act / total;
- if (monitor != null) {
- monitor.updateProgress(progress);
- }
-// iss.setValue(countFiles + (i + 1) / 10);
- }
-
- }
-
-
- /**
- * Import the selected source files. It calls the actual
- * parser methods depending on the type of the file.
- *
- * @param monitor
- * a ProgressMonitor to both receive progress updates and to be
- * polled for user requests to cancel.
- */
- public void doImport(ProgressMonitor monitor) {
- // Roughly equivalent to and derived from old Import.doFile()
- monitor.setMaximumProgress(MAX_PROGRESS);
- int progress = 0;
- monitor.updateSubTask(Translator.localize("dialog.import.preImport"));
- List<File> files = getFileList(monitor);
- progress += MAX_PROGRESS_PREPARE;
- monitor.updateProgress(progress);
- if (files.size() == 0) {
- monitor.notifyNullAction();
- return;
- }
- Model.getPump().stopPumpingEvents();
- boolean criticThreadWasOn = Designer.theDesigner().getAutoCritique();
- if (criticThreadWasOn) {
- Designer.theDesigner().setAutoCritique(false);
- }
- try {
- doImportInternal(files, monitor, progress);
- } finally {
- if (criticThreadWasOn) {
- Designer.theDesigner().setAutoCritique(true);
- }
- // TODO: Send an event instead of calling Explorer directly
- ExplorerEventAdaptor.getInstance().structureChanged();
- Model.getPump().startPumpingEvents();
- }
- }
-
-
- /**
- * Do the import.
- * @param filesLeft the files to parse
- * @param monitor the progress meter
- * @param progress the actual progress until now
- */
- private void doImportInternal(List<File> filesLeft,
- final ProgressMonitor monitor, int progress) {
- Project project = ProjectManager.getManager().getCurrentProject();
- initCurrentDiagram();
- final StringBuffer problems = new StringBuffer();
- Collection newElements = new HashSet();
-
- try {
- newElements.addAll(currentModule.parseFiles(
- project, filesLeft, this, monitor));
- } catch (Exception e) {
- problems.append(printToBuffer(e));
- }
- // New style importers don't create diagrams, so we'll do it
- // based on the list of newElements that they created
- if (isCreateDiagramsSelected() && diagramInterface != null) {
- addFiguresToDiagrams(newElements);
- }
-
- // Do layout even if problems occurred during import
- if (isDiagramLayoutSelected()) {
- // TODO: Monitor is getting dismissed before layout is complete
- monitor.updateMainTask(
- Translator.localize("dialog.import.postImport"));
- monitor.updateSubTask(
- Translator.localize("dialog.import.layoutAction"));
- layoutDiagrams(monitor, progress + filesLeft.size());
- }
-
- // Add messages from caught exceptions
- if (problems != null && problems.length() > 0) {
- monitor.notifyMessage(
- Translator.localize(
- "dialog.title.import-problems"), //$NON-NLS-1$
- Translator.localize(
- "label.import-problems"), //$NON-NLS-1$
- problems.toString());
- }
-
- monitor.updateMainTask(Translator.localize("dialog.import.done"));
- monitor.updateSubTask(""); //$NON-NLS-1$
- monitor.updateProgress(MAX_PROGRESS);
-
- }
-
-
- /**
- * Create diagram figures for a collection of model elements.
- *
- * @param newElements
- * the collection of elements for which figures should be
- * created.
- */
- private void addFiguresToDiagrams(Collection newElements) {
- for (Object element : newElements) {
- if (Model.getFacade().isAClassifier(element)
- || Model.getFacade().isAPackage(element)) {
-
- Object ns = Model.getFacade().getNamespace(element);
- if (ns == null) {
- diagramInterface.createRootClassDiagram();
- } else {
- String packageName = getQualifiedName(ns);
- // Select the correct diagram (implicitly creates it)
- if (packageName != null
- && !packageName.equals("")) {
- diagramInterface.selectClassDiagram(ns,
- packageName);
- } else {
- diagramInterface.createRootClassDiagram();
- }
- // Add the element to the diagram
- if (Model.getFacade().isAInterface(element)) {
- diagramInterface.addInterface(element,
- isMinimizeFigsSelected());
- } else if (Model.getFacade().isAClass(element)) {
- diagramInterface.addClass(element,
- isMinimizeFigsSelected());
- } else if (Model.getFacade().isAPackage(element)) {
- diagramInterface.addPackage(element);
- }
- }
- }
- }
- }
-
- /**
- * Return the fully qualified name of a model element in Java (dot
- * separated) format.
- * <p>
- * TODO: We really need a language independent format here. Perhaps the list
- * of names that form the hierarchy? - tfm
- */
- private String getQualifiedName(Object element) {
- StringBuffer sb = new StringBuffer();
-
- Object ns = element;
- while (ns != null) {
- String name = Model.getFacade().getName(ns);
- if (name == null) {
- name = "";
- }
- sb.insert(0, name);
- ns = Model.getFacade().getNamespace(ns);
- if (ns != null) {
- sb.insert(0, ".");
- }
- }
- return sb.toString();
- }
-
- /*
- * Print an exception trace to a string buffer
- */
- private StringBuffer printToBuffer(Exception e) {
- StringWriter sw = new StringWriter();
- PrintWriter pw = new java.io.PrintWriter(sw);
- e.printStackTrace(pw);
- return sw.getBuffer();
- }
-
-}
+// $Id$
+// Copyright (c) 2006, 2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.reveng;
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.argouml.application.api.Argo;
+import org.argouml.cognitive.Designer;
+import org.argouml.configuration.Configuration;
+import org.argouml.i18n.Translator;
+import org.argouml.kernel.Project;
+import org.argouml.kernel.ProjectManager;
+import org.argouml.model.Model;
+import org.argouml.taskmgmt.ProgressMonitor;
+import org.argouml.ui.explorer.ExplorerEventAdaptor;
+import org.argouml.ui.targetmanager.TargetManager;
+import org.argouml.uml.diagram.ArgoDiagram;
+import org.argouml.uml.diagram.static_structure.ClassDiagramGraphModel;
+import org.argouml.uml.diagram.static_structure.layout.ClassdiagramLayouter;
+import org.argouml.util.SuffixFilter;
+import org.tigris.gef.base.Globals;
+
+/**
+ * Source language import class - GUI independent superclass.
+ * <p>
+ * Specific Swing and SWT/Eclipse importers will extend this class.
+ * <p>
+ * <em>NOTE:</em>Any change to the public API here must be tested in both Swing
+ * (standalone ArgoUML) and Eclipse (ArgoEclipse) environments.
+ *
+ * @author Tom Morris
+ */
+public abstract class ImportCommon implements ImportSettingsInternal {
+
+ /**
+ * The % maximum progress required to preparing for import.
+ */
+ protected static final int MAX_PROGRESS_PREPARE = 1;
+
+ /**
+ * The % maximum progress required to import.
+ */
+ protected static final int MAX_PROGRESS_IMPORT = 99;
+
+ protected static final int MAX_PROGRESS = MAX_PROGRESS_PREPARE
+ + MAX_PROGRESS_IMPORT;
+ /**
+ * keys are module name, values are PluggableImport instance.
+ */
+ private Hashtable<String, ImportInterface> modules;
+
+ /**
+ * Current language module.
+ */
+ private ImportInterface currentModule;
+
+
+ /**
+ * Imported directory.
+ */
+ private String srcPath;
+
+ /**
+ * Create a interface to the current diagram.
+ */
+ private DiagramInterface diagramInterface;
+
+ private File[] selectedFiles;
+
+ private SuffixFilter selectedSuffixFilter;
+
+ protected ImportCommon() {
+ super();
+ modules = new Hashtable<String, ImportInterface>();
+
+ for (ImportInterface importer : ImporterManager.getInstance()
+ .getImporters()) {
+ modules.put(importer.getName(), importer);
+ }
+ if (modules.isEmpty()) {
+ throw new RuntimeException("Internal error. "
+ + "No importer modules found.");
+ }
+ // "Java" is the default module for historical reasons,
+ // but it's not required to be there
+ currentModule = modules.get("Java");
+ if (currentModule == null) {
+ currentModule = modules.elements().nextElement();
+ }
+ }
+
+ /*
+ * @see org.argouml.uml.reveng.ImportSettings#getImportLevel()
+ */
+ public abstract int getImportLevel();
+
+
+ /**
+ * Compute and cache the current diagram interface.
+ */
+ protected void initCurrentDiagram() {
+ diagramInterface = getCurrentDiagram();
+ }
+
+ /**
+ * Set target diagram.<p>
+ *
+ * @return selected diagram, if it is class diagram,
+ * else return null.
+ */
+ private DiagramInterface getCurrentDiagram() {
+ DiagramInterface result = null;
+ if (Globals.curEditor().getGraphModel()
+ instanceof ClassDiagramGraphModel) {
+ result = new DiagramInterface(Globals.curEditor());
+ } else {
+ Project p = ProjectManager.getManager().getCurrentProject();
+ TargetManager.getInstance().setTarget(p.getInitialTarget());
+ // the previous line helps, but we better check again:
+ if (Globals.curEditor().getGraphModel()
+ instanceof ClassDiagramGraphModel) {
+ result = new DiagramInterface(Globals.curEditor());
+ }
+ }
+ return result;
+ }
+
+ /*
+ * @see org.argouml.uml.reveng.ImportSettings#getInputSourceEncoding()
+ */
+ public abstract String getInputSourceEncoding();
+
+
+ /**
+ * Get the files. We generate it based on their specified
+ * file suffixes.
+ * @param monitor progress monitor which can be used to cancel long running
+ * request
+ * @return the list of files to be imported
+ */
+ protected List<File> getFileList(ProgressMonitor monitor) {
+ List<File> files = Arrays.asList(getSelectedFiles());
+ if (files.size() == 1) {
+ File file = files.get(0);
+ SuffixFilter suffixFilters[] = {selectedSuffixFilter};
+ if (suffixFilters[0] == null) {
+ // not a SuffixFilter selected, so we take all
+ suffixFilters = currentModule.getSuffixFilters();
+ }
+ files =
+ FileImportUtils.getList(
+ file, isDescendSelected(),
+ suffixFilters, monitor);
+ if (file.isDirectory()) {
+ setSrcPath(file.getAbsolutePath());
+ } else {
+ setSrcPath(null);
+ }
+ }
+
+
+ if (isChangedOnlySelected()) {
+ // filter out all unchanged files
+ Object model =
+ ProjectManager.getManager().getCurrentProject().getModel();
+ for (int i = files.size() - 1; i >= 0; i--) {
+ File f = files.get(i);
+ String fn = f.getAbsolutePath();
+ String lm = String.valueOf(f.lastModified());
+
+ if (Model.getFacade().getUmlVersion().charAt(0) == '1') {
+ // TODO: Not yet working for UML2
+ if (lm.equals(
+ Model.getFacade().getTaggedValueValue(model, fn))) {
+ files.remove(i);
+ }
+ }
+ }
+ }
+
+ return files;
+ }
+
+ /**
+ * Set path for processed directory.
+ *
+ * @param path the given path
+ */
+ public void setSrcPath(String path) {
+ srcPath = path;
+ }
+
+ /**
+ * @return path for processed directory.
+ */
+ public String getSrcPath() {
+ return srcPath;
+ }
+
+ /*
+ * Create a TaggedValue with a tag/type matching our source module
+ * filename and a value of the file's last modified timestamp.
+ *
+ * TODO: This functionality needs to be moved someplace useful if
+ * it's needed, otherwise it can be deleted. - tfm - 20070217
+ */
+ private void setLastModified(Project project, File file) {
+ // set the lastModified value
+ String fn = file.getAbsolutePath();
+ String lm = String.valueOf(file.lastModified());
+ if (lm != null) {
+ Model.getCoreHelper()
+ .setTaggedValue(project.getModel(), fn, lm);
+ }
+ }
+
+ /*
+ * @see org.argouml.uml.reveng.ImportSettings#isCreateDiagramsSelected()
+ */
+ public abstract boolean isCreateDiagramsSelected();
+
+ /*
+ * @see org.argouml.uml.reveng.ImportSettings#isMinimiseFigsSelected()
+ */
+ public abstract boolean isMinimizeFigsSelected();
+
+ /*
+ * @see org.argouml.uml.reveng.ImportSettingsInternal#isDiagramLayoutSelected()
+ */
+ public abstract boolean isDiagramLayoutSelected();
+
+ /*
+ * @see org.argouml.uml.reveng.ImportSettingsInternal#isDescendSelected()
+ */
+ public abstract boolean isDescendSelected();
+
+ /*
+ * @see org.argouml.uml.reveng.ImportSettingsInternal#isChangedOnlySelected()
+ */
+ public abstract boolean isChangedOnlySelected();
+
+ /**
+ * Gets the specified import module.
+ *
+ * @param importerName The import module's name
+ * @return The found import module, otherwise null
+ */
+ public ImportInterface getImporter(String importerName) {
+ return getModules().get(importerName);
+ }
+
+ /**
+ * Sets the files that will be imported.
+ *
+ * @param files The array of files.
+ */
+ public void setFiles(File[] files) {
+ if (files != null) {
+ setSelectedFiles(files);
+ }
+ }
+
+ protected Hashtable<String, ImportInterface> getModules() {
+ return modules;
+ }
+
+ protected void setSelectedFiles(final File[] files) {
+ selectedFiles = files;
+ }
+
+ /**
+ * Set the selected (file) suffix filter.
+ *
+ * @param suffixFilter the (file) suffix filter
+ */
+ protected void setSelectedSuffixFilter(final SuffixFilter suffixFilter) {
+ selectedSuffixFilter = suffixFilter;
+ }
+
+ protected File[] getSelectedFiles() {
+ File[] copy = new File[selectedFiles.length];
+ for (int i = 0; i < selectedFiles.length; i++) {
+ copy[i] = selectedFiles[i];
+ }
+ return copy;
+ //return Arrays.copyOf(selectedFiles, selectedFiles.length);
+ }
+
+ /**
+ * Sets the current import module.
+ *
+ * @param module
+ */
+ public void setCurrentModule(ImportInterface module) {
+ currentModule = module;
+ }
+
+ protected ImportInterface getCurrentModule() {
+ return currentModule;
+ }
+
+ /**
+ * Returns the possible languages in which the user can import the sources.
+ * @return a list of Strings with the names of the languages available
+ */
+ public List<String> getLanguages() {
+ return Collections.unmodifiableList(
+ new ArrayList<String>(modules.keySet()));
+ }
+
+ /**
+ * The flag for: descend directories recursively.
+ * This should be asked by the GUI for initialization.
+ * @return the flag stored in KEY_IMPORT_GENERAL_SETTINGS_FLAGS key or
+ * true if this is null.
+ */
+ public boolean isDescend() {
+ String flags =
+ Configuration.getString(
+ Argo.KEY_IMPORT_GENERAL_SETTINGS_FLAGS);
+ if (flags != null && flags.length() > 0) {
+ StringTokenizer st = new StringTokenizer(flags, ",");
+ if (st.hasMoreTokens() && st.nextToken().equals("false")) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The flag for: changed/new files only.
+ * This should be asked by the GUI for initialization.
+ * @return the flag stored in KEY_IMPORT_GENERAL_SETTINGS_FLAGS key or
+ * true if this is null.
+ */
+ public boolean isChangedOnly() {
+ String flags =
+ Configuration.getString(Argo.KEY_IMPORT_GENERAL_SETTINGS_FLAGS);
+ if (flags != null && flags.length() > 0) {
+ StringTokenizer st = new StringTokenizer(flags, ",");
+ skipTokens(st, 1);
+ if (st.hasMoreTokens() && st.nextToken().equals("false")) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The flag for: create diagrams from imported code.
+ * This should be asked by the GUI for initialization.
+ * @return the flag stored in KEY_IMPORT_GENERAL_SETTINGS_FLAGS key or
+ * true if this is null.
+ */
+ public boolean isCreateDiagrams() {
+ String flags =
+ Configuration.getString(
+ Argo.KEY_IMPORT_GENERAL_SETTINGS_FLAGS);
+ if (flags != null && flags.length() > 0) {
+ StringTokenizer st = new StringTokenizer(flags, ",");
+ skipTokens(st, 2);
+ if (st.hasMoreTokens() && st.nextToken().equals("false")) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The flag for: minimise class icons in diagrams.
+ * This should be asked by the GUI for initialization.
+ * @return the flag stored in KEY_IMPORT_GENERAL_SETTINGS_FLAGS key or
+ * true if this is null.
+ */
+ public boolean isMinimizeFigs() {
+ String flags =
+ Configuration.getString(
+ Argo.KEY_IMPORT_GENERAL_SETTINGS_FLAGS);
+ if (flags != null && flags.length() > 0) {
+ StringTokenizer st = new StringTokenizer(flags, ",");
+ skipTokens(st, 3);
+ if (st.hasMoreTokens() && st.nextToken().equals("false")) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private void skipTokens(StringTokenizer st, int count) {
+ for (int i = 0; i < count; i++) {
+ if (st.hasMoreTokens()) {
+ st.nextToken();
+ }
+ }
+ }
+
+ /**
+ * The flag for: perform automatic diagram layout.
+ * This should be asked by the GUI for initialization.
+ * @return the flag stored in KEY_IMPORT_GENERAL_SETTINGS_FLAGS key or
+ * true if this is null.
+ */
+ public boolean isDiagramLayout() {
+ String flags =
+ Configuration.getString(
+ Argo.KEY_IMPORT_GENERAL_SETTINGS_FLAGS);
+ if (flags != null && flags.length() > 0) {
+ StringTokenizer st = new StringTokenizer(flags, ",");
+ skipTokens(st, 4);
+ if (st.hasMoreTokens() && st.nextToken().equals("false")) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The default encoding. This should be asked by the GUI for
+ * initialization.
+ * @return the encoding stored in Argo.KEY_INPUT_SOURCE_ENCODING key or if
+ * this is null the default system encoding
+ */
+ public String getEncoding() {
+ String enc = Configuration.getString(Argo.KEY_INPUT_SOURCE_ENCODING);
+ if (enc == null || enc.trim().equals("")) { //$NON-NLS-1$
+ enc = System.getProperty("file.encoding"); //$NON-NLS-1$
+ }
+
+ return enc;
+ }
+
+
+ /**
+ * Layouts the diagrams.
+ *
+ * @param monitor
+ * the progress meter. Null if not progress updates desired.
+ * @param startingProgress
+ * the actual progress until now
+ */
+ public void layoutDiagrams(ProgressMonitor monitor, int startingProgress) {
+
+ if (diagramInterface == null) {
+ return;
+ }
+// if (monitor != null) {
+// monitor.updateSubTask(ImportsMessages.layoutingAction);
+// }
+ List<ArgoDiagram> diagrams = diagramInterface.getModifiedDiagramList();
+ int total = startingProgress + diagrams.size()
+ / 10;
+ for (int i = 0; i < diagrams.size(); i++) {
+ ArgoDiagram diagram = diagrams.get(i);
+ ClassdiagramLayouter layouter = new ClassdiagramLayouter(diagram);
+ layouter.layout();
+ int act = startingProgress + (i + 1) / 10;
+ int progress = MAX_PROGRESS_PREPARE
+ + MAX_PROGRESS_IMPORT * act / total;
+ if (monitor != null) {
+ monitor.updateProgress(progress);
+ }
+// iss.setValue(countFiles + (i + 1) / 10);
+ }
+
+ }
+
+
+ /**
+ * Import the selected source files. It calls the actual
+ * parser methods depending on the type of the file.
+ *
+ * @param monitor
+ * a ProgressMonitor to both receive progress updates and to be
+ * polled for user requests to cancel.
+ */
+ public void doImport(ProgressMonitor monitor) {
+ // Roughly equivalent to and derived from old Import.doFile()
+ monitor.setMaximumProgress(MAX_PROGRESS);
+ int progress = 0;
+ monitor.updateSubTask(Translator.localize("dialog.import.preImport"));
+ List<File> files = getFileList(monitor);
+ progress += MAX_PROGRESS_PREPARE;
+ monitor.updateProgress(progress);
+ if (files.size() == 0) {
+ monitor.notifyNullAction();
+ return;
+ }
+ Model.getPump().stopPumpingEvents();
+ boolean criticThreadWasOn = Designer.theDesigner().getAutoCritique();
+ if (criticThreadWasOn) {
+ Designer.theDesigner().setAutoCritique(false);
+ }
+ try {
+ doImportInternal(files, monitor, progress);
+ } finally {
+ if (criticThreadWasOn) {
+ Designer.theDesigner().setAutoCritique(true);
+ }
+ // TODO: Send an event instead of calling Explorer directly
+ ExplorerEventAdaptor.getInstance().structureChanged();
+ Model.getPump().startPumpingEvents();
+ }
+ }
+
+
+ /**
+ * Do the import.
+ * @param filesLeft the files to parse
+ * @param monitor the progress meter
+ * @param progress the actual progress until now
+ */
+ private void doImportInternal(List<File> filesLeft,
+ final ProgressMonitor monitor, int progress) {
+ Project project = ProjectManager.getManager().getCurrentProject();
+ initCurrentDiagram();
+ final StringBuffer problems = new StringBuffer();
+ Collection newElements = new HashSet();
+
+ try {
+ newElements.addAll(currentModule.parseFiles(
+ project, filesLeft, this, monitor));
+ } catch (Exception e) {
+ problems.append(printToBuffer(e));
+ }
+ // New style importers don't create diagrams, so we'll do it
+ // based on the list of newElements that they created
+ if (isCreateDiagramsSelected() && diagramInterface != null) {
+ addFiguresToDiagrams(newElements);
+ }
+
+ // Do layout even if problems occurred during import
+ if (isDiagramLayoutSelected()) {
+ // TODO: Monitor is getting dismissed before layout is complete
+ monitor.updateMainTask(
+ Translator.localize("dialog.import.postImport"));
+ monitor.updateSubTask(
+ Translator.localize("dialog.import.layoutAction"));
+ layoutDiagrams(monitor, progress + filesLeft.size());
+ }
+
+ // Add messages from caught exceptions
+ if (problems != null && problems.length() > 0) {
+ monitor.notifyMessage(
+ Translator.localize(
+ "dialog.title.import-problems"), //$NON-NLS-1$
+ Translator.localize(
+ "label.import-problems"), //$NON-NLS-1$
+ problems.toString());
+ }
+
+ monitor.updateMainTask(Translator.localize("dialog.import.done"));
+ monitor.updateSubTask(""); //$NON-NLS-1$
+ monitor.updateProgress(MAX_PROGRESS);
+
+ }
+
+
+ /**
+ * Create diagram figures for a collection of model elements.
+ *
+ * @param newElements
+ * the collection of elements for which figures should be
+ * created.
+ */
+ private void addFiguresToDiagrams(Collection newElements) {
+ for (Object element : newElements) {
+ if (Model.getFacade().isAClassifier(element)
+ || Model.getFacade().isAPackage(element)) {
+
+ Object ns = Model.getFacade().getNamespace(element);
+ if (ns == null) {
+ diagramInterface.createRootClassDiagram();
+ } else {
+ String packageName = getQualifiedName(ns);
+ // Select the correct diagram (implicitly creates it)
+ if (packageName != null
+ && !packageName.equals("")) {
+ diagramInterface.selectClassDiagram(ns,
+ packageName);
+ } else {
+ diagramInterface.createRootClassDiagram();
+ }
+ // Add the element to the diagram
+ if (Model.getFacade().isAInterface(element)) {
+ diagramInterface.addInterface(element,
+ isMinimizeFigsSelected());
+ } else if (Model.getFacade().isAClass(element)) {
+ diagramInterface.addClass(element,
+ isMinimizeFigsSelected());
+ } else if (Model.getFacade().isAPackage(element)) {
+ diagramInterface.addPackage(element);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Return the fully qualified name of a model element in Java (dot
+ * separated) format.
+ * <p>
+ * TODO: We really need a language independent format here. Perhaps the list
+ * of names that form the hierarchy? - tfm
+ */
+ private String getQualifiedName(Object element) {
+ StringBuffer sb = new StringBuffer();
+
+ Object ns = element;
+ while (ns != null) {
+ String name = Model.getFacade().getName(ns);
+ if (name == null) {
+ name = "";
+ }
+ sb.insert(0, name);
+ ns = Model.getFacade().getNamespace(ns);
+ if (ns != null) {
+ sb.insert(0, ".");
+ }
+ }
+ return sb.toString();
+ }
+
+ /*
+ * Print an exception trace to a string buffer
+ */
+ private StringBuffer printToBuffer(Exception e) {
+ StringWriter sw = new StringWriter();
+ PrintWriter pw = new java.io.PrintWriter(sw);
+ e.printStackTrace(pw);
+ return sw.getBuffer();
+ }
+
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportInterface.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportInterface.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportInterface.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportInterface.java 2010-01-11 11:49:55-0800
@@ -1,153 +1,153 @@
-// $Id$
-// Copyright (c) 2006-2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.reveng;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.List;
-
-import org.argouml.kernel.Project;
-import org.argouml.moduleloader.ModuleInterface;
-import org.argouml.taskmgmt.ProgressMonitor;
-import org.argouml.util.SuffixFilter;
-
-/**
- * An interface which identifies an ArgoUML plug-in which imports
- * source language modules and creates UML model elements in our model.
- * <p>
- * This interface is GUI independent and must not have any dependency on
- * Swing/AWT or SWT.
- *
- * @author Tom Morris
- * @since 0.23.2
- */
-
-public interface ImportInterface extends ModuleInterface {
-
- /**
- * The name of the TagDefinition which types the TaggedValues used store the
- * source path of a ModelElement. Used for round trip engineering purposes.
- * Set during reverse engineering and used during code generation.
- */
- public static final String SOURCE_PATH_TAG = "src_path";
-
- /**
- * The name of the TagDefinition which types the TaggedValues used store
- * information about a ModelElement which can't be stored in the model. Used
- * for round trip engineering purposes. Set during reverse engineering and
- * used during code generation.
- */
- public static final String SOURCE_MODIFIERS_TAG = "src_modifiers";
-
- /**
- * Provides an array of suffix filters for the module.
- *
- * @return SuffixFilter[] suffixes for processing
- */
- SuffixFilter[] getSuffixFilters();
-
- /**
- * Tells if the object is parseable or not. It's is up to the module
- * to decide whether it does something simple like verify that the file
- * has the correct extension, or something more complicated.
- *
- * @param file
- * object to be tested.
- * @return true if parseable, false if not.
- */
- boolean isParseable(File file);
-
- /**
- * Parse a collection of source files. The collection includes the full set
- * of files selected by the user.
- * <p>
- * If the import module needs multiple parsing passes to resolve identifiers
- * or for other reasons it needs to implement that internally. In previous
- * versions of ArgoUML the multipass behavior was implemented both in the
- * calling code and in some import modules. It is now solely the
- * responsibility of the module.
- *
- * @param p
- * the current project
- * @param files
- * Collection of files to be parsed
- * @param settings
- * Use this object to get common settings.
- * @param monitor
- * ProgressMonitor which will be updated as files are parsed and
- * checked for user requests to cancel. It is mandatory for the
- * module to both update progress and check for cancel requests.
- * @return a collection of model elements parsed from the given files
- * @throws ImportException
- * if an error occurs, this will contain the nested exception
- * that was originally thrown
- */
- Collection parseFiles(Project p, final Collection<File> files,
- ImportSettings settings, ProgressMonitor monitor)
- throws ImportException;
-
- /**
- * Returns a list with objects that represent settings for this import.
- * These objects implement the SettingsTypes.* interfaces.
- * <p>
- * The caller must determine what interface an object is implementing
- * iterating the interfaces SettingsTypes.*
- * <p>
- * This is done this way to eliminate the need to use GUI elements. The
- * settings can easily be mapped into any GUI elements, this way we are
- * independent from the type of GUI.
- *
- * @return the list of settings that are required by this particular import
- */
- List<SettingsTypes.Setting> getImportSettings();
-
-
- /**
- * Import subsystem exception to wrap any nested exceptions with when
- * thrown.
- */
- public class ImportException extends Exception {
-
- /**
- * Construct an ImportException with a wrapped Throwable.
- *
- * @param message message indicating error that occurred
- * @param cause the wrapped Exception
- */
- public ImportException(String message, Throwable cause) {
- super("Import Exception : " + message, cause);
- }
-
- public ImportException(String message) {
- super(message);
- }
-
- public ImportException(Throwable cause) {
- super("Import Exception", cause);
- }
-
- }
-
-}
+// $Id$
+// Copyright (c) 2006-2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.reveng;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.List;
+
+import org.argouml.kernel.Project;
+import org.argouml.moduleloader.ModuleInterface;
+import org.argouml.taskmgmt.ProgressMonitor;
+import org.argouml.util.SuffixFilter;
+
+/**
+ * An interface which identifies an ArgoUML plug-in which imports
+ * source language modules and creates UML model elements in our model.
+ * <p>
+ * This interface is GUI independent and must not have any dependency on
+ * Swing/AWT or SWT.
+ *
+ * @author Tom Morris
+ * @since 0.23.2
+ */
+
+public interface ImportInterface extends ModuleInterface {
+
+ /**
+ * The name of the TagDefinition which types the TaggedValues used store the
+ * source path of a ModelElement. Used for round trip engineering purposes.
+ * Set during reverse engineering and used during code generation.
+ */
+ public static final String SOURCE_PATH_TAG = "src_path";
+
+ /**
+ * The name of the TagDefinition which types the TaggedValues used store
+ * information about a ModelElement which can't be stored in the model. Used
+ * for round trip engineering purposes. Set during reverse engineering and
+ * used during code generation.
+ */
+ public static final String SOURCE_MODIFIERS_TAG = "src_modifiers";
+
+ /**
+ * Provides an array of suffix filters for the module.
+ *
+ * @return SuffixFilter[] suffixes for processing
+ */
+ SuffixFilter[] getSuffixFilters();
+
+ /**
+ * Tells if the object is parseable or not. It's is up to the module
+ * to decide whether it does something simple like verify that the file
+ * has the correct extension, or something more complicated.
+ *
+ * @param file
+ * object to be tested.
+ * @return true if parseable, false if not.
+ */
+ boolean isParseable(File file);
+
+ /**
+ * Parse a collection of source files. The collection includes the full set
+ * of files selected by the user.
+ * <p>
+ * If the import module needs multiple parsing passes to resolve identifiers
+ * or for other reasons it needs to implement that internally. In previous
+ * versions of ArgoUML the multipass behavior was implemented both in the
+ * calling code and in some import modules. It is now solely the
+ * responsibility of the module.
+ *
+ * @param p
+ * the current project
+ * @param files
+ * Collection of files to be parsed
+ * @param settings
+ * Use this object to get common settings.
+ * @param monitor
+ * ProgressMonitor which will be updated as files are parsed and
+ * checked for user requests to cancel. It is mandatory for the
+ * module to both update progress and check for cancel requests.
+ * @return a collection of model elements parsed from the given files
+ * @throws ImportException
+ * if an error occurs, this will contain the nested exception
+ * that was originally thrown
+ */
+ Collection parseFiles(Project p, final Collection<File> files,
+ ImportSettings settings, ProgressMonitor monitor)
+ throws ImportException;
+
+ /**
+ * Returns a list with objects that represent settings for this import.
+ * These objects implement the SettingsTypes.* interfaces.
+ * <p>
+ * The caller must determine what interface an object is implementing
+ * iterating the interfaces SettingsTypes.*
+ * <p>
+ * This is done this way to eliminate the need to use GUI elements. The
+ * settings can easily be mapped into any GUI elements, this way we are
+ * independent from the type of GUI.
+ *
+ * @return the list of settings that are required by this particular import
+ */
+ List<SettingsTypes.Setting> getImportSettings();
+
+
+ /**
+ * Import subsystem exception to wrap any nested exceptions with when
+ * thrown.
+ */
+ public class ImportException extends Exception {
+
+ /**
+ * Construct an ImportException with a wrapped Throwable.
+ *
+ * @param message message indicating error that occurred
+ * @param cause the wrapped Exception
+ */
+ public ImportException(String message, Throwable cause) {
+ super("Import Exception : " + message, cause);
+ }
+
+ public ImportException(String message) {
+ super(message);
+ }
+
+ public ImportException(Throwable cause) {
+ super("Import Exception", cause);
+ }
+
+ }
+
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportSettings.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportSettings.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportSettings.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportSettings.java 2010-01-11 11:49:55-0800
@@ -1,62 +1,62 @@
-// $Id$
-// Copyright (c) 2006-2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.reveng;
-
-/**
- * Interface for the generic import settings that a pluggable importer module
- * can query the value of.
- */
-
-public interface ImportSettings {
-
- /**
- * Import only classifiers
- */
- public static final int DETAIL_CLASSIFIER = 0;
-
- /**
- * Import classifiers and their features
- */
- public static final int DETAIL_CLASSIFIER_FEATURE = 1;
-
- /**
- * Import full detail
- */
- public static final int DETAIL_FULL = 2;
-
- /**
- * @return the level of import detail requested by the user. One of
- * DETAIL_CLASSIFIER, DETAIL_CLASSIFIER_FEATURE, or DETAIL_FULL.
- */
- public int getImportLevel();
-
- /**
- * @return string representing the character encoding of the input source
- * files.
- */
- public String getInputSourceEncoding();
-
-
-}
+// $Id$
+// Copyright (c) 2006-2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.reveng;
+
+/**
+ * Interface for the generic import settings that a pluggable importer module
+ * can query the value of.
+ */
+
+public interface ImportSettings {
+
+ /**
+ * Import only classifiers
+ */
+ public static final int DETAIL_CLASSIFIER = 0;
+
+ /**
+ * Import classifiers and their features
+ */
+ public static final int DETAIL_CLASSIFIER_FEATURE = 1;
+
+ /**
+ * Import full detail
+ */
+ public static final int DETAIL_FULL = 2;
+
+ /**
+ * @return the level of import detail requested by the user. One of
+ * DETAIL_CLASSIFIER, DETAIL_CLASSIFIER_FEATURE, or DETAIL_FULL.
+ */
+ public int getImportLevel();
+
+ /**
+ * @return string representing the character encoding of the input source
+ * files.
+ */
+ public String getInputSourceEncoding();
+
+
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportSettingsInternal.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportSettingsInternal.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportSettingsInternal.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/reveng/ImportSettingsInternal.java 2010-01-11 11:49:55-0800
@@ -1,69 +1,69 @@
-// $Id$
-// Copyright (c) 2006-2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.reveng;
-
-/**
- * Extended version of ImportSettings which must be implemented by GUI
- * implementations. NOT FOR USE BY IMPORT MODULES. It is a superset of the
- * settings available to pluggable import modules.
- */
-
-public interface ImportSettingsInternal extends ImportSettings {
-
- /**
- * @return true if the directory tree should be descended recursively
- * importing all parseable files.
- */
- public boolean isDescendSelected();
-
- /**
- * @return true if user as requested that only sources files which have been
- * changed since the last import should be imported this time. If
- * false, all files should be imported, regardless of their
- * modification date.
- */
- public boolean isChangedOnlySelected();
-
-
- /**
- * @return true if the user has requested automatic layout for figures
- * placed on diagrams.
- */
- public boolean isDiagramLayoutSelected();
-
- /**
- * @return true if the user has request diagrams to be created for packages
- * contained in the imported source code.
- */
- public boolean isCreateDiagramsSelected();
-
- /**
- * @return true, if user has requested that new figures placed in diagrams
- * should be minimized so they don't show internal compartments.
- */
- public boolean isMinimizeFigsSelected();
-
-
-}
+// $Id$
+// Copyright (c) 2006-2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.reveng;
+
+/**
+ * Extended version of ImportSettings which must be implemented by GUI
+ * implementations. NOT FOR USE BY IMPORT MODULES. It is a superset of the
+ * settings available to pluggable import modules.
+ */
+
+public interface ImportSettingsInternal extends ImportSettings {
+
+ /**
+ * @return true if the directory tree should be descended recursively
+ * importing all parseable files.
+ */
+ public boolean isDescendSelected();
+
+ /**
+ * @return true if user as requested that only sources files which have been
+ * changed since the last import should be imported this time. If
+ * false, all files should be imported, regardless of their
+ * modification date.
+ */
+ public boolean isChangedOnlySelected();
+
+
+ /**
+ * @return true if the user has requested automatic layout for figures
+ * placed on diagrams.
+ */
+ public boolean isDiagramLayoutSelected();
+
+ /**
+ * @return true if the user has request diagrams to be created for packages
+ * contained in the imported source code.
+ */
+ public boolean isCreateDiagramsSelected();
+
+ /**
+ * @return true, if user has requested that new figures placed in diagrams
+ * should be minimized so they don't show internal compartments.
+ */
+ public boolean isMinimizeFigsSelected();
+
+
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/reveng/ImporterManager.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/reveng/ImporterManager.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/reveng/ImporterManager.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/reveng/ImporterManager.java 2010-01-11 11:49:55-0800
@@ -1,112 +1,112 @@
-// $Id: ImporterManager.java 10735 2006-06-11 17:14:04Z mvw $
-// Copyright (c) 2005-2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.reveng;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.log4j.Logger;
-
-/**
- * Keeps an instance of each ImportInterface implementation module registered.
- * ImporterManager is a singleton.
- */
-public final class ImporterManager {
- /**
- * Logger.
- */
- private static final Logger LOG =
- Logger.getLogger(ImporterManager.class);
-
- /**
- * The instance.
- */
- private static final ImporterManager INSTANCE =
- new ImporterManager();
-
- /**
- * @return The singleton instance of the importer manager.
- */
- public static ImporterManager getInstance() {
- return INSTANCE;
- }
-
- private Set<ImportInterface> importers = new HashSet<ImportInterface>();
-
- /**
- * The constructor.
- */
- private ImporterManager() {
- // private constructor to enforce singleton
- }
-
-
- /**
- * Register a new source language importer.
- *
- * @param importer The ImportInterface object to register.
- */
- public void addImporter(ImportInterface importer) {
- importers.add(importer);
-// ArgoEventPump.fireEvent(
-// new ArgoImporterEvent(ArgoEventTypes.IMPORTER_ADDED, gen));
- LOG.debug("Added importer " + importer );
- }
-
- /**
- * Removes a importer.
- *
- * @param importer
- * the importer to be removed
- *
- * @return false if no matching importer had been registered
- */
- public boolean removeImporter(ImportInterface importer) {
- boolean status = importers.remove(importer);
-// if (status) {
-// ArgoEventPump.fireEvent(
-// new ArgoImporterEvent(
-// ArgoEventTypes.IMPORTER_REMOVED, old));
-// }
- LOG.debug("Removed importer " + importer );
- return status;
- }
-
- /**
- * @return A copy of the set of importers.
- */
- public Set<ImportInterface> getImporters() {
- return Collections.unmodifiableSet(importers);
- }
-
-
- /**
- * @return true, if at least one importer exists.
- */
- public boolean hasImporters() {
- return !importers.isEmpty();
- }
-}
+// $Id$
+// Copyright (c) 2005-2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.reveng;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.log4j.Logger;
+
+/**
+ * Keeps an instance of each ImportInterface implementation module registered.
+ * ImporterManager is a singleton.
+ */
+public final class ImporterManager {
+ /**
+ * Logger.
+ */
+ private static final Logger LOG =
+ Logger.getLogger(ImporterManager.class);
+
+ /**
+ * The instance.
+ */
+ private static final ImporterManager INSTANCE =
+ new ImporterManager();
+
+ /**
+ * @return The singleton instance of the importer manager.
+ */
+ public static ImporterManager getInstance() {
+ return INSTANCE;
+ }
+
+ private Set<ImportInterface> importers = new HashSet<ImportInterface>();
+
+ /**
+ * The constructor.
+ */
+ private ImporterManager() {
+ // private constructor to enforce singleton
+ }
+
+
+ /**
+ * Register a new source language importer.
+ *
+ * @param importer The ImportInterface object to register.
+ */
+ public void addImporter(ImportInterface importer) {
+ importers.add(importer);
+// ArgoEventPump.fireEvent(
+// new ArgoImporterEvent(ArgoEventTypes.IMPORTER_ADDED, gen));
+ LOG.debug("Added importer " + importer );
+ }
+
+ /**
+ * Removes a importer.
+ *
+ * @param importer
+ * the importer to be removed
+ *
+ * @return false if no matching importer had been registered
+ */
+ public boolean removeImporter(ImportInterface importer) {
+ boolean status = importers.remove(importer);
+// if (status) {
+// ArgoEventPump.fireEvent(
+// new ArgoImporterEvent(
+// ArgoEventTypes.IMPORTER_REMOVED, old));
+// }
+ LOG.debug("Removed importer " + importer );
+ return status;
+ }
+
+ /**
+ * @return A copy of the set of importers.
+ */
+ public Set<ImportInterface> getImporters() {
+ return Collections.unmodifiableSet(importers);
+ }
+
+
+ /**
+ * @return true, if at least one importer exists.
+ */
+ public boolean hasImporters() {
+ return !importers.isEmpty();
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/reveng/Setting.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/reveng/Setting.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/reveng/Setting.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/reveng/Setting.java 2010-01-11 11:49:55-0800
@@ -1,301 +1,301 @@
-// $Id$
-// Copyright (c) 2006-2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.reveng;
-
-import java.util.Collections;
-import java.util.List;
-
-
-/**
- * Common class that all settings types inherit from. It provides
- * a label to be associated with the setting in the user interface.
- */
-public class Setting implements SettingsTypes.Setting2 {
-
- /**
- * The message of the Label.
- */
- private String label;
-
- private String description;
-
- /**
- * Construct a new Setting with the given label text.
- *
- * @param labelText string to use as the label
- */
- public Setting(String labelText) {
- super();
- label = labelText;
- }
-
- /**
- * Construct a new Setting with the given label text and description.
- *
- * @param labelText string to use as the label
- * @param descriptionText string to use as description
- */
- public Setting(String labelText, String descriptionText) {
- this(labelText);
- description = descriptionText;
- }
-
-
- public final String getLabel() {
- return label;
- }
-
- public String getDescription() {
- return description;
- }
-
- /**
- * Setting which specifies a boolean value. Typical user presentation
- * would be labeled checkbox.
- */
- public static class BooleanSelection extends Setting
- implements SettingsTypes.BooleanSelection2 {
-
- private boolean defaultValue;
- private boolean value;
-
-
- /**
- * Construct a new setting object which specifies a boolean selection.
- *
- * @param labelText the string to use for the user visible label
- * @param initialValue the default value (true or false)
- */
- public BooleanSelection(String labelText, boolean initialValue) {
- super(labelText);
- this.defaultValue = initialValue;
- value = initialValue;
- }
-
- /*
- * @see org.argouml.uml.reveng.SettingsTypes.BooleanSelection#isSelected()
- */
- public final boolean isSelected() {
- return value;
- }
-
- /*
- * @see org.argouml.uml.reveng.SettingsTypes.BooleanSelection#getDefaultValue()
- */
- public final boolean getDefaultValue() {
- return defaultValue;
- }
-
- public final void setSelected(boolean selected) {
- this.value = selected;
- }
- }
-
- /**
- * A setting that allows a single selection from a list of choices.
- *
- * @see SettingsTypes.UniqueSelection2
- * @author Bogdan Pistol
- *
- */
- public static class UniqueSelection extends Setting implements
- SettingsTypes.UniqueSelection2 {
-
- /**
- * The list of String options
- */
- private List<String> options;
-
- /**
- * Default selection is UNDEFINED
- */
- private int defaultSelection = UNDEFINED_SELECTION;
-
- /**
- * The selection is UNDEFINED
- */
- private int selection = UNDEFINED_SELECTION;
-
- /**
- * Constructor
- *
- * @param label the user visible string to associate with this setting
- * @param variants
- * the list of String options
- * @param defaultVariant
- * the default selection or UNDEFINED_SELECTION
- */
- public UniqueSelection(String label, List<String> variants,
- int defaultVariant) {
- super(label);
- options = variants;
- if (isOption(defaultVariant)) {
- defaultSelection = defaultVariant;
- }
- }
-
- /**
- * Tests if this is a valid option.
- *
- * @param opt
- * the option to test
- * @return true if it's OK and false otherwise
- */
- private boolean isOption(int opt) {
- if (options == null) {
- return false;
- }
- return opt >= 0 && opt < options.size() ? true : false;
- }
-
- /*
- * @see org.argouml.uml.reveng.ImportSettingTypes.UniqueSelection#getDefaultSelection()
- */
- public int getDefaultSelection() {
- return defaultSelection;
- }
-
- /*
- * We return a new List with the options instead of the options themself
- * because we don't want the user to be able to change the options.
- *
- * @see org.argouml.uml.reveng.SettingsTypes.UniqueSelection#getOptions()
- */
- public List<String> getOptions() {
- return Collections.unmodifiableList(options);
- }
-
- /*
- * @see org.argouml.uml.reveng.ImportSettingTypes.UniqueSelection#setSelection(int)
- */
- public boolean setSelection(int sel) {
- if (isOption(sel)) {
- selection = sel;
- return true;
- } else {
- return false;
- }
- }
-
- /**
- * This method (package access) determines the selected option.
- *
- * @return the 0-based index of the selected option or the default
- * option if no other option was selected
- */
- public int getSelection() {
- if (selection == UNDEFINED_SELECTION) {
- return defaultSelection;
- } else {
- return selection;
- }
- }
-
- }
-
- /**
- * A selection for a single path (e.g. file system path or directory).
- */
- public static class PathSelection extends Setting implements
- SettingsTypes.PathSelection {
-
- private String path;
-
- private String defaultPath;
-
- /**
- * Construct a PathSelection with the given attributes.
- *
- * @param labelText string to use for the label of the path list
- * @param descriptionText longer description of the purpose of this
- * pathlist (appropriate for a tooltip)
- * @param defaultValue initial value of the path
- */
- public PathSelection(String labelText, String descriptionText,
- String defaultValue) {
- super(labelText, descriptionText);
- defaultPath = defaultValue;
- path = defaultValue;
- }
-
- public String getDefaultPath() {
- return defaultPath;
- }
-
- public String getPath() {
- return path;
- }
-
- /**
- * Set the path selection so that it is available to the importer.
- *
- * @param newPath string representing the new path
- */
- public void setPath(String newPath) {
- path = newPath;
- }
-
- }
-
- /**
- * An implementation of the PathListSelection.
- */
- public static class PathListSelection extends Setting implements
- SettingsTypes.PathListSelection {
-
- private List<String> defaultPathList;
-
- private List<String> pathList;
-
- /**
- * Construct a new PathListSelection with the given attributes.
- *
- * @param labelText string to use for the label of the path list
- * @param descriptionText longer description of the purpose of this
- * pathlist (appropriate for a tooltip)
- * @param defaultList inital values of the path list
- */
- public PathListSelection(String labelText, String descriptionText,
- List<String> defaultList) {
- super(labelText, descriptionText);
- defaultPathList = defaultList;
- pathList = defaultList;
- }
-
- public List<String> getDefaultPathList() {
- return defaultPathList;
- }
-
- public List<String> getPathList() {
- return pathList;
- }
-
- public void setPathList(List<String> newPathList) {
- pathList = newPathList;
- }
-
- }
-
+// $Id$
+// Copyright (c) 2006-2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.reveng;
+
+import java.util.Collections;
+import java.util.List;
+
+
+/**
+ * Common class that all settings types inherit from. It provides
+ * a label to be associated with the setting in the user interface.
+ */
+public class Setting implements SettingsTypes.Setting2 {
+
+ /**
+ * The message of the Label.
+ */
+ private String label;
+
+ private String description;
+
+ /**
+ * Construct a new Setting with the given label text.
+ *
+ * @param labelText string to use as the label
+ */
+ public Setting(String labelText) {
+ super();
+ label = labelText;
+ }
+
+ /**
+ * Construct a new Setting with the given label text and description.
+ *
+ * @param labelText string to use as the label
+ * @param descriptionText string to use as description
+ */
+ public Setting(String labelText, String descriptionText) {
+ this(labelText);
+ description = descriptionText;
+ }
+
+
+ public final String getLabel() {
+ return label;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Setting which specifies a boolean value. Typical user presentation
+ * would be labeled checkbox.
+ */
+ public static class BooleanSelection extends Setting
+ implements SettingsTypes.BooleanSelection2 {
+
+ private boolean defaultValue;
+ private boolean value;
+
+
+ /**
+ * Construct a new setting object which specifies a boolean selection.
+ *
+ * @param labelText the string to use for the user visible label
+ * @param initialValue the default value (true or false)
+ */
+ public BooleanSelection(String labelText, boolean initialValue) {
+ super(labelText);
+ this.defaultValue = initialValue;
+ value = initialValue;
+ }
+
+ /*
+ * @see org.argouml.uml.reveng.SettingsTypes.BooleanSelection#isSelected()
+ */
+ public final boolean isSelected() {
+ return value;
+ }
+
+ /*
+ * @see org.argouml.uml.reveng.SettingsTypes.BooleanSelection#getDefaultValue()
+ */
+ public final boolean getDefaultValue() {
+ return defaultValue;
+ }
+
+ public final void setSelected(boolean selected) {
+ this.value = selected;
+ }
+ }
+
+ /**
+ * A setting that allows a single selection from a list of choices.
+ *
+ * @see SettingsTypes.UniqueSelection2
+ * @author Bogdan Pistol
+ *
+ */
+ public static class UniqueSelection extends Setting implements
+ SettingsTypes.UniqueSelection2 {
+
+ /**
+ * The list of String options
+ */
+ private List<String> options;
+
+ /**
+ * Default selection is UNDEFINED
+ */
+ private int defaultSelection = UNDEFINED_SELECTION;
+
+ /**
+ * The selection is UNDEFINED
+ */
+ private int selection = UNDEFINED_SELECTION;
+
+ /**
+ * Constructor
+ *
+ * @param label the user visible string to associate with this setting
+ * @param variants
+ * the list of String options
+ * @param defaultVariant
+ * the default selection or UNDEFINED_SELECTION
+ */
+ public UniqueSelection(String label, List<String> variants,
+ int defaultVariant) {
+ super(label);
+ options = variants;
+ if (isOption(defaultVariant)) {
+ defaultSelection = defaultVariant;
+ }
+ }
+
+ /**
+ * Tests if this is a valid option.
+ *
+ * @param opt
+ * the option to test
+ * @return true if it's OK and false otherwise
+ */
+ private boolean isOption(int opt) {
+ if (options == null) {
+ return false;
+ }
+ return opt >= 0 && opt < options.size() ? true : false;
+ }
+
+ /*
+ * @see org.argouml.uml.reveng.ImportSettingTypes.UniqueSelection#getDefaultSelection()
+ */
+ public int getDefaultSelection() {
+ return defaultSelection;
+ }
+
+ /*
+ * We return a new List with the options instead of the options themself
+ * because we don't want the user to be able to change the options.
+ *
+ * @see org.argouml.uml.reveng.SettingsTypes.UniqueSelection#getOptions()
+ */
+ public List<String> getOptions() {
+ return Collections.unmodifiableList(options);
+ }
+
+ /*
+ * @see org.argouml.uml.reveng.ImportSettingTypes.UniqueSelection#setSelection(int)
+ */
+ public boolean setSelection(int sel) {
+ if (isOption(sel)) {
+ selection = sel;
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * This method (package access) determines the selected option.
+ *
+ * @return the 0-based index of the selected option or the default
+ * option if no other option was selected
+ */
+ public int getSelection() {
+ if (selection == UNDEFINED_SELECTION) {
+ return defaultSelection;
+ } else {
+ return selection;
+ }
+ }
+
+ }
+
+ /**
+ * A selection for a single path (e.g. file system path or directory).
+ */
+ public static class PathSelection extends Setting implements
+ SettingsTypes.PathSelection {
+
+ private String path;
+
+ private String defaultPath;
+
+ /**
+ * Construct a PathSelection with the given attributes.
+ *
+ * @param labelText string to use for the label of the path list
+ * @param descriptionText longer description of the purpose of this
+ * pathlist (appropriate for a tooltip)
+ * @param defaultValue initial value of the path
+ */
+ public PathSelection(String labelText, String descriptionText,
+ String defaultValue) {
+ super(labelText, descriptionText);
+ defaultPath = defaultValue;
+ path = defaultValue;
+ }
+
+ public String getDefaultPath() {
+ return defaultPath;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ /**
+ * Set the path selection so that it is available to the importer.
+ *
+ * @param newPath string representing the new path
+ */
+ public void setPath(String newPath) {
+ path = newPath;
+ }
+
+ }
+
+ /**
+ * An implementation of the PathListSelection.
+ */
+ public static class PathListSelection extends Setting implements
+ SettingsTypes.PathListSelection {
+
+ private List<String> defaultPathList;
+
+ private List<String> pathList;
+
+ /**
+ * Construct a new PathListSelection with the given attributes.
+ *
+ * @param labelText string to use for the label of the path list
+ * @param descriptionText longer description of the purpose of this
+ * pathlist (appropriate for a tooltip)
+ * @param defaultList inital values of the path list
+ */
+ public PathListSelection(String labelText, String descriptionText,
+ List<String> defaultList) {
+ super(labelText, descriptionText);
+ defaultPathList = defaultList;
+ pathList = defaultList;
+ }
+
+ public List<String> getDefaultPathList() {
+ return defaultPathList;
+ }
+
+ public List<String> getPathList() {
+ return pathList;
+ }
+
+ public void setPathList(List<String> newPathList) {
+ pathList = newPathList;
+ }
+
+ }
+
}
\ No newline at end of file
Modified: trunk/src/argouml-app/src/org/argouml/uml/reveng/SettingsTypes.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/reveng/SettingsTypes.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/reveng/SettingsTypes.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/reveng/SettingsTypes.java 2010-01-11 11:49:55-0800
@@ -1,227 +1,227 @@
-// $Id$
-// Copyright (c) 2006-2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.reveng;
-
-import java.util.List;
-
-/**
- * These are common raw types that a specific import type can use to
- * build complex settings. If additional types are required then this
- * interface should be extended.
- * @author Bogdan Pistol
- */
-public interface SettingsTypes {
-
- /**
- * Base setting class extended by all others
- */
- interface Setting {
- /**
- * Returns the string to use as a label for the associated
- * setting or setting group. The implementor is responsible for
- * translation into the local language.
- *
- * @return the String message
- */
- String getLabel();
-
- }
-
-
- /**
- * A setting which provides a description as well as a label.
- */
- interface Setting2 extends Setting {
-
- /**
- * Returns a string with an extended description of the setting,
- * suitable for use as a tooltip or help message.
- * @return the description
- */
- String getDescription();
- }
-
- /**
- * A generic type that has multiple options, from all these options
- * the user can choose only one option (the selected option).
- * <p>
- * There can be a default pre-selected option.
- */
- interface UniqueSelection extends Setting {
-
- /**
- * Selection is undefined.
- */
- public int UNDEFINED_SELECTION = -1;
-
- /**
- * Returns the available options from which the user can pick one.
- *
- * @return a list with Strings that identifies the options
- */
- List<String> getOptions();
-
- /**
- * This is the default selected option, if the user doesn't choose other
- * option then this will be the selected option.
- *
- * @return the 0 based index of the default option as is in the list
- * returned by
- * {@link SettingsTypes.UniqueSelection#getOptions()} or
- * UNDEFINED_SELECTION if there is no default option
- */
- int getDefaultSelection();
-
- /**
- * This is how the user can choose an option.
- *
- * @param selection
- * the 0 based index of the default option as is in the list
- * returned by
- * {@link SettingsTypes.UniqueSelection#getOptions()}
- * @return true if was successful or false if the selection is out of
- * bounds
- */
- boolean setSelection(int selection);
-
- /**
- * @return the current selection
- */
- int getSelection();
- }
-
- /**
- * A UniqueSelection which includes a description.
- * @see UniqueSelection
- */
- interface UniqueSelection2 extends UniqueSelection, Setting2 {
- }
-
- /**
- * Free form string setting to allow user to enter arbitrary string value.
- */
- interface UserString extends Setting {
- /**
- * @return the initial string to display, if any. May be null.
- */
- String getDefaultString();
-
- /**
- * @return the user entered string
- */
- String getUserString();
-
- /**
- * Set user string to new value.
- *
- * @param userString new user string
- */
- void setUserString(String userString);
-
- }
-
- /**
- * A UserString which includes a description.
- * @see UserString
- */
- interface UserString2 extends UserString, Setting2 {
-
- }
-
- /**
- * Boolean setting which can take values of true/false (on/off).
- */
- interface BooleanSelection extends Setting {
- /**
- * @return the default setting to use when first displayed.
- */
- boolean getDefaultValue();
- /**
- * @return the user selected value
- */
- boolean isSelected();
-
- /**
- * Set the selection value.
- * @param selected boolean indicating new state of selection
- */
- void setSelected(boolean selected);
- }
-
- /**
- * A BooleanSelection which includes a description.
- * @see BooleanSelection
- */
- interface BooleanSelection2 extends BooleanSelection, Setting2 {
-
- }
-
- /**
- * File system path setting. A single path in the file system.
- */
- interface PathSelection extends Setting2 {
-
- /**
- * @return the default path to use when first displayed
- */
- String getDefaultPath();
-
- /**
- * @return the user selected path
- */
- String getPath();
-
- /**
- * Set the path to the given value
- * @param path new value of the path
- */
- void setPath(String path);
- }
-
- /**
- * Setting containing ordered list of file system paths. Suitable for use
- * for things like a Java classpath or an preprocessor include path list.
- */
- interface PathListSelection extends Setting2 {
-
- /**
- * @return the default list of paths to use when first displayed
- */
- List<String> getDefaultPathList();
-
- /**
- * @return the user selected ordered list of file system paths
- */
- List<String> getPathList();
-
- /**
- * Set the path list to the new values.
- *
- * @param pathList new list of paths
- */
- void setPathList(List<String> pathList);
- }
-
-}
+// $Id$
+// Copyright (c) 2006-2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.reveng;
+
+import java.util.List;
+
+/**
+ * These are common raw types that a specific import type can use to
+ * build complex settings. If additional types are required then this
+ * interface should be extended.
+ * @author Bogdan Pistol
+ */
+public interface SettingsTypes {
+
+ /**
+ * Base setting class extended by all others
+ */
+ interface Setting {
+ /**
+ * Returns the string to use as a label for the associated
+ * setting or setting group. The implementor is responsible for
+ * translation into the local language.
+ *
+ * @return the String message
+ */
+ String getLabel();
+
+ }
+
+
+ /**
+ * A setting which provides a description as well as a label.
+ */
+ interface Setting2 extends Setting {
+
+ /**
+ * Returns a string with an extended description of the setting,
+ * suitable for use as a tooltip or help message.
+ * @return the description
+ */
+ String getDescription();
+ }
+
+ /**
+ * A generic type that has multiple options, from all these options
+ * the user can choose only one option (the selected option).
+ * <p>
+ * There can be a default pre-selected option.
+ */
+ interface UniqueSelection extends Setting {
+
+ /**
+ * Selection is undefined.
+ */
+ public int UNDEFINED_SELECTION = -1;
+
+ /**
+ * Returns the available options from which the user can pick one.
+ *
+ * @return a list with Strings that identifies the options
+ */
+ List<String> getOptions();
+
+ /**
+ * This is the default selected option, if the user doesn't choose other
+ * option then this will be the selected option.
+ *
+ * @return the 0 based index of the default option as is in the list
+ * returned by
+ * {@link SettingsTypes.UniqueSelection#getOptions()} or
+ * UNDEFINED_SELECTION if there is no default option
+ */
+ int getDefaultSelection();
+
+ /**
+ * This is how the user can choose an option.
+ *
+ * @param selection
+ * the 0 based index of the default option as is in the list
+ * returned by
+ * {@link SettingsTypes.UniqueSelection#getOptions()}
+ * @return true if was successful or false if the selection is out of
+ * bounds
+ */
+ boolean setSelection(int selection);
+
+ /**
+ * @return the current selection
+ */
+ int getSelection();
+ }
+
+ /**
+ * A UniqueSelection which includes a description.
+ * @see UniqueSelection
+ */
+ interface UniqueSelection2 extends UniqueSelection, Setting2 {
+ }
+
+ /**
+ * Free form string setting to allow user to enter arbitrary string value.
+ */
+ interface UserString extends Setting {
+ /**
+ * @return the initial string to display, if any. May be null.
+ */
+ String getDefaultString();
+
+ /**
+ * @return the user entered string
+ */
+ String getUserString();
+
+ /**
+ * Set user string to new value.
+ *
+ * @param userString new user string
+ */
+ void setUserString(String userString);
+
+ }
+
+ /**
+ * A UserString which includes a description.
+ * @see UserString
+ */
+ interface UserString2 extends UserString, Setting2 {
+
+ }
+
+ /**
+ * Boolean setting which can take values of true/false (on/off).
+ */
+ interface BooleanSelection extends Setting {
+ /**
+ * @return the default setting to use when first displayed.
+ */
+ boolean getDefaultValue();
+ /**
+ * @return the user selected value
+ */
+ boolean isSelected();
+
+ /**
+ * Set the selection value.
+ * @param selected boolean indicating new state of selection
+ */
+ void setSelected(boolean selected);
+ }
+
+ /**
+ * A BooleanSelection which includes a description.
+ * @see BooleanSelection
+ */
+ interface BooleanSelection2 extends BooleanSelection, Setting2 {
+
+ }
+
+ /**
+ * File system path setting. A single path in the file system.
+ */
+ interface PathSelection extends Setting2 {
+
+ /**
+ * @return the default path to use when first displayed
+ */
+ String getDefaultPath();
+
+ /**
+ * @return the user selected path
+ */
+ String getPath();
+
+ /**
+ * Set the path to the given value
+ * @param path new value of the path
+ */
+ void setPath(String path);
+ }
+
+ /**
+ * Setting containing ordered list of file system paths. Suitable for use
+ * for things like a Java classpath or an preprocessor include path list.
+ */
+ interface PathListSelection extends Setting2 {
+
+ /**
+ * @return the default list of paths to use when first displayed
+ */
+ List<String> getDefaultPathList();
+
+ /**
+ * @return the user selected ordered list of file system paths
+ */
+ List<String> getPathList();
+
+ /**
+ * Set the path list to the new values.
+ *
+ * @param pathList new list of paths
+ */
+ void setPathList(List<String> pathList);
+ }
+
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/ActionNavigateUpNextDown.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/ActionNavigateUpNextDown.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/ActionNavigateUpNextDown.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/ActionNavigateUpNextDown.java 2010-01-11 11:49:55-0800
@@ -1,88 +1,88 @@
-// $Id$
-// Copyright (c) 2006 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.ui;
-
-import java.util.Iterator;
-import java.util.List;
-
-import javax.swing.Action;
-
-import org.argouml.application.helpers.ResourceLoaderWrapper;
-
-/**
- * An action to navigate to the next in the list,
- * i.e. first we go up, then down again to the next in the list.
- *
- * @author Michiel
- */
-public abstract class ActionNavigateUpNextDown extends AbstractActionNavigate {
-
- /**
- * The constructor.
- */
- public ActionNavigateUpNextDown() {
- super("button.go-up-next-down", true);
- putValue(Action.SMALL_ICON,
- ResourceLoaderWrapper.lookupIconResource("NavigateUpNext"));
- }
-
- /*
- * @see org.argouml.uml.ui.AbstractActionNavigate#navigateTo(java.lang.Object)
- */
- protected Object navigateTo(Object source) {
- Object up = getParent(source);
- List family = getFamily(up);
- assert family.contains(source);
- Iterator it = family.iterator();
- while (it.hasNext()) {
- Object child = it.next();
- if (child == source) {
- if (it.hasNext()) {
- return it.next();
- } else {
- return null;
- }
- }
- }
- return null;
- }
-
- /**
- * Get the list of elements that we are navigating through.
- *
- * @param parent the parent element that owns all elements in the list
- * @return the list
- */
- public abstract List getFamily(Object parent);
-
- /**
- * Get the parent of the list of elements that we are navigating through.
- *
- * @param child the childelement of which we seek the previous element
- * @return the parent element
- */
- public abstract Object getParent(Object child);
-
-}
+// $Id$
+// Copyright (c) 2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.ui;
+
+import java.util.Iterator;
+import java.util.List;
+
+import javax.swing.Action;
+
+import org.argouml.application.helpers.ResourceLoaderWrapper;
+
+/**
+ * An action to navigate to the next in the list,
+ * i.e. first we go up, then down again to the next in the list.
+ *
+ * @author Michiel
+ */
+public abstract class ActionNavigateUpNextDown extends AbstractActionNavigate {
+
+ /**
+ * The constructor.
+ */
+ public ActionNavigateUpNextDown() {
+ super("button.go-up-next-down", true);
+ putValue(Action.SMALL_ICON,
+ ResourceLoaderWrapper.lookupIconResource("NavigateUpNext"));
+ }
+
+ /*
+ * @see org.argouml.uml.ui.AbstractActionNavigate#navigateTo(java.lang.Object)
+ */
+ protected Object navigateTo(Object source) {
+ Object up = getParent(source);
+ List family = getFamily(up);
+ assert family.contains(source);
+ Iterator it = family.iterator();
+ while (it.hasNext()) {
+ Object child = it.next();
+ if (child == source) {
+ if (it.hasNext()) {
+ return it.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get the list of elements that we are navigating through.
+ *
+ * @param parent the parent element that owns all elements in the list
+ * @return the list
+ */
+ public abstract List getFamily(Object parent);
+
+ /**
+ * Get the parent of the list of elements that we are navigating through.
+ *
+ * @param child the childelement of which we seek the previous element
+ * @return the parent element
+ */
+ public abstract Object getParent(Object child);
+
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/ActionNavigateUpPreviousDown.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/ActionNavigateUpPreviousDown.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/ActionNavigateUpPreviousDown.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/ActionNavigateUpPreviousDown.java 2010-01-11 11:49:55-0800
@@ -1,87 +1,87 @@
-// $Id$
-// Copyright (c) 2006 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.ui;
-
-import java.util.Iterator;
-import java.util.List;
-
-import javax.swing.Action;
-
-import org.argouml.application.helpers.ResourceLoaderWrapper;
-
-
-/**
- * An action to navigate to the previous in the list,
- * i.e. first we go up, then down again to the previous in the list.
- *
- * @author Michiel
- */
-public abstract class ActionNavigateUpPreviousDown
- extends AbstractActionNavigate {
-
- /**
- * The constructor.
- */
- public ActionNavigateUpPreviousDown() {
- super("button.go-up-previous-down", true);
- putValue(Action.SMALL_ICON,
- ResourceLoaderWrapper.lookupIconResource("NavigateUpPrevious"));
- }
-
- /*
- * @see org.argouml.uml.ui.AbstractActionNavigate#navigateTo(java.lang.Object)
- */
- protected Object navigateTo(Object source) {
- Object up = getParent(source);
- List family = getFamily(up);
- assert family.contains(source);
- Iterator it = family.iterator();
- Object previous = null;
- while (it.hasNext()) {
- Object child = it.next();
- if (child == source) {
- return previous;
- }
- previous = child;
- }
- return null;
- }
-
- /**
- * Get the list of elements that we are navigating through.
- *
- * @param parent the parent element that owns all elements in the list
- * @return the list
- */
- public abstract List getFamily(Object parent);
-
- /**
- * Get the parent of the list of elements that we are navigating through.
- *
- * @param child the childelement of which we seek the previous element
- * @return the parent element
- */
- public abstract Object getParent(Object child);
-}
+// $Id$
+// Copyright (c) 2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.ui;
+
+import java.util.Iterator;
+import java.util.List;
+
+import javax.swing.Action;
+
+import org.argouml.application.helpers.ResourceLoaderWrapper;
+
+
+/**
+ * An action to navigate to the previous in the list,
+ * i.e. first we go up, then down again to the previous in the list.
+ *
+ * @author Michiel
+ */
+public abstract class ActionNavigateUpPreviousDown
+ extends AbstractActionNavigate {
+
+ /**
+ * The constructor.
+ */
+ public ActionNavigateUpPreviousDown() {
+ super("button.go-up-previous-down", true);
+ putValue(Action.SMALL_ICON,
+ ResourceLoaderWrapper.lookupIconResource("NavigateUpPrevious"));
+ }
+
+ /*
+ * @see org.argouml.uml.ui.AbstractActionNavigate#navigateTo(java.lang.Object)
+ */
+ protected Object navigateTo(Object source) {
+ Object up = getParent(source);
+ List family = getFamily(up);
+ assert family.contains(source);
+ Iterator it = family.iterator();
+ Object previous = null;
+ while (it.hasNext()) {
+ Object child = it.next();
+ if (child == source) {
+ return previous;
+ }
+ previous = child;
+ }
+ return null;
+ }
+
+ /**
+ * Get the list of elements that we are navigating through.
+ *
+ * @param parent the parent element that owns all elements in the list
+ * @return the list
+ */
+ public abstract List getFamily(Object parent);
+
+ /**
+ * Get the parent of the list of elements that we are navigating through.
+ *
+ * @param child the childelement of which we seek the previous element
+ * @return the parent element
+ */
+ public abstract Object getParent(Object child);
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/LabelledLayout.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/LabelledLayout.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/LabelledLayout.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/LabelledLayout.java 2010-01-11 11:49:55-0800
@@ -1,554 +1,554 @@
-// $Id: LabelledLayout.java 14825 2008-05-28 23:21:50Z euluis $
-// Copyright (c) 2008-2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.ui;
-
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Insets;
-import java.awt.LayoutManager;
-import java.util.ArrayList;
-import javax.swing.JComboBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JToolBar;
-import javax.swing.UIManager;
-
-/**
- * This layout manager lines up components in 2 columns. All JLabels
- * are the first column and any component the JLabel is registered
- * with is in a second column next to the label. <p>
- *
- * Components are sized automatically to fill available space in the container
- * when it is resized. <p>
- *
- * All JLabel widths will be the largest of the JLabel preferred widths (unless
- * the container is too narrow). <p>
- *
- * The components will take up any left over width unless they are
- * restricted themselves by a maximum width. <p>
- *
- * The height of each component is either fixed or will resize to use up any
- * available space in the container. Whether a components height is resizable
- * is determined by checking whether the preferred height of that component is
- * greater then its minimum height. This is the case for components such as
- * JList which would require to expand to show the maximum number or items. <p>
- *
- * If a component is not to have its height resized then its preferred
- * height and minimum height should be the same. This is the case for
- * components such as JTextField and JComboBox* which should always stay the
- * same height. <p>
- *
- * [There is known bug in JRE5 where the prefered height and minimum height of
- * a JComboBox can differ. LabelledLayout has coded a workaround for this bug.
- * See - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6255154 ] <p>
- *
- * LabelledLayout can show multiple panels of label/component
- * pairs. The seperation of these panels is indicated by adding a
- * Seperator component to the container. Labelled layout starts
- * a new panel when detecting this Seperator. <p>
- *
- * When there are multiple panels, each panel is given equal width.
- * The width restriction of JLabels and components described above are then
- * dependent on panel width rather than container width.
- *
- * @author Bob Tarling
- */
-public class LabelledLayout implements LayoutManager, java.io.Serializable {
-
- private static final long serialVersionUID = -5596655602155151443L;
-
- /**
- * This is the horizontal gap (in pixels) which specifies the space
- * between sections. They can be changed at any time.
- * This should be a non negative integer.
- *
- * @serial
- * @see #getHgap()
- * @see #setHgap(int)
- */
- private int hgap;
-
- /**
- * This is the vertical gap (in pixels) which specifies the space
- * between rows. They can be changed at any time.
- * This should be a non negative integer.
- *
- * @serial
- * @see #getVgap()
- * @see #setVgap(int)
- */
- private int vgap;
-
- private boolean ignoreSplitters;
-
- /**
- * Construct a new LabelledLayout.
- */
- public LabelledLayout() {
- ignoreSplitters = false;
- hgap = 0;
- vgap = 0;
- }
-
- /**
- * Construct a new LabelledLayout.
- */
- public LabelledLayout(boolean ignoreSplitters) {
- this.ignoreSplitters = ignoreSplitters;
- this.hgap = 0;
- this.vgap = 0;
- }
-
- /**
- * Construct a new horizontal LabelledLayout with the specified
- * cell spacing.
- * @param hgap The horizontal gap between components
- * @param vgap The vertical gap between components
- */
- public LabelledLayout(int hgap, int vgap) {
- this.ignoreSplitters = false;
- this.hgap = hgap;
- this.vgap = vgap;
- }
-
- /**
- * Adds the specified component with the specified name to the
- * layout. This is included to satisfy the LayoutManager interface
- * but is not actually used in this layout implementation.
- *
- * @param name the name of the component
- * @param comp the component to be added
- */
- public void addLayoutComponent(String name, Component comp) {
- }
-
- /**
- * Removes the specified component from
- * the layout. This is included to satisfy the LayoutManager
- * interface but is not actually used in this layout
- * implementation.
- *
- * @param comp the component
- */
- public void removeLayoutComponent(Component comp) {
- }
-
- /**
- * Determines the preferred size of the container argument using
- * this labelled layout. The preferred size is that all child
- * components are in one section at their own preferred size with
- * gaps and border indents.
- */
- public Dimension preferredLayoutSize(Container parent) {
- synchronized (parent.getTreeLock()) {
- final Insets insets = parent.getInsets();
- int preferredWidth = 0;
- int preferredHeight = 0;
- int widestLabel = 0;
-
- final int componentCount = parent.getComponentCount();
- for (int i = 0; i < componentCount; ++i) {
- Component childComp = parent.getComponent(i);
- if (childComp.isVisible()
- && !(childComp instanceof Seperator)) {
- int childHeight = getPreferredHeight(childComp);
- if (childComp instanceof JLabel) {
- final JLabel jlabel = (JLabel) childComp;
- widestLabel =
- Math.max(widestLabel, getPreferredWidth(jlabel));
- childComp = jlabel.getLabelFor();
- final int childWidth = getPreferredWidth(childComp);
- preferredWidth =
- Math.max(preferredWidth, childWidth);
-
- childHeight =
- Math.min(childHeight, getPreferredHeight(jlabel));
- }
- preferredHeight += childHeight + this.vgap;
- }
- }
- preferredWidth += insets.left + widestLabel + insets.right;
- preferredHeight += insets.top + insets.bottom;
- return new Dimension(
- insets.left + widestLabel + preferredWidth + insets.right,
- preferredHeight);
- }
- }
-
- /**
- * Required by LayoutManager.
- *
- * @see java.awt.LayoutManager#minimumLayoutSize(java.awt.Container)
- */
- public Dimension minimumLayoutSize(Container parent) {
- synchronized (parent.getTreeLock()) {
- final Insets insets = parent.getInsets();
- int minimumHeight = insets.top + insets.bottom;
-
- final int componentCount = parent.getComponentCount();
- for (int i = 0; i < componentCount; ++i) {
- Component childComp = parent.getComponent(i);
- if (childComp instanceof JLabel) {
- final JLabel jlabel = (JLabel) childComp;
- childComp = jlabel.getLabelFor();
-
- final int childHeight = Math.max(
- getMinimumHeight(childComp),
- getMinimumHeight(jlabel));
- minimumHeight += childHeight + this.vgap;
- }
- }
- return new Dimension(0, minimumHeight);
- }
- }
-
- /**
- * @see java.awt.LayoutManager#layoutContainer(java.awt.Container)
- */
- public void layoutContainer(Container parent) {
- synchronized (parent.getTreeLock()) {
- int sectionX = parent.getInsets().left;
-
- final ArrayList<Component> components = new ArrayList<Component>();
- final int sectionCount = getSectionCount(parent);
- final int sectionWidth = getSectionWidth(parent, sectionCount);
- int sectionNo = 0;
- for (int i = 0; i < parent.getComponentCount(); ++i) {
- final Component childComp = parent.getComponent(i);
- if (childComp instanceof Seperator) {
- if (!this.ignoreSplitters) {
- layoutSection(
- parent,
- sectionX,
- sectionWidth,
- components,
- sectionNo++);
- sectionX += sectionWidth + this.hgap;
- components.clear();
- }
- } else {
- components.add(parent.getComponent(i));
- }
- }
- layoutSection(
- parent,
- sectionX,
- sectionWidth,
- components,
- sectionNo);
- }
- }
-
- /** Determine the number of sections. There is only ever one
- * section if oriented vertically. If oriented horizontally the
- * number of sections is deduced from the number of Splitters in
- * the parent container.
- */
- private int getSectionCount(Container parent) {
- int sectionCount = 1;
- final int componentCount = parent.getComponentCount();
- if (!ignoreSplitters) {
- for (int i = 0; i < componentCount; ++i) {
- if (parent.getComponent(i) instanceof Seperator) {
- ++sectionCount;
- }
- }
- }
- return sectionCount;
- }
-
- /**
- * Determine the width of each section from the section count.
- * This is the working width minus the gaps between sections. This
- * result is then divided equally by the section count.
- */
- private int getSectionWidth(Container parent, int sectionCount) {
- return (getUsableWidth(parent) - (sectionCount - 1) * this.hgap)
- / sectionCount;
- }
-
- /**
- * Determine the usable width of the parent.
- * This is the full width minus any borders.
- */
- private int getUsableWidth(Container parent) {
- final Insets insets = parent.getInsets();
- return parent.getWidth() - (insets.left + insets.right);
- }
-
- /**
- * Layout a single section
- */
- private void layoutSection(
- final Container parent,
- final int sectionX,
- final int sectionWidth,
- final ArrayList components,
- final int sectionNo) {
- final ArrayList<Integer> rowHeights = new ArrayList<Integer>();
-
- final int componentCount = components.size();
- if (componentCount == 0) {
- return;
- }
-
- int labelWidth = 0;
- int unknownHeightCount = 0;
- int totalHeight = 0;
-
- // Build up an array list of the heights of each label/component pair.
- // Heights of zero indicate a proportional height.
- Component previousComp = null;
- for (int i = 0; i < componentCount; ++i) {
- final Component childComp = (Component) components.get(i);
- final int childHeight;
- if (childComp instanceof JToolBar && previousComp instanceof ScrollList) {
- // Ignore toolbars belonging to ScrollList
- } else if (childComp instanceof JLabel) {
- final JLabel jlabel = (JLabel) childComp;
- final Component labelledComp = jlabel.getLabelFor();
-
- labelWidth = Math.max(labelWidth, getPreferredWidth(jlabel));
-
- if (labelledComp != null) {
- ++i;
- childHeight = getChildHeight(labelledComp);
- if (childHeight == 0) {
- ++unknownHeightCount;
- }
- } else {
- childHeight = getPreferredHeight(jlabel);
- }
-
- totalHeight += childHeight + this.vgap;
- rowHeights.add(new Integer(childHeight));
- } else {
- // to manage the case there are no label/component
- // pairs but just one component
- childHeight = getChildHeight(childComp);
- if (childHeight == 0) {
- ++unknownHeightCount;
- }
-
- totalHeight += childHeight + this.vgap;
- rowHeights.add(new Integer(childHeight));
- }
-
- previousComp = childComp;
- }
- totalHeight -= this.vgap;
-
- final Insets insets = parent.getInsets();
- final int parentHeight =
- parent.getHeight() - (insets.top + insets.bottom);
- // Set the child components to the heights in the array list
- // calculating the height of any proportional component on the
- // fly. FIXME - This assumes that the JLabel and the
- // component it labels have been added to the parent component
- // consecutively.
- int y = insets.top;
- int row = 0;
- previousComp = null;
- for (int i = 0; i < componentCount; ++i) {
- Component childComp = (Component) components.get(i);
- if (childComp.isVisible()) {
- if (childComp instanceof JToolBar && previousComp instanceof ScrollList) {
- childComp.setLocation(previousComp.getY(), previousComp.getX() - childComp.getWidth());
- } else {
- int rowHeight;
- int componentWidth = sectionWidth;
- int componentX = sectionX;
- // If the component is a JLabel which has another
- // component assigned then position/size the label and
- // calculate the size of the registered component
- if (childComp instanceof JLabel
- && ((JLabel) childComp).getLabelFor() != null) {
- i++; // Assumes the next child is the labelled component
- final JLabel jlabel = (JLabel) childComp;
- childComp = jlabel.getLabelFor();
- jlabel.setBounds(sectionX, y, labelWidth,
- getPreferredHeight(jlabel));
- componentWidth = sectionWidth - (labelWidth);
- componentX = sectionX + labelWidth;
- }
- rowHeight = rowHeights.get(row).intValue();
- if (rowHeight == 0) {
- try {
- rowHeight = calculateHeight(
- parentHeight,
- totalHeight,
- unknownHeightCount--,
- childComp);
- } catch (ArithmeticException e) {
- String lookAndFeel =
- UIManager.getLookAndFeel().getClass().getName();
- throw new IllegalStateException(
- "Division by zero laying out "
- + childComp.getClass().getName()
- + " on " + parent.getClass().getName()
- + " in section " + sectionNo
- + " using "
- + lookAndFeel,
- e);
- }
- totalHeight += rowHeight;
- }
- // Make sure the component width isn't any greater
- // than its maximum allowed width
- if (childComp.getMaximumSize() != null
- && getMaximumWidth(childComp) < componentWidth) {
- componentWidth = getMaximumWidth(childComp);
- }
- childComp.setBounds(componentX, y, componentWidth, rowHeight);
- y += rowHeight + this.vgap;
- ++row;
- previousComp = childComp;
- }
- }
- }
- }
-
- /**
- * @param childComp a component
- * @return 0 for a resizable component or a positive value for its fixed
- * height
- */
- private int getChildHeight(Component childComp) {
- if (isResizable(childComp)) {
- // If the child component is resizable then
- // we don't know it's actual size yet.
- // It will be calculated later as a
- // proportion of the available left over
- // space. For now this is flagged as zero.
- return 0;
- } else {
- // If a preferred height is not given or is
- // the same as the minimum height then fix the
- // height of this row.
- return getMinimumHeight(childComp);
- }
- }
-
- /**
- * A component is resizable if its minimum size is less than
- * its preferred size.
- * There is a workaround here for a bug introduced in JRE5
- * where JComboBox minimum and preferred size now differ.
- * JComboBox is not resizable.
- * Anything in a JScrollPane is considered resizable
- * @param comp the component to check for resizability.
- * @return true if the given component should be resized to take u[p empty
- * space.
- */
- private boolean isResizable(Component comp) {
- if (comp == null) {
- return false;
- }
- if (comp instanceof JComboBox) {
- return false;
- }
- if (comp.getPreferredSize() == null) {
- return false;
- }
- if (comp.getMinimumSize() == null) {
- return false;
- }
- return (getMinimumHeight(comp) < getPreferredHeight(comp));
- }
-
- private final int calculateHeight(
- final int parentHeight,
- final int totalHeight,
- final int unknownHeightsLeft,
- final Component childComp) {
- return Math.max(
- (parentHeight - totalHeight) / unknownHeightsLeft,
- getMinimumHeight(childComp));
- }
-
- private int getPreferredHeight(final Component comp) {
- return (int) comp.getPreferredSize().getHeight();
- }
-
- private int getPreferredWidth(final Component comp) {
- return (int) comp.getPreferredSize().getWidth();
- }
-
- private int getMinimumHeight(final Component comp) {
- return (int) comp.getMinimumSize().getHeight();
- }
-
- private int getMaximumWidth(final Component comp) {
- return (int) comp.getMaximumSize().getWidth();
- }
-
- /**
- * Create a new instance of the Separator that splits the layout in columns
- * @return the separator
- */
- public static Seperator getSeparator() {
- return new Seperator();
- }
-
- /**
- * @return the horizontal gaps between components
- */
- public int getHgap() {
- return this.hgap;
- }
-
- /**
- * Set the horizontal gaps between components
- * @param hgap the horizontal gap
- */
- public void setHgap(int hgap) {
- this.hgap = hgap;
- }
-
- /**
- * @return the vertical gaps between components
- */
- public int getVgap() {
- return this.vgap;
- }
-
- /**
- * Set the vertical gaps between components
- * @param vgap the horizontal gap
- */
- public void setVgap(int vgap) {
- this.vgap = vgap;
- }
-}
-
-class Seperator extends JPanel {
-
- private static final long serialVersionUID = -4143634500959911688L;
-
- Seperator() {
- super.setVisible(false);
- }
-}
+// $Id$
+// Copyright (c) 2008-2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.ui;
+
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.Insets;
+import java.awt.LayoutManager;
+import java.util.ArrayList;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JToolBar;
+import javax.swing.UIManager;
+
+/**
+ * This layout manager lines up components in 2 columns. All JLabels
+ * are the first column and any component the JLabel is registered
+ * with is in a second column next to the label. <p>
+ *
+ * Components are sized automatically to fill available space in the container
+ * when it is resized. <p>
+ *
+ * All JLabel widths will be the largest of the JLabel preferred widths (unless
+ * the container is too narrow). <p>
+ *
+ * The components will take up any left over width unless they are
+ * restricted themselves by a maximum width. <p>
+ *
+ * The height of each component is either fixed or will resize to use up any
+ * available space in the container. Whether a components height is resizable
+ * is determined by checking whether the preferred height of that component is
+ * greater then its minimum height. This is the case for components such as
+ * JList which would require to expand to show the maximum number or items. <p>
+ *
+ * If a component is not to have its height resized then its preferred
+ * height and minimum height should be the same. This is the case for
+ * components such as JTextField and JComboBox* which should always stay the
+ * same height. <p>
+ *
+ * [There is known bug in JRE5 where the prefered height and minimum height of
+ * a JComboBox can differ. LabelledLayout has coded a workaround for this bug.
+ * See - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6255154 ] <p>
+ *
+ * LabelledLayout can show multiple panels of label/component
+ * pairs. The seperation of these panels is indicated by adding a
+ * Seperator component to the container. Labelled layout starts
+ * a new panel when detecting this Seperator. <p>
+ *
+ * When there are multiple panels, each panel is given equal width.
+ * The width restriction of JLabels and components described above are then
+ * dependent on panel width rather than container width.
+ *
+ * @author Bob Tarling
+ */
+public class LabelledLayout implements LayoutManager, java.io.Serializable {
+
+ private static final long serialVersionUID = -5596655602155151443L;
+
+ /**
+ * This is the horizontal gap (in pixels) which specifies the space
+ * between sections. They can be changed at any time.
+ * This should be a non negative integer.
+ *
+ * @serial
+ * @see #getHgap()
+ * @see #setHgap(int)
+ */
+ private int hgap;
+
+ /**
+ * This is the vertical gap (in pixels) which specifies the space
+ * between rows. They can be changed at any time.
+ * This should be a non negative integer.
+ *
+ * @serial
+ * @see #getVgap()
+ * @see #setVgap(int)
+ */
+ private int vgap;
+
+ private boolean ignoreSplitters;
+
+ /**
+ * Construct a new LabelledLayout.
+ */
+ public LabelledLayout() {
+ ignoreSplitters = false;
+ hgap = 0;
+ vgap = 0;
+ }
+
+ /**
+ * Construct a new LabelledLayout.
+ */
+ public LabelledLayout(boolean ignoreSplitters) {
+ this.ignoreSplitters = ignoreSplitters;
+ this.hgap = 0;
+ this.vgap = 0;
+ }
+
+ /**
+ * Construct a new horizontal LabelledLayout with the specified
+ * cell spacing.
+ * @param hgap The horizontal gap between components
+ * @param vgap The vertical gap between components
+ */
+ public LabelledLayout(int hgap, int vgap) {
+ this.ignoreSplitters = false;
+ this.hgap = hgap;
+ this.vgap = vgap;
+ }
+
+ /**
+ * Adds the specified component with the specified name to the
+ * layout. This is included to satisfy the LayoutManager interface
+ * but is not actually used in this layout implementation.
+ *
+ * @param name the name of the component
+ * @param comp the component to be added
+ */
+ public void addLayoutComponent(String name, Component comp) {
+ }
+
+ /**
+ * Removes the specified component from
+ * the layout. This is included to satisfy the LayoutManager
+ * interface but is not actually used in this layout
+ * implementation.
+ *
+ * @param comp the component
+ */
+ public void removeLayoutComponent(Component comp) {
+ }
+
+ /**
+ * Determines the preferred size of the container argument using
+ * this labelled layout. The preferred size is that all child
+ * components are in one section at their own preferred size with
+ * gaps and border indents.
+ */
+ public Dimension preferredLayoutSize(Container parent) {
+ synchronized (parent.getTreeLock()) {
+ final Insets insets = parent.getInsets();
+ int preferredWidth = 0;
+ int preferredHeight = 0;
+ int widestLabel = 0;
+
+ final int componentCount = parent.getComponentCount();
+ for (int i = 0; i < componentCount; ++i) {
+ Component childComp = parent.getComponent(i);
+ if (childComp.isVisible()
+ && !(childComp instanceof Seperator)) {
+ int childHeight = getPreferredHeight(childComp);
+ if (childComp instanceof JLabel) {
+ final JLabel jlabel = (JLabel) childComp;
+ widestLabel =
+ Math.max(widestLabel, getPreferredWidth(jlabel));
+ childComp = jlabel.getLabelFor();
+ final int childWidth = getPreferredWidth(childComp);
+ preferredWidth =
+ Math.max(preferredWidth, childWidth);
+
+ childHeight =
+ Math.min(childHeight, getPreferredHeight(jlabel));
+ }
+ preferredHeight += childHeight + this.vgap;
+ }
+ }
+ preferredWidth += insets.left + widestLabel + insets.right;
+ preferredHeight += insets.top + insets.bottom;
+ return new Dimension(
+ insets.left + widestLabel + preferredWidth + insets.right,
+ preferredHeight);
+ }
+ }
+
+ /**
+ * Required by LayoutManager.
+ *
+ * @see java.awt.LayoutManager#minimumLayoutSize(java.awt.Container)
+ */
+ public Dimension minimumLayoutSize(Container parent) {
+ synchronized (parent.getTreeLock()) {
+ final Insets insets = parent.getInsets();
+ int minimumHeight = insets.top + insets.bottom;
+
+ final int componentCount = parent.getComponentCount();
+ for (int i = 0; i < componentCount; ++i) {
+ Component childComp = parent.getComponent(i);
+ if (childComp instanceof JLabel) {
+ final JLabel jlabel = (JLabel) childComp;
+ childComp = jlabel.getLabelFor();
+
+ final int childHeight = Math.max(
+ getMinimumHeight(childComp),
+ getMinimumHeight(jlabel));
+ minimumHeight += childHeight + this.vgap;
+ }
+ }
+ return new Dimension(0, minimumHeight);
+ }
+ }
+
+ /**
+ * @see java.awt.LayoutManager#layoutContainer(java.awt.Container)
+ */
+ public void layoutContainer(Container parent) {
+ synchronized (parent.getTreeLock()) {
+ int sectionX = parent.getInsets().left;
+
+ final ArrayList<Component> components = new ArrayList<Component>();
+ final int sectionCount = getSectionCount(parent);
+ final int sectionWidth = getSectionWidth(parent, sectionCount);
+ int sectionNo = 0;
+ for (int i = 0; i < parent.getComponentCount(); ++i) {
+ final Component childComp = parent.getComponent(i);
+ if (childComp instanceof Seperator) {
+ if (!this.ignoreSplitters) {
+ layoutSection(
+ parent,
+ sectionX,
+ sectionWidth,
+ components,
+ sectionNo++);
+ sectionX += sectionWidth + this.hgap;
+ components.clear();
+ }
+ } else {
+ components.add(parent.getComponent(i));
+ }
+ }
+ layoutSection(
+ parent,
+ sectionX,
+ sectionWidth,
+ components,
+ sectionNo);
+ }
+ }
+
+ /** Determine the number of sections. There is only ever one
+ * section if oriented vertically. If oriented horizontally the
+ * number of sections is deduced from the number of Splitters in
+ * the parent container.
+ */
+ private int getSectionCount(Container parent) {
+ int sectionCount = 1;
+ final int componentCount = parent.getComponentCount();
+ if (!ignoreSplitters) {
+ for (int i = 0; i < componentCount; ++i) {
+ if (parent.getComponent(i) instanceof Seperator) {
+ ++sectionCount;
+ }
+ }
+ }
+ return sectionCount;
+ }
+
+ /**
+ * Determine the width of each section from the section count.
+ * This is the working width minus the gaps between sections. This
+ * result is then divided equally by the section count.
+ */
+ private int getSectionWidth(Container parent, int sectionCount) {
+ return (getUsableWidth(parent) - (sectionCount - 1) * this.hgap)
+ / sectionCount;
+ }
+
+ /**
+ * Determine the usable width of the parent.
+ * This is the full width minus any borders.
+ */
+ private int getUsableWidth(Container parent) {
+ final Insets insets = parent.getInsets();
+ return parent.getWidth() - (insets.left + insets.right);
+ }
+
+ /**
+ * Layout a single section
+ */
+ private void layoutSection(
+ final Container parent,
+ final int sectionX,
+ final int sectionWidth,
+ final ArrayList components,
+ final int sectionNo) {
+ final ArrayList<Integer> rowHeights = new ArrayList<Integer>();
+
+ final int componentCount = components.size();
+ if (componentCount == 0) {
+ return;
+ }
+
+ int labelWidth = 0;
+ int unknownHeightCount = 0;
+ int totalHeight = 0;
+
+ // Build up an array list of the heights of each label/component pair.
+ // Heights of zero indicate a proportional height.
+ Component previousComp = null;
+ for (int i = 0; i < componentCount; ++i) {
+ final Component childComp = (Component) components.get(i);
+ final int childHeight;
+ if (childComp instanceof JToolBar && previousComp instanceof ScrollList) {
+ // Ignore toolbars belonging to ScrollList
+ } else if (childComp instanceof JLabel) {
+ final JLabel jlabel = (JLabel) childComp;
+ final Component labelledComp = jlabel.getLabelFor();
+
+ labelWidth = Math.max(labelWidth, getPreferredWidth(jlabel));
+
+ if (labelledComp != null) {
+ ++i;
+ childHeight = getChildHeight(labelledComp);
+ if (childHeight == 0) {
+ ++unknownHeightCount;
+ }
+ } else {
+ childHeight = getPreferredHeight(jlabel);
+ }
+
+ totalHeight += childHeight + this.vgap;
+ rowHeights.add(new Integer(childHeight));
+ } else {
+ // to manage the case there are no label/component
+ // pairs but just one component
+ childHeight = getChildHeight(childComp);
+ if (childHeight == 0) {
+ ++unknownHeightCount;
+ }
+
+ totalHeight += childHeight + this.vgap;
+ rowHeights.add(new Integer(childHeight));
+ }
+
+ previousComp = childComp;
+ }
+ totalHeight -= this.vgap;
+
+ final Insets insets = parent.getInsets();
+ final int parentHeight =
+ parent.getHeight() - (insets.top + insets.bottom);
+ // Set the child components to the heights in the array list
+ // calculating the height of any proportional component on the
+ // fly. FIXME - This assumes that the JLabel and the
+ // component it labels have been added to the parent component
+ // consecutively.
+ int y = insets.top;
+ int row = 0;
+ previousComp = null;
+ for (int i = 0; i < componentCount; ++i) {
+ Component childComp = (Component) components.get(i);
+ if (childComp.isVisible()) {
+ if (childComp instanceof JToolBar && previousComp instanceof ScrollList) {
+ childComp.setLocation(previousComp.getY(), previousComp.getX() - childComp.getWidth());
+ } else {
+ int rowHeight;
+ int componentWidth = sectionWidth;
+ int componentX = sectionX;
+ // If the component is a JLabel which has another
+ // component assigned then position/size the label and
+ // calculate the size of the registered component
+ if (childComp instanceof JLabel
+ && ((JLabel) childComp).getLabelFor() != null) {
+ i++; // Assumes the next child is the labelled component
+ final JLabel jlabel = (JLabel) childComp;
+ childComp = jlabel.getLabelFor();
+ jlabel.setBounds(sectionX, y, labelWidth,
+ getPreferredHeight(jlabel));
+ componentWidth = sectionWidth - (labelWidth);
+ componentX = sectionX + labelWidth;
+ }
+ rowHeight = rowHeights.get(row).intValue();
+ if (rowHeight == 0) {
+ try {
+ rowHeight = calculateHeight(
+ parentHeight,
+ totalHeight,
+ unknownHeightCount--,
+ childComp);
+ } catch (ArithmeticException e) {
+ String lookAndFeel =
+ UIManager.getLookAndFeel().getClass().getName();
+ throw new IllegalStateException(
+ "Division by zero laying out "
+ + childComp.getClass().getName()
+ + " on " + parent.getClass().getName()
+ + " in section " + sectionNo
+ + " using "
+ + lookAndFeel,
+ e);
+ }
+ totalHeight += rowHeight;
+ }
+ // Make sure the component width isn't any greater
+ // than its maximum allowed width
+ if (childComp.getMaximumSize() != null
+ && getMaximumWidth(childComp) < componentWidth) {
+ componentWidth = getMaximumWidth(childComp);
+ }
+ childComp.setBounds(componentX, y, componentWidth, rowHeight);
+ y += rowHeight + this.vgap;
+ ++row;
+ previousComp = childComp;
+ }
+ }
+ }
+ }
+
+ /**
+ * @param childComp a component
+ * @return 0 for a resizable component or a positive value for its fixed
+ * height
+ */
+ private int getChildHeight(Component childComp) {
+ if (isResizable(childComp)) {
+ // If the child component is resizable then
+ // we don't know it's actual size yet.
+ // It will be calculated later as a
+ // proportion of the available left over
+ // space. For now this is flagged as zero.
+ return 0;
+ } else {
+ // If a preferred height is not given or is
+ // the same as the minimum height then fix the
+ // height of this row.
+ return getMinimumHeight(childComp);
+ }
+ }
+
+ /**
+ * A component is resizable if its minimum size is less than
+ * its preferred size.
+ * There is a workaround here for a bug introduced in JRE5
+ * where JComboBox minimum and preferred size now differ.
+ * JComboBox is not resizable.
+ * Anything in a JScrollPane is considered resizable
+ * @param comp the component to check for resizability.
+ * @return true if the given component should be resized to take u[p empty
+ * space.
+ */
+ private boolean isResizable(Component comp) {
+ if (comp == null) {
+ return false;
+ }
+ if (comp instanceof JComboBox) {
+ return false;
+ }
+ if (comp.getPreferredSize() == null) {
+ return false;
+ }
+ if (comp.getMinimumSize() == null) {
+ return false;
+ }
+ return (getMinimumHeight(comp) < getPreferredHeight(comp));
+ }
+
+ private final int calculateHeight(
+ final int parentHeight,
+ final int totalHeight,
+ final int unknownHeightsLeft,
+ final Component childComp) {
+ return Math.max(
+ (parentHeight - totalHeight) / unknownHeightsLeft,
+ getMinimumHeight(childComp));
+ }
+
+ private int getPreferredHeight(final Component comp) {
+ return (int) comp.getPreferredSize().getHeight();
+ }
+
+ private int getPreferredWidth(final Component comp) {
+ return (int) comp.getPreferredSize().getWidth();
+ }
+
+ private int getMinimumHeight(final Component comp) {
+ return (int) comp.getMinimumSize().getHeight();
+ }
+
+ private int getMaximumWidth(final Component comp) {
+ return (int) comp.getMaximumSize().getWidth();
+ }
+
+ /**
+ * Create a new instance of the Separator that splits the layout in columns
+ * @return the separator
+ */
+ public static Seperator getSeparator() {
+ return new Seperator();
+ }
+
+ /**
+ * @return the horizontal gaps between components
+ */
+ public int getHgap() {
+ return this.hgap;
+ }
+
+ /**
+ * Set the horizontal gaps between components
+ * @param hgap the horizontal gap
+ */
+ public void setHgap(int hgap) {
+ this.hgap = hgap;
+ }
+
+ /**
+ * @return the vertical gaps between components
+ */
+ public int getVgap() {
+ return this.vgap;
+ }
+
+ /**
+ * Set the vertical gaps between components
+ * @param vgap the horizontal gap
+ */
+ public void setVgap(int vgap) {
+ this.vgap = vgap;
+ }
+}
+
+class Seperator extends JPanel {
+
+ private static final long serialVersionUID = -4143634500959911688L;
+
+ Seperator() {
+ super.setVisible(false);
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/ActionNewActionSequence.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/ActionNewActionSequence.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/ActionNewActionSequence.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/ActionNewActionSequence.java 2010-01-11 11:49:55-0800
@@ -1,90 +1,90 @@
-// $Id$
-// Copyright (c) 1996-2006 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-// $header$
-package org.argouml.uml.ui.behavior.common_behavior;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.Action;
-
-import org.argouml.application.helpers.ResourceLoaderWrapper;
-import org.argouml.i18n.Translator;
-import org.argouml.model.Model;
-import org.argouml.ui.targetmanager.TargetManager;
-
-/**
- * @since Dec 15, 2002
- * @author [email protected]
- */
-public class ActionNewActionSequence extends ActionNewAction {
-
- private static final ActionNewActionSequence SINGLETON =
- new ActionNewActionSequence();
-
- /**
- * Constructor.
- */
- protected ActionNewActionSequence() {
- super();
- putValue(Action.NAME, Translator.localize(
- "button.new-actionsequence"));
- }
-
-
- /*
- * @see org.argouml.uml.ui.behavior.common_behavior.ActionNewAction#createAction()
- */
- protected Object createAction() {
- return Model.getCommonBehaviorFactory().createActionSequence();
- }
-
-
- /**
- * @return Returns the SINGLETON.
- */
- public static ActionNewActionSequence getInstance() {
- return SINGLETON;
- }
-
- public static ActionNewAction getButtonInstance() {
- ActionNewAction a = new ActionNewActionSequence() {
-
- public void actionPerformed(ActionEvent e) {
- Object target = TargetManager.getInstance().getModelTarget();
- if (!Model.getFacade().isATransition(target)) return;
- setTarget(target);
- super.actionPerformed(e);
- }
-
- };
- a.putValue(SHORT_DESCRIPTION, a.getValue(Action.NAME));
- Object icon =
- ResourceLoaderWrapper.lookupIconResource("ActionSequence");
- a.putValue(SMALL_ICON, icon);
- a.putValue(ROLE, Roles.EFFECT);
- return a;
- }
-
-}
+// $Id$
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+// $header$
+package org.argouml.uml.ui.behavior.common_behavior;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.Action;
+
+import org.argouml.application.helpers.ResourceLoaderWrapper;
+import org.argouml.i18n.Translator;
+import org.argouml.model.Model;
+import org.argouml.ui.targetmanager.TargetManager;
+
+/**
+ * @since Dec 15, 2002
+ * @author [email protected]
+ */
+public class ActionNewActionSequence extends ActionNewAction {
+
+ private static final ActionNewActionSequence SINGLETON =
+ new ActionNewActionSequence();
+
+ /**
+ * Constructor.
+ */
+ protected ActionNewActionSequence() {
+ super();
+ putValue(Action.NAME, Translator.localize(
+ "button.new-actionsequence"));
+ }
+
+
+ /*
+ * @see org.argouml.uml.ui.behavior.common_behavior.ActionNewAction#createAction()
+ */
+ protected Object createAction() {
+ return Model.getCommonBehaviorFactory().createActionSequence();
+ }
+
+
+ /**
+ * @return Returns the SINGLETON.
+ */
+ public static ActionNewActionSequence getInstance() {
+ return SINGLETON;
+ }
+
+ public static ActionNewAction getButtonInstance() {
+ ActionNewAction a = new ActionNewActionSequence() {
+
+ public void actionPerformed(ActionEvent e) {
+ Object target = TargetManager.getInstance().getModelTarget();
+ if (!Model.getFacade().isATransition(target)) return;
+ setTarget(target);
+ super.actionPerformed(e);
+ }
+
+ };
+ a.putValue(SHORT_DESCRIPTION, a.getValue(Action.NAME));
+ Object icon =
+ ResourceLoaderWrapper.lookupIconResource("ActionSequence");
+ a.putValue(SMALL_ICON, icon);
+ a.putValue(ROLE, Roles.EFFECT);
+ return a;
+ }
+
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/PropPanelActionSequence.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/PropPanelActionSequence.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/PropPanelActionSequence.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/PropPanelActionSequence.java 2010-01-11 11:49:55-0800
@@ -1,249 +1,249 @@
-// $Id$
-// Copyright (c) 1996-2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.ui.behavior.common_behavior;
-
-import java.awt.event.ActionEvent;
-import java.util.List;
-
-import javax.swing.ImageIcon;
-import javax.swing.JList;
-import javax.swing.JMenu;
-import javax.swing.JPopupMenu;
-import javax.swing.JScrollPane;
-
-import org.argouml.i18n.Translator;
-import org.argouml.model.Model;
-import org.argouml.uml.ui.AbstractActionRemoveElement;
-import org.argouml.uml.ui.ActionNavigateContainerElement;
-import org.argouml.uml.ui.ActionRemoveModelElement;
-import org.argouml.uml.ui.UMLModelElementOrderedListModel2;
-import org.argouml.uml.ui.UMLMutableLinkedList;
-import org.argouml.uml.ui.foundation.core.PropPanelModelElement;
-import org.argouml.uml.ui.foundation.extension_mechanisms.ActionNewStereotype;
-
-/**
- * Properties panel of an ActionSequence.
- */
-public class PropPanelActionSequence extends PropPanelModelElement {
-
- private JScrollPane actionsScroll;
-
- /**
- * Construct a default property panel for an Action.
- */
- public PropPanelActionSequence() {
- this("label.action-sequence", lookupIcon("ActionSequence"));
- }
-
- /**
- * Construct an ActionSequence property panel with the given name and icon.
- *
- * @param name
- * the name of the properties panel
- * @param icon
- * the icon to be shown next to the name
- */
- public PropPanelActionSequence(String name, ImageIcon icon) {
- super(name, icon);
- initialize();
- }
-
- /**
- * The initialization of the panel with its fields and stuff.
- */
- public void initialize() {
-
- addField(Translator.localize("label.name"), getNameTextField());
-
-// JList actionsList = new UMLMutableLinkedList(
-// new UMLActionSequenceActionListModel(),
-// new ActionAddAction(),
-// null, // new
-// new ActionRemoveAction(),
-// true);
- JList actionsList = new UMLActionSequenceActionList();
- actionsList.setVisibleRowCount(5);
- actionsScroll = new JScrollPane(actionsList);
- addField(Translator.localize("label.actions"),
- actionsScroll);
-
- addAction(new ActionNavigateContainerElement());
- addAction(new ActionNewStereotype());
- addAction(getDeleteAction());
-
- }
-
-}
-
-/**
- * Model for ActionSequence's list of Actions.
- */
-class UMLActionSequenceActionListModel
- extends UMLModelElementOrderedListModel2 {
-
- /**
- * Constructor.
- */
- public UMLActionSequenceActionListModel() {
- super("action");
- }
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementListModel2#buildModelList()
- */
- protected void buildModelList() {
- if (getTarget() != null) {
- setAllElements(Model.getFacade().getActions(getTarget()));
- }
- }
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementListModel2#isValidElement(java.lang.Object)
- */
- protected boolean isValidElement(Object element) {
- return Model.getFacade().isAAction(element);
- }
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveDown(int)
- */
- protected void moveDown(int index) {
- Object target = getTarget();
- List c = Model.getFacade().getActions(target);
- if (index < c.size() - 1) {
- Object item = c.get(index);
- Model.getCommonBehaviorHelper().removeAction(target, item);
- Model.getCommonBehaviorHelper().addAction(target, index + 1, item);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToBottom(int)
- */
- @Override
- protected void moveToBottom(int index) {
- Object target = getTarget();
- List c = Model.getFacade().getActions(target);
- if (index < c.size() - 1) {
- Object item = c.get(index);
- Model.getCommonBehaviorHelper().removeAction(target, item);
- Model.getCommonBehaviorHelper().addAction(target, c.size(), item);
- }
- }
-
- /**
- * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToTop(int)
- */
- @Override
- protected void moveToTop(int index) {
- Object target = getTarget();
- List c = Model.getFacade().getActions(target);
- if (index > 0) {
- Object item = c.get(index);
- Model.getCommonBehaviorHelper().removeAction(target, item);
- Model.getCommonBehaviorHelper().addAction(target, 0, item);
- }
- }
-}
-
-
-class ActionRemoveAction extends AbstractActionRemoveElement {
-
-
- /**
- * Construct an action to remove an Action.
- */
- public ActionRemoveAction() {
- super(Translator.localize("menu.popup.remove"));
- }
-
- /*
- * @see org.tigris.gef.undo.UndoableAction#actionPerformed(java.awt.event.ActionEvent)
- */
- @Override
- public void actionPerformed(ActionEvent e) {
- super.actionPerformed(e);
- Object action = getObjectToRemove();
- if (action != null) {
- Object as = getTarget();
- if (Model.getFacade().isAActionSequence(as)) {
- Model.getCommonBehaviorHelper().removeAction(as, action);
- }
- }
- }
-
-}
-
-class UMLActionSequenceActionList extends UMLMutableLinkedList {
-
- /**
- * Construct a default object with a new UMLActionSequenceActionListModel.
- */
- public UMLActionSequenceActionList() {
- super(new UMLActionSequenceActionListModel());
- }
-
- /*
- * @see org.argouml.uml.ui.UMLMutableLinkedList#getPopupMenu()
- */
- @Override
- public JPopupMenu getPopupMenu() {
- return new PopupMenuNewAction(ActionNewAction.Roles.MEMBER, this);
- }
-
-}
-
-class PopupMenuNewActionSequenceAction extends JPopupMenu {
-
- /**
- * Constructs a new popupmenu. The given parameter role determines what
- * the purpose is of the actions that can be created via this popupmenu.
- * The parameter must comply to the interface Roles
- * defined on ActionNewAction.
- * @param role the role
- * @param list the list
- */
- public PopupMenuNewActionSequenceAction(String role,
- UMLMutableLinkedList list) {
- super();
-
- JMenu newMenu = new JMenu();
- newMenu.setText(Translator.localize("action.new"));
-
- newMenu.add(ActionNewCallAction.getInstance());
- ActionNewCallAction.getInstance().setTarget(list.getTarget());
- ActionNewCallAction.getInstance().putValue(
- ActionNewAction.ROLE, role);
-
- add(newMenu);
-
- addSeparator();
-
- ActionRemoveModelElement.SINGLETON.setObjectToRemove(ActionNewAction
- .getAction(role, list.getTarget()));
- add(ActionRemoveModelElement.SINGLETON);
- }
-}
-
+// $Id$
+// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.ui.behavior.common_behavior;
+
+import java.awt.event.ActionEvent;
+import java.util.List;
+
+import javax.swing.ImageIcon;
+import javax.swing.JList;
+import javax.swing.JMenu;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
+
+import org.argouml.i18n.Translator;
+import org.argouml.model.Model;
+import org.argouml.uml.ui.AbstractActionRemoveElement;
+import org.argouml.uml.ui.ActionNavigateContainerElement;
+import org.argouml.uml.ui.ActionRemoveModelElement;
+import org.argouml.uml.ui.UMLModelElementOrderedListModel2;
+import org.argouml.uml.ui.UMLMutableLinkedList;
+import org.argouml.uml.ui.foundation.core.PropPanelModelElement;
+import org.argouml.uml.ui.foundation.extension_mechanisms.ActionNewStereotype;
+
+/**
+ * Properties panel of an ActionSequence.
+ */
+public class PropPanelActionSequence extends PropPanelModelElement {
+
+ private JScrollPane actionsScroll;
+
+ /**
+ * Construct a default property panel for an Action.
+ */
+ public PropPanelActionSequence() {
+ this("label.action-sequence", lookupIcon("ActionSequence"));
+ }
+
+ /**
+ * Construct an ActionSequence property panel with the given name and icon.
+ *
+ * @param name
+ * the name of the properties panel
+ * @param icon
+ * the icon to be shown next to the name
+ */
+ public PropPanelActionSequence(String name, ImageIcon icon) {
+ super(name, icon);
+ initialize();
+ }
+
+ /**
+ * The initialization of the panel with its fields and stuff.
+ */
+ public void initialize() {
+
+ addField(Translator.localize("label.name"), getNameTextField());
+
+// JList actionsList = new UMLMutableLinkedList(
+// new UMLActionSequenceActionListModel(),
+// new ActionAddAction(),
+// null, // new
+// new ActionRemoveAction(),
+// true);
+ JList actionsList = new UMLActionSequenceActionList();
+ actionsList.setVisibleRowCount(5);
+ actionsScroll = new JScrollPane(actionsList);
+ addField(Translator.localize("label.actions"),
+ actionsScroll);
+
+ addAction(new ActionNavigateContainerElement());
+ addAction(new ActionNewStereotype());
+ addAction(getDeleteAction());
+
+ }
+
+}
+
+/**
+ * Model for ActionSequence's list of Actions.
+ */
+class UMLActionSequenceActionListModel
+ extends UMLModelElementOrderedListModel2 {
+
+ /**
+ * Constructor.
+ */
+ public UMLActionSequenceActionListModel() {
+ super("action");
+ }
+
+ /*
+ * @see org.argouml.uml.ui.UMLModelElementListModel2#buildModelList()
+ */
+ protected void buildModelList() {
+ if (getTarget() != null) {
+ setAllElements(Model.getFacade().getActions(getTarget()));
+ }
+ }
+
+ /*
+ * @see org.argouml.uml.ui.UMLModelElementListModel2#isValidElement(java.lang.Object)
+ */
+ protected boolean isValidElement(Object element) {
+ return Model.getFacade().isAAction(element);
+ }
+
+ /*
+ * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveDown(int)
+ */
+ protected void moveDown(int index) {
+ Object target = getTarget();
+ List c = Model.getFacade().getActions(target);
+ if (index < c.size() - 1) {
+ Object item = c.get(index);
+ Model.getCommonBehaviorHelper().removeAction(target, item);
+ Model.getCommonBehaviorHelper().addAction(target, index + 1, item);
+ }
+ }
+
+ /**
+ * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToBottom(int)
+ */
+ @Override
+ protected void moveToBottom(int index) {
+ Object target = getTarget();
+ List c = Model.getFacade().getActions(target);
+ if (index < c.size() - 1) {
+ Object item = c.get(index);
+ Model.getCommonBehaviorHelper().removeAction(target, item);
+ Model.getCommonBehaviorHelper().addAction(target, c.size(), item);
+ }
+ }
+
+ /**
+ * @see org.argouml.uml.ui.UMLModelElementOrderedListModel2#moveToTop(int)
+ */
+ @Override
+ protected void moveToTop(int index) {
+ Object target = getTarget();
+ List c = Model.getFacade().getActions(target);
+ if (index > 0) {
+ Object item = c.get(index);
+ Model.getCommonBehaviorHelper().removeAction(target, item);
+ Model.getCommonBehaviorHelper().addAction(target, 0, item);
+ }
+ }
+}
+
+
+class ActionRemoveAction extends AbstractActionRemoveElement {
+
+
+ /**
+ * Construct an action to remove an Action.
+ */
+ public ActionRemoveAction() {
+ super(Translator.localize("menu.popup.remove"));
+ }
+
+ /*
+ * @see org.tigris.gef.undo.UndoableAction#actionPerformed(java.awt.event.ActionEvent)
+ */
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ super.actionPerformed(e);
+ Object action = getObjectToRemove();
+ if (action != null) {
+ Object as = getTarget();
+ if (Model.getFacade().isAActionSequence(as)) {
+ Model.getCommonBehaviorHelper().removeAction(as, action);
+ }
+ }
+ }
+
+}
+
+class UMLActionSequenceActionList extends UMLMutableLinkedList {
+
+ /**
+ * Construct a default object with a new UMLActionSequenceActionListModel.
+ */
+ public UMLActionSequenceActionList() {
+ super(new UMLActionSequenceActionListModel());
+ }
+
+ /*
+ * @see org.argouml.uml.ui.UMLMutableLinkedList#getPopupMenu()
+ */
+ @Override
+ public JPopupMenu getPopupMenu() {
+ return new PopupMenuNewAction(ActionNewAction.Roles.MEMBER, this);
+ }
+
+}
+
+class PopupMenuNewActionSequenceAction extends JPopupMenu {
+
+ /**
+ * Constructs a new popupmenu. The given parameter role determines what
+ * the purpose is of the actions that can be created via this popupmenu.
+ * The parameter must comply to the interface Roles
+ * defined on ActionNewAction.
+ * @param role the role
+ * @param list the list
+ */
+ public PopupMenuNewActionSequenceAction(String role,
+ UMLMutableLinkedList list) {
+ super();
+
+ JMenu newMenu = new JMenu();
+ newMenu.setText(Translator.localize("action.new"));
+
+ newMenu.add(ActionNewCallAction.getInstance());
+ ActionNewCallAction.getInstance().setTarget(list.getTarget());
+ ActionNewCallAction.getInstance().putValue(
+ ActionNewAction.ROLE, role);
+
+ add(newMenu);
+
+ addSeparator();
+
+ ActionRemoveModelElement.SINGLETON.setObjectToRemove(ActionNewAction
+ .getAction(role, list.getTarget()));
+ add(ActionRemoveModelElement.SINGLETON);
+ }
+}
+
Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/ButtonActionNewGuard.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/ButtonActionNewGuard.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/ButtonActionNewGuard.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/state_machines/ButtonActionNewGuard.java 2010-01-11 11:49:55-0800
@@ -1,78 +1,78 @@
-// $Id: eclipse-argo-codetemplates.xml 10612 2006-05-25 12:58:04Z linus $
-// Copyright (c) 2006 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.ui.behavior.state_machines;
-
-import java.awt.event.ActionEvent;
-
-import org.argouml.application.helpers.ResourceLoaderWrapper;
-import org.argouml.i18n.Translator;
-import org.argouml.kernel.UmlModelMutator;
-import org.argouml.model.Model;
-import org.argouml.ui.targetmanager.TargetManager;
-import org.argouml.ui.UndoableAction;
-import org.tigris.toolbar.toolbutton.ModalAction;
-
-/**
- * This is an Action to be used for Buttons to create a guard.
- * If a guard already exists, then navigate to it.
- *
- * @author Michiel
- */
-@UmlModelMutator
-public class ButtonActionNewGuard extends UndoableAction
- implements ModalAction {
-
- public ButtonActionNewGuard() {
- super();
- putValue(NAME, getKeyName());
- putValue(SHORT_DESCRIPTION, Translator.localize(getKeyName()));
- Object icon = ResourceLoaderWrapper.lookupIconResource(getIconName());
- putValue(SMALL_ICON, icon);
- }
-
- public void actionPerformed(ActionEvent e) {
- if (!isEnabled()) return;
- super.actionPerformed(e);
- Object target = TargetManager.getInstance().getModelTarget();
- Object guard = Model.getFacade().getGuard(target);
- if (guard == null) {
- guard = Model.getStateMachinesFactory().buildGuard(target);
- }
- TargetManager.getInstance().setTarget(guard);
- }
-
- public boolean isEnabled() {
- Object target = TargetManager.getInstance().getModelTarget();
- return Model.getFacade().isATransition(target);
- }
-
- protected String getKeyName() {
- return "button.new-guard";
- }
-
- protected String getIconName() {
- return "Guard";
- }
-}
+// $Id$
+// Copyright (c) 2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.ui.behavior.state_machines;
+
+import java.awt.event.ActionEvent;
+
+import org.argouml.application.helpers.ResourceLoaderWrapper;
+import org.argouml.i18n.Translator;
+import org.argouml.kernel.UmlModelMutator;
+import org.argouml.model.Model;
+import org.argouml.ui.targetmanager.TargetManager;
+import org.argouml.ui.UndoableAction;
+import org.tigris.toolbar.toolbutton.ModalAction;
+
+/**
+ * This is an Action to be used for Buttons to create a guard.
+ * If a guard already exists, then navigate to it.
+ *
+ * @author Michiel
+ */
+@UmlModelMutator
+public class ButtonActionNewGuard extends UndoableAction
+ implements ModalAction {
+
+ public ButtonActionNewGuard() {
+ super();
+ putValue(NAME, getKeyName());
+ putValue(SHORT_DESCRIPTION, Translator.localize(getKeyName()));
+ Object icon = ResourceLoaderWrapper.lookupIconResource(getIconName());
+ putValue(SMALL_ICON, icon);
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ if (!isEnabled()) return;
+ super.actionPerformed(e);
+ Object target = TargetManager.getInstance().getModelTarget();
+ Object guard = Model.getFacade().getGuard(target);
+ if (guard == null) {
+ guard = Model.getStateMachinesFactory().buildGuard(target);
+ }
+ TargetManager.getInstance().setTarget(guard);
+ }
+
+ public boolean isEnabled() {
+ Object target = TargetManager.getInstance().getModelTarget();
+ return Model.getFacade().isATransition(target);
+ }
+
+ protected String getKeyName() {
+ return "button.new-guard";
+ }
+
+ protected String getIconName() {
+ return "Guard";
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/use_cases/UMLIncludeListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/use_cases/UMLIncludeListModel.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/use_cases/UMLIncludeListModel.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/behavior/use_cases/UMLIncludeListModel.java 2010-01-11 11:49:55-0800
@@ -1,67 +1,67 @@
-// $Id: UMLIncludeAdditionListModel.java 11516 2006-11-25 04:30:15Z tfmorris $
-// Copyright (c) 1996-2006 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.uml.ui.behavior.use_cases;
-
-import org.argouml.model.Model;
-import org.argouml.uml.ui.UMLModelElementListModel2;
-
-/**
- * Abstract class for list model to hold use cases of an include.
- *
- * @author MarkusK
- */
-public abstract class UMLIncludeListModel extends UMLModelElementListModel2 {
-
- /**
- * Constructor for UMLIncludeListModel.
- *
- * @param eventName the name of the event to listen to, which triggers us
- * to update the list model from the UML data
- */
- public UMLIncludeListModel(String eventName) {
- super(eventName);
- Model.getPump().addClassModelEventListener(this,
- Model.getMetaTypes().getNamespace(), "ownedElement");
- }
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementListModel2#buildModelList()
- */
- protected void buildModelList() {
- if (!isEmpty()) {
- removeAllElements();
- }
- }
-
-
-
- /*
- * @see org.argouml.uml.ui.UMLModelElementListModel2#isValidElement(java.lang.Object)
- */
- protected boolean isValidElement(Object element) {
- return Model.getFacade().isAUseCase(element);
- }
-
-}
+// $Id$
+// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.uml.ui.behavior.use_cases;
+
+import org.argouml.model.Model;
+import org.argouml.uml.ui.UMLModelElementListModel2;
+
+/**
+ * Abstract class for list model to hold use cases of an include.
+ *
+ * @author MarkusK
+ */
+public abstract class UMLIncludeListModel extends UMLModelElementListModel2 {
+
+ /**
+ * Constructor for UMLIncludeListModel.
+ *
+ * @param eventName the name of the event to listen to, which triggers us
+ * to update the list model from the UML data
+ */
+ public UMLIncludeListModel(String eventName) {
+ super(eventName);
+ Model.getPump().addClassModelEventListener(this,
+ Model.getMetaTypes().getNamespace(), "ownedElement");
+ }
+
+ /*
+ * @see org.argouml.uml.ui.UMLModelElementListModel2#buildModelList()
+ */
+ protected void buildModelList() {
+ if (!isEmpty()) {
+ removeAllElements();
+ }
+ }
+
+
+
+ /*
+ * @see org.argouml.uml.ui.UMLModelElementListModel2#isValidElement(java.lang.Object)
+ */
+ protected boolean isValidElement(Object element) {
+ return Model.getFacade().isAUseCase(element);
+ }
+
+}
Modified: trunk/src/argouml-app/src/org/argouml/util/JavaRuntimeUtility.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/util/JavaRuntimeUtility.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/util/JavaRuntimeUtility.java (original)
+++ trunk/src/argouml-app/src/org/argouml/util/JavaRuntimeUtility.java 2010-01-11 11:49:55-0800
@@ -1,67 +1,67 @@
-// $Id: JavaRuntimeUtility.java 11531 2006-11-27 17:40:06Z bobtarling $
-// Copyright (c) 2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.util;
-
-/**
- * Some utility methods to simplify tests of what Java Runtime is currently in
- * use.
- */
-public class JavaRuntimeUtility {
-
- /**
- * Determine if the java runtime found is supported by the current version
- * of ArgoUML.
- *
- * @return true if the version of Java is supported
- */
- public static boolean isJreSupported() {
- String javaVersion = System.getProperty("java.version", "");
- return (!(javaVersion.startsWith("1.4")
- || javaVersion.startsWith("1.3")
- || javaVersion.startsWith("1.2")
- || javaVersion.startsWith("1.1")));
- }
-
- /**
- * Determine if the java runtime found is JRE 5
- * <p>Note that plugins should not rely on this method existing in
- * it is likely to be removed without deprecation as soon as JRE 5 is
- * no longer supported.
- *
- * @return true if we're running on JRE 5
- */
- public static boolean isJre5() {
- String javaVersion = System.getProperty("java.version", "");
- return (javaVersion.startsWith("1.5"));
- }
-
- /**
- * Get the JRE version described in system properties
- * @return the JRE version
- */
- public static String getJreVersion() {
- return System.getProperty("java.version", "");
- }
-}
+// $Id$
+// Copyright (c) 2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.util;
+
+/**
+ * Some utility methods to simplify tests of what Java Runtime is currently in
+ * use.
+ */
+public class JavaRuntimeUtility {
+
+ /**
+ * Determine if the java runtime found is supported by the current version
+ * of ArgoUML.
+ *
+ * @return true if the version of Java is supported
+ */
+ public static boolean isJreSupported() {
+ String javaVersion = System.getProperty("java.version", "");
+ return (!(javaVersion.startsWith("1.4")
+ || javaVersion.startsWith("1.3")
+ || javaVersion.startsWith("1.2")
+ || javaVersion.startsWith("1.1")));
+ }
+
+ /**
+ * Determine if the java runtime found is JRE 5
+ * <p>Note that plugins should not rely on this method existing in
+ * it is likely to be removed without deprecation as soon as JRE 5 is
+ * no longer supported.
+ *
+ * @return true if we're running on JRE 5
+ */
+ public static boolean isJre5() {
+ String javaVersion = System.getProperty("java.version", "");
+ return (javaVersion.startsWith("1.5"));
+ }
+
+ /**
+ * Get the JRE version described in system properties
+ * @return the JRE version
+ */
+ public static String getJreVersion() {
+ return System.getProperty("java.version", "");
+ }
+}
Modified: trunk/src/argouml-app/src/org/argouml/util/SingleElementIterator.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/util/SingleElementIterator.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/util/SingleElementIterator.java (original)
+++ trunk/src/argouml-app/src/org/argouml/util/SingleElementIterator.java 2010-01-11 11:49:55-0800
@@ -1,67 +1,67 @@
-// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
-// Copyright (c) 2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.util;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-/**
- * A simple iterator wrapper for a single object. Designed for for use where the
- * API requires an iterator, but we've only got a single object and don't want
- * the overhead of creating a collection just so that we can iterate over its
- * single element.
- *
- * @param <T> type of object to be iterated over
- * @author Tom Morris <[email protected]>
- */
-public class SingleElementIterator<T> implements Iterator {
-
- private boolean done = false;
- private T target;
-
- public SingleElementIterator(T o) {
- target = o;
- }
-
- public boolean hasNext() {
- if (!done) {
- return true;
- }
- return false;
- }
-
- public T next() {
- if (!done) {
- done = true;
- return target;
- }
- throw new NoSuchElementException();
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
-}
+// $Id$
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.util;
+
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+/**
+ * A simple iterator wrapper for a single object. Designed for for use where the
+ * API requires an iterator, but we've only got a single object and don't want
+ * the overhead of creating a collection just so that we can iterate over its
+ * single element.
+ *
+ * @param <T> type of object to be iterated over
+ * @author Tom Morris <[email protected]>
+ */
+public class SingleElementIterator<T> implements Iterator {
+
+ private boolean done = false;
+ private T target;
+
+ public SingleElementIterator(T o) {
+ target = o;
+ }
+
+ public boolean hasNext() {
+ if (!done) {
+ return true;
+ }
+ return false;
+ }
+
+ public T next() {
+ if (!done) {
+ done = true;
+ return target;
+ }
+ throw new NoSuchElementException();
+ }
+
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+
+}
Modified: trunk/src/argouml-app/src/org/argouml/util/ToolBarUtility.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/util/ToolBarUtility.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/util/ToolBarUtility.java (original)
+++ trunk/src/argouml-app/src/org/argouml/util/ToolBarUtility.java 2010-01-11 11:49:55-0800
@@ -1,193 +1,193 @@
-// $Id$
-// Copyright (c) 2006 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.util;
-
-import java.awt.Component;
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.util.Collection;
-
-import javax.swing.Action;
-import javax.swing.JButton;
-import javax.swing.JToolBar;
-
-import org.apache.log4j.Logger;
-import org.argouml.configuration.Configuration;
-import org.argouml.configuration.ConfigurationKey;
-import org.tigris.toolbar.ToolBarManager;
-import org.tigris.toolbar.toolbutton.PopupToolBoxButton;
-
-/**
- * This utility class contains additional functionality related to the
- * org.tigris.toolbar project for the ArgoUML application.
- *
- * @author Michiel
- */
-public class ToolBarUtility {
-
- private static final Logger LOG = Logger.getLogger(ToolBarUtility.class);
-
- /**
- * Manages the selection of the default tool
- * in a popup tool in the toolbar. <p>
- *
- * I.e. in a toolbar, you can have tools that can be opened,
- * into a grid of tools. The last used tool is remembered,
- * and put at the top when the popup is closed, i.e.
- * is the only tool that remains visible. This remembering is
- * persistent, hence stored in the configuration file,
- * under a certain key (i.e. name).
- *
- * @param actions the array of actions that make up the popup
- * @param key appendix for the key for the configuration file
- */
- public static void manageDefault(Object[] actions, String key) {
- Action defaultAction = null;
- ConfigurationKey k =
- Configuration.makeKey("default", "popupactions", key);
- String defaultName = Configuration.getString(k);
- PopupActionsListener listener = new PopupActionsListener(k);
- for (int i = 0; i < actions.length; ++i) {
- if (actions[i] instanceof Action) {
- Action a = (Action) actions[i];
- if (a.getValue(Action.NAME).equals(defaultName)) {
- defaultAction = a;
- }
- a.addPropertyChangeListener(listener);
- } else if (actions[i] instanceof Object[]) {
- Object[] actionRow = (Object[]) actions[i];
- for (int j = 0; j < actionRow.length; ++j) {
- Action a = (Action) actionRow[j];
- if (a.getValue(Action.NAME).equals(defaultName)) {
- defaultAction = a;
- }
- a.addPropertyChangeListener(listener);
- }
- }
- }
-
- if (defaultAction != null) {
- defaultAction.putValue("isDefault", Boolean.valueOf(true));
- }
- }
-
- static class PopupActionsListener implements PropertyChangeListener {
- private boolean blockEvents;
- private ConfigurationKey key;
-
- /**
- * Constructor.
- *
- * @param k
- */
- public PopupActionsListener(ConfigurationKey k) {
- key = k;
- }
-
- /*
- * @see java.beans.PropertyChangeListener#propertyChange(
- * java.beans.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent evt) {
- if (evt.getSource() instanceof Action) {
- Action a = (Action) evt.getSource();
- if (!blockEvents && evt.getPropertyName().equals("popped")) {
- blockEvents = true;
- /* Switch the value back off, so that we will
- * get notified again next time.
- */
- a.putValue("popped", Boolean.valueOf(false));
- blockEvents = false;
- Configuration.setString(key,
- (String) a.getValue(Action.NAME));
- }
- }
- }
- }
-
- /**
- * TODO: Use the following function to have a dropdown set of tools:
- * ToolBarFactory.addItemsToToolBar(buttonPanel, actions, true);
- * Instead, this temporary solution:
- *
- * @param buttonPanel the toolbar
- * @param actions an array of actions representing the tool layout
- */
- public static void addItemsToToolBar(JToolBar buttonPanel,
- Object[] actions) {
- JButton button = buildPopupToolBoxButton(actions, false);
- if (!ToolBarManager.alwaysUseStandardRollover()) {
- button.setBorderPainted(false);
- }
- buttonPanel.add(button);
- }
-
- /**
- * TODO: Use the following function to have a dropdown set of tools:
- * ToolBarFactory.addItemsToToolBar(buttonPanel, actions, true);
- * Instead, this temporary solution:
- *
- * @param buttonPanel the toolbar
- * @param actions an array of actions representing the tool layout
- */
- public static void addItemsToToolBar(JToolBar buttonPanel,
- Collection actions) {
- addItemsToToolBar(buttonPanel, actions.toArray());
- }
-
- /**
- * TODO: Move this into the toolbar project.
- */
- private static PopupToolBoxButton buildPopupToolBoxButton(Object[] actions,
- boolean rollover) {
- PopupToolBoxButton toolBox = null;
- for (int i = 0; i < actions.length; ++i) {
- if (actions[i] instanceof Action) {
- LOG.info("Adding a " + actions[i] + " to the toolbar");
- Action a = (Action) actions[i];
- if (toolBox == null) {
- toolBox = new PopupToolBoxButton(a, 0, 1, rollover);
- }
- toolBox.add(a);
- } else if (actions[i] instanceof Component) {
- toolBox.add((Component) actions[i]);
- } else if (actions[i] instanceof Object[]) {
- Object[] actionRow = (Object[]) actions[i];
- for (int j = 0; j < actionRow.length; ++j) {
- Action a = (Action) actionRow[j];
- if (toolBox == null) {
- int cols = actionRow.length;
- toolBox = new PopupToolBoxButton(a, 0, cols, rollover);
- }
- toolBox.add(a);
- }
- } else {
- LOG.error("Can't add a " + actions[i] + " to the toolbar");
- }
- }
- return toolBox;
- }
-
-}
+// $Id$
+// Copyright (c) 2006 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.util;
+
+import java.awt.Component;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.Collection;
+
+import javax.swing.Action;
+import javax.swing.JButton;
+import javax.swing.JToolBar;
+
+import org.apache.log4j.Logger;
+import org.argouml.configuration.Configuration;
+import org.argouml.configuration.ConfigurationKey;
+import org.tigris.toolbar.ToolBarManager;
+import org.tigris.toolbar.toolbutton.PopupToolBoxButton;
+
+/**
+ * This utility class contains additional functionality related to the
+ * org.tigris.toolbar project for the ArgoUML application.
+ *
+ * @author Michiel
+ */
+public class ToolBarUtility {
+
+ private static final Logger LOG = Logger.getLogger(ToolBarUtility.class);
+
+ /**
+ * Manages the selection of the default tool
+ * in a popup tool in the toolbar. <p>
+ *
+ * I.e. in a toolbar, you can have tools that can be opened,
+ * into a grid of tools. The last used tool is remembered,
+ * and put at the top when the popup is closed, i.e.
+ * is the only tool that remains visible. This remembering is
+ * persistent, hence stored in the configuration file,
+ * under a certain key (i.e. name).
+ *
+ * @param actions the array of actions that make up the popup
+ * @param key appendix for the key for the configuration file
+ */
+ public static void manageDefault(Object[] actions, String key) {
+ Action defaultAction = null;
+ ConfigurationKey k =
+ Configuration.makeKey("default", "popupactions", key);
+ String defaultName = Configuration.getString(k);
+ PopupActionsListener listener = new PopupActionsListener(k);
+ for (int i = 0; i < actions.length; ++i) {
+ if (actions[i] instanceof Action) {
+ Action a = (Action) actions[i];
+ if (a.getValue(Action.NAME).equals(defaultName)) {
+ defaultAction = a;
+ }
+ a.addPropertyChangeListener(listener);
+ } else if (actions[i] instanceof Object[]) {
+ Object[] actionRow = (Object[]) actions[i];
+ for (int j = 0; j < actionRow.length; ++j) {
+ Action a = (Action) actionRow[j];
+ if (a.getValue(Action.NAME).equals(defaultName)) {
+ defaultAction = a;
+ }
+ a.addPropertyChangeListener(listener);
+ }
+ }
+ }
+
+ if (defaultAction != null) {
+ defaultAction.putValue("isDefault", Boolean.valueOf(true));
+ }
+ }
+
+ static class PopupActionsListener implements PropertyChangeListener {
+ private boolean blockEvents;
+ private ConfigurationKey key;
+
+ /**
+ * Constructor.
+ *
+ * @param k
+ */
+ public PopupActionsListener(ConfigurationKey k) {
+ key = k;
+ }
+
+ /*
+ * @see java.beans.PropertyChangeListener#propertyChange(
+ * java.beans.PropertyChangeEvent)
+ */
+ public void propertyChange(PropertyChangeEvent evt) {
+ if (evt.getSource() instanceof Action) {
+ Action a = (Action) evt.getSource();
+ if (!blockEvents && evt.getPropertyName().equals("popped")) {
+ blockEvents = true;
+ /* Switch the value back off, so that we will
+ * get notified again next time.
+ */
+ a.putValue("popped", Boolean.valueOf(false));
+ blockEvents = false;
+ Configuration.setString(key,
+ (String) a.getValue(Action.NAME));
+ }
+ }
+ }
+ }
+
+ /**
+ * TODO: Use the following function to have a dropdown set of tools:
+ * ToolBarFactory.addItemsToToolBar(buttonPanel, actions, true);
+ * Instead, this temporary solution:
+ *
+ * @param buttonPanel the toolbar
+ * @param actions an array of actions representing the tool layout
+ */
+ public static void addItemsToToolBar(JToolBar buttonPanel,
+ Object[] actions) {
+ JButton button = buildPopupToolBoxButton(actions, false);
+ if (!ToolBarManager.alwaysUseStandardRollover()) {
+ button.setBorderPainted(false);
+ }
+ buttonPanel.add(button);
+ }
+
+ /**
+ * TODO: Use the following function to have a dropdown set of tools:
+ * ToolBarFactory.addItemsToToolBar(buttonPanel, actions, true);
+ * Instead, this temporary solution:
+ *
+ * @param buttonPanel the toolbar
+ * @param actions an array of actions representing the tool layout
+ */
+ public static void addItemsToToolBar(JToolBar buttonPanel,
+ Collection actions) {
+ addItemsToToolBar(buttonPanel, actions.toArray());
+ }
+
+ /**
+ * TODO: Move this into the toolbar project.
+ */
+ private static PopupToolBoxButton buildPopupToolBoxButton(Object[] actions,
+ boolean rollover) {
+ PopupToolBoxButton toolBox = null;
+ for (int i = 0; i < actions.length; ++i) {
+ if (actions[i] instanceof Action) {
+ LOG.info("Adding a " + actions[i] + " to the toolbar");
+ Action a = (Action) actions[i];
+ if (toolBox == null) {
+ toolBox = new PopupToolBoxButton(a, 0, 1, rollover);
+ }
+ toolBox.add(a);
+ } else if (actions[i] instanceof Component) {
+ toolBox.add((Component) actions[i]);
+ } else if (actions[i] instanceof Object[]) {
+ Object[] actionRow = (Object[]) actions[i];
+ for (int j = 0; j < actionRow.length; ++j) {
+ Action a = (Action) actionRow[j];
+ if (toolBox == null) {
+ int cols = actionRow.length;
+ toolBox = new PopupToolBoxButton(a, 0, cols, rollover);
+ }
+ toolBox.add(a);
+ }
+ } else {
+ LOG.error("Can't add a " + actions[i] + " to the toolbar");
+ }
+ }
+ return toolBox;
+ }
+
+}
Modified: trunk/src/argouml-app/tests/org/argouml/model/TestUmlFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/tests/org/argouml/model/TestUmlFactory.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/tests/org/argouml/model/TestUmlFactory.java (original)
+++ trunk/src/argouml-app/tests/org/argouml/model/TestUmlFactory.java 2010-01-11 11:49:55-0800
@@ -1,85 +1,85 @@
-// $Id: TestUmlFactoryBuildNode.java 12485 2007-05-03 05:59:35Z linus $
-// Copyright (c) 2005-2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.model;
-
-import junit.framework.TestCase;
-
-/**
- * Checks that the {@link UmlFactory#buildNode(Object)} method works with
- * all conceivable alternatives.
- */
-public class TestUmlFactory extends TestCase {
- /**
- * Constructor.
- *
- * @param arg0 name of the test case
- */
- public TestUmlFactory(String arg0) {
- super(arg0);
- }
-
- /*
- * @see junit.framework.TestCase#setUp()
- */
- @Override
- public void setUp() {
- InitializeModel.initializeDefault();
- }
-
- /**
- * Check that a
- * Testing Core elements.
- * @throws IllegalModelElementConnectionException if buildConnection fails
- */
- public void testBuildConnection()
- throws IllegalModelElementConnectionException {
- Object class1 = (Model.getUmlFactory().buildNode(
- Model.getMetaTypes().getUMLClass()));
- Object package1 = (Model.getUmlFactory().buildNode(
- Model.getMetaTypes().getPackage()));
- Model.getCoreHelper().setNamespace(class1, package1);
-
- Object class2 = (Model.getUmlFactory().buildNode(
- Model.getMetaTypes().getUMLClass()));
- Object package2 = (Model.getUmlFactory().buildNode(
- Model.getMetaTypes().getPackage()));
- Model.getCoreHelper().setNamespace(class2, package2);
-
- Object assoc = Model.getUmlFactory().buildConnection(
- Model.getMetaTypes().getAssociation(),
- class1, Model.getAggregationKind().getComposite(),
- class2, Model.getAggregationKind().getNone(),
- true, null);
-
- // The association should have same namespace as from class
- assertSame(package1, Model.getFacade().getNamespace(assoc));
-
- // Only one end should be navigable
- assertFalse(Model.getFacade().isNavigable(
- Model.getFacade().getAssociationEnd(class1, assoc)));
- assertTrue(Model.getFacade().isNavigable(
- Model.getFacade().getAssociationEnd(class2, assoc)));
- }
-}
+// $Id$
+// Copyright (c) 2005-2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.model;
+
+import junit.framework.TestCase;
+
+/**
+ * Checks that the {@link UmlFactory#buildNode(Object)} method works with
+ * all conceivable alternatives.
+ */
+public class TestUmlFactory extends TestCase {
+ /**
+ * Constructor.
+ *
+ * @param arg0 name of the test case
+ */
+ public TestUmlFactory(String arg0) {
+ super(arg0);
+ }
+
+ /*
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Override
+ public void setUp() {
+ InitializeModel.initializeDefault();
+ }
+
+ /**
+ * Check that a
+ * Testing Core elements.
+ * @throws IllegalModelElementConnectionException if buildConnection fails
+ */
+ public void testBuildConnection()
+ throws IllegalModelElementConnectionException {
+ Object class1 = (Model.getUmlFactory().buildNode(
+ Model.getMetaTypes().getUMLClass()));
+ Object package1 = (Model.getUmlFactory().buildNode(
+ Model.getMetaTypes().getPackage()));
+ Model.getCoreHelper().setNamespace(class1, package1);
+
+ Object class2 = (Model.getUmlFactory().buildNode(
+ Model.getMetaTypes().getUMLClass()));
+ Object package2 = (Model.getUmlFactory().buildNode(
+ Model.getMetaTypes().getPackage()));
+ Model.getCoreHelper().setNamespace(class2, package2);
+
+ Object assoc = Model.getUmlFactory().buildConnection(
+ Model.getMetaTypes().getAssociation(),
+ class1, Model.getAggregationKind().getComposite(),
+ class2, Model.getAggregationKind().getNone(),
+ true, null);
+
+ // The association should have same namespace as from class
+ assertSame(package1, Model.getFacade().getNamespace(assoc));
+
+ // Only one end should be navigable
+ assertFalse(Model.getFacade().isNavigable(
+ Model.getFacade().getAssociationEnd(class1, assoc)));
+ assertTrue(Model.getFacade().isNavigable(
+ Model.getFacade().getAssociationEnd(class2, assoc)));
+ }
+}
Modified: trunk/src/argouml-app/tests/org/argouml/notation/TestNotationProvider.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/tests/org/argouml/notation/TestNotationProvider.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/tests/org/argouml/notation/TestNotationProvider.java (original)
+++ trunk/src/argouml-app/tests/org/argouml/notation/TestNotationProvider.java 2010-01-11 11:49:55-0800
@@ -1,4 +1,4 @@
-// $Id: TestNotationProvider.java $
+// $Id$
// Copyright (c) 2006-2009 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
Modified: trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestCrOCL.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestCrOCL.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestCrOCL.java (original)
+++ trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestCrOCL.java 2010-01-11 11:49:55-0800
@@ -1,4 +1,4 @@
-// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
+// $Id$
// Copyright (c) 2008 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
Modified: trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestCrOCL2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestCrOCL2.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestCrOCL2.java (original)
+++ trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestCrOCL2.java 2010-01-11 11:49:55-0800
@@ -1,4 +1,4 @@
-// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
+// $Id$
// Copyright (c) 2008 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
Modified: trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestDefaultOclEvaluator.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestDefaultOclEvaluator.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestDefaultOclEvaluator.java (original)
+++ trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestDefaultOclEvaluator.java 2010-01-11 11:49:55-0800
@@ -1,4 +1,4 @@
-// $Id: eclipse-argo-codetemplates.xml 11347 2006-10-26 22:37:44Z linus $
+// $Id$
// Copyright (c) 2008 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
Modified: trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestOclInterpreter.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestOclInterpreter.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestOclInterpreter.java (original)
+++ trunk/src/argouml-app/tests/org/argouml/profile/internal/ocl/TestOclInterpreter.java 2010-01-11 11:49:55-0800
@@ -1,4 +1,4 @@
-// $Id: TestProfileJava.java 13911 2007-12-13 00:09:36Z euluis $
+// $Id$
// Copyright (c) 2007 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
Modified: trunk/src/argouml-core-diagrams-activity2/src/org/argouml/activity2/ActivityDiagramModule.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-activity2/src/org/argouml/activity2/ActivityDiagramModule.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-activity2/src/org/argouml/activity2/ActivityDiagramModule.java (original)
+++ trunk/src/argouml-core-diagrams-activity2/src/org/argouml/activity2/ActivityDiagramModule.java 2010-01-11 11:49:55-0800
@@ -1,62 +1,62 @@
-// $Id: ActivityDiagramModule.java 16924 2009-03-23 17:35:16Z thn $
-// Copyright (c) 2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.activity2;
-
-import org.argouml.moduleloader.ModuleInterface;
-
-/**
- * The Class Diagram Module description.
- *
- * @see org.argouml.moduleloader.ModuleInterface
- */
-public class ActivityDiagramModule implements ModuleInterface {
-
- public boolean enable() {
- return true;
- }
-
- public boolean disable() {
- return true;
- }
-
- public String getName() {
- return "ArgoUML-Class";
- }
-
- public String getInfo(int type) {
- switch (type) {
- case DESCRIPTION:
- return "The new activity diagram implementation";
- case AUTHOR:
- return "ArgoUML Core Development Team";
- case VERSION:
- return "0.28";
- case DOWNLOADSITE:
- return "http://argouml.tigris.org";
- default:
- return null;
- }
- }
+// $Id$
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.activity2;
+
+import org.argouml.moduleloader.ModuleInterface;
+
+/**
+ * The Class Diagram Module description.
+ *
+ * @see org.argouml.moduleloader.ModuleInterface
+ */
+public class ActivityDiagramModule implements ModuleInterface {
+
+ public boolean enable() {
+ return true;
+ }
+
+ public boolean disable() {
+ return true;
+ }
+
+ public String getName() {
+ return "ArgoUML-Class";
+ }
+
+ public String getInfo(int type) {
+ switch (type) {
+ case DESCRIPTION:
+ return "The new activity diagram implementation";
+ case AUTHOR:
+ return "ArgoUML Core Development Team";
+ case VERSION:
+ return "0.28";
+ case DOWNLOADSITE:
+ return "http://argouml.tigris.org";
+ default:
+ return null;
+ }
+ }
}
\ No newline at end of file
Modified: trunk/src/argouml-core-diagrams-activity2/src/org/argouml/activity2/diagram/ActivityDiagramFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-activity2/src/org/argouml/activity2/diagram/ActivityDiagramFactory.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-activity2/src/org/argouml/activity2/diagram/ActivityDiagramFactory.java (original)
+++ trunk/src/argouml-core-diagrams-activity2/src/org/argouml/activity2/diagram/ActivityDiagramFactory.java 2010-01-11 11:49:55-0800
@@ -1,52 +1,52 @@
-// $Id: ActivityDiagramFactory.java 16381 2008-12-19 15:37:46Z bobtarling $
-// Copyright (c) 2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.activity2.diagram;
-
-import org.argouml.uml.diagram.ArgoDiagram;
-import org.argouml.uml.diagram.DiagramFactoryInterface2;
-import org.argouml.uml.diagram.DiagramSettings;
-
-/**
- * This factory creates a activity2 Activity Diagram.
- * @see org.argouml.uml.diagram.DiagramFactory
- */
-public class ActivityDiagramFactory implements DiagramFactoryInterface2 {
-
- /**
- * Factory method to create a new instance of an ArgoDiagram.
- *
- * @param owner the owning element. This can be the owning namespace for a
- * Class diagram or an owning Statemachine for a State Diagram or
- * any other interpretation that the diagram type wants to apply.
- * @param name the name of the diagram. This may be null if the caller would
- * like the factory to provide a default name.
- * @param settings default rendering settings for the diagram
- * @return the newly instantiated diagram
- */
- public ArgoDiagram createDiagram(Object owner, String name,
- DiagramSettings settings) {
- return null;
- }
-}
+// $Id$
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.activity2.diagram;
+
+import org.argouml.uml.diagram.ArgoDiagram;
+import org.argouml.uml.diagram.DiagramFactoryInterface2;
+import org.argouml.uml.diagram.DiagramSettings;
+
+/**
+ * This factory creates a activity2 Activity Diagram.
+ * @see org.argouml.uml.diagram.DiagramFactory
+ */
+public class ActivityDiagramFactory implements DiagramFactoryInterface2 {
+
+ /**
+ * Factory method to create a new instance of an ArgoDiagram.
+ *
+ * @param owner the owning element. This can be the owning namespace for a
+ * Class diagram or an owning Statemachine for a State Diagram or
+ * any other interpretation that the diagram type wants to apply.
+ * @param name the name of the diagram. This may be null if the caller would
+ * like the factory to provide a default name.
+ * @param settings default rendering settings for the diagram
+ * @return the newly instantiated diagram
+ */
+ public ArgoDiagram createDiagram(Object owner, String name,
+ DiagramSettings settings) {
+ return null;
+ }
+}
Modified: trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/SequenceDiagramPropPanelFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/SequenceDiagramPropPanelFactory.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/SequenceDiagramPropPanelFactory.java (original)
+++ trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/SequenceDiagramPropPanelFactory.java 2010-01-11 11:49:55-0800
@@ -1,64 +1,64 @@
-// $Id: DiagramPropPanelFactory.java 14530 2008-04-30 12:26:50Z mvw $
-// Copyright (c) 2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.sequence2;
-
-import org.argouml.i18n.Translator;
-import org.argouml.sequence2.diagram.UMLSequenceDiagram;
-import org.argouml.uml.diagram.ui.PropPanelDiagram;
-import org.argouml.uml.ui.PropPanel;
-import org.argouml.uml.ui.PropPanelFactory;
-
-/**
- * Factory implementation for create a sequence diagram prop panel.
- *
- * @author Bob Tarling
- */
-class SequenceDiagramPropPanelFactory implements PropPanelFactory {
-
- public PropPanel createPropPanel(Object object) {
- if (object instanceof UMLSequenceDiagram) {
- return new PropPanelUMLSequenceDiagram();
- }
- return null;
- }
-
- /**
- * The properties panel for a sequence diagram.
- *
- * @author [email protected]
- * @since Jan 3, 2003
- */
- class PropPanelUMLSequenceDiagram extends PropPanelDiagram {
-
- /**
- * Constructor for PropPanelUMLSequenceDiagram.
- */
- public PropPanelUMLSequenceDiagram() {
- super(Translator.localize("label.sequence-diagram"),
- lookupIcon("SequenceDiagram"));
- }
-
- }
-}
+// $Id$
+// Copyright (c) 2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.sequence2;
+
+import org.argouml.i18n.Translator;
+import org.argouml.sequence2.diagram.UMLSequenceDiagram;
+import org.argouml.uml.diagram.ui.PropPanelDiagram;
+import org.argouml.uml.ui.PropPanel;
+import org.argouml.uml.ui.PropPanelFactory;
+
+/**
+ * Factory implementation for create a sequence diagram prop panel.
+ *
+ * @author Bob Tarling
+ */
+class SequenceDiagramPropPanelFactory implements PropPanelFactory {
+
+ public PropPanel createPropPanel(Object object) {
+ if (object instanceof UMLSequenceDiagram) {
+ return new PropPanelUMLSequenceDiagram();
+ }
+ return null;
+ }
+
+ /**
+ * The properties panel for a sequence diagram.
+ *
+ * @author [email protected]
+ * @since Jan 3, 2003
+ */
+ class PropPanelUMLSequenceDiagram extends PropPanelDiagram {
+
+ /**
+ * Constructor for PropPanelUMLSequenceDiagram.
+ */
+ public PropPanelUMLSequenceDiagram() {
+ super(Translator.localize("label.sequence-diagram"),
+ lookupIcon("SequenceDiagram"));
+ }
+
+ }
+}
Modified: trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SelectionClassifierRole.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SelectionClassifierRole.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SelectionClassifierRole.java (original)
+++ trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SelectionClassifierRole.java 2010-01-11 11:49:55-0800
@@ -1,222 +1,222 @@
-// $Id: svn:keywords $
-// Copyright (c) 2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.sequence2.diagram;
-
-import java.awt.Polygon;
-import java.util.HashMap;
-import java.util.List;
-
-import javax.swing.Icon;
-
-import org.argouml.model.Model;
-import org.argouml.uml.diagram.ui.SelectionNodeClarifiers2;
-import org.tigris.gef.presentation.Fig;
-import org.tigris.gef.presentation.Handle;
-
-/**
- * A custom select object to handle the special requirements of reshaping a
- * classifier role.
- *
- * @author Bob Tarling
- */
-class SelectionClassifierRole extends SelectionNodeClarifiers2 {
-
- /**
- * The constructor.
- *
- * @param f
- * the fig
- */
- public SelectionClassifierRole(Fig f) {
- super(f);
- }
-
- /**
- * Makes sure that dragging on the CR keeps them all aligned and resizing
- * doesn't force FigMessages overlaying.
- *
- * @param mX
- * New X position (aka current mouse X position)
- * @param mY
- * New Y position (aka current mouse Y position)
- * @param anX
- * Old X position
- * @param anY
- * Old Y position
- * @param hand
- * The handle being dragged
- */
- @Override
- public void dragHandle(int mX, int mY, int anX, int anY, Handle hand) {
-
- if (!getContent().isResizable()) {
- return;
- }
-
- final List<Fig> figs = getContent().getLayer().getContents();
-
- int minimumHeight = 0;
- for (Fig workOnFig : figs) {
- if (workOnFig instanceof FigClassifierRole
- && workOnFig.getMinimumSize().height > minimumHeight) {
- minimumHeight = workOnFig.getMinimumSize().height;
- }
- }
-
- int deltaY = mY - getContent().getY();
-
- // vertical resizing
- switch (hand.index) {
- case Handle.NORTHWEST:
- case Handle.NORTH:
- case Handle.NORTHEAST:
- int newHeight = getContent().getHeight() - deltaY;
- if (newHeight < minimumHeight) {
- newHeight = minimumHeight;
- deltaY = getContent().getHeight() - newHeight;
- }
-
- final HashMap<Fig, Polygon> polygonsByFig =
- new HashMap<Fig, Polygon>();
-
- // There is a bug in GEF where positioning nodes can affect
- // edge positions. We need to do 3 iterations to protect
- // against that.
-
- // 1. Remember current message paths
- for (Fig workOnFig : figs) {
- if (workOnFig instanceof FigMessage &&
- !((FigMessage) workOnFig).isSelfMessage()) {
- polygonsByFig.put(
- workOnFig,
- ((FigMessage) workOnFig).getPolygon());
- }
- }
-
- // 2. Reposition and resize nodes
- for (Fig workOnFig : figs) {
- if (workOnFig instanceof FigClassifierRole) {
- workOnFig.setHeight(newHeight);
- workOnFig.translate(0, deltaY);
- }
- }
-
- // 3. Now reposition messages based on their original position
- for (Fig workOnFig : figs) {
- if (workOnFig instanceof FigMessage) {
- if (((FigMessage) workOnFig).isSelfMessage()) {
- ((FigMessageSpline) ((FigMessage) workOnFig).getFig())
- .translateFig(0, deltaY);
- } else {
- polygonsByFig.get(workOnFig).translate(0, deltaY);
- ((FigMessage) workOnFig).setPolygon(
- polygonsByFig.get(workOnFig));
- }
- }
- }
- break;
- case Handle.SOUTH:
- case Handle.SOUTHEAST:
- case Handle.SOUTHWEST:
- newHeight = deltaY;
- if (newHeight < minimumHeight) {
- newHeight = minimumHeight;
- }
- for (Fig workOnFig : figs) {
- if (workOnFig instanceof FigClassifierRole) {
- workOnFig.setHeight(newHeight);
- }
- }
- default:
- }
-
- final Fig workOnFig = getContent();
-
- int oldCenterX = 0;
- int newCenterX = 0;
- // Compute the initial center position of the CR
- if (workOnFig instanceof FigClassifierRole) {
- FigClassifierRole f = (FigClassifierRole) workOnFig;
- oldCenterX = f.getWidth() / 2 + f.getX();
- }
-
- // horizontal resizing
- switch (hand.index) {
- case Handle.NORTHWEST:
- case Handle.SOUTHWEST:
- workOnFig.setWidth(workOnFig.getX() - mX + workOnFig.getWidth());
- workOnFig.setX(mX);
- break;
- case Handle.NORTHEAST:
- case Handle.SOUTHEAST:
- workOnFig.setWidth(mX - workOnFig.getX());
- break;
- default:
- }
-
- // Compute the final center position of the CR
- if (workOnFig instanceof FigClassifierRole) {
- FigClassifierRole f = (FigClassifierRole) workOnFig;
- newCenterX = f.getWidth() / 2 + f.getX();
- }
-
- // Self messages act differently so it is needed to move them separetly.
- // Only self messages of selected CR should be horizontally translated.
- for (Fig fig : figs) {
- if (fig instanceof FigMessage && ((FigMessage) fig).isSelfMessage()
- && Model.getCoreHelper().getDestination(fig.getOwner()).
- equals(workOnFig.getOwner())) {
- ((FigMessageSpline) ((FigMessage) fig).getFig())
- .translateFig(newCenterX - oldCenterX, 0);
- }
- }
-
- }
-
- @Override
- protected Object getNewNode(int index) {
- return null;
- }
-
- @Override
- protected Icon[] getIcons() {
- return null;
- }
-
- @Override
- protected String getInstructions(int index) {
- return null;
- }
-
- @Override
- protected Object getNewEdgeType(int index) {
- return null;
- }
-
- @Override
- protected Object getNewNodeType(int index) {
- return null;
- }
+// $Id$
+// Copyright (c) 2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.sequence2.diagram;
+
+import java.awt.Polygon;
+import java.util.HashMap;
+import java.util.List;
+
+import javax.swing.Icon;
+
+import org.argouml.model.Model;
+import org.argouml.uml.diagram.ui.SelectionNodeClarifiers2;
+import org.tigris.gef.presentation.Fig;
+import org.tigris.gef.presentation.Handle;
+
+/**
+ * A custom select object to handle the special requirements of reshaping a
+ * classifier role.
+ *
+ * @author Bob Tarling
+ */
+class SelectionClassifierRole extends SelectionNodeClarifiers2 {
+
+ /**
+ * The constructor.
+ *
+ * @param f
+ * the fig
+ */
+ public SelectionClassifierRole(Fig f) {
+ super(f);
+ }
+
+ /**
+ * Makes sure that dragging on the CR keeps them all aligned and resizing
+ * doesn't force FigMessages overlaying.
+ *
+ * @param mX
+ * New X position (aka current mouse X position)
+ * @param mY
+ * New Y position (aka current mouse Y position)
+ * @param anX
+ * Old X position
+ * @param anY
+ * Old Y position
+ * @param hand
+ * The handle being dragged
+ */
+ @Override
+ public void dragHandle(int mX, int mY, int anX, int anY, Handle hand) {
+
+ if (!getContent().isResizable()) {
+ return;
+ }
+
+ final List<Fig> figs = getContent().getLayer().getContents();
+
+ int minimumHeight = 0;
+ for (Fig workOnFig : figs) {
+ if (workOnFig instanceof FigClassifierRole
+ && workOnFig.getMinimumSize().height > minimumHeight) {
+ minimumHeight = workOnFig.getMinimumSize().height;
+ }
+ }
+
+ int deltaY = mY - getContent().getY();
+
+ // vertical resizing
+ switch (hand.index) {
+ case Handle.NORTHWEST:
+ case Handle.NORTH:
+ case Handle.NORTHEAST:
+ int newHeight = getContent().getHeight() - deltaY;
+ if (newHeight < minimumHeight) {
+ newHeight = minimumHeight;
+ deltaY = getContent().getHeight() - newHeight;
+ }
+
+ final HashMap<Fig, Polygon> polygonsByFig =
+ new HashMap<Fig, Polygon>();
+
+ // There is a bug in GEF where positioning nodes can affect
+ // edge positions. We need to do 3 iterations to protect
+ // against that.
+
+ // 1. Remember current message paths
+ for (Fig workOnFig : figs) {
+ if (workOnFig instanceof FigMessage &&
+ !((FigMessage) workOnFig).isSelfMessage()) {
+ polygonsByFig.put(
+ workOnFig,
+ ((FigMessage) workOnFig).getPolygon());
+ }
+ }
+
+ // 2. Reposition and resize nodes
+ for (Fig workOnFig : figs) {
+ if (workOnFig instanceof FigClassifierRole) {
+ workOnFig.setHeight(newHeight);
+ workOnFig.translate(0, deltaY);
+ }
+ }
+
+ // 3. Now reposition messages based on their original position
+ for (Fig workOnFig : figs) {
+ if (workOnFig instanceof FigMessage) {
+ if (((FigMessage) workOnFig).isSelfMessage()) {
+ ((FigMessageSpline) ((FigMessage) workOnFig).getFig())
+ .translateFig(0, deltaY);
+ } else {
+ polygonsByFig.get(workOnFig).translate(0, deltaY);
+ ((FigMessage) workOnFig).setPolygon(
+ polygonsByFig.get(workOnFig));
+ }
+ }
+ }
+ break;
+ case Handle.SOUTH:
+ case Handle.SOUTHEAST:
+ case Handle.SOUTHWEST:
+ newHeight = deltaY;
+ if (newHeight < minimumHeight) {
+ newHeight = minimumHeight;
+ }
+ for (Fig workOnFig : figs) {
+ if (workOnFig instanceof FigClassifierRole) {
+ workOnFig.setHeight(newHeight);
+ }
+ }
+ default:
+ }
+
+ final Fig workOnFig = getContent();
+
+ int oldCenterX = 0;
+ int newCenterX = 0;
+ // Compute the initial center position of the CR
+ if (workOnFig instanceof FigClassifierRole) {
+ FigClassifierRole f = (FigClassifierRole) workOnFig;
+ oldCenterX = f.getWidth() / 2 + f.getX();
+ }
+
+ // horizontal resizing
+ switch (hand.index) {
+ case Handle.NORTHWEST:
+ case Handle.SOUTHWEST:
+ workOnFig.setWidth(workOnFig.getX() - mX + workOnFig.getWidth());
+ workOnFig.setX(mX);
+ break;
+ case Handle.NORTHEAST:
+ case Handle.SOUTHEAST:
+ workOnFig.setWidth(mX - workOnFig.getX());
+ break;
+ default:
+ }
+
+ // Compute the final center position of the CR
+ if (workOnFig instanceof FigClassifierRole) {
+ FigClassifierRole f = (FigClassifierRole) workOnFig;
+ newCenterX = f.getWidth() / 2 + f.getX();
+ }
+
+ // Self messages act differently so it is needed to move them separetly.
+ // Only self messages of selected CR should be horizontally translated.
+ for (Fig fig : figs) {
+ if (fig instanceof FigMessage && ((FigMessage) fig).isSelfMessage()
+ && Model.getCoreHelper().getDestination(fig.getOwner()).
+ equals(workOnFig.getOwner())) {
+ ((FigMessageSpline) ((FigMessage) fig).getFig())
+ .translateFig(newCenterX - oldCenterX, 0);
+ }
+ }
+
+ }
+
+ @Override
+ protected Object getNewNode(int index) {
+ return null;
+ }
+
+ @Override
+ protected Icon[] getIcons() {
+ return null;
+ }
+
+ @Override
+ protected String getInstructions(int index) {
+ return null;
+ }
+
+ @Override
+ protected Object getNewEdgeType(int index) {
+ return null;
+ }
+
+ @Override
+ protected Object getNewNodeType(int index) {
+ return null;
+ }
}
\ No newline at end of file
Modified: trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/sequence2/TestSequenceDiagramModule.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/sequence2/TestSequenceDiagramModule.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/sequence2/TestSequenceDiagramModule.java (original)
+++ trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/sequence2/TestSequenceDiagramModule.java 2010-01-11 11:49:55-0800
@@ -1,69 +1,69 @@
-// $Id: TestSequenceDiagramModule.java 14304 2008-04-08 14:29:51Z penyaskito $
-// Copyright (c) 2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.sequence2;
-
-import junit.framework.TestCase;
-
-
-/**
- * Tests the SequenceDiagramModule class.
- * @author penyaskito
- */
-public class TestSequenceDiagramModule extends TestCase {
-
- private SequenceDiagramModule theModule;
-
- protected void setUp() throws Exception {
- super.setUp();
- theModule = new SequenceDiagramModule();
- theModule.enable();
- }
-
- /**
- * Tests than the name of the module is correct
- * @see SequenceDiagramModule#getName()
- */
- public void testGetName() {
- assertEquals("The name of the module is incorrect",
- "ArgoUML-Sequence",
- theModule.getName());
- }
-
- /**
- * Tests than the name of the module is correct
- * @see SequenceDiagramModule#getName()
- */
- public void testGetInfo() {
- assertEquals("The version of the module is incorrect",
- "0.28",
- theModule.getInfo(SequenceDiagramModule.VERSION));
- assertEquals("The version of the module is incorrect",
- "http://argouml-sequence.tigris.org",
- theModule.getInfo(SequenceDiagramModule.DOWNLOADSITE));
-
- }
-
-
-}
+// $Id$
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.sequence2;
+
+import junit.framework.TestCase;
+
+
+/**
+ * Tests the SequenceDiagramModule class.
+ * @author penyaskito
+ */
+public class TestSequenceDiagramModule extends TestCase {
+
+ private SequenceDiagramModule theModule;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ theModule = new SequenceDiagramModule();
+ theModule.enable();
+ }
+
+ /**
+ * Tests than the name of the module is correct
+ * @see SequenceDiagramModule#getName()
+ */
+ public void testGetName() {
+ assertEquals("The name of the module is incorrect",
+ "ArgoUML-Sequence",
+ theModule.getName());
+ }
+
+ /**
+ * Tests than the name of the module is correct
+ * @see SequenceDiagramModule#getName()
+ */
+ public void testGetInfo() {
+ assertEquals("The version of the module is incorrect",
+ "0.28",
+ theModule.getInfo(SequenceDiagramModule.VERSION));
+ assertEquals("The version of the module is incorrect",
+ "http://argouml-sequence.tigris.org",
+ theModule.getInfo(SequenceDiagramModule.DOWNLOADSITE));
+
+ }
+
+
+}
Modified: trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/sequence2/TestSequenceDiagramPropPanelFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/sequence2/TestSequenceDiagramPropPanelFactory.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/sequence2/TestSequenceDiagramPropPanelFactory.java (original)
+++ trunk/src/argouml-core-diagrams-sequence2/tests/org/argouml/sequence2/TestSequenceDiagramPropPanelFactory.java 2010-01-11 11:49:55-0800
@@ -1,68 +1,68 @@
-// $Id: TestSequenceDiagramPropPanelFactory.java 16187 2008-11-26 17:12:09Z penyaskito $
-// Copyright (c) 2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.sequence2;
-
-import junit.framework.TestCase;
-
-import org.argouml.model.InitializeModel;
-import org.argouml.profile.init.InitProfileSubsystem;
-import org.argouml.sequence2.SequenceDiagramPropPanelFactory.PropPanelUMLSequenceDiagram;
-import org.argouml.sequence2.diagram.UMLSequenceDiagram;
-import org.argouml.uml.ui.PropPanel;
-
-public class TestSequenceDiagramPropPanelFactory extends TestCase {
-
- /*
- * @see junit.framework.TestCase#setUp()
- */
- @Override
- public void setUp() throws Exception {
- super.setUp();
- InitializeModel.initializeDefault();
- new InitProfileSubsystem().init();
- }
-
- public void testCreatePropPanel() {
- SequenceDiagramPropPanelFactory factory =
- new SequenceDiagramPropPanelFactory();
- PropPanel pp = null;
- pp = factory.createPropPanel(null);
- assertEquals("Created a proppanel for a null object",
- null, pp);
-
- Object o = new Object();
- pp = factory.createPropPanel(o);
- assertEquals("Created a proppanel for an object that is not "
- + "a sequence diagram.",
- null, pp);
-
- UMLSequenceDiagram seqDiagram = new UMLSequenceDiagram();
- pp = factory.createPropPanel(seqDiagram);
- assertNotNull("Null proppanel for a valid diagram", pp);
- assertEquals("Invalid proppanel",
- PropPanelUMLSequenceDiagram.class, pp.getClass());
- }
-
-}
+// $Id$
+// Copyright (c) 2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.sequence2;
+
+import junit.framework.TestCase;
+
+import org.argouml.model.InitializeModel;
+import org.argouml.profile.init.InitProfileSubsystem;
+import org.argouml.sequence2.SequenceDiagramPropPanelFactory.PropPanelUMLSequenceDiagram;
+import org.argouml.sequence2.diagram.UMLSequenceDiagram;
+import org.argouml.uml.ui.PropPanel;
+
+public class TestSequenceDiagramPropPanelFactory extends TestCase {
+
+ /*
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ InitializeModel.initializeDefault();
+ new InitProfileSubsystem().init();
+ }
+
+ public void testCreatePropPanel() {
+ SequenceDiagramPropPanelFactory factory =
+ new SequenceDiagramPropPanelFactory();
+ PropPanel pp = null;
+ pp = factory.createPropPanel(null);
+ assertEquals("Created a proppanel for a null object",
+ null, pp);
+
+ Object o = new Object();
+ pp = factory.createPropPanel(o);
+ assertEquals("Created a proppanel for an object that is not "
+ + "a sequence diagram.",
+ null, pp);
+
+ UMLSequenceDiagram seqDiagram = new UMLSequenceDiagram();
+ pp = factory.createPropPanel(seqDiagram);
+ assertNotNull("Null proppanel for a valid diagram", pp);
+ assertEquals("Invalid proppanel",
+ PropPanelUMLSequenceDiagram.class, pp.getClass());
+ }
+
+}
Modified: trunk/src/argouml-core-diagrams-structure2/src/org/argouml/structure2/StructureDiagram2Module.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-structure2/src/org/argouml/structure2/StructureDiagram2Module.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-structure2/src/org/argouml/structure2/StructureDiagram2Module.java (original)
+++ trunk/src/argouml-core-diagrams-structure2/src/org/argouml/structure2/StructureDiagram2Module.java 2010-01-11 11:49:55-0800
@@ -1,62 +1,62 @@
-// $Id: ActivityDiagramModule.java 16924 2009-03-23 17:35:16Z thn $
-// Copyright (c) 2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.structure2;
-
-import org.argouml.moduleloader.ModuleInterface;
-
-/**
- * The Structure Diagram module.
- *
- * @see org.argouml.moduleloader.ModuleInterface
- */
-public class StructureDiagram2Module implements ModuleInterface {
-
- public boolean enable() {
- return true;
- }
-
- public boolean disable() {
- return true;
- }
-
- public String getName() {
- return "ArgoUML-Structure";
- }
-
- public String getInfo(int type) {
- switch (type) {
- case DESCRIPTION:
- return "The structure diagram implementation";
- case AUTHOR:
- return "ArgoUML Core Development Team";
- case VERSION:
- return "0.30";
- case DOWNLOADSITE:
- return "http://argouml.tigris.org";
- default:
- return null;
- }
- }
+// $Id$
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.structure2;
+
+import org.argouml.moduleloader.ModuleInterface;
+
+/**
+ * The Structure Diagram module.
+ *
+ * @see org.argouml.moduleloader.ModuleInterface
+ */
+public class StructureDiagram2Module implements ModuleInterface {
+
+ public boolean enable() {
+ return true;
+ }
+
+ public boolean disable() {
+ return true;
+ }
+
+ public String getName() {
+ return "ArgoUML-Structure";
+ }
+
+ public String getInfo(int type) {
+ switch (type) {
+ case DESCRIPTION:
+ return "The structure diagram implementation";
+ case AUTHOR:
+ return "ArgoUML Core Development Team";
+ case VERSION:
+ return "0.30";
+ case DOWNLOADSITE:
+ return "http://argouml.tigris.org";
+ default:
+ return null;
+ }
+ }
}
\ No newline at end of file
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/ClassDiagram2Factory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/ClassDiagram2Factory.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/ClassDiagram2Factory.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/ClassDiagram2Factory.java 2010-01-11 11:49:55-0800
@@ -1,70 +1,70 @@
-// $Id: SequenceDiagramFactory.java 16381 2008-12-19 15:37:46Z bobtarling $
-// Copyright (c) 2007 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.diagram.uml2;
-
-import java.beans.PropertyVetoException;
-
-import org.apache.log4j.Logger;
-import org.argouml.uml.diagram.ArgoDiagram;
-import org.argouml.uml.diagram.DiagramFactoryInterface2;
-import org.argouml.uml.diagram.DiagramSettings;
-
-/**
- * This factory creates a Class Diagram.
- * @see org.argouml.uml.diagram.DiagramFactory
- */
-class ClassDiagram2Factory implements DiagramFactoryInterface2 {
-
- /**
- * Logger.
- */
- private static final Logger LOG =
- Logger.getLogger(ClassDiagram2Factory.class);
-
- /**
- * Factory method to create a new instance of an ArgoDiagram.
- *
- * @param owner the owning element. This can be the owning namespace for a
- * Class diagram or an owning Statemachine for a State Diagram or
- * any other interpretation that the diagram type wants to apply.
- * @param name the name of the diagram. This may be null if the caller would
- * like the factory to provide a default name.
- * @param settings default rendering settings for the diagram
- * @return the newly instantiated diagram
- */
- public ArgoDiagram createDiagram(Object owner, String name,
- DiagramSettings settings) {
- final ArgoDiagram diagram = new UMLClassDiagram2(owner);
- if (name != null) {
- try {
- diagram.setName(name);
- } catch (PropertyVetoException e) {
- LOG.error("Cannot set the name " + name +
- " to the diagram just created: "+ diagram.getName(), e);
- }
- }
- return diagram;
- }
-}
+// $Id$
+// Copyright (c) 2007 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.diagram.uml2;
+
+import java.beans.PropertyVetoException;
+
+import org.apache.log4j.Logger;
+import org.argouml.uml.diagram.ArgoDiagram;
+import org.argouml.uml.diagram.DiagramFactoryInterface2;
+import org.argouml.uml.diagram.DiagramSettings;
+
+/**
+ * This factory creates a Class Diagram.
+ * @see org.argouml.uml.diagram.DiagramFactory
+ */
+class ClassDiagram2Factory implements DiagramFactoryInterface2 {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG =
+ Logger.getLogger(ClassDiagram2Factory.class);
+
+ /**
+ * Factory method to create a new instance of an ArgoDiagram.
+ *
+ * @param owner the owning element. This can be the owning namespace for a
+ * Class diagram or an owning Statemachine for a State Diagram or
+ * any other interpretation that the diagram type wants to apply.
+ * @param name the name of the diagram. This may be null if the caller would
+ * like the factory to provide a default name.
+ * @param settings default rendering settings for the diagram
+ * @return the newly instantiated diagram
+ */
+ public ArgoDiagram createDiagram(Object owner, String name,
+ DiagramSettings settings) {
+ final ArgoDiagram diagram = new UMLClassDiagram2(owner);
+ if (name != null) {
+ try {
+ diagram.setName(name);
+ } catch (PropertyVetoException e) {
+ LOG.error("Cannot set the name " + name +
+ " to the diagram just created: "+ diagram.getName(), e);
+ }
+ }
+ return diagram;
+ }
+}
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/ClassDiagram2PropPanelFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/ClassDiagram2PropPanelFactory.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/ClassDiagram2PropPanelFactory.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/ClassDiagram2PropPanelFactory.java 2010-01-11 11:49:55-0800
@@ -1,37 +1,37 @@
-package org.argouml.diagram.uml2;
-
-
-import org.argouml.i18n.Translator;
-import org.argouml.uml.diagram.ui.PropPanelDiagram;
-import org.argouml.uml.ui.PropPanel;
-import org.argouml.uml.ui.PropPanelFactory;
-
-/**
- * Factory implementation for create a sequence diagram prop panel.
- *
- * @author Bob Tarling
- */
-class ClassDiagram2PropPanelFactory implements PropPanelFactory {
-
- public PropPanel createPropPanel(Object object) {
- if (object instanceof UMLClassDiagram2) {
- return new PropPanelUMLClassDiagram();
- }
- return null;
- }
-
- /**
- * The properties panel for a class diagram.
- */
- class PropPanelUMLClassDiagram extends PropPanelDiagram {
-
- /**
- * Constructor for PropPanelUMLClassDiagram.
- */
- public PropPanelUMLClassDiagram() {
- super(Translator.localize("label.class-diagram"),
- lookupIcon("ClassDiagram"));
- }
-
- }
-}
+package org.argouml.diagram.uml2;
+
+
+import org.argouml.i18n.Translator;
+import org.argouml.uml.diagram.ui.PropPanelDiagram;
+import org.argouml.uml.ui.PropPanel;
+import org.argouml.uml.ui.PropPanelFactory;
+
+/**
+ * Factory implementation for create a sequence diagram prop panel.
+ *
+ * @author Bob Tarling
+ */
+class ClassDiagram2PropPanelFactory implements PropPanelFactory {
+
+ public PropPanel createPropPanel(Object object) {
+ if (object instanceof UMLClassDiagram2) {
+ return new PropPanelUMLClassDiagram();
+ }
+ return null;
+ }
+
+ /**
+ * The properties panel for a class diagram.
+ */
+ class PropPanelUMLClassDiagram extends PropPanelDiagram {
+
+ /**
+ * Constructor for PropPanelUMLClassDiagram.
+ */
+ public PropPanelUMLClassDiagram() {
+ super(Translator.localize("label.class-diagram"),
+ lookupIcon("ClassDiagram"));
+ }
+
+ }
+}
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/ClassDiagram2Renderer.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/ClassDiagram2Renderer.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/ClassDiagram2Renderer.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/ClassDiagram2Renderer.java 2010-01-11 11:49:55-0800
@@ -1,60 +1,60 @@
-// $Id: ClassDiagramRenderer.java 17112 2009-04-13 19:02:54Z tfmorris $
-// Copyright (c) 1996-2008 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.diagram.uml2;
-
-/**
- * This class defines a renderer object for UML Class Diagrams. In a
- * Class Diagram the following UML objects are displayed with the
- * following Figs: <p>
- *
- * <pre>
- * UML Object --- Fig
- * ---------------------------------------
- * Class --- FigClass
- * Interface --- FigInterface
- * Instance --- FigInstance
- * Model --- FigModel
- * Subsystem --- FigSubsystem
- * Package --- FigPackage
- * Comment --- FigComment
- * (CommentEdge) --- FigEdgeNote
- * Generalization --- FigGeneralization
- * Realization --- FigRealization
- * Permission --- FigPermission
- * Usage --- FigUsage
- * Dependency --- FigDependency
- * Association --- FigAssociation
- * AssociationClass --- FigAssociationClass
- * Dependency --- FigDependency
- * Link --- FigLink
- * DataType --- FigDataType
- * Stereotype --- FigStereotypeDeclaration
- * </pre>
- *
- * @author jrobbins
- */
-public class ClassDiagram2Renderer extends StructureDiagram2Renderer {
-
-}
+// $Id$
+// Copyright (c) 1996-2008 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.diagram.uml2;
+
+/**
+ * This class defines a renderer object for UML Class Diagrams. In a
+ * Class Diagram the following UML objects are displayed with the
+ * following Figs: <p>
+ *
+ * <pre>
+ * UML Object --- Fig
+ * ---------------------------------------
+ * Class --- FigClass
+ * Interface --- FigInterface
+ * Instance --- FigInstance
+ * Model --- FigModel
+ * Subsystem --- FigSubsystem
+ * Package --- FigPackage
+ * Comment --- FigComment
+ * (CommentEdge) --- FigEdgeNote
+ * Generalization --- FigGeneralization
+ * Realization --- FigRealization
+ * Permission --- FigPermission
+ * Usage --- FigUsage
+ * Dependency --- FigDependency
+ * Association --- FigAssociation
+ * AssociationClass --- FigAssociationClass
+ * Dependency --- FigDependency
+ * Link --- FigLink
+ * DataType --- FigDataType
+ * Stereotype --- FigStereotypeDeclaration
+ * </pre>
+ *
+ * @author jrobbins
+ */
+public class ClassDiagram2Renderer extends StructureDiagram2Renderer {
+
+}
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAbstraction2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAbstraction2.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAbstraction2.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAbstraction2.java 2010-01-11 11:49:55-0800
@@ -1,52 +1,52 @@
-// $Id: FigAbstraction.java 17045 2009-04-05 16:52:52Z mvw $
-// Copyright (c) 1996-2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.diagram.uml2;
-
-import org.argouml.uml.diagram.DiagramSettings;
-import org.argouml.uml.diagram.ui.FigAbstraction;
-import org.tigris.gef.presentation.ArrowHead;
-import org.tigris.gef.presentation.ArrowHeadTriangle;
-
-/**
- * Fig representing a UML Abstraction.
- * <p>
-
- * Graphical representation is a dashed line and a triangle arrow-head.
- *
- * @author agauthie
- */
-class FigAbstraction2 extends FigAbstraction {
-
- /**
- * Construct a Fig.
- *
- * @param owner owning UML element
- * @param settings render settings
- */
- public FigAbstraction2(Object owner, DiagramSettings settings) {
- super(owner, settings);
- }
-}
-
+// $Id$
+// Copyright (c) 1996-2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.diagram.uml2;
+
+import org.argouml.uml.diagram.DiagramSettings;
+import org.argouml.uml.diagram.ui.FigAbstraction;
+import org.tigris.gef.presentation.ArrowHead;
+import org.tigris.gef.presentation.ArrowHeadTriangle;
+
+/**
+ * Fig representing a UML Abstraction.
+ * <p>
+
+ * Graphical representation is a dashed line and a triangle arrow-head.
+ *
+ * @author agauthie
+ */
+class FigAbstraction2 extends FigAbstraction {
+
+ /**
+ * Construct a Fig.
+ *
+ * @param owner owning UML element
+ * @param settings render settings
+ */
+ public FigAbstraction2(Object owner, DiagramSettings settings) {
+ super(owner, settings);
+ }
+}
+
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigActor2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigActor2.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigActor2.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigActor2.java 2010-01-11 11:49:55-0800
@@ -1,48 +1,48 @@
-// $Id: FigActor.java 17117 2009-04-14 06:29:08Z tfmorris $
-// Copyright (c) 1996-2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.diagram.uml2;
-
-import java.awt.Rectangle;
-
-import org.argouml.uml.diagram.DiagramSettings;
-import org.argouml.uml.diagram.use_case.ui.FigActor;
-
-/**
- * Class to display graphics for an Actor in a diagram.
- */
-class FigActor2 extends FigActor {
-
- /**
- * Construct a new Actor with the given owner, bounds, and settings. This
- * constructor is used by the PGML parser.
- *
- * @param owner model element that owns this fig
- * @param bounds position and size
- * @param settings rendering settings
- */
- public FigActor2(Object owner, Rectangle bounds, DiagramSettings settings) {
- super(owner, bounds, settings);
- }
-}
+// $Id$
+// Copyright (c) 1996-2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.diagram.uml2;
+
+import java.awt.Rectangle;
+
+import org.argouml.uml.diagram.DiagramSettings;
+import org.argouml.uml.diagram.use_case.ui.FigActor;
+
+/**
+ * Class to display graphics for an Actor in a diagram.
+ */
+class FigActor2 extends FigActor {
+
+ /**
+ * Construct a new Actor with the given owner, bounds, and settings. This
+ * constructor is used by the PGML parser.
+ *
+ * @param owner model element that owns this fig
+ * @param bounds position and size
+ * @param settings rendering settings
+ */
+ public FigActor2(Object owner, Rectangle bounds, DiagramSettings settings) {
+ super(owner, bounds, settings);
+ }
+}
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAssociation2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAssociation2.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAssociation2.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAssociation2.java 2010-01-11 11:49:55-0800
@@ -1,74 +1,74 @@
-// $Id: FigAssociation.java 17107 2009-04-13 18:28:43Z tfmorris $
-// Copyright (c) 1996-2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.diagram.uml2;
-
-import java.beans.PropertyChangeEvent;
-
-import org.apache.log4j.Logger;
-import org.argouml.uml.diagram.DiagramSettings;
-import org.argouml.uml.diagram.ui.FigAssociation;
-
-
-/**
- * This class represents the Fig of a binary association on a diagram.
- *
- */
-class FigAssociation2 extends FigAssociation {
-
- private static final Logger LOG = Logger.getLogger(FigAssociation2.class);
-
- /**
- * Constructor used by PGML parser.
- *
- * @param owner owning uml element
- * @param settings rendering settings
- */
- public FigAssociation2(Object owner, DiagramSettings settings) {
- super(owner, settings);
- addListener(owner);
- }
-
- @Override
- public void propertyChange(final PropertyChangeEvent pve) {
- if ("navigableOwnedEnd".equals(pve.getPropertyName())) {
- // TODO: We need to amend the arrow heads here
- LOG.debug("Navigation has changed");
- }
- super.propertyChange(pve);
- }
-
- /*
- * @see org.argouml.uml.diagram.ui.FigEdgeModelElement#updateListeners(java.lang.Object, java.lang.Object)
- */
- @Override
- public void updateListeners(Object oldOwner, Object newOwner) {
- super.updateListeners(oldOwner, newOwner);
- addListener(newOwner);
- }
-
- private void addListener(Object owner) {
- addElementListener(owner, new String[] {"remove", "navigableOwnedEnd"});
- }
-}
+// $Id$
+// Copyright (c) 1996-2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.diagram.uml2;
+
+import java.beans.PropertyChangeEvent;
+
+import org.apache.log4j.Logger;
+import org.argouml.uml.diagram.DiagramSettings;
+import org.argouml.uml.diagram.ui.FigAssociation;
+
+
+/**
+ * This class represents the Fig of a binary association on a diagram.
+ *
+ */
+class FigAssociation2 extends FigAssociation {
+
+ private static final Logger LOG = Logger.getLogger(FigAssociation2.class);
+
+ /**
+ * Constructor used by PGML parser.
+ *
+ * @param owner owning uml element
+ * @param settings rendering settings
+ */
+ public FigAssociation2(Object owner, DiagramSettings settings) {
+ super(owner, settings);
+ addListener(owner);
+ }
+
+ @Override
+ public void propertyChange(final PropertyChangeEvent pve) {
+ if ("navigableOwnedEnd".equals(pve.getPropertyName())) {
+ // TODO: We need to amend the arrow heads here
+ LOG.debug("Navigation has changed");
+ }
+ super.propertyChange(pve);
+ }
+
+ /*
+ * @see org.argouml.uml.diagram.ui.FigEdgeModelElement#updateListeners(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void updateListeners(Object oldOwner, Object newOwner) {
+ super.updateListeners(oldOwner, newOwner);
+ addListener(newOwner);
+ }
+
+ private void addListener(Object owner) {
+ addElementListener(owner, new String[] {"remove", "navigableOwnedEnd"});
+ }
+}
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAssociationClass2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAssociationClass2.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAssociationClass2.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAssociationClass2.java 2010-01-11 11:49:55-0800
@@ -1,62 +1,62 @@
-// $Id: FigAssociationClass.java 17045 2009-04-05 16:52:52Z mvw $
-// Copyright (c) 1996-2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.diagram.uml2;
-
-import org.argouml.uml.diagram.DiagramSettings;
-import org.argouml.uml.diagram.ui.FigAssociationClass;
-
-/**
- * An Association Class is represented by 3 separate Figs:
- * <nl>
- * <li>FigAssociationClass is the association edge drawn between two
- * classifiers this displays that association properties of the association
- * class.</li>
- * <li>FigClassAssociationClass is the classifier box that displays the class
- * properties of the association class.</li>
- * </li>
- * FigEdgeAssociationClass is the dashed line that joins these two.</li>
- * </nl>
- *
- * Whenever the user attempts to remove or delete one of these parts then all
- * parts must go. Delete would be handled because the model element is deleted
- * and all parts are listening for such an event and will remove themselves.
- * However if the user attempts to just remove from diagram one of these parts
- * then there is no such event. Hence the removeFromDiagram method is overridden
- * to delegate removal from a single removeFromDiagram method on
- * FigAssociationClass.
- */
-class FigAssociationClass2 extends FigAssociationClass {
-
- /**
- * Construct an association class figure for the given AssociationClass
- * model element using the rendering settings.
- *
- * @param element model element
- * @param settings rendering settings
- */
- public FigAssociationClass2(Object element, DiagramSettings settings) {
- super(element, settings);
- }
-}
+// $Id$
+// Copyright (c) 1996-2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.diagram.uml2;
+
+import org.argouml.uml.diagram.DiagramSettings;
+import org.argouml.uml.diagram.ui.FigAssociationClass;
+
+/**
+ * An Association Class is represented by 3 separate Figs:
+ * <nl>
+ * <li>FigAssociationClass is the association edge drawn between two
+ * classifiers this displays that association properties of the association
+ * class.</li>
+ * <li>FigClassAssociationClass is the classifier box that displays the class
+ * properties of the association class.</li>
+ * </li>
+ * FigEdgeAssociationClass is the dashed line that joins these two.</li>
+ * </nl>
+ *
+ * Whenever the user attempts to remove or delete one of these parts then all
+ * parts must go. Delete would be handled because the model element is deleted
+ * and all parts are listening for such an event and will remove themselves.
+ * However if the user attempts to just remove from diagram one of these parts
+ * then there is no such event. Hence the removeFromDiagram method is overridden
+ * to delegate removal from a single removeFromDiagram method on
+ * FigAssociationClass.
+ */
+class FigAssociationClass2 extends FigAssociationClass {
+
+ /**
+ * Construct an association class figure for the given AssociationClass
+ * model element using the rendering settings.
+ *
+ * @param element model element
+ * @param settings rendering settings
+ */
+ public FigAssociationClass2(Object element, DiagramSettings settings) {
+ super(element, settings);
+ }
+}
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAssociationEnd2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAssociationEnd2.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAssociationEnd2.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigAssociationEnd2.java 2010-01-11 11:49:55-0800
@@ -1,52 +1,52 @@
-// $Id: FigAssociationEnd.java 17045 2009-04-05 16:52:52Z mvw $
-// Copyright (c) 2005-2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.diagram.uml2;
-
-import org.argouml.uml.diagram.DiagramSettings;
-import org.argouml.uml.diagram.ui.FigAssociationEnd;
-
-/**
- * Class to display graphics for N-ary association edges (association ends).<p>
- *
- * This class represents an association End Fig on a diagram,
- * i.e. the line between the diamond and a node (like a class). <p>
- *
- * The direction of the lines is from the diamond outwards,
- * hence the destination is the side of the classifier,
- * where the labels are shown. <p>
- *
- * There is no support for arrows indicating navigability. <p>
- *
- * Showing qualifiers or aggregation is not permitted
- * according the UML 1.4.2 standard.
- *
- * @author Bob Tarling
- */
-class FigAssociationEnd2 extends FigAssociationEnd {
-
- public FigAssociationEnd2(Object owner, DiagramSettings settings) {
- super(owner, settings);
- }
-}
+// $Id$
+// Copyright (c) 2005-2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.diagram.uml2;
+
+import org.argouml.uml.diagram.DiagramSettings;
+import org.argouml.uml.diagram.ui.FigAssociationEnd;
+
+/**
+ * Class to display graphics for N-ary association edges (association ends).<p>
+ *
+ * This class represents an association End Fig on a diagram,
+ * i.e. the line between the diamond and a node (like a class). <p>
+ *
+ * The direction of the lines is from the diamond outwards,
+ * hence the destination is the side of the classifier,
+ * where the labels are shown. <p>
+ *
+ * There is no support for arrows indicating navigability. <p>
+ *
+ * Showing qualifiers or aggregation is not permitted
+ * according the UML 1.4.2 standard.
+ *
+ * @author Bob Tarling
+ */
+class FigAssociationEnd2 extends FigAssociationEnd {
+
+ public FigAssociationEnd2(Object owner, DiagramSettings settings) {
+ super(owner, settings);
+ }
+}
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigClass2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigClass2.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigClass2.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigClass2.java 2010-01-11 11:49:55-0800
@@ -1,68 +1,68 @@
-// $Id: FigClass.java 17045 2009-04-05 16:52:52Z mvw $
-// Copyright (c) 1996-2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.diagram.uml2;
-
-import java.awt.Rectangle;
-
-import org.argouml.uml.diagram.DiagramSettings;
-import org.argouml.uml.diagram.static_structure.ui.FigClass;
-
-/**
- * Class to display graphics for a UML Class in a diagram.<p>
- *
- * A Class may show compartments for stereotypes,
- * attributes and operations.
- */
-class FigClass2 extends FigClass {
-
- /**
- * Constructor for a {@link FigClass2}.<p>
- *
- * Parent {@link org.argouml.uml.diagram.ui.FigNodeModelElement}
- * will have created the main box {@link #getBigPort()} and its
- * name {@link #getNameFig()} and stereotype
- * (@link #getStereotypeFig()}. This constructor
- * creates a box for the attributes and operations.<p>
- *
- * The properties of all these graphic elements are adjusted
- * appropriately. The main boxes are all filled and have
- * outlines.<p>
- *
- * <em>Warning</em>. Much of the graphics positioning is hard
- * coded. The overall figure is placed at location (10,10).
- * The stereotype compartment is created 15 pixels
- * high in the parent, but we change it to 19 pixels, 1 more than
- * ({@link #STEREOHEIGHT} here. The attribute and operations boxes
- * are created at 19 pixels, 2 more than {@link #ROWHEIGHT}.<p>
- *
- * @param element model element to be represented by this fig.
- * @param bounds rectangle describing bounds
- * @param settings rendering settings
- */
- public FigClass2(Object element, Rectangle bounds,
- DiagramSettings settings) {
- super(element, bounds, settings);
- }
-}
+// $Id$
+// Copyright (c) 1996-2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.diagram.uml2;
+
+import java.awt.Rectangle;
+
+import org.argouml.uml.diagram.DiagramSettings;
+import org.argouml.uml.diagram.static_structure.ui.FigClass;
+
+/**
+ * Class to display graphics for a UML Class in a diagram.<p>
+ *
+ * A Class may show compartments for stereotypes,
+ * attributes and operations.
+ */
+class FigClass2 extends FigClass {
+
+ /**
+ * Constructor for a {@link FigClass2}.<p>
+ *
+ * Parent {@link org.argouml.uml.diagram.ui.FigNodeModelElement}
+ * will have created the main box {@link #getBigPort()} and its
+ * name {@link #getNameFig()} and stereotype
+ * (@link #getStereotypeFig()}. This constructor
+ * creates a box for the attributes and operations.<p>
+ *
+ * The properties of all these graphic elements are adjusted
+ * appropriately. The main boxes are all filled and have
+ * outlines.<p>
+ *
+ * <em>Warning</em>. Much of the graphics positioning is hard
+ * coded. The overall figure is placed at location (10,10).
+ * The stereotype compartment is created 15 pixels
+ * high in the parent, but we change it to 19 pixels, 1 more than
+ * ({@link #STEREOHEIGHT} here. The attribute and operations boxes
+ * are created at 19 pixels, 2 more than {@link #ROWHEIGHT}.<p>
+ *
+ * @param element model element to be represented by this fig.
+ * @param bounds rectangle describing bounds
+ * @param settings rendering settings
+ */
+ public FigClass2(Object element, Rectangle bounds,
+ DiagramSettings settings) {
+ super(element, bounds, settings);
+ }
+}
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigClassAssociationClass2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigClassAssociationClass2.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigClassAssociationClass2.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigClassAssociationClass2.java 2010-01-11 11:49:55-0800
@@ -1,49 +1,49 @@
-// $Id: FigClassAssociationClass.java 17045 2009-04-05 16:52:52Z mvw $
-// Copyright (c) 1996-2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.diagram.uml2;
-
-import java.awt.Rectangle;
-
-import org.argouml.uml.diagram.DiagramSettings;
-import org.argouml.uml.diagram.ui.FigClassAssociationClass;
-
-/**
- * Class to display the Class box fig piece of an Association Class.
- * <em>NOTE:</em> It must be used only from a FigAssociationClass
- */
-class FigClassAssociationClass2 extends FigClassAssociationClass {
-
- /**
- * Construct the Class box piece of a complex association class fig.
- *
- * @param owner owning model element
- * @param bounds position and size
- * @param settings rendering settings
- */
- public FigClassAssociationClass2(Object owner, Rectangle bounds,
- DiagramSettings settings) {
- super(owner, bounds, settings);
- }
-}
+// $Id$
+// Copyright (c) 1996-2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.diagram.uml2;
+
+import java.awt.Rectangle;
+
+import org.argouml.uml.diagram.DiagramSettings;
+import org.argouml.uml.diagram.ui.FigClassAssociationClass;
+
+/**
+ * Class to display the Class box fig piece of an Association Class.
+ * <em>NOTE:</em> It must be used only from a FigAssociationClass
+ */
+class FigClassAssociationClass2 extends FigClassAssociationClass {
+
+ /**
+ * Construct the Class box piece of a complex association class fig.
+ *
+ * @param owner owning model element
+ * @param bounds position and size
+ * @param settings rendering settings
+ */
+ public FigClassAssociationClass2(Object owner, Rectangle bounds,
+ DiagramSettings settings) {
+ super(owner, bounds, settings);
+ }
+}
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigComment2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigComment2.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigComment2.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigComment2.java 2010-01-11 11:49:55-0800
@@ -1,49 +1,49 @@
-// $Id: FigComment.java 17107 2009-04-13 18:28:43Z tfmorris $
-// Copyright (c) 1996-2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.diagram.uml2;
-
-import java.awt.Rectangle;
-
-import org.argouml.uml.diagram.DiagramSettings;
-import org.argouml.uml.diagram.static_structure.ui.FigComment;
-
-/**
- * Class to display a UML comment in a diagram.
- */
-class FigComment2 extends FigComment {
-
- /**
- * Construct a comment figure with the given model element, bounds, and
- * settings.
- *
- * @param owner owning Comments
- * @param bounds position and size
- * @param settings rendering settings
- */
- public FigComment2(Object owner, Rectangle bounds,
- DiagramSettings settings) {
- super(owner, bounds, settings);
- }
-}
+// $Id$
+// Copyright (c) 1996-2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.diagram.uml2;
+
+import java.awt.Rectangle;
+
+import org.argouml.uml.diagram.DiagramSettings;
+import org.argouml.uml.diagram.static_structure.ui.FigComment;
+
+/**
+ * Class to display a UML comment in a diagram.
+ */
+class FigComment2 extends FigComment {
+
+ /**
+ * Construct a comment figure with the given model element, bounds, and
+ * settings.
+ *
+ * @param owner owning Comments
+ * @param bounds position and size
+ * @param settings rendering settings
+ */
+ public FigComment2(Object owner, Rectangle bounds,
+ DiagramSettings settings) {
+ super(owner, bounds, settings);
+ }
+}
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigComponent2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigComponent2.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigComponent2.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigComponent2.java 2010-01-11 11:49:55-0800
@@ -1,47 +1,47 @@
-// $Id: FigComponent.java 17045 2009-04-05 16:52:52Z mvw $
-// Copyright (c) 1996-2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.diagram.uml2;
-
-import java.awt.Rectangle;
-import org.argouml.uml.diagram.DiagramSettings;
-import org.argouml.uml.diagram.deployment.ui.AbstractFigComponent;
-
-/**
- * Class to display graphics for a UML Component in a diagram.
- */
-class FigComponent2 extends AbstractFigComponent {
-
- /**
- * Construct a new FigComponent.
- *
- * @param owner owning UML element
- * @param bounds position and size
- * @param settings render settings
- */
- public FigComponent2(Object owner, Rectangle bounds,
- DiagramSettings settings) {
- super(owner, bounds, settings);
- }
-}
+// $Id$
+// Copyright (c) 1996-2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.diagram.uml2;
+
+import java.awt.Rectangle;
+import org.argouml.uml.diagram.DiagramSettings;
+import org.argouml.uml.diagram.deployment.ui.AbstractFigComponent;
+
+/**
+ * Class to display graphics for a UML Component in a diagram.
+ */
+class FigComponent2 extends AbstractFigComponent {
+
+ /**
+ * Construct a new FigComponent.
+ *
+ * @param owner owning UML element
+ * @param bounds position and size
+ * @param settings render settings
+ */
+ public FigComponent2(Object owner, Rectangle bounds,
+ DiagramSettings settings) {
+ super(owner, bounds, settings);
+ }
+}
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigComponentInstance2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigComponentInstance2.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigComponentInstance2.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigComponentInstance2.java 2010-01-11 11:49:55-0800
@@ -1,47 +1,47 @@
-// $Id: FigComponentInstance.java 17045 2009-04-05 16:52:52Z mvw $
-// Copyright (c) 1996-2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.diagram.uml2;
-
-import java.awt.Rectangle;
-import org.argouml.uml.diagram.DiagramSettings;
-import org.argouml.uml.diagram.deployment.ui.AbstractFigComponent;
-
-/**
- * Class to display graphics for a UML ComponentInstance in a diagram.
- */
-class FigComponentInstance2 extends AbstractFigComponent {
-
- /**
- * Construct a new FigComponentInstance.
- *
- * @param owner owning UML element
- * @param bounds position and size
- * @param settings render settings
- */
- public FigComponentInstance2(Object owner, Rectangle bounds,
- DiagramSettings settings) {
- super(owner, bounds, settings);
- }
-}
+// $Id$
+// Copyright (c) 1996-2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.diagram.uml2;
+
+import java.awt.Rectangle;
+import org.argouml.uml.diagram.DiagramSettings;
+import org.argouml.uml.diagram.deployment.ui.AbstractFigComponent;
+
+/**
+ * Class to display graphics for a UML ComponentInstance in a diagram.
+ */
+class FigComponentInstance2 extends AbstractFigComponent {
+
+ /**
+ * Construct a new FigComponentInstance.
+ *
+ * @param owner owning UML element
+ * @param bounds position and size
+ * @param settings render settings
+ */
+ public FigComponentInstance2(Object owner, Rectangle bounds,
+ DiagramSettings settings) {
+ super(owner, bounds, settings);
+ }
+}
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigDataType2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigDataType2.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigDataType2.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigDataType2.java 2010-01-11 11:49:55-0800
@@ -1,71 +1,71 @@
-// $Id: FigDataType.java 17045 2009-04-05 16:52:52Z mvw $
-// Copyright (c) 1996-2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.diagram.uml2;
-
-import java.awt.Rectangle;
-import org.argouml.uml.diagram.DiagramSettings;
-import org.argouml.uml.diagram.static_structure.ui.FigDataType;
-
-/**
- * Class to display graphics for a UML DataType in a diagram.
- * (cloned from FigInterface - perhaps they should both specialize
- * a common supertype).
- * <p>
- * A DataType may show compartments for stereotypes
- * and operations. Attributes are not supported in ArgoUML. <p>
- *
- * Every DataType shows a keyword, but it is not
- * always <<datatype>>, e.g. for an Enumeration.
- */
-class FigDataType2 extends FigDataType {
-
- /**
- * Primary constructor for a {@link FigDataType2}.
- *
- * Parent {@link org.argouml.uml.diagram.ui.FigNodeModelElement}
- * will have created the main box {@link #getBigPort()} and
- * its name {@link #getNameFig()} and stereotype
- * (@link #getStereotypeFig()}. This constructor
- * creates a box for the operations.<p>
- *
- * The properties of all these graphic elements are adjusted
- * appropriately. The main boxes are all filled and have outlines.<p>
- *
- * <em>Warning</em>. Much of the graphics positioning is hard coded. The
- * overall figure is placed at location (10,10).
- * The stereotype compartment is created 15 pixels high
- * in the parent, but we change it to 19 pixels, 1 more than
- * ({@link #STEREOHEIGHT} here. The operations box is created at 19 pixels,
- * 2 more than {@link #ROWHEIGHT}.
- *
- * @param owner owning UML element
- * @param bounds position and size
- * @param settings render settings
- */
- public FigDataType2(Object owner, Rectangle bounds,
- DiagramSettings settings) {
- super(owner, bounds, settings);
- }
-}
+// $Id$
+// Copyright (c) 1996-2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.diagram.uml2;
+
+import java.awt.Rectangle;
+import org.argouml.uml.diagram.DiagramSettings;
+import org.argouml.uml.diagram.static_structure.ui.FigDataType;
+
+/**
+ * Class to display graphics for a UML DataType in a diagram.
+ * (cloned from FigInterface - perhaps they should both specialize
+ * a common supertype).
+ * <p>
+ * A DataType may show compartments for stereotypes
+ * and operations. Attributes are not supported in ArgoUML. <p>
+ *
+ * Every DataType shows a keyword, but it is not
+ * always <<datatype>>, e.g. for an Enumeration.
+ */
+class FigDataType2 extends FigDataType {
+
+ /**
+ * Primary constructor for a {@link FigDataType2}.
+ *
+ * Parent {@link org.argouml.uml.diagram.ui.FigNodeModelElement}
+ * will have created the main box {@link #getBigPort()} and
+ * its name {@link #getNameFig()} and stereotype
+ * (@link #getStereotypeFig()}. This constructor
+ * creates a box for the operations.<p>
+ *
+ * The properties of all these graphic elements are adjusted
+ * appropriately. The main boxes are all filled and have outlines.<p>
+ *
+ * <em>Warning</em>. Much of the graphics positioning is hard coded. The
+ * overall figure is placed at location (10,10).
+ * The stereotype compartment is created 15 pixels high
+ * in the parent, but we change it to 19 pixels, 1 more than
+ * ({@link #STEREOHEIGHT} here. The operations box is created at 19 pixels,
+ * 2 more than {@link #ROWHEIGHT}.
+ *
+ * @param owner owning UML element
+ * @param bounds position and size
+ * @param settings render settings
+ */
+ public FigDataType2(Object owner, Rectangle bounds,
+ DiagramSettings settings) {
+ super(owner, bounds, settings);
+ }
+}
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigDependency2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigDependency2.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigDependency2.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigDependency2.java 2010-01-11 11:49:55-0800
@@ -1,48 +1,48 @@
-// $Id: FigDependency.java 17045 2009-04-05 16:52:52Z mvw $
-// Copyright (c) 1996-2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.diagram.uml2;
-
-import java.awt.Color;
-
-import org.argouml.uml.diagram.DiagramSettings;
-import org.argouml.uml.diagram.ui.FigDependency;
-
-/**
- * This class represents a Fig for a Dependency.
- * It has a dashed line and a V-shaped arrow-head.
- */
-class FigDependency2 extends FigDependency {
-
- /**
- * Construct a FigDependency.
- *
- * @param owner owning UML Dependency
- * @param settings render settings
- */
- public FigDependency2(Object owner, DiagramSettings settings) {
- super(owner, settings);
- }
-}
-
+// $Id$
+// Copyright (c) 1996-2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.diagram.uml2;
+
+import java.awt.Color;
+
+import org.argouml.uml.diagram.DiagramSettings;
+import org.argouml.uml.diagram.ui.FigDependency;
+
+/**
+ * This class represents a Fig for a Dependency.
+ * It has a dashed line and a V-shaped arrow-head.
+ */
+class FigDependency2 extends FigDependency {
+
+ /**
+ * Construct a FigDependency.
+ *
+ * @param owner owning UML Dependency
+ * @param settings render settings
+ */
+ public FigDependency2(Object owner, DiagramSettings settings) {
+ super(owner, settings);
+ }
+}
+
Modified: trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigEdgeAssociationClass2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigEdgeAssociationClass2.java?view=diff&pathrev=17753&r1=17752&r2=17753
==============================================================================
--- trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigEdgeAssociationClass2.java (original)
+++ trunk/src/argouml-core-diagrams-uml2/src/org/argouml/diagram/uml2/FigEdgeAssociationClass2.java 2010-01-11 11:49:55-0800
@@ -1,52 +1,52 @@
-// $Id: FigEdgeAssociationClass.java 17050 2009-04-06 16:55:59Z mvw $
-// Copyright (c) 1996-2009 The Regents of the University of California. All
-// Rights Reserved. Permission to use, copy, modify, and distribute this
-// software and its documentation without fee, and without a written
-// agreement is hereby granted, provided that the above copyright notice
-// and this paragraph appear in all copies. This software program and
-// documentation are copyrighted by The Regents of the University of
-// California. The software program and documentation are supplied "AS
-// IS", without any accompanying services from The Regents. The Regents
-// does not warrant that the operation of the program will be
-// uninterrupted or error-free. The end-user understands that the program
-// was developed for research purposes and is advised not to rely
-// exclusively on the program for any reason. IN NO EVENT SHALL THE
-// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
-// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
-// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
-// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
-// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-package org.argouml.diagram.uml2;
-
-import org.argouml.uml.diagram.DiagramSettings;
-import org.argouml.uml.diagram.ui.FigEdgeAssociationClass;
-
-/**
- * Class to display the dashed line connecting the class box figure and the
- * association line pieces of a composite Association Class group. This should
- * not be confused with the primary edge that forms the Association. That is
- * {@link FigAssociationClass2}.
- * <em>NOTE:</em> It must be used only from a FigAssociationClass.
- *
- * @author pepargouml
- */
-class FigEdgeAssociationClass2 extends FigEdgeAssociationClass {
-
- /**
- * The constructor for the AssociationClass fig.
- *
- * @param classBoxFig the figure representing the Class
- * @param ownerFig the owner fig
- * @param settings render settings
- */
- FigEdgeAssociationClass2(FigClassAssociationClass2 classBoxFig,
- FigAssociationClass2 ownerFig, DiagramSettings settings) {
- super(ownerFig.getOwner(), settings);
- }
-}
+// $Id$
+// Copyright (c) 1996-2009 The Regents of the University of California. All
+// Rights Reserved. Permission to use, copy, modify, and distribute this
+// software and its documentation without fee, and without a written
+// agreement is hereby granted, provided that the above copyright notice
+// and this paragraph appear in all copies. This software program and
+// documentation are copyrighted by The Regents of the University of
+// California. The software program and documentation are supplied "AS
+// IS", without any accompanying services from The Regents. The Regents
+// does not warrant that the operation of the program will be
+// uninterrupted or error-free. The end-user understands that the program
+// was developed for research purposes and is advised not to rely
+// exclusively on the program for any reason. IN NO EVENT SHALL THE
+// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
+// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
+// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
+// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+package org.argouml.diagram.uml2;
+
+import org.argouml.uml.diagram.DiagramSettings;
+imp