// slip the non-standard "plugins" initialisation inbetween the internal ones
// and the plugin ones so plugin ones can be children of it
boolean plugin_section = i >= internalSections.length;
ConfigSection section = pluginSections.get(i);
if (section instanceof ConfigSectionSWT || section instanceof UISWTConfigSection ) {
String name;
try {
name = section.configSectionGetName();
} catch (Exception e) {
Logger.log(new LogEvent(LOGID, "A ConfigSection plugin caused an "
+ "error while trying to call its "
+ "configSectionGetName function", e));
name = "Bad Plugin";
}
String section_key = name;
if ( plugin_section ){
// if resource exists without prefix then use it as plugins don't
// need to start with the prefix
if ( !MessageText.keyExists(section_key)){
section_key = sSectionPrefix + name;
}
}else{
section_key = sSectionPrefix + name;
}
String section_name = MessageText.getString( section_key );
try {
TreeItem treeItem;
String location = section.configSectionGetParentSection();
if ( location.length() == 0 || location.equalsIgnoreCase(ConfigSection.SECTION_ROOT)){
//int position = findInsertPointFor(section_name, tree);
//if ( position == -1 ){
treeItem = new TreeItem(tree, SWT.NULL);