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 34426 - Weak threading model - ContainerUpdater
Summary: Weak threading model - ContainerUpdater
Status: CLOSED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: issues@projects
URL:
Keywords: THREAD
Depends on:
Blocks:
 
Reported: 2003-06-17 13:05 UTC by Jaroslav Tulach
Modified: 2003-12-11 14:25 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 Jaroslav Tulach 2003-06-17 13:05:03 UTC
I've just pluged in a build target iterator and
when I click on finish to really create the build
target I do:

target = FileUtil.copy (template);
ProjectMember member=PM.getProjectMember(target)
member.getContext().bind ("build", "true");

and in my Environment.Provider I do:

PM.getProjectMember (obj).getContext ().lookup (
  "build"
) == "true"

but the Env.Provider method is often called before
the bind ("build", "true") and then my template is
not correctly recognized as build target.
Comment 1 Vitezslav Stejskal 2003-06-17 13:52:33 UTC
I understand. The threading model for ProjectMembers simply doesn't
exist yet ;-(. Sorry.
Comment 2 Jaroslav Tulach 2003-06-17 14:18:02 UTC
It helped me to move the TemplateIterator.instantiate (TemplateWizard)
method into specific 
FileSystem.AtomicAction.run
method. Maybe you or Loaders API could invoke the instantiate method
in atomic action by default?
Comment 3 Vitezslav Stejskal 2003-06-17 14:50:19 UTC
Yes, this could help in this particular situation. The question is
whether there shouldn't be something like Project.postAtomic(Runnable)
where you could post your bt creation code?

I plan to add CreateOperation handler interface and
PM.createFromTemplate() method, but it won't solve your case, because
handlers are provided by ProjectEnvironmentProviders. BTW, it's not
really nice to base PM recognition on anything else than the MIME type
of PM's original FileObject.
Comment 4 Vitezslav Stejskal 2003-08-06 10:00:52 UTC
I've filed separate issues for problems mentioned in this report (see
issue #35293 and issue #35294).

As I wrote having the PEP's code depending on anything else than the
MIME-type of PM's file is not good idea. I don't know what is the
motivation for marking build target by some value bound in its
settings context, but at the first glance it seems inappropriate. Just
choose some extension for your BT's file, register the MIMEResolver
(define new MIME-type) and register PEP for that MIME-type.
Comment 5 Jan Becicka 2003-11-25 14:05:03 UTC
As described in
http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss the
current work on projects prototype has been stopped.

Marking issue as VERIFIED --->
Comment 6 Jan Becicka 2003-11-25 14:14:10 UTC
---> CLOSED