Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
Expand All @@ -27,6 +26,13 @@ jobs:
uses: stCarolas/setup-maven@v4.5
with:
maven-version: '3.9.7'
- name: Start Xvfb
run: |
sudo apt-get update
sudo apt-get install -y xvfb
Xvfb :99 -screen 0 1920x1080x24 &
export DISPLAY=:99
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Build with Maven
run: mvn clean verify -ntp
- uses: "marvinpinto/action-automatic-releases@latest"
Expand Down
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<extension>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-build</artifactId>
<version>4.0.12</version>
<version>4.0.13</version>
</extension>
</extensions>
4 changes: 4 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This is the example code for the https://learn.vogella.com/courses/details/rich-client-platform[Eclipse RCP commercial training] from vogella GmbH.
It is also used in the http://www.vogella.com/books/eclipsercp.html[Eclipse Rich Client Platform book].
=== Default branch

_main_ is the default branch of this repository.
It contains the latest stable version of the code.

=== Running the application

Expand Down
7 changes: 7 additions & 0 deletions com.example.e4.swtbot.tests/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
45 changes: 45 additions & 0 deletions com.example.e4.swtbot.tests/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.example.e4.swtbot.tests</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1749802401051</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=21
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
15 changes: 15 additions & 0 deletions com.example.e4.swtbot.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Swtbottests
Bundle-SymbolicName: com.example.e4.swtbot.tests
Bundle-Version: 1.0.0.qualifier
Import-Package: org.junit.jupiter.api;version="5.12.2"
Bundle-Vendor: EXAMPLE
Require-Bundle: org.eclipse.swt,
org.eclipse.jface,
org.eclipse.swtbot.e4.finder;bundle-version="4.3.0",
org.eclipse.swtbot.swt.finder;bundle-version="4.3.0",
org.slf4j.api;bundle-version="1.7.30",
com.example.e4.rcp;bundle-version="1.0.0"
Automatic-Module-Name: com.example.e4.swtbottests
Bundle-RequiredExecutionEnvironment: JavaSE-21
6 changes: 6 additions & 0 deletions com.example.e4.swtbot.tests/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
pom.model.property.tycho.surefire.useUIHarness = true
pom.model.property.tycho.surefire.useUIThread = true
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.example.e4.swtbottests;


import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class ExitHandlerTest {

private static SWTBot bot;

@BeforeEach
public void beforeClass() throws Exception {
// don't use SWTWorkbenchBot here which relies on Platform 3.x
bot = new SWTBot();
}

@Test
public void executeExit() {
SWTBotMenu fileMenu = bot.menu("File");
assertNotNull(fileMenu);
SWTBotMenu exitMenu = fileMenu.menu("Quit");
assertNotNull(exitMenu);
exitMenu.click();

SWTBotShell shell = bot.shell("Confirmation");
SWTBot childBot = new SWTBot(shell.widget);
SWTBotButton button = childBot.button("Cancel");
assertTrue(button.isEnabled());
button.click();
}



// @AfterEach
// public void sleep() {
// bot.sleep(2000);
// }
}
68 changes: 68 additions & 0 deletions com.vogella.eclipse.css/css/dark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#org-eclipse-ui-editorss {
swt-tab-height: 8px;
}

.MPartStack {
font-family: 'Segoe UI', sans-serif;
}

CTabFolder {
color: #bbbbbb; /* Inactive tab text */
swt-tab-outline: #2a2a2a; /* Border color for selected tab */
swt-outer-keyline-color: #3a3a3a; /* Border color for the tabs container */
swt-unselected-tabs-color: #2e2e2e #252525 100% 100%; /* Background for unselected tabs */
swt-selected-tab-fill: #3d3d3d; /* Background for selected tab */
swt-unselected-hot-tab-color-background: #161616; /* Hovered tab background */
swt-selected-tab-highlight: none;
}

CTabFolder[style~='SWT.DOWN'][style~='SWT.BOTTOM'] {
swt-unselected-hot-tab-color-background: #161616;
swt-selected-tab-highlight: #316c9b;
swt-selected-highlight-top: false;
}

CTabFolder.active {
swt-selected-tab-highlight: #316c9b;
swt-selected-highlight-top: false;
}

CTabItem,
CTabItem CLabel {
background-color: #3d3d3d;
color: #999999; /* Inactive, unselected tab text */
}

CTabItem:selected,
CTabItem:selected CLabel {
color: #ffffff; /* Selected tab text */
}

.MPartStack.active > CTabItem,
.MPartStack.active > CTabItem CLabel {
background-color: #3d3d3d;
color: #cccccc; /* Active, unselected tab text */
}

.MPartStack.active > CTabItem:selected,
.MPartStack.active > CTabItem:selected CLabel {
color: #ffffff; /* Active, selected tab text */
}

.MPartStack.active.noFocus > CTabItem:selected {
color: #aaaaaa; /* Selected but no focus */
}

CTabFolder > Composite#ToolbarComposite {
background-color: #3d3d3d;
}

CTabFolder.MArea CTabItem,
CTabFolder.MArea CTabItem CLabel {
background-color: #1e1e1e; /* Dark background fallback */
}

CTabItem.busy {
color: #888888;
}

5 changes: 5 additions & 0 deletions com.vogella.eclipse.css/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
id="com.vogella.eclipse.css.rainbow"
label="Rainbow">
</theme>
<theme
basestylesheeturi="css/dark.css"
id="com.vogella.eclipse.css.dark"
label="Dark">
</theme>
</extension>

</plugin>
Loading
Loading