本文整理匯總了Java中org.eclipse.ui.views.properties.IPropertySource.isPropertySet方法的典型用法代碼示例。如果您正苦於以下問題:Java IPropertySource.isPropertySet方法的具體用法?Java IPropertySource.isPropertySet怎麽用?Java IPropertySource.isPropertySet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.ui.views.properties.IPropertySource
的用法示例。
在下文中一共展示了IPropertySource.isPropertySet方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: resetPropertyValue
import org.eclipse.ui.views.properties.IPropertySource; //導入方法依賴的package包/類
/**
* @see org.eclipse.ui.views.properties.IPropertySheetEntry#resetPropertyValue()
*/
public void resetPropertyValue() {
CompoundCommand cc = new CompoundCommand();
if (getParent() == null)
// root does not have a default value
return;
// Use our parent's values to reset our values.
boolean change = false;
Object[] objects = getParent().getValues();
for (int i = 0; i < objects.length; i++) {
IPropertySource source = getPropertySource(objects[i]);
if (source.isPropertySet(getDescriptor().getId())) {
SetPropertyValueCommand restoreCmd = new SetPropertyValueCommand(
getDescriptor().getDisplayName(), source,
getDescriptor().getId(),
SetPropertyValueCommand.DEFAULT_VALUE);
cc.add(restoreCmd);
change = true;
}
}
if (change) {
getCommandStack().execute(cc);
refreshFromRoot();
}
}
示例2: resetPropertyValue
import org.eclipse.ui.views.properties.IPropertySource; //導入方法依賴的package包/類
public void resetPropertyValue(String id, IPropertySource[] sources)
{
CompoundCommand cc = new CompoundCommand();
ResetValueCommand restoreCmd;
for (int i = 0; i < sources.length; i++) {
IPropertySource source = sources[i];
if (source.isPropertySet(id)) {
//source.resetPropertyValue(getDescriptor()getId());
restoreCmd = new ResetValueCommand();
restoreCmd.setTarget(source);
restoreCmd.setPropertyId(id);
cc.add(restoreCmd);
}
}
if (cc.size() > 0) {
mStack.execute(cc);
refresh();
}
}
示例3: resetPropertyValue
import org.eclipse.ui.views.properties.IPropertySource; //導入方法依賴的package包/類
public void resetPropertyValue() {
JSSCompoundCommand cc = new JSSCompoundCommand(null);
ResetValueCommand restoreCmd;
if (getParent() == null)
// root does not have a default value
return;
// Use our parent's values to reset our values.
boolean change = false;
Object[] objects = getParent().getValues();
for (int i = 0; i < objects.length; i++) {
IPropertySource source = getPropertySource(objects[i]);
if (source.isPropertySet(getDescriptor().getId())) {
// source.resetPropertyValue(getDescriptor()getId());
restoreCmd = new ResetValueCommand();
restoreCmd.setTarget(source);
restoreCmd.setPropertyId(getDescriptor().getId());
cc.add(restoreCmd);
cc.setReferenceNodeIfNull(source);
change = true;
}
}
if (change) {
getCommandStack().execute(cc);
refreshFromRoot();
}
}