本文整理匯總了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);
}
}