Mercurial > projects > dwt-addons
comparison dwtx/jface/text/DocumentRewriteSessionEvent.d @ 162:1a5b8f8129df
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 08 Sep 2008 00:51:37 +0200 |
parents | 75302ef3f92f |
children |
comparison
equal
deleted
inserted
replaced
161:f8d52b926852 | 162:1a5b8f8129df |
---|---|
59 import dwtx.jface.text.IRegion; // packageimport | 59 import dwtx.jface.text.IRegion; // packageimport |
60 import dwtx.jface.text.IInformationControlExtension2; // packageimport | 60 import dwtx.jface.text.IInformationControlExtension2; // packageimport |
61 import dwtx.jface.text.IDocumentExtension4; // packageimport | 61 import dwtx.jface.text.IDocumentExtension4; // packageimport |
62 import dwtx.jface.text.IDocumentExtension2; // packageimport | 62 import dwtx.jface.text.IDocumentExtension2; // packageimport |
63 import dwtx.jface.text.IDocumentPartitionerExtension2; // packageimport | 63 import dwtx.jface.text.IDocumentPartitionerExtension2; // packageimport |
64 import dwtx.jface.text.Assert; // packageimport | |
65 import dwtx.jface.text.DefaultInformationControl; // packageimport | 64 import dwtx.jface.text.DefaultInformationControl; // packageimport |
66 import dwtx.jface.text.IWidgetTokenOwnerExtension; // packageimport | 65 import dwtx.jface.text.IWidgetTokenOwnerExtension; // packageimport |
67 import dwtx.jface.text.DocumentClone; // packageimport | 66 import dwtx.jface.text.DocumentClone; // packageimport |
68 import dwtx.jface.text.DefaultUndoManager; // packageimport | 67 import dwtx.jface.text.DefaultUndoManager; // packageimport |
69 import dwtx.jface.text.IFindReplaceTarget; // packageimport | 68 import dwtx.jface.text.IFindReplaceTarget; // packageimport |
167 * @see dwtx.jface.text.IDocumentRewriteSessionListener | 166 * @see dwtx.jface.text.IDocumentRewriteSessionListener |
168 * @since 3.1 | 167 * @since 3.1 |
169 */ | 168 */ |
170 public class DocumentRewriteSessionEvent { | 169 public class DocumentRewriteSessionEvent { |
171 | 170 |
172 public const static Object SESSION_START= new Object(); | 171 private static Object SESSION_START_; |
173 public const static Object SESSION_STOP= new Object(); | 172 public static Object SESSION_START(){ |
173 if( SESSION_START_ is null ){ | |
174 synchronized(DocumentRewriteSessionEvent.classinfo){ | |
175 if( SESSION_START_ is null ){ | |
176 SESSION_START_ = new Object(); | |
177 } | |
178 } | |
179 } | |
180 return SESSION_START_; | |
181 } | |
182 private static Object SESSION_STOP_; | |
183 public static Object SESSION_STOP(){ | |
184 if( SESSION_STOP_ is null ){ | |
185 synchronized(DocumentRewriteSessionEvent.classinfo){ | |
186 if( SESSION_STOP_ is null ){ | |
187 SESSION_STOP_ = new Object(); | |
188 } | |
189 } | |
190 } | |
191 return SESSION_STOP_; | |
192 } | |
174 | 193 |
175 /** The changed document */ | 194 /** The changed document */ |
176 public IDocument fDocument; | 195 public IDocument fDocument; |
177 /** The session */ | 196 /** The session */ |
178 public DocumentRewriteSession fSession; | 197 public DocumentRewriteSession fSession; |
187 * @param changeType the change type. This is either | 206 * @param changeType the change type. This is either |
188 * {@link DocumentRewriteSessionEvent#SESSION_START} or | 207 * {@link DocumentRewriteSessionEvent#SESSION_START} or |
189 * {@link DocumentRewriteSessionEvent#SESSION_STOP}. | 208 * {@link DocumentRewriteSessionEvent#SESSION_STOP}. |
190 */ | 209 */ |
191 public this(IDocument doc, DocumentRewriteSession session, Object changeType) { | 210 public this(IDocument doc, DocumentRewriteSession session, Object changeType) { |
192 Assert.isNotNull(doc); | 211 Assert.isNotNull(cast(Object)doc); |
193 Assert.isNotNull(session); | 212 Assert.isNotNull(session); |
194 | 213 |
195 fDocument= doc; | 214 fDocument= doc; |
196 fSession= session; | 215 fSession= session; |
197 fChangeType= changeType; | 216 fChangeType= changeType; |