test isolation
[fedora-idea.git] / platform / lang-impl / src / com / intellij / psi / impl / PsiTreeChangeEventImpl.java
blob6f7ff02158c94c07f0087a417747b916d0fe658f
1 /*
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,
27 BEFORE_CHILD_REMOVAL,
28 BEFORE_CHILD_REPLACEMENT,
29 BEFORE_CHILD_MOVEMENT,
30 BEFORE_CHILDREN_CHANGE,
31 BEFORE_PROPERTY_CHANGE,
32 CHILD_ADDED,
33 CHILD_REMOVED,
34 CHILD_REPLACED,
35 CHILD_MOVED,
36 CHILDREN_CHANGED,
37 PROPERTY_CHANGED
40 private PsiEventType myCode;
42 public PsiTreeChangeEventImpl(PsiManager manager) {
43 super(manager);
46 public PsiEventType getCode() {
47 return myCode;
50 public void setCode(PsiEventType code) {
51 myCode = code;
54 public void setParent(PsiElement parent) {
55 myParent = 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) {
67 myChild = 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) {
79 myElement = 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) {
95 myFile = file;
98 public void setOffset(int offset) {
99 myOffset = offset;
102 public int getOffset() {
103 return myOffset;
106 public void setOldLength(int oldLength) {
107 myOldLength = oldLength;
110 public int getOldLength() {
111 return myOldLength;