Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add siteplan implementation #101

Merged
merged 9 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
52 changes: 50 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,25 @@ jobs:
path: web/about/dist
retention-days: 1

developerhelp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Asciidoctor & Hugo
uses: eclipse-set/build/.github/actions/setup-asciidoctor@main

- name: Build About
run: hugo
working-directory: web/developerhelp

- name: Store artifact
uses: actions/upload-artifact@v3
with:
name: developerhelp-artifact
path: web/developerhelp/dist
retention-days: 1

textviewer:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -63,6 +82,22 @@ jobs:
path: web/pdf/dist
retention-days: 1

siteplan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
npm ci
npm run build-prod
working-directory: web/siteplan
- name: Store artifact
uses: actions/upload-artifact@v3
with:
name: siteplan-artifact
path: web/siteplan/dist
retention-days: 1

news:
runs-on: ubuntu-latest
steps:
Expand All @@ -84,13 +119,14 @@ jobs:
path: web/news/public
retention-days: 1


java:
runs-on: ubuntu-latest
needs:
- docs
- textviewer
- pdfviewer
- siteplan
- developerhelp
- news
permissions:
contents: write
Expand Down Expand Up @@ -131,7 +167,19 @@ jobs:
uses: actions/download-artifact@v3
with:
name: about-artifact
path: web/about/dist
path: web/about/dist

- name: Fetch siteplan
uses: actions/download-artifact@v3
with:
name: siteplan-artifact
path: web/siteplan/dist

- name: Fetch developerhelp
uses: actions/download-artifact@v3
with:
name: developerhelp-artifact
path: web/developerhelp/dist

- name: Fetch news
uses: actions/download-artifact@v3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:advanced="http://www.eclipse.org/ui/2010/UIModel/application/ui/advanced" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmi:id="_D9x1kB5jEeW1jPyxhgRGUg" elementId="org.eclipse.e4.ide.application" bindingContexts="_D9x1mR5jEeW1jPyxhgRGUg">
<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:advanced="http://www.eclipse.org/ui/2010/UIModel/application/ui/advanced" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmlns:ui="http://www.eclipse.org/ui/2010/UIModel/application/ui" xmi:id="_D9x1kB5jEeW1jPyxhgRGUg" elementId="org.eclipse.e4.ide.application" bindingContexts="_D9x1mR5jEeW1jPyxhgRGUg">
<children xsi:type="basic:TrimmedWindow" xmi:id="_D9x1kR5jEeW1jPyxhgRGUg" elementId="planpro.mainwindow" selectedElement="_D9x1sB5jEeW1jPyxhgRGUg" label="%trimmedwindow.title" iconURI="">
<persistedState/>
<children xsi:type="advanced:PerspectiveStack" xmi:id="_D9x1sB5jEeW1jPyxhgRGUg">
Expand Down Expand Up @@ -27,6 +27,9 @@
</children>
<children xsi:type="menu:Menu" xmi:id="_D9x1rh5jEeW1jPyxhgRGUg" label="%menu.label.help">
<children xsi:type="menu:HandledMenuItem" xmi:id="_6mUoYBJcEem7h5-_uEYOFw" elementId="org.eclipse.set.application.handledmenuitem.help.news" label="%menu.label.help.toolboxnews" iconURI="platform:/plugin/org.eclipse.set.utils/icons/baseline_fiber_new_black_24dp.png" command="_cHSywBJfEem7h5-_uEYOFw"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_sG__QF0vEe6gKuocBy_cVw" elementId="org.eclipse.set.application.handledmenuitem.help.developerhelp" label="%menu.label.help.developerhelp" iconURI="platform:/plugin/org.eclipse.set.utils/icons/outline_help_center_black_24dp.png" command="_e2hnsF0vEe6gKuocBy_cVw">
<visibleWhen xsi:type="ui:ImperativeExpression" xmi:id="_vdHmgF0vEe6gKuocBy_cVw" contributionURI="bundleclass://org.eclipse.set.application/org.eclipse.set.application.handler.DeveloperHelpHandler"/>
</children>
<children xsi:type="menu:HandledMenuItem" xmi:id="_D9x1rx5jEeW1jPyxhgRGUg" label="%menu.label.help.about" iconURI="platform:/plugin/org.eclipse.set.utils/icons/ic_info_outline_black_24dp_1x.png" command="_D9x1ph5jEeW1jPyxhgRGUg"/>
</children>
</mainMenu>
Expand Down Expand Up @@ -57,6 +60,7 @@
<handlers xmi:id="_PrAmUBJhEem7h5-_uEYOFw" elementId="org.eclipse.set.application.handler.toolboxnews" contributionURI="bundleclass://org.eclipse.set.application/org.eclipse.set.application.handler.ToolboxNews" command="_cHSywBJfEem7h5-_uEYOFw"/>
<handlers xmi:id="_ot2bECiOEemmpqOXtBHImg" elementId="org.eclipse.set.application.handler.revert" contributionURI="bundleclass://org.eclipse.set.application/org.eclipse.set.application.handler.RevertHandler" command="_jy488CiOEemmpqOXtBHImg"/>
<handlers xmi:id="_tJU5UIYxEeuNU-GyWYwVKw" elementId="org.eclipse.set.application.set.handler.restoreactionarea" contributionURI="bundleclass://org.eclipse.set.application/org.eclipse.set.application.handler.RestoreActionAreaHandler" command="_HBip8IYxEeuNU-GyWYwVKw"/>
<handlers xmi:id="_kiN_MF0vEe6gKuocBy_cVw" elementId="org.eclipse.set.application.handler.developerHelpCommand" contributionURI="bundleclass://org.eclipse.set.application/org.eclipse.set.application.handler.DeveloperHelpHandler" command="_e2hnsF0vEe6gKuocBy_cVw"/>
<bindingTables xmi:id="_D9x1nh5jEeW1jPyxhgRGUg" bindingContext="_D9x1mR5jEeW1jPyxhgRGUg">
<bindings xmi:id="_D9x1nx5jEeW1jPyxhgRGUg" keySequence="M1+Q" command="_D9x1nB5jEeW1jPyxhgRGUg"/>
<bindings xmi:id="_D9x1oh5jEeW1jPyxhgRGUg" keySequence="M1+O" command="_D9x1oB5jEeW1jPyxhgRGUg"/>
Expand All @@ -74,6 +78,7 @@
<commands xmi:id="_k_djsFYPEeWj9J5PLz_yfw" elementId="org.eclipse.set.application.closeSession" commandName="closeSessionCommand"/>
<commands xmi:id="_D9x1ph5jEeW1jPyxhgRGUg" elementId="org.eclipse.ui.help.aboutAction" commandName="aboutCommand"/>
<commands xmi:id="_xcZPcJUnEeaxG6q_hAfBDQ" elementId="org.eclipse.set.application.command.details" commandName="%toolbar.details"/>
<commands xmi:id="_e2hnsF0vEe6gKuocBy_cVw" elementId="org.eclipse.set.application.developerHelpCommand" commandName="developerHelpCommand"/>
<commands xmi:id="_cHSywBJfEem7h5-_uEYOFw" elementId="org.eclipse.set.application.command.toolboxnews" commandName="Toolboxnews"/>
<commands xmi:id="_jy488CiOEemmpqOXtBHImg" elementId="org.eclipse.set.application.command.revert" commandName="Revert"/>
<commands xmi:id="_HBip8IYxEeuNU-GyWYwVKw" elementId="org.eclipse.set.application.set.command.restoreactionarea" commandName="RestoreActionArea"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# Externalisierungen des Anwendungsmodells
menu.label.file = Datei
menu.label.file.close = Datei schließen
menu.label.file.close = Datei schließen
menu.label.file.exampleproject=Beispielprojekt laden
menu.label.file.newproject = Neues Projekt initialisieren
menu.label.file.open = Öffnen...
menu.label.file.open = Öffnen...
menu.label.file.quit = Beenden
menu.label.file.restoreactionarea=Aktionsbereich anzeigen
menu.label.file.revert = Alle ungespeicherten Änderungen verwerfen
menu.label.file.revert = Alle ungespeicherten Änderungen verwerfen
menu.label.file.save = Speichern
menu.label.help = Hilfe
menu.label.help.developerhelp = SET-Hilfe für Entwickler
menu.label.help.about = Versions- und Lizenz-Informationen
menu.label.help.toolboxnews = Neuigkeiten
org.eclipse.set.application.part.actions.label=Aktionen
toolbar.details=Details
toolbar.file.open.tooltip = Datei öffnen...
toolbar.file.revert.tooltip = Alle ungespeicherten Änderungen verwerfen
toolbar.file.open.tooltip = Datei öffnen...
toolbar.file.revert.tooltip = Alle ungespeicherten Änderungen verwerfen
toolbar.file.save.restoreactionarea=Aktionsbereich anzeigen
toolbar.file.save.tooltip = Datei speichern
toolbar.view.news=Neuigkeiten
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ Service-Component: OSGI-INF/org.eclipse.set.application.actionservice.ActionServ
OSGI-INF/org.eclipse.set.application.descriptions.ChromiumCreditsPartDescriptionService.xml,
OSGI-INF/org.eclipse.set.application.descriptions.SourceWebTextViewDescriptionService.xml,
OSGI-INF/org.eclipse.set.application.descriptions.ViewPdfPartDescriptionService.xml,
OSGI-INF/org.eclipse.set.application.descriptions.WebDeveloperHelpPartDescription.xml,
OSGI-INF/org.eclipse.set.application.descriptions.WebNewsPartDescriptionService.xml,
OSGI-INF/org.eclipse.set.application.exampleservice.ExampleServiceImpl.xml,
OSGI-INF/org.eclipse.set.application.initializationservice.CommonPlanProInitialization.xml,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Externalisierungen über Meldungsklasse
# Externalisierungen über Meldungsklasse
AboutHandler_ModelVersionLabel=PlanPro-Modell-Version
AboutHandler_ToolboxVersionLabel=Werkzeugkoffer-Version
AboutHandler_UnknownVersion=unbekannt

AbstractTextViewPart_Progress=Öffne Textsicht
AbstractTextViewPart_Progress=Öffne Textsicht
AbstractTextViewPart_UpdateView=Aktualisiere Textsicht

AttachmentPart_AttachmentsInDomain=Anhänge in der Fachplanung
AttachmentPart_AttachmentsInObjectmanagement=Anhänge im Objektmanagement
AttachmentPart_AttachmentsInDomain=Anhänge in der Fachplanung
AttachmentPart_AttachmentsInObjectmanagement=Anhänge im Objektmanagement

Common_InfoErrorCause=Ursache

Expand All @@ -28,12 +28,13 @@ OpenPlanProHandler_LoadingPlanProModelFileErrorTitle=Fehler beim Laden der Datei
TableTypeSelectionControl_noSession=Keine Sitzung geladen

SourceTextViewDescriptionService_ViewName=Datei in Textsicht
AttachmentPartDescriptionService_ViewName=Liste der Anhänge
AttachmentPartDescriptionService_ViewName=Liste der Anhänge

ViewPdfPart_ExportButton=Exportieren
ViewPdfPart_ExportErrorTitle=Fehler beim Export
ViewPdfPart_ExportErrorText=Die Datei %s konnte nicht gespeichert werden.

AboutPartDescriptionService_ViewName=Versions- und Lizenz-Informationen
WebNewsPartDescriptionService_ViewName=Neuigkeiten
ChromiumCreditsPartDescriptionService_ViewName=Chromium Lizenzinformationen
ChromiumCreditsPartDescriptionService_ViewName=Chromium Lizenzinformationen
WebDeveloperHelpPartDescriptionService_ViewName=SET-Hilfe für Entwickler
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,9 @@ public class Messages {
* Chromium Lizenzinformationen
*/
public String ChromiumCreditsPartDescriptionService_ViewName;

/**
* Werkzeugkoffer-Hilfe für Entwickler
*/
public String WebDeveloperHelpPartDescriptionService_ViewName;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/**
* Copyright (c) 2022 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
*/

package org.eclipse.set.application.descriptions;

import javax.inject.Inject;

import org.eclipse.e4.core.contexts.ContextInjectionFactory;
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.core.services.nls.Translation;
import org.eclipse.set.application.Messages;
import org.eclipse.set.basis.constants.ToolboxConstants;
import org.eclipse.set.basis.part.PartDescription;
import org.eclipse.set.basis.viewgroups.ToolboxViewGroup;
import org.eclipse.set.core.services.part.PartDescriptionService;
import org.eclipse.set.utils.viewgroups.SetViewGroups;
import org.osgi.service.component.annotations.Component;

/**
* The Developer Help Part Description
*
* @author Truong
*/
@Component(service = PartDescriptionService.class)
public class WebDeveloperHelpPartDescription implements PartDescriptionService {
private static class InjectionHelper {
@Inject
@Translation
Messages messages;

@SuppressWarnings("unused")
public InjectionHelper() {
}
}

@Override
public PartDescription getDescription(final IEclipseContext context) {
final InjectionHelper injectionHelper = ContextInjectionFactory
.make(InjectionHelper.class, context);
return new PartDescription(
// ID
ToolboxConstants.WEB_DEVELOPER_HELP_PART_ID,
// contributionURI
"bundleclass://org.eclipse.set.application/org.eclipse.set.application.nosessionpart.WebDeveloperHelpPart", //$NON-NLS-1$
// toolboxViewName
injectionHelper.messages.WebDeveloperHelpPartDescriptionService_ViewName,
// toolboxViewToolTip
"", //$NON-NLS-1$
// toolboxViewType
getToolboxViewGroup(),
// defaultForNature
null,
// toolboxViewNeedsLoadedModel
false,
// toolboxViewNeedsXsdValidation
false,
// toolboxViewNeedsEmfValidation
false,
// toolboxViewProcessState
false,
// toolboxViewProcessPlanning
false,
// toolboxViewProcessIntegration
false,
// toolboxViewProcessInvalid
true,
// toolboxViewNeedsCleanSession
false,
// toolboxViewExclusiveEditor
false);
}

@Override
public ToolboxViewGroup getToolboxViewGroup() {
return SetViewGroups.getInvisible();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* Copyright (c) 2021 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
*/
package org.eclipse.set.application.handler;

import javax.inject.Inject;

import org.eclipse.e4.core.di.annotations.Evaluate;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.set.basis.constants.ToolboxConstants;
import org.eclipse.set.core.services.part.ToolboxPartService;
import org.eclipse.set.utils.ToolboxConfiguration;

/**
* This handler controls an developer help dialog.
*
* @author Peters
*/
public final class DeveloperHelpHandler {

@Inject
ToolboxPartService partService;

@Execute
private void execute() {
partService.showPart(ToolboxConstants.WEB_DEVELOPER_HELP_PART_ID);
}

/**
* @return whether the developer help should be visible
*/
@Evaluate
public static boolean isDeveloperHelpVisible() {
return ToolboxConfiguration.isDevelopmentMode();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* Copyright (c) 2022 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
*/

package org.eclipse.set.application.nosessionpart;

import java.nio.file.Path;

import org.eclipse.set.utils.PartInitializationException;
import org.eclipse.set.utils.WebNoSessionBasePart;
import org.eclipse.swt.widgets.Composite;

/**
* The Develper Help part
*
* @author Truong
*/
public class WebDeveloperHelpPart extends WebNoSessionBasePart {

private static final String HELP_DIRECTORY = "./web/developerhelp"; //$NON-NLS-1$
private static final String HELP_FILENAME = "index.html"; //$NON-NLS-1$

private void setupRouteHandler() {
try {
browser.serveRootDirectory(Path.of(HELP_DIRECTORY));
} catch (final Exception e) {
throw new PartInitializationException(
"Failed to setup route handler"); //$NON-NLS-1$
}
}

@Override
protected void createView(final Composite parent) {
super.createView(parent);
setupRouteHandler();
browser.setToolboxUrl(HELP_FILENAME);
}
}