1 11 package org.eclipse.ui.internal.ide.model; 12 13 import org.eclipse.core.runtime.IAdaptable; 14 import org.eclipse.core.runtime.IStatus; 15 import org.eclipse.ui.model.IWorkbenchAdapter; 16 import org.eclipse.ui.model.WorkbenchAdapter; 17 18 import java.util.*; 19 20 public class WorkbenchStatusList extends WorkbenchAdapter implements IAdaptable { 21 private ArrayList statii = new ArrayList(10); 22 public void add(IStatus status) { 23 statii.add(new WorkbenchStatus(status)); 24 } 25 public void clear() { 26 statii.clear(); 27 } 28 33 public Object getAdapter(Class adapter) { 34 if (adapter == IWorkbenchAdapter.class) return this; 35 return null; 36 } 37 40 public Object [] getChildren(Object o) { 41 return statii.toArray(); 42 } 43 public void remove(WorkbenchStatus status) { 44 statii.remove(status); 45 } 46 } 47 | Popular Tags |