summaryrefslogtreecommitdiff
path: root/platform/core-api/src/com/intellij/openapi/vfs/newvfs/events/VFileMoveEvent.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/core-api/src/com/intellij/openapi/vfs/newvfs/events/VFileMoveEvent.java')
-rw-r--r--platform/core-api/src/com/intellij/openapi/vfs/newvfs/events/VFileMoveEvent.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/platform/core-api/src/com/intellij/openapi/vfs/newvfs/events/VFileMoveEvent.java b/platform/core-api/src/com/intellij/openapi/vfs/newvfs/events/VFileMoveEvent.java
index 42ff9d42d8a0..dd145f88bc69 100644
--- a/platform/core-api/src/com/intellij/openapi/vfs/newvfs/events/VFileMoveEvent.java
+++ b/platform/core-api/src/com/intellij/openapi/vfs/newvfs/events/VFileMoveEvent.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2012 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@ public class VFileMoveEvent extends VFileEvent {
private final VirtualFile myOldParent;
private final VirtualFile myNewParent;
- public VFileMoveEvent(final Object requestor, @NotNull final VirtualFile file, final VirtualFile newParent) {
+ public VFileMoveEvent(final Object requestor, @NotNull VirtualFile file, @NotNull VirtualFile newParent) {
super(requestor, false);
myFile = file;
myNewParent = newParent;
@@ -43,6 +43,7 @@ public class VFileMoveEvent extends VFileEvent {
return myFile;
}
+ @NotNull
public VirtualFile getNewParent() {
return myNewParent;
}
@@ -51,11 +52,13 @@ public class VFileMoveEvent extends VFileEvent {
return myOldParent;
}
+ @Override
@NonNls
public String toString() {
return "VfsEvent[move " + myFile.getName() +" from " + myOldParent + " to " + myNewParent + "]";
}
+ @NotNull
@Override
public String getPath() {
return myFile.getPath();
@@ -72,6 +75,7 @@ public class VFileMoveEvent extends VFileEvent {
return myFile.isValid() && Comparing.equal(myFile.getParent(), myOldParent) && myOldParent.isValid();
}
+ @Override
public boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -85,9 +89,9 @@ public class VFileMoveEvent extends VFileEvent {
return true;
}
+ @Override
public int hashCode() {
- int result;
- result = myFile.hashCode();
+ int result = myFile.hashCode();
result = 31 * result + myOldParent.hashCode();
result = 31 * result + myNewParent.hashCode();
return result;