This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 98884 - Framework needs to support removal
Summary: Framework needs to support removal
Status: NEW
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker with 2 votes (vote)
Assignee: issues@javaee
URL:
Keywords:
: 72498 (view as bug list)
Depends on: 98882
Blocks: 98879
  Show dependency tree
 
Reported: 2007-03-24 17:30 UTC by Nam Nguyen
Modified: 2008-10-28 23:38 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nam Nguyen 2007-03-24 17:30:30 UTC
The use case is that user has a somewhat developed project with mixed use of
multiple frameworks one of them REST.  Later it is decided to rearchitect REST
beans to a separate project.

Manually removing libraries, servlet adaptor, deployment descriptor changes and
project meta files is too cumbersome and error prone.

To support framework removal, we need change in web/webapi, something like:
    WebFrameworkProvider {
       void unextend(WebModule wm);
    }

Also, Web project customizer Framework panel also need a 'Remove' button.
Comment 1 Petr Pisl 2007-03-26 09:36:31 UTC
I think that removing frameworks we shouldn't support through in the IDE. I
don't see your use case as relevant. Why user should decide to remove a
framework? If we allow this, then after the removing the bulk of projects will
be uncompilable and IDE shouldn't do such operation.
Comment 2 Tomasz Slota 2007-03-26 10:25:46 UTC
What if somebody chooses some framework by accident? Or after a while chooses to use alternative 
support for say the Spring framework. If the users can add support for more frameworks at any time they 
will expect they can also remove it.

I know there are technical difficulties with removing certain frameworks, so maybe this functionality 
should be optional. In any case the users should be warned when adding support for non-removable 
frameworks so that they think twice if they really need it.
Comment 3 Nam Nguyen 2007-03-26 16:56:18 UTC
Petr, 
I think that my use case for removing framework during rework on architect, is
valid.  As development grow larger, there could be need to split classes by one
framework to a separate project and leave the current project free from that
framework artifacts.
Comment 4 Petr Pisl 2007-03-26 17:35:51 UTC
I'm not still convinced that we need this functionality. If we will do that I
can imagine many P2 issues like "I remove the framework and now I'm not able to
build the project".  I haven't heard such request from a user, always from
testers and some developers, who writes a framework support.

Probably you are right, so it can be done in this way: I will add a method  void
remove(WebModule)  (unextend is nice, but I didn't find such word in a
dictionary :)), with default implementation, which will just display a message
like "This framework doesn't support Removing operation.".
Comment 5 Nam Nguyen 2007-03-26 17:43:59 UTC
remove(WebModule wm) is fine.  For framework that does not support remove, I
think for better UI flow, we needs another method canRemove(WebModule wm)
instead of dialog message.
Comment 6 Petr Pisl 2007-03-26 17:50:43 UTC
I agree. Your suggestion is right. 
Comment 7 Karthikeyan Rajeswaran 2007-10-07 17:21:07 UTC
*** Issue 72498 has been marked as a duplicate of this issue. ***
Comment 9 rajivderas 2008-08-12 12:30:48 UTC
In Visual Web Project>Project Properties their is a "Add" button available to add frameworks under the "Frameworks"
category. Suppose if i accidentally added a framework and pressed "ok" button and i come around next time to the project
properties to remove that framework their is NO "Remove" button available to remove that framework. Don't you think
their should be one to "Remove" as well as adding frameworks.
Comment 10 _ potingwu 2008-08-12 19:39:00 UTC
I believe the fix/enhancement should start from the top web project API, and then passing down to each framework for
updating. I.e., currently, there is nothing visual web can do/implement to start the 'remove' functionality/UI.
Comment 11 jemiller 2008-10-28 23:38:14 UTC
I too would like to be able to remove a framework from a project. So what if it doesn't build afterwards. If you are 
using libraries that are no longer being referenced by the project, that is what you would expect to happen. The 
problem that I'm running into is that I was running NetBeans 5.5 and was using JSF 1.1. I upgraded to 6.1. Now it 
says "The selected Java EE version does not support the selected Java Server Faces version." I want to revert back to 
JSF 1.1 because my app needs to run in Java 5 and Tomcat 5.5 which installed separately. Now, it looks like I'll have 
to recreate the project unless I can figure out what config files I need to modify.