本文整理匯總了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);
}