first working version of help with dummy input

This commit is contained in:
2022-01-08 17:24:26 +01:00
parent 806000c4cc
commit 5f84194145
35 changed files with 830 additions and 11 deletions

View File

@@ -0,0 +1,15 @@
package com.minres.scviewer.e4.application.handlers;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.help.internal.base.BaseHelpSystem;
import org.eclipse.help.internal.server.WebappManager;
public class HelpContentsHandler {
@Execute
public void execute() throws Exception {
BaseHelpSystem.ensureWebappRunning();
String helpURL = "http://" //$NON-NLS-1$
+ WebappManager.getHost() + ":" //$NON-NLS-1$
+ WebappManager.getPort() + "/help/index.jsp"; //$NON-NLS-1$
BaseHelpSystem.getHelpBrowser(false).displayURL(helpURL);
}
}

View File

@@ -18,7 +18,7 @@ import org.eclipse.e4.ui.workbench.modeling.EModelService;
public class HelpHandler {
static final String WINDOW_ID="com.minres.scviewer.e4.application.window.help"; //$NON-NLS-1$
static final String WINDOW_ID="com.minres.scviewer.e4.application.window.web_help"; //$NON-NLS-1$
@CanExecute
public boolean canExecute(MApplication app) {
return !app.getChildren().stream().filter(e -> e.getElementId().equals(WINDOW_ID)).findFirst().isPresent();