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