Author: DartPeng
Date: 2010-02-05 00:34:25 -0500 (Fri, 05 Feb 2010)
New Revision: 20136
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSection.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java
Log:
JBIDE-5726
Disable the text/button controls of Property and Setter Method.
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java 2010-02-05
03:46:46 UTC (rev 20135)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java 2010-02-05
05:34:25 UTC (rev 20136)
@@ -13,7 +13,9 @@
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
@@ -63,8 +65,18 @@
EObject container = ((EObject) model).eContainer();
String classString = getClassString(model);
if (classString != null) {
- return SmooksUIUtils.createJavaPropertySearchFieldEditor(classString, container,
parent, toolkit,
+ AttributeFieldEditPart editPart =
SmooksUIUtils.createJavaPropertySearchFieldEditor(classString, container, parent,
toolkit,
propertyDescriptor, getPropertiesSearchButtonName(), (EObject) model);
+ Composite composite = (Composite) editPart.getContentControl();
+ Control[] children = composite.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ Control child = children[i];
+ if(child instanceof Button){
+ child.setEnabled(false);
+ }
+ }
+ editPart.getContentControl().setEnabled(false);
+ return editPart;
}
}
return null;
@@ -80,8 +92,18 @@
EObject container = ((EObject) model).eContainer();
String classString = getClassString(model);
if (classString != null) {
- return SmooksUIUtils.createJavaMethodSearchFieldEditor(classString, container,
parent, toolkit,
+ AttributeFieldEditPart editPart =
SmooksUIUtils.createJavaMethodSearchFieldEditor(classString, container, parent, toolkit,
propertyDescriptor, getMethodsSearchButtonName(), (EObject) model);
+ Composite composite = (Composite) editPart.getContentControl();
+ Control[] children = composite.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ Control child = children[i];
+ if(child instanceof Button){
+ child.setEnabled(false);
+ }
+ }
+ editPart.getContentControl().setEnabled(false);
+ return editPart;
}
}
return null;
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSection.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSection.java 2010-02-05
03:46:46 UTC (rev 20135)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSection.java 2010-02-05
05:34:25 UTC (rev 20136)
@@ -67,6 +67,8 @@
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
+ gridLayout.horizontalSpacing = 13;
+ gridLayout.verticalSpacing = 20;
controlComposite.setLayout(gridLayout);
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java 2010-02-05
03:46:46 UTC (rev 20135)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java 2010-02-05
05:34:25 UTC (rev 20136)
@@ -119,6 +119,8 @@
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
+ gridLayout.horizontalSpacing = 13;
+ gridLayout.verticalSpacing = 20;
controlComposite.setLayout(gridLayout);
Show replies by date