use of com.intellij.uiDesigner.lw.StringDescriptor in project intellij-community by JetBrains.
the class IntroStringProperty method refreshValue.
public boolean refreshValue(RadComponent component) {
StringDescriptor descriptor = getValue(component);
if (descriptor.getValue() != null)
return false;
String oldResolvedValue = descriptor.getResolvedValue();
descriptor.setResolvedValue(null);
try {
setValueImpl(component, descriptor);
return !Comparing.equal(oldResolvedValue, descriptor.getResolvedValue());
} catch (Exception e) {
LOG.error(e);
return false;
}
}
use of com.intellij.uiDesigner.lw.StringDescriptor in project intellij-community by JetBrains.
the class StringEditorDialog method doOKAction.
@Override
protected void doOKAction() {
if (myForm.myRbResourceBundle.isSelected()) {
final StringDescriptor descriptor = getDescriptor();
if (descriptor != null && descriptor.getKey().length() > 0) {
final String value = myForm.myTfRbValue.getText();
final PropertiesFile propFile = getPropertiesFile(descriptor);
if (propFile != null && propFile.findPropertyByKey(descriptor.getKey()) == null) {
saveCreatedProperty(propFile, descriptor.getKey(), value, myEditor.getPsiFile());
} else {
final String newKeyName = saveModifiedPropertyValue(myEditor.getModule(), descriptor, myLocale, value, myEditor.getPsiFile());
if (newKeyName != null) {
myForm.myTfKey.setText(newKeyName);
}
}
}
}
super.doOKAction();
}
Aggregations