]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
New 3d/trunk from branches/dev
authorlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 16 Sep 2011 07:36:26 +0000 (07:36 +0000)
committerlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 16 Sep 2011 07:36:26 +0000 (07:36 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/3d/trunk@22266 ac1ea38d-2e2b-0410-8846-a27921b304fc

224 files changed:
3d_ontologies/.project [new file with mode: 0644]
3d_ontologies/3d.graph [new file with mode: 0644]
3d_ontologies/csg.graph [new file with mode: 0644]
3d_ontologies/dependencies.txt [new file with mode: 0644]
3d_ontologies/g3d.graph [new file with mode: 0644]
3d_ontologies/generate3d.bat [new file with mode: 0644]
3d_ontologies/generate_plant3d.bat [new file with mode: 0644]
3d_ontologies/install.map [new file with mode: 0644]
3d_ontologies/plant3d.graph [new file with mode: 0644]
3d_ontologies/plant3d_product.graph [new file with mode: 0644]
org.simantics.feature.proconf.g3d/feature.xml
org.simantics.proconf.g3d.csg/META-INF/MANIFEST.MF
org.simantics.proconf.g3d.csg/src/org/simantics/proconf/g3d/csg/Activator.java
org.simantics.proconf.g3d.occ/src/org/simantics/proconf/g3d/occ/Activator.java
org.simantics.proconf.g3d.occ/src/org/simantics/proconf/g3d/occ/OccResources.java
org.simantics.proconf.g3d.occ/src/org/simantics/proconf/g3d/occ/geometry/IndexedGeometry.java
org.simantics.proconf.g3d.occ/src/org/simantics/proconf/g3d/occ/geometry/OccTriangulator.java
org.simantics.proconf.g3d.occ/src/org/simantics/proconf/g3d/occ/geometry/ViewableShapeImpl.java
org.simantics.proconf.g3d.shapeeditor/META-INF/MANIFEST.MF
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/Activator.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/ShapeEditorResources.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/actions/ExportAction.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/actions/ImportAction.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/actions/LoadFileAction.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/actions/LoadFolderAction.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/common/ViewpointGenerator.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/dialogs/PropertySelectionDialog.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/handlers/CSGProjectAdapter.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/handlers/CSGProjectType.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/handlers/NewCSGModelHandler.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/handlers/ResourceEditorAdapter1.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/handlers/ResourceEditorAdapter3.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/perspectives/CSGModellingPerspective.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/scenegraph/CSGShapeNode.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/tools/AnimationContribution.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/tools/CSGModellingContribution.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/tools/ParameterizationContribution.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/views/CSGModellingView.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/views/ParameterizationEditor.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/views/ShapeEditorBase.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/views/ShapeEditorView.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/views/StructureOutlinePage.java
org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/views/StructureView.java
org.simantics.proconf.g3d/META-INF/MANIFEST.MF
org.simantics.proconf.g3d/plugin.xml
org.simantics.proconf.g3d/schema/appearance.exsd [new file with mode: 0644]
org.simantics.proconf.g3d/schema/geometry.exsd
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/Activator.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/Resources.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/actions/CameraAction.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/actions/ConstrainedTransformAction.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/actions/ContextAction.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/actions/ContextActionFactory.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/actions/ContextActionRegistry.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/actions/FocusAction.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/actions/InteractiveAction.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/actions/ReadAction.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/actions/ReadInteractiveAction.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/actions/RemoveAction.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/actions/RotateAction.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/actions/TranslateAction.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/actions/TranslateActionConstraints.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/actions/WriteAction.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/actions/WriteInteractiveAction.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/AbstractScalarInterpolator.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/Animatable.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/Animation.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/AnimationController.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/AnimationSystem.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/AnimationSystemListener.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/ChanneledColorInterpolator.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/ChanneledPositionInterpolator.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/ConstantInterpolator.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/Interpolator.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/ResourceAnimationController.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/ScalarInterpolator.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/ScaledResourceAnimationController.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/SlerpInterpolator.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/TCBInterpolator.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/TestAnimationController.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/animation/ui/AnimationControlCreator.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/AppearanceProvider.java [new file with mode: 0644]
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/AppearanceProviderRegistry.java [new file with mode: 0644]
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/AppearanceTools.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/Constraint.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/ConstraintDetector.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/DefaultAppearanceProvider.java [new file with mode: 0644]
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/EditorContribution.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/EditorLoader.java [new file with mode: 0644]
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/G3DAPI.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/G3DTools.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/GeometryProvider.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/GeometryProviderRegistry.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/JmeRenderingComponent.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/MathTools.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/ResourceTextureCache.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/ScenegraphAdapter.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/ScenegraphAdapterImpl.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/SelectionAdapter.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/ThreeDimensionalEditorBase.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/ThreeDimensionalEditorPart.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/ThreeDimensionalEditorProvider.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/TransformationTools.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/VecmathJmeTools.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/VisualizationScheduler.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/common/JmeComposite.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/common/JmeSinglePassRenderingComponent.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/common/OrbitalCamera.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/common/PropertyTester2.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/common/StructuredResourceSelection.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/dialogs/JMEDialog.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/dnd/DropListener.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/dnd/ShapeDropTarget.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/gizmo/AbstractGizmo.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/gizmo/Gizmo.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/gizmo/MultiSelectionGizmo.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/gizmo/RotateGizmo.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/gizmo/TransformGizmo.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/gizmo/TransformInlineGizmo.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/input/AWTInputProvider.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/input/InputProvider.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/input/SWTInputProvider.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/preferences/G3DPreferencesPage.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/preferences/PreferenceConstants.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/preferences/PreferenceInitializer.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/AbstractGraphicsNode.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/IGeometryNode.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/IGraphicsNode.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ISelectableNode.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ModelNode.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/NonTransformableNode.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ParameterizedModelNode.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/RootGraphicsNode.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ShapeNode.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/shapes/AxesShape.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/shapes/FloorShape.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/shapes/GridShape.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/shapes/Quad.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/tools/OEPathSelectionListener.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/tools/OESelectionListener.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/tools/PropertyTree.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/tools/ScenegraphLockTraverser.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/views/AppearanceEditor.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/views/ScenegraphViewPart.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/views/SinglePageResourceEditor.java
org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/views/SinglePageResourceView.java
org.simantics.proconf.processeditor/META-INF/MANIFEST.MF
org.simantics.proconf.processeditor/data/dcp.obj [deleted file]
org.simantics.proconf.processeditor/plugin.xml
org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/PositionType.java [deleted file]
org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/SplitPointListener.java [deleted file]
org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/Plant3DProjectAdapter.java [deleted file]
org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/perspectives/Plant3DModellingPerspective.java [deleted file]
org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/views/PlantStructureView.java [deleted file]
org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/views/ProcessEditor.java [deleted file]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/Activator.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/Activator.java with 90% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/ProcessResource.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/ProcessResource.java with 81% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/ConfigureFloorAction.java [new file with mode: 0644]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/InsertComponentAction.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/InsertComponentAction.java with 92% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/InsertEquipmentAction.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/InsertEquipmentAction.java with 88% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/InsertNozzleAction.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/InsertNozzleAction.java with 88% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/PositionType.java [new file with mode: 0644]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/ReversePipelineAction.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/ReversePipelineAction.java with 82% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/RoutePipeAction.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/RoutePipeAction.java with 95% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/SelectSplitPointAction.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/SelectSplitPointAction.java with 82% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/SplitPointListener.java [new file with mode: 0644]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/TranslateElbowAction.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/TranslateElbowAction.java with 91% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/TranslateInlineComponentAction.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/TranslateInlineComponentAction.java with 92% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/TranslateStraightAction.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/TranslateStraightAction.java with 93% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/adapters/InlineComponentConstraintAdapter.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/adapters/InlineComponentConstraintAdapter.java with 57% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/adapters/NozzleConstraintAdapter.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/adapters/NozzleConstraintAdapter.java with 57% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/adapters/ProcessEditorAdapter.java [new file with mode: 0644]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/adapters/ProcessEditorSelectionAdapter.java [new file with mode: 0644]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/adapters/TurnComponentConstraintAdapter.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/adapters/TurnComponentConstraintAdapter.java with 61% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/animations/PipeAnimationController.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/animations/PipeAnimationController.java with 90% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/animations/PipeFlowAnimation.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/animations/PipeFlowAnimation.java with 87% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/animations/ResourcePipeAnimationController.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/animations/ResourcePipeAnimationController.java with 90% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/ControlPointTools.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/common/ControlPointTools.java with 95% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/PathUtils.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/common/PathUtils.java with 94% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/PipeComponentProvider.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/common/PipeComponentProvider.java with 95% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/PipingRules.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/common/PipingRules.java with 96% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/PipingTools.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/common/PipingTools.java with 96% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/PipingTools2.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/common/PipingTools2.java with 94% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/ConfigureAnimationDialog.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/dialogs/ConfigureAnimationDialog.java with 95% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/ConfigureMonitorDialog.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/dialogs/ConfigureMonitorDialog.java with 95% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/ConfigurePipelineAnimationDialog.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/dialogs/ConfigurePipelineAnimationDialog.java with 94% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/EquipmentDialog.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/dialogs/EquipmentDialog.java with 80% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/FloorConfigureDialog.java [new file with mode: 0644]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/LibraryComponentDialog.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/dialogs/LibraryComponentDialog.java with 76% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/NozzleDialog.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/dialogs/NozzleDialog.java with 79% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/PipelineComponentDialog.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/dialogs/PipelineComponentDialog.java with 84% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/PipelineDialog.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/dialogs/PipelineDialog.java with 93% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/gizmo/PositionSelectionGizmo.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/gizmo/PositionSelectionGizmo.java with 84% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/EquipmentEditorAdapter.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/EquipmentEditorAdapter.java with 60% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/NewComponentHandler.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/NewComponentHandler.java with 91% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/NewEquipmentHandler.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/NewEquipmentHandler.java with 81% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/NewPlantHandler.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/NewPlantHandler.java with 78% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/PipelineComponentEditorAdapter.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/PipelineComponentEditorAdapter.java with 64% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/Plant3DEditorAdapter.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/Plant3DEditorAdapter.java with 57% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/Plant3DProjectAdapter.java [new file with mode: 0644]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/Plant3DProjectType.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/Plant3DProjectType.java with 71% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/monitors/BillboardMonitor.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/monitors/BillboardMonitor.java with 93% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/monitors/Monitor.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/monitors/Monitor.java with 87% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/monitors/MonitorTextProvider.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/monitors/MonitorTextProvider.java with 83% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/monitors/ObjectPropertyProvider.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/monitors/ObjectPropertyProvider.java with 89% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/monitors/PathContainer.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/monitors/PathContainer.java with 62% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/monitors/ResourcePathPropertyProvider.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/monitors/ResourcePathPropertyProvider.java with 91% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/monitors/TextMonitor.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/monitors/TextMonitor.java with 94% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/perspectives/Plant3DModellingPerspective.java [new file with mode: 0644]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/perspectives/ViewpointGenerator.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/perspectives/ViewpointGenerator.java with 81% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/scenegraph/NonVisibleNode.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/scenegraph/NonVisibleNode.java with 83% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/scenegraph/PipeComponentNode.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/scenegraph/PipeComponentNode.java with 72% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/scenegraph/PipeRunNode.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/scenegraph/PipeRunNode.java with 83% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/scenegraph/PipelineComponentNode.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/scenegraph/PipelineComponentNode.java with 86% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/tools/ControlPointContribution.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/tools/ControlPointContribution.java with 90% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/tools/NozzleContribution.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/tools/NozzleContribution.java with 81% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/tools/PlantEditContribution.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/tools/PlantEditContribution.java with 85% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/tools/PlantVisualizationContribution.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/tools/PlantVisualizationContribution.java with 85% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/EquipmentEditorPart.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/views/EquipmentEditorPart.java with 64% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/PipelineComponentEditorPart.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/views/PipelineComponentEditorPart.java with 65% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/PlantStructureOutlinePage.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/views/PlantStructureOutlinePage.java with 50% similarity]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/PlantStructureView.java [new file with mode: 0644]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/ProcessEditor.java [new file with mode: 0644]
org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/ProcessEditorPart.java [moved from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/views/ProcessEditorPart.java with 86% similarity]

diff --git a/3d_ontologies/.project b/3d_ontologies/.project
new file mode 100644 (file)
index 0000000..fd242e3
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+       <name>3d_ontologies</name>\r
+       <comment></comment>\r
+       <projects>\r
+       </projects>\r
+       <buildSpec>\r
+       </buildSpec>\r
+       <natures>\r
+       </natures>\r
+</projectDescription>\r
diff --git a/3d_ontologies/3d.graph b/3d_ontologies/3d.graph
new file mode 100644 (file)
index 0000000..f3b96e9
--- /dev/null
@@ -0,0 +1,4 @@
+%import "foundation.graph"\r
+\r
+%import "csg.graph"\r
+%import "equation.graph"\r
diff --git a/3d_ontologies/csg.graph b/3d_ontologies/csg.graph
new file mode 100644 (file)
index 0000000..8c04a66
--- /dev/null
@@ -0,0 +1,125 @@
+%import "layer0.graph"\r
+%import "layer0.graph" L0\r
+%import "animation.graph"\r
+%import "g3d.graph"\r
+%define symmetric()\r
+    $subject\r
+        $layer0.InverseOf $subject\r
+%define tag($tagname)\r
+    $subject\r
+        $tagname $subject\r
+%deflib Type _ @ "Types" : TypeLibrary\r
+    PartOf CSGOntology\r
+%deflib Relation _ @ "Relations" : RelationLibrary\r
+    PartOf CSGOntology\r
+%deflib Library CSGOntology\r
+CSGOntology @ "CSG Ontology" : Ontology\r
+    PartOf TypeSystemProject\r
+    HasNamespace "http://www.vtt.fi/Simantics/CSG/1.0" : URI\r
+    HasVersion "1.0" : Version\r
+    HasResourceClass "org.simantics.proconf.g3d.csg.stubs.CSGResource" : String\r
+    HasStubsPackage "org.simantics.proconf.g3d.csg.stubs" : String\r
+\r
+CSGNamespace : Namespace\r
+    PartOf TypeSystemNamespaces\r
+    HasNamespace "http://www.vtt.fi/Simantics/CSG/1.0" : URI\r
+    HasNamespaceRoot CSGOntology\r
+\r
+# Project\r
+CSGProjectType <T ProjectType\r
+CSGProject : CSGProjectType <T Project\r
+    PartOf ProjectTypes\r
+    \r
+CSGShape <T Shape\r
+CSGModel <T G3DModel\r
+Primitive <T CSGShape\r
+    [HasSizingProperty card "0..*"]\r
+HasMainShape <R HasGeometryDefinition\r
+    HasDomain [BooleanOperation]\r
+    HasRange [CSGShape]\r
+HasSecondaryShape <R HasGeometryDefinition\r
+    HasDomain [BooleanOperation]\r
+    HasRange [CSGShape]\r
+BooleanOperation <T CSGShape\r
+    [HasMainShape card "0..1"]\r
+    [HasSecondaryShape card "0..*"]\r
+Difference <T BooleanOperation\r
+Intersection <T BooleanOperation\r
+Union <T BooleanOperation\r
+HasSizingProperty <R HasNonTransformation\r
+HasXAxisSize @ "Has X Axis Size" <R HasSizingProperty\r
+    HasRange [Double]\r
+HasYAxisSize @ "Has Y Axis Size" <R HasSizingProperty\r
+    HasRange [Double]\r
+HasZAxisSize @ "Has Z Axis Size" <R HasSizingProperty\r
+    HasRange [Double]\r
+HasXAxisMinimumSize @ "Has X Axis Minimum Size" <R HasSizingProperty\r
+    HasRange [Double]\r
+HasZAxisMinimumSize @ "Has Z Axis Minimum Size" <R HasSizingProperty\r
+    HasRange [Double]\r
+HasXAxisMaximumSize @ "Has X Axis Maximum Size" <R HasSizingProperty\r
+    HasRange [Double]\r
+HasZAxisMaximumSize @ "Has Z Axis Maximum Size" <R HasSizingProperty\r
+    HasRange [Double]\r
+HasRadius <R HasSizingProperty\r
+    HasRange [Double]\r
+HasMajorRadius <R HasSizingProperty\r
+    HasRange [Double]\r
+HasMinorRadius <R HasSizingProperty\r
+    HasRange [Double]\r
+HasTopRadius <R HasSizingProperty\r
+    HasRange [Double]\r
+HasBottomRadius <R HasSizingProperty\r
+    HasRange [Double]\r
+HasHeight <R HasSizingProperty\r
+    HasRange [Double]\r
+HasCorners <R HasSizingProperty\r
+    HasRange [Integer]\r
+Box <T Primitive\r
+    [HasXAxisSize card "1"]\r
+    [HasYAxisSize card "1"]\r
+    [HasZAxisSize card "1"]\r
+Sphere <T Primitive\r
+    [HasRadius card "1"]\r
+Cone <T Primitive\r
+    [HasTopRadius card "1"]\r
+    [HasBottomRadius card "1"]\r
+    [HasHeight card "1"]\r
+Cylinder <T Primitive\r
+    [HasRadius card "1"]\r
+    [HasHeight card "1"]\r
+Barrel <T Primitive\r
+    [HasMinorRadius card "1"]\r
+    [HasMajorRadius card "1"]\r
+    [HasHeight card "1"]\r
+EllipticCylinder <T Primitive\r
+    [HasMinorRadius card "1"]\r
+    [HasMajorRadius card "1"]\r
+    [HasHeight card "1"]\r
+RegularPrism <T Primitive\r
+    [HasHeight card "1"]\r
+    [HasRadius card "1"]\r
+    [HasCorners card "1"]\r
+Torus <T Primitive\r
+    [HasMinorRadius card "1"]\r
+    [HasMajorRadius card "1"]\r
+RectangularSolid <T Primitive\r
+    [HasXAxisMinimumSize card "1"]\r
+    [HasXAxisMaximumSize card "1"]\r
+    [HasYAxisSize card "1"]\r
+    [HasZAxisMinimumSize card "1"]\r
+    [HasZAxisMaximumSize card "1"]\r
+\r
+csgViewpointLibrary @ "Viewpoint Library" : ViewpointLibrary\r
+    PartOf CSGOntology\r
+csgState @ _ : ViewpointState\r
+csgTraversalRule @ _ : RelationBasedTraversalRule\r
+    HasContext csgState\r
+    L0.HasTargetState csgState\r
+    AcceptsRelation HasChild\r
+csgAcceptRule @ _ : AcceptAllResourceAcceptRule\r
+CSGStructureViewpoint @ "CSG Structure Viewpoint" : ResourceViewpoint\r
+    HasInitialState csgState\r
+    HasTraversalRule csgTraversalRule\r
+    HasResourceAcceptRule csgAcceptRule\r
+    PartOf csgViewpointLibrary\r
diff --git a/3d_ontologies/dependencies.txt b/3d_ontologies/dependencies.txt
new file mode 100644 (file)
index 0000000..a1b205a
--- /dev/null
@@ -0,0 +1,2 @@
+..\foundation_ontologies\r
+..\2d_ontologies\r
diff --git a/3d_ontologies/g3d.graph b/3d_ontologies/g3d.graph
new file mode 100644 (file)
index 0000000..e71c8f4
--- /dev/null
@@ -0,0 +1,284 @@
+%import "layer0.graph" \r
+%import "animation.graph"\r
+%import "image.graph" IMAGE\r
+%define symmetric()\r
+    $subject\r
+        $layer0.InverseOf $subject\r
+%define tag($tagname)\r
+    $subject\r
+        $tagname $subject\r
+%deflib Type _ @ "Types" : TypeLibrary\r
+    PartOf G3DOntology\r
+%deflib Relation _ @ "Relations" : RelationLibrary\r
+    PartOf G3DOntology\r
+%deflib Library G3DOntology\r
+G3DOntology @ "G3D Ontology" : Ontology\r
+    PartOf TypeSystemProject\r
+    HasNamespace "http://www.vtt.fi/Simantics/G3D/1.0" : URI\r
+    HasVersion "1.0" : Version\r
+    HasResourceClass "org.simantics.proconf.g3d.stubs.G3DResource" : String\r
+    HasStubsPackage "org.simantics.proconf.g3d.stubs" : String\r
+\r
+G3DNamespace @ "G3D Namespace" : Namespace\r
+    PartOf TypeSystemNamespaces\r
+    HasNamespace "http://www.vtt.fi/Simantics/G3D/1.0" : URI\r
+    HasNamespaceRoot G3DOntology\r
+\r
+HasTransformationValue <R HasProperty\r
+    InverseOf TransformationValueOf\r
+    HasRange [Double]\r
+HasX <R HasTransformationValue\r
+HasY <R HasTransformationValue\r
+HasZ <R HasTransformationValue\r
+HasAngle <R HasTransformationValue\r
+Tuple3 <T Property\r
+    [HasX card "1"]\r
+    [HasY card "1"]\r
+    [HasZ card "1"]\r
+Position <T Tuple3\r
+Center <T Tuple3\r
+Orientation <T Property\r
+    [HasX card "1"]\r
+    [HasY card "1"]\r
+    [HasZ card "1"]\r
+    [HasAngle card "1"]\r
+Transformation <T Property\r
+Position <T Transformation\r
+Orientation <T Transformation\r
+Center <T Transformation\r
+\r
+# Parent-child relationship\r
+HasChild <R IsRelatedTo\r
+    InverseOf HasParent\r
+    HasDomain [G3DNode]\r
+    HasRange [G3DNode]\r
+HasGeometryDefinition <R HasChild\r
+    InverseOf GeometryDefinitionOf\r
+\r
+# Properties of G3DNode are divided into transformation properties and non-transformation properties    \r
+# All 3D properties must be inherited from these two. (Queries that update scene-graph require this)    \r
+HasTransformation <R HasProperty\r
+    InverseOf TransformationOf\r
+HasNonTransformation <R HasProperty\r
+    InverseOf NonTransformationOf\r
+    \r
+HasLocalPosition <R HasTransformation\r
+    HasRange [Position]\r
+    InverseOf LocalPositionOf\r
+HasWorldPosition <R HasTransformation\r
+    HasRange [Position]\r
+    InverseOf WorldPositionOf\r
+HasLocalOrientation <R HasTransformation\r
+    HasRange [Orientation]\r
+    InverseOf LocalOrientationOf\r
+HasWorldOrientation <R HasTransformation\r
+    HasRange [Orientation]\r
+    InverseOf WorldOrientationOf\r
+HasCenter <R HasTransformation\r
+    HasRange [Center]\r
+G3DNode @ "G3DNode" <T Entity\r
+    [HasParent card "0..1"]\r
+    [HasChild card "0..*"]\r
+    [HasLocalPosition card "0..1"]\r
+    [HasWorldPosition card "0..1"]\r
+    [HasLocalOrientation card "0..1"]\r
+    [HasWorldOrientation card "0..1"]\r
+    [HasCenter card "0..1"]\r
+    HasDescription "Base node for scene-graph" : String\r
+    Includes\r
+        HasChild\r
+    Propagates\r
+        HasChild\r
+HasG3DNode @ "Has G3DNode" <R DependsOn\r
+    HasRange [G3DNode]\r
+HasRed <R HasProperty\r
+    HasRange [Double]\r
+HasGreen <R HasProperty\r
+    HasRange [Double]\r
+HasBlue <R HasProperty\r
+    HasRange [Double]\r
+HasTransparency <R HasProperty\r
+    HasRange [Double]\r
+HasShininess <R HasProperty\r
+    HasRange [Double]\r
+Color <T Entity\r
+    [HasRed card "1"]\r
+    [HasGreen card "1"]\r
+    [HasBlue card "1"]\r
+HasDiffuseColor <R IsRelatedTo\r
+    InverseOf DiffuseColorOf\r
+    HasRange [Color]\r
+HasSpecularColor <R IsRelatedTo\r
+    InverseOf SpecularColorOf\r
+    HasRange [Color]\r
+HasAmbientColor <R IsRelatedTo\r
+    InverseOf AmbientColorOf\r
+    HasRange [Color]\r
+HasEmissiveColor <R IsRelatedTo\r
+    InverseOf EmissiveColorOf\r
+    HasRange [Color]\r
+\r
+Material <T Entity\r
+    [HasDiffuseColor card "1"]\r
+    [HasSpecularColor card "1"]\r
+    [HasAmbientColor card "1"]\r
+    [HasEmissiveColor card "1"]\r
+    [HasTransparency card "1"]\r
+    [HasShininess card "1"]\r
+    Includes\r
+        HasDiffuseColor\r
+        HasSpecularColor\r
+        HasAmbientColor\r
+        HasEmissiveColor\r
+        HasTransparency\r
+        HasShininess\r
+    Propagates\r
+        HasDiffuseColor\r
+        HasSpecularColor\r
+        HasAmbientColor\r
+        HasEmissiveColor\r
+        HasTransparency\r
+        HasShininess\r
+TextureCoordinateGenerator <T Property\r
+    tag(Enumeration)\r
+HasTextureCoordinateGenerator <R DependsOn\r
+    HasRange [TextureCoordinateGenerator]\r
+TextureCoordinateGenerations : Library\r
+    ConsistsOf\r
+        _sphere @ "sphere" : TextureCoordinateGenerator\r
+        _eye_linear @ "eye linear" : TextureCoordinateGenerator\r
+        _object_linear @ "object linear" : TextureCoordinateGenerator\r
+        _normal @ "normal" : TextureCoordinateGenerator\r
+        _reflection @ "reflection" : TextureCoordinateGenerator\r
+\r
+TextureMode @ "MultiTexture Mode" <T Property\r
+    tag(Enumeration)\r
+    ConsistsOf\r
+      mt_add @ "add" : TextureMode\r
+      mt_modulate @ "modulate" : TextureMode\r
+      mt_blend @ "blend" : TextureMode\r
+      mt_decal @ "decal" : TextureMode\r
+      mt_replace @ "replace" : TextureMode\r
+      mt_combine @ "combine" : TextureMode\r
+HasTextureMode @ "Has Texture Mode" <R DependsOn\r
+    HasRange [TextureMode]\r
+   \r
+CombineMode <T Property\r
+    tag(Enumeration)\r
+    ConsistsOf\r
+      cm_add @ "add" : CombineMode\r
+      cm_replace @ "replace" : CombineMode\r
+      cm_modulate @ "modulate" : CombineMode\r
+      cm_add_signed @ "add signed" : CombineMode\r
+      cm_subtract @ "subtract" : CombineMode\r
+      cm_interpolate @ "interpolate" : CombineMode\r
+      cm_dot3 @ "dot3" : CombineMode\r
+#HasCombineMode <R DependsOn\r
+#    HasRange [CombineMode]\r
+   \r
+CombineSource <T Property\r
+    tag(Enumeration)\r
+    ConsistsOf\r
+      cs_object_color @ "object color" : CombineSource\r
+      cs_texture_color @ "texture color" : CombineSource\r
+      cs_constant_color @ "constant color" : CombineSource\r
+      cs_previous_texture_state @ "previous state" : CombineSource\r
+      cs_texture0 @ "texture 0" : CombineSource\r
+      cs_texture1 @ "texture 1" : CombineSource\r
+#HasCombineSource <R DependsOn\r
+#    HasRange [CombineSource]\r
+CombineFunction <T Property\r
+    tag(Enumeration)\r
+    ConsistsOf\r
+      cf_src_color @ "src color" : CombineFunction\r
+      cf_one_minus_src_color @ "one minus src color" : CombineFunction\r
+      cf_src_alpha @ "src alpha" : CombineFunction\r
+      cf_one_minus_src_alpha @ "one minus src alpha" : CombineFunction\r
+#HasCombineFunction <R DependsOn\r
+#    HasRange [CombineFunction]\r
+\r
+HasCombineDefinition @ "Has Combine Definition" <R HasProperty\r
+    HasRange [LinkedList]\r
+    \r
+#MultiTextureElement @ "MultiTextureElement" <T Entity\r
+#    [HasTexture card "1"]\r
+\r
+Texture <T Property\r
+    [HasTextureMode card "0..1"]\r
+    [HasCombineDefinition card "0..1"]\r
+    [HasTextureCoordinateGenerator card "0..1"]\r
+    #[HasCombineMode card "0..1"]\r
+    #[HasCombineSource card "0..1"]\r
+    #[HasCombineFunction card "0..1"]\r
+    \r
+HasTexture <R DependsOn\r
+    HasRange [Texture]\r
+    \r
+Texture1D @ "Texture1D" <T Texture\r
+Texture2D @ "Texture2D" <T Texture\r
+Texture3D @ "Texture3D" <T Texture\r
+CubeMapTexture @ "CubeMap Texture" <T Texture\r
+    \r
+#MultiTextureElementList @ "MultiTextureElementList" <T LinkedList\r
+#HasMultiTextureElementList @ "Has MultiTextureElementList" <R DependsOn : FunctionalRelation\r
+HasMultiTextureElementList @ "Has MultiTextureElementList" <R HasProperty\r
+    HasRange [LinkedList]\r
+    #HasRange [MultiTextureElementList]\r
+# this definition is incorrect: multitexture cannot have texturemode,m etc. itself\r
+MultiTexture @ "MultiTexture" <T Texture\r
+    [HasMultiTextureElementList card "1"]\r
+HasImage <R DependsOn\r
+    HasRange [IMAGE.Image]\r
+ImageTexture @ "ImageTexture" <T Texture2D\r
+    [HasImage card "1"]\r
+HasVertexShader <R HasProperty\r
+    HasRange [String]\r
+HasFragmentShader <R HasProperty\r
+    HasRange [String]\r
+Shader <T Entity\r
+    [HasVertexShader card "1"]\r
+    [HasFragmentShader card "1"]\r
+HasMaterial <R IsRelatedTo\r
+    HasRange [Material]\r
+HasShader <R IsRelatedTo\r
+    HasRange [Shader]\r
+Appearance <T Entity\r
+    [HasMaterial card "0..1"]\r
+    [HasTexture card "0..1"]\r
+    [HasShader card "0..1"]\r
+    Includes\r
+        HasMaterial\r
+        HasTexture\r
+        HasShader\r
+    Propagates\r
+        HasMaterial\r
+        HasTexture\r
+        HasShader\r
+HasAppearance <R HasProperty # HasNonTransformation \r
+    HasRange [Appearance]\r
+Shape <T G3DNode\r
+    [HasAppearance card "0..1"]\r
+    HasDescription "Node for representing geometries" : String\r
+    Includes\r
+        HasAppearance\r
+G3DModel @ "G3DModel" <T G3DNode\r
+    [HasAnimation card "0..*"]\r
+    [HasSizingParameter card "0..*"]\r
+    Includes\r
+        HasAnimation\r
+        HasSizingParameter\r
+    Propagates\r
+        HasAnimation\r
+        HasSizingParameter\r
+HasSizingParameter <R HasNonTransformation\r
+    HasDescription "Sizing parameters are used for defining parameterization of a model" : String\r
+    HasDomain [G3DModel]\r
+    HasRange [Double]\r
+HasDefaultDoubleValue <R HasProperty\r
+    HasDescription "Sizing Parameter's default value" : String\r
+    HasDomain [Double]\r
+    HasRange [Double]\r
+    \r
+HasConstraints <R HasAdapter2 : FunctionalRelation\r
+\r
+\r
diff --git a/3d_ontologies/generate3d.bat b/3d_ontologies/generate3d.bat
new file mode 100644 (file)
index 0000000..ab72ea7
--- /dev/null
@@ -0,0 +1,3 @@
+@echo off\r
+\r
+call "%~dp0..\og\generate2" "%~dp0" 3d.graph\r
diff --git a/3d_ontologies/generate_plant3d.bat b/3d_ontologies/generate_plant3d.bat
new file mode 100644 (file)
index 0000000..bb540d2
--- /dev/null
@@ -0,0 +1,5 @@
+@echo off\r
+\r
+call "%~dp0..\og\generate2" "%~dp0" plant3d_product.graph || goto eof\r
+\r
+:eof
\ No newline at end of file
diff --git a/3d_ontologies/install.map b/3d_ontologies/install.map
new file mode 100644 (file)
index 0000000..354d3aa
--- /dev/null
@@ -0,0 +1,4 @@
+scrub=org/simantics/proconf/g3d/stubs=../org.simantics.proconf.g3d/src\r
+scrub=org/simantics/proconf/g3d/csg/stubs=../org.simantics.proconf.g3d.csg/src\r
+scrub=org/simantics/processeditor/stubs=../org.simantics.proconf.processeditor/src\r
+\r
diff --git a/3d_ontologies/plant3d.graph b/3d_ontologies/plant3d.graph
new file mode 100644 (file)
index 0000000..9b3aa28
--- /dev/null
@@ -0,0 +1,507 @@
+HasNext\r
+HasPrevious\r
+%import "layer0.graph"\r
+%import "animation.graph"\r
+%import "g3d.graph"\r
+%define symmetric()\r
+    $subject\r
+        $layer0.InverseOf $subject\r
+%define tag($tagname)\r
+    $subject\r
+        $tagname $subject\r
+%deflib Type _ @ "Types" : TypeLibrary\r
+    PartOf Plant3DOntology\r
+%deflib Relation _ @ "Relations" : RelationLibrary\r
+    PartOf Plant3DOntology\r
+%deflib Library Plant3DOntology\r
+Plant3DOntology @ "Plant3D Ontology" : Ontology\r
+    PartOf TypeSystemProject\r
+    HasNamespace "http://www.vtt.fi/Simantics/Plant3D/1.0" : URI\r
+    HasVersion "1.0" : Version\r
+    HasResourceClass "org.simantics.processeditor.stubs.Plant3DResource" : String\r
+    HasStubsPackage "org.simantics.processeditor.stubs" : String\r
+\r
+Plant3DNamespace : Namespace\r
+    PartOf TypeSystemNamespaces\r
+    HasNamespace "http://www.vtt.fi/Simantics/Plant3D/1.0" : URI\r
+    HasNamespaceRoot Plant3DOntology\r
+    \r
+# Project\r
+Plant3DProjectType @ "Plant3DProjectType" <T ProjectType\r
+Plant3DProject @ "Plant3DProject" : Plant3DProjectType <T Project\r
+    PartOf ProjectTypes\r
+\r
+\r
+#****************************************************************************\r
+#\r
+#  PBS structure and components\r
+#\r
+#****************************************************************************\r
+\r
+P3DNode @ "P3DNode" <T G3DNode\r
+    HasDescription "Base node for all 3D plant objects. Used as an identifier." : String\r
+PBSNode <T Entity\r
+    HasDescription "Plant Breakdown Structure super type" : String\r
+    HasDescription "Example: Site > Plant > Area > Unit" : String\r
+    [HasParentStructure card "0..1"]\r
+    [HasChildStructure card "0..*"]\r
+HasChildStructure <R IsRelatedTo\r
+    InverseOf HasParentStructure\r
+    HasDomain [PBSNode]\r
+    HasRange [PBSNode]\r
+Plant <T P3DNode <T PBSNode\r
+    HasDescription "Root node of the scene-graph" : String\r
+    HasDescription "Contains Equipment and Pipe Runs (Scene-graph)" : String\r
+    HasDescription "Scene-graph structure IS NOT Plant Breakdown Structure (PBS)" : String\r
+HasGraphics <R IsWeaklyRelatedTo\r
+    HasDescription "link to geometric representation of component or equipment" : String\r
+    HasRange [G3DModel]\r
+LibraryComponent <T P3DNode <T PBSNode\r
+    HasDescription "Base type for librarised components and equipment" : String\r
+    [HasGraphics card "0..1"]\r
+Equipment <T LibraryComponent\r
+    [HasNozzle card "0..1"]\r
+    [HasNozzleDefinition card "0..*"]\r
+    [HasNozzleRestriction card "0..1"]\r
+# TODO : PipeRun should link to Spec and use its information\r
+PipeRun <T P3DNode\r
+    HasDescription "Non visible node" : String\r
+    HasDescription "Contains all pipeline components that contain same specification (size, ..)" : String\r
+    [HasPipeDiameter card "1"]\r
+    [HasTurnRadius card "1"]\r
+    [HasControlPoints card "0..*"]\r
+Nozzle <T LibraryComponent\r
+    [HasPipeDiameter card "1"]\r
+    [HasLength card "1"]\r
+    [HasControlPoint card "0..1"]  #0..1 prevents automatic instantion of control point\r
+PipelineComponent <T LibraryComponent\r
+    [HasPipeDiameter card "1"]\r
+    [HasControlPoint card "0..1"]\r
+SingleConnectedComponent <T PipelineComponent\r
+    HasDescription "A component that is connected to only one component" : String\r
+DualConnectedComponent <T PipelineComponent\r
+    HasDescription "A component that is connected to two components" : String\r
+MultiConnectedComponent <T PipelineComponent\r
+    HasDescription "A component that is connected to more than two components" : String\r
+InlineComponent <T PipelineComponent\r
+    HasDescription "Component that connects to two or more components, and maintains direction of (main) " : String\r
+    HasDescription "pipe run. Centerline of main pipeline may have offset: with offset there is two control " : String\r
+    HasDescription "points for main pipeline, and without offset, there is only one control point for main " : String\r
+    HasDescription "pipeline. The component may also join two pipe runs together: then there is always one " : String\r
+    HasDescription "control point for one pipe run." : String\r
+    [HasLength card "1"]\r
+EndComponent <T PipelineComponent\r
+    HasDescription "Component that ends the pipe run" : String\r
+    HasDescription "Component may contain other control points" : String\r
+TurnComponent <T PipelineComponent\r
+    HasDescription "Component that changes direction of the pipeline" : String\r
+    HasDescription "Component that connects to two or more components, and specifies connectivity of main " : String\r
+    HasDescription "pipe run. Is base type for elbows, pipe bends, etc., but also for components that won't " : String\r
+    HasDescription "maintain main pipeline direction (inline component). CHECK!!!" : String\r
+    [HasTurnAngle card "1"]\r
+FixedLengthInlineComponent <T InlineComponent\r
+    HasDescription "Inline component that has fixed length" : String\r
+    [HasRotationAngle card "1"]\r
+VariableLengthInlineComponent <T InlineComponent\r
+    HasDescription "Inline component whose length can be changed" : String\r
+FixedAngleTurnComponent <T TurnComponent\r
+    HasDescription "Turn Component that has specific turning angle that cannot be changed" : String\r
+    [HasRotationAngle card "1"]\r
+VariableAngleTurnComponent <T TurnComponent\r
+    HasDescription "Turn Component whose turning angle can be modified" : String\r
+    HasDescription "Contains always one control point (there are no contradictory cases / how to calculate?)" : String\r
+    [HasTurnRadius card "1"]\r
+SizeChangeComponent <T FixedLengthInlineComponent\r
+    HasDescription "Component that changes pipe run along main pipeline. (Spec change)" : String\r
+OffsetComponent <T FixedLengthInlineComponent\r
+    HasDescription "Component that offsets the center of piperun." : String  \r
+CodedComponent <T PipelineComponent\r
+    HasDescription "Currently used with non-customizable / hard-coded components" : String\r
+NonVisibleComponent <T PipelineComponent\r
+    HasDescription "(Pseudo) Component that cannot bee seen." : String\r
+\r
+#****************************************************************************\r
+#\r
+#  Pipe Control Points\r
+#\r
+#****************************************************************************\r
+\r
+# control point base type\r
+PipeControlPoint <T Entity\r
+    HasDescription "Base type" : String\r
+    [HasLocalPosition card "1"]\r
+    [HasWorldPosition card "1"]\r
+    [HasLocalOrientation card "1"]\r
+    [HasWorldOrientation card "1"]\r
+    [HasNext card "0..1"]\r
+    [HasPrevious card "0..1"]\r
+    [HasNext card "0..1"]\r
+    [HasSubPoint card "0..*"]\r
+    [SubPointOf card "0..1"]\r
+    [HasPipeDiameter card "1"]\r
+    [ControlPointOf card "0..1"]\r
+    [ControlPointOfPipeRun card "0..1"]\r
+\r
+# divide to path leg ends and inline\r
+PathLegEndControlPoint <T PipeControlPoint\r
+    HasDescription "A control point that ends path leg." : String\r
+InlineControlPoint <T PipeControlPoint\r
+    [HasLength card "1"]\r
+\r
+# turns\r
+TurnControlPoint <T PathLegEndControlPoint\r
+    [HasTurnAngle card "1"]\r
+    [HasLength card "1"]                               # TODO : should this be length or something else?\r
+   \r
+FixedAngleTurnControlPoint <T TurnControlPoint         #is this unnecessary ( Fixed angle could be created with EndComponent + Directed as a subpoint)?   \r
+    HasDescription "While variable angle turn control point is positioned by path legs, user is responsible for rotating fixed angle turn components." : String\r
+    [HasRotationAngle card "1"]\r
+    [IsReversed card "1"]\r
+VariableAngleTurnControlPoint <T TurnControlPoint\r
+    [HasTurnRadius card "1"]\r
+    [HasTurnAxis card "1"]                             # this was for update purposes\r
+# inline\r
+VariableLengthControlPoint <T InlineControlPoint\r
+FixedLengthControlPoint <T InlineControlPoint\r
+   [HasRotationAngle card "1"]\r
+\r
+RunEndControlPoint <T PathLegEndControlPoint\r
+    HasDescription "Control Point that ends a PipeRun." : String\r
+    HasDescription "Only Next or Previous ControlPoint must be set, and other must be end" : String\r
+\r
+# directed and undirected\r
+\r
+DirectedControlPoint <T RunEndControlPoint\r
+    [HasLocalOrientation card "1"]\r
+    [HasWorldOrientation card "1"]\r
+#    [HasDirection card "1"]\r
+UndirectedControlPoint <T RunEndControlPoint\r
+\r
+EndComponentControlPoint <T UndirectedControlPoint\r
+    [HasRotationAngle card "1"]\r
+    \r
+# for N-Port components (N > 3), defines position and direction of control point relative to main control point \r
+NPortControlPoint <T DirectedControlPoint\r
+#    [HasRelativePosition card "1"]\r
+#    [HasRelativeDirection card "1"] \r
+\r
+# Size change & Offset\r
+# TODO: could we allow variable length components that offset piperun ? (currently only component that is variable length is straight pipe, so for now: no) \r
+# note: SizeChange actually ends a piperun, but allows path leg to continue\r
+DualInlineControlPoint <T FixedLengthControlPoint\r
+    HasDescription "FixedLengthInlineControlPoint that has subcontrolpoint in the same PipeRun/Pathleg." : String\r
+    HasDescription "The previous controlpoint is connected (next) to this point and the next point is connected (previous) to subpoint, while this point and the subpoint are connected both the previous and the next point." : String\r
+SizeChangeControlPoint <T DualInlineControlPoint\r
+    HasDescription "Changes PipeRun within the path leg." : String\r
+    HasDescription "This CP belongs to the PipeRun that is the previous side and subpoint belongs to the PipeRun that is on the next side." : String \r
+OffsettingPoint <T DualInlineControlPoint\r
+    [HasOffset card "1"]\r
+    HasDescription "Offsets the center of the pipe." : String                 \r
+DualSubControlPoint <T FixedLengthControlPoint\r
+    HasDescription "DualInlineControlPoint's subpoint." : String\r
+\r
+# nozzle must have its own control point so that we know to link pipe diameters of the nozzle and the piperun\r
+NozzleControlPoint <T DirectedControlPoint\r
+\r
+# TODO : is it necessary to model inline control point that has no length?\r
+BranchEndControlPoint <T UndirectedControlPoint\r
+BranchControlPoint <T FixedLengthControlPoint\r
+\r
+# TODO : we also need a way to specify if control point can be moved from its current place or not (this may be dynamic)\r
+      \r
+\r
+# relation and property definitions\r
+\r
+HasControlPoint <R IsRelatedTo\r
+    InverseOf ControlPointOf\r
+    HasDomain [(PipelineComponent or Nozzle)]\r
+    HasRange [PipeControlPoint]\r
+    HasDescription "Relation between PipelineComponent and ControlPoint" : String\r
+HasControlPoints <R IsRelatedTo\r
+    InverseOf ControlPointOfPipeRun\r
+    HasDomain [PipeRun]\r
+    HasRange [PipeControlPoint]\r
+    HasDescription "Relation between PipeRun and ControlPoint" : String\r
+    HasDescription "This is needed because a PipeLineComponent may contain multiple ControlPoints that belong to different PipeRuns." : String\r
+HasNext <R IsWeaklyRelatedTo\r
+    HasDomain [PipeControlPoint]\r
+    HasRange [PipeControlPoint]\r
+    HasDescription "Next point in the piperun" : String\r
+HasPrevious <R IsWeaklyRelatedTo\r
+    HasDomain [PipeControlPoint]\r
+    HasRange [PipeControlPoint]\r
+    HasDescription "Previous point in the piperun" : String\r
+HasSubPoint @ "Has SubPoint" <R IsRelatedTo\r
+    InverseOf SubPointOf\r
+    HasDomain [PipeControlPoint]\r
+    HasRange [PipeControlPoint]\r
+    HasDescription "Subcontrolpoint's position is defined by its parent control point. Local Position of subpoint is its position relative to its parent point similar to child/parent relationship in scene-graph." : String \r
+\r
+HasPipeDiameter <R HasNonTransformation\r
+    HasRange [Double]\r
+HasLength <R HasNonTransformation\r
+    HasRange [Double]\r
+HasTurnAngle <R HasNonTransformation\r
+    HasRange [Double]\r
+HasRotationAngle <R HasTransformation\r
+    HasRange [Double]\r
+HasOffset <R HasProperty\r
+    HasRange [Double]\r
+#HasRelativePosition <R HasProperty\r
+#    HasRange [Position]\r
+#HasRelativeDirection <R HasProperty\r
+#    HasRange [Tuple3]\r
+#HasDirection <R HasProperty\r
+#    HasRange [Tuple3]  \r
+HasTurnRadius <R HasNonTransformation\r
+    HasRange [Double]   \r
+IsReversed <R HasProperty\r
+    HasRange [Boolean]\r
+HasTurnAxis <R HasTransformation\r
+    HasRange [Tuple3]\r
+    \r
+HasNozzleDefinition <R HasProperty\r
+    HasDomain [Equipment]\r
+    HasRange [Nozzle]\r
+    HasDescription "This relation is used to connect nozzles to equipment in the template. For instantiated equipment nozzles must be connected with HasNozzle relation." : String  \r
+HasNozzle <R HasChild\r
+    InverseOf NozzleOf\r
+    HasDomain [Equipment]\r
+    HasRange [Nozzle]\r
+    HasDescription "Used to connect nozzles to equipment." : String\r
+HasNozzleRestriction <R HasMultiplicity\r
+    HasDescription "Used in template equipment to restrict amount of nozzles." : String\r
+    HasDescription "If template has as many nozzleDefinitions that maximum count in this restriction, user cannot add new nozzles to the equipment instance." : String\r
+\r
+\r
+\r
+#****************************************************************************\r
+#\r
+#  Predefined equipment and components\r
+#\r
+#****************************************************************************    \r
+    \r
+    \r
+Reducer <T CodedComponent <T SizeChangeComponent <T FixedLengthInlineComponent <T DualConnectedComponent\r
+#ConcentricReducer <T Reducer\r
+#ConcentricReducerImpl : ConcentricReducer\r
+ConcentricReducer <T Reducer : Reducer\r
+  PartOf Plant3DOntology\r
+  HasRotationAngle "0.0" : Double\r
+  HasControlPoint \r
+    _ : SizeChangeControlPoint\r
+      HasWorldPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasWorldOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+      HasLocalPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasLocalOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+      HasSubPoint\r
+        _ : DualSubControlPoint\r
+          HasWorldPosition\r
+            _ : Position\r
+              HasX "0.0" : Double\r
+              HasY "0.0" : Double\r
+              HasZ "0.0" : Double\r
+          HasWorldOrientation\r
+            _ : Orientation\r
+              HasX "0.0" : Double\r
+              HasY "1.0" : Double\r
+              HasZ "0.0" : Double\r
+              HasAngle "0.0" : Double\r
+          HasLocalPosition\r
+            _ : Position\r
+              HasX "0.0" : Double\r
+              HasY "0.0" : Double\r
+              HasZ "0.0" : Double\r
+          HasLocalOrientation\r
+            _ : Orientation\r
+              HasX "0.0" : Double\r
+              HasY "1.0" : Double\r
+              HasZ "0.0" : Double\r
+              HasAngle "0.0" : Double \r
+#EccentricReducer <T Reducer <T OffsetComponent\r
+#EccentricReducerImpl : EccentricReducer\r
+EccentricReducer <T Reducer <T OffsetComponent : Reducer : OffsetComponent\r
+  PartOf Plant3DOntology\r
+  HasRotationAngle "0.0" : Double\r
+  HasControlPoint \r
+    _ : SizeChangeControlPoint : OffsettingPoint\r
+      HasOffset "1.0" : Double #TODO : define an equation that can calculate the offset form pipediameters. This requires relative  \r
+      HasWorldPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasWorldOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+      HasLocalPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasLocalOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+      HasSubPoint\r
+        _ : DualSubControlPoint\r
+          HasWorldPosition\r
+            _ : Position\r
+              HasX "0.0" : Double\r
+              HasY "0.0" : Double\r
+              HasZ "0.0" : Double\r
+          HasWorldOrientation\r
+            _ : Orientation\r
+              HasX "0.0" : Double\r
+              HasY "1.0" : Double\r
+              HasZ "0.0" : Double\r
+              HasAngle "0.0" : Double\r
+          HasLocalPosition\r
+            _ : Position\r
+              HasX "0.0" : Double\r
+              HasY "0.0" : Double\r
+              HasZ "0.0" : Double\r
+          HasLocalOrientation\r
+            _ : Orientation\r
+              HasX "0.0" : Double\r
+              HasY "1.0" : Double\r
+              HasZ "0.0" : Double\r
+              HasAngle "0.0" : Double\r
+#Elbow <T CodedComponent <T VariableAngleTurnComponent <T DualConnectedComponent\r
+#ElbowImpl : Elbow\r
+Elbow <T CodedComponent <T VariableAngleTurnComponent <T DualConnectedComponent : CodedComponent : VariableAngleTurnComponent : DualConnectedComponent\r
+  PartOf Plant3DOntology\r
+  HasLength "0.0" : Double\r
+  HasTurnRadius "0.0" : Double\r
+  HasTurnAngle "0.0" : Double\r
+  HasControlPoint \r
+    _ : VariableAngleTurnControlPoint\r
+      HasWorldPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasWorldOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+      HasLocalPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasLocalOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double    \r
+#Straight <T CodedComponent <T DualConnectedComponent <T VariableLengthInlineComponent\r
+#StraightImpl : Straight\r
+Straight <T CodedComponent <T DualConnectedComponent <T VariableLengthInlineComponent : CodedComponent : DualConnectedComponent : VariableLengthInlineComponent\r
+  PartOf Plant3DOntology\r
+  HasLength "0.0" : Double\r
+  HasControlPoint \r
+    _ : VariableLengthControlPoint\r
+      HasWorldPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasWorldOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+      HasLocalPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasLocalOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double \r
+          \r
+BranchSplitComponent <T FixedLengthInlineComponent <T NonVisibleComponent : FixedLengthInlineComponent : NonVisibleComponent          \r
+  PartOf Plant3DOntology\r
+  HasLength "0.0" : Double          \r
+  HasControlPoint\r
+    _ : BranchControlPoint\r
+      HasWorldPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasWorldOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+      HasLocalPosition\r
+        _ : Position\r
+          HasX "0.0" : Double\r
+          HasY "0.0" : Double\r
+          HasZ "0.0" : Double\r
+      HasLocalOrientation\r
+        _ : Orientation\r
+          HasX "0.0" : Double\r
+          HasY "1.0" : Double\r
+          HasZ "0.0" : Double\r
+          HasAngle "0.0" : Double\r
+          \r
+#Tee <T FixedLengthInlineComponent <T MultiConnectedComponent\r
+#BendPipe <T PipeComponent <T VariableAngleTurnComponent <T DualConnectedComponent\r
+#Cap <T EndComponent\r
+#BlindFlange <T EndComponent\r
+#TwoWayBallValve <T FixedLengthInlineComponent <T DualConnectedComponent\r
+#ThreeWayTTypeBallValve <T FixedLengthInlineComponent <T MultiConnectedComponent\r
+#    HasName "Three Way T Type Ball Valve" : String\r
+#ThreeWayYType120DegreeBallValve <T EndComponent <T MultiConnectedComponent\r
+#    HasName "Three Way Y Type 120 Degree Ball Valve" : String\r
+Vessel <T Equipment\r
+VerticalVessel <T Vessel\r
+    [HasHeight card "1"]\r
+HorizontalVessel <T Vessel\r
+    [HasLength card "1"]\r
+\r
+HasHeight <R HasNonTransformation\r
+    HasRange [Double]\r
+HasLength <R HasNonTransformation\r
+    HasRange [Double]\r
+\r
+#****************************************************************************\r
+#\r
+#  Specs \r
+#\r
+#****************************************************************************\r
+\r
diff --git a/3d_ontologies/plant3d_product.graph b/3d_ontologies/plant3d_product.graph
new file mode 100644 (file)
index 0000000..e6bd898
--- /dev/null
@@ -0,0 +1,5 @@
+%import "foundation.graph"\r
+\r
+%import "csg.graph"\r
+%import "equation.graph"\r
+%import "plant3d.graph"
\ No newline at end of file
index 01fca3909e6e6f6a15c702ae38e884d2986a0839..371abc4475a96b71efee75b8ca2cb37c4a1e5092 100644 (file)
@@ -79,7 +79,7 @@
          unpack="false"/>\r
 \r
    <plugin\r
-         id="fi.vtt.simantics.processeditor"\r
+         id="org.simantics.processeditor"\r
          download-size="0"\r
          install-size="0"\r
          version="0.0.0"\r
index cbca82340d83e9b1ea05c3d5ca7d9db8aca3e3b2..357e5b86dbe98184fc0b08e109fba14d4a049204 100644 (file)
@@ -8,10 +8,10 @@ Bundle-Vendor: VTT
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
  org.simantics.proconf.g3d,
- org.simantics.g2d.stubs,
  org.simantics.db,
  org.simantics.layer0.utils,
  org.simantics.layer0.stubs,
- org.simantics.utils.datastructures
+ org.simantics.utils.datastructures,
+ org.simantics.animation
 ipse-LazyStart: true
 Export-Package: org.simantics.proconf.g3d.csg.stubs
index 9a0c12619186510aa3e76bb8e7379aaa45971bac..aad029c8f30d488c5e6045622810a522552b124c 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index a4f7cd42401e72f83aacffec48e7b4180dfee6ee..7e067e2370c6717f06e850aa09e6799984b5e342 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 1023fb668543e048ef684a20b8ffb07f8720b179..f5579e6916b48b9b3c310d6f51946f4cea1ba2bd 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index cf3732d857013695c188b1d3f0a7fc72aebe75cb..dcd31970f8797b3112efae440f73b2107fdaff2c 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index ca5af06ada670af3202a0b676b902b36f7a5beb2..8ced1052b08a4de784fe651ed3d91779d78cf907 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -49,7 +49,7 @@ import org.simantics.layer0.utils.IEntity;
 import org.simantics.proconf.g3d.base.G3DTools;\r
 import org.simantics.proconf.g3d.base.GeometryProvider;\r
 import org.simantics.proconf.g3d.occ.OccResources;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 import com.jme.eclipse.test.ply.PLY_Loader;\r
 import com.jme.scene.Geometry;\r
index e08c9b739e55becfc5e16b04a3e64aaad5b64633..194b68b2f09ec4335e9662e3c1d98c9203823d13 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 332d852c758602c4929adf00347db130e85808d5..78767ca9e0c9e3af28f73e25ade5856d312ff6fe 100644 (file)
@@ -15,7 +15,6 @@ Require-Bundle: org.eclipse.ui,
  org.simantics.image.stubs,
  org.simantics.layer0.stubs,
  org.simantics.layer0.utils,
- org.simantics.g2d.stubs,
  org.simantics.utils,
  org.simantics.proconf.g3d.occ,
  org.simantics.proconf.ui,
index e256c2940e8a0a587fa3a7cd7adfa2078eb3f754..95b3c23dccf79dbfe5deeda1cd1ec830f2487d96 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 1548881cc4d64aaf3534796debe5f0a627870db0..ac799b5f6d778ff824cd42d5de589f836d336f11 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -14,7 +14,7 @@ import org.simantics.proconf.g3d.csg.stubs.CSGResource;
 import org.simantics.db.Builtins;\r
 import org.simantics.db.Graph;\r
 import org.simantics.equation.stubs.EquationResource;\r
-import org.simantics.g2d.stubs.anim.AnimationResource;\r
+import org.simantics.animation.stubs.AnimationResource;\r
 import org.simantics.animation.curve.CurveBuilder;\r
 import org.simantics.animation.curve.CurveBuilderImpl;\r
 import org.simantics.proconf.g3d.stubs.G3DResource;\r
index eca9989616f6b986cd9b14399e6319fa26223c98..152bcf965a3bbb3894a4a2c9f08d058ab69f1840 100644 (file)
@@ -1,3 +1,13 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.proconf.g3d.shapeeditor.actions;\r
 \r
 import java.io.File;\r
@@ -21,7 +31,7 @@ import org.simantics.layer0.utils.serialization.ConnectionPointMap;
 import org.simantics.layer0.utils.serialization.TransferableGraph;\r
 import org.simantics.layer0.utils.serialization.TransferableGraphUtils;\r
 import org.simantics.proconf.g3d.shapeeditor.views.ShapeEditorBase;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 \r
 public class ExportAction extends Action{\r
index 7a4d063ab5b1f8a148489122b084fb0282a57c5c..28bdc023df373ccc44fa41b7f2bce073c1468e26 100644 (file)
@@ -1,3 +1,13 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.proconf.g3d.shapeeditor.actions;\r
 \r
 import java.io.BufferedInputStream;\r
@@ -17,7 +27,7 @@ import org.simantics.layer0.utils.serialization.ConnectionPointList;
 import org.simantics.layer0.utils.serialization.TransferableGraph;\r
 import org.simantics.layer0.utils.serialization.TransferableGraphUtils;\r
 import org.simantics.proconf.g3d.shapeeditor.views.ShapeEditorBase;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 public class ImportAction extends Action {\r
        \r
index 193fe45aecfc44e2e32f9d9e42c352ea05151dca..c0c6440e4717fc8e5534c72a7ed54b4826dc0363 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 2b7d49ec83953614d0532f5a9910fba2dd54a09f..168f9a53cbbed48cf53d273d1a990d64b4fa2d54 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 68737366ec101cd8034319091ccafde501f9f86f..fbae87e4703f54ca77b246905ce7c9109ecec38a 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 09a5addb1225979c42bf0e031a7b4d5be6c5ccc3..17047090a3aadde2fbd052a186b91930085dde41 100644 (file)
@@ -1,3 +1,13 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.proconf.g3d.shapeeditor.dialogs;\r
 \r
 import java.util.List;\r
index 5c0835d5cd37cae92a10632d1a87764ffdee5da6..409499c9dc345ff944bffd4f97148f09530c0322 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index a220f784f781b8cd3ca1bb2f2ca6948409b93fe2..7d12b5b5d9419fee2fb798be7052753d0c9e31a6 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index be79363411ab13d52715670fd9a59233778ec99d..f26f857f5c2cbf547d7aec6af6a9a539b03a861b 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 41f07ade59fd3a388a21cf15eba7e3514a43180e..2191a6b328da3b2d345032c5c3083e5337270139 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index f861179e1d2f5cea2851a4e6820350c8503d6f94..62713e2ab9e530fd9d0f95324717913410509fde 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index f6c6a58ce3baa2370c66ee824ce58ca894a41fb7..215573474727f3ea9d9e09531af9ec0167cd5237 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 1bf8fe70929a1354db7c8104dfd57b550b6d7d24..7ff93957ab119b1d5e084a8b1d200077afb2b9b4 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index c3f7f6170c3c8e1dba879e43df2c7784eb97fe73..1b413c0a8de25bd544b1b88bddbb09b03addc79c 100644 (file)
@@ -1,3 +1,13 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.proconf.g3d.shapeeditor.tools;\r
 \r
 import java.util.ArrayList;\r
@@ -38,10 +48,10 @@ import org.simantics.db.GraphRequestAdapter;
 import org.simantics.db.GraphRequestStatus;\r
 import org.simantics.db.GraphRequestWithResult;\r
 import org.simantics.db.Resource;\r
-import org.simantics.g2d.stubs.anim.Animation;\r
-import org.simantics.g2d.stubs.anim.Interpolator;\r
-import org.simantics.g2d.stubs.anim.ScalarInterpolator;\r
-import org.simantics.g2d.stubs.anim.SlerpInterpolator;\r
+import org.simantics.animation.stubs.Animation;\r
+import org.simantics.animation.stubs.Interpolator;\r
+import org.simantics.animation.stubs.ScalarInterpolator;\r
+import org.simantics.animation.stubs.SlerpInterpolator;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
 import org.simantics.layer0.utils.Property;\r
@@ -63,7 +73,7 @@ import org.simantics.proconf.g3d.shapeeditor.dialogs.PropertySelectionDialog;
 import org.simantics.proconf.g3d.shapeeditor.views.ShapeEditorBase;\r
 import org.simantics.proconf.g3d.stubs.G3DModel;\r
 import org.simantics.proconf.g3d.stubs.Orientation;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 public class AnimationContribution implements EditorContribution {\r
        List<ContextAction> actions = new ArrayList<ContextAction>();\r
@@ -599,7 +609,7 @@ public class AnimationContribution implements EditorContribution {
                        }\r
                        Animation animation = getAnimation(graph);\r
                        Collection<Interpolator> interpolators = animation.getInterpolator();\r
-                       for (org.simantics.g2d.stubs.anim.Interpolator interpolator : interpolators) {\r
+                       for (org.simantics.animation.stubs.Interpolator interpolator : interpolators) {\r
                        IEntity target = interpolator.getTarget();\r
                        // check all model properties\r
                        G3DModel model = parent.getModel(graph);\r
index dd80c96b3264090759f55f713462b3430705d759..b4b46215ba9cfb1a83cd20892c68d91858cccdff 100644 (file)
@@ -1,3 +1,13 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.proconf.g3d.shapeeditor.tools;\r
 \r
 import java.util.ArrayList;\r
@@ -58,7 +68,7 @@ import org.simantics.proconf.g3d.shapeeditor.ShapeEditorResources;
 import org.simantics.proconf.g3d.shapeeditor.views.ShapeEditorBase;\r
 import org.simantics.proconf.g3d.stubs.G3DNode;\r
 import org.simantics.proconf.g3d.stubs.Shape;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 public class CSGModellingContribution implements EditorContribution {\r
        \r
index 3f1fefadee5c294404daeee3bbdaa42a506e9256..3ac5801002028753c702551ed74900f913553075 100644 (file)
@@ -1,3 +1,13 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.proconf.g3d.shapeeditor.tools;\r
 \r
 import java.util.ArrayList;\r
@@ -36,8 +46,8 @@ import org.simantics.db.GraphRequestAdapter;
 import org.simantics.db.GraphRequestStatus;\r
 import org.simantics.db.Resource;\r
 import org.simantics.equation.stubs.SecondOrderScalarPolynomial;\r
-import org.simantics.g2d.stubs.anim.Animation;\r
-import org.simantics.g2d.stubs.anim.Interpolator;\r
+import org.simantics.animation.stubs.Animation;\r
+import org.simantics.animation.stubs.Interpolator;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
 import org.simantics.layer0.utils.ResourceDebugUtils;\r
index f2b8c84b22161c204eba2e0a93b40d688c6ac6a6..513712bf4f7dba73185c99d14a3f50df524b832d 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 07dc17cd955630db309fddcb511f1aeebada0427..f758618574a78cad8dc5fcd6e480024d72bc5609 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -34,8 +34,8 @@ import org.simantics.db.GraphRequestAdapter;
 import org.simantics.db.GraphRequestStatus;\r
 import org.simantics.db.Resource;\r
 import org.simantics.equation.stubs.SecondOrderScalarPolynomial;\r
-import org.simantics.g2d.stubs.anim.Animation;\r
-import org.simantics.g2d.stubs.anim.Interpolator;\r
+import org.simantics.animation.stubs.Animation;\r
+import org.simantics.animation.stubs.Interpolator;\r
 import org.simantics.layer0.utils.ResourceDebugUtils;\r
 import org.simantics.layer0.utils.IEntity;\r
 import org.simantics.layer0.utils.EntityFactory;\r
index 9c1490d7b553314f9a67df587b258fe89a2b20b3..47631ee40ff38fe7c90f7b9b7c2098a74fe5fbff 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -63,7 +63,7 @@ import org.simantics.proconf.g3d.shapes.GridShape;
 import org.simantics.proconf.g3d.stubs.G3DModel;\r
 import org.simantics.proconf.g3d.stubs.G3DNode;\r
 import org.simantics.proconf.g3d.stubs.Shape;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 import org.simantics.utils.ui.jface.MenuTools;\r
 \r
 public class ShapeEditorBase extends ThreeDimensionalEditorBase {\r
@@ -478,13 +478,6 @@ public class ShapeEditorBase extends ThreeDimensionalEditorBase {
                                \r
                        }\r
                }\r
-\r
-               public StructuredResourceSelection filterSelection(ISelection selection) {\r
-                       if (!(selection instanceof StructuredResourceSelection))\r
-                               return new StructuredResourceSelection();\r
-                       return (StructuredResourceSelection) selection;\r
-               }\r
-\r
        }\r
 \r
        /**\r
index 8fa7a37b818de53fb7f8b3a2e0e7415c31c2d965..1904bfebb43628947780e8f6a6e28a0bbc9e319a 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index c0ddb2aff7c19cd0c16c3a25a10a32c21bcc2f1c..2c5427b2264215d90f3f54e4cd4f36433785ffdc 100644 (file)
@@ -1,3 +1,13 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.proconf.g3d.shapeeditor.views;\r
 \r
 import org.simantics.db.Resource;\r
index f747d49c6a3b79a29a4878400db61b46c81536cd..6031b693eecea1f4528e6c0249e1ede55b8b6421 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index ae81bc874ef884dc2706a68ab4a1663216fb705d..08657a9c7aace2690723ec9d8761f139e37cad57 100644 (file)
@@ -7,7 +7,6 @@ Bundle-Activator: org.simantics.proconf.g3d.Activator
 Bundle-Vendor: VTT
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
- org.simantics.g2d.stubs,
  javax.vecmath,
  com.jme.eclipse,
  org.simantics.proconf.image,
index fc55861e501eb7572035af2e1bd8fbbbf40936fe..034ac76faf0fc29598918b00f4583662ddf57403 100644 (file)
@@ -2,6 +2,7 @@
 <?eclipse version="3.2"?>\r
 <plugin>\r
    <extension-point id="geometry" name="Geometry" schema="schema/geometry.exsd"/>\r
+   <extension-point id="appearance" name="Appearance" schema="schema/appearance.exsd"/>\r
    <extension\r
          point="org.eclipse.ui.preferencePages">\r
       <page\r
             type="org.eclipse.jface.viewers.IStructuredSelection">\r
       </propertyTester>\r
    </extension>\r
+   <extension\r
+         point="org.simantics.proconf.g3d.appearance">\r
+      <Appearance\r
+            class="org.simantics.proconf.g3d.base.DefaultAppearanceProvider"\r
+            id="org.simantics.proconf.g3d.Appearance1">\r
+      </Appearance>\r
+   </extension>\r
 </plugin>\r
diff --git a/org.simantics.proconf.g3d/schema/appearance.exsd b/org.simantics.proconf.g3d/schema/appearance.exsd
new file mode 100644 (file)
index 0000000..f5cd6a0
--- /dev/null
@@ -0,0 +1,109 @@
+<?xml version='1.0' encoding='UTF-8'?>\r
+<!-- Schema file written by PDE -->\r
+<schema targetNamespace="org.simantics.proconf.g3d" xmlns="http://www.w3.org/2001/XMLSchema">\r
+<annotation>\r
+      <appinfo>\r
+         <meta.schema plugin="org.simantics.proconf.g3d" id="appearance" name="appearance"/>\r
+      </appinfo>\r
+      <documentation>\r
+         [Enter description of this extension point.]\r
+      </documentation>\r
+   </annotation>\r
+\r
+   <element name="extension">\r
+      <annotation>\r
+         <appinfo>\r
+            <meta.element />\r
+         </appinfo>\r
+      </annotation>\r
+      <complexType>\r
+         <sequence>\r
+            <element ref="Appearance" minOccurs="0" maxOccurs="unbounded"/>\r
+         </sequence>\r
+         <attribute name="point" type="string" use="required">\r
+            <annotation>\r
+               <documentation>\r
+                  \r
+               </documentation>\r
+            </annotation>\r
+         </attribute>\r
+         <attribute name="id" type="string">\r
+            <annotation>\r
+               <documentation>\r
+                  \r
+               </documentation>\r
+            </annotation>\r
+         </attribute>\r
+         <attribute name="name" type="string">\r
+            <annotation>\r
+               <documentation>\r
+                  \r
+               </documentation>\r
+               <appinfo>\r
+                  <meta.attribute translatable="true"/>\r
+               </appinfo>\r
+            </annotation>\r
+         </attribute>\r
+      </complexType>\r
+   </element>\r
+\r
+   <element name="Appearance">\r
+      <complexType>\r
+         <attribute name="id" type="string" use="required">\r
+            <annotation>\r
+               <documentation>\r
+                  \r
+               </documentation>\r
+            </annotation>\r
+         </attribute>\r
+         <attribute name="class" type="string" use="required">\r
+            <annotation>\r
+               <documentation>\r
+                  \r
+               </documentation>\r
+               <appinfo>\r
+                  <meta.attribute kind="java" basedOn=":org.simantics.proconf.g3d.base.AppearanceProvider"/>\r
+               </appinfo>\r
+            </annotation>\r
+         </attribute>\r
+      </complexType>\r
+   </element>\r
+\r
+   <annotation>\r
+      <appinfo>\r
+         <meta.section type="since"/>\r
+      </appinfo>\r
+      <documentation>\r
+         [Enter the first release in which this extension point appears.]\r
+      </documentation>\r
+   </annotation>\r
+\r
+   <annotation>\r
+      <appinfo>\r
+         <meta.section type="examples"/>\r
+      </appinfo>\r
+      <documentation>\r
+         [Enter extension point usage example here.]\r
+      </documentation>\r
+   </annotation>\r
+\r
+   <annotation>\r
+      <appinfo>\r
+         <meta.section type="apiinfo"/>\r
+      </appinfo>\r
+      <documentation>\r
+         [Enter API information here.]\r
+      </documentation>\r
+   </annotation>\r
+\r
+   <annotation>\r
+      <appinfo>\r
+         <meta.section type="implementation"/>\r
+      </appinfo>\r
+      <documentation>\r
+         [Enter information about supplied implementation of this extension point.]\r
+      </documentation>\r
+   </annotation>\r
+\r
+\r
+</schema>\r
index f6af1286d722a07b13753508372382185b87bffb..2447088b58b03ddec8666931d7da25a7d4648d79 100644 (file)
@@ -1,16 +1,21 @@
 <?xml version='1.0' encoding='UTF-8'?>\r
 <!-- Schema file written by PDE -->\r
-<schema targetNamespace="org.simantics.proconf.g3d">\r
+<schema targetNamespace="org.simantics.proconf.g3d" xmlns="http://www.w3.org/2001/XMLSchema">\r
 <annotation>\r
-      <appInfo>\r
+      <appinfo>\r
          <meta.schema plugin="org.simantics.proconf.g3d" id="geometry" name="Geometry"/>\r
-      </appInfo>\r
+      </appinfo>\r
       <documentation>\r
          [Enter description of this extension point.]\r
       </documentation>\r
    </annotation>\r
 \r
    <element name="extension">\r
+      <annotation>\r
+         <appinfo>\r
+            <meta.element />\r
+         </appinfo>\r
+      </annotation>\r
       <complexType>\r
          <sequence>\r
             <element ref="Geometry" minOccurs="0" maxOccurs="unbounded"/>\r
@@ -34,9 +39,9 @@
                <documentation>\r
                   \r
                </documentation>\r
-               <appInfo>\r
+               <appinfo>\r
                   <meta.attribute translatable="true"/>\r
-               </appInfo>\r
+               </appinfo>\r
             </annotation>\r
          </attribute>\r
       </complexType>\r
                <documentation>\r
                   \r
                </documentation>\r
-               <appInfo>\r
-                  <meta.attribute kind="java" basedOn=":fi.vtt.simantics.g3d.base.GeometryProvider"/>\r
-               </appInfo>\r
+               <appinfo>\r
+                  <meta.attribute kind="java" basedOn=":org.simantics.proconf.g3d.base.GeometryProvider"/>\r
+               </appinfo>\r
             </annotation>\r
          </attribute>\r
       </complexType>\r
    </element>\r
 \r
    <annotation>\r
-      <appInfo>\r
+      <appinfo>\r
          <meta.section type="since"/>\r
-      </appInfo>\r
+      </appinfo>\r
       <documentation>\r
          [Enter the first release in which this extension point appears.]\r
       </documentation>\r
    </annotation>\r
 \r
    <annotation>\r
-      <appInfo>\r
+      <appinfo>\r
          <meta.section type="examples"/>\r
-      </appInfo>\r
+      </appinfo>\r
       <documentation>\r
          [Enter extension point usage example here.]\r
       </documentation>\r
    </annotation>\r
 \r
    <annotation>\r
-      <appInfo>\r
+      <appinfo>\r
          <meta.section type="apiInfo"/>\r
-      </appInfo>\r
+      </appinfo>\r
       <documentation>\r
          [Enter API information here.]\r
       </documentation>\r
    </annotation>\r
 \r
    <annotation>\r
-      <appInfo>\r
+      <appinfo>\r
          <meta.section type="implementation"/>\r
-      </appInfo>\r
+      </appinfo>\r
       <documentation>\r
          [Enter information about supplied implementation of this extension point.]\r
       </documentation>\r
    </annotation>\r
 \r
-   <annotation>\r
-      <appInfo>\r
-         <meta.section type="copyright"/>\r
-      </appInfo>\r
-      <documentation>\r
-         \r
-      </documentation>\r
-   </annotation>\r
 \r
 </schema>\r
index 38b8b6ffc1c7a4daae842487ed05b1b6d0ff72b5..72b911f8e04e607384375886b64d539e3db21327 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index f0cacb41a13d193c3a2997e16249557bd1d14dfb..9f46444e68dcc7fb508b5c4bdd0799908f99c542 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -12,7 +12,7 @@ package org.simantics.proconf.g3d;
 \r
 import org.simantics.db.Graph;\r
 import org.simantics.equation.stubs.EquationResource;\r
-import org.simantics.g2d.stubs.anim.AnimationResource;\r
+import org.simantics.animation.stubs.AnimationResource;\r
 import org.simantics.animation.curve.CurveBuilder;\r
 import org.simantics.animation.curve.CurveBuilderImpl;\r
 import org.simantics.proconf.g3d.base.G3DTools;\r
index 2f6190464271d52f1511dc2c32697c67158e67d3..71d15c4fa2605bf16998cffabcd5dd3165d7d1cd 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 1cd0b595c47e49172a1c7cb79d95681d7dd9b1f2..678ce8d59886b9d5465802c8be71856e1ae5723c 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index c86858d851bfe8bda30ae9f45fb6d0e1494a4d20..21ec709d1ef662fdf996ca1d29a58571120b6fd9 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index ce6638aa9254d6ddcd574e65955c0eb4b30cf6d2..baf2b829d5c66cfdcd4ce5ade355a61a6deb00ee 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index bb8ffbcec470654ca4253b5e5127383a83e020d5..db1f95fe9e8c4d732fa18b50667edc64b40cb01d 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 7893f23043bde5003952d6f19db7ae7ddab9a7fa..3e5738583790e3831d3c83f85a4ee01fc524c390 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index a7974345e58872fd0c8a37d8b878faa857e8bbe6..7631c47bf4df65590f83b956ab8c6b1fd2312d99 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 36fcc4bfc6265b81b5a295d247f956f43d60be3e..7c4cdce87e30f01d274511df2a9520a6a63b2fb9 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 9bd972c6aafe908008c5714727e849068d31ca13..6101226818b165a8c0c195f3adc9250fdeff61f4 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index ac9bdfa40ecf3e8c8cf31c5c2ce2f151a56ee6c1..0c2dc5d4eca5067c3740dea3103c58e549d4b528 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index fe6fc71b81b6736b3410fcccc0e8cc89a8829a2f..2526ee23fb7b086b0f0ec176d547dc1f321d9c88 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index d4630a1caf088825c1bb64c69d921d871723b71e..a03f88ac76aeedb125a1cbb33dfba0a0d6693c98 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index c1a7236d244ed8f3c5d5a383abcd2cc6afce4b2e..7bbaed6a33358e958df1ff51256203ce55088dc0 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 58aa02a76fa20de66b2d069cf5f219ec1fca2e98..811fb1dfd5f8c3baa6d04a0151a875d09ce0c82e 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 1208b75cd32772b432c8f1bc2d1dbb879a54b4a7..3924ec603dd9a9aaf2f4de8dc9d35f87b2116101 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 5777f8e8428f551cb4b9857ab98afea84a49f86b..d510ed296f7a840d693373cef48f7505fd38f22b 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 435cb0dda5682dcb4da3d28ad84dba254ac4ab5f..d692afc51e010317d323671cf3f2219c28229c1c 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 9dd7f5eaf2a297ae8966a32ea1c9cf8ffc15e50e..a3d7347bfd5af2c4cebdffbc67bce809503a5737 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 809ec605942e73374669628a67e611978da3d469..246ae16e9c73bbf79d0f33997e26083013912503 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 8085405aef8c67597b5a80e2edfc24a9340e2203..c736bff4e334af65bceaeb2244f9860e5ae439b5 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index f45c3b4966434b7b57cccc246e7c3f5faf740110..a148fdd56c934c2b02c67f5f11fc6f89e43815ae 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 5a80e834def9a736f184c139ce66e5149afa472b..7b280777a4cae3225d17f70113faf9667793c054 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 5b6aeb603e3e1c32d9230f73153dff3f7af1ab11..b271d68dbfa8ed2c92838c1c1dbb7f86235f8295 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 5e273d1e46ea61349edc796ce1b815114de55265..5853e70290f25ab3a1f38d7ced091d62e42c960c 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 630434f6eaef2d8ea89e5fcf842a7fef0a873de2..8175ad5830d40c6b69b9caa05967a7c9007ad1b0 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index d359c341cf64917d59cc3ecd642ae839c2692185..baaa9e3b6bc3c89e9508cad3d25abf49a94a9718 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index afe759761ed9d1a24448b628a302732587e4acf8..677f56a108764012dd9b27ecd75b7f72adca4b01 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index c3562693bacd242c4b47a6badba4c184c8cd78b6..e3767a3d6b68b363fe93ef35befc433edefc6a38 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 33e565c9f99410ba6ee4637276acf5324dd39504..f6c1913f6ca54903d654edc46bf75a7fae90b477 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 063b0a62b42bcfef6389ec6434d03a57c44b3f67..38d4dc7103ac422907ec2192c3719cfd51d57548 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index ec40dea704ec790031a10195d728a5c419887054..a6ae770e60d8a35d8f7d98813fffcd41a0c676df 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index b433d22ce43c01033a1c0ca191f8cf89342bf29c..3571c2a0b8173add8f1ec74ccf7271ef9693ebb3 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
diff --git a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/AppearanceProvider.java b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/AppearanceProvider.java
new file mode 100644 (file)
index 0000000..dbb6c4a
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.proconf.g3d.base;\r
+\r
+import java.util.Collection;\r
+\r
+import org.simantics.layer0.utils.IEntity;\r
+\r
+import com.jme.renderer.Renderer;\r
+import com.jme.scene.state.RenderState;\r
+\r
+\r
+/**\r
+ * Interface for Appearance / Material\r
+ * \r
+ * \r
+ * @author Marko Luukkainen\r
+ *\r
+ */\r
+public interface AppearanceProvider {\r
+    \r
+       /**\r
+        * Used to check if GeometryProvider can generate mesh\r
+        * @param instance\r
+        * @return\r
+        */\r
+    public boolean canHandle(IEntity instance);\r
+       \r
+    /**\r
+     * Generates mesh\r
+     * @param instance\r
+     * @param transform\r
+     * @return\r
+     */\r
+    public Collection<RenderState> getAppearanceFromResource(IEntity instance, Renderer renderer);\r
+    \r
+\r
+}\r
diff --git a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/AppearanceProviderRegistry.java b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/AppearanceProviderRegistry.java
new file mode 100644 (file)
index 0000000..68815cb
--- /dev/null
@@ -0,0 +1,150 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.proconf.g3d.base;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Collection;\r
+import java.util.Collections;\r
+import java.util.HashMap;\r
+import java.util.List;\r
+import java.util.Map;\r
+\r
+import org.eclipse.core.runtime.CoreException;\r
+import org.eclipse.core.runtime.IConfigurationElement;\r
+import org.eclipse.core.runtime.IExtension;\r
+import org.eclipse.core.runtime.IExtensionPoint;\r
+import org.eclipse.core.runtime.Platform;\r
+import org.eclipse.core.runtime.dynamichelpers.ExtensionTracker;\r
+import org.eclipse.core.runtime.dynamichelpers.IExtensionChangeHandler;\r
+import org.eclipse.core.runtime.dynamichelpers.IExtensionTracker;\r
+import org.eclipse.core.runtime.dynamichelpers.IFilter;\r
+import org.simantics.db.Resource;\r
+import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.utils.ui.ErrorLogger;\r
+\r
+import com.jme.renderer.Renderer;\r
+import com.jme.scene.state.RenderState;\r
+\r
+public class AppearanceProviderRegistry implements IExtensionChangeHandler {\r
+    private static AppearanceProviderRegistry instance;\r
+    //public final static String ELEMENT_NAME = "Appearance";\r
+    public final static String NAMESPACE = "org.simantics.proconf.g3d";\r
+    public final static String EP_NAME = "appearance";\r
+    \r
+    private ExtensionTracker tracker;\r
+    \r
+    private List<AppearanceProviderExtension> extensions = new ArrayList<AppearanceProviderExtension>();\r
+    //private Map<Resource,AppearanceProvider> providers;\r
+    \r
+    private AppearanceProviderRegistry() {\r
+        //providers = new HashMap<Resource,AppearanceProvider>();\r
+        \r
+        tracker = new ExtensionTracker();\r
+               \r
+               IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint(NAMESPACE,EP_NAME);\r
+               loadExtensions(ep.getConfigurationElements());\r
+               \r
+               IFilter filter = ExtensionTracker.createExtensionPointFilter(ep);\r
+               tracker.registerHandler(this, filter);\r
+    }\r
+    \r
+    private void close() {\r
+               tracker.close();\r
+               tracker = null;\r
+               extensions = new ArrayList<AppearanceProviderExtension>();\r
+       }\r
+    \r
+    public static synchronized AppearanceProviderRegistry getInstance() {\r
+        if (instance==null) instance = new AppearanceProviderRegistry();\r
+        return instance;\r
+    }\r
+    \r
+    public static synchronized void dispose() {\r
+               if (instance != null) {\r
+                       instance.close();\r
+                       instance = null;\r
+               }       \r
+       }\r
+    \r
+    public synchronized List<AppearanceProviderExtension> getExtensions() {\r
+               return Collections.unmodifiableList(extensions);\r
+       }\r
+    \r
+    private synchronized void loadExtensions(IConfigurationElement[] elements) {\r
+               for (IConfigurationElement el : elements) {\r
+                       String id = el.getAttribute("id");\r
+                       try {\r
+                               Object o = el.createExecutableExtension("class");\r
+                               AppearanceProviderExtension ext = new AppearanceProviderExtension(id,(AppearanceProvider)o);\r
+                               tracker.registerObject(el.getDeclaringExtension(), ext, IExtensionTracker.REF_STRONG);\r
+                               extensions.add(ext);\r
+                       } catch (CoreException e) {\r
+                               ErrorLogger.defaultLogError("Cannot create java interface for GeometryProvider " + id, e);\r
+                       }\r
+               }\r
+       }\r
+    \r
+//    private Map<Resource,AppearanceProvider> getProviderMap() {\r
+//        return providers;\r
+//    }\r
+    \r
+    public static Collection<RenderState> getAppearance(IEntity thing, Renderer renderer) {\r
+       AppearanceProvider provider = getAppearanceProvider(thing);\r
+        return provider.getAppearanceFromResource(thing, renderer);\r
+    }\r
+    \r
+    public static AppearanceProvider getAppearanceProvider(IEntity thing) {\r
+       //Collection<IEntity> types = thing.getRelatedObjects(thing.getGraph().getBuiltins().InstanceOf);\r
+        \r
+       //Resource types[] = OntologyUtils.getTypes(resource);\r
+//     for (IEntity t : types) {\r
+               //AppearanceProvider provider = getInstance().getProviderMap().get(t.getResource());\r
+               //if (provider == null) {\r
+                //for (Extension<GeometryProvider> e : getInstance().getExtensions()) {\r
+                       for (AppearanceProviderExtension e : getInstance().getExtensions()) {\r
+                    if (e.provider.canHandle(thing)) {\r
+                        //getInstance().getProviderMap().put(t.getResource(), e.provider);\r
+                        return e.provider;\r
+                    }\r
+                }\r
+                \r
+//            } else {\r
+//             return provider;\r
+//            }\r
+//     }\r
+       \r
+       return null;\r
+    }\r
+    \r
+    @Override\r
+    public void addExtension(IExtensionTracker tracker, IExtension extension) {\r
+        loadExtensions(extension.getConfigurationElements());\r
+    }\r
+    \r
+    @Override\r
+       public synchronized void removeExtension(IExtension extension, Object[] objects) {\r
+               for (Object o : objects) {\r
+                       AppearanceProviderExtension ext = (AppearanceProviderExtension) o;\r
+                       tracker.unregisterObject(extension, ext);\r
+                       extensions.remove(ext);\r
+               }\r
+       }\r
+    \r
+    public class AppearanceProviderExtension {\r
+               public String id;\r
+               public AppearanceProvider provider;\r
+               \r
+               public AppearanceProviderExtension(String id, AppearanceProvider provider) {\r
+                       this.id = id;\r
+                       this.provider = provider;\r
+               }\r
+       }\r
+}\r
index 5cc4304bc58bb4feb7ff206601f25d2f322943b2..6a1a9307e2d67ccdda7e6ce2ede26c897c2c285f 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -21,14 +21,13 @@ import org.simantics.layer0.utils.StubLinkedList;
 import org.simantics.proconf.g3d.Resources;\r
 import org.simantics.proconf.g3d.stubs.Appearance;\r
 import org.simantics.proconf.g3d.stubs.Color;\r
-import org.simantics.proconf.g3d.stubs.G3DResource;\r
 import org.simantics.proconf.g3d.stubs.ImageTexture;\r
 import org.simantics.proconf.g3d.stubs.Material;\r
 import org.simantics.proconf.g3d.stubs.MultiTexture;\r
 import org.simantics.proconf.g3d.stubs.MultiTextureMode;\r
 import org.simantics.proconf.g3d.stubs.Shader;\r
 import org.simantics.proconf.g3d.stubs.Texture;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 import com.jme.image.Image;\r
 import com.jme.renderer.ColorRGBA;\r
index 9d48d3ede6b46b749eb440ec163b0574e9a3cb7c..46668b7c276e549aa0274057e0acab22a0475f83 100644 (file)
@@ -1,3 +1,13 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.proconf.g3d.base;\r
 \r
 import java.util.ArrayList;\r
index 3a18c27c4e46843742f4de3b7a603ce441426129..d50943cbd390847b473e8f72b34b8462773bb403 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -21,7 +21,7 @@ import org.simantics.db.GraphRequestWithResult;
 import org.simantics.db.Resource;\r
 import org.simantics.db.adaption.AdaptionException;\r
 import org.simantics.proconf.g3d.Resources;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 import com.jme.renderer.ColorRGBA;\r
 import com.jme.scene.Geometry;\r
diff --git a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/DefaultAppearanceProvider.java b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/DefaultAppearanceProvider.java
new file mode 100644 (file)
index 0000000..a30359b
--- /dev/null
@@ -0,0 +1,39 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.proconf.g3d.base;\r
+\r
+import java.util.Collection;\r
+\r
+import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.proconf.g3d.Resources;\r
+import org.simantics.proconf.g3d.stubs.Appearance;\r
+\r
+import com.jme.renderer.Renderer;\r
+import com.jme.scene.state.RenderState;\r
+\r
+public class DefaultAppearanceProvider implements AppearanceProvider {\r
+       \r
+       \r
+\r
+       @Override\r
+       public boolean canHandle(IEntity instance) {\r
+               return instance.hasStatement(Resources.g3dResource.HasAppearance);\r
+       }\r
+       \r
+       @Override\r
+       public Collection<RenderState> getAppearanceFromResource(IEntity instance, Renderer renderer) {\r
+               Collection<IEntity> appearanceResource;\r
+        if ((appearanceResource = instance.getRelatedObjects(Resources.g3dResource.HasAppearance)) != null && appearanceResource.size() > 0) {\r
+            return AppearanceTools.getAppearance(new Appearance(instance.getGraph(),appearanceResource.iterator().next().getResource()), renderer);\r
+        }\r
+        throw new RuntimeException("Given instance does not have Appearance definition!");\r
+       }\r
+}\r
index 0cca6ecba3f9a4b9833bd006f4539b3b0556b563..176408bd8071a8e74e9441ee12e283273e807121 100644 (file)
@@ -1,3 +1,13 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.proconf.g3d.base;\r
 \r
 import java.util.Collection;\r
diff --git a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/EditorLoader.java b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/EditorLoader.java
new file mode 100644 (file)
index 0000000..0e759cc
--- /dev/null
@@ -0,0 +1,61 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.proconf.g3d.base;\r
+\r
+import org.eclipse.ui.IPartListener;\r
+import org.eclipse.ui.IWorkbenchPart;\r
+\r
+/**\r
+ * IPartListener that allows editor to load its content after the editorPart is activated.\r
+ * \r
+ * This is crucial with 3D graphics, which does not work if the editor part is activated\r
+ * after the data has been loaded.\r
+ * \r
+ * @author Marko Luukkainen <marko.luukkainen@vtt.fi>\r
+ *\r
+ */\r
+public abstract class EditorLoader implements IPartListener {\r
+\r
+       boolean opened = false;\r
+       boolean activated = false;\r
+       \r
+    public void partOpened(IWorkbenchPart part) {\r
+        if (part.equals(getWorkbechPart())) {\r
+            opened = true;\r
+        }\r
+    }\r
+    \r
+    public void partActivated(IWorkbenchPart part) {\r
+       if (part.equals(getWorkbechPart())) {\r
+            if (opened & !activated) {\r
+               activated = true;\r
+               load();\r
+            }\r
+       }\r
+    }\r
+    \r
+    public void partBroughtToTop(IWorkbenchPart part) {}\r
+    \r
+    public void partClosed(IWorkbenchPart part) {}\r
+    \r
+    public void partDeactivated(IWorkbenchPart part) {}\r
+    \r
+    /**\r
+     * Returns the IWorkbenchPart of the editor\r
+     * @return\r
+     */\r
+    public abstract IWorkbenchPart getWorkbechPart();\r
+    \r
+    /**\r
+     * Starts the content loading process\r
+     */\r
+    public abstract void load();\r
+}\r
index 3bec68d2c5f286b79ed73e35701a51f4dd992350..b4cc9c13bbd7dbaa3b6fc1b5667b6ee6dfc8bf35 100644 (file)
@@ -1,3 +1,13 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.proconf.g3d.base;\r
 \r
 import javax.vecmath.AxisAngle4d;\r
index 0b08880714c22f5e43a83f7f98d87a2b5ee5e581..63ae55a1d50744ccd5e496153aa03a0fa9878fd4 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 8ebb506651f1b3f786b3c8882f01c8c7ef916322..d4de99235f35f83e6f77ea274b4af162ef9d3379 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index fa92b87f21b859ce8257b6af4d25c9da56738277..f734cd9e074a8bc0db33f805ab24efbc58eb27ef 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
  *******************************************************************************/\r
 package org.simantics.proconf.g3d.base;\r
 \r
+import java.util.ArrayList;\r
 import java.util.Collection;\r
+import java.util.Collections;\r
 import java.util.HashMap;\r
+import java.util.List;\r
 import java.util.Map;\r
 \r
+import org.eclipse.core.runtime.CoreException;\r
+import org.eclipse.core.runtime.IConfigurationElement;\r
+import org.eclipse.core.runtime.IExtension;\r
+import org.eclipse.core.runtime.IExtensionPoint;\r
+import org.eclipse.core.runtime.Platform;\r
+import org.eclipse.core.runtime.dynamichelpers.ExtensionTracker;\r
+import org.eclipse.core.runtime.dynamichelpers.IExtensionChangeHandler;\r
+import org.eclipse.core.runtime.dynamichelpers.IExtensionTracker;\r
+import org.eclipse.core.runtime.dynamichelpers.IFilter;\r
 import org.simantics.db.Resource;\r
 import org.simantics.layer0.utils.IEntity;\r
-import org.simantics.utils.ui.plugin.Extension;\r
-import org.simantics.utils.ui.plugin.ExtensionLoader;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 import com.jme.scene.Geometry;\r
 \r
-public class GeometryProviderRegistry {\r
+public class GeometryProviderRegistry implements IExtensionChangeHandler {\r
     private static GeometryProviderRegistry instance;\r
     public final static String ELEMENT_NAME = "Geometry";\r
-    public final static String NAME_SPACE = "org.simantics.proconf.g3d";\r
+    public final static String NAMESPACE = "org.simantics.proconf.g3d";\r
     public final static String EP_NAME = "geometry";\r
     \r
-    private ExtensionLoader<GeometryProvider> loader;\r
+    private ExtensionTracker tracker;\r
+    \r
+    private List<GeometryProviderExtension> extensions = new ArrayList<GeometryProviderExtension>();\r
     private Map<Resource,GeometryProvider> providers;\r
     \r
     private GeometryProviderRegistry() {\r
-        loader = new ExtensionLoader<GeometryProvider>(ELEMENT_NAME, NAME_SPACE, EP_NAME);\r
         providers = new HashMap<Resource,GeometryProvider>();\r
+        \r
+        tracker = new ExtensionTracker();\r
+               \r
+               IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint(NAMESPACE,EP_NAME);\r
+               loadExtensions(ep.getConfigurationElements());\r
+               \r
+               IFilter filter = ExtensionTracker.createExtensionPointFilter(ep);\r
+               tracker.registerHandler(this, filter);\r
     }\r
     \r
-    public static GeometryProviderRegistry getInstance() {\r
+    private void close() {\r
+               tracker.close();\r
+               tracker = null;\r
+               extensions = new ArrayList<GeometryProviderExtension>();\r
+       }\r
+    \r
+    public static synchronized GeometryProviderRegistry getInstance() {\r
         if (instance==null) instance = new GeometryProviderRegistry();\r
         return instance;\r
     }\r
-\r
-    public Extension<GeometryProvider>[] getExtensions() {\r
-        return loader.getExtensions();\r
-    }\r
+    \r
+    public static synchronized void dispose() {\r
+               if (instance != null) {\r
+                       instance.close();\r
+                       instance = null;\r
+               }       \r
+       }\r
+    \r
+    public synchronized List<GeometryProviderExtension> getExtensions() {\r
+               return Collections.unmodifiableList(extensions);\r
+       }\r
+    \r
+    private synchronized void loadExtensions(IConfigurationElement[] elements) {\r
+               for (IConfigurationElement el : elements) {\r
+                       String id = el.getAttribute("id");\r
+                       try {\r
+                               Object o = el.createExecutableExtension("class");\r
+                               GeometryProviderExtension ext = new GeometryProviderExtension(id,(GeometryProvider)o);\r
+                               tracker.registerObject(el.getDeclaringExtension(), ext, IExtensionTracker.REF_STRONG);\r
+                               extensions.add(ext);\r
+                       } catch (CoreException e) {\r
+                               ErrorLogger.defaultLogError("Cannot create java interface for GeometryProvider " + id, e);\r
+                       }\r
+               }\r
+       }\r
     \r
     private Map<Resource,GeometryProvider> getProviderMap() {\r
         return providers;\r
@@ -60,10 +107,11 @@ public class GeometryProviderRegistry {
        for (IEntity t : types) {\r
                GeometryProvider provider = getInstance().getProviderMap().get(t.getResource());\r
                if (provider == null) {\r
-                for (Extension<GeometryProvider> e : getInstance().getExtensions()) {\r
-                    if (e.getInstance().canHandle(thing)) {\r
-                        getInstance().getProviderMap().put(t.getResource(), e.getInstance());\r
-                        return e.getInstance();\r
+                //for (Extension<GeometryProvider> e : getInstance().getExtensions()) {\r
+                       for (GeometryProviderExtension e : getInstance().getExtensions()) {\r
+                    if (e.provider.canHandle(thing)) {\r
+                        getInstance().getProviderMap().put(t.getResource(), e.provider);\r
+                        return e.provider;\r
                     }\r
                 }\r
                 \r
@@ -74,4 +122,28 @@ public class GeometryProviderRegistry {
        \r
        throw new UnsupportedOperationException("Cannot handle resource " + thing);\r
     }\r
+    \r
+    @Override\r
+    public void addExtension(IExtensionTracker tracker, IExtension extension) {\r
+        loadExtensions(extension.getConfigurationElements());\r
+    }\r
+    \r
+    @Override\r
+       public synchronized void removeExtension(IExtension extension, Object[] objects) {\r
+               for (Object o : objects) {\r
+                       GeometryProviderExtension ext = (GeometryProviderExtension) o;\r
+                       tracker.unregisterObject(extension, ext);\r
+                       extensions.remove(ext);\r
+               }\r
+       }\r
+    \r
+    public class GeometryProviderExtension {\r
+               public String id;\r
+               public GeometryProvider provider;\r
+               \r
+               public GeometryProviderExtension(String id, GeometryProvider provider) {\r
+                       this.id = id;\r
+                       this.provider = provider;\r
+               }\r
+       }\r
 }\r
index 4e4905d3711ac2d2b15475af9bf6572ac62306a6..159bd98650d23024befc30dd9ce1e89f82854e7f 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 2a89a4af0aa9f4805518ee93d4906ca974f5e376..5a287b55fa56bfb0076a72002a71918931f2caad 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index bbba901fb4fe7a681a95b192b8341ec3730a2ed1..10ff6ce9b2fb03798d56b26a50c89c1a12084d19 100644 (file)
@@ -1,3 +1,13 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.proconf.g3d.base;\r
 \r
 import java.nio.ByteBuffer;\r
@@ -12,13 +22,12 @@ import org.simantics.proconf.g3d.stubs.ImageTexture;
 import org.simantics.proconf.g3d.stubs.TextureCoordinateGenerator;\r
 import org.simantics.proconf.image.interfaces.IImage;\r
 import org.simantics.proconf.image.interfaces.IImageFactory;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 import org.simantics.utils.ui.gfx.ImageUtils;\r
 import org.simantics.utils.ui.gfx.PixelDimension;\r
 \r
 import com.jme.image.Image;\r
 import com.jme.image.Texture;\r
-import com.jme.util.TextureManager;\r
 \r
 /**\r
  * Caches resource based textures.\r
@@ -26,6 +35,7 @@ import com.jme.util.TextureManager;
  * TODO : either use shared context or use separate cache for each editor\r
  * TODO : ShapeNode implementation won't use release texture yet\r
  * TODO : Texture is released when reference count goes to zero; we probably want to wait for a while before texture is released because it might be used again.\r
+ * TODO : Support for other types of textures (not just pattern texture, preferably extensible interface)\r
  * \r
  * @author Marko Luukkainen <Marko.Luukkainen@vtt.fi>\r
  *\r
@@ -53,19 +63,13 @@ public class ResourceTextureCache {
                        ImageTexture it = new ImageTexture(g,res);\r
                        org.simantics.image.stubs.Image pattern = it.getImage();\r
                        Image image = loadImage(g, pattern.getResource());\r
-//                     image.getData().rewind();\r
-//                     while (image.getData().hasRemaining())\r
-//                             image.getData().put((byte)(Math.random()*256.0 - 127.0));\r
+\r
                        if (image == null) {\r
                                return null;\r
                        }\r
                        t = new Texture();\r
                        t.setImage(image);\r
                        \r
-                       //t = TextureManager.loadTexture(image, Texture.MM_LINEAR, Texture.FM_LINEAR);\r
-//                     t.setImageLocation(res.toString());\r
-//                     URL url = FileLocator.find(com.jme.eclipse.Activator.getDefault().getBundle(),new Path("data/texture/clouds.png"),null);\r
-//             t = TextureManager.loadTexture(url, Texture.MM_LINEAR, Texture.FM_LINEAR);\r
                \r
                        t.setFilter(com.jme.image.Texture.FM_LINEAR);\r
                t.setMipmapState(com.jme.image.Texture.MM_LINEAR);\r
@@ -167,7 +171,7 @@ public class ResourceTextureCache {
                return instance;\r
        }\r
        \r
-       private static Image getImage(ImageData imageData) {\r
+       public static Image getImage(ImageData imageData) {\r
        int width = imageData.width;\r
        int height = imageData.height;\r
        int type = 0;\r
index e2d02874a6e2c745a89695e8c8c7563db33960b1..40154a653ba676c36dfa9f86e91761d9843ab35b 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 43a53a27517b2919e9c859f500fc8480c3b7cff4..f9687f587fc67d15d54f22a3f77f7453e6c1f585 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -17,7 +17,6 @@ import java.util.HashSet;
 import java.util.List;\r
 import java.util.Queue;\r
 import java.util.Set;\r
-import java.util.Stack;\r
 import java.util.concurrent.ConcurrentLinkedQueue;\r
 \r
 import org.simantics.db.AbstractQuery;\r
@@ -38,7 +37,7 @@ import org.simantics.proconf.g3d.scenegraph.IGeometryNode;
 import org.simantics.proconf.g3d.scenegraph.IGraphicsNode;\r
 import org.simantics.proconf.g3d.scenegraph.RootGraphicsNode;\r
 import org.simantics.proconf.g3d.stubs.G3DNode;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 import org.simantics.utils.datastructures.BijectionMap;\r
 \r
 import com.jme.scene.Node;\r
@@ -262,7 +261,7 @@ public abstract class ScenegraphAdapterImpl implements ScenegraphAdapter {
      * @param root\r
      * @return\r
      */\r
-    protected abstract NodeTransformationQuery newTransformationListener(G3DNode root);\r
+    protected abstract NodeTransformationQuery newTransformationListener(G3DNode node);\r
     \r
     /**\r
      * Returns propertyQuery for the root node.\r
@@ -318,7 +317,7 @@ public abstract class ScenegraphAdapterImpl implements ScenegraphAdapter {
      */\r
     protected IGraphicsNode addNode(IEntity parent, IEntity r) {\r
         if (!r.isInstanceOf(Resources.g3dResource.G3DNode)) {\r
-            ErrorLogger.defaultLogError("Trying to add node into scenegraph that is not instance of graphicsnode " + r,new Exception("ASSERT!"));\r
+            ErrorLogger.defaultLogError("Trying to add node into scenegraph that is not instance of G3DNode " + r,new Exception("ASSERT!"));\r
             return null;\r
         }\r
         if (parent.equals(r)) {\r
@@ -339,7 +338,7 @@ public abstract class ScenegraphAdapterImpl implements ScenegraphAdapter {
                if (DEBUG) System.out.println("ThreeDimensionalEditorBase.addNodeP(" + r.getResource().getResourceId() + ") already in view");\r
                 return inView;\r
             } else {\r
-               if (DEBUG) System.out.println("ThreeDimensionalEditorBase.addNodeP(" + r.getResource().getResourceId() + ") already in view, but has different parent, current parent is ("+inView.getParent().getResource()+") and node is added to  ("+parent+") -> removing from old parent and inserting to new");\r
+               if (DEBUG) System.out.println("ThreeDimensionalEditorBase.addNodeP(" + r.getResource().getResourceId() + ") already in view, but has different parent, current parent is ("+inView.getParent().getResource().getResourceId()+") and node is added to  ("+parent+") -> removing from old parent and inserting to new");\r
                 removeNode(inView.getParent().getResource(),r.getResource());\r
             }\r
         }\r
@@ -473,14 +472,11 @@ public abstract class ScenegraphAdapterImpl implements ScenegraphAdapter {
     public abstract class NodeQuery extends AbstractQuery<Object>{\r
         protected Resource nodeResource;\r
         private boolean disposed = false;\r
-        private IQueryListener listener;\r
-        //private OverridingTransactionRunner runner;\r
         \r
+        private IQueryListener listener = null;\r
        \r
        public NodeQuery(Resource r) {\r
                this.nodeResource = r;\r
-               //runner = new OverridingTransactionRunner(session,true);\r
-               \r
        }\r
        \r
        protected abstract Object compute2(Graph graph);\r
@@ -508,7 +504,6 @@ public abstract class ScenegraphAdapterImpl implements ScenegraphAdapter {
                if (disposed)\r
                        throw new RuntimeException("Updating disposed query"); //return;\r
                transactionRunner.run(new GraphRequestAdapter() {\r
-               //session.asyncWrite(new GraphRequestAdapter() {\r
                        @Override\r
                        public GraphRequestStatus perform(Graph g) throws Exception {\r
                                if (!disposed) {\r
@@ -543,14 +538,12 @@ public abstract class ScenegraphAdapterImpl implements ScenegraphAdapter {
                if (DEBUG) System.out.println("NodeQuery " +  nodeResource +  " disposed()" + " " + this.getClass());\r
        }\r
        \r
-       //public abstract NodeQuery instantiateQuery(Resource node);\r
-       //public abstract void attach();\r
-       \r
         @Override\r
         public boolean isDisposed() {\r
             return disposed;\r
         }\r
         \r
+        // without separate listener, this query would work only once\r
         @Override\r
         public IQueryListener getListener() {\r
                if (listener == null) {\r
@@ -568,7 +561,6 @@ public abstract class ScenegraphAdapterImpl implements ScenegraphAdapter {
                }\r
                return listener;\r
         }\r
-       \r
     }\r
     \r
     /**\r
index 22b6bc6efdbdc7393b588b699cc8f3103a0b0b82..2b0b4802184fb22d36950276d03d6c185b43cd6b 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -43,6 +43,8 @@ public abstract class SelectionAdapter implements ISelectionProvider{
        private Gizmo currentGizmo = null;\r
        \r
        public SelectionAdapter(ScenegraphAdapter adapter) {\r
+               if (adapter == null)\r
+                       throw new NullPointerException("Scenegraph adapter must no be null");\r
                this.adapter = adapter;\r
        }\r
        \r
@@ -393,7 +395,11 @@ public abstract class SelectionAdapter implements ISelectionProvider{
      * @param s\r
      * @return the filtered selection\r
      */\r
-    protected abstract StructuredResourceSelection filterSelection(ISelection s);\r
+    protected StructuredResourceSelection filterSelection(ISelection s) {\r
+       if (!(selection instanceof StructuredResourceSelection))\r
+                       return new StructuredResourceSelection();\r
+               return (StructuredResourceSelection) selection;\r
+    }\r
 \r
     /**\r
      * Updates visual part of selection event. Use getCurrentSelection() to get\r
index 0a04a229081b9ff81185f9b60d9be4acbd29a05d..51f47fe95e423cac7b6177e99871ca112ba24fc9 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -12,16 +12,12 @@ package org.simantics.proconf.g3d.base;
 \r
 import java.awt.event.MouseEvent;\r
 import java.util.ArrayList;\r
-import java.util.HashMap;\r
 import java.util.List;\r
-import java.util.Map;\r
-import java.util.Stack;\r
 \r
 import javax.vecmath.Tuple3d;\r
 import javax.vecmath.Vector3d;\r
 \r
 import org.eclipse.jface.action.Action;\r
-import org.eclipse.jface.action.IContributionItem;\r
 import org.eclipse.jface.action.IMenuListener;\r
 import org.eclipse.jface.action.IMenuManager;\r
 import org.eclipse.jface.action.IToolBarManager;\r
@@ -37,12 +33,10 @@ import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.swt.widgets.Menu;\r
 import org.eclipse.ui.IActionBars;\r
-import org.eclipse.ui.IEditorActionBarContributor;\r
 import org.eclipse.ui.ISharedImages;\r
 import org.eclipse.ui.IWorkbenchActionConstants;\r
 import org.eclipse.ui.IWorkbenchPart;\r
 import org.eclipse.ui.PlatformUI;\r
-import org.eclipse.ui.commands.ICommandService;\r
 import org.eclipse.ui.internal.WorkbenchWindow;\r
 import org.simantics.db.Graph;\r
 import org.simantics.db.GraphRequestAdapter;\r
@@ -69,7 +63,7 @@ import org.simantics.proconf.g3d.input.SWTInputProvider;
 import org.simantics.proconf.g3d.scenegraph.IGeometryNode;\r
 import org.simantics.proconf.g3d.scenegraph.IGraphicsNode;\r
 import org.simantics.proconf.g3d.tools.ScenegraphLockTraverser;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 import org.simantics.utils.ui.jface.MenuTools;\r
 \r
 import com.jme.math.Ray;\r
@@ -143,6 +137,11 @@ public abstract class ThreeDimensionalEditorBase implements  Runnable {
        this.component = component;\r
     }\r
     \r
+    protected void setRenderingComponent(JmeRenderingComponent component) {\r
+       assert(renderingComposite == null); // ensure that this is called before initialization\r
+       this.component = component;\r
+    }\r
+    \r
 //    public void setActionBarContributor(IEditorActionBarContributor contributor) {\r
 //     actionBarContributor = contributor;\r
 //    }\r
index 4ad22bd26d3ce668ec193c1528e073772cbaae6f..a3da25103e60cff356df0fb9c8c87c1c532c36fb 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -15,7 +15,6 @@ import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.swt.widgets.Display;\r
 import org.eclipse.ui.IActionBars;\r
-import org.eclipse.ui.IPartListener;\r
 import org.eclipse.ui.ISelectionListener;\r
 import org.eclipse.ui.IWorkbenchPart;\r
 import org.simantics.db.Graph;\r
@@ -26,7 +25,7 @@ import org.simantics.db.Resource;
 import org.simantics.db.events.GraphChangeEvent;\r
 import org.simantics.db.management.ISessionContext;\r
 import org.simantics.proconf.ui.workbench.ResourceEditorPart;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 \r
 public abstract class ThreeDimensionalEditorPart extends ResourceEditorPart implements ThreeDimensionalEditorProvider{\r
@@ -49,33 +48,13 @@ public abstract class ThreeDimensionalEditorPart extends ResourceEditorPart impl
                editor = createEditor(getSessionContext());\r
                \r
             // add partlistener that loads the scene-graph when the view has been created\r
-            this.getEditorSite().getPage().addPartListener(new IPartListener() {\r
-               \r
-               boolean opened = false;\r
-               boolean activated = false;\r
-               \r
-                public void partOpened(IWorkbenchPart part) {\r
-                    if (part.equals(ThreeDimensionalEditorPart.this.getEditorSite().getPart())) {\r
-                        opened = true;\r
-                    }\r
-                }\r
-                \r
-                public void partActivated(IWorkbenchPart part) {\r
-                       if (part.equals(ThreeDimensionalEditorPart.this.getEditorSite().getPart())) {\r
-                        if (opened & !activated) {\r
-                               activated = true;\r
-                               load();\r
-                        }\r
-                       }\r
+            this.getEditorSite().getPage().addPartListener(new EditorLoader() {\r
+\r
+                public IWorkbenchPart getWorkbechPart() {\r
+                       return ThreeDimensionalEditorPart.this.getEditorSite().getPart();\r
                 }\r
                 \r
-                public void partBroughtToTop(IWorkbenchPart part) {}\r
-                \r
-                public void partClosed(IWorkbenchPart part) {}\r
-                \r
-                public void partDeactivated(IWorkbenchPart part) {}\r
-                \r
-                private void load() {\r
+                public void load() {\r
                        //System.out.println("ThreeDimensionalEditorPart.reload()");\r
                     Session ses = ThreeDimensionalEditorPart.this.getSession();\r
                     GraphRequestAdapter r = new GraphRequestAdapter() {\r
@@ -159,12 +138,14 @@ public abstract class ThreeDimensionalEditorPart extends ResourceEditorPart impl
     private void hookPageSelection() {\r
         pageSelectionListener = new ISelectionListener() {\r
             public void selectionChanged(IWorkbenchPart part, ISelection selection) {\r
-                if (part == ThreeDimensionalEditorPart.this)\r
-                    return;\r
+                if (part == ThreeDimensionalEditorPart.this) {\r
+                       return;\r
+                }\r
                 pageSelectionChanged(part, selection);\r
             }\r
         };\r
         getSite().getPage().addPostSelectionListener(pageSelectionListener);\r
+        getSite().getPage().addSelectionListener(pageSelectionListener);\r
         ISelection sel = getSite().getPage().getSelection();\r
         IWorkbenchPart wb = getSite().getPage().getActivePart();\r
         pageSelectionChanged(wb, sel);\r
@@ -181,8 +162,10 @@ public abstract class ThreeDimensionalEditorPart extends ResourceEditorPart impl
     }\r
     \r
     public void dispose() {\r
-       if (pageSelectionListener != null)\r
+       if (pageSelectionListener != null) {\r
             getSite().getPage().removePostSelectionListener(pageSelectionListener);\r
+               getSite().getPage().removeSelectionListener(pageSelectionListener);\r
+       }\r
         editor.dispose();\r
        super.dispose();\r
     }\r
index df2d14dd4b17f6b37cd0040ad6ed29f40cc51d7a..ab2566eaab1671a0dce89fd7853375ad626bf12a 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 9ca2754cf36e4db0858958bed882df1d592f956a..9ea0cb8697204518b23cd3cf67754a1a348863b0 100644 (file)
@@ -1,3 +1,13 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.proconf.g3d.base;\r
 \r
 import java.util.Collection;\r
index 21cfcff0075d0191b5493a40c11fa8fb2e5f3f4e..315660e22608e7ed80ba779410302b849bd9e04d 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index e7011eb7ede77d8096e520eb7291dae9176e8c57..1a2522562a0ed052f62ec40d03957c6258bb6feb 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -14,7 +14,7 @@ import java.util.ArrayList;
 \r
 import org.eclipse.swt.widgets.Display;\r
 import org.eclipse.ui.PlatformUI;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 \r
 /**\r
index 5cff3ffb36502d71c8364dce8900ce82f1b7ebe0..bb9e0bbbceaf2bf6384112d23f85caca3fb2363b 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -17,13 +17,15 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.swt.SWT;\r
 import org.eclipse.swt.events.ControlAdapter;\r
 import org.eclipse.swt.events.ControlEvent;\r
+import org.eclipse.swt.events.PaintEvent;\r
+import org.eclipse.swt.events.PaintListener;\r
 import org.eclipse.swt.graphics.Rectangle;\r
 import org.eclipse.swt.layout.FillLayout;\r
 import org.eclipse.swt.opengl.GLCanvas;\r
 import org.eclipse.swt.widgets.Composite;\r
 import org.simantics.proconf.g3d.base.JmeRenderingComponent;\r
 import org.simantics.proconf.g3d.base.ResourceTextureCache;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 import com.jme.renderer.Renderer;\r
 import com.jme.renderer.lwjgl.LWJGLRenderer;\r
@@ -55,6 +57,14 @@ public class JmeComposite extends Composite {
             }\r
         });\r
         \r
+//        this.addPaintListener(new PaintListener() {\r
+//             @Override\r
+//             public void paintControl(PaintEvent e) {\r
+//                     displaySystem.setCurrent();\r
+//                     JmeComposite.this.component.render();\r
+//             }\r
+//        });\r
+        \r
         \r
        }\r
        \r
@@ -109,4 +119,6 @@ public class JmeComposite extends Composite {
        public DisplaySystem getDisplaySystem() {\r
                return displaySystem;\r
        }\r
+       \r
+       \r
 }\r
index fb9aff60b857785196d1e80514b6527ecb5d4ca1..e11f92fc7d704c6163e835db020aa292c7fbc14c 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -73,7 +73,7 @@ public class JmeSinglePassRenderingComponent extends JmeRenderingComponent {
     private boolean showNormals = false;\r
     private WireframeState ws = null;\r
     \r
-    private boolean projectionUpdated = false;\r
+    protected boolean projectionUpdated = false;\r
     \r
        public JmeSinglePassRenderingComponent() {\r
                \r
@@ -313,7 +313,7 @@ public class JmeSinglePassRenderingComponent extends JmeRenderingComponent {
                }\r
        }\r
        \r
-       private void updateProjection() {\r
+       protected void updateProjection() {\r
                switch (projectionPolicy) {\r
                case PERSPECTIVE_PROJECTION:\r
                        cam.setParallelProjection(false);\r
index 4b0aa6fcf629c2e0d57c453f1d169273c149f86b..6b38bef39ada6e6e1c44aa6b274eec4992ff671e 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 0f57f7ae6f299fa3d44983dc27b2b8fb88747b58..8f3968c54f2d71600d3008bd25abe1e38e642120 100644 (file)
@@ -1,3 +1,13 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.proconf.g3d.common;\r
 \r
 import org.eclipse.core.expressions.PropertyTester;\r
index a13062a84772e125a325e63a9a0ec34d0414bf77..80f92d5fb28c00775bdb5857ab48a4e1d434aed8 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 9e2950db2ab385118b047cdd19957ff60923d51a..9822b816654c36ec5275ce61aaa8f4a2713f121f 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 70e9610fcc994311615fa4d5bedc5cdca4109d5a..e86982eb9a3524b3ecf3905a2739191fced6045c 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index fe832e65f940d22e9050323d33e6e6260af8ed20..507eb5a690dba511c1509e21bd88b84932f0f224 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index e6f7b61c4ebcd433ba43c6dd5e10e729723520ed..51b65af12d96e796f8931021dfe8be8018d72a13 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 0e791cac4f100120ef7b1c5d56905d6eb76dcb08..551033f4592bfd80eb28e0764c0bf148158cd1a4 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index b73b8865c983cd428339b90a9545ff2194ce822d..65448c5ef8c07e3184da0159de4b62f914504e0e 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index dcf18d5292694005157d13bf8b58396e62396c25..adc44a15ea8ecc9999c262e854b49e60cff84c39 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index b0e6df44f2091d0caf89dbb0ac14531100171774..8224d7e078be44daf3ad287e6ff17a45ea6ea889 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 23ba6e008e227293f7522e53023ec411129048b0..c9adcd5d9e3fee285212dfb47088c9da323f05b1 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index ec152390d32502eeee3d1fbb6687455dc1fdcb4f..c5cc3058569bf1ca2d0f47165c9b554ba9b557da 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 1f1f56bde862e21c1aa381e96e9a0a0939ac2123..e7eaa1b76be107c4e6e58db858d309b66ed74083 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index a21d3b79d035719ba18bf7732b237046ffb2fbdc..345a9e83d58fd9f74fc823c43dce58ea2d8d4cb8 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 98230ebeb886775642d8203b5f709fad00001c53..185e959941daaa70723f56eb595974d924e828f1 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index c0163e7e22fad5afc0dbb496c8312582ba7996f0..0741f1e4eaff6a582403981a61efb47be8e66d43 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 5a40d2fbc180b185e658f8b94347a99dfb93bba0..648c1d7cdd129d8438fa5092c0e6d4c2b1085287 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index d1dde38e90acf5bb774d0ce9cf3bf6aab5985962..b704969599b808cad671c85851ba6ce65c27864e 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 94d3daede0debc5c772bf9aa111e5c50b8f70665..461c2ef89aca24d1f2d7ea9d9375da89fd0b4772 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index a72aa5f185b26981512216159982786f1ed152a3..d81d138856ddb2c313f83c21f9718825447a5df5 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 4abd1b3ae273877a6f508161754f58be5a943613..3809c7fa2587aec633a5967f00a97354d3f48af7 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 40e845a10b8d7a0ec901931d253d846053bb69fa..ab9a0e9e3c579b939704cd464135799bb3ae7932 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -22,7 +22,7 @@ import org.simantics.proconf.g3d.animation.Animatable;
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
 import org.simantics.proconf.g3d.stubs.G3DModel;\r
 import org.simantics.proconf.g3d.stubs.G3DNode;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 public class ModelNode extends AbstractGraphicsNode implements Animatable, IGeometryNode{\r
        protected List<ShapeNode> shapes = new ArrayList<ShapeNode>();\r
@@ -43,7 +43,7 @@ public class ModelNode extends AbstractGraphicsNode implements Animatable, IGeom
                G3DModel model = getG3DModel(graph);\r
             Collection<G3DNode> nodes = model.getChild();\r
             if (nodes.size() == 0) {\r
-                ErrorLogger.defaultLogError("ModelNode " + model.getResource() + " has no shapes", null);\r
+                ErrorLogger.defaultLogError("ModelNode " + model.getResource().getResourceId() + " has no shapes", null);\r
                 return;\r
             }\r
             for (G3DNode node: nodes) {\r
@@ -175,14 +175,14 @@ public class ModelNode extends AbstractGraphicsNode implements Animatable, IGeom
             return false;    \r
         }\r
         G3DModel model = getG3DModel(graph);\r
-        Collection<org.simantics.g2d.stubs.anim.Animation> animations = model.getAnimation();\r
+        Collection<org.simantics.animation.stubs.Animation> animations = model.getAnimation();\r
         int num = animations.size();\r
         if (num == 0) {\r
             ErrorLogger.getDefault().logWarning("Cannot set animation for " + shapeResource + " since it has no animations", null);\r
             return false;            \r
         }\r
         int random = (int)Math.round(Math.random() * (num-1));\r
-        Iterator<org.simantics.g2d.stubs.anim.Animation> i = animations.iterator();\r
+        Iterator<org.simantics.animation.stubs.Animation> i = animations.iterator();\r
         while(random > 0) {\r
             i.next();\r
             random--;\r
index 2c0209712212cf9ca1a55787259de1e078431b8b..f575aeeb070f01051a048d1ed784f82f230f6c76 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 511a2fa9b5b16ff805728a0272046091c939112b..1eb29bb41c72f50ba7ff9132ba24aa1705fff632 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -20,7 +20,7 @@ import org.simantics.db.ContextGraph;
 import org.simantics.db.Graph;\r
 import org.simantics.db.Resource;\r
 import org.simantics.equation.solver.Solver;\r
-import org.simantics.g2d.stubs.anim.Animation;\r
+import org.simantics.animation.stubs.Animation;\r
 import org.simantics.layer0.utils.Property;\r
 import org.simantics.layer0.utils.IEntity;\r
 import org.simantics.layer0.utils.EntityFactory;\r
@@ -29,7 +29,7 @@ import org.simantics.proconf.g3d.Resources;
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
 import org.simantics.proconf.g3d.stubs.G3DModel;\r
 import org.simantics.proconf.g3d.stubs.G3DNode;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 /**\r
  * IGraphicsNode for parameterized models. Implementation assumes that G3DNode itself does not contain\r
@@ -125,8 +125,8 @@ public class ParameterizedModelNode extends ModelNode {
                solver.pushToGraph(graph);\r
                Collection<Animation> animations = model.getAnimation();\r
         for (Animation animation : animations) {\r
-               Collection<org.simantics.g2d.stubs.anim.Interpolator> interpolators = animation.getInterpolator();\r
-               for (org.simantics.g2d.stubs.anim.Interpolator interpolator : interpolators) {\r
+               Collection<org.simantics.animation.stubs.Interpolator> interpolators = animation.getInterpolator();\r
+               for (org.simantics.animation.stubs.Interpolator interpolator : interpolators) {\r
                        IEntity target = interpolator.getTarget();\r
                        // check all model properties\r
                        for (Property p : modelProperties) {\r
index 9937f4cf6ee74d222c1eacae9706a44923f56d5e..404d2ef77b809c111d650819b99a3eb8494cacb8 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 7c89be4db402d77191a429ba7e7ed3c0d5a40d9e..52afcbc7459cce33554ab471dfbf4d66aac860e2 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -17,7 +17,7 @@ import java.util.List;
 import javax.vecmath.AxisAngle4d;\r
 import javax.vecmath.Quat4d;\r
 \r
-import org.simantics.g2d.stubs.anim.Interpolator;\r
+import org.simantics.animation.stubs.Interpolator;\r
 import org.simantics.animation.curve.SlerpCurve;\r
 import org.simantics.animation.curve.TCBCurve;\r
 import org.simantics.proconf.g3d.Resources;\r
@@ -29,6 +29,8 @@ import org.simantics.proconf.g3d.animation.ConstantInterpolator;
 import org.simantics.proconf.g3d.animation.ScalarInterpolator;\r
 import org.simantics.proconf.g3d.animation.SlerpInterpolator;\r
 import org.simantics.proconf.g3d.animation.TCBInterpolator;\r
+import org.simantics.proconf.g3d.base.AppearanceProvider;\r
+import org.simantics.proconf.g3d.base.AppearanceProviderRegistry;\r
 import org.simantics.proconf.g3d.base.AppearanceTools;\r
 import org.simantics.proconf.g3d.base.G3DTools;\r
 import org.simantics.proconf.g3d.base.GeometryProvider;\r
@@ -39,7 +41,7 @@ import org.simantics.proconf.g3d.stubs.Color;
 import org.simantics.proconf.g3d.stubs.G3DModel;\r
 import org.simantics.proconf.g3d.stubs.G3DNode;\r
 import org.simantics.proconf.g3d.stubs.Orientation;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 import com.jme.bounding.BoundingBox;\r
 import com.jme.bounding.CollisionTreeManager;\r
@@ -226,7 +228,7 @@ public class ShapeNode extends AbstractGraphicsNode implements Animatable, IGeom
 \r
             \r
             G3DNode shape = getG3DNode(graph);\r
-            if (renderStates == null)\r
+            //if (renderStates == null)\r
                updateAppearance(shape);\r
 \r
             if (isVisible()) {\r
@@ -258,9 +260,9 @@ public class ShapeNode extends AbstractGraphicsNode implements Animatable, IGeom
     }\r
     \r
     protected void updateAppearance(IEntity shape) {\r
-       Collection<IEntity> appearanceResource;\r
-        if ((appearanceResource = shape.getRelatedObjects(Resources.g3dResource.HasAppearance)) != null && appearanceResource.size() > 0) {\r
-            renderStates = AppearanceTools.getAppearance(new Appearance(shape.getGraph(),appearanceResource.iterator().next().getResource()), editor.getRenderingComponent().getDisplaySystem().getRenderer());\r
+       AppearanceProvider provider = AppearanceProviderRegistry.getAppearanceProvider(shape);\r
+        if (provider != null) {\r
+            renderStates = provider.getAppearanceFromResource(shape, editor.getRenderingComponent().getDisplaySystem().getRenderer());\r
         } else {\r
                renderStates = getMaterial();\r
         }\r
@@ -461,14 +463,14 @@ public class ShapeNode extends AbstractGraphicsNode implements Animatable, IGeom
                        body.attachChild(mesh);\r
             return false;\r
         }\r
-       org.simantics.g2d.stubs.anim.Animation animation = new org.simantics.g2d.stubs.anim.Animation(graph,res);\r
+       org.simantics.animation.stubs.Animation animation = new org.simantics.animation.stubs.Animation(graph,res);\r
        G3DNode shape = getG3DNode(graph);\r
         G3DNode modelResource = G3DTools.getModelFromResource(graph,shape.getResource());\r
         assert (modelResource != null);\r
         G3DModel model = new G3DModel(graph,modelResource.getResource());\r
-        Collection<org.simantics.g2d.stubs.anim.Animation> animations = model.getAnimation();\r
+        Collection<org.simantics.animation.stubs.Animation> animations = model.getAnimation();\r
         boolean found = false;\r
-        for (org.simantics.g2d.stubs.anim.Animation a : animations) {\r
+        for (org.simantics.animation.stubs.Animation a : animations) {\r
             if (a.getResource().equals(animation.getResource())) {\r
                 found = true;\r
                 break;\r
@@ -478,10 +480,10 @@ public class ShapeNode extends AbstractGraphicsNode implements Animatable, IGeom
             ErrorLogger.getDefault().logWarning("Shape " + shape.getResource() + " cannot handle animation " + animation.getResource() + " because it isn't model's animation", null);\r
             return false;\r
         }\r
-        Collection<org.simantics.g2d.stubs.anim.Interpolator> interpolators = animation.getInterpolator();\r
-        List<org.simantics.g2d.stubs.anim.Interpolator> handled = new ArrayList<org.simantics.g2d.stubs.anim.Interpolator>();\r
-        List<org.simantics.g2d.stubs.anim.Interpolator> precalculated = new ArrayList<org.simantics.g2d.stubs.anim.Interpolator>();\r
-        for (org.simantics.g2d.stubs.anim.Interpolator i : interpolators) {\r
+        Collection<org.simantics.animation.stubs.Interpolator> interpolators = animation.getInterpolator();\r
+        List<org.simantics.animation.stubs.Interpolator> handled = new ArrayList<org.simantics.animation.stubs.Interpolator>();\r
+        List<org.simantics.animation.stubs.Interpolator> precalculated = new ArrayList<org.simantics.animation.stubs.Interpolator>();\r
+        for (org.simantics.animation.stubs.Interpolator i : interpolators) {\r
             IEntity target = i.getTarget();\r
             if (G3DTools.hasProperty(graph,shape.getResource(),target.getResource()))\r
                 handled.add(i);\r
@@ -497,16 +499,16 @@ public class ShapeNode extends AbstractGraphicsNode implements Animatable, IGeom
         \r
         this.animation = new Animation();\r
         \r
-        org.simantics.g2d.stubs.anim.Interpolator[] pos = new org.simantics.g2d.stubs.anim.Interpolator[3];\r
-        org.simantics.g2d.stubs.anim.Interpolator[] ambient = new org.simantics.g2d.stubs.anim.Interpolator[3];\r
-        org.simantics.g2d.stubs.anim.Interpolator[] diffuse = new org.simantics.g2d.stubs.anim.Interpolator[3];\r
-        org.simantics.g2d.stubs.anim.Interpolator[] specular = new org.simantics.g2d.stubs.anim.Interpolator[3];\r
-        org.simantics.g2d.stubs.anim.Interpolator[] emissive = new org.simantics.g2d.stubs.anim.Interpolator[3];\r
+        org.simantics.animation.stubs.Interpolator[] pos = new org.simantics.animation.stubs.Interpolator[3];\r
+        org.simantics.animation.stubs.Interpolator[] ambient = new org.simantics.animation.stubs.Interpolator[3];\r
+        org.simantics.animation.stubs.Interpolator[] diffuse = new org.simantics.animation.stubs.Interpolator[3];\r
+        org.simantics.animation.stubs.Interpolator[] specular = new org.simantics.animation.stubs.Interpolator[3];\r
+        org.simantics.animation.stubs.Interpolator[] emissive = new org.simantics.animation.stubs.Interpolator[3];\r
 \r
         Builtins builtins = graph.getBuiltins();\r
 \r
         \r
-        for (org.simantics.g2d.stubs.anim.Interpolator i : handled) {\r
+        for (org.simantics.animation.stubs.Interpolator i : handled) {\r
             IEntity target = i.getTarget();\r
             //if (target.isInstanceOf(Resources.g3dResource.LocalOrientation)) {\r
             if (target.isInstanceOf(Resources.g3dResource.Orientation) && target.getRelatedObjects(Resources.g3dResource.LocalOrientationOf).size() == 1) {\r
@@ -530,7 +532,7 @@ public class ShapeNode extends AbstractGraphicsNode implements Animatable, IGeom
                             ErrorLogger.getDefault().logWarning("Cannot map animation interpolator " + i.getResource() + " to target (Position ?)" + target.getResource(),  null);\r
                         }\r
                     } else if (parent.isInstanceOf(Resources.g3dResource.Color)) {\r
-                        org.simantics.g2d.stubs.anim.Interpolator[] color = null;\r
+                        org.simantics.animation.stubs.Interpolator[] color = null;\r
                         if (parent.isInstanceOf(Resources.g3dResource.Color) && parent.getRelatedObjects(Resources.g3dResource.AmbientColorOf).size() > 0) {\r
                                 color = ambient;\r
                         } else if (parent.isInstanceOf(Resources.g3dResource.Color)&& parent.getRelatedObjects(Resources.g3dResource.DiffuseColorOf).size() > 0) {\r
@@ -644,7 +646,7 @@ public class ShapeNode extends AbstractGraphicsNode implements Animatable, IGeom
         return true;\r
     }\r
     \r
-    private void addColorInterpolator(G3DNode shape, org.simantics.g2d.stubs.anim.Interpolator[] color, int type) {\r
+    private void addColorInterpolator(G3DNode shape, org.simantics.animation.stubs.Interpolator[] color, int type) {\r
         if (color[0] != null || color[1] != null || color[2] != null) {\r
             ScalarInterpolator xIp;\r
             ScalarInterpolator yIp;\r
index 461087cb33442a8e20ba9639e9ecaa49304ce51e..9dc7fefc1448752a4a14526546330a92a7d88fad 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index cd289ad5fc58752641ad2df7c8ef6bf26d87cb0a..7492a98c1c2175a4c0b4b3c8ba3276576f677f62 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 284b357e6149bafc6fde5b2e927b747779a74b65..76020b608acd7b7a0016a81f468a725bce63d40c 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index cab5e37ebab6cb12c86b4be367fe0fc4c322c889..681af2ca96544bbb142212c1650dc87dcb006b01 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 1af0908d2d48d9ae4969ca8e81961a97ffff7be4..37ea71f478d2ffb76c7a98c303ff5a26d83a597b 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 54e4619b17a9a95a7abce7505c3af6de6a0f3803..1be4c17299500c16dc4db56036dcad3b1dad09d5 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index ea7f62db388f8b2d34c107c26932bbe43b854177..290c92142928e0e431257f656d54736f1f4ca674 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index c3bf357d0e65e01f4d9f0fe10c35d3f333b7d00a..4f14e22c95880f4c51f04d10d8c67036ff18bb1f 100644 (file)
@@ -1,3 +1,13 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.proconf.g3d.tools;\r
 \r
 import java.util.ArrayList;\r
index 69170787a907de325e91a1461c06b787fab3e1cd..81cb95f34e029e0d3ce52e3012b368feebd2d7d7 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -51,7 +51,7 @@ import org.simantics.proconf.image.interfaces.IImage;
 import org.simantics.proconf.image.interfaces.IImageFactory;\r
 import org.simantics.proconf.image.ui.ImageComposite;\r
 import org.simantics.proconf.ui.utils.ResourceAdaptionUtils;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 \r
 public class AppearanceEditor extends SinglePageResourceView{\r
index ee3f1277560d80eb6c807e59e1ab4e3d4fc380f0..25132dbd34c3271b35fabb28ad7ee66e752669c3 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
index 1caba9d0e13b81ad0e1aad6814c2a48eda3a6ec8..f88f65fb44ebf8253722e0513c578567e4fff6c3 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -28,7 +28,7 @@ import org.simantics.db.GraphRequestStatus;
 import org.simantics.db.Session;\r
 import org.simantics.proconf.g3d.common.StructuredResourceSelection;\r
 import org.simantics.proconf.ui.workbench.ResourceEditorPart;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 import org.simantics.utils.ui.ISelectionUtils;\r
 import org.simantics.utils.ui.jface.BaseSelectionProvider;\r
 \r
index d1d3dfd3c5affffa4cc329acf50526781e0500be..7935bb589d8d3208049a7011d5dc5b11c02f0097 100644 (file)
@@ -1,3 +1,13 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.proconf.g3d.views;\r
 \r
 import org.eclipse.jface.viewers.ISelection;\r
index 2c2e6e9d9b3f247c6e3f32da91b8cdf9b7d4c6a9..f6ed1f0b2edf26edecaebc84ef5188af462034af 100644 (file)
@@ -1,14 +1,13 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Processeditor Plug-in
-Bundle-SymbolicName: fi.vtt.simantics.processeditor;singleton:=true
+Bundle-SymbolicName: org.simantics.processeditor;singleton:=true
 Bundle-Version: 1.0.0
-Bundle-Activator: fi.vtt.simantics.processeditor.Activator
+Bundle-Activator: org.simantics.processeditor.Activator
 Bundle-Vendor: VTT
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
  com.jme.eclipse,
- org.simantics.g2d.stubs,
  org.simantics.proconf.ui,
  org.simantics.proconf.g3d,
  org.simantics.proconf.image,
@@ -22,5 +21,10 @@ Require-Bundle: org.eclipse.ui,
  org.simantics.utils.ui,
  org.simantics.utils.ui.workbench,
  org.simantics.proconf.g3d.shapeeditor,
- org.eclipse.ui.views
+ org.eclipse.ui.views,
+ org.simantics.animation
 Eclipse-LazyStart: true
+Export-Package: org.simantics.processeditor.adapters,
+ org.simantics.processeditor.common,
+ org.simantics.processeditor.stubs,
+ org.simantics.processeditor.tools
diff --git a/org.simantics.proconf.processeditor/data/dcp.obj b/org.simantics.proconf.processeditor/data/dcp.obj
deleted file mode 100644 (file)
index 8b19e69..0000000
+++ /dev/null
@@ -1,476 +0,0 @@
-# Blender v242 OBJ File: dcp.blend\r
-# www.blender3d.org\r
-mtllib dcp.mtl\r
-o Sphere_Sphere\r
-v 0.092388 -0.000000 -0.038268\r
-v -0.092388 0.014645 -0.035355\r
-v -0.070711 0.027060 -0.065328\r
-v -0.038268 0.035355 -0.085355\r
-v 0.000000 0.038268 -0.092388\r
-v 0.038268 0.035355 -0.085355\r
-v 0.070711 0.027060 -0.065328\r
-v 0.092388 0.014645 -0.035355\r
-v 0.092388 0.027060 -0.027060\r
-v 0.070711 0.050000 -0.050000\r
-v 0.038268 0.065328 -0.065328\r
-v 0.000000 0.070711 -0.070711\r
-v -0.038268 0.065328 -0.065328\r
-v -0.070711 0.050000 -0.050000\r
-v -0.092388 0.027060 -0.027060\r
-v -0.092388 0.035355 -0.014645\r
-v -0.070711 0.065328 -0.027060\r
-v -0.038268 0.085355 -0.035355\r
-v 0.000000 0.092388 -0.038268\r
-v 0.038268 0.085355 -0.035355\r
-v 0.070711 0.065328 -0.027060\r
-v 0.092388 0.035355 -0.014645\r
-v 0.092388 0.038268 0.000000\r
-v 0.070711 0.070711 0.000000\r
-v 0.038268 0.092388 0.000000\r
-v 0.000000 0.100000 0.000000\r
-v -0.038268 0.092388 -0.000000\r
-v -0.070711 0.070711 -0.000000\r
-v -0.092388 0.038268 -0.000000\r
-v -0.092388 0.035355 0.014645\r
-v -0.070711 0.065328 0.027060\r
-v -0.038268 0.085355 0.035355\r
-v 0.000000 0.092388 0.038268\r
-v 0.038268 0.085355 0.035355\r
-v 0.070711 0.065328 0.027060\r
-v 0.092388 0.035355 0.014645\r
-v 0.092388 0.027060 0.027060\r
-v 0.070711 0.050000 0.050000\r
-v 0.038268 0.065328 0.065328\r
-v 0.000000 0.070711 0.070711\r
-v -0.038268 0.065328 0.065328\r
-v -0.070711 0.050000 0.050000\r
-v -0.092388 0.027060 0.027060\r
-v -0.092388 0.014645 0.035355\r
-v -0.070711 0.027060 0.065328\r
-v -0.038268 0.035355 0.085355\r
-v -0.000000 0.038268 0.092388\r
-v 0.038268 0.035355 0.085355\r
-v 0.070711 0.027060 0.065328\r
-v 0.092388 0.014645 0.035355\r
-v 0.092388 -0.000000 0.038268\r
-v 0.070711 -0.000000 0.070711\r
-v 0.038268 -0.000000 0.092388\r
-v -0.000000 0.000000 0.100000\r
-v -0.038268 -0.000000 0.092388\r
-v -0.070711 -0.000000 0.070711\r
-v -0.092388 0.000000 0.038268\r
-v -0.092388 -0.014645 0.035355\r
-v -0.070711 -0.027060 0.065328\r
-v -0.038268 -0.035355 0.085355\r
-v -0.000000 -0.038268 0.092388\r
-v 0.038268 -0.035355 0.085355\r
-v 0.070711 -0.027060 0.065328\r
-v 0.092388 -0.014645 0.035355\r
-v 0.092388 -0.027060 0.027060\r
-v 0.070711 -0.050000 0.050000\r
-v 0.038268 -0.065328 0.065328\r
-v -0.000000 -0.070711 0.070711\r
-v -0.038268 -0.065328 0.065328\r
-v -0.070711 -0.050000 0.050000\r
-v -0.092388 -0.027060 0.027060\r
-v -0.100000 -0.000000 0.000000\r
-v -0.092388 -0.035355 0.014645\r
-v -0.070711 -0.065328 0.027060\r
-v -0.038268 -0.085355 0.035355\r
-v -0.000000 -0.092388 0.038268\r
-v 0.038268 -0.085355 0.035355\r
-v 0.070711 -0.065328 0.027060\r
-v 0.092388 -0.035355 0.014645\r
-v 0.092388 -0.038268 0.000000\r
-v 0.070711 -0.070711 0.000000\r
-v 0.038268 -0.092388 0.000000\r
-v 0.000000 -0.100000 0.000000\r
-v -0.038268 -0.092388 -0.000000\r
-v -0.070711 -0.070711 -0.000000\r
-v -0.092388 -0.038268 -0.000000\r
-v -0.092388 -0.035355 -0.014645\r
-v -0.070711 -0.065328 -0.027060\r
-v -0.038268 -0.085355 -0.035355\r
-v 0.000000 -0.092388 -0.038268\r
-v 0.038268 -0.085355 -0.035355\r
-v 0.070711 -0.065328 -0.027060\r
-v 0.092388 -0.035355 -0.014645\r
-v 0.092388 -0.027060 -0.027060\r
-v 0.070711 -0.050000 -0.050000\r
-v 0.038268 -0.065328 -0.065328\r
-v 0.000000 -0.070711 -0.070711\r
-v -0.038268 -0.065328 -0.065328\r
-v -0.070711 -0.050000 -0.050000\r
-v -0.092388 -0.027060 -0.027060\r
-v -0.092388 -0.014645 -0.035355\r
-v -0.070711 -0.027060 -0.065328\r
-v -0.038268 -0.035355 -0.085355\r
-v 0.000000 -0.038268 -0.092388\r
-v 0.038268 -0.035355 -0.085355\r
-v 0.070711 -0.027060 -0.065328\r
-v 0.092388 -0.014645 -0.035355\r
-v 0.070711 0.000000 -0.070711\r
-v 0.038268 0.000000 -0.092388\r
-v 0.000000 0.000000 -0.100000\r
-v -0.038268 0.000000 -0.092388\r
-v -0.070711 0.000000 -0.070711\r
-v -0.092388 0.000000 -0.038268\r
-v 0.232388 -0.014645 -0.035355\r
-v 0.232388 -0.027060 -0.027060\r
-v 0.232388 -0.035355 -0.014645\r
-v 0.232388 -0.038268 0.000000\r
-v 0.232388 -0.035355 0.014645\r
-v 0.232388 -0.027060 0.027060\r
-v 0.232388 -0.014645 0.035355\r
-v 0.232388 -0.000000 0.038268\r
-v 0.232388 0.014645 0.035355\r
-v 0.232388 0.027060 0.027060\r
-v 0.232388 0.035355 0.014645\r
-v 0.232388 0.038268 0.000000\r
-v 0.232388 0.035355 -0.014645\r
-v 0.232388 0.027060 -0.027060\r
-v 0.232388 0.014645 -0.035355\r
-v 0.232388 -0.000000 -0.038268\r
-v 0.231045 -0.000000 -0.153073\r
-v 0.231045 0.058579 -0.141421\r
-v 0.511493 -0.000000 0.000000\r
-v 0.231045 0.108239 -0.108239\r
-v 0.231045 0.141421 -0.058579\r
-v 0.231045 0.153073 0.000000\r
-v 0.231045 0.141421 0.058579\r
-v 0.231045 0.108239 0.108239\r
-v 0.231045 0.058579 0.141421\r
-v 0.231045 -0.000000 0.153073\r
-v 0.231045 -0.058579 0.141421\r
-v 0.231045 -0.108239 0.108239\r
-v 0.231045 -0.141421 0.058579\r
-v 0.231045 -0.153073 0.000000\r
-v 0.231045 -0.141421 -0.058579\r
-v 0.231045 -0.108239 -0.108239\r
-v 0.231045 -0.058579 -0.141421\r
-vn -0.999929 -0.002325 0.011699\r
-vn -0.999929 -0.006629 0.009917\r
-vn -0.999929 -0.009918 0.006627\r
-vn -0.999929 -0.011699 0.002327\r
-vn -0.999929 -0.011699 -0.002327\r
-vn -0.999929 -0.009918 -0.006627\r
-vn -0.999929 -0.006627 -0.009918\r
-vn -0.999929 -0.002327 -0.011699\r
-vn -0.999929 0.002327 -0.011699\r
-vn -0.999929 0.006627 -0.009918\r
-vn -0.999929 0.009918 -0.006627\r
-vn -0.999929 0.011699 -0.002327\r
-vn -0.999929 0.011699 0.002327\r
-vn -0.999929 0.009918 0.006627\r
-vn -0.999929 0.006627 0.009918\r
-vn -0.999929 0.002327 0.011699\r
-vn -1.000000 0.000000 0.000000\r
-vn -0.924070 0.146245 -0.353099\r
-vn -0.924070 0.000000 -0.382183\r
-vn -0.707602 0.270394 -0.652791\r
-vn -0.707602 0.000000 -0.706565\r
-vn -0.383129 0.353465 -0.853359\r
-vn -0.383129 0.000000 -0.923673\r
-vn 0.000000 0.382672 -0.923856\r
-vn 0.000000 0.000000 -1.000000\r
-vn 0.383129 0.353465 -0.853359\r
-vn 0.383129 0.000000 -0.923673\r
-vn 0.707602 0.270394 -0.652791\r
-vn 0.707602 0.000000 -0.706565\r
-vn 0.474532 0.336833 -0.813227\r
-vn 0.474532 0.000000 -0.880215\r
-vn 0.707602 0.499619 -0.499619\r
-vn 0.474532 0.622395 -0.622395\r
-vn 0.383129 0.653127 -0.653127\r
-vn 0.000000 0.707083 -0.707083\r
-vn -0.383129 0.653127 -0.653127\r
-vn -0.707602 0.499619 -0.499619\r
-vn -0.924070 0.270241 -0.270241\r
-vn -0.924070 0.353099 -0.146245\r
-vn -0.707602 0.652791 -0.270394\r
-vn -0.383129 0.853359 -0.353465\r
-vn 0.000000 0.923856 -0.382672\r
-vn 0.383129 0.853359 -0.353465\r
-vn 0.707602 0.652791 -0.270394\r
-vn 0.474532 0.813227 -0.336833\r
-vn 0.707602 0.706565 0.000000\r
-vn 0.474532 0.880215 0.000000\r
-vn 0.383129 0.923673 0.000000\r
-vn 0.000000 1.000000 0.000000\r
-vn -0.383129 0.923673 0.000000\r
-vn -0.707602 0.706565 0.000000\r
-vn -0.924070 0.382183 0.000000\r
-vn -0.924070 0.353099 0.146245\r
-vn -0.707602 0.652791 0.270394\r
-vn -0.383129 0.853359 0.353465\r
-vn 0.000000 0.923856 0.382672\r
-vn 0.383129 0.853359 0.353465\r
-vn 0.707602 0.652791 0.270394\r
-vn 0.474532 0.813227 0.336833\r
-vn 0.707602 0.499619 0.499619\r
-vn 0.474532 0.622395 0.622395\r
-vn 0.383129 0.653127 0.653127\r
-vn 0.000000 0.707083 0.707083\r
-vn -0.383129 0.653127 0.653127\r
-vn -0.707602 0.499619 0.499619\r
-vn -0.924070 0.270241 0.270241\r
-vn -0.924070 0.146245 0.353099\r
-vn -0.707602 0.270394 0.652791\r
-vn -0.383129 0.353465 0.853359\r
-vn 0.000000 0.382672 0.923856\r
-vn 0.383129 0.353465 0.853359\r
-vn 0.707602 0.270394 0.652791\r
-vn 0.474532 0.336833 0.813227\r
-vn 0.707602 0.000000 0.706565\r
-vn 0.474532 0.000000 0.880215\r
-vn 0.383129 0.000000 0.923673\r
-vn 0.000000 0.000000 1.000000\r
-vn -0.383129 0.000000 0.923673\r
-vn -0.707602 0.000000 0.706565\r
-vn -0.924070 0.000000 0.382183\r
-vn -0.924070 -0.146245 0.353099\r
-vn -0.707602 -0.270394 0.652791\r
-vn -0.383129 -0.353465 0.853359\r
-vn 0.000000 -0.382672 0.923856\r
-vn 0.383129 -0.353465 0.853359\r
-vn 0.707602 -0.270394 0.652791\r
-vn 0.474532 -0.336833 0.813227\r
-vn 0.707602 -0.499619 0.499619\r
-vn 0.474532 -0.622395 0.622395\r
-vn 0.383129 -0.653127 0.653127\r
-vn 0.000000 -0.707083 0.707083\r
-vn -0.383129 -0.653127 0.653127\r
-vn -0.707602 -0.499619 0.499619\r
-vn -0.924070 -0.270241 0.270241\r
-vn -0.924070 -0.353099 0.146245\r
-vn -0.707602 -0.652791 0.270394\r
-vn -0.383129 -0.853359 0.353465\r
-vn 0.000000 -0.923856 0.382672\r
-vn 0.383129 -0.853359 0.353465\r
-vn 0.707602 -0.652791 0.270394\r
-vn 0.474532 -0.813227 0.336833\r
-vn 0.707602 -0.706565 0.000000\r
-vn 0.474532 -0.880215 0.000000\r
-vn 0.383129 -0.923673 0.000000\r
-vn 0.000000 -1.000000 0.000000\r
-vn -0.383129 -0.923673 0.000000\r
-vn -0.707602 -0.706565 0.000000\r
-vn -0.924070 -0.382183 0.000000\r
-vn -0.924070 -0.353099 -0.146245\r
-vn -0.707602 -0.652791 -0.270394\r
-vn -0.383129 -0.853359 -0.353465\r
-vn 0.000000 -0.923856 -0.382672\r
-vn 0.383129 -0.853359 -0.353465\r
-vn 0.707602 -0.652791 -0.270394\r
-vn 0.474532 -0.813227 -0.336833\r
-vn 0.707602 -0.499619 -0.499619\r
-vn 0.474532 -0.622395 -0.622395\r
-vn 0.383129 -0.653127 -0.653127\r
-vn 0.000000 -0.707083 -0.707083\r
-vn -0.383129 -0.653127 -0.653127\r
-vn -0.707602 -0.499619 -0.499619\r
-vn -0.924070 -0.270241 -0.270241\r
-vn -0.924070 -0.146245 -0.353099\r
-vn -0.707602 -0.270394 -0.652791\r
-vn -0.383129 -0.353465 -0.853359\r
-vn 0.000000 -0.382672 -0.923856\r
-vn 0.383129 -0.353465 -0.853359\r
-vn 0.707602 -0.270394 -0.652791\r
-vn 0.474532 -0.336833 -0.813227\r
-vn -0.718070 0.000000 -0.695944\r
-vn -0.718070 -0.266305 -0.642964\r
-vn -0.718070 -0.492080 -0.492080\r
-vn -0.718070 -0.642964 -0.266305\r
-vn -0.718070 -0.695944 0.000000\r
-vn -0.718070 -0.642964 0.266305\r
-vn -0.718070 -0.492080 0.492080\r
-vn -0.718070 -0.266305 0.642964\r
-vn -0.718070 0.000000 0.695944\r
-vn -0.718070 0.266305 0.642964\r
-vn -0.718070 0.492080 0.492080\r
-vn -0.718070 0.642964 0.266305\r
-vn -0.718070 0.695944 0.000000\r
-vn -0.718070 0.642964 -0.266305\r
-vn -0.718070 0.492080 -0.492080\r
-vn -0.718070 0.266305 -0.642964\r
-vn -0.526292 0.000000 -0.850276\r
-vn -0.526292 0.325388 -0.785546\r
-vn 1.000000 0.000000 0.000000\r
-vn -0.526292 0.601245 -0.601245\r
-vn -0.526292 0.785546 -0.325388\r
-vn -0.526292 0.850276 0.000000\r
-vn -0.526292 0.785546 0.325388\r
-vn -0.526292 0.601245 0.601245\r
-vn -0.526292 0.325388 0.785546\r
-vn -0.526292 0.000000 0.850276\r
-vn -0.526292 -0.325388 0.785546\r
-vn -0.526292 -0.601245 0.601245\r
-vn -0.526292 -0.785546 0.325388\r
-vn -0.526292 -0.850276 0.000000\r
-vn -0.526292 -0.785546 -0.325388\r
-vn -0.526292 -0.601245 -0.601245\r
-vn -0.526292 -0.325388 -0.785546\r
-usemtl (null)\r
-usemtl (null)\r
-s off\r
-f 129//1 128//1 131//1 130//1\r
-f 128//2 127//2 133//2 131//2\r
-f 127//3 126//3 134//3 133//3\r
-f 126//4 125//4 135//4 134//4\r
-f 125//5 124//5 136//5 135//5\r
-f 124//6 123//6 137//6 136//6\r
-f 123//7 122//7 138//7 137//7\r
-f 122//8 121//8 139//8 138//8\r
-f 121//9 120//9 140//9 139//9\r
-f 120//10 119//10 141//10 140//10\r
-f 119//11 118//11 142//11 141//11\r
-f 118//12 117//12 143//12 142//12\r
-f 117//13 116//13 144//13 143//13\r
-f 116//14 115//14 145//14 144//14\r
-f 115//15 114//15 146//15 145//15\r
-f 114//16 129//16 130//16 146//16\r
-s 1\r
-f 72//17 2//18 113//19\r
-f 113//19 2//18 3//20 112//21\r
-f 112//21 3//20 4//22 111//23\r
-f 111//23 4//22 5//24 110//25\r
-f 110//25 5//24 6//26 109//27\r
-f 109//27 6//26 7//28 108//29\r
-f 8//30 1//31 108//29 7//28\r
-f 7//28 10//32 9//33 8//30\r
-f 6//26 11//34 10//32 7//28\r
-f 5//24 12//35 11//34 6//26\r
-f 4//22 13//36 12//35 5//24\r
-f 3//20 14//37 13//36 4//22\r
-f 2//18 15//38 14//37 3//20\r
-f 72//17 15//38 2//18\r
-f 72//17 16//39 15//38\r
-f 15//38 16//39 17//40 14//37\r
-f 14//37 17//40 18//41 13//36\r
-f 13//36 18//41 19//42 12//35\r
-f 12//35 19//42 20//43 11//34\r
-f 11//34 20//43 21//44 10//32\r
-f 10//32 21//44 22//45 9//33\r
-f 21//44 24//46 23//47 22//45\r
-f 20//43 25//48 24//46 21//44\r
-f 19//42 26//49 25//48 20//43\r
-f 18//41 27//50 26//49 19//42\r
-f 17//40 28//51 27//50 18//41\r
-f 16//39 29//52 28//51 17//40\r
-f 72//17 29//52 16//39\r
-f 72//17 30//53 29//52\r
-f 29//52 30//53 31//54 28//51\r
-f 28//51 31//54 32//55 27//50\r
-f 27//50 32//55 33//56 26//49\r
-f 26//49 33//56 34//57 25//48\r
-f 25//48 34//57 35//58 24//46\r
-f 24//46 35//58 36//59 23//47\r
-f 35//58 38//60 37//61 36//59\r
-f 34//57 39//62 38//60 35//58\r
-f 33//56 40//63 39//62 34//57\r
-f 32//55 41//64 40//63 33//56\r
-f 31//54 42//65 41//64 32//55\r
-f 30//53 43//66 42//65 31//54\r
-f 72//17 43//66 30//53\r
-f 72//17 44//67 43//66\r
-f 43//66 44//67 45//68 42//65\r
-f 42//65 45//68 46//69 41//64\r
-f 41//64 46//69 47//70 40//63\r
-f 40//63 47//70 48//71 39//62\r
-f 39//62 48//71 49//72 38//60\r
-f 38//60 49//72 50//73 37//61\r
-f 49//72 52//74 51//75 50//73\r
-f 48//71 53//76 52//74 49//72\r
-f 47//70 54//77 53//76 48//71\r
-f 46//69 55//78 54//77 47//70\r
-f 45//68 56//79 55//78 46//69\r
-f 44//67 57//80 56//79 45//68\r
-f 72//17 57//80 44//67\r
-f 72//17 58//81 57//80\r
-f 57//80 58//81 59//82 56//79\r
-f 56//79 59//82 60//83 55//78\r
-f 55//78 60//83 61//84 54//77\r
-f 54//77 61//84 62//85 53//76\r
-f 53//76 62//85 63//86 52//74\r
-f 52//74 63//86 64//87 51//75\r
-f 63//86 66//88 65//89 64//87\r
-f 62//85 67//90 66//88 63//86\r
-f 61//84 68//91 67//90 62//85\r
-f 60//83 69//92 68//91 61//84\r
-f 59//82 70//93 69//92 60//83\r
-f 58//81 71//94 70//93 59//82\r
-f 72//17 71//94 58//81\r
-f 72//17 73//95 71//94\r
-f 71//94 73//95 74//96 70//93\r
-f 70//93 74//96 75//97 69//92\r
-f 69//92 75//97 76//98 68//91\r
-f 68//91 76//98 77//99 67//90\r
-f 67//90 77//99 78//100 66//88\r
-f 66//88 78//100 79//101 65//89\r
-f 78//100 81//102 80//103 79//101\r
-f 77//99 82//104 81//102 78//100\r
-f 76//98 83//105 82//104 77//99\r
-f 75//97 84//106 83//105 76//98\r
-f 74//96 85//107 84//106 75//97\r
-f 73//95 86//108 85//107 74//96\r
-f 72//17 86//108 73//95\r
-f 72//17 87//109 86//108\r
-f 86//108 87//109 88//110 85//107\r
-f 85//107 88//110 89//111 84//106\r
-f 84//106 89//111 90//112 83//105\r
-f 83//105 90//112 91//113 82//104\r
-f 82//104 91//113 92//114 81//102\r
-f 81//102 92//114 93//115 80//103\r
-f 92//114 95//116 94//117 93//115\r
-f 91//113 96//118 95//116 92//114\r
-f 90//112 97//119 96//118 91//113\r
-f 89//111 98//120 97//119 90//112\r
-f 88//110 99//121 98//120 89//111\r
-f 87//109 100//122 99//121 88//110\r
-f 72//17 100//122 87//109\r
-f 72//17 101//123 100//122\r
-f 100//122 101//123 102//124 99//121\r
-f 99//121 102//124 103//125 98//120\r
-f 98//120 103//125 104//126 97//119\r
-f 97//119 104//126 105//127 96//118\r
-f 96//118 105//127 106//128 95//116\r
-f 95//116 106//128 107//129 94//117\r
-f 1//31 107//129 106//128 108//29\r
-f 105//127 109//27 108//29 106//128\r
-f 104//126 110//25 109//27 105//127\r
-f 103//125 111//23 110//25 104//126\r
-f 102//124 112//21 111//23 103//125\r
-f 101//123 113//19 112//21 102//124\r
-f 72//17 113//19 101//123\r
-f 107//129 1//31 129//130 114//131\r
-f 94//117 107//129 114//131 115//132\r
-f 93//115 94//117 115//132 116//133\r
-f 80//103 93//115 116//133 117//134\r
-f 79//101 80//103 117//134 118//135\r
-f 65//89 79//101 118//135 119//136\r
-f 64//87 65//89 119//136 120//137\r
-f 51//75 64//87 120//137 121//138\r
-f 50//73 51//75 121//138 122//139\r
-f 37//61 50//73 122//139 123//140\r
-f 36//59 37//61 123//140 124//141\r
-f 23//47 36//59 124//141 125//142\r
-f 22//45 23//47 125//142 126//143\r
-f 9//33 22//45 126//143 127//144\r
-f 8//30 9//33 127//144 128//145\r
-f 1//31 8//30 128//145 129//130\r
-f 130//146 131//147 132//148\r
-f 131//147 133//149 132//148\r
-f 133//149 134//150 132//148\r
-f 134//150 135//151 132//148\r
-f 135//151 136//152 132//148\r
-f 136//152 137//153 132//148\r
-f 137//153 138//154 132//148\r
-f 138//154 139//155 132//148\r
-f 139//155 140//156 132//148\r
-f 140//156 141//157 132//148\r
-f 141//157 142//158 132//148\r
-f 142//158 143//159 132//148\r
-f 143//159 144//160 132//148\r
-f 144//160 145//161 132//148\r
-f 145//161 146//162 132//148\r
-f 146//162 130//146 132//148\r
index 33501414f567d2ecf68d29ade890904c6cfd1722..1a6d8f47be6c7f0295ce351ee011de92d8287185 100644 (file)
@@ -4,22 +4,22 @@
    <extension\r
          point="org.simantics.db.resourceAdapter">\r
       <resource_adapter\r
-            adapter_class="fi.vtt.simantics.processeditor.handlers.Plant3DProjectAdapter"\r
+            adapter_class="org.simantics.processeditor.handlers.Plant3DProjectAdapter"\r
             operation="http://www.vtt.fi/Simantics/Layer0/1.0/Relations#HasProjectTypeAdapter"\r
             type_uri="http://www.vtt.fi/Simantics/Plant3D/1.0/Types#Plant3DProjectType">\r
       </resource_adapter>\r
       <resource_adapter\r
-            adapter_class="fi.vtt.simantics.processeditor.adapters.NozzleConstraintAdapter"\r
+            adapter_class="org.simantics.processeditor.adapters.NozzleConstraintAdapter"\r
             operation="http://www.vtt.fi/Simantics/G3D/1.0/Relations#HasConstraints"\r
             type_uri="http://www.vtt.fi/Simantics/Plant3D/1.0/Types#Nozzle">\r
       </resource_adapter>\r
       <resource_adapter\r
-            adapter_class="fi.vtt.simantics.processeditor.adapters.InlineComponentConstraintAdapter"\r
+            adapter_class="org.simantics.processeditor.adapters.InlineComponentConstraintAdapter"\r
             operation="http://www.vtt.fi/Simantics/G3D/1.0/Relations#HasConstraints"\r
             type_uri="http://www.vtt.fi/Simantics/Plant3D/1.0/Types#InlineComponent">\r
       </resource_adapter>\r
       <resource_adapter\r
-            adapter_class="fi.vtt.simantics.processeditor.adapters.TurnComponentConstraintAdapter"\r
+            adapter_class="org.simantics.processeditor.adapters.TurnComponentConstraintAdapter"\r
             operation="http://www.vtt.fi/Simantics/G3D/1.0/Relations#HasConstraints"\r
             type_uri="http://www.vtt.fi/Simantics/Plant3D/1.0/Types#TurnComponent">\r
       </resource_adapter>\r
    <extension\r
          point="org.eclipse.ui.editors">\r
       <editor\r
-            class="fi.vtt.simantics.processeditor.views.ProcessEditorPart"\r
+            class="org.simantics.processeditor.views.ProcessEditorPart"\r
             icon="icons/factory.png"\r
             id="org.simantics.proconf.processeditor.planteditor"\r
             name="Plant Editor">\r
       </editor>\r
       <editor\r
-            class="fi.vtt.simantics.processeditor.views.PipelineComponentEditorPart"\r
+            class="org.simantics.processeditor.views.PipelineComponentEditorPart"\r
             icon="icons/Component.png"\r
             id="org.simantics.proconf.processeditor.componenteditor"\r
             name="Component Editor">\r
       </editor>\r
       <editor\r
-            class="fi.vtt.simantics.processeditor.views.EquipmentEditorPart"\r
+            class="org.simantics.processeditor.views.EquipmentEditorPart"\r
             icon="icons/tank.png"\r
             id="org.simantics.proconf.processeditor.equipmenteditor"\r
             name="Equipment Editor">\r
@@ -48,7 +48,7 @@
    <extension\r
          point="org.eclipse.ui.views">\r
       <view\r
-            class="fi.vtt.simantics.processeditor.views.PlantStructureView"\r
+            class="org.simantics.processeditor.views.PlantStructureView"\r
             icon="icons/factory.png"\r
             id="org.simantics.proconf.processeditor.plantstructure"\r
             name="Plant Structure">\r
    <extension\r
          point="org.eclipse.ui.handlers">\r
       <handler\r
-            class="fi.vtt.simantics.processeditor.handlers.NewPlantHandler"\r
+            class="org.simantics.processeditor.handlers.NewPlantHandler"\r
             commandId="org.simantics.proconf.processeditor.commands.newPlant">\r
       </handler>\r
       <handler\r
-            class="fi.vtt.simantics.processeditor.handlers.NewEquipmentHandler"\r
+            class="org.simantics.processeditor.handlers.NewEquipmentHandler"\r
             commandId="org.simantics.proconf.processeditor.commands.newEquipment">\r
       </handler>\r
       <handler\r
-            class="fi.vtt.simantics.processeditor.handlers.NewComponentHandler"\r
+            class="org.simantics.processeditor.handlers.NewComponentHandler"\r
             commandId="org.simantics.proconf.processeditor.commands.newComponent">\r
       </handler>\r
    </extension>\r
    <extension\r
          point="org.simantics.proconf.ui.resourceEditorAdapter">\r
       <adapterClass\r
-            class="fi.vtt.simantics.processeditor.handlers.Plant3DEditorAdapter"\r
+            class="org.simantics.processeditor.handlers.Plant3DEditorAdapter"\r
             id="org.simantics.proconf.processeditor.ResourceEditorDescription1">\r
       </adapterClass>\r
       <adapterClass\r
-            class="fi.vtt.simantics.processeditor.handlers.PipelineComponentEditorAdapter"\r
+            class="org.simantics.processeditor.handlers.PipelineComponentEditorAdapter"\r
             id="org.simantics.proconf.processeditor.ResourceEditorDescription2">\r
       </adapterClass>\r
       <adapterClass\r
-            class="fi.vtt.simantics.processeditor.handlers.EquipmentEditorAdapter"\r
+            class="org.simantics.processeditor.handlers.EquipmentEditorAdapter"\r
             id="org.simantics.proconf.processeditor.ResourceEditorDescription3">\r
       </adapterClass>\r
    </extension>\r
    <extension\r
          point="org.eclipse.ui.perspectives">\r
       <perspective\r
-            class="fi.vtt.simantics.processeditor.perspectives.Plant3DModellingPerspective"\r
+            class="org.simantics.processeditor.perspectives.Plant3DModellingPerspective"\r
             icon="icons/factory.png"\r
             id="org.simantics.proconf.processeditor.plantmodelling"\r
             name="3D Plant Modelling">\r
    <extension\r
          point="org.simantics.proconf.g3d.geometry">\r
       <Geometry\r
-            class="fi.vtt.simantics.processeditor.common.PipeComponentProvider"\r
+            class="org.simantics.processeditor.common.PipeComponentProvider"\r
             id="org.simantics.proconf.processeditor.Geometry1">\r
       </Geometry>\r
    </extension>\r
diff --git a/org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/PositionType.java b/org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/PositionType.java
deleted file mode 100644 (file)
index 0ab3a5b..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-package fi.vtt.simantics.processeditor.actions;\r
-\r
-\r
-/**\r
- * Position types for inserting new components and routing new pipe\r
- * \r
- * @author Marko Luukkainen <Marko.Luukkainen@vtt.fi>\r
- *\r
- */\r
-public enum PositionType {\r
-       SPLIT,\r
-       NEXT,\r
-       PREVIOUS,\r
-       PORT\r
-}\r
diff --git a/org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/SplitPointListener.java b/org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/SplitPointListener.java
deleted file mode 100644 (file)
index d766ad3..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-package fi.vtt.simantics.processeditor.actions;\r
-\r
-import javax.vecmath.Point3d;\r
-\r
-/**\r
- * SplitPointListener is used by SplitPointAction to pass the selected split point.\r
- * Implementing class must set itself as active action into editor (SplitPointAction won't close automatically). \r
- * \r
- * @author Marko Luukkainen <Marko.Luukkainen@vtt.fi>\r
- *\r
- */\r
-public interface SplitPointListener {\r
-\r
-       /**\r
-        * Sets selected split point, or null if user cancelled the action.\r
-        * @param point\r
-        */\r
-       public void setSplitPoint(Point3d point);\r
-}\r
diff --git a/org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/Plant3DProjectAdapter.java b/org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/Plant3DProjectAdapter.java
deleted file mode 100644 (file)
index 305b636..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-package fi.vtt.simantics.processeditor.handlers;\r
-\r
-import org.simantics.db.Graph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.adaption.AdaptionException;\r
-import org.simantics.db.adaption.ResourceAdapter;\r
-\r
-public class Plant3DProjectAdapter implements ResourceAdapter {\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public <T> T adapt(Graph graph, Resource resource, Resource mia) throws AdaptionException {\r
-               return (T) new Plant3DProjectType(graph,resource);\r
-       }\r
-}\r
diff --git a/org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/perspectives/Plant3DModellingPerspective.java b/org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/perspectives/Plant3DModellingPerspective.java
deleted file mode 100644 (file)
index f7cceaa..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-package fi.vtt.simantics.processeditor.perspectives;\r
-\r
-import org.eclipse.ui.IPageLayout;\r
-import org.eclipse.ui.IPerspectiveFactory;\r
-\r
-public class Plant3DModellingPerspective implements IPerspectiveFactory{\r
-       \r
-       @Override\r
-       public void createInitialLayout(IPageLayout layout) {\r
-               \r
-       }\r
-\r
-}\r
diff --git a/org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/views/PlantStructureView.java b/org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/views/PlantStructureView.java
deleted file mode 100644 (file)
index 6685e36..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-package fi.vtt.simantics.processeditor.views;\r
-\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.simantics.db.management.ISessionContext;\r
-import org.simantics.layer0.utils.viewpoints.ResourceViewpoint;\r
-import org.simantics.proconf.browsing.GraphExplorer;\r
-import org.simantics.proconf.browsing.views.GraphExplorerView;\r
-\r
-import fi.vtt.simantics.processeditor.perspectives.ViewpointGenerator;\r
-\r
-public class PlantStructureView extends GraphExplorerView {\r
-\r
-       @Override\r
-       protected GraphExplorer createExplorer(Composite parent) {\r
-               return super.createExplorer(parent);\r
-       }\r
-       \r
-       @Override\r
-       protected ResourceViewpoint getViewpoint(ISessionContext context) {\r
-               return ViewpointGenerator.createViewpoint();\r
-       }\r
-}\r
diff --git a/org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/views/ProcessEditor.java b/org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/views/ProcessEditor.java
deleted file mode 100644 (file)
index 5aae588..0000000
+++ /dev/null
@@ -1,704 +0,0 @@
-/*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.views;\r
-\r
-import java.util.ArrayList;\r
-import java.util.Collection;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import org.eclipse.jface.action.Action;\r
-import org.eclipse.jface.dialogs.Dialog;\r
-import org.eclipse.jface.dialogs.IDialogConstants;\r
-import org.eclipse.jface.viewers.ISelection;\r
-import org.eclipse.jface.viewers.ISelectionChangedListener;\r
-import org.eclipse.jface.viewers.SelectionChangedEvent;\r
-import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.events.KeyEvent;\r
-import org.eclipse.swt.events.KeyListener;\r
-import org.eclipse.swt.events.SelectionEvent;\r
-import org.eclipse.swt.events.SelectionListener;\r
-import org.eclipse.swt.layout.GridData;\r
-import org.eclipse.swt.widgets.Button;\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.eclipse.swt.widgets.Control;\r
-import org.eclipse.swt.widgets.Label;\r
-import org.eclipse.swt.widgets.Shell;\r
-import org.eclipse.swt.widgets.Text;\r
-import org.eclipse.ui.IWorkbenchPart;\r
-import org.eclipse.ui.views.contentoutline.IContentOutlinePage;\r
-import org.simantics.db.Graph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.Session;\r
-import org.simantics.db.management.ISessionContext;\r
-import org.simantics.layer0.utils.EntityFactory;\r
-import org.simantics.layer0.utils.IEntity;\r
-import org.simantics.layer0.utils.Property;\r
-import org.simantics.proconf.g3d.base.JmeRenderingComponent;\r
-import org.simantics.proconf.g3d.base.ScenegraphAdapter;\r
-import org.simantics.proconf.g3d.base.ScenegraphAdapterImpl;\r
-import org.simantics.proconf.g3d.base.SelectionAdapter;\r
-import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
-import org.simantics.proconf.g3d.common.StructuredResourceSelection;\r
-import org.simantics.proconf.g3d.scenegraph.IGeometryNode;\r
-import org.simantics.proconf.g3d.scenegraph.IGraphicsNode;\r
-import org.simantics.proconf.g3d.scenegraph.ISelectableNode;\r
-import org.simantics.proconf.g3d.scenegraph.ParameterizedModelNode;\r
-import org.simantics.proconf.g3d.shapes.FloorShape;\r
-import org.simantics.proconf.g3d.stubs.G3DNode;\r
-import org.simantics.utils.ErrorLogger;\r
-import org.simantics.utils.ui.jface.MenuTools;\r
-\r
-import com.jme.math.Vector3f;\r
-import com.jme.scene.Geometry;\r
-\r
-import fi.vtt.simantics.processeditor.Activator;\r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.actions.InsertComponentAction;\r
-import fi.vtt.simantics.processeditor.actions.InsertEquipmentAction;\r
-import fi.vtt.simantics.processeditor.actions.InsertNozzleAction;\r
-import fi.vtt.simantics.processeditor.actions.RoutePipeAction;\r
-import fi.vtt.simantics.processeditor.common.ControlPointTools;\r
-import fi.vtt.simantics.processeditor.common.PipingRules;\r
-import fi.vtt.simantics.processeditor.scenegraph.NonVisibleNode;\r
-import fi.vtt.simantics.processeditor.scenegraph.PipelineComponentNode;\r
-import fi.vtt.simantics.processeditor.scenegraph.PipeComponentNode;\r
-import fi.vtt.simantics.processeditor.scenegraph.PipeRunNode;\r
-import fi.vtt.simantics.processeditor.stubs.PipeControlPoint;\r
-import fi.vtt.simantics.processeditor.stubs.PipeRun;\r
-import fi.vtt.simantics.processeditor.stubs.Plant;\r
-import fi.vtt.simantics.processeditor.stubs.Plant3DResource;\r
-import fi.vtt.simantics.processeditor.tools.PlantEditContribution;\r
-import fi.vtt.simantics.processeditor.tools.PlantVisualizationContribution;\r
-\r
-public class ProcessEditor extends ThreeDimensionalEditorBase {\r
-    \r
-    private Resource plantResource = null;\r
-    \r
-    //private List<AnimationController> animationControllers = new ArrayList<AnimationController>();\r
-\r
-    private Action configureFloorAction = null;\r
-\r
-    private Geometry floorShape = null;\r
-\r
-    public ProcessEditor(ISessionContext session) {\r
-        super(session);\r
-        addEditorContribution(new PlantEditContribution(this));\r
-        addEditorContribution(new PlantVisualizationContribution(this));\r
-    }\r
-    \r
-    public ProcessEditor(ISessionContext session,JmeRenderingComponent component) {\r
-        super(session,component);\r
-        addEditorContribution(new PlantEditContribution(this));\r
-        addEditorContribution(new PlantVisualizationContribution(this));\r
-    }\r
-    \r
-    @Override\r
-    protected ScenegraphAdapter createScenegraphAdapter() {\r
-       return new ProcessEditorAdapter(session,getRenderingComponent());\r
-    }\r
-    \r
-    @Override\r
-    public void createControl(Graph graph,Composite parent) {\r
-       super.createControl(graph,parent);\r
-\r
-       floorShape = FloorShape.getShape(getRenderingComponent().getDisplaySystem().getRenderer(), 100.f,0.2f);\r
-       getRenderingComponent().getNoCastRoot().attachChild(floorShape);\r
-       floorShape.setLocalTranslation(new Vector3f(0.f,-0.01f,0.f));\r
-    }\r
-\r
-    @Override\r
-    protected void makeActions(Graph graph) {\r
-        super.makeActions(graph);\r
-\r
-        //actions.add(new ShowTrendsAction(this));\r
-\r
-        configureFloorAction = new Action() {\r
-               public void run() {\r
-                       FloorConfigureDialog dialog = new FloorConfigureDialog(ProcessEditor.this.parent.getShell());\r
-                       if (dialog.open() == FloorConfigureDialog.CANCEL)\r
-                               return;\r
-                       if (dialog.isFloorEnabled()) {\r
-                               if (floorShape.getParent() == null)\r
-                                       getRenderingComponent().getNoCastRoot().attachChild(floorShape);\r
-                       } else {\r
-                               floorShape.removeFromParent();\r
-                       }\r
-                       floorShape.setLocalTranslation(new Vector3f(0.f,(float)dialog.getFloorHeight(),0.f));\r
-                       \r
-               }\r
-        };\r
-        configureFloorAction.setText("Configure floor");\r
-        configureFloorAction.setImageDescriptor(Activator.imageDescriptorFromPlugin("fi.vtt.proconf.ode", "icons/silk/shape_align_bottom.png"));\r
-\r
-//        ContextActionFactory extended[] = ContextActionRegistry.getActions("fi.vtt.proconf.shapeeditor.processeditorview");\r
-//        for (ContextActionFactory c : extended) {\r
-//             actions.add(c.createAction(this));\r
-//        }\r
-    }\r
-    \r
-//    protected void stopAnimations() {\r
-//     animationSystem.stop();\r
-//    }\r
-    \r
-    protected void fillLocalPullDown() {\r
-       super.fillLocalPullDown();\r
-       MenuTools.getOrCreate(getMenuID(),"Advanced", menuManager).add(configureFloorAction);\r
-    }\r
-    \r
-    protected class ProcessEditorAdapter extends ScenegraphAdapterImpl {\r
-       \r
-        public ProcessEditorAdapter(Session session, JmeRenderingComponent component) {\r
-                       super(session, component);\r
-        }\r
-        \r
-        private class NormalScengraphQuery extends ScenegraphQuery {\r
-               \r
-               public NormalScengraphQuery(Resource node) {\r
-                               super(node);\r
-                       } \r
-                \r
-                \r
-                @Override\r
-               public void shapeAdded(Graph graph, IGraphicsNode node) {\r
-                        // FIXME : this won't work like in previous ProConf\r
-               }\r
-        }\r
-        \r
-        private Map<Resource,PipeRunControlPointQuery> pipeRunQueries = new HashMap<Resource, PipeRunControlPointQuery>();\r
-\r
-               protected ScenegraphQuery newSubnodeListener(G3DNode node) {\r
-               if (node.isInstanceOf(ProcessResource.plant3Dresource.PipeRun)) {\r
-                   PipeRunControlPointQuery query = new PipeRunControlPointQuery(node.getResource());\r
-                   pipeRunQueries.put(node.getResource(), query);\r
-                   node.getGraph().performQuery(query);\r
-//                 return new SubnodeListener(node) {\r
-//                     @Override\r
-//                     public void shapeAdded(IGraphicsNode node) {\r
-//                         if (node instanceof IGeometryNode) {\r
-//                             updateGeometry((IGeometryNode)node);\r
-//                             \r
-//                         }\r
-//                         node.setVisible(true);\r
-//                     }\r
-//                 };\r
-               }\r
-               return new NormalScengraphQuery(node.getResource());\r
-                \r
-           }\r
-               \r
-               @Override\r
-               protected NodePropertyQuery newRootPropertyListener(G3DNode root) {\r
-                       // currently Plant does not have any properties.\r
-                       return null;\r
-               }\r
-               \r
-               private class TransformationQuery extends NodeTransformationQuery {\r
-                       \r
-                       public TransformationQuery(Resource res) {\r
-                               super(res);\r
-                       }\r
-                       \r
-                       @Override\r
-                       public void shapeUpdated(Graph graph, IGraphicsNode shape) {\r
-                               //if (shape instanceof IGeometryNode) {\r
-                //    updateGeometry((IGeometryNode)shape);\r
-                //} else {\r
-                       shape.updateTransform(graph);\r
-                //}\r
-                       }\r
-               }\r
-               \r
-               @Override\r
-               protected NodeTransformationQuery newTransformationListener(G3DNode root) {\r
-                       return new TransformationQuery(root.getResource());\r
-               }\r
-               \r
-               private class NormalNodePropertyQuery extends org.simantics.proconf.g3d.base.ScenegraphAdapterImpl.NodePropertyQuery {\r
-                       \r
-                       public NormalNodePropertyQuery(Resource resource) {\r
-                               super(resource);\r
-                       }\r
-\r
-                       @Override\r
-                       public void shapeUpdated(Graph graph,IGraphicsNode shape) {\r
-                               if (shape instanceof IGeometryNode) {\r
-                    updateGeometry((IGeometryNode)shape);\r
-                } else {\r
-                       shape.updateTransform(graph);\r
-                }\r
-                       }\r
-               }\r
-        @Override\r
-       protected NodePropertyQuery newPropertyListener(G3DNode node) {\r
-               return new NormalNodePropertyQuery(node.getResource());\r
-       }\r
-   \r
-        @Override\r
-               protected IGraphicsNode instantiateNode(IGraphicsNode parent,\r
-                               G3DNode node) {\r
-                       Plant3DResource p3r = ProcessResource.plant3Dresource;\r
-                       IGraphicsNode newNode = null;\r
-                       try {\r
-                               if (node.isInstanceOf(p3r.Equipment)) {\r
-                                       newNode = new ParameterizedModelNode(\r
-                                                       ProcessEditor.this, parent, node.getGraph(),\r
-                                                       node.getResource(), p3r.HasGraphics);\r
-                               } else if (node.isInstanceOf(p3r.PipeRun)) {\r
-                                       newNode = new PipeRunNode(parent, node.getGraph(), node.getResource());\r
-                               } else if (node.isInstanceOf(p3r.Nozzle)) {\r
-                                       newNode = new ParameterizedModelNode(\r
-                                                       ProcessEditor.this, parent, node.getGraph(),\r
-                                                       node.getResource(), p3r.HasGraphics);\r
-                                       // CodedComponent must be handled first since it uses\r
-                                       // hard-coded geometries\r
-                                       // TODO : is this really necessary, or could we unify\r
-                                       // PipeComponentNode, InlineComponentNode,...\r
-                               } else if (node.isInstanceOf(p3r.CodedComponent)) {\r
-                                       newNode = new PipeComponentNode(ProcessEditor.this,\r
-                                                       parent, node.getGraph(), node.getResource());\r
-                               } else if (node.isInstanceOf(p3r.NonVisibleComponent)) {\r
-                                       newNode = new NonVisibleNode(parent, node.getGraph(), node.getResource());\r
-                               } else if (node.isInstanceOf(p3r.PipelineComponent)) {\r
-                                       newNode = new PipelineComponentNode(ProcessEditor.this,\r
-                                                       parent, node.getGraph(), node.getResource());\r
-                               } \r
-\r
-                               // } else if (node instanceof Shape) // Markers (ar/mobile)\r
-                               // needed this\r
-                               // newNode = new ShapeNode(TestProcessEditor.this,parent,node);\r
-                               if (newNode != null) {\r
-                                       if (newNode instanceof ISelectableNode)\r
-                                               ((ISelectableNode) newNode).setVisible(true);\r
-                                       if (newNode instanceof IGeometryNode) {\r
-                                               updateGeometry((IGeometryNode) newNode);\r
-                                       }\r
-                                       return newNode;\r
-                               }\r
-                       } catch (Exception e) {\r
-                               ErrorLogger.defaultLogError("Cannot handle node " + node.getResource(), e);\r
-                               return null;\r
-                       }\r
-                       ErrorLogger.defaultLogError("Cannot handle node " + node.getResource(), null);\r
-                       return null;\r
-\r
-               }\r
-\r
-               /**\r
-                * This is used to create elbows and straight pipes to pipeline TODO :\r
-                * this should be done with rule-engine!\r
-                * \r
-                * \r
-                * @author Marko Luukkainen\r
-                * \r
-                */\r
-               protected class PipeRunControlPointQuery extends NodeQuery {\r
-                       private List<Resource> removed = new ArrayList<Resource>();\r
-                       private List<Resource> added = new ArrayList<Resource>();\r
-\r
-                       public PipeRunControlPointQuery(Resource r) {\r
-                               super(r);\r
-                               if (DEBUG) System.out.println("Created PipeRunControlPointQuery for " + r);\r
-\r
-                       }\r
-\r
-                       @Override\r
-                       protected Object compute2(Graph graph) {\r
-                               PipeRun run = new PipeRun(graph, nodeResource);\r
-                               Collection<IEntity> cps = run\r
-                                               .getRelatedObjects(ProcessResource.plant3Dresource.HasControlPoints);\r
-                               List<Resource> res = new ArrayList<Resource>();\r
-                               for (IEntity t : cps)\r
-                                       res.add(t.getResource());\r
-                               return res;\r
-                       }\r
-\r
-                       @Override\r
-                       public boolean updated(Graph graph, Object oldResult,\r
-                                       Object newResult) {\r
-                               \r
-                               removed.clear();\r
-                               added.clear();\r
-\r
-                               List<Resource> oldCps = (List<Resource>) oldResult;\r
-                               List<Resource> newCps = (List<Resource>) newResult;\r
-                               if (oldCps == null)\r
-                                       oldCps = new ArrayList<Resource>();\r
-\r
-                               for (Resource r : oldCps) {\r
-                                       if (!newCps.contains(r))\r
-                                               removed.add(r);\r
-                               }\r
-\r
-                               for (Resource r : newCps) {\r
-                                       if (!oldCps.contains(r))\r
-                                               added.add(r);\r
-                               }\r
-                               for (Resource r : removed)\r
-                                       removeControlPoint(graph, r);\r
-                               for (Resource r : added) {\r
-                                       addControlPoint(graph, r);\r
-                                       // ControlPointTools.addControlPoint(new\r
-                                       // PipeRun(graph,pipeRun), new PipeControlPoint(graph, r));\r
-                               }\r
-\r
-                               return (added.size() > 0 || removed.size() > 0);\r
-                       }\r
-                       \r
-                       @Override\r
-                       public void dispose() {\r
-                               super.dispose();\r
-                               for (ControlPointPropertyQuery q : controlPointPropertyQueries.values())\r
-                                       q.dispose();\r
-                               controlPointPropertyQueries.clear();\r
-                       }\r
-                       \r
-                       private Map<Resource,ControlPointPropertyQuery> controlPointPropertyQueries = new HashMap<Resource, ControlPointPropertyQuery>();\r
-                       \r
-                       private void addControlPoint(Graph graph, Resource resource) {\r
-                               ControlPointPropertyQuery query = new ControlPointPropertyQuery(resource);\r
-                               graph.performQuery(query);\r
-                               controlPointPropertyQueries.put(resource,query);\r
-                       }\r
-                       \r
-                       private void removeControlPoint(Graph graph, Resource resource) {\r
-                               ControlPointPropertyQuery query = controlPointPropertyQueries.remove(resource);\r
-                               query.dispose();\r
-                               ControlPointTools.removeControlPoint(new PipeControlPoint(\r
-                                               graph, resource));\r
-                       }\r
-\r
-               }\r
-\r
-               protected class ControlPointPropertyQuery extends NodeQuery {\r
-                       boolean initialized = false;\r
-                       \r
-                       public ControlPointPropertyQuery(Resource r) {\r
-                               super(r);\r
-                               if (DEBUG) System.out.println("Created ControlPointPropertyQuery for " + r);\r
-                       }\r
-                       \r
-                       @Override\r
-               public List<Object> compute2(Graph g) {\r
-                       IEntity t = EntityFactory.create(g,nodeResource);\r
-                       \r
-                       Collection<Property> properties = t.getRelatedProperties(ProcessResource.builtins.HasProperty);\r
-                       List<Object> propertyValues = new ArrayList<Object>();\r
-                       p(properties,propertyValues);\r
-\r
-                       return propertyValues;\r
-               }\r
-               \r
-               private void p(Collection<Property> properties, List<Object> propertyValues) {\r
-                       for (Property p : properties) {\r
-                               Collection<Property> subProperties = p.getRelatedProperties(p.getGraph().getBuiltins().HasProperty);\r
-                               if (subProperties.size() != 0) {\r
-                                       p(subProperties,propertyValues);\r
-                               } \r
-                               if (p.hasValue()){\r
-                                       propertyValues.add(p.getValue());\r
-                               }\r
-                       }\r
-               }\r
-                       \r
-                       @Override\r
-                       public boolean updated(Graph graph, Object oldResult, Object newResult) {\r
-                               PipingRules.pipeControlPointPositionUpdate(graph, this.nodeResource);\r
-                               if (initialized) {\r
-                                       //PipingRules.pipeControlPointPositionUpdate(graph, this.nodeResource);\r
-                               } else {\r
-                                       initialized = true;\r
-                               }\r
-                               return true;\r
-                       }\r
-               }\r
-               \r
-               @Override\r
-               protected void removeNode(Resource parent, Resource r) {\r
-                       super.removeNode(parent, r);\r
-                       PipeRunControlPointQuery q = pipeRunQueries.get(r);\r
-                       if (q != null)\r
-                               q.dispose();\r
-               }\r
-               \r
-               @Override\r
-               public void dispose() {\r
-                       super.dispose();\r
-               }\r
-       }\r
-    \r
-    @Override\r
-    protected void pageSelectionChanged(IWorkbenchPart part, ISelection selection) {\r
-        if (!(selection instanceof StructuredResourceSelection)) {\r
-            return;\r
-        }\r
-        \r
-        StructuredResourceSelection s = (StructuredResourceSelection) selection;\r
-        selectionAdapter.setCurrentSelection(s);\r
-        viewChanged = true;\r
-        \r
-        //if (s.getRootSelection() == null) {\r
-        if (!(part instanceof ProcessEditor)) {\r
-            //System.out.println("ShapeEditorView.pageSelectionChanged() no root selection");\r
-               ((ProcessEditorSelectionAdapter)selectionAdapter).setEditorSelection(true);\r
-            return;\r
-        } \r
-        //if (!s.getRootSelection().getResource().getId().equals(plant.getResource().getId())) {\r
-        ProcessEditor sender = (ProcessEditor)part;\r
-        if (!sender.getPlantResource().equals(plantResource)) {\r
-//          System.out.println("ShapeEditorView.pageSelectionChanged() not right group "\r
-//                  + s.getRootSelection().getResource().getId() + " != " + model.getResource().getId());\r
-               selectionAdapter.setCurrentSelection(new StructuredResourceSelection());\r
-               ((ProcessEditorSelectionAdapter)selectionAdapter).setEditorSelection(false);\r
-          return;\r
-      }\r
-        selectionAdapter.setEditorSelection();\r
-        \r
-    }\r
-\r
-    @Override\r
-    protected void reloadFrom(IEntity thing) {\r
-        if (plantResource != null) {\r
-            throw new UnsupportedOperationException("Reloading instantiated viewer not supported");\r
-        }\r
-        if (thing.isInstanceOf(ProcessResource.plant3Dresource.Plant)) {\r
-            plantResource = thing.getResource();\r
-            G3DNode plant = new G3DNode(thing);\r
-            adapter.setRootNode(plant);\r
-            //adapter.addOutbound(plant);\r
-            ControlPointTools.reloadCache(thing.getGraph(),plant.getResource());\r
-        } else {\r
-            throw new IllegalArgumentException("Resource is not a plant");\r
-        } \r
-    }\r
-\r
-    public Resource getPlantResource() {\r
-        return plantResource;\r
-    }\r
-    \r
-    public Plant getPlant(Graph g) {\r
-       return new Plant(g, plantResource);\r
-    }\r
-    \r
-    @Override\r
-    protected SelectionAdapter createSelectionAdapter() {\r
-       return new ProcessEditorSelectionAdapter(adapter);\r
-    }\r
-    \r
-    protected class ProcessEditorSelectionAdapter extends SelectionAdapter {\r
-       \r
-       \r
-        public ProcessEditorSelectionAdapter(ScenegraphAdapter adapter) {\r
-                       super(adapter);\r
-                       // TODO Auto-generated constructor stub\r
-               }\r
-\r
-               @Override\r
-           protected StructuredResourceSelection filterSelection(ISelection s) {\r
-               if (!(s instanceof StructuredResourceSelection))\r
-                   return new StructuredResourceSelection();\r
-               return (StructuredResourceSelection)s;\r
-           }\r
-\r
-           @Override\r
-           public void setEditorSelection() {\r
-               List<IGraphicsNode> sel = getSelectedObjects();\r
-               for (IGraphicsNode o : adapter.getNodes())\r
-                       if (o instanceof ISelectableNode) {\r
-                               if (sel.contains(o)) {\r
-                               ((ISelectableNode)o).setSelected(true);\r
-                       } else {\r
-                               ((ISelectableNode)o).setSelected(false);\r
-                       }\r
-                       }\r
-               List<Resource> selected = getSelectedResources();\r
-            // TODO : don't know why this code is here, but it seems unnecessary\r
-//             for (Resource r : selected) {\r
-//                 if (!adapter.hasNode(r)) {\r
-//                     // instantiating a new resource : usin this editor's tc\r
-//                     Resource resource = graph.getResource(r.getId());\r
-//                     adapter.addInbound(resource).setSelected(true);\r
-//\r
-//                 }\r
-//             }\r
-               \r
-           }\r
-           \r
-           public void setEditorSelection(boolean addShapes) {\r
-\r
-               List<IGraphicsNode> sel = getSelectedObjects();\r
-               for (IGraphicsNode o : adapter.getNodes())\r
-                       if (o instanceof ISelectableNode) {\r
-                               if (sel.contains(o)) {\r
-                               ((ISelectableNode)o).setSelected(true);\r
-                       } else {\r
-                               ((ISelectableNode)o).setSelected(false);\r
-                       }\r
-                       }\r
-               if (addShapes) {\r
-                       // TODO : don't know why this code is here, but it seems unnecessary\r
-//                 List<Resource> selected = getSelectedResources();\r
-//                 for (Resource r : selected) {\r
-//                     if (!adapter.hasNode(r)) {\r
-//                         if (r.isInstanceOf(GlobalIdMap.get(PSK3DModelingOntologyMapping.EQUIPMENT))) {\r
-//                             Resource group = GraphicsNodeTools.getModelFromResource(r);\r
-//                             if (group != null && group.getId() == plant.getResource().getId()) {\r
-////                                     instantiating a new resource : usin this editor's tc\r
-//                                 Resource resource = graph.getResource(r.getId());\r
-//                                 adapter.addInbound(resource).setSelected(true);\r
-//                             }\r
-//                                 \r
-//                         }\r
-//                     }\r
-//                 }\r
-               }\r
-           }\r
-\r
-           @Override\r
-           protected void setEditorHighlightSelection() {\r
-               List<IGraphicsNode> sel = getInteractiveSelectedObjects();\r
-               for (IGraphicsNode o : adapter.getNodes())\r
-                       if (o instanceof ISelectableNode) {\r
-                               if (sel.contains(o)) {\r
-                               ((ISelectableNode)o).setHighlighted(true);\r
-                       } else {\r
-                               ((ISelectableNode)o).setHighlighted(false);\r
-                       }\r
-                       }\r
-           }\r
-    }\r
-    \r
-    private class FloorConfigureDialog extends Dialog implements KeyListener,SelectionListener {\r
-       \r
-       private boolean floorEnabled = true;\r
-       private double floorHeight = 0.0;\r
-       \r
-       private Text floorHeightText = null;\r
-       private Button floorEnabledButton = null;\r
-       \r
-       public FloorConfigureDialog(Shell shell) {\r
-               super(shell);\r
-       }\r
-       \r
-       @Override\r
-       protected Control createDialogArea(Composite parent) {\r
-               Composite composite = (Composite) super.createDialogArea(parent);\r
-               Label label = new Label(composite, SWT.WRAP);\r
-            label.setText("Configure floor");\r
-            GridData data = new GridData(GridData.GRAB_HORIZONTAL\r
-                    | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL\r
-                    | GridData.VERTICAL_ALIGN_CENTER);\r
-               \r
-            data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);\r
-            label.setLayoutData(data);\r
-            label.setFont(parent.getFont());\r
-            floorEnabledButton = new Button(composite,SWT.CHECK);\r
-            floorEnabledButton.setText("Enabled");\r
-            label = new Label(composite, SWT.WRAP);\r
-            label.setText("Height");\r
-            label.setLayoutData(data);\r
-            label.setFont(parent.getFont());\r
-            floorHeightText = new Text(composite,SWT.NONE);\r
-               \r
-               \r
-            floorHeightText.addKeyListener(this);\r
-               floorEnabledButton.addSelectionListener(this);\r
-               floorEnabledButton.setSelection(floorEnabled);\r
-               floorHeightText.setText(Double.toString(floorHeight));\r
-               \r
-               return composite;\r
-       }\r
-       \r
-       @Override\r
-       protected void configureShell(Shell newShell) {\r
-               super.configureShell(newShell);\r
-               newShell.setText("Configure floor");\r
-       }\r
-       \r
-       public void keyPressed(KeyEvent e) {\r
-               \r
-       }\r
-       \r
-       public void keyReleased(KeyEvent e) {\r
-               boolean ok = true;\r
-               try {\r
-                       floorHeight = Double.parseDouble(floorHeightText.getText());    \r
-               } catch (NumberFormatException err) {\r
-                       ok = false;\r
-               }\r
-               if (ok) {\r
-                       this.getButton(IDialogConstants.OK_ID).setEnabled(true);\r
-               } else {\r
-                       this.getButton(IDialogConstants.OK_ID).setEnabled(false);\r
-               }\r
-       }\r
-       \r
-       public void widgetDefaultSelected(SelectionEvent e) {\r
-               \r
-       }\r
-       \r
-       public void widgetSelected(SelectionEvent e) {\r
-               floorEnabled = floorEnabledButton.getSelection();\r
-       }\r
-\r
-               public boolean isFloorEnabled() {\r
-                       return floorEnabled;\r
-               }\r
-\r
-               public double getFloorHeight() {\r
-                       return floorHeight;\r
-               }\r
-\r
-    }\r
-    \r
-    @Override\r
-    protected void hookDragAndDrop() {\r
-       super.hookDragAndDrop();\r
-       dropTarget.addDropListener(new InsertEquipmentAction(this));\r
-       dropTarget.addDropListener(new InsertNozzleAction(this));\r
-       dropTarget.addDropListener(new InsertComponentAction(this));\r
-       dropTarget.addDropListener(new RoutePipeAction(this));\r
-    }\r
-    \r
-    @Override\r
-       public Object getAdapter(Class adapter) {\r
-               if (adapter == IContentOutlinePage.class) {\r
-                       if (getPlantResource() == null)\r
-                               return null;\r
-                       final PlantStructureOutlinePage page = new PlantStructureOutlinePage(sessionContext,getPlantResource());\r
-                       \r
-                       getSelectionAdapter().addSelectionChangedListener(new ISelectionChangedListener() {\r
-                               @Override\r
-                               public void selectionChanged(SelectionChangedEvent event) {\r
-                                       page.setSelection(event.getSelection());\r
-                                       \r
-                               }\r
-                       });\r
-                       parent.getDisplay().asyncExec(new Runnable() {\r
-                               @Override\r
-                               public void run() {\r
-                                       page.addSelectionChangedListener(new ISelectionChangedListener() {\r
-                                               @Override\r
-                                               public void selectionChanged(SelectionChangedEvent event) {\r
-                                                       selectionAdapter.setSelection(SelectionAdapter.transformSelection(event.getSelection()));\r
-                                               }\r
-                                       });\r
-                               }\r
-                       });\r
-                       \r
-                       \r
-                       \r
-                       return page;\r
-               }\r
-               return null;\r
-       }\r
-}
\ No newline at end of file
similarity index 90%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/Activator.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/Activator.java
index 9f2ad49d7b48840f9914c4ac84f301e64a67af03..281dbe9f598eebe356c14db98f8170a24adac0af 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor;\r
+package org.simantics.processeditor;\r
 \r
 import org.eclipse.ui.plugin.AbstractUIPlugin;\r
 import org.osgi.framework.BundleContext;\r
@@ -29,7 +29,7 @@ import org.simantics.proconf.ui.ProConfUI;
 public class Activator extends AbstractUIPlugin {\r
 \r
        // The plug-in ID\r
-       public static final String PLUGIN_ID = "fi.vtt.simantics.processeditor";\r
+       public static final String PLUGIN_ID = "org.simantics.processeditor";\r
 \r
        // The shared instance\r
        private static Activator plugin;\r
similarity index 81%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/ProcessResource.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/ProcessResource.java
index a7df93c9c331e42408bbb1a7d6ac1f07e234b03d..f9cd777843c4ae0f6515a139a0794b70c8a236b5 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,14 +8,14 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor;\r
+package org.simantics.processeditor;\r
 \r
 import org.simantics.db.Builtins;\r
 import org.simantics.db.Graph;\r
+import org.simantics.processeditor.common.ControlPointTools;\r
+import org.simantics.processeditor.stubs.Plant3DResource;\r
 import org.simantics.proconf.g3d.stubs.G3DResource;\r
 \r
-import fi.vtt.simantics.processeditor.common.ControlPointTools;\r
-import fi.vtt.simantics.processeditor.stubs.Plant3DResource;\r
 \r
 public class ProcessResource {\r
        public static Builtins builtins;\r
diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/ConfigureFloorAction.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/ConfigureFloorAction.java
new file mode 100644 (file)
index 0000000..cdffe47
--- /dev/null
@@ -0,0 +1,52 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.actions;\r
+\r
+import org.eclipse.jface.action.Action;\r
+import org.simantics.processeditor.Activator;\r
+import org.simantics.processeditor.dialogs.FloorConfigureDialog;\r
+import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
+\r
+import com.jme.math.Vector3f;\r
+import com.jme.scene.Geometry;\r
+\r
+public class ConfigureFloorAction extends Action {\r
+       \r
+       Geometry floorShape;\r
+       ThreeDimensionalEditorBase editor;\r
+       \r
+       public ConfigureFloorAction(ThreeDimensionalEditorBase editor) {\r
+               setText("Configure floor");\r
+        setImageDescriptor(Activator.imageDescriptorFromPlugin("fi.vtt.proconf.ode", "icons/silk/shape_align_bottom.png"));\r
+        this.editor = editor;\r
+       }\r
+       \r
+       public void run() {\r
+               if (floorShape == null)\r
+                       throw new NullPointerException("FloorShape is null");\r
+               FloorConfigureDialog dialog = new FloorConfigureDialog(editor.getRenderingComposite().getShell());\r
+               if (dialog.open() == FloorConfigureDialog.CANCEL)\r
+                       return;\r
+               if (dialog.isFloorEnabled()) {\r
+                       if (floorShape.getParent() == null)\r
+                               editor.getRenderingComponent().getNoCastRoot().attachChild(floorShape);\r
+               } else {\r
+                       floorShape.removeFromParent();\r
+               }\r
+               floorShape.setLocalTranslation(new Vector3f(0.f,(float)dialog.getFloorHeight(),0.f));\r
+               \r
+       }\r
+       \r
+       public void setFloorShape(Geometry floorShape) {\r
+               this.floorShape = floorShape;\r
+       }\r
+\r
+}\r
similarity index 92%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/InsertComponentAction.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/InsertComponentAction.java
index 50f8fed4e6f1592e24b4551d6ac475dcc69a6b5f..961fd8ee1ac359a726188cc18632e33233b35dda 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.actions;\r
+package org.simantics.processeditor.actions;\r
 \r
 import java.awt.event.KeyEvent;\r
 import java.awt.event.MouseEvent;\r
@@ -25,6 +25,15 @@ import org.simantics.db.GraphRequestWithResult;
 import org.simantics.db.Resource;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.Activator;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.ControlPointTools;\r
+import org.simantics.processeditor.common.PipingTools2;\r
+import org.simantics.processeditor.common.PipingTools2.Direction;\r
+import org.simantics.processeditor.dialogs.PipelineComponentDialog;\r
+import org.simantics.processeditor.gizmo.PositionSelectionGizmo;\r
+import org.simantics.processeditor.stubs.PipeControlPoint;\r
+import org.simantics.processeditor.stubs.PipelineComponent;\r
 import org.simantics.proconf.g3d.actions.InteractiveAction;\r
 import org.simantics.proconf.g3d.base.G3DAPI;\r
 import org.simantics.proconf.g3d.base.G3DTools;\r
@@ -34,15 +43,6 @@ import org.simantics.proconf.g3d.dnd.DropListener;
 import org.simantics.proconf.g3d.scenegraph.IGraphicsNode;\r
 import org.simantics.utils.datastructures.Pair;\r
 \r
-import fi.vtt.simantics.processeditor.Activator;\r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.common.ControlPointTools;\r
-import fi.vtt.simantics.processeditor.common.PipingTools2;\r
-import fi.vtt.simantics.processeditor.common.PipingTools2.Direction;\r
-import fi.vtt.simantics.processeditor.dialogs.PipelineComponentDialog;\r
-import fi.vtt.simantics.processeditor.gizmo.PositionSelectionGizmo;\r
-import fi.vtt.simantics.processeditor.stubs.PipeControlPoint;\r
-import fi.vtt.simantics.processeditor.stubs.PipelineComponent;\r
 \r
 \r
 \r
similarity index 88%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/InsertEquipmentAction.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/InsertEquipmentAction.java
index 26556b8228f5fff1b41d3507a28d5d7d53e1676c..b40dccebe44e959e9da44c60b7d28890e9123783 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.actions;\r
+package org.simantics.processeditor.actions;\r
 \r
 import java.util.List;\r
 \r
@@ -19,6 +19,10 @@ import org.simantics.db.GraphRequestWithResult;
 import org.simantics.db.Resource;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.PipingTools2;\r
+import org.simantics.processeditor.dialogs.EquipmentDialog;\r
+import org.simantics.processeditor.stubs.Equipment;\r
 import org.simantics.proconf.g3d.actions.ContextAction;\r
 import org.simantics.proconf.g3d.base.G3DAPI;\r
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
@@ -28,10 +32,6 @@ import org.simantics.proconf.g3d.stubs.G3DNode;
 \r
 \r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.common.PipingTools2;\r
-import fi.vtt.simantics.processeditor.dialogs.EquipmentDialog;\r
-import fi.vtt.simantics.processeditor.stubs.Equipment;\r
 \r
 public class InsertEquipmentAction extends ContextAction implements DropListener{\r
 \r
similarity index 88%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/InsertNozzleAction.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/InsertNozzleAction.java
index 91733ab0b4c1408acad4d0503828ff9d85eb9898..355c2a5215a2d29c161622ab7bd4715f03f7be7e 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.actions;\r
+package org.simantics.processeditor.actions;\r
 \r
 import java.util.List;\r
 \r
@@ -21,6 +21,12 @@ import org.simantics.layer0.utils.EntityFactory;
 import org.simantics.layer0.utils.IEntity;\r
 import org.simantics.layer0.utils.instantiation.Instance;\r
 import org.simantics.layer0.utils.instantiation.InstanceFactory;\r
+import org.simantics.processeditor.Activator;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.PipingTools2;\r
+import org.simantics.processeditor.dialogs.NozzleDialog;\r
+import org.simantics.processeditor.stubs.Equipment;\r
+import org.simantics.processeditor.stubs.Nozzle;\r
 import org.simantics.proconf.g3d.actions.WriteAction;\r
 import org.simantics.proconf.g3d.base.G3DAPI;\r
 import org.simantics.proconf.g3d.base.G3DTools;\r
@@ -28,12 +34,6 @@ import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;
 import org.simantics.proconf.g3d.common.StructuredResourceSelection;\r
 import org.simantics.proconf.g3d.dnd.DropListener;\r
 \r
-import fi.vtt.simantics.processeditor.Activator;\r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.common.PipingTools2;\r
-import fi.vtt.simantics.processeditor.dialogs.NozzleDialog;\r
-import fi.vtt.simantics.processeditor.stubs.Equipment;\r
-import fi.vtt.simantics.processeditor.stubs.Nozzle;\r
 \r
 \r
 \r
diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/PositionType.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/PositionType.java
new file mode 100644 (file)
index 0000000..2e7b398
--- /dev/null
@@ -0,0 +1,25 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.actions;\r
+\r
+\r
+/**\r
+ * Position types for inserting new components and routing new pipe\r
+ * \r
+ * @author Marko Luukkainen <Marko.Luukkainen@vtt.fi>\r
+ *\r
+ */\r
+public enum PositionType {\r
+       SPLIT,\r
+       NEXT,\r
+       PREVIOUS,\r
+       PORT\r
+}\r
similarity index 82%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/ReversePipelineAction.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/ReversePipelineAction.java
index a75d7e0d45117f44e8da24fe013ba6d3a2b7f95b..37cd717d0310ff8a793481e4d868f99ba6ddc730 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.actions;\r
+package org.simantics.processeditor.actions;\r
 \r
 import java.util.List;\r
 \r
@@ -17,13 +17,13 @@ import org.simantics.db.GraphRequestStatus;
 import org.simantics.db.Resource;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.PipingTools2;\r
+import org.simantics.processeditor.stubs.PipelineComponent;\r
 import org.simantics.proconf.g3d.actions.WriteAction;\r
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
 \r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.common.PipingTools2;\r
-import fi.vtt.simantics.processeditor.stubs.PipelineComponent;\r
 \r
 public class ReversePipelineAction extends WriteAction {\r
        \r
similarity index 95%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/RoutePipeAction.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/RoutePipeAction.java
index 00d7ac34df1f3a95a6b836024a0e38ec31004f40..c67ab86f861069c89c3de1ee2d4d345e0d42153f 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.actions;\r
+package org.simantics.processeditor.actions;\r
 \r
 import java.awt.event.KeyEvent;\r
 import java.awt.event.MouseEvent;\r
@@ -29,6 +29,20 @@ import org.simantics.db.GraphRequestWithResult;
 import org.simantics.db.Resource;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.Activator;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.ControlPointTools;\r
+import org.simantics.processeditor.common.PipeComponentProvider;\r
+import org.simantics.processeditor.common.PipingTools2;\r
+import org.simantics.processeditor.common.PipingTools2.Direction;\r
+import org.simantics.processeditor.dialogs.PipelineDialog;\r
+import org.simantics.processeditor.gizmo.PositionSelectionGizmo;\r
+import org.simantics.processeditor.stubs.BranchEndControlPoint;\r
+import org.simantics.processeditor.stubs.PipeControlPoint;\r
+import org.simantics.processeditor.stubs.PipeRun;\r
+import org.simantics.processeditor.stubs.PipelineComponent;\r
+import org.simantics.processeditor.stubs.VariableLengthInlineComponent;\r
+import org.simantics.processeditor.views.ProcessEditor;\r
 import org.simantics.proconf.g3d.actions.InteractiveAction;\r
 import org.simantics.proconf.g3d.base.ConstraintDetector;\r
 import org.simantics.proconf.g3d.base.G3DAPI;\r
@@ -45,20 +59,6 @@ import com.jme.scene.Geometry;
 import com.jme.scene.Line;\r
 import com.jme.scene.state.MaterialState;\r
 \r
-import fi.vtt.simantics.processeditor.Activator;\r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.common.ControlPointTools;\r
-import fi.vtt.simantics.processeditor.common.PipeComponentProvider;\r
-import fi.vtt.simantics.processeditor.common.PipingTools2;\r
-import fi.vtt.simantics.processeditor.common.PipingTools2.Direction;\r
-import fi.vtt.simantics.processeditor.dialogs.PipelineDialog;\r
-import fi.vtt.simantics.processeditor.gizmo.PositionSelectionGizmo;\r
-import fi.vtt.simantics.processeditor.stubs.BranchEndControlPoint;\r
-import fi.vtt.simantics.processeditor.stubs.PipeControlPoint;\r
-import fi.vtt.simantics.processeditor.stubs.PipeRun;\r
-import fi.vtt.simantics.processeditor.stubs.PipelineComponent;\r
-import fi.vtt.simantics.processeditor.stubs.VariableLengthInlineComponent;\r
-import fi.vtt.simantics.processeditor.views.ProcessEditor;\r
 \r
 /**\r
  * Action for Routing Pipes\r
similarity index 82%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/SelectSplitPointAction.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/SelectSplitPointAction.java
index 1b004e9889a1572d6bd0565b496692595700c24f..da7e438c46ed0d30f5d04da546ebe7b2705b2939 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.actions;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.actions;\r
 \r
 import java.awt.event.MouseEvent;\r
 import java.util.List;\r
diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/SplitPointListener.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/SplitPointListener.java
new file mode 100644 (file)
index 0000000..81cd124
--- /dev/null
@@ -0,0 +1,29 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.actions;\r
+\r
+import javax.vecmath.Point3d;\r
+\r
+/**\r
+ * SplitPointListener is used by SplitPointAction to pass the selected split point.\r
+ * Implementing class must set itself as active action into editor (SplitPointAction won't close automatically). \r
+ * \r
+ * @author Marko Luukkainen <Marko.Luukkainen@vtt.fi>\r
+ *\r
+ */\r
+public interface SplitPointListener {\r
+\r
+       /**\r
+        * Sets selected split point, or null if user cancelled the action.\r
+        * @param point\r
+        */\r
+       public void setSplitPoint(Point3d point);\r
+}\r
similarity index 91%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/TranslateElbowAction.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/TranslateElbowAction.java
index b500e0c27290525304e324bfbb9064aa159389ab..7c109fab9b5a6b633677426a35c8f5036554d757 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.actions;\r
+package org.simantics.processeditor.actions;\r
 \r
 import java.util.List;\r
 \r
@@ -20,6 +20,12 @@ import org.simantics.db.Graph;
 import org.simantics.db.Resource;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.Activator;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.ControlPointTools;\r
+import org.simantics.processeditor.stubs.DirectedControlPoint;\r
+import org.simantics.processeditor.stubs.PipeControlPoint;\r
+import org.simantics.processeditor.stubs.VariableAngleTurnComponent;\r
 import org.simantics.proconf.g3d.actions.ConstrainedTransformAction;\r
 import org.simantics.proconf.g3d.actions.TranslateActionConstraints;\r
 import org.simantics.proconf.g3d.base.G3DAPI;\r
@@ -30,12 +36,6 @@ import org.simantics.proconf.g3d.gizmo.TransformInlineGizmo;
 import org.simantics.proconf.g3d.scenegraph.IGraphicsNode;\r
 import org.simantics.proconf.g3d.stubs.G3DNode;\r
 \r
-import fi.vtt.simantics.processeditor.Activator;\r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.common.ControlPointTools;\r
-import fi.vtt.simantics.processeditor.stubs.DirectedControlPoint;\r
-import fi.vtt.simantics.processeditor.stubs.PipeControlPoint;\r
-import fi.vtt.simantics.processeditor.stubs.VariableAngleTurnComponent;\r
 \r
 public class TranslateElbowAction extends ConstrainedTransformAction {\r
 \r
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.actions;\r
+package org.simantics.processeditor.actions;\r
 \r
 import java.util.List;\r
 \r
@@ -23,6 +23,11 @@ import org.simantics.db.GraphRequestStatus;
 import org.simantics.db.Resource;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.Activator;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.PipingTools2;\r
+import org.simantics.processeditor.stubs.InlineComponent;\r
+import org.simantics.processeditor.stubs.PipeControlPoint;\r
 import org.simantics.proconf.g3d.actions.ConstrainedTransformAction;\r
 import org.simantics.proconf.g3d.base.G3DAPI;\r
 import org.simantics.proconf.g3d.base.G3DTools;\r
@@ -32,11 +37,6 @@ import org.simantics.proconf.g3d.gizmo.TransformInlineGizmo;
 import org.simantics.proconf.g3d.scenegraph.IGraphicsNode;\r
 import org.simantics.proconf.g3d.stubs.G3DNode;\r
 \r
-import fi.vtt.simantics.processeditor.Activator;\r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.common.PipingTools2;\r
-import fi.vtt.simantics.processeditor.stubs.InlineComponent;\r
-import fi.vtt.simantics.processeditor.stubs.PipeControlPoint;\r
 \r
 \r
 public class TranslateInlineComponentAction extends ConstrainedTransformAction {\r
similarity index 93%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/actions/TranslateStraightAction.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/actions/TranslateStraightAction.java
index 84d3a641de67fbeee7c041a505aef4449c163985..c3e848de6ca144d51ce53813a4f2f9cb528c0f2a 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.actions;\r
+package org.simantics.processeditor.actions;\r
 \r
 import java.util.List;\r
 \r
@@ -23,6 +23,12 @@ import org.simantics.db.GraphRequestStatus;
 import org.simantics.db.Resource;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.Activator;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.ControlPointTools;\r
+import org.simantics.processeditor.common.PipingTools2;\r
+import org.simantics.processeditor.stubs.FixedLengthInlineComponent;\r
+import org.simantics.processeditor.stubs.PipeControlPoint;\r
 import org.simantics.proconf.g3d.actions.ConstrainedTransformAction;\r
 import org.simantics.proconf.g3d.actions.TranslateActionConstraints;\r
 import org.simantics.proconf.g3d.base.G3DTools;\r
@@ -32,13 +38,7 @@ import org.simantics.proconf.g3d.gizmo.AbstractGizmo;
 import org.simantics.proconf.g3d.gizmo.TransformGizmo;\r
 import org.simantics.proconf.g3d.gizmo.TransformInlineGizmo;\r
 \r
-import fi.vtt.simantics.processeditor.common.ControlPointTools;\r
-import fi.vtt.simantics.processeditor.common.PipingTools2;\r
-import fi.vtt.simantics.processeditor.stubs.FixedLengthInlineComponent;\r
-import fi.vtt.simantics.processeditor.stubs.PipeControlPoint;\r
 
-import fi.vtt.simantics.processeditor.Activator;\r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
 \r
 \r
 /**\r
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.adapters;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.adapters;\r
 \r
 import javax.vecmath.Point3d;\r
 import javax.vecmath.Vector3d;\r
@@ -9,10 +19,10 @@ import org.simantics.db.adaption.AdaptionException;
 import org.simantics.db.adaption.ResourceAdapter;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.PipingTools2;\r
 import org.simantics.proconf.g3d.base.Constraint;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.common.PipingTools2;\r
 \r
 public class InlineComponentConstraintAdapter implements ResourceAdapter {\r
        @SuppressWarnings("unchecked")\r
similarity index 57%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/adapters/NozzleConstraintAdapter.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/adapters/NozzleConstraintAdapter.java
index 33b8075fa6b61210f4d11c9c1d89c635b5f7e028..4504462598f8ae987ac92973be5c57279a924933 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.adapters;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.adapters;\r
 \r
 import javax.vecmath.Point3d;\r
 import javax.vecmath.Vector3d;\r
@@ -9,11 +19,11 @@ import org.simantics.db.adaption.AdaptionException;
 import org.simantics.db.adaption.ResourceAdapter;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.PipingTools2;\r
 import org.simantics.proconf.g3d.base.Constraint;\r
 import org.simantics.proconf.g3d.base.G3DTools;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.common.PipingTools2;\r
 \r
 public class NozzleConstraintAdapter implements ResourceAdapter {\r
        @SuppressWarnings("unchecked")\r
diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/adapters/ProcessEditorAdapter.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/adapters/ProcessEditorAdapter.java
new file mode 100644 (file)
index 0000000..0e25b0c
--- /dev/null
@@ -0,0 +1,317 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.adapters;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Collection;\r
+import java.util.HashMap;\r
+import java.util.List;\r
+import java.util.Map;\r
+\r
+import org.simantics.db.Graph;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.Session;\r
+import org.simantics.layer0.utils.EntityFactory;\r
+import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.layer0.utils.Property;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.ControlPointTools;\r
+import org.simantics.processeditor.common.PipingRules;\r
+import org.simantics.processeditor.scenegraph.NonVisibleNode;\r
+import org.simantics.processeditor.scenegraph.PipeComponentNode;\r
+import org.simantics.processeditor.scenegraph.PipeRunNode;\r
+import org.simantics.processeditor.scenegraph.PipelineComponentNode;\r
+import org.simantics.processeditor.stubs.PipeControlPoint;\r
+import org.simantics.processeditor.stubs.PipeRun;\r
+import org.simantics.processeditor.stubs.Plant3DResource;\r
+import org.simantics.proconf.g3d.base.JmeRenderingComponent;\r
+import org.simantics.proconf.g3d.base.ScenegraphAdapterImpl;\r
+import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
+import org.simantics.proconf.g3d.scenegraph.IGeometryNode;\r
+import org.simantics.proconf.g3d.scenegraph.IGraphicsNode;\r
+import org.simantics.proconf.g3d.scenegraph.ISelectableNode;\r
+import org.simantics.proconf.g3d.scenegraph.ParameterizedModelNode;\r
+import org.simantics.proconf.g3d.stubs.G3DNode;\r
+import org.simantics.utils.ui.ErrorLogger;\r
+\r
+public class ProcessEditorAdapter extends ScenegraphAdapterImpl {\r
+       private ThreeDimensionalEditorBase editor;\r
+       \r
+        public ProcessEditorAdapter(ThreeDimensionalEditorBase editor, Session session, JmeRenderingComponent component) {\r
+               super(session, component);\r
+               this.editor = editor;\r
+        }\r
+        \r
+        private class NormalScenegraphQuery extends ScenegraphQuery {\r
+               \r
+               public NormalScenegraphQuery(Resource node) {\r
+                       super(node);\r
+               } \r
+                \r
+                \r
+                @Override\r
+               public void shapeAdded(Graph graph, IGraphicsNode node) {\r
+                        // FIXME : this won't work like in previous ProConf\r
+               }\r
+        }\r
+        \r
+        private Map<Resource,PipeRunControlPointQuery> pipeRunQueries = new HashMap<Resource, PipeRunControlPointQuery>();\r
+\r
+       protected ScenegraphQuery newSubnodeListener(G3DNode node) {\r
+               if (node.isInstanceOf(ProcessResource.plant3Dresource.PipeRun)) {\r
+                   PipeRunControlPointQuery query = new PipeRunControlPointQuery(node.getResource());\r
+                   pipeRunQueries.put(node.getResource(), query);\r
+                   node.getGraph().performQuery(query);\r
+               }\r
+               return new NormalScenegraphQuery(node.getResource());\r
+                \r
+           }\r
+       \r
+       @Override\r
+       protected NodePropertyQuery newRootPropertyListener(G3DNode root) {\r
+               // currently Plant does not have any properties.\r
+               return null;\r
+       }\r
+       \r
+       private class TransformationQuery extends NodeTransformationQuery {\r
+               \r
+               public TransformationQuery(Resource res) {\r
+                       super(res);\r
+               }\r
+               \r
+               @Override\r
+               public void shapeUpdated(Graph graph, IGraphicsNode shape) {\r
+                       //if (shape instanceof IGeometryNode) {\r
+           //    updateGeometry((IGeometryNode)shape);\r
+           //} else {\r
+               shape.updateTransform(graph);\r
+           //}\r
+               }\r
+       }\r
+       \r
+       @Override\r
+       protected NodeTransformationQuery newTransformationListener(G3DNode root) {\r
+               return new TransformationQuery(root.getResource());\r
+       }\r
+       \r
+       private class NormalNodePropertyQuery extends org.simantics.proconf.g3d.base.ScenegraphAdapterImpl.NodePropertyQuery {\r
+               \r
+               public NormalNodePropertyQuery(Resource resource) {\r
+                       super(resource);\r
+               }\r
+\r
+               @Override\r
+               public void shapeUpdated(Graph graph,IGraphicsNode shape) {\r
+                       if (shape instanceof IGeometryNode) {\r
+               updateGeometry((IGeometryNode)shape);\r
+           } else {\r
+               shape.updateTransform(graph);\r
+           }\r
+               }\r
+       }\r
+        @Override\r
+       protected NodePropertyQuery newPropertyListener(G3DNode node) {\r
+               return new NormalNodePropertyQuery(node.getResource());\r
+       }\r
+\r
+        @Override\r
+       protected IGraphicsNode instantiateNode(IGraphicsNode parent,\r
+                       G3DNode node) {\r
+               Plant3DResource p3r = ProcessResource.plant3Dresource;\r
+               IGraphicsNode newNode = null;\r
+               try {\r
+                       if (node.isInstanceOf(p3r.Equipment)) {\r
+                               newNode = new ParameterizedModelNode(\r
+                                               editor, parent, node.getGraph(),\r
+                                               node.getResource(), p3r.HasGraphics);\r
+                       } else if (node.isInstanceOf(p3r.PipeRun)) {\r
+                               newNode = new PipeRunNode(parent, node.getGraph(), node.getResource());\r
+                       } else if (node.isInstanceOf(p3r.Nozzle)) {\r
+                               newNode = new ParameterizedModelNode(\r
+                                               editor, parent, node.getGraph(),\r
+                                               node.getResource(), p3r.HasGraphics);\r
+                               // CodedComponent must be handled first since it uses\r
+                               // hard-coded geometries\r
+                               // TODO : is this really necessary, or could we unify\r
+                               // PipeComponentNode, InlineComponentNode,...\r
+                       } else if (node.isInstanceOf(p3r.CodedComponent)) {\r
+                               newNode = new PipeComponentNode(editor,\r
+                                               parent, node.getGraph(), node.getResource());\r
+                       } else if (node.isInstanceOf(p3r.NonVisibleComponent)) {\r
+                               newNode = new NonVisibleNode(parent, node.getGraph(), node.getResource());\r
+                       } else if (node.isInstanceOf(p3r.PipelineComponent)) {\r
+                               newNode = new PipelineComponentNode(editor,\r
+                                               parent, node.getGraph(), node.getResource());\r
+                       } \r
+\r
+                       // } else if (node instanceof Shape) // Markers (ar/mobile)\r
+                       // needed this\r
+                       // newNode = new ShapeNode(TestProcessEditor.this,parent,node);\r
+                       if (newNode != null) {\r
+                               if (newNode instanceof ISelectableNode)\r
+                                       ((ISelectableNode) newNode).setVisible(true);\r
+                               if (newNode instanceof IGeometryNode) {\r
+                                       updateGeometry((IGeometryNode) newNode);\r
+                               }\r
+                               return newNode;\r
+                       }\r
+               } catch (Exception e) {\r
+                       ErrorLogger.defaultLogError("Cannot handle node " + node.getResource(), e);\r
+                       return null;\r
+               }\r
+               ErrorLogger.defaultLogError("Cannot handle node " + node.getResource(), null);\r
+               return null;\r
+\r
+       }\r
+\r
+       /**\r
+        * This is used to create elbows and straight pipes to pipeline TODO :\r
+        * this should be done with rule-engine!\r
+        * \r
+        * \r
+        * @author Marko Luukkainen\r
+        * \r
+        */\r
+       protected class PipeRunControlPointQuery extends NodeQuery {\r
+               private List<Resource> removed = new ArrayList<Resource>();\r
+               private List<Resource> added = new ArrayList<Resource>();\r
+\r
+               public PipeRunControlPointQuery(Resource r) {\r
+                       super(r);\r
+                       if (DEBUG) System.out.println("Created PipeRunControlPointQuery for " + r);\r
+\r
+               }\r
+\r
+               @Override\r
+               protected Object compute2(Graph graph) {\r
+                       PipeRun run = new PipeRun(graph, nodeResource);\r
+                       Collection<IEntity> cps = run\r
+                                       .getRelatedObjects(ProcessResource.plant3Dresource.HasControlPoints);\r
+                       List<Resource> res = new ArrayList<Resource>();\r
+                       for (IEntity t : cps)\r
+                               res.add(t.getResource());\r
+                       return res;\r
+               }\r
+\r
+               @Override\r
+               public boolean updated(Graph graph, Object oldResult,\r
+                               Object newResult) {\r
+                       \r
+                       removed.clear();\r
+                       added.clear();\r
+\r
+                       List<Resource> oldCps = (List<Resource>) oldResult;\r
+                       List<Resource> newCps = (List<Resource>) newResult;\r
+                       if (oldCps == null)\r
+                               oldCps = new ArrayList<Resource>();\r
+\r
+                       for (Resource r : oldCps) {\r
+                               if (!newCps.contains(r))\r
+                                       removed.add(r);\r
+                       }\r
+\r
+                       for (Resource r : newCps) {\r
+                               if (!oldCps.contains(r))\r
+                                       added.add(r);\r
+                       }\r
+                       for (Resource r : removed)\r
+                               removeControlPoint(graph, r);\r
+                       for (Resource r : added) {\r
+                               addControlPoint(graph, r);\r
+                               // ControlPointTools.addControlPoint(new\r
+                               // PipeRun(graph,pipeRun), new PipeControlPoint(graph, r));\r
+                       }\r
+\r
+                       return (added.size() > 0 || removed.size() > 0);\r
+               }\r
+               \r
+               @Override\r
+               public void dispose() {\r
+                       super.dispose();\r
+                       for (ControlPointPropertyQuery q : controlPointPropertyQueries.values())\r
+                               q.dispose();\r
+                       controlPointPropertyQueries.clear();\r
+               }\r
+               \r
+               private Map<Resource,ControlPointPropertyQuery> controlPointPropertyQueries = new HashMap<Resource, ControlPointPropertyQuery>();\r
+               \r
+               private void addControlPoint(Graph graph, Resource resource) {\r
+                       ControlPointPropertyQuery query = new ControlPointPropertyQuery(resource);\r
+                       graph.performQuery(query);\r
+                       controlPointPropertyQueries.put(resource,query);\r
+               }\r
+               \r
+               private void removeControlPoint(Graph graph, Resource resource) {\r
+                       ControlPointPropertyQuery query = controlPointPropertyQueries.remove(resource);\r
+                       query.dispose();\r
+                       ControlPointTools.removeControlPoint(new PipeControlPoint(\r
+                                       graph, resource));\r
+               }\r
+\r
+       }\r
+\r
+       protected class ControlPointPropertyQuery extends NodeQuery {\r
+               boolean initialized = false;\r
+               \r
+               public ControlPointPropertyQuery(Resource r) {\r
+                       super(r);\r
+                       if (DEBUG) System.out.println("Created ControlPointPropertyQuery for " + r);\r
+               }\r
+               \r
+               @Override\r
+       public List<Object> compute2(Graph g) {\r
+               IEntity t = EntityFactory.create(g,nodeResource);\r
+               \r
+               Collection<Property> properties = t.getRelatedProperties(ProcessResource.builtins.HasProperty);\r
+               List<Object> propertyValues = new ArrayList<Object>();\r
+               p(properties,propertyValues);\r
+\r
+               return propertyValues;\r
+       }\r
+       \r
+       private void p(Collection<Property> properties, List<Object> propertyValues) {\r
+               for (Property p : properties) {\r
+                       Collection<Property> subProperties = p.getRelatedProperties(p.getGraph().getBuiltins().HasProperty);\r
+                       if (subProperties.size() != 0) {\r
+                               p(subProperties,propertyValues);\r
+                       } \r
+                       if (p.hasValue()){\r
+                               propertyValues.add(p.getValue());\r
+                       }\r
+               }\r
+       }\r
+               \r
+               @Override\r
+               public boolean updated(Graph graph, Object oldResult, Object newResult) {\r
+                       PipingRules.pipeControlPointPositionUpdate(graph, this.nodeResource);\r
+                       if (initialized) {\r
+                               //PipingRules.pipeControlPointPositionUpdate(graph, this.nodeResource);\r
+                       } else {\r
+                               initialized = true;\r
+                       }\r
+                       return true;\r
+               }\r
+       }\r
+       \r
+       @Override\r
+       protected void removeNode(Resource parent, Resource r) {\r
+               super.removeNode(parent, r);\r
+               PipeRunControlPointQuery q = pipeRunQueries.get(r);\r
+               if (q != null)\r
+                       q.dispose();\r
+       }\r
+       \r
+       @Override\r
+       public void dispose() {\r
+               super.dispose();\r
+       }\r
+\r
+}\r
diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/adapters/ProcessEditorSelectionAdapter.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/adapters/ProcessEditorSelectionAdapter.java
new file mode 100644 (file)
index 0000000..f0a6232
--- /dev/null
@@ -0,0 +1,54 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.adapters;\r
+\r
+import java.util.List;\r
+\r
+import org.simantics.proconf.g3d.base.ScenegraphAdapter;\r
+import org.simantics.proconf.g3d.base.SelectionAdapter;\r
+import org.simantics.proconf.g3d.scenegraph.IGraphicsNode;\r
+import org.simantics.proconf.g3d.scenegraph.ISelectableNode;\r
+\r
+public class ProcessEditorSelectionAdapter extends SelectionAdapter {\r
+       \r
+       \r
+        public ProcessEditorSelectionAdapter(ScenegraphAdapter adapter) {\r
+               super(adapter);\r
+        }\r
+\r
+           @Override\r
+           public void setEditorSelection() {\r
+               List<IGraphicsNode> sel = getSelectedObjects();\r
+               for (IGraphicsNode o : adapter.getNodes())\r
+                       if (o instanceof ISelectableNode) {\r
+                               if (sel.contains(o)) {\r
+                               ((ISelectableNode)o).setSelected(true);\r
+                       } else {\r
+                               ((ISelectableNode)o).setSelected(false);\r
+                       }\r
+                       }\r
+           }\r
+\r
+\r
+           @Override\r
+           protected void setEditorHighlightSelection() {\r
+               List<IGraphicsNode> sel = getInteractiveSelectedObjects();\r
+               for (IGraphicsNode o : adapter.getNodes())\r
+                       if (o instanceof ISelectableNode) {\r
+                               if (sel.contains(o)) {\r
+                               ((ISelectableNode)o).setHighlighted(true);\r
+                       } else {\r
+                               ((ISelectableNode)o).setHighlighted(false);\r
+                       }\r
+                       }\r
+           }\r
+\r
+}\r
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.adapters;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.adapters;\r
 \r
 import javax.vecmath.Point3d;\r
 import javax.vecmath.Vector3d;\r
@@ -9,13 +19,13 @@ import org.simantics.db.adaption.AdaptionException;
 import org.simantics.db.adaption.ResourceAdapter;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.actions.PositionType;\r
+import org.simantics.processeditor.common.ControlPointTools;\r
+import org.simantics.processeditor.common.PipingTools2.Direction;\r
 import org.simantics.proconf.g3d.base.Constraint;\r
 import org.simantics.proconf.g3d.base.G3DTools;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.actions.PositionType;\r
-import fi.vtt.simantics.processeditor.common.ControlPointTools;\r
-import fi.vtt.simantics.processeditor.common.PipingTools2.Direction;\r
 \r
 public class TurnComponentConstraintAdapter implements ResourceAdapter {\r
        @SuppressWarnings("unchecked")\r
similarity index 90%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/animations/PipeAnimationController.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/animations/PipeAnimationController.java
index 0524171f9602445025cb3dedf159c6f6819215ab..2231e5a47d3f3213f3ee0473c96fc85c8240d7c1 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.animations;\r
+package org.simantics.processeditor.animations;\r
 \r
 import java.net.URL;\r
 import java.util.ArrayList;\r
@@ -18,6 +18,10 @@ import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.Path;\r
 import org.simantics.db.Graph;\r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.Activator;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.stubs.PipeRun;\r
+import org.simantics.processeditor.stubs.VariableLengthInlineComponent;\r
 import org.simantics.proconf.g3d.animation.Animatable;\r
 import org.simantics.proconf.g3d.animation.AnimationController;\r
 import org.simantics.proconf.g3d.base.JmeRenderingComponent;\r
@@ -34,10 +38,6 @@ import com.jme.scene.state.ZBufferState;
 import com.jme.util.TextureManager;\r
 import com.jmex.effects.particles.ParticleGeometry;\r
 \r
-import fi.vtt.simantics.processeditor.Activator;\r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.stubs.PipeRun;\r
-import fi.vtt.simantics.processeditor.stubs.VariableLengthInlineComponent;\r
 \r
 \r
 public class PipeAnimationController implements AnimationController {\r
similarity index 87%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/animations/PipeFlowAnimation.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/animations/PipeFlowAnimation.java
index d86358daa7fff3fb17d9214d9492ccd315c904dd..ed5c216dd0d30dd39560a6e9487949f266d525ad 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.animations;\r
+package org.simantics.processeditor.animations;\r
 \r
 import java.util.List;\r
 \r
@@ -17,8 +17,10 @@ import javax.vecmath.Vector3d;
 \r
 import org.simantics.db.Graph;\r
 import org.simantics.db.Resource;\r
+import org.simantics.processeditor.common.ControlPointTools;\r
+import org.simantics.processeditor.stubs.PipeControlPoint;\r
+import org.simantics.processeditor.stubs.VariableLengthInlineComponent;\r
 import org.simantics.proconf.g3d.animation.Animatable;\r
-import org.simantics.proconf.g3d.base.G3DTools;\r
 import org.simantics.proconf.g3d.base.VecmathJmeTools;\r
 \r
 import com.jme.renderer.ColorRGBA;\r
@@ -27,10 +29,6 @@ import com.jmex.effects.particles.ParticleFactory;
 import com.jmex.effects.particles.ParticleGeometry;\r
 \r
 \r
-import fi.vtt.simantics.processeditor.common.ControlPointTools;\r
-import fi.vtt.simantics.processeditor.common.PipingTools2;\r
-import fi.vtt.simantics.processeditor.stubs.PipeControlPoint;\r
-import fi.vtt.simantics.processeditor.stubs.VariableLengthInlineComponent;\r
 \r
 \r
 public class PipeFlowAnimation implements Animatable{ \r
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,15 +8,15 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.animations;\r
+package org.simantics.processeditor.animations;\r
 \r
 import org.simantics.db.Graph;\r
 import org.simantics.db.Resource;\r
+import org.simantics.processeditor.stubs.PipeRun;\r
 import org.simantics.proconf.g3d.base.JmeRenderingComponent;\r
 \r
 import com.jme.renderer.ColorRGBA;\r
 \r
-import fi.vtt.simantics.processeditor.stubs.PipeRun;\r
 \r
 // TODO : this class won't work with valueSets\r
 public class ResourcePipeAnimationController extends PipeAnimationController {\r
similarity index 95%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/common/ControlPointTools.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/ControlPointTools.java
index 077ea704daabb85e717fd89e7fe94520d0293e9b..c56b969c0bdcdc314763dcf7b002241b1544894d 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.common;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.common;\r
 \r
 import java.util.ArrayList;\r
 import java.util.Collection;\r
@@ -14,19 +24,20 @@ import javax.vecmath.Vector3d;
 \r
 import org.simantics.db.Graph;\r
 import org.simantics.db.Resource;\r
+import org.simantics.db.Session;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.actions.PositionType;\r
+import org.simantics.processeditor.common.PipingTools2.Direction;\r
+import org.simantics.processeditor.stubs.PipeControlPoint;\r
+import org.simantics.processeditor.stubs.PipeRun;\r
 import org.simantics.proconf.g3d.base.G3DTools;\r
 import org.simantics.proconf.g3d.base.MathTools;\r
 import org.simantics.proconf.g3d.base.TransformationTools;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 import org.simantics.utils.datastructures.Pair;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.actions.PositionType;\r
-import fi.vtt.simantics.processeditor.common.PipingTools2.Direction;\r
-import fi.vtt.simantics.processeditor.stubs.PipeControlPoint;\r
-import fi.vtt.simantics.processeditor.stubs.PipeRun;\r
 \r
 public class ControlPointTools {\r
        \r
@@ -1039,7 +1050,9 @@ public class ControlPointTools {
     }\r
     \r
     static boolean isControlPointChanged(PipeControlPoint node) {\r
+\r
        long id = node.getResource().getResourceId();\r
+       \r
        boolean changed = updatePosition(node);\r
         //if (!changed) {\r
                if (node.isInstanceOf(ProcessResource.plant3Dresource.PathLegEndControlPoint)) {\r
similarity index 94%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/common/PathUtils.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/PathUtils.java
index 9ddaf0404bd4ad3622a6682e025289be688b7162..8807ddfd2e7954d2cbc6c80546ddafb82feeb923 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.common;\r
+package org.simantics.processeditor.common;\r
 \r
 import java.util.ArrayList;\r
 import java.util.Collection;\r
similarity index 95%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/common/PipeComponentProvider.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/PipeComponentProvider.java
index a59e0f819126e5eb6859a958412dc59174396c53..ae550779e546b5515359f5d87c6fd0eaffb52307 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.common;\r
+package org.simantics.processeditor.common;\r
 \r
 import java.nio.FloatBuffer;\r
 import java.nio.IntBuffer;\r
@@ -19,20 +19,20 @@ import javax.vecmath.Quat4d;
 import javax.vecmath.Vector3d;\r
 \r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.stubs.PipeControlPoint;\r
+import org.simantics.processeditor.stubs.PipelineComponent;\r
+import org.simantics.processeditor.stubs.TurnControlPoint;\r
 import org.simantics.proconf.g3d.base.G3DTools;\r
 import org.simantics.proconf.g3d.base.GeometryProvider;\r
 import org.simantics.proconf.g3d.base.MathTools;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 import com.jme.scene.Geometry;\r
 import com.jme.scene.Line;\r
 import com.jme.scene.TriMesh;\r
 import com.jme.util.geom.BufferUtils;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.stubs.PipeControlPoint;\r
-import fi.vtt.simantics.processeditor.stubs.PipelineComponent;\r
-import fi.vtt.simantics.processeditor.stubs.TurnControlPoint;\r
 \r
 \r
 /**\r
similarity index 96%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/common/PipingRules.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/PipingRules.java
index d7e1619e720bc67d0458338ffcfeaff835bdc258..a4a926a05745b1a0b6eb46841baf1d5f774c6de6 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.common;\r
+package org.simantics.processeditor.common;\r
 \r
 import java.util.ArrayList;\r
 import java.util.Collection;\r
@@ -19,14 +19,14 @@ import javax.vecmath.Vector3d;
 \r
 import org.simantics.db.Graph;\r
 import org.simantics.db.Resource;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.stubs.PipeControlPoint;\r
+import org.simantics.processeditor.stubs.PipeRun;\r
+import org.simantics.processeditor.stubs.PipelineComponent;\r
 import org.simantics.proconf.g3d.base.G3DTools;\r
 import org.simantics.proconf.g3d.base.MathTools;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.stubs.PipeControlPoint;\r
-import fi.vtt.simantics.processeditor.stubs.PipeRun;\r
-import fi.vtt.simantics.processeditor.stubs.PipelineComponent;\r
 \r
 /**\r
  * Rules that update pipeline.\r
similarity index 96%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/common/PipingTools.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/PipingTools.java
index 7ae038d270e3a800dc8a2d68ab5279f6dfe47ed4..822bff34ca9ff4ae22d414a0c5423f69925ae8bc 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.common;\r
+package org.simantics.processeditor.common;\r
 \r
 \r
 public class PipingTools {\r
similarity index 94%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/common/PipingTools2.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/PipingTools2.java
index 4baf30893c70439724b0bd406e917a5b42e448d3..83e901052a23272542f94c80904a825cfe5f1155 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.common;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.common;\r
 \r
 import java.util.Collection;\r
 \r
@@ -12,17 +22,17 @@ import org.simantics.layer0.utils.IEntity;
 import org.simantics.layer0.utils.Statement;\r
 import org.simantics.layer0.utils.instantiation.Instance;\r
 import org.simantics.layer0.utils.instantiation.InstanceFactory;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.actions.PositionType;\r
+import org.simantics.processeditor.stubs.Equipment;\r
+import org.simantics.processeditor.stubs.InlineComponent;\r
+import org.simantics.processeditor.stubs.Nozzle;\r
+import org.simantics.processeditor.stubs.PipeControlPoint;\r
+import org.simantics.processeditor.stubs.PipeRun;\r
+import org.simantics.processeditor.stubs.PipelineComponent;\r
 import org.simantics.proconf.g3d.base.G3DTools;\r
 import org.simantics.proconf.g3d.stubs.G3DNode;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.actions.PositionType;\r
-import fi.vtt.simantics.processeditor.stubs.Equipment;\r
-import fi.vtt.simantics.processeditor.stubs.InlineComponent;\r
-import fi.vtt.simantics.processeditor.stubs.Nozzle;\r
-import fi.vtt.simantics.processeditor.stubs.PipeControlPoint;\r
-import fi.vtt.simantics.processeditor.stubs.PipeRun;\r
-import fi.vtt.simantics.processeditor.stubs.PipelineComponent;\r
 \r
 public class PipingTools2 {\r
        private static final boolean DEBUG = false;\r
similarity index 95%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/dialogs/ConfigureAnimationDialog.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/ConfigureAnimationDialog.java
index de5e5aa2743329625995a765cd9058da56f39abe..d4752fe2c4fb03736bc3d38dd7fa6970dbba4faf 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.dialogs;\r
+package org.simantics.processeditor.dialogs;\r
 \r
 import java.util.ArrayList;\r
 import java.util.Collection;\r
@@ -40,10 +40,12 @@ import org.simantics.db.GraphRequestAdapter;
 import org.simantics.db.GraphRequestStatus;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.Session;\r
-import org.simantics.g2d.stubs.anim.Animation;\r
+import org.simantics.animation.stubs.Animation;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
 import org.simantics.layer0.utils.viewpoints.TraversalPath;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.PathUtils;\r
 import org.simantics.proconf.browsing.GraphExplorer;\r
 import org.simantics.proconf.g3d.animation.Animatable;\r
 import org.simantics.proconf.g3d.animation.AnimationSystem;\r
@@ -53,10 +55,8 @@ import org.simantics.proconf.g3d.base.ScenegraphAdapter;
 import org.simantics.proconf.g3d.scenegraph.IGraphicsNode;\r
 import org.simantics.proconf.g3d.stubs.G3DModel;\r
 import org.simantics.proconf.g3d.tools.OEPathSelectionListener;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.common.PathUtils;\r
 \r
 public class ConfigureAnimationDialog extends Dialog {\r
        Session session;\r
similarity index 95%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/dialogs/ConfigureMonitorDialog.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/ConfigureMonitorDialog.java
index a771976ce82f3bc44542108a2bbd4ab8bf1cb939..5122508f26f86c2bc47d4646fb0d5a5f6d732e9b 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.dialogs;\r
+package org.simantics.processeditor.dialogs;\r
 \r
 import java.util.ArrayList;\r
 import java.util.Collection;\r
@@ -40,13 +40,13 @@ import org.simantics.db.Session;
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
 import org.simantics.layer0.utils.viewpoints.TraversalPath;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.PathUtils;\r
+import org.simantics.processeditor.monitors.PathContainer;\r
 import org.simantics.proconf.browsing.GraphExplorer;\r
 import org.simantics.proconf.g3d.stubs.G3DModel;\r
 import org.simantics.proconf.g3d.tools.OEPathSelectionListener;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.common.PathUtils;\r
-import fi.vtt.simantics.processeditor.monitors.PathContainer;\r
 \r
 public class ConfigureMonitorDialog extends Dialog {\r
        Session session;\r
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.dialogs;\r
+package org.simantics.processeditor.dialogs;\r
 \r
 import java.util.ArrayList;\r
 import java.util.List;\r
@@ -35,16 +35,16 @@ import org.simantics.db.Session;
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
 import org.simantics.layer0.utils.viewpoints.TraversalPath;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.animations.ResourcePipeAnimationController;\r
+import org.simantics.processeditor.common.PathUtils;\r
+import org.simantics.processeditor.stubs.PipeRun;\r
 import org.simantics.proconf.browsing.GraphExplorer;\r
 import org.simantics.proconf.g3d.animation.AnimationSystem;\r
 import org.simantics.proconf.g3d.base.JmeRenderingComponent;\r
 import org.simantics.proconf.g3d.tools.OEPathSelectionListener;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.animations.ResourcePipeAnimationController;\r
-import fi.vtt.simantics.processeditor.common.PathUtils;\r
-import fi.vtt.simantics.processeditor.stubs.PipeRun;\r
 \r
 \r
 public class ConfigurePipelineAnimationDialog extends Dialog {\r
similarity index 80%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/dialogs/EquipmentDialog.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/EquipmentDialog.java
index cf194301c10b3aab3d5eda78acb8ffd678ac558c..a0ac90a5f97eb910eadc823aa4593ab9c7223a4c 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,13 +8,13 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.dialogs;\r
+package org.simantics.processeditor.dialogs;\r
 \r
 import org.eclipse.swt.widgets.Shell;\r
 import org.simantics.db.Session;\r
+import org.simantics.processeditor.ProcessResource;\r
 \r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
 \r
 public class EquipmentDialog extends LibraryComponentDialog {\r
 \r
diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/FloorConfigureDialog.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/FloorConfigureDialog.java
new file mode 100644 (file)
index 0000000..b1ea4e1
--- /dev/null
@@ -0,0 +1,109 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.dialogs;\r
+\r
+import org.eclipse.jface.dialogs.Dialog;\r
+import org.eclipse.jface.dialogs.IDialogConstants;\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.KeyEvent;\r
+import org.eclipse.swt.events.KeyListener;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.eclipse.swt.widgets.Shell;\r
+import org.eclipse.swt.widgets.Text;\r
+\r
+public class FloorConfigureDialog extends Dialog implements KeyListener,SelectionListener {\r
+       \r
+       private boolean floorEnabled = true;\r
+       private double floorHeight = 0.0;\r
+       \r
+       private Text floorHeightText = null;\r
+       private Button floorEnabledButton = null;\r
+       \r
+       public FloorConfigureDialog(Shell shell) {\r
+               super(shell);\r
+       }\r
+       \r
+       @Override\r
+       protected Control createDialogArea(Composite parent) {\r
+               Composite composite = (Composite) super.createDialogArea(parent);\r
+               Label label = new Label(composite, SWT.WRAP);\r
+        label.setText("Configure floor");\r
+        GridData data = new GridData(GridData.GRAB_HORIZONTAL\r
+                | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL\r
+                | GridData.VERTICAL_ALIGN_CENTER);\r
+               \r
+        data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);\r
+        label.setLayoutData(data);\r
+        label.setFont(parent.getFont());\r
+        floorEnabledButton = new Button(composite,SWT.CHECK);\r
+        floorEnabledButton.setText("Enabled");\r
+        label = new Label(composite, SWT.WRAP);\r
+        label.setText("Height");\r
+        label.setLayoutData(data);\r
+        label.setFont(parent.getFont());\r
+        floorHeightText = new Text(composite,SWT.NONE);\r
+               \r
+               \r
+        floorHeightText.addKeyListener(this);\r
+               floorEnabledButton.addSelectionListener(this);\r
+               floorEnabledButton.setSelection(floorEnabled);\r
+               floorHeightText.setText(Double.toString(floorHeight));\r
+               \r
+               return composite;\r
+       }\r
+       \r
+       @Override\r
+       protected void configureShell(Shell newShell) {\r
+               super.configureShell(newShell);\r
+               newShell.setText("Configure floor");\r
+       }\r
+       \r
+       public void keyPressed(KeyEvent e) {\r
+               \r
+       }\r
+       \r
+       public void keyReleased(KeyEvent e) {\r
+               boolean ok = true;\r
+               try {\r
+                       floorHeight = Double.parseDouble(floorHeightText.getText());    \r
+               } catch (NumberFormatException err) {\r
+                       ok = false;\r
+               }\r
+               if (ok) {\r
+                       this.getButton(IDialogConstants.OK_ID).setEnabled(true);\r
+               } else {\r
+                       this.getButton(IDialogConstants.OK_ID).setEnabled(false);\r
+               }\r
+       }\r
+       \r
+       public void widgetDefaultSelected(SelectionEvent e) {\r
+               \r
+       }\r
+       \r
+       public void widgetSelected(SelectionEvent e) {\r
+               floorEnabled = floorEnabledButton.getSelection();\r
+       }\r
+\r
+       public boolean isFloorEnabled() {\r
+               return floorEnabled;\r
+       }\r
+\r
+       public double getFloorHeight() {\r
+               return floorHeight;\r
+       }\r
+\r
+}\r
similarity index 76%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/dialogs/LibraryComponentDialog.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/LibraryComponentDialog.java
index 6909fb639efdb4567782049da501f8c0ac794bce..c7df9e1294a5fdc297bef99572fefc3162b74c42 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.dialogs;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.dialogs;\r
 \r
 import java.util.ArrayList;\r
 import java.util.Collection;\r
@@ -22,10 +32,10 @@ import org.simantics.db.Resource;
 import org.simantics.db.Session;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.ProcessResource;\r
 import org.simantics.proconf.ui.ProConfUI;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
 \r
 public class LibraryComponentDialog extends Dialog{ \r
        \r
@@ -105,8 +115,10 @@ public class LibraryComponentDialog extends Dialog{
                                public void run() {\r
                                        getShell().setText(title);\r
                                        if (selectedType == null) {\r
-                               typeList.select(0);\r
-                               selectedType = (Resource)typeList.getData(typeList.getItem(0));\r
+                                               if (typeList.getItemCount() > 0) {\r
+                                                       typeList.select(0);\r
+                                       selectedType = (Resource)typeList.getData(typeList.getItem(0));\r
+                                               }\r
                            }\r
                                }\r
                                \r
@@ -132,6 +144,25 @@ public class LibraryComponentDialog extends Dialog{
                Resource projectResource = ProConfUI.getProject().getResource();\r
                Stack<Resource> handling = new Stack<Resource>();\r
                handling.push(projectResource);\r
+               \r
+               // this is just a hack to get equipment defined in ontologies\r
+               Resource projectsLib = g.getObjects(projectResource, g.getBuiltins().PartOf).iterator().next();\r
+               Collection<Resource> projects = g.getObjects(projectsLib, g.getBuiltins().ConsistsOf);\r
+               Resource typeSystemProject = null;\r
+               for (Resource project : projects) {\r
+                       IEntity ent = EntityFactory.create(g,project);\r
+                       String name = ent.getName();\r
+                       if(name.equals("Type System Project")) {\r
+                               typeSystemProject = project;\r
+                               break;\r
+                       }\r
+               }\r
+               Collection<Resource> ontologies = g.getObjects(typeSystemProject, g.getBuiltins().ConsistsOf);\r
+               for (Resource ontology : ontologies) {\r
+                       if(g.isInstanceOf(ontology, g.getBuiltins().Ontology))\r
+                               handling.add(ontology);\r
+               }\r
+               \r
                while (!handling.isEmpty()) {\r
                        final Resource node = handling.pop();\r
                        if (g.isInstanceOf(node,primaryType)) {\r
similarity index 79%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/dialogs/NozzleDialog.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/NozzleDialog.java
index 282c9ce68477c2c56b4c07507faa0d24f9b60248..9f33a1d3b243eec4922b62ffe9992af8801c5572 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,13 +8,13 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.dialogs;\r
+package org.simantics.processeditor.dialogs;\r
 \r
 import org.eclipse.swt.widgets.Shell;\r
 import org.simantics.db.Session;\r
+import org.simantics.processeditor.ProcessResource;\r
 \r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
 \r
 public class NozzleDialog extends LibraryComponentDialog {\r
 \r
similarity index 84%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/dialogs/PipelineComponentDialog.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/PipelineComponentDialog.java
index a7510b4d2e052c224a10695638b17642f19198b6..b72f99443d7a9415d89ba920423d81770ad45f5a 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,17 +8,17 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.dialogs;\r
+package org.simantics.processeditor.dialogs;\r
 \r
 import java.util.Collection;\r
 \r
 import org.eclipse.swt.widgets.Shell;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.Session;\r
+import org.simantics.processeditor.ProcessResource;\r
 \r
 \r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
 \r
 public class PipelineComponentDialog extends LibraryComponentDialog{\r
 \r
similarity index 93%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/dialogs/PipelineDialog.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/PipelineDialog.java
index 5cf1ea408a5caa6ffdd08cb48369cf4ea8e0826f..5899c2334d9d08656efc34d4c7d065fd58a387c7 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.dialogs;\r
+package org.simantics.processeditor.dialogs;\r
 \r
 import org.eclipse.jface.dialogs.Dialog;\r
 import org.eclipse.jface.dialogs.IDialogConstants;\r
similarity index 84%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/gizmo/PositionSelectionGizmo.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/gizmo/PositionSelectionGizmo.java
index 62d36858d629e12c8fb3835207dcb30ed6f7f09f..11197f46db86ada335c57fe32e691f40613cbee7 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.gizmo;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.gizmo;\r
 \r
 import java.net.URL;\r
 import java.util.ArrayList;\r
@@ -8,6 +18,8 @@ import javax.vecmath.Point3d;
 \r
 import org.eclipse.core.runtime.FileLocator;\r
 import org.eclipse.core.runtime.Path;\r
+import org.simantics.processeditor.Activator;\r
+import org.simantics.processeditor.actions.PositionType;\r
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
 import org.simantics.proconf.g3d.base.VecmathJmeTools;\r
 import org.simantics.proconf.g3d.gizmo.Gizmo;\r
@@ -27,8 +39,6 @@ import com.jme.scene.state.TextureState;
 import com.jme.scene.state.ZBufferState;\r
 import com.jme.util.TextureManager;\r
 \r
-import fi.vtt.simantics.processeditor.Activator;\r
-import fi.vtt.simantics.processeditor.actions.PositionType;\r
 \r
 /**\r
  * Gizmo that allows user to selected insertion point of a component\r
similarity index 60%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/EquipmentEditorAdapter.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/EquipmentEditorAdapter.java
index 6339ca45378e52b25a1a33df209f3d67903f3d72..e589fa8ceb3000b3c6a9f5b8082f3e140d4f6b4e 100644 (file)
@@ -1,14 +1,24 @@
-package fi.vtt.simantics.processeditor.handlers;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.handlers;\r
 \r
 import org.simantics.db.Graph;\r
 import org.simantics.db.Resource;\r
+import org.simantics.processeditor.Activator;\r
+import org.simantics.processeditor.ProcessResource;\r
 import org.simantics.proconf.ui.workbench.ResourceEditorInput;\r
 import org.simantics.proconf.ui.workbench.editor.SimpleEditorAdapter;\r
 import org.simantics.utils.ui.BundleUtils;\r
 import org.simantics.utils.ui.workbench.WorkbenchUtils;\r
 \r
-import fi.vtt.simantics.processeditor.Activator;\r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
 \r
 /**\r
  * EditorAdapter for EquipmentEditor\r
similarity index 91%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/NewComponentHandler.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/NewComponentHandler.java
index 7cb2be987f3c7a8de872cc27980ed0ca95b1a044..e22c282184e0544be779210cb83351320fa33f82 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.handlers;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.handlers;\r
 \r
 import java.util.ArrayList;\r
 import java.util.HashMap;\r
@@ -33,10 +43,10 @@ import org.simantics.layer0.stubs.Library;
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
 import org.simantics.layer0.utils.instantiation.InstanceFactory;\r
+import org.simantics.processeditor.ProcessResource;\r
 import org.simantics.proconf.ui.ProConfUI;\r
 import org.simantics.proconf.ui.utils.ResourceAdaptionUtils;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
 \r
 \r
 /**\r
similarity index 81%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/NewEquipmentHandler.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/NewEquipmentHandler.java
index 49eb77efdcf37404d2a2d592ed8406203be7c559..a204f5167695bbf48ceceb057c0d8941a23ab49a 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.handlers;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.handlers;\r
 \r
 import org.eclipse.core.commands.AbstractHandler;\r
 import org.eclipse.core.commands.ExecutionEvent;\r
@@ -25,11 +35,11 @@ import org.simantics.layer0.stubs.Library;
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
 import org.simantics.layer0.utils.instantiation.InstanceFactory;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.stubs.Equipment;\r
 import org.simantics.proconf.ui.ProConfUI;\r
 import org.simantics.proconf.ui.utils.ResourceAdaptionUtils;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.stubs.Equipment;\r
 \r
 /**\r
  * Creates new equipment\r
similarity index 78%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/NewPlantHandler.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/NewPlantHandler.java
index 45f54cf5a3858c457d976559aea445fe94546f98..0a8bc81e0faac66ef77e659cf2f28f726db93827 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.handlers;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.handlers;\r
 \r
 import org.eclipse.core.commands.AbstractHandler;\r
 import org.eclipse.core.commands.ExecutionEvent;\r
@@ -22,10 +32,10 @@ import org.simantics.db.GraphRequestAdapter;
 import org.simantics.db.GraphRequestStatus;\r
 import org.simantics.db.Resource;\r
 import org.simantics.layer0.stubs.Library;\r
+import org.simantics.processeditor.stubs.Plant;\r
 import org.simantics.proconf.ui.ProConfUI;\r
 import org.simantics.proconf.ui.utils.ResourceAdaptionUtils;\r
 \r
-import fi.vtt.simantics.processeditor.stubs.Plant;\r
 \r
 public class NewPlantHandler extends AbstractHandler {\r
        \r
@@ -1,14 +1,24 @@
-package fi.vtt.simantics.processeditor.handlers;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.handlers;\r
 \r
 import org.simantics.db.Graph;\r
 import org.simantics.db.Resource;\r
+import org.simantics.processeditor.Activator;\r
+import org.simantics.processeditor.ProcessResource;\r
 import org.simantics.proconf.ui.workbench.ResourceEditorInput;\r
 import org.simantics.proconf.ui.workbench.editor.SimpleEditorAdapter;\r
 import org.simantics.utils.ui.BundleUtils;\r
 import org.simantics.utils.ui.workbench.WorkbenchUtils;\r
 \r
-import fi.vtt.simantics.processeditor.Activator;\r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
 \r
 /**\r
  * EditorAdapter for PipeLineComponentEditor\r
similarity index 57%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/Plant3DEditorAdapter.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/Plant3DEditorAdapter.java
index 93edd9485b2cb606c171f1de08726496081583fe..4be116299cfcfebe6c35c549dcc6dee4fa651536 100644 (file)
@@ -1,14 +1,24 @@
-package fi.vtt.simantics.processeditor.handlers;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.handlers;\r
 \r
 import org.simantics.db.Graph;\r
 import org.simantics.db.Resource;\r
+import org.simantics.processeditor.Activator;\r
+import org.simantics.processeditor.ProcessResource;\r
 import org.simantics.proconf.ui.workbench.ResourceEditorInput;\r
 import org.simantics.proconf.ui.workbench.editor.SimpleEditorAdapter;\r
 import org.simantics.utils.ui.BundleUtils;\r
 import org.simantics.utils.ui.workbench.WorkbenchUtils;\r
 \r
-import fi.vtt.simantics.processeditor.Activator;\r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
 \r
 public class Plant3DEditorAdapter extends SimpleEditorAdapter {\r
        public Plant3DEditorAdapter() {\r
diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/Plant3DProjectAdapter.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/Plant3DProjectAdapter.java
new file mode 100644 (file)
index 0000000..3cd851f
--- /dev/null
@@ -0,0 +1,24 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.handlers;\r
+\r
+import org.simantics.db.Graph;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.adaption.AdaptionException;\r
+import org.simantics.db.adaption.ResourceAdapter;\r
+\r
+public class Plant3DProjectAdapter implements ResourceAdapter {\r
+       @SuppressWarnings("unchecked")\r
+       @Override\r
+       public <T> T adapt(Graph graph, Resource resource, Resource mia) throws AdaptionException {\r
+               return (T) new Plant3DProjectType(graph,resource);\r
+       }\r
+}\r
similarity index 71%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/handlers/Plant3DProjectType.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/handlers/Plant3DProjectType.java
index f11211760b98c26e140a95a4ce7ee3c21f020ed4..701773d630927137a217953f80b7bea70e8e31b5 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.handlers;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.handlers;\r
 \r
 import java.util.ArrayList;\r
 import java.util.Collection;\r
similarity index 93%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/monitors/BillboardMonitor.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/monitors/BillboardMonitor.java
index d35d62c1506c40e006df6ea1661d8e81d60f2a9d..085fbcb321562574dda4a71560c9b09c7c46c496 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.monitors;\r
+package org.simantics.processeditor.monitors;\r
 \r
 import java.awt.Color;\r
 import java.util.ArrayList;\r
@@ -17,6 +17,8 @@ import javax.vecmath.Point3d;
 import javax.vecmath.Vector3d;\r
 \r
 import org.simantics.db.Graph;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.stubs.InlineComponent;\r
 import org.simantics.proconf.g3d.base.G3DTools;\r
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
 import org.simantics.proconf.g3d.base.VecmathJmeTools;\r
@@ -38,8 +40,6 @@ import com.jme.scene.state.ZBufferState;
 import com.jmex.awt.swingui.ImageGraphics;\r
 \r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.stubs.InlineComponent;\r
 \r
 \r
 \r
similarity index 87%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/monitors/Monitor.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/monitors/Monitor.java
index d748b1753ad6506f0067ddf5a648064851e11235..8e17e1282eee6af1ce33cd103bcd080237e7a71d 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.monitors;\r
+package org.simantics.processeditor.monitors;\r
 \r
 import org.simantics.db.Graph;\r
 import org.simantics.proconf.g3d.scenegraph.IGraphicsNode;\r
similarity index 83%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/monitors/MonitorTextProvider.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/monitors/MonitorTextProvider.java
index 08b3b02b7170b8ad20b1cbd0c10d0b2baa29e86a..f9b62fa1acbd9ce1ab61613b9a78c6bdf700a0ba 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.monitors;\r
+package org.simantics.processeditor.monitors;\r
 \r
 import java.util.ArrayList;\r
 \r
similarity index 89%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/monitors/ObjectPropertyProvider.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/monitors/ObjectPropertyProvider.java
index f0945609afee0497ce8b7b80acf59c8d63181b3e..52ca80f7a628e0696a805ad9cca5532570ca5b64 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.monitors;\r
+package org.simantics.processeditor.monitors;\r
 \r
 import java.util.ArrayList;\r
 import java.util.Collection;\r
@@ -19,9 +19,9 @@ import org.simantics.db.Resource;
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
 import org.simantics.layer0.utils.ResourceDebugUtils;\r
+import org.simantics.processeditor.ProcessResource;\r
 \r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
 \r
 \r
 public class ObjectPropertyProvider implements MonitorTextProvider {\r
similarity index 62%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/monitors/PathContainer.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/monitors/PathContainer.java
index 4c2aab7e42de89dc3fbdc20d8fcd79c95dab9dd8..7a7998047abfa174b456a2e757df827b4f74b6b7 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.monitors;\r
+package org.simantics.processeditor.monitors;\r
 \r
 import java.util.Collection;\r
 import java.util.List;\r
@@ -23,6 +23,7 @@ import org.simantics.utils.datastructures.MapList;
  * FIXME : singleton\r
  * TODO : removing paths\r
  * TODO : prevent adding same path multiple times\r
+ * TODO : how to handle multi-instances?\r
  * \r
  * \r
  * @author Marko Luukkainen\r
@@ -33,17 +34,29 @@ public class PathContainer {
        private static PathContainer instance = new PathContainer();\r
        \r
        MapList<Resource, List<Resource>> paths;\r
+       //List<Pair<List<Resource>,List<Resource>>> multiInstancePaths;\r
        \r
        private PathContainer() {\r
                paths = new MapList<Resource, List<Resource>>();\r
+               //multiInstancePaths = new ArrayList<Pair<List<Resource>,List<Resource>>>();\r
        }\r
        \r
        public List<List<Resource>> getPaths(IEntity instance) {\r
                Collection<IEntity> types = instance.getTypes();\r
-               if (types.size() != 1)\r
-                       throw new UnsupportedOperationException("Multi-instances not supported!");\r
-               Resource type = types.iterator().next().getResource();\r
-               return paths.getValues(type);\r
+               if (types.size() != 1) {\r
+                       // for multi-instances we check if any of the types have paths\r
+                       // no we return paths for a single type (it is possible to combine paths for all types)\r
+                       for (IEntity type : types) {\r
+                               Resource r = type.getResource();\r
+                               List<List<Resource>> path = paths.getValues(r);\r
+                               if (path != null)\r
+                                       return path;\r
+                       }\r
+                       return null;\r
+               } else {\r
+                       Resource type = types.iterator().next().getResource();\r
+                       return paths.getValues(type);\r
+               }\r
        }\r
        \r
        public void addPath(Resource type, List<Resource> path) {\r
similarity index 91%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/monitors/ResourcePathPropertyProvider.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/monitors/ResourcePathPropertyProvider.java
index 758123337b131212ab7967e280e56b6363811261..070aa7d75599cf3060441d77c98cade25eaed952 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.monitors;\r
+package org.simantics.processeditor.monitors;\r
 \r
 import java.util.ArrayList;\r
 import java.util.Collection;\r
@@ -19,8 +19,8 @@ import org.simantics.db.Resource;
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
 import org.simantics.layer0.utils.ResourceDebugUtils;\r
+import org.simantics.processeditor.common.PathUtils;\r
 \r
-import fi.vtt.simantics.processeditor.common.PathUtils;\r
 \r
 \r
 public class ResourcePathPropertyProvider implements MonitorTextProvider {\r
similarity index 94%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/monitors/TextMonitor.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/monitors/TextMonitor.java
index 41c60a6b73d42c203284a9f145d1e81120a217a9..39ab07dafcb8621577595c20eb97556954020cbc 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.monitors;\r
+package org.simantics.processeditor.monitors;\r
 \r
 import java.net.URL;\r
 import java.util.ArrayList;\r
@@ -20,6 +20,8 @@ import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.Path;\r
 import org.eclipse.swt.graphics.Rectangle;\r
 import org.simantics.db.Graph;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.stubs.InlineComponent;\r
 import org.simantics.proconf.g3d.base.G3DTools;\r
 import org.simantics.proconf.g3d.base.MathTools;\r
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
@@ -41,8 +43,6 @@ import com.jme.scene.state.RenderState;
 import com.jme.scene.state.TextureState;\r
 import com.jme.util.TextureManager;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.stubs.InlineComponent;\r
 \r
 /**\r
  * A monitor implemetation that uses JME's text component to show it's information. \r
diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/perspectives/Plant3DModellingPerspective.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/perspectives/Plant3DModellingPerspective.java
new file mode 100644 (file)
index 0000000..b1ccd94
--- /dev/null
@@ -0,0 +1,23 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.perspectives;\r
+\r
+import org.eclipse.ui.IPageLayout;\r
+import org.eclipse.ui.IPerspectiveFactory;\r
+\r
+public class Plant3DModellingPerspective implements IPerspectiveFactory{\r
+       \r
+       @Override\r
+       public void createInitialLayout(IPageLayout layout) {\r
+               \r
+       }\r
+\r
+}\r
similarity index 81%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/perspectives/ViewpointGenerator.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/perspectives/ViewpointGenerator.java
index 03c7a5c2282afd14165f6b3b46560dfd57ebd665..5fda3cb9a73a003f8633774d2585c1c4be0cf651 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.perspectives;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.perspectives;\r
 \r
 import java.util.Collection;\r
 \r
@@ -14,8 +24,8 @@ import org.simantics.layer0.utils.viewpoints.StateFactory;
 import org.simantics.layer0.utils.viewpoints.TraversalDecision;\r
 import org.simantics.layer0.utils.viewpoints.TraversalRule;\r
 import org.simantics.layer0.utils.viewpoints.rules.AcceptAllResourceAcceptRule;\r
+import org.simantics.processeditor.ProcessResource;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
 \r
 public class ViewpointGenerator {\r
        public static ResourceViewpoint createViewpoint() {\r
similarity index 83%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/scenegraph/NonVisibleNode.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/scenegraph/NonVisibleNode.java
index 240dd866416fc8a9cf24aca0ffd149ff7c08272e..d81f1e6cd92d56fc26cb0ae7aabbe2b0f6ae20fe 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,14 +8,14 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.scenegraph;\r
+package org.simantics.processeditor.scenegraph;\r
 \r
 import org.simantics.db.Graph;\r
 import org.simantics.db.Resource;\r
+import org.simantics.processeditor.ProcessResource;\r
 import org.simantics.proconf.g3d.scenegraph.IGraphicsNode;\r
 import org.simantics.proconf.g3d.scenegraph.NonTransformableNode;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
 \r
 public class NonVisibleNode extends NonTransformableNode {\r
 \r
similarity index 72%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/scenegraph/PipeComponentNode.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/scenegraph/PipeComponentNode.java
index 2c204a278fb50f62d7056403cc29fad6cad4bae4..f94799cf560ac6917f6eff5a7a8f1faf5b9b3e78 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.scenegraph;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.scenegraph;\r
 \r
 import java.util.ArrayList;\r
 import java.util.Collection;\r
@@ -11,6 +21,13 @@ import org.simantics.db.Graph;
 import org.simantics.db.Resource;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.ControlPointTools;\r
+import org.simantics.processeditor.common.PipingTools;\r
+import org.simantics.processeditor.stubs.CodedComponent;\r
+import org.simantics.processeditor.stubs.PipeControlPoint;\r
+import org.simantics.processeditor.stubs.Plant3DResource;\r
+import org.simantics.processeditor.stubs.SizeChangeControlPoint;\r
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
 import org.simantics.proconf.g3d.scenegraph.IGraphicsNode;\r
 import org.simantics.proconf.g3d.scenegraph.ShapeNode;\r
@@ -21,13 +38,6 @@ import com.jme.scene.Geometry;
 import com.jme.scene.state.MaterialState;\r
 import com.jme.scene.state.RenderState;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.common.ControlPointTools;\r
-import fi.vtt.simantics.processeditor.common.PipingTools;\r
-import fi.vtt.simantics.processeditor.stubs.CodedComponent;\r
-import fi.vtt.simantics.processeditor.stubs.PipeControlPoint;\r
-import fi.vtt.simantics.processeditor.stubs.Plant3DResource;\r
-import fi.vtt.simantics.processeditor.stubs.SizeChangeControlPoint;\r
 \r
 \r
 /**\r
similarity index 83%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/scenegraph/PipeRunNode.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/scenegraph/PipeRunNode.java
index b03a36fbe6986643ffb57feec148bc1fc0011097..179bdd54a984df08b8ebaa6524a95dc3f5628ce4 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,14 +8,14 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.scenegraph;\r
+package org.simantics.processeditor.scenegraph;\r
 \r
 import org.simantics.db.Graph;\r
 import org.simantics.db.Resource;\r
+import org.simantics.processeditor.ProcessResource;\r
 import org.simantics.proconf.g3d.scenegraph.IGraphicsNode;\r
 import org.simantics.proconf.g3d.scenegraph.NonTransformableNode;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
 \r
 public class PipeRunNode extends NonTransformableNode {\r
 \r
similarity index 86%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/scenegraph/PipelineComponentNode.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/scenegraph/PipelineComponentNode.java
index 07f20eb192f5e2817e56be6fac0d7a5b31cee129..13a06f0aad322f22ed375e2b011ee84957c56b38 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,20 +8,20 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.scenegraph;\r
+package org.simantics.processeditor.scenegraph;\r
 \r
 import javax.vecmath.AxisAngle4d;\r
 \r
 import org.simantics.db.Graph;\r
 import org.simantics.db.Resource;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.ControlPointTools;\r
+import org.simantics.processeditor.stubs.PipeControlPoint;\r
+import org.simantics.processeditor.stubs.PipelineComponent;\r
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
 import org.simantics.proconf.g3d.scenegraph.IGraphicsNode;\r
 import org.simantics.proconf.g3d.scenegraph.ParameterizedModelNode;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.common.ControlPointTools;\r
-import fi.vtt.simantics.processeditor.stubs.PipeControlPoint;\r
-import fi.vtt.simantics.processeditor.stubs.PipelineComponent;\r
 \r
 \r
 \r
similarity index 90%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/tools/ControlPointContribution.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/tools/ControlPointContribution.java
index 2f3dba8a84ee4731d64d1407f8cc9f75943797c6..0c489a8ef71eb1abddbdfb4e44384175e23df983 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.tools;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.tools;\r
 \r
 import java.io.ByteArrayInputStream;\r
 import java.io.ByteArrayOutputStream;\r
@@ -29,6 +39,11 @@ import org.simantics.db.Graph;
 import org.simantics.db.GraphRequestAdapter;\r
 import org.simantics.db.GraphRequestStatus;\r
 import org.simantics.db.Resource;\r
+import org.simantics.processeditor.Activator;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.common.PipeComponentProvider;\r
+import org.simantics.processeditor.stubs.DirectedControlPoint;\r
+import org.simantics.processeditor.stubs.PipeControlPoint;\r
 import org.simantics.proconf.g3d.actions.ContextAction;\r
 import org.simantics.proconf.g3d.base.EditorContribution;\r
 import org.simantics.proconf.g3d.base.G3DTools;\r
@@ -36,7 +51,7 @@ import org.simantics.proconf.g3d.base.MathTools;
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
 import org.simantics.proconf.g3d.base.VecmathJmeTools;\r
 import org.simantics.proconf.g3d.common.StructuredResourceSelection;\r
-import org.simantics.utils.ErrorLogger;\r
+import org.simantics.utils.ui.ErrorLogger;\r
 \r
 import com.jme.renderer.ColorRGBA;\r
 import com.jme.scene.Geometry;\r
@@ -49,11 +64,6 @@ import com.jme.util.export.Savable;
 import com.jme.util.export.binary.BinaryImporter;\r
 import com.jmex.model.converters.ObjToJme;\r
 \r
-import fi.vtt.simantics.processeditor.Activator;\r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.common.PipeComponentProvider;\r
-import fi.vtt.simantics.processeditor.stubs.DirectedControlPoint;\r
-import fi.vtt.simantics.processeditor.stubs.PipeControlPoint;\r
 \r
 public class ControlPointContribution implements EditorContribution {\r
        private List<ContextAction> actions = new ArrayList<ContextAction>();\r
similarity index 81%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/tools/NozzleContribution.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/tools/NozzleContribution.java
index 91f65baa962870bdb250dcf20311074c8d71f486..11447df320f422f69566d2aeb7bcababb9083468 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.tools;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.tools;\r
 \r
 import java.util.ArrayList;\r
 import java.util.Collection;\r
@@ -19,12 +29,12 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;\r
 import org.simantics.db.Graph;\r
 import org.simantics.db.Resource;\r
+import org.simantics.processeditor.ProcessResource;\r
 import org.simantics.proconf.g3d.actions.ContextAction;\r
 import org.simantics.proconf.g3d.base.EditorContribution;\r
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
 import org.simantics.proconf.g3d.common.StructuredResourceSelection;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
 \r
 public class NozzleContribution implements EditorContribution {\r
        private List<ContextAction> actions = new ArrayList<ContextAction>();\r
similarity index 85%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/tools/PlantEditContribution.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/tools/PlantEditContribution.java
index e411131b1f6d0d187c18f3364f9432ee4b4d2248..beaf9f45a8237d4c70566e4ff32ea2941e2ad6a9 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.tools;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.tools;\r
 \r
 import java.util.ArrayList;\r
 import java.util.Collection;\r
@@ -22,12 +32,26 @@ import org.simantics.db.GraphRequestStatus;
 import org.simantics.db.Resource;\r
 import org.simantics.layer0.utils.EntityFactory;\r
 import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.Activator;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.actions.InsertComponentAction;\r
+import org.simantics.processeditor.actions.InsertEquipmentAction;\r
+import org.simantics.processeditor.actions.InsertNozzleAction;\r
+import org.simantics.processeditor.actions.ReversePipelineAction;\r
+import org.simantics.processeditor.actions.RoutePipeAction;\r
+import org.simantics.processeditor.actions.TranslateElbowAction;\r
+import org.simantics.processeditor.actions.TranslateInlineComponentAction;\r
+import org.simantics.processeditor.actions.TranslateStraightAction;\r
+import org.simantics.processeditor.common.ControlPointTools;\r
+import org.simantics.processeditor.stubs.InlineComponent;\r
+import org.simantics.processeditor.stubs.PipeControlPoint;\r
 import org.simantics.proconf.g3d.actions.ContextAction;\r
 import org.simantics.proconf.g3d.actions.FocusAction;\r
 import org.simantics.proconf.g3d.actions.RemoveAction;\r
 import org.simantics.proconf.g3d.actions.RotateAction;\r
 import org.simantics.proconf.g3d.actions.TranslateAction;\r
 import org.simantics.proconf.g3d.base.EditorContribution;\r
+import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
 import org.simantics.proconf.g3d.common.StructuredResourceSelection;\r
 import org.simantics.utils.ui.jface.MenuTools;\r
 \r
@@ -38,30 +62,16 @@ import com.jme.scene.Geometry;
 import com.jme.scene.Node;\r
 import com.jme.scene.Spatial;\r
 \r
-import fi.vtt.simantics.processeditor.Activator;\r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.actions.InsertComponentAction;\r
-import fi.vtt.simantics.processeditor.actions.InsertEquipmentAction;\r
-import fi.vtt.simantics.processeditor.actions.InsertNozzleAction;\r
-import fi.vtt.simantics.processeditor.actions.ReversePipelineAction;\r
-import fi.vtt.simantics.processeditor.actions.RoutePipeAction;\r
-import fi.vtt.simantics.processeditor.actions.TranslateElbowAction;\r
-import fi.vtt.simantics.processeditor.actions.TranslateInlineComponentAction;\r
-import fi.vtt.simantics.processeditor.actions.TranslateStraightAction;\r
-import fi.vtt.simantics.processeditor.common.ControlPointTools;\r
-import fi.vtt.simantics.processeditor.stubs.InlineComponent;\r
-import fi.vtt.simantics.processeditor.stubs.PipeControlPoint;\r
-import fi.vtt.simantics.processeditor.views.ProcessEditor;\r
 \r
 public class PlantEditContribution implements EditorContribution {\r
        private List<ContextAction> actions = new ArrayList<ContextAction>();\r
-       private ProcessEditor parent;\r
+       private ThreeDimensionalEditorBase parent;\r
        private Composite infoComposite;\r
        private Text infoText;\r
        \r
        private Action checkInterferencesAction = null;\r
        \r
-       public PlantEditContribution(ProcessEditor parent) {\r
+       public PlantEditContribution(ThreeDimensionalEditorBase parent) {\r
                this.parent = parent;\r
        }\r
        \r
similarity index 85%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/tools/PlantVisualizationContribution.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/tools/PlantVisualizationContribution.java
index 42b93f0a9ad1240c03512b75ac38ca6e04df10be..ddd085aa4c60b0a462c7d49bbe953ee6f0d22f5c 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.tools;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.tools;\r
 \r
 import java.util.ArrayList;\r
 import java.util.Collection;\r
@@ -14,6 +24,16 @@ import org.simantics.db.Graph;
 import org.simantics.db.GraphRequestAdapter;\r
 import org.simantics.db.GraphRequestStatus;\r
 import org.simantics.db.Resource;\r
+import org.simantics.processeditor.Activator;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.animations.PipeAnimationController;\r
+import org.simantics.processeditor.dialogs.ConfigureAnimationDialog;\r
+import org.simantics.processeditor.dialogs.ConfigureMonitorDialog;\r
+import org.simantics.processeditor.dialogs.ConfigurePipelineAnimationDialog;\r
+import org.simantics.processeditor.monitors.Monitor;\r
+import org.simantics.processeditor.monitors.ResourcePathPropertyProvider;\r
+import org.simantics.processeditor.monitors.TextMonitor;\r
+import org.simantics.processeditor.stubs.PipeRun;\r
 import org.simantics.proconf.g3d.actions.ContextAction;\r
 import org.simantics.proconf.g3d.actions.FocusAction;\r
 import org.simantics.proconf.g3d.animation.Animatable;\r
@@ -22,26 +42,21 @@ import org.simantics.proconf.g3d.animation.AnimationSystem;
 import org.simantics.proconf.g3d.animation.TestAnimationController;\r
 import org.simantics.proconf.g3d.animation.ui.AnimationControlCreator;\r
 import org.simantics.proconf.g3d.base.EditorContribution;\r
+import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
 import org.simantics.proconf.g3d.common.StructuredResourceSelection;\r
 import org.simantics.proconf.g3d.scenegraph.IGraphicsNode;\r
 import org.simantics.proconf.g3d.stubs.G3DNode;\r
 import org.simantics.utils.ui.jface.MenuTools;\r
 \r
-import fi.vtt.simantics.processeditor.Activator;\r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.animations.PipeAnimationController;\r
-import fi.vtt.simantics.processeditor.dialogs.ConfigureAnimationDialog;\r
-import fi.vtt.simantics.processeditor.dialogs.ConfigureMonitorDialog;\r
-import fi.vtt.simantics.processeditor.dialogs.ConfigurePipelineAnimationDialog;\r
-import fi.vtt.simantics.processeditor.monitors.Monitor;\r
-import fi.vtt.simantics.processeditor.monitors.ResourcePathPropertyProvider;\r
-import fi.vtt.simantics.processeditor.monitors.TextMonitor;\r
-import fi.vtt.simantics.processeditor.stubs.PipeRun;\r
-import fi.vtt.simantics.processeditor.views.ProcessEditor;\r
-\r
+/**\r
+ * Plant Visualization Contribution\r
+ * \r
+ * @author Marko Luukkainen <marko.luukkainen@vtt.fi>\r
+ *\r
+ */\r
 public class PlantVisualizationContribution implements EditorContribution {\r
        private List<ContextAction> actions = new ArrayList<ContextAction>();\r
-       private ProcessEditor parent;\r
+       private ThreeDimensionalEditorBase parent;\r
        \r
     private AnimationSystem animationSystem = null;\r
     private Action animatePipesAction = null;\r
@@ -53,7 +68,7 @@ public class PlantVisualizationContribution implements EditorContribution {
     \r
     private Monitor monitor;\r
        \r
-       public PlantVisualizationContribution(ProcessEditor parent) {\r
+       public PlantVisualizationContribution(ThreeDimensionalEditorBase parent) {\r
                this.parent = parent;\r
        }\r
        \r
@@ -136,6 +151,10 @@ public class PlantVisualizationContribution implements EditorContribution {
                \r
        }\r
        \r
+       private G3DNode getRoot(Graph g) {\r
+               return new G3DNode(g,parent.getScenegraphAdapter().getRootResource());\r
+       }\r
+       \r
        @Override\r
        public void initialize(Graph graph) {\r
                 animateAction = new Action("", Action.AS_CHECK_BOX) {\r
@@ -188,7 +207,7 @@ public class PlantVisualizationContribution implements EditorContribution {
                                        @Override\r
                                        public GraphRequestStatus perform(Graph g) throws Exception {\r
                                                Stack<G3DNode> stack = new Stack<G3DNode>();\r
-                                               stack.add(parent.getPlant(g).toG3DNode());\r
+                                               stack.add(getRoot(g));\r
                                                while (!stack.isEmpty()) {\r
                                                        G3DNode n = stack.pop();\r
                                                        list.add(n.getResource());\r
@@ -221,7 +240,7 @@ public class PlantVisualizationContribution implements EditorContribution {
                                        @Override\r
                                        public GraphRequestStatus perform(Graph g) throws Exception {\r
                                                Stack<G3DNode> stack = new Stack<G3DNode>();\r
-                                               stack.add(parent.getPlant(g).toG3DNode());\r
+                                               stack.add(getRoot(g));\r
                                                while (!stack.isEmpty()) {\r
                                                        G3DNode n = stack.pop();\r
                                                        if (n.isInstanceOf(ProcessResource.plant3Dresource.PipeRun))\r
@@ -255,7 +274,7 @@ public class PlantVisualizationContribution implements EditorContribution {
                                        @Override\r
                                        public GraphRequestStatus perform(Graph g) throws Exception {\r
                                                Stack<G3DNode> stack = new Stack<G3DNode>();\r
-                                               stack.add(parent.getPlant(g).toG3DNode());\r
+                                               stack.add(getRoot(g));\r
                                                while (!stack.isEmpty()) {\r
                                                        G3DNode n = stack.pop();\r
                                                        list.add(n.getResource());\r
@@ -345,7 +364,7 @@ public class PlantVisualizationContribution implements EditorContribution {
                                        @Override\r
                                        public GraphRequestStatus perform(Graph g) throws Exception {\r
                                                Stack<G3DNode> stack = new Stack<G3DNode>();\r
-                                               stack.add(parent.getPlant(g).toG3DNode());\r
+                                               stack.add(getRoot(g));\r
                                                while (!stack.isEmpty()) {\r
                                                        G3DNode n = stack.pop();\r
                                                        if (n.isInstanceOf(ProcessResource.plant3Dresource.PipeRun))\r
similarity index 64%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/views/EquipmentEditorPart.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/EquipmentEditorPart.java
index 07283dacfed6b1bdcf4efe27ac2e93ccfe1f6e07..93723e48d3cf573e767445537439ee9826704fa5 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.views;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.views;\r
 \r
 import java.util.Collection;\r
 \r
@@ -6,12 +16,12 @@ import org.eclipse.swt.widgets.Display;
 import org.simantics.db.Graph;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.management.ISessionContext;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.tools.NozzleContribution;\r
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorPart;\r
 import org.simantics.proconf.g3d.shapeeditor.views.ShapeEditorBase;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.tools.NozzleContribution;\r
 \r
 public class EquipmentEditorPart extends ThreeDimensionalEditorPart {\r
        \r
similarity index 65%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/views/PipelineComponentEditorPart.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/PipelineComponentEditorPart.java
index e94d7d5782172de0bbd2498d4623a8eb86e84703..2848c424e22d38b54472f3cb15402523063a595c 100644 (file)
@@ -1,4 +1,14 @@
-package fi.vtt.simantics.processeditor.views;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.views;\r
 \r
 import java.util.Collection;\r
 \r
@@ -6,12 +16,12 @@ import org.eclipse.swt.widgets.Display;
 import org.simantics.db.Graph;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.management.ISessionContext;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.tools.ControlPointContribution;\r
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorPart;\r
 import org.simantics.proconf.g3d.shapeeditor.views.ShapeEditorBase;\r
 \r
-import fi.vtt.simantics.processeditor.ProcessResource;\r
-import fi.vtt.simantics.processeditor.tools.ControlPointContribution;\r
 \r
 public class PipelineComponentEditorPart extends ThreeDimensionalEditorPart {\r
        \r
similarity index 50%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/views/PlantStructureOutlinePage.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/PlantStructureOutlinePage.java
index 0c7a356f3baad40e1581d7be8573463384ff4eb7..fd5a1662a0e9e56181514a6832c8e7b822922755 100644 (file)
@@ -1,12 +1,22 @@
-package fi.vtt.simantics.processeditor.views;\r
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.views;\r
 \r
 import org.eclipse.swt.widgets.Composite;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.management.ISessionContext;\r
 import org.simantics.layer0.utils.viewpoints.ResourceViewpoint;\r
+import org.simantics.processeditor.perspectives.ViewpointGenerator;\r
 import org.simantics.proconf.browsing.views.GraphExplorerOutlinePage;\r
 \r
-import fi.vtt.simantics.processeditor.perspectives.ViewpointGenerator;\r
 \r
 public class PlantStructureOutlinePage extends GraphExplorerOutlinePage {\r
 \r
diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/PlantStructureView.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/PlantStructureView.java
new file mode 100644 (file)
index 0000000..3f8d9c5
--- /dev/null
@@ -0,0 +1,32 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.views;\r
+\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.simantics.db.management.ISessionContext;\r
+import org.simantics.layer0.utils.viewpoints.ResourceViewpoint;\r
+import org.simantics.processeditor.perspectives.ViewpointGenerator;\r
+import org.simantics.proconf.browsing.GraphExplorer;\r
+import org.simantics.proconf.browsing.views.GraphExplorerView;\r
+\r
+\r
+public class PlantStructureView extends GraphExplorerView {\r
+\r
+       @Override\r
+       protected GraphExplorer createExplorer(Composite parent) {\r
+               return super.createExplorer(parent);\r
+       }\r
+       \r
+       @Override\r
+       protected ResourceViewpoint getViewpoint(ISessionContext context) {\r
+               return ViewpointGenerator.createViewpoint();\r
+       }\r
+}\r
diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/ProcessEditor.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/ProcessEditor.java
new file mode 100644 (file)
index 0000000..67c1982
--- /dev/null
@@ -0,0 +1,193 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.processeditor.views;\r
+\r
+import org.eclipse.jface.viewers.ISelection;\r
+import org.eclipse.jface.viewers.ISelectionChangedListener;\r
+import org.eclipse.jface.viewers.SelectionChangedEvent;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.ui.IWorkbenchPart;\r
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;\r
+import org.simantics.db.Graph;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.management.ISessionContext;\r
+import org.simantics.layer0.utils.IEntity;\r
+import org.simantics.processeditor.ProcessResource;\r
+import org.simantics.processeditor.actions.ConfigureFloorAction;\r
+import org.simantics.processeditor.actions.InsertComponentAction;\r
+import org.simantics.processeditor.actions.InsertEquipmentAction;\r
+import org.simantics.processeditor.actions.InsertNozzleAction;\r
+import org.simantics.processeditor.actions.RoutePipeAction;\r
+import org.simantics.processeditor.adapters.ProcessEditorAdapter;\r
+import org.simantics.processeditor.adapters.ProcessEditorSelectionAdapter;\r
+import org.simantics.processeditor.common.ControlPointTools;\r
+import org.simantics.processeditor.stubs.Plant;\r
+import org.simantics.processeditor.tools.PlantEditContribution;\r
+import org.simantics.processeditor.tools.PlantVisualizationContribution;\r
+import org.simantics.proconf.g3d.base.JmeRenderingComponent;\r
+import org.simantics.proconf.g3d.base.ScenegraphAdapter;\r
+import org.simantics.proconf.g3d.base.SelectionAdapter;\r
+import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r
+import org.simantics.proconf.g3d.common.StructuredResourceSelection;\r
+import org.simantics.proconf.g3d.shapes.FloorShape;\r
+import org.simantics.proconf.g3d.stubs.G3DNode;\r
+import org.simantics.utils.ui.jface.MenuTools;\r
+\r
+import com.jme.math.Vector3f;\r
+import com.jme.scene.Geometry;\r
+\r
+\r
+public class ProcessEditor extends ThreeDimensionalEditorBase {\r
+    \r
+    private Resource plantResource = null;\r
+    \r
+    private ConfigureFloorAction configureFloorAction = null;\r
+\r
+    private Geometry floorShape = null;\r
+\r
+    public ProcessEditor(ISessionContext session) {\r
+        super(session);\r
+        addEditorContribution(new PlantEditContribution(this));\r
+        addEditorContribution(new PlantVisualizationContribution(this));\r
+    }\r
+    \r
+    public ProcessEditor(ISessionContext session,JmeRenderingComponent component) {\r
+        super(session,component);\r
+        addEditorContribution(new PlantEditContribution(this));\r
+        addEditorContribution(new PlantVisualizationContribution(this));\r
+    }\r
+    \r
+    @Override\r
+    protected ScenegraphAdapter createScenegraphAdapter() {\r
+       return new ProcessEditorAdapter(this,session,getRenderingComponent());\r
+    }\r
+    \r
+    @Override\r
+    public void createControl(Graph graph,Composite parent) {\r
+       super.createControl(graph,parent);\r
+\r
+       floorShape = FloorShape.getShape(getRenderingComponent().getDisplaySystem().getRenderer(), 100.f,0.2f);\r
+       getRenderingComponent().getNoCastRoot().attachChild(floorShape);\r
+       floorShape.setLocalTranslation(new Vector3f(0.f,-0.01f,0.f));\r
+       configureFloorAction.setFloorShape(floorShape);\r
+    }\r
+\r
+    @Override\r
+    protected void makeActions(Graph graph) {\r
+        super.makeActions(graph);\r
+\r
+        //actions.add(new ShowTrendsAction(this));\r
+\r
+        configureFloorAction = new ConfigureFloorAction(this);\r
+\r
+//        ContextActionFactory extended[] = ContextActionRegistry.getActions("fi.vtt.proconf.shapeeditor.processeditorview");\r
+//        for (ContextActionFactory c : extended) {\r
+//             actions.add(c.createAction(this));\r
+//        }\r
+    }\r
+    \r
+    protected void fillLocalPullDown() {\r
+       super.fillLocalPullDown();\r
+       MenuTools.getOrCreate(getMenuID(),"Advanced", menuManager).add(configureFloorAction);\r
+    }\r
+    \r
+\r
+    @Override\r
+    protected void pageSelectionChanged(IWorkbenchPart part, ISelection selection) {\r
+       StructuredResourceSelection s = SelectionAdapter.transformSelection(selection);\r
+\r
+        selectionAdapter.setCurrentSelection(s);\r
+        viewChanged = true;\r
+\r
+        /*\r
+        if (part instanceof ProcessEditor) {\r
+               ProcessEditor sender = (ProcessEditor)part;\r
+            if (!sender.getPlantResource().equals(plantResource)) {\r
+               selectionAdapter.setCurrentSelection(new StructuredResourceSelection());\r
+               selectionAdapter.setEditorSelection();\r
+              return;\r
+            }\r
+        } \r
+               */\r
+        \r
+        selectionAdapter.setEditorSelection();\r
+        \r
+    }\r
+\r
+    @Override\r
+    protected void reloadFrom(IEntity thing) {\r
+        if (plantResource != null) {\r
+            throw new UnsupportedOperationException("Reloading instantiated viewer not supported");\r
+        }\r
+        if (thing.isInstanceOf(ProcessResource.plant3Dresource.Plant)) {\r
+            plantResource = thing.getResource();\r
+            G3DNode plant = new G3DNode(thing);\r
+            adapter.setRootNode(plant);\r
+            //adapter.addOutbound(plant);\r
+            ControlPointTools.reloadCache(thing.getGraph(),plant.getResource());\r
+        } else {\r
+            throw new IllegalArgumentException("Resource is not a plant");\r
+        } \r
+    }\r
+\r
+    public Resource getPlantResource() {\r
+        return plantResource;\r
+    }\r
+    \r
+    public Plant getPlant(Graph g) {\r
+       return new Plant(g, plantResource);\r
+    }\r
+    \r
+    @Override\r
+    protected SelectionAdapter createSelectionAdapter() {\r
+       return new ProcessEditorSelectionAdapter(adapter);\r
+    }\r
+\r
+    @Override\r
+    protected void hookDragAndDrop() {\r
+       super.hookDragAndDrop();\r
+       dropTarget.addDropListener(new InsertEquipmentAction(this));\r
+       dropTarget.addDropListener(new InsertNozzleAction(this));\r
+       dropTarget.addDropListener(new InsertComponentAction(this));\r
+       dropTarget.addDropListener(new RoutePipeAction(this));\r
+    }\r
+    \r
+    @Override\r
+       public Object getAdapter(Class adapter) {\r
+               if (adapter == IContentOutlinePage.class) {\r
+                       if (getPlantResource() == null)\r
+                               return null;\r
+                       final PlantStructureOutlinePage page = new PlantStructureOutlinePage(sessionContext,getPlantResource());\r
+                       \r
+                       getSelectionAdapter().addSelectionChangedListener(new ISelectionChangedListener() {\r
+                               @Override\r
+                               public void selectionChanged(SelectionChangedEvent event) {\r
+                                       page.setSelection(event.getSelection());\r
+                                       \r
+                               }\r
+                       });\r
+                       parent.getDisplay().asyncExec(new Runnable() {\r
+                               @Override\r
+                               public void run() {\r
+                                       page.addSelectionChangedListener(new ISelectionChangedListener() {\r
+                                               @Override\r
+                                               public void selectionChanged(SelectionChangedEvent event) {\r
+                                                       selectionAdapter.setSelection(SelectionAdapter.transformSelection(event.getSelection()));\r
+                                               }\r
+                                       });\r
+                               }\r
+                       });\r
+\r
+                       return page;\r
+               }\r
+               return null;\r
+       }\r
+}
\ No newline at end of file
similarity index 86%
rename from org.simantics.proconf.processeditor/src/fi/vtt/simantics/processeditor/views/ProcessEditorPart.java
rename to org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/ProcessEditorPart.java
index a83f40b56fbd7ef4386245f5cd29a615d63ec14b..612ae899a29d9b310a3e821fcd3b6fead8bbc6ba 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -8,7 +8,7 @@
  * Contributors:\r
  *     VTT Technical Research Centre of Finland - initial API and implementation\r
  *******************************************************************************/\r
-package fi.vtt.simantics.processeditor.views;\r
+package org.simantics.processeditor.views;\r
 \r
 import org.simantics.db.management.ISessionContext;\r
 import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase;\r