Author: sdzmitrovich
Date: 2009-05-23 06:58:35 -0400 (Sat, 23 May 2009)
New Revision: 15465
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4317
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java 2009-05-23
10:42:57 UTC (rev 15464)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java 2009-05-23
10:58:35 UTC (rev 15465)
@@ -92,8 +92,10 @@
*/
@Override
public boolean performFinish() {
- editFilePage.dialog.save();
- editFilePage.dialog.releaseResources();
+ if (editFilePage.dialog != null) {
+ editFilePage.dialog.save();
+ editFilePage.dialog.releaseResources();
+ }
return true;
}
@@ -112,7 +114,9 @@
*/
@Override
public boolean performCancel() {
- editFilePage.dialog.releaseResources();
+ if (editFilePage.dialog != null) {
+ editFilePage.dialog.releaseResources();
+ }
return true;
}
@@ -164,9 +168,10 @@
public void createControl(final Composite parent) {
final Composite container = new Composite(parent, SWT.NONE);
-
+
container.setLayout(new GridLayout(1, true));
- GridData gridData = new GridData(GridData.FILL,GridData.FILL,true,true);
+ GridData gridData = new GridData(GridData.FILL, GridData.FILL,
+ true, true);
container.setLayoutData(gridData);
if (getWizard().getContainer() instanceof WizardDialog) {
@@ -178,8 +183,8 @@
public void pageChanged(PageChangedEvent event) {
if (event.getSelectedPage() == editFilePage) {
- if (dialog == null) {
- dialog = new CSSClassDialog(getShell(),
+ if (dialog == null) {
+ dialog = new CSSClassDialog(getShell(),
(IFile) classDescription.getCssFile(),
selection) {
protected void handleStatusChanged(
@@ -201,7 +206,7 @@
};
dialog.createControlPane(container);
container.layout();
- }else {
+ } else {
dialog.setFile((IFile) classDescription
.getCssFile());
}