129
|
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
|
131
|
14
|
|
15 import dwtx.jface.text.formatter.MultiPassContentFormatter; // packageimport
|
|
16 import dwtx.jface.text.formatter.ContextBasedFormattingStrategy; // packageimport
|
|
17 import dwtx.jface.text.formatter.FormattingContext; // packageimport
|
|
18 import dwtx.jface.text.formatter.IFormattingStrategy; // packageimport
|
|
19 import dwtx.jface.text.formatter.IContentFormatterExtension; // packageimport
|
|
20 import dwtx.jface.text.formatter.IFormattingStrategyExtension; // packageimport
|
|
21 import dwtx.jface.text.formatter.IContentFormatter; // packageimport
|
|
22 import dwtx.jface.text.formatter.ContentFormatter; // packageimport
|
|
23 import dwtx.jface.text.formatter.IFormattingContext; // packageimport
|
|
24
|
129
|
25 module dwtx.jface.text.formatter.FormattingContextProperties;
|
|
26
|
|
27 import dwt.dwthelper.utils;
|
|
28
|
|
29 /**
|
|
30 * Keys used by <code>IFormattingContext</code> objects to register specific
|
|
31 * properties needed during the formatting process of a content formatter
|
|
32 * implementing <code>IContentFormatterExtension</code>.
|
|
33 *
|
|
34 * @see IFormattingContext
|
|
35 * @see IFormattingStrategyExtension
|
|
36 * @see IContentFormatterExtension
|
|
37 * @since 3.0
|
|
38 */
|
|
39 public class FormattingContextProperties {
|
|
40
|
|
41 /**
|
|
42 * Property key of the document property. The property must implement
|
|
43 * <code>java.lang#Boolean</code>. If set to <code>true</code> the whole
|
|
44 * document is formatted.
|
|
45 * <p>
|
|
46 * Value: <code>"formatting.context.document"</code>
|
|
47 */
|
|
48 public static final String CONTEXT_DOCUMENT= "formatting.context.document"; //$NON-NLS-1$
|
|
49
|
|
50 /**
|
|
51 * Property key of the partition property. The property must implement
|
|
52 * <code>dwtx.jface.text#TypedPosition</code>. The partition
|
|
53 * a context based formatting strategy should format.
|
|
54 * <p>
|
|
55 * Value: <code>"formatting.context.partition"</code>
|
|
56 */
|
|
57 public static final String CONTEXT_PARTITION= "formatting.context.partition"; //$NON-NLS-1$
|
|
58
|
|
59 /**
|
|
60 * Property key of the preferences property. The property must implement
|
|
61 * <code>java.util#Map</code>. The formatting preferences mapping preference
|
|
62 * keys to values.
|
|
63 * <p>
|
|
64 * Value: <code>"formatting.context.preferences"</code>
|
|
65 */
|
|
66 public static final String CONTEXT_PREFERENCES= "formatting.context.preferences"; //$NON-NLS-1$
|
|
67
|
|
68 /**
|
|
69 * Property key of the region property. The property must implement <code>dwtx.jface.text#IRegion</code>.
|
|
70 * The region to format. If set, {@link FormattingContextProperties#CONTEXT_DOCUMENT} should be <code>false</code>
|
|
71 * for this to take effect.
|
|
72 * <p>
|
|
73 * Value: <code>"formatting.context.region"</code>
|
|
74 */
|
|
75 public static final String CONTEXT_REGION= "formatting.context.region"; //$NON-NLS-1$
|
|
76
|
|
77 /**
|
|
78 * Property key of the medium property. The property must implement <code>dwtx.jface.text#IDocument</code>.
|
|
79 * The document to format.
|
|
80 * <p>
|
|
81 * Value: <code>"formatting.context.medium"</code>
|
|
82 */
|
|
83 public static final String CONTEXT_MEDIUM= "formatting.context.medium"; //$NON-NLS-1$
|
|
84
|
|
85 /**
|
|
86 * Ensure that this class cannot be instantiated.
|
|
87 */
|
|
88 private FormattingContextProperties() {
|
|
89 }
|
|
90 }
|