From c9a94334c4c1b4d845cb18ea81825690cce1575e Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Tue, 27 Jun 2023 18:49:45 +0200 Subject: [PATCH 1/2] fixes packaging to work without JS --- .launch/Build and deploy SCViewer.launch | 4 ++- .../packaging-p2-composite.ant | 27 +++---------------- releng/com.minres.scviewer.updateSite/pom.xml | 2 +- 3 files changed, 7 insertions(+), 26 deletions(-) diff --git a/.launch/Build and deploy SCViewer.launch b/.launch/Build and deploy SCViewer.launch index 7bc07d3..9603745 100644 --- a/.launch/Build and deploy SCViewer.launch +++ b/.launch/Build and deploy SCViewer.launch @@ -1,5 +1,6 @@ + @@ -12,10 +13,11 @@ + - + diff --git a/releng/com.minres.scviewer.updateSite/packaging-p2-composite.ant b/releng/com.minres.scviewer.updateSite/packaging-p2-composite.ant index cbfff8a..26ea363 100644 --- a/releng/com.minres.scviewer.updateSite/packaging-p2-composite.ant +++ b/releng/com.minres.scviewer.updateSite/packaging-p2-composite.ant @@ -1,30 +1,9 @@ - - - - - - - - - - + + diff --git a/releng/com.minres.scviewer.updateSite/pom.xml b/releng/com.minres.scviewer.updateSite/pom.xml index 446a3a3..2b757f5 100644 --- a/releng/com.minres.scviewer.updateSite/pom.xml +++ b/releng/com.minres.scviewer.updateSite/pom.xml @@ -64,7 +64,7 @@ ${tycho-version} - -application org.eclipse.ant.core.antRunner -buildfile packaging-p2-composite.ant p2.composite.add -Dsite.label="SCViewer Software Repository" -Dproject.build.directory=${project.build.directory} -DunqualifiedVersion=${unqualifiedVersion} -Dsoftware.download.area="${software.download.area}/SCViewer-GHP/repository" + -application org.eclipse.ant.core.antRunner -buildfile packaging-p2-composite.ant p2.composite.add -Dsite.label="SCViewer Software Repository" -Dproject.build.directory=${project.build.directory} -DmajorMinorVersion=${parsedVersion.majorVersion}.${parsedVersion.minorVersion} -DunqualifiedVersion=${unqualifiedVersion} -Dsoftware.download.area="${software.download.area}/SCViewer-GHP/repository" 2021-12 From aaf8a9e5d00cf3c972b529dd931507a7a47191c6 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Tue, 27 Jun 2023 19:42:06 +0200 Subject: [PATCH 2/2] fixes bitvector conversion to hex number --- .../src/com/minres/scviewer/database/BitVector.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java index f34ca0a..8ce6da3 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java @@ -149,25 +149,28 @@ public class BitVector implements IEvent { int resWidth = (width - 1) / 4 + 1; char[] value = getValue(); char[] res = new char[resWidth]; + int start_idx = (value.length-1)%4; for (int i = resWidth - 1; i >= 0; i--) { int digit = 0; - for (int j = 3; j >= 0; j--) { + for (int j = start_idx, jj=0; j >= 0; j--, jj++) { if ((4 * i + j) < value.length) { - BitValue val = BitValue.fromChar(value[4 * i + j]); + BitValue val = BitValue.fromChar(value[4 * i + jj]); switch (val) { case X: case Z: res[i] = val.toChar(); continue; case ONE: - digit += 1 << (3 - j); + digit += 1 << j; break; default: break; } } } - res[i] = Character.forDigit(digit, 16); // ((digit < 10) ? '0' + digit : 'a' + digit -10) + if(res[i]==0) + res[i] = Character.forDigit(digit, 16); // ((digit < 10) ? '0' + digit : 'a' + digit -10) + start_idx=3; } int idx=0; while(res[idx]=='0' && idx<(res.length-1)) idx++;