Permalink
Browse files

Update starting point for exercise 3

  • Loading branch information...
1 parent 70e0938 commit 21890bee7d045778252167a39c604981e29301c5 @jsievers committed Mar 21, 2012
Showing with 408 additions and 574 deletions.
  1. +1 −1 exercises/Exercise_03_Add_Feature/tychodemo.bundle.tests/META-INF/MANIFEST.MF
  2. +1 −1 exercises/Exercise_03_Add_Feature/tychodemo.bundle.tests/build.properties
  3. +6 −7 exercises/Exercise_03_Add_Feature/tychodemo.bundle.tests/pom.xml
  4. +0 −18 exercises/Exercise_03_Add_Feature/tychodemo.bundle.tests/src/tychodemo/SimpleTest.java
  5. +16 −0 ...xercise_03_Add_Feature/tychodemo.bundle.tests/src/tychodemo/bundle/handlers/AboutHandlerTest.java
  6. +52 −0 exercises/Exercise_03_Add_Feature/tychodemo.bundle/Application.e4xmi
  7. +21 −3 exercises/Exercise_03_Add_Feature/tychodemo.bundle/META-INF/MANIFEST.MF
  8. +6 −6 exercises/Exercise_03_Add_Feature/tychodemo.bundle/build.properties
  9. 0 exercises/Exercise_03_Add_Feature/tychodemo.bundle/css/default.css
  10. BIN exercises/Exercise_03_Add_Feature/tychodemo.bundle/expected_rcp_screenshot.png
  11. BIN exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_about.gif
  12. BIN exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_launcher.icns
  13. BIN exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_launcher.ico
  14. +0 −307 exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_launcher.xpm
  15. BIN exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_window_16.gif
  16. BIN exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/alt_window_32.gif
  17. BIN exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/sample.gif
  18. BIN exercises/Exercise_03_Add_Feature/tychodemo.bundle/icons/save_edit.gif
  19. +12 −22 exercises/Exercise_03_Add_Feature/tychodemo.bundle/plugin.xml
  20. +6 −7 exercises/Exercise_03_Add_Feature/tychodemo.bundle/pom.xml
  21. BIN exercises/Exercise_03_Add_Feature/tychodemo.bundle/splash.bmp
  22. +11 −42 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/Activator.java
  23. +0 −46 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/Application.java
  24. +0 −20 ...es/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/ApplicationActionBarAdvisor.java
  25. +0 −18 ...es/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/ApplicationWorkbenchAdvisor.java
  26. +0 −25 ...rcise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/ApplicationWorkbenchWindowAdvisor.java
  27. +0 −10 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/Perspective.java
  28. +29 −0 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/handlers/AboutHandler.java
  29. +33 −0 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/handlers/OpenHandler.java
  30. +34 −0 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/handlers/QuitHandler.java
  31. +64 −0 exercises/Exercise_03_Add_Feature/tychodemo.bundle/src/tychodemo/bundle/handlers/SaveHandler.java
  32. +105 −0 exercises/Exercise_03_Add_Feature/tychodemo.bundle/tychodemo.bundle.product
  33. +0 −31 exercises/Exercise_03_Add_Feature/tychodemo.bundle/tychodemo.launch
  34. +11 −10 exercises/Exercise_03_Add_Feature/tychodemo.parent/pom.xml
@@ -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
@@ -1,4 +1,4 @@
source.. = src/
-output.. = target/classes/
+output.. = bin/
bin.includes = META-INF/,\
.
@@ -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>
@@ -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());
- }
-
-}
@@ -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"));
+ }
+
+}
@@ -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>
@@ -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
@@ -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/
Oops, something went wrong.

0 comments on commit 21890be

Please sign in to comment.