label.setText("Development language:");
_comboLanguage = new Combo(composite, SWT.BORDER | SWT.READ_ONLY);
// fill combo
List<String> languages = new ArrayList<String>();
WGADesignStructureHelper helper = new WGADesignStructureHelper(getDesignRoot());
try {
languages.addAll(helper.getAvailableLableLanguages());
} catch (CoreException e) {
Plugin.getDefault().getLog().log(new Status(Status.ERROR, Plugin.PLUGIN_ID, "Unable to retrieve configured label languages.", e));
}
if (languages.isEmpty()) {
languages.add(WGADesignStructureHelper.DEFAULT_DESIGN_DEV_LANGUAGE);
}
_comboLanguage.setItems(languages.toArray(new String[0]));
// set combo default
int index = 0;
try {
String devLang = helper.getDevelopmentLanguage();
int pos = _comboLanguage.indexOf(devLang);
if (pos != -1) {
index = pos;
}
} catch (CoreException e) {
Plugin.getDefault().getLog().log(new Status(Status.ERROR, Plugin.PLUGIN_ID, "Unable to retrieve dev language of resource '" + getDesignRoot().getLocation() + "'.", e));
}
_comboLanguage.select(index);
label = new Label(composite, SWT.None);
label.setText("AutoSort label files:");
_chkSortLabelFiles = new Button(composite, SWT.CHECK);
_chkSortLabelFiles.setText("enabled");
_chkSortLabelFiles.setSelection(helper.isSortLabelFiles());
}
return composite;
}