• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java WSOptionsStorage类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中ro.sync.exml.workspace.api.options.WSOptionsStorage的典型用法代码示例。如果您正苦于以下问题:Java WSOptionsStorage类的具体用法?Java WSOptionsStorage怎么用?Java WSOptionsStorage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



WSOptionsStorage类属于ro.sync.exml.workspace.api.options包,在下文中一共展示了WSOptionsStorage类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getOption

import ro.sync.exml.workspace.api.options.WSOptionsStorage; //导入依赖的package包/类
public static String getOption(String key, boolean defaults) {
    String defaultValue;
    switch (key) {
        case KEY_BASEX_CONNECTION_SETTING: defaultValue = DEF_BASEX_CONNECTION_SETTING; break;
        case KEY_BASEX_HOST: defaultValue = DEF_BASEX_HOST; break;
        case KEY_BASEX_HTTP_PORT: defaultValue = DEF_BASEX_HTTP_PORT; break;
        case KEY_BASEX_TCP_PORT: defaultValue = DEF_BASEX_TCP_PORT; break;
        case KEY_BASEX_USERNAME: defaultValue = DEF_BASEX_USERNAME; break;
        case KEY_BASEX_PASSWORD: defaultValue = DEF_BASEX_PASSWORD; break;
        case KEY_BASEX_CONNECTION: defaultValue = DEF_BASEX_CONNECTION; break;
        case KEY_BASEX_VERSIONING: defaultValue = DEF_BASEX_VERSIONING; break;
        case KEY_BASEX_LOGFILE: defaultValue = DEF_BASEX_LOGFILE; break;
        case KEY_BASEX_DB_CREATE_CHOP: defaultValue = DEF_BASEX_DB_CREATE_CHOP; break;
        case KEY_BASEX_DB_CREATE_FTINDEX: defaultValue = DEF_BASEX_DB_CREATE_FTINDEX; break;
        case KEY_BASEX_DB_CREATE_TEXTINDEX: defaultValue = DEF_BASEX_DB_CREATE_TEXTINDEX; break;
        case KEY_BASEX_DB_CREATE_ATTRINDEX: defaultValue = DEF_BASEX_DB_CREATE_ATTRINDEX; break;
        case KEY_BASEX_DB_CREATE_TOKENINDEX: defaultValue = DEF_BASEX_DB_CREATE_TOKENINDEX; break;
        default: defaultValue = "empty option";
    }
    if (defaults) {
        return defaultValue;
    } else {
        PluginWorkspace pluginWorkspace = PluginWorkspaceProvider.getPluginWorkspace();
        if (pluginWorkspace != null) {
            WSOptionsStorage store = pluginWorkspace.getOptionsStorage();
            if (store != null)
                return store.getOption(key, defaultValue);
            else {
                logger.error("Plugin error - no option storage accessible");
                return defaultValue;
            }
        } else {
            logger.error("Plugin error - no plugin workspace accessible");
            return defaultValue;
        }
    }
}
 
开发者ID:axxepta,项目名称:project-argon,代码行数:38,代码来源:ArgonOptionPage.java


示例2: showDialog

import ro.sync.exml.workspace.api.options.WSOptionsStorage; //导入依赖的package包/类
public boolean showDialog() {
	final WSOptionsStorage 	optionsStorage 		= PluginWorkspaceProvider.getPluginWorkspace().getOptionsStorage();
	Dimension size = stringToSize(optionsStorage.getOption(PROPERTIES + SIZE, ""));
	Point position = stringToPosition(optionsStorage.getOption(PROPERTIES + POSITION, ""));
	int[] colwidth = stringToColwidth(optionsStorage.getOption(PROPERTIES + COLWIDTH, ""));
	setProperties(size, position, colwidth);
	setVisible(true);
	saveState();
	return getResult();
}
 
开发者ID:dita-semia,项目名称:dita-semia-resolver,代码行数:11,代码来源:OxyAdvancedKeyrefDialog.java


示例3: saveState

import ro.sync.exml.workspace.api.options.WSOptionsStorage; //导入依赖的package包/类
private void saveState() {
		final WSOptionsStorage optionsStorage = PluginWorkspaceProvider.getPluginWorkspace().getOptionsStorage();

		// Position und Größe des Dialogs
    	final Point 	position	= getLocation();
    	final Dimension size		= getSize();
    	final String	posString 	= String.valueOf(position.x) + "," + String.valueOf(position.y);
    	final String	sizeString	= String.valueOf(size.width) + "," + String.valueOf(size.height);
    	
//    	logger.info("saveState: " + size + ", " + position + ", " + getColWidth());
    	
    	optionsStorage.setOption(PROPERTIES + POSITION, posString);
    	optionsStorage.setOption(PROPERTIES + SIZE, sizeString);
    	optionsStorage.setOption(PROPERTIES + COLWIDTH, getColWidth());
	}
 
开发者ID:dita-semia,项目名称:dita-semia-resolver,代码行数:16,代码来源:OxyAdvancedKeyrefDialog.java


示例4: saveState

import ro.sync.exml.workspace.api.options.WSOptionsStorage; //导入依赖的package包/类
private void saveState(String properties, Dimension size) {
	try {
		//logger.info("saveState");
		final WSOptionsStorage 	optionsStorage 	= PluginWorkspaceProvider.getPluginWorkspace().getOptionsStorage();
    	final String			sizeString 		= String.valueOf(size.width) + "," + String.valueOf(size.height);
    	optionsStorage.setOption(properties, sizeString);
	} catch (Exception e) {
		logger.error(e, e);
	}
}
 
开发者ID:dita-semia,项目名称:XsltGui,代码行数:11,代码来源:GuiHtmlDialog.java


示例5: loadState

import ro.sync.exml.workspace.api.options.WSOptionsStorage; //导入依赖的package包/类
private Dimension loadState(String properties, Dimension defaultSize) {
	//logger.info("loadState");
	final WSOptionsStorage 	optionsStorage 	= PluginWorkspaceProvider.getPluginWorkspace().getOptionsStorage();
	final String 			sizeProperties 	= optionsStorage.getOption(properties, "");
	//logger.info("sizeProperties: " + sizeProperties);
	if (sizeProperties != null) {
		final String[] size = sizeProperties.split(",");
		if (size.length == 2) {
			return new Dimension(Integer.parseInt(size[0]), Integer.parseInt(size[1]));
		}
	}
	return defaultSize;
}
 
开发者ID:dita-semia,项目名称:XsltGui,代码行数:14,代码来源:GuiHtmlDialog.java


示例6: getLanguageToolClient

import ro.sync.exml.workspace.api.options.WSOptionsStorage; //导入依赖的package包/类
private LanguageToolClient getLanguageToolClient() {
  WSOptionsStorage storage = pluginWorkspaceAccess.getOptionsStorage();
  String server;
  if (getBooleanOption(USE_INTERNET_SERVER_KEY, false, storage)) {
    server = INTERNET_SERVER_URL;
  } else {
    server = storage.getOption(SERVER_URL_KEY, DEFAULT_URL);
  }
  SpellingRules spellingRules = getBooleanOption(IGNORE_SPELLING_ERRORS_KEY, true, storage) ?
          SpellingRules.Ignore : SpellingRules.Consider;
  WhitespaceRules whitespaceRules = getBooleanOption(IGNORE_WHITESPACE_ERRORS_KEY, true, storage) ?
          WhitespaceRules.Ignore : WhitespaceRules.Consider;
  return new LanguageToolClient(server, spellingRules, whitespaceRules);
}
 
开发者ID:danielnaber,项目名称:oxygen-languagetool-plugin,代码行数:15,代码来源:LanguageToolPluginExtension.java


示例7: readConfig

import ro.sync.exml.workspace.api.options.WSOptionsStorage; //导入依赖的package包/类
public static Config readConfig(StandalonePluginWorkspace spw){
	WSOptionsStorage storage = spw.getOptionsStorage();
	return readConfig(storage.getOption(STORAGE_OPTION_KEY, readConfig().toString()));
}
 
开发者ID:nkutsche,项目名称:opendocs,代码行数:5,代码来源:Config.java


示例8: getBooleanOption

import ro.sync.exml.workspace.api.options.WSOptionsStorage; //导入依赖的package包/类
private boolean getBooleanOption(String key, boolean defaultValue, WSOptionsStorage storage) {
  return storage.getOption(key, String.valueOf(defaultValue)).equals("true");
}
 
开发者ID:danielnaber,项目名称:oxygen-languagetool-plugin,代码行数:4,代码来源:LanguageToolPluginExtension.java



注:本文中的ro.sync.exml.workspace.api.options.WSOptionsStorage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LocalizedResourceProto类代码示例发布时间:2022-05-22
下一篇:
Java ByteBufferInputStream类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap