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


Java IDialogSettings.getSections方法代码示例

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


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

示例1: getStatistics

import org.eclipse.jface.dialogs.IDialogSettings; //导入方法依赖的package包/类
public static StoredDialogStatistics[] getStatistics() {
    final IDialogSettings settings = TFSCommonUIClientPlugin.getDefault().getDialogSettings();
    final IDialogSettings[] sections = settings.getSections();
    final List statistics = new ArrayList();
    if (sections != null) {
        for (int i = 0; i < sections.length; i++) {
            statistics.add(createStatistics(sections[i]));
        }
    }
    return (StoredDialogStatistics[]) statistics.toArray(new StoredDialogStatistics[] {});
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:12,代码来源:DialogSettingsHelper.java

示例2: load

import org.eclipse.jface.dialogs.IDialogSettings; //导入方法依赖的package包/类
public static GroupSet load() {
    final GroupSet columnGroups = new GroupSet();

    try {
        final IDialogSettings settings = new DialogSettings("column_group_list");
        String database = settings.get("database");
        if (database == null) {
            database = DBManagerFactory.getAllDBList().get(0);
        }
        columnGroups.setDatabase(database);

        final String path = getPath();
        final File columnGroupListFile = new File(path);

        if (columnGroupListFile.exists()) {
            settings.load(path);

            final UniqueWordDictionary dictionary = new UniqueWordDictionary();

            for (final IDialogSettings columnGroupSection : settings.getSections()) {
                final ColumnGroup columnGroup = new ColumnGroup();

                columnGroup.setGroupName(columnGroupSection.get("group_name"));

                for (final IDialogSettings columnSection : columnGroupSection.getSections()) {
                    final String physicalName = columnSection.get("physical_name");
                    final String logicalName = columnSection.get("logical_name");
                    final SqlType sqlType = SqlType.valueOfId(columnSection.get("type"));
                    final String defaultValue = columnSection.get("default_value");
                    final String description = columnSection.get("description");
                    final String constraint = columnSection.get("constraint");
                    final boolean notNull = Boolean.valueOf(columnSection.get("not_null")).booleanValue();
                    final boolean unique = Boolean.valueOf(columnSection.get("unique")).booleanValue();
                    final Integer length = toInteger(columnSection.get("length"));
                    final Integer decimal = toInteger(columnSection.get("decimal"));
                    final boolean array = Boolean.valueOf(columnSection.get("array")).booleanValue();
                    final Integer arrayDimension = toInteger(columnSection.get("array_dimension"));
                    final boolean unsigned = Boolean.valueOf(columnSection.get("unsigned")).booleanValue();
                    final boolean zerofill = Boolean.valueOf(columnSection.get("zerofill")).booleanValue();
                    final boolean binary = Boolean.valueOf(columnSection.get("binary")).booleanValue();
                    final String args = columnSection.get("args");
                    final boolean charSemantics = Boolean.valueOf(columnSection.get("char_semantics")).booleanValue();

                    final TypeData typeData = new TypeData(length, decimal, array, arrayDimension, unsigned, zerofill, binary, args, charSemantics);

                    Word word = new Word(physicalName, logicalName, sqlType, typeData, description, database);
                    word = dictionary.getUniqueWord(word, true);

                    final NormalColumn column = new NormalColumn(word, notNull, false, unique, false, defaultValue, constraint, null, null, null);

                    columnGroup.addColumn(column);
                }

                columnGroups.add(columnGroup);
            }
        }
    } catch (final IOException e) {
        ERDiagramActivator.showExceptionDialog(e);
    }

    return columnGroups;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:63,代码来源:GlobalGroupSet.java


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