@eclipse-glsp/client
Version:
A sprotty-based client for GLSP
51 lines • 3.43 kB
TypeScript
/********************************************************************************
* Copyright (c) 2023-2025 Business Informatics Group (TU Wien) and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { GModelElement, GModelRoot, LabeledAction } from '@eclipse-glsp/sprotty';
import { type AutocompleteSuggestion, type AutocompleteSuggestionRegistry } from '../../base/auto-complete/autocomplete-suggestion-provider';
import { BaseAutocompletePalette } from '../../base/auto-complete/base-autocomplete-palette';
export interface SearchAutocompleteSuggestion extends Required<AutocompleteSuggestion> {
}
export declare namespace SearchAutocompleteSuggestion {
function is(suggestion: AutocompleteSuggestion): suggestion is SearchAutocompleteSuggestion;
}
export declare class SearchAutocompletePalette extends BaseAutocompletePalette {
static readonly ID: string;
protected readonly suggestionRegistry: AutocompleteSuggestionRegistry;
/**
* Cache the suggestions so that we don't have to retrieve them again for CSS manipulation.
*/
protected cachedSuggestions: SearchAutocompleteSuggestion[];
id(): string;
/**
* The search context for the search palette. This is used to filter the suggestions
*/
get searchContext(): string[];
protected initializeContents(containerElement: HTMLElement): void;
protected retrieveSuggestions(root: Readonly<GModelRoot>, input: string): Promise<LabeledAction[]>;
protected provideSearchSuggestions(root: Readonly<GModelRoot>, input: string): Promise<SearchAutocompleteSuggestion[]>;
protected visibleSuggestionsChanged(root: Readonly<GModelRoot>, labeledActions: LabeledAction[]): Promise<void>;
protected selectedSuggestionChanged(root: Readonly<GModelRoot>, labeledAction?: LabeledAction | undefined): Promise<void>;
protected readonly handleSuggestionChanged: import("lodash").DebouncedFunc<(root: Readonly<GModelRoot>, labeledAction?: LabeledAction | undefined) => Promise<void>>;
protected doHandleSuggestionChanged(root: Readonly<GModelRoot>, labeledAction?: LabeledAction | undefined): Promise<void>;
show(root: Readonly<GModelRoot>, ...contextElementIds: string[]): void;
hide(): void;
protected applyCSS(elements: GModelElement[], ...add: string[]): Promise<void>;
protected deleteCSS(elements: GModelElement[], ...remove: string[]): Promise<void>;
protected deleteAllCSS(root: Readonly<GModelRoot>, ...remove: string[]): Promise<void>;
protected getSuggestionsFromLabeledActions(labeledActions: LabeledAction[]): SearchAutocompleteSuggestion[];
protected getHiddenElements(root: Readonly<GModelRoot>, suggestions: SearchAutocompleteSuggestion[]): GModelElement[];
}
//# sourceMappingURL=search-palette.d.ts.map