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


Java IDialogSettings.save方法代码示例

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


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

示例1: save

import org.eclipse.jface.dialogs.IDialogSettings; //导入方法依赖的package包/类
public static void save(final GroupSet columnGroups) {
    try {
        final IDialogSettings settings = new DialogSettings("column_group_list");

        settings.put("database", columnGroups.getDatabase());

        int index = 0;

        for (final ColumnGroup columnGroup : columnGroups) {
            final IDialogSettings columnGroupSection = new DialogSettings("column_group_" + index);
            index++;

            columnGroupSection.put("group_name", columnGroup.getGroupName());

            int columnIndex = 0;

            for (final NormalColumn normalColumn : columnGroup.getColumns()) {
                final IDialogSettings columnSection = new DialogSettings("column_" + columnIndex);
                columnIndex++;

                columnSection.put("physical_name", null2Blank(normalColumn.getPhysicalName()));
                columnSection.put("logical_name", null2Blank(normalColumn.getLogicalName()));
                columnSection.put("type", null2Blank(normalColumn.getType()));
                columnSection.put("length", null2Blank(normalColumn.getTypeData().getLength()));
                columnSection.put("decimal", null2Blank(normalColumn.getTypeData().getDecimal()));
                columnSection.put("array", normalColumn.getTypeData().isArray());
                columnSection.put("array_dimension", null2Blank(normalColumn.getTypeData().getArrayDimension()));
                columnSection.put("unsigned", normalColumn.getTypeData().isUnsigned());
                columnSection.put("zerofill", normalColumn.getTypeData().isZerofill());
                columnSection.put("binary", normalColumn.getTypeData().isBinary());

                columnSection.put("not_null", normalColumn.isNotNull());
                columnSection.put("unique", normalColumn.isUniqueKey());
                columnSection.put("default_value", null2Blank(normalColumn.getDefaultValue()));
                columnSection.put("constraint", null2Blank(normalColumn.getConstraint()));
                columnSection.put("description", null2Blank(normalColumn.getDescription()));
                columnSection.put("char_semantics", normalColumn.getTypeData().isCharSemantics());

                columnGroupSection.addSection(columnSection);
            }

            settings.addSection(columnGroupSection);
        }

        settings.save(getPath());

    } catch (final IOException e) {
        ERDiagramActivator.showExceptionDialog(e);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:51,代码来源:GlobalGroupSet.java

示例2: save

import org.eclipse.jface.dialogs.IDialogSettings; //导入方法依赖的package包/类
public static void save(GroupSet columnGroups) {
	try {
		IDialogSettings settings = new DialogSettings("column_group_list");

		settings.put("database", columnGroups.getDatabase());

		int index = 0;

		for (ColumnGroup columnGroup : columnGroups) {
			IDialogSettings columnGroupSection = new DialogSettings(
					"column_group_" + index);
			index++;

			columnGroupSection
					.put("group_name", columnGroup.getGroupName());

			int columnIndex = 0;

			for (NormalColumn normalColumn : columnGroup.getColumns()) {
				IDialogSettings columnSection = new DialogSettings(
						"column_" + columnIndex);
				columnIndex++;

				columnSection.put("physical_name",
						null2Blank(normalColumn.getPhysicalName()));
				columnSection.put("logical_name",
						null2Blank(normalColumn.getLogicalName()));
				columnSection.put("type",
						null2Blank(normalColumn.getType()));
				columnSection.put("length", null2Blank(normalColumn
						.getTypeData().getLength()));
				columnSection.put("decimal", null2Blank(normalColumn
						.getTypeData().getDecimal()));
				columnSection.put("array", normalColumn.getTypeData()
						.isArray());
				columnSection.put("array_dimension",
						null2Blank(normalColumn.getTypeData()
								.getArrayDimension()));
				columnSection.put("unsigned", normalColumn.getTypeData()
						.isUnsigned());
				columnSection.put("zerofill", normalColumn.getTypeData()
						.isZerofill());
				columnSection.put("binary", normalColumn.getTypeData()
						.isBinary());

				columnSection.put("not_null", normalColumn.isNotNull());
				columnSection.put("unique", normalColumn.isUniqueKey());
				columnSection.put("default_value",
						null2Blank(normalColumn.getDefaultValue()));
				columnSection.put("constraint",
						null2Blank(normalColumn.getConstraint()));
				columnSection.put("description",
						null2Blank(normalColumn.getDescription()));
				columnSection.put("char_semantics", normalColumn
						.getTypeData().isCharSemantics());

				columnGroupSection.addSection(columnSection);
			}

			settings.addSection(columnGroupSection);
		}

		settings.save(getPath());

	} catch (IOException e) {
		ERDiagramActivator.showExceptionDialog(e);
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:69,代码来源:GlobalGroupSet.java


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