Sunday, December 19, 2010

Creating an About Dialog for your Eclipse RCP Application

Displaying an About box in your Eclipse RCP Application/Product is actually very simple. However as is typical of a framework ("don't call us, we'll call you" principle), there are conventions you must follow.

Before you do this, you must already create an Eclipse RCP Application class that implements IApplication and register it as an Eclipse extension in your plugin.xml.

Adding the Help > About Menu Item


First, edit your ApplicationActionBarAdvisor class (which extends org.eclipse.ui.application.ActionBarAdvisor base class), as follows:

    protected void makeActions(IWorkbenchWindow window) {
        aboutAction = ActionFactory.ABOUT.create(window);
        register(aboutAction);
    }

That will register the About action. You will also need to add the menu action itself to the menu bar:

    protected void fillMenuBar(IMenuManager menuBar) {
        MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
       
        menuBar.add(helpMenu);
        helpMenu.add(aboutAction);
    }

Launch your Eclipse RCP application and you can display the About dialog.

Customizing the About Dialog Box


To customize the About dialog box's contents, first you must create an Eclipse RCP Product Configuration.
Click File > New > Product Configuration and define your product.

This should also add your product to extension point 'org.eclipse.core.runtime.products'.

Edit your project's Launch Configuration to use the your Product Configuration instead of Eclipse Application. Verify that it works well.

Now you can customize the About box contents by editing your Product Configuration (.product file), go to Branding tab and About Dialog section. Specify the About Image and About Text there.

To specify the image, import an image resource (PNG, GIF, JPG) to your plugin project (e.g. inside an /icons folder). Important: Your image will need to be included inside your resulting plugin binary. Edit your plugin's manifest, go to Build tab, and make sure your images/icons are included (checked) for the binary build and source build.

After editing your Product Configuration, you must synchronize it with the plugin manifest. Go to the Product's Overview tab and click Synchronize (under Testing).

That action will update several properties in the org.eclipse.core.runtime.products extension, for example:

   <extension
         id="abispulsa_rcp"
         point="org.eclipse.core.runtime.products">
      <product
            application="com.abispulsa.bisnis.rcp.application"
            description="Layanan bagi korporasi untuk dapat dengan mudah mengisi pulsa."
            name="AbisPulsa Bisnis RCP">
         <property
               name="appName"
               value="AbisPulsa Bisnis RCP">
         </property>
         <property
               name="aboutText"
               value="AbisPulsa Bisnis merupakan layanan bagi korporasi untuk dapat dengan mudah mengisi pulsa.">
         </property>
         <property
               name="aboutImage"
               value="icons/AbisPulsa_icon_75x75.png">
         </property>
      </product>
   </extension>

For your information: Other properties you can use include:

  • windowImages
  • aboutImage
  • aboutText
  • appName
  • welcomePage
  • preferenceCustomization

References:
  1. http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/product_def_extpt.htm
  2. http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_core_runtime_products.html

22 comments:

  1. Truly amazed! Everything is quite, specific, available can be a information with the problem. It contains the data.

    RS Gold
    Buy RS Gold
    Cheap RS Gold
    Buy Cheap RS Gold
    RSGold
    Runescape Gold for Sale

    ReplyDelete
    Replies
    1. Concise package money, bare nothing, but it is a brand of coat of paint material light, the super invincible joker, very street van Cambridge satchel bag.
      Bag bag tassel part is made of genuine leather oh, very thick soft, package itself is the quality of the skin of PU, quality is good. Much super tassel walking around up born swaying posture, very attract eyeball oh.

      Europe and a bag of wind, appearance is very simple, less is more big oh. Bag body skeleton complex moment modelling, a bit cool taste.
      Give people a feeling of very warm is the purpose of Cambridge satchel company, this season it continued the popular bright colour elements, such as pink fluro and yellow fluro. It is so fashion and beautiful. You can also embossing your names on your bag, you will like it very much.

      Delete
  2. what a fantastic find - can't wait to see what you two come up with!

    ReplyDelete
  3. Tote handbag tassel part Runescape Goldis made of real natural leather oh, very heavy delicate, bundle is the standard of your skin associated with Pick up, top quality is nice. Considerably tremendous tassel running aroundCheap MapleStory Mesos upward born swaying healthy posture, quite draw in eyeball oh yeah.

    ReplyDelete
  4. Thanks for the information. I really enjoyed, I would like get more information about this,because is very beautiful, thanks for sharing Smoking Effects.

    ReplyDelete
  5. Wonderful recipe! I have began producing my own washing cleaning soap just just lately - along with love it along with have a pretreatment squirt -- These are Effortless components and I'm going to give mtss is a try out!!! Appreciate your posting the idea!
    Buy D3 Items
    Cheap Runescape Gold

    ReplyDelete
  6. Be transmitted, Groundhog Day transferred tanks, offensive combo point to archers who start output archers will continue with the output decreased pop-up ball of energy from the body.buy wow gold

    ReplyDelete
  7. The legendary doomsday is around the corner, so who do you want to be together in your last minutes of life? Do not leave any regrets and enjoy yourself as much as possible. I plan to play diablo 3 games all day. Buy diablo 3 gold to do diablo 3 power leveling. Do you want to join me?

    ReplyDelete
  8. hey, i have been looking for this kind of informative articles for such a long time, and i am really lucky to find out your work here.It is useful when i do that by myself or could make me know more clear on dealing with these issues. buy runescape gold , runescape gold

    ReplyDelete
  9. They are all beautiful and fashionable i have to say, and my friends told me they are of good quality as well. I have not see post good enough like yours here.
    More tags:
    wow gold for cheap

    world of warcraft money

    gold for wow cheap
    cheap gold for wow

    cheapest gold for wow
    world of warcraft sale

    wow gold cheap buy





    ReplyDelete
  10. Edit your project's Launch Configuration to use the your Product Configuration instead of Eclipse Application. Verify that it works well.swtor gold
    buy swtor gold
    cheap swtor gold
    tor credits
    buy tor credits
    cheap tor credits

    ReplyDelete
  11. Before you do this, you must already create an Eclipse RCP Application class that implements IApplication and register it as an Eclipse extension in your plugin.xml.guild wars 2 gold
    buy guild wars 2 gold
    cheap guild wars 2 gold
    cheapest guild wars 2 gold
    guild wars 2 gold for sale

    ReplyDelete
  12. This is a great post, i like it very much. I am very much interested in these types of topics from childhood and it's my habit to read this. I'm a editor of game site, you can visit and find diablo 3 gold, Thanks so much for your love to all.

    ReplyDelete
  13. That is really cool. Thanks for finding it. Some really good ideas there, this is going to be a real time sink. I am a china tour lover,You can learn more: China vacation packages | China tour operator | China travel packages

    ReplyDelete
  14. Thanks for the infromation about the ABOUT dialog :)

    Could you please provide a detailed information about implementing the Welcom Page (Intro part) for the application?

    I have implemented the Welcome page using the IIntroPart (this is not html or xml based) but by implementing the IIntroPart in my application. The problem is when the user tries to open any perspectiv (through "Window -> Open Perspective -> MyPerspective") when the welcome page is still visible (not closed), then the welcome page is getting closed (am closing it manually by adding the part listener to my IIntroPart class). But when the welcome page is closed, the selected perspective is not shown. Am empty part is visible but not my perspective. But the perspective shortcut bar is getting updated with the perspective that i have selected.

    Any help on this is welcomed...am using eclipse 3.6.2

    Thanks

    ReplyDelete
  15. It's a good deal better ones compared to plastic-type material ones with retailers on a Billige Smartphones ohne Vertrag online bestellen regular basis.

    ReplyDelete
  16. All Hanbridge instructors are accredited language teachers, native speakers of Mandarin, and have obtained a Bachelor's or Master's Degree. in language. All have standard Mandarin pronunciation and have completed Hanbridge's rigorous training program.Most importantly, they are committed to and enthusiastic about teaching and have a passion to help people learn to speak Mandarin and learn about Chinese culture.



    More Chinese learning tags : Mandarin Online Course | study Chinese online | learning to speak Chinese

    ReplyDelete
  17. Nice article, thanks for the information. It's very complete information. I will bookmark for next reference
    jaring futsal | jaring golf | jaring pengaman proyek |
    jaring pengaman bangunan | jaring pengaman gedung
    http://www.jual-jaring.blogspot.com/
    http://www.agen-jaring.blogspot.com/
    http://www.pancasamudera-safetynet.blogspot.com/
    http://www.toko-jaring.blogspot.com/
    http://www.pusat-jaring.blogspot.com/
    http://jualjaringpengaman.blogspot.com/
    https://pancasamudera.wordpress.com/
    https://pasangjaringfutsal.wordpress.com/
    https://jualtambangmurah.wordpress.com/
    https://tokojaring.wordpress.com/
    https://jualjaringfutsal.wordpress.com/
    https://jaringfutsal.wordpress.com/

    ReplyDelete
  18. Edit your project's Launch Configuration to use the your Product Configuration instead of Eclipse Application. Verify that it works well.
    meizu mx5
    xiaomi redmi note 2
    meizu m2

    ReplyDelete
  19. This comment has been removed by the author.

    ReplyDelete