Package org.objectstyle.wolips.bindings.api

Examples of org.objectstyle.wolips.bindings.api.IApiBinding


    }

    public void widgetSelected(SelectionEvent event) {
      MenuItem item = (MenuItem) event.widget;
      item.setImage(ComponenteditorPlugin.getDefault().getImage(ComponenteditorPlugin.CONNECTED_ICON));
      IApiBinding apiBinding = (IApiBinding) item.getData();
      RefactoringWodElement refactoringWodElement = new RefactoringWodElement(_wodElement, _cache);
      try {
        refactoringWodElement.setValueForBinding(_droppedKeyPath, apiBinding.getName());
      } catch (Exception e) {
        e.printStackTrace();
        ComponenteditorPlugin.getDefault().log("Failed to add binding.", e);
      }
    }
View Full Code Here


  public String getText(Object element) {
    return getColumnText(element, _column);
  }

  public String getColumnText(Object element, int columnIndex) {
    IApiBinding apiBinding = (IApiBinding) element;
    String text = null;
    if (columnIndex == 0) {
      text = apiBinding.getName();
    } else if (columnIndex == 1) {
      IWodBinding wodBinding = _wodElement.getBindingNamed(apiBinding.getName());
      if (wodBinding != null) {
        text = wodBinding.getValue();
      }
    }
    return text;
View Full Code Here

    return getForeground(element, _column);
  }

  public Color getForeground(Object element, int columnIndex) {
    Color color = null;
    IApiBinding apiBinding = (IApiBinding) element;
    if (WodModelUtils.hasValidationProblem(apiBinding, _problems)) {
      color = Display.getCurrent().getSystemColor(SWT.COLOR_RED);
    }
    return color;
  }
View Full Code Here

      _selectionChanging = true;
      try {
        if (event.getSource() == _browser) {
          // IGNORE
        } else {
          IApiBinding apiBinding = (IApiBinding) ((IStructuredSelection) event.getSelection()).getFirstElement();
          boolean keyPathSelected = false;
          if (apiBinding != null) {
            IWodElement element = _inspector.getWodElement();
            if (element != null) {
              IWodBinding wodBinding = element.getBindingNamed(apiBinding.getName());
              if (wodBinding != null) {
                if (wodBinding.isKeyPath()) {
                  String value = wodBinding.getValue();
                  _browser.setSelection(new StructuredSelection(value));
                  keyPathSelected = true;
View Full Code Here

    return "[" + getClass().getName() + ": name = " + getName() + "; value = " + getValue() + "]";
  }

  public List<WodProblem> getBindingProblems(String elementType, IType javaFileType, TypeCache typeCache, HtmlElementCache htmlCache) throws JavaModelException, ApiModelException {
    List<WodProblem> problems = new LinkedList<WodProblem>();
    IApiBinding apiBinding = null;
    IWodElement element = null;
    if (elementType != null) {
      element = new SimpleWodElement("_temp", elementType);
      Wo wo = element.getApi(javaFileType.getJavaProject(), typeCache);
      if (wo != null) {
View Full Code Here

    if (checkBindingValues && javaFileType != null) {
      Iterator<IWodBinding> bindingsIter = getBindings().iterator();
      while (bindingsIter.hasNext()) {
        IWodBinding binding = bindingsIter.next();
        try {
          IApiBinding apiBinding = null;
          if (wo != null) {
            apiBinding = wo.getBinding(binding.getName());
          }
          binding.fillInBindingProblems(this, apiBinding, javaProject, javaFileType, problems, typeCache, htmlCache);
        }
View Full Code Here

TOP

Related Classes of org.objectstyle.wolips.bindings.api.IApiBinding

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.