Bug 213906 - RunLevel broken in "Run in Felix" mode
RunLevel broken in "Run in Felix" mode
Status: NEW
Product: platform
Classification: Unclassified
Component: Netigso
7.1.2
All All
: P4 (vote)
: TBD
Assigned To: Jaroslav Tulach
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-10 13:59 UTC by maxnitribitt
Modified: 2013-11-26 13:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
Suite to test 213906 (12.89 KB, application/x-zip-compressed)
2012-06-11 05:40 UTC, maxnitribitt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description maxnitribitt 2012-06-10 13:59:45 UTC
If you want to replace the Swing UI with an alternative one (e.g. in project eFX) using RunLevel, it works when you use the NetBeans Module System. When you try to "Run in Felix" the registered RunLevel's will be ignored.

Background:

core.osgi.Activator is responsible for running the RunLevel services in netigso mode, but only launches them when a module with bundle id "org.netbeans.core.windows" is present (via showWindowSystem flag).

It would be better to have consistent behaviour in netigso and normal mode.
Comment 1 Jaroslav Tulach 2012-06-10 18:36:09 UTC
Can you provide patch or at least a sample demo that I can use to test the fix?
Comment 2 maxnitribitt 2012-06-11 05:40:28 UTC
Created attachment 120631 [details]
Suite to test 213906
Comment 3 maxnitribitt 2012-06-11 05:50:01 UTC
    I created a small demo that has one module with a RunLevel. It's supposed to
    print to System.out when the project is run:

    ############## TestRunlevel started

    When you use "OSGi->Run in Felix" it doesn't.

    In "core.osgi" Activator the relevant code is in Line 251 onwards:

     if (showWindowSystem) {
                // XXX set ${jdk.home}?
                List<String> bisp = new
    ArrayList<String>(Arrays.asList(Introspector.getBeanInfoSearchPath()));
                bisp.add("org.netbeans.beaninfo"); // NOI18N
                Introspector.setBeanInfoSearchPath(bisp.toArray(new
    String[bisp.size()]));
                CoreBridge.getDefault().registerPropertyEditors();
                for (RunLevel rl : Lookup.getDefault().lookupAll(RunLevel.class)) {
                    rl.run();
                }
                Splash.getInstance().setRunning(false);
            }


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo