};
private void openEditDialog(Property property) throws Exception {
ObjectProperty objectProperty = (ObjectProperty) property;
ObjectInfo objectInfo = objectProperty.getObjectInfo();
IGwtStateProvider stateProvider = (IGwtStateProvider) objectInfo;
// prepare not empty array of CSS files
List<IFile> cssFiles = stateProvider.getState().getCssSupport().getFiles();
if (cssFiles.isEmpty()) {
MessageDialog.openError(
DesignerPlugin.getShell(),
"Error",
"There are no CSS files referenced from module or HTML.");
return;
}
// prepare dialog
StylesEditDialog stylesDialog;
{
String currentText = getText(property);
stylesDialog =
new StylesEditDialog(DesignerPlugin.getShell(),
cssFiles,
StringUtils.isEmpty(currentText) ? "" : "." + currentText,
true);
}
// open dialog and edit CSS files
int result = stylesDialog.open();
if (result == Window.CANCEL) {
return;
}
// wait for auto-build - for coping CSS files from source folder to binary
ProjectUtils.waitForAutoBuild();
// check CSS files modification
stateProvider.getState().isModified();
// do edit
switch (result) {
case Window.OK :
// "OK" button pressed, refresh for displaying modified styles
ExecutionUtils.refresh(objectInfo);