Skip to content

Commit

Permalink
[3936] Add FormDescriptionEditor support in vs-code extension
Browse files Browse the repository at this point in the history
Bug: #3936
Signed-off-by: Michaël Charfadi <[email protected]>
  • Loading branch information
mcharfadi committed Sep 2, 2024
1 parent 06cc14d commit aeef9d8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 245 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,7 @@ An error message is now displayed if the _Shape_ is not set.
- https://github.com/eclipse-sirius/sirius-web/issues/2429[#2429] [sirius-web] Ensure that view models can be successfully uploaded by loading the default color palettes
- https://github.com/eclipse-sirius/sirius-web/issues/2433[#2433] [form] Fix an issue where the readonly property of FlexboxContainerPropertySection was not correctly dispatched to children.
- https://github.com/eclipse-sirius/sirius-web/issues/3943[#3943] [vs-code] Fix an issue with widget reference
- https://github.com/eclipse-sirius/sirius-web/issues/3936[#3936] [vs-code] Add FormDescriptionEditor support in vs-code extension

=== New Features

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type { SiriusWebApplicationProps } from './application/SiriusWebApplicati
export { DiagramRepresentationConfiguration } from './diagrams/DiagramRepresentationConfiguration';
export type { NodeTypeRegistry } from './diagrams/DiagramRepresentationConfiguration.types';
export { DefaultExtensionRegistryMergeStrategy } from './extension/DefaultExtensionRegistryMergeStrategy';
export { referenceWidgetDocumentTransform } from './extension/ReferenceWidgetDocumentTransform';
export type { FooterProps } from './footer/Footer.types';
export { footerExtensionPoint } from './footer/FooterExtensionPoints';
export {
Expand Down
9 changes: 9 additions & 0 deletions vscode-extension/src/view/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
SelectionContextProvider,
} from '@eclipse-sirius/sirius-components-core';
import { DiagramRepresentation } from '@eclipse-sirius/sirius-components-diagrams';
import { FormDescriptionEditorRepresentation } from '@eclipse-sirius/sirius-components-formdescriptioneditors';
import { FormRepresentation } from '@eclipse-sirius/sirius-components-forms';
import { DetailsView } from '@eclipse-sirius/sirius-web-application';
import { Theme, ThemeProvider } from '@mui/material';
Expand Down Expand Up @@ -123,6 +124,14 @@ export const App = ({
readOnly={false}
/>
);
} else if (representationKind.startsWith('siriusComponents://representation?type=FormDescriptionEditor')) {
component = (
<FormDescriptionEditorRepresentation
editingContextId={state.editingContextId}
representationId={state.representationId}
readOnly={false}
/>
);
} else if (representationKind.startsWith('siriusComponents://representation?type=Form')) {
component = (
<FormRepresentation
Expand Down
2 changes: 1 addition & 1 deletion vscode-extension/src/view/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import { ApolloClient, ApolloProvider, DefaultOptions, HttpLink, InMemoryCache,
import { WebSocketLink } from '@apollo/client/link/ws';
import { getMainDefinition } from '@apollo/client/utilities';
import { ExtensionProvider, ServerContext } from '@eclipse-sirius/sirius-components-core';
import { referenceWidgetDocumentTransform } from '@eclipse-sirius/sirius-web-application';
import React from 'react';
import ReactDOM from 'react-dom';
import { App } from './App';
import './index.css';
import { defaultExtensionRegistry } from './registry/DefaultExtensionRegistry';
import { referenceWidgetDocumentTransform } from './registry/ReferenceWidgetDocumentTransform';
import { ToastProvider } from './toast/ToastProvider';

declare global {
Expand Down

This file was deleted.

0 comments on commit aeef9d8

Please sign in to comment.