Author: DartPeng
Date: 2008-10-07 03:18:37 -0400 (Tue, 07 Oct 2008)
New Revision: 10702
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/ChangeConstraintCommand.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateConnectionCommand.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/DeleteConnectionCommand.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataEditPart.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ExpandableGraphNodeContentFigure.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GroupFigure.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataConnectionModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/DataObjectContainerModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/IConnectableModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/RootModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataContentModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/TreeItemRelationModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/LeftSourceAnchor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/editparts/InteractorHelper.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/ContainerLayout.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/FillLayout.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/IConnectedFigure.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Interactor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Placeholder.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/modelparser/SmooksConfigurationFileGenerateContext.java
Log:
JBIDE-2833
If the root nodes don't connect , when user want to save the file , there will open a
question dialog to ask user to connect them.
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -20,19 +20,19 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CommandStack;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.util.ExtendedMetaData;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.xml.type.AnyType;
-import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
import org.jboss.tools.smooks.analyzer.IMappingAnalyzer;
import org.jboss.tools.smooks.analyzer.ISourceModelAnalyzer;
import org.jboss.tools.smooks.analyzer.ITargetModelAnalyzer;
@@ -47,7 +47,6 @@
import org.jboss.tools.smooks.model.ResourceConfigType;
import org.jboss.tools.smooks.model.ResourceType;
import org.jboss.tools.smooks.model.SmooksFactory;
-import org.jboss.tools.smooks.model.SmooksPackage;
import org.jboss.tools.smooks.model.SmooksResourceListType;
import org.jboss.tools.smooks.model.provider.SmooksItemProviderAdapterFactory;
import org.jboss.tools.smooks.model.util.SmooksModelUtils;
@@ -150,8 +149,7 @@
* @param parentResourceConfigType
* @param beanId
*/
- protected void analyzeStructuredDataModel(
- List resourceList,
+ protected void analyzeStructuredDataModel(List resourceList,
AbstractStructuredDataModel root,
AbstractStructuredDataModel dataModel,
ResourceConfigType parentResourceConfigType, String beanId) {
@@ -187,14 +185,14 @@
ResourceConfigType resourceConfig = SmooksFactory.eINSTANCE
.createResourceConfigType();
resourceList.add(resourceConfig);
-// Command addResourceConfigCommand = AddCommand
-// .create(
-// editingDomain,
-// resourceList,
-// SmooksPackage.eINSTANCE
-// .getSmooksResourceListType_AbstractResourceConfig(),
-// resourceConfig);
-// addResourceConfigCommand.execute();
+ // Command addResourceConfigCommand = AddCommand
+ // .create(
+ // editingDomain,
+ // resourceList,
+ // SmooksPackage.eINSTANCE
+ // .getSmooksResourceListType_AbstractResourceConfig(),
+ // resourceConfig);
+ // addResourceConfigCommand.execute();
// resouceConfig.
resourceConfig
.setSelector(getSourceBeanSelectorString((AbstractStructuredDataModel) source));
@@ -351,10 +349,91 @@
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see
org.jboss.tools.smooks.analyzer.IMappingAnalyzer#analyzeMappingGraphModel(org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext)
+ */
public void analyzeMappingGraphModel(
SmooksConfigurationFileGenerateContext context)
throws SmooksAnalyzerException {
GraphRootModel root = context.getDataMappingRootModel();
+ List sourceList = root.loadSourceModelList();
+ List targetList = root.loadTargetModelList();
+
+ JavaBeanModel rootSource = null;
+ JavaBeanModel rootTarget = null;
+
+ boolean needCheck = false;
+
+ for (Iterator iterator = sourceList.iterator(); iterator.hasNext();) {
+ AbstractStructuredDataModel sourcegm = (AbstractStructuredDataModel) iterator
+ .next();
+ if (sourcegm instanceof IConnectableModel) {
+ if (!((IConnectableModel) sourcegm).getModelSourceConnections()
+ .isEmpty()
+ || !((IConnectableModel) sourcegm)
+ .getModelTargetConnections().isEmpty()) {
+ needCheck = true;
+ break;
+ }
+ }
+ }
+
+ if (needCheck) {
+ for (Iterator iterator = sourceList.iterator(); iterator.hasNext();) {
+ AbstractStructuredDataModel sourceGraphModel = (AbstractStructuredDataModel)
iterator
+ .next();
+ JavaBeanModel source = (JavaBeanModel) sourceGraphModel
+ .getReferenceEntityModel();
+ if (source.isRoot()) {
+ rootSource = source;
+ break;
+ }
+ }
+
+ for (Iterator iterator = targetList.iterator(); iterator.hasNext();) {
+ AbstractStructuredDataModel targetGraphModel = (AbstractStructuredDataModel)
iterator
+ .next();
+ JavaBeanModel target = (JavaBeanModel) targetGraphModel
+ .getReferenceEntityModel();
+ if (target.isRoot()) {
+ rootTarget = target;
+ break;
+ }
+ }
+ if (rootSource != null && rootTarget != null) {
+ AbstractStructuredDataModel rootSourceGraphModel = UIUtils
+ .findGraphModel(root, rootSource);
+ AbstractStructuredDataModel rootTargetGraphModel = UIUtils
+ .findGraphModel(root, rootTarget);
+ if (rootSourceGraphModel instanceof IConnectableModel
+ && rootTargetGraphModel instanceof IConnectableModel) {
+ if (((IConnectableModel) rootSourceGraphModel)
+ .isSourceConnectWith((IConnectableModel) rootTargetGraphModel)) {
+ // do nothing
+ } else {
+ // ask user if they want to connect the root model
+ Shell displayParent = context.getShell();
+ boolean connectAuto = MessageDialog
+ .openQuestion(
+ displayParent,
+ "Connection Question",
+ "The root models don't be connected , maybe it will make some errors
with the generation config file contents.\nDo you wan to connect them?");
+ if (connectAuto) {
+ // connect root model
+ LineConnectionModel connectionModel = new LineConnectionModel();
+ connectionModel
+ .setSource((IConnectableModel) rootSourceGraphModel);
+ connectionModel
+ .setTarget((IConnectableModel) rootTargetGraphModel);
+ connectionModel.connect();
+ }
+ }
+ }
+ }
+ }
+
SmooksResourceListType listType = context.getSmooksResourceListModel();
this.analyzeGraphicalModel(root, context.getGeneratorResourceList());
}
@@ -511,7 +590,8 @@
if (ar instanceof ResourceConfigType) {
ResourceConfigType rc = (ResourceConfigType) ar;
ResourceType resourceType = rc.getResource();
- if(resourceType == null) continue;
+ if (resourceType == null)
+ continue;
String resource = resourceType.getValue();
if (BEANPOPULATOR.equals(resource)) {
// create root beanmodel
@@ -591,7 +671,8 @@
if (ar instanceof ResourceConfigType) {
ResourceConfigType rc = (ResourceConfigType) ar;
ResourceType resourceType = rc.getResource();
- if(resourceType == null) continue;
+ if (resourceType == null)
+ continue;
String resource = resourceType.getValue();
if (BEANPOPULATOR.equals(resource)) {
// create root beanmodel
@@ -600,7 +681,8 @@
}
}
}
- if(current == null) return null;
+ if (current == null)
+ return null;
Class rootClass = null;
rootClassName = SmooksModelUtils.getParmaText("beanClass", current);
if (rootClassName != null && loader != null) {
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -700,6 +700,7 @@
context.setDataMappingRootModel(this.rootModel);
context.setSmooksConfigFile(((IFileEditorInput) getEditorInput())
.getFile());
+ context.setShell(getSite().getShell());
}
protected Composite createUISectionContainer(Composite parent, int columns) {
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/ChangeConstraintCommand.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/ChangeConstraintCommand.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/ChangeConstraintCommand.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -15,6 +15,7 @@
import org.jboss.tools.smooks.ui.gef.model.IGraphicalModel;
/**
+ * @deprecated
* @author Dart Peng
*
*/
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateConnectionCommand.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateConnectionCommand.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateConnectionCommand.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -1,43 +1,29 @@
package org.jboss.tools.smooks.ui.gef.commands;
-import java.util.HashMap;
-import java.util.Map;
-
import org.eclipse.gef.commands.Command;
import org.jboss.tools.smooks.ui.gef.model.IConnectableModel;
import org.jboss.tools.smooks.ui.gef.model.LineConnectionModel;
/**
- * l�ߴ�������
- *
- * @author wangpeng created 2007-4-5 14:51:00
*
*/
public class CreateConnectionCommand extends Command {
-
- /**
- * ÿһ����϶�����Դ��ݶ���ڵ��Ŀ����ݶ���ڵ���ɵ�.
- * ��}��ڵ�����Ͷ���List��
- */
- public static Map listComponents = new HashMap();
+
+
private IConnectableModel source;
private IConnectableModel target;
/**
- * t��ģ��
*/
private LineConnectionModel connection;
/**
- * �����ж��Ƿ��ܹ�ִ��l��
*/
public boolean canExecute() {
-
if ( !validate() ) {
return false;
}
-
return true;
}
@@ -66,29 +52,18 @@
}
/**
- * ��֤l�ӵ�Դ��Ŀ���Ƿ���Խ���l��
- * <p>
- * ��֤����
- * <ul>
- * <li>1��
- * </ul>
- * </p>
- *
- * @see com.tongtech.ti.tisd.project.converter.ui.util.validity.Validator#validate()
*/
public boolean validate() {
return true;
}
/**
- * @return ���� source��
*/
public IConnectableModel getSource() {
return source;
}
/**
- * @return ���� target��
*/
public IConnectableModel getTarget() {
return target;
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/DeleteConnectionCommand.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/DeleteConnectionCommand.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/DeleteConnectionCommand.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -5,10 +5,7 @@
import org.jboss.tools.smooks.ui.gef.model.IConnectableModel;
/**
- * l��ɾ������
*
- * @author wangpeng created 2007-4-5 14:51:58
- *
*/
public class DeleteConnectionCommand extends Command {
@@ -28,15 +25,12 @@
}
/**
- * @return ���� connectionModel��
*/
public AbstractStructuredDataConnectionModel getConnectionModel() {
return connectionModel;
}
/**
- * @param connectionModel
- * Ҫ���õ� connectionModel��
*/
public void setConnectionModel(
AbstractStructuredDataConnectionModel connectionModel) {
@@ -44,30 +38,24 @@
}
/**
- * @return ���� sourceNode��
*/
public IConnectableModel getSourceNode() {
return sourceNode;
}
/**
- * @param sourceNode
- * Ҫ���õ� sourceNode��
*/
public void setSourceNode(IConnectableModel sourceNode) {
this.sourceNode = sourceNode;
}
/**
- * @return ���� targetNode��
*/
public IConnectableModel getTargetNode() {
return targetNode;
}
/**
- * @param targetNode
- * Ҫ���õ� targetNode��
*/
public void setTargetNode(IConnectableModel targetNode) {
this.targetNode = targetNode;
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataEditPart.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataEditPart.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataEditPart.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -40,10 +40,7 @@
import org.jboss.tools.smooks.ui.gef.util.figures.FillLayout;
/**
- * ������ṹ��EditPart
*
- * @author wangpeng 2007-3-20 15:53:37
- *
*/
public class StructuredDataEditPart extends AbstractStructuredDataEditPart
implements GraphicsConstants, IConnectableEditPart {
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ExpandableGraphNodeContentFigure.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ExpandableGraphNodeContentFigure.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ExpandableGraphNodeContentFigure.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -65,7 +65,6 @@
}
/**
- * @param interactor Ҫ���õ� interactor��
*/
public void setInteractor(IFigure interactor) {
this.interactor = interactor;
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GroupFigure.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GroupFigure.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GroupFigure.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -145,7 +145,6 @@
}
/**
- * ���ظ�Group��
* @return
*/
public String getTextName() {
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataConnectionModel.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataConnectionModel.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataConnectionModel.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -35,7 +35,6 @@
}
/**
- * t�ӵ���ʼ����ӵ�source
*/
public void attachSource() {
if (!source.getModelSourceConnections().contains(this)) {
@@ -44,7 +43,6 @@
}
/**
- * t�ӵ�β����ӵ�target
*/
public void attachTarget() {
if (!target.getModelTargetConnections().contains(this)) {
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataModel.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataModel.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataModel.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -130,79 +130,34 @@
return typeString;
}
- /**
- * ���ýڵ��Java���͡��������Ҫ������ȫ�����ᅣ1�7code>java.lang.String</code>
- * ���������Ǹ������ͣ�������Ϊ<code>null</code>��
- *
- * @param typeString
- * �ڵ��Java����
- */
public void setTypeString(String typeString) {
this.typeString = typeString;
}
/**
- * ����Ԫ�ض����Ӵ�
*/
protected List children = new ArrayList();
private AbstractStructuredDataModel parent = null;
- /**
- * ��ģ�������ü������ģ�ͷ���ı�ʱ����������Ѹı�֪ͨEditPart��
- * EditPart��Ҫʵ��PropertyChangeListener�ӿ�
- * �����������ʱ�����PropertyChangeListener�ӿ��е�peopertyChange����4��ɴ����ᅣ1�7
- */
private PropertyChangeSupport listeners = new PropertyChangeSupport(this);
- /**
- * Ϊģ����Ӽ����ᅣ1�7
- *
- * @param listener
- * PropertyChangeSupport ������
- */
public void addPropertyChangeListener(PropertyChangeListener listener) {
listeners.addPropertyChangeListener(listener);
}
- /**
- * ɾ��ģ�͵ļ�����
- *
- * @param listener
- * PropertyChangeSupport ������
- */
public void removePropertyChangeListener(PropertyChangeListener listener) {
listeners.removePropertyChangeListener(listener);
}
- /**
- * ��ģ�ͷ���仯ʱ��Ҫ�������ᅣ1�7����������
- *
- * @param propName
- * �ı�����ᅣ1�7
- * @param oldValue
- * @param newValue
- */
public void firePropertyChange(String propName, Object oldValue,
Object newValue) {
listeners.firePropertyChange(propName, oldValue, newValue);
}
- /**
- * ���ص�ǰģ�����е���Ԫ�ء����ǰģ��û����Ԫ�ᅣ1�7
- *
- * @return ��ǰģ�����е���Ԫ��
- */
public List getChildren() {
return children;
}
-
- /**
- * �����Ԫ�أ���֪ͨģ����Ԫ�ط���ı�
- *
- * @param child
- * ��Ԫ��
- */
public void addChild(Object child) {
if (child == null)
return;
@@ -249,10 +204,6 @@
}
/**
- * ɾ����Ԫ�أ���֪ͨģ����Ԫ�ط���ıᅣ1�7
- *
- * @param child
- * ��Ԫ��
*/
public void removeChild(Object child) {
if (child == null || children == null)
@@ -271,9 +222,6 @@
* @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
*/
public Object getEditableValue() {
-
- // ����ģ��������Ϊ�ɱ༭������ֵ
- //
return this;
}
@@ -284,8 +232,6 @@
*/
public IPropertyDescriptor[] getPropertyDescriptors() {
- // ��Ϊ�ڳ���ģ���з���null������쳣��������ﷵ��һ��0���ȵ�����
- //
return new IPropertyDescriptor[0];
}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/DataObjectContainerModel.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/DataObjectContainerModel.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/DataObjectContainerModel.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -3,87 +3,38 @@
import org.eclipse.draw2d.geometry.Rectangle;
/**
- * �����ݶ��������ģ�ͣ��������������ݶ���
* @deprecated
- * @author wangpeng 2007-3-21 13:53:30
*
*/
public class DataObjectContainerModel extends AbstractStructuredDataModel {
- /**
- * Դ��ݶ�������
- */
public static final int SOURCE_DATA_OBJECT_CONTAINER = 1;
- /**
- * Ŀ����ݶ�������
- */
public static final int TARGET_DATA_OBJECT_CIBTAUBER = 2;
- /**
- * ��ݶ�����������
- */
private String name;
- /**
- * �����ϵ�λ��
- */
private Rectangle constraint;
- /**
- * ��ݶ����������͡���}�����͵���ݶ�������
- * Դ��ݶ�������{@link DataObjectContainerModel#SOURCE_DATA_OBJECT_CONTAINER }
- * ��Ŀ����ݶ�������{@link DataObjectContainerModel#TARGET_DATA_OBJECT_CIBTAUBER }
- */
private int category = -1;
- /**
- * ������ݶ������������
- *
- * @return ��ݶ������������
- */
public int getCategory() {
return category;
}
- /**
- * ������ݶ������������
- * Դ��ݶ�������{@link DataObjectContainerModel#SOURCE_DATA_OBJECT_CONTAINER }
- * ��Ŀ����ݶ�������{@link DataObjectContainerModel#TARGET_DATA_OBJECT_CIBTAUBER }
- *
- * @param category ��ݶ�����������
- */
public void setCategory(int category) {
this.category = category;
}
- /**
- * ���������ڻ����ϵ�λ��
- *
- * @return �����ڻ����ϵ�λ��
- */
public Rectangle getConstraint() {
return constraint;
}
- /**
- * ���������ڻ����ϵ�λ��
- *
- * @param constraint �����ڻ����ϵ�λ��
- */
public void setConstraint(Rectangle constraint) {
this.constraint = constraint;
}
- /**
- * ������������
- * @return ��������
- */
public String getName() {
return name;
}
- /**
- * ������������
- * @param name ��������
- */
public void setName(String name) {
this.name = name;
}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/IConnectableModel.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/IConnectableModel.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/IConnectableModel.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -34,4 +34,8 @@
public void removeSourceConnection(Object connx);
public void removeTargetConnection(Object connx);
+
+ public boolean isSourceConnectWith(IConnectableModel target);
+
+ public boolean isTargetConnectWith(IConnectableModel source);
}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/RootModel.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/RootModel.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/RootModel.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -1,10 +1,7 @@
package org.jboss.tools.smooks.ui.gef.model;
/**
- * ͼ�ν���Ĭ�ϵĸ�����
- *
- * @author wangpeng 2007-3-20 16:35:20
- *
+ *@deprecated
*/
public class RootModel extends AbstractStructuredDataModel {
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataContentModel.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataContentModel.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataContentModel.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -5,137 +5,54 @@
import org.eclipse.draw2d.geometry.Rectangle;
-/**
- * ��ݶ��������ڽ����е�ģ�͡�
- * <p>
- * ��ģ�Ϳ���������ݶ����еļ������ԣ���(���Ե����֡�Java���͵���Ϣ������������û��Java�
- * ��͵ġ�<br>
- * ���ң����ڼ������ͣ�ֻ֧�����顣������Ϊֻ���������ȷ�е�������Ϣ�������JDK1.4�����������
- * �List�ȼ������ͣ�<br>
- * ��Ϊû��ȷ�е����ͣ����Բ���֧�֡�<br>
- * </p>
- *
- * @author wangpeng 2007-3-21 15:09:11
- */
public class StructuredDataContentModel extends AbstractStructuredDataModel
implements IConnectableModel {
public static final int DATA_OBJECT_NODE_CATEGORY_SOURCE = 1;
public static final int DATA_OBJECT_NODE_CATEGORY_TARGET = 2;
- /**
- * �ڵ��� - ������ݶ������Ե�����
- */
private String name;
- /**
- * �ڵ����� - ���Ǹ����Ե�Java���͡��������Ҫ������ȫ������
- * <code>java.lang.String</code>
���������Ǹ������ͣ�������Ϊ<code>null</code>
- * ��
- */
private String javaType;
- /**
- * �ڵ�����������Ǽ����ͻ��Ǹ������͡�complexTypeΪ<code>true</code>
- * ����ʾ�ڵ��Ǹ������ͣ� complexTypeΪ<code>false</code>����ʾ�ڵ��Ǽ����͡�
- */
private boolean isComplexType;
- /**
- * ����ڵ��Ǹ�ڵ㻹����ͨ�ڵ�
- */
private boolean isRootNode;
- /**
- * ����ڵ��Ƿ�Ϊ��������
- */
private boolean isListType;
- /**
- * ����ڵ��Ƿ�Ϊ��������
- */
private boolean isObject;
- /**
- * �����ϵ�λ��
- */
private Rectangle constraint;
- /**
- * ��ݶ���ڵ�ķ��࣬Ŀǰ�ķ�����Դ��ݶ���ڵ��Ŀ����ݶ���ڵ�
- *
- * @see #DATA_OBJECT_NODE_CATEGORY_SOURCE
- * @see #DATA_OBJECT_NODE_CATEGORY_TARGET
- */
private int nodeCategory = -1;
- /**
- * Դl�Ӽ�
- */
private List sourceConnections = new ArrayList();
- /**
- * Ŀ��l�Ӽ�
- */
private List targetConnections = new ArrayList();
- /**
- * ����ģ���ڻ����ϵ�λ��
- *
- * @return ģ���ڻ����ϵ�λ��
- */
public Rectangle getConstraint() {
return constraint;
}
- /**
- * ����ģ���ڻ����ϵ�λ��
- *
- * @param constraint
- * �����ϵ�λ��
- */
public void setConstraint(Rectangle constraint) {
this.constraint = constraint;
}
- /**
- * �жϽڵ��Ǹ������ͻ��Ǽ����͡�<code>true</code>����ʾ�ڵ��Ǹ������ͣ�
- * <code>false</code>����ʾ�ڵ��Ǽ����͡�
- *
- * @return �ڵ��Ǹ������ͻ��Ǽ����͡�
- */
public boolean isComplexType() {
return isComplexType;
}
- /**
- * ���ýڵ��Ǽ����ͻ��Ǹ������͡�<code>true</code>����ʾ�ڵ��Ǹ������ͣ�
- * <code>false</code>����ʾ�ڵ��Ǽ����͡�
- *
- * @param complexType
- * �ڵ��Ǹ��ӽڵ㻹�Ǽڵ㡣
- */
public void setComplexType(boolean complexType) {
this.isComplexType = complexType;
}
- /**
- * ���ؽڵ���
- *
- * @return �ڵ���
- */
public String getName() {
return name;
}
- /**
- * ���ýڵ���
- *
- * @param name
- * �ڵ���
- */
public void setName(String name) {
this.name = name;
}
@@ -157,38 +74,30 @@
}
/**
- * @return ���� isObject��
*/
public boolean isObject() {
return isObject;
}
/**
- * @param isObject
- * Ҫ���õ� isObject��
*/
public void setObject(boolean isObject) {
this.isObject = isObject;
}
/**
- * @return ���� nodeCategory��
*/
public int getNodeCategory() {
return nodeCategory;
}
/**
- * @param nodeCategory
- * Ҫ���õ� nodeCategory��
*/
public void setNodeCategory(int nodeCategory) {
this.nodeCategory = nodeCategory;
}
/**
- * ���Դl��
- *
* @param connx
*/
public void addSourceConnection(Object connx) {
@@ -198,8 +107,6 @@
}
/**
- * ���Ŀ��l��
- *
* @param connx
*/
public void addTargetConnection(Object connx) {
@@ -208,74 +115,35 @@
firePropertyChange(P_TARGET_CONNECTION, null, connx);
}
- /**
- * ����Դl��ģ��
- *
- * @return Դl��ģ��
- */
public List getModelSourceConnections() {
return sourceConnections;
}
- /**
- * ����Ŀ��l��ģ��
- *
- * @return Ŀ��l��ģ��
- */
public List getModelTargetConnections() {
return targetConnections;
}
- /**
- * �Ƴ�Դl��
- *
- * @param connx
- */
public void removeSourceConnection(Object connx) {
sourceConnections.remove(connx);
firePropertyChange(P_SOURCE_CONNECTION, connx, null);
}
- /**
- * �Ƴ�Ŀ��l��
- *
- * @param connx
- */
public void removeTargetConnection(Object connx) {
targetConnections.remove(connx);
firePropertyChange(P_TARGET_CONNECTION, connx, null);
}
- /**
- * �Ƚ�ͬһ�����ϵ�}��ڵ��Ƿ���ͬ
- */
public boolean equals(Object node) {
return super.equals(node);
- // // ��node����DataObjectNodeModel��ʵ��ؼ�
- // //
- // if ( !(node instanceof StructuredDataContentModel) ) {
- // return false;
- // }
- //
- // StructuredDataContentModel nodeModel =
- // (StructuredDataContentModel)node;
- //
- // if ( nodeModel.getName().equals(this.getName())
- // && nodeModel.isListType() == this.isListType()
- // && nodeModel.isComplexType() == this.isComplexType()
- // && nodeModel.getNodeCategory() == this.getNodeCategory()
- // && (
- // // ��˫�����и����Ҹ�����ͬ������˫����û�и������Ϊ�棬����Ϊ��
- // //
- // (nodeModel.getParent() != null && this.getParent() != null) &&
- // nodeModel.getParent().equals(this.getParent())
- // || (nodeModel.getParent() == null && this.getParent() == null)
- // ) ) {
- // return true;
- // }
- //
- // return false;
}
+
+ public boolean isSourceConnectWith(IConnectableModel target) {
+ throw new RuntimeException("Don't support this method currently");
+ }
+
+ public boolean isTargetConnectWith(IConnectableModel source) {
+ throw new RuntimeException("Don't support this method currently");
+ }
}
\ No newline at end of file
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataModel.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataModel.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataModel.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -98,4 +98,12 @@
public void setModelTargetConnections(List modelTargetConnections) {
this.modelTargetConnections = modelTargetConnections;
}
+
+ public boolean isSourceConnectWith(IConnectableModel target) {
+ throw new RuntimeException("Don't support this method currently");
+ }
+
+ public boolean isTargetConnectWith(IConnectableModel source) {
+ throw new RuntimeException("Don't support this method currently");
+ }
}
\ No newline at end of file
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/TreeItemRelationModel.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/TreeItemRelationModel.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/TreeItemRelationModel.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -11,6 +11,7 @@
package org.jboss.tools.smooks.ui.gef.model;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import org.eclipse.swt.widgets.TreeItem;
@@ -19,23 +20,25 @@
* @author Dart Peng
* @Date Jul 31, 2008
*/
-public class TreeItemRelationModel extends AbstractStructuredDataModel implements
IConnectableModel {
-
+public class TreeItemRelationModel extends AbstractStructuredDataModel
+ implements IConnectableModel {
+
public static final String PRO_TREE_ITEM_SELECTION_STATUS =
"__pro_treeitem_selection_status";
-
+
public static final String PRO_TREE_REPAINT = "__pro_tree_repaint";
-
+
TreeItem treeItem = null;
List<Object> modelSourceConnections = new ArrayList<Object>();
List<Object> modelTargetConnections = new ArrayList<Object>();
+
public TreeItem getTreeItem() {
return treeItem;
}
-
- public boolean isCollapse(){
+
+ public boolean isCollapse() {
TreeItem item = getTreeItem();
int y = Integer.MAX_VALUE;
- if(item != null){
+ if (item != null) {
y = item.getBounds().y;
}
return (y == 0);
@@ -55,7 +58,6 @@
this.firePropertyChange(P_TARGET_CONNECTION, null, connx);
}
-
public void removeSourceConnection(Object connx) {
this.getModelSourceConnections().remove(connx);
this.firePropertyChange(P_SOURCE_CONNECTION, connx, null);
@@ -82,4 +84,28 @@
this.modelTargetConnections = modelTargetConnections;
}
+ public boolean isSourceConnectWith(IConnectableModel target) {
+ List list = this.getModelSourceConnections();
+ for (Iterator iterator = list.iterator(); iterator.hasNext();) {
+ LineConnectionModel connection = (LineConnectionModel) iterator
+ .next();
+ if (connection.getTarget() == target) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean isTargetConnectWith(IConnectableModel source) {
+ List list = this.getModelTargetConnections();
+ for (Iterator iterator = list.iterator(); iterator.hasNext();) {
+ LineConnectionModel connection = (LineConnectionModel) iterator
+ .next();
+ if (connection.getSource() == source) {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -15,6 +15,13 @@
import org.jboss.tools.smooks.ui.gef.commands.ICommandMappingFactory;
import org.jboss.tools.smooks.ui.gef.model.IGraphicalModel;
+
+
+/**
+ * @deprecated
+ * @author Dart
+ *
+ */
public class RootGraphicsXYLayoutEditPolicy extends XYLayoutEditPolicy {
private ICommandMappingFactory mappingFactory = null;
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/LeftSourceAnchor.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/LeftSourceAnchor.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/LeftSourceAnchor.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -8,7 +8,7 @@
import org.eclipse.draw2d.geometry.Point;
/**
- * @author Administrator
+ * @author Dart
*
*/
public class LeftSourceAnchor extends ChopboxAnchor {
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/editparts/InteractorHelper.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/editparts/InteractorHelper.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/editparts/InteractorHelper.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -13,8 +13,10 @@
import org.jboss.tools.smooks.ui.gef.figures.IExpandable;
import org.jboss.tools.smooks.ui.gef.util.figures.Interactor;
-//hooks up an interactor with an edit part and the figure that needs to be expanded and
collapsed
-//
+/**
+ * @deprecated
+ *
+ */
public class InteractorHelper implements MouseListener {
protected boolean needToPerformDefaultExpansion = true;
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/ContainerLayout.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/ContainerLayout.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/ContainerLayout.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -10,7 +10,9 @@
import org.eclipse.draw2d.geometry.Rectangle;
import org.jboss.tools.smooks.ui.gef.figures.IExpandable;
import org.jboss.tools.smooks.ui.gef.figures.SpacingFigure;
-
+/**
+ * @deprecated
+ */
public class ContainerLayout extends AbstractLayout {
protected boolean isHorizontal;
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/FillLayout.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/FillLayout.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/FillLayout.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -8,6 +8,11 @@
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Rectangle;
+/**
+ * @deprecated
+ * @author dart
+ *
+ */
public class FillLayout extends AbstractLayout {
protected boolean isHorizontal = false;
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/IConnectedFigure.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/IConnectedFigure.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/IConnectedFigure.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -1,7 +1,10 @@
package org.jboss.tools.smooks.ui.gef.util.figures;
import org.eclipse.draw2d.IFigure;
-
+/**
+ * @deprecated
+ *
+ */
public interface IConnectedFigure extends IFigure {
public IFigure getConnectionFigure();
}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Interactor.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Interactor.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Interactor.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -6,7 +6,7 @@
import org.eclipse.draw2d.geometry.Rectangle;
/**
- * Interactor the +/- control commonly found in trees
+ * @deprecated
*/
public class Interactor extends RectangleFigure {
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Placeholder.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Placeholder.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Placeholder.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -3,6 +3,10 @@
import org.eclipse.draw2d.RectangleFigure;
import org.eclipse.draw2d.geometry.Dimension;
+/**
+ * @deprecated
+ *
+ */
public class Placeholder extends RectangleFigure {
public Placeholder() {
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/modelparser/SmooksConfigurationFileGenerateContext.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/modelparser/SmooksConfigurationFileGenerateContext.java 2008-10-07
05:19:09 UTC (rev 10701)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/modelparser/SmooksConfigurationFileGenerateContext.java 2008-10-07
07:18:37 UTC (rev 10702)
@@ -17,6 +17,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.swt.widgets.Shell;
import org.jboss.tools.smooks.graphical.Param;
import org.jboss.tools.smooks.model.SmooksResourceListType;
import org.jboss.tools.smooks.ui.gef.model.GraphRootModel;
@@ -37,6 +38,8 @@
protected IFile smooksConfigFile = null;
protected EditingDomain domain;
+ private Shell shell;
+
protected String smooksType = null;
/**
* @return the sourceDataTypeID
@@ -143,5 +146,11 @@
this.properties.put(key, properties.get(key));
}
}
+ public Shell getShell() {
+ return shell;
+ }
+ public void setShell(Shell shell) {
+ this.shell = shell;
+ }
}