当前位置: 首页>>代码示例>>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;未经允许,请勿转载。