From 35338cd62f53ccfbbcbf300f99fae6f93d1c3de3 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Sat, 10 Jul 2010 17:39:04 +0400 Subject: [PATCH] set --- platform/util/src/com/intellij/openapi/util/Key.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/platform/util/src/com/intellij/openapi/util/Key.java b/platform/util/src/com/intellij/openapi/util/Key.java index c3867ddb18bd..f882e6c41731 100644 --- a/platform/util/src/com/intellij/openapi/util/Key.java +++ b/platform/util/src/com/intellij/openapi/util/Key.java @@ -64,4 +64,10 @@ public class Key { public boolean containsIn(@Nullable UserDataHolder holder) { return get(holder) != null; } -} + + public void set(@Nullable UserDataHolder holder, T value) { + if (holder != null) { + holder.putUserData(this, value); + } + } +} \ No newline at end of file