1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-09 19:43:27 +02:00

[150492] Tutorial FolderInfoPropertyPage doesn't work reliably

This commit is contained in:
Kevin Doyle 2007-10-31 04:47:34 +00:00
parent aeefefde88
commit d878466cef

View file

@ -13,6 +13,7 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE. * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
* Kevin Doyle (IBM) - [150492] FolderInfoPropertyPage doesn't work reliably
*******************************************************************************/ *******************************************************************************/
package samples.ui.propertypages; package samples.ui.propertypages;
@ -181,15 +182,14 @@ public class FolderInfoPropertyPage
public void run() public void run()
{ {
if (stopped) if (stopped) {
return; return;
walkFolder(inputFolder);
updateGUI();
if (!stopped)
{
stopped = true;
updateGUI();
} }
walkFolder(inputFolder);
if (!stopped) {
stopped = true;
}
updateGUI();
} }
/** /**
@ -239,18 +239,15 @@ public class FolderInfoPropertyPage
{ {
if (stopButton.isDisposed()) if (stopButton.isDisposed())
return; return;
if (!stopped) if (stopped)
{
sizeLabel.setText(Integer.toString(totalSize));
filesLabel.setText(Integer.toString(totalFiles));
foldersLabel.setText(Integer.toString(totalFolders));
}
else if (stopped)
{ {
setValid(true); // re-enable OK button setValid(true); // re-enable OK button
stopButton.setEnabled(false); // disable Stop button stopButton.setEnabled(false); // disable Stop button
clearMessage(); // clear "Processing..." message clearMessage(); // clear "Processing..." message
} }
sizeLabel.setText(Integer.toString(totalSize));
filesLabel.setText(Integer.toString(totalFiles));
foldersLabel.setText(Integer.toString(totalFolders));
} }
} }