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.
Summary: | Extend ProjectState with notifyDeleted, add default Delete action | ||
---|---|---|---|
Product: | projects | Reporter: | Jan Lahoda <jlahoda> |
Component: | Generic Infrastructure | Assignee: | apireviews <apireviews> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | jglick |
Priority: | P3 | Keywords: | API, API_REVIEW_FAST |
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://projects.netbeans.org/buildsys/project-delete-ui-spec.html | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | 60999, 61137 | ||
Bug Blocks: | 42421, 42422, 42738 | ||
Attachments: |
Proposed patch.
Improved patch. Patch for ant module. Patch for ajava module. Patch for projects module. |
Description
Jan Lahoda
2005-05-13 12:20:12 UTC
Created attachment 22121 [details]
Proposed patch.
Probably duplicate of issue #42421. 1. Use of an assertion in the impl of notifyDelete is probably wrong. A project impl might accidentally call it twice. Should result in e.g. IllegalStateException. 2. We may need an event set on ProjectManager permitting clients (e.g. OpenProjectList) to listen on project deletion events. 3. Should there be a File | Delete Project menu item, from CommonProjectActions.deleteProjectAction()? 4. CPA.dPA needs Javadoc. 5. I guess actual uses are deferred to another issue, e.g. issue #42422. However it might be difficult to evaluate the effectiveness of the API until it is actually used in such a situation. We may need a utility method to implement the delete action e.g. in SourcesHelper. The UI could also be tricky - may need to prompt user to delete a. The nbproject/ directory only. b. The whole project directory. c. Some or all external source roots. and interaction with VCS may be sticky. 6. Consider a fix for issue #42738 as one use case, e.g. having ABPFS automatically call notifyDeleted for a project whose type provider has been removed from global lookup. (This would have the effect of reloading projects when the project type provider module is reloaded.) Attaching an improved patch: 1. Fixed. 2. I have added a new method "isValid" on the ProjectManager. 3. Yes, I originally wanted to make the change as small as possible. The new patch also contains changes in menus. There is also a new method AntProjectHelper.notifyDeleted() (only calls state.notifyDeleted()). 4. Fixed. 5. Yes, the uses are deffered to the impls. A prototype impl. is attached to issue #42422. 6. I have a fix for issue #42738 (attached to that issue). I am not sure whether the fix is very correct. Created attachment 22230 [details]
Improved patch.
I am attaching pacthes for projects, ant and java modules that: 1. create API/SPI for project delete 2. provide default implementation of project delete for ant based projects 3. provide implementation of project delete for j2seproject and ant freeform project. I would like to ask for an API review of these changes. Created attachment 22841 [details]
Patch for ant module.
Created attachment 22842 [details]
Patch for ajava module.
Created attachment 22843 [details]
Patch for projects module.
If there are not objections, I will commit the change tomorrow. typo in "vaious". I do not like adding method to interface ProjectState. What was that important to make the interface interface? Cannot you turn that in more appropriate class? Thanks for spotting the typo. I do not know why the ProjectState is an interface, but the original javadoc states: * Currently the only available event is modification of the project metadata. * However in the future other events may be added, such as moving or deleting * the project, which the project manager would need to be informed of. * <p> * This interface may only be implemented by the project manager. A * {@link ProjectFactory} will receive an instance in * {@link ProjectFactory#loadProject}. * </p> So I think it should be OK to add methods to this interface. I am not sure whether it is possible to convert this interface to class without breaking binary compatibility. Integrated: Checking in ide/golden/deps.txt; /cvs/ide/golden/deps.txt,v <-- deps.txt new revision: 1.89; previous revision: 1.88 done Checking in nbbuild/build.xml; /cvs/nbbuild/build.xml,v <-- build.xml new revision: 1.691; previous revision: 1.690 done Checking in java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEActionProvider.java; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEActionProvider.java,v <-- J2SEActionProvider.java new revision: 1.44; previous revision: 1.43 done Checking in java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java,v <-- J2SEProject.java new revision: 1.53; previous revision: 1.52 done RCS file: /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectOperations.java,v done Checking in java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectOperations.java; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectOperations.java,v <-- J2SEProjectOperations.java initial revision: 1.1 done Checking in java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/J2SEPhysicalViewProvider.java; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/J2SEPhysicalViewProvider.java,v <-- J2SEPhysicalViewProvider.java new revision: 1.55; previous revision: 1.54 done Checking in ant/freeform/src/org/netbeans/modules/ant/freeform/Actions.java; /cvs/ant/freeform/src/org/netbeans/modules/ant/freeform/Actions.java,v <-- Actions.java new revision: 1.15; previous revision: 1.14 done Checking in ant/freeform/src/org/netbeans/modules/ant/freeform/FreeformProject.java; /cvs/ant/freeform/src/org/netbeans/modules/ant/freeform/FreeformProject.java,v <-- FreeformProject.java new revision: 1.35; previous revision: 1.34 done RCS file: /cvs/ant/freeform/src/org/netbeans/modules/ant/freeform/FreeformProjectOperations.java,v done Checking in ant/freeform/src/org/netbeans/modules/ant/freeform/FreeformProjectOperations.java; /cvs/ant/freeform/src/org/netbeans/modules/ant/freeform/FreeformProjectOperations.java,v <-- FreeformProjectOperations.java initial revision: 1.1 done Checking in ant/project/apichanges.xml; /cvs/ant/project/apichanges.xml,v <-- apichanges.xml new revision: 1.7; previous revision: 1.6 done Checking in ant/project/manifest.mf; /cvs/ant/project/manifest.mf,v <-- manifest.mf new revision: 1.11; previous revision: 1.10 done Checking in ant/project/nbproject/project.properties; /cvs/ant/project/nbproject/project.properties,v <-- project.properties new revision: 1.15; previous revision: 1.14 done Checking in ant/project/nbproject/project.xml; /cvs/ant/project/nbproject/project.xml,v <-- project.xml new revision: 1.14; previous revision: 1.13 done Checking in ant/project/src/org/netbeans/modules/project/ant/AntBasedProjectFactorySingleton.java; /cvs/ant/project/src/org/netbeans/modules/project/ant/AntBasedProjectFactorySingleton.java,v <-- AntBasedProjectFactorySingleton.java new revision: 1.7; previous revision: 1.6 done Checking in ant/project/src/org/netbeans/modules/project/ant/Bundle.properties; /cvs/ant/project/src/org/netbeans/modules/project/ant/Bundle.properties,v <-- Bundle.properties new revision: 1.5; previous revision: 1.4 done RCS file: /cvs/ant/project/src/org/netbeans/modules/project/ant/DefaultAntProjectDeletePanel.form,v done Checking in ant/project/src/org/netbeans/modules/project/ant/DefaultAntProjectDeletePanel.form; /cvs/ant/project/src/org/netbeans/modules/project/ant/DefaultAntProjectDeletePanel.form,v <-- DefaultAntProjectDeletePanel.form initial revision: 1.1 done RCS file: /cvs/ant/project/src/org/netbeans/modules/project/ant/DefaultAntProjectDeletePanel.java,v done Checking in ant/project/src/org/netbeans/modules/project/ant/DefaultAntProjectDeletePanel.java; /cvs/ant/project/src/org/netbeans/modules/project/ant/DefaultAntProjectDeletePanel.java,v <-- DefaultAntProjectDeletePanel.java initial revision: 1.1 done RCS file: /cvs/ant/project/src/org/netbeans/modules/project/ant/DefaultAntProjectOperations.java,v done Checking in ant/project/src/org/netbeans/modules/project/ant/DefaultAntProjectOperations.java; /cvs/ant/project/src/org/netbeans/modules/project/ant/DefaultAntProjectOperations.java,v <-- DefaultAntProjectOperations.java initial revision: 1.1 done Checking in ant/project/src/org/netbeans/spi/project/support/ant/AntProjectHelper.java; /cvs/ant/project/src/org/netbeans/spi/project/support/ant/AntProjectHelper.java,v <-- AntProjectHelper.java new revision: 1.31; previous revision: 1.30 done RCS file: /cvs/ant/project/test/unit/src/org/netbeans/modules/project/ant/AntBasedProjectFactorySingletonTest.java,v done Checking in ant/project/test/unit/src/org/netbeans/modules/project/ant/AntBasedProjectFactorySingletonTest.java; /cvs/ant/project/test/unit/src/org/netbeans/modules/project/ant/AntBasedProjectFactorySingletonTest.java,v <-- AntBasedProjectFactorySingletonTest.java initial revision: 1.1 done RCS file: /cvs/ant/project/test/unit/src/org/netbeans/modules/project/ant/DefaultAntProjectOperationsTest.java,v done Checking in ant/project/test/unit/src/org/netbeans/modules/project/ant/DefaultAntProjectOperationsTest.java; /cvs/ant/project/test/unit/src/org/netbeans/modules/project/ant/DefaultAntProjectOperationsTest.java,v <-- DefaultAntProjectOperationsTest.java initial revision: 1.1 done Checking in ant/project/test/unit/src/org/netbeans/spi/project/support/ant/AntBasedTestUtil.java; /cvs/ant/project/test/unit/src/org/netbeans/spi/project/support/ant/AntBasedTestUtil.java,v <-- AntBasedTestUtil.java new revision: 1.16; previous revision: 1.15 done Checking in projects/projectapi/apichanges.xml; /cvs/projects/projectapi/apichanges.xml,v <-- apichanges.xml new revision: 1.4; previous revision: 1.3 done Checking in projects/projectapi/manifest.mf; /cvs/projects/projectapi/manifest.mf,v <-- manifest.mf new revision: 1.9; previous revision: 1.8 done Checking in projects/projectapi/src/org/netbeans/api/project/ProjectManager.java; /cvs/projects/projectapi/src/org/netbeans/api/project/ProjectManager.java,v <-- ProjectManager.java new revision: 1.17; previous revision: 1.16 done RCS file: /cvs/projects/projectapi/src/org/netbeans/api/project/ProjectOperations.java,v done Checking in projects/projectapi/src/org/netbeans/api/project/ProjectOperations.java; /cvs/projects/projectapi/src/org/netbeans/api/project/ProjectOperations.java,v <-- ProjectOperations.java initial revision: 1.1 done Checking in projects/projectapi/src/org/netbeans/spi/project/ActionProvider.java; /cvs/projects/projectapi/src/org/netbeans/spi/project/ActionProvider.java,v <-- ActionProvider.java new revision: 1.7; previous revision: 1.6 done RCS file: /cvs/projects/projectapi/src/org/netbeans/spi/project/ProjectOperationsImplementation.java,v done Checking in projects/projectapi/src/org/netbeans/spi/project/ProjectOperationsImplementation.java; /cvs/projects/projectapi/src/org/netbeans/spi/project/ProjectOperationsImplementation.java,v <-- ProjectOperationsImplementation.java initial revision: 1.1 done Checking in projects/projectapi/src/org/netbeans/spi/project/ProjectState.java; /cvs/projects/projectapi/src/org/netbeans/spi/project/ProjectState.java,v <-- ProjectState.java new revision: 1.4; previous revision: 1.3 done Checking in projects/projectapi/test/unit/src/org/netbeans/api/project/ProjectManagerTest.java; /cvs/projects/projectapi/test/unit/src/org/netbeans/api/project/ProjectManagerTest.java,v <-- ProjectManagerTest.java new revision: 1.10; previous revision: 1.9 done Checking in projects/projectapi/test/unit/src/org/netbeans/api/project/TestUtil.java; /cvs/projects/projectapi/test/unit/src/org/netbeans/api/project/TestUtil.java,v <-- TestUtil.java new revision: 1.11; previous revision: 1.10 done Checking in projects/projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java,v <-- OpenProjectList.java new revision: 1.34; previous revision: 1.33 done Checking in projects/projectui/src/org/netbeans/modules/project/ui/ProjectTab.java; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/ProjectTab.java,v <-- ProjectTab.java new revision: 1.25; previous revision: 1.24 done Checking in projects/projectui/src/org/netbeans/modules/project/ui/actions/Actions.java; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/Actions.java,v <-- Actions.java new revision: 1.22; previous revision: 1.21 done Checking in projects/projectui/src/org/netbeans/modules/project/ui/actions/Bundle.properties; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/Bundle.properties,v <-- Bundle.properties new revision: 1.22; previous revision: 1.21 done Checking in projects/projectui/src/org/netbeans/modules/project/ui/resources/layer.xml; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/resources/layer.xml,v <-- layer.xml new revision: 1.54; previous revision: 1.53 done Checking in projects/projectui/test/unit/src/org/netbeans/modules/project/ui/OpenProjectListTest.java; /cvs/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/OpenProjectListTest.java,v <-- OpenProjectListTest.java new revision: 1.5; previous revision: 1.4 done Checking in projects/projectui/test/unit/src/org/netbeans/modules/project/ui/actions/TestSupport.java; /cvs/projects/projectui/test/unit/src/org/netbeans/modules/project/ui/actions/TestSupport.java,v <-- TestSupport.java new revision: 1.4; previous revision: 1.3 done Checking in projects/projectuiapi/apichanges.xml; /cvs/projects/projectuiapi/apichanges.xml,v <-- apichanges.xml new revision: 1.13; previous revision: 1.12 done Checking in projects/projectuiapi/manifest.mf; /cvs/projects/projectuiapi/manifest.mf,v <-- manifest.mf new revision: 1.8; previous revision: 1.7 done Checking in projects/projectuiapi/src/org/netbeans/modules/project/uiapi/ActionsFactory.java; /cvs/projects/projectuiapi/src/org/netbeans/modules/project/uiapi/ActionsFactory.java,v <-- ActionsFactory.java new revision: 1.8; previous revision: 1.7 done Checking in projects/projectuiapi/src/org/netbeans/spi/project/ui/support/CommonProjectActions.java; /cvs/projects/projectuiapi/src/org/netbeans/spi/project/ui/support/CommonProjectActions.java,v <-- CommonProjectActions.java new revision: 1.11; previous revision: 1.10 done |