Java Code Examples for com.intellij.openapi.util.ClassExtension

The following are top voted examples for showing how to use com.intellij.openapi.util.ClassExtension. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: tools-idea   File: JavaCoreApplicationEnvironment.java   View source code 5 votes vote down vote up
public <T> void addExplicitExtension(final ClassExtension<T> instance, final Class clazz, final T object) {
  instance.addExplicitExtension(clazz, object);
  Disposer.register(getParentDisposable(), new Disposable() {
    @Override
    public void dispose() {
      instance.removeExplicitExtension(clazz, object);
    }
  });
}
 
Example 2
Project: consulo-java   File: JavaCoreApplicationEnvironment.java   View source code 5 votes vote down vote up
public <T> void addExplicitExtension(final ClassExtension<T> instance, final Class clazz, final T object) {
  instance.addExplicitExtension(clazz, object);
  Disposer.register(getParentDisposable(), new Disposable() {
    @Override
    public void dispose() {
      instance.removeExplicitExtension(clazz, object);
    }
  });
}
 
Example 3
Project: intellij-ce-playground   File: CoreApplicationEnvironment.java   View source code 4 votes vote down vote up
public <T> void addExplicitExtension(@NotNull final ClassExtension<T> instance, @NotNull final Class aClass, @NotNull final T object) {
  doAddExplicitExtension(instance, aClass, object);
}
 
Example 4
Project: consulo   File: CoreApplicationEnvironment.java   View source code 4 votes vote down vote up
public <T> void addExplicitExtension(@Nonnull final ClassExtension<T> instance, @Nonnull final Class aClass, @Nonnull final T object) {
  doAddExplicitExtension(instance, aClass, object);
}