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 224479 - @OnStart not invoked on activation of a module: Code model disabled by default
Summary: @OnStart not invoked on activation of a module: Code model disabled by default
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 7.3
Hardware: PC Linux
: P1 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2013-01-04 12:49 UTC by Alexander Simon
Modified: 2013-01-25 10:59 UTC (History)
4 users (show)

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 Alexander Simon 2013-01-04 12:49:47 UTC
Steps to reproduce:
- start full IDE with fresh user dir
- create welcome sample project
See:
- C/C++ code assistance disabled
Expected:
- enabled code assistance

IDE info:
>Log Session: Friday, January 4, 2013 4:16:03 PM MSK
>System Info: 
  Product Version         = NetBeans IDE Dev (Build 20130104-e78203df8226) (#e78203df8226)
  Operating System        = Linux version 3.2.0-35-generic running on amd64
  Java; VM; Vendor        = 1.7.0_10; Java HotSpot(TM) 64-Bit Server VM 23.6-b04; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.7.0_10-b18
  Java Home               = /usr/lib/jvm/jdk1.7.0_10/jre
  System Locale; Encoding = ru_RU (nb); UTF-8
Comment 1 Egor Ushakov 2013-01-10 09:01:14 UTC
I was able to reproduce it with full IDE (with ergonomics)
Comment 2 Egor Ushakov 2013-01-10 10:11:41 UTC
OnStart initializer is not being called when c++ plugin is activated, checking why this is happening
Comment 3 Egor Ushakov 2013-01-10 11:52:11 UTC
org.netbeans.modules.cnd.modelimpl.Installer.Start marked as OnStart but is not called when C++ module is activated, reassigning to platform for evaluation
Comment 4 Jaroslav Tulach 2013-01-10 12:34:13 UTC
No way. Evaluate first and when you find problem in platform, reassign.
Comment 5 Egor Ushakov 2013-01-10 12:47:29 UTC
I think the problem is:
runnable marked with OnStart annotation is not called on module activation (with ergonomics enabled)
Comment 6 Jaroslav Tulach 2013-01-10 13:59:37 UTC
The code to call @OnStart on module activation is there: core.startup/src/org/netbeans/core/startup/NbStartStop.java
Comment 7 Egor Ushakov 2013-01-10 14:34:01 UTC
true, and the problem is that when the module activates, "Modules/Start" lookup does not get updated (or does not receive update notification)
Comment 8 Egor Ushakov 2013-01-10 14:39:27 UTC
it is funny that when the IDE closes it finally invokes OnStart and OnStop for the module simultaneously, I do not see what can be fixed on cnd side
Comment 9 Jaroslav Tulach 2013-01-14 12:28:55 UTC
Please verify ergonomics#60f455831a04, so I can backport it.
Comment 10 Egor Ushakov 2013-01-14 13:24:30 UTC
Now it works fine, thanks!
Comment 11 Quality Engineering 2013-01-16 02:43:55 UTC
Integrated into 'main-golden', will be available in build *201301160001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/60f455831a04
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #224479: Need to refresh named services everytime a module is enabled
Comment 12 Jaroslav Tulach 2013-01-16 06:08:37 UTC
Waiting for verification.
Comment 13 Marian Mirilovic 2013-01-16 08:20:41 UTC
(In reply to comment #12)
> Waiting for verification.

I think you can proceed with integration, Egor has already confirmed it works.
Comment 14 Jaroslav Tulach 2013-01-16 14:13:51 UTC
Merged as 75eed0be48f2
Comment 15 Quality Engineering 2013-01-17 00:01:14 UTC
Integrated into 'releases', will be available in build *201301162100* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/60f455831a04
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #224479: Need to refresh named services everytime a module is enabled
Comment 16 Tomas Danek 2013-01-25 10:59:19 UTC
According to steps to reproduce, this is not reproducible in NetBeans IDE 7.3 RC1 (Build 201301202100) -> verified.