1   package com.stateofflow.eclipse.metrics.properties.exclusions.table;
2   
3   import java.util.ArrayList;
4   import java.util.Arrays;
5   import java.util.List;
6   
7   import org.eclipse.jface.viewers.IStructuredContentProvider;
8   import org.eclipse.jface.viewers.Viewer;
9   
10  import com.stateofflow.eclipse.metrics.properties.exclusions.ExcludedResources;
11  
12  class ContentProvider implements IStructuredContentProvider {
13      public Object[] getElements(final Object input) {
14          final ExcludedResources resources = (ExcludedResources) input;
15          final List<Object> list = new ArrayList<Object>();
16          list.addAll(Arrays.asList(resources.getRegexes()));
17          list.addAll(Arrays.asList(resources.getFiles()));
18          return list.toArray(new Object[list.size()]);
19      }
20  
21      public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) {
22      }
23  
24      public void dispose() {
25      }
26  }