}
_keyExists = false;
if (_comboFiles != null && !_comboFiles.isDisposed()) {
if (!WorkbenchUtils.isValidResourceName(_comboFiles.getText())) {
updateStatus(new Status(Status.ERROR, Activator.PLUGIN_ID, "specialcharacters in Labelfilename"));
_buttonCreateNewLabel.setEnabled(false);
}
if (_comboFiles.getText().length() == 0) {
updateStatus(new Status(Status.ERROR, Activator.PLUGIN_ID, "no Labelfile selected"));
_buttonCreateNewLabel.setEnabled(false);
}
}
if (_txtKeyTabNew != null && !_txtKeyTabNew.isDisposed()) {
String prefix = "";
if (_buttonCheckPrefix.getSelection()) {
prefix = _comboPrefix.getText();
}
if (_currentLabelContent.containsKey((prefix + _txtKeyTabNew.getText()))) {
updateStatus(new Status(Status.WARNING, Activator.PLUGIN_ID, "Key already exists"));
_keyExists = true;
}
if (_txtKeyTabNew.getText().length() == 0) {
updateStatus(new Status(Status.ERROR, Activator.PLUGIN_ID, "no key set"));
_buttonCreateNewLabel.setEnabled(false);
}
if (_txtKeyTabNew.getText().endsWith(".")) {
updateStatus(new Status(Status.ERROR, Activator.PLUGIN_ID, "Key ends with \".\""));
_buttonCreateNewLabel.setEnabled(false);
}
if (_txtKeyTabNew.getText().contains("..")) {
updateStatus(new Status(Status.ERROR, Activator.PLUGIN_ID, "Key contains \"..\""));
_buttonCreateNewLabel.setEnabled(false);
}
if (_txtKeyTabNew.getText().contains(" ")) {
updateStatus(new Status(Status.ERROR, Activator.PLUGIN_ID, "spaces in keyname"));
_buttonCreateNewLabel.setEnabled(false);
}
}