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

Integrated editor with ContentProviders #3529

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

umop
Copy link
Contributor

@umop umop commented Oct 13, 2014

This is a big PR, but was as small as I could manage. This integrates ContentProviders into the editor, NavigationManager, tabs, events, file selection (when dealing with files), file search, closing, and parts of rename.

Note: Commit 21d194f should have read: Handled tabs, events, comparator, NavigationManager, and openFile instead of TEMP

Fixes #3433
Review @devoncarew

@@ -298,6 +303,12 @@ class TextEditor extends Editor {
* @import url("packages/bootjack/css/bootstrap.min.css");
*/
Future<svc.Declaration> _simpleNavigateToDeclaration([Duration timeLimit]) {
if (!(contentProvider is FileContentProvider)) {
throw "Can only navigate from [File]s for now";
Copy link
Contributor

Choose a reason for hiding this comment

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

You could also fail in a non-fatal way:

return new Future.value(svc.Declaration.EMPTY_DECLARATION);

@devoncarew
Copy link
Contributor

Awesome, a very, very thorough CL. Two things, in addition to the comments:

  • I think we can back out the changes to the workspace search - that should be searching files
  • this should be pretty well hand-tested, as it has the possibility of affecting many areas. Please hand-test for regressions in functionality

void persistTab(File file) {
EditorTab tab = _tabOfFile[file];
EditorTab _tabByUuid(String uuid) {
return _tabOfUuid.containsKey(uuid) ? _tabOfUuid[uuid] : null;
Copy link
Contributor

Choose a reason for hiding this comment

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

return _tabOfUuid[uuid]; would work as well.

@devoncarew
Copy link
Contributor

let's circle back to this tuesday when you're back in the office

@ussuri
Copy link
Contributor

ussuri commented Jan 7, 2016

@umop: where are we with this? Is this complete and usable as is, or is it a part of a prospected CL chain? If the latter, would you have 20% time to finish the whole thing off?

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.

Migrate AceEditor to take ContentProvider instead of File
3 participants