Package com.salesforce.ide.core.model

Examples of com.salesforce.ide.core.model.Component


        }

        ApexComponentWizardComposite apexComponentWizardComposite =
                (ApexComponentWizardComposite) componentWizardComposite;
        ApexComponentModel apexComponentWizardModel = (ApexComponentModel) componentWizard.getComponentWizardModel();
        Component component = apexComponentWizardModel.getComponent();

        // create metadata instance and save metadata input values
        com.salesforce.ide.api.metadata.types.ApexComponent apexComponent =
                (com.salesforce.ide.api.metadata.types.ApexComponent) component.getDefaultMetadataExtInstance();
        apexComponent.setLabel(apexComponentWizardComposite.getLabelString());

        if (logger.isDebugEnabled()) {
            logger.debug("Loaded '" + apexComponent.getClass().getName() + "' with user input");
        }
View Full Code Here


        return componentWizardComposite.getComponentName();
    }

    @Override
    public void createComposite(Composite parent) {
        Component component = componentWizard.getComponentController().getComponent();
        componentWizardComposite = new WorkflowWizardComposite(parent, SWT.NULL, component.getDisplayName());
        componentWizardComposite.setComponentWizardPage(this);
    }
View Full Code Here

            throw new IllegalArgumentException("Component composite cannot be null");
        }

        WorkflowWizardComposite workflowWizardComposite = (WorkflowWizardComposite) componentWizardComposite;
        WorkflowModel workflowWizardModel = (WorkflowModel) componentWizard.getComponentWizardModel();
        Component component = workflowWizardModel.getComponent();

        // create metadata instance and save metadata input values
        com.salesforce.ide.api.metadata.types.Workflow workflow =
                (com.salesforce.ide.api.metadata.types.Workflow) component.getDefaultMetadataExtInstance();
        workflow.setFullName(workflowWizardComposite.getCmbObjects().getText());
        workflowWizardModel.setFullName(workflowWizardComposite.getCmbObjects().getText());

        if (logger.isDebugEnabled()) {
            logger.debug("Created and loaded instance of '" + workflow.getClass().getName() + "' with user input");
View Full Code Here

        factoryLocator.getPackageManifestFactory().sort(types);
        // REVIEW ME: instead of fire listMetadata call per type, maybe we can
        // aggregate the calls into one - fchang
        for (PackageTypeMembers typeStanza : types) {
            // get component for display name purposes
            Component component = null;
            try {
                if (factoryLocator.getComponentFactory().isRegisteredComponentType(typeStanza.getName())) {
                    component = factoryLocator.getComponentFactory().getComponentByComponentType(typeStanza.getName());
                }
            } catch (FactoryException e) {
                logger.warn("Unable to get component for component type '" + typeStanza.getName() + "'", e);
            }

            // if display name not available, use type name
            String name = null;
            if (component == null) {
                name = typeStanza.getName();
                logger.warn("Unable to get display name for component type '" + name + "'");
            } else {
                name = component.getDisplayName();
            }

            // handle parents with children - placing children within the parent
            // stanza except
            // when subtype parent isn't explicit list in manifest. this this
            // case we list component
            // separately under it's component types
            if (Utils.isNotEmpty(childComponentTypes) && childComponentTypes.contains(typeStanza.getName())) {
                handleChildTypeSummary(summaries, packageManifest, typeStanza, name);
            } else if (component != null && Constants.CUSTOM_OBJECT.equals(component.getComponentType())) {
                generateObjectsSummary(summaries, packageManifestModel, packageManifest, typeStanza, component);
            } else {
                // resulting summary text
                StringBuffer summary = new StringBuffer();
View Full Code Here

            summaries.add(customObjectSummary + Constants.NEW_LINE);
        }

        // handle standard objects - displayed right after custom objects
        try {
            Component standardObjectComponent =
                    factoryLocator.getComponentFactory().getComponentByComponentType(Constants.STANDARD_OBJECT);
            if (standardObjectComponent != null) {
                String standardObjectSummary =
                        generateObjectChildrenSummary(standardObjectComponent, typeStanza, packageManifestModel,
                            packageManifest, getStandardObjectComponentValidator());
View Full Code Here

            // which are placed on their parents
            if (Utils.isNotEmpty(childComponentTypes) && childComponentTypes.contains(componentType)) {
                continue;
            }

            Component component = null;
            try {
                if (factoryLocator.getComponentFactory().isRegisteredComponentType(componentType)) {
                    component = factoryLocator.getComponentFactory().getComponentByComponentType(componentType);
                }
            } catch (FactoryException e) {
                logger.warn("Unable to get component for component type '" + componentType + "'", e);
            }

            Set<String> members = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
            String name = componentType;
            if (component == null) {
                name = componentType;
                logger.warn("Unable to get display name for component type '" + name + "'");

                // add subscribe if selected
                if (subscribe) {
                    members.add(Constants.SUBSCRIBE_TO_ALL);
                }
            } else {
                name = component.getDisplayName();

                // add subscribe if selected
                if (subscribe && component.isWildCardSupported()) {
                    members.add(Constants.SUBSCRIBE_TO_ALL);
                }
            }

            FileProperties[] filePropertiesArray =
View Full Code Here

        return componentWizardComposite.getComponentName();
    }

    @Override
    public void createComposite(Composite parent) {
        Component component = componentWizard.getComponentController().getComponent();
        componentWizardComposite = new CustomObjectWizardComposite(parent, SWT.NULL, component.getDisplayName());
        componentWizardComposite.setComponentWizardPage(this);
    }
View Full Code Here

        }

        CustomObjectWizardComposite customObjectWizardComposite =
                (CustomObjectWizardComposite) componentWizardComposite;
        CustomObjectModel customObjectWizardModel = (CustomObjectModel) componentWizard.getComponentWizardModel();
        Component component = customObjectWizardModel.getComponent();

        // create metadata instance and save metadata input values
        com.salesforce.ide.api.metadata.types.CustomObject customObject =
                (com.salesforce.ide.api.metadata.types.CustomObject) component.getDefaultMetadataExtInstance();
        customObject.setLabel(customObjectWizardComposite.getLabelString());
        String plural =
                Utils.isNotEmpty(customObjectWizardComposite.getPluralLabelString()) ? customObjectWizardComposite
                        .getPluralLabelString() : Utils.getPlural(customObjectWizardComposite.getLabelString());
        customObject.setPluralLabel(plural);
View Full Code Here

        return componentWizardComposite.getComponentName();
    }

    @Override
    public void createComposite(Composite parent) {
        Component component = componentWizard.getComponentController().getComponent();
        componentWizardComposite =
                new ApexClassWizardComposite(parent, SWT.NULL, component.getDisplayName(), component
                        .getSupportedApiVersions(), component.getTemplateNames(true));
        componentWizardComposite.setComponentWizardPage(this);
        selectCombo(componentWizardComposite.getCmbTemplateNames(), Constants.DEFAULT_TEMPLATE_NAME);
    }
View Full Code Here

        }

        // nothing saved to metadata instance at this time
        ApexClassWizardComposite apexClassWizardComposite = (ApexClassWizardComposite) componentWizardComposite;
        ApexClassModel apexClassModel = (ApexClassModel) componentWizard.getComponentWizardModel();
        Component component = apexClassModel.getComponent();

        // from given template name, macro-sub vars and save body
        String templateName = apexClassWizardComposite.getCmbTemplateNamesName();
        component.setBodyFromTemplateName(templateName);
    }
View Full Code Here

TOP

Related Classes of com.salesforce.ide.core.model.Component

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.