Пример #1
0
 public void addAttachment(int slotIndex, String name, Attachment attachment) {
   if (attachment == null) throw new IllegalArgumentException("attachment cannot be null.");
   if (slotIndex < 0) throw new IllegalArgumentException("slotIndex must be >= 0.");
   Key key = new Key();
   key.set(slotIndex, name);
   attachments.put(key, attachment);
 }
 Key getForPut(final String string) {
   final Key key = new Key();
   key.set(string);
   return key;
 }
 Key getForLookup(final String string) {
   final Key key = keyForThread.get();
   key.set(string);
   return key;
 }
Пример #4
0
 public static void setAlternativeSource(VirtualFile source, VirtualFile dest) {
   ALTERNATIVE_SOURCE_KEY.set(source, dest);
   ALTERNATIVE_SOURCE_KEY.set(dest, null);
 }
Пример #5
0
 /** @return May be null. */
 public Attachment getAttachment(int slotIndex, String name) {
   if (slotIndex < 0) throw new IllegalArgumentException("slotIndex must be >= 0.");
   lookup.set(slotIndex, name);
   return attachments.get(lookup);
 }