Java 类org.eclipse.ui.views.properties.ComboBoxLabelProvider 实例源码

项目:seg.jUCMNav    文件:ProgressTests.java   
/**
 * Test #2 for requirement ReqCompCompBind
 * 
 * Author: jkealey
 */
public void testReqCompCompBind2() {
    testReqCompCompBind1();
    ComponentRef parent = (ComponentRef) getMap().getContRefs().get(1);
    ((Component) parent.getContDef()).setName("ParentTest"); //$NON-NLS-1$

    // create a property source on the small component ref
    ComponentRef cr = (ComponentRef) getMap().getContRefs().get(2);

    Vector v = getAttributeDescriptor(cr, "parent"); //$NON-NLS-1$
    String[] values = ((ComboBoxLabelProvider) ((ComboBoxPropertyDescriptor) v.get(0)).getLabelProvider()).getValues();
    assertEquals("Parent not option in property values", "ParentTest (14)", values[2]); //$NON-NLS-1$ //$NON-NLS-2$
}
项目:seg.jUCMNav    文件:ProgressTests.java   
/**
 * Test #2 for requirement ReqCompCompUnbind
 * 
 * Author:
 */
public void testReqCompCompUnbind2() {
    testReqCompCompBind1();
    ComponentRef parent = (ComponentRef) getMap().getContRefs().get(1);
    ((Component) parent.getContDef()).setName("ParentTest"); //$NON-NLS-1$

    // create a property source on the large component ref
    Vector v = getAttributeDescriptor(parent, "parent"); //$NON-NLS-1$
    String[] values = ((ComboBoxLabelProvider) ((ComboBoxPropertyDescriptor) v.get(0)).getLabelProvider()).getValues();
    assertTrue("No unbind option in list", Messages.getString("URNElementPropertySource.unbound").equals(values[0])); //$NON-NLS-1$ //$NON-NLS-2$
}
项目:seg.jUCMNav    文件:ProgressTests.java   
/**
 * Test #2 for requirement ReqCompPathBind
 * 
 * Author: jkealey
 */
public void testReqCompPathBind2() {
    testReqCompPathBind1();
    PathNode node = (PathNode) getMap().getNodes().get(1);
    ComponentRef parent = (ComponentRef) getMap().getContRefs().get(1);
    ((Component) parent.getContDef()).setName("ParentTest"); //$NON-NLS-1$

    Vector v = getAttributeDescriptor(node, "contRef"); //$NON-NLS-1$
    String[] values = ((ComboBoxLabelProvider) ((ComboBoxPropertyDescriptor) v.get(0)).getLabelProvider()).getValues();
    assertEquals("Parent not option in property values", "ParentTest (14)", values[2]); //$NON-NLS-1$ //$NON-NLS-2$
}
项目:seg.jUCMNav    文件:ProgressTests.java   
/**
 * Test #2 for requirement ReqCompPathUnbind
 * 
 * Author:
 */
public void testReqCompPathUnbind2() {
    testReqCompPathUnbind1();
    PathNode node = (PathNode) getMap().getNodes().get(1);
    ComponentRef parent = (ComponentRef) getMap().getContRefs().get(1);
    ((Component) parent.getContDef()).setName("ParentTest"); //$NON-NLS-1$

    Vector v = getAttributeDescriptor(node, "contRef"); //$NON-NLS-1$
    String[] values = ((ComboBoxLabelProvider) ((ComboBoxPropertyDescriptor) v.get(0)).getLabelProvider()).getValues();
    assertTrue("No unbind option in list", Messages.getString("URNElementPropertySource.unbound").equals(values[0])); //$NON-NLS-1$ //$NON-NLS-2$
}
项目:ForgedUI-Eclipse    文件:EnumPropertyDescriptor.java   
public ILabelProvider getLabelProvider() {
    if (isLabelProviderSet()) {
        return super.getLabelProvider();
    }
    return new ComboBoxLabelProvider(labels);
}
项目:q7.quality.mockups    文件:VeryCustomComboPropertyDescriptor.java   
public ILabelProvider getLabelProvider() {
    if (isLabelProviderSet()) {
        return super.getLabelProvider();
    }
    return new ComboBoxLabelProvider(labels);
}
项目:convertigo-eclipse    文件:DynamicComboBoxPropertyDescriptor.java   
/**
   * The <code>ComboBoxPropertyDescriptor</code> implementation of this 
   * <code>IPropertyDescriptor</code> method returns the value set by
   * the <code>setProvider</code> method or, if no value has been set
   * it returns a <code>ComboBoxLabelProvider</code> created from the 
   * valuesArray of this <code>ComboBoxPropertyDescriptor</code>.
   *
   * @see #setLabelProvider(ILabelProvider)
   */
  public ILabelProvider getLabelProvider() {
      if (isLabelProviderSet()) {
    return super.getLabelProvider();
}
return labelProvider = new ComboBoxLabelProvider(getTags());
  }