Skip to content

Package: ECPFilterableCell

ECPFilterableCell

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2019 Christian W. Damus and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Christian W. Damus - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.edit.spi.swt.table;
15:
16: import org.eclipse.core.runtime.IAdaptable;
17: import org.eclipse.jface.viewers.CellLabelProvider;
18:
19: /**
20: * Optional interface (either implemented or provided as an {@linkplain IAdaptable adapter})
21: * for a cell that supports filtering by its text content. This allows for complex cell
22: * renderers, for example, to avoid costly updates via the
23: * {@link CellLabelProvider#update(org.eclipse.jface.viewers.ViewerCell)} API that do more
24: * than just render text.
25: *
26: * @since 1.21
27: */
28: public interface ECPFilterableCell {
29:
30:         /**
31:          * Query the text to filter on.
32:          *
33:          * @param object the object to be filtered
34:          * @return the text to filter on, or an empty string if none
35:          */
36:         String getFilterableText(Object object);
37:
38: }