Package net.sf.jabref.plugin.core

Examples of net.sf.jabref.plugin.core.JabRefPlugin


        Globals.helpDiag = this.helpDiag;

        /*
         * Load fetchers that are plug-in extensions
         */
        JabRefPlugin jabrefPlugin = JabRefPlugin.getInstance(PluginCore.getManager());
      if (jabrefPlugin != null){
                for (EntryFetcherExtension ext : jabrefPlugin.getEntryFetcherExtensions()){
                    try {
                            EntryFetcher fetcher = ext.getEntryFetcher();
                            if (fetcher != null){
                                    fetchers.add(fetcher);
                            }
View Full Code Here


  static Map<String, LayoutFormatter> pluginLayoutFormatter;
 
  public static LayoutFormatter getLayoutFormatterFromPlugins(String formatterName){
    if (pluginLayoutFormatter == null){
      pluginLayoutFormatter = new HashMap<String, LayoutFormatter>();
            JabRefPlugin plugin = JabRefPlugin.getInstance(PluginCore.getManager());
      if (plugin != null){
        for (LayoutFormatterExtension e : plugin.getLayoutFormatterExtensions()){
          LayoutFormatter formatter = e.getLayoutFormatter();
          String name = e.getName();
          if (name == null)
            name = e.getId();
         
View Full Code Here

        putFormat(new OpenDocumentSpreadsheetCreator());
        putFormat(new MSBibExportFormat());
        putFormat(new MySQLExport());
   
        // Add Export Formats contributed by Plugins
        JabRefPlugin plugin = JabRefPlugin.getInstance(PluginCore.getManager());
    if (plugin != null){
     
      // 1. ExportFormats based on Templates
      for (ExportFormatTemplateExtension e : plugin.getExportFormatTemplateExtensions()){
        ExportFormat format = PluginBasedExportFormat.getFormat(e);
        if (format != null){
          putFormat(format);
        }
      }

      // 2. ExportFormat classed
      for (final ExportFormatExtension e : plugin.getExportFormatExtensions()) {
        putFormat(new IExportFormat(){

          public String getConsoleName() {
            return e.getConsoleName();
          }

          public String getDisplayName() {
            return e.getDisplayName();
          }

          public FileFilter getFileFilter() {
            return new ExportFileFilter(this, e.getExtension());
          }

          IExportFormat wrapped;
          public void performExport(BibtexDatabase database, MetaData metaData,
            String file, String encoding, Set<String> entryIds)
            throws Exception {

            if (wrapped == null)
              wrapped = e.getExportFormat();
            wrapped.performExport(database, metaData, file, encoding, entryIds);
          }
        });
      }
   
      // 3. Formatters provided by Export Format Providers
      for (ExportFormatProviderExtension e : plugin.getExportFormatProviderExtensions()) {
        IExportFormatProvider formatProvider = e.getFormatProvider();
        for (IExportFormat exportFormat : formatProvider.getExportFormats()) {
          putFormat(exportFormat);
        }
      }
View Full Code Here

    formats.add(new MsBibImporter());

    /**
     * Get import formats that are plug-ins
     */
    JabRefPlugin jabrefPlugin = JabRefPlugin.getInstance(PluginCore.getManager());
  if (jabrefPlugin != null){
    for (ImportFormatExtension ext : jabrefPlugin.getImportFormatExtensions()){
      ImportFormat importFormat = ext.getImportFormat();
      if (importFormat != null){
        formats.add(importFormat);
      }
    }
View Full Code Here

     *
     * @param jrf The JabRefFrame.
     */
    private void startSidePanePlugins(JabRefFrame jrf) {

        JabRefPlugin jabrefPlugin = JabRefPlugin.getInstance(PluginCore.getManager());
        List<_JabRefPlugin.SidePanePluginExtension> plugins = jabrefPlugin.getSidePanePluginExtensions();
        for (_JabRefPlugin.SidePanePluginExtension extension : plugins) {
            SidePanePlugin plugin = extension.getSidePanePlugin();
            plugin.init(jrf, jrf.sidePaneManager);
            SidePaneComponent comp = plugin.getSidePaneComponent();
            jrf.sidePaneManager.register(comp.getName(), comp);
View Full Code Here

TOP

Related Classes of net.sf.jabref.plugin.core.JabRefPlugin

Copyright © 2018 www.massapicom. 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.