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 51579 - Need api to close an open project
Summary: Need api to close an open project
Status: CLOSED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: T9Y
Depends on:
Blocks:
 
Reported: 2004-11-16 18:43 UTC by Vince Kraemer
Modified: 2006-03-24 12:46 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 Vince Kraemer 2004-11-16 18:43:42 UTC
I would like to be able to close a open project
programmatically, but there doesn't appear to be
an API to do that.
Comment 1 Jesse Glick 2004-11-22 20:55:56 UTC
There is intentionally no API to open or close projects
programmatically; the manipulation of the open project list is
currently treated as a private GUI feature of the projectui module. If
you think you need such an API, please provide a detailed use case
including desired user model; you may really want something else.
Comment 2 Vince Kraemer 2004-11-24 18:56:52 UTC
My usecase was for a reflective unit test.  The test I wanted to write
was the following:

Create a new project. Close the project. Import a project from the
source that was created as part of the project in the "first step".

It is not a strong case.  It can be achieved by writing functional tests.
Comment 3 Jesse Glick 2004-12-01 18:44:54 UTC
From a test you can use
org.netbeans.modules.project.ui.OpenProjectList. This is not an API
and should never be used from a module.
Comment 4 sigalduek 2004-12-13 13:54:48 UTC
I'm also need an api for Open a project. I'm writing end2end module
for Mobile Edition. The user (his current main project is mobile
project ) needs to choose one web project he'd like to interact with.
He gets the list of all web projects that are opened. If his web
project is not opened , he will get a JFileChooser with all project's
folders. After choosing one  - the project should be opened.
Comment 5 Jesse Glick 2004-12-14 03:03:00 UTC
Add yourself to the CC list of any bug you comment on, or you will
never see replies.

Please take a look at issue #52258 and add your use cases there if
appropriate.