class StartWithElementLabelSearchProvider extends ElementLabelSearchProvider {

    @Override
    protected boolean match(Element element, String query) {
        return element.getLabel() != null && element.getLabel().toLowerCase().startsWith(query.toLowerCase()) &&
            !super.match(element, query);
    }

    @Override
    protected String toMatchLocation() {
        return NbBundle.getMessage(StartWithElementLabelSearchProvider.class,
            "StartWithElementLabelSearchProvider.match");
    }

    @Override
    protected String toHtmlDisplay(Element element, String query) {<FILL_FUNCTION_BODY>}
}

        String label = element.getLabel();

        String match = label.substring(0, query.length());
        String after = label.substring(query.length());
        return NbBundle.getMessage(StartWithElementLabelSearchProvider.class,
            "StartWithElementLabelSearchProvider.result",
            match, after);
    
<methods>public non-sealed void <init>() ,public void search(org.gephi.desktop.search.api.SearchRequest, SearchResultsBuilder<Element>) <variables>