Examples of PluginException


Examples of net.sf.apptools.plugin.PlugInException

    probeMaker = (ProbeMakerPlugIn) platform.getPlugInInstance(ProbeMakerPlugIn.class);   
    workbench = (SwingWorkbenchUI) platform.getPlugInInstance(SwingWorkbenchUI.class);
          
   
    if (probeMaker == null)
      throw new PlugInException("The ProbeMaker plugin could not be found"); //$NON-NLS-1$

    //Set icons for some actions
    ((AbstractUserAction) probeMaker.designProbesAppend).putValue(SwingUserAction.KEY_SWING_ICON,
        GUIUtils.getIcon(getClass(), "icons/designProbesAppend.gif", "Design and append probes")); //$NON-NLS-1$ //$NON-NLS-2$
    ((AbstractUserAction) probeMaker.designProbesReplace).putValue(SwingUserAction.KEY_SWING_ICON,
        GUIUtils.getIcon(getClass(),"icons/designProbesReplace.gif", "Design new probes")); //$NON-NLS-1$ //$NON-NLS-2$    
    ((AbstractUserAction) probeMaker.newProject).putValue(SwingUserAction.KEY_SWING_ICON,
        GUIUtils.getIcon(GUIUtils.class,"icons/new.gif", "New project")); //$NON-NLS-1$ //$NON-NLS-2$
    ((AbstractUserAction) probeMaker.openProject).putValue(SwingUserAction.KEY_SWING_ICON,
        GUIUtils.getIcon(GUIUtils.class,"icons/open.gif", "Open project")); //$NON-NLS-1$ //$NON-NLS-2$
    ((AbstractUserAction) probeMaker.importProject).putValue(SwingUserAction.KEY_SWING_ICON,
        GUIUtils.getIcon(GUIUtils.class,"icons/import.gif", "Import project")); //$NON-NLS-1$ //$NON-NLS-2$
    ((AbstractUserAction) probeMaker.saveProject).putValue(SwingUserAction.KEY_SWING_ICON,
        GUIUtils.getIcon(GUIUtils.class,"icons/save.gif", "Save project")); //$NON-NLS-1$ //$NON-NLS-2$
    ((AbstractUserAction) probeMaker.saveProjectAs).putValue(SwingUserAction.KEY_SWING_ICON,
        GUIUtils.getIcon(GUIUtils.class,"icons/saveAs.gif", "Save project as")); //$NON-NLS-1$ //$NON-NLS-2$

   
    probeMaker.addProjectListener(this);

    if (workbench == null)
      throw new PlugInException("The Workbench could not be found"); //$NON-NLS-1$

    workbench.addDataEditorFactory(new TemplateDataEditorFactory());

    //Check preferences that affect the UI
    //TODO Insert here any  changes to the UIO based on preferences
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.plugin.PluginException

       
        // Folder to store user settings.
        try {
            _userSettingsFolder = plugin.getPluginUserSettingsFolder();
        } catch (IOException ex) {
            throw new PluginException(ex);
        }       
        _prefs = defaultPrefsBean;
        loadPrefs();
        _initialized = true;
    }
View Full Code Here

Examples of org.apache.commons.digester.plugins.PluginException

       
        InputStream is = null;
        try {
            is = new FileInputStream(rulesFileName);
        } catch(IOException ioe) {
            throw new PluginException(
                "Unable to process file [" + rulesFileName + "]", ioe);
        }
       
        try {
            RuleLoader loader = new LoaderFromStream(is);
            return loader;
        } catch(Exception e) {
            throw new PluginException(
                "Unable to load xmlrules from file [" +
                rulesFileName + "]", e);
        } finally {
            try {
                is.close();
            } catch(java.io.IOException ioe) {
                throw new PluginException(
                    "Unable to close stream for file [" +
                    rulesFileName + "]", ioe);
            }
        }
    }
View Full Code Here

Examples of org.apache.commons.digester.plugins.PluginException

                throws PluginException {

        Method method = locateMethod(rulesClass, methodName);

        if (method == null) {
            throw new PluginException(
                "rule class " + rulesClass.getName()
                + " does not have method " + methodName
                + " or that method has an invalid signature.");
        }
       
View Full Code Here

Examples of org.apache.commons.digester.plugins.PluginException

        try {
            Object[] params = {d, path};
            rulesMethod.invoke(null, params);
        } catch (Exception e) {
            throw new PluginException(
                "Unable to invoke rules method " + rulesMethod
                + " on rules class " + rulesClass, e);
        }
    }
View Full Code Here

Examples of org.apache.commons.digester.plugins.PluginException

        InputStream is =
            pluginClass.getClassLoader().getResourceAsStream(
                resourceName);

        if (is == null) {
            throw new PluginException(
                "Resource " + resourceName + " not found.");
        }
       
         return loadRules(d, pluginClass, is, resourceName);
    }
View Full Code Here

Examples of org.apache.commons.digester.plugins.PluginException

        try {
            RuleLoader loader = new LoaderFromStream(is);
            return loader;
        } catch(Exception e) {
            throw new PluginException(
                "Unable to load xmlrules from resource [" +
                resourceName + "]", e);
        } finally {
            try {
                is.close();
            } catch(java.io.IOException ioe) {
                throw new PluginException(
                    "Unable to close stream for resource [" +
                    resourceName + "]", ioe);
            }
        }
    }
View Full Code Here

Examples of org.apache.commons.digester.plugins.PluginException

        try {
            // load the plugin class object
            ruleClass =
                digester.getClassLoader().loadClass(ruleClassName);
        } catch(ClassNotFoundException cnfe) {
            throw new PluginException(
                "Unable to load class " + ruleClassName, cnfe);
        }

        return new LoaderFromClass(ruleClass, methodName);
    }
View Full Code Here

Examples of org.apache.commons.digester3.plugins.PluginException

        {
            is = new FileInputStream( rulesFileName );
        }
        catch ( IOException ioe )
        {
            throw new PluginException( "Unable to process file [" + rulesFileName + "]", ioe );
        }

        try
        {
            RuleLoader loader = new LoaderFromStream( is );
            return loader;
        }
        catch ( Exception e )
        {
            throw new PluginException( "Unable to load xmlrules from file [" + rulesFileName + "]", e );
        }
        finally
        {
            try
            {
                is.close();
            }
            catch ( IOException ioe )
            {
                throw new PluginException( "Unable to close stream for file [" + rulesFileName + "]", ioe );
            }
        }
    }
View Full Code Here

Examples of org.apache.wiki.api.exceptions.PluginException

        // String map     = getCleanParameter( params, PARAM_MAP );
        String border  = getCleanParameter( params, PARAM_BORDER );

        if( src == null )
        {
            throw new PluginException("Parameter 'src' is required for Image plugin");
        }

        if( cssclass == null ) cssclass = "imageplugin";

        if( target != null && !validTargetValue(target) )
        {
            target = null; // not a valid value so ignore
        }

        try
        {
            AttachmentManager mgr = engine.getAttachmentManager();
            Attachment        att = mgr.getAttachmentInfo( context, src );

            if( att != null )
            {
                src = context.getURL( WikiContext.ATTACH, att.getName() );
            }
        }
        catch( ProviderException e )
        {
            throw new PluginException( "Attachment info failed: "+e.getMessage() );
        }

        StringBuffer result = new StringBuffer();

        result.append( "<table border=\"0\" class=\""+cssclass+"\"" );
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.