Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce form to edit Relationship data and attributes
Introduce reference resolution and completion mechanism for elements - Ensure we send the global id as part of each identifiable element - Attach reference data to GLSP elements for property view - Replace specific 'requestDiagramNodeEntityModel' method - Replace specific 'findRootReferenceName' method Create Form for Relationship data - Unify form for property view and editor (also for Entity) - Use MUI components consistently and add theming for them - Remove custom stylesheets - Remove dependency to 'react-tabs' as it is no longer used Refactorings: - Rename 'ExternalId' to 'GlobalId' - Ensure IDs do not contain any invalid characters - Fix issue with attribute serialization for relationships
- Loading branch information
1 parent
d6e9ef8
commit 2302c37
Showing
60 changed files
with
1,947 additions
and
1,087 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
extensions/crossmodel-lang/src/language-server/cross-model-index-manager.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2024 CrossBreeze. | ||
********************************************************************************/ | ||
import { AstNode, AstNodeDescription, DefaultIndexManager, URI } from 'langium'; | ||
import { CrossModelSharedServices } from './cross-model-module.js'; | ||
import { SemanticRoot, findSemanticRoot } from './util/ast-util.js'; | ||
|
||
export class CrossModelIndexManager extends DefaultIndexManager { | ||
constructor(protected services: CrossModelSharedServices) { | ||
super(services); | ||
} | ||
|
||
getElementById(globalId: string, type?: string): AstNodeDescription | undefined { | ||
return this.allElements().find(desc => desc.name === globalId && (!type || desc.type === type)); | ||
} | ||
|
||
resolveElement(description?: AstNodeDescription): AstNode | undefined { | ||
if (!description) { | ||
return undefined; | ||
} | ||
const document = this.services.workspace.LangiumDocuments.getDocument(description.documentUri); | ||
return document | ||
? this.serviceRegistry.getServices(document.uri).workspace.AstNodeLocator.getAstNode(document.parseResult.value, description.path) | ||
: undefined; | ||
} | ||
|
||
resolveElementById(globalId: string, type?: string): AstNode | undefined { | ||
return this.resolveElement(this.getElementById(globalId, type)); | ||
} | ||
|
||
resolveSemanticElement(uri: URI): SemanticRoot | undefined { | ||
const document = this.services.workspace.LangiumDocuments.getDocument(uri); | ||
return document ? findSemanticRoot(document) : undefined; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.