stateManager.uninstall(data);
stateManager.getSystemState().removeBundle(data.getBundleID());
	public BundleOperation uninstallBundle(final org.eclipse.osgi.framework.adaptor.BundleData bundledata)	{		return (new BundleOperation()		{			private DefaultBundleData data;			/**			 * Perform the change to persistent storage.			 *			 * @return Bundle object for the target bundle.			 * @throws BundleException If a failure occured modifiying peristent storage.			 */			public org.eclipse.osgi.framework.adaptor.BundleData begin() throws BundleException			{				this.data = (DefaultBundleData) bundledata;				return (bundledata);			}			/**			 * Commit the change to persistent storage.			 *			 * @param postpone If true, the bundle's persistent			 * storage cannot be immediately reclaimed.			 * @throws BundleException If a failure occured modifiying peristent storage.			 */			public void commit(boolean postpone) throws BundleException			{				File bundleDir = data.getBundleDir();				if (postpone || !rm(bundleDir))				{					/* mark this bundle to be deleted to ensure it is fully cleaned up					 * on next restart.					 */					File delete = new File(bundleDir, ".delete");					if (!delete.exists())					{						try						{							/* create .delete */							FileOutputStream out = new FileOutputStream(delete);							out.close();						}						catch (IOException e)						{							if (Debug.DEBUG && Debug.DEBUG_GENERAL)							{								Debug.println("Unable to write " + delete.getPath() + ": " + e.getMessage());							}						}					}				}				stateManager.uninstall(data);			}			/**			 * Undo the change to persistent storage.			 *			 * @throws BundleException If a failure occured modifiying peristent storage.			 */			public void undo() throws BundleException			{			}		});	}