tmf : Add search dialog to timegraph views
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.analysis.xml.ui / src / org / eclipse / tracecompass / tmf / analysis / xml / ui / views / timegraph / XmlEntry.java
index 89af65be3a419cebf7c16b49a0bd0acc1ad6608c..58fe9238b46a58db2f59e003cf34363d69bd10cd 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
+ * Copyright (c) 2014, 2016 École Polytechnique de Montréal and others.
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -16,6 +16,7 @@ package org.eclipse.tracecompass.tmf.analysis.xml.ui.views.timegraph;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import java.util.regex.Pattern;
 
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.tracecompass.internal.tmf.analysis.xml.ui.TmfXmlUiStrings;
@@ -272,4 +273,14 @@ public class XmlEntry extends TimeGraphEntry implements IXmlStateSystemContainer
         return super.getTimeEventsIterator();
     }
 
+    @Override
+    public boolean matches(@NonNull Pattern pattern) {
+        if (pattern.matcher(getName()).find()) {
+            return true;
+        }
+        if (pattern.matcher(fId).find()) {
+            return true;
+        }
+        return pattern.matcher(fParentId).find();
+    }
 }
This page took 0.025042 seconds and 5 git commands to generate.