本文整理汇总了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;未经允许,请勿转载。 |
请发表评论