Package org.cfeclipse.cfml.views.explorer

Source Code of org.cfeclipse.cfml.views.explorer.ComboContentProvider

/*
* Created on Nov 7, 2004
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
package org.cfeclipse.cfml.views.explorer;

import java.util.ArrayList;

import org.cfeclipse.cfml.net.FTPConnectionProperties;
import org.cfeclipse.cfml.net.ftp.FTPConnection;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;



class ComboContentProvider implements IStructuredContentProvider {
   
   
    public Object[] getElements(Object inputElement) {
     
      String[] connections = FTPConnectionProperties.getConnectionIds();
   
      ArrayList items = new ArrayList();
     
      items.add(new LocalFileSystem());
     
    for (int i=0;i<connections.length;i++) {
      FTPConnectionProperties connectionProperties = new FTPConnectionProperties(connections[i]);

        FTPConnection connection = new FTPConnection();
      connection.setConnectionProperties(connectionProperties);
      items.add(connection);
     
    }
 
        return items.toArray();
    }
    public void dispose() {
    }
   
    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
        if (newInput != null) {
            //System.out.println("Explorer combo-box input changed");
            //System.out.println(newInput.toString());
        }
    }
}
TOP

Related Classes of org.cfeclipse.cfml.views.explorer.ComboContentProvider

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.