Mercurial > projects > dwt-addons
comparison dwtx/jface/text/revisions/IRevisionRulerColumnExtension.d @ 158:25f1f92fa3df
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 26 Aug 2008 02:46:34 +0200 |
parents | 75302ef3f92f |
children | 1a5b8f8129df |
comparison
equal
deleted
inserted
replaced
157:7f75eaa8103a | 158:25f1f92fa3df |
---|---|
24 | 24 |
25 | 25 |
26 import dwtx.core.runtime.Assert; | 26 import dwtx.core.runtime.Assert; |
27 import dwtx.jface.viewers.ISelectionProvider; | 27 import dwtx.jface.viewers.ISelectionProvider; |
28 | 28 |
29 static this(){ | |
30 IRevisionRulerColumnExtension.AUTHOR= new IRevisionRulerColumnExtension.RenderingMode("Author"); //$NON-NLS-1$ | |
31 IRevisionRulerColumnExtension.AGE= new IRevisionRulerColumnExtension.RenderingMode("Age"); //$NON-NLS-1$ | |
32 IRevisionRulerColumnExtension.AUTHOR_SHADED_BY_AGE= new IRevisionRulerColumnExtension.RenderingMode("Both"); //$NON-NLS-1$ | |
33 } | |
29 | 34 |
30 /** | 35 /** |
31 * Extension interface for {@link IRevisionRulerColumn}. | 36 * Extension interface for {@link IRevisionRulerColumn}. |
32 * <p> | 37 * <p> |
33 * Introduces the ability to register a selection listener on revisions and configurable rendering | 38 * Introduces the ability to register a selection listener on revisions and configurable rendering |
34 * modes. | 39 * modes. |
35 * </p> | 40 * </p> |
36 * | 41 * |
37 * @see IRevisionRulerColumn | 42 * @see IRevisionRulerColumn |
38 * @since 3.3 | 43 * @since 3.3 |
39 */ | 44 */ |
40 public interface IRevisionRulerColumnExtension { | 45 public interface IRevisionRulerColumnExtension { |
41 | 46 |
42 /** | 47 /** |
43 * Rendering mode type-safe enum. | 48 * Rendering mode type-safe enum. |
44 */ | 49 */ |
45 final class RenderingMode { | 50 final class RenderingMode { |
46 private const String fName; | 51 private const String fName; |
54 */ | 59 */ |
55 public String name() { | 60 public String name() { |
56 return fName; | 61 return fName; |
57 } | 62 } |
58 } | 63 } |
59 | 64 |
60 /** | 65 /** |
61 * Rendering mode that assigns a unique color to each revision author. | 66 * Rendering mode that assigns a unique color to each revision author. |
62 */ | 67 */ |
63 RenderingMode AUTHOR= new RenderingMode("Author"); //$NON-NLS-1$ | 68 static const RenderingMode AUTHOR; |
64 /** | 69 /** |
65 * Rendering mode that assigns colors to revisions by their age. | 70 * Rendering mode that assigns colors to revisions by their age. |
66 * <p> | 71 * <p> |
67 * Currently the most recent revision is red, the oldest is a faint yellow. | 72 * Currently the most recent revision is red, the oldest is a faint yellow. |
68 * The coloring scheme can change in future releases. | 73 * The coloring scheme can change in future releases. |
69 * </p> | 74 * </p> |
70 */ | 75 */ |
71 RenderingMode AGE= new RenderingMode("Age"); //$NON-NLS-1$ | 76 static const RenderingMode AGE; |
72 /** | 77 /** |
73 * Rendering mode that assigns unique colors per revision author and | 78 * Rendering mode that assigns unique colors per revision author and |
74 * uses different color intensity depending on the age. | 79 * uses different color intensity depending on the age. |
75 * <p> | 80 * <p> |
76 * Currently it selects lighter colors for older revisions and more intense | 81 * Currently it selects lighter colors for older revisions and more intense |
77 * colors for more recent revisions. | 82 * colors for more recent revisions. |
78 * The coloring scheme can change in future releases. | 83 * The coloring scheme can change in future releases. |
79 * </p> | 84 * </p> |
80 */ | 85 */ |
81 RenderingMode AUTHOR_SHADED_BY_AGE= new RenderingMode("Both"); //$NON-NLS-1$ | 86 static const RenderingMode AUTHOR_SHADED_BY_AGE; |
82 | 87 |
83 /** | 88 /** |
84 * Changes the rendering mode and triggers redrawing if needed. | 89 * Changes the rendering mode and triggers redrawing if needed. |
85 * | 90 * |
86 * @param mode the rendering mode | 91 * @param mode the rendering mode |
87 */ | 92 */ |
88 void setRevisionRenderingMode(RenderingMode mode); | 93 void setRevisionRenderingMode(RenderingMode mode); |
89 | 94 |
90 /** | 95 /** |
91 * Enables showing the revision id. | 96 * Enables showing the revision id. |
92 * | 97 * |
93 * @param show <code>true</code> to show the revision, <code>false</code> to hide it | 98 * @param show <code>true</code> to show the revision, <code>false</code> to hide it |
94 */ | 99 */ |
95 void showRevisionId(bool show); | 100 void showRevisionId(bool show); |
96 | 101 |
97 /** | 102 /** |
98 * Enables showing the revision author. | 103 * Enables showing the revision author. |
99 * | 104 * |
100 * @param show <code>true</code> to show the author, <code>false</code> to hide it | 105 * @param show <code>true</code> to show the author, <code>false</code> to hide it |
101 */ | 106 */ |
102 void showRevisionAuthor(bool show); | 107 void showRevisionAuthor(bool show); |
103 | 108 |
104 /** | 109 /** |
105 * Returns the revision selection provider. | 110 * Returns the revision selection provider. |
106 * | 111 * |
107 * @return the revision selection provider | 112 * @return the revision selection provider |
108 */ | 113 */ |
109 ISelectionProvider getRevisionSelectionProvider(); | 114 ISelectionProvider getRevisionSelectionProvider(); |
110 | 115 |
111 /** | 116 /** |
112 * Adds a revision listener that will be notified when the displayed revision information | 117 * Adds a revision listener that will be notified when the displayed revision information |
113 * changes. | 118 * changes. |
114 * | 119 * |
115 * @param listener the listener to add | 120 * @param listener the listener to add |
116 */ | 121 */ |
117 void addRevisionListener(IRevisionListener listener); | 122 void addRevisionListener(IRevisionListener listener); |
118 | 123 |
119 /** | 124 /** |
120 * Removes a previously registered revision listener; nothing happens if <code>listener</code> | 125 * Removes a previously registered revision listener; nothing happens if <code>listener</code> |
121 * was not registered with the receiver. | 126 * was not registered with the receiver. |
122 * | 127 * |
123 * @param listener the listener to remove | 128 * @param listener the listener to remove |
124 */ | 129 */ |
125 void removeRevisionListener(IRevisionListener listener); | 130 void removeRevisionListener(IRevisionListener listener); |
126 } | 131 } |