Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Installing into Region

Thanks a lot.

I need to use the Luna SR2 release. But even there the Region-Impl is a SystemBundle-Fragment.

I guess it is not an issue about visibility. More about "not installed bundles".

Tomorrow i am going to do a detailed debugging-session in EquinoxLauncher and come up with the latest news about it here in the newsgroup. 
If i can not resolve stuff, then i will prepare a sample for it.

Thanks a lot for your help
Florian




2015-11-16 19:53 GMT+01:00 Thomas Watson <tjwatson@xxxxxxxxxx>:
This sounds pretty strange.  You say RegionManager is not able to see the initial bundles?  What version of regions and equinox are you using?  I assume the latest from Mars?  I ask because the Mars version of regions is a system.bundle fragment and ends up using the system.bundle BundleContext to do its work.  So it should be guaranteed that the RegionManager can 'see' the original Eclipse bundles because the system.bundle context can see all bundles no matter what the framework hooks are doing for regions.

I am wondering if the issue is that the bundles are gone from the start of the framework initialization or if the simple configurator from the IDE is somehow uninstalling them.  But that would be strange because it would also mean simple configurator is uninstalling itself also.  If you have a reproducible scenario I would have you open a bug report to track this down.

Tom





From:        Florian Pirchner <florian.pirchner@xxxxxxxxx>
To:        Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
Date:        11/16/2015 12:35 PM
Subject:        Re: [equinox-dev] Installing into Region
Sent by:        equinox-dev-bounces@xxxxxxxxxxx




Hey Pascal,

I am starting the IDE. At this time all bundles (ids=0..120) from eclipse plugins-folder are contained in the rootRegion.

The IDE starts properly.

Everything fine...

Then my vaaclipse-region bundle (autostart 4) starts and does following:
It creates the Vaaclipse region and installs all bundles (ids=121...200) from a defined folder into this region.

Everything fine...

Then I shut down the IDE. The digraph file is created properly.

Then I start the IDE again.

The digraph file is read. But for bundles with bundleId 1..120, no bundles could be found by the RegionManager (context.getBundle(id) == null). Somehow they seem not to become loaded/installed...

But the bundles with bundleId 121...200 are installed properly and available in the vaaclipse-region.

And the IDE can not start since no bundles with id 1...120 are available in the root region.

I guess the IDE uses SimpleConfigurator. Do I have to be aware about the config-file of SimpleConfigurator too? Or should do region.installBundle do all things properly?

Thanks a lot florian.


Pascal Rapicault <pascal@xxxxxxxxxxxxx> schrieb am Mo., 16. Nov. 2015 19:10:
The usage of regions seems to be a good solution for what you are trying to achieve.
However I'm still not clear about the problem you are running into.



On 15-11-16 12:57 PM, Florian Pirchner wrote:

I need to isolate the IDE e4 stuff from the Vaaclipse e4 stuff and only share some defined api like services and packages.


Florian Pirchner <florian.pirchner@xxxxxxxxx> schrieb am Mo., 16. Nov. 2015 18:53:
Hey Cristiano,

yep. It should become some kind of "Vaaclipse Perspective WYSIWYG Editor". The Vaaclipse preview is embedded in the workspace as an MPart. IDE instance and "Vaaclipse Designer" run in same OSGi instance.

A launch config in the IDE to launch the designer in an additional vaaclipse-e4-instance is not an option ;(

Later I need to create an additional Region "E4 Model Exchange", that allows sharing information about the "Vaaclipse Designer" and the Xtext-Model. This region will allow to share some services. And provides implementations for event-exchange from and two IDE and Vaaclipse-Designer.

Example:
I am changing a setting in the Vaaclipse designer. This sends an event. And the IDE will change the Xtext-Model in the XtextResourceSet.
Or I change the Xtext-Model and an event to the Vaaclipse-Designer will rerender and/or repaint the Web-UI.

WDYT?

Any ideas?

Thanks

Cristiano Gavião <cvgaviao@xxxxxxxxx> schrieb am Mo., 16. Nov. 2015 18:29:
Hello.

some doubts...

do you want a preview provider...

but instead of use the "run as container way" that will open a new instance with a set of defined bundles, do you want to use the same container instance for both pde/jde/platform and your preview provider that will read/use the opening projects from the workspace projects?



2015-11-16 13:46 GMT-03:00 Florian Pirchner <florian.pirchner@xxxxxxxxx>:
Hi,

we got a problem using equinox regions.

Our usecase:
We run an Eclipse IDE based on eclipse e4. There is a project called vaaclipse that also uses the e4 kernel and added Vaadin renderer to it. And we need to show up a "Preview View" for the vaaclipse application in the IDE.

The problem:
Installing Vaaclipse into the IDE is not a good idea, since it will confuse the IDE by Extensions, OSGi-Services,...

Our approach:
1) Starting up the IDE
2) Creating a new Region called "Vaaclipse"
2a) If a Region was available, we remove it first
2b) Reading all bundles from a specified target folder
2c) Installing the bundles from the target folder into the region
3) Setting startlevels,... and starting the application

For us it seems to be possible, since the "rootRegion" and the "Vaaclipse" region are completely decoupled (the have no connection)


But if we do so, stop the IDE and start the IDE again, all the bundles originally available in Eclipse have gone. Only the "system bundle" is left. The installed "target folder bundles" related with Region "Vaaclipse" are still there.

Here a short idea about our first prototype approach:
    public void start(BundleContext bc) throws Exception {
        Activator.context = bc;

        try {
            ServiceReference<RegionDigraph> ref = bc
                    .getServiceReference(RegionDigraph.class);
            digraph = bc.getService(ref);

            vaaclipseRegion = digraph.getRegion("vaaclipse");
            if (vaaclipseRegion != null) {
                digraph.removeRegion(vaaclipseRegion);
            }
            vaaclipseRegion = digraph.createRegion("vaaclipse");

            File folder = new File("/Users/florianpirchner/Work/temp/tp");
            for (File tpBundle : FileUtils.listFilesAndDirs(folder, FileFilterUtils.trueFileFilter(), FileFilterUtils.falseFileFilter())) {
                if(tpBundle.isDirectory()) {
                    continue;
                }
                Bundle newB = vaaclipseRegion.installBundle("file:" + tpBundle
                        .getAbsolutePath());
                vaaclipseRegion.addBundle(newB);
            }
        } catch (BundleException e) {
            e.printStackTrace();
        }
    }


Thanks a lot for any help!
Best

_______________________________________________
equinox-dev mailing list

equinox-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/equinox-dev



--

"Tudo vale a pena se a alma não é pequena..."
_______________________________________________
equinox-dev mailing list

equinox-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/equinox-dev


_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________
equinox-dev mailing list

equinox-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/equinox-dev_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev


_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev



--
Mit besten Grüßen
Florian Pirchner
Lunifera GmbH
Marchfelder Straße 2
2301 Groß Enzersdorf
Austria

Back to the top