Examples of FactoryRegistry


Examples of javax.tools.diagnostics.FactoryRegistry

   
  }

  public void testSimpleMixedCaseSuffixMatch() throws IOException {
   
    FactoryRegistry reg=new FactoryRegistry();
    String[] suffixes=new String[]{"suFFix"};
   
    reg.addFactory(new MockFactory(suffixes));
   
    File f=new File("testfile.suffix");
   
    Image result=reg.getImage(f);
    assertNotNull(result);
   
  }
View Full Code Here

Examples of javax.tools.diagnostics.FactoryRegistry

   
  }
 
public void testTwoFactorySuffixMatch() throws IOException {
   
    FactoryRegistry reg=new FactoryRegistry();
   
    String[] suffixes=new String[]{"suFFix","other"};
    reg.addFactory(new MockFactory(suffixes));
   
    suffixes=new String[]{"rubarb","CustARD"};
    reg.addFactory(new MockFactory(suffixes));
   
    File f=new File("testfile.cusTard");
   
    Image result=reg.getImage(f);
    assertNotNull(result);
   
   
  }
View Full Code Here

Examples of javax.tools.diagnostics.FactoryRegistry

  public void startRead() throws Exception{
    logr.log(JDILogger.LEVEL_VERBOSE, "Starting to read " + pathToCore); //$NON-NLS-1$

    File f = new File(pathToCore);
    try {
      FactoryRegistry registry=null;
      registry=FactoryRegistry.getDefaultRegistry();     
     
      image =  registry.getImage(f);
    } catch (IOException e) {
      logr.logError(JDILogger.LEVEL_QUIET, "Could not find/use required file(s)"); //$NON-NLS-1$
      e.printStackTrace(new PrintStream(logr.getErrorStream()));
      errorCode = 4;
      throw e;
View Full Code Here

Examples of javazoom.jl.player.FactoryRegistry

 
    /** Implements callable interface: Loads the AudioDevice and returns it*/
    public AudioDevice call(){
      try{
        // Get AudioDevice from Registry
        FactoryRegistry factoryregistry = FactoryRegistry.systemRegistry();
        AudioDevice audio = factoryregistry.createAudioDevice();
        return audio;
      }
      catch(Exception ee){
        System.err.println("Could not load audio driver");
        ee.printStackTrace();
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.model.FactoryRegistry

  /**
   */
  public FactoryRegistry getFactoryRegistry() {
    IDOMModel model = getModel();
    if (model != null) {
      FactoryRegistry reg = model.getFactoryRegistry();
      if (reg != null)
        return reg;
    }
    return null;
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.model.FactoryRegistry

    // Must update/add to propagating adapters here too
    addPropagatingAdapters(structuredModel);
  }

  protected void addContentBasedFactories(IStructuredModel structuredModel) {
    FactoryRegistry factoryRegistry = structuredModel.getFactoryRegistry();
    Assert.isNotNull(factoryRegistry, "Program Error: client caller must ensure model has factory registry"); //$NON-NLS-1$
    INodeAdapterFactory factory = null;
    factory = factoryRegistry.getFactoryFor(IJFaceNodeAdapter.class);
    if (factory == null) {
      factory = new JFaceNodeAdapterFactoryForHTML(IJFaceNodeAdapter.class, true);
      factoryRegistry.addFactory(factory);
    }

    ModelHandlerForJSP.ensureTranslationAdapterFactory(structuredModel);
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.model.FactoryRegistry

    }
    else {
      adapterFactoryProviders = adapterRegistry.getAdapterFactories();
    }

    FactoryRegistry factoryRegistry = structuredModel.getFactoryRegistry();
    Assert.isNotNull(factoryRegistry, SSEUIMessages.EditorModelUtil_0); //$NON-NLS-1$
    // Add all those appropriate for this particular type of content
    while (adapterFactoryProviders.hasNext()) {
      try {
        final AdapterFactoryProvider provider = (AdapterFactoryProvider) adapterFactoryProviders.next();
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.model.FactoryRegistry

    }
    else {
      adapterFactoryProviders = adapterRegistry.getAdapterFactories();
    }

    FactoryRegistry factoryRegistry = structuredModel.getFactoryRegistry();
    Assert.isNotNull(factoryRegistry, SSEUIMessages.EditorModelUtil_0); //$NON-NLS-1$
    // Add all those appropriate for this particular type of content
    while (adapterFactoryProviders.hasNext()) {
      try {
        final AdapterFactoryProvider provider = (AdapterFactoryProvider) adapterFactoryProviders.next();
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.model.FactoryRegistry

    // add the normal content based factories to model's registry
    addContentBasedFactories(structuredModel);
  }

  protected void addContentBasedFactories(IStructuredModel structuredModel) {
    FactoryRegistry factoryRegistry = structuredModel.getFactoryRegistry();
    Assert.isNotNull(factoryRegistry, "Program Error: client caller must ensure model has factory registry"); //$NON-NLS-1$
    INodeAdapterFactory factory = null;

    factory = factoryRegistry.getFactoryFor(IJFaceNodeAdapter.class);
    if (factory == null) {
      factory = new JFaceNodeAdapterFactory();
      factoryRegistry.addFactory(factory);
    }

    // cs... added for inferred grammar support
    //
    if (structuredModel != null) {
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.model.FactoryRegistry

    // Must update/add to propagating adapters here too
    addPropagatingAdapters(structuredModel);
  }

  protected void addContentBasedFactories(IStructuredModel structuredModel) {
    FactoryRegistry factoryRegistry = structuredModel.getFactoryRegistry();
    Assert
        .isNotNull(factoryRegistry,
            "Program Error: client caller must ensure model has factory registry"); //$NON-NLS-1$
    INodeAdapterFactory factory = null;
    factory = factoryRegistry.getFactoryFor(IJFaceNodeAdapter.class);
    if (factory == null) {
      factory = new JFaceNodeAdapterFactoryForHTML(
          IJFaceNodeAdapter.class, true);
      factoryRegistry.addFactory(factory);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.