Commit 1cb4a91a authored by Marco Descher's avatar Marco Descher 🏔

[16396] Initial check-in ch.elexis.core.ui.eenv

parent 4703e34e
Pipeline #11470 failed with stages
in 17 seconds
<?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-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ch.elexis.core.ui.eenv</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>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
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=11
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Elexis-Environment Ui
Bundle-SymbolicName: ch.elexis.core.ui.eenv;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: elexis.info
Require-Bundle: org.eclipse.ui;bundle-version="3.110.0",
org.eclipse.swt,
ch.elexis.core
Automatic-Module-Name: ch.elexis.core.ui.eenv
Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: javax.annotation,
javax.inject;version="1.0.0",
org.eclipse.e4.core.di.annotations;version="1.6.0",
org.eclipse.e4.ui.di
output.. = bin/
bin.includes = META-INF/,\
.,\
fragment.e4xmi,\
plugin.xml
source.. = src/
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<extension
point="org.eclipse.ui.views">
<e4view
allowMultiple="false"
category="ch.elexis.core.ui.eenv.category"
class="ch.elexis.core.ui.eenv.part.RocketchatPart"
icon="rsc/rocketchat.png"
id="ch.elexis.core.ui.eenv.part.rocketchatpart"
name="Chat"
restorable="true">
</e4view>
<e4view
allowMultiple="true"
category="ch.elexis.core.ui.eenv.category"
class="ch.elexis.core.ui.eenv.part.BookstackPart"
icon="rsc/bookstack.png"
id="ch.elexis.core.ui.eenv.part.bookstackpart"
name="Bookstack"
restorable="true">
</e4view>
<category
id="ch.elexis.core.ui.eenv.category"
name="Elexis-Environment">
</category>
</extension>
</plugin>
package ch.elexis.core.ui.eenv.part;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.ui.di.Focus;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.widgets.Composite;
import ch.elexis.core.eenv.IElexisEnvironmentService;
public class BookstackPart {
@Inject
@Optional
private IElexisEnvironmentService elexisEnvironmentService;
private Browser browser;
/**
* Create contents of the view part.
*/
@PostConstruct
public void createControls(Composite parent){
browser = new Browser(parent, SWT.NONE);
if (elexisEnvironmentService == null) {
browser.setText("Elexis-Environment nicht konfiguriert");
} else {
// browser.setCookie(value, url)
// login cookies?!
browser.setUrl(elexisEnvironmentService.getBookstackBaseUrl());
}
}
@Focus
public void setFocus(){
browser.setFocus();
}
}
package ch.elexis.core.ui.eenv.part;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.ui.di.Focus;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.widgets.Composite;
import ch.elexis.core.eenv.IElexisEnvironmentService;
public class RocketchatPart {
@Inject @Optional
private IElexisEnvironmentService elexisEnvironmentService;
private Browser browser;
/**
* Create contents of the view part.
*/
@PostConstruct
public void createControls(Composite parent){
browser = new Browser(parent, SWT.NONE);
if (elexisEnvironmentService == null) {
browser.setText("Elexis-Environment nicht konfiguriert");
} else {
// browser.setCookie(value, url)
// login cookies?!
browser.setUrl(elexisEnvironmentService.getRocketchatBaseUrl());
}
}
@Focus
public void setFocus(){
browser.setFocus();
}
}
/**
* Elexis-Environment View Parts
*/
package ch.elexis.core.ui.eenv.part;
\ No newline at end of file
......@@ -23,8 +23,20 @@ public interface IElexisEnvironmentService {
*/
public String getProperty(String key);
default String getBaseUrl(){
return "https://" + getHostname();
}
default String getRocketchatBaseUrl(){
return getBaseUrl() + "/chat";
}
default String getRocketchatIntegrationBaseUrl(){
return "https://" + getHostname() + "/chat/hooks/";
return getRocketchatBaseUrl() + "/hooks/";
}
default String getBookstackBaseUrl(){
return getBaseUrl() + "/bookstack";
}
}
......@@ -59,6 +59,7 @@
<module>ch.elexis.core.ui.documents</module>
<module>ch.elexis.core.ui.eigenartikel</module>
<module>ch.elexis.core.ui.eigendiagnosen</module>
<module>ch.elexis.core.ui.eenv</module>
<module>ch.elexis.core.ui.icons</module>
<module>ch.elexis.core.ui.importer.div.native32</module>
<module>ch.elexis.core.ui.importer.div.native64</module>
......
......@@ -18,6 +18,9 @@
<feature url="features/ch.elexis.core.tasks.feature_1.0.0.qualifier.jar" id="ch.elexis.core.tasks.feature" version="1.0.0.qualifier">
<category name="elexis_3_core"/>
</feature>
<feature id="ch.elexis.core.ui.eenv.feature">
<category name="elexis_3_core"/>
</feature>
<bundle id="ch.elexis.core.data.tests" version="0.0.0"/>
<bundle id="ch.elexis.core.ui.usage" version="0.0.0"/>
<bundle id="ch.elexis.core.test" version="0.0.0"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ch.elexis.core.ui.eenv.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="ch.elexis.core.ui.eenv.feature"
label="Elexis-Environment Ui Feature"
version="1.0.0.qualifier"
provider-name="elexis.info">
<description url="http://www.example.com/description">
[Enter Feature Description here.]
</description>
<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>
<license url="http://www.example.com/license">
[Enter License Description here.]
</license>
<plugin
id="ch.elexis.core.ui.eenv"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>
......@@ -19,6 +19,7 @@
<module>ch.elexis.core.common.feature</module>
<module>ch.elexis.core.tasks.feature</module>
<module>ch.elexis.core.logging.feature</module>
<module>ch.elexis.core.ui.eenv.feature</module>
<module>ch.elexis.core.ui.feature</module>
<module>ch.elexis.core.ui.p2.feature</module>
</modules>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment