Author: DartPeng
Date: 2008-08-12 04:59:41 -0400 (Tue, 12 Aug 2008)
New Revision: 9654
Modified:
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
Log:
modify codes for fixing a bug:add the input to treeviewer, before init treeviewer
contentprovider
Modified:
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
---
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-08-12
08:47:36 UTC (rev 9653)
+++
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-08-12
08:59:41 UTC (rev 9654)
@@ -20,6 +20,7 @@
import org.eclipse.gef.ui.parts.ScrollingGraphicalViewer;
import org.eclipse.gef.ui.parts.SelectionSynchronizer;
import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.DND;
@@ -440,8 +441,14 @@
if (dialog.open() == Dialog.OK) {
IStrucutredDataCreationWizard cw = dialog
.getCurrentCreationWizard();
- viewer.setInput(cw.getTreeViewerInputContents());
- viewer.expandAll();
+ if (UIUtils.setTheProvidersForTreeViewer(viewer, cw
+ .getInputDataTypeID())) {
+ viewer.setInput(cw.getTreeViewerInputContents());
+ viewer.expandAll();
+ } else {
+ MessageDialog.openError(getSite().getShell(), "Error",
+ "a error occurs during filling Data into the viewer");
+ }
}
}
Show replies by date