2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package com
.intellij
.psi
.impl
;
19 import com
.intellij
.psi
.PsiElement
;
20 import com
.intellij
.psi
.PsiFile
;
21 import com
.intellij
.psi
.PsiManager
;
22 import com
.intellij
.psi
.PsiTreeChangeEvent
;
24 public class PsiTreeChangeEventImpl
extends PsiTreeChangeEvent
{
25 public enum PsiEventType
{
26 BEFORE_CHILD_ADDITION
,
28 BEFORE_CHILD_REPLACEMENT
,
29 BEFORE_CHILD_MOVEMENT
,
30 BEFORE_CHILDREN_CHANGE
,
31 BEFORE_PROPERTY_CHANGE
,
40 private PsiEventType myCode
;
42 public PsiTreeChangeEventImpl(PsiManager manager
) {
46 public PsiEventType
getCode() {
50 public void setCode(PsiEventType code
) {
54 public void setParent(PsiElement parent
) {
58 public void setOldParent(PsiElement oldParent
) {
59 myOldParent
= oldParent
;
62 public void setNewParent(PsiElement newParent
) {
63 myNewParent
= newParent
;
66 public void setChild(PsiElement child
) {
70 public void setOldChild(PsiElement oldChild
) {
71 myOldChild
= oldChild
;
74 public void setNewChild(PsiElement newChild
) {
75 myNewChild
= newChild
;
78 public void setElement(PsiElement element
) {
82 public void setPropertyName(String propertyName
) {
83 myPropertyName
= propertyName
;
86 public void setOldValue(Object oldValue
) {
87 myOldValue
= oldValue
;
90 public void setNewValue(Object newValue
) {
91 myNewValue
= newValue
;
94 public void setFile(PsiFile file
) {
98 public void setOffset(int offset
) {
102 public int getOffset() {
106 public void setOldLength(int oldLength
) {
107 myOldLength
= oldLength
;
110 public int getOldLength() {