Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007.

Similar presentations


Presentation on theme: "Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007."— Presentation transcript:

1 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Rich Client Platform

2 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Plan Przykład RCP: Klient Mail Intro Update site

3 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Przykład RCP: Klient Mail

4 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007

5 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007

6 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007

7 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007

8 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Klient Mail

9 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 public class Activator extends AbstractUIPlugin { public static final String PLUGIN_ID = "mailClient"; public void start(BundleContext context) public void stop(BundleContext context) public static Activator getDefault() public static ImageDescriptor getImageDescriptor(String path)

10 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Klient Mail public class Application implements IApplication { public Object start(IApplicationContext context) { //... // PlatformUI.createAndRunWorkbench(...); //... } public void stop() { //... // workbench.close(); //... }

11 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Klient Mail

12 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Ćwiczenie

13 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Ćwiczenie: Podpowiedź protected void fillStatusLine(IStatusLineManager statusLine) { statusLine.add(exitAction); statusLine.add(messagePopupAction); } ApplicationWorkbenchWindowAdvisor: configurer.setShowStatusLine(true);

14 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Klient Mail public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor { public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor (IWorkbenchWindowConfigurer configurer) { return new ApplicationWorkbenchWindowAdvisor (configurer); } public String getInitialWindowPerspectiveId() { return PERSPECTIVE_ID; } public void preStartup() public void postStartup() public boolean preShutdown() public void postShutdown() } Miejsce na przygotowanie srodowiska Nasza klasa!

15 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Klient Mail public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { public ActionBarAdvisor createActionBarAdvisor (IActionBarConfigurer configurer) { return new ApplicationActionBarAdvisor(configurer); } public void preWindowOpen() { IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); configurer.setInitialSize(new Point(600, 400)); configurer.setShowCoolBar(true); configurer.setShowStatusLine(true); } public void postWindowRestore() public void postWindowCreate() public void postWindowOpen() public boolean preWindowShellClose() } Nasza klasa!

16 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Klient Mail To już było!!!

17 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 EbayManager Poznalismy RCP, wracamy do naszej aplikacji

18 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Intro Hand made Intro Universal Intro

19 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse 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 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Intro Klasa MyIntroPart public class MyIntroPart extends IntroPart { public void 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)); public void setFocus() { } public void standbyStateChanged(boolean standby) { }

21 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse 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 Alternatywn y napis zamiast obrazka

22 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse 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 Alternatywn y napis zamiast obrazka

23 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Update Site Update Manager zarządza feature'ami Najpierw potrzebujemy Feature!

24 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse 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 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Update Site Nowy Update Site project Nazwa: org.ess.ebaymanager.updatesite Generate a web page listing all features: YES

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

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

28 Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007 Update Manager Pora dodać Update Manager do eBayManager Nowe opcje do menu help pluginu.editor:


Download ppt "Jacek Pospychała Pospychała Eclipse Summer School 2007Eclipse Summer School 2007."

Similar presentations


Ads by Google