All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.jface.text.formatter.IFormattingStrategyExtension Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 * Copyright (c) 2000, 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.jface.text.formatter;

/**
 * Extension interface for IFormattingStrategy.
 * 

* Updates formatting strategies to be able to receive a more general IFormattingContext * object from its associated content formatters. *

* Each formatting process calls the strategy's methods in the following * sequence: *

    *
  • formatterStarts *
  • format *
  • formatterStops *
*

* Note that multiple calls to formatterStarts can be issued to * a strategy before launching the formatting process with format. *

* This interface must be implemented by clients. Implementers should be * registered with a content formatter in order get involved in the formatting * process. * * @see IFormattingContext * @since 3.0 */ public interface IFormattingStrategyExtension { /** * Formats the region with the properties indicated in the formatting * context previously supplied by formatterStarts(IFormattingContext). */ void format(); /** * Informs the strategy about the start of a formatting process in which it will participate. * * @param context the formatting context used in the corresponding formatting process. */ void formatterStarts(IFormattingContext context); /** * Informs the strategy that the formatting process in which it has * participated has been finished. */ void formatterStops(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy