Examples of ForceProjectException


Examples of com.salesforce.ide.core.project.ForceProjectException

        if (component == null) {
            try {
                component = componentFactory.getComponentByComponentType(getComponentType());
            } catch (FactoryException e) {
                throw new ForceProjectException(e, "Unable to init component");
            }
        }

        component.setName(getDefaultName());
        component.setPackageName(Constants.DEFAULT_PACKAGED_NAME);
        component.intiNewBody(component.getDefaultTemplateString());

        try {
            metadataExt = component.getDefaultMetadataExtInstance();
        } catch (InstantiationException e) {
            throw new ForceProjectException(e, "Unable to init wizard model");
        } catch (IllegalAccessException e) {
            throw new ForceProjectException(e, "Unable to init wizard model");
        }

        if (logger.isDebugEnabled()) {
            logger.debug("Initialized " + component.getDisplayName() + " model and component controller");
        }
View Full Code Here

Examples of com.salesforce.ide.core.project.ForceProjectException

            logger.warn("Unable to save " + getFullDisplayName() + " to file - resource is null");
            return resource;
        }

        if (getFile() == null) {
            throw new ForceProjectException("No content found for file '"
                    + resource.getProjectRelativePath().toPortableString() + "'");
        }

        // create filepath
        createParents(resource, monitor);
View Full Code Here

Examples of com.salesforce.ide.core.project.ForceProjectException

            // and if it's STILL null, abort
            if (getDeleteManifest() == null) {
                logger
                        .error("Unable to add component to delete manifest - destructive manifest is missing or cannot be "
                                + "generated for package '" + getName() + "'");
                throw new ForceProjectException(
                        "Unable to add component to delete manifest - destructive manifest is missing or cannot be "
                                + "generated for package '" + getName() + "'");
            }
        }
View Full Code Here

Examples of com.salesforce.ide.core.project.ForceProjectException

        // get stored project package list containing package(s) and component(s) to copy
        // currently, perform copy only supports processing of one candidate per time
        ProjectPackageList projectPackageList = refactorModel.getProjectPackageList();
        if (Utils.isEmpty(projectPackageList)) {
            logger.warn("Cannot perform change - project package list is null");
            throw new ForceProjectException("Cannot perform change - project package list is null");
        }

        // create new project package for destination
        ProjectPackage projectPackage =
                ContainerDelegate.getInstance().getServiceLocator().getProjectService().getProjectPackageFactory().getProjectPackage(getRefactorModel().getDestinationProject(), true);

        if (projectPackage == null) {
            throw new ForceProjectException("Cannot determine new package name");
        }

        monitorCheck(monitor);

        // add each component to new project package
View Full Code Here

Examples of com.salesforce.ide.core.project.ForceProjectException

        } catch (ForceException e) {
            boolean retry = DialogUtils.getInstance().retryConnection(e, monitor);
            if (retry) {
                saveConnection(monitor);
            } else {
                throw new ForceProjectException(e, "Unable to save connection");
            }
        }
    }
View Full Code Here

Examples of com.salesforce.ide.core.project.ForceProjectException

        } catch (ForceConnectionException e) {
            boolean retry = DialogUtils.getInstance().retryConnection(e, monitor);
            if (retry) {
                fetchComponents(monitor);
            } else {
                throw new ForceProjectException(e, "User cancelled fetch components due to connection exceptions");
            }
        } catch (ServiceTimeoutException e) {
            boolean proceed = DialogUtils.getInstance().presentCycleLimitExceptionDialog(e, monitor);
            if (proceed) {
                fetchComponents(e, monitor);
            } else {
                throw new ForceProjectException(e,
                        "User cancelled fetch components due to cycle polling limits reached");
            }
        } catch (InsufficientPermissionsException e) {
            e.setShowUpdateCredentialsMessage(false);
            DialogUtils.getInstance().presentInsufficientPermissionsDialog(e);
View Full Code Here

Examples of com.salesforce.ide.core.project.ForceProjectException

        Utils.addTraceToStatus((MultiStatus) status, th.getStackTrace(), IStatus.ERROR);
        throw new CoreException(status);
    }

    public static void throwNewForceProjectException(String string) throws ForceProjectException {
        throw new ForceProjectException(string);
    }
View Full Code Here

Examples of com.salesforce.ide.core.project.ForceProjectException

        throw new ForceProjectException(string);
    }

    public static void throwNewForceProjectException(Throwable th, String string) throws ForceProjectException {
        Throwable rootCause = ForceExceptionUtils.getRootCause(th);
        throw new ForceProjectException(rootCause, string);
    }
View Full Code Here

Examples of com.salesforce.ide.core.project.ForceProjectException

            strBuff.append(":\n\n").append(exceptionMessage).append("\n\n")
            .append(Messages.getString("General.AbortOrContinue.message"));
            int action = abortContinueMessage("Fetch Error", strBuff.toString(), MessageDialog.ERROR);
            if (action == FIRST_BUTTON) {
                logger.info("Abort remote component fetch and project creation");
                throw new ForceProjectException(ex, "Unable to fetch components");
            }
        } else {
            throw ex;
        }
    }
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.