Rich Client Platform - PowerPoint PPT Presentation

About This Presentation
Title:

Rich Client Platform

Description:

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 ... – PowerPoint PPT presentation

Number of Views:289
Avg rating:3.0/5.0
Slides: 32
Provided by: csPutPoz9
Category:
Tags: client | platform | rich

less

Transcript and Presenter's Notes

Title: Rich Client Platform


1
Rich Client Platform
2
Plan
  • Przyklad RCP Klient Mail
  • Intro
  • Update site

3
Przyklad RCP Klient Mail
4
Przyklad RCP Klient Mail
5
Przyklad RCP Klient Mail
6
Przyklad RCP Klient Mail
7
Przyklad RCP Klient Mail
8
Klient Mail
9
Klient Mail
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
Klient Mail
public class Application implements IApplication
public Object start(IApplicationContext
context) // ... // PlatformUI.createAndRunWo
rkbench(...) // ... public void stop()
// ... // workbench.close() // ...
11
Klient Mail
12
Cwiczenie
13
Cwiczenie Podpowiedz
ApplicationActionBarAdvisor _at_Override protected
void fillStatusLine(IStatusLineManager
statusLine) statusLine.add(exitAction) status
Line.add(messagePopupAction) ApplicationWorkb
enchWindowAdvisor configurer.setShowStatusLine(t
rue)
14
Klient Mail
public class ApplicationWorkbenchAdvisor
extends WorkbenchAdvisor public
WorkbenchWindowAdvisor createWorkbenchWindowAdv
isor (IWorkbenchWindowConfigurer configurer)
return new ApplicationWorkbenchWindowAd
visor (configurer) public String
getInitialWindowPerspectiveId() return
PERSPECTIVE_ID public void
preStartup() public void postStartup() public
boolean preShutdown() public void
postShutdown()
Nasza klasa!
Miejsce na przygotowanie srodowiska
15
Klient Mail
public class ApplicationWorkbenchWindowAdvisor
extends WorkbenchWindowAdvisor public
ActionBarAdvisor createActionBarAdvisor (IActionB
arConfigurer configurer) return new
ApplicationActionBarAdvisor(configurer)
public void preWindowOpen() IWorkbenchWindowC
onfigurer configurer getWindowConfigurer() con
figurer.setInitialSize(new Point(600,
400)) configurer.setShowCoolBar(true) configur
er.setShowStatusLine(true) public void
postWindowRestore() public void
postWindowCreate() public void
postWindowOpen() public boolean
preWindowShellClose()
Nasza klasa!
16
Klient Mail
To juz bylo!!!
17
EbayManager
Poznalismy RCP, wracamy do naszej aplikacji
18
Intro
  • Hand made Intro
  • Universal Intro

19
Intro
  • Punkt rozszerzen
  • 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
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.getDis
play().getSystemColor( SWT.COLOR_TITLE_BAC
KGROUND_GRADIENT)) Label label new
Label(outerContainer, SWT.CENTER)
label.setText("WELCOME TO ECLIPSE") GridData
gd new GridData(GridData.GRAB_HORIZONTAL
GridData.GRAB_VERTICAL) gd.horizontalAlignmen
t GridData.CENTER gd.verticalAlignment
GridData.CENTER label.setLayoutData(gd)
label.setBackground(outerContainer.getDisplay().ge
tSystemColor( SWT.COLOR_TITLE_BACKGROUND_G
RADIENT)) _at_Override public void setFocus()
public void standbyStateChanged(boolean
standby)
21
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 productsplash.bmp
  • IntroBrandingImageText eBayManager

Alternatywny napis zamiast obrazka
22
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 productsplash.bmp
  • IntroBrandingImageText eBayManager

Alternatywny napis zamiast obrazka
23
Update Site
  • Update Manager zarzadza feature'ami
  • Najpierw potrzebujemy Feature!

24
Feature
  • Nowy Feature Project org.ess.ebaymanager.feature
  • Pluginy org.ess.ebaymanager.
  • Uzupelniamy Information
  • Plugins -gt Download Size/Installation Size
  • Gotowe!
  • Co dalej?
  • Patrz karta Overview

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

26
Update Site c.d.
  • Synchronize -gt aktualizacja numerów wersji
  • Build All -gt Tworzymy Update Site

27
Update Site c.d.
  • Sprawdzmy czy dziala
  • New Local Site
  • katalog workspace/org.ess.ebaymanager.updatesite

28
Update Manager
  • Pora dodac Update Manager do eBayManager
  • Nowe opcje do menu help pluginu .editor

ltextension point"org.eclipse.ui.actionSets"gt
ltactionSet label"Software Updates"
visible"true"
id"org.ess.softwareUpdates"gt ltmenu
label"Software Updates"
path"help/helpEnd"
id"org.ess.updateMenu"gt ltseparator
name"group0"gt lt/separatorgt
ltseparator name"group1"gt lt/separatorgt
lt/menugt ltaction
class"org.ess.ebaymanager.actions.ConfigurationMa
nagerAction" helpContextId"org.
eclipse.update.ui.newUpdates"
id"my.rcp.app.ui.configManager"
label"Manage Configuration..."
menubarPath"help/org.ess.updateMenu/group0"gt
lt/actiongt ltaction
label"Find and Install..."
helpContextId"org.ess.newUpdates"
class"org.ess.ebaymanager.actions.FindInstal
lAction" menubarPath"help/org
.ess.updateMenu/group0"
id"my.rcp.app.ui.newUpdates"gt
lt/actiongt lt/actionSetgt
lt/extensiongt
29
Update Manager Akcje
  • W pakiecie org.ess.ebaymanager.actions Tworzymy
    klasy
  • ConfigureManagerAction
  • FindInstallAction
  • Brakujace zaleznosci w plugin.xml

FindInstallAction.run() UpdateManagerUI.openInst
aller(window.getShell()) ConfigureManagerAction
.run() UpdateManagerUI.openConfigurationManager(w
indow.getShell())
30
Update Manager
31
Pytania?
  • Dziekuje za uwage!
Write a Comment
User Comments (0)
About PowerShow.com