【正文】
nfiguration. Then enter a file name for this new configuration file, such as . Leave the other options at their default values. Then click Finish. The Product Configuration editor will open. This editor lets you control exactly what makes up your product including all its plugins and branding elements.In the Overview page, select the New... button to create a new product extension. Type in or browse to the defining plugin (). Enter a Product ID such as product, and for the Product Application select . Click Finish to define the product. Back in the Overview page, type in a new Product Name, for example RCP Tutorial 1.In Eclipse if you create the product before filling in the Product Name you may see an error appear in the Problems view. The error will go away when you Synchronize (see below). This is a known bug that is fixed in newer versions. Always use the latest available maintenance release for the version of Eclipse you39。ll do something simpler.The Eclipse plugin loader expects things to be in a certain layout so we39。re done you should have a structure that looks like this in your deployment directory: RcpTutorial1 | .eclipseproduct | | + configuration | + plugins Note that all the plugins are deployed as jar files. This is the remended format starting in Eclipse . Among other things this saves disk space in the deployed application.Previous versions of this tutorial remended using a batch file or shell script to invoke your RCP program. It turns out this is a bad idea because you will not be able to fully brand your application later on. For example, you won39。這個教程會使你較快學(xué)會創(chuàng)建RCP應(yīng)用程序,已更新到Eclipse 作者: Ed Burnette, SASJuly 28, 2004: February 6, 2006介紹試試這樣的試驗:展示Eclipse給一些以前從來沒有看見過它的朋友或同事,并讓他們猜測一下它是用什么語言編寫的。這樣是可能的但是非常的麻煩,特別當(dāng)你想要著重個性化設(shè)計菜單,編排,以及其他的用戶接口部分。如果你想直接跳到重點,看這部分的代碼你可以在acpanying zip 。Eclipse的插件發(fā)展環(huán)境(PDE)提供大量的向?qū)Ш途庉嬈?,負?dān)了創(chuàng)建中的一些苦工。在接下來的頁面上,輸入一個項目的名字,說明你想要一個Java 項目,選擇你需要的Eclipse版本,并且勾選Create an OSGi bundle manifest選項。你全部需要做的只是單擊Manifest編輯器總覽頁上的Eclipse 應(yīng)用程序按鈕。引入RCP開發(fā)這是Eclipse 。保留余下的選擇和默認值一致。輸入或者使用瀏覽方式找到定義的plugin()。在Eclipse ,如果你在填入產(chǎn)品名稱之前創(chuàng)建一個產(chǎn)品,你可能會看見一個出錯信息出現(xiàn)在問題視窗。如果你的應(yīng)用程序需要涉及的plugins直到運行的時候才能決定(例如:tomcat plugin),那就在配置表標簽內(nèi)手動增加。依賴插件還是依賴特性在總覽頁面,你可能注意到一個選項關(guān)于:產(chǎn)品的配置是基于插件或特性兩者任何一個。對于一個真正的應(yīng)用程序,你可能想要提供通過安裝程序例如InstallShield 或者NSIS一個完整執(zhí)行包。幸好,我們給予PDE足夠的信息,現(xiàn)在它可以為我們將這些組織起來。如果你建立了一個開放源碼項目,勾選包含源代碼選項。當(dāng)你完成的時候,在你的開發(fā)目錄里。 這個教程的先前版本推薦使用一個批處理文件或外殼程序來調(diào)用你的RCP程序。試試看!在Eclipse環(huán)境外,執(zhí)行自帶的初始程序(默認的eclipse 或 ) ,看看應(yīng)用程序運行起來。兼容性和移植性 ,在線文檔里涵蓋了一大堆你需要知道的問題。正常地,這種情況是不會發(fā)生的,甚至盡管你僅僅用手工編輯那些文件而不是通過PDE 。參考書目RCP Tutorial Part 2 RCP Tutorial Part 3 Eclipse Rich Client Platform RCP Browser example (project ) PDE Does Plugins How to Internationalize your Eclipse Plugin Notes on the Eclipse Plugin Architecture Plugin Migration Guide: Migrating to from Plugin Migration Guide: Migrating to from