Giter Site home page Giter Site logo

Comments (4)

incoboggart avatar incoboggart commented on June 27, 2024

Update: Inspectors begin to update values in my ViewModel if i open any document (no matter which ViewModel goes into that document and which document type i actualy open, any document makes all inspectors work properly).

But if i close all the documents - inspectors stop to work again.

To make it clear - i have a "Project view" tool and i want to show properties of selected "project entity" in inspector tool, but it seems, that Inspector tool is fully document dependent.

Any ideas what could it be or what am i missing?

My best thought is dedicated to History system and Undo/Redo stacks.

from gemini.

incoboggart avatar incoboggart commented on June 27, 2024

Ok. So. In case anyone else is reading docs as bad as me.

I ended up modifying source code of ShellViewModel, EditorBase, UndoRedoToolBarItems.

Because idea of Inspector tool is that ONLY IDocument have UndoRedoManager, but not ITools. It was inapropriate for me, so my exit was to make ShellViewModel have a Default UndoRedoManager and having IUndoRedoManaged interface, checking if "CurrentActiveItem" implements that and use provided IUndoRedoManager.

Works for me.

from gemini.

tgjones avatar tgjones commented on June 27, 2024

Hi @incoboggart - I'm glad you're finding Gemini useful :)

Hmm, I did decide to only support undo/redo at the document level, because I think (I'm open to correction) this is how Visual Studio does it. Tool windows are intended to either (a) views onto a document, in which case undo can be handled by the document, or (b) things like Server Explorer where undo is meaningless.

Can I ask why that system didn't work for you? It would be useful to know, in case I should think about adding this in a future version.

from gemini.

incoboggart avatar incoboggart commented on June 27, 2024

Well, the issue comes from "project entity inspection" design approach difference.

In Visual Studio all project entities are documents.
For example, having some asset or code file inside VS project means, that you have actual file on your disc, which contains exact data you work with in entity document or reference this entity data from some other document.

My aproach is slightly different - its more like Unity3d editor style, not VS.
Any project entity can have some particular properties, which are not exposed into document, because document exposes some entity content, which requires document view. On the other hand, some entities (for ex. Folders) dont have any document view at all.
So whenever you select entity in project view - you can edit some simple parameters (for ex. Name and Comments) for this entity inside Inspector view. And this changes should be managed by History tool.

I could make this VS way and create a document for each entity, but some of that documents would be almoust empty. Moreover, having inspector view is quite comfortable way to handle some quick property changes.
So, i decided to make it this way.

from gemini.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.