• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Eclipse Launching Framework
 

Eclipse Launching Framework

on

  • 3,464 views

 

Statistics

Views

Total Views
3,464
Views on SlideShare
3,464
Embed Views
0

Actions

Likes
2
Downloads
0
Comments
2

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

12 of 2 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Sorry, I didn't have sources now. I think you can find useful source snippets in http://www.eclipse.org/articles/Article-Launch-Framework/launch.html.
    Are you sure you want to
    Your message goes here
    Processing…
  • Thank you for sharing this great presentation. Is the prototype source code also available somewhere?
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • D:works <br /> untime-EclipseApplication.metadata.pluginsorg.eclipse.debug.core.launches config1.launch

Eclipse Launching Framework Eclipse Launching Framework Presentation Transcript

  • Eclipse Launching Framework
    • brief introduction and prototype example
    [email_address] 2010.08
  • 1. Introduction What is Launching? debug.core LaunchConfigurationTypes LaunchConfiguration debug.ui LaunchConfigurationDialog TabGroup Shortcuts 2. Prototype Demo (Run)
  • 1. Introduction
  • What is Launching? Launching - running or debugging a program from within Eclipse Launcher - a set of Java classes that live in an Eclipse plug-in that performs launching - launcher for Java application, JUnit test suites, ... - What for YOUR application? Launching Framework - extension mechanism - Separating model and UI - debug.core - debug.ui
  • debug.core: Launching Framework’s model LaunchConfigurationTypes - cookie cutters - how to launch certain types of launch - Java Application LaunchConfigurations - cookie made from cutters - information necessary to perform a launch - it’s just key/value pair - boolean, int, Map, List, String - main class, JRE, VM arguments, ...
  • LaunchConfigurationTypes Extension point: org.eclipse.debug.core.launchConfigurationTypes Interface: org.eclipse.debug.core.model.ILaunchConfigurationDelegate Method: launch(ILaunchConfiguration configuration, ...) <extension point=&quot;org.eclipse.debug.core.launchConfigurationTypes&quot;> <launchConfigurationType delegate=&quot;test.launch.LaunchConfigurationDelegate&quot; delegateName=&quot;test.launch.LaunchConfigurationDelegate&quot; id=&quot;test.launch.launchConfigurationType&quot; modes=&quot;debug,run&quot; name=&quot;Test Launcher&quot;> </launchConfigurationType> </extension>
  • debug.ui: Launching Framework’s UI LaunchConfigurationDialog Icon TabGroup - utilize “Jigloo” Shortcuts - ‘Run As’ - no Dialog - create, set to default values and launch in a click - launch(ISelection selection, ...) - launch(IEditorPart editor, ...)
  • Icon Extension point: org.eclipse.debug. ui.launchConfigurationTypeImages <extension point=&quot;org.eclipse.debug.ui.launchConfigurationTypeImages&quot;> <launchConfigurationTypeImage configTypeID=&quot;test.launch.launchConfigurationType&quot; icon=&quot;res/emu.png&quot; id=&quot;test.launch.launchConfigurationIcon&quot;> </launchConfigurationTypeImage> </extension>
  • TabGroup (1) Extension point: org.eclipse.debug.ui.launchConfigurationTabGroups Interface: org.eclipse.debug.ui.ILaunchConfigurationTabGroup Method: createTabs(ILaunchConfigurationDialog dialog, ...) <extension point=&quot;org.eclipse.debug.ui.launchConfigurationTabGroups&quot;> <launchConfigurationTabGroup class=&quot;test.launch.LaunchTabGroup&quot; id=&quot;test.launch..LaunchTabGroup&quot; type=&quot;test.launch.launchConfigurationType&quot;> </launchConfigurationTabGroup> </extension>
  • TabGroup (2) Steps: 1. write your own tab - must implement ILaunchConfigurationTab - write UI code in createControl() // Jigloo comes in! - value copying methods - setDefaults() ; called when a new config is created - performApply() ; read from GUI - initializeFrom() ; read from config 2. write createTabs() - construct an array of ILaunchConfigurationTab - setTabs() Notice: - Extend AbstractLaunchConfigurationTab - Include [common] tab
  • Time to launch Steps: 1. write your own launcher - must implement ILaunchConfigurationDelegate - write code in launch() - ILaunchConfiguration ; config - mode ; Run or Debug - ILaunch ; DebugTarget/Process - IProgressMonitor ; monitor - Construct a command line and pass it to Runtime.exec() - Create debug targets/processes and add to the ILaunch object Notice: - Extend LaunchConfigurationDelegate - Check monitor ex.)) user cancelled
  • Advanced concepts Launch Group - “category” - built-in: Run, Debug, External Tools Comparator
  • 2. Prototype Demo (Run)
  • Steps to run Edit MANIFEST.MF Require-Bundle : org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.debug.core;bundle-version=&quot;3.5.1&quot;, org.eclipse.debug.ui;bundle-version=&quot;3.5.2&quot;, org.eclipse.jdt.launching;bundle-version=&quot;3.5.1“ org.eclipse.jdt.debug.ui;bundle-version=&quot;3.4.1&quot; Run Eclipse Application - Create project - Choose [Run Configurations...]
  • References & ToDo Item References: - We Have Lift-off: The Launching Framework in Eclipse http://www.eclipse.org/articles/Article-Launch-Framework/launch.html ToDo: - Debug artifacts - IDebugElement, IDebugTarget, IProcess - ISuspendResume, IBreakpointListener