blob: fb9118615b6e6e2f9e5def7a3486061cdf45478d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
/*****************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************************************************/
package org.eclipse.jface.text.formatter;
/**
* Keys used by <code>IFormattingContext</code> objects to register specific
* properties needed during the formatting process of a content formatter
* implementing <code>IContentFormatterExtension2</code>.
*
* @see IFormattingContext
* @see IFormattingStrategyExtension
* @see IContentFormatterExtension2
* @since 3.0
*/
public class FormattingContextProperties {
/**
* Property key of the document property. The property must implement
* <code>java.lang#Boolean</code>.
* <p>
* Value: <code>"formatting.context.document"</code>
*/
public static final String CONTEXT_DOCUMENT= "formatting.context.document"; //$NON-NLS-1$
/**
* Property key of the indentation property. The property must implement
* <code>java.lang#String</code>.
* <p>
* Value: <code>"formatting.context.indentation"</code>
*
* TODO: remove
*
* @deprecated Use the document (set and use property value of
* {@link FormattingContextProperties#CONTEXT_MEDIUM}) to compute
* the indentation in the formatting strategy. Consider migration to
* {@link MultiPassContentFormatter}. To be removed.
*/
public static final String CONTEXT_INDENTATION= "formatting.context.indentation"; //$NON-NLS-1$
/**
* Property key of the partition property. The property must implement
* <code>org.eclipse.jface.text#TypedPosition</code>.
* <p>
* Value: <code>"formatting.context.partition"</code>
*/
public static final String CONTEXT_PARTITION= "formatting.context.partition"; //$NON-NLS-1$
/**
* Property key of the positions property. The property must implement
* <code>int[]</code>.
* <p>
* Value: <code>"formatting.context.positions"</code>
*
* TODO: remove
*
* @deprecated Apply changes directly on the document (set and use
* the property value of {@link FormattingContextProperties#CONTEXT_MEDIUM}).
* Consider migration to {@link MultiPassContentFormatter}.
*/
public static final String CONTEXT_POSITIONS= "formatting.context.positions"; //$NON-NLS-1$
/**
* Property key of the preferences property. The property must implement
* <code>java.util#Map</code>.
* <p>
* Value: <code>"formatting.context.preferences"</code>
*/
public static final String CONTEXT_PREFERENCES= "formatting.context.preferences"; //$NON-NLS-1$
/**
* Property key of the region property. The property must implement <code>org.eclipse.jface.text#IRegion</code>.
* <p>
* Value: <code>"formatting.context.region"</code>
*/
public static final String CONTEXT_REGION= "formatting.context.region"; //$NON-NLS-1$
/**
* Property key of the medium property. The property must implement <code>org.eclipse.jface.text#IDocument</code>.
* <p>
* Value: <code>"formatting.context.medium"</code>
*/
public static final String CONTEXT_MEDIUM= "formatting.context.medium"; //$NON-NLS-1$
/**
* Ensure that this class cannot be instantiated.
*/
private FormattingContextProperties() {
}
}
|