本文整理汇总了Java中com.intellij.openapi.util.Key.create方法的典型用法代码示例。如果您正苦于以下问题:Java Key.create方法的具体用法?Java Key.create怎么用?Java Key.create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.util.Key
的用法示例。
在下文中一共展示了Key.create方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: lookup
import com.intellij.openapi.util.Key; //导入方法依赖的package包/类
@NotNull
public static <T extends Breakpoint> Key<T> lookup(String name) {
Key<T> key = ourMap.get(name);
if (key == null) {
key = Key.create(name);
ourMap.put(name, key);
}
return key;
}
示例2: testSave
import com.intellij.openapi.util.Key; //导入方法依赖的package包/类
public void testSave() {
Key<String> key = Key.create("abc");
final ProcessingContext context = new ProcessingContext();
assertFalse(string().contains("abc").save(key).accepts(null));
assertNull(context.get(key));
assertFalse(string().contains("abc").save(key).accepts("def"));
assertNull(context.get(key));
final String s = "defabcdef";
assertTrue(string().contains("abc").save(key).accepts(s, context));
assertSame(s, context.get(key));
}
示例3: LanguageExtension
import com.intellij.openapi.util.Key; //导入方法依赖的package包/类
public LanguageExtension(@NonNls final String epName, @Nullable final T defaultImplementation) {
super(epName);
myDefaultImplementation = defaultImplementation;
IN_LANGUAGE_CACHE = Key.create("EXTENSIONS_IN_LANGUAGE_"+epName);
}
示例4: UnknownBeforeRunTaskProvider
import com.intellij.openapi.util.Key; //导入方法依赖的package包/类
public UnknownBeforeRunTaskProvider(String mirrorProviderName) {
myId = Key.create(mirrorProviderName);
}
示例5: IncludeCacheHolder
import com.intellij.openapi.util.Key; //导入方法依赖的package包/类
private IncludeCacheHolder(String compileTimeKey, String runtimeKey) {
COMPILE_TIME_KEY = Key.create(compileTimeKey);
RUNTIME_KEY = Key.create(runtimeKey);
}