mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Make "CommitContext" extend "UserDataHolderBase"
This commit is contained in:
+2
-23
@@ -15,28 +15,7 @@
|
||||
*/
|
||||
package com.intellij.openapi.vcs.changes;
|
||||
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.UserDataHolder;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import com.intellij.openapi.util.UserDataHolderBase;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class CommitContext implements UserDataHolder {
|
||||
private final Map<Key, Object> myMap;
|
||||
|
||||
public CommitContext() {
|
||||
myMap = new HashMap<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getUserData(@NotNull Key<T> key) {
|
||||
return (T)myMap.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> void putUserData(@NotNull Key<T> key, @Nullable T value) {
|
||||
myMap.put(key, value);
|
||||
}
|
||||
public class CommitContext extends UserDataHolderBase {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user