View | Details | Raw Unified | Return to bug 167247
Collapse All | Expand All

(-)src/org/eclipse/gmf/internal/bridge/genmodel/BasicGenModelAccess.java (-3 / +12 lines)
Lines 17-22 Link Here
17
import java.util.List;
17
import java.util.List;
18
18
19
import org.eclipse.core.runtime.IStatus;
19
import org.eclipse.core.runtime.IStatus;
20
import org.eclipse.core.runtime.MultiStatus;
21
import org.eclipse.core.runtime.Platform;
20
import org.eclipse.core.runtime.Status;
22
import org.eclipse.core.runtime.Status;
21
import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
23
import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
22
import org.eclipse.emf.common.util.URI;
24
import org.eclipse.emf.common.util.URI;
Lines 113-118 Link Here
113
115
114
	public IStatus load(ResourceSet rs) {
116
	public IStatus load(ResourceSet rs) {
115
		assert !locations.isEmpty(); // XXX if isEmpty() initDefault?
117
		assert !locations.isEmpty(); // XXX if isEmpty() initDefault?
118
119
		List<IStatus> exceptions = new LinkedList<IStatus>();
120
		String id = "org.eclipse.gmf.bridge"; //$NON-NLS-1$
116
		for (Iterator/* <URI> */it = locations.iterator(); it.hasNext();) {
121
		for (Iterator/* <URI> */it = locations.iterator(); it.hasNext();) {
117
			try {
122
			try {
118
				URI uri = (URI) it.next();
123
				URI uri = (URI) it.next();
Lines 124-135 Link Here
124
					return Status.OK_STATUS;
129
					return Status.OK_STATUS;
125
				}
130
				}
126
			} catch (WrappedException ex) {
131
			} catch (WrappedException ex) {
127
				// FIXME collect into status
132
				IStatus s = new Status(IStatus.ERROR, id, ex.getMessage(), ex);
128
				System.err.println(ex.getMessage());
133
				exceptions.add(s);
129
			}
134
			}
130
		}
135
		}
131
		needUnload = false;
136
		needUnload = false;
132
		return Status.CANCEL_STATUS; // FIXME
137
		if (exceptions.isEmpty()) {
138
			return Status.CANCEL_STATUS;
139
		}
140
		IStatus[] sa = exceptions.toArray(new IStatus[exceptions.size()]);
141
		return new MultiStatus(id, 0, sa, "Problems while loading GenModel", null);
133
	}
142
	}
134
143
135
	/**
144
	/**

Return to bug 167247