Community
Participate
Working Groups
There's more and more extensions for php projects. To name a few, there is: PHPUnit, PHP frameworks (e.g. Zend Framework, Cake PHP), and possibly all general-web related frameworks (e.g. javascript, tag libraries). Currently there's no common way to add/remove such extensions to PDT project, so user has to spend considerable time figuring out the right place in Project Properties dialog. It would be great to standardize around one mature solution. The option that I like the most is faceted project framework, because: 1. it's documented (http://www.eclipse.org/articles/Article-BuildingProjectFacets/tutorial.html) 2. supports such nuances as multiple versions of the same library 3. it's ready to use PDT 2.3 would be a good time to implement this.
Let me know if I can help answer any questions. :)
I've been looking into this now for the PDT extensions project too. I think it makes absolutely sense to add support in PDT. Here's a couple of use cases: 1. Create a regular PHP project, but add Twig + Composer facets to the project. The facets would add the corresponding natures/builders and create an initial composer.json file. 2. Create a PHP project, and add a Symfony facet-preset to the project. The facet will create the initial file structure and add the corresponding natures/builders to the project. 3. Create a PHP project and add the php-maven facet to it. The facet will then install an initial pom.xml and add builders/natures At the moment, you need to extend the PHP project wizard if you want to do anything of the above. What needs to be thought of is how we can remove any Java-related facets from the facet dialog, and only show the PHP stuff. I've already a quick-and-dirty patch here which adds the facet feature to the PHP project wizard. It's far from production ready, but if you want i can attach it so you can have a look what would need to be done.
> Can we have php facets separate from webtools facets? We should try it. Maybe via requesting a patch to webtools. Some kind to mark a project that only php-able facets are respected. > key thing: what example facets can you think of? Frameworks, Special non-framework libraries (f.e. Smarty), > does it make sense to have symfony or zendframework facet? Yes > What happens when user removes facet, eg symfony one? If it is possible we should devide fixed facets (created during project creation or programmatically, f.e. "convert to symfony project") from dynamical facets (added/removed by user). If one removes the symfony facets the project templates should remain unchanged because it would be more difficult to remove files. The user should fix it by himself. And maybe the users intention is to remove the facet but keep the files. > Or maybe it'd be better to focus on some project templates framework...? I don't think so. The project template is only one aspect of faceted projects. F.e. smarty will allow you to create new smarty templates as files. So it registers a builder/validator and a "new smarty template" as context menu
in PDT we can have following: - newly created PDT projects would add faceted project nature, so that they could be configured later. - PDT new project wizard would show a button/or separate page to configure facets, if there are any available (In reply to comment #2) > What needs to be thought of is how we can remove any Java-related facets from > the facet dialog, and only show the PHP stuff. Robert, can you open a bug with this question against component: WebTools/WTP Common Tools/Faceted Project Framework?
Don't forget to ask if wtp is able to programmatically install faceted plugins or would add this feature one day. Or should this topic be asked in another bug?
Hi guys. No need to open additional bugs. I can answer your questions on this thread. > What needs to be thought of is how we can remove any Java-related facets from > the facet dialog, and only show the PHP stuff. The faceted project UI filters out facets that are incompatible with project's fixed facets. So all you need is for the php facet to specify that it conflicts with java facet. > Don't forget to ask if wtp is able to programmatically install faceted plugins > or would add this feature one day. Or should this topic be asked in another > bug? The faceted project framework does not get involved in installing Eclipse plugins, but I can certainly see the appeal of having another way for users to discover plugins. Perhaps someone on this thread would be interested in developing this functionality and contributing it to the framework?
(In reply to comment #6) > The faceted project UI filters out facets that are incompatible with project's > fixed facets. So all you need is for the php facet to specify that it conflicts > with java facet. That's it. Thanks to clearify it :-) > The faceted project framework does not get involved in installing Eclipse > plugins, but I can certainly see the appeal of having another way for users to > discover plugins. Perhaps someone on this thread would be interested in > developing this functionality and contributing it to the framework? I will give it a try.
> The faceted project UI filters out facets that are incompatible with project's > fixed facets. So all you need is for the php facet to specify that it conflicts > with java facet. great, I wonder what if project is not created yet (e.g. in new project wizard), but I guess it's possible as well. I'm looking forward to seeing your patch Robert & Martin. I'd be happy to review it and commit. Let me know if you have any questions.
(In reply to comment #7) > (In reply to comment #6) > > The faceted project framework does not get involved in installing Eclipse > > plugins, but I can certainly see the appeal of having another way for users to > > discover plugins. Perhaps someone on this thread would be interested in > > developing this functionality and contributing it to the framework? > > I will give it a try. Not sure if this is a misunderstanding, but i think installing eclipse plugins is already very well implemented through the p2 provisioning mechanism and even easier through the marketplace client. I think the faceted project framework itself would make it easier for PDT extenders to hook into the project creation process, so end-users can select a couple of facets during project creation (framework addition, templating language suppport, ORM feature, etc).
> Not sure if this is a misunderstanding, but i think installing eclipse plugins > is already very well implemented through the p2 provisioning mechanism and even > easier through the marketplace client. > > I think the faceted project framework itself would make it easier for PDT > extenders to hook into the project creation process, so end-users can select a > couple of facets during project creation (framework addition, templating > language suppport, ORM feature, etc). I am thinking of the following situation: Have an existing PDT/Webtools eclipse. Checkout some project from version control where facet A and facet B is activated. Your local installation knows of facet A but it does not know anything about facet B. The scenario is similar to: Get some dialog telling that this checkout will not be ok because of missing plugins. M2E already has this kind of dialog. If you checkout a project with unknown build plugins in the pom.xml it complains and notifies that you should give a try discovering the eclipse plugins. Of course you should always be able to install plugins via marketplace or any other ways. The benefit: pdt itself can stay small for both, those that want to create projects (they will install plugins manually by drag&drop etc.) and those that want to work on existing projects (they will be forced to discover/install at checkout).
ok, i see the use case. however, i think we should try to keep things simple in the beginning as we have very limited man-power and a lot of tasks on our todo list ;)
Robert/Martin, are you still looking at this one? Is there anything I can help you with? We can start with something simple and then grow it as needed
(In reply to comment #12) > Robert/Martin, > are you still looking at this one? Is there anything I can help you with? We > can start with something simple and then grow it as needed yeah, it's still on my radar - just a little busy atm. @Martin: are you planning to work on this as well? if so, we should probably coordinate. (having PDT on git would definitely help in such a scenario ;) )
I am working on a webtools patch for finding and activating facets programmatically. Focused on the use case what happens during checkout or re-importing projects within a new eclipse installation. You could both work on the needed pdt extensions.
(In reply to comment #13) > (having PDT on git would definitely help in such a scenario ;) ) see bug 385810 soon you'll have no more excuses :-) (In reply to comment #14) > I am working on a webtools patch for finding and activating facets > programmatically. [...] Great, now you should really open bug with Faceted project and explain there what you're up to. Somebody might be willing to help or discuss some technical details before you'll have patch ready. Please post that bug number here as well.
What we really need to add support for facets?
In theory is is (was) already adopted. But isn't user and adopter friendly for now. Probably best could be available framework (facet) list on second wizard page. But not old way (removed in 4.0) with facet sets, but direct, facet list. In theory they should be able to inject own wizard pages when needed.