Package org.objectstyle.wolips.bindings.wod

Examples of org.objectstyle.wolips.bindings.wod.BindingValueKey


      _keysViewer.setInput(_bindingValueKeys);
    }
  }
 
  public BindingValueKey getBindingValueKeyStartingWith(String partialKeyPath) {
    BindingValueKey matchingKey = null;
    for (Object keyObj : _bindingValueKeys) {
      if (keyObj instanceof BindingValueKey) {
        BindingValueKey key = (BindingValueKey)keyObj;
        if (key.getBindingName().startsWith(partialKeyPath)) {
          matchingKey = key;
          break;
        }
      }
    }
View Full Code Here


  }

  public String getSelectedKeyPath() {
    String keyPath;
    if (_browser == null) {
      BindingValueKey bindingValueKey = getSelectedKey();
      if (bindingValueKey == null) {
        keyPath = null;
      } else {
        keyPath = bindingValueKey.getBindingName();
      }
    } else {
      keyPath = _browser.getSelectedKeyPath();
    }
    return keyPath;
View Full Code Here

    }
    return keyPath;
  }

  public BindingValueKey getSelectedKey() {
    BindingValueKey selectedKey = null;
    IStructuredSelection selection = (IStructuredSelection) getSelection();
    if (selection != null) {
      Object selectedObject = selection.getFirstElement();
      if (selectedObject instanceof BindingValueKey) {
        selectedKey = (BindingValueKey) selectedObject;
View Full Code Here

    WOBrowserColumn selectedColumn = (WOBrowserColumn) event.getSource();

    IStructuredSelection selection = (IStructuredSelection) event.getSelection();
    Object selectedObject = selection.getFirstElement();
    if (selectedObject instanceof BindingValueKey) {
      BindingValueKey selectedKey = (BindingValueKey) selectedObject;
      selectKeyInColumn(selectedKey, selectedColumn);
    }
    else {
      selectKeyInColumn(null, selectedColumn);
    }
View Full Code Here

  }

  public String getSelectedKeyPath(WOBrowserColumn throughColumn) {
    StringBuffer keyPath = new StringBuffer();
    for (WOBrowserColumn column : _columns) {
      BindingValueKey key = column.getSelectedKey();
      if (key != null) {
        if (keyPath.length() > 0) {
          keyPath.append('.');
        }
        keyPath.append(key.getBindingName());
        if (throughColumn == column) {
          break;
        }
      }
    }
View Full Code Here

  protected void selectFromKeyBuffer() {
    if (_keypathBuffer.length() > 0) {
      WOBrowserColumn focusedColumn = getFocusedColumn();
      if (focusedColumn != null) {
        BindingValueKey matchingKey = focusedColumn.getBindingValueKeyStartingWith(_keypathBuffer.toString());
        disposeToColumn(focusedColumn);
        if (matchingKey != null) {
          focusedColumn.setSelection(new StructuredSelection(matchingKey));
        }
      }
View Full Code Here

        // image = ComponenteditorPlugin.getDefault().getImage(ComponenteditorPlugin.COMPONENT_ICON);
      }
    }
    else if (columnIndex == 1) {
      if (element instanceof BindingValueKey) {
        BindingValueKey bindingValueKey = (BindingValueKey) element;
        if (bindingValueKey != null) {
          try {
            if (!bindingValueKey.isLeaf()) {
              image = ComponenteditorPlugin.getDefault().getImage(ComponenteditorPlugin.TO_ONE_ICON);
            }
          } catch (JavaModelException e) {
            e.printStackTrace();
          }
View Full Code Here

  public String getColumnText(Object element, int columnIndex) {
    String text = null;
    if (columnIndex == 0) {
      if (element instanceof BindingValueKey) {
        BindingValueKey bindingValueKey = (BindingValueKey) element;
        if (bindingValueKey != null) {
          StringBuffer nameBuffer = new StringBuffer();
          IType declaringType = bindingValueKey.getDeclaringType();
          if (declaringType != null && _type != null && !_type.equals(declaringType)) {
            nameBuffer.append("    ");
          }
          nameBuffer.append(bindingValueKey.getBindingName());
          int minWidth = 40;
          if (text != null && text.length() < minWidth) {
            for (int i = text.length(); i < minWidth; i++) {
              nameBuffer.append(' ');
            }
View Full Code Here

    try {
      IType elementType = BindingReflectionUtils.findElementType(_javaProject, _elementTypeName, false, _cache);
      if (elementType != null) {
        BindingValueKeyPath bindingValueKeyPath = new BindingValueKeyPath(_bindingName, elementType, elementType.getJavaProject(), WodParserCache.getTypeCache());
        if (bindingValueKeyPath.isValid()) {
          BindingValueKey lastKey = bindingValueKeyPath.getLastBindingKey();
          if (lastKey != null) {
            IMember member = lastKey.getBindingMember();
            if (member != null) {
              JavaUI.openInEditor(member, true, true);
            }
            else {
              JavaUI.openInEditor(elementType, true, true);
View Full Code Here

          }
        }

        for (String additionalProposal : additionalProposals) {
          if (additionalProposal.startsWith(nameStartingWith)) {
            BindingValueKey additionalKey = new BindingValueKey(additionalProposal, null, null, javaProject, cache);
            // MS: this is a hack to prevent NPE's because we don't know the next type right now ...
            //additionalKey.setNextType(nextType);
            bindingKeys.add(additionalKey);
          }
        }
View Full Code Here

TOP

Related Classes of org.objectstyle.wolips.bindings.wod.BindingValueKey

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.