Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Adding Snippets for Concerto language #38

Closed
iRohitSingh opened this issue Feb 22, 2020 · 14 comments
Closed

Adding Snippets for Concerto language #38

iRohitSingh opened this issue Feb 22, 2020 · 14 comments
Assignees
Labels
Type: Enhancement ✨ Improvement to process or efficiency

Comments

@iRohitSingh
Copy link
Contributor

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
Snippets for model.cto file.

@iRohitSingh
Copy link
Contributor Author

I am working on this.

@jeromesimeon
Copy link
Member

Could you explain what this is? I'm not familiar with "snippets".

@iRohitSingh
Copy link
Contributor Author

@jeromesimeon

 "Code Snippet" is a term used to describe a small portion of re-usable source code, machine code, or text. They allow a programmer to avoid typing repetitive code during the course of routine programming.

Some example like you want to create classes in .cto file then you have to write

asset Vehicle identified by vin {
  o String vin
}

what code snippets do is, you don't have to write the asset again and again. You just type assets and press tab a sample format of assets is provided to you. You can navigate through the tab and just write the name for that asset. You can find code snippets for any framework like react js, Angular, Bootstrap and many more.

I will attach a gif that explains what is code snippets for concerto language.

@iRohitSingh
Copy link
Contributor Author

@jeromesimeon Here is the Gif :)

ezgif com-video-to-gif(1)

@yshwanth
Copy link

provide me a standard .cto file so that I can do according the file?
So that I can do imports,exports and stuff related to concerto files.

@irmerk
Copy link
Member

irmerk commented Feb 25, 2020

Tagging @dselman and @mttrbrts on this.

@jeromesimeon
Copy link
Member

I quite like this idea. I would like a bit more details on what the requirements are:

Also I think I would like some UX review and get a sense of how it would affect the user experience, help or get in the way, etc.

Maybe it's worth putting draft code around this on a branch?

@jeromesimeon
Copy link
Member

provide me a standard .cto file so that I can do according the file?
So that I can do imports,exports and stuff related to concerto files.

Not sure what a standard would be, but there are many examples in : https://models.accordproject.org

Or do you mean something else?

@yshwanth
Copy link

@jeromesimeon Yeah I can do according to models. Thanks

@iRohitSingh
Copy link
Contributor Author

iRohitSingh commented Feb 27, 2020

I quite like this idea. I would like a bit more details on what the requirements are:

* what should the field names based on?

* can types be filled in on other class names present in the model?

* how does it relate / overlaps with #36

Also I think I would like some UX review and get a sense of how it would affect the user experience, help or get in the way, etc.

Maybe it's worth putting draft code around this on a branch?

I have implemented the field names using the concerto class and continuing this will be a good idea because we can provide snippets only if we know the class structure provided by concerto language.

I am unable to understand the 2nd question related to types.

It is totally new feature It has nothing related to #36. For adding IntelliSense we need to discuss.

sorry fo the previous comment I am using my brother laptop and forget to log in my account. You know chrome autosaving stuff :)

@iRohitSingh
Copy link
Contributor Author

@jeromesimeon Regarding user experience almost every language plugin provides snippets. It can be seen as when you are writing lots of the class name in model .cto file then you don't have to type transaction, concept, assets, abstract asset every time.

I have already created a pr for this #39. If you have any more question please! tell me :)

@iRohitSingh
Copy link
Contributor Author

@jeromesimeon Do You need any more information. Do you have any question regarding this I will be happy to discuss with you :)

@dselman
Copy link
Sponsor Collaborator

dselman commented Mar 3, 2020

Nice work - I think this would be a useful addition to Concerto, and for Ergo as well.

@dselman dselman closed this as completed Mar 3, 2020
@iRohitSingh
Copy link
Contributor Author

@dselman can you give me some pointer regarding #36 I researched a bit about adding IntelliSense to vscode for concerto language. I saw a different project like adding IntelliSense like c++, javascript and typescript. But they provide IntelliSense using LSP(I think). I am learning what LSP is and how it works. Can you explain something about it? please!!!!

@irmerk irmerk added the Type: Enhancement ✨ Improvement to process or efficiency label Mar 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Enhancement ✨ Improvement to process or efficiency
Projects
None yet
Development

No branches or pull requests

5 participants