當前位置: 首頁>>代碼示例>>Java>>正文


Java IPropertySource.isPropertySet方法代碼示例

本文整理匯總了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();
	}
}
 
開發者ID:ghillairet,項目名稱:gef-gwt,代碼行數:29,代碼來源:UndoablePropertySheetEntry.java

示例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();
    }
}
 
開發者ID:henrikor2,項目名稱:eclipsensis,代碼行數:21,代碼來源:InstallOptionsCommandHelper.java

示例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();
	}
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:29,代碼來源:JRPropertySheetEntry.java


注:本文中的org.eclipse.ui.views.properties.IPropertySource.isPropertySet方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。