code: public void addComponent(O component, boolean storeToFile, boolean notifyListeners)
  		throws ProjectComponentException {
  		Validate.notNull(component);
  		Validate.notNull(storeToFile);
  		String componentName = component.getName();
  		Validate.notNull(componentName);
  		if (containsComponent(componentName)) {
  			throw new ProjectComponentException("Container already contains component with name \"" + componentName + "\"");
  		}
  
  		File componentFile = null;
  		try {
  			File pathFile = getComponentDirectory(componentName);
  			pathFile.mkdir();
  			componentFile = getComponentFile(pathFile, componentName);
  		} catch (Exception e) {
  			ExceptionDialog.showException(null, "", e, true);
  			throw new ProjectComponentException("Cannot create component file.", e);
  		}
  
  		components.put(componentName, component);
  		componentFiles.put(componentName, componentFile);
  
  		if (storeToFile) {
  			try {
  				storeComponent(component.getName());
  			} catch (Exception e) {
  				throw new ProjectComponentException("Cannot store created component " + component.getName() + " to disk: " + e.getMessage(), e);
  			}
  		}
  		if (notifyListeners) {
  			listenerSupport.notifyComponentAdded(component);
  		}
  	}
docs: Adds a new component.<br>
  Depending on the value of the store-parameter, the component is also
  stored in the serialization directory.
  
  @param component The new component to add.
  @param storeToFile Indicates if the net should be stored to disk.
  @param notifyListeners
  @throws de.invation.code.toval.misc.wd.ProjectComponentException