release/2.1.2 #24

Manually merged
eyck merged 11 commits from release/2.1.2 into master 2020-02-10 06:50:59 +01:00
3 changed files with 16 additions and 2 deletions
Showing only changes of commit 7b2db09585 - Show all commits

View File

@ -80,6 +80,7 @@ public class TextDbLoader implements IWaveformDbLoader{
.allocateStartSize(64*1024*1024) .allocateStartSize(64*1024*1024)
.allocateIncrement(64*1024*1024) .allocateIncrement(64*1024*1024)
.make() .make()
// NPE here --->
parseInput(gzipped?new GZIPInputStream(new FileInputStream(file)):new FileInputStream(file)) parseInput(gzipped?new GZIPInputStream(new FileInputStream(file)):new FileInputStream(file))
calculateConcurrencyIndicees() calculateConcurrencyIndicees()
return true return true
@ -87,6 +88,7 @@ public class TextDbLoader implements IWaveformDbLoader{
} catch(EOFException e) { } catch(EOFException e) {
return true; return true;
} catch(Exception e) { } catch(Exception e) {
System.out.println("---->>> Exception caught while loading database. StackTrace following... ");
e.printStackTrace() e.printStackTrace()
} }
return false; return false;

View File

@ -158,6 +158,7 @@ public class WaveformViewer implements IWaveformViewer {
@Override @Override
public void mouseUp(MouseEvent e) { public void mouseUp(MouseEvent e) {
if(start==null) return;
if((e.stateMask&SWT.MODIFIER_MASK&~SWT.SHIFT)!=0) return; //don't react on modifier if((e.stateMask&SWT.MODIFIER_MASK&~SWT.SHIFT)!=0) return; //don't react on modifier
if (e.button == 1 && ((e.stateMask&SWT.SHIFT)==0)) { if (e.button == 1 && ((e.stateMask&SWT.SHIFT)==0)) {
if(Math.abs(e.x-start.x)<3 && Math.abs(e.y-start.y)<3){ if(Math.abs(e.x-start.x)<3 && Math.abs(e.y-start.y)<3){

View File

@ -74,7 +74,8 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.TypedListener; import org.eclipse.swt.widgets.MessageBox;
import com.minres.scviewer.database.ITx; import com.minres.scviewer.database.ITx;
import com.minres.scviewer.database.ITxEvent; import com.minres.scviewer.database.ITxEvent;
import com.minres.scviewer.database.ITxRelation; import com.minres.scviewer.database.ITxRelation;
@ -489,7 +490,17 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
job.addJobChangeListener(new JobChangeAdapter() { job.addJobChangeListener(new JobChangeAdapter() {
@Override @Override
public void done(IJobChangeEvent event) { public void done(IJobChangeEvent event) {
if (event.getResult().getCode() != Status.OK_STATUS.getCode()) return; IStatus result = event.getResult();
if( (!result.isMultiStatus() && result.getCode() != Status.OK_STATUS.getCode() ) ||
(result.isMultiStatus() && result.getChildren().length > 0 && result.getChildren()[0].getCode() != Status.OK_STATUS.getCode() ) ){
// kill editor and pop up warning for user
sync.asyncExec(() -> {
final Display display = myParent.getDisplay();
MessageDialog.openWarning(display.getActiveShell(), "Error loading database", "Database cannot be loaded. Aborting...");
ePartService.hidePart(myPart, true);
});
return;
}
sync.asyncExec(()->{ sync.asyncExec(()->{
waveformPane.setMaxTime(database.getMaxTime()); waveformPane.setMaxTime(database.getMaxTime());
if (state != null) if (state != null)