Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 3 commits
  • 54 files changed
  • 0 commit comments
  • 1 contributor
Showing with 458 additions and 642 deletions.
  1. +2 −2 exercises/Exercise_01_Create_RCP_Bundle/README.html
  2. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/add_module_1.png
  3. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/add_module_2.png
  4. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/add_module_3.png
  5. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/build_success.png
  6. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/create_pom.png
  7. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/extract_method.png
  8. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/extract_method_2.png
  9. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/failed_test.png
  10. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/failed_test_maven.png
  11. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/new_junit_testcase_1.png
  12. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/new_junit_testcase_2.png
  13. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/p2_repo_path.png
  14. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/run_junit.png
  15. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/test_impl.png
  16. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/test_success_eclipse.png
  17. BIN  exercises/Exercise_02_Add_Test_Fragment/resources/test_success_maven.png
  18. +38 −43 exercises/Exercise_02_Add_Test_Fragment/tychodemo.parent/README.html
  19. BIN  exercises/Exercise_03_Add_Feature/resources/convert_to_maven.png
  20. +1 −1  exercises/Exercise_03_Add_Feature/tychodemo.bundle.tests/META-INF/MANIFEST.MF
  21. +1 −1  exercises/Exercise_03_Add_Feature/tychodemo.bundle.tests/build.properties
  22. +6 −7 exercises/Exercise_03_Add_Feature/tychodemo.bundle.tests/pom.xml
  23. +0 −18 exercises/Exercise_03_Add_Feature/tychodemo.bundle.tests/src/tychodemo/SimpleTest.java
  24. +16 −0 exercises/Exercise_03_Add_Feature/tychodemo.bundle.tests/src/tychodemo/bundle/handlers/AboutHandlerTest.java
  25. +52 −0 exercises/Exercise_03_Add_Feature/tychodemo.bundle/Application.e4xmi
  26. +21 −3 exercises/Exercise_03_Add_Feature/tychodemo.bundle/META-INF/MANIFEST.MF
  27. +6 −6 exercises/Exercise_03_Add_Feature/tychodemo.bundle/build.properties
  28. 0  exercises/Exercise_03_Add_Feature/tychodemo.bundle/css/default.css
  29. BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/expected_rcp_screenshot.png
  30. BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_about.gif
  31. BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_launcher.icns
  32. BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_launcher.ico
  33. +0 −307 exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_launcher.xpm
  34. BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_window_16.gif
  35. BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_window_32.gif
  36. BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/sample.gif
  37. BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/save_edit.gif
  38. +12 −22 exercises/Exercise_03_Add_Feature/tychodemo.bundle/plugin.xml
  39. +6 −7 exercises/Exercise_03_Add_Feature/tychodemo.bundle/pom.xml
  40. BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/splash.bmp
  41. +11 −42 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/Activator.java
  42. +0 −46 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/Application.java
  43. +0 −20 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/ApplicationActionBarAdvisor.java
  44. +0 −18 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/ApplicationWorkbenchAdvisor.java
  45. +0 −25 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/ApplicationWorkbenchWindowAdvisor.java
  46. +0 −10 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/Perspective.java
  47. +29 −0 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/handlers/AboutHandler.java
  48. +33 −0 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/handlers/OpenHandler.java
  49. +34 −0 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/handlers/QuitHandler.java
  50. +64 −0 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/handlers/SaveHandler.java
  51. +105 −0 exercises/Exercise_03_Add_Feature/tychodemo.bundle/tychodemo.bundle.product
  52. +0 −31 exercises/Exercise_03_Add_Feature/tychodemo.bundle/tychodemo.launch
  53. +10 −23 exercises/Exercise_03_Add_Feature/tychodemo.parent/README.html
  54. +11 −10 exercises/Exercise_03_Add_Feature/tychodemo.parent/pom.xml
View
4 exercises/Exercise_01_Create_RCP_Bundle/README.html
@@ -50,7 +50,7 @@
<img src ="resources/about_3.png" />
</li>
</ul>
- <li>Right-click the <tt>tychodemo.bundle</tt> project and select <tt>Configure > Convert to Maven Project</tt><br/>
+ <li><a name="convert_to_maven"/>Right-click the <tt>tychodemo.bundle</tt> project and select <tt>Configure > Convert to Maven Project</tt><br/>
<img src ="resources/convert_to_maven_1.png" />
</li>
<li>Enter <tt>Group Id: tychodemo</tt>, <tt>Version: 1.0.0-SNAPSHOT</tt>, <tt>Packaging: eclipse-plugin</tt>.<br/>
@@ -63,7 +63,7 @@
<img src ="resources/build_error.png" />
</li>
-<li>Open <tt>pom.xml</tt>, go to Tab "pom.xml". Remove the complete <tt>&lt;build&gt;</tt> element (this is an <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=374742">m2eclipse bug</a>).<br/>
+<li><a name="remove_build_section"/>Open <tt>pom.xml</tt>, go to Tab "pom.xml". Remove the complete <tt>&lt;build&gt;</tt> element (this is an <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=374742">m2eclipse bug</a>).<br/>
<img src ="resources/remove_build_section.png" />
<li> To define the tycho version to be used, add this snippet into <tt>&lt;project&gt;</tt> :
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/add_module_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/add_module_2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/add_module_3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/build_success.png
Deleted file not rendered
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/create_pom.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/extract_method.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/extract_method_2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/failed_test.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/failed_test_maven.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/new_junit_testcase_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/new_junit_testcase_2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/p2_repo_path.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/run_junit.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/test_impl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/test_success_eclipse.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  exercises/Exercise_02_Add_Test_Fragment/resources/test_success_maven.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
81 exercises/Exercise_02_Add_Test_Fragment/tychodemo.parent/README.html
@@ -12,7 +12,7 @@
In this exercise, we will add a simple JUnit test in a fragment to the tychodemo.bundle.<br/>
We will run the test from eclipse as a JUnit plugin test and then show how the test can
-be built and run by Tycho simly by adding a Maven project file <tt>pom.xml</tt>.<br/>
+be built and run by Tycho by converting the test project to a Maven project.<br/>
A failed test will also fail the headless build.<br/>
<br/>
@@ -24,7 +24,11 @@
<li> Import the 2 projects from this folder into the new empty eclipse workspace using <tt>File > Import > Maven > Existing Maven Projects</tt><br/>
<img src="../resources/import.png"/>
</li>
-<li>Right-click on tychodemo.parent, <tt>Run As > Maven install</tt><br/>
+<li><a name="change_p2_url"/> Open <tt>pom.xml</tt> in <tt>tychodemo.parent</tt> and change the file URL to point to the folder <tt>tutorial/p2_repository/</tt> which you copied earlier from the USB stick:<br/>
+<img src="../resources/p2_repo_path.png"/>
+
+</li>
+<li>Right-click on tychodemo.parent, <tt>Run As > Maven build</tt>, enter Goals: <tt>clean install</tt>.<br/>
The build should succeed and build 2 modules:<br/>
<img src="../resources/build_success.png"/>
</li>
@@ -40,28 +44,29 @@
</tr>
</table>
<br/>
- Notes: <ul>
- <li>Make sure the new project root folder is located next to the existing modules
- (Uncheck "Use default location" in the project creation wizard and enter location if necessary)
- </li>
- <li>As opposed to classic maven projects, tests are always in a separate module
+ Note:
+ As opposed to classic maven projects, tests are always in a separate module
because otherwise we would pollute productive code with test-scoped dependencies in MANIFEST. <br/>
We use a fragment because:
<ol>
<li> otherwise we would have to export packages of classes under test in MANIFEST</li>
<li>we want to be able to test package-private members</li>
</ol>
- </li>
- </ul>
</li>
-<li> In the fragment project, create a new JUnit test case <tt>tychodemo.SimpleTest</tt>
+<li>
+First we create a method which we want to test: <br/>
+Open <tt>AboutHandler.java</tt>, select the about text String and extract it into method <tt>getGreeting()</tt> with default visibility (package-private) using <tt>Refactor > Extract Method</tt><br/>
+<img src="../resources/extract_method.png"/><br/>
+<img src="../resources/extract_method_2.png"/>
+</li>
+<li> In the fragment project, create a new JUnit test case <tt>tychodemo.bundle.handlers.AboutHandlerTest</tt>
<ul>
<li><tt>File > New > Other > JUnit Test Case</tt>
</li>
- <li>choose <tt>tychodemo.bundle.ApplicationWorkbenchAdvisor</tt> as class under test<br/>
+ <li>choose <tt>tychodemo.bundle.handlers.AboutHandler</tt> as class under test<br/>
<img src="../resources/new_junit_testcase_1.png"/>
</li>
- <li>choose <tt>getInitialWindowPerspectiveId()</tt> as test method for which a stub will be created<br/>
+ <li>choose <tt>getGreeting()</tt> as test method for which a stub will be created<br/>
<img src="../resources/new_junit_testcase_2.png"/>
</li>
<li>confirm "Add org.junit to required bundles" if prompted</li>
@@ -79,54 +84,44 @@
<img src="../resources/failed_test.png"/>
</li>
-<li> Add the fragment module to the reactor and run the build:
+<li> Convert the test fragment project to a Maven project and add it as a module to the parent:
<ul>
- <li>Add a pom.xml file to the root of the fragment project using <tt>File > New > File</tt>with content:
- <pre>
- &lt;?xml version="1.0" encoding="UTF-8"?&gt;
- &lt;project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
- &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
- &lt;parent&gt;
- &lt;groupId&gt;tychodemo&lt;/groupId&gt;
- &lt;artifactId&gt;tychodemo.parent&lt;/artifactId&gt;
- &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
- &lt;relativePath&gt;../tychodemo.parent/pom.xml&lt;/relativePath&gt;
- &lt;/parent&gt;
- &lt;groupId&gt;tychodemo&lt;/groupId&gt;
- &lt;artifactId&gt;tychodemo.bundle.tests&lt;/artifactId&gt;
- &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
- &lt;packaging&gt;eclipse-test-plugin&lt;/packaging&gt;
- &lt;/project&gt;
-</pre>
-
- Note the packaging type <tt>eclipse-test-plugin</tt> which indicates this bundle or fragment contains tests which should be executed during build.
+ <li>Same as in <a href="../../Exercise_01_Create_RCP_Bundle/README.html#convert_to_maven">exercise 1</a>, right-click the project <tt>tychodemo.bundle.tests</tt> and choose <tt>Configure > Convert to Maven Project</tt>.</li>
+ <li>Enter groupId: <tt>tychodemo</tt>, Version:<tt>1.0.0-SNAPSHOT</tt> and Packaging: <tt>eclipse-test-plugin</tt><br/>
+ <img src="../resources/create_pom.png"/><br/>
+
+ Note the packaging type <tt>eclipse-test-plugin</tt> which indicates this bundle or fragment contains tests which should be executed during build.<br/>
+ Again, you will get an error <tt>Unknown packaging: eclipse-test-plugin</tt> because the tycho build extension is not configured yet. Ignore this error for now.
</li>
</ul>
+ <li> Same as in <a href="../../Exercise_01_Create_RCP_Bundle/README.html#remove_build_section">exercise 1</a>, remove the unnecessary <tt>&lt;build&gt;</tt> section from the newly created <tt>pom.xml</tt>.
+ </li>
</li>
- <li>Add the module to <tt>&lt;modules&gt;</tt> section of the <a href="pom.xml">parent pom.xml</a>:
- <pre>
- &lt;module&gt;../tychodemo.bundle.tests&lt;/module&gt;
- </pre>
- </li>
- <li> Right-click <tt>tychodemo.parent</tt>, <tt> Run As > Maven install</tt><br/>
+ <li><a name="add_module"/>Add the module to <tt>&lt;modules&gt;</tt> section of the <a href="pom.xml">parent pom.xml</a>:
+ Open <tt>tychodemo.parent/pom.xml</tt>, on the "Overview" tab in the "Modules" section, press <tt>Add...</tt>.<br/>
+ <img src="../resources/add_module_1.png"/><br/>
+ Select <tt>tychodemo.bundle.tests</tt> and <tt>Update POM parent in selected projects</tt>:<br/>
+ <img src="../resources/add_module_2.png"/><br/>
+ Expected result is a new module<br/>
+ <img src="../resources/add_module_3.png"/><br/>
+ and the error <tt>Unknown packaging: eclipse-test-plugin</tt> must be gone now.
+ </li>
+ <li> Right-click <tt>tychodemo.parent</tt>, <tt> Run As > Maven build</tt>, enter Goals: <tt>clean install</tt><br/>
Expected result: build should fail because of the same test failure we just saw in eclipse:<br/>
<img src="../resources/failed_test_maven.png"/>
</li>
<li> Implement the test:
<ul>
- <li>assert that <tt>tychodemo.bundle.perspective</tt> is the return value of
- <tt>tychodemo.bundle.ApplicationWorkbenchAdvisor.getInitialWindowPerspectiveId()</tt><br/>
+ <li>assert that <tt>getGreeting()</tt> contains <tt>"Tycho Demo"</tt></tt><br/>
<img src="../resources/test_impl.png"/>
</li>
<li>test should now succeed when executed in eclipse:<br/>
<img src="../resources/test_success_eclipse.png"/>
</li>
- <li><tt>Run As > Maven install</tt> should also succeed<br/>
+ <li><tt>Run As > Maven build</tt> on <tt>tychodemo.parent</tt> should now also succeed<br/>
<img src="../resources/test_success_maven.png"/>
</li>
</ul>
View
BIN  exercises/Exercise_03_Add_Feature/resources/convert_to_maven.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
2  exercises/Exercise_03_Add_Feature/tychodemo.bundle.tests/META-INF/MANIFEST.MF
@@ -4,5 +4,5 @@ Bundle-Name: Tests
Bundle-SymbolicName: tychodemo.bundle.tests
Bundle-Version: 1.0.0.qualifier
Fragment-Host: tychodemo.bundle;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.junit
View
2  exercises/Exercise_03_Add_Feature/tychodemo.bundle.tests/build.properties
@@ -1,4 +1,4 @@
source.. = src/
-output.. = target/classes/
+output.. = bin/
bin.includes = META-INF/,\
.
View
13 exercises/Exercise_03_Add_Feature/tychodemo.bundle.tests/pom.xml
@@ -1,16 +1,15 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>tychodemo</groupId>
<artifactId>tychodemo.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <relativePath>../tychodemo.parent/pom.xml</relativePath>
+ <relativePath>../tychodemo.parent</relativePath>
</parent>
- <groupId>tychodemo</groupId>
+
<artifactId>tychodemo.bundle.tests</artifactId>
- <version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
+
</project>
View
18 exercises/Exercise_03_Add_Feature/tychodemo.bundle.tests/src/tychodemo/SimpleTest.java
@@ -1,18 +0,0 @@
-package tychodemo;
-
-import static org.junit.Assert.*;
-
-import org.junit.Test;
-
-import tychodemo.bundle.ApplicationWorkbenchAdvisor;
-
-public class SimpleTest {
-
- @Test
- public void testGetInitialWindowPerspectiveId() {
- assertEquals("tychodemo.bundle.perspective",
- new ApplicationWorkbenchAdvisor()
- .getInitialWindowPerspectiveId());
- }
-
-}
View
16 ...03_Add_Feature/tychodemo.bundle.tests/src/tychodemo/bundle/handlers/AboutHandlerTest.java
@@ -0,0 +1,16 @@
+package tychodemo.bundle.handlers;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.junit.matchers.JUnitMatchers;
+import org.junit.runner.JUnitCore;
+
+public class AboutHandlerTest {
+
+ @Test
+ public void testGetGreeting() {
+ assertThat(new AboutHandler().getGreeting(), JUnitMatchers.containsString("Tycho Demo"));
+ }
+
+}
View
52 exercises/Exercise_03_Add_Feature/tychodemo.bundle/Application.e4xmi
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:advanced="http://www.eclipse.org/ui/2010/UIModel/application/ui/advanced" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmi:id="_XS7TUHHYEeGdaqKGFl0Tiw" elementId="org.eclipse.e4.ide.application" bindingContexts="_XS7TUXHYEeGdaqKGFl0Tiw">
+ <children xsi:type="basic:TrimmedWindow" xmi:id="_XS76Z3HYEeGdaqKGFl0Tiw" label="tychodemo.bundle" width="500" height="400">
+ <children xsi:type="advanced:PerspectiveStack" xmi:id="_XS76b3HYEeGdaqKGFl0Tiw">
+ <children xsi:type="advanced:Perspective" xmi:id="_XS76cHHYEeGdaqKGFl0Tiw">
+ <children xsi:type="basic:PartSashContainer" xmi:id="_XS76cXHYEeGdaqKGFl0Tiw">
+ <children xsi:type="basic:PartStack" xmi:id="_XS8hcHHYEeGdaqKGFl0Tiw"/>
+ </children>
+ </children>
+ </children>
+ <mainMenu xmi:id="_XS76aHHYEeGdaqKGFl0Tiw" elementId="menu:org.eclipse.ui.main.menu">
+ <children xsi:type="menu:Menu" xmi:id="_XS76aXHYEeGdaqKGFl0Tiw" label="File">
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_XS76anHYEeGdaqKGFl0Tiw" label="Open" iconURI="platform:/plugin/tychodemo.bundle/icons/sample.gif" command="_XS7TXnHYEeGdaqKGFl0Tiw"/>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_XS76a3HYEeGdaqKGFl0Tiw" label="Save" iconURI="platform:/plugin/tychodemo.bundle/icons/save_edit.gif" command="_XS76YXHYEeGdaqKGFl0Tiw"/>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_XS76bHHYEeGdaqKGFl0Tiw" label="Quit" command="_XS7TWnHYEeGdaqKGFl0Tiw"/>
+ </children>
+ <children xsi:type="menu:Menu" xmi:id="_XS76bXHYEeGdaqKGFl0Tiw" label="Help">
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_XS76bnHYEeGdaqKGFl0Tiw" label="About" command="_XS76ZHHYEeGdaqKGFl0Tiw"/>
+ </children>
+ </mainMenu>
+ <trimBars xmi:id="_XS8hcXHYEeGdaqKGFl0Tiw">
+ <children xsi:type="menu:ToolBar" xmi:id="_XS8hcnHYEeGdaqKGFl0Tiw" elementId="toolbar:org.eclipse.ui.main.toolbar">
+ <children xsi:type="menu:HandledToolItem" xmi:id="_XS8hc3HYEeGdaqKGFl0Tiw" iconURI="platform:/plugin/tychodemo.bundle/icons/sample.gif" command="_XS7TXnHYEeGdaqKGFl0Tiw"/>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_XS8hdHHYEeGdaqKGFl0Tiw" iconURI="platform:/plugin/tychodemo.bundle/icons/save_edit.gif" command="_XS76YXHYEeGdaqKGFl0Tiw"/>
+ </children>
+ </trimBars>
+ </children>
+ <handlers xmi:id="_XS7TW3HYEeGdaqKGFl0Tiw" contributionURI="bundleclass://tychodemo.bundle/tychodemo.bundle.handlers.QuitHandler" command="_XS7TWnHYEeGdaqKGFl0Tiw"/>
+ <handlers xmi:id="_XS7TX3HYEeGdaqKGFl0Tiw" contributionURI="bundleclass://tychodemo.bundle/tychodemo.bundle.handlers.OpenHandler" command="_XS7TXnHYEeGdaqKGFl0Tiw"/>
+ <handlers xmi:id="_XS76YnHYEeGdaqKGFl0Tiw" contributionURI="bundleclass://tychodemo.bundle/tychodemo.bundle.handlers.SaveHandler" command="_XS76YXHYEeGdaqKGFl0Tiw"/>
+ <handlers xmi:id="_XS76ZXHYEeGdaqKGFl0Tiw" contributionURI="bundleclass://tychodemo.bundle/tychodemo.bundle.handlers.AboutHandler" command="_XS76ZHHYEeGdaqKGFl0Tiw"/>
+ <bindingTables xmi:id="_XS7TXHHYEeGdaqKGFl0Tiw" bindingContext="_XS7TUXHYEeGdaqKGFl0Tiw">
+ <bindings xmi:id="_XS7TXXHYEeGdaqKGFl0Tiw" keySequence="Ctrl+Q" command="_XS7TWnHYEeGdaqKGFl0Tiw"/>
+ <bindings xmi:id="_XS76YHHYEeGdaqKGFl0Tiw" keySequence="Ctrl+O" command="_XS7TXnHYEeGdaqKGFl0Tiw"/>
+ <bindings xmi:id="_XS76Y3HYEeGdaqKGFl0Tiw" keySequence="Ctrl+S" command="_XS76YXHYEeGdaqKGFl0Tiw"/>
+ <bindings xmi:id="_XS76ZnHYEeGdaqKGFl0Tiw" keySequence="Ctrl+A" command="_XS76ZHHYEeGdaqKGFl0Tiw"/>
+ </bindingTables>
+ <rootContext xmi:id="_XS7TUXHYEeGdaqKGFl0Tiw" elementId="org.eclipse.ui.contexts.dialogAndWindow" name="In Dialog and Windows">
+ <children xmi:id="_XS7TUnHYEeGdaqKGFl0Tiw" elementId="org.eclipse.ui.contexts.window" name="In Windows"/>
+ <children xmi:id="_XS7TU3HYEeGdaqKGFl0Tiw" elementId="org.eclipse.ui.contexts.dialog" name="In Dialogs"/>
+ </rootContext>
+ <commands xmi:id="_XS7TWnHYEeGdaqKGFl0Tiw" elementId="tychodemo.bundle.quitCommand" commandName="quitCommand"/>
+ <commands xmi:id="_XS7TXnHYEeGdaqKGFl0Tiw" elementId="tychodemo.bundle.openCommand" commandName="openCommand"/>
+ <commands xmi:id="_XS76YXHYEeGdaqKGFl0Tiw" elementId="tychodemo.bundle.saveCommand" commandName="saveCommand"/>
+ <commands xmi:id="_XS76ZHHYEeGdaqKGFl0Tiw" elementId="tychodemo.bundle.aboutCommand" commandName="aboutCommand"/>
+ <addons xmi:id="_XS7TVHHYEeGdaqKGFl0Tiw" elementId="org.eclipse.e4.core.commands.service" contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
+ <addons xmi:id="_XS7TVXHYEeGdaqKGFl0Tiw" elementId="org.eclipse.e4.ui.contexts.service" contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
+ <addons xmi:id="_XS7TVnHYEeGdaqKGFl0Tiw" elementId="org.eclipse.e4.ui.bindings.service" contributionURI="bundleclass://org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>
+ <addons xmi:id="_XS7TV3HYEeGdaqKGFl0Tiw" elementId="org.eclipse.e4.ui.workbench.commands.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon"/>
+ <addons xmi:id="_XS7TWHHYEeGdaqKGFl0Tiw" elementId="org.eclipse.e4.ui.workbench.contexts.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon"/>
+ <addons xmi:id="_XS7TWXHYEeGdaqKGFl0Tiw" elementId="org.eclipse.e4.ui.workbench.bindings.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench.swt/org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon"/>
+</application:Application>
View
24 exercises/Exercise_03_Add_Feature/tychodemo.bundle/META-INF/MANIFEST.MF
@@ -4,7 +4,25 @@ Bundle-Name: Tycho Demo Bundle
Bundle-SymbolicName: tychodemo.bundle; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: tychodemo.bundle.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime
+Require-Bundle: javax.inject;bundle-version="1.0.0",
+ org.eclipse.core.resources;bundle-version="3.8.0",
+ org.eclipse.core.runtime;bundle-version="3.8.0",
+ org.eclipse.swt;bundle-version="3.8.0",
+ org.eclipse.core.databinding;bundle-version="1.4.1",
+ org.eclipse.core.databinding.beans;bundle-version="1.2.100",
+ org.eclipse.jface;bundle-version="3.8.0",
+ org.eclipse.jface.databinding;bundle-version="1.6.0",
+ org.eclipse.e4.ui.services;bundle-version="0.10.0",
+ org.eclipse.e4.ui.workbench;bundle-version="0.10.1",
+ org.eclipse.e4.core.services;bundle-version="1.0.0",
+ org.eclipse.e4.core.di;bundle-version="1.1.0",
+ org.eclipse.e4.core.contexts;bundle-version="1.0.0",
+ org.eclipse.e4.ui.workbench.swt;bundle-version="0.10.0",
+ org.eclipse.core.databinding.property;bundle-version="1.4.0",
+ org.eclipse.e4.ui.css.core;bundle-version="0.10.0",
+ org.w3c.css.sac;bundle-version="1.3.1",
+ org.eclipse.e4.core.commands;bundle-version="0.10.0",
+ org.eclipse.e4.ui.bindings;bundle-version="0.10.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.osgi.framework;version="1.3.0"
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
View
12 exercises/Exercise_03_Add_Feature/tychodemo.bundle/build.properties
@@ -1,7 +1,7 @@
-source.. = src/
-output.. = target/classes/
-bin.includes = plugin.xml,\
- META-INF/,\
+output.. = bin/
+bin.includes = META-INF/,\
.,\
- icons/,\
- splash.bmp
+ plugin.xml,\
+ css/default.css,\
+ Application.e4xmi
+source.. = src/
View
0  exercises/Exercise_03_Add_Feature/tychodemo.bundle/css/default.css
No changes.
View
BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/expected_rcp_screenshot.png
Deleted file not rendered
View
BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_about.gif
Deleted file not rendered
View
BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_launcher.icns
Binary file not shown
View
BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_launcher.ico
Binary file not shown
View
307 exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_launcher.xpm
@@ -1,307 +0,0 @@
-/* XPM */
-static char * icon48_xpm[] = {
-"48 48 256 2",
-" c #4B4B3B3B9090",
-". c #0D0D0E0E5454",
-"X c #11110E0E5B5B",
-"o c #17170F0F6363",
-"O c #1D1D13136969",
-"+ c #212114146C6C",
-"@ c #252514147171",
-"# c #282811116C6C",
-"$ c #26260D0D6363",
-"% c #22220B0B5E5E",
-"& c #1C1C0B0B5A5A",
-"* c #1C1C0B0B5252",
-"= c #1B1B05055353",
-"- c #161606064D4D",
-"; c #161605054949",
-": c #111104044848",
-"> c #131304044545",
-", c #131305054242",
-"< c #141410105E5E",
-"1 c #2C2C15157373",
-"2 c #2B2B1B1B7575",
-"3 c #343416167272",
-"4 c #313113136E6E",
-"5 c #222209095757",
-"6 c #1B1B06064D4D",
-"7 c #15150B0B4242",
-"8 c #13130C0C5555",
-"9 c #2E2E1B1B7878",
-"0 c #33331F1F7C7C",
-"q c #343418187878",
-"w c #3B3B1C1C7575",
-"e c #2E2E10106767",
-"r c #1B1B07074747",
-"t c #18180B0B4646",
-"y c #151513136262",
-"u c #1A1A15156464",
-"i c #34341F1F7777",
-"p c #40401E1E8080",
-"a c #42421B1B7A7A",
-"s c #3B3B15157474",
-"d c #2B2B0B0B5B5B",
-"f c #222207075252",
-"g c #373727277A7A",
-"h c #474724248484",
-"j c #393915156E6E",
-"k c #373711116A6A",
-"l c #343413136363",
-"z c #232319196E6E",
-"x c #292919197070",
-"c c #3C3C2C2C8282",
-"v c #444431318585",
-"b c #494934348A8A",
-"n c #505026268A8A",
-"m c #3D3D1B1B6E6E",
-"M c #31310E0E5C5C",
-"N c #2B2B0D0D5353",
-"B c #222207074A4A",
-"V c #52523C3C9292",
-"C c #58583C3C9494",
-"Z c #5D5D44449797",
-"A c #5C5C2E2E9292",
-"S c #676733339595",
-"D c #424228287575",
-"F c #29290A0A4F4F",
-"G c #6C6C4A4A9E9E",
-"H c #72725454A7A7",
-"J c #8C8C6D6DB2B2",
-"K c #343424246E6E",
-"L c #3A3A23236A6A",
-"P c #3A3A1C1C6767",
-"I c #24240A0A4B4B",
-"U c #151518186161",
-"Y c #76766F6FA5A5",
-"T c #ADAD9191CCCC",
-"R c #98988989D3D3",
-"E c #45453B3B8686",
-"W c #3C3C35357979",
-"Q c #363631317575",
-"! c #32322D2D6B6B",
-"~ c #323229296363",
-"^ c #30301F1F6262",
-"/ c #323218185E5E",
-"( c #272707074B4B",
-") c #202028286C6C",
-"_ c #1E1E1D1D6868",
-"` c #9A9A8282BBBB",
-"' c #C8C8B3B3D3D3",
-"] c #B3B3AFAFE7E7",
-"[ c #84847272C6C6",
-"{ c #58585757A3A3",
-"} c #3F3F3C3C8A8A",
-"| c #3B3B3A3A8484",
-" . c #414139397D7D",
-".. c #3D3D39397A7A",
-"X. c #37372E2E6E6E",
-"o. c #2C2C21215A5A",
-"O. c #2E2E1B1B5B5B",
-"+. c #F5F5EFEFF5F5",
-"@. c #656566669A9A",
-"#. c #47474B4B8E8E",
-"$. c #3C3C44447B7B",
-"%. c #444442428080",
-"&. c #45453E3E8181",
-"*. c #40403C3C8181",
-"=. c #3D3D33337474",
-"-. c #3B3B30306E6E",
-";. c #38382D2D6969",
-":. c #303026265D5D",
-">. c #2C2C15155A5A",
-",. c #1F1F1C1C7070",
-"<. c #25251E1E7171",
-"1. c #59595C5C9191",
-"2. c #4D4D53538989",
-"3. c #4C4C49498484",
-"4. c #484845458585",
-"5. c #494941418585",
-"6. c #494940408181",
-"7. c #2F2F1C1C5353",
-"8. c #2B2B28287676",
-"9. c #323231317F7F",
-"0. c #545452528B8B",
-"q. c #51514E4E8989",
-"w. c #4E4E4B4B8C8C",
-"e. c #4C4C47478686",
-"r. c #46463D3D7E7E",
-"t. c #434336367A7A",
-"y. c #2B2B13135555",
-"u. c #47473D3D8D8D",
-"i. c #575757578E8E",
-"p. c #48483E3E7F7F",
-"a. c #46463A3A7D7D",
-"s. c #424235357575",
-"d. c #404034347171",
-"f. c #BFBFCBCBFAFA",
-"g. c #B8B8A8A8DDDD",
-"h. c #5E5E60609292",
-"j. c #565655558C8C",
-"k. c #4B4B44448282",
-"l. c #454539397B7B",
-"z. c #434338387878",
-"x. c #3F3F32326D6D",
-"c. c #3D3D30306969",
-"v. c #3A3A2E2E6363",
-"b. c #36362A2A5C5C",
-"n. c #343424245555",
-"m. c #30301E1E4D4D",
-"M. c #49493C3C8282",
-"N. c #5E5E4F4F8C8C",
-"B. c #56563B3B8B8B",
-"V. c #545407078585",
-"C. c #424234347272",
-"Z. c #9797A4A4F7F7",
-"A. c #444436367676",
-"S. c #7D7D7979D5D5",
-"D. c #464640408A8A",
-"F. c #44444B4B8282",
-"G. c #414107077777",
-"H. c #71716161C1C1",
-"J. c #303039397979",
-"K. c #8E8E8E8EE6E6",
-"L. c #404033338B8B",
-"P. c #4A4A45458C8C",
-"I. c #46463A3A8080",
-"U. c #363629295454",
-"Y. c #303022224848",
-"T. c #424237377575",
-"R. c #2E2E1D1D6363",
-"E. c #79798383EAEA",
-"W. c #74747B7BE4E4",
-"Q. c #6D6D7676D6D6",
-"!. c #6A6A7171CECE",
-"~. c #66666969C6C6",
-"^. c #62626565BCBC",
-"/. c #5F5F6060B5B5",
-"(. c #5B5B5B5BACAC",
-"). c #535353539898",
-"_. c #4F4F4F4FA4A4",
-"`. c #54544D4DA4A4",
-"'. c #323204046B6B",
-"]. c #303035357979",
-"[. c #313122224343",
-"{. c #5A5A5B5BB7B7",
-"}. c #484846468080",
-"|. c #454541417575",
-" X c #4B4B31318282",
-".X c #47473C3C8484",
-"XX c #3E3E35356E6E",
-"oX c #2F2F26264040",
-"OX c #2B2B23233A3A",
-"+X c #262619195C5C",
-"@X c #252515155A5A",
-"#X c #55555151B3B3",
-"$X c #3C3C2D2D5D5D",
-"%X c #39392F2F5656",
-"&X c #37372D2D5050",
-"*X c #25251F1F3030",
-"=X c #24241D1D4343",
-"-X c #202013135656",
-";X c #41413B3B6C6C",
-":X c #444442429696",
-">X c #212100005E5E",
-",X c #444436367272",
-"<X c #444436366F6F",
-"1X c #424236366868",
-"2X c #3F3F34346161",
-"3X c #3C3C32325A5A",
-"4X c #34342A2A4A4A",
-"5X c #21211B1B2121",
-"6X c #22221C1C6363",
-"7X c #2D2D01015E5E",
-"8X c #20201B1B2525",
-"9X c #49492F2F7B7B",
-"0X c #434334346C6C",
-"qX c #323229294545",
-"wX c #1C1C10104F4F",
-"eX c #222217176363",
-"rX c #37371E1E6B6B",
-"tX c #424232326E6E",
-"yX c #444433336969",
-"uX c #424233336565",
-"iX c #1E1E1A1A1E1E",
-"pX c #161601014C4C",
-"aX c #1C1C11115454",
-"sX c #252503035B5B",
-"dX c #414131316A6A",
-"fX c #22221F1F7878",
-"gX c #272724246767",
-"hX c #1D1D16165E5E",
-"jX c #131305055151",
-"kX c #40402F2F6464",
-"lX c #111107074E4E",
-"zX c #0C0C05054B4B",
-"xX c #22221E1E5757",
-"cX c #1A1A0D0D4D4D",
-"vX c #16160B0B4D4D",
-"bX c #060604044747",
-"nX c #040403034343",
-"mX c #3B3B27276565",
-"MX c #0E0E03034141",
-"NX c #111106064A4A",
-"BX c #0E0E04044646",
-"VX c #111105053B3B",
-"CX c #0D0D01013A3A",
-"ZX c #030305053F3F",
-"AX c #0F0F0F0F4C4C",
-"SX c #020207073B3B",
-"DX c #0D0D03034646",
-"FX c #0B0B02023F3F",
-"GX c #0D0D02023434",
-"HX c #0A0A0E0E4444",
-"JX c #161614145252",
-"KX c #0B0B04044646",
-"LX c #0A0A03034444",
-"PX c #1D1D21215757",
-"IX c #090910104040",
-"UX c #18181E1E5353",
-" ",
-" . . . . X X o o o o O + + @ @ @ @ @ @ @ # # # # # # $ $ % % & & & & * = - - - ; : > > , , , ",
-" . . X X < < o o O O + @ 1 2 2 1 1 1 1 1 1 1 1 3 4 # # $ $ $ % % % 5 = = 6 6 - ; ; > > , , 7 ",
-" . 8 < < < o O O + @ @ 2 9 9 0 0 q q q q q q q w 3 4 4 e e $ $ $ $ % 5 = = 6 6 6 ; ; > > r t ",
-" . X < y u O O + @ 1 2 i 0 0 p p p p p p p a a p a s 3 4 4 e e e e d 5 5 f f 6 6 6 ; ; r r t ",
-" X < y u O + + @ 2 9 0 g p p h h h h h h h p h h a a s s j k k j l d d 5 5 f f 6 6 r r r r r ",
-" X < y O z x x 9 0 g c v b n n n n n n n n n n n h a a s s j j m l M d d N f f B B B B r r r ",
-" < y u + z 2 0 c c b V C Z C C A A A A A S S S n h D w w m m m m k l M d d N f F F F B r r r ",
-" < y O z z 9 c b V Z G H H H G S G G J J H V v c g g K K K K L P l l l M M N N N N I B B r r ",
-" U u + z x i v C H Y J J J J H J T R H V E W W Q Q Q Q ! ! ! ~ ^ ^ / / M M M M M N ( B B r r ",
-" ) _ z x 9 g b Z Y ` ' ' ' T T ] [ { } | .........W W Q Q X.! ~ ~ o.O./ / / / N F ( B B B r ",
-" ) ) z x i c V G J ' +.+.+.+.] [ @.#.$.%.%.%.&.*. . .....W =.-.X.;.~ :.o.O.^ >.N F ( B B B B ",
-" ) ,.<.2 g v C H J ' +.+.+.+.T Y 1.2.3.4.4.4.5.6.&.&. . ...W =.=.-.;.~ :.o.7.>.N F F ( B I I ",
-" ) ,.<.8.9.b C H J T +.+.+.' J @.1.0.q.q.w.e.4.5.6.&.r. . .t.W =.=.-.;.~ :.o.7.y.N F ( ( I I ",
-" 8.8.8.9.| u.C G J T +.+.' ` Y @.1.i.0.q.q.e.e.5.6.p.r.a. .t.t.s.d.d.-.;.~ :.7.7.y.F F ( I I ",
-" 9.c c c v b A S H ' f.g.` Y @.h.1.i.j.0.q.q.e.k.6.p.r.a.l.t.z.s.s.d.x.c.v.b.n.m.7.N F F F I ",
-" <.g M.N.B.B.n V.J f.R J @.h.h.1.i.i.j.j.0.q.3.k.6.p.r.a.l.l.z.s.C.d.x.x.c.v.b.n.m.y.N F F F ",
-" + x i v B.Z Z G g.Z.[ @.2.i.i.j.j.j.j.j.0.q.3.k.6.p.p.a.l.l.A.s.C.C.d.x.c.v.b.n.m.7.y.N N y. ",
-" O # 3 w p n Z ` f.S.H D.F.q.0.0.0.0.j.0.q.q.3.k.6.p.r.a.a.l.A.s.s.C.d.x.x.c.v.b.n.m.y.y.y.y. ",
-" O # 4 s a G.V.T Z.H.V J.%.e.w.q.0.0.0.0.q.q.e.k.6.p.r.a.a.l.z.A.s.C.d.d.x.c.v.b.n.m.7.>.y.y. ",
-" O # 4 s w G.A f.K.H L...4.P.w.w.w.q.q.q.q.e.e.5.6.M.I.I.a.a.l.z.A.s.d.d.x.c.v.v.U.Y.7.O.>.y. ",
-" $ # 4 3 s G.G f.S.Z 9.*.D.P.P.w.w.w.w.w.e.e.5.5.M.M.I.I.a.a.l.z.T.s.d.d.x.x.c.v.U.Y.m.R.>.>. ",
-" E.E.W.W.W.W.E.Z.E.W.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.!.!.!.!.!.~.~.~.~.~.~.^.^.^.^.^./././.(.{ { )._.`._. ",
-" + # 3 w s '.` f.H.V ].*.D.P.P.P.P.P.P.P.5.5.5.M.M.M.I.I.a.l.z.z.T.T.s.d.d.x.c.v.U.Y.[.^ O.>. ",
-" ~.~.~.~.~.~.K.Z.S.~.{.^.^.^.^.^.^.^.^././././././.(.(.(.(.(.(.{ { { { { ).).).w.w.}.|.P.u.} ",
-" .I.6. X X XT f.H.b ].*.E D.D.D.D.5.5..X.XM.M.I.I.a.a.l.l.z.z.T.T.T.d.XXx.c.v.b.U.oXOXR.+X@X ",
-" E.E.E.W.W.W.K.Z.E.W.Q.Q.Q.Q.Q.Q.Q.Q.!.!.!.!.!.!.~.~.~.~.~.~.^.^.^.^.^./././.(.{ { ).).#X_._. ",
-" & % $ e '.= H f.H.b 8.W *.E E E .X.X.XI.I.I.I.a.a.l.l.z.z.T.T.T.C.XXXXc.v.$X%X&XY.*X=X2 @X-X ",
-" {.{.{.{.{.#X~.Z.W.~.{.{./././././././././.(.(.(.(.(.(.(.{ { { { { { ).).).w.w.3.}.;X%.:X} } ",
-" & & % $ e >XV.f.S.C K X.W t. . .l.l.t.t.t.t.A.A.A.,X,X,X,X,X<X;X1X1X2X3X%X&X4XoX*X5Xo.6X-X-X ",
-" & & % $ $ >X7X` Z.Z D ! =.=.s.t.t.t.A.A.s.A.,X,X,X,X<X<X<X<X;X1X2X2X3X%X&X4XoXOX8X5X<.@X-X-X ",
-" 8 & & $ e K 9XJ f.^. XK X.=.=.s.s.s.s.s.C.C.C.C.<X0X0X0X1X1X1X2X2X3X%X&X4XqXOX*X8X=X<.-X-XwX ",
-" 8 & eXK k.@.M. Xg.E.B.rX~ -.d.d.C.C.C.C.C.tX0X0X0XyXyX1X1XuX2X2X3X%X&X4XqXoXOX8XiX6XeX-X-XwX ",
-" 6XQ h.Y N.K e pXB.f./.9Xo.;.-.x.d.tXtXtXtXtX0X0XyXyXyXuXuX2X2X3X%X&X4XqXoXOX*XiX=X_ aX-XaXwX ",
-" Y Y .R.@X% sX= 7XT Z.V P :.;.c.x.x.x.tXdXdXdXyXyXuXuX2X2X3X3X%X&X4XqXoXOX*X8X*XfXaXaXaXwXwX ",
-" gXhX& * & 5 5 sXjXa ] S.9X/ ~ v.c.dXdXdXdXdXuXuXuXkX2X2X3X%X%X&X4XqXoXOX*X8XiX<.hXwXwXaXwXwX ",
-" 8 lXlXjX= * 5 5 = zX9X] H.D 7.b.v.v.kXc.kXkXkXkXkX2X$X3X%X&X&X4XqXoXOX*X8XiXxXhXwXcXcXwXwXwX ",
-" zXzXlXlXjX= = f f sXD Y ] ~.D 7.n.b.v.v.kXkXkXkX$X$X%X%X&X4XqXoXoXOX*X8X5XgXu cXvXvXcXcXwXwX ",
-" bXbXzXlXlX- = * @XX.h.e D T S.D n.m.b.$X$X$X$X$X%X%X&X&X4XqXoXOX*X8X8X*X<.hXvX; ; vXvXvXcXwX ",
-" nXbXzXzXlXlX- -XX.Y R.pXpXP J K.Z mXm.n.U.U.U.U.U.4X4XY.oXOX*X8X8X8X=X,.aXvX; > > > t t t cX ",
-" nXbXbXzXzXlXaXXXY +Xf = f = 7XtXR R mXn.Y.[.[.[.[.OX*X*X8X5X*X=X,.u vXvX; > > MXMX, 7 t t ",
-" nXnXnXbXzXvX-.Y +XcX6 6 = = = d L B.G H `.X.:.7.m.=X=X=X=X=X6X,.u cXvXNX: BX> MXVXCXVX7 7 7 ",
-" ZXZXnXbXAXgX@.+XvX; - - - - * @XR.>.sX>.R.i 0 x eXeXeXeXO hXaXcXvXNX: BXMXMXMXVXCXCXCXVX7 7 ",
-" SXZXZXAXgXN.aXNX: : NXNXNX- * +X+X* 6 6 6 * * * * * * * vXvX- NX: DXBXMXMXFXCXCXCXCXGXVXVX7 ",
-" SXSXHXgX0.JXKXLXKXKXDX: : NX* @X-X- - - - - - - - - - - NX: DXDXDXMXMXFXFXCXCXCXCXGXGXGXVXVX ",
-" SXHXPX3.JXnXnXnXnXbXLXKXKXNXaX-XvX: : NX: : : : : : : BXDXDXLXMXMXFXFXCXCXCXCXGXGXGXGXGXGXGX ",
-" IXUX$.AXZXZXZXZXnXnXnXLXLXNXJXvXBXDXBXBXBXBXDXDXDXDXLXDXLXLXFXFXFXFXCXCXCXCXGXGXGXGXGXGXGXGX ",
-" "};
View
BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_window_16.gif
Deleted file not rendered
View
BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_window_32.gif
Deleted file not rendered
View
BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/sample.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/save_edit.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
34 exercises/Exercise_03_Add_Feature/tychodemo.bundle/plugin.xml
@@ -1,33 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
<plugin>
<extension
- id="application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="tychodemo.bundle.Application">
- </run>
- </application>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="RCP Perspective"
- class="tychodemo.bundle.Perspective"
- id="tychodemo.bundle.perspective">
- </perspective>
- </extension>
- <extension
id="product"
point="org.eclipse.core.runtime.products">
<product
- application="tychodemo.bundle.application"
- name="Tycho Demo RCP">
+ name="tychodemo.bundle"
+ application="org.eclipse.e4.ui.workbench.swt.E4Application">
+ <property
+ name="appName"
+ value="tychodemo.bundle">
+ </property>
+ <property
+ name="applicationXMI"
+ value="tychodemo.bundle/Application.e4xmi">
+ </property>
<property
- name="windowImages"
- value="icons/alt_window_16.gif,icons/alt_window_32.gif">
+ name="applicationCSS"
+ value="platform:/plugin/tychodemo.bundle/css/default.css">
</property>
</product>
</extension>
View
13 exercises/Exercise_03_Add_Feature/tychodemo.bundle/pom.xml
@@ -1,16 +1,15 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>tychodemo</groupId>
<artifactId>tychodemo.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <relativePath>../tychodemo.parent/pom.xml</relativePath>
+ <relativePath>../tychodemo.parent/</relativePath>
</parent>
- <groupId>tychodemo</groupId>
+
<artifactId>tychodemo.bundle</artifactId>
- <version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
+
</project>
View
BIN  exercises/Exercise_03_Add_Feature/tychodemo.bundle/splash.bmp
Binary file not shown
View
53 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/Activator.java
@@ -1,61 +1,30 @@
package tychodemo.bundle;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
+public class Activator implements BundleActivator {
- // The plug-in ID
- public static final String PLUGIN_ID = "tychodemo.bundle"; //$NON-NLS-1$
+ private static BundleContext context;
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
+ static BundleContext getContext() {
+ return context;
}
/*
* (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
}
/*
* (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
- public static Activator getDefault() {
- return plugin;
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
}
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
}
View
46 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/Application.java
@@ -1,46 +0,0 @@
-package tychodemo.bundle;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class controls all aspects of the application's execution
- */
-public class Application implements IApplication {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) throws Exception {
- Display display = PlatformUI.createDisplay();
- try {
- int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
- if (returnCode == PlatformUI.RETURN_RESTART)
- return IApplication.EXIT_RESTART;
- else
- return IApplication.EXIT_OK;
- } finally {
- display.dispose();
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- if (!PlatformUI.isWorkbenchRunning())
- return;
- final IWorkbench workbench = PlatformUI.getWorkbench();
- final Display display = workbench.getDisplay();
- display.syncExec(new Runnable() {
- public void run() {
- if (!display.isDisposed())
- workbench.close();
- }
- });
- }
-}
View
20 ...ise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/ApplicationActionBarAdvisor.java
@@ -1,20 +0,0 @@
-package tychodemo.bundle;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
-
- public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
- super(configurer);
- }
-
- protected void makeActions(IWorkbenchWindow window) {
- }
-
- protected void fillMenuBar(IMenuManager menuBar) {
- }
-
-}
View
18 ...ise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/ApplicationWorkbenchAdvisor.java
@@ -1,18 +0,0 @@
-package tychodemo.bundle;
-
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchAdvisor;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
-
- private static final String PERSPECTIVE_ID = "tychodemo.bundle.perspective"; //$NON-NLS-1$
-
- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- return new ApplicationWorkbenchWindowAdvisor(configurer);
- }
-
- public String getInitialWindowPerspectiveId() {
- return PERSPECTIVE_ID;
- }
-}
View
25 ..._Add_Feature/tychodemo.bundle/src/tychodemo/bundle/ApplicationWorkbenchWindowAdvisor.java
@@ -1,25 +0,0 @@
-package tychodemo.bundle;
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
-
- public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- super(configurer);
- }
-
- public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
- return new ApplicationActionBarAdvisor(configurer);
- }
-
- public void preWindowOpen() {
- IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
- configurer.setInitialSize(new Point(400, 300));
- configurer.setShowCoolBar(false);
- configurer.setShowStatusLine(false);
- }
-}
View
10 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/Perspective.java
@@ -1,10 +0,0 @@
-package tychodemo.bundle;
-
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-public class Perspective implements IPerspectiveFactory {
-
- public void createInitialLayout(IPageLayout layout) {
- }
-}
View
29 .../Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/handlers/AboutHandler.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package tychodemo.bundle.handlers;
+
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+
+public class AboutHandler {
+ @Execute
+ public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell) {
+ MessageDialog.openInformation(shell, "About", getGreeting());
+ }
+
+ String getGreeting() {
+ return "Hello Tycho Demo RCP!";
+ }
+}
View
33 ...s/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/handlers/OpenHandler.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package tychodemo.bundle.handlers;
+
+import java.lang.reflect.InvocationTargetException;
+
+import javax.inject.Named;
+
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+
+public class OpenHandler {
+
+ @Execute
+ public void execute(
+ IEclipseContext context,
+ @Named(IServiceConstants.ACTIVE_SHELL) Shell shell)
+ throws InvocationTargetException, InterruptedException {
+ FileDialog dialog = new FileDialog(shell);
+ dialog.open();
+ }
+}
View
34 ...s/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/handlers/QuitHandler.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package tychodemo.bundle.handlers;
+
+import java.lang.reflect.InvocationTargetException;
+
+import javax.inject.Named;
+
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.e4.ui.workbench.IWorkbench;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+
+public class QuitHandler {
+ @Execute
+ public void execute(IWorkbench workbench, IEclipseContext context,
+ @Named(IServiceConstants.ACTIVE_SHELL) Shell shell)
+ throws InvocationTargetException, InterruptedException {
+ if (MessageDialog.openConfirm(shell, "Confirmation",
+ "Do you want to exit?")) {
+ workbench.close();
+ }
+ }
+}
View
64 ...s/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/handlers/SaveHandler.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package tychodemo.bundle.handlers;
+
+import java.lang.reflect.InvocationTargetException;
+
+import javax.inject.Named;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.e4.core.contexts.ContextInjectionFactory;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.core.di.annotations.CanExecute;
+import org.eclipse.e4.ui.model.application.MContribution;
+import org.eclipse.e4.ui.model.application.ui.MDirtyable;
+import org.eclipse.e4.ui.services.IServiceConstants;
+//import org.eclipse.e4.ui.workbench.Persist;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.swt.widgets.Shell;
+
+public class SaveHandler {
+ @CanExecute
+ public boolean canExecute(
+ @Named(IServiceConstants.ACTIVE_PART) MDirtyable dirtyable) {
+ if (dirtyable == null) {
+ return false;
+ }
+ return dirtyable.isDirty();
+ }
+
+ @Execute
+ public void execute(
+ IEclipseContext context,
+ @Named(IServiceConstants.ACTIVE_SHELL) Shell shell,
+ @Named(IServiceConstants.ACTIVE_PART) final MContribution contribution)
+ throws InvocationTargetException, InterruptedException {
+ final IEclipseContext pmContext = context.createChild();
+
+ ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell);
+ dialog.open();
+ dialog.run(true, true, new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor)
+ throws InvocationTargetException, InterruptedException {
+ pmContext.set(IProgressMonitor.class.getName(), monitor);
+ if (contribution != null) {
+ Object clientObject = contribution.getObject();
+// ContextInjectionFactory.invoke(clientObject, Persist.class, //$NON-NLS-1$
+// pmContext, null);
+ }
+ }
+ });
+
+ pmContext.dispose();
+ }
+}
View
105 exercises/Exercise_03_Add_Feature/tychodemo.bundle/tychodemo.bundle.product
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="tychodemo.bundle" uid="tychodemo.product" id="tychodemo.bundle.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
+
+ <configIni use="default">
+ </configIni>
+
+ <launcherArgs>
+ <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
+ </launcherArgs>
+
+ <windowImages/>
+
+ <plugins>
+ <plugin id="com.ibm.icu"/>
+ <plugin id="javax.annotation"/>
+ <plugin id="javax.inject"/>
+ <plugin id="org.apache.batik.css"/>
+ <plugin id="org.apache.batik.util"/>
+ <plugin id="org.apache.batik.util.gui"/>
+ <plugin id="org.apache.commons.logging"/>
+ <plugin id="org.eclipse.core.commands"/>
+ <plugin id="org.eclipse.core.contenttype"/>
+ <plugin id="org.eclipse.core.databinding"/>
+ <plugin id="org.eclipse.core.databinding.beans"/>
+ <plugin id="org.eclipse.core.databinding.observable"/>
+ <plugin id="org.eclipse.core.databinding.property"/>
+ <plugin id="org.eclipse.core.expressions"/>
+ <plugin id="org.eclipse.core.filesystem"/>
+ <plugin id="org.eclipse.core.filesystem.aix.ppc" fragment="true"/>
+ <plugin id="org.eclipse.core.filesystem.hpux.ia64_32" fragment="true"/>
+ <plugin id="org.eclipse.core.filesystem.linux.ppc" fragment="true"/>
+ <plugin id="org.eclipse.core.filesystem.linux.x86" fragment="true"/>
+ <plugin id="org.eclipse.core.filesystem.linux.x86_64" fragment="true"/>
+ <plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/>
+ <plugin id="org.eclipse.core.filesystem.solaris.sparc" fragment="true"/>
+ <plugin id="org.eclipse.core.filesystem.win32.x86" fragment="true"/>
+ <plugin id="org.eclipse.core.filesystem.win32.x86_64" fragment="true"/>
+ <plugin id="org.eclipse.core.jobs"/>
+ <plugin id="org.eclipse.core.resources"/>
+ <plugin id="org.eclipse.core.resources.win32.x86" fragment="true"/>
+ <plugin id="org.eclipse.core.runtime"/>
+ <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
+ <plugin id="org.eclipse.e4.core.commands"/>
+ <plugin id="org.eclipse.e4.core.contexts"/>
+ <plugin id="org.eclipse.e4.core.di"/>
+ <plugin id="org.eclipse.e4.core.di.extensions"/>
+ <plugin id="org.eclipse.e4.core.services"/>
+ <plugin id="org.eclipse.e4.ui.bindings"/>
+ <plugin id="org.eclipse.e4.ui.css.core"/>
+ <plugin id="org.eclipse.e4.ui.css.swt"/>
+ <plugin id="org.eclipse.e4.ui.css.swt.theme"/>
+ <plugin id="org.eclipse.e4.ui.di"/>
+ <plugin id="org.eclipse.e4.ui.model.workbench"/>
+ <plugin id="org.eclipse.e4.ui.services"/>
+ <plugin id="org.eclipse.e4.ui.widgets"/>
+ <plugin id="org.eclipse.e4.ui.workbench"/>
+ <plugin id="org.eclipse.e4.ui.workbench.renderers.swt"/>
+ <plugin id="org.eclipse.e4.ui.workbench.swt"/>
+ <plugin id="org.eclipse.e4.ui.workbench3"/>
+ <plugin id="org.eclipse.emf.common"/>
+ <plugin id="org.eclipse.emf.databinding"/>
+ <plugin id="org.eclipse.emf.ecore"/>
+ <plugin id="org.eclipse.emf.ecore.change"/>
+ <plugin id="org.eclipse.emf.ecore.xmi"/>
+ <plugin id="org.eclipse.equinox.app"/>
+ <plugin id="org.eclipse.equinox.common"/>
+ <plugin id="org.eclipse.equinox.concurrent"/>
+ <plugin id="org.eclipse.equinox.ds"/>
+ <plugin id="org.eclipse.equinox.event"/>
+ <plugin id="org.eclipse.equinox.preferences"/>
+ <plugin id="org.eclipse.equinox.registry"/>
+ <plugin id="org.eclipse.equinox.util"/>
+ <plugin id="org.eclipse.jface"/>
+ <plugin id="org.eclipse.jface.databinding"/>
+ <plugin id="org.eclipse.osgi"/>
+ <plugin id="org.eclipse.osgi.services"/>
+ <plugin id="org.eclipse.swt"/>
+ <plugin id="org.eclipse.swt.carbon.macosx" fragment="true"/>
+ <plugin id="org.eclipse.swt.cocoa.macosx" fragment="true"/>
+ <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
+ <plugin id="org.eclipse.swt.gtk.linux.ppc" fragment="true"/>
+ <plugin id="org.eclipse.swt.gtk.linux.ppc64" fragment="true"/>
+ <plugin id="org.eclipse.swt.gtk.linux.s390" fragment="true"/>
+ <plugin id="org.eclipse.swt.gtk.linux.s390x" fragment="true"/>
+ <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
+ <plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/>
+ <plugin id="org.eclipse.swt.gtk.solaris.sparc" fragment="true"/>
+ <plugin id="org.eclipse.swt.gtk.solaris.x86" fragment="true"/>
+ <plugin id="org.eclipse.swt.motif.aix.ppc" fragment="true"/>
+ <plugin id="org.eclipse.swt.motif.hpux.ia64_32" fragment="true"/>
+ <plugin id="org.eclipse.swt.motif.linux.x86" fragment="true"/>
+ <plugin id="org.eclipse.swt.motif.solaris.sparc" fragment="true"/>
+ <plugin id="org.eclipse.swt.photon.qnx.x86" fragment="true"/>
+ <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
+ <plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/>
+ <plugin id="org.w3c.css.sac"/>
+ <plugin id="org.w3c.dom.smil"/>
+ <plugin id="org.w3c.dom.svg"/>
+ <plugin id="tychodemo.bundle"/>
+ </plugins>
+
+
+</product>
View
31 exercises/Exercise_03_Add_Feature/tychodemo.bundle/tychodemo.launch
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
-<booleanAttribute key="append.args" value="true"/>
-<stringAttribute key="application" value="tychodemo.bundle.application"/>
-<booleanAttribute key="askclear" value="true"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bad_container_name" value="\tychodemo.bundle\tychodemo.launch"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<booleanAttribute key="clearws" value="false"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/tychodemo"/>
-<booleanAttribute key="default" value="false"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<stringAttribute key="location" value="${workspace_loc}/../runtime-New_configuration"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="tychodemo.bundle.product"/>
-<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="tychodemo.bundle@default:default"/>
-<booleanAttribute key="show_selected_only" value="true"/>
-<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
View
33 exercises/Exercise_03_Add_Feature/tychodemo.parent/README.html
@@ -21,7 +21,8 @@
<ul>
<li>Select <tt>File > Switch Workspace > Other...</tt> and choose folder <a href="../">Exercise_03_Add_Feature</a>.<br/>
Import all 3 projects from this folder into the new empty eclipse workspace using <tt>File &gt; Import &gt; Existing Maven Projects</tt></li>
-<li> Right-click on <tt>tychodemo.parent, Run As > Maven install</tt>
+<li><a href="../../Exercise_02_Add_Test_Fragment/tychodemo.parent/README.html#change_p2_url">Adapt the p2 repository file URL</a> in <tt>tychodemo.parent/pom.xml</tt>to your local copy</li>
+<li> Right-click on <tt>tychodemo.parent, Run As > Maven build</tt>, enter Goals: <tt>clean install</tt>.<br/>
The build should succeed and build 3 modules
<pre>
tychodemo.parent
@@ -43,33 +44,19 @@
Note: Make sure the new project root folder is located next to the existing module folders
(Uncheck "Use default location" in the project creation wizard and enter location if necessary)
</li>
-<li> Add a maven project file <tt>pom.xml</tt> to the feature project root with the following content:
-<pre>
- &lt;?xml version="1.0" encoding="UTF-8"?&gt;
- &lt;project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
- &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
- &lt;parent&gt;
- &lt;groupId&gt;tychodemo&lt;/groupId&gt;
- &lt;artifactId&gt;tychodemo.parent&lt;/artifactId&gt;
- &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
- &lt;relativePath&gt;../tychodemo.parent/pom.xml&lt;/relativePath&gt;
- &lt;/parent&gt;
- &lt;groupId&gt;tychodemo&lt;/groupId&gt;
- &lt;artifactId&gt;tychodemo.feature&lt;/artifactId&gt;
- &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
- &lt;packaging&gt;eclipse-feature&lt;/packaging&gt;
- &lt;/project&gt;
+<li>Same as in exercise 1, <a href="../../Exercise_01_Create_RCP_Bundle/README.html#convert_to_maven">convert the project <tt>tychodemo.feature</tt> to a Maven project</a>.<br/>
+Enter groupId: <tt>tychodemo</tt>, Version: <tt>1.0.0-SNAPSHOT</tt>, Packaging: <tt>eclipse-feature</tt>:<br/>
+<img src="../resources/convert_to_maven.png"/><br/>
+
+
+
</pre>
Note packaging type <tt>eclipse-feature</tt>.
Also note <tt>POM version == feature version</tt> and <tt>POM artifactId == feature id</tt>.
</li>
-<li> Add the feature module to the module section of the parent pom:
- <pre>
- &lt;module&gt;../tychodemo.feature&lt;/module&gt;
- </pre>
+<li>Same as in exercise 2, <a href="../../Exercise_02_Add_Test_Fragment/tychodemo.parent/README.html#add_module">add the new module <tt>tychodemo.feature</tt> to the parent pom <tt>tychodemo.parent</tt></a>.
</li>
-<li> <tt>tychodemo.parent > Run As > Maven install</tt>
+<li> <tt>tychodemo.parent > Run As > Maven build</tt><br/>
Expected result: SUCCESSFUL build with 4 modules, including <tt>tychodemo.feature</tt><br/>
<img src="../resources/build_success.png"/><br/>
View
21 exercises/Exercise_03_Add_Feature/tychodemo.parent/pom.xml
@@ -1,14 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
+
<groupId>tychodemo</groupId>
<artifactId>tychodemo.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
- <!-- this is the parent POM from which all modules inherit common settings -->
+ <!-- the modules that should be built together -->
+ <modules>
+ <module>../tychodemo.bundle</module>
+ <module>../tychodemo.bundle.tests</module>
+ </modules>
+
+ <!-- common settings for all modules -->
<properties>
<tycho-version>0.14.1</tycho-version>
</properties>
@@ -16,9 +21,9 @@
<repositories>
<!-- configure p2 repository to resolve against -->
<repository>
- <id>indigo</id>
+ <id>juno</id>
<layout>p2</layout>
- <url>http://download.eclipse.org/releases/indigo/</url>
+ <url>file:/PATH/TO/tutorial/p2_repository/</url>
</repository>
</repositories>
@@ -33,9 +38,5 @@
</plugin>
</plugins>
</build>
- <modules>
- <module>../tychodemo.bundle</module>
- <module>../tychodemo.bundle.tests</module>
- </modules>
</project>

No commit comments for this range

Something went wrong with that request. Please try again.