Examples of IPasteProviderFactory


Examples of net.sourceforge.eclipastie.core.pasteprovider.IPasteProviderFactory

  /* (non-Javadoc)
   * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
   */
  public Object execute(ExecutionEvent event) throws ExecutionException {
    IPasteProviderFactory factory = ProviderManager.getInstance().getCurrentPasteProviderFactory();
    ISelection selection = HandlerUtil.getCurrentSelection(event);
    IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);

    // some tests for handler configuration in plugin.xml
    //handlerDevelopmentTests(event);

    IPreferenceStore preferenceStore = EclipastiePlugin.getDefault().getPreferenceStore();
    IPasteProvider paster = factory.createInstance();
    Long fileSizeLimit = -1L;
    if (preferenceStore.getBoolean(IEclipastiePreferenceConstants.MENU_HANDLER_ENABLE_MAXFILESIZE_PREFERENCE)) {
      fileSizeLimit = preferenceStore.getLong(IEclipastiePreferenceConstants.MENU_HANDLER_MAXFILESIZE_PREFERENCE);
    }

View Full Code Here

Examples of net.sourceforge.eclipastie.core.pasteprovider.IPasteProviderFactory

    for (IConfigurationElement configurationElement : configurationElements) {
      String providerId = configurationElement.getAttribute("providerId");
      String name = configurationElement.getAttribute("name");

      try {
        IPasteProviderFactory providerFactory = (IPasteProviderFactory) configurationElement.createExecutableExtension("class");
        providerFactoryList.add(providerFactory);
      } catch (CoreException e) {
        // print stacktrace and continue with next element
        e.printStackTrace();
      }
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.