geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r366929 - in /geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui: sections/ wizards/
Date Sat, 07 Jan 2006 21:45:07 GMT
Author: sppatel
Date: Sat Jan  7 13:45:02 2006
New Revision: 366929

URL: http://svn.apache.org/viewcvs?rev=366929&view=rev
Log:
fix sec input/filter

Modified:
    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/SecurityRoleWizard.java

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=366929&r1=366928&r2=366929&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
Sat Jan  7 13:45:02 2006
@@ -15,17 +15,12 @@
  */
 package org.apache.geronimo.ui.sections;
 
-import java.util.ArrayList;
 import java.util.List;
 
-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;
@@ -33,7 +28,6 @@
 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;
@@ -45,7 +39,6 @@
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -59,16 +52,10 @@
 
 public abstract class DynamicTableSection extends AbstractSectionPart {
 
-	private Image image;
-
-	protected Table table;
+	private Table table;
 
 	protected TableViewer tableViewer;
 
-	private ImageDescriptor defaultImgDesc = GeronimoUIPlugin
-			.imageDescriptorFromPlugin("org.apache.geronimo.ui",
-					"icons/obj16/geronimo.gif");
-
 	Button addButton;
 
 	Button editButton;
@@ -114,19 +101,19 @@
 		getSection().setLayoutData(getSectionLayoutData());
 		Composite composite = createTableComposite(getSection());
 		getSection().setClient(composite);
-		createTable(composite);
+		table = createTable(composite);
 
 		ComposedAdapterFactory caf = new ComposedAdapterFactory(getFactories());
 
-		tableViewer = new TableViewer(table);
+		tableViewer = new TableViewer(getTable());
 		tableViewer.setContentProvider(new AdapterFactoryContentProvider(caf));
 		tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(caf));
-		tableViewer.setInput(plan);
+		tableViewer.setInput(getInput());
 
 		tableViewer.addFilter(new ViewerFilter() {
 			public boolean select(Viewer viewer, Object parentElement,
 					Object element) {
-				return getTableEntryObjectType().isInstance(element);
+				return DynamicTableSection.this.filter(viewer, parentElement, element);
 			}
 		});
 
@@ -141,6 +128,14 @@
 
 	}
 
+	protected Object getInput() {
+		return getPlan();
+	}
+	
+	protected boolean filter(Viewer viewer, Object parentElement, Object element) {
+		return getTableEntryObjectType().isInstance(element);
+	}
+
 	abstract public List getFactories();
 
 	abstract public EClass getTableEntryObjectType();
@@ -170,8 +165,8 @@
 		return layout;
 	}
 
-	protected void createTable(Composite composite) {
-		table = new Table(composite, SWT.BORDER | SWT.FULL_SELECTION
+	protected Table createTable(Composite composite) {
+		Table table = new Table(composite, SWT.BORDER | SWT.FULL_SELECTION
 				| SWT.V_SCROLL | SWT.SINGLE);
 		if (isHeaderVisible()) {
 			table.setHeaderVisible(true);
@@ -190,7 +185,8 @@
 			TableColumn tableColumn = new TableColumn(table, SWT.NONE);
 			tableColumn.setText(getTableColumnNames()[i]);
 		}
-
+		
+		return table;
 	}
 
 	protected Composite createButtonComposite(Composite parent) {
@@ -280,7 +276,7 @@
 				.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
 	}
 
-	public TableViewer getTableViewer() {
+	private TableViewer getTableViewer() {
 		return tableViewer;
 	}
 
@@ -317,5 +313,9 @@
 	 * @return
 	 */
 	abstract public Wizard getWizard();
+
+	protected Table getTable() {
+		return table;
+	}
 
 }

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=366929&r1=366928&r2=366929&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
Sat Jan  7 13:45:02 2006
@@ -16,19 +16,15 @@
 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;
 import org.apache.geronimo.ui.internal.Messages;
 import org.apache.geronimo.ui.wizards.EjbLocalRefWizard;
 import org.apache.geronimo.xml.ns.j2ee.web.provider.WebItemProviderAdapterFactory;
-import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
 import org.apache.geronimo.xml.ns.naming.provider.NamingItemProviderAdapterFactory;
-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.resource.ImageDescriptor;

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=366929&r1=366928&r2=366929&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
Sat Jan  7 13:45:02 2006
@@ -16,26 +16,21 @@
 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;
 import org.apache.geronimo.ui.internal.Messages;
 import org.apache.geronimo.ui.wizards.EjbRefWizard;
 import org.apache.geronimo.xml.ns.j2ee.web.provider.WebItemProviderAdapterFactory;
-import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
 import org.apache.geronimo.xml.ns.naming.provider.NamingItemProviderAdapterFactory;
-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.resource.ImageDescriptor;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
 
 public class EjbRefSection extends DynamicTableSection {
     

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=366929&r1=366928&r2=366929&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
Sat Jan  7 13:45:02 2006
@@ -16,18 +16,14 @@
 package org.apache.geronimo.ui.sections;
 
 import java.util.ArrayList;
-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.j2ee.web.provider.WebItemProviderAdapterFactory;
-import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
 import org.apache.geronimo.xml.ns.naming.provider.NamingItemProviderAdapterFactory;
-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;

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=366929&r1=366928&r2=366929&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
Sat Jan  7 13:45:02 2006
@@ -16,18 +16,14 @@
 package org.apache.geronimo.ui.sections;
 
 import java.util.ArrayList;
-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.apache.geronimo.xml.ns.deployment.provider.DeploymentItemProviderAdapterFactory;
 import org.apache.geronimo.xml.ns.j2ee.web.provider.WebItemProviderAdapterFactory;
-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;

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=366929&r1=366928&r2=366929&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
Sat Jan  7 13:45:02 2006
@@ -16,19 +16,15 @@
 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;
 import org.apache.geronimo.ui.internal.Messages;
 import org.apache.geronimo.ui.wizards.ResourceEnvRefWizard;
 import org.apache.geronimo.xml.ns.j2ee.web.provider.WebItemProviderAdapterFactory;
-import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
 import org.apache.geronimo.xml.ns.naming.provider.NamingItemProviderAdapterFactory;
-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.resource.ImageDescriptor;

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=366929&r1=366928&r2=366929&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
Sat Jan  7 13:45:02 2006
@@ -16,29 +16,19 @@
 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;
 import org.apache.geronimo.ui.internal.Messages;
 import org.apache.geronimo.ui.wizards.ResourceRefWizard;
 import org.apache.geronimo.xml.ns.j2ee.web.provider.WebItemProviderAdapterFactory;
-import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
 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;
-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.resource.ImageDescriptor;
-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.swt.widgets.Composite;
 import org.eclipse.ui.forms.widgets.FormToolkit;

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=366929&r1=366928&r2=366929&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
Sat Jan  7 13:45:02 2006
@@ -26,6 +26,7 @@
 import org.apache.geronimo.xml.ns.security.RoleType;
 import org.apache.geronimo.xml.ns.security.SecurityFactory;
 import org.apache.geronimo.xml.ns.security.SecurityPackage;
+import org.apache.geronimo.xml.ns.security.SecurityType;
 import org.apache.geronimo.xml.ns.security.provider.SecurityItemProviderAdapterFactory;
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EObject;
@@ -47,195 +48,196 @@
 
 public class SecuritySection extends DynamicTableSection {
 
-    public EReference securityERef;
-    
-    Text roleNameText;
-    Text roleDescriptionText;
-
-    /**
-     * @param plan
-     * @param parent
-     * @param toolkit
-     * @param style
-     */
-    public SecuritySection(EObject plan, Composite parent, FormToolkit toolkit,
-            int style, EReference securityERef) {
-        super(plan, parent, toolkit, style);
-        this.securityERef = securityERef;
-        create();
-    }
-
-    /**
-     * @return
-     */
-    public String getTitle() {
-        return Messages.editorSectionSecurityRolesTitle;
-    }
-
-    /**
-     * @return
-     */
-    public String getDescription() {
-        return Messages.editorSectionSecurityRolesDescription;
-    }
-
-    /**
-     * @return
-     */
-    public EReference getEReference() {
-        return SecurityFactory.eINSTANCE.getSecurityPackage()
-                .getRoleMappingsType_Role();
-    }
-
-    /**
-     * @return
-     */
-    public String[] getTableColumnNames() {
-        return new String[] {Messages.name};
-    }
-
-    /**
-     * @return
-     */
-    public Wizard getWizard() {
-        return new SecurityRoleWizard(this);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.geronimo.ui.sections.DynamicTableSection#configureSection(org.eclipse.ui.forms.widgets.Section)
-     */
-    protected void configureSection(Section section) {
-        section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-    }
-    
-    public List getFactories() {
-     	List factories = new ArrayList();
+	public EReference securityERef;
+
+	Text roleNameText;
+
+	Text roleDescriptionText;
+
+	/**
+	 * @param plan
+	 * @param parent
+	 * @param toolkit
+	 * @param style
+	 */
+	public SecuritySection(EObject plan, Composite parent, FormToolkit toolkit,
+			int style, EReference securityERef) {
+		super(plan, parent, toolkit, style);
+		this.securityERef = securityERef;
+		create();
+	}
+
+	/**
+	 * @return
+	 */
+	public String getTitle() {
+		return Messages.editorSectionSecurityRolesTitle;
+	}
+
+	/**
+	 * @return
+	 */
+	public String getDescription() {
+		return Messages.editorSectionSecurityRolesDescription;
+	}
+
+	/**
+	 * @return
+	 */
+	public EReference getEReference() {
+		return SecurityPackage.eINSTANCE.getRoleMappingsType_Role();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.sections.DynamicTableSection#getTableColumnNames()
+	 */
+	public String[] getTableColumnNames() {
+		return new String[] { Messages.name };
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.sections.DynamicTableSection#getWizard()
+	 */
+	public Wizard getWizard() {
+		return new SecurityRoleWizard(this);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.sections.DynamicTableSection#configureSection(org.eclipse.ui.forms.widgets.Section)
+	 */
+	protected void configureSection(Section section) {
+		section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.sections.DynamicTableSection#getFactories()
+	 */
+	public List getFactories() {
+		List factories = new ArrayList();
 		factories.add(new WebItemProviderAdapterFactory());
 		factories.add(new SecurityItemProviderAdapterFactory());
 		return factories;
-    }
+	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.sections.DynamicTableSection#getTableEntryObjectType()
+	 */
 	public EClass getTableEntryObjectType() {
 		return SecurityPackage.eINSTANCE.getRoleType();
 	}
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.geronimo.ui.sections.DynamicTableSection#showTableColumNames()
-     */
-    public boolean isHeaderVisible() {
-        return false;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.geronimo.ui.sections.DynamicTableSection#createClient()
-     */
-    public void createClient() {
-
-        super.createClient();
-
-        Composite detail = toolkit.createComposite(table.getParent());
-        GridLayout gl = new GridLayout();
-        gl.marginWidth = 4;
-        gl.marginHeight = 8;
-        gl.numColumns = 2;
-        detail.setLayout(gl);
-        detail.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
-        Label roleNameLabel = toolkit.createLabel(detail, Messages.name + ":");
-        roleNameLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false,
-                false));
-        roleNameLabel.setEnabled(true);
-
-        roleNameText = toolkit.createText(detail, "", SWT.BORDER);
-        roleNameText
-                .setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-        roleNameText.setEnabled(true);
-
-        Label roleDescriptionLabel = toolkit.createLabel(detail,
-                Messages.description + ":");
-        roleDescriptionLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
-                false, false));
-        roleDescriptionLabel.setEnabled(true);
-
-        roleDescriptionText = toolkit.createText(detail, "", SWT.MULTI
-                | SWT.BORDER);
-        GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
-        data.heightHint = 50;
-        roleDescriptionText.setLayoutData(data);
-        roleDescriptionText.setEnabled(true);
-
-        table.addSelectionListener(new TableSelectionListener());
-        
-        removeButton.addSelectionListener(new SelectionAdapter() {
-            public void widgetSelected(SelectionEvent e) {
-                roleNameText.setText("");
-                roleDescriptionText.setText("");
-            }
-        });
-
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.geronimo.ui.sections.DynamicTableSection#fillTableItems()
-     */
-   /* protected void fillTableItems() {
-
-        SecurityType secType = (SecurityType) getPlan().eGet(securityERef);
-
-        if (secType != null) {
-            RoleMappingsType roleMappings = secType.getRoleMappings();
-            if (roleMappings != null) {
-
-                EList list = roleMappings.getRole();
-
-                for (int j = 0; j < list.size(); j++) {
-                    TableItem item = new TableItem(table, SWT.NONE);
-                    String[] tableTextData = getTableText((EObject) list.get(j));
-                    item.setImage(getImage());
-                    item.setText(tableTextData);
-                    item.setData((EObject) list.get(j));
-                }
-            }
-        }
-    }*/
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.geronimo.ui.sections.DynamicTableSection#getImageDescriptor()
-     */
-    public ImageDescriptor getImageDescriptor() {
-        return GeronimoUIPlugin.imageDescriptorFromPlugin(
-                "org.eclipse.jst.j2ee", "icons/full/obj16/security_role.gif");
-    }
-
-    class TableSelectionListener implements SelectionListener {
-
-        public void widgetSelected(SelectionEvent e) {
-            TableItem item = (TableItem) e.item;
-            RoleType roleType = (RoleType) item.getData();
-            roleNameText.setText(roleType.getRoleName());
-
-            if (!roleType.getDescription().isEmpty()) {
-                roleDescriptionText.setText(((DescriptionType) roleType
-                        .getDescription().get(0)).getValue());
-            } else {
-            	roleDescriptionText.setText("");
-            }
-        }
-
-        public void widgetDefaultSelected(SelectionEvent e) {
-            // do nothing
-        }
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.sections.DynamicTableSection#showTableColumNames()
+	 */
+	public boolean isHeaderVisible() {
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.sections.DynamicTableSection#createClient()
+	 */
+	public void createClient() {
+
+		super.createClient();
+
+		Composite detail = toolkit.createComposite(getTable().getParent());
+		GridLayout gl = new GridLayout();
+		gl.marginWidth = 4;
+		gl.marginHeight = 8;
+		gl.numColumns = 2;
+		detail.setLayout(gl);
+		detail.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+		Label roleNameLabel = toolkit.createLabel(detail, Messages.name + ":");
+		roleNameLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false,
+				false));
+		roleNameLabel.setEnabled(true);
+
+		roleNameText = toolkit.createText(detail, "", SWT.BORDER);
+		roleNameText
+				.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+		roleNameText.setEnabled(true);
+
+		Label roleDescriptionLabel = toolkit.createLabel(detail,
+				Messages.description + ":");
+		roleDescriptionLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
+				false, false));
+		roleDescriptionLabel.setEnabled(true);
+
+		roleDescriptionText = toolkit.createText(detail, "", SWT.MULTI
+				| SWT.BORDER);
+		GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
+		data.heightHint = 50;
+		roleDescriptionText.setLayoutData(data);
+		roleDescriptionText.setEnabled(true);
+
+		getTable().addSelectionListener(new TableSelectionListener());
+
+		removeButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				roleNameText.setText("");
+				roleDescriptionText.setText("");
+			}
+		});
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.sections.DynamicTableSection#getInput()
+	 */
+	protected Object getInput() {
+		SecurityType secType = (SecurityType) getPlan().eGet(securityERef);
+		if (secType != null) {
+			return secType.getRoleMappings();
+		}
+		return super.getInput();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.ui.sections.DynamicTableSection#getImageDescriptor()
+	 */
+	public ImageDescriptor getImageDescriptor() {
+		return GeronimoUIPlugin.imageDescriptorFromPlugin(
+				"org.eclipse.jst.j2ee", "icons/full/obj16/security_role.gif");
+	}
 
-    }
+	class TableSelectionListener implements SelectionListener {
+
+		public void widgetSelected(SelectionEvent e) {
+			TableItem item = (TableItem) e.item;
+			RoleType roleType = (RoleType) item.getData();
+			roleNameText.setText(roleType.getRoleName());
+
+			if (!roleType.getDescription().isEmpty()) {
+				roleDescriptionText.setText(((DescriptionType) roleType
+						.getDescription().get(0)).getValue());
+			} else {
+				roleDescriptionText.setText("");
+			}
+		}
+
+		public void widgetDefaultSelected(SelectionEvent e) {
+			// do nothing
+		}
+
+	}
 
 }

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=366929&r1=366928&r2=366929&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
Sat Jan  7 13:45:02 2006
@@ -16,18 +16,14 @@
 package org.apache.geronimo.ui.sections;
 
 import java.util.ArrayList;
-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.j2ee.web.provider.WebItemProviderAdapterFactory;
-import org.apache.geronimo.xml.ns.naming.NamingFactory;
 import org.apache.geronimo.xml.ns.naming.NamingPackage;
 import org.apache.geronimo.xml.ns.naming.provider.NamingItemProviderAdapterFactory;
-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;

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/SecurityRoleWizard.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/SecurityRoleWizard.java?rev=366929&r1=366928&r2=366929&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/SecurityRoleWizard.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/wizards/SecurityRoleWizard.java
Sat Jan  7 13:45:02 2006
@@ -31,7 +31,6 @@
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.swt.widgets.Text;
 
 public class SecurityRoleWizard extends DynamicAddEditWizard {



Mime
View raw message