Examples of matches()


Examples of org.eclipse.nebula.widgets.nattable.ui.matcher.CellLabelMouseEventMatcher.matches()

    @Test
    public void shouldMatchCellsWithCustomLabels() throws Exception {
        CellLabelMouseEventMatcher matcher = new CellLabelMouseEventMatcher(
                GridRegion.BODY, MouseEventMatcher.LEFT_BUTTON, TEST_LABEL);

        boolean match = matcher.matches(natTableFixture, new MouseEvent(
                SWTUtils.getLeftClickEvent(100, 100, 0, natTableFixture)),
                new LabelStack(GridRegion.BODY));

        Assert.assertTrue(match);
    }

Examples of org.eclipse.swt.widgets.Text.matches()

          }
       
          private boolean isOk(String text) {
            getLOGGER().debug("verifyListener#isOK; text=" + text + "; regex=" + regex);
            return text.equals("") ||
                 text.matches(regex);
          }
        });
    }
  }
}

Examples of org.eclipse.ui.IEditorMatchingStrategy.matches()

        IEditorMatchingStrategy matchingStrategy = desc
            .getEditorMatchingStrategy();
        if (matchingStrategy != null) {
          i.remove(); // We're handling this one here, so remove it
          // from the list.
          if (matchingStrategy.matches(editor, input)) {
            result.add(editor);
          }
        }
      }
    }

Examples of org.eclipse.ui.dialogs.SearchPattern.matches()

            SearchPattern headPattern = new SearchPattern();
            headPattern.setPattern(head);
            if (moduleParts.size() == 0) {
                return false; //we cannot match it anymore
            }
            if (!headPattern.matches(moduleParts.remove(0))) {
                return false;
            }
        }
        //if it got here, we've matched the module correctly... let's go on and check the name.

Examples of org.elasticsearch.action.index.IndexResponse.matches()

        client.admin().cluster().prepareHealth().setWaitForGreenStatus().setWaitForActiveShards(4).execute().actionGet();

        for (int i = 0; i < 10; i++) {
            IndexResponse index = client.prepareIndex("test", "type1", Integer.toString(i)).setSource("field1", "value1")
                    .setPercolate("*").execute().actionGet();
            assertThat(index.matches().size(), equalTo(1));
            assertThat(index.matches(), hasItem("kuku"));
        }

        for (int i = 0; i < 10; i++) {
            IndexResponse index = client.prepareIndex("test", "type1", Integer.toString(i)).setSource("field1", "value1")

Examples of org.elasticsearch.action.percolate.PercolateResponse.matches()

        System.out.println("Percolating [" + COUNT + "] ...");
        int i = 1;
        for (; i <= COUNT; i++) {
            PercolateResponse percolate = client1.preparePercolate("test", "type1").setSource(source(Integer.toString(i), "value"))
                    .execute().actionGet();
            if (percolate.matches().size() != QUERIES) {
                System.err.println("No matching number of queries");
            }
            if ((i % 10000) == 0) {
                System.out.println("Percolated " + i + " took " + stopWatch.stop().lastTaskTime());
                stopWatch.start();

Examples of org.exolab.castor.xml.XMLFieldDescriptor.matches()

    public XMLFieldDescriptor getFieldDescriptor(final String name, final String namespace,
            final NodeType nodeType) {
        if (nodeType == null || nodeType == NodeType.Element) {
            for (int i = 0; i < _elements.length; i++) {
                XMLFieldDescriptor desc = _elements[i];
                if (desc != null && desc.matches(name, namespace)) {
                    return desc;
                }
            }
        }
        return null;

Examples of org.freeplane.features.filter.Filter.matches()

        final Filter filter = map.getFilter();
        final int nodeTotalFiltered;
        if(filter != null && filter.getCondition() != null){
            final ICondition matchesFilterCondition = new ICondition() {
                public boolean checkNode(NodeModel node) {
                    return filter.matches(node);
                }
            };
            nodeTotalFiltered = getNodeCount(rootNode, matchesFilterCondition);
        }
        else{

Examples of org.fusesource.ide.fabric8.ui.navigator.ContainerNode.matches()

      Iterator iterator = selection.iterator();
      while (iterator.hasNext()) {
        ContainerNode agentNode = ContainerNode
            .toContainerNode(iterator.next());
        if (agentNode != null) {
          if (!agentNode.matches(version)) {
            agentNode.getContainer().setVersion(version);
            changed = true;
          }
        }
      }

Examples of org.fusesource.ide.jmx.fabric8.navigator.ContainerNode.matches()

      Iterator iterator = selection.iterator();
      while (iterator.hasNext()) {
        ContainerNode agentNode = ContainerNode
            .toContainerNode(iterator.next());
        if (agentNode != null) {
          if (!agentNode.matches(version)) {
            agentNode.getContainer().setVersion(version);
            changed = true;
          }
        }
      }
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.