类org.eclipse.ui.views.properties.PropertyDescriptor源码实例Demo

下面列出了怎么用org.eclipse.ui.views.properties.PropertyDescriptor的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: spotbugs   文件: PropertyPageAdapterFactory.java
public MarkerPropertySource(IMarker marker) {
    this.marker = marker;
    List<IPropertyDescriptor> props = new ArrayList<>();
    try {
        Map<?, ?> attributes = marker.getAttributes();
        Set<?> keySet = new TreeSet<Object>(attributes.keySet());
        for (Object object : keySet) {
            props.add(new PropertyDescriptor(object, "" + object));
        }
    } catch (CoreException e) {
        FindbugsPlugin.getDefault().logException(e, "MarkerPropertySource: marker access failed");
    }
    props.add(new PropertyDescriptor(PropId.Bug, "Bug"));
    props.add(new PropertyDescriptor(PropId.Resource, "Resource"));
    props.add(new PropertyDescriptor(PropId.Id, "Marker id"));
    props.add(new PropertyDescriptor(PropId.Type, "Marker type"));
    props.add(new PropertyDescriptor(PropId.CreationTime, "Creation time"));
    propertyDescriptors = props.toArray(new PropertyDescriptor[0]);
}
 
public IPropertyDescriptor[] getPropertyDescriptors()
{
	List<IPropertyDescriptor> result = new ArrayList<IPropertyDescriptor>();

	for (P p : getPropertyInfoSet())
	{
		PropertyDescriptor descriptor = new PropertyDescriptor(p, p.getHeader());
		String category = p.getCategory();

		if (!StringUtil.isEmpty(category))
		{
			descriptor.setCategory(category);
		}

		result.add(descriptor);
	}

	return result.toArray(new IPropertyDescriptor[result.size()]);
}
 
public IPropertyDescriptor[] getPropertyDescriptors()
{
	List<IPropertyDescriptor> result = new ArrayList<IPropertyDescriptor>();

	for (P p : getPropertyInfoSet())
	{
		PropertyDescriptor descriptor = new PropertyDescriptor(p, p.getHeader());
		String category = p.getCategory();

		if (!StringUtil.isEmpty(category))
		{
			descriptor.setCategory(category);
		}

		result.add(descriptor);
	}

	return result.toArray(new IPropertyDescriptor[result.size()]);
}
 
源代码4 项目: APICloud-Studio   文件: BaseElement.java
public IPropertyDescriptor[] getPropertyDescriptors()
{
	List<IPropertyDescriptor> result = new ArrayList<IPropertyDescriptor>();

	for (P p : getPropertyInfoSet())
	{
		PropertyDescriptor descriptor = new PropertyDescriptor(p, p.getHeader());
		String category = p.getCategory();

		if (!StringUtil.isEmpty(category))
		{
			descriptor.setCategory(category);
		}

		result.add(descriptor);
	}

	return result.toArray(new IPropertyDescriptor[result.size()]);
}
 
源代码5 项目: spotbugs   文件: PropertyPageAdapterFactory.java
public PropertySource(Object object) {
    this.object = object;
    List<IPropertyDescriptor> props = new ArrayList<>();
    List<Method> getters = getGetters(object);
    for (Method method : getters) {
        props.add(new PropertyDescriptor(method, getReadableName(method)));
    }
    propertyDescriptors = props.toArray(new PropertyDescriptor[0]);
}
 
源代码6 项目: spotbugs   文件: PropertyPageAdapterFactory.java
public ArrayPropertySource(Object[] object) {
    this.array = object;
    List<IPropertyDescriptor> props = new ArrayList<>();
    for (Object obj : array) {
        props.add(new PropertyDescriptor(obj, getDisplayName(obj)));
    }
    propertyDescriptors = props.toArray(new PropertyDescriptor[0]);
}
 
源代码7 项目: APICloud-Studio   文件: BaseNode.java
public IPropertyDescriptor[] getPropertyDescriptors()
{
	List<IPropertyDescriptor> result = new ArrayList<IPropertyDescriptor>();

	for (P p : getPropertyInfoSet())
	{
		result.add(new PropertyDescriptor(p, p.getHeader()));
	}

	return result.toArray(new IPropertyDescriptor[result.size()]);
}
 
源代码8 项目: thym   文件: CordovaPluginProperties.java
private static IPropertyDescriptor createPropertyDescriptor(String field, String label){
	PropertyDescriptor descriptor = new PropertyDescriptor(field, label);
	descriptor.setCategory("Cordova Plugin");
	descriptor.setAlwaysIncompatible(true);
	return descriptor;

	
}
 
源代码9 项目: thym   文件: CordovaPlatformProperties.java
private static IPropertyDescriptor createPropertyDescriptor(String field, String label){
	PropertyDescriptor descriptor = new PropertyDescriptor(field, label);
	descriptor.setCategory("Cordova Platform");
	descriptor.setAlwaysIncompatible(true);
	return descriptor;

	
}
 
源代码10 项目: ice   文件: PropertySource.java
/**
 * <p>
 * The default implementation that provides one property descriptor.
 * </p>
 * 
 * @return <p>
 *         The array of descriptors
 *         </p>
 * 
 * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
 */
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
	IPropertyDescriptor[] descriptors = new IPropertyDescriptor[] { new PropertyDescriptor(
			"NONE", "No property") };
	return descriptors;
}
 
 类所在包
 类方法
 同包方法