|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.cvsclient; import org.openide.modules.ModuleInstall; import org.openide.util.SharedClassObject; import org.netbeans.modules.javacvs.JavaCvsFileSystem; import org.netbeans.modules.javacvs.caching.*; import org.netbeans.modules.vcscore.cache.*; import org.openide.options.SystemOption; import org.netbeans.modules.vcscore.settings.GeneralVcsSettings; import org.openide.filesystems.*; import java.util.Iterator; import java.util.LinkedList; import org.openide.windows.TopComponent; import org.openide.windows.WindowManager; /** * * @author Milos Kleint */ public class JavaCvsModuleInstall extends ModuleInstall { private static long serialVersionUID = -5817622809928676346L; /** Creates new JavaCvsModuleInstall */ public JavaCvsModuleInstall() { } /** * Called when the module is uninstalled (from a running IDE). * Should remove whatever functionality from the IDE that it had registered. */ public void uninstalled() { /* JavaCvsSettings settings = (JavaCvsSettings)SharedClassObject.findObject( JavaCvsSettings.class, false); GeneralVcsSettings general = (GeneralVcsSettings)SharedClassObject.findObject( GeneralVcsSettings.class, true); if (settings != null) { general.removeOption(settings); } Repository repos = TopManager.getDefault().getRepository(); FileSystem[] arr = repos.toArray(); for (int i = 0; i < arr.length; i++) { if (arr[i] instanceof org.netbeans.modules.javacvs.JavaCvsFileSystem) { repos.removeFileSystem(arr[i]); } } */ super.uninstalled(); // close all opened javacvs top components. Iterator it = WindowManager.getDefault().getRegistry().getOpened().iterator(); LinkedList myList = new LinkedList(); while (it.hasNext()) { TopComponent comp = (TopComponent)it.next(); if (comp.getClass().getName().startsWith("org.netbeans.modules.cvsclient")) { //NOI18N myList.add(comp); } } it = myList.iterator(); while (it.hasNext()) { TopComponent c = (TopComponent)it.next(); c.close(); } CacheHandler.getInstance().unregistedType(JavaCvsCache.JAVA_CACHE_NAME); /* CvsClientAction clientAction = (CvsClientAction)org.openide.util.SharedClassObject.findObject(CvsClientAction.class); if (clientAction != null) { clientAction.clearSharedData(); } */ FsCommandFactory.uninstall(); } /** * Called when the module is first installed into the IDE. * Should perform whatever setup functions are required. * The default implementation calls restored. * |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.