SlideServe
Menu
Préférences
© SlideServe · v2026

The Launching Framework in Eclipse

lucinda-adriano avatar
7 diapositives · 226 Views · Nov 15, 2014

The Launching Framework in Eclipse. Cheng-Chia Chen. Outlines. source: http://www.eclipse.org/articles/Article-Launch-Framework/launch.html Eclipse's launching capabilities depend entirely on the current set of installed plug-ins. API available to build launching plug-ins and

The Launching Framework in Eclipse - slide 1
01 / 7The Launching Framework in Eclipse
1 / 17

Télécharger la présentation

The Launching Framework in Eclipse
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. The Launching Framework in Eclipse Cheng-Chia Chen

  2. Outlines • source: • http://www.eclipse.org/articles/Article-Launch-Framework/launch.html • Eclipse's launching capabilities • depend entirely on the current set of installed plug-ins. • API available to build launching plug-ins and • developing an example launcher using this API. • Prerequisites: • basic understanding of Eclipse plug-in architecture • understanding the structure of plugin.xml • knowledge of java and java environment

  3. What is launching ? • launching is defined as running or debugging a program from within Eclipse. • alauncher is a set of Java classes that live in an Eclipse plug-in that performs launching. • The base Eclipse workbench has no launcher. • It is only through plug-ins that Eclipse gains the ability to launch. • The Eclipse SDK does ship with a set of useful launchers for launching • local Java applications & Java applets, • connecting to remote Java applications, • JUnit test suites and • starting an Eclipse workbench, • if none of these satisfy your needs, you may need to write your own launcher.

  4. The framework • two main classes: • LaunchConfiguration • the cookies • LaunchConfigurationType • the cookie cutters • Example: run a HelloWorld.java program • configurations: • main class name: ‘HelloWorld’ • JRE to use: 1.4.2 • program and VM arguments • classpath,… • type: local Java Application' • means only this type knows how to make sense of this config and how to launch it.

  5. The Java applet example • an example actually part of eclipse SDK • non-UI parts living in org.eclipse.jdt.launching plug-in, and • UI parts contained in org.eclipse.jdt.debug.ui plug-in. • Declaring and implementing a launch configuration type • Declaring and implementing a launch configuration type icon • Declaring and implementing a tab group • Declaring and implementing launch shortcuts • Declaring and implementing launch groups • Declaring and implementing a launch configuration comparator • Putting it all together

  6. Declaring a launch configuration type <extension point="org.eclipse.debug.core.launchConfigurationTypes"> <launchConfigurationType name="Java Applet" delegate="org.eclipse.jdt.internal.launching.JavaAppletLaunchConfigurationDelegate" modes="run, debug" id="org.eclipse.jdt.launching.javaApplet"> </launchConfigurationType> </extension> Notes: • The delegate class must implement the interface:org.eclipse.debug.core.model.ILaunchConfigurationDelegate. it is the brains of the launcher, and implements the launch() method which launches a specified config. • modes can be run or debug or both. can affect how the the configs appear in UI. if in both mode, launch() should handle both.

  7. Declaring a launch configuration type Notes: 3. optional boolean attributes: • private • ture => can be launched by programs only. • false[default] => can appear in UI. • category • discussed later