-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: vocabulary support for namespace scoped decorators #983
base: main
Are you sure you want to change the base?
feat: vocabulary support for namespace scoped decorators #983
Conversation
vocManager.addVocabulary(content); | ||
}); | ||
const vocabKeySet=[]; | ||
const namespaceUpdated = newModelManager.getNamespaces().filter(namespace=>namespace!=='[email protected]' && namespace!=='concerto'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this filtering required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the filtering.
Signed-off-by: Dibyam Agrawal <[email protected]>
Signed-off-by: Dibyam Agrawal <[email protected]>
Signed-off-by: Dibyam Agrawal <[email protected]>
Signed-off-by: Dibyam Agrawal <[email protected]>
Signed-off-by: Dibyam Agrawal <[email protected]>
Signed-off-by: Dibyam Agrawal <[email protected]>
Signed-off-by: Dibyam Agrawal <[email protected]>
* chore(aliasing): tests import aliasing Signed-off-by: sanketshevkar <[email protected]> * fix(aliasing): add new tests Signed-off-by: sanketshevkar <[email protected]> * fix(aliasing): add new tests Signed-off-by: sanketshevkar <[email protected]> * fix(aliasing): add new tests Signed-off-by: sanketshevkar <[email protected]> * fix(aliasing): upgrade glob to v11 to fix rimraf issue in concerto-types Signed-off-by: sanketshevkar <[email protected]> * fix(aliasing): update coverage scollection script for globe upgarde Signed-off-by: sanketshevkar <[email protected]> * fix(aliasing): update coverage scollection script for globe upgarde Signed-off-by: sanketshevkar <[email protected]> * fix(aliasing): update coverage scollection script for globe upgarde Signed-off-by: sanketshevkar <[email protected]> * fix(aliasing): update coverage scollection script for globe upgarde Signed-off-by: sanketshevkar <[email protected]> * fix(aliasing): concerto-metamodel bump Signed-off-by: sanketshevkar <[email protected]> * fix(aliasing): new test Signed-off-by: sanketshevkar <[email protected]> * fix(aliasing): fix test data Signed-off-by: sanketshevkar <[email protected]> --------- Signed-off-by: sanketshevkar <[email protected]> Signed-off-by: Dibyam Agrawal <[email protected]>
Signed-off-by: GitHub <[email protected]> Co-authored-by: sanketshevkar <[email protected]> Signed-off-by: Dibyam Agrawal <[email protected]>
…ager (accordproject#979) Signed-off-by: sanketshevkar <[email protected]> Signed-off-by: Dibyam Agrawal <[email protected]>
Signed-off-by: GitHub <[email protected]> Co-authored-by: sanketshevkar <[email protected]> Signed-off-by: Dibyam Agrawal <[email protected]>
Signed-off-by: Dibyam Agrawal <[email protected]>
0b52413
to
3187ad9
Compare
… dibyam/namespace-vocab Signed-off-by: Dibyam Agrawal <[email protected]>
Signed-off-by: Dibyam Agrawal <[email protected]>
Signed-off-by: Dibyam Agrawal <[email protected]>
* @param {Object} decl - the declaration object | ||
* @param {Object} dcs - the current dcs json to be parsed | ||
* @returns {Object} - the collection of collected vocabularies with current dcs | ||
* @private | ||
*/ | ||
parseVocabularies(dictVoc, decl, dcs){ | ||
dictVoc[decl.declaration] = dictVoc[decl.declaration] || { propertyVocabs: {} }; | ||
parseVocabularies(vocabObject, decl, dcs){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is happening here? Its a bit unclear what this method is accomplishing, can you add some description?
The part that is confusing here is that what's relation between decl object and parsing namespace vocabulary?
@@ -37,7 +37,6 @@ export interface IRange extends IConcept { | |||
|
|||
export interface ITypeIdentifier extends IConcept { | |||
name: string; | |||
resolvedName?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are not working on the latest main branch of concerto.
@@ -113,6 +115,10 @@ class Vocabulary { | |||
* @returns {string} the term or null if it does not exist | |||
*/ | |||
getTerm(declarationName, propertyName, identifier) { | |||
if(DecoratorManager.isNamespaceTargetEnabled() && !declarationName){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be only true if your global variable is true. For browser code, this will always be false.
@@ -133,6 +139,10 @@ class Vocabulary { | |||
* @returns {string} the term or null if it does not exist | |||
*/ | |||
getElementTerms(declarationName, propertyName) { | |||
if(DecoratorManager.isNamespaceTargetEnabled() && !declarationName){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for this.
@@ -308,6 +315,53 @@ class VocabularyManager { | |||
}; | |||
|
|||
modelManager.getModelFiles().forEach(model => { | |||
if(DecoratorManager.isNamespaceTargetEnabled()) { //options?.enableDcsNamespaceTarget |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not really a good way of checking is this option is enabled or not. We would ideally require the local insatnce of the DecoratorManager to see if the user has enabled the option.
Closes #858
Changes
Flags
Screenshots or Video
Related Issues
Author Checklist
--signoff
option of git commit.main
fromfork:branchname