private ModelCanvas insertModel(String type) {
		boolean reorder = false;
		Map<Integer, Object> map = getEmbeddedComponent(ModelCanvas.class);
		if (map != null && !map.isEmpty()) {
			for (Integer key : map.keySet()) {
				Object val = map.get(key);
				if (val instanceof ModelCanvas) {
					ModelCanvas canvas = (ModelCanvas) val;
					if (canvas.getMdContainer().getRepresentationName().equals(type)) {
						int caret = getCaretPosition();
						if (caret <= key) {
							componentPool.processInsertionOrRemoval(true, type);
							reorder = true;
						}
					}
				}
			}
		}
		ModelCanvas mc = componentPool.request(type);
		if (mc != null) {
			mc.setUsed(true);
			mc.addMenuBar();
			mc.setResourceAddress("Inserted model");
			MDModel model = mc.getMdContainer().getModel();
			model.clear();
			if (model.getModelListeners() != null)
				model.getModelListeners().clear();
			mc.getMdContainer().getView().setEnergizer(true);
			if (model.getRecorderDisabled())
				model.activateEmbeddedMovie(false);
			if (mc.getMdContainer() instanceof AtomContainer) {
				((AtomContainer) mc.getMdContainer()).enableDNAScroller(false);
			}
			mc.getMdContainer().enableRecorder(true);
			mc.getMdContainer().addDefaultToolBar();
			insertComponent(mc);
			if (reorder)
				nameModels();
		} else {
			showContainerUsedUpMessage();
		}
		return mc;
	}