Package org.springframework.ide.eclipse.config.ui.widgets

Examples of org.springframework.ide.eclipse.config.ui.widgets.TextAttribute


        || (WebFlowConfigSchemaConstants.ELEM_FLOW_REGISTRY.equals(elem) && (WebFlowConfigSchemaConstants.ATTR_PARENT
            .equals(attr) || WebFlowConfigSchemaConstants.ATTR_FLOW_BUILDER_SERVICES.equals(attr)))
        || (WebFlowConfigSchemaConstants.ELEM_FLOW_BUILDER_SERVICES.equals(elem) && (WebFlowConfigSchemaConstants.ATTR_VIEW_FACTORY_CREATOR
            .equals(attr) || WebFlowConfigSchemaConstants.ATTR_EXPRESSION_PARSER.equals(attr) || WebFlowConfigSchemaConstants.ATTR_CONVERSION_SERVICE
            .equals(attr)))) {
      TextAttribute attrControl = createBeanAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new BeanReferenceContentProposalProvider(
          getInput(), attr, true)));
      return true;
    }
    if (WebFlowConfigSchemaConstants.ELEM_ATTRIBUTE.equals(elem)
        && WebFlowConfigSchemaConstants.ATTR_TYPE.equals(attr)) {
      TextAttribute attrControl = createClassAttribute(client, attr, false, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new ClassContentProposalProvider(getInput(), attr,
          false)));
      return true;
    }
    if (WebFlowConfigSchemaConstants.ELEM_FLOW_BUILDER.equals(elem)
        && WebFlowConfigSchemaConstants.ATTR_CLASS.equals(attr)) {
      TextAttribute attrControl = createClassAttribute(client, attr, false, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new ClassHierarchyContentProposalProvider(
          getInput(), attr, "org.springframework.webflow.engine.builder.FlowBuilder"))); //$NON-NLS-1$
      return true;
    }
View Full Code Here


  }

  @Override
  protected boolean addCustomAttribute(Composite client, String attr, boolean required) {
    if (IntegrationSchemaConstants.ATTR_DATATYPE.equals(attr)) {
      TextAttribute attrControl = createClassAttribute(client, attr, true, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new ClassContentProposalProvider(getInput(), attr)));
      return true;
    }
    return super.addCustomAttribute(client, attr, required);
View Full Code Here

  @Override
  protected boolean addCustomAttribute(Composite client, String attr, boolean required) {
    // BeansContentAssistProcessor and BeansHyperlinkDetector
    String elem = getInput().getLocalName();
    if (BeansSchemaConstants.ELEM_BEAN.equals(elem) && BeansSchemaConstants.ATTR_CLASS.equals(attr)) {
      TextAttribute attrControl = createClassAttribute(client, attr, false, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new ClassContentProposalProvider(getInput(), attr,
          false)));
      return true;
    }
    if ((BeansSchemaConstants.ELEM_CONSTRUCTOR_ARG.equals(elem) && BeansSchemaConstants.ATTR_TYPE.equals(attr))
        || (BeansSchemaConstants.ELEM_ARG_TYPE.equals(elem) && BeansSchemaConstants.ATTR_MATCH.equals(attr))
        || (BeansSchemaConstants.ELEM_VALUE.equals(elem) && BeansSchemaConstants.ATTR_TYPE.equals(attr))
        || BeansSchemaConstants.ATTR_VALUE_TYPE.equals(attr) || BeansSchemaConstants.ATTR_KEY_TYPE.equals(attr)) {
      TextAttribute attrControl = createClassAttribute(client, attr, true, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new ClassContentProposalProvider(getInput(), attr)));
      return true;
    }
    if (BeansSchemaConstants.ELEM_PROPERTY.equals(elem) && BeansSchemaConstants.ATTR_REF.equals(attr)) {
      TextAttribute attrControl = createBeanAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new PropertyBeanReferenceContentProposalProvider(
          getInput(), attr)));
      return true;
    }
    if ((BeansSchemaConstants.ELEM_BEAN.equals(elem) && (BeansSchemaConstants.ATTR_PARENT.equals(attr)
        || BeansSchemaConstants.ATTR_DEPENDS_ON.equals(attr) || BeansSchemaConstants.ATTR_FACTORY_BEAN
        .equals(attr)))
        || (BeansSchemaConstants.ELEM_REF.equals(elem) && BeansSchemaConstants.ATTR_BEAN.equals(attr))
        || (BeansSchemaConstants.ELEM_IDREF.equals(elem) && BeansSchemaConstants.ATTR_BEAN.equals(attr))
        || (BeansSchemaConstants.ELEM_CONSTRUCTOR_ARG.equals(elem) && BeansSchemaConstants.ATTR_REF
            .equals(attr))
        || (BeansSchemaConstants.ELEM_ALIAS.equals(elem) && BeansSchemaConstants.ATTR_NAME.equals(attr))
        || (BeansSchemaConstants.ELEM_REPLACED_METHOD.equals(elem) && BeansSchemaConstants.ATTR_REPLACER
            .equals(attr))
        || (BeansSchemaConstants.ELEM_ENTRY.equals(elem) && (BeansSchemaConstants.ATTR_VALUE_REF.equals(attr) || BeansSchemaConstants.ATTR_KEY_REF
            .equals(attr)))
        || (BeansSchemaConstants.ELEM_LOOKUP_METHOD.equals(elem) && BeansSchemaConstants.ATTR_BEAN.equals(attr))) {
      TextAttribute attrControl = createBeanAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new BeanReferenceContentProposalProvider(
          getInput(), attr)));
      return true;
    }
    if ((BeansSchemaConstants.ELEM_REF.equals(elem) && BeansSchemaConstants.ATTR_LOCAL.equals(attr))
        || (BeansSchemaConstants.ELEM_IDREF.equals(elem) && BeansSchemaConstants.ATTR_LOCAL.equals(attr))) {
      TextAttribute attrControl = createBeanAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new BeanReferenceContentProposalProvider(
          getInput(), attr, false)));
      return true;
    }
    if (BeansSchemaConstants.ELEM_BEAN.equals(elem)
        && (BeansSchemaConstants.ATTR_INIT_METHOD.equals(attr) || BeansSchemaConstants.ATTR_DESTROY_METHOD
            .equals(attr))) {
      TextAttribute attrControl = createInitDestroyMethodAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new InitDestroyMethodContentProposalProvider(
          getInput(), attr)));
      return true;
    }
    if (BeansSchemaConstants.ELEM_BEAN.equals(elem) && BeansSchemaConstants.ATTR_ID.equals(attr)) {
      TextAttribute attrControl = createTextAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl,
          new BeanIdContentProposalProvider(getInput(), attr)));
      return true;
    }
    if (BeansSchemaConstants.ELEM_REPLACED_METHOD.equals(elem) && BeansSchemaConstants.ATTR_NAME.equals(attr)) {
      TextAttribute attrControl = createLookupReplaceMethodAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new ReplaceMethodContentProposalProvider(
          getInput(), attr)));
      return true;
    }
    if (BeansSchemaConstants.ELEM_LOOKUP_METHOD.equals(elem) && BeansSchemaConstants.ATTR_NAME.equals(attr)) {
      TextAttribute attrControl = createLookupReplaceMethodAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new LookupMethodContentProposalProvider(
          getInput(), attr)));
      return true;
    }
    if (BeansSchemaConstants.ELEM_PROPERTY.equals(elem) && BeansSchemaConstants.ATTR_NAME.equals(attr)) {
      TextAttribute attrControl = createPropertyNameAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new PropertyNameContentProposalProvider(
          getInput(), attr)));
      return true;
    }
    if (BeansSchemaConstants.ELEM_PROPERTY.equals(elem) && BeansSchemaConstants.ATTR_VALUE.equals(attr)) {
      TextAttribute attrControl = createClassAttribute(client, attr, false, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new PropertyValueContentProposalProvider(
          getInput(), attr)));
      return true;
    }
    if (BeansSchemaConstants.ELEM_BEAN.equals(elem) && BeansSchemaConstants.ATTR_FACTORY_METHOD.equals(attr)) {
      TextAttribute attrControl = createFactoryMethodAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new FactoryMethodContentProposalProvider(
          getInput(), attr)));
      return true;
    }
    if (BeansSchemaConstants.ELEM_BEAN.equals(elem) && BeansSchemaConstants.ATTR_SCOPE.equals(attr)) {
      ComboAttribute attrControl = createComboAttribute(client, attr, new String[] {}, required);
      addWidget(attrControl);
      addAdapter(new ComboAttributeProposalAdapter(attrControl,
          new ScopeContentProposalProvider(getInput(), attr)));
      return true;
    }
    if (BeansSchemaConstants.ELEM_IMPORT.equals(elem) && BeansSchemaConstants.ATTR_RESOURCE.equals(attr)) {
      TextAttribute attrControl = createImportAttribute(client, attr, required);
      addWidget(attrControl);
      return true;
    }
    return super.addCustomAttribute(client, attr, required);
  }
View Full Code Here

        || SecuritySchemaConstants.ATTR_USER_SERVICE_REF.equals(attr)
        || SecuritySchemaConstants.ATTR_TOKEN_REPOSITORY_REF.equals(attr)
        || SecuritySchemaConstants.ATTR_DATA_SOURCE_REF.equals(attr)
        || SecuritySchemaConstants.ATTR_SERVER_REF.equals(attr)
        || SecuritySchemaConstants.ATTR_CACHE_REF.equals(attr) || SecuritySchemaConstants.ATTR_REF.equals(attr)) {
      TextAttribute attrControl = createBeanAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new BeanReferenceContentProposalProvider(
          getInput(), attr, true)));
      return true;
    }
View Full Code Here

  @Override
  protected boolean addCustomAttribute(Composite client, String attr, boolean required) {
    // UtilContentAssistProcessor and UtilHyperlinkDetector
    String elem = getInput().getLocalName();
    if (UtilSchemaConstants.ATTR_LIST_CLASS.equals(attr)) {
      TextAttribute attrControl = createClassAttribute(client, attr, true, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new ClassHierarchyContentProposalProvider(
          getInput(), attr, List.class.getName())));
      return true;
    }
    if (UtilSchemaConstants.ATTR_MAP_CLASS.equals(attr)) {
      TextAttribute attrControl = createClassAttribute(client, attr, true, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new ClassHierarchyContentProposalProvider(
          getInput(), attr, Map.class.getName())));
      return true;
    }
    if (UtilSchemaConstants.ATTR_SET_CLASS.equals(attr)) {
      TextAttribute attrControl = createClassAttribute(client, attr, true, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new ClassHierarchyContentProposalProvider(
          getInput(), attr, Set.class.getName())));
      return true;
    }
    if (UtilSchemaConstants.ATTR_VALUE_TYPE.equals(attr) || UtilSchemaConstants.ATTR_KEY_TYPE.equals(attr)) {
      TextAttribute attrControl = createClassAttribute(client, attr, false, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new ClassContentProposalProvider(getInput(), attr,
          false)));
      return true;
    }
    if (UtilSchemaConstants.ELEM_CONSTANT.equals(elem) && UtilSchemaConstants.ATTR_STATIC_FIELD.equals(attr)) {
      TextAttribute attrControl = createFieldAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new FieldContentProposalProvider(getInput(), attr)));
      return true;
    }
    return super.addCustomAttribute(client, attr, required);
View Full Code Here

    // ContextContentAssistProcessor and ContextHyperlinkDetector
    String elem = getInput().getLocalName();
    if (ContextSchemaConstants.ELEM_COMPONENT_SCAN.equals(elem)
        && (ContextSchemaConstants.ATTR_NAME_GENERATOR.equals(attr) || ContextSchemaConstants.ATTR_SCOPE_RESOLVER
            .equals(attr))) {
      TextAttribute attrControl = createBeanAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new BeanReferenceContentProposalProvider(
          getInput(), attr, true)));
      return true;
    }
    if (ContextSchemaConstants.ELEM_LOAD_TIME_WEAVER.equals(elem)
        && ContextSchemaConstants.ATTR_WEAVER_CLASS.equals(attr)) {
      TextAttribute attrControl = createClassAttribute(client, attr, true, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new ClassHierarchyContentProposalProvider(
          getInput(), attr, "org.springframework.instrument.classloading.LoadTimeWeaver"))); //$NON-NLS-1$
      return true;
    }
    if (ContextSchemaConstants.ELEM_COMPONENT_SCAN.equals(elem)
        && ContextSchemaConstants.ATTR_BASE_PACKAGE.equals(attr)) {
      TextAttribute attrControl = createTextAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new PackageContentProposalProvider(getInput(),
          attr)));
      return true;
    }
    if ((ContextSchemaConstants.ELEM_INCLUDE_FILTER.equals(elem) || ContextSchemaConstants.ELEM_EXCLUDE_FILTER
        .equals(elem)) && ContextSchemaConstants.ATTR_EXPRESSION.equals(attr)) {
      TextAttribute attrControl = createClassAttribute(client, attr, false, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new ClassContentProposalProvider(getInput(), attr,
          false)));
      return true;
    }
View Full Code Here

   * @param attr the attribute name
   * @param required denotes whether this is a required field
   * @return {@link TextAttribute} widget set
   */
  protected TextAttribute createTextAttribute(Composite client, String attr, boolean required) {
    TextAttribute textAttr = new TextAttribute(client, toolkit, attr, required) {
      @Override
      public void modifyAttribute() {
        editAttribute(attr, text.getText());
      }

      @Override
      public void update() {
        setTextValue(text, getAttributeValue(attr));
      }
    };
    textAttr.createAttribute(2);
    return textAttr;
  }
View Full Code Here

  @Override
  protected boolean addCustomAttribute(Composite client, String attr, boolean required) {
    // LangContentAssistProcessor and LangHyperlinkDetector
    if (LangSchemaConstants.ATTR_SCRIPT_INTERFACES.equals(attr)) {
      TextAttribute attrControl = createClassAttribute(client, attr, true, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new ClassContentProposalProvider(getInput(), attr,
          true)));
      return true;
    }
    if (LangSchemaConstants.ATTR_CUSTOMIZER_REF.equals(attr)) {
      TextAttribute attrControl = createBeanAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new BeanReferenceContentProposalProvider(
          getInput(), attr, true)));
      return true;
    }
View Full Code Here

  @Override
  protected boolean addCustomAttribute(Composite client, String attr, boolean required) {
    // TxContentAssistProcessor and TxHyperlinkDetector
    if (TxSchemaConstants.ATTR_TRANSACTION_MANAGER.equals(attr)) {
      TextAttribute attrControl = createBeanAttribute(client, attr, required);
      addWidget(attrControl);
      addAdapter(new TextAttributeProposalAdapter(attrControl, new BeanReferenceContentProposalProvider(
          getInput(), attr, true)));
      return true;
    }
View Full Code Here

        NodeList children = element.getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
          Node annotation = children.item(i);
          ToolAnnotationData data = ToolAnnotationUtils.getToolAnnotationData(annotation);
          if (!widgetCreated) {
            TextAttribute attrWidget = null;
            if (data.getExpectedType() != null
                && data.getExpectedType().equalsIgnoreCase(Class.class.getName())) {
              attrWidget = createClassAttribute(client, attr, true, required);
            }
            else if (data.getKind() != null || data.getExpectedMethodType() != null
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.config.ui.widgets.TextAttribute

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.