Summary on the Development of RCP Patient Information System (12): deploy RCP applications

Source: Internet
Author: User
Reference books: Eclipse RCP-based Composite Application Development-IBM China Development Center series package and deploy RCP applications: the RCP application will eventually become an RCP product that can be installed and used by users. create RCP product configuration (1) create product configuration on the plug-in Project New-> product configuration (2) after the new, open XXX. product file, go to the overview page, and click "add..." in product definition... after adding the product definition, you can see that the added product definition is in the plugin. the extensions in the XML file shows that a product extension is added. Note: The application attribute of this product must not match the Application ID in the plug-in! For example, the following application is com. yinger. patientims. application, but the ID of the extension application can be application. Note: 1) to define a product, you need to extend Org. eclipse. core. runtime. product. When the RCP application is started, the eclipse runtime plug-in code first detects the extended application of the extension point. If there is any, start the application. If there is no or the application cannot be found, an error is returned. The application cannot be started. <! -- Extended product -->
ID= "Patientims"
Point = "org. Eclipse. Core. runtime. Products">
Application = "com. yinger. patientims. Application"
Name= "Patientims">
</Extension> 2) a property that must be set is the product ID. ID= "Patientims"
Eclipse IDE is also an RCP application. Its ID is Org. eclipse. SDK. IDE 2. add a required plug-in to open patitentims. product file, go to dependencies, and click "add... ", added the developed plug-in COM. yinger. patientims and then click Add required plug-ins. eclipse will automatically add all the plug-ins on which the plug-in project depends. 3. eclipse provides native launcher function (1) "about" dialog box and window mark opening patitentims for RCP product trademarks. product file, enter branding, and click "Browser" to set (you can also click plugin. the default images are selected here, for example, alt_about.gif,alt_window_16.gif,alt_window_32.gif plugin. new Content of the XML file: <Property
Name= "Aboutimage"
Value= "Icons/orignal/alt_about.gif">
Name= "Abouttext"
Value= "This is my first RCP product named patient information management system. Hope you like it! ">
Name= "Windowimages"
Value= "Icons/orignal/alt_window_16.gif, icons/orignal/alt_window_32.gif">
</Property> note the value of abouttext. There is no line break here! The line break is & # x0d; & # x0a; it is best to edit it in the product file, set the line feed, and synchronize the configuration so that you can see the line break. The following is the modified textvalue = "this is my first RCP product named Patient Information & # x0d; & # x0a; management system. Hope you like it! "(2) splash screen: the initial display of the program. It indicates that the program is being started and prompts some copyright information. ① modify the lauching configuration to enable patitentims. the product file is displayed in lauching. First, set laucher name (local startup name) and select use a single ICO file containing the 6 images: then select the default provided alt_laucher.ico ② to modify the splash configuration to enter the splash page. First, select a plugin for the splash configuration, then select whether to use progress bar and progress message to modify the position where progress bar appears. Here I use the default image splash.bmp. Remember to place this image in and plugin. ---------------------------------------- ------------------------------------------------------------------------- Note: Is there a problem with the progress bar displayed here! The original book has the following instructions: To successfully start the SS bar, you also need to set the parameter Org. eclipse. UI/show_progress_on_startup is true. [However, if you do not write this configuration, it will be displayed. If you change it to false, the INI file will be modified after the program is started, added the configuration above!] ③ Modify the configuration to enter the configuration. First, select "use an existing config. ini file" and then add the file in the directory at the same level as the plugin. xml file. Plugin_customization.ini, and then directly write org. Eclipse. UI/show_progress_on_startup = true or click "add..." in the following properties to add the newly added content in the plugin. xml file <Property
Name= "Startupforegroundcolor"
Value= "000000">
Name= "Startupmessagerect"
Value= "7,252,445, 20">
Name= "Startupprogressrect"
Value= "5,275,445, 15">
Name= "Preferencecustomization"
Value= "Plugin_customization.ini">
</Property> You can also view ④ modify the branding configuration in extensions, add the intro page to enter branding, find welcome page, "add... ", set the target plug-in and intro ID and return to plugin. XML, you can see the added extension content <Extension
Point = "org. Eclipse. UI. Intro">
Class= "Org. Eclipse. UI. Intro. config. customizableintropart"
ID= "Com. yinger. patientims. Intro">
Introid = "com. yinger. patientims. Intro"
Productid = "com. yinger. patientims. patientims">
Point = "org. Eclipse. UI. Intro. config">
Content= "Introcontent. xml"
ID= "Com. yinger. patientims. introconfigid"
Introid = "com. yinger. patientims. Intro">
Home-page- ID= "Root">
Kind = "html"
OS = "Win32, Linux, MacOSX"
Style= "Content/shared.css">
</Extension> here, the extension point Org. eclipse. UI. intro is used to associate the product with the welcome interface. The extended point is Org. eclipse. UI. intro. config is used to create a configuration of the welcome interface, including the content of the welcome interface. The file that displays the content of the welcome interface is introcontent. xml. Its syntax is similar to HTML, which is placed in the same directory as the plugin. xml file. Examples of welcome content: (from the original book) <? XML version = "1.0" encoding = "UTF-8"?>
<Page ALT- Style= "CSS/" Style= "CSS/root.css" ID= "Root"
Style- ID= "Page">
< Title Style- ID= "Intro-header"> Welcom to Patient Information Management System
</ Title>
<Group ID= "Links-background">
<Group ID= "Page-links">
< LinkLabel = "Eclipse web site" URL= "Http://" ID= "Website"
Style- ID= "Left">
< Text> </ Text>
</ Link>
</Introcontent> 4. run the test RCP product (1) configure the synchronization plug-in to open patitentims. product file, go to overview, and click "Synchronize" in testing to synchronize product configurations and defined plug-ins, so that some configuration items of the product are recorded in plug-ins. in XML files, the runtime is based on the product, even if some of them are not changed in plugin! (2) Click launch an eclipse application. Note: If the welcome page is not displayed, it is because the workspace configuration during running is not cleared. modify the configuration method: click run on the menu bar, select Run configuration ..., select the product to run on the left, and check the clear check box on the right. You can choose not to select ask. If you select OK when prompted, the effect will be displayed: the startup interface. Note that the splash and the previous logon dialog box have an icon in the upper-left corner! The program is starting... Go to the welcome page to close the welcome page. Go to the main program page. The "about" dialog box is displayed. after the product application development is completed, the goal is to deploy and run the program independently, without the need to know the underlying Java and eclipse code. Open plugin. in the XML file build, select the binary build file list because this project requires a MySQL database driver, after adding it as extra classpath, we can see that this configuration has been modified in many places, such as manifest. mf file bundle-classpath: mysql-connector-java-5.1.16-bin.jar ,. and build. properties file source .. = SRC/
Output .. = bin/
Bin. nodes des = plugin. XML ,\
Meta-INF /,\
Splash.bmp ,\
Plugin_customization.ini ,\
Patientims. Product ,\
Introcontent. XML ,\
Icons /,\
Build. properties ,\
Jars. Extra. classpath = mysql-connector-java-5.1.16-bin.jar export product [Note that the product file is opened, not exported in the plugin. xml file! To put it simply, the latter exports jar, and the former exports exe. Open the product file, go to the overview page, and click "Export..." in exporting... ", and then select the export path root directory is the folder where the exported product is placed, this folder is set in the following destination folder. It is best to check synchronize before exporting to ensure that the product and plug-in are consistent before exporting the product. You can choose whether to source everywhere and whether to generate repository, if this option is selected, a repository folder will be generated, which is exported under the same directory as the root directory, under the product folder, there are two folders: patientims and repository folder root directory(patientims.exe under the folder. The running results are the same as those of the test. After the program is run, a workspace folder is generated and artifacts is located in the directory. the XML file should also be a configuration file with a lot of patientims. INI is a configuration file, but it is completely different from the INI file in the project, with little content:-startup

Plugins/org. Eclipse. Equinox. launcher_1.2.0.v20110502.jar -- launcher. Library

Plugins/org. eclipse. equinox. launcher. win32.win32. the x86_1.1.100.v20110502 plugins folder is the plug-in directory required for running the program. The configuration folder is the configuration folder of the program, which contains a config. ini configuration file. Many P2 folders contain two original folders. After the file is deployed, the author explains how to update the application. The important concept of the content is quite detailed: Feature) and Update site source code has been uploaded to Google Code hosting:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.