src/main/java/xelfi/debugger/ThreadsView.java
branchDirtyFix
changeset 10 fe294d0f1297
parent 0 189280700bc7
     1.1 --- a/src/main/java/xelfi/debugger/ThreadsView.java	Tue Jan 17 19:59:12 2017 +0100
     1.2 +++ b/src/main/java/xelfi/debugger/ThreadsView.java	Tue Jan 17 21:12:37 2017 +0100
     1.3 @@ -10,10 +10,6 @@
     1.4  import java.awt.*;
     1.5  import xelfi.top.TopDialog;
     1.6  import xelfi.top.TopLevel;
     1.7 -import xelfi.compiler.Output;
     1.8 -
     1.9 -import sun.tools.debug.*; // needs TCP/IP
    1.10 -//import symantec.tools.debug.*; // doesn't need TCP/IP
    1.11  
    1.12  /*
    1.13   * This is a view on the data given by the Debugger.
    1.14 @@ -184,62 +180,8 @@
    1.15  			return;
    1.16  		}
    1.17  
    1.18 -		RemoteThreadGroup[] rtg = document.getThreadGroups();
    1.19 -
    1.20 -		if (rtg == null)
    1.21 -		{
    1.22 -			list.clear();
    1.23 -			return;
    1.24 -		}
    1.25 -
    1.26 -		int indexOfSelected = list.getSelectedIndex();
    1.27 -		if (indexOfSelected != -1)
    1.28 -			list.deselect(indexOfSelected);
    1.29 -
    1.30 -		int threadGroupIndex = 1;
    1.31 -		int lineIndex = 0;
    1.32 -
    1.33 -		for(int i = 0; i < rtg.length; i++)
    1.34 -			try
    1.35 -			{
    1.36 -				// without "system" thread groups (system and main groups)
    1.37 -				if (rtg[i].getName().compareTo("system") == 0 ||
    1.38 -					rtg[i].getName().compareTo("main") == 0)
    1.39 -					continue;
    1.40 -
    1.41 -				RemoteThread rt[] = rtg[i].listThreads(true);
    1.42 -				String string = " ["+(threadGroupIndex)+"] "+rtg[i].getName();
    1.43 -
    1.44 -				// add line for a thread group into the list
    1.45 -				if (lineIndex > list.countItems()-1)
    1.46 -					list.addItem(string);
    1.47 -				else
    1.48 -					if (!list.getItem(lineIndex).equals(string))
    1.49 -						list.replaceItem(string, lineIndex);
    1.50 -
    1.51 -				threadGroupIndex++;
    1.52 -				lineIndex++;
    1.53 -
    1.54 -				for(int j = 0; j < rt.length; j++)
    1.55 -				{
    1.56 -					string = "      "+rt[j].getName()+" : "+rt[j].getStatus();
    1.57 -
    1.58 -					if (lineIndex > list.countItems()-1)
    1.59 -						list.addItem(string);
    1.60 -					else
    1.61 -						if (!list.getItem(lineIndex).equals(string))
    1.62 -							list.replaceItem(string, lineIndex);
    1.63 -
    1.64 -					lineIndex++;
    1.65 -				}
    1.66 -			}
    1.67 -			catch(Exception e)
    1.68 -			{
    1.69 -				e.printStackTrace();
    1.70 -			}
    1.71 -
    1.72 -		if (lineIndex < list.countItems()-1)
    1.73 -			list.delItems(lineIndex+1, list.countItems()-1);
    1.74 +        return;
    1.75 +		
    1.76  	}
    1.77  
    1.78  	/**
    1.79 @@ -248,7 +190,5 @@
    1.80  	public void show()
    1.81  	{
    1.82  		super.show();
    1.83 -		list.requestFocus();
    1.84 -		document.threadsViewShown();
    1.85  	}
    1.86  }