added convenience method for accessing active plugins
This commit is contained in:
parent
8b136c0b35
commit
6100734897
@ -24,7 +24,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: GUI.java,v 1.144 2009/09/18 16:13:31 fros4943 Exp $
|
* $Id: GUI.java,v 1.145 2009/10/27 09:31:22 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.cooja;
|
package se.sics.cooja;
|
||||||
@ -1959,6 +1959,21 @@ public class GUI extends Observable {
|
|||||||
pluginClassesTemporary.clear();
|
pluginClassesTemporary.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns started plugin with given class name, if any.
|
||||||
|
*
|
||||||
|
* @param classname Class name
|
||||||
|
* @return Plugin instance
|
||||||
|
*/
|
||||||
|
public Plugin getStartedPlugin(String classname) {
|
||||||
|
for (Plugin p: startedPlugins) {
|
||||||
|
if (p.getClass().getName().equals(classname)) {
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a mote plugins submenu for given mote.
|
* Return a mote plugins submenu for given mote.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user