Tabnine Logo
AsLookupSupport
Code IndexAdd Tabnine to your IDE (free)

How to use
AsLookupSupport
in
it.tidalwave.netbeans.util

Best Java code snippets using it.tidalwave.netbeans.util.AsLookupSupport (Showing top 9 results out of 315)

origin: it.tidalwave.netbeans/it-tidalwave-netbeans-util

/*******************************************************************************************************************
 *
 * {@inheritDoc}
 *
 ******************************************************************************************************************/
@Override @Nonnull
public final synchronized Lookup getLookup()
 {
  if (lookup == null)
   {
    lookup = createLookup();
   }
  return lookup;
 }

origin: it.tidalwave.netbeans/it-tidalwave-netbeans-util

/*******************************************************************************************************************
 *
 * {@inheritDoc}
 *
 ******************************************************************************************************************/
@Override @Nonnull
public <T> T as (final @Nonnull Class<T> type)
 {
  return as(type, As.Defaults.throwAsException(type));
 }

origin: it.tidalwave.bluebill/it-tidalwave-bluebill-mobile-commons

/*******************************************************************************************************************
 *
 *
 ******************************************************************************************************************/
@Override @Nonnull
public String toString() 
 {
  return childrenPM.isEmpty() ? super.toString() 
                : String.format("%s@%x[%d children]", getClass().getSimpleName(), 
                                   System.identityHashCode(this),
                                   childrenPM.size());
 }   

origin: it.tidalwave.netbeans/it-tidalwave-netbeans-util

  result = getLookup().lookup(type);               
      result = getLookup().lookup(type);   
log.trace(">>>> {}.as({}) took {} msec.", new Object[]{ toShortString(), type.getSimpleName(), System.currentTimeMillis() - time });
origin: it.tidalwave.netbeans/it-tidalwave-netbeans-util

/*******************************************************************************************************************
 *
 *
 ******************************************************************************************************************/
@Nonnull
protected Lookup createLookup() 
 {
  final long time = System.currentTimeMillis();
  Lookup result = LookupFactory.createLookup(owner, Lookups.fixed(instanceCapabilities));
  
  if (threadLocalLookup != null)
   {
    result = LookupFactory.createLookup(threadLocalLookup, this, result);
    threadLocalLookup = null;
   }
  
  log.trace(">>>> createLookup() - for {} took {} msec.", toShortString(), System.currentTimeMillis() - time);
  return result;
 }

origin: it.tidalwave.bluebill/bluebill-mobile-android

 @Override
 public void onCreate()
  {
   super.onCreate();
   
   try
    {
     AsLookupSupport.setUseCache(true);
     // This trick was an old one for setting mock Lookups in tests, but works well here.
     final Field defaultLookup = Lookup.class.getDeclaredField("defaultLookup");
     defaultLookup.setAccessible(true);
     final BlueBillLookup blueBillLookup = new BlueBillLookup();
     blueBillLookup.setContext(this);
     defaultLookup.set(null, blueBillLookup);
     
     ((AndroidSmartAssetManager)Locator.find(SmartAssetManager.class)).setVersion(2);
    }
   catch (Exception e)
    {
     throw new RuntimeException(e);
    }
  }
}
origin: it.tidalwave.bluebill/it-tidalwave-bluebill-mobile-commons

/*******************************************************************************************************************
 *
 *
 ******************************************************************************************************************/
@Override @Nonnull
protected Lookup createLookup() 
 {
  return (composite == null) ? super.createLookup() 
                : new ProxyLookup(Lookups.fixed(composite), super.createLookup());
 }

origin: it.tidalwave.bluebill/it-tidalwave-semantic-aux

 /*******************************************************************************************************************
  *
  *
  ******************************************************************************************************************/
 @Override @Nonnull
 protected Lookup createLookup() 
  {
   return (capabilities.length == 0) ? super.createLookup() 
                    : new ProxyLookup(Lookups.fixed(capabilities), super.createLookup());
  }    
}
origin: it.tidalwave.bluebill/it-tidalwave-bluebill-stats-commons

 @Override @Nonnull
 protected Lookup createLookup()
  {
   final Lookup superLookup = super.createLookup();
       
   Composite<?, ?> delegateComposite = superLookup.lookup(Composite.class);
   
   if (delegateComposite == null)
    {
     delegateComposite = Composite.DEFAULT;
    }
   
   composite = new PresentationModelComposite(delegateComposite);
   
   return new ProxyLookup(Lookups.fixed(composite), superLookup);
  }        
}
it.tidalwave.netbeans.utilAsLookupSupport

Javadoc

FIXME: move to OpenBlueSky

Most used methods

  • createLookup
  • as
  • getLookup
  • setUseCache
    The cache seems to give some advantage on Android. E.g. blueBill rendering taxa displaynames on a Mo
  • toShortString
  • toString

Popular in Java

  • Reactive rest calls using spring rest template
  • runOnUiThread (Activity)
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JButton (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now