ESE 2009 - Customize RCP UI using Presentations API
-
Upload
sebastien-moran -
Category
Technology
-
view
4.790 -
download
0
description
Transcript of ESE 2009 - Customize RCP UI using Presentations API
![Page 1: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/1.jpg)
Customizing RCP UI using the Presentations API
Sébastien Moran
Eclipse Summit Europe 2009
1 Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 2: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/2.jpg)
Agenda
Context
RCP Customization & Presentations API
Demo
UI Tips & Tricks
Conclusion
Questions
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 3: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/3.jpg)
3
Sierra Wireless
• Formerly know as “Anyware Technologies”
• Third quarter of 2009 : Sierra Wireless - Solutions & Services
AirCard® Embedded
Solutions & Services
IntelligentGateways
Four product categories…
…serving a diversified set of segments in
mobile computing and machine-to-
machine
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 4: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/4.jpg)
4
Expresso
Discovery & Learn tool
• Fast configuration of modems
• Easy access to basic features
User friendly
• Intuitive graphical user interface
• One click shows both ATCommand & its result
Features
• SMS & Voice call configuration
• AT Console View
• Photographic help system
• …
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 5: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/5.jpg)
5
Initial work
“Classical” RCP Application
OS native look & feel
Eclipse visual flavor
Several Perspectives
One per discovery thematic
Aggregates several views
Several Views
One per specific discovery feature
Can be used in several
perspectives
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 6: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/6.jpg)
6 Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 7: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/7.jpg)
7
“Great ! It works like a charm.
But … it really looks like Eclipse... We have to
add some UI love !”
Product Manager remarks
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 8: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/8.jpg)
8
Graphical Designer Mockup
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 9: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/9.jpg)
9
Developer thoughts
What am I gonna do ?!
Ask my best friends :
Use Presentations API !
&
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 10: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/10.jpg)
Agenda
Context
RCP Customization & Presentations API
Demo
UI Tips & Tricks
Conclusion
Questions
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 11: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/11.jpg)
11
Why ?
Over heard
“[..] It really looks like Eclipse [..]
“Do I need Eclipse to use your application ?”
Eclipse Look & Feel ?
The way editors and views are shown.
Custom tabs Look & Feel
Perspectives switcher
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 12: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/12.jpg)
12
If you don’t like it – change it !
Presentations API
• Control the look and feel of views and editors
Workbench Customization
• Customize the content area
• Customize the window’s shape
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 13: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/13.jpg)
13
Presentations API Concepts
Presentation
Look & Feel extension for Workbench
parts
Manage the trim and layout of
parts’ areas (Part stacks)
Presentation Part
Editor
View
Presentation Factory
Editors presentation
stacks
Views presentation
stacks
Extension Point
Register a presentation
factory
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 14: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/14.jpg)
14
Presentation Responsibilities
Create part stacks’ trim
Tabs
Title
System menu
Part management buttons
Borders
Control layout & visibility
Parts
Toolbars
View menus
Drag & Drop regions
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 15: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/15.jpg)
15
More details
Eclipse Con 2005 presentation slides• eclipsecon2005-presentationsAPI.ppt
Retrieve them from eclipse CVS repository• org.eclipse.ui.examples.presentation
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 16: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/16.jpg)
16
Workbench customization
Next step : change the application window's layout
• WorbenchWindowAdvisor participates in window creation
• Control things in the Worbench that regular plug-ins can't
• Perfect Presentations API's complement
• Adapt Workbench default layout to your needs
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 17: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/17.jpg)
17
Expresso Customizations
Presentations API
• Customize Parts' stacks display
Workbench customization
• Specific window’s shape
• Specific workbench layout
• Specific perspective switcher
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 18: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/18.jpg)
Expresso Customizations
18 Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 19: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/19.jpg)
Agenda
Context
RCP Customization & Presentations API
Demo
UI Tips & Tricks
Conclusion
Questions
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 20: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/20.jpg)
Agenda
Context
RCP Customization & Presentations API
Demo
UI Tips & Tricks
Conclusion
Questions
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 21: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/21.jpg)
Three states widgets
21
Single image containing all
widget’s states
• Normal
• Hover
• Clicked & Selected
Specific image's region is
paint depending on the state
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 22: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/22.jpg)
Shells decorations
22
Custom dialog without trim• SWT.NO_TRIM
Create SWT Regions to
define the Shell's shape• org.eclipse.mylyn.commons.ui
• AbstractNotificationPopup.java
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 23: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/23.jpg)
Agenda
Context
RCP Customization & Presentations API
Demo
UI Tips & Tricks
Conclusion
Questions
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 24: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/24.jpg)
24
Conclusion
First of all: You NEED a Graphic Designer
StackPresentation implementation is the most tricky part
• Start from the examples– org.eclipse.ui.examples.presentation
– org.eclipse.ui.presentations.r21
SWT Graphics knowledge
• Mandatory for Shell's shape customization & custom widgets
• Eclipse article– http://www.eclipse.org/articles/Article-SWT-graphics/SWT_graphics.html
Eclipse's future of UI customization : e4
• Modeled Workbench
• CSS styling
Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0
![Page 25: ESE 2009 - Customize RCP UI using Presentations API](https://reader034.fdocuments.in/reader034/viewer/2022052602/559c58551a28ab0c588b4657/html5/thumbnails/25.jpg)
Questions ?
Sébastien Moran
25 Customizing RCP UI using the Presentations API - © 2009 Sierra Wireless, made available under EPL V1.0