1 / 31

Rich Client Platform

Rich Client Platform. Plan. Przykład RCP: Klient Mail Intro Update site. Przykład RCP: Klient Mail. Przykład RCP: Klient Mail. Przykład RCP: Klient Mail. Przykład RCP: Klient Mail. Przykład RCP: Klient Mail. Klient Mail. Klient Mail. public class Activator extends AbstractUIPlugin {

kimberly
Download Presentation

Rich Client Platform

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Eclipse Summer School 2007 Rich Client Platform

  2. Eclipse Summer School 2007 Plan • Przykład RCP: Klient Mail • Intro • Update site

  3. Eclipse Summer School 2007 Przykład RCP: Klient Mail

  4. Eclipse Summer School 2007 Przykład RCP: Klient Mail

  5. Eclipse Summer School 2007 Przykład RCP: Klient Mail

  6. Eclipse Summer School 2007 Przykład RCP: Klient Mail

  7. Eclipse Summer School 2007 Przykład RCP: Klient Mail

  8. Eclipse Summer School 2007 Klient Mail

  9. Eclipse Summer School 2007 Klient Mail publicclass Activator extends AbstractUIPlugin { publicstaticfinal String PLUGIN_ID = "mailClient"; publicvoid start(BundleContext context) publicvoid stop(BundleContext context) publicstatic Activator getDefault() publicstatic ImageDescriptor getImageDescriptor(String path)

  10. Eclipse Summer School 2007 Klient Mail publicclass Application implements IApplication { public Object start(IApplicationContext context) { // ... // PlatformUI.createAndRunWorkbench(...); // ... } publicvoid stop() { // ... // workbench.close(); // ... } }

  11. Eclipse Summer School 2007 Klient Mail

  12. Eclipse Summer School 2007 Ćwiczenie

  13. Eclipse Summer School 2007 Ćwiczenie: Podpowiedź ApplicationActionBarAdvisor: @Override protectedvoid fillStatusLine(IStatusLineManager statusLine) { statusLine.add(exitAction); statusLine.add(messagePopupAction); } ApplicationWorkbenchWindowAdvisor: configurer.setShowStatusLine(true);

  14. Eclipse Summer School 2007 Klient Mail publicclass ApplicationWorkbenchAdvisor extends WorkbenchAdvisor { public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor (IWorkbenchWindowConfigurer configurer) { returnnew ApplicationWorkbenchWindowAdvisor (configurer); } public String getInitialWindowPerspectiveId() { returnPERSPECTIVE_ID; } publicvoid preStartup() publicvoid postStartup() publicboolean preShutdown() publicvoid postShutdown() } Nasza klasa! Miejsce na przygotowanie srodowiska

  15. Eclipse Summer School 2007 Klient Mail publicclass ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { public ActionBarAdvisor createActionBarAdvisor (IActionBarConfigurer configurer) { returnnew ApplicationActionBarAdvisor(configurer); } publicvoid preWindowOpen() { IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); configurer.setInitialSize(new Point(600, 400)); configurer.setShowCoolBar(true); configurer.setShowStatusLine(true); } publicvoid postWindowRestore() publicvoid postWindowCreate() publicvoid postWindowOpen() publicboolean preWindowShellClose() } Nasza klasa!

  16. Eclipse Summer School 2007 Klient Mail To już było!!!

  17. Eclipse Summer School 2007 EbayManager Poznalismy RCP, wracamy do naszej aplikacji

  18. Eclipse Summer School 2007 Intro • “Hand made” Intro • Universal Intro

  19. Eclipse Summer School 2007 Intro • Punkt rozszerzeń • org.eclipse.ui.intro Id: org.ess.ebaymanager.product.intro Class: org.ess.ebaymanager.product.MyIntroPart Icon: icons/icon.jpg • IntroProductBinding ProductId: org.ess.ebaymanager.product.product IntroId: org.ess.ebaymanager.product.intro

  20. Eclipse Summer School 2007 Intro • Klasa MyIntroPart publicclass MyIntroPart extends IntroPart { publicvoid createPartControl(Composite parent) { Composite outerContainer = new Composite(parent, SWT.NONE); GridLayout gridLayout = new GridLayout(); outerContainer.setLayout(gridLayout); outerContainer.setBackground(outerContainer.getDisplay().getSystemColor( SWT.COLOR_TITLE_BACKGROUND_GRADIENT)); Label label = new Label(outerContainer, SWT.CENTER); label.setText("WELCOME TO ECLIPSE"); GridData gd = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL); gd.horizontalAlignment = GridData.CENTER; gd.verticalAlignment = GridData.CENTER; label.setLayoutData(gd); label.setBackground(outerContainer.getDisplay().getSystemColor( SWT.COLOR_TITLE_BACKGROUND_GRADIENT)); } @Override publicvoid setFocus() { } publicvoid standbyStateChanged(boolean standby) { } }

  21. Eclipse Summer School 2007 Universal Intro • IntroId: org.eclipse.ui.intro.universal • Wymagany plugin: org.eclipse.ui.intro.universal • W org.ess.ebaymanager.product/plugin.xml • Rozszerzenie org.eclipse.core.runtime.products • Dodajemy properties: • IntroTitle = Welcome To eBayManager • IntroBrandingImage = product:splash.bmp • IntroBrandingImageText = eBayManager Alternatywny napis zamiast obrazka

  22. Eclipse Summer School 2007 Universal Intro • IntroId: org.eclipse.ui.intro.universal • Wymagany plugin: org.eclipse.ui.intro.universal • W org.ess.ebaymanager.product/plugin.xml • Rozszerzenie org.eclipse.core.runtime.products • Dodajemy properties: • IntroTitle = Welcome To eBayManager • IntroBrandingImage = product:splash.bmp • IntroBrandingImageText = eBayManager Alternatywny napis zamiast obrazka

  23. Eclipse Summer School 2007 Update Site • Update Manager zarządza feature'ami • Najpierw potrzebujemy Feature!

  24. Eclipse Summer School 2007 Feature • Nowy Feature Project: org.ess.ebaymanager.feature • Pluginy: org.ess.ebaymanager.* • Uzupełniamy Information • Plugins -> Download Size/Installation Size • Gotowe! • Co dalej? • Patrz karta Overview

  25. Eclipse Summer School 2007 Update Site • Nowy Update Site project • Nazwa: org.ess.ebaymanager.updatesite • Generate a web page listing all features: YES

  26. Eclipse Summer School 2007 Update Site c.d. • Synchronize -> aktualizacja numerów wersji • Build All -> Tworzymy Update Site

  27. Eclipse Summer School 2007 Update Site c.d. • Sprawdźmy czy działa • New Local Site • katalog workspace/org.ess.ebaymanager.updatesite

  28. Eclipse Summer School 2007 Update Manager • Pora dodać Update Manager do eBayManager • Nowe opcje do menu help pluginu .editor: <extensionpoint="org.eclipse.ui.actionSets"> <actionSetlabel="Software Updates" visible="true" id="org.ess.softwareUpdates"> <menulabel="Software Updates" path="help/helpEnd" id="org.ess.updateMenu"> <separator name="group0"> </separator> <separator name="group1"> </separator> </menu> <action class="org.ess.ebaymanager.actions.ConfigurationManagerAction" helpContextId="org.eclipse.update.ui.newUpdates" id="my.rcp.app.ui.configManager" label="Manage Configuration..." menubarPath="help/org.ess.updateMenu/group0"> </action> <actionlabel="Find and Install..." helpContextId="org.ess.newUpdates" class="org.ess.ebaymanager.actions.FindInstallAction" menubarPath="help/org.ess.updateMenu/group0" id="my.rcp.app.ui.newUpdates"> </action> </actionSet> </extension>

  29. Eclipse Summer School 2007 Update Manager: Akcje • W pakiecie org.ess.ebaymanager.actions Tworzymy klasy: • ConfigureManagerAction • FindInstallAction • Brakujące zależnosci w plugin.xml: FindInstallAction.run(): UpdateManagerUI.openInstaller(window.getShell()); ConfigureManagerAction.run(): UpdateManagerUI.openConfigurationManager(window.getShell());

  30. Eclipse Summer School 2007 Update Manager

  31. Eclipse Summer School 2007 Pytania? Dziękuję za uwagę!

More Related