1 20 21 package org.apache.directory.ldapstudio.browser.common.widgets.connection; 22 23 24 import org.apache.directory.ldapstudio.browser.core.ConnectionManager; 25 import org.eclipse.jface.viewers.IStructuredContentProvider; 26 import org.eclipse.jface.viewers.Viewer; 27 28 29 37 public class ConnectionContentProvider implements IStructuredContentProvider 38 { 39 40 45 public void inputChanged( Viewer viewer, Object oldInput, Object newInput ) 46 { 47 } 48 49 50 55 public void dispose() 56 { 57 } 58 59 60 65 public Object [] getElements( Object inputElement ) 66 { 67 if ( inputElement != null && inputElement instanceof ConnectionManager ) 68 { 69 ConnectionManager cm = ( ConnectionManager ) inputElement; 70 return cm.getConnections(); 71 } 72 else 73 { 74 return new Object [] 75 {}; 76 } 77 } 78 79 } | Popular Tags |