blob: b7727279ff92670af7bac16db01522ada0a1c831 [file] [log] [blame]
/*=============================================================================#
# Copyright (c) 2015, 2021 Stephan Wahlbrink and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation
#=============================================================================*/
package org.eclipse.statet.ecommons.text.core.sections;
import org.eclipse.jface.text.IDocument;
import org.eclipse.statet.jcommons.collections.ImList;
import org.eclipse.statet.jcommons.lang.NonNullByDefault;
/**
* @since de.walware.ecommons.text 1.1
*/
@NonNullByDefault
public interface DocContentSections {
String ERROR= ""; //$NON-NLS-1$
/**
* Returns the document partitioning associated to this description.
*
* @return the id of the paritioning
*/
String getPartitioning();
/**
* Returns all supported content types.
*
* @return list of ids of the content types
*/
ImList<String> getAllTypes();
/**
* Returns the primary content type.
*
* @return id of the primary content type
*/
String getPrimaryType();
String getType(final IDocument document, int offset);
String getTypeByPartition(final String contentType);
}