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 18285 - There is no way how to listen on switching of projects.
Summary: There is no way how to listen on switching of projects.
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords:
Depends on:
Blocks: 9061 18026
  Show dependency tree
 
Reported: 2001-12-03 12:36 UTC by Jan Jancura
Modified: 2003-12-11 14:25 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 Jan Jancura 2001-12-03 12:36:01 UTC
We (debugger) need to listen on PROJECT_LOAD & PROJECT_SAVE events. But there is
no clear way how to do it using our current OpenAPIs.
Why we need it?
When a project is saved we nedd to save some data.
When a new project is loaded we need to load them.

Is it possible to do something with it till NB3.3.3?
Thanks
Comment 1 _ ttran 2001-12-03 13:21:33 UTC
there is no way to do it now cleanly through public APIs.  The quick
and  dirty workaround is registering a PropertyChangeListener to
org.netbeans.core.projects.SessionManager.  This means a ugly
dependency on core (even though one can use reflection to avoid
compile-time dependency).

I am against publishing the interface because (1) it's too late in the
release cycle and (2) we don't know how the new project infratructure
will work in the future.

I'm reassigning this issue to projects module for considerations.

Lowered prio to P3 'cause workaround is possible.
Comment 2 Vitezslav Stejskal 2001-12-03 14:21:38 UTC
I think we would need to propagate session state to modules somehow, for 3.4 it will still be related to 
projects switching, but for 4.0 this will be part of session. I am not sure about the session API (if 
there will be any public one), but I think we need:

- to ask modules that session is going to be closed and give them chance to cancel (issue #9061)
- notify modules that session is closed
- notify modules that new one is opened

Comment 3 Vitezslav Stejskal 2001-12-05 14:02:37 UTC
It can't be solved for 3.3.x, Target Milestone --> 3.4.
Comment 4 Vitezslav Stejskal 2002-04-12 13:06:40 UTC
Is this enhancement still required by debugger?
Comment 5 Jan Jancura 2002-04-12 13:22:33 UTC
this issue blocks two bugs which are not closed. 
So it is still required...
Comment 6 Vitezslav Stejskal 2003-01-02 13:45:55 UTC
This problem is obsoleted by new projects system (Nb 4.0), please
check out the preliminary version from:
http://www.netbeans.org/download/prj40_prototype/