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

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