~helioviewer/jhelioviewer/trunk

« back to all changes in this revision

Viewing changes to src/viewmodelplugin/src/org/helioviewer/viewmodelplugin/controller/PluginSettings.java

  • Committer: Andre Dau
  • Date: 2012-04-11 19:49:51 UTC
  • mfrom: (476.1.14 jhelioviewer)
  • Revision ID: andre.dau@web.de-20120411194951-pioiqgnzvefd1hg6
Fix bug where remove plugins still apear in the manager

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import javax.xml.transform.dom.DOMSource;
18
18
import javax.xml.transform.stream.StreamResult;
19
19
 
 
20
import org.helioviewer.base.logging.Log;
20
21
import org.helioviewer.viewmodel.filter.Filter;
21
22
import org.helioviewer.viewmodel.renderer.physical.PhysicalRenderer;
22
23
import org.helioviewer.viewmodelplugin.filter.FilterContainer;
167
168
    }
168
169
 
169
170
    /**
 
171
     * Removes a plugin from the XML settings file
 
172
     * @param pluginContainer   
 
173
     *                  Container of the plugin which should be removed
 
174
     */
 
175
    public void removePluginFromXML(PluginContainer pluginContainer) {
 
176
        Node pluginNode = findNode(pluginsRootNode, "PluginLocation", pluginContainer.getPluginLocation().getPath());
 
177
        Log.info("pre remove");
 
178
        if(pluginNode != null) {
 
179
            pluginsRootNode.removeChild(pluginNode);
 
180
            Log.info("removed");
 
181
        }
 
182
    }
 
183
    
 
184
    /**
170
185
     * Adds or updates the information of a passed plug-in to the internal XML
171
186
     * document. This method does not save the XML document to the corresponding
172
187
     * settings file!