SlideShare a Scribd company logo
1 of 52
Download to read offline
ZERO TO ONE:
How to integrate a graphical editor in a cloud IDE
Stéphane Bégaudeau
Sirius Web Architect
stephane.begaudeau@obeo.fr | sbegaudeau
Axel Richard
Web & Modeling Consultant
axel.richard@obeo.fr | @_axelrichard_
Sirius Web
■ Everything you liked in Sirius Desktop, available on a modern cloud-based stack
■ Graphical and Domain specific tooling
■ Defined by a configuration file
■ Deployed on a web server
■ Rendered in a web browser
■ Collaborative support
https://www.eclipse.org/sirius/sirius-web.html
What’s in Sirius Web?
READY-TO-USE
Modeling framework
to define and render
graphical applications
in the web
What’s in Sirius Web?
READY-TO-USE
Modeling framework
to define and render
graphical applications
in the web MODEL SERVER
Open source model
server components
with a GraphQL API
What’s in Sirius Web?
READY-TO-USE
Modeling framework
to define and render
graphical applications
in the web MODEL SERVER
MODEL APPLICATION
Open source model
application (diagram,
properties, forms…)
Open source model
server components
with a GraphQL API
Built on top of awesome technologies
Obeo Cloud Platform
■ All of Sirius Web with additional collaborative and access control features
■ Authentication and authorization
■ Public/Private projects
■ Role based access control
■ Indicators of active users
https://www.obeosoft.com/en/products/obeo-studio
Completely customizable
■ Configure Sirius Web and OCP with the concepts from your domain
■ Define the graphical representation that you need
■ Diagrams
■ Tools
■ Forms
■ Validation
■ Import existing Sirius desktop configuration easily
Integration in cloud IDEs
MODEL SERVER
Leverage our GraphQL API
over HTTP and WebSocket to
interact with your servers
GRAPHICAL EDITORS
Manipulate your Sirius Web
graphical editors from your
IDE (diagrams, forms, etc)
VS CODE / THEIA
All that packaged as an
extension for VS Code and
Theia
Getting started
■ To start integrating Sirius Web in a cloud IDE, you’ll need
■ The latest release of @eclipse-sirius/sirius-components
■ React components for our graphical editors
■ An instance of a Sirius Web server
■ HTTP and WebSocket GraphQL API
DEMO
Integration in VS Code
■ TreeViews
■ Servers, projects & representations
■ Model explorer
■ Webview
■ Diagram editor
■ Properties editor
Server TreeView
■ Register new Sirius Web / OCP servers
Server TreeView
■ Register new Sirius Web / OCP servers
Node
Node HTML Document
Server TreeView - package.json
"contributes": {
"viewsContainers": {
"activitybar": [
{
"id": "siriusweb-view-container",
"title": "Sirius",
"icon": "images/icon_32.png"
}
]
},
"views": {
"siriusweb-view-container": [
{
"id": "siriusweb.serversView",
"name": "Servers"
},
]
},
…
}
Server TreeView
■ Register tree data provider in extension.ts
■ Implement TreeDataProvider & extend TreeItem
export function activate(context: vscode.ExtensionContext) {
const serversViewProvider = new ServersViewProvider(...);
vscode.window.registerTreeDataProvider('siriusweb.serversView', serversViewProvider);
}
export class ServersViewProvider implements TreeDataProvider<ServerItem> {
…
getChildren(element?: ServerItem): ProviderResult<ServerItem[]> {
...
}
}
export class ServerItem extends TreeItem {
...
}
Server TreeView
■ Perform the authentication to support Obeo Cloud Platform
import axios from 'axios';
private connectToServer(): Promise<boolean> {
const authenticateURL = `${this.serverAddress}/api/authenticate`;
const params = new URLSearchParams({ username: this.username, password: this.password, 'remember-me': 'true' });
return axios
.post(authenticateURL, params.toString())
.then((response) => {
if (response.status !== 200) {
return Promise.reject(false);
} else {
this.cookie = response.headers['set-cookie'][0];
return Promise.resolve(true);
}
})
.catch((error) => {
return Promise.reject(false);
});
}
Project TreeView
■ Used to manipulate Sirius Web / OCP projects
■ Leverage our GraphQL API over HTTP
Project TreeView
■ Retrieve the projects using a GraphQL query
private fetchProjects(): Promise<ProjectData[]> {
const queryURL = `${this.serverAddress}/api/graphql`;
const headers = { headers: { Cookie: this.cookie } };
const graphQLQuery = `
query getProjects($page: Int!) {
viewer {
id
projects(page: $page) {
edges {
node {
id
name
visibility
}
}
}
}
}
`;
Project TreeView
■ Then process the result to display the data in the TreeView
return axios.post(
queryURL,
{
query: graphQLQuery,
variables: { page: 0 },
},
headers
)
.then((response) => {
if (response.status !== 200) {
return Promise.reject([]);
} else {
const projectsData = [];
// Transform response.data into projects
return Promise.resolve(this.projectsData);
}
});
Representations TreeView
■ Same logic as in the previous TreeView
■ GraphQL query over HTTP
■ Updated when the project selected changes
Explorer TreeView
■ Used to display the model elements from the project
■ Based on the configuration of the explorer of the server
■ Can be parameterized
■ Based on a tree representation
■ Using a GraphQL subscription for real time update
■ Based on the graphql-ws protocol
Explorer TreeView
Explorer TreeView
■ When the connection is established, we will send out a start message
■ Used to subscribe to events from a GraphQL subscription
■ It allows us to receive updates in real time
Explorer TreeView
■ After that, we will receive messages for each event
■ Refresh events will be used to give us the new data structure to display
VS Code WebView
VS Code WebView
public static getWebviewContent(webView: vscode.Webview, webViewContext: WebViewContext): string {
const reactAppPathOnDisk = vscode.Uri.file(path.join(webViewContext.extensionPath, 'siriusweb', 'siriusweb.js'));
const reactAppUri = webView.asWebviewUri(reactAppPathOnDisk);
return `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>${webViewContext.representationLabel}</title>
<script>
window.acquireVsCodeApi = acquireVsCodeApi;
window.serverAddress = '${webViewContext.serverAddress}';
window.username = '${webViewContext.username}';
window.password = '${webViewContext.password}';
window.editingContextId = '${webViewContext.editingContextId}';
window.representationId = '${webViewContext.representationId}';
window.representationLabel = '${webViewContext.representationLabel}';
window.representationKind = '${webViewContext.representationKind}';
</script>
</head>
<body>
<script src="${reactAppUri}"></script>
</body>
</html>`;
}
VS Code WebView
VS Code WebView
VS Code WebView
import { DiagramWebSocketContainer, PropertiesWebSocketContainer, Selection } from '@eclipse-sirius/sirius-components';
export const App = ({...}: AppProps) => {
let component;
if (representationKind === 'Diagram') {
component = (
<DiagramWebSocketContainer
editingContextId={state.editingContextId}
representationId={state.representationId}
readOnly={false}
selection={state.selection}
setSelection={setSelection}
/>
);
} else {
component = (
<PropertiesWebSocketContainer
editingContextId={state.editingContextId}
readOnly={false}
selection={state.selection}
/>
);
}
}
VS Code WebView
export const App = ({...}: AppProps) => {
useEffect(() => {
fetch(`${serverAddress}/api/authenticate`, {
method: 'POST',
credentials: 'include',
mode: 'cors',
body: new URLSearchParams({ username, password, 'remember-me': 'true' }),
})
.then(() => {
setState((prevState) => {
return { ...prevState, authenticate: true };
});
})
.catch(() => {});
}, []);
}
From VS Code to Theia
Integration in Theia
Integration in Theia
■ Package vscode extension as VSIX file
■ Run vsce from the VSCode extension folder
■ Put the VSIX file created in the Theia extensions folder
■ Run Theia
DEMO
Thank you!

More Related Content

What's hot

Cloud computing - an insight into "how does it really work ?"
Cloud computing - an insight into "how does it really work ?" Cloud computing - an insight into "how does it really work ?"
Cloud computing - an insight into "how does it really work ?" Tikal Knowledge
 
Case study of Google Cloud Platform
Case study of Google Cloud PlatformCase study of Google Cloud Platform
Case study of Google Cloud PlatformDavid Chen
 
API Tips & Tricks - Policy Management and Elastic Deployment
API Tips & Tricks - Policy Management and Elastic DeploymentAPI Tips & Tricks - Policy Management and Elastic Deployment
API Tips & Tricks - Policy Management and Elastic DeploymentAxway
 
Google Cloud Platform Training | Introduction To GCP | Google Cloud Platform ...
Google Cloud Platform Training | Introduction To GCP | Google Cloud Platform ...Google Cloud Platform Training | Introduction To GCP | Google Cloud Platform ...
Google Cloud Platform Training | Introduction To GCP | Google Cloud Platform ...Edureka!
 
Google cloud Platform
Google cloud PlatformGoogle cloud Platform
Google cloud PlatformJanu Jahnavi
 
Google Cloud Certification | Google Cloud Platform Certification Path | GCP T...
Google Cloud Certification | Google Cloud Platform Certification Path | GCP T...Google Cloud Certification | Google Cloud Platform Certification Path | GCP T...
Google Cloud Certification | Google Cloud Platform Certification Path | GCP T...Simplilearn
 
Google Cloud Platform 2014Q1 - Starter Guide
Google Cloud Platform   2014Q1 - Starter GuideGoogle Cloud Platform   2014Q1 - Starter Guide
Google Cloud Platform 2014Q1 - Starter GuideSimon Su
 
Techdays Finland 2019 - Adventures of building a (multi-tenant) PaaS on Micro...
Techdays Finland 2019 - Adventures of building a (multi-tenant) PaaS on Micro...Techdays Finland 2019 - Adventures of building a (multi-tenant) PaaS on Micro...
Techdays Finland 2019 - Adventures of building a (multi-tenant) PaaS on Micro...Tom Kerkhove
 
Top Advantages of Using Google Cloud Platform
Top Advantages of Using Google Cloud PlatformTop Advantages of Using Google Cloud Platform
Top Advantages of Using Google Cloud PlatformKinsta WordPress Hosting
 
Google Cloud Platform Updates
Google Cloud Platform UpdatesGoogle Cloud Platform Updates
Google Cloud Platform UpdatesRomin Irani
 
Introduction openstack horizon
Introduction openstack horizonIntroduction openstack horizon
Introduction openstack horizonJim Yeh
 
Forge - DevCon 2016: Collaborating with Design Data
Forge - DevCon 2016: Collaborating with Design DataForge - DevCon 2016: Collaborating with Design Data
Forge - DevCon 2016: Collaborating with Design DataAutodesk
 
Zure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training dayZure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training dayOkko Oulasvirta
 
Teams And PowerPlatform ROI Infographic
Teams And PowerPlatform ROI InfographicTeams And PowerPlatform ROI Infographic
Teams And PowerPlatform ROI InfographicWePlus Consultancy
 
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)Bringing Serverless into the Enterprise (Global Azure Virtual 2020)
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)Callon Campbell
 
Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...
Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...
Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...Tom Kerkhove
 

What's hot (20)

Cloud computing - an insight into "how does it really work ?"
Cloud computing - an insight into "how does it really work ?" Cloud computing - an insight into "how does it really work ?"
Cloud computing - an insight into "how does it really work ?"
 
Case study of Google Cloud Platform
Case study of Google Cloud PlatformCase study of Google Cloud Platform
Case study of Google Cloud Platform
 
API Tips & Tricks - Policy Management and Elastic Deployment
API Tips & Tricks - Policy Management and Elastic DeploymentAPI Tips & Tricks - Policy Management and Elastic Deployment
API Tips & Tricks - Policy Management and Elastic Deployment
 
Google Cloud Platform Training | Introduction To GCP | Google Cloud Platform ...
Google Cloud Platform Training | Introduction To GCP | Google Cloud Platform ...Google Cloud Platform Training | Introduction To GCP | Google Cloud Platform ...
Google Cloud Platform Training | Introduction To GCP | Google Cloud Platform ...
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Cloud & GCP 101
Cloud & GCP 101Cloud & GCP 101
Cloud & GCP 101
 
TIAD : Automate everything with Google Cloud
TIAD : Automate everything with Google CloudTIAD : Automate everything with Google Cloud
TIAD : Automate everything with Google Cloud
 
Gcp
GcpGcp
Gcp
 
Google cloud Platform
Google cloud PlatformGoogle cloud Platform
Google cloud Platform
 
Google Cloud Certification | Google Cloud Platform Certification Path | GCP T...
Google Cloud Certification | Google Cloud Platform Certification Path | GCP T...Google Cloud Certification | Google Cloud Platform Certification Path | GCP T...
Google Cloud Certification | Google Cloud Platform Certification Path | GCP T...
 
Google Cloud Platform 2014Q1 - Starter Guide
Google Cloud Platform   2014Q1 - Starter GuideGoogle Cloud Platform   2014Q1 - Starter Guide
Google Cloud Platform 2014Q1 - Starter Guide
 
Techdays Finland 2019 - Adventures of building a (multi-tenant) PaaS on Micro...
Techdays Finland 2019 - Adventures of building a (multi-tenant) PaaS on Micro...Techdays Finland 2019 - Adventures of building a (multi-tenant) PaaS on Micro...
Techdays Finland 2019 - Adventures of building a (multi-tenant) PaaS on Micro...
 
Top Advantages of Using Google Cloud Platform
Top Advantages of Using Google Cloud PlatformTop Advantages of Using Google Cloud Platform
Top Advantages of Using Google Cloud Platform
 
Google Cloud Platform Updates
Google Cloud Platform UpdatesGoogle Cloud Platform Updates
Google Cloud Platform Updates
 
Introduction openstack horizon
Introduction openstack horizonIntroduction openstack horizon
Introduction openstack horizon
 
Forge - DevCon 2016: Collaborating with Design Data
Forge - DevCon 2016: Collaborating with Design DataForge - DevCon 2016: Collaborating with Design Data
Forge - DevCon 2016: Collaborating with Design Data
 
Zure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training dayZure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training day
 
Teams And PowerPlatform ROI Infographic
Teams And PowerPlatform ROI InfographicTeams And PowerPlatform ROI Infographic
Teams And PowerPlatform ROI Infographic
 
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)Bringing Serverless into the Enterprise (Global Azure Virtual 2020)
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)
 
Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...
Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...
Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...
 

Similar to Zero to One : How to Integrate a Graphical Editor in a Cloud IDE (27.10.2021)

A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...DataLeader.io
 
How We Brought Advanced HTML5 Viewing to ADF
How We Brought Advanced HTML5 Viewing to ADFHow We Brought Advanced HTML5 Viewing to ADF
How We Brought Advanced HTML5 Viewing to ADFSeanGraham5
 
ASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesEamonn Boyle
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!David Gibbons
 
Integrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code SuiteIntegrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code SuiteAtlassian
 
Simplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudSimplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudRamnivas Laddad
 
Customizing Your Well-Architected Reviews_ A Technical Walkthrough.pdf
Customizing Your Well-Architected Reviews_ A Technical Walkthrough.pdfCustomizing Your Well-Architected Reviews_ A Technical Walkthrough.pdf
Customizing Your Well-Architected Reviews_ A Technical Walkthrough.pdfAdeotunAdegbaju
 
Build Fast WordPress Site With Gatsby
Build Fast WordPress Site With GatsbyBuild Fast WordPress Site With Gatsby
Build Fast WordPress Site With GatsbyImran Sayed
 
Django app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh AgarwalDjango app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh Agarwalratneshsinghparihar
 
"How to create an infrastructure in .NET", Leonid Chetverikov
"How to create an infrastructure in .NET", Leonid Chetverikov"How to create an infrastructure in .NET", Leonid Chetverikov
"How to create an infrastructure in .NET", Leonid ChetverikovFwdays
 
Introducing Neo4j 3.0
Introducing Neo4j 3.0Introducing Neo4j 3.0
Introducing Neo4j 3.0Neo4j
 
Sirius Web Advanced : Customize and Extend the Platform
Sirius Web Advanced : Customize and Extend the PlatformSirius Web Advanced : Customize and Extend the Platform
Sirius Web Advanced : Customize and Extend the PlatformObeo
 
Machine learning services with SQL Server 2017
Machine learning services with SQL Server 2017Machine learning services with SQL Server 2017
Machine learning services with SQL Server 2017Mark Tabladillo
 
Resilient Microservices with Spring Cloud
Resilient Microservices with Spring CloudResilient Microservices with Spring Cloud
Resilient Microservices with Spring CloudVMware Tanzu
 
Dsdt meetup 2017 11-21
Dsdt meetup 2017 11-21Dsdt meetup 2017 11-21
Dsdt meetup 2017 11-21JDA Labs MTL
 
DSDT Meetup Nov 2017
DSDT Meetup Nov 2017DSDT Meetup Nov 2017
DSDT Meetup Nov 2017DSDT_MTL
 
Integrating the new Layer-Based SVG Engine
Integrating the new Layer-Based SVG EngineIntegrating the new Layer-Based SVG Engine
Integrating the new Layer-Based SVG EngineIgalia
 

Similar to Zero to One : How to Integrate a Graphical Editor in a Cloud IDE (27.10.2021) (20)

A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
 
How We Brought Advanced HTML5 Viewing to ADF
How We Brought Advanced HTML5 Viewing to ADFHow We Brought Advanced HTML5 Viewing to ADF
How We Brought Advanced HTML5 Viewing to ADF
 
ASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesASP .Net Core SPA Templates
ASP .Net Core SPA Templates
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!
 
Integrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code SuiteIntegrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code Suite
 
Simplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudSimplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring Cloud
 
Customizing Your Well-Architected Reviews_ A Technical Walkthrough.pdf
Customizing Your Well-Architected Reviews_ A Technical Walkthrough.pdfCustomizing Your Well-Architected Reviews_ A Technical Walkthrough.pdf
Customizing Your Well-Architected Reviews_ A Technical Walkthrough.pdf
 
Build Fast WordPress Site With Gatsby
Build Fast WordPress Site With GatsbyBuild Fast WordPress Site With Gatsby
Build Fast WordPress Site With Gatsby
 
Vuejs
VuejsVuejs
Vuejs
 
Django app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh AgarwalDjango app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh Agarwal
 
"How to create an infrastructure in .NET", Leonid Chetverikov
"How to create an infrastructure in .NET", Leonid Chetverikov"How to create an infrastructure in .NET", Leonid Chetverikov
"How to create an infrastructure in .NET", Leonid Chetverikov
 
Introducing Neo4j 3.0
Introducing Neo4j 3.0Introducing Neo4j 3.0
Introducing Neo4j 3.0
 
nuxt-sample.pdf
nuxt-sample.pdfnuxt-sample.pdf
nuxt-sample.pdf
 
Sirius Web Advanced : Customize and Extend the Platform
Sirius Web Advanced : Customize and Extend the PlatformSirius Web Advanced : Customize and Extend the Platform
Sirius Web Advanced : Customize and Extend the Platform
 
Redux Universal
Redux UniversalRedux Universal
Redux Universal
 
Machine learning services with SQL Server 2017
Machine learning services with SQL Server 2017Machine learning services with SQL Server 2017
Machine learning services with SQL Server 2017
 
Resilient Microservices with Spring Cloud
Resilient Microservices with Spring CloudResilient Microservices with Spring Cloud
Resilient Microservices with Spring Cloud
 
Dsdt meetup 2017 11-21
Dsdt meetup 2017 11-21Dsdt meetup 2017 11-21
Dsdt meetup 2017 11-21
 
DSDT Meetup Nov 2017
DSDT Meetup Nov 2017DSDT Meetup Nov 2017
DSDT Meetup Nov 2017
 
Integrating the new Layer-Based SVG Engine
Integrating the new Layer-Based SVG EngineIntegrating the new Layer-Based SVG Engine
Integrating the new Layer-Based SVG Engine
 

More from Obeo

Digitally assisted design for safety analysis
Digitally assisted design for safety analysisDigitally assisted design for safety analysis
Digitally assisted design for safety analysisObeo
 
INCOSE IS 2023 | You deserve more than the best in class MBSE tool
INCOSE IS 2023 | You deserve more than the best in class MBSE toolINCOSE IS 2023 | You deserve more than the best in class MBSE tool
INCOSE IS 2023 | You deserve more than the best in class MBSE toolObeo
 
Tailoring Arcadia Framework in Thales UK
Tailoring Arcadia Framework in Thales UKTailoring Arcadia Framework in Thales UK
Tailoring Arcadia Framework in Thales UKObeo
 
CapellaDays2022 | Saratech | Interface Control Document Generation and Linkag...
CapellaDays2022 | Saratech | Interface Control Document Generation and Linkag...CapellaDays2022 | Saratech | Interface Control Document Generation and Linkag...
CapellaDays2022 | Saratech | Interface Control Document Generation and Linkag...Obeo
 
CapellaDays2022 | Politecnico di Milano | Interplanetary Space Mission as a r...
CapellaDays2022 | Politecnico di Milano | Interplanetary Space Mission as a r...CapellaDays2022 | Politecnico di Milano | Interplanetary Space Mission as a r...
CapellaDays2022 | Politecnico di Milano | Interplanetary Space Mission as a r...Obeo
 
CapellaDays2022 | NavalGroup | Closing the gap between traditional engineerin...
CapellaDays2022 | NavalGroup | Closing the gap between traditional engineerin...CapellaDays2022 | NavalGroup | Closing the gap between traditional engineerin...
CapellaDays2022 | NavalGroup | Closing the gap between traditional engineerin...Obeo
 
CapellaDays2022 | Thales | Stairway to heaven: Climbing the very first steps
CapellaDays2022 | Thales | Stairway to heaven: Climbing the very first stepsCapellaDays2022 | Thales | Stairway to heaven: Climbing the very first steps
CapellaDays2022 | Thales | Stairway to heaven: Climbing the very first stepsObeo
 
CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...
CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...
CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...Obeo
 
CapellaDays2022 | CILAS - ArianeGroup | CILAS feedback about Capella use
CapellaDays2022 | CILAS - ArianeGroup | CILAS feedback about Capella useCapellaDays2022 | CILAS - ArianeGroup | CILAS feedback about Capella use
CapellaDays2022 | CILAS - ArianeGroup | CILAS feedback about Capella useObeo
 
CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...
CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...
CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...Obeo
 
CapellaDays2022 | Thales DMS | A global engineering process based on MBSE to ...
CapellaDays2022 | Thales DMS | A global engineering process based on MBSE to ...CapellaDays2022 | Thales DMS | A global engineering process based on MBSE to ...
CapellaDays2022 | Thales DMS | A global engineering process based on MBSE to ...Obeo
 
CapellaDays2022 | SIEMENS | Expand MBSE into Model-based Production Engineeri...
CapellaDays2022 | SIEMENS | Expand MBSE into Model-based Production Engineeri...CapellaDays2022 | SIEMENS | Expand MBSE into Model-based Production Engineeri...
CapellaDays2022 | SIEMENS | Expand MBSE into Model-based Production Engineeri...Obeo
 
Gestion applicative des données, un REX du Ministère de l'Éducation Nationale
Gestion applicative des données, un REX du Ministère de l'Éducation NationaleGestion applicative des données, un REX du Ministère de l'Éducation Nationale
Gestion applicative des données, un REX du Ministère de l'Éducation NationaleObeo
 
Simulation with Python and MATLAB® in Capella
Simulation with Python and MATLAB® in CapellaSimulation with Python and MATLAB® in Capella
Simulation with Python and MATLAB® in CapellaObeo
 
From Model-based to Model and Simulation-based Systems Architectures
From Model-based to Model and Simulation-based Systems ArchitecturesFrom Model-based to Model and Simulation-based Systems Architectures
From Model-based to Model and Simulation-based Systems ArchitecturesObeo
 
Connecting Textual Requirements with Capella Models
Connecting Textual Requirements with Capella Models Connecting Textual Requirements with Capella Models
Connecting Textual Requirements with Capella Models Obeo
 
Sirius Web 101 : Create a Modeler With No Code
Sirius Web 101 : Create a Modeler With No CodeSirius Web 101 : Create a Modeler With No Code
Sirius Web 101 : Create a Modeler With No CodeObeo
 
Sirius Project, Now and In the Future
Sirius Project, Now and In the FutureSirius Project, Now and In the Future
Sirius Project, Now and In the FutureObeo
 
Visualizing, Analyzing and Optimizing Automotive Architecture Models using Si...
Visualizing, Analyzing and Optimizing Automotive Architecture Models using Si...Visualizing, Analyzing and Optimizing Automotive Architecture Models using Si...
Visualizing, Analyzing and Optimizing Automotive Architecture Models using Si...Obeo
 
Defining Viewpoints for Ontology-Based DSLs
Defining Viewpoints for Ontology-Based DSLsDefining Viewpoints for Ontology-Based DSLs
Defining Viewpoints for Ontology-Based DSLsObeo
 

More from Obeo (20)

Digitally assisted design for safety analysis
Digitally assisted design for safety analysisDigitally assisted design for safety analysis
Digitally assisted design for safety analysis
 
INCOSE IS 2023 | You deserve more than the best in class MBSE tool
INCOSE IS 2023 | You deserve more than the best in class MBSE toolINCOSE IS 2023 | You deserve more than the best in class MBSE tool
INCOSE IS 2023 | You deserve more than the best in class MBSE tool
 
Tailoring Arcadia Framework in Thales UK
Tailoring Arcadia Framework in Thales UKTailoring Arcadia Framework in Thales UK
Tailoring Arcadia Framework in Thales UK
 
CapellaDays2022 | Saratech | Interface Control Document Generation and Linkag...
CapellaDays2022 | Saratech | Interface Control Document Generation and Linkag...CapellaDays2022 | Saratech | Interface Control Document Generation and Linkag...
CapellaDays2022 | Saratech | Interface Control Document Generation and Linkag...
 
CapellaDays2022 | Politecnico di Milano | Interplanetary Space Mission as a r...
CapellaDays2022 | Politecnico di Milano | Interplanetary Space Mission as a r...CapellaDays2022 | Politecnico di Milano | Interplanetary Space Mission as a r...
CapellaDays2022 | Politecnico di Milano | Interplanetary Space Mission as a r...
 
CapellaDays2022 | NavalGroup | Closing the gap between traditional engineerin...
CapellaDays2022 | NavalGroup | Closing the gap between traditional engineerin...CapellaDays2022 | NavalGroup | Closing the gap between traditional engineerin...
CapellaDays2022 | NavalGroup | Closing the gap between traditional engineerin...
 
CapellaDays2022 | Thales | Stairway to heaven: Climbing the very first steps
CapellaDays2022 | Thales | Stairway to heaven: Climbing the very first stepsCapellaDays2022 | Thales | Stairway to heaven: Climbing the very first steps
CapellaDays2022 | Thales | Stairway to heaven: Climbing the very first steps
 
CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...
CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...
CapellaDays2022 | COMAC - PGM | How We Use Capella for Collaborative Design i...
 
CapellaDays2022 | CILAS - ArianeGroup | CILAS feedback about Capella use
CapellaDays2022 | CILAS - ArianeGroup | CILAS feedback about Capella useCapellaDays2022 | CILAS - ArianeGroup | CILAS feedback about Capella use
CapellaDays2022 | CILAS - ArianeGroup | CILAS feedback about Capella use
 
CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...
CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...
CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...
 
CapellaDays2022 | Thales DMS | A global engineering process based on MBSE to ...
CapellaDays2022 | Thales DMS | A global engineering process based on MBSE to ...CapellaDays2022 | Thales DMS | A global engineering process based on MBSE to ...
CapellaDays2022 | Thales DMS | A global engineering process based on MBSE to ...
 
CapellaDays2022 | SIEMENS | Expand MBSE into Model-based Production Engineeri...
CapellaDays2022 | SIEMENS | Expand MBSE into Model-based Production Engineeri...CapellaDays2022 | SIEMENS | Expand MBSE into Model-based Production Engineeri...
CapellaDays2022 | SIEMENS | Expand MBSE into Model-based Production Engineeri...
 
Gestion applicative des données, un REX du Ministère de l'Éducation Nationale
Gestion applicative des données, un REX du Ministère de l'Éducation NationaleGestion applicative des données, un REX du Ministère de l'Éducation Nationale
Gestion applicative des données, un REX du Ministère de l'Éducation Nationale
 
Simulation with Python and MATLAB® in Capella
Simulation with Python and MATLAB® in CapellaSimulation with Python and MATLAB® in Capella
Simulation with Python and MATLAB® in Capella
 
From Model-based to Model and Simulation-based Systems Architectures
From Model-based to Model and Simulation-based Systems ArchitecturesFrom Model-based to Model and Simulation-based Systems Architectures
From Model-based to Model and Simulation-based Systems Architectures
 
Connecting Textual Requirements with Capella Models
Connecting Textual Requirements with Capella Models Connecting Textual Requirements with Capella Models
Connecting Textual Requirements with Capella Models
 
Sirius Web 101 : Create a Modeler With No Code
Sirius Web 101 : Create a Modeler With No CodeSirius Web 101 : Create a Modeler With No Code
Sirius Web 101 : Create a Modeler With No Code
 
Sirius Project, Now and In the Future
Sirius Project, Now and In the FutureSirius Project, Now and In the Future
Sirius Project, Now and In the Future
 
Visualizing, Analyzing and Optimizing Automotive Architecture Models using Si...
Visualizing, Analyzing and Optimizing Automotive Architecture Models using Si...Visualizing, Analyzing and Optimizing Automotive Architecture Models using Si...
Visualizing, Analyzing and Optimizing Automotive Architecture Models using Si...
 
Defining Viewpoints for Ontology-Based DSLs
Defining Viewpoints for Ontology-Based DSLsDefining Viewpoints for Ontology-Based DSLs
Defining Viewpoints for Ontology-Based DSLs
 

Recently uploaded

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 

Recently uploaded (20)

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 

Zero to One : How to Integrate a Graphical Editor in a Cloud IDE (27.10.2021)

  • 1. ZERO TO ONE: How to integrate a graphical editor in a cloud IDE Stéphane Bégaudeau Sirius Web Architect stephane.begaudeau@obeo.fr | sbegaudeau Axel Richard Web & Modeling Consultant axel.richard@obeo.fr | @_axelrichard_
  • 2. Sirius Web ■ Everything you liked in Sirius Desktop, available on a modern cloud-based stack ■ Graphical and Domain specific tooling ■ Defined by a configuration file ■ Deployed on a web server ■ Rendered in a web browser ■ Collaborative support https://www.eclipse.org/sirius/sirius-web.html
  • 3. What’s in Sirius Web? READY-TO-USE Modeling framework to define and render graphical applications in the web
  • 4. What’s in Sirius Web? READY-TO-USE Modeling framework to define and render graphical applications in the web MODEL SERVER Open source model server components with a GraphQL API
  • 5. What’s in Sirius Web? READY-TO-USE Modeling framework to define and render graphical applications in the web MODEL SERVER MODEL APPLICATION Open source model application (diagram, properties, forms…) Open source model server components with a GraphQL API
  • 6. Built on top of awesome technologies
  • 7. Obeo Cloud Platform ■ All of Sirius Web with additional collaborative and access control features ■ Authentication and authorization ■ Public/Private projects ■ Role based access control ■ Indicators of active users https://www.obeosoft.com/en/products/obeo-studio
  • 8. Completely customizable ■ Configure Sirius Web and OCP with the concepts from your domain ■ Define the graphical representation that you need ■ Diagrams ■ Tools ■ Forms ■ Validation ■ Import existing Sirius desktop configuration easily
  • 9. Integration in cloud IDEs MODEL SERVER Leverage our GraphQL API over HTTP and WebSocket to interact with your servers GRAPHICAL EDITORS Manipulate your Sirius Web graphical editors from your IDE (diagrams, forms, etc) VS CODE / THEIA All that packaged as an extension for VS Code and Theia
  • 10. Getting started ■ To start integrating Sirius Web in a cloud IDE, you’ll need ■ The latest release of @eclipse-sirius/sirius-components ■ React components for our graphical editors ■ An instance of a Sirius Web server ■ HTTP and WebSocket GraphQL API
  • 11.
  • 12.
  • 13. DEMO
  • 14. Integration in VS Code ■ TreeViews ■ Servers, projects & representations ■ Model explorer ■ Webview ■ Diagram editor ■ Properties editor
  • 15. Server TreeView ■ Register new Sirius Web / OCP servers
  • 16. Server TreeView ■ Register new Sirius Web / OCP servers
  • 17.
  • 18. Node
  • 20. Server TreeView - package.json "contributes": { "viewsContainers": { "activitybar": [ { "id": "siriusweb-view-container", "title": "Sirius", "icon": "images/icon_32.png" } ] }, "views": { "siriusweb-view-container": [ { "id": "siriusweb.serversView", "name": "Servers" }, ] }, … }
  • 21. Server TreeView ■ Register tree data provider in extension.ts ■ Implement TreeDataProvider & extend TreeItem export function activate(context: vscode.ExtensionContext) { const serversViewProvider = new ServersViewProvider(...); vscode.window.registerTreeDataProvider('siriusweb.serversView', serversViewProvider); } export class ServersViewProvider implements TreeDataProvider<ServerItem> { … getChildren(element?: ServerItem): ProviderResult<ServerItem[]> { ... } } export class ServerItem extends TreeItem { ... }
  • 22. Server TreeView ■ Perform the authentication to support Obeo Cloud Platform import axios from 'axios'; private connectToServer(): Promise<boolean> { const authenticateURL = `${this.serverAddress}/api/authenticate`; const params = new URLSearchParams({ username: this.username, password: this.password, 'remember-me': 'true' }); return axios .post(authenticateURL, params.toString()) .then((response) => { if (response.status !== 200) { return Promise.reject(false); } else { this.cookie = response.headers['set-cookie'][0]; return Promise.resolve(true); } }) .catch((error) => { return Promise.reject(false); }); }
  • 23. Project TreeView ■ Used to manipulate Sirius Web / OCP projects ■ Leverage our GraphQL API over HTTP
  • 24. Project TreeView ■ Retrieve the projects using a GraphQL query private fetchProjects(): Promise<ProjectData[]> { const queryURL = `${this.serverAddress}/api/graphql`; const headers = { headers: { Cookie: this.cookie } }; const graphQLQuery = ` query getProjects($page: Int!) { viewer { id projects(page: $page) { edges { node { id name visibility } } } } } `;
  • 25. Project TreeView ■ Then process the result to display the data in the TreeView return axios.post( queryURL, { query: graphQLQuery, variables: { page: 0 }, }, headers ) .then((response) => { if (response.status !== 200) { return Promise.reject([]); } else { const projectsData = []; // Transform response.data into projects return Promise.resolve(this.projectsData); } });
  • 26. Representations TreeView ■ Same logic as in the previous TreeView ■ GraphQL query over HTTP ■ Updated when the project selected changes
  • 27. Explorer TreeView ■ Used to display the model elements from the project ■ Based on the configuration of the explorer of the server ■ Can be parameterized ■ Based on a tree representation ■ Using a GraphQL subscription for real time update ■ Based on the graphql-ws protocol
  • 29. Explorer TreeView ■ When the connection is established, we will send out a start message ■ Used to subscribe to events from a GraphQL subscription ■ It allows us to receive updates in real time
  • 30. Explorer TreeView ■ After that, we will receive messages for each event ■ Refresh events will be used to give us the new data structure to display
  • 31.
  • 33.
  • 34. VS Code WebView public static getWebviewContent(webView: vscode.Webview, webViewContext: WebViewContext): string { const reactAppPathOnDisk = vscode.Uri.file(path.join(webViewContext.extensionPath, 'siriusweb', 'siriusweb.js')); const reactAppUri = webView.asWebviewUri(reactAppPathOnDisk); return `<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>${webViewContext.representationLabel}</title> <script> window.acquireVsCodeApi = acquireVsCodeApi; window.serverAddress = '${webViewContext.serverAddress}'; window.username = '${webViewContext.username}'; window.password = '${webViewContext.password}'; window.editingContextId = '${webViewContext.editingContextId}'; window.representationId = '${webViewContext.representationId}'; window.representationLabel = '${webViewContext.representationLabel}'; window.representationKind = '${webViewContext.representationKind}'; </script> </head> <body> <script src="${reactAppUri}"></script> </body> </html>`; }
  • 37. VS Code WebView import { DiagramWebSocketContainer, PropertiesWebSocketContainer, Selection } from '@eclipse-sirius/sirius-components'; export const App = ({...}: AppProps) => { let component; if (representationKind === 'Diagram') { component = ( <DiagramWebSocketContainer editingContextId={state.editingContextId} representationId={state.representationId} readOnly={false} selection={state.selection} setSelection={setSelection} /> ); } else { component = ( <PropertiesWebSocketContainer editingContextId={state.editingContextId} readOnly={false} selection={state.selection} /> ); } }
  • 38. VS Code WebView export const App = ({...}: AppProps) => { useEffect(() => { fetch(`${serverAddress}/api/authenticate`, { method: 'POST', credentials: 'include', mode: 'cors', body: new URLSearchParams({ username, password, 'remember-me': 'true' }), }) .then(() => { setState((prevState) => { return { ...prevState, authenticate: true }; }); }) .catch(() => {}); }, []); }
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48. From VS Code to Theia
  • 50. Integration in Theia ■ Package vscode extension as VSIX file ■ Run vsce from the VSCode extension folder ■ Put the VSIX file created in the Theia extensions folder ■ Run Theia
  • 51. DEMO