當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。