Author: DartPeng
Date: 2008-08-13 02:35:31 -0400 (Wed, 13 Aug 2008)
New Revision: 9676
Modified:
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
Log:
fix a bug -- add new input to tree viewer , the graphics model can't be created at the
same time
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
23:29:06 UTC (rev 9675)
+++
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-08-13
06:35:31 UTC (rev 9676)
@@ -10,9 +10,6 @@
******************************************************************************/
package org.jboss.tools.smooks.ui.editors;
-import java.util.Collection;
-import java.util.Iterator;
-
import org.eclipse.draw2d.ColorConstants;
import org.eclipse.gef.DefaultEditDomain;
import org.eclipse.gef.GraphicalViewer;
@@ -49,7 +46,6 @@
import org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard;
import org.jboss.tools.smooks.ui.IViewerInitor;
import org.jboss.tools.smooks.ui.StructuredDataCreationWizardDailog;
-import org.jboss.tools.smooks.ui.ViewerInitorStore;
import org.jboss.tools.smooks.ui.gef.editparts.SmooksEditPartFactory;
import org.jboss.tools.smooks.ui.gef.model.AbstractStructuredDataModel;
import org.jboss.tools.smooks.ui.gef.model.GraphRootModel;
@@ -59,6 +55,7 @@
import org.jboss.tools.smooks.ui.gef.model.TreeItemRelationModel;
import org.jboss.tools.smooks.ui.gef.tools.MappingPanelDropTargetListener;
import org.jboss.tools.smooks.ui.gef.tools.TargetTreeDropTargetListener;
+import org.jboss.tools.smooks.ui.gef.util.GraphicsConstants;
import org.jboss.tools.smooks.ui.wizards.TransformDataSelectionWizard;
import org.jboss.tools.smooks.utils.UIUtils;
@@ -145,7 +142,8 @@
initSourceTreeViewerProviders();
initSourceTreeViewer();
composite1.setLayoutData(gd);
- toolkit.paintBordersFor(composite1);
+ composite1.setBackground(GraphicsConstants.groupBorderColor);
+// toolkit.paintBordersFor(composite1);
}
{
Composite composite2 = toolkit
@@ -189,7 +187,7 @@
initTargetTreeViewerProvider();
initTargetTreeViewer();
targetViewer.expandAll();
- toolkit.paintBordersFor(composite3);
+ composite3.setBackground(GraphicsConstants.groupBorderColor);
}
{
@@ -446,7 +444,15 @@
if (UIUtils.setTheProvidersForTreeViewer(viewer, cw
.getInputDataTypeID())) {
viewer.setInput(cw.getTreeViewerInputContents());
+ // the viewer must be expanded , then the graphics model can cauculate the location
correctly
viewer.expandAll();
+
+ if(viewer == this.sourceViewer){
+ this.createSourceGraphModels();
+ }
+ if(viewer == this.targetViewer){
+ this.createTargetGraphModels();
+ }
} else {
MessageDialog.openError(getSite().getShell(), "Error",
"a error occurs during filling Data into the viewer");
Show replies by date