Commit ccf57546 authored by Sabine Teufl's avatar Sabine Teufl
Browse files

set to yellow after code review

parent 63f1e6f4
......@@ -18,6 +18,7 @@ $Id$
package org.fortiss.af3.mira.ui.editor;
import static org.conqat.ide.commons.ui.selection.SelectionUtils.checkAndPickFirst;
import static org.conqat.lib.commons.string.StringUtils.isEmpty;
import static org.fortiss.tooling.kernel.ui.util.DataBindingUtils.DECORATION_KEY;
import org.eclipse.emf.common.notify.Notification;
......@@ -51,7 +52,7 @@ import org.fortiss.tooling.kernel.ui.service.IModelEditorBindingService;
* @author teufl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 15413B2E98DC008648D7E6EC6967EE2F
* @ConQAT.Rating YELLOW Hash: 40F5175707862901523B45ED12206F02
*/
public class AnalysisEditor<T extends Analysis> extends FormsEditorBase<T> {
......@@ -62,17 +63,16 @@ public class AnalysisEditor<T extends Analysis> extends FormsEditorBase<T> {
public boolean select(Viewer viewer, Object parentElement, Object element) {
if(element instanceof Requirement) {
Requirement req = (Requirement)element;
// TODO (Moudy) use StringUtils.isEmpty(text) for clean conditions
if(filterText.getText() != null && filterText.getText().length() > 0) {
if(!isEmpty(filterText.getText())) {
String filterString = filterText.getText().toLowerCase().trim();
if(("" + req.getReqId()).toLowerCase().contains(filterString)) {
return true;
} else if(MiraUtils.getDisplayNameFor(req).toLowerCase().contains(filterString)) {
return true;
} else if(req.getName() != null &&
} else if(!isEmpty(req.getName()) &&
req.getName().toLowerCase().contains(filterString)) {
return true;
} else if(req.getDescription() != null &&
} else if(!isEmpty(req.getDescription()) &&
req.getDescription().toLowerCase().contains(filterString)) {
return true;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment