本文整理汇总了Java中org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor.setCategory方法的典型用法代码示例。如果您正苦于以下问题:Java ComboBoxPropertyDescriptor.setCategory方法的具体用法?Java ComboBoxPropertyDescriptor.setCategory怎么用?Java ComboBoxPropertyDescriptor.setCategory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor
的用法示例。
在下文中一共展示了ComboBoxPropertyDescriptor.setCategory方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPropertyDescriptors
import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor; //导入方法依赖的package包/类
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
ComboBoxPropertyDescriptor variabilityTypeDescriptor = new ComboBoxPropertyDescriptor(
PROPERTY_ID_VARIABILITYTYPE, "Variability Type", variabilityTypes.toArray(new String[] {}));
variabilityTypeDescriptor.setCategory(CATEGORY_CHARACTERISTICS);
ComboBoxPropertyDescriptor bindingTimeDescriptor = new ComboBoxPropertyDescriptor(PROPERTY_ID_BINDINGTIME,
"Binding Time", bindingTimes.toArray(new String[] {}));
bindingTimeDescriptor.setCategory(CATEGORY_CHARACTERISTICS);
ComboBoxPropertyDescriptor extensibilityDescriptor = new ComboBoxPropertyDescriptor(PROPERTY_ID_EXTENSIBILITY,
"Extensible", extensibilities.toArray(new String[] {}));
extensibilityDescriptor.setCategory(CATEGORY_CHARACTERISTICS);
VariabilityMechanismPropertyDescriptor variabilityMechanismDescriptor = new VariabilityMechanismPropertyDescriptor(
PROPERTY_ID_VARIABILITY_MECHANISM, "Variability Mechanism");
variabilityMechanismDescriptor.setCategory(CATEGORY_REALIZATION);
return new IPropertyDescriptor[] { variabilityTypeDescriptor, bindingTimeDescriptor, extensibilityDescriptor,
variabilityMechanismDescriptor };
}
示例2: responsibilityDescriptor
import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor; //导入方法依赖的package包/类
/**
* @param descriptors
* @param attr
* @param propertyid
*/
private void responsibilityDescriptor(Collection descriptors, EStructuralFeature attr, PropertyID propertyid) {
if (((RespRef) getEditableValue()).getDiagram() == null || ((RespRef) getEditableValue()).getDiagram().getUrndefinition() == null)
return;
URNspec urn = ((RespRef) getEditableValue()).getDiagram().getUrndefinition().getUrnspec();
Vector list = new Vector(urn.getUrndef().getResponsibilities());
Collections.sort(list, new EObjectClassNameComparator());
String[] values = new String[list.size()];
for (int i = 0; i < list.size(); i++) {
values[i] = EObjectClassNameComparator.getSortableElementName((Responsibility) list.get(i));
if (values[i] == null)
values[i] = "[unnamed]"; //$NON-NLS-1$
}
ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "definition", values); //$NON-NLS-1$
pd.setCategory(Messages.getString("EObjectPropertySource.reference")); //$NON-NLS-1$
descriptors.add(pd);
}
示例3: kpiInformationElementDescriptor
import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor; //导入方法依赖的package包/类
/**
* @param descriptors
* @param attr
* @param propertyid
*/
private void kpiInformationElementDescriptor(Collection descriptors, EStructuralFeature attr, PropertyID propertyid) {
if (((KPIInformationElementRef) getEditableValue()).getDiagram().getUrndefinition() == null)
return;
URNspec urn = ((KPIInformationElementRef) getEditableValue()).getDiagram().getUrndefinition().getUrnspec();
Vector list = new Vector(urn.getGrlspec().getKpiInformationElements());
Collections.sort(list, new EObjectClassNameComparator());
String[] values = new String[list.size()];
for (int i = 0; i < list.size(); i++) {
values[i] = EObjectClassNameComparator.getSortableElementName((KPIInformationElement) list.get(i));
if (values[i] == null)
values[i] = Messages.getString("KPIInformationElementPropertySource.Unnamed"); //$NON-NLS-1$
}
ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "definition", values); //$NON-NLS-1$
pd.setCategory(Messages.getString("EObjectPropertySource.reference")); //$NON-NLS-1$
descriptors.add(pd);
}
示例4: componentElementDescriptor
import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor; //导入方法依赖的package包/类
/**
* @param descriptors
* @param attr
* @param propertyid
*/
private void componentElementDescriptor(Collection descriptors, EStructuralFeature attr, PropertyID propertyid) {
if (((IURNContainerRef) getEditableValue()).getDiagram() == null || ((IURNContainerRef) getEditableValue()).getDiagram().getUrndefinition() == null)
return;
URNspec urn = ((IURNContainerRef) getEditableValue()).getDiagram().getUrndefinition().getUrnspec();
Vector list;
if (getEditableValue() instanceof UCMmodelElement) {
list = new Vector(urn.getUrndef().getComponents());
} else {
list = new Vector(urn.getGrlspec().getActors());
}
Collections.sort(list, new EObjectClassNameComparator());
String[] values = new String[list.size()];
for (int i = 0; i < list.size(); i++) {
values[i] = EObjectClassNameComparator.getSortableElementName((IURNContainer) list.get(i));
if (values[i] == null)
values[i] = Messages.getString("ContainerPropertySource.unnamed"); //$NON-NLS-1$
}
ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "definition", values); //$NON-NLS-1$
pd.setCategory(Messages.getString("ContainerPropertySource.reference")); //$NON-NLS-1$
descriptors.add(pd);
}
示例5: intentionalElementDescriptor
import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor; //导入方法依赖的package包/类
/**
* @param descriptors
* @param attr
* @param propertyid
*/
private void intentionalElementDescriptor(Collection descriptors, EStructuralFeature attr, PropertyID propertyid) {
if (getEditableValue() == null || ((IntentionalElementRef) getEditableValue()).getDiagram() == null
|| ((IntentionalElementRef) getEditableValue()).getDiagram().getUrndefinition() == null)
return;
URNspec urn = ((IntentionalElementRef) getEditableValue()).getDiagram().getUrndefinition().getUrnspec();
Vector list = new Vector(urn.getGrlspec().getIntElements());
Collections.sort(list, new EObjectClassNameComparator());
String[] values = new String[list.size()];
for (int i = 0; i < list.size(); i++) {
values[i] = EObjectClassNameComparator.getSortableElementName((IntentionalElement) list.get(i));
if (values[i] == null)
values[i] = Messages.getString("IntentionalElementPropertySource.Unnamed"); //$NON-NLS-1$
}
ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "definition", values); //$NON-NLS-1$
pd.setCategory(Messages.getString("EObjectPropertySource.reference")); //$NON-NLS-1$
descriptors.add(pd);
}
示例6: kpiConversionDescriptor
import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor; //导入方法依赖的package包/类
/**
* Creates a drop down list for strategy groups.
*
* @param descriptors
* @param propertyid
*/
private void kpiConversionDescriptor(Collection descriptors, PropertyID propertyid) {
Vector list = getKPIConversionList();
String[] values = new String[list.size() + 1];
values[0] = "(undefined)";
for (int i = 0; i < list.size(); i++) {
values[i + 1] = EObjectClassNameComparator.getSortableElementName((KPIConversion) list.get(i));
if (values[i + 1] == null)
values[i + 1] = Messages.getString("URNElementPropertySource.unnamed"); //$NON-NLS-1$
}
ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "KPI Conversion", values);
pd.setCategory("KPI Model Strategy");
descriptors.add(pd);
}
示例7: scenarioGroupDescriptor
import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor; //导入方法依赖的package包/类
/**
* Creates a drop down list for scenario groups.
*
* @param descriptors
* @param propertyid
*/
private void scenarioGroupDescriptor(Collection descriptors, PropertyID propertyid) {
if (((ScenarioDef) getEditableValue()).getGroup() == null || ((ScenarioDef) getEditableValue()).getGroup().getUcmspec() == null)
return;
URNspec urn = ((ScenarioDef) getEditableValue()).getGroup().getUcmspec().getUrnspec();
Vector list;
list = new Vector(urn.getUcmspec().getScenarioGroups());
Collections.sort(list, new EObjectClassNameComparator());
String[] values = new String[list.size()];
for (int i = 0; i < list.size(); i++) {
values[i] = EObjectClassNameComparator.getSortableElementName((ScenarioGroup) list.get(i));
if (values[i] == null)
values[i] = Messages.getString("URNElementPropertySource.unnamed"); //$NON-NLS-1$
}
ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "group", values); //$NON-NLS-1$
pd.setCategory(Messages.getString("URNElementPropertySource.ScenarioStrategy")); //$NON-NLS-1$
descriptors.add(pd);
}
示例8: strategyGroupDescriptor
import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor; //导入方法依赖的package包/类
/**
* Creates a drop down list for strategy groups.
*
* @param descriptors
* @param propertyid
*/
private void strategyGroupDescriptor(Collection descriptors, PropertyID propertyid) {
if (((EvaluationStrategy) getEditableValue()).getGroup() == null || ((EvaluationStrategy) getEditableValue()).getGroup().getGrlspec() == null)
return;
URNspec urn = ((EvaluationStrategy) getEditableValue()).getGroup().getGrlspec().getUrnspec();
Vector list;
list = new Vector(urn.getGrlspec().getGroups());
Collections.sort(list, new EObjectClassNameComparator());
String[] values = new String[list.size()];
for (int i = 0; i < list.size(); i++) {
values[i] = EObjectClassNameComparator.getSortableElementName((StrategiesGroup) list.get(i));
if (values[i] == null)
values[i] = Messages.getString("URNElementPropertySource.unnamed"); //$NON-NLS-1$
}
ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "group", values); //$NON-NLS-1$
pd.setCategory(Messages.getString("URNElementPropertySource.ScenarioStrategy")); //$NON-NLS-1$
descriptors.add(pd);
}
示例9: contributionContextGroupDescriptor
import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor; //导入方法依赖的package包/类
/**
* Creates a drop down list for contribution context groups.
*
* @param descriptors
* @param propertyid
*/
private void contributionContextGroupDescriptor(Collection descriptors, PropertyID propertyid) {
if (((ContributionContext) getEditableValue()).getGroups().size() == 0
|| ((ContributionContextGroup) ((ContributionContext) getEditableValue()).getGroups().get(0)).getGrlspec() == null)
return;
URNspec urn = ((ContributionContextGroup) ((ContributionContext) getEditableValue()).getGroups().get(0)).getGrlspec().getUrnspec();
Vector list;
list = new Vector(urn.getGrlspec().getContributionGroups());
Collections.sort(list, new EObjectClassNameComparator());
String[] values = new String[list.size()];
for (int i = 0; i < list.size(); i++) {
values[i] = EObjectClassNameComparator.getSortableElementName((ContributionContextGroup) list.get(i));
if (values[i] == null)
values[i] = Messages.getString("URNElementPropertySource.unnamed"); //$NON-NLS-1$
}
ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "group", values); //$NON-NLS-1$
pd.setCategory(Messages.getString("URNElementPropertySource.ScenarioStrategy")); //$NON-NLS-1$
descriptors.add(pd);
}
示例10: enumerationDescriptor
import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor; //导入方法依赖的package包/类
/**
* @param descriptors
* @param propertyid
*/
private void enumerationDescriptor(Collection descriptors, PropertyID propertyid) {
EClassifier type = getFeatureType(propertyid.getFeature());
Class enumer = type.getInstanceClass();
String[] values = getEnumerationValues(enumer);
// String name = enumer.getName().substring(enumer.getName().lastIndexOf('.') + 1);
String name = propertyid.getFeature().getName();
ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, name, values);
pd.setCategory(Messages.getString("EObjectPropertySource.misc")); //$NON-NLS-1$
descriptors.add(pd);
}
示例11: componentRefDescriptor
import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor; //导入方法依赖的package包/类
private void componentRefDescriptor(Collection descriptors, EStructuralFeature attr, PropertyID propertyid) {
Vector list = ParentFinder.getPossibleParents((URNmodelElement) getEditableValue());
Collections.sort(list, new EObjectClassNameComparator());
String[] values = new String[list.size() + 1];
values[0] = Messages.getString("URNElementPropertySource.unbound"); //$NON-NLS-1$
for (int i = 1; i < list.size() + 1; i++) {
values[i] = EObjectClassNameComparator.getSortableElementName((IURNContainerRef) list.get(i - 1));
if (values[i] == null)
values[i] = Messages.getString("URNElementPropertySource.unnamed"); //$NON-NLS-1$
}
ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, Messages.getString("URNElementPropertySource.parent"), values); //$NON-NLS-1$
pd.setCategory(Messages.getString("EObjectPropertySource.info")); //$NON-NLS-1$
descriptors.add(pd);
}
示例12: createPropertyDescriptors
import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor; //导入方法依赖的package包/类
/**
* Creates the property descriptors.
*
* @param desc
* the desc
*/
@Override
public void createPropertyDescriptors(List<IPropertyDescriptor> desc,
Map<String, Object> defaultsMap) {
super.createPropertyDescriptors(desc, defaultsMap);
ComboBoxPropertyDescriptor evaluationTimeD = new ComboBoxPropertyDescriptor(
SortComponent.PROPERTY_EVALUATION_TIME,
Messages.common_evaluation_time, EnumHelper.getEnumNames(
EvaluationTimeEnum.values(), NullEnum.NOTNULL));
evaluationTimeD
.setDescription(Messages.MGenericElement_evaluation_time_description);
desc.add(evaluationTimeD);
evaluationGroupNameD = new RComboBoxPropertyDescriptor(
SortComponent.PROPERTY_EVALUATION_GROUP,
Messages.MGenericElement_evaluation_group_name,
new String[] { "" }); //$NON-NLS-2$
evaluationGroupNameD
.setDescription(Messages.MGenericElement_evaluation_group_name_description);
desc.add(evaluationGroupNameD);
ColorPropertyDescriptor color = new ColorPropertyDescriptor(
SortComponent.PROPERTY_HANDLER_COLOR, "Handler Color",
NullEnum.NULL);
color.setDescription("Handler color");
desc.add(color);
ComboBoxPropertyDescriptor horizAlign = new ComboBoxPropertyDescriptor(
SortComponent.PROPERTY_HANDLER_HORIZONTAL_ALIGN,
"Handler Horizontal Alignement", EnumHelper.getEnumNames(
HorizontalAlignEnum.values(), NullEnum.NOTNULL));
horizAlign.setDescription("Handler horizontal alignement");
desc.add(horizAlign);
ComboBoxPropertyDescriptor vertAlign = new ComboBoxPropertyDescriptor(
SortComponent.PROPERTY_HANDLER_VERTICAL_ALIGN,
"Handler Vertical Alignement", EnumHelper.getEnumNames(
VerticalAlignEnum.values(), NullEnum.NOTNULL));
vertAlign.setDescription("Handler vertical alignement");
desc.add(vertAlign);
ComboBoxPropertyDescriptor sortFieldType = new ComboBoxPropertyDescriptor(
SortComponent.PROPERTY_COLUMN_TYPE, "SortField Type",
EnumHelper.getEnumNames(SortFieldTypeEnum.values(),
NullEnum.NOTNULL));
sortFieldType.setDescription("SortField type");
desc.add(sortFieldType);
NTextPropertyDescriptor sortFieldName = new NTextPropertyDescriptor(
SortComponent.PROPERTY_COLUMN_NAME, "SortField Name");
sortFieldName.setDescription("SortField name");
desc.add(sortFieldName);
color.setCategory("Sort Properties");
sortFieldType.setCategory("Sort Properties");
sortFieldName.setCategory("Sort Properties");
horizAlign.setCategory("Sort Properties");
vertAlign.setCategory("Sort Properties");
evaluationTimeD.setCategory("Sort Properties");
evaluationGroupNameD.setCategory("Sort Properties");
defaultsMap.put(SortComponent.PROPERTY_HANDLER_VERTICAL_ALIGN,
VerticalAlignEnum.MIDDLE);
defaultsMap.put(SortComponent.PROPERTY_HANDLER_HORIZONTAL_ALIGN,
HorizontalAlignEnum.LEFT);
defaultsMap.put(SortComponent.PROPERTY_EVALUATION_TIME,
EvaluationTimeEnum.NOW);
defaultsMap.put(SortComponent.PROPERTY_HANDLER_COLOR, null);
defaultsMap.put(SortComponent.PROPERTY_COLUMN_TYPE,
SortFieldTypeEnum.FIELD);
}