Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented filter for empty and inconclusive results. Solves #3074
- Loading branch information
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
plugins/net.bioclipse.ds.ui/src/net/bioclipse/ds/ui/views/HideEmptyFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package net.bioclipse.ds.ui.views; | ||
|
||
import net.bioclipse.ds.model.ITestResult; | ||
import net.bioclipse.ds.model.TestRun; | ||
|
||
import org.eclipse.jface.viewers.Viewer; | ||
import org.eclipse.jface.viewers.ViewerFilter; | ||
|
||
/** | ||
* A filter to hide testresults which has no results | ||
* @author ola | ||
* | ||
*/ | ||
public class HideEmptyFilter extends ViewerFilter { | ||
|
||
@Override | ||
public boolean select( Viewer viewer, Object parentElement, Object element ) { | ||
|
||
if ( element instanceof TestRun ) { | ||
TestRun tr = (TestRun)element; | ||
if (tr.getStatus()==TestRun.FINISHED && tr.getConsensusStatus()==ITestResult.EMPTY) | ||
return false; | ||
if (tr.getStatus()==TestRun.FINISHED && tr.getConsensusStatus()==ITestResult.INCONCLUSIVE) | ||
return false; | ||
} | ||
return true; | ||
} | ||
|
||
} |