gemini icon indicating copy to clipboard operation
gemini copied to clipboard

Add RecentFiles module

Open diluculo opened this issue 8 years ago • 5 comments

#215 is now separated into 4 independent PRs:

  1. Recent files module added
  2. Save all command added
  3. PersistedDocument and CodeEditor modified
  4. Korean language added

This is the first part.

diluculo avatar Aug 25 '16 10:08 diluculo

@EchterAgo I don't find an easy way to split up a big branch into small independent ones, so I started to reinvent wheels, Sorry and thanks. All are almost identical to your cleanup branch except two things:

(1) in OpenRecentFileCommandHandler:

    public async Task Run(Command command)
    {
       ... 
        _shell.OpenDocument(await OpenFileCommandHandler.GetEditor(newPath));
       ... 
    }

(2) in PersistedDocument:

     public override async void CanClose(System.Action<bool> callback)
     {
       ... 
     }

For your reference, a merge of 4 PRs is https://github.com/diluculo/gemini/tree/215_Merged.

diluculo avatar Aug 25 '16 10:08 diluculo

Yea, you can't always split up everything into independent units, I have the same problem. In these cases I either waited until the first part was merged and then submitted another pull request, or I included the first commits into the second pull request and rebased upon merge. BTW, I'm in Seoul right now doing a project involving Gemini, so your Korean language support is very appreciated :+1:

EchterAgo avatar Aug 29 '16 02:08 EchterAgo

@diluculo, in VS there is no limit for recent projects. Limit is only for MainMenu items (only 10): image But on Home view we have all of them: image

nesterenko-kv avatar Oct 18 '16 12:10 nesterenko-kv

@nestquik Thanks. XML serialization may be better than StringCollection.

I made a cleanup of your PR, rebased on master: https://github.com/diluculo/gemini/tree/215_RecentFiles_cleanup

By the way, your PR shows a couple of NotifyOfPropertyChange(() => Items) lines on RecentFileViewModel.cs. Are the lines necessary?

diluculo avatar Oct 19 '16 07:10 diluculo

Thanks. I'm newbie on git, so I can make mistakes.

About notifypropertychanged - it should notify on change, doesn't it?

I'm trying to build home view module like in VS at this moment.

nesterenko-kv avatar Oct 19 '16 07:10 nesterenko-kv