GithubHelp home page GithubHelp logo

Comments (5)

madskristensen avatar madskristensen commented on June 10, 2024

All the project types are implemented differently and some don't support nested files using the standard APIs in VS. It's pretty frustrating for extension authors because each extension has to be tested on ALL project types. Unfortunately I don't have the bandwidth to do all that testing.

I don't have the PHP extension installed, so I can't debug the issue. If you can debug it then please let me know what the problem is or feel free to send a PR. Thanks.

from filenesting.

Miloslav avatar Miloslav commented on June 10, 2024

Hi Mads,

The issue is not just with PHP Tools, but also with Python and NodeJs.

There are two problems:

Issue 1. i.Kind == VSConstants.ItemTypeGuid.PhysicalFile_string

Kind is however in our project system (and PTVS, NTVS) guid.ToString("B") returning lower-case guid string. VSConstants.ItemTypeGuid.PhysicalFile_string is upper-case

Issue 2. Nesting existing item with parent.ProjectItems.AddFromFile(path); is not working on these project systems when path is already existing in the hierarchy. But as it behaves like this in C# Proj.sys. we should probably behave the same way. I'll try to do something with this one.

Thanks!

from filenesting.

madskristensen avatar madskristensen commented on June 10, 2024

I've changed the i.kind to use GUID comparisons instead. That works for NTVS projects. However, as you mentioned, AddFromFile() does nothing. I don't want to special case NTVS by deleting the file and then recreating it with the right nesting. That would lose file history etc. Is there another way to do it in NTVS projects?

from filenesting.

zooba avatar zooba commented on June 10, 2024

We need to do some work on our project system to be able to support this. As bad as things are for extension authors, it's also pretty horrible to be a tiny team trying to replicate everything that the huge teams have built up over years of development.

Is this feature using the same dependent files support that WinForms and WPF use? We have most of the support there for that, though apparently not the DTE function, but it can be done through the project file. I'm not sure we support nesting more than one file in this way though. Basically, it's quite a low priority for us, as both Python and Node.js rely on the view of the project matching the file system, so nesting files like this is not a common request.

PHP may be different and we'll always consider contributions (as you know, @Miloslav :) ), but we probably won't be able to get to it ourselves any time soon.

from filenesting.

Miloslav avatar Miloslav commented on June 10, 2024

@madskristensen

Unfortunately I'm currently not aware of other method. However I'll take a look

@zooba

Yes, it's the same. SharedProject system does support nesting, even more than one level. Just this method of adding a node which is already in the hierarchy through DTE doesn't work with us (adding a new node works correctly). Everything comes down to the insane function ProjectNode.AddItemWithSpecificInternal . I'll take a look at that to see if it can be somehow easily altered to support that, but as you know that method is scary :-)

from filenesting.

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.