diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/TrackAreaPainter.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/TrackAreaPainter.java index 595762c5..d229034e 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/TrackAreaPainter.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/TrackAreaPainter.java @@ -47,7 +47,7 @@ public class TrackAreaPainter implements IPainter { Integer lastKey = trackVerticalOffset.floorKey(area.y+area.height); //if(lastKey==null) lastKey= trackVerticalOffset.lastKey(); Rectangle subArea = new Rectangle(area.x, 0, area.width, 0); - if(lastKey.equals(firstKey)){ + if(lastKey != null && lastKey.equals(firstKey)){ subArea.y=firstKey; IWaveformPainter p = trackVerticalOffset.get(firstKey); subArea.height=p.getHeight(); diff --git a/plugins/com.minres.scviewer.e4.application/Application.e4xmi b/plugins/com.minres.scviewer.e4.application/Application.e4xmi index 9f5396c1..30bc096c 100644 --- a/plugins/com.minres.scviewer.e4.application/Application.e4xmi +++ b/plugins/com.minres.scviewer.e4.application/Application.e4xmi @@ -23,6 +23,14 @@ + + + + + + + + @@ -103,8 +111,6 @@ - - @@ -116,12 +122,10 @@ - - @@ -130,8 +134,6 @@ - - type:user @@ -156,6 +158,15 @@ + + type:user + + + type:user + + + type:user + @@ -163,6 +174,8 @@ categoryTag:General + + @@ -171,6 +184,8 @@ + + @@ -209,17 +224,14 @@ - + - + - + - - - diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java index 06cb5f10..07ec87fd 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java @@ -326,8 +326,6 @@ public class WaveformViewer implements IPreferenceChangeListener, DisposeListene case SWT.END: waveformPane.scrollTo(IWaveformView.CURSOR_POS); return; - case SWT.DEL: - waveformPane.deleteSelectedTracks(); default: break; } diff --git a/tests/com.minres.scviewer.e4.application.test/META-INF/MANIFEST.MF b/tests/com.minres.scviewer.e4.application.test/META-INF/MANIFEST.MF index 271723c8..536e04bf 100644 --- a/tests/com.minres.scviewer.e4.application.test/META-INF/MANIFEST.MF +++ b/tests/com.minres.scviewer.e4.application.test/META-INF/MANIFEST.MF @@ -5,5 +5,9 @@ Bundle-SymbolicName: com.minres.scviewer.e4.application.test Bundle-Version: 2.20.0 Fragment-Host: com.minres.scviewer.e4.application Bundle-RequiredExecutionEnvironment: JavaSE-17 -Require-Bundle: org.junit +Require-Bundle: org.eclipse.equinox.http.jetty, + org.eclipse.equinox.http.registry, + org.eclipse.equinox.jsp.jasper.registry, + org.eclipse.jdt.core, + org.junit diff --git a/tests/com.minres.scviewer.e4.application.test/pom.xml b/tests/com.minres.scviewer.e4.application.test/pom.xml index a91d0772..7a77735a 100644 --- a/tests/com.minres.scviewer.e4.application.test/pom.xml +++ b/tests/com.minres.scviewer.e4.application.test/pom.xml @@ -18,6 +18,10 @@ ${tycho-version} false + + org.eclipse.equinox.http.registry4true + org.eclipse.equinox.jsp.jasper.registry4true + false diff --git a/tests/com.minres.scviewer.e4.application.test/src/com/minres/scviewer/e4/application/handlers/HelpServerTest.java b/tests/com.minres.scviewer.e4.application.test/src/com/minres/scviewer/e4/application/handlers/HelpServerTest.java new file mode 100644 index 00000000..c019198d --- /dev/null +++ b/tests/com.minres.scviewer.e4.application.test/src/com/minres/scviewer/e4/application/handlers/HelpServerTest.java @@ -0,0 +1,24 @@ +package com.minres.scviewer.e4.application.handlers; + +import org.junit.Test; +import static org.junit.Assert.*; + +@SuppressWarnings("restriction") +public class HelpServerTest { + @Test + public void helpIndexCompilesAndLoads() throws Exception { + org.eclipse.help.internal.base.BaseHelpSystem.ensureWebappRunning(); + String url = "http://" + org.eclipse.help.internal.server.WebappManager.getHost() + + ":" + org.eclipse.help.internal.server.WebappManager.getPort() + "/help/index.jsp"; + java.net.HttpURLConnection connection = (java.net.HttpURLConnection) new java.net.URL(url).openConnection(); + connection.setConnectTimeout(10000); connection.setReadTimeout(10000); + int status = connection.getResponseCode(); + var input = status >= 400 ? connection.getErrorStream() : connection.getInputStream(); + String body; + try (input) { body = new String(input.readAllBytes(), java.nio.charset.StandardCharsets.UTF_8); } + finally { connection.disconnect(); } + + assertEquals(body, 200, status); + assertTrue(body.contains("