Skip to content
Draft
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
19 changes: 14 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
actions: read
steps:
- uses: actions/checkout@v7

- name: Setup Java
uses: eclipse-set/build/.github/actions/setup-java@main

Expand Down Expand Up @@ -235,7 +235,7 @@ jobs:
name: set-m2deploy-${{github.run_number}}
path: ${{ env.DEPLOY_DIR }}
retention-days: 1

- name: Prepare release asset
if: startsWith(github.ref, 'refs/tags/')
run: |
Expand Down Expand Up @@ -338,7 +338,7 @@ jobs:
- news
permissions:
security-events: write
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v7

Expand Down Expand Up @@ -410,7 +410,7 @@ jobs:
uses: github/codeql-action/analyze@v4.37.3

swtbot:
runs-on: windows-latest
runs-on: ubuntu-latest
needs:
- java
permissions:
Expand Down Expand Up @@ -454,6 +454,13 @@ jobs:
~/.cache/tycho/
key: ${{ runner.os }}-tycho-${{ hashFiles('**/java/bundles/org.eclipse.set.releng.target/org.eclipse.set.releng.target.target', '**/pom.xml') }}
restore-keys: ${{ runner.os }}-tycho-

- name: Install xvfb + GTK
run: |
sudo apt-get update
sudo apt-get install -y xvfb libgtk-3-0 libgtk2.0-0
export DISPLAY=:99
Xvfb :99 -screen 0 1920x1080x24 &

- name: Run Test
id: test-steps
Expand All @@ -463,7 +470,9 @@ jobs:
if [[ "${{ github.event_name }}" == "pull_request" || "${{github.ref}}" == refs/heads/release/* ]]; then
m2RepoPath="file://${{ env.DEPLOY_DIR }}"
fi
mvn ${{ env.MVN_FLAGS }} -f java/java-test/pom.xml verify \
export DISPLAY=:99
mvn -T 1.5C -U -B -f java-test/pom.xml clean verify \
--settings ./.github/settings.xml \
-Dskip-test=false \
-Dm2-repo-path="$m2RepoPath" \
-Dapplication-under-test="${{ env.TEST_APPLICATION_DIR }}" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,16 @@ public interface ToolboxProperties {
public static final String TMP_BASE_DIR = "toolbox.tmpdir";

/**
* Property key for the default directory of the toolbox application.
* Property key for the default directory of the toolbox application on
* windows.
*/
public static final String TOOLBOX_DEFAULT_DIRECTORY = "toolbox.defaultdir";
public static final String TOOLBOX_DEFAULT_DIRECTORY_WIN = "toolbox.defaultdir.win";

/**
* Property key for the default directory of the toolbox application on
* linux.
*/
public static final String TOOLBOX_DEFAULT_DIRECTORY_LINUX = "toolbox.defaultdir.linux";

/**
* Property key for the default NatTable line height.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* Copyright (c) 2025 DB InfraGO AG and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v2.0 which is available at
* https://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
*/
package org.eclipse.set.basis.constants;

/**
* The supported os
*
* @author truong
*/
public enum ToolboxOS {
/**
* Windows
*/
WIN,
/**
* Linux
*/
LINUX
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.eclipse.set.basis.ProjectInitializationData;
import org.eclipse.set.basis.Wrapper;
import org.eclipse.set.basis.constants.ToolboxConstants;
import org.eclipse.set.basis.constants.ToolboxOS;
import org.eclipse.set.basis.exceptions.ErrorStatus;
import org.eclipse.set.basis.extensions.PathExtensions;
import org.eclipse.set.basis.files.ToolboxFileFilter;
Expand All @@ -48,6 +49,7 @@
import org.eclipse.set.core.services.dialog.DialogService;
import org.eclipse.set.core.services.files.ToolboxFileService;
import org.eclipse.set.custom.extensions.FileDialogExtensions;
import org.eclipse.set.utils.ToolboxConfiguration;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
Expand Down Expand Up @@ -598,8 +600,12 @@ public void openDirectoryAfterExport(final Shell shell, final Path path) {
messages.DialogService_OpenDirectoryAfterExport_ShowDir);
if (result == 1) {
try {
final String openExplorerCmd = ToolboxConfiguration
.getCurrentOS() == ToolboxOS.LINUX ? "nautilus" //$NON-NLS-1$
: "explorer"; //$NON-NLS-1$
Runtime.getRuntime()
.exec(new String[] { "explorer", path.toString() }); //$NON-NLS-1$
.exec(new String[] { openExplorerCmd,
path.toString() });
} catch (final IOException e) {
throw new RuntimeException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,9 @@ private boolean forceFocusAndShowPart(final String id) {
final Wrapper<Boolean> result = new Wrapper<>();
final List<MWindow> windows = application.getChildren();
final MWindow mWindow = windows.get(0);

Display.getDefault().syncExec(() -> {
((org.eclipse.swt.widgets.Shell) mWindow.getWidget()).forceFocus();
mWindow.getContext().activate();
showPartImpl(id);
result.setValue(Boolean.valueOf(true));
broker.post(UIEvents.REQUEST_ENABLEMENT_UPDATE_TOPIC,
Expand Down
2 changes: 1 addition & 1 deletion java/bundles/org.eclipse.set.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
label="Eclipse Signalling Engineering Toolbox Feature"
version="2.7.0.qualifier"
provider-name="Eclipse Signalling Engineering Toolbox"
os="win32">
os="linux,win32">

<description>
Eclipse Signalling Engineering Toolbox main feature, containing the entirety of the toolbox.
Expand Down
Empty file.
Empty file.
165 changes: 83 additions & 82 deletions java/bundles/org.eclipse.set.feature/rootdir/data/export/pdf/schriftfeld_vorlage.xsl
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,82 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2017 DB Netz AG and others.

All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
-->
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"
exclude-result-prefixes="fo">

<xsl:include href="titlebox.xsl" />

<!-- CUSTOMIZE: Adjust the following defaults only if needed -->
<xsl:variable name="small-border-style">0.25mm solid black</xsl:variable>
<xsl:variable name="wide-border-style">0.5mm solid black</xsl:variable>
<xsl:variable name="SB">0.125</xsl:variable>
<xsl:variable name="WB">0.25</xsl:variable>
<xsl:attribute-set name="default-font">
<xsl:attribute name="font-family">Open Sans Condensed</xsl:attribute>
<xsl:attribute name="font-size">8</xsl:attribute>
<xsl:attribute name="font-style">normal</xsl:attribute>
<xsl:attribute name="font-weight">normal</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="titlebox-font">
<xsl:attribute name="font-family">Open Sans Condensed</xsl:attribute>
<xsl:attribute name="font-style">normal</xsl:attribute>
<xsl:attribute name="font-weight">normal</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="title-box-table-style">
<xsl:attribute name="width">18.08cm</xsl:attribute>
<xsl:attribute name="margin">0mm</xsl:attribute>
<xsl:attribute name="padding">0mm</xsl:attribute>
<xsl:attribute name="start-indent">0mm</xsl:attribute>
<xsl:attribute name="end-indent">0mm</xsl:attribute>
<xsl:attribute name="text-align">center</xsl:attribute>
<xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="table-master-style">
<!-- Page layout -->
<xsl:attribute name="margin-left">5mm</xsl:attribute>
<xsl:attribute name="margin-right">5mm</xsl:attribute>
<xsl:attribute name="margin-top">5mm</xsl:attribute>
<xsl:attribute name="margin-bottom">5mm</xsl:attribute>
<xsl:attribute name="page-height">85mm</xsl:attribute>
<xsl:attribute name="page-width">191mm</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="table-header-style">
<xsl:attribute name="text-align">center</xsl:attribute>
<xsl:attribute name="display-align">center</xsl:attribute>
<xsl:attribute name="border"><xsl:value-of select="$small-border-style" /></xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="no-border-style">
<xsl:attribute name="border">none</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="thin-border-style">
<xsl:attribute name="border"><xsl:value-of select="$small-border-style" /></xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="wide-border-style">
<xsl:attribute name="border"><xsl:value-of select="$wide-border-style" /></xsl:attribute>
</xsl:attribute-set>

<!-- Main page layout -->
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" language="de" linefeed-treatment="preserve" xsl:use-attribute-sets="default-font">
<fo:layout-master-set>
<fo:simple-page-master xsl:use-attribute-sets="table-master-style"
master-name="table-master">
<fo:region-body />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="table-master">
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates select="//TitleBox"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>

</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2017 DB Netz AG and others.

All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
-->
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"
exclude-result-prefixes="fo">

<xsl:include href="titlebox.xsl" />

<!-- CUSTOMIZE: Adjust the following defaults only if needed -->
<xsl:variable name="small-border-style">0.25mm solid black</xsl:variable>
<xsl:variable name="wide-border-style">0.5mm solid black</xsl:variable>
<xsl:variable name="SB">0.125</xsl:variable>
<xsl:variable name="WB">0.25</xsl:variable>
<xsl:attribute-set name="default">
<xsl:attribute name="font-family">Open Sans Condensed</xsl:attribute>
<xsl:attribute name="font-size">8</xsl:attribute>
<xsl:attribute name="font-style">normal</xsl:attribute>
<xsl:attribute name="font-weight">normal</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="titlebox-font">
<xsl:attribute name="font-family">Open Sans Condensed</xsl:attribute>
<xsl:attribute name="font-style">normal</xsl:attribute>
<xsl:attribute name="font-weight">normal</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="title-box-table-style">
<xsl:attribute name="width">18.08cm</xsl:attribute>
<xsl:attribute name="margin">0mm</xsl:attribute>
<xsl:attribute name="padding">0mm</xsl:attribute>
<xsl:attribute name="start-indent">0mm</xsl:attribute>
<xsl:attribute name="end-indent">0mm</xsl:attribute>
<xsl:attribute name="text-align">center</xsl:attribute>
<xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="table-master-style">
<!-- Page layout -->
<xsl:attribute name="margin-left">5mm</xsl:attribute>
<xsl:attribute name="margin-right">5mm</xsl:attribute>
<xsl:attribute name="margin-top">5mm</xsl:attribute>
<xsl:attribute name="margin-bottom">5mm</xsl:attribute>
<xsl:attribute name="page-height">85mm</xsl:attribute>
<xsl:attribute name="page-width">191mm</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="table-header-style">
<xsl:attribute name="text-align">center</xsl:attribute>
<xsl:attribute name="display-align">center</xsl:attribute>
<xsl:attribute name="border"><xsl:value-of select="$small-border-style" /></xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="no-border-style">
<xsl:attribute name="border">none</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="thin-border-style">
<xsl:attribute name="border"><xsl:value-of select="$small-border-style" /></xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="wide-border-style">
<xsl:attribute name="border"><xsl:value-of select="$wide-border-style" /></xsl:attribute>
</xsl:attribute-set>

<!-- Main page layout -->
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" language="de" linefeed-treatment="preserve" xsl:use-attribute-sets="default">
<fo:layout-master-set>
<fo:simple-page-master xsl:use-attribute-sets="table-master-style"
master-name="table-master">
<fo:region-body />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="table-master">
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates select="//TitleBox"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
<fo:declarations xsl:use-attribute-sets="default" />
</xsl:template>

</xsl:stylesheet>
Loading