当前位置: 首页>>代码示例>>Java>>正文


Java ICConfigurationDescription.getStorage方法代码示例

本文整理汇总了Java中org.eclipse.cdt.core.settings.model.ICConfigurationDescription.getStorage方法的典型用法代码示例。如果您正苦于以下问题:Java ICConfigurationDescription.getStorage方法的具体用法?Java ICConfigurationDescription.getStorage怎么用?Java ICConfigurationDescription.getStorage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.cdt.core.settings.model.ICConfigurationDescription的用法示例。


在下文中一共展示了ICConfigurationDescription.getStorage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: performOK

import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; //导入方法依赖的package包/类
@Override
protected void performOK() {
  final ICResourceDescription resDesc = getResDesc();
  if (resDesc == null)
    return;
  final ICConfigurationDescription cfgd= resDesc.getConfiguration();
  if(cfgd instanceof ICMultiConfigDescription){
    // this tab does not support editing of multiple configurations
    return;
  }
  try {
    // NB: defines & undefines are modified by the widget listeners directly
    CMakePreferences prefs = ConfigurationManager.getInstance().get(cfgd);

    // save as project settings..
    ICStorageElement storage = cfgd.getStorage(
        CMakePreferences.CFG_STORAGE_ID, true);
    prefs.saveToStorage(storage);

  } catch (CoreException ex) {
    log.log(new Status(IStatus.ERROR, CdtPlugin.PLUGIN_ID, null, ex));
  }
}
 
开发者ID:15knots,项目名称:cmake4eclipse,代码行数:24,代码来源:CMakeSymbolsTab.java

示例2: performOK

import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; //导入方法依赖的package包/类
@Override
protected void performOK() {
  final ICResourceDescription resDesc = getResDesc();
  if (resDesc == null)
    return;

  ICConfigurationDescription cfgd= resDesc.getConfiguration();
  if(cfgd instanceof ICMultiConfigDescription){
    // this tab does not support editing of multiple configurations
    return;
  }
  saveToModel();
  try {
    // save as project settings..
    ICStorageElement storage = cfgd.getStorage(
        CMakePreferences.CFG_STORAGE_ID, true);
    prefs.saveToStorage(storage);
  } catch (CoreException ex) {
    log.log(new Status(IStatus.ERROR, CdtPlugin.PLUGIN_ID, null, ex));
  }
}
 
开发者ID:15knots,项目名称:cmake4eclipse,代码行数:22,代码来源:AbstractOsPropertyTab.java

示例3: getOrLoad

import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; //导入方法依赖的package包/类
/**
 * Tries to get the {@code CMakePreferences} object associated with the
 * specified {@code ICConfigurationDescription}. If no
 * {@code CMakePreferences} object is found, a new one is created, then loaded
 * from its storage via {@link CMakePreferences#loadFromStorage}.
 *
 * @return the stored {@code CMakePreferences} object, or a freshly loaded one
 *         if this object contains no mapping for the configuration
 *         description.
 * @throws CoreException
 *         if {@link ICConfigurationDescription#getStorage} throws a
 *         CoreException.
 */
public CMakePreferences getOrLoad(ICConfigurationDescription cfgd)
    throws CoreException {
  CMakePreferences pref = map.get(cfgd.getId());
  if (pref == null) {
    pref = new CMakePreferences();
    ICStorageElement storage = cfgd.getStorage(
        CMakePreferences.CFG_STORAGE_ID, false);
    pref.loadFromStorage(storage);
    map.put(cfgd.getId(), pref);
  }
  return pref;
}
 
开发者ID:15knots,项目名称:cmake4eclipse,代码行数:26,代码来源:ConfigurationManager.java


注:本文中的org.eclipse.cdt.core.settings.model.ICConfigurationDescription.getStorage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。