Skip to content

Commit

Permalink
Merge Tycho-demo into Tycho
Browse files Browse the repository at this point in the history
  • Loading branch information
mickaelistria committed Jul 9, 2021
1 parent c2a7453 commit 14c648c
Show file tree
Hide file tree
Showing 107 changed files with 4,010 additions and 5 deletions.
25 changes: 25 additions & 0 deletions demo/README.md
@@ -0,0 +1,25 @@
Tycho Demo Projects
===================

Sample projects demonstrating how to use Tycho.

* `itp01/`: Simple application that demonstrates how to build an eclipse plug-in and execute JUnit tests
* `itp02/`: Simple application that demonstrates [use of pom-first dependencies](https://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts)
* `itp03-crossplatform/`: _(Deprecated)_ Trivial cross-platform RCP application that displays a SWT MessageBox with current OSGi os/ws/arch properties. Specify either -Pe35 or -Pe36 to build for specified eclipse version
* `itp04-rcp/`: [Trivial cross-platform RCP product application with root files which can be updated by means of p2](https://wiki.eclipse.org/Tycho/Demo_Projects/RCP_Application)

Each demo project (except itp02) can be built by executing:

mvn clean install

in the corresponding folder.

About Tycho
===========

* [Project Homepage](http://www.eclipse.org/tycho/)
* [Documentation](http://eclipse.org/tycho/documentation.php)
* [Bug Tracker](https://bugs.eclipse.org/bugs/buglist.cgi?product=Tycho)
* [How to Contribute](http://wiki.eclipse.org/Tycho/Contributor_Guide)
* [Contact Us](https://dev.eclipse.org/mailman/listinfo/tycho-user)

36 changes: 36 additions & 0 deletions demo/itp01/pom.xml
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>tycho.demo.itp01</groupId>
<artifactId>parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>tycho.demo.itp01</module>
<module>tycho.demo.itp01.tests</module>
</modules>

<properties>
<tycho-version>2.3.0</tycho-version>
</properties>

<repositories>
<repository>
<id>helios</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/helios</url>
</repository>
</repositories>

<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>

</project>
9 changes: 9 additions & 0 deletions demo/itp01/tycho.demo.itp01.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tests Plug-in
Bundle-SymbolicName: tycho.demo.itp01.tests
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.junit4,
tycho.demo.itp01;bundle-version="1.0.0",
org.eclipse.ui
4 changes: 4 additions & 0 deletions demo/itp01/tycho.demo.itp01.tests/build.properties
@@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
52 changes: 52 additions & 0 deletions demo/itp01/tycho.demo.itp01.tests/pom.xml
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>tycho.demo.itp01</groupId>
<artifactId>parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>

<artifactId>tycho.demo.itp01.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>

<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<useUIHarness>true</useUIHarness>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>osx</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<argLine>-XstartOnFirstThread</argLine>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>

</project>
@@ -0,0 +1,33 @@
/*******************************************************************************
* Copyright (c) 2008, 2011 Sonatype Inc. and others.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Sonatype Inc. - initial API and implementation
*******************************************************************************/
package tycho.demo.itp01.tests;

import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.junit.Test;

import tycho.demo.itp01.actions.SampleAction;

public class ITP01Test {

@Test
public void sampleAction() {
IWorkbench workbench = PlatformUI.getWorkbench();

SampleAction action = new SampleAction();
action.init(workbench.getActiveWorkbenchWindow());

// action.run(null);
}

}
9 changes: 9 additions & 0 deletions demo/itp01/tycho.demo.itp01/META-INF/MANIFEST.MF
@@ -0,0 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Itp Plug-in
Bundle-SymbolicName: tycho.demo.itp01;singleton:=true
Bundle-Version: 1.0.0.qualifier
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: tycho.demo.itp01.actions;x-friends:="tycho.demo.itp01.tests"
5 changes: 5 additions & 0 deletions demo/itp01/tycho.demo.itp01/build.properties
@@ -0,0 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = plugin.xml,\
META-INF/,\
.
Binary file added demo/itp01/tycho.demo.itp01/icons/alt_about.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.

0 comments on commit 14c648c

Please sign in to comment.