Package com.salesforce.ide.core.project

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


    }

    @Override
    public void setVisible(boolean visible) {
        if (visible) {
            ProjectModel projectModel = getProjectController().getProjectModel();
            ForceProject forceProject = getProjectService().getForceProject(getProject());
            projectModel.setForceProject(forceProject);
            projectModel.getPackageManifestModel().setProject(getProject());

            // get package manifest file to tell pme where cache exists
            IFile packageManifestFile =
                    ContainerDelegate.getInstance().getServiceLocator().getProjectService().getPackageManifestFactory().getPackageManifestFile(getProject());
            projectModel.getPackageManifestModel().setPackageManifestFile(packageManifestFile);

            // set cache, may not exists
            Document packageManifestCache = Utils.loadDocument(Utils.getCacheUrl(getProject()));
            if (packageManifestCache != null) {
                projectModel.getPackageManifestModel().setManifestCache(packageManifestCache);
            }

            // load project manifest
            Package packageManifest = null;
            try {
                packageManifest =
                        ContainerDelegate.getInstance().getFactoryLocator().getPackageManifestFactory().getPackageManifestFromFile(packageManifestFile);
                projectModel.getPackageManifestModel().setPackageManifest(packageManifest);

                Document packageManifestDoc =
                        ContainerDelegate.getInstance().getServiceLocator().getProjectService().getPackageManifestFactory().getPackageManifestDOMDocument(getProject());
                projectModel.getPackageManifestModel().setManifestDocument(packageManifestDoc);
            } catch (FileNotFoundException e) {
                String errorMsg =
                        Messages.getString("ProjectProperties.ProjectContent.ContentSummary.JaxbException.message");
                logger.error(errorMsg, e);
                enableApplyButton(false);
View Full Code Here


        super.setVisible(visible);
    }

    private void refreshManifestObjects() {
        ProjectModel projectModel = getProjectController().getProjectModel();

        // update package manifest w/ selected items
        try {
            Document manifestDocument =
                    getProjectController().getProjectModel().getPackageManifestModel().getManifestDocument();
            Package packageManifest =
                ContainerDelegate.getInstance().getFactoryLocator().getPackageManifestFactory().createPackageManifest(manifestDocument);
            projectModel.getPackageManifestModel().setPackageManifest(packageManifest);
        } catch (JAXBException je) {
            String errorMsg =
                    Messages.getString("ProjectProperties.ProjectContent.ContentSummary.JaxbException.message");
            logger.error(errorMsg, je);
            Utils.openError(je, true, errorMsg
                    + ", please make sure package manifest is well-form and present in proper location.");
        }

        // refresh cache, may not have exists during initial opening
        Document packageManifestCache = Utils.loadDocument(Utils.getCacheUrl(getProject()));
        if (packageManifestCache != null) {
            projectModel.getPackageManifestModel().setManifestCache(packageManifestCache);
        }
    }
View Full Code Here

        setValid(true);
    }

    public void saveUserInput() {
        ProjectModel projectModel = projectController.getProjectModel();
        saveProjectUserInput(projectModel.getForceProject(), projectPropertiesComposite, getSalesforceEndpoints());
        String environment = projectPropertiesComposite.getCmbEnvironmentString();
        projectModel.setEnvironment(environment);
        projectModel.setProjectName(projectPropertiesComposite.getTxtProjectNameString());
    }
View Full Code Here

        WorkspaceModifyOperation applyNatureOperation = new WorkspaceModifyOperation() {
            @Override
            protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException,
            InterruptedException {

                ProjectModel projectModel = new ProjectModel(project);
                projectModel.setContentSelection(ProjectController.NONE);
                projectController.setModel(projectModel);

                monitor.beginTask("Applying Force.com Nature", 4);

                try {
View Full Code Here

        super(projectController);
    }

    public void update(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException,
            ForceConnectionException, ForceProjectException, InsufficientPermissionsException {
        ProjectModel projectModel = projectController.getProjectModel();
        ForceProject updatedProject = projectModel.getForceProject();
        IProject project = projectModel.getProject();
        ForceProject existingProject = ContainerDelegate.getInstance().getServiceLocator().getProjectService().getForceProject(project);

        if (existingProject.isOrgChange(updatedProject)) {
            ContainerDelegate.getInstance().getFactoryLocator().getConnectionFactory().removeConnection(existingProject);
            ContainerDelegate.getInstance().getFactoryLocator().getMetadataFactory().removeMetadataStubExt(existingProject);
View Full Code Here

TOP

Related Classes of com.salesforce.ide.core.project.ProjectModel

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.