"Initializing...", 0, group.getSubObjectsV().size());
"Initializing...", 0, recordCount);
public void run(){	DebugPlugin debugPlugin = PluginDebugManager.getDebugPlugin();		// all new (or deleted) filed are not updated	// if field has InspectableProperty.ALWAYS_VISIBLE visibility then is is monitored	// (otherwise only remote value is retrieved) - removed, it took to much time	// VAL fields is always registered	final String valFieldName = "VAL";	Group group = com.cosylab.vdct.graphics.DrawingSurface.getInstance().getViewGroup();	//Group group = Group.getRoot();	int progress = 0;	ProgressMonitor progressMonitor = new ProgressMonitor(VisualDCT.getInstance(),								"Connecting to PVs",								"Initializing...", 0, group.getSubObjectsV().size());	progressMonitor.setProgress(0);	Enumeration e = group.getSubObjectsV().elements();	while (e.hasMoreElements() && !progressMonitor.isCanceled())	{		Object obj = e.nextElement();		if (obj instanceof com.cosylab.vdct.graphics.objects.Record)		{			VDBRecordData rec = ((Record)obj).getRecordData();			Enumeration e2 = rec.getFieldsV().elements();			while (e2.hasMoreElements() && !progressMonitor.isCanceled())			{				VDBFieldData field = (VDBFieldData)e2.nextElement();									//if (!field.equals(valFieldName))					if (field.getVisibility() == InspectableProperty.ALWAYS_VISIBLE && !field.equals(valFieldName))					{						progressMonitor.setNote("Connecting to "+field.getFullName()+"...");						debugPlugin.registerMonitor(field);					}												/*					{						String debugValue = debugPlugin.getValue(field.getFullName());						if (debugValue != null)							field.setDebugValue(debugValue);					}					*/			}			if (progressMonitor.isCanceled())				break;			// always register VAL field			Debuggable valField = (Debuggable)rec.getField(valFieldName);			if (valField != null)			{				progressMonitor.setNote("Connecting to "+valField.getFullName()+"...");				debugPlugin.registerMonitor(valField);			}							}					progress++;		progressMonitor.setProgress(progress);				}			if (progressMonitor.isCanceled())	{		Console.getInstance().println("Debugging canceled.");		debugPlugin.deregisterAll();		debugPlugin.stopDebugging();		PluginDebugManager.setDebugState(false);		PluginDebugManager.setDebugPlugin(null);		Group.getRoot().unconditionalValidateSubObjects(false);	}	progressMonitor.close();	Group.getRoot().unconditionalValidateSubObjects(false);	DrawingSurface.getInstance().repaint();}