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


Java BackingStoreException.getMessage方法代碼示例

本文整理匯總了Java中org.osgi.service.prefs.BackingStoreException.getMessage方法的典型用法代碼示例。如果您正苦於以下問題:Java BackingStoreException.getMessage方法的具體用法?Java BackingStoreException.getMessage怎麽用?Java BackingStoreException.getMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.osgi.service.prefs.BackingStoreException的用法示例。


在下文中一共展示了BackingStoreException.getMessage方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: removeResource

import org.osgi.service.prefs.BackingStoreException; //導入方法依賴的package包/類
/**
 * Remove a resource (i.e. all its properties) from the builder's preferences.
 * 
 * @param prefs the preferences
 * @param resource the resource
 * @throws BackingStoreException
 */
public static void removeResource(Preferences prefs, IResource resource) 
		throws CoreException {
	try {
		String[] keys = prefs.keys();
		for (String key: keys) {
			if (key.endsWith("//" + resource.getProjectRelativePath().toPortableString())) {
				prefs.remove(key);
			}
		}
		prefs.flush();
	} catch (BackingStoreException e) {
		throw new CoreException(new Status(
				IStatus.ERROR, MinifyBuilder.BUILDER_ID, e.getMessage(), e));
	}
}
 
開發者ID:mnlipp,項目名稱:EclipseMinifyBuilder,代碼行數:23,代碼來源:PrefsAccess.java

示例2: moveResource

import org.osgi.service.prefs.BackingStoreException; //導入方法依賴的package包/類
/**
 * Associate one resource's properties with another resource.
 * 
 * @param fromPrefs the preferences to take the properties from
 * @param fromResource the resource to take the properties from
 * @param toPrefs the preferences to move the properties to
 * @param toResource the resource to associated with the properties
 * @throws BackingStoreException
 */
public static void moveResource(Preferences fromPrefs, IResource fromResource,
		Preferences toPrefs, IResource toResource) 
		throws CoreException {
	try {
		String[] keys = fromPrefs.keys();
		for (String key: keys) {
			if (key.endsWith("//" + fromResource.getProjectRelativePath().toPortableString())) {
				String resourcePreference = key.substring(0, key.indexOf('/'));
				toPrefs.put(preferenceKey(toResource, resourcePreference), fromPrefs.get(key, ""));
				fromPrefs.remove(key);
			}
		}
		fromPrefs.flush();
		toPrefs.flush();
	} catch (BackingStoreException e) {
		throw new CoreException(new Status(
				IStatus.ERROR, MinifyBuilder.BUILDER_ID, e.getMessage(), e));
	}
}
 
開發者ID:mnlipp,項目名稱:EclipseMinifyBuilder,代碼行數:29,代碼來源:PrefsAccess.java

示例3: save

import org.osgi.service.prefs.BackingStoreException; //導入方法依賴的package包/類
public void save() throws IOException {
	try {
		getStorePreferences().flush();
		dirty = false;
	} catch (BackingStoreException e) {
		throw new IOException(e.getMessage());
	}

}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:10,代碼來源:ScopedPreferenceStore.java

示例4: save

import org.osgi.service.prefs.BackingStoreException; //導入方法依賴的package包/類
@Override
public void save() throws IOException {
	try {
		getStorePreferences().flush();
		dirty = false;
	} catch (BackingStoreException e) {
		throw new IOException(e.getMessage());
	}

}
 
開發者ID:fipro78,項目名稱:e4-cookbook-migration-guide,代碼行數:11,代碼來源:ScopedPreferenceStore.java

示例5: removeInstance

import org.osgi.service.prefs.BackingStoreException; //導入方法依賴的package包/類
@Override
public void removeInstance(String name) throws HawkInstanceNotFound, TException {
	final HModel model = getHawkByName(name);
	try {
		HManager.getInstance().delete(model, true);
		removeStateListener(model);
	} catch (BackingStoreException e) {
		throw new TException(e.getMessage(), e);
	}
}
 
開發者ID:mondo-project,項目名稱:mondo-integration,代碼行數:11,代碼來源:HawkThriftIface.java


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