mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 03:53:21 +02:00
[150492] Tutorial FolderInfoPropertyPage doesn't work reliably
This commit is contained in:
parent
aeefefde88
commit
d878466cef
1 changed files with 12 additions and 15 deletions
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue