From 409ff6d9366c03f114c436a6efa72232ffd2e52f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 6 Nov 2024 18:34:04 +0100 Subject: [PATCH] Add a link to the e-Mail form. --- .../META-INF/MANIFEST.MF | 11 +++-- .../OSGI-INF/l10n/bundle.properties | 13 +++++ .../OSGI-INF/l10n/bundle_de.properties | 13 +++++ .../net.openchrom.feature.branding/about.ini | 2 +- .../build.properties | 5 +- .../fragment.e4xmi | 12 +++++ .../{ => icons}/32x32-32.bmp | Bin .../icons/mail.gif | Bin 0 -> 173 bytes .../net.openchrom.feature.branding/plugin.xml | 12 +++++ .../src/INFO.txt | 1 - .../openchrom/feature/branding/Activator.java | 46 ++++++++++++++++++ .../feature/branding/ContactHandler.java | 25 ++++++++++ 12 files changed, 134 insertions(+), 6 deletions(-) create mode 100644 openchrom/plugins/net.openchrom.feature.branding/OSGI-INF/l10n/bundle.properties create mode 100644 openchrom/plugins/net.openchrom.feature.branding/OSGI-INF/l10n/bundle_de.properties create mode 100644 openchrom/plugins/net.openchrom.feature.branding/fragment.e4xmi rename openchrom/plugins/net.openchrom.feature.branding/{ => icons}/32x32-32.bmp (100%) create mode 100644 openchrom/plugins/net.openchrom.feature.branding/icons/mail.gif create mode 100644 openchrom/plugins/net.openchrom.feature.branding/plugin.xml delete mode 100644 openchrom/plugins/net.openchrom.feature.branding/src/INFO.txt create mode 100644 openchrom/plugins/net.openchrom.feature.branding/src/net/openchrom/feature/branding/Activator.java create mode 100644 openchrom/plugins/net.openchrom.feature.branding/src/net/openchrom/feature/branding/ContactHandler.java diff --git a/openchrom/plugins/net.openchrom.feature.branding/META-INF/MANIFEST.MF b/openchrom/plugins/net.openchrom.feature.branding/META-INF/MANIFEST.MF index c44f65154..b725efaad 100644 --- a/openchrom/plugins/net.openchrom.feature.branding/META-INF/MANIFEST.MF +++ b/openchrom/plugins/net.openchrom.feature.branding/META-INF/MANIFEST.MF @@ -1,8 +1,13 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 -Bundle-Name: OpenChrom -Bundle-SymbolicName: net.openchrom.feature.branding +Bundle-Name: Branding +Bundle-SymbolicName: net.openchrom.feature.branding;singleton:=true Bundle-Version: 1.5.0.qualifier +Require-Bundle: org.eclipse.swt, + org.eclipse.e4.core.di.annotations, + org.eclipse.osgi Automatic-Module-Name: net.openchrom.feature.branding +Bundle-ActivationPolicy: lazy +Bundle-Activator: net.openchrom.feature.branding.Activator Bundle-RequiredExecutionEnvironment: JavaSE-17 -Bundle-Vendor: OpenChrom® +Bundle-Vendor: OpenChrom diff --git a/openchrom/plugins/net.openchrom.feature.branding/OSGI-INF/l10n/bundle.properties b/openchrom/plugins/net.openchrom.feature.branding/OSGI-INF/l10n/bundle.properties new file mode 100644 index 000000000..03a9d39e2 --- /dev/null +++ b/openchrom/plugins/net.openchrom.feature.branding/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,13 @@ +############################################################################### +# Copyright (c) 2024 Lablicate GmbH. +# +# 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: +# Matthias Mailänder - initial API and implementation +############################################################################### +#Properties file +Contact=Contact \ No newline at end of file diff --git a/openchrom/plugins/net.openchrom.feature.branding/OSGI-INF/l10n/bundle_de.properties b/openchrom/plugins/net.openchrom.feature.branding/OSGI-INF/l10n/bundle_de.properties new file mode 100644 index 000000000..ff29d9cbd --- /dev/null +++ b/openchrom/plugins/net.openchrom.feature.branding/OSGI-INF/l10n/bundle_de.properties @@ -0,0 +1,13 @@ +############################################################################### +# Copyright (c) 2024 Lablicate GmbH. +# +# 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: +# Matthias Mailänder - initial API and implementation +############################################################################### +#Properties file +Contact=Kontakt \ No newline at end of file diff --git a/openchrom/plugins/net.openchrom.feature.branding/about.ini b/openchrom/plugins/net.openchrom.feature.branding/about.ini index 8115c6cd3..b2556e5fe 100644 --- a/openchrom/plugins/net.openchrom.feature.branding/about.ini +++ b/openchrom/plugins/net.openchrom.feature.branding/about.ini @@ -1,4 +1,4 @@ -featureImage=32x32-32.bmp +featureImage=icons/32x32-32.bmp aboutText=OpenChrom® is a tool for the analysis and visualization of mass spectrometric and chromatographic data developed by Lablicate GmbH.\n\ It is based on Chemclipse but offers additional features that cannot be part of the Chemclipse project due to licencing constrains.\n\ \n\ diff --git a/openchrom/plugins/net.openchrom.feature.branding/build.properties b/openchrom/plugins/net.openchrom.feature.branding/build.properties index 8fa36ae36..329c4ca75 100644 --- a/openchrom/plugins/net.openchrom.feature.branding/build.properties +++ b/openchrom/plugins/net.openchrom.feature.branding/build.properties @@ -1,6 +1,9 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ + OSGI-INF/,\ .,\ about.ini,\ - 32x32-32.bmp + icons/,\ + fragment.e4xmi,\ + plugin.xml diff --git a/openchrom/plugins/net.openchrom.feature.branding/fragment.e4xmi b/openchrom/plugins/net.openchrom.feature.branding/fragment.e4xmi new file mode 100644 index 000000000..47351b798 --- /dev/null +++ b/openchrom/plugins/net.openchrom.feature.branding/fragment.e4xmi @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/openchrom/plugins/net.openchrom.feature.branding/32x32-32.bmp b/openchrom/plugins/net.openchrom.feature.branding/icons/32x32-32.bmp similarity index 100% rename from openchrom/plugins/net.openchrom.feature.branding/32x32-32.bmp rename to openchrom/plugins/net.openchrom.feature.branding/icons/32x32-32.bmp diff --git a/openchrom/plugins/net.openchrom.feature.branding/icons/mail.gif b/openchrom/plugins/net.openchrom.feature.branding/icons/mail.gif new file mode 100644 index 0000000000000000000000000000000000000000..b949ac948afd440b65a5505c4f7c9a5fcfb6f55a GIT binary patch literal 173 zcmZ?wbhEHb6krfwc+9}?|NsB`h=72IfD1boFaWtf{{R2+{{N2!`)}<3eb zvM_Qn@H6ND6$4EWU|?X0`f$>7^~sfRxRPAfIUwIH+w|y z+a&SOV8zUaL(YrLtvE~C6PsTAz8e#$YP>*LBFO9Mh8thnmS->p3pnh!%j{w!S9Rgt Ok3AfR-v=u(SOWlxVOAyp literal 0 HcmV?d00001 diff --git a/openchrom/plugins/net.openchrom.feature.branding/plugin.xml b/openchrom/plugins/net.openchrom.feature.branding/plugin.xml new file mode 100644 index 000000000..db5b0c55d --- /dev/null +++ b/openchrom/plugins/net.openchrom.feature.branding/plugin.xml @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/openchrom/plugins/net.openchrom.feature.branding/src/INFO.txt b/openchrom/plugins/net.openchrom.feature.branding/src/INFO.txt deleted file mode 100644 index b9d837105..000000000 --- a/openchrom/plugins/net.openchrom.feature.branding/src/INFO.txt +++ /dev/null @@ -1 +0,0 @@ -GIT needs at least one file in this directory to track it, otherwise Eclipse gives a compile error at checkout. Remove it, if not needed anymore. \ No newline at end of file diff --git a/openchrom/plugins/net.openchrom.feature.branding/src/net/openchrom/feature/branding/Activator.java b/openchrom/plugins/net.openchrom.feature.branding/src/net/openchrom/feature/branding/Activator.java new file mode 100644 index 000000000..87433f692 --- /dev/null +++ b/openchrom/plugins/net.openchrom.feature.branding/src/net/openchrom/feature/branding/Activator.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2008, 2024 Lablicate GmbH. + * + * 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: + * Philip Wenig - initial API and implementation + *******************************************************************************/ +package net.openchrom.feature.branding; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + private static BundleContext context; + + public static BundleContext getContext() { + + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + @Override + public void start(BundleContext bundleContext) throws Exception { + + System.err.println("ACTIVATOR"); + Activator.context = bundleContext; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + @Override + public void stop(BundleContext bundleContext) throws Exception { + + Activator.context = null; + } +} \ No newline at end of file diff --git a/openchrom/plugins/net.openchrom.feature.branding/src/net/openchrom/feature/branding/ContactHandler.java b/openchrom/plugins/net.openchrom.feature.branding/src/net/openchrom/feature/branding/ContactHandler.java new file mode 100644 index 000000000..9d20b1ddd --- /dev/null +++ b/openchrom/plugins/net.openchrom.feature.branding/src/net/openchrom/feature/branding/ContactHandler.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2024 Lablicate GmbH. + * + * 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: + * Matthias Mailänder - initial API and implementation + *******************************************************************************/ +package net.openchrom.feature.branding; + +import org.eclipse.e4.core.di.annotations.Execute; +import org.eclipse.swt.program.Program; +import org.eclipse.swt.widgets.Shell; + +public class ContactHandler { + + @Execute + public void execute(Shell shell) { + + Program.launch("https://lablicate.com/about/contact"); + } +}