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 208434 - reconsider usage of FileUtil.addFileChangeListener(listener) in CopyResourcesOnSave
Summary: reconsider usage of FileUtil.addFileChangeListener(listener) in CopyResources...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.2
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks: 207855
  Show dependency tree
 
Reported: 2012-02-15 07:19 UTC by Milos Kleint
Modified: 2012-03-07 18:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milos Kleint 2012-02-15 07:19:05 UTC
see http://netbeans.org/bugzilla/show_bug.cgi?id=207855#c6  for details
Comment 1 Jesse Glick 2012-02-15 16:34:41 UTC
Tip: you can use the syntax "bug #207855 comment #6" and it will be hyperlinked.
Comment 2 Milos Kleint 2012-03-05 10:22:33 UTC
since we already permanently mark external source roots in ProjectOpenedHookImpl without ever releasing them, we might as well just do the same in the CopyResourcesOnSave class. Instead of having one global instance have one per project, switched on and off from the ProjectOpenedHookImpl
Comment 3 Milos Kleint 2012-03-05 14:47:34 UTC
http://hg.netbeans.org/core-main/rev/2dd85d25f17b turns the static listener into a swarm of listeners per project. Project updates add/remove the relevant listeners. project open starts and project close ends the updating..

on a related note http://hg.netbeans.org/core-main/rev/cc148f53ea20 updates the external source roots during the time project is opened.
Comment 4 Quality Engineering 2012-03-07 18:11:31 UTC
Integrated into 'main-golden', will be available in build *201203071105* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/2dd85d25f17b
User: Milos Kleint <mkleint@netbeans.org>
Log: #208434 have  the file change listener attached to current resource roots of the project. start on open, end on close, refresh on project change. only proceed with copying  if coming from this project (one instance per project now, not global)