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