129
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2000, 2006 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 module dwtx.text.edits.MalformedTreeException;
|
|
14
|
131
|
15 import dwtx.text.edits.MultiTextEdit; // packageimport
|
|
16 import dwtx.text.edits.CopySourceEdit; // packageimport
|
|
17 import dwtx.text.edits.MoveSourceEdit; // packageimport
|
|
18 import dwtx.text.edits.CopyingRangeMarker; // packageimport
|
|
19 import dwtx.text.edits.ReplaceEdit; // packageimport
|
|
20 import dwtx.text.edits.EditDocument; // packageimport
|
|
21 import dwtx.text.edits.UndoCollector; // packageimport
|
|
22 import dwtx.text.edits.DeleteEdit; // packageimport
|
|
23 import dwtx.text.edits.MoveTargetEdit; // packageimport
|
|
24 import dwtx.text.edits.CopyTargetEdit; // packageimport
|
|
25 import dwtx.text.edits.TextEditCopier; // packageimport
|
|
26 import dwtx.text.edits.ISourceModifier; // packageimport
|
|
27 import dwtx.text.edits.TextEditMessages; // packageimport
|
|
28 import dwtx.text.edits.TextEditProcessor; // packageimport
|
|
29 import dwtx.text.edits.TreeIterationInfo; // packageimport
|
|
30 import dwtx.text.edits.TextEditVisitor; // packageimport
|
|
31 import dwtx.text.edits.TextEditGroup; // packageimport
|
|
32 import dwtx.text.edits.TextEdit; // packageimport
|
|
33 import dwtx.text.edits.RangeMarker; // packageimport
|
|
34 import dwtx.text.edits.UndoEdit; // packageimport
|
|
35 import dwtx.text.edits.InsertEdit; // packageimport
|
|
36
|
|
37
|
129
|
38 import dwt.dwthelper.utils;
|
|
39
|
|
40 /**
|
|
41 * Thrown to indicate that an edit got added to a parent edit
|
|
42 * but the child edit somehow conflicts with the parent or
|
|
43 * one of it siblings.
|
|
44 * <p>
|
|
45 * This class is not intended to be serialized.
|
|
46 * </p>
|
|
47 *
|
|
48 * @see TextEdit#addChild(TextEdit)
|
|
49 * @see TextEdit#addChildren(TextEdit[])
|
|
50 *
|
|
51 * @since 3.0
|
|
52 */
|
|
53 public class MalformedTreeException : RuntimeException {
|
|
54
|
|
55 // Not intended to be serialized
|
|
56 private static final long serialVersionUID= 1L;
|
|
57
|
|
58 private TextEdit fParent;
|
|
59 private TextEdit fChild;
|
|
60
|
|
61 /**
|
|
62 * Constructs a new malformed tree exception.
|
|
63 *
|
|
64 * @param parent the parent edit
|
|
65 * @param child the child edit
|
|
66 * @param message the detail message
|
|
67 */
|
130
|
68 public this(TextEdit parent, TextEdit child, String message) {
|
129
|
69 super(message);
|
|
70 fParent= parent;
|
|
71 fChild= child;
|
|
72 }
|
|
73
|
|
74 /**
|
|
75 * Returns the parent edit that caused the exception.
|
|
76 *
|
|
77 * @return the parent edit
|
|
78 */
|
|
79 public TextEdit getParent() {
|
|
80 return fParent;
|
|
81 }
|
|
82
|
|
83 /**
|
|
84 * Returns the child edit that caused the exception.
|
|
85 *
|
|
86 * @return the child edit
|
|
87 */
|
|
88 public TextEdit getChild() {
|
|
89 return fChild;
|
|
90 }
|
|
91
|
|
92 void setParent(TextEdit parent) {
|
|
93 fParent= parent;
|
|
94 }
|
|
95 }
|