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

How to use
PluginResourceService
in
kendzi.kendzi3d.resource.manager

Best Java code snippets using kendzi.kendzi3d.resource.manager.PluginResourceService (Showing top 3 results out of 315)

origin: kendzi/kendzi3d

  @Override
  public URL resourceToUrl(String resourceName) {
    URL url = receivePluginDirUrl(resourceName);
    if (url != null) {
      return url;
    }

    return getResourceUrl(resourceName);
  }
}
origin: kendzi/kendzi3d

@Provides
@Singleton
PluginResourceService providePluginResourceService() {
  return new PluginResourceService(pluginDirectory);
}
origin: kendzi/kendzi3d

  @Override
  public URL resourceToUrl(String resourceName) {
    try {
      URL url = null;

      if (resourceName.startsWith(PLUGIN_FILE_PREFIX)) {
        url = pluginResourceService.resourceToUrl(resourceName.substring(PLUGIN_FILE_PREFIX.length()));
      } else if (resourceName.startsWith("file:") || resourceName.startsWith("http://") || resourceName.startsWith("https://")) {
        url = new URL(resourceName);
      } else {
        //url = new File(resourceName).toURI().toURL();
        url = pluginResourceService.resourceToUrl(resourceName);
      }
      return url;
    } catch (MalformedURLException e) {
      throw new RuntimeException("can't recive URL for resource: " + resourceName);
    }
  }
}
kendzi.kendzi3d.resource.managerPluginResourceService

Javadoc

Receive files stored locally in resources or plugin directory.

Most used methods

  • <init>
    Constructor.
  • getResourceUrl
    Try to find URL of file in resources. In some reason getClass().getResource(...) can't find file if
  • receivePluginDirUrl
  • resourceToUrl

Popular in Java

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • getSupportFragmentManager (FragmentActivity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Kernel (java.awt.image)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • JComboBox (javax.swing)
  • JLabel (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • 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