diff --git a/build.sh b/build.sh index 54ace5567..98075c39c 100755 --- a/build.sh +++ b/build.sh @@ -332,7 +332,7 @@ if [[ "$VERBOSE" == "1" ]]; then fi ./build.sh ${OPTION} -if [ -f hpcdata*.tgz ]; then +if [ -f hpcdata-${RELEASE}.tgz ]; then cp hpcdata*.tgz ../.. else echo "Fail to build hpcdata" @@ -349,6 +349,6 @@ echo " Done" echo "==================================" ls -l hpcviewer-${RELEASE}-* -if [ -f hpcdata*.tgz ]; then +if [ -f hpcdata-${RELEASE}.tgz ]; then ls -l hpcdata* fi diff --git a/edu.rice.cs.hpcmetric/src/edu/rice/cs/hpcmetric/dialog/ExtDerivedMetricDlg.java b/edu.rice.cs.hpcmetric/src/edu/rice/cs/hpcmetric/dialog/ExtDerivedMetricDlg.java index 840f4feb7..d6c55f3cc 100644 --- a/edu.rice.cs.hpcmetric/src/edu/rice/cs/hpcmetric/dialog/ExtDerivedMetricDlg.java +++ b/edu.rice.cs.hpcmetric/src/edu/rice/cs/hpcmetric/dialog/ExtDerivedMetricDlg.java @@ -197,8 +197,8 @@ protected Control createDialogArea(Composite parent) { final Label lblName = new Label(nameArea, SWT.LEFT); lblName.setText("Name:"); // $NON-SLS - this.cbMetricName = new Combo(nameArea, SWT.NONE); - this.cbMetricName.setToolTipText("Name of the derived metric"); // $NON-SLS + cbMetricName = new Combo(nameArea, SWT.NONE); + cbMetricName.setToolTipText("Type the displayed name of the derived metric"); // $NON-SLS objHistoryName = new UserInputHistory( ExtDerivedMetricDlg.HISTORY_METRIC_NAME ); final List nameHistory = objHistoryName.getHistory(); diff --git a/edu.rice.cs.hpcsetting/src/edu/rice/cs/hpcsetting/preferences/AppearencePage.java b/edu.rice.cs.hpcsetting/src/edu/rice/cs/hpcsetting/preferences/AppearencePage.java index f7aae5969..a5c6777aa 100644 --- a/edu.rice.cs.hpcsetting/src/edu/rice/cs/hpcsetting/preferences/AppearencePage.java +++ b/edu.rice.cs.hpcsetting/src/edu/rice/cs/hpcsetting/preferences/AppearencePage.java @@ -77,7 +77,7 @@ protected Control createContents(Composite parent) { // call-site area // Group groupCallsite = createGroupControl(parent, "Call-site glyph settings ", false); - fontCallsiteEditor = createFontEditor(groupCallsite, PreferenceConstants.ID_FONT_CALLSITE, "Glyph font:", FontManager.getCallsiteGlyphFont()); + fontCallsiteEditor = createFontEditor(groupCallsite, PreferenceConstants.ID_FONT_CALLSITE, "Glyph font:", FontManager.getCallsiteGlyphFont()); Composite glyphArea = new Composite(groupCallsite, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).span(3, 1).applyTo(glyphArea); @@ -94,7 +94,7 @@ protected Control createContents(Composite parent) { glyphComboEditor.setFont(font); }); - return parent; + return parent; } diff --git a/edu.rice.cs.hpcsetting/src/edu/rice/cs/hpcsetting/preferences/ViewerPreferenceManager.java b/edu.rice.cs.hpcsetting/src/edu/rice/cs/hpcsetting/preferences/ViewerPreferenceManager.java index d70caa053..a0031c321 100644 --- a/edu.rice.cs.hpcsetting/src/edu/rice/cs/hpcsetting/preferences/ViewerPreferenceManager.java +++ b/edu.rice.cs.hpcsetting/src/edu/rice/cs/hpcsetting/preferences/ViewerPreferenceManager.java @@ -64,8 +64,17 @@ public void setDefaults() { PreferenceConstants.ID_FONT_CALLSITE, FontManager.getCallsiteGlyphDefaultFont().getFontData()); - store.setDefault(PreferenceConstants.ID_CHAR_CALLTO, DEFAULT_CALLTO[DEFAULT_CALLSITE_INDEX]); - store.setDefault(PreferenceConstants.ID_CHAR_CALLFROM, DEFAULT_CALLFROM[DEFAULT_CALLSITE_INDEX]); + // fix issue #207 (some platforms don't support unicode) + // check if the encoding supports UTF or not. + // Most systems that have ANSI platform has no UTF support + // Example: ANSI_X3.4-1968 is basically an ASCII set + int indexDefault = DEFAULT_CALLSITE_INDEX; + var encoding = System.getProperty("file.encoding"); + if (encoding.startsWith("ANSI")) + indexDefault = 0; + + store.setDefault(PreferenceConstants.ID_CHAR_CALLTO, DEFAULT_CALLTO[indexDefault]); + store.setDefault(PreferenceConstants.ID_CHAR_CALLFROM, DEFAULT_CALLFROM[indexDefault]); } @@ -138,4 +147,4 @@ public String getCallFromGlyph() { return EMPTY; return store.getString(PreferenceConstants.ID_CHAR_CALLFROM); } -} \ No newline at end of file +} diff --git a/edu.rice.cs.hpctraceviewer.ui/src/edu/rice/cs/hpctraceviewer/ui/main/SpaceTimeDetailCanvas.java b/edu.rice.cs.hpctraceviewer.ui/src/edu/rice/cs/hpctraceviewer/ui/main/SpaceTimeDetailCanvas.java index 14b87f1c3..0454d8f79 100644 --- a/edu.rice.cs.hpctraceviewer.ui/src/edu/rice/cs/hpctraceviewer/ui/main/SpaceTimeDetailCanvas.java +++ b/edu.rice.cs.hpctraceviewer.ui/src/edu/rice/cs/hpctraceviewer/ui/main/SpaceTimeDetailCanvas.java @@ -602,7 +602,8 @@ private void adjustLabels() final TraceDisplayAttribute attributes = stData.getTraceDisplayAttribute(); showTimeRange(attributes); - showProcessRange(attributes); + if (stData.getExperiment().getMajorVersion() == edu.rice.cs.hpcdata.util.Constants.EXPERIMENT_DENSED_VERSION) + showProcessRange(attributes); showCrossHair(attributes); // resize the composite to make sure all texts are visible diff --git a/edu.rice.cs.hpctree/src/edu/rice/cs/hpctree/ScopeTreeTable.java b/edu.rice.cs.hpctree/src/edu/rice/cs/hpctree/ScopeTreeTable.java index 53abfe172..a0cd67ffe 100644 --- a/edu.rice.cs.hpctree/src/edu/rice/cs/hpctree/ScopeTreeTable.java +++ b/edu.rice.cs.hpctree/src/edu/rice/cs/hpctree/ScopeTreeTable.java @@ -140,7 +140,7 @@ public ScopeTreeTable(Composite parent, int style, IScopeTreeData treeData) { // turn the auto configuration off as we want to add our header menu // configuration - natTable = new NatTable(parent, NatTable.DEFAULT_STYLE_OPTIONS , compositeLayer, false); + natTable = new NatTable(parent, NatTable.DEFAULT_STYLE_OPTIONS, compositeLayer, false); // as the autoconfiguration of the NatTable is turned off, we have to // add the DefaultNatTableStyleConfiguration and the ConfigRegistry @@ -170,7 +170,7 @@ public ScopeTreeTable(Composite parent, int style, IScopeTreeData treeData) { // I don't know why we have to refresh the table here // However, without refreshing, the content will be weird - visualRefresh(); + // visualRefresh(); natTable.configure(); // -------------------------------- @@ -218,9 +218,9 @@ public ScopeTreeTable(Composite parent, int style, IScopeTreeData treeData) { natTable.getDisplay().addFilter(SWT.MouseDown, resizeListener); natTable.getDisplay().addFilter(SWT.MouseUp, resizeListener); + // Fix issue #204: has to call header font configuration manually fontConfig.configureHeaderFont(natTable.getConfigRegistry()); visualRefresh(); - } diff --git a/edu.rice.cs.hpctree/src/edu/rice/cs/hpctree/TableFitting.java b/edu.rice.cs.hpctree/src/edu/rice/cs/hpctree/TableFitting.java index c6dc59b72..3d7065ce9 100644 --- a/edu.rice.cs.hpctree/src/edu/rice/cs/hpctree/TableFitting.java +++ b/edu.rice.cs.hpctree/src/edu/rice/cs/hpctree/TableFitting.java @@ -14,7 +14,7 @@ *****************************/ public class TableFitting { - private static final String PREF_FIT_MODE = "viewer.fit.mode"; + private static final String PREF_FIT_MODE = "hpcviewer.fit.mode"; /*** * * Mode of table column fitting: @@ -45,8 +45,8 @@ private TableFitting() { */ public static String toString(ColumnFittingMode mode) { if (mode == ColumnFittingMode.FIT_DATA) - return "Autofit is based on the data"; - return "Autofit is based on both the header and the data"; + return "Resize mode is based on the data"; + return "Resize mode is based on both the header label and the data"; } diff --git a/edu.rice.cs.hpcviewer.ui/release.txt b/edu.rice.cs.hpcviewer.ui/release.txt index a8a368a6a..2d4078f11 100644 --- a/edu.rice.cs.hpcviewer.ui/release.txt +++ b/edu.rice.cs.hpcviewer.ui/release.txt @@ -1 +1 @@ -Release 2022.06. Commit fa410307 +Release 2022.06. Commit 00ec7977 diff --git a/tests/edu.rice.cs.hpctest.data/src/edu/rice/cs/hpctest/data/util/DataFactory.java b/tests/edu.rice.cs.hpctest.data/src/edu/rice/cs/hpctest/data/util/DataFactory.java index 92f8cd112..381f362a2 100644 --- a/tests/edu.rice.cs.hpctest.data/src/edu/rice/cs/hpctest/data/util/DataFactory.java +++ b/tests/edu.rice.cs.hpctest.data/src/edu/rice/cs/hpctest/data/util/DataFactory.java @@ -2,7 +2,6 @@ import java.io.File; import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; import java.util.ArrayList; import java.util.List; import java.util.Random; @@ -26,7 +25,7 @@ public class DataFactory { private static final int DEFAULT_DB = 10; - private static Random rand; + private static final Random rand = new Random(); public static List createExperiments() throws NoSuchAlgorithmException { return createExperiments(DEFAULT_DB); @@ -93,9 +92,6 @@ private static void createTreeNode(RootScope root, Scope parent, int children, i } private static void createMetric(Scope scope, Experiment exp) throws NoSuchAlgorithmException { - if (rand == null) - rand = SecureRandom.getInstanceStrong(); - for(int i=0; i