geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r356273 - in /geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui: sections/ wizards/
Date Mon, 12 Dec 2005 16:22:31 GMT
Author: sppatel
Date: Mon Dec 12 08:22:17 2005
New Revision: 356273

URL: http://svn.apache.org/viewcvs?rev=356273&view=rev
Log:
move ui code to emf.edit

Modified:
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/BeansSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DependencySection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/GBeanRefSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/GBeanSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/SecuritySection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServiceRefSection.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DynamicAddEditWizard.java

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/BeansSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/BeansSection.java?rev=356273&r1=356272&r2=356273&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/BeansSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/BeansSection.java
Mon Dec 12 08:22:17 2005
@@ -15,13 +15,18 @@
  */
 package org.apache.geronimo.ui.sections;
 
+import java.util.Collections;
+import java.util.List;
+
 import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EFactory;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.openejb.xml.ns.openejb.jar.JarPackage;
 
 public class BeansSection extends DynamicTableSection {
 
@@ -92,5 +97,13 @@
         // TODO Auto-generated method stub
         return null;
     }
+    
+    public List getFactories() {
+    	return Collections.EMPTY_LIST;
+    }
+
+	public EClass getTableEntryObjectType() {
+		return JarPackage.eINSTANCE.getEnterpriseBeansType();
+	}
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DependencySection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DependencySection.java?rev=356273&r1=356272&r2=356273&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DependencySection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DependencySection.java
Mon Dec 12 08:22:17 2005
@@ -15,6 +15,9 @@
  */
 package org.apache.geronimo.ui.sections;
 
+import java.util.Collections;
+import java.util.List;
+
 import org.apache.geronimo.ui.internal.GeronimoUIPlugin;
 import org.apache.geronimo.ui.internal.Messages;
 import org.apache.geronimo.ui.wizards.DependencyWizard;
@@ -23,6 +26,7 @@
 import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EFactory;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
@@ -154,9 +158,8 @@
 
     }
 
-    /*
-     * (non-Javadoc)
-     * 
+
+    /* (non-Javadoc)
      * @see org.apache.geronimo.ui.sections.DynamicTableSection#getTableText(org.eclipse.emf.ecore.EObject)
      */
     public String[] getTableText(EObject eObject) {
@@ -176,5 +179,13 @@
         return GeronimoUIPlugin.imageDescriptorFromPlugin(
                 "org.eclipse.jdt.ui", "icons/full/obj16/jar_obj.gif");
     }
+    
+    public List getFactories() {
+    	return Collections.EMPTY_LIST;
+    }
+
+	public EClass getTableEntryObjectType() {
+		return DeploymentPackage.eINSTANCE.getDependencyType();
+	}
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java?rev=356273&r1=356272&r2=356273&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/DynamicTableSection.java
Mon Dec 12 08:22:17 2005
@@ -20,19 +20,26 @@
 
 import org.apache.geronimo.ui.internal.GeronimoUIPlugin;
 import org.apache.geronimo.ui.internal.Messages;
+import org.apache.geronimo.ui.internal.Trace;
 import org.apache.geronimo.ui.wizards.DynamicAddEditWizard;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EFactory;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
 import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.ColumnWeightData;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableLayout;
 import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.swt.SWT;
@@ -85,18 +92,80 @@
 		super(parent, toolkit, style, plan);
 	}
 
+	/**
+	 * @deprecated
+	 *
+	 */
 	public void create() {
 		if (isValid()) {
 			createClient();
 		}
 	}
+	
+	public void createNew() {
+		if(isValidNew()) {
+			createClientNew();
+		} else {
+			Trace.trace(Trace.SEVERE, "Could not create client, DynamicTableSection.isValid() == false");
+		}
+		
+	}
+	
+	private boolean isValidNew() {
+		return getTableEntryObjectType() != null && getTableColumnNames() != null;
+	}
 
+	/**
+	 * @deprecated
+	 */
 	private boolean isValid() {
 		return getEFactory() != null && getEReference() != null
 				&& getTableColumnEAttributes() != null
 				&& getTableColumnNames() != null;
 	}
 
+	public void createClientNew() {
+		
+		getSection().setText(getTitle());
+		getSection().setDescription(getDescription());
+		getSection().setLayoutData(getSectionLayoutData());
+		Composite composite = createTableComposite(getSection());
+		getSection().setClient(composite);
+		createTable(composite);
+
+		ComposedAdapterFactory caf = new ComposedAdapterFactory(getFactories());
+
+		tableViewer = new TableViewer(table);
+		tableViewer.setContentProvider(new AdapterFactoryContentProvider(caf));
+		tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(caf));
+		tableViewer.setInput(plan);
+
+		tableViewer.addFilter(new ViewerFilter() {
+			public boolean select(Viewer viewer, Object parentElement,
+					Object element) {
+				return getTableEntryObjectType().isInstance(element);
+			}
+		});
+
+		if (getTableColumnNames().length > 0) {
+			tableViewer.setColumnProperties(getTableColumnNames());
+		}
+
+		Composite buttonComp = createButtonComposite(composite);
+		createAddButton(toolkit, buttonComp);
+		createRemoveButton(toolkit, buttonComp);
+		createEditButton(toolkit, buttonComp);
+		
+	}
+
+	abstract public List getFactories();
+
+	abstract public EClass getTableEntryObjectType();
+
+	/**
+	 * @deprecated
+	 * 
+	 */
 	public void createClient() {
 
 		getSection().setText(getTitle());
@@ -146,6 +215,9 @@
 		return layout;
 	}
 
+	/**
+	 * @deprecated
+	 */
 	protected void fillTableItems() {
 		EList list = (EList) plan.eGet(getEReference());
 
@@ -197,8 +269,8 @@
 	}
 
 	protected void createRemoveButton(FormToolkit toolkit, Composite buttonComp) {
-		removeButton = toolkit
-				.createButton(buttonComp, Messages.remove, SWT.NONE);
+		removeButton = toolkit.createButton(buttonComp, Messages.remove,
+				SWT.NONE);
 		removeButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
 				int[] selectedIndices = table.getSelectionIndices();
@@ -211,7 +283,8 @@
 				}
 			}
 		});
-		removeButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		removeButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
+				false));
 	}
 
 	protected void createAddButton(FormToolkit toolkit, Composite buttonComp) {
@@ -233,7 +306,8 @@
 			}
 		});
 
-		addButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		addButton
+				.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
 	}
 
 	protected void createEditButton(FormToolkit toolkit, Composite buttonComp) {
@@ -255,16 +329,22 @@
 						dialog.open();
 						if (dialog.getReturnCode() == Dialog.OK) {
 							markDirty();
-							//TODO notify listeners
+							// TODO notify listeners
 						}
 					}
 				}
 			}
 		});
 
-		editButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		editButton
+				.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
 	}
 
+	/**
+	 * @deprecated
+	 * @param eObject
+	 * @return
+	 */
 	public String[] getTableText(EObject eObject) {
 		List tableText = new ArrayList();
 		for (int i = 0; i < getTableColumnEAttributes().length; i++) {
@@ -282,6 +362,10 @@
 		return (String[]) tableText.toArray(new String[tableText.size()]);
 	}
 
+	/**
+	 * @deprecated
+	 * @return
+	 */
 	public Image getImage() {
 		if (image == null) {
 			ImageDescriptor descriptor = getImageDescriptor();
@@ -292,6 +376,10 @@
 		return image;
 	}
 
+	/**
+	 * @deprecated
+	 * @return
+	 */
 	public ImageDescriptor getImageDescriptor() {
 		return defaultImgDesc;
 	}
@@ -319,11 +407,13 @@
 	abstract public String getDescription();
 
 	/**
+	 * @deprecated
 	 * @return
 	 */
 	abstract public EFactory getEFactory();
 
 	/**
+	 * @deprecated
 	 * @return
 	 */
 	abstract public EReference getEReference();
@@ -334,6 +424,7 @@
 	abstract public String[] getTableColumnNames();
 
 	/**
+	 * @deprecated
 	 * @return
 	 */
 	abstract public EAttribute[] getTableColumnEAttributes();;
@@ -341,6 +432,6 @@
 	/**
 	 * @return
 	 */
-	abstract public Wizard getWizard();	
+	abstract public Wizard getWizard();
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java?rev=356273&r1=356272&r2=356273&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbLocalRefSection.java
Mon Dec 12 08:22:17 2005
@@ -15,12 +15,16 @@
  */
 package org.apache.geronimo.ui.sections;
 
+import java.util.Collections;
+import java.util.List;
+
 import org.apache.geronimo.ui.internal.GeronimoUIPlugin;
 import org.apache.geronimo.ui.internal.Messages;
 import org.apache.geronimo.ui.wizards.EjbLocalRefWizard;
 import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
 import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EFactory;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
@@ -114,5 +118,13 @@
         return GeronimoUIPlugin.imageDescriptorFromPlugin(
                 "org.eclipse.jst.j2ee", "icons/full/obj16/ejb_local_ref_obj.gif");
     }
+    
+    public List getFactories() {
+    	return Collections.EMPTY_LIST;
+    }
+
+	public EClass getTableEntryObjectType() {
+		return NamingPackage.eINSTANCE.getEjbLocalRefType();
+	}
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java?rev=356273&r1=356272&r2=356273&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/EjbRefSection.java
Mon Dec 12 08:22:17 2005
@@ -15,12 +15,16 @@
  */
 package org.apache.geronimo.ui.sections;
 
+import java.util.Collections;
+import java.util.List;
+
 import org.apache.geronimo.ui.internal.GeronimoUIPlugin;
 import org.apache.geronimo.ui.internal.Messages;
 import org.apache.geronimo.ui.wizards.EjbRefWizard;
 import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
 import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EFactory;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
@@ -129,5 +133,13 @@
         return GeronimoUIPlugin.imageDescriptorFromPlugin(
                 "org.eclipse.jst.j2ee", "icons/full/obj16/ejbRef_obj.gif");
     }
+    
+    public List getFactories() {
+    	return Collections.EMPTY_LIST;
+    }
+
+	public EClass getTableEntryObjectType() {
+		return NamingPackage.eINSTANCE.getEjbRefType();
+	}
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/GBeanRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/GBeanRefSection.java?rev=356273&r1=356272&r2=356273&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/GBeanRefSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/GBeanRefSection.java
Mon Dec 12 08:22:17 2005
@@ -15,11 +15,15 @@
  */
 package org.apache.geronimo.ui.sections;
 
+import java.util.Collections;
+import java.util.List;
+
 import org.apache.geronimo.ui.internal.Messages;
 import org.apache.geronimo.ui.wizards.GBeanRefWizard;
 import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
 import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EFactory;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
@@ -92,5 +96,14 @@
 	public Wizard getWizard() {
 		return new GBeanRefWizard(this);
 	}
+	
+	public List getFactories() {
+    	return Collections.EMPTY_LIST;
+    }
+
+	public EClass getTableEntryObjectType() {
+		return NamingPackage.eINSTANCE.getGbeanRefType();
+	}
+	
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/GBeanSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/GBeanSection.java?rev=356273&r1=356272&r2=356273&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/GBeanSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/GBeanSection.java
Mon Dec 12 08:22:17 2005
@@ -15,11 +15,15 @@
  */
 package org.apache.geronimo.ui.sections;
 
+import java.util.Collections;
+import java.util.List;
+
 import org.apache.geronimo.ui.internal.Messages;
 import org.apache.geronimo.ui.wizards.GBeanWizard;
 import org.apache.geronimo.xml.ns.deployment.DeploymentFactory;
 import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
 import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EFactory;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
@@ -110,5 +114,13 @@
     public Wizard getWizard() {
         return new GBeanWizard(this);
     }
+    
+    public List getFactories() {
+    	return Collections.EMPTY_LIST;
+    }
+
+	public EClass getTableEntryObjectType() {
+		return DeploymentPackage.eINSTANCE.getGbeanType();
+	}
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java?rev=356273&r1=356272&r2=356273&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceEnvRefSection.java
Mon Dec 12 08:22:17 2005
@@ -15,12 +15,16 @@
  */
 package org.apache.geronimo.ui.sections;
 
+import java.util.Collections;
+import java.util.List;
+
 import org.apache.geronimo.ui.internal.GeronimoUIPlugin;
 import org.apache.geronimo.ui.internal.Messages;
 import org.apache.geronimo.ui.wizards.ResourceEnvRefWizard;
 import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
 import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EFactory;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
@@ -114,5 +118,13 @@
         return GeronimoUIPlugin.imageDescriptorFromPlugin(
                 "org.eclipse.jst.j2ee", "icons/full/obj16/res_env_ref_obj.gif");
     }
+    
+    public List getFactories() {
+    	return Collections.EMPTY_LIST;
+    }
+
+	public EClass getTableEntryObjectType() {
+		return NamingPackage.eINSTANCE.getResourceEnvRefType();
+	}
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java?rev=356273&r1=356272&r2=356273&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ResourceRefSection.java
Mon Dec 12 08:22:17 2005
@@ -16,6 +16,7 @@
 package org.apache.geronimo.ui.sections;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 import org.apache.geronimo.ui.internal.GeronimoUIPlugin;
@@ -27,6 +28,7 @@
 import org.apache.geronimo.xml.ns.naming.provider.NamingItemProviderAdapterFactory;
 import org.eclipse.emf.common.notify.AdapterFactory;
 import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EFactory;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
@@ -46,17 +48,18 @@
     EReference resourceRefERef;
     
     AdapterFactory factory;
+    
 
     public ResourceRefSection(EObject plan, Composite parent,
             FormToolkit toolkit, int style, EReference resourceRefERef, AdapterFactory factory)
{
         super(plan, parent, toolkit, style);
         this.resourceRefERef = resourceRefERef;
         this.factory = factory;
-        //create();
-        super.createClient();
+        createNew();
+        //super.createClient();
     }
     
-    public void createClient() {
+    /*public void createClient() {
 
 		getSection().setText(getTitle());
 		getSection().setDescription(getDescription());
@@ -84,7 +87,7 @@
 						element);
 			}
 		});
-
+		
 		if (getTableColumnNames().length > 0) {
 			tableViewer.setColumnProperties(getTableColumnNames());
 		}
@@ -94,9 +97,7 @@
 		createRemoveButton(toolkit, buttonComp);
 		createEditButton(toolkit, buttonComp);
     
-	}
-
-
+	}*/
 
     /*
      * (non-Javadoc)
@@ -177,5 +178,16 @@
         return GeronimoUIPlugin.imageDescriptorFromPlugin(
                 "org.eclipse.jst.j2ee", "icons/full/obj16/resourceRef_obj.gif");
     }
+    
+    public List getFactories() {
+    	List factories = new ArrayList();
+		factories.add(new WebItemProviderAdapterFactory());
+		factories.add(new NamingItemProviderAdapterFactory());
+		return factories;
+    }
+
+	public EClass getTableEntryObjectType() {
+		return NamingPackage.eINSTANCE.getResourceRefType();
+	}
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/SecuritySection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/SecuritySection.java?rev=356273&r1=356272&r2=356273&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/SecuritySection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/SecuritySection.java
Mon Dec 12 08:22:17 2005
@@ -15,6 +15,9 @@
  */
 package org.apache.geronimo.ui.sections;
 
+import java.util.Collections;
+import java.util.List;
+
 import org.apache.geronimo.ui.internal.GeronimoUIPlugin;
 import org.apache.geronimo.ui.internal.Messages;
 import org.apache.geronimo.ui.wizards.SecurityRoleWizard;
@@ -26,6 +29,7 @@
 import org.apache.geronimo.xml.ns.security.SecurityType;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EFactory;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
@@ -126,6 +130,14 @@
     protected void configureSection(Section section) {
         section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
     }
+    
+    public List getFactories() {
+    	return Collections.EMPTY_LIST;
+    }
+
+	public EClass getTableEntryObjectType() {
+		return SecurityPackage.eINSTANCE.getRoleType();
+	}
 
     /*
      * (non-Javadoc)

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServiceRefSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServiceRefSection.java?rev=356273&r1=356272&r2=356273&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServiceRefSection.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServiceRefSection.java
Mon Dec 12 08:22:17 2005
@@ -15,11 +15,15 @@
  */
 package org.apache.geronimo.ui.sections;
 
+import java.util.Collections;
+import java.util.List;
+
 import org.apache.geronimo.ui.internal.Messages;
 import org.apache.geronimo.ui.wizards.ServiceRefWizard;
 import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
 import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EFactory;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EReference;
@@ -86,6 +90,14 @@
 	 */
 	public Wizard getWizard() {
 		return new ServiceRefWizard(this);
+	}
+	
+    public List getFactories() {
+    	return Collections.EMPTY_LIST;
+    }
+
+	public EClass getTableEntryObjectType() {
+		return NamingPackage.eINSTANCE.getServiceRefType();
 	}
 
 }

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DynamicAddEditWizard.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DynamicAddEditWizard.java?rev=356273&r1=356272&r2=356273&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DynamicAddEditWizard.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/DynamicAddEditWizard.java
Mon Dec 12 08:22:17 2005
@@ -91,7 +91,7 @@
         
         processEAttributes(page);
 
-        String[] tableText = section.getTableText(eObject);
+        /*String[] tableText = section.getTableText(eObject);
 
         if (isNew) {
             TableItem item = new TableItem(section.getTableViewer().getTable(),
@@ -106,7 +106,7 @@
                         index);
                 item.setText(tableText);
             }
-        }
+        }*/
 
         return true;
     }



Mime
View raw message