comparison org.eclipse.jface.text/src/org/eclipse/jface/text/formatter/IFormattingStrategyExtension.d @ 12:bc29606a740c

Added dwt-addons in original directory structure of eclipse.org
author Frank Benoit <benoit@tionex.de>
date Sat, 14 Mar 2009 18:23:29 +0100
parents
children
comparison
equal deleted inserted replaced
11:43904fec5dca 12:bc29606a740c
1 /*******************************************************************************
2 * Copyright (c) 2000, 2005 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 * Port to the D programming language:
11 * Frank Benoit <benoit@tionex.de>
12 *******************************************************************************/
13
14
15 module org.eclipse.jface.text.formatter.IFormattingStrategyExtension;
16
17 import org.eclipse.jface.text.formatter.MultiPassContentFormatter; // packageimport
18 import org.eclipse.jface.text.formatter.ContextBasedFormattingStrategy; // packageimport
19 import org.eclipse.jface.text.formatter.FormattingContext; // packageimport
20 import org.eclipse.jface.text.formatter.IFormattingStrategy; // packageimport
21 import org.eclipse.jface.text.formatter.IContentFormatterExtension; // packageimport
22 import org.eclipse.jface.text.formatter.IContentFormatter; // packageimport
23 import org.eclipse.jface.text.formatter.FormattingContextProperties; // packageimport
24 import org.eclipse.jface.text.formatter.ContentFormatter; // packageimport
25 import org.eclipse.jface.text.formatter.IFormattingContext; // packageimport
26
27 import java.lang.all;
28
29 /**
30 * Extension interface for <code>IFormattingStrategy</code>.
31 * <p>
32 * Updates formatting strategies to be able to receive a more general <code>IFormattingContext</code>
33 * object from its associated content formatters.
34 * <p>
35 * Each formatting process calls the strategy's methods in the following
36 * sequence:
37 * <ul>
38 * <li><code>formatterStarts</code>
39 * <li><code>format</code>
40 * <li><code>formatterStops</code>
41 * </ul>
42 * <p>
43 * Note that multiple calls to <code>formatterStarts</code> can be issued to
44 * a strategy before launching the formatting process with <code>format</code>.
45 * <p>
46 * This interface must be implemented by clients. Implementers should be
47 * registered with a content formatter in order get involved in the formatting
48 * process.
49 *
50 * @see IFormattingContext
51 * @since 3.0
52 */
53 public interface IFormattingStrategyExtension {
54
55 /**
56 * Formats the region with the properties indicated in the formatting
57 * context previously supplied by <code>formatterStarts(IFormattingContext)</code>.
58 */
59 void format();
60
61 /**
62 * Informs the strategy about the start of a formatting process in which it
63 * will participate.
64 *
65 * @param context
66 * Formatting context used in the corresponding formatting
67 * process.
68 */
69 void formatterStarts(IFormattingContext context);
70
71 /**
72 * Informs the strategy that the formatting process in which it has
73 * participated has been finished.
74 */
75 void formatterStops();
76 }