简体   繁体   中英

Eclipse RCP Extension Points

Hey guys it has been a couple of week that I started developing stuff based on RCP and frankly speaking i'm facing several problems since i haven't found so much online then the concepts behind RCP programming (at least for me) are not such linear.

First of all let me say that I'm using the E4 framework (Application Model) and I want to populate two parts (UI Parts) where their definitions are basically defined in an external plug-in.

For instance: - Part1 (defined in Application e4) implements Class1(defined in a Plug-in called ExtPlugin).
- Part2 (defined in Application e4) implements Class2(defined in a Plug-in called ExtPlugin).

How should I work this out using extension points and extension?

Thanks

Each of your plugins can use an application model fragment.e4xmi to declare your Part and the class.

Use the org.eclipse.e4.workbench.model extension point to tell e4 about the fragment.

If you use 'File > New > Other... > Eclipse 4 > Model > New Model Fragment' this will create the fragment.e4xmi file and the plugin.xml extension point.

In the fragment.e4xml you create a 'Model Fragment'. In this fragment the 'Element ID' is the id of something you are extending - for parts this will often be the id of a Part Stack defined in the Application.e4xmi. The 'feature name' will often be 'children'. Add your Part to the Model Fragment.

More here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM