RCP makes this easy because it allows you to break up your functionality into independently deployable bundles. This is much different than simply shipping a new JAR to your customer. With RCP, the additional bundles will cause new menu items, editors, wizards, etc. The common workbench contains core functionality related to security, database access and other common services. Various units, or applications if you like, can be deployed into the workbench based on an end-users role in the organization or other criteria.
The individual applications can be developed faster and with a more uniform look and feel because they are leveraging the common services provided by the workbench. An extreme form of modularity provided by RCP is the ability to completely swap out the presentation technology layer. The Remote Application Platform supplies a set of bundles that can be swapped into your application and the result is that the same code can run both on desktops and on the web.
Install WindowBuilder for Eclipse. Install e4 Tools Developer Resources for Eclipse. Java package name : org. Open Application. You can see a list of built-in command of the RCP framework at:. ID : org. To group many views together in a tabbed fashion, rather than side by side, IPageLayout. When running your application you need to ensure that you have all required plug-ins included.
Do this by checking your Run Configurations. Go to the plugins tab and click Validate Plug-ins. If there are errors click on Add Required Plug-ins to fix the error. Now that you have created a perspective and a view for your RCP application, you will probably want to provide some preference pages. To provide preference pages you will need to implement the org. While the preference page class will implement org. IWorkbenchPreferencePage, it is useful to extend org.
FieldEditorPreferencePage as it provides createFieldEditors method which is all you need to implement, along with the init method in order to display a standard preference page. A complete list of FieldEditors is provided in the org.
Preferences for a plug-in are stored in an org. IPreferenceStore object. You can access a plug-ins preference through the Activator, which will typically extend org. Each preference you add to the store has to be assigned a key. Preferences are stored as String based values, but methods are provided to access the values in number of formats such as double, int and Boolean. While preferences are used to display the overall preferences for the plug-in, property sheets are used to display the properties for views, editors or other resources in the Eclipse environments.
By hooking into the Properties API, the properties for you object will appear in the Properties view usually displayed at the bottom of your Eclipse application.
The Properties view will check if the selected object in the workspace can supports the org. IPropertySource interface, either through implementation or via the getAdapter method of the object. Each property gets a descriptor and a value through the IPropertySource interface.
All good applications should provide some level of user assistance. Add a number of toc items to this extension point, the only mandatory attribute for each toc entry is the file that contains the table of contents definition.
To see a quick example of what help content should look like, choose the Help Content item from the Extension Wizards tab when adding to the plug-ins manifest. Each topic entry should have a link to a HTML file with the full content for that topic. The above XML extract from a table of contents file illustrates this. There is also the choice to use the definition editor for help content.
This will open by default in Eclipse when choosing a toc file. Another user assistance mechanism used in Eclipse is a cheat sheet, which guides the user through a series of steps to achieve a task. This presents you with an editor to add an Intro and a series of items, with the option to hook in commands to automate the execution of the task.
To add this cheat sheet to your plug-in manifest, the cheat sheet editor has a Register this cheat sheet link on the top right hand corner. When registering the cheat sheet you will need to provide it with a category and a description. Clicking finish on this dialog will add the org.
You can modify the details of the cheat sheet from here if necessary. You can help the user to load up your plug-in s as a single part, by combining them into one feature. This wizard generated a feature. The most important section is the Plug-ins tab, which lists the plug-ins required for your feature. The I ncluded Features tab allows you to specify sub-features to include as part of your feature. On the Dependencies tab, you can get all the plugins or features that you are dependent on by clicking on the Compute button.
The feature also provides a single location where you can define all the branding for your application. In the Overview tab, you can assign a Branding Plug-in to the feature. All of the icons and files referenced by the about. A product is an entire distribution of an RCP application, rather than a feature intended to be part of an existing distribution.
As such, products have additional branding requirements. To specify these extra parameters, a contribution to the org. The product must be assigned the application to run, the name of the product for the title bar and a description. Eclipse's Plug-in Development Environment PDE provides a number of wizards and editors that take some of the drudgery out of the process. Here are the steps you should follow to get started.
On the subsequent pages, enter a Project name such as org. Beginning in Eclipse 3. In contrast to previous versions, this is now the default. In the next page of the Wizard you can change the Plug-in ID and other parameters. Of particular importance is the question, "Would you like to create a rich client application? Select Yes. The generated plug-in class is optional but for this example just leave all the other options at their default values.
If you get a dialog asking if Eclipse can switch to the Plug-in Development Perspective click Remember my decision and select Yes this is optional. Starting with Eclipse 3. We'll use the simplest one available and see how it works. Make sure the option to Create a plug-in using one of the templates is enabled, then select the Hello RCP template.
This is RCP's equivalent of "Hello, world". Click Finish to accept all the defaults and generate the project see Figure 1. Eclipse will open the Plug-in Manifest Editor. The Plug-in Manifest editor puts a friendly face on the various configuration files that control your RCP application. Trying out RCP applications used to be somewhat tedious. You had to create a custom launch configuration, enter the right application name, and tweak the plug-ins that were included.
Thankfully the PDE keeps track of all this now. All you have to do is click on the Launch an Eclipse Application button in the Plug-in Manifest editor's Overview page. You should see a bare-bones Workbench start up see Figure 2. Figure 2. By using the templates you can be up and running an RCP application in minutes.
In Eclipse terms a product is everything that goes with your application, including all the other plug-ins it depends on, a command to run the application called the native launcher , and any branding icons, etc.
0コメント