MCPcopy Create free account
hub / github.com/GateNLP/gate-core / pluginUnloaded

Method pluginUnloaded

src/main/java/gate/gui/MainFrame.java:2174–2196  ·  view source on GitHub ↗
(Plugin plugin)

Source from the content-addressed store, hash-verified

2172 }
2173
2174 @Override
2175 public void pluginUnloaded(Plugin plugin) {
2176 try {
2177 String classloaderID = plugin.getBaseURI().toString();
2178
2179 Iterator<String> it = iconByName.keySet().iterator();
2180 while(it.hasNext()) {
2181 String name = it.next();
2182 Icon icon = iconByName.get(name);
2183
2184 ClassLoader cl = icon.getClass().getClassLoader();
2185
2186 if(cl instanceof GateClassLoader) {
2187 if(((GateClassLoader)cl).getID().equals(classloaderID)) {
2188 it.remove();
2189 }
2190 }
2191 }
2192 } catch(URISyntaxException e) {
2193 // this should be impossible!
2194 e.printStackTrace();
2195 }
2196 }
2197
2198 /**
2199 * Overridden so we can exit when window is closed

Callers

nothing calls this directly

Calls 12

getClassLoaderMethod · 0.80
getIDMethod · 0.80
toStringMethod · 0.65
iteratorMethod · 0.65
hasNextMethod · 0.65
nextMethod · 0.65
getMethod · 0.65
equalsMethod · 0.65
removeMethod · 0.65
getBaseURIMethod · 0.45
keySetMethod · 0.45
printStackTraceMethod · 0.45

Tested by

no test coverage detected