├── .github ├── ISSUE_TEMPLATE │ └── config.yml ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── codeql-analysis.yml ├── .gitignore ├── .project ├── .settings ├── org.eclipse.core.resources.prefs └── org.eclipse.m2e.core.prefs ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Jenkinsfile ├── LICENSE ├── README.md ├── SECURITY.md ├── examples └── org.eclipse.glsp.example.workflow │ ├── .checkstyle │ ├── .classpath │ ├── .gitignore │ ├── .project │ ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.jdt.launching.prefs │ ├── org.eclipse.jdt.ui.prefs │ └── org.eclipse.m2e.core.prefs │ ├── META-INF │ └── MANIFEST.MF │ ├── Start_Workflow_Example_Server.launch │ ├── Start_Workflow_Example_Server_(Websocket).launch │ ├── build.properties │ ├── model │ ├── workflow-graph.ecore │ └── workflow-graph.genmodel │ ├── plugin.properties │ ├── plugin.xml │ ├── pom.xml │ ├── src-gen │ └── org │ │ └── eclipse │ │ └── glsp │ │ └── example │ │ └── workflow │ │ └── wfgraph │ │ ├── ActivityNode.java │ │ ├── Category.java │ │ ├── Icon.java │ │ ├── TaskNode.java │ │ ├── WeightedEdge.java │ │ ├── WfgraphFactory.java │ │ ├── WfgraphPackage.java │ │ ├── impl │ │ ├── ActivityNodeImpl.java │ │ ├── CategoryImpl.java │ │ ├── IconImpl.java │ │ ├── TaskNodeImpl.java │ │ ├── WeightedEdgeImpl.java │ │ ├── WfgraphFactoryImpl.java │ │ └── WfgraphPackageImpl.java │ │ └── util │ │ ├── WfgraphAdapterFactory.java │ │ └── WfgraphSwitch.java │ └── src │ └── org │ └── eclipse │ └── glsp │ └── example │ └── workflow │ ├── WFGraphExtension.java │ ├── WorkflowDiagramConfiguration.java │ ├── WorkflowDiagramModule.java │ ├── WorkflowGLSPServer.java │ ├── WorkflowPopupFactory.java │ ├── action │ └── LogAction.java │ ├── handler │ ├── CreateActivityNodeHandler.java │ ├── CreateAutomatedTaskHandler.java │ ├── CreateCategoryHandler.java │ ├── CreateDecisionNodeHandler.java │ ├── CreateEdgeHandler.java │ ├── CreateForkNodeHandler.java │ ├── CreateForkOrJoinNodeHandler.java │ ├── CreateJoinNodeHandler.java │ ├── CreateManualTaskHandler.java │ ├── CreateMergeNodeHandler.java │ ├── CreateTaskHandler.java │ ├── CreateWeightedEdgeHandler.java │ ├── CreateWorkflowNodeOperationHandler.java │ ├── GridSnapper.java │ ├── LogActionHandler.java │ └── WorkflowRequestContextActionsHandler.java │ ├── labeledit │ └── WorkflowLabelEditValidator.java │ ├── launch │ ├── WorkflowCLIParser.java │ ├── WorkflowServerLauncher.java │ └── WorkflowServerModule.java │ ├── layout │ └── WorkflowLayoutEngine.java │ ├── marker │ └── WorkflowModelValidator.java │ ├── model │ └── WorkflowNavigationTargetResolver.java │ ├── provider │ ├── AbstractNextOrPreviousNavigationTargetProvider.java │ ├── NextNodeNavigationTargetProvider.java │ ├── NodeDocumentationNavigationTargetProvider.java │ ├── PreviousNodeNavigationTargetProvider.java │ ├── WorkflowCommandPaletteActionProvider.java │ └── WorkflowContextMenuItemProvider.java │ ├── taskedit │ ├── EditTaskOperation.java │ ├── EditTaskOperationHandler.java │ ├── TaskEditContextActionProvider.java │ └── TaskEditValidator.java │ ├── typehints │ └── WorkflowEdgeCreationChecker.java │ └── utils │ ├── ModelTypes.java │ └── WorkflowBuilder.java ├── plugins ├── org.eclipse.glsp.graph │ ├── .checkstyle │ ├── .classpath │ ├── .gitignore │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ ├── org.eclipse.jdt.core.prefs │ │ ├── org.eclipse.jdt.launching.prefs │ │ ├── org.eclipse.jdt.ui.prefs │ │ └── org.eclipse.m2e.core.prefs │ ├── META-INF │ │ └── MANIFEST.MF │ ├── build.properties │ ├── model │ │ ├── .gitkeep │ │ ├── glsp-graph.ecore │ │ └── glsp-graph.genmodel │ ├── plugin.xml │ ├── pom.xml │ ├── src-gen │ │ └── org │ │ │ └── eclipse │ │ │ └── glsp │ │ │ └── graph │ │ │ ├── GAlignable.java │ │ │ ├── GArgumentable.java │ │ │ ├── GBounds.java │ │ │ ├── GBoundsAware.java │ │ │ ├── GButton.java │ │ │ ├── GCompartment.java │ │ │ ├── GDimension.java │ │ │ ├── GEdge.java │ │ │ ├── GEdgeLayoutable.java │ │ │ ├── GEdgePlacement.java │ │ │ ├── GForeignObjectElement.java │ │ │ ├── GGraph.java │ │ │ ├── GHtmlRoot.java │ │ │ ├── GIssue.java │ │ │ ├── GIssueMarker.java │ │ │ ├── GLabel.java │ │ │ ├── GLayoutable.java │ │ │ ├── GLayouting.java │ │ │ ├── GModelElement.java │ │ │ ├── GModelRoot.java │ │ │ ├── GNode.java │ │ │ ├── GPoint.java │ │ │ ├── GPort.java │ │ │ ├── GPreRenderedElement.java │ │ │ ├── GResizable.java │ │ │ ├── GSeverity.java │ │ │ ├── GShapeElement.java │ │ │ ├── GShapePreRenderedElement.java │ │ │ ├── GraphFactory.java │ │ │ ├── GraphPackage.java │ │ │ ├── impl │ │ │ ├── GAlignableImpl.java │ │ │ ├── GArgumentableImpl.java │ │ │ ├── GBoundsImpl.java │ │ │ ├── GButtonImpl.java │ │ │ ├── GCompartmentImpl.java │ │ │ ├── GDimensionImpl.java │ │ │ ├── GEdgeImpl.java │ │ │ ├── GEdgePlacementImpl.java │ │ │ ├── GForeignObjectElementImpl.java │ │ │ ├── GGraphImpl.java │ │ │ ├── GHtmlRootImpl.java │ │ │ ├── GIssueImpl.java │ │ │ ├── GIssueMarkerImpl.java │ │ │ ├── GLabelImpl.java │ │ │ ├── GLayoutableImpl.java │ │ │ ├── GModelRootImpl.java │ │ │ ├── GNodeImpl.java │ │ │ ├── GPointImpl.java │ │ │ ├── GPortImpl.java │ │ │ ├── GPreRenderedElementImpl.java │ │ │ ├── GResizableImpl.java │ │ │ ├── GShapePreRenderedElementImpl.java │ │ │ ├── GraphFactoryImpl.java │ │ │ ├── GraphPackageImpl.java │ │ │ └── StringToObjectMapEntryImpl.java │ │ │ └── util │ │ │ ├── GraphAdapterFactory.java │ │ │ └── GraphSwitch.java │ └── src │ │ └── org │ │ └── eclipse │ │ └── glsp │ │ └── graph │ │ ├── DefaultTypes.java │ │ ├── GModelChangeNotifier.java │ │ ├── GModelIndex.java │ │ ├── GModelListener.java │ │ ├── GResizeLocation.java │ │ ├── GraphExtension.java │ │ ├── builder │ │ ├── AbstractGButtonBuilder.java │ │ ├── AbstractGCompartmentBuilder.java │ │ ├── AbstractGEdgeBuilder.java │ │ ├── AbstractGForeignObjectBuilder.java │ │ ├── AbstractGGraphBuilder.java │ │ ├── AbstractGHtmlRootBuilder.java │ │ ├── AbstractGIssueMarkerBuilder.java │ │ ├── AbstractGLabelBuilder.java │ │ ├── AbstractGNodeBuilder.java │ │ ├── AbstractGPreRenderedElementBuilder.java │ │ ├── AbstractGShapePrenderedElementBuilder.java │ │ ├── GArgumentableBuilder.java │ │ ├── GBuilder.java │ │ ├── GModelElementBuilder.java │ │ ├── GModelRootBuilder.java │ │ ├── GShapeElementBuilder.java │ │ └── impl │ │ │ ├── GArguments.java │ │ │ ├── GBoundsBuilder.java │ │ │ ├── GButtonBuilder.java │ │ │ ├── GCompartmentBuilder.java │ │ │ ├── GEdgeBuilder.java │ │ │ ├── GEdgePlacementBuilder.java │ │ │ ├── GForeignObjectBuilder.java │ │ │ ├── GGraphBuilder.java │ │ │ ├── GHtmlRootBuilder.java │ │ │ ├── GIssueBuilder.java │ │ │ ├── GIssueMarkerBuilder.java │ │ │ ├── GLabelBuilder.java │ │ │ ├── GLayoutOptions.java │ │ │ ├── GLayoutOptionsBuilder.java │ │ │ ├── GNodeBuilder.java │ │ │ ├── GPortBuilder.java │ │ │ ├── GPreRenderedElementBuilder.java │ │ │ └── GShapePrerenderedElementBuilder.java │ │ ├── gson │ │ ├── ClassBasedDeserializer.java │ │ ├── EMapTypeAdapter.java │ │ ├── EObjectExclusionStrategy.java │ │ ├── EnumTypeAdapter.java │ │ ├── GModelElementTypeAdapter.java │ │ ├── GraphGsonConfigurator.java │ │ └── PropertyBasedTypeAdapter.java │ │ ├── impl │ │ ├── GModelChangeNotifierImpl.java │ │ └── GModelIndexImpl.java │ │ └── util │ │ ├── GConstants.java │ │ ├── GraphUtil.java │ │ ├── IdKeeperAdapter.java │ │ └── RootAdapterUtil.java ├── org.eclipse.glsp.layout │ ├── .checkstyle │ ├── .classpath │ ├── .gitignore │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ ├── org.eclipse.jdt.core.prefs │ │ ├── org.eclipse.jdt.launching.prefs │ │ ├── org.eclipse.jdt.ui.prefs │ │ └── org.eclipse.m2e.core.prefs │ ├── META-INF │ │ └── MANIFEST.MF │ ├── build.properties │ ├── pom.xml │ └── src │ │ └── org │ │ └── eclipse │ │ └── glsp │ │ └── layout │ │ ├── ElkLayoutEngine.java │ │ └── GLSPLayoutConfigurator.java ├── org.eclipse.glsp.server.emf │ ├── .checkstyle │ ├── .classpath │ ├── .gitignore │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ ├── org.eclipse.jdt.core.prefs │ │ ├── org.eclipse.jdt.launching.prefs │ │ ├── org.eclipse.jdt.ui.prefs │ │ └── org.eclipse.m2e.core.prefs │ ├── META-INF │ │ └── MANIFEST.MF │ ├── build.properties │ ├── model │ │ ├── notation.ecore │ │ └── notation.genmodel │ ├── plugin.properties │ ├── plugin.xml │ ├── pom.xml │ ├── src-gen │ │ └── org │ │ │ └── eclipse │ │ │ └── glsp │ │ │ └── server │ │ │ └── emf │ │ │ └── model │ │ │ └── notation │ │ │ ├── Diagram.java │ │ │ ├── Edge.java │ │ │ ├── NotationElement.java │ │ │ ├── NotationFactory.java │ │ │ ├── NotationPackage.java │ │ │ ├── SemanticElementReference.java │ │ │ ├── Shape.java │ │ │ ├── impl │ │ │ ├── DiagramImpl.java │ │ │ ├── EdgeImpl.java │ │ │ ├── NotationElementImpl.java │ │ │ ├── NotationFactoryImpl.java │ │ │ ├── NotationPackageImpl.java │ │ │ ├── SemanticElementReferenceImpl.java │ │ │ └── ShapeImpl.java │ │ │ └── util │ │ │ ├── NotationAdapterFactory.java │ │ │ └── NotationSwitch.java │ └── src │ │ └── org │ │ └── eclipse │ │ └── glsp │ │ └── server │ │ └── emf │ │ ├── AbstractEMFCreateEdgeOperationHandler.java │ │ ├── AbstractEMFCreateNodeOperationHandler.java │ │ ├── AbstractEMFCreateOperationHandler.java │ │ ├── AbstractEMFOperationHandler.java │ │ ├── DefaultEditingDomainFactory.java │ │ ├── EMFCompoundOperationHandler.java │ │ ├── EMFCreateOperationHandler.java │ │ ├── EMFDiagramModule.java │ │ ├── EMFEditingDomainFactory.java │ │ ├── EMFGModelFactory.java │ │ ├── EMFIdGenerator.java │ │ ├── EMFModelIndex.java │ │ ├── EMFModelState.java │ │ ├── EMFModelStateImpl.java │ │ ├── EMFOperationActionHandler.java │ │ ├── EMFOperationHandler.java │ │ ├── EMFSourceModelStorage.java │ │ ├── UUIDXMIResourceFactory.java │ │ ├── idgen │ │ ├── AttributeIdGenerator.java │ │ ├── FragmentIdGenerator.java │ │ ├── IdentificationIdGenerator.java │ │ ├── UUIDIdGenerator.java │ │ └── XMIIDGenerator.java │ │ └── notation │ │ ├── EMFChangeBoundsOperationHandler.java │ │ ├── EMFNotationDiagramModule.java │ │ ├── EMFNotationGModelFactory.java │ │ ├── EMFNotationModelIndex.java │ │ ├── EMFNotationModelState.java │ │ ├── EMFNotationModelStateImpl.java │ │ ├── EMFNotationSourceModelStorage.java │ │ ├── EMFSemanticIdConverter.java │ │ ├── SemanticFragmentIdConverter.java │ │ └── util │ │ └── NotationUtil.java ├── org.eclipse.glsp.server.websocket │ ├── .checkstyle │ ├── .classpath │ ├── .gitignore │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ ├── org.eclipse.jdt.core.prefs │ │ ├── org.eclipse.jdt.launching.prefs │ │ ├── org.eclipse.jdt.ui.prefs │ │ └── org.eclipse.m2e.core.prefs │ ├── META-INF │ │ └── MANIFEST.MF │ ├── build.properties │ ├── pom.xml │ └── src │ │ ├── .gitkeep │ │ └── org │ │ └── eclipse │ │ └── glsp │ │ └── server │ │ └── websocket │ │ ├── GLSPConfigurator.java │ │ ├── GLSPServerEndpoint.java │ │ ├── WebsocketModule.java │ │ └── WebsocketServerLauncher.java └── org.eclipse.glsp.server │ ├── .checkstyle │ ├── .classpath │ ├── .gitignore │ ├── .project │ ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.jdt.launching.prefs │ ├── org.eclipse.jdt.ui.prefs │ └── org.eclipse.m2e.core.prefs │ ├── META-INF │ └── MANIFEST.MF │ ├── build.properties │ ├── pom.xml │ └── src │ └── org │ └── eclipse │ └── glsp │ └── server │ ├── actions │ ├── AbstractActionHandler.java │ ├── Action.java │ ├── ActionDispatcher.java │ ├── ActionHandler.java │ ├── ActionHandlerRegistry.java │ ├── ActionMessage.java │ ├── ActionRegistry.java │ ├── BasicActionHandler.java │ ├── CenterAction.java │ ├── ClientActionForwarder.java │ ├── ExportSVGAction.java │ ├── FitToScreenAction.java │ ├── GhostElement.java │ ├── MessageAction.java │ ├── RejectAction.java │ ├── RequestAction.java │ ├── ResponseAction.java │ ├── SaveModelAction.java │ ├── SaveModelActionHandler.java │ ├── SelectAction.java │ ├── SelectAllAction.java │ ├── SetDirtyStateAction.java │ ├── SetEditModeAction.java │ ├── SetEditModeActionHandler.java │ ├── SetViewportAction.java │ ├── StatusAction.java │ ├── TriggerEdgeCreationAction.java │ ├── TriggerElementCreationAction.java │ ├── TriggerNodeCreationAction.java │ └── UpdateProgressAction.java │ ├── di │ ├── ClientId.java │ ├── ClientSessionModule.java │ ├── DiagramModule.java │ ├── DiagramType.java │ ├── GLSPModule.java │ ├── MultiBinding.java │ ├── ServerModule.java │ └── scope │ │ ├── DiagramGlobalScope.java │ │ ├── DiagramGlobalScopeModule.java │ │ └── DiagramGlobalSingleton.java │ ├── diagram │ ├── BaseDiagramConfiguration.java │ ├── DiagramConfiguration.java │ └── ServerConfigurationContribution.java │ ├── disposable │ ├── Disposable.java │ ├── DisposableCollection.java │ ├── DisposableResult.java │ ├── IDisposable.java │ └── IDisposableResult.java │ ├── features │ ├── clipboard │ │ ├── RequestClipboardDataAction.java │ │ └── SetClipboardDataAction.java │ ├── commandpalette │ │ └── CommandPaletteActionProvider.java │ ├── contextactions │ │ ├── ContextActionsProvider.java │ │ ├── ContextActionsProviderRegistry.java │ │ ├── RequestContextActions.java │ │ ├── RequestContextActionsHandler.java │ │ ├── SetAutoCompleteValueAction.java │ │ └── SetContextActions.java │ ├── contextmenu │ │ ├── ContextMenuItemProvider.java │ │ └── MenuItem.java │ ├── core │ │ └── model │ │ │ ├── ComputedBoundsAction.java │ │ │ ├── ComputedBoundsActionHandler.java │ │ │ ├── GModelFactory.java │ │ │ ├── ModelSubmissionHandler.java │ │ │ ├── RequestBoundsAction.java │ │ │ ├── RequestModelAction.java │ │ │ ├── RequestModelActionHandler.java │ │ │ ├── SetBoundsAction.java │ │ │ ├── SetModelAction.java │ │ │ ├── SourceModelStorage.java │ │ │ └── UpdateModelAction.java │ ├── directediting │ │ ├── ApplyLabelEditOperation.java │ │ ├── ContextEditValidator.java │ │ ├── ContextEditValidatorRegistry.java │ │ ├── LabelEditValidator.java │ │ ├── LabeledAction.java │ │ ├── RequestEditValidationAction.java │ │ ├── RequestEditValidationHandler.java │ │ ├── SetEditValidationResultAction.java │ │ ├── ValidateLabelEditAction.java │ │ └── ValidationStatus.java │ ├── navigation │ │ ├── JsonOpenerOptions.java │ │ ├── NavigateToExternalTargetAction.java │ │ ├── NavigateToTargetAction.java │ │ ├── NavigationTarget.java │ │ ├── NavigationTargetProvider.java │ │ ├── NavigationTargetProviderRegistry.java │ │ ├── NavigationTargetResolution.java │ │ ├── NavigationTargetResolver.java │ │ ├── RequestNavigationTargetsAction.java │ │ ├── RequestNavigationTargetsActionHandler.java │ │ ├── ResolveNavigationTargetAction.java │ │ ├── ResolveNavigationTargetActionHandler.java │ │ ├── SetNavigationTargetsAction.java │ │ └── SetResolvedNavigationTargetAction.java │ ├── popup │ │ ├── PopupModelFactory.java │ │ ├── RequestPopupModelAction.java │ │ ├── RequestPopupModelActionHandler.java │ │ └── SetPopupModelAction.java │ ├── progress │ │ ├── DefaultProgressService.java │ │ ├── EndProgressAction.java │ │ ├── ProgressMonitor.java │ │ ├── ProgressService.java │ │ └── StartProgressAction.java │ ├── sourcemodelwatcher │ │ ├── FileWatcher.java │ │ ├── SourceModelChangedAction.java │ │ └── SourceModelWatcher.java │ ├── toolpalette │ │ ├── PaletteItem.java │ │ └── ToolPaletteItemProvider.java │ ├── typehints │ │ ├── CheckEdgeResultAction.java │ │ ├── EdgeCreationChecker.java │ │ ├── RequestCheckEdgeAction.java │ │ ├── RequestCheckEdgeActionHandler.java │ │ ├── RequestTypeHintsAction.java │ │ ├── RequestTypeHintsActionHandler.java │ │ └── SetTypeHintsAction.java │ ├── undoredo │ │ ├── RedoAction.java │ │ ├── UndoAction.java │ │ └── UndoRedoActionHandler.java │ └── validation │ │ ├── DeleteMarkersAction.java │ │ ├── Marker.java │ │ ├── MarkerKind.java │ │ ├── MarkersReason.java │ │ ├── ModelValidator.java │ │ ├── RequestMarkersAction.java │ │ ├── RequestMarkersHandler.java │ │ └── SetMarkersAction.java │ ├── gmodel │ ├── AbstractGModelCreateEdgeOperationHandler.java │ ├── AbstractGModelCreateNodeOperationHandler.java │ ├── GModelApplyLabelEditOperationHandler.java │ ├── GModelChangeBoundsOperationHandler.java │ ├── GModelChangeRoutingPointsHandler.java │ ├── GModelCreateEdgeOperationHandler.java │ ├── GModelCreateNodeOperationHandler.java │ ├── GModelCreateOperationHandler.java │ ├── GModelCutOperationHandler.java │ ├── GModelDeleteOperationHandler.java │ ├── GModelDiagramModule.java │ ├── GModelPasteOperationHandler.java │ ├── GModelReconnectEdgeOperationHandler.java │ ├── GModelRequestClipboardDataActionHandler.java │ └── GModelStorage.java │ ├── gson │ ├── ActionTypeAdapter.java │ ├── GraphGsonConfigurationFactory.java │ └── ServerGsonConfigurator.java │ ├── internal │ ├── actions │ │ ├── DefaultActionDispatcher.java │ │ ├── DefaultActionHandlerRegistry.java │ │ └── DefaultActionRegistry.java │ ├── di │ │ └── scope │ │ │ └── DefaultDiagramGlobalScope.java │ ├── diagram │ │ └── DefaultServerConfigurationContribution.java │ ├── featues │ │ ├── directediting │ │ │ └── DefaultContextEditValidatorRegistry.java │ │ └── navigation │ │ │ └── DefaultNavigationTargetProviderRegistry.java │ ├── features │ │ └── contextactions │ │ │ └── DefaultContextActionsProviderRegistry.java │ ├── gmodel │ │ └── commandstack │ │ │ ├── GModelChangeRecorder.java │ │ │ ├── GModelCommandStack.java │ │ │ └── GModelRecordingCommand.java │ ├── gson │ │ ├── DefaultGraphGsonConfigurationFactory.java │ │ └── DefaultServerGsonConfigurator.java │ ├── labeledit │ │ └── ValidateLabelEditAdapter.java │ ├── operations │ │ └── DefaultOperationHandlerRegistry.java │ ├── registry │ │ ├── MapMultiRegistry.java │ │ └── MapRegistry.java │ ├── session │ │ ├── DefaultClientSession.java │ │ ├── DefaultClientSessionFactory.java │ │ └── DefaultClientSessionManager.java │ ├── toolpalette │ │ └── DefaultToolPaletteItemProvider.java │ └── util │ │ ├── GenericsUtil.java │ │ └── ReflectionUtil.java │ ├── launch │ ├── CLIParser.java │ ├── DefaultCLIParser.java │ ├── GLSPServerLauncher.java │ └── SocketGLSPServerLauncher.java │ ├── layout │ ├── LayoutEngine.java │ └── ServerLayoutKind.java │ ├── model │ ├── DefaultGModelState.java │ ├── GModelState.java │ └── ModelState.java │ ├── operations │ ├── AbstractCreateOperationHandler.java │ ├── AbstractOperationHandler.java │ ├── BasicOperationHandler.java │ ├── ChangeBoundsOperation.java │ ├── ChangeContainerOperation.java │ ├── ChangeRoutingPointsOperation.java │ ├── CompoundOperation.java │ ├── CompoundOperationHandler.java │ ├── CreateEdgeOperation.java │ ├── CreateNodeOperation.java │ ├── CreateOperation.java │ ├── CreateOperationHandler.java │ ├── CutOperation.java │ ├── CutOperationHandler.java │ ├── DeleteOperation.java │ ├── GModelOperationHandler.java │ ├── LayoutOperation.java │ ├── LayoutOperationHandler.java │ ├── Operation.java │ ├── OperationActionHandler.java │ ├── OperationHandler.java │ ├── OperationHandlerRegistry.java │ ├── PasteOperation.java │ └── ReconnectEdgeOperation.java │ ├── protocol │ ├── DefaultGLSPServer.java │ ├── DisposeClientSessionParameters.java │ ├── GLSPClient.java │ ├── GLSPServer.java │ ├── GLSPServerListener.java │ ├── InitializeClientSessionParameters.java │ ├── InitializeParameters.java │ └── InitializeResult.java │ ├── registry │ ├── MultiRegistry.java │ └── Registry.java │ ├── session │ ├── ClientSession.java │ ├── ClientSessionFactory.java │ ├── ClientSessionListener.java │ └── ClientSessionManager.java │ ├── types │ ├── EdgeTypeHint.java │ ├── EditorContext.java │ ├── ElementAndAlignment.java │ ├── ElementAndBounds.java │ ├── ElementAndRoutingPoints.java │ ├── ElementTypeHint.java │ ├── GLSPServerException.java │ ├── Severity.java │ ├── ShapeTypeHint.java │ └── Viewport.java │ └── utils │ ├── BiIndex.java │ ├── ClientOptionsUtil.java │ ├── Debouncer.java │ ├── FutureUtil.java │ ├── GModelUtil.java │ ├── GeometryUtil.java │ ├── LaunchUtil.java │ ├── LayoutUtil.java │ ├── MapUtil.java │ ├── MessageActionUtil.java │ ├── ModuleUtil.java │ └── StatusActionUtil.java ├── pom.xml ├── releng ├── .gitignore ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.m2e.core.prefs ├── org.eclipse.glsp.feature │ ├── .gitignore │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ └── org.eclipse.m2e.core.prefs │ ├── build.properties │ ├── feature.xml │ └── pom.xml ├── org.eclipse.glsp.repository │ ├── .gitignore │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ └── org.eclipse.m2e.core.prefs │ ├── category.xml │ ├── packaging-p2composite.ant │ ├── pom.xml │ └── rsync.ant └── pom.xml ├── targetplatforms ├── .gitignore ├── .project ├── .settings │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── maven-dependencies.tpd ├── pom.xml ├── r2023-12.target ├── r2023-12.tpd ├── r2024-09.target └── r2024-09.tpd └── tests ├── .project ├── .settings └── org.eclipse.core.resources.prefs ├── org.eclipse.glsp.graph.test ├── .checkstyle ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.jdt.launching.prefs │ ├── org.eclipse.jdt.ui.prefs │ └── org.eclipse.m2e.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── pom.xml ├── resources │ ├── graphEdgeBeforeSourceAndTarget.graph │ ├── graphWithAllDefaultTypes.graph │ ├── graphWithCustomTypeMap.graph │ └── graphWithTwoNodesAndOneEdge.graph └── src │ └── org │ └── eclipse │ └── glsp │ └── graph │ ├── GModelIndexWhenDeserializedFromJsonTest.java │ ├── ReadAndWriteSModelJsonTest.java │ └── impl │ └── GEdgeImplSpecTest.java ├── org.eclipse.glsp.server.test ├── .checkstyle ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.jdt.launching.prefs │ ├── org.eclipse.jdt.ui.prefs │ └── org.eclipse.m2e.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── pom.xml └── src │ └── org │ └── eclipse │ └── glsp │ └── server │ ├── features │ └── sourcemodelwatcher │ │ └── FileWatcherTest.java │ ├── internal │ └── util │ │ └── GenericsUtilTest.java │ └── utils │ └── BiIndexTest.java └── pom.xml /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Question 4 | url: https://github.com/eclipse-glsp/glsp/discussions 5 | about: Please ask questions on the Eclipse GLSP discussions page. 6 | - name: Create issue in GLSP umbrella project 7 | url: https://github.com/eclipse-glsp/glsp/issues/new/choose 8 | about: Please create new issues in the GLSP umbrella project, as we are tracking the issues for all components of GLSP there. 9 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | #### What it does 13 | 14 | 15 | 16 | #### How to test 17 | 18 | 19 | 20 | #### Follow-ups 21 | 22 | 23 | 24 | #### Changelog 25 | 26 | 27 | 28 | - [ ] This PR should be mentioned in the changelog 29 | - [ ] This PR introduces a breaking change (if yes, provide more details below for the changelog and the migration guide) 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | .m2 3 | .tycho-consumer-pom.xml -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.eclipse.glsp.parent 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Eclipse GLSP Vulnerability Reporting Policy 2 | 3 | If you think or suspect that you have discovered a new security vulnerability 4 | in this project, please __do not__ disclose it on GitHub, e.g. in an issue, a 5 | PR, or a discussion. Any such disclosure will be removed/deleted on sight, to 6 | promote orderly disclosure, as per the Eclipse Foundation Security Policy (1). 7 | 8 | Instead, please report any potential vulnerability to the Eclipse Foundation [Security Team](https://www.eclipse.org/security/). Make sure to provide a concise description of the issue, a CWE, and other supporting information. 9 | 10 | (1) _Eclipse Foundation Vulnerability Reporting Policy_: 11 | [https://www.eclipse.org/security/policy.php](https://www.eclipse.org/security/policy.php) 12 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/.checkstyle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /logs/ -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.eclipse.glsp.example.workflow 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | net.sf.eclipsecs.core.CheckstyleBuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.m2e.core.maven2Builder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.m2e.core.maven2Nature 36 | org.eclipse.pde.PluginNature 37 | org.eclipse.jdt.core.javanature 38 | net.sf.eclipsecs.core.CheckstyleNature 39 | 40 | 41 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/java-gen=UTF-8 4 | encoding//src/main/resources=UTF-8 5 | encoding//src/test/java=UTF-8 6 | encoding//src/test/resources=UTF-8 7 | encoding/=UTF-8 8 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/.settings/org.eclipse.jdt.launching.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=ignore 3 | org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore 4 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: GLSP Workflow Example 4 | Bundle-SymbolicName: org.eclipse.glsp.example.workflow;singleton:=true 5 | Bundle-Version: 2.5.0.qualifier 6 | Bundle-ClassPath: . 7 | Bundle-Vendor: Eclipse GLSP 8 | Bundle-Localization: plugin 9 | Export-Package: org.eclipse.glsp.example.workflow, 10 | org.eclipse.glsp.example.workflow.action, 11 | org.eclipse.glsp.example.workflow.handler, 12 | org.eclipse.glsp.example.workflow.labeledit, 13 | org.eclipse.glsp.example.workflow.launch, 14 | org.eclipse.glsp.example.workflow.layout, 15 | org.eclipse.glsp.example.workflow.marker, 16 | org.eclipse.glsp.example.workflow.model, 17 | org.eclipse.glsp.example.workflow.provider, 18 | org.eclipse.glsp.example.workflow.taskedit, 19 | org.eclipse.glsp.example.workflow.utils, 20 | org.eclipse.glsp.example.workflow.wfgraph, 21 | org.eclipse.glsp.example.workflow.wfgraph.impl, 22 | org.eclipse.glsp.example.workflow.wfgraph.util 23 | Automatic-Module-Name: org.eclipse.glsp.example.workflow 24 | Bundle-RequiredExecutionEnvironment: JavaSE-17 25 | Require-Bundle: org.eclipse.glsp.layout;bundle-version="[2.3.0,3.0.0)", 26 | org.eclipse.glsp.server;bundle-version="[2.3.0,3.0.0)", 27 | org.eclipse.glsp.server.websocket;bundle-version="[2.3.0,3.0.0)", 28 | org.eclipse.elk.alg.layered;bundle-version="0.8.1", 29 | org.eclipse.elk.core;bundle-version="0.8.1", 30 | org.eclipse.elk.graph;bundle-version="0.8.1" 31 | Import-Package: org.apache.logging.log4j;version="2.17.1" 32 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/Start_Workflow_Example_Server.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/Start_Workflow_Example_Server_(Websocket).launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/build.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019-2023 EclipseSource and others. 2 | # 3 | # This program and the accompanying materials are made available under the 4 | # terms of the Eclipse Public License v. 2.0 which is available at 5 | # https://www.eclipse.org/legal/epl-2.0. 6 | # 7 | # This Source Code may also be made available under the following Secondary 8 | # Licenses when the conditions for such availability set forth in the Eclipse 9 | # Public License v. 2.0 are satisfied: GNU General Public License, version 2 10 | # with the GNU Classpath Exception which is available at 11 | # https://www.gnu.org/software/classpath/license.html. 12 | # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 13 | # 14 | 15 | bin.includes = .,\ 16 | model/,\ 17 | META-INF/,\ 18 | plugin.properties,\ 19 | plugin.xml 20 | jars.compile.order = . 21 | source.. = src-gen,\ 22 | src/ 23 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/plugin.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019-2020 EclipseSource and others. 2 | # 3 | # This program and the accompanying materials are made available under the 4 | # terms of the Eclipse Public License v. 2.0 which is available at 5 | # https://www.eclipse.org/legal/epl-2.0. 6 | # 7 | # This Source Code may also be made available under the following Secondary 8 | # Licenses when the conditions for such availability set forth in the Eclipse 9 | # Public License v. 2.0 are satisfied: GNU General Public License, version 2 10 | # with the GNU Classpath Exception which is available at 11 | # https://www.gnu.org/software/classpath/license.html. 12 | # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 13 | # 14 | 15 | pluginName = Workflow 16 | providerName = Eclipse GLSP 17 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 20 | 21 | 22 | 23 | 24 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/src-gen/org/eclipse/glsp/example/workflow/wfgraph/Icon.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 14 | * 15 | */ 16 | package org.eclipse.glsp.example.workflow.wfgraph; 17 | 18 | import org.eclipse.glsp.graph.GCompartment; 19 | 20 | /** 21 | * 22 | * A representation of the model object 'Icon'. 23 | * 24 | * 25 | * 26 | * @see org.eclipse.glsp.example.workflow.wfgraph.WfgraphPackage#getIcon() 27 | * @model 28 | * @generated 29 | */ 30 | public interface Icon extends GCompartment { 31 | } // Icon 32 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/WFGraphExtension.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.example.workflow; 17 | 18 | import org.eclipse.emf.ecore.EFactory; 19 | import org.eclipse.emf.ecore.EPackage; 20 | import org.eclipse.glsp.example.workflow.wfgraph.WfgraphFactory; 21 | import org.eclipse.glsp.example.workflow.wfgraph.WfgraphPackage; 22 | import org.eclipse.glsp.graph.GraphExtension; 23 | 24 | public class WFGraphExtension implements GraphExtension { 25 | 26 | @Override 27 | public EPackage getEPackage() { return WfgraphPackage.eINSTANCE; } 28 | 29 | @Override 30 | public EFactory getEFactory() { return WfgraphFactory.eINSTANCE; } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/handler/CreateForkNodeHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.example.workflow.handler; 17 | 18 | import org.eclipse.glsp.example.workflow.utils.ModelTypes; 19 | 20 | public class CreateForkNodeHandler extends CreateForkOrJoinNodeHandler { 21 | 22 | public CreateForkNodeHandler() { 23 | super(ModelTypes.FORK_NODE, "Fork Node"); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/handler/CreateForkOrJoinNodeHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.example.workflow.handler; 17 | 18 | import java.util.Optional; 19 | 20 | import org.eclipse.glsp.example.workflow.utils.WorkflowBuilder.ActivityNodeBuilder; 21 | import org.eclipse.glsp.graph.GPoint; 22 | import org.eclipse.glsp.server.model.GModelState; 23 | 24 | public abstract class CreateForkOrJoinNodeHandler extends CreateActivityNodeHandler { 25 | 26 | public CreateForkOrJoinNodeHandler(final String elementTypeId, final String label) { 27 | super(elementTypeId, label); 28 | } 29 | 30 | @Override 31 | protected ActivityNodeBuilder builder(final Optional point, final GModelState modelState) { 32 | return super.builder(point, modelState) 33 | .addCssClass("forkOrJoin") 34 | .size(10d, 50d); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/handler/CreateJoinNodeHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.example.workflow.handler; 17 | 18 | import org.eclipse.glsp.example.workflow.utils.ModelTypes; 19 | 20 | public class CreateJoinNodeHandler extends CreateForkOrJoinNodeHandler { 21 | 22 | public CreateJoinNodeHandler() { 23 | super(ModelTypes.JOIN_NODE, "Join Node"); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/handler/GridSnapper.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.example.workflow.handler; 17 | 18 | import java.util.Optional; 19 | 20 | import org.eclipse.glsp.graph.GPoint; 21 | import org.eclipse.glsp.graph.util.GraphUtil; 22 | 23 | public final class GridSnapper { 24 | public static final double GRID_X = 10.0; 25 | public static final double GRID_Y = 10.0; 26 | 27 | private GridSnapper() {} 28 | 29 | public static GPoint snap(final GPoint originalpoint) { 30 | double snappedX = Math.round(originalpoint.getX() / GRID_X) * GRID_X; 31 | double snappedY = Math.round(originalpoint.getY() / GRID_Y) * GRID_Y; 32 | return GraphUtil.point(snappedX, snappedY); 33 | } 34 | 35 | public static Optional snap(final Optional originalPoint) { 36 | return originalPoint.map(GridSnapper::snap); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/launch/WorkflowServerModule.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2023 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.example.workflow.launch; 17 | 18 | import org.eclipse.glsp.example.workflow.WorkflowGLSPServer; 19 | import org.eclipse.glsp.server.di.ServerModule; 20 | import org.eclipse.glsp.server.protocol.GLSPServer; 21 | 22 | public class WorkflowServerModule extends ServerModule { 23 | 24 | @Override 25 | protected Class bindGLSPServer() { 26 | return WorkflowGLSPServer.class; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/provider/NextNodeNavigationTargetProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.example.workflow.provider; 17 | 18 | import java.util.Collection; 19 | 20 | import org.eclipse.glsp.example.workflow.wfgraph.TaskNode; 21 | import org.eclipse.glsp.graph.GEdge; 22 | import org.eclipse.glsp.server.model.GModelState; 23 | 24 | public class NextNodeNavigationTargetProvider extends AbstractNextOrPreviousNavigationTargetProvider { 25 | 26 | @Override 27 | public String getTargetTypeId() { return "next"; } 28 | 29 | @Override 30 | protected Collection getEdges(final TaskNode taskNode, final GModelState modelState) { 31 | return modelState.getIndex().getOutgoingEdges(taskNode); 32 | } 33 | 34 | @Override 35 | protected String getSourceOrTarget(final GEdge edge) { 36 | return edge.getTargetId(); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/provider/PreviousNodeNavigationTargetProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.example.workflow.provider; 17 | 18 | import java.util.Collection; 19 | 20 | import org.eclipse.glsp.example.workflow.wfgraph.TaskNode; 21 | import org.eclipse.glsp.graph.GEdge; 22 | import org.eclipse.glsp.server.model.GModelState; 23 | 24 | public class PreviousNodeNavigationTargetProvider extends AbstractNextOrPreviousNavigationTargetProvider { 25 | 26 | @Override 27 | public String getTargetTypeId() { return "previous"; } 28 | 29 | @Override 30 | protected Collection getEdges(final TaskNode taskNode, final GModelState modelState) { 31 | return modelState.getIndex().getIncomingEdges(taskNode); 32 | } 33 | 34 | @Override 35 | protected String getSourceOrTarget(final GEdge edge) { 36 | return edge.getSourceId(); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/.checkstyle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /target/ 3 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.eclipse.glsp.graph 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | net.sf.eclipsecs.core.CheckstyleBuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.m2e.core.maven2Builder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.m2e.core.maven2Nature 36 | org.eclipse.pde.PluginNature 37 | org.eclipse.jdt.core.javanature 38 | net.sf.eclipsecs.core.CheckstyleNature 39 | 40 | 41 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/java-gen=UTF-8 4 | encoding//src/main/resources=UTF-8 5 | encoding//src/test/java=UTF-8 6 | encoding//src/test/resources=UTF-8 7 | encoding/=UTF-8 8 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/.settings/org.eclipse.jdt.launching.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=ignore 3 | org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore 4 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: GLSP Graph 4 | Bundle-SymbolicName: org.eclipse.glsp.graph;singleton:=true 5 | Bundle-Version: 2.5.0.qualifier 6 | Bundle-Vendor: Eclipse GLSP 7 | Automatic-Module-Name: org.eclipse.glsp.graph 8 | Bundle-RequiredExecutionEnvironment: JavaSE-17 9 | Require-Bundle: org.eclipse.emf.common;bundle-version="2.29.0", 10 | org.eclipse.emf.ecore;bundle-version="2.35.0";visibility:=reexport, 11 | com.google.gson;bundle-version="2.10.1" 12 | Export-Package: org.eclipse.glsp.graph, 13 | org.eclipse.glsp.graph, 14 | org.eclipse.glsp.graph.builder, 15 | org.eclipse.glsp.graph.builder.impl, 16 | org.eclipse.glsp.graph.gson, 17 | org.eclipse.glsp.graph.impl, 18 | org.eclipse.glsp.graph.impl, 19 | org.eclipse.glsp.graph.util, 20 | org.eclipse.glsp.graph.util 21 | Import-Package: org.apache.logging.log4j;version="2.17.1" 22 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/ 3 | bin.includes = META-INF/,\ 4 | .,\ 5 | model/,\ 6 | plugin.xml 7 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/model/.gitkeep: -------------------------------------------------------------------------------- 1 | keep 2 | 3 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src-gen/org/eclipse/glsp/graph/GCompartment.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | * ******************************************************************************** 16 | */ 17 | package org.eclipse.glsp.graph; 18 | 19 | /** 20 | * 21 | * A representation of the model object 'GCompartment'. 22 | * 23 | * 24 | * 25 | * @see org.eclipse.glsp.graph.GraphPackage#getGCompartment() 26 | * @model 27 | * @generated 28 | */ 29 | public interface GCompartment extends GShapeElement, GLayouting {} // GCompartment 30 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src-gen/org/eclipse/glsp/graph/GGraph.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | * ******************************************************************************** 16 | */ 17 | package org.eclipse.glsp.graph; 18 | 19 | /** 20 | * 21 | * A representation of the model object 'GGraph'. 22 | * 23 | * 24 | * 25 | * @see org.eclipse.glsp.graph.GraphPackage#getGGraph() 26 | * @model 27 | * @generated 28 | */ 29 | public interface GGraph extends GModelRoot, GBoundsAware, GLayoutable { 30 | 31 | } // GGraph 32 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src-gen/org/eclipse/glsp/graph/GNode.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | * ******************************************************************************** 16 | */ 17 | package org.eclipse.glsp.graph; 18 | 19 | /** 20 | * 21 | * A representation of the model object 'GNode'. 22 | * 23 | * 24 | * 25 | * @see org.eclipse.glsp.graph.GraphPackage#getGNode() 26 | * @model 27 | * @generated 28 | */ 29 | public interface GNode extends GShapeElement, GEdgeLayoutable, GLayouting {} // GNode 30 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src-gen/org/eclipse/glsp/graph/GPort.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | * ******************************************************************************** 16 | */ 17 | package org.eclipse.glsp.graph; 18 | 19 | /** 20 | * 21 | * A representation of the model object 'GPort'. 22 | * 23 | * 24 | * 25 | * @see org.eclipse.glsp.graph.GraphPackage#getGPort() 26 | * @model 27 | * @generated 28 | */ 29 | public interface GPort extends GShapeElement {} // GPort 30 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src-gen/org/eclipse/glsp/graph/GShapeElement.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | * ******************************************************************************** 16 | */ 17 | package org.eclipse.glsp.graph; 18 | 19 | /** 20 | * 21 | * A representation of the model object 'GShape Element'. 22 | * 23 | * 24 | * 25 | * @see org.eclipse.glsp.graph.GraphPackage#getGShapeElement() 26 | * @model interface="true" abstract="true" 27 | * @generated 28 | */ 29 | public interface GShapeElement extends GModelElement, GBoundsAware, GLayoutable, GResizable {} // GShapeElement 30 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src-gen/org/eclipse/glsp/graph/GShapePreRenderedElement.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | * ******************************************************************************** 16 | */ 17 | package org.eclipse.glsp.graph; 18 | 19 | /** 20 | * 21 | * A representation of the model object 'GShape Pre Rendered Element'. 22 | * 23 | * 24 | * 25 | * @see org.eclipse.glsp.graph.GraphPackage#getGShapePreRenderedElement() 26 | * @model 27 | * @generated 28 | */ 29 | public interface GShapePreRenderedElement extends GPreRenderedElement, GBoundsAware {} // GShapePreRenderedElement 30 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/GModelListener.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph; 17 | 18 | import org.eclipse.emf.common.notify.Notification; 19 | 20 | /** 21 | * A listener to observe changes of the {@link GModelRoot}. 22 | * It is typically associated with a {@link GModelChangeNotifier}. 23 | */ 24 | public interface GModelListener { 25 | 26 | /** 27 | * Triggered if a change to the {@link GModelRoot} has occurred. 28 | * 29 | * @param notification A description of the change to the GModelRoot. 30 | */ 31 | void notifyChanged(Notification notification); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/builder/AbstractGButtonBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph.builder; 17 | 18 | import org.eclipse.glsp.graph.GButton; 19 | 20 | public abstract class AbstractGButtonBuilder> 21 | extends GShapeElementBuilder { 22 | protected boolean enabled; 23 | 24 | public AbstractGButtonBuilder(String type) { 25 | super(type); 26 | } 27 | 28 | public E enabled(boolean enabled) { 29 | this.enabled = enabled; 30 | return self(); 31 | } 32 | 33 | @Override 34 | public void setProperties(T button) { 35 | super.setProperties(button); 36 | button.setEnabled(enabled); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/builder/AbstractGForeignObjectBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2024 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph.builder; 17 | 18 | import org.eclipse.glsp.graph.GForeignObjectElement; 19 | 20 | public abstract class AbstractGForeignObjectBuilder> 21 | extends AbstractGShapePrenderedElementBuilder { 22 | protected String namespace; 23 | 24 | public AbstractGForeignObjectBuilder(final String type) { 25 | super(type); 26 | } 27 | 28 | public E namespace(final String namespace) { 29 | this.namespace = namespace; 30 | return self(); 31 | } 32 | 33 | @Override 34 | protected void setProperties(final T element) { 35 | super.setProperties(element); 36 | element.setNamespace(namespace); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/builder/AbstractGGraphBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph.builder; 17 | 18 | import java.util.Map; 19 | 20 | import org.eclipse.glsp.graph.GGraph; 21 | 22 | public abstract class AbstractGGraphBuilder> 23 | extends GModelRootBuilder { 24 | 25 | protected Map gLayoutOptions; 26 | 27 | public AbstractGGraphBuilder(final String type) { 28 | super(type); 29 | } 30 | 31 | public E layoutOptions(final Map gLayoutOptions) { 32 | this.gLayoutOptions = gLayoutOptions; 33 | return self(); 34 | } 35 | 36 | @Override 37 | protected void setProperties(final T element) { 38 | super.setProperties(element); 39 | if (gLayoutOptions != null) { 40 | element.getLayoutOptions().putAll(gLayoutOptions); 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/builder/AbstractGPreRenderedElementBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph.builder; 17 | 18 | import org.eclipse.glsp.graph.GPreRenderedElement; 19 | 20 | public abstract class AbstractGPreRenderedElementBuilder> 21 | extends GModelElementBuilder { 22 | protected String code; 23 | 24 | public AbstractGPreRenderedElementBuilder(String type) { 25 | super(type); 26 | } 27 | 28 | public E code(String code) { 29 | this.code = code; 30 | return self(); 31 | } 32 | 33 | @Override 34 | protected void setProperties(T preRendered) { 35 | super.setProperties(preRendered); 36 | preRendered.setCode(code); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/builder/GBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph.builder; 17 | 18 | public abstract class GBuilder { 19 | 20 | protected abstract T instantiate(); 21 | 22 | protected abstract void setProperties(T element); 23 | 24 | public T build() { 25 | final T element = instantiate(); 26 | setProperties(element); 27 | return element; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/builder/impl/GButtonBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph.builder.impl; 17 | 18 | import org.eclipse.glsp.graph.DefaultTypes; 19 | import org.eclipse.glsp.graph.GButton; 20 | import org.eclipse.glsp.graph.GraphFactory; 21 | import org.eclipse.glsp.graph.builder.AbstractGButtonBuilder; 22 | 23 | public class GButtonBuilder extends AbstractGButtonBuilder { 24 | 25 | public GButtonBuilder() { 26 | this(DefaultTypes.BUTTON); 27 | } 28 | 29 | public GButtonBuilder(String type) { 30 | super(type); 31 | } 32 | 33 | @Override 34 | protected GButton instantiate() { 35 | return GraphFactory.eINSTANCE.createGButton(); 36 | } 37 | 38 | @Override 39 | protected GButtonBuilder self() { 40 | return this; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/builder/impl/GCompartmentBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph.builder.impl; 17 | 18 | import org.eclipse.glsp.graph.DefaultTypes; 19 | import org.eclipse.glsp.graph.GCompartment; 20 | import org.eclipse.glsp.graph.GraphFactory; 21 | import org.eclipse.glsp.graph.builder.AbstractGCompartmentBuilder; 22 | 23 | public class GCompartmentBuilder extends AbstractGCompartmentBuilder { 24 | 25 | public GCompartmentBuilder() { 26 | this(DefaultTypes.COMPARTMENT); 27 | } 28 | 29 | public GCompartmentBuilder(String type) { 30 | super(type); 31 | } 32 | 33 | @Override 34 | protected GCompartment instantiate() { 35 | return GraphFactory.eINSTANCE.createGCompartment(); 36 | } 37 | 38 | @Override 39 | protected GCompartmentBuilder self() { 40 | return this; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/builder/impl/GEdgeBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph.builder.impl; 17 | 18 | import org.eclipse.glsp.graph.DefaultTypes; 19 | import org.eclipse.glsp.graph.GEdge; 20 | import org.eclipse.glsp.graph.GraphFactory; 21 | import org.eclipse.glsp.graph.builder.AbstractGEdgeBuilder; 22 | 23 | public class GEdgeBuilder extends AbstractGEdgeBuilder { 24 | 25 | public GEdgeBuilder() { 26 | this(DefaultTypes.EDGE); 27 | } 28 | 29 | public GEdgeBuilder(String type) { 30 | super(type); 31 | } 32 | 33 | @Override 34 | protected GEdge instantiate() { 35 | return GraphFactory.eINSTANCE.createGEdge(); 36 | } 37 | 38 | @Override 39 | protected GEdgeBuilder self() { 40 | return this; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/builder/impl/GGraphBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph.builder.impl; 17 | 18 | import org.eclipse.glsp.graph.DefaultTypes; 19 | import org.eclipse.glsp.graph.GGraph; 20 | import org.eclipse.glsp.graph.GraphFactory; 21 | import org.eclipse.glsp.graph.builder.AbstractGGraphBuilder; 22 | 23 | public class GGraphBuilder extends AbstractGGraphBuilder { 24 | 25 | public GGraphBuilder() { 26 | this(DefaultTypes.GRAPH); 27 | } 28 | 29 | public GGraphBuilder(String type) { 30 | super(type); 31 | } 32 | 33 | @Override 34 | protected GGraph instantiate() { 35 | return GraphFactory.eINSTANCE.createGGraph(); 36 | } 37 | 38 | @Override 39 | protected GGraphBuilder self() { 40 | return this; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/builder/impl/GHtmlRootBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph.builder.impl; 17 | 18 | import org.eclipse.glsp.graph.DefaultTypes; 19 | import org.eclipse.glsp.graph.GHtmlRoot; 20 | import org.eclipse.glsp.graph.GraphFactory; 21 | import org.eclipse.glsp.graph.builder.AbstractGHtmlRootBuilder; 22 | 23 | public class GHtmlRootBuilder extends AbstractGHtmlRootBuilder { 24 | 25 | public GHtmlRootBuilder() { 26 | this(DefaultTypes.HTML); 27 | } 28 | 29 | public GHtmlRootBuilder(String type) { 30 | super(type); 31 | } 32 | 33 | @Override 34 | protected GHtmlRoot instantiate() { 35 | return GraphFactory.eINSTANCE.createGHtmlRoot(); 36 | } 37 | 38 | @Override 39 | protected GHtmlRootBuilder self() { 40 | return this; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/builder/impl/GIssueMarkerBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph.builder.impl; 17 | 18 | import org.eclipse.glsp.graph.DefaultTypes; 19 | import org.eclipse.glsp.graph.GIssueMarker; 20 | import org.eclipse.glsp.graph.GraphFactory; 21 | import org.eclipse.glsp.graph.builder.AbstractGIssueMarkerBuilder; 22 | 23 | public class GIssueMarkerBuilder extends AbstractGIssueMarkerBuilder { 24 | 25 | public GIssueMarkerBuilder() { 26 | this(DefaultTypes.ISSUE_MARKER); 27 | } 28 | 29 | public GIssueMarkerBuilder(String type) { 30 | super(type); 31 | } 32 | 33 | @Override 34 | protected GIssueMarker instantiate() { 35 | return GraphFactory.eINSTANCE.createGIssueMarker(); 36 | } 37 | 38 | @Override 39 | protected GIssueMarkerBuilder self() { 40 | return this; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/builder/impl/GLabelBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph.builder.impl; 17 | 18 | import org.eclipse.glsp.graph.DefaultTypes; 19 | import org.eclipse.glsp.graph.GLabel; 20 | import org.eclipse.glsp.graph.GraphFactory; 21 | import org.eclipse.glsp.graph.builder.AbstractGLabelBuilder; 22 | 23 | public class GLabelBuilder extends AbstractGLabelBuilder { 24 | 25 | public GLabelBuilder() { 26 | this(DefaultTypes.LABEL); 27 | } 28 | 29 | public GLabelBuilder(String type) { 30 | super(type); 31 | } 32 | 33 | @Override 34 | protected GLabel instantiate() { 35 | return GraphFactory.eINSTANCE.createGLabel(); 36 | } 37 | 38 | @Override 39 | protected GLabelBuilder self() { 40 | return this; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/builder/impl/GNodeBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph.builder.impl; 17 | 18 | import org.eclipse.glsp.graph.DefaultTypes; 19 | import org.eclipse.glsp.graph.GNode; 20 | import org.eclipse.glsp.graph.GraphFactory; 21 | import org.eclipse.glsp.graph.builder.AbstractGNodeBuilder; 22 | 23 | public class GNodeBuilder extends AbstractGNodeBuilder { 24 | 25 | public GNodeBuilder() { 26 | this(DefaultTypes.NODE); 27 | } 28 | 29 | public GNodeBuilder(String type) { 30 | super(type); 31 | } 32 | 33 | @Override 34 | protected GNode instantiate() { 35 | return GraphFactory.eINSTANCE.createGNode(); 36 | } 37 | 38 | @Override 39 | protected GNodeBuilder self() { 40 | return this; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/builder/impl/GPortBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph.builder.impl; 17 | 18 | import org.eclipse.glsp.graph.DefaultTypes; 19 | import org.eclipse.glsp.graph.GPort; 20 | import org.eclipse.glsp.graph.GraphFactory; 21 | import org.eclipse.glsp.graph.builder.GShapeElementBuilder; 22 | 23 | public class GPortBuilder extends GShapeElementBuilder { 24 | 25 | public GPortBuilder() { 26 | this(DefaultTypes.PORT); 27 | } 28 | 29 | public GPortBuilder(String type) { 30 | super(type); 31 | } 32 | 33 | @Override 34 | protected GPort instantiate() { 35 | return GraphFactory.eINSTANCE.createGPort(); 36 | } 37 | 38 | @Override 39 | protected GPortBuilder self() { 40 | return this; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.graph/src/org/eclipse/glsp/graph/gson/ClassBasedDeserializer.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.graph.gson; 17 | 18 | import java.lang.reflect.Type; 19 | 20 | import org.eclipse.emf.ecore.EObject; 21 | 22 | import com.google.gson.JsonDeserializationContext; 23 | import com.google.gson.JsonDeserializer; 24 | import com.google.gson.JsonElement; 25 | import com.google.gson.JsonParseException; 26 | 27 | public class ClassBasedDeserializer implements JsonDeserializer { 28 | 29 | private Class clazz; 30 | 31 | public ClassBasedDeserializer(Class clazz) { 32 | this.clazz = clazz; 33 | } 34 | 35 | @Override 36 | public EObject deserialize(JsonElement json, Type type, JsonDeserializationContext context) 37 | throws JsonParseException { 38 | return context.deserialize(json, clazz); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.layout/.checkstyle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.layout/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.layout/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /target/ 3 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.layout/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.eclipse.glsp.layout 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | net.sf.eclipsecs.core.CheckstyleBuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.m2e.core.maven2Builder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.m2e.core.maven2Nature 36 | org.eclipse.pde.PluginNature 37 | org.eclipse.jdt.core.javanature 38 | net.sf.eclipsecs.core.CheckstyleNature 39 | 40 | 41 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.layout/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/java-gen=UTF-8 4 | encoding//src/main/resources=UTF-8 5 | encoding//src/test/java=UTF-8 6 | encoding//src/test/resources=UTF-8 7 | encoding/=UTF-8 8 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.layout/.settings/org.eclipse.jdt.launching.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=ignore 3 | org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore 4 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.layout/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.layout/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: GLSP Layout 4 | Bundle-SymbolicName: org.eclipse.glsp.layout 5 | Bundle-Version: 2.5.0.qualifier 6 | Bundle-Vendor: EclispeSource 7 | Automatic-Module-Name: org.eclipse.glsp.layout 8 | Bundle-RequiredExecutionEnvironment: JavaSE-17 9 | Require-Bundle: com.google.inject;bundle-version="[7.0.0,8.0.0)", 10 | org.apache.commons.cli;bundle-version="1.6.0", 11 | org.eclipse.emf.common;bundle-version="2.29.0", 12 | org.eclipse.elk.core;bundle-version="0.8.1", 13 | org.eclipse.elk.graph;bundle-version="0.8.1", 14 | org.eclipse.glsp.server;bundle-version="[2.3.0,3.0.0)" 15 | Export-Package: org.eclipse.glsp.layout 16 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.layout/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/ 2 | bin.includes = META-INF/,\ 3 | . 4 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/.checkstyle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.eclipse.glsp.server.emf 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | net.sf.eclipsecs.core.CheckstyleBuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.m2e.core.maven2Builder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.m2e.core.maven2Nature 36 | org.eclipse.pde.PluginNature 37 | org.eclipse.jdt.core.javanature 38 | net.sf.eclipsecs.core.CheckstyleNature 39 | 40 | 41 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/java-gen=UTF-8 4 | encoding//src/main/resources=UTF-8 5 | encoding//src/test/java=UTF-8 6 | encoding//src/test/resources=UTF-8 7 | encoding/=UTF-8 8 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/.settings/org.eclipse.jdt.launching.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=ignore 3 | org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore 4 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: GLSP Server EMF 4 | Bundle-SymbolicName: org.eclipse.glsp.server.emf;singleton:=true 5 | Bundle-Version: 2.5.0.qualifier 6 | Bundle-ClassPath: . 7 | Bundle-Vendor: Eclipse GLSP 8 | Bundle-Localization: plugin 9 | Automatic-Module-Name: org.eclipse.glsp.example.emf 10 | Bundle-RequiredExecutionEnvironment: JavaSE-17 11 | Require-Bundle: org.eclipse.glsp.server;bundle-version="[2.3.0,3.0.0)", 12 | org.eclipse.emf.ecore;bundle-version="2.25.0", 13 | org.eclipse.emf.ecore.edit;bundle-version="2.13.0", 14 | org.eclipse.emf.ecore.xmi;bundle-version="2.16.0" 15 | Export-Package: 16 | org.eclipse.glsp.server.emf, 17 | org.eclipse.glsp.server.emf.idgen, 18 | org.eclipse.glsp.server.emf.model.notation, 19 | org.eclipse.glsp.server.emf.model.notation.impl, 20 | org.eclipse.glsp.server.emf.model.notation.util, 21 | org.eclipse.glsp.server.emf.notation, 22 | org.eclipse.glsp.server.emf.notation.util 23 | Import-Package: org.apache.logging.log4j;version="2.17.1" 24 | 25 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/build.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022 EclipseSource and others. 2 | # 3 | # This program and the accompanying materials are made available under the 4 | # terms of the Eclipse Public License v. 2.0 which is available at 5 | # https://www.eclipse.org/legal/epl-2.0. 6 | # 7 | # This Source Code may also be made available under the following Secondary 8 | # Licenses when the conditions for such availability set forth in the Eclipse 9 | # Public License v. 2.0 are satisfied: GNU General Public License, version 2 10 | # with the GNU Classpath Exception which is available at 11 | # https://www.gnu.org/software/classpath/license.html. 12 | # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 13 | # 14 | 15 | bin.includes = .,\ 16 | model/,\ 17 | META-INF/,\ 18 | plugin.xml,\ 19 | plugin.properties 20 | jars.compile.order = . 21 | source.. = src-gen,\ 22 | src/ 23 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/plugin.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022 EclipseSource and others. 2 | # 3 | # This program and the accompanying materials are made available under the 4 | # terms of the Eclipse Public License v. 2.0 which is available at 5 | # https://www.eclipse.org/legal/epl-2.0. 6 | # 7 | # This Source Code may also be made available under the following Secondary 8 | # Licenses when the conditions for such availability set forth in the Eclipse 9 | # Public License v. 2.0 are satisfied: GNU General Public License, version 2 10 | # with the GNU Classpath Exception which is available at 11 | # https://www.gnu.org/software/classpath/license.html. 12 | # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 13 | # 14 | 15 | pluginName = EMF Server EMF 16 | providerName = Eclipse GLSP 17 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/src/org/eclipse/glsp/server/emf/AbstractEMFCreateOperationHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.emf; 17 | 18 | import java.util.List; 19 | 20 | import org.eclipse.glsp.server.operations.CreateOperation; 21 | 22 | /** 23 | * @deprecated Use {@link EMFCreateOperationHandler} 24 | */ 25 | @Deprecated 26 | public abstract class AbstractEMFCreateOperationHandler 27 | extends EMFCreateOperationHandler { 28 | 29 | public AbstractEMFCreateOperationHandler(final String... elementTypeIds) { 30 | super(elementTypeIds); 31 | } 32 | 33 | public AbstractEMFCreateOperationHandler(final List handledElementTypeIds) { 34 | super(handledElementTypeIds); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/src/org/eclipse/glsp/server/emf/AbstractEMFOperationHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2022-2023 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.emf; 17 | 18 | import org.eclipse.glsp.server.operations.Operation; 19 | 20 | /** 21 | * @deprecated Use {@link EMFOperationHandler} instead 22 | */ 23 | @Deprecated 24 | public abstract class AbstractEMFOperationHandler extends EMFOperationHandler {} 25 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/src/org/eclipse/glsp/server/emf/EMFCompoundOperationHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2022-2023 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.emf; 17 | 18 | import org.eclipse.glsp.server.operations.CompoundOperationHandler; 19 | 20 | /** 21 | * Creates a compound command to wrap multiple commands into one command that is executed on the command stack. 22 | * 23 | * @deprecated Use {@link CompoundOperationHandler} directly. 24 | */ 25 | @Deprecated 26 | public class EMFCompoundOperationHandler extends CompoundOperationHandler {} 27 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/src/org/eclipse/glsp/server/emf/EMFEditingDomainFactory.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.emf; 17 | 18 | import org.eclipse.emf.edit.domain.EditingDomain; 19 | 20 | /** 21 | * A factory to create a new editing domain. 22 | * 23 | * @see EditingDomain 24 | */ 25 | public interface EMFEditingDomainFactory { 26 | /** 27 | * Creates a new editing domain managing a set of interrelated EMF models in a resource set and track their 28 | * modifications through a command stack. 29 | * 30 | * @return editing domain 31 | */ 32 | EditingDomain createEditingDomain(); 33 | } 34 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/src/org/eclipse/glsp/server/emf/EMFIdGenerator.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.emf; 17 | 18 | import org.eclipse.emf.ecore.EObject; 19 | 20 | /** 21 | * A generator class that creates a unique identifier for a given EObject. 22 | * Ideally, the generated IDs should be considered stable during resource close/load and across model modifications. 23 | * The ids are used when indexing the element and may be given to the GModel element. 24 | */ 25 | public interface EMFIdGenerator { 26 | /** 27 | * Returns a unique identifier for the given element. The same element must always return the same id and should not 28 | * conflict with other elements. 29 | * 30 | * @param element source element 31 | * @return unique ID 32 | */ 33 | String getOrCreateId(EObject element); 34 | } 35 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/src/org/eclipse/glsp/server/emf/EMFModelState.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2023 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.emf; 17 | 18 | import org.eclipse.emf.ecore.resource.ResourceSet; 19 | import org.eclipse.emf.edit.domain.EditingDomain; 20 | import org.eclipse.glsp.server.model.GModelState; 21 | 22 | public interface EMFModelState extends GModelState { 23 | void setEditingDomain(EditingDomain editingDomain); 24 | 25 | EditingDomain getEditingDomain(); 26 | 27 | ResourceSet getResourceSet(); 28 | 29 | @Override 30 | EMFModelIndex getIndex(); 31 | } 32 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/src/org/eclipse/glsp/server/emf/EMFOperationActionHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2022-2023 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.emf; 17 | 18 | import org.eclipse.glsp.server.operations.OperationActionHandler; 19 | 20 | /** 21 | * A special {@link OperationActionHandler} that executes provided EMF commands of {@link EMFOperationHandler} 22 | * on an EMF command stack via the {@link EMFModelState}. 23 | * 24 | * @deprecated Use {@link OperationActionHandler} directly 25 | */ 26 | @Deprecated 27 | public class EMFOperationActionHandler extends OperationActionHandler {} 28 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/src/org/eclipse/glsp/server/emf/EMFOperationHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2022-2023 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.emf; 17 | 18 | import org.eclipse.glsp.server.operations.BasicOperationHandler; 19 | import org.eclipse.glsp.server.operations.Operation; 20 | import org.eclipse.glsp.server.operations.OperationHandler; 21 | 22 | import com.google.inject.Inject; 23 | 24 | /** 25 | * {@link OperationHandler} for EMF source models that creates commands to be executed on the command stack. 26 | */ 27 | public abstract class EMFOperationHandler extends BasicOperationHandler { 28 | @Inject 29 | protected EMFModelState modelState; 30 | } 31 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/src/org/eclipse/glsp/server/emf/idgen/AttributeIdGenerator.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.emf.idgen; 17 | 18 | import org.eclipse.emf.ecore.EClass; 19 | import org.eclipse.emf.ecore.EObject; 20 | import org.eclipse.emf.ecore.util.EcoreUtil; 21 | import org.eclipse.glsp.server.emf.EMFIdGenerator; 22 | 23 | /** 24 | * An ID generator that uses the ID attribute of a given EObject. This generator should only be used if it is ensured 25 | * that all elements have an id attribute set. 26 | * 27 | * @see EClass#getEIDAttribute() 28 | */ 29 | public class AttributeIdGenerator implements EMFIdGenerator { 30 | @Override 31 | public String getOrCreateId(final EObject element) { 32 | return EcoreUtil.getID(element); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/src/org/eclipse/glsp/server/emf/idgen/FragmentIdGenerator.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.emf.idgen; 17 | 18 | import org.eclipse.emf.ecore.EObject; 19 | import org.eclipse.emf.ecore.util.EcoreUtil; 20 | import org.eclipse.glsp.server.emf.EMFIdGenerator; 21 | 22 | /** 23 | * An ID generator that uses the fragment as a unique identifier for an element. If this strategy is used, the 24 | * fragment should be considered unique across all operations. For instance, if an element is removed within a list, all 25 | * subsequent elements are moved ahead. If the index position is considered in the fragment, objects may be identified 26 | * incorrectly. 27 | */ 28 | public class FragmentIdGenerator implements EMFIdGenerator { 29 | @Override 30 | public String getOrCreateId(final EObject element) { 31 | return EcoreUtil.getURI(element).fragment(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/src/org/eclipse/glsp/server/emf/idgen/IdentificationIdGenerator.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.emf.idgen; 17 | 18 | import org.eclipse.emf.ecore.EObject; 19 | import org.eclipse.emf.ecore.util.EcoreUtil; 20 | import org.eclipse.glsp.server.emf.EMFIdGenerator; 21 | 22 | /** 23 | * An ID generator that uses the the identification process of {@link EcoreUtil}. 24 | */ 25 | public class IdentificationIdGenerator implements EMFIdGenerator { 26 | @Override 27 | public String getOrCreateId(final EObject element) { 28 | return EcoreUtil.getIdentification(element); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/src/org/eclipse/glsp/server/emf/idgen/UUIDIdGenerator.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.emf.idgen; 17 | 18 | import org.eclipse.emf.ecore.EObject; 19 | import org.eclipse.glsp.graph.util.IdKeeperAdapter; 20 | import org.eclipse.glsp.server.emf.EMFIdGenerator; 21 | 22 | /** 23 | * An ID generator that creates UUIDs for elements. It is ensured that each element only gets a single unique 24 | * ID during one session. However, the IDs are not persisted as part of the model by default so they may not be stable 25 | * across several resource loadings. 26 | */ 27 | public class UUIDIdGenerator implements EMFIdGenerator { 28 | @Override 29 | public String getOrCreateId(final EObject element) { 30 | return IdKeeperAdapter.getId(element); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/src/org/eclipse/glsp/server/emf/notation/EMFNotationModelState.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2023 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.emf.notation; 17 | 18 | import java.util.Optional; 19 | 20 | import org.eclipse.emf.ecore.EObject; 21 | import org.eclipse.glsp.server.emf.EMFModelState; 22 | import org.eclipse.glsp.server.emf.model.notation.Diagram; 23 | 24 | public interface EMFNotationModelState extends EMFModelState { 25 | 26 | Optional getNotationModel(Class clazz); 27 | 28 | Diagram getNotationModel(); 29 | 30 | void setNotationModel(Diagram notationModel); 31 | 32 | Optional getSemanticModel(Class clazz); 33 | 34 | EObject getSemanticModel(); 35 | 36 | void setSemanticModel(EObject semanticModel); 37 | 38 | @Override 39 | EMFNotationModelIndex getIndex(); 40 | 41 | } 42 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.emf/src/org/eclipse/glsp/server/emf/notation/SemanticFragmentIdConverter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.emf.notation; 17 | 18 | import org.eclipse.emf.ecore.EObject; 19 | import org.eclipse.glsp.server.emf.idgen.FragmentIdGenerator; 20 | 21 | /** 22 | * A specialization of the default ID converter to optimize the retrieval of EObjects based on fragments. 23 | * This converter should only be used in combination with the {@link FragmentIdGenerator}. 24 | */ 25 | public class SemanticFragmentIdConverter extends EMFSemanticIdConverter.Default { 26 | @Override 27 | public EObject resolve(final String uriFragment, final EObject root) { 28 | return root.eResource().getEObject(uriFragment); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.websocket/.checkstyle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.websocket/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.websocket/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /target/ 3 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.websocket/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.eclipse.glsp.server.websocket 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | net.sf.eclipsecs.core.CheckstyleBuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.m2e.core.maven2Builder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.m2e.core.maven2Nature 36 | org.eclipse.pde.PluginNature 37 | org.eclipse.jdt.core.javanature 38 | net.sf.eclipsecs.core.CheckstyleNature 39 | 40 | 41 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.websocket/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/java-gen=UTF-8 4 | encoding//src/main/resources=UTF-8 5 | encoding//src/test/java=UTF-8 6 | encoding//src/test/resources=UTF-8 7 | encoding/=UTF-8 8 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.websocket/.settings/org.eclipse.jdt.launching.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=ignore 3 | org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore 4 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.websocket/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.websocket/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/ 2 | bin.includes = META-INF/,\ 3 | . 4 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.websocket/src/.gitkeep: -------------------------------------------------------------------------------- 1 | keep 2 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server.websocket/src/org/eclipse/glsp/server/websocket/WebsocketModule.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019-2023 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.websocket; 17 | 18 | import com.google.inject.AbstractModule; 19 | 20 | import jakarta.websocket.Endpoint; 21 | 22 | public class WebsocketModule extends AbstractModule { 23 | 24 | @Override 25 | protected void configure() { 26 | bind(Endpoint.class).to(GLSPServerEndpoint.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/.checkstyle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /target/ 3 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.eclipse.glsp.server 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | net.sf.eclipsecs.core.CheckstyleBuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.m2e.core.maven2Builder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.m2e.core.maven2Nature 36 | org.eclipse.pde.PluginNature 37 | org.eclipse.jdt.core.javanature 38 | net.sf.eclipsecs.core.CheckstyleNature 39 | 40 | 41 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/java-gen=UTF-8 4 | encoding//src/main/resources=UTF-8 5 | encoding//src/test/java=UTF-8 6 | encoding//src/test/resources=UTF-8 7 | encoding/=UTF-8 8 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/.settings/org.eclipse.jdt.launching.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=ignore 3 | org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore 4 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/ 2 | bin.includes = META-INF/,\ 3 | . -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/actions/ActionHandlerRegistry.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.actions; 17 | 18 | import java.util.List; 19 | 20 | import org.eclipse.glsp.server.registry.MultiRegistry; 21 | 22 | /** 23 | * An action handler registry keeps track of registered action handlers for a certain action. 24 | */ 25 | public interface ActionHandlerRegistry extends MultiRegistry, ActionHandler> { 26 | /** 27 | * Returns the registered {@link ActionHandler} for a given {@link Action}. 28 | * 29 | * @param action The action for which the handler should be returned. 30 | * @return The registered ActionHandler for the given action. 31 | */ 32 | default List get(final Action action) { 33 | return get(action.getClass()); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/actions/BasicActionHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019-2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.actions; 17 | 18 | import java.util.List; 19 | 20 | import org.eclipse.glsp.server.model.GModelState; 21 | 22 | import com.google.inject.Inject; 23 | 24 | /** 25 | * Deprecated, will be removed with version 1.0. 26 | * Please use {@link AbstractActionHandler} instead and directly inject the {@link GModelState}. 27 | */ 28 | @Deprecated 29 | public abstract class BasicActionHandler extends AbstractActionHandler { 30 | 31 | @Inject 32 | protected GModelState modelState; 33 | 34 | @Override 35 | public List executeAction(final T actualAction) { 36 | return executeAction(actualAction, modelState); 37 | } 38 | 39 | protected abstract List executeAction(T actualAction, GModelState modelState); 40 | 41 | } 42 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/actions/ExportSVGAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019-2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.actions; 17 | 18 | /** 19 | * Instructs the client to export an SVG from the current diagram. 20 | */ 21 | public class ExportSVGAction extends Action { 22 | 23 | public static final String KIND = "exportSvg"; 24 | 25 | private String svg; 26 | 27 | public ExportSVGAction() { 28 | super(KIND); 29 | } 30 | 31 | public ExportSVGAction(final String svg) { 32 | this(); 33 | this.svg = svg; 34 | } 35 | 36 | public String getSvg() { return svg; } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/actions/RequestAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019-2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.actions; 17 | 18 | /** 19 | * An action that expects a response. 20 | * 21 | * @param The type of the {@link ResponseAction}. 22 | */ 23 | public abstract class RequestAction extends Action { 24 | private final String requestId; 25 | 26 | public RequestAction(final String kind) { 27 | this(kind, ""); 28 | } 29 | 30 | public RequestAction(final String kind, final String requestId) { 31 | super(kind); 32 | this.requestId = requestId; 33 | } 34 | 35 | public String getRequestId() { return requestId; } 36 | } 37 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/actions/SaveModelAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019-2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.actions; 17 | 18 | import java.util.Optional; 19 | 20 | /** 21 | * A request for saving the current model state, typically sent by the client to the server. 22 | */ 23 | public class SaveModelAction extends Action { 24 | 25 | public static final String KIND = "saveModel"; 26 | private String fileUri; 27 | 28 | public SaveModelAction() { 29 | super(KIND); 30 | } 31 | 32 | public SaveModelAction(final String fileUri) { 33 | this(); 34 | this.fileUri = fileUri; 35 | } 36 | 37 | public void setFileUri(final String fileUri) { this.fileUri = fileUri; } 38 | 39 | public Optional getFileUri() { return Optional.ofNullable(fileUri); } 40 | } 41 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/actions/SelectAllAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019-2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.actions; 17 | 18 | /** 19 | * Instructs the client to select all selectable elements. 20 | */ 21 | public class SelectAllAction extends Action { 22 | 23 | public static final String KIND = "allSelected"; 24 | 25 | private boolean select; 26 | 27 | public SelectAllAction() { 28 | super(KIND); 29 | } 30 | 31 | public SelectAllAction(final boolean select) { 32 | this(); 33 | this.select = select; 34 | } 35 | 36 | public boolean isSelect() { return select; } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/actions/SetEditModeActionHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020-2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.actions; 17 | 18 | import java.util.List; 19 | 20 | import org.eclipse.glsp.server.model.GModelState; 21 | 22 | import com.google.inject.Inject; 23 | 24 | /** 25 | * Default server handler for {@link SetEditModeAction}, which updates the edit mode in the model state. 26 | */ 27 | public class SetEditModeActionHandler extends AbstractActionHandler { 28 | 29 | @Inject 30 | protected GModelState modelState; 31 | 32 | @Override 33 | protected List executeAction(final SetEditModeAction action) { 34 | modelState.setEditMode(action.getEditMode()); 35 | return none(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/actions/TriggerEdgeCreationAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020-2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.actions; 17 | 18 | import java.util.HashMap; 19 | import java.util.Map; 20 | 21 | /** 22 | * Instructs the client to trigger the edge creation tool for a specified edge element type. 23 | */ 24 | public class TriggerEdgeCreationAction extends TriggerElementCreationAction { 25 | 26 | public static final String KIND = "triggerEdgeCreation"; 27 | 28 | public TriggerEdgeCreationAction() { 29 | this(null); 30 | } 31 | 32 | public TriggerEdgeCreationAction(final String elementTypeId) { 33 | this(elementTypeId, new HashMap<>()); 34 | } 35 | 36 | public TriggerEdgeCreationAction(final String elementTypeId, 37 | final Map args) { 38 | super(KIND, elementTypeId, args); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/di/ClientId.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.di; 17 | 18 | import static java.lang.annotation.ElementType.FIELD; 19 | import static java.lang.annotation.ElementType.METHOD; 20 | import static java.lang.annotation.ElementType.PARAMETER; 21 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 22 | 23 | import java.lang.annotation.Retention; 24 | import java.lang.annotation.Target; 25 | 26 | import com.google.inject.BindingAnnotation; 27 | 28 | /** 29 | * Helper annotation that is used for injecting the client id string into classes of diagram session (client session) 30 | * specific injectors. 31 | * 32 | * Example usage: 33 | * 34 | *
35 |  * @Inject
36 |  * @ClientId
37 |  * private String diagramType;
38 |  * 
39 | */ 40 | @Target({ FIELD, PARAMETER, METHOD }) 41 | @Retention(RUNTIME) 42 | @BindingAnnotation 43 | public @interface ClientId {} 44 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/disposable/Disposable.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.disposable; 17 | 18 | /** 19 | * A simple implementation of {@link IDisposable} that ensures that we only dispose an element once and track the 20 | * disposed state correctly. 21 | */ 22 | public class Disposable implements IDisposable { 23 | private boolean disposed; 24 | 25 | @Override 26 | public void dispose() { 27 | if (!disposed) { 28 | doDispose(); 29 | disposed = true; 30 | } 31 | } 32 | 33 | protected void doDispose() { 34 | // do nothing 35 | } 36 | 37 | @Override 38 | public boolean isDisposed() { return disposed; } 39 | } 40 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/disposable/IDisposableResult.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.disposable; 17 | 18 | /** 19 | * An IDisposable that also holds a result. Useful to wrap 20 | * elements that should be disposed, but don't directly 21 | * implement IDisposable. 22 | * 23 | * @param The type of the wrapped element/result 24 | */ 25 | public interface IDisposableResult extends IDisposable { 26 | /** 27 | * @return the value wrapped by this {@link IDisposableResult} 28 | */ 29 | T getResult(); 30 | } 31 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/contextactions/ContextActionsProviderRegistry.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.features.contextactions; 17 | 18 | import org.eclipse.glsp.server.registry.Registry; 19 | 20 | /** 21 | * A registry that keeps track of all registered {@link ContextActionsProvider}s. 22 | */ 23 | public interface ContextActionsProviderRegistry extends Registry {} 24 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/contextactions/SetAutoCompleteValueAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.features.contextactions; 17 | 18 | import java.util.ArrayList; 19 | 20 | import org.eclipse.glsp.server.actions.Action; 21 | import org.eclipse.glsp.server.features.directediting.LabeledAction; 22 | 23 | public class SetAutoCompleteValueAction extends LabeledAction { 24 | 25 | private String text; 26 | 27 | public SetAutoCompleteValueAction(final String label, final String icon, final String text) { 28 | super(label, new ArrayList(), icon); 29 | this.text = text; 30 | } 31 | 32 | public String getText() { return text; } 33 | 34 | public void setText(final String text) { this.text = text; } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/core/model/RequestBoundsAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.features.core.model; 17 | 18 | import org.eclipse.glsp.graph.GModelRoot; 19 | import org.eclipse.glsp.server.actions.RequestAction; 20 | 21 | public class RequestBoundsAction extends RequestAction { 22 | 23 | public static final String KIND = "requestBounds"; 24 | 25 | private GModelRoot newRoot; 26 | 27 | public RequestBoundsAction() { 28 | super(KIND); 29 | } 30 | 31 | public RequestBoundsAction(final GModelRoot newRoot) { 32 | this(); 33 | this.newRoot = newRoot; 34 | } 35 | 36 | public GModelRoot getNewRoot() { return newRoot; } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/core/model/SetBoundsAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.features.core.model; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | import org.eclipse.glsp.server.actions.ResponseAction; 22 | import org.eclipse.glsp.server.types.ElementAndBounds; 23 | 24 | public class SetBoundsAction extends ResponseAction { 25 | 26 | public static final String KIND = "setBounds"; 27 | 28 | private List bounds; 29 | 30 | public SetBoundsAction() { 31 | this(new ArrayList<>()); 32 | } 33 | 34 | public SetBoundsAction(final List bounds) { 35 | super(KIND); 36 | this.bounds = bounds; 37 | } 38 | 39 | public List getBounds() { return bounds; } 40 | 41 | public void setBounds(final List bounds) { this.bounds = bounds; } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/core/model/SetModelAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.features.core.model; 17 | 18 | import org.eclipse.glsp.graph.GModelRoot; 19 | import org.eclipse.glsp.server.actions.ResponseAction; 20 | 21 | public class SetModelAction extends ResponseAction { 22 | 23 | public static final String KIND = "setModel"; 24 | 25 | private GModelRoot newRoot; 26 | 27 | public SetModelAction() { 28 | super(KIND); 29 | } 30 | 31 | public SetModelAction(final GModelRoot newRoot) { 32 | this(); 33 | this.newRoot = newRoot; 34 | } 35 | 36 | public GModelRoot getNewRoot() { return newRoot; } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/directediting/ApplyLabelEditOperation.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.features.directediting; 17 | 18 | import org.eclipse.glsp.server.operations.Operation; 19 | 20 | public class ApplyLabelEditOperation extends Operation { 21 | 22 | public static final String KIND = "applyLabelEdit"; 23 | 24 | private String labelId; 25 | private String text; 26 | 27 | public ApplyLabelEditOperation() { 28 | super(KIND); 29 | } 30 | 31 | public ApplyLabelEditOperation(final String labelId, final String text) { 32 | this(); 33 | this.labelId = labelId; 34 | this.text = text; 35 | } 36 | 37 | public String getLabelId() { return labelId; } 38 | 39 | public String getText() { return text; } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/directediting/ContextEditValidatorRegistry.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.features.directediting; 17 | 18 | import org.eclipse.glsp.server.registry.Registry; 19 | 20 | /** 21 | * A registry that keeps track of all registered {@link ContextEditValidator}s. 22 | */ 23 | public interface ContextEditValidatorRegistry extends Registry {} 24 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/directediting/LabelEditValidator.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.features.directediting; 17 | 18 | import org.eclipse.glsp.graph.GModelElement; 19 | 20 | /** 21 | * A validator that validates a new label for a given {@link GModelElement}. 22 | */ 23 | public interface LabelEditValidator { 24 | 25 | String CONTEXT_ID = "label-edit"; 26 | 27 | /** 28 | * Returns the {@link ValidationStatus} for a given edited label of a {@link GModelElement}. 29 | * 30 | * @param label The edited label to validate. 31 | * @param element The element for which the label is going to be edited. 32 | * @return The {@link ValidationStatus} of the label. 33 | */ 34 | ValidationStatus validate(String label, GModelElement element); 35 | } 36 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/directediting/ValidateLabelEditAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019-2020 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.features.directediting; 17 | 18 | public class ValidateLabelEditAction extends RequestEditValidationAction { 19 | 20 | public ValidateLabelEditAction() { 21 | super(); 22 | } 23 | 24 | public ValidateLabelEditAction(final String value, final String labelId) { 25 | super(LabelEditValidator.CONTEXT_ID, labelId, value); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/navigation/NavigateToExternalTargetAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.features.navigation; 17 | 18 | import org.eclipse.glsp.server.actions.Action; 19 | 20 | public class NavigateToExternalTargetAction extends Action { 21 | 22 | public static final String KIND = "navigateToExternalTarget"; 23 | 24 | private NavigationTarget target; 25 | 26 | public NavigateToExternalTargetAction() { 27 | super(KIND); 28 | } 29 | 30 | public NavigateToExternalTargetAction(final NavigationTarget target) { 31 | this(); 32 | this.target = target; 33 | } 34 | 35 | public NavigationTarget getTarget() { return target; } 36 | 37 | public void setTarget(final NavigationTarget navigationTarget) { this.target = navigationTarget; } 38 | } 39 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/navigation/NavigateToTargetAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.features.navigation; 17 | 18 | import org.eclipse.glsp.server.actions.Action; 19 | 20 | public class NavigateToTargetAction extends Action { 21 | 22 | public static final String KIND = "navigateToTarget"; 23 | 24 | private NavigationTarget target; 25 | 26 | public NavigateToTargetAction() { 27 | super(KIND); 28 | } 29 | 30 | public NavigateToTargetAction(final NavigationTarget target) { 31 | this(); 32 | this.target = target; 33 | } 34 | 35 | public NavigationTarget getTarget() { return target; } 36 | 37 | public void setTarget(final NavigationTarget navigationTarget) { 38 | this.target = navigationTarget; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/navigation/NavigationTargetProviderRegistry.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.features.navigation; 17 | 18 | import org.eclipse.glsp.server.registry.Registry; 19 | 20 | /** 21 | * This registry keeps track of registered {@link NavigationTargetProvider} for a certain target types. 22 | */ 23 | public interface NavigationTargetProviderRegistry extends Registry {} 24 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/popup/RequestPopupModelAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.features.popup; 17 | 18 | import org.eclipse.glsp.graph.GBounds; 19 | import org.eclipse.glsp.server.actions.RequestAction; 20 | 21 | public class RequestPopupModelAction extends RequestAction { 22 | 23 | public static final String KIND = "requestPopupModel"; 24 | 25 | private String elementId; 26 | private GBounds bounds; 27 | 28 | public RequestPopupModelAction() { 29 | super(KIND); 30 | } 31 | 32 | public RequestPopupModelAction(final String elementId, final GBounds bounds) { 33 | this(); 34 | this.elementId = elementId; 35 | this.bounds = bounds; 36 | } 37 | 38 | public String getElementId() { return elementId; } 39 | 40 | public GBounds getBounds() { return bounds; } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/popup/SetPopupModelAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.features.popup; 17 | 18 | import org.eclipse.glsp.graph.GModelRoot; 19 | import org.eclipse.glsp.server.actions.ResponseAction; 20 | 21 | public class SetPopupModelAction extends ResponseAction { 22 | 23 | public static final String KIND = "setPopupModel"; 24 | 25 | private GModelRoot newRoot; 26 | 27 | public SetPopupModelAction() { 28 | super(KIND); 29 | } 30 | 31 | public SetPopupModelAction(final GModelRoot newRoot) { 32 | this(); 33 | this.newRoot = newRoot; 34 | } 35 | 36 | public GModelRoot getNewRoot() { return newRoot; } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/sourcemodelwatcher/SourceModelChangedAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020-2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.features.sourcemodelwatcher; 17 | 18 | import org.eclipse.glsp.server.actions.Action; 19 | 20 | public class SourceModelChangedAction extends Action { 21 | 22 | private String sourceModelName = ""; 23 | 24 | public SourceModelChangedAction() { 25 | super("sourceModelChanged"); 26 | } 27 | 28 | public SourceModelChangedAction(final String sourceModelName) { 29 | this(); 30 | this.sourceModelName = sourceModelName; 31 | } 32 | 33 | public String getSourceModelName() { return sourceModelName; } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/typehints/RequestTypeHintsAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019-2023 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.features.typehints; 17 | 18 | import org.eclipse.glsp.server.actions.RequestAction; 19 | 20 | public class RequestTypeHintsAction extends RequestAction { 21 | 22 | public static final String KIND = "requestTypeHints"; 23 | 24 | public RequestTypeHintsAction() { 25 | super(KIND); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/undoredo/RedoAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.features.undoredo; 17 | 18 | import org.eclipse.glsp.server.actions.Action; 19 | 20 | public class RedoAction extends Action { 21 | 22 | public static final String KIND = "glspRedo"; 23 | 24 | public RedoAction() { 25 | super(KIND); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/undoredo/UndoAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.features.undoredo; 17 | 18 | import org.eclipse.glsp.server.operations.Operation; 19 | 20 | public class UndoAction extends Operation { 21 | 22 | public static final String KIND = "glspUndo"; 23 | 24 | public UndoAction() { 25 | super(KIND); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/validation/DeleteMarkersAction.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.features.validation; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | import org.eclipse.glsp.server.actions.Action; 22 | 23 | public class DeleteMarkersAction extends Action { 24 | 25 | public static final String KIND = "deleteMarkers"; 26 | 27 | private List markers; 28 | 29 | public DeleteMarkersAction() { 30 | this(new ArrayList<>()); 31 | } 32 | 33 | public DeleteMarkersAction(final List markers) { 34 | super(KIND); 35 | this.markers = markers; 36 | } 37 | 38 | public List getMarkers() { return markers; } 39 | 40 | public void setMarkers(final List markers) { this.markers = markers; } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/validation/MarkerKind.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.features.validation; 17 | 18 | /** 19 | * Defines kinds of model markers. 20 | * 21 | */ 22 | public final class MarkerKind { 23 | 24 | /** 25 | * Declares markers providing some information about a model element. 26 | */ 27 | public static final String INFO = "info"; 28 | /** 29 | * Declares markers providing warnings about a model element. 30 | */ 31 | public static final String WARNING = "warning"; 32 | /** 33 | * Declares markers providing error information about a model element. 34 | */ 35 | public static final String ERROR = "error"; 36 | 37 | private MarkerKind() { 38 | // prevent instantiation for class only holding constants. 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/features/validation/MarkersReason.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2023 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.features.validation; 17 | 18 | /** 19 | * The default reasons for a request for markers. 20 | */ 21 | public final class MarkersReason { 22 | 23 | /** 24 | * Batch validation executed on demand by the client. 25 | */ 26 | public static final String BATCH = "batch"; 27 | /** 28 | * Live validation executed on start and after model update. 29 | */ 30 | public static final String LIVE = "live"; 31 | 32 | private MarkersReason() { 33 | // prevent instantiation for class only holding constants. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/internal/featues/navigation/DefaultNavigationTargetProviderRegistry.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.internal.featues.navigation; 17 | 18 | import java.util.Set; 19 | 20 | import org.eclipse.glsp.server.features.navigation.NavigationTargetProvider; 21 | import org.eclipse.glsp.server.features.navigation.NavigationTargetProviderRegistry; 22 | import org.eclipse.glsp.server.internal.registry.MapRegistry; 23 | 24 | import com.google.inject.Inject; 25 | 26 | public class DefaultNavigationTargetProviderRegistry extends MapRegistry 27 | implements NavigationTargetProviderRegistry { 28 | 29 | @Inject 30 | public DefaultNavigationTargetProviderRegistry(final Set navigationTargetProviders) { 31 | navigationTargetProviders.forEach(provider -> register(provider.getTargetTypeId(), provider)); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/internal/gmodel/commandstack/GModelCommandStack.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019-2022 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.internal.gmodel.commandstack; 17 | 18 | import org.apache.logging.log4j.LogManager; 19 | import org.apache.logging.log4j.Logger; 20 | import org.eclipse.emf.common.command.BasicCommandStack; 21 | 22 | public class GModelCommandStack extends BasicCommandStack { 23 | 24 | protected static Logger LOGGER = LogManager.getLogger(GModelCommandStack.class); 25 | 26 | @Override 27 | protected void handleError(final Exception exception) { 28 | LOGGER.error("Error while executing command", exception); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/layout/LayoutEngine.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.layout; 17 | 18 | /** 19 | * A layout engine is able to compute layout information for a model. 20 | */ 21 | public interface LayoutEngine { 22 | /** 23 | * Compute a layout for the model state and modify the model accordingly. 24 | */ 25 | void layout(); 26 | } 27 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/operations/ChangeBoundsOperation.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.operations; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | import org.eclipse.glsp.server.types.ElementAndBounds; 22 | 23 | public class ChangeBoundsOperation extends Operation { 24 | 25 | public static final String KIND = "changeBounds"; 26 | 27 | private List newBounds; 28 | 29 | public ChangeBoundsOperation() { 30 | this(new ArrayList<>()); 31 | } 32 | 33 | public ChangeBoundsOperation(final List newBounds) { 34 | super(KIND); 35 | this.newBounds = newBounds; 36 | } 37 | 38 | public List getNewBounds() { return newBounds; } 39 | 40 | public void setNewBounds(final List newBounds) { this.newBounds = newBounds; } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/operations/CompoundOperation.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.operations; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | public class CompoundOperation extends Operation { 22 | 23 | public static final String KIND = "compound"; 24 | 25 | private List operationList; 26 | 27 | public CompoundOperation() { 28 | super(KIND); 29 | operationList = new ArrayList<>(); 30 | } 31 | 32 | public List getOperationList() { return operationList; } 33 | 34 | public void setOperationList(final List operationList) { this.operationList = operationList; } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/operations/CutOperation.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2020-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.operations; 17 | 18 | import org.eclipse.glsp.server.types.EditorContext; 19 | 20 | public class CutOperation extends Operation { 21 | 22 | public static final String KIND = "cut"; 23 | 24 | private EditorContext editorContext; 25 | 26 | public CutOperation() { 27 | super(KIND); 28 | } 29 | 30 | public EditorContext getEditorContext() { return editorContext; } 31 | 32 | public void setEditorContext(final EditorContext editorContext) { this.editorContext = editorContext; } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/operations/CutOperationHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020-2023 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.operations; 17 | 18 | import org.eclipse.glsp.server.gmodel.GModelCutOperationHandler; 19 | 20 | /** 21 | * @deprecated Use {@link GModelCutOperationHandler} instead for GModel-based languages. 22 | */ 23 | @Deprecated 24 | public class CutOperationHandler extends GModelCutOperationHandler {} 25 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/operations/DeleteOperation.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.operations; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | public class DeleteOperation extends Operation { 22 | 23 | public static final String KIND = "deleteElement"; 24 | 25 | private List elementIds; 26 | 27 | public DeleteOperation() { 28 | this(new ArrayList<>()); 29 | } 30 | 31 | public DeleteOperation(final List elementIds) { 32 | super(KIND); 33 | this.elementIds = elementIds; 34 | } 35 | 36 | public List getElementIds() { return elementIds; } 37 | 38 | public void setElementIds(final List elementIds) { this.elementIds = elementIds; } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/operations/GModelOperationHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2023 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.operations; 17 | 18 | import java.util.Optional; 19 | 20 | import org.eclipse.emf.common.command.Command; 21 | import org.eclipse.glsp.server.internal.gmodel.commandstack.GModelRecordingCommand; 22 | 23 | public abstract class GModelOperationHandler extends BasicOperationHandler { 24 | 25 | protected Optional commandOf(final Runnable runnable) { 26 | return Optional.of(recordingCommand(runnable)); 27 | } 28 | 29 | protected Command recordingCommand(final Runnable runnable) { 30 | return new GModelRecordingCommand(modelState.getRoot(), getLabel(), runnable); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/operations/LayoutOperation.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2019-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.operations; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | public class LayoutOperation extends Operation { 22 | 23 | public static final String KIND = "layout"; 24 | 25 | private List elementIds; 26 | 27 | public LayoutOperation() { 28 | this(new ArrayList<>()); 29 | } 30 | 31 | public LayoutOperation(final List elementIds) { 32 | super(KIND); 33 | this.elementIds = elementIds; 34 | } 35 | 36 | public List getElementIds() { return elementIds; } 37 | 38 | public void setElementIds(final List elementIds) { this.elementIds = elementIds; } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/operations/PasteOperation.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2020-2021 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ******************************************************************************/ 16 | package org.eclipse.glsp.server.operations; 17 | 18 | import java.util.Map; 19 | 20 | import org.eclipse.glsp.server.types.EditorContext; 21 | 22 | public class PasteOperation extends Operation { 23 | 24 | public static final String KIND = "paste"; 25 | 26 | private Map clipboardData; 27 | private EditorContext editorContext; 28 | 29 | public PasteOperation() { 30 | super(KIND); 31 | } 32 | 33 | public Map getClipboardData() { return clipboardData; } 34 | 35 | public void setClipboardData(final Map clipboardData) { this.clipboardData = clipboardData; } 36 | 37 | public EditorContext getEditorContext() { return editorContext; } 38 | 39 | public void setEditorContext(final EditorContext editorContext) { this.editorContext = editorContext; } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/types/Severity.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * Copyright (c) 2020 EclipseSource and others. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0 which is available at 6 | * https://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the Eclipse 10 | * Public License v. 2.0 are satisfied: GNU General Public License, version 2 11 | * with the GNU Classpath Exception which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | ********************************************************************************/ 16 | package org.eclipse.glsp.server.types; 17 | 18 | public enum Severity { 19 | FATAL, 20 | ERROR, 21 | WARNING, 22 | INFO, 23 | OK, 24 | NONE; 25 | 26 | public static String toString(final Severity severity) { 27 | return severity != null ? severity.toString() : null; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /releng/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /workspace/ 3 | /compositeRepository/ 4 | -------------------------------------------------------------------------------- /releng/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.eclipse.glsp.releng 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | -------------------------------------------------------------------------------- /releng/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /releng/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /releng/org.eclipse.glsp.feature/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /bin/ 3 | -------------------------------------------------------------------------------- /releng/org.eclipse.glsp.feature/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.eclipse.glsp.feature 4 | 5 | 6 | 7 | 8 | 9 | 10 | org.eclipse.pde.FeatureBuilder 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Builder 16 | 17 | 18 | 19 | 20 | 21 | org.eclipse.m2e.core.maven2Nature 22 | org.eclipse.pde.FeatureNature 23 | 24 | 25 | -------------------------------------------------------------------------------- /releng/org.eclipse.glsp.feature/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /releng/org.eclipse.glsp.feature/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /releng/org.eclipse.glsp.feature/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = feature.xml 2 | -------------------------------------------------------------------------------- /releng/org.eclipse.glsp.feature/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | org.eclipse.glsp.feature 4 | 5 | org.eclipse.glsp 6 | org.eclipse.glsp.releng 7 | 2.5.0-SNAPSHOT 8 | ../ 9 | 10 | eclipse-feature 11 | 12 | -------------------------------------------------------------------------------- /releng/org.eclipse.glsp.repository/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /workspace/ 3 | /bin/ 4 | -------------------------------------------------------------------------------- /releng/org.eclipse.glsp.repository/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.eclipse.glsp.repository 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | -------------------------------------------------------------------------------- /releng/org.eclipse.glsp.repository/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /releng/org.eclipse.glsp.repository/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /targetplatforms/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /workspace/ 3 | /bin/ 4 | -------------------------------------------------------------------------------- /targetplatforms/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | targetplatforms 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.m2e.core.maven2Builder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.jdt.core.javanature 26 | org.eclipse.m2e.core.maven2Nature 27 | org.eclipse.xtext.ui.shared.xtextNature 28 | 29 | 30 | -------------------------------------------------------------------------------- /targetplatforms/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /targetplatforms/maven-dependencies.tpd: -------------------------------------------------------------------------------- 1 | target "Wrapper for maven dependencies" 2 | 3 | 4 | maven log4j scope=compile dependencyDepth=none missingManifest=generate { 5 | dependency { 6 | groupId="org.apache.logging.log4j" 7 | artifactId="log4j-slf4j2-impl" 8 | version="2.23.1" 9 | } 10 | dependency { 11 | groupId="org.apache.logging.log4j" 12 | artifactId="log4j-core" 13 | version="2.23.1" 14 | } 15 | dependency { 16 | groupId="org.apache.logging.log4j" 17 | artifactId="log4j-api" 18 | version="2.23.1" 19 | } 20 | dependency { 21 | groupId="org.apache.logging.log4j" 22 | artifactId="log4j-1.2-api" 23 | version="2.23.1" 24 | } 25 | dependency { 26 | groupId="org.apache.logging.log4j" 27 | artifactId="log4j-to-slf4j" 28 | version="2.23.1" 29 | } 30 | } 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /targetplatforms/r2023-12.tpd: -------------------------------------------------------------------------------- 1 | 2 | target "2023-12 - Minimum Baseline" with source requirements 3 | include "maven-dependencies.tpd" 4 | 5 | location "http://download.eclipse.org/releases/2023-12" { 6 | org.eclipse.emf.sdk.feature.group 7 | org.eclipse.lsp4j [0.21.1,1.0.0) 8 | org.eclipse.lsp4j.websocket.jakarta [0.21.1,1.0.0) 9 | org.apache.commons.cli [1.6.0,2.0.0) 10 | com.google.gson [2.10.1,3.0.0) 11 | } 12 | 13 | location "https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2023-12" { 14 | org.junit [4.13.2,5.0.0) 15 | junit-jupiter-api [5.10.1,6.0.0) 16 | jakarta.inject.jakarta.inject-api [2.0.1,3.0.0) 17 | jakarta.servlet-api [4.0.0,5.0.0) 18 | jakarta.websocket-api 19 | } 20 | 21 | location "http://download.eclipse.org/elk/updates/releases/0.8.1/" { 22 | org.eclipse.elk.core lazy 23 | org.eclipse.elk.graph lazy 24 | org.eclipse.elk.graph.text lazy 25 | org.eclipse.elk.alg.layered lazy 26 | } 27 | 28 | location "https://download.eclipse.org/tools/orbit/simrel/maven-jetty/release/12.0.3" { 29 | org.eclipse.jetty.ee10.websocket.jakarta.server lazy 30 | org.eclipse.jetty.ee10.websocket.server lazy 31 | org.eclipse.jetty.websocket.api lazy 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /targetplatforms/r2024-09.tpd: -------------------------------------------------------------------------------- 1 | 2 | target "2024-09 - Default" with source requirements 3 | include "maven-dependencies.tpd" 4 | 5 | location "http://download.eclipse.org/releases/2024-09" { 6 | org.eclipse.emf.sdk.feature.group 7 | org.eclipse.lsp4j [0.23.0,1.0.0) 8 | org.eclipse.lsp4j.websocket.jakarta [0.23.0,1.0.0) 9 | org.apache.commons.cli [1.4.0,2.0.0) 10 | com.google.gson[2.8.7,3.0.0) 11 | } 12 | 13 | location "https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2024-09" { 14 | org.junit [4.13.2,5.0.0) 15 | junit-jupiter-api [5.11.0,6.0.0) 16 | slf4j.api [2.0.16,3.0.0) 17 | jakarta.inject.jakarta.inject-api [2.0.1,3.0.0) 18 | } 19 | 20 | location "http://download.eclipse.org/elk/updates/releases/0.9.1/" { 21 | org.eclipse.elk.core 22 | org.eclipse.elk.graph 23 | org.eclipse.elk.graph.text 24 | org.eclipse.elk.alg.layered 25 | } 26 | 27 | location "https://download.eclipse.org/tools/orbit/simrel/maven-jetty/release/12.0.12" { 28 | org.eclipse.jetty.ee10.websocket.jakarta.server 29 | org.eclipse.jetty.ee10.websocket.server 30 | org.eclipse.jetty.websocket.api 31 | } 32 | 33 | -------------------------------------------------------------------------------- /tests/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.eclipse.glsp.tests 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.graph.test/.checkstyle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.graph.test/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.graph.test/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.eclipse.glsp.graph.test 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | net.sf.eclipsecs.core.CheckstyleBuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.m2e.core.maven2Builder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.m2e.core.maven2Nature 36 | org.eclipse.pde.PluginNature 37 | org.eclipse.jdt.core.javanature 38 | net.sf.eclipsecs.core.CheckstyleNature 39 | 40 | 41 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.graph.test/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/java-gen=UTF-8 4 | encoding//src/main/resources=UTF-8 5 | encoding//src/test/java=UTF-8 6 | encoding//src/test/resources=UTF-8 7 | encoding/=UTF-8 8 | encoding/src=UTF-8 9 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.graph.test/.settings/org.eclipse.jdt.launching.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=ignore 3 | org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore 4 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.graph.test/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.graph.test/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: GLSP Graph Tests 4 | Bundle-SymbolicName: org.eclipse.glsp.graph.test 5 | Bundle-Version: 0.10.0.qualifier 6 | Fragment-Host: org.eclipse.glsp.graph;bundle-version="0.10.0.qualifier" 7 | Automatic-Module-Name: org.eclipse.glsp.graph.test 8 | Bundle-RequiredExecutionEnvironment: JavaSE-17 9 | Bundle-Vendor: Eclipse GLSP 10 | Export-Package: org.eclipse.glsp.graph, 11 | org.eclipse.glsp.graph.impl 12 | Import-Package: org.junit;version="4.12.0", 13 | org.junit.jupiter.api;version="5.0.0" 14 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.graph.test/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/ 2 | bin.includes = META-INF/,\ 3 | .,\ 4 | resources/ 5 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.graph.test/resources/graphEdgeBeforeSourceAndTarget.graph: -------------------------------------------------------------------------------- 1 | { 2 | "revision": 42, 3 | "type": "graph", 4 | "id": "graphId", 5 | "children": [ 6 | { 7 | "id": "edge12", 8 | "type": "edge", 9 | "sourceId": "node1", 10 | "targetId": "node2" 11 | }, 12 | { 13 | "id": "node1", 14 | "type": "node", 15 | "position": { 16 | "x": 10.0, 17 | "y": 20.0 18 | } 19 | }, 20 | { 21 | "id": "node2", 22 | "type": "node", 23 | "position": { 24 | "x": 30.0, 25 | "y": 40.0 26 | } 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.graph.test/resources/graphWithCustomTypeMap.graph: -------------------------------------------------------------------------------- 1 | { 2 | "revision": 42, 3 | "type": "mygraph", 4 | "id": "graphId", 5 | "children": [ 6 | { 7 | "id": "node1", 8 | "type": "mynode", 9 | "position": { 10 | "x": 10.0, 11 | "y": 20.0 12 | } 13 | }, 14 | { 15 | "id": "edge", 16 | "type": "myedge", 17 | "sourceId": "node1" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.graph.test/resources/graphWithTwoNodesAndOneEdge.graph: -------------------------------------------------------------------------------- 1 | { 2 | "revision": 42, 3 | "type": "graph", 4 | "id": "graphId", 5 | "children": [ 6 | { 7 | "id": "node1", 8 | "type": "node", 9 | "position": { 10 | "x": 10.0, 11 | "y": 20.0 12 | } 13 | }, 14 | { 15 | "id": "node2", 16 | "type": "node", 17 | "position": { 18 | "x": 30.0, 19 | "y": 40.0 20 | } 21 | }, 22 | { 23 | "id": "edge12", 24 | "type": "edge", 25 | "sourceId": "node1", 26 | "targetId": "node2" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.server.test/.checkstyle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.server.test/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.server.test/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.eclipse.glsp.server.test 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | net.sf.eclipsecs.core.CheckstyleBuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.m2e.core.maven2Builder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.m2e.core.maven2Nature 36 | org.eclipse.pde.PluginNature 37 | org.eclipse.jdt.core.javanature 38 | net.sf.eclipsecs.core.CheckstyleNature 39 | 40 | 41 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.server.test/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/java-gen=UTF-8 4 | encoding//src/main/resources=UTF-8 5 | encoding//src/test/java=UTF-8 6 | encoding//src/test/resources=UTF-8 7 | encoding/=UTF-8 8 | encoding/src=UTF-8 9 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.server.test/.settings/org.eclipse.jdt.launching.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=ignore 3 | org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore 4 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.server.test/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.server.test/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: GLSP Server Tests 4 | Bundle-SymbolicName: org.eclipse.glsp.server.test 5 | Bundle-Version: 0.8.0.qualifier 6 | Fragment-Host: org.eclipse.glsp.server;bundle-version="0.8.0" 7 | Automatic-Module-Name: org.eclipse.glsp.graph.test 8 | Bundle-RequiredExecutionEnvironment: JavaSE-17 9 | Bundle-Vendor: Eclipse GLSP 10 | Export-Package: 11 | org.eclipse.glsp.server.features.sourcemodelwatcher 12 | Import-Package: org.junit;version="4.12.0", 13 | org.junit.jupiter.api;version="5.0.0", 14 | org.junit.jupiter.api.function;version="5.0.0" 15 | -------------------------------------------------------------------------------- /tests/org.eclipse.glsp.server.test/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/ 2 | bin.includes = META-INF/,\ 3 | . 4 | -------------------------------------------------------------------------------- /tests/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | GLSP Server Tests 8 | org.eclipse.glsp.tests 9 | pom 10 | This module contains the tests for GLSP server modules. 11 | 12 | 13 | org.eclipse.glsp 14 | org.eclipse.glsp.parent 15 | 2.5.0-SNAPSHOT 16 | ../pom.xml 17 | 18 | 19 | 20 | 21 | m2 22 | 23 | false 24 | 25 | 26 | org.eclipse.glsp.server.test 27 | org.eclipse.glsp.graph.test 28 | 29 | 30 | 31 | 32 | 33 | --------------------------------------------------------------------------------