Author: DartPeng
Date: 2009-04-10 06:57:53 -0400 (Fri, 10 Apr 2009)
New Revision: 14664
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ParamTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
Log:
commit codes of new smooks editor
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ParamTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ParamTypeUICreator.java 2009-04-10
10:55:27 UTC (rev 14663)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ParamTypeUICreator.java 2009-04-10
10:57:53 UTC (rev 14664)
@@ -46,5 +46,6 @@
public void createExtendUI(AdapterFactoryEditingDomain editingdomain, FormToolkit
toolkit,
Composite parent, Object model) {
SmooksUIUtils.createTextFieldEditor("Value", editingdomain, toolkit, parent,
model);
+ SmooksUIUtils.createCDATAFieldEditor("CDATA", editingdomain, toolkit, parent,
model);
}
}
\ No newline at end of file
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-04-10
10:55:27 UTC (rev 14663)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-04-10
10:57:53 UTC (rev 14664)
@@ -10,15 +10,26 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.uitls;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.FeatureMapUtil;
import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.RemoveCommand;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor.PropertyValueWrapper;
@@ -77,7 +88,7 @@
}
String text = SmooksModelUtils.getAnyTypeText((AnyType) fm);
if (!valueText.getText().equals(text)) {
- SmooksModelUtils.setTextToSmooksType(fEditingDomain, (AnyType) fm, text);
+ SmooksModelUtils.setTextToSmooksType(fEditingDomain,(AnyType) fm, text);
}
}
});
@@ -110,43 +121,15 @@
}
String text = SmooksModelUtils.getAnyTypeText((AnyType) fm);
if (!cdataText.getText().equals(text)) {
- SmooksModelUtils.setCDATAToSmooksType(fEditingDomain, (AnyType) fm, text);
+ SmooksModelUtils.setCDATAToSmooksType(fEditingDomain,(AnyType) fm, text);
}
}
});
}
- public static void createCommentFieldEditor(String label,
- AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent,
- Object model) {
-// Label label1 = toolkit.createLabel(parent, label + " :");
-// GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
-// label1.setLayoutData(gd);
-// gd = new GridData(GridData.FILL_HORIZONTAL);
-// final Text cdataText = toolkit.createText(parent, "", SWT.MULTI |
SWT.V_SCROLL);
-// gd = new GridData(GridData.FILL_HORIZONTAL);
-// gd.heightHint = 300;
-// cdataText.setLayoutData(gd);
-//
-// if (model instanceof AnyType) {
-// String cdata = SmooksModelUtils.getAnyTypeCDATA((AnyType) model);
-// if (cdata != null) {
-// cdataText.setText(cdata);
-// }
-// }
-// final Object fm = model;
-// final AdapterFactoryEditingDomain fEditingDomain = editingdomain;
-// cdataText.addModifyListener(new ModifyListener() {
-// public void modifyText(ModifyEvent e) {
-// if (!(fm instanceof AnyType)) {
-// return;
-// }
-// String text = SmooksModelUtils.getAnyTypeText((AnyType) fm);
-// if (!cdataText.getText().equals(text)) {
-// SmooksModelUtils.set(fEditingDomain, (AnyType) fm, text);
-// }
-// }
-// });
+ public static void createCommentFieldEditor(String label, FormToolkit toolkit,
+ Composite parent, Object model) {
+
}
public static Composite createJavaTypeSearchFieldEditor(Composite parent, FormToolkit
toolkit,
Show replies by date