当前位置: 首页>>代码示例>>Java>>正文


Java TextPropertyDescriptor类代码示例

本文整理汇总了Java中org.eclipse.ui.views.properties.TextPropertyDescriptor的典型用法代码示例。如果您正苦于以下问题:Java TextPropertyDescriptor类的具体用法?Java TextPropertyDescriptor怎么用?Java TextPropertyDescriptor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TextPropertyDescriptor类属于org.eclipse.ui.views.properties包,在下文中一共展示了TextPropertyDescriptor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getPropertyDescriptors

import org.eclipse.ui.views.properties.TextPropertyDescriptor; //导入依赖的package包/类
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
	ArrayList<IPropertyDescriptor> properties = new ArrayList<IPropertyDescriptor>();
	properties.add(new TextPropertyDescriptor(TYPE, "Type"));
	if (link.getSource() instanceof ModuleOperationNode) {
		properties.add(new ComboBoxPropertyDescriptor(SINST, "Source Instance Name", getInstances((ModuleTypeNode) link.getSource().getParent())));
	} else {
		properties.add(new TextPropertyDescriptor(SINST, "Source Instance Name"));
	}
	if (link.getTarget() instanceof ModuleOperationNode) {
		properties.add(new ComboBoxPropertyDescriptor(TINST, "Target Instance Name", getInstances((ModuleTypeNode) link.getTarget().getParent())));
	} else {
		properties.add(new TextPropertyDescriptor(TINST, "Target Instance Name"));
	}
	if (link.getSource() instanceof TriggerInstanceTerminalNode || link.getTarget() instanceof TriggerInstanceTerminalNode)
		properties.add(new TextPropertyDescriptor(PERIOD, "Period"));
	return properties.toArray(new IPropertyDescriptor[0]);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:19,代码来源:LinkPropertySource.java

示例2: getPropertyDescriptors

import org.eclipse.ui.views.properties.TextPropertyDescriptor; //导入依赖的package包/类
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
	ArrayList<IPropertyDescriptor> properties = new ArrayList<IPropertyDescriptor>();
	if (node instanceof LogicalSystemNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_ID, "System Id"));
	} else if (node instanceof LogicalComputingPlatformNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_ID, "Platform Id"));
	} else if (node instanceof LogicalComputingNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_ID, "Node Id"));
		properties.add(new ComboBoxPropertyDescriptor(NodeConstants.LOG_SYS_NODE_ENDIAN, "Endianess", ENDIAN_OPTS));
		properties.add(new TextPropertyDescriptor(NodeConstants.LOG_SYS_OS_NAME, "OS Name"));
		properties.add(new TextPropertyDescriptor(NodeConstants.LOG_SYS_OS_VER, "OS Version"));
		properties.add(new TextPropertyDescriptor(NodeConstants.LOG_SYS_AVAIL_MEM_GB, "Available Memory (GB)"));
		properties.add(new TextPropertyDescriptor(NodeConstants.LOG_SYS_MOD_SWITCH_TIME, "Switch Time (�s)"));
	} else if (node instanceof LogicalProcessorsNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.LOG_SYS_PROC_NUM, "Number"));
		properties.add(new TextPropertyDescriptor(NodeConstants.LOG_SYS_PROC_TYPE, "Type"));
		properties.add(new TextPropertyDescriptor(NodeConstants.LOG_SYS_STEP_DUR, "Step Duration (ns)"));
	}
	return properties.toArray(new IPropertyDescriptor[0]);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:22,代码来源:NodePropertySource.java

示例3: getPropertyDescriptors

import org.eclipse.ui.views.properties.TextPropertyDescriptor; //导入依赖的package包/类
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
	ArrayList<IPropertyDescriptor> properties = new ArrayList<IPropertyDescriptor>();
	if (node instanceof CompositeNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.COMPOSITE_NAME, "Composite Name"));
	} else if (node instanceof ComponentNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.COMPONENT_NAME, "Component Name"));
		properties.add(new ComboBoxPropertyDescriptor(NodeConstants.COMPONENT_TYPE, "Component Type", getComponentDefs()));
	} else if (node instanceof ComponentPropertyNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_PROP, "Property Name"));
		properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_TYPE, "Type", sdtTypes));
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_VAL, "Property Value"));
	} else if (node instanceof CompositePropertyNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_PROP, "Property Name"));
		properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_TYPE, "Type", sdtTypes));
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_VAL, "Property Value"));
	} else if (node instanceof ServiceNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_INTF, "Definition"));
	} else if (node instanceof ReferenceNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_INTF, "Definition"));
	}
	return properties.toArray(new IPropertyDescriptor[0]);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:26,代码来源:NodePropertySource.java

示例4: getPropertyDescriptors

import org.eclipse.ui.views.properties.TextPropertyDescriptor; //导入依赖的package包/类
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
	List<IPropertyDescriptor> fullList = new ArrayList<IPropertyDescriptor>();
	fullList.addAll(Arrays.asList(super.getPropertyDescriptors()));
	TextPropertyDescriptor tpd = new TextPropertyDescriptor(PRP_TAB_NUM, PRP_TAB_NUM);
	tpd.setValidator(new ICellEditorValidator() {

		@Override
		public String isValid(Object value) {
			int intValue = -1;
			try {
				intValue = Integer.parseInt((String) value);
			} catch (NumberFormatException exc) {
				return "Not a number";
			}
			return (intValue >= 2) ? null : "Value must be >=  2";
		}
	});
	fullList.add(tpd);

	return fullList.toArray(new IPropertyDescriptor[fullList.size()]);
}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:23,代码来源:TabGroup.java

示例5: getPropertyDescriptors

import org.eclipse.ui.views.properties.TextPropertyDescriptor; //导入依赖的package包/类
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
	// TODO Auto-generated method stub

	TextPropertyDescriptor attr_sysId = new TextPropertyDescriptor("sysId", "sysId");
	attr_sysId.setCategory("Attributes");
	TextPropertyDescriptor attr_model = new TextPropertyDescriptor("model", "model");
	attr_model.setCategory("Attributes");
	TextPropertyDescriptor attr_version = new TextPropertyDescriptor("version", "version");
	attr_version.setCategory("Attributes");
	return new IPropertyDescriptor[]{
			attr_sysId
			,				
			attr_model
			,				
			attr_version
							
	};
}
 
开发者ID:mondo-project,项目名称:mondo-demo-wt,代码行数:20,代码来源:WTItemPropertiesSource.java

示例6: evaluationDescriptor

import org.eclipse.ui.views.properties.TextPropertyDescriptor; //导入依赖的package包/类
/**
 * @param descriptors
 * @param attr
 * @param propertyid
 */
private void evaluationDescriptor(Collection descriptors, EStructuralFeature attr, PropertyID propertyid) {
    if (attr.getName() == "evaluation") { //$NON-NLS-1$
        TextPropertyDescriptor pd = new TextPropertyDescriptor(propertyid, "evaluationLevel (100 to -100)"); //$NON-NLS-1$

        ((PropertyDescriptor) pd).setValidator(new ICellEditorValidator() {
            public String isValid(Object value) {
                int intValue = -1;
                try {
                    intValue = Integer.parseInt((String) value);
                    return null;
                } catch (NumberFormatException exc) {
                    return "Not Number"; //$NON-NLS-1$
                }
            }
        });
        pd.setCategory("Strategy"); //$NON-NLS-1$
        descriptors.add(pd);
    }
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:25,代码来源:IndicatorPropertySource.java

示例7: intDescriptor

import org.eclipse.ui.views.properties.TextPropertyDescriptor; //导入依赖的package包/类
/**
 * int property descriptor
 * 
 * @param descriptors
 * @param attr
 * @param propertyid
 */
protected void intDescriptor(Collection descriptors, EStructuralFeature attr, PropertyID propertyid) {
    TextPropertyDescriptor desc = new TextPropertyDescriptor(propertyid, attr.getName());

    ((PropertyDescriptor) desc).setValidator(new ICellEditorValidator() {
        public String isValid(Object value) {
            int intValue = -1;
            try {
                intValue = Integer.parseInt((String) value);
                return null;
            } catch (NumberFormatException exc) {
                return Messages.getString("EObjectPropertySource.notNumber"); //$NON-NLS-1$
            }
        }
    });
    String name = attr.getName().toLowerCase();
    if (name.equals("x") || name.equals("y") || name.equals("deltax") || name.equals("deltay") || name.equals("height") || name.equals("width")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
        desc.setCategory(Messages.getString("EObjectPropertySource.appearance")); //$NON-NLS-1$
    } else if (object.eClass() != propertyid.getEClass()) {
        desc.setCategory(Messages.getString("EObjectPropertySource.reference")); //$NON-NLS-1$
    } else {
        desc.setCategory(Messages.getString("EObjectPropertySource.misc")); //$NON-NLS-1$
    }

    descriptors.add(desc);
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:33,代码来源:EObjectPropertySource.java

示例8: doubleDescriptor

import org.eclipse.ui.views.properties.TextPropertyDescriptor; //导入依赖的package包/类
/**
 * int property descriptor
 * 
 * @param descriptors
 * @param attr
 * @param propertyid
 */
protected void doubleDescriptor(Collection descriptors, EStructuralFeature attr, PropertyID propertyid) {
    TextPropertyDescriptor desc = new TextPropertyDescriptor(propertyid, attr.getName());

    ((PropertyDescriptor) desc).setValidator(new ICellEditorValidator() {
        public String isValid(Object value) {
            double doubleValue = -1;
            try {
                doubleValue = Double.parseDouble(value.toString());
                return null;
            } catch (NumberFormatException exc) {
                return Messages.getString("EObjectPropertySource.notValidNumber"); //$NON-NLS-1$
            }
        }
    });

    desc.setCategory(Messages.getString("EObjectPropertySource.misc")); //$NON-NLS-1$

    descriptors.add(desc);
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:27,代码来源:EObjectPropertySource.java

示例9: loadDescriptors

import org.eclipse.ui.views.properties.TextPropertyDescriptor; //导入依赖的package包/类
@Override
protected IPropertyDescriptor[] loadDescriptors() {
	IPropertyDescriptor[] propertyDescriptors = new IPropertyDescriptor[3];
	propertyDescriptors[0] = new TextPropertyDescriptor("tagname", "Column tag name");
	((PropertyDescriptor)propertyDescriptors[0]).setCategory("Configuration");
	propertyDescriptors[1] = new TextPropertyDescriptor("colxpath", "Column XPath");
	((PropertyDescriptor)propertyDescriptors[1]).setCategory("Selection");
	propertyDescriptors[2] = new ComboBoxPropertyDescriptor("extract", "Extract children", new String[]{"false","true"});
	((PropertyDescriptor)propertyDescriptors[2]).setCategory("Selection");
	return propertyDescriptors;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:12,代码来源:XMLTableDescriptionColumnTreeObject.java

示例10: loadDescriptors

import org.eclipse.ui.views.properties.TextPropertyDescriptor; //导入依赖的package包/类
@Override
protected IPropertyDescriptor[] loadDescriptors() {
	IPropertyDescriptor[] propertyDescriptors = new IPropertyDescriptor[3];
	propertyDescriptors[0] = new TextPropertyDescriptor("name", "Data tag name");
	((PropertyDescriptor)propertyDescriptors[0]).setCategory("Configuration");
	propertyDescriptors[1] = new TextPropertyDescriptor("xpath", "Data XPath");
	((PropertyDescriptor)propertyDescriptors[1]).setCategory("Selection");
	propertyDescriptors[2] = new ComboBoxPropertyDescriptor("extract", "Extract children", new String[]{"false","true"});
	((PropertyDescriptor)propertyDescriptors[2]).setCategory("Selection");
	return propertyDescriptors;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:12,代码来源:XMLRecordDescriptionRowTreeObject.java

示例11: loadDescriptors

import org.eclipse.ui.views.properties.TextPropertyDescriptor; //导入依赖的package包/类
@Override
protected IPropertyDescriptor[] loadDescriptors() {
	IPropertyDescriptor[] propertyDescriptors = new IPropertyDescriptor[2];
	propertyDescriptors[0] = new TextPropertyDescriptor("tagname", "Row tag name");
	((PropertyDescriptor)propertyDescriptors[0]).setCategory("Configuration");
	propertyDescriptors[1] = new TextPropertyDescriptor("rowxpath", "Row XPath");
	((PropertyDescriptor)propertyDescriptors[1]).setCategory("Selection");
	return propertyDescriptors;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:10,代码来源:XMLTableDescriptionRowTreeObject.java

示例12: getPropertyDescriptors

import org.eclipse.ui.views.properties.TextPropertyDescriptor; //导入依赖的package包/类
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
	ArrayList<IPropertyDescriptor> properties = new ArrayList<IPropertyDescriptor>();
	if (node instanceof DeploymentNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.DEP_LOG_SYS, "Logical System"));
		properties.add(new TextPropertyDescriptor(NodeConstants.DEP_FINAL_ASSMBL, "Final Assembly"));
	} else if (node instanceof ProtectionDomainNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
		properties.add(new ComboBoxPropertyDescriptor(NodeConstants.EXEC_ON_COMP_NODE, "Execution Computing Node", getCNNames()));
		properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_COMP_PLAT, "Execution Platform", getPCNames()));
	} else if (node instanceof ComputingNodeConfigurationNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Computing Node"));
		properties.add(new TextPropertyDescriptor(NodeConstants.COMP_NODE_SCHED_INFO, "Scheduling Information"));
	} else if (node instanceof PlatformConfigurationNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_COMP_PLAT, "Platform"));
		properties.add(new TextPropertyDescriptor(NodeConstants.PLAT_CONF_NOTIF_MAX, "Max Notifications"));
		properties.add(new TextPropertyDescriptor(NodeConstants.LOG_PLAT_MCAST_ADDR, "Multicast Address"));
		properties.add(new TextPropertyDescriptor(NodeConstants.LOG_PLAT_PORT, "Port"));
		properties.add(new TextPropertyDescriptor(NodeConstants.LOG_PLAT_ID, "Platform Id"));
	} else if (node instanceof DeployedModuleInstanceNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_COMP_NAME, "Component Instance"));
		properties.add(new TextPropertyDescriptor(NodeConstants.DEP_MOD_INST_NAME, "Module Instance"));
		properties.add(new TextPropertyDescriptor(NodeConstants.DEP_MOD_PRIORITY, "Priority"));
		properties.add(new ComboBoxPropertyDescriptor(NodeConstants.PD_NAME, "Protection Domain", getPDNames()));
	} else if (node instanceof DeployedTriggerInstanceNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_COMP_NAME, "Component Instance"));
		properties.add(new TextPropertyDescriptor(NodeConstants.DEP_TRG_INST_NAME, "Trigger Instance"));
		properties.add(new TextPropertyDescriptor(NodeConstants.DEP_TRG_PRIORITY, "Priority"));
		properties.add(new ComboBoxPropertyDescriptor(NodeConstants.PD_NAME, "Protection Domain", getPDNames()));
	}
	return properties.toArray(new IPropertyDescriptor[0]);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:33,代码来源:NodePropertySource.java

示例13: getPropertyDescriptors

import org.eclipse.ui.views.properties.TextPropertyDescriptor; //导入依赖的package包/类
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
	ArrayList<IPropertyDescriptor> properties = new ArrayList<IPropertyDescriptor>();
	if (node instanceof CompositeNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.COMPOSITE_NAME, "Composite Name"));
	} else if (node instanceof ComponentNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.COMPONENT_NAME, "Component Name"));
		properties.add(new TextPropertyDescriptor(NodeConstants.COMPONENT_TYPE, "Component Type"));
		properties.add(new ComboBoxPropertyDescriptor(NodeConstants.COMPONENT_INST, "Implementation", getComponentImpl()));
	} else if (node instanceof ComponentPropertyNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_PROP, "Property Name"));
		properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_TYPE, "Type", sdtTypes));
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_VAL, "Property Value"));
	} else if (node instanceof CompositePropertyNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_PROP, "Property Name"));
		properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_TYPE, "Type", sdtTypes));
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_VAL, "Property Value"));
	} else if (node instanceof ServiceNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_INTF, "Definition"));
	} else if (node instanceof ServiceNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_INTF, "Interface"));
	} else if (node instanceof ReferenceNode) {
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
		properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_INTF, "Interface"));
	}
	return properties.toArray(new IPropertyDescriptor[0]);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:30,代码来源:NodePropertySource.java

示例14: getPropertyDescriptors

import org.eclipse.ui.views.properties.TextPropertyDescriptor; //导入依赖的package包/类
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
	return new IPropertyDescriptor[] {
			new TextPropertyDescriptor("skill", "Skill"),
			new TextPropertyDescriptor("id", "Unique ID"),
			new TextPropertyDescriptor("hull", "Hull"),
			new TextPropertyDescriptor("shields", "Shields"),
			new CheckboxPropertyDescriptor("critical", "Critical Damage")
	};
}
 
开发者ID:NineWorlds,项目名称:xstreamer,代码行数:11,代码来源:PilotPropertySource.java

示例15: getPropertyDescriptors

import org.eclipse.ui.views.properties.TextPropertyDescriptor; //导入依赖的package包/类
public IPropertyDescriptor[] getPropertyDescriptors() {
	return new IPropertyDescriptor[] {
			new TextPropertyDescriptor("physicalName",
					ResourceString.getResourceString("label.physical.name")),
			new TextPropertyDescriptor("logicalName",
					ResourceString.getResourceString("label.logical.name")) };
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:8,代码来源:ERTablePropertySource.java


注:本文中的org.eclipse.ui.views.properties.TextPropertyDescriptor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。