com.intellij.util.io.EnumeratorStringDescriptor Java Examples

The following examples show how to use com.intellij.util.io.EnumeratorStringDescriptor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestStateStorage.java    From consulo with Apache License 2.0 6 votes vote down vote up
@Nonnull
private static ThrowableComputable<PersistentHashMap<String, Record>, IOException> getComputable(final File file) {
  return () -> new PersistentHashMap<>(file, EnumeratorStringDescriptor.INSTANCE, new DataExternalizer<Record>() {
    @Override
    public void save(@Nonnull DataOutput out, Record value) throws IOException {
      out.writeInt(value.magnitude);
      out.writeLong(value.date.getTime());
      out.writeLong(value.configurationHash);
    }

    @Override
    public Record read(@Nonnull DataInput in) throws IOException {
      return new Record(in.readInt(), new Date(in.readLong()), in.readLong());
    }
  }, 4096, CURRENT_VERSION);
}
 
Example #2
Source File: StringSetDataExternalizer.java    From idea-php-typo3-plugin with MIT License 5 votes vote down vote up
public synchronized void save(@NotNull DataOutput out, Set<String> value) throws IOException {
    out.writeInt(value.size());
    Iterator var3 = value.iterator();

    while(var3.hasNext()) {
        String s = (String)var3.next();
        EnumeratorStringDescriptor.INSTANCE.save(out, s);
    }

}
 
Example #3
Source File: StringSetDataExternalizer.java    From idea-php-typo3-plugin with MIT License 5 votes vote down vote up
public synchronized Set<String> read(@NotNull DataInput in) throws IOException {
    THashSet set = new THashSet();

    for(int r = in.readInt(); r > 0; --r) {
        set.add(EnumeratorStringDescriptor.INSTANCE.read(in));
    }

    return set;
}
 
Example #4
Source File: AnnotationUsageIndex.java    From idea-php-annotation-plugin with MIT License 5 votes vote down vote up
public synchronized Set<String> read(@NotNull DataInput in) throws IOException {
    Set<String> set = new THashSet<>();

    for(int r = in.readInt(); r > 0; --r) {
        set.add(EnumeratorStringDescriptor.INSTANCE.read(in));
    }

    return set;
}
 
Example #5
Source File: AnnotationUsageIndex.java    From idea-php-annotation-plugin with MIT License 5 votes vote down vote up
public synchronized void save(@NotNull DataOutput out, Set<String> value) throws IOException {
    out.writeInt(value.size());
    Iterator var = value.iterator();

    while(var.hasNext()) {
        String s = (String)var.next();
        EnumeratorStringDescriptor.INSTANCE.save(out, s);
    }
}
 
Example #6
Source File: StringSetDataExternalizer.java    From idea-php-symfony2-plugin with MIT License 5 votes vote down vote up
public synchronized Set<String> read(@NotNull DataInput in) throws IOException {
    Set<String> set = new THashSet<>();

    for(int r = in.readInt(); r > 0; --r) {
        set.add(EnumeratorStringDescriptor.INSTANCE.read(in));
    }

    return set;
}
 
Example #7
Source File: StringSetDataExternalizer.java    From idea-php-symfony2-plugin with MIT License 5 votes vote down vote up
public synchronized void save(@NotNull DataOutput out, Set<String> value) throws IOException {
    out.writeInt(value.size());
    Iterator var = value.iterator();

    while(var.hasNext()) {
        String s = (String)var.next();
        EnumeratorStringDescriptor.INSTANCE.save(out, s);
    }
}
 
Example #8
Source File: ConfigKeyStubIndex.java    From idea-php-laravel-plugin with MIT License 4 votes vote down vote up
@NotNull
@Override
public KeyDescriptor<String> getKeyDescriptor() {
    return EnumeratorStringDescriptor.INSTANCE;
}
 
Example #9
Source File: BladeYieldStubIndex.java    From idea-php-laravel-plugin with MIT License 4 votes vote down vote up
@NotNull
@Override
public KeyDescriptor<String> getKeyDescriptor() {
    return EnumeratorStringDescriptor.INSTANCE;
}
 
Example #10
Source File: BladeStackStubIndex.java    From idea-php-laravel-plugin with MIT License 4 votes vote down vote up
@NotNull
@Override
public KeyDescriptor<String> getKeyDescriptor() {
    return EnumeratorStringDescriptor.INSTANCE;
}
 
Example #11
Source File: BladeEachStubIndex.java    From idea-php-laravel-plugin with MIT License 4 votes vote down vote up
@NotNull
@Override
public KeyDescriptor<String> getKeyDescriptor() {
    return EnumeratorStringDescriptor.INSTANCE;
}
 
Example #12
Source File: PantsTargetIndex.java    From intellij-pants-plugin with Apache License 2.0 4 votes vote down vote up
@NotNull
@Override
public KeyDescriptor<String> getKeyDescriptor() {
  return new EnumeratorStringDescriptor();
}
 
Example #13
Source File: PantsAddressesIndex.java    From intellij-pants-plugin with Apache License 2.0 4 votes vote down vote up
@NotNull
@Override
public KeyDescriptor<String> getKeyDescriptor() {
  return new EnumeratorStringDescriptor();
}
 
Example #14
Source File: HaxeSymbolIndex.java    From intellij-haxe with Apache License 2.0 4 votes vote down vote up
@NotNull
@Override
public KeyDescriptor<String> getKeyDescriptor() {
  return new EnumeratorStringDescriptor();
}
 
Example #15
Source File: HaxeComponentFileNameIndex.java    From intellij-haxe with Apache License 2.0 4 votes vote down vote up
@Override
public KeyDescriptor<String> getKeyDescriptor() {
  return new EnumeratorStringDescriptor();
}
 
Example #16
Source File: HaxeComponentIndex.java    From intellij-haxe with Apache License 2.0 4 votes vote down vote up
@Override
public KeyDescriptor<String> getKeyDescriptor() {
  return new EnumeratorStringDescriptor();
}
 
Example #17
Source File: HaxeInheritanceIndex.java    From intellij-haxe with Apache License 2.0 4 votes vote down vote up
@Override
public KeyDescriptor<String> getKeyDescriptor() {
  return new EnumeratorStringDescriptor();
}
 
Example #18
Source File: HaxeTypeDefInheritanceIndex.java    From intellij-haxe with Apache License 2.0 4 votes vote down vote up
@Override
public KeyDescriptor<String> getKeyDescriptor() {
  return new EnumeratorStringDescriptor();
}
 
Example #19
Source File: ContainerIdUsagesStubIndex.java    From idea-php-symfony2-plugin with MIT License 4 votes vote down vote up
@NotNull
@Override
public KeyDescriptor<String> getKeyDescriptor() {
    return EnumeratorStringDescriptor.INSTANCE;
}
 
Example #20
Source File: ContainerParameterStubIndex.java    From idea-php-symfony2-plugin with MIT License 4 votes vote down vote up
@NotNull
@Override
public DataExternalizer<String> getValueExternalizer() {
    return EnumeratorStringDescriptor.INSTANCE;
}
 
Example #21
Source File: PhpInjectFileReferenceIndex.java    From idea-php-advanced-autocomplete with MIT License 4 votes vote down vote up
@NotNull
public KeyDescriptor<String> getKeyDescriptor() {
    return EnumeratorStringDescriptor.INSTANCE;
}
 
Example #22
Source File: StringStubIndexExtension.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public KeyDescriptor<String> getKeyDescriptor() {
  return new EnumeratorStringDescriptor();
}
 
Example #23
Source File: FilenameIndexImpl.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public KeyDescriptor<String> getKeyDescriptor() {
  return EnumeratorStringDescriptor.INSTANCE;
}
 
Example #24
Source File: FileTypeIndexImpl.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void save(@Nonnull DataOutput out, FileType value) throws IOException {
  EnumeratorStringDescriptor.INSTANCE.save(out, value.getName());
}
 
Example #25
Source File: FileIncludeIndex.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public KeyDescriptor<String> getKeyDescriptor() {
  return EnumeratorStringDescriptor.INSTANCE;
}
 
Example #26
Source File: SwaggerFileIndex.java    From intellij-swagger with MIT License 4 votes vote down vote up
@NotNull
@Override
public KeyDescriptor<String> getKeyDescriptor() {
  return EnumeratorStringDescriptor.INSTANCE;
}
 
Example #27
Source File: NamespaceIndex.java    From reasonml-idea-plugin with MIT License 4 votes vote down vote up
@NotNull
@Override
public KeyDescriptor<String> getKeyDescriptor() {
    return EnumeratorStringDescriptor.INSTANCE;
}
 
Example #28
Source File: ControllerActionIndex.java    From idea-php-typo3-plugin with MIT License 4 votes vote down vote up
@NotNull
@Override
public KeyDescriptor<String> getKeyDescriptor() {
    return new EnumeratorStringDescriptor();
}
 
Example #29
Source File: ResourcePathIndex.java    From idea-php-typo3-plugin with MIT License 4 votes vote down vote up
@NotNull
@Override
public KeyDescriptor<String> getKeyDescriptor() {
    return EnumeratorStringDescriptor.INSTANCE;
}
 
Example #30
Source File: RouteIndex.java    From idea-php-typo3-plugin with MIT License 4 votes vote down vote up
@NotNull
@Override
public KeyDescriptor<String> getKeyDescriptor() {
    return new EnumeratorStringDescriptor();
}