Skip to content
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

[CLOSED] adds getLanguages() for accessing the language map #6142

Open
core-ai-bot opened this issue Aug 30, 2021 · 8 comments
Open

[CLOSED] adds getLanguages() for accessing the language map #6142

core-ai-bot opened this issue Aug 30, 2021 · 8 comments

Comments

@core-ai-bot
Copy link
Member

Issue by BigBlueHat
Wednesday Feb 05, 2014 at 19:21 GMT
Originally opened as adobe/brackets#6768


Mostly geared toward extensions that need to
know the current state of the language map
before they provide further features.

@redmunds I blame you for this. 😉


BigBlueHat included the following code: https://github.com/adobe/brackets/pull/6768/commits

@core-ai-bot
Copy link
Member Author

Comment by BigBlueHat
Wednesday Feb 05, 2014 at 19:25 GMT


My hope is to use this in my LangMan extension.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Wednesday Feb 05, 2014 at 20:29 GMT


@BigBlueHat Thanks for contributing to Brackets. First, you need to agree to the Brackets CLA.

Next, take a look at the Switch language / syntax mode of current document pull request to make sure you're not duplicating any effort with your extension. I think that other change is more about changing language mode for single documents where you're thinking more about changing language mode for file extensions.

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Friday Feb 07, 2014 at 19:53 GMT


Hmm, exposing the full state of LanguageManager as a mutable object might be asking for trouble. @BigBlueHat maybe it'd be good to enumerate the use cases your extension is trying to handle, and which of them the existing APIs aren't able to support?

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Friday Feb 07, 2014 at 19:54 GMT


If your extension just needs the list of available languages -- and can do everything else via the existing Language APIs -- then it might be enough to just offer an API that returns Object.keys(_languages)...

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Tuesday Mar 25, 2014 at 00:40 GMT


Haven't heard back. Closing.

@core-ai-bot
Copy link
Member Author

Comment by BigBlueHat
Tuesday Mar 25, 2014 at 12:42 GMT


Oof.. For some reason I missed all the notifications about this until last night. 😦 Sorry about that.

@peterflynn the #6409 pull request includes code that is equivalent to my patch:
https://github.com/adobe/brackets/blob/6c34d70b45b4172095301c8227335c11b511998b/src/language/LanguageManager.js#L241-L248

So, no worries on including this commit in itself.

The LangMan extension is meant to eventually offer a UI that lets one associate "random" file extensions with supported languages. I need to learn more about Brackets before I flesh it out. The .getLanguages need was just the first impasse I hit.

I'll watch #6409 and try to get LangMan done following that.

Thanks@redmunds for cleaning house. 😉

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Tuesday Mar 25, 2014 at 16:47 GMT


Re-opening.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Tuesday Mar 25, 2014 at 22:03 GMT


Re-Closing. This will get merged in #6409.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant