package com.lazerycode.jmeter.threadhandling;

/**
 * Thread names added to this list will be used when scanning JMeterThreads directly after JMeter is called
 * The plugin will then wait for the thread to finish
 * TODO: find out which threadname works for GUI detection on other operating systems
 * TODO: #GUI_THREAD_LINUX was found on a Mint 12 (Ubuntu) with Gnome desktop. is this universal for Linux?
 */
public enum JMeterThreads {

    STANDARD_JMETER_ENGINE("StandardJMeterEngine", false),
    GUI_THREAD_WINDOWS("AWT-Windows", true),
    GUI_THREAD_MACOSX("AWT-AppKit", true),
    GUI_THREAD_LINUX("AWT-XAWT", true);

    private final Object[] threadData;

    JMeterThreads(Object... values) {
        this.threadData = values;
    }

    public String getThreadName() {
        return (String) this.threadData[0];
    }

    public boolean isGUIThread() {
        return (Boolean) this.threadData[1];
    }
}

@@ -215,204 +215,8 @@
 sh%0D%0A
- * TODO: find out which threadname works for GUI detection on other operating systems%0D%0A * TODO: #GUI_THREAD_LINUX was found on a Mint 12 (Ubuntu) with Gnome desktop. is this universal for Linux?%0D%0A
  */%0D
@@ -462,103 +462,208 @@
 nal 
-Object%5B%5D threadData;%0D%0A%0D%0A    JMeterThreads(Object... values) %7B%0D%0A        this.threadData = values
+String threadName;%0D%0A    private final boolean isGUIThread;%0D%0A%0D%0A    JMeterThreads(String threadName, boolean isGUIThread) %7B%0D%0A        this.threadName = threadName;%0D%0A        this.isGUIThread = isGUIThread
 ;%0D%0A 
@@ -726,35 +726,18 @@
 urn 
-(String) this.threadData%5B0%5D
+threadName
 ;%0D%0A 
@@ -799,36 +799,19 @@
 urn 
-(Boolean) this.threadData%5B1%5D
+isGUIThread
 ;%0D%0A 

Refactor JMeterThreads