change signature: cleanup
authoranna <Anna.Kozlova@jetbrains.com>
Tue, 14 Sep 2010 15:48:30 +0000 (19:48 +0400)
committerKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Wed, 15 Sep 2010 11:53:34 +0000 (15:53 +0400)
platform/lang-impl/src/com/intellij/refactoring/changeSignature/ChangeSignatureGestureDetector.java

index 07920f8f02ff35f9b16e990e53d20824f412f52e..1db6ad67b860da5dc8d8acc5765e3b0dc7b730d4 100644 (file)
@@ -122,17 +122,21 @@ public class ChangeSignatureGestureDetector extends PsiTreeChangeAdapter impleme
 
   @Override
   public void childRemoved(PsiTreeChangeEvent event) {
 
   @Override
   public void childRemoved(PsiTreeChangeEvent event) {
-    if (myDeaf) return;
     change(event.getParent());
   }
 
   @Override
   public void childReplaced(PsiTreeChangeEvent event) {
     change(event.getParent());
   }
 
   @Override
   public void childReplaced(PsiTreeChangeEvent event) {
-    if (myDeaf) return;
+    change(event.getChild());
+  }
+
+  @Override
+  public void childAdded(PsiTreeChangeEvent event) {
     change(event.getChild());
   }
 
   private void change(PsiElement child) {
     change(event.getChild());
   }
 
   private void change(PsiElement child) {
+    if (myDeaf) return;
     if (child == null) return;
     final PsiFile file = child.getContainingFile();
     if (file != null) {
     if (child == null) return;
     final PsiFile file = child.getContainingFile();
     if (file != null) {
@@ -193,10 +197,6 @@ public class ChangeSignatureGestureDetector extends PsiTreeChangeAdapter impleme
       myCurrentInfo = currentInfo;
     }
 
       myCurrentInfo = currentInfo;
     }
 
-    public void setInitialText(String initialText) {
-      myInitialText = initialText;
-    }
-
     public String getInitialText() {
       return myInitialText;
     }
     public String getInitialText() {
       return myInitialText;
     }