Your SlideShare is downloading. ×
Multi-Configuration support in MTJ
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Multi-Configuration support in MTJ

678
views

Published on

EclipseCon 2009 presentation

EclipseCon 2009 presentation


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
678
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Hello everyone, I am Wang Feng from Sybase. I will talk about the multi-configuration support for MTJ – the Mobile Tools for Java.
  • Because preprocessing is very important for build for multi-target, so we add preprocess content assist support to Java editor. Which can help user to write preprocess block. The content assist can propose Antenna preprocess directives.
  • Because preprocessing is very important for build for multi-target, so we add preprocess content assist support to Java editor. Which can help user to write preprocess block. The content assist can propose Antenna preprocess directives.
  • Because preprocessing is very important for build for multi-target, so we add preprocess content assist support to Java editor. Which can help user to write preprocess block. The content assist can propose Antenna preprocess directives.
  • Because preprocessing is very important for build for multi-target, so we add preprocess content assist support to Java editor. Which can help user to write preprocess block. The content assist can propose Antenna preprocess directives.
  • Because preprocessing is very important for build for multi-target, so we add preprocess content assist support to Java editor. Which can help user to write preprocess block. The content assist can propose Antenna preprocess directives.
  • Because preprocessing is very important for build for multi-target, so we add preprocess content assist support to Java editor. Which can help user to write preprocess block. The content assist can propose Antenna preprocess directives.
  • Transcript

    • 1. Multi-Configuration Support for MTJ (Mobile Tools for Java) Feng (Marvin) Wang Gang (Allen) Ma Gustavo de Paula
    • 2. Agenda
      • DSDP MTJ Overview
      • Device Fragmentation Problem
      • Possible Solutions
      • Java preprocessing
      • Multi-Configuration Concepts & Use cases
      • Code assist
      • Demo
    • 3. DSDP MTJ Overview
      • Glue between the Eclipse IDE and the JavaME SDKs (emulators)
      • MTJ does NOT provide the SDKs
      • Each vendor provides their own SDKs
      • MTJ provide the basic developer workflow
        • Import JavaME SDK (each SDK has several devices associated to it)
        • Create MIDlet Suite Project
        • Build Project
        • Create Deployment Package
      Eclipse Platform JDT MTJ SDK Extens. Vendor A JavaME SDK Vendor B JavaME SDK Vendor C JavaME SDK UEI Vendor Proprietary Protocol UEI
    • 4. Device Fragmentation Problem 1 Billion JavaME Devices Hardware Software Carrier
      • Display size, color
      • Number of keys
      • Accelerometer
      • Different APIs
      • APIs with optional
      • Components
      • Proprietary APIs
      • File name
      • Requirements
      • Localization
      • MIDlet Requirements
      Hard to do Professional JavaME Development Fragmentation
    • 5. Possible Solutions
      • Standardize everything
      • Almost impossible to happen
      • Everyone wants to be different
      • Applications want to use device specific features
      Live with the problem and adapt
      • Old and good preprocessing
      • Not available in standard Java
      • There are some external preprocessing solutions
      • Device Database
      • There are databases on the internet (proprietary and GPL)
      • MTJ can import databases
    • 6. MTJ Approach: Live with the Problem and Adapt
      • Antenna preprocessor
      MTJ Java Code Preprocessor Multi-Configuration Preprocessor Code Assist
      • Each project can have multiple runtimes
      • Each runtime defines preprocessor tags (Symbols)
      • Symbols are used on the code assist
    • 7. Antenna Preprocessor
      • Antenna is a open source project created on 2002 ( http:// antenna.sourceforge.net / )
      • Defines several JavaME build related tools
        • Build, Obfuscate, Package, Sign, Deploy and Preprocess
      • Preprocessor defines
        • Preprocessor language
        • Input  java code with preprocessor symbols
        • Output  preprocessed java code
      //#if ScreenWidth>100 && ScreenHeight>120 do something; //#else do something else; //#endif
    • 8. Multi-Configuration Concepts: Devices
      • The DeviceImporter knows how to “ talk ” to one SDK
        • Returns all Devices that one SDK have
      • Each device has a DeviceClasspath associated to it
        • ... and a list of APIs
      • Devices are persisted on the DeviceRegistry
    • 9.
      • A Symbol is a pair <name; value>
      • Symbols are organized in SymbolSets
      • Each SymbolSet has a name and a list of Symbols
      • i.e.:
        • Symbols: <screen.width;240>, <screen.height;320>
        • Symbol set: <MOTV3; <screen.width;240>, <screen.height;320>>
      • SymbolDeviceFactory can import devices database and same them on the workspace
      Multi-Configuration Concepts: Symbols
    • 10.
      • A MTJ project has a list of MTJRuntimes
        • Each project has a current active Runtime
      • Each Runtime has
        • A Device
        • A project symbol set (created based on the device properties)
        • A list of workspace SymbolSets
      Multi-Configuration Concepts: Runtimes
    • 11. Multi-Configuration Use Cases: Manage Configurations
      • Create Project Wizard
        • Add, Remove, Edit
      • Select one to be the active
    • 12. Multi-Configuration Use Cases: New/Edit Configuration
      • Select SDK/Device associated to this configuration
      • SymbolSet associated to chosen Device
      • Workspace level SymbolSets (imported from device database)
    • 13. Multi-Configuration Use Cases: Switch Configuration
      • Switch active configuration or manage current configurations
    • 14. Multi-Configuration Use Cases: Build Project
      • All configurations are build on the same time
      • Export antenna build files to be called externally
      • One build for each configuration
        • JAR/JAD
      • Code is preprocessed
      • Build files and symbol files for each configuration
    • 15. Content Assist Preprocess
      • Help user to input preprocess code in Java Editor
      • Preprocess code format
        • Directives
        • Symbols
        • Operators
        • Values
      • All preprocess code starts is “//#”
      //#ifdef mmedia //#ifdef nokia //#if s60_ver==&quot;1.0&quot; import com.nokia.mmapi.v1 //#elif s60_ver==&quot;2.0&quot; import com.nokia.mmapi.v2 //#else import com.nokia.mmapi.def //#endif //#else import javax.microedition.mmapi //#endif //#endif
    • 16.
      • All available directives are presented
      • Brief description of each directive
      Content Assist Directives
    • 17.
      • All symbols provided by all configurations registered on the project are presented
      • Each symbol has
        • Name, Value, if active, provider information
      Content Assist Symbols
    • 18.
      • Propose preprocess template for the user.
      Content Assist Templates After apply:
    • 19.
      • Manage current templates
        • Create new templates
        • Edit current templates
      Content Assist Templates
    • 20. Demo & Thanks! DSDP MTJ Web site: www.eclipse.org/dsdp/mtj DSDP MTJ Wiki: http:// wiki.eclipse.org /DSDP/MTJ Newsgroup: news:// news.eclipse.org/eclipse.dsdp.mtj Developer List: http://dev.eclipse.org/mailman/listinfo/dsdp-mtj-dev
    • 21. Wish list…
      • Preprocess Resources
      • Preprocess full java files
      • Preprocess JAD file
      • Sign based on configuration
      • Improve error handling

    ×