Giter Site home page Giter Site logo

Comments (17)

heku avatar heku commented on July 23, 2024 1

Thanks, I will take a look.

from kool.vsdiff.

heku avatar heku commented on July 23, 2024 1

@ycherkes np, thx for the feedback too.

from kool.vsdiff.

heku avatar heku commented on July 23, 2024 1

@ycherkes Thanks.

from kool.vsdiff.

heku avatar heku commented on July 23, 2024

I'm not sure if it's possible to detect what tabs are last opened twos, I need investigate. If this is possible, where to display the 'Compare ...' context menu?

from kool.vsdiff.

ycherkes avatar ycherkes commented on July 23, 2024

This menu item can be added not to the context menu but rather to the main "File" menu.

from kool.vsdiff.

ycherkes avatar ycherkes commented on July 23, 2024

The code from the TidyTabs extension can help to figure out the tab opening order.

from kool.vsdiff.

ycherkes avatar ycherkes commented on July 23, 2024

Hi @heku,
I think it can be even better to add the context menu "Compare to right tab" and "Compare to left tab". Example can be found here https://github.com/billpratt/CloseTabsToRight.
What do you think?

from kool.vsdiff.

heku avatar heku commented on July 23, 2024

This way, user always need move the tab to compare to eithor left or right of current tab firstly, I think this is not more friendly than current approcah - copy the content then 'Compare with Clipboard', let's think again to find if there's any better way.

from kool.vsdiff.

ycherkes avatar ycherkes commented on July 23, 2024

Let me describe the root of my problem: I have an extension - Object Dumper. It creates the dumps of debugged objects and opens them as separate documents. Those documents are not part of the solution. But I would like to have the ability to compare two of the generated documents. The 'Compare with Clipboard' approach won't work in this case.

from kool.vsdiff.

ycherkes avatar ycherkes commented on July 23, 2024

I know that the "Miscellaneous Files" can be shown in Solution Explorer, but this option is disabled by default, and not so many people know about that:

image

image

from kool.vsdiff.

ycherkes avatar ycherkes commented on July 23, 2024

Also, there is an issue because both of them are temporary unsaved files.

ComparisonIssue

Please pay attention to file names in a comparison window:

274

from kool.vsdiff.

heku avatar heku commented on July 23, 2024

I see the file name issue, I think I need to look up some vsix docs to fix it.

from kool.vsdiff.

ycherkes avatar ycherkes commented on July 23, 2024

Yup and not file name issue only - it takes the document's text for an active item from the document, but for the second tries to get it from the file, but the file is empty. That's why I'm asking about the comparison of the two tabs.

from kool.vsdiff.

heku avatar heku commented on July 23, 2024

Hi @ycherkes , after a little research, I think we need update our code together to resolve this problem.

Currently this extension supports both VS's builtin file compare service and external tools, these are all based on physical files, i.e. the core API is something like diff(file1, file2).

So, if the physical file contains nothing but VS hold its unsaved changes, then it won't work as your expect, but it looks reasonable to me, for external tools, it's reasonable that they don't know these unsaved content.

And from my test, although VS's builtin diff service take two files path as parameters, seems VS treats them differently, VS loads left file content from physical file, but loads right file with cache (VS unsaved content), that's why left side is empty in your last screenshot.

I also checked your extension's code, looks like you can change this line
https://github.com/ycherkes/ObjectDumper/blob/main/src/ObjectDumper/DumpAsCommandHelper.cs#L140
to

newDocument.Save();

Then VS will save the content to pyhsical temp file too, this should fix the issue you have.

Regarding the file name issue, I'll enhance the code, pass the display name to diff tool.

from kool.vsdiff.

ycherkes avatar ycherkes commented on July 23, 2024

Hey @heku,
Thanks a lot for your research.
I've already fixed the document saving issue - bbf47f505b1af57b89b61f985297cca518fcc34b
Thanks a lot, it's amazing :)

from kool.vsdiff.

heku avatar heku commented on July 23, 2024

Hi @ycherkes, the file name issue fixed, could you please test the latest dev branch build https://dev.azure.com/heku/d55bc262-1377-4ae3-9410-4c98cfa53de8/_apis/build/builds/149/artifacts?artifactName=drop&api-version=7.0&%24format=zip
Thanks.

from kool.vsdiff.

ycherkes avatar ycherkes commented on July 23, 2024

Hi @heku, I've tested a VsDiff.2022.vsix, all works fine!
Thank you!

from kool.vsdiff.

Related Issues (8)

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.