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 <[email protected]>:

> 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
> [email protected]
> 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
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to