Author: DartPeng
Date: 2009-04-09 06:40:55 -0400 (Thu, 09 Apr 2009)
New Revision: 14626
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java
Log:
disable the buttons
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java 2009-04-09
09:45:28 UTC (rev 14625)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java 2009-04-09
10:40:55 UTC (rev 14626)
@@ -200,22 +200,22 @@
hookButtons();
}
- protected List<Object> getViewerSelections() {
+ protected List<?> getViewerSelections() {
IStructuredSelection selections = (IStructuredSelection)
smooksTreeViewer.getSelection();
- List l = selections.toList();
- List<Object> nl = new ArrayList<Object>();
- for (Iterator<?> iterator = l.iterator(); iterator.hasNext();) {
- Object object = (Object) iterator.next();
- // object = AdapterFactoryEditingDomain.unwrap(object);
- nl.add(object);
- }
- return l;
+ return selections.toList();
+// List<Object> nl = new ArrayList<Object>();
+// for (Iterator<?> iterator = l.iterator(); iterator.hasNext();) {
+// Object object = (Object) iterator.next();
+// // object = AdapterFactoryEditingDomain.unwrap(object);
+// nl.add(object);
+// }
+// return l;
}
private void hookButtons() {
removeButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- List<Object> list = getViewerSelections();
+ List<?> list = getViewerSelections();
CompoundCommand ccommand = new CompoundCommand();
for (Iterator<?> iterator = list.iterator(); iterator.hasNext();) {
Object object = (Object) iterator.next();
@@ -231,7 +231,7 @@
downButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- List<Object> list = getViewerSelections();
+ List<?> list = getViewerSelections();
if(list.size() == 1){
Object obj = list.get(0);
EObject v = (EObject) AdapterFactoryEditingDomain.unwrap(obj);
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java 2009-04-09
09:45:28 UTC (rev 14625)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java 2009-04-09
10:40:55 UTC (rev 14626)
@@ -256,7 +256,7 @@
final IItemPropertyDescriptor itemPropertyDescriptor) {
String displayName = itemPropertyDescriptor.getDisplayName(getModel());
formToolKit.createLabel(propertyComposite, displayName + " :");
- final Spinner spinner = new Spinner(propertyComposite, SWT.NONE);
+ final Spinner spinner = new Spinner(propertyComposite, SWT.BORDER);
Object value = itemPropertyDescriptor.getPropertyValue(getModel());
if (value != null && value instanceof PropertyValueWrapper) {
Object editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());