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

Continued Language API work #2979

Closed
wants to merge 6 commits into from

Conversation

DennisKehrig
Copy link
Contributor

Focuses on #2968 - minus its comments, so far

…, defineLanguage now returns a promise that resolves once the mode has been loaded and set, instead of returning the language directly. To make things more consistent both within LanguageManager and with the rest of the code base, chaining support has been removed.
…clusively through getters and setters

Adjust the unit tests accordingly
Added documentation to Language's properties
Refined the comment about our special HTML MIME mode
Renamed fileExtensionsToLanguageMap to fileExtensionToLanguageMap
Call result.reject in a few places instead of throwing exceptions
@@ -207,7 +208,7 @@ define(function (require, exports, module) {

// Mode for range - mix of modes
myEditor.setSelection({line: 2, ch: 4}, {line: 3, ch: 7});
expectModeAndLang(myEditor, null);
expectModeAndLang(myEditor, langNames.unknown);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intention may have been to specify that the language should also be null if the mode is null, but so far we return the fallback language to always return a language.

@DennisKehrig
Copy link
Contributor Author

@jasonsanjose I updated the unit tests, too, in case you want to double check.

@ghost ghost assigned jasonsanjose Feb 27, 2013
@jasonsanjose
Copy link
Member

Oops. Looks like that overlaps with #2978. I'll reconcile your branch after that lands.

@peterflynn
Copy link
Member

@jasonsanjose Should we close this now that #2980 is up?

@jasonsanjose
Copy link
Member

Closing, see #2980

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

Successfully merging this pull request may close these issues.

3 participants