adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.26k stars 7.63k forks source link

Language changes due to renames are not sufficiently recognized #2911

Open DennisKehrig opened 11 years ago

DennisKehrig commented 11 years ago

For instance, when changing a file's extension from "txt" to "js", JSLint doesn't open. Only the editor mode is updated, but this is also only true for the current full editor.

Note that #2844 will introduce a "languageChanged" event that editors listen to in order to update their mode. JSLint and other tools could listen to the same event.

DennisKehrig commented 11 years ago

This is per @peterflynn's suggestion

njx commented 11 years ago

Marking move to backlog, to consider along with other rename issues (since rename isn't an "official" feature yet). Note that we will probably also want some other, more general event when a document is renamed, but it does make sense to specifically have a languageChanged event as well, since we've talked about allowing users to manually set the language of a document (e.g. if it doesn't have a file extension that we know about).

pthiess commented 11 years ago

Trello lists this story.

DennisKehrig commented 11 years ago

@njx FileUtils.updateFileEntryPath now also triggers a rename event on NativeFileSystem.Entry

DennisKehrig commented 11 years ago

Said event was removed in #2961

njx commented 11 years ago

Looks like this should be straightforward to fix now that we have the languageChanged event. We should also scrub everything in the app that gets the mode and make sure all those places properly update.

Marking medium priority to me.

marcelgerber commented 11 years ago

Seems this has been forgotten, but it's still a bug.

pthiess commented 11 years ago

@peterflynn Hi Peter, please take a look at this and the pull request referenced above. Thanks a ton.

peterflynn commented 10 years ago

I did the scrub NJ had suggested. Looks like there are at least a few items here:

This is ignoring API usages by features that are highly transient (code hints, quick open) or that show a persistent results view but the results are static (HTML->CSS inline editor results list, JS inline editor results, CSS inline quick docs).

njx commented 10 years ago

To @peterflynn. I didn't add a feature category - none of the existing ones seemed appropriate and I wasn't sure if we want one specifically for the language management stuff, since there probably aren't a huge number of issues there.

busykai commented 10 years ago

@njx, @peterflynn I think this issue should be fixed as we merged #6409. All the language-related subsystem now should be reacting to the language changes (due to rename or forced).

peterflynn commented 10 years ago

@busykai It definitely fixes the most important issues here... looking at the checklist above, there are still a bunch of much smaller edge cases that I don't think we addressed yet. They also seem not worth spending time on in the near term, unless we get feedback from users to the contrary :-) So I'd be in favor of keeping this open but at a lower priority.

(I'll change priority from medium->low now).