Package org.fusesource.ide.camel.model

Examples of org.fusesource.ide.camel.model.LanguageExpressionBean


        ISWTObservableValue textValue = Forms.observe(text);

        // NOTE this code only works if the LanguageExpressionBean is
        // not
        // replaced under our feet!
        final LanguageExpressionBean expression = LanguageExpressionBean.bindToNodeProperty(node, id);
        final String expressionPropertyName = "expression";
        Forms.bindBeanProperty(bindingContext, mmng, expression, expressionPropertyName, isMandatory(expression, expressionPropertyName), expressionPropertyName, textValue, text);

        String languageLabel = EditorMessages.propertiesLanguageTitle;
        toolkit.createLabel(composite, languageLabel);
        // toolkit.createSeparator(composite, SWT.SEPARATOR);

        Combo combo = new Combo(composite, SWT.NONE | SWT.BORDER);
        combo.setItems(new Languages().languageArray());
        toolkit.adapt(combo, true, true);

        ISWTObservableValue comboValue = WidgetProperties.selection().observe(combo);
        Forms.bindBeanProperty(bindingContext, mmng, expression, "language", isMandatory(expression, "language"), languageLabel, comboValue, combo);

        String language = expression.getLanguage();
        if (language == null) {
          language = CamelModelHelper.getDefaultLanguageName();
          expression.setLanguage(language);
        }

        // now lets forward property events to the node
        expression.addPropertyChangeListener(new PropertyChangeListener() {
          /*
           * (non-Javadoc)
           *
           * @see
           * java.beans.PropertyChangeListener#propertyChange(java
 
View Full Code Here


    final WritableList input = tableView.getInput();

    final Runnable addAction = new Runnable() {
      @Override
      public void run() {
        final SetHeaderDefinition sh = new SetHeaderDefinition("myHeaderName", new LanguageExpressionBean(CamelModelHelper.getDefaultLanguageName(), ""));
        final TableViewer viewer = tableView.getViewer();
        Refreshable refreshable = new Refreshable() {

          @Override
          public void refresh() {
View Full Code Here

    function = new Function1() {
      @Override
      public Object apply(Object element) {
        SetHeaderDefinition sh = DetailsSection.toSetHeaderDefinition(element);
        if (sh != null) {
          LanguageExpressionBean expression = LanguageExpressionBean.toLanguageExpressionBean(sh.getExpression());
          if (expression != null) {
            return expression.getExpression();
          }
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Expression");

    function = new Function1() {
      @Override
      public Object apply(Object element) {
        SetHeaderDefinition sh = DetailsSection.toSetHeaderDefinition(element);
        if (sh != null) {
          LanguageExpressionBean expression = LanguageExpressionBean.toLanguageExpressionBean(sh.getExpression());
          if (expression != null) {
            return expression.getLanguage();
          }
        }
        return null;
      }
    };
View Full Code Here

TOP

Related Classes of org.fusesource.ide.camel.model.LanguageExpressionBean

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.