1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 14:55:41 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2010-05-16 00:08:39 +00:00
parent db9abf589f
commit 9790fbc6ab
2 changed files with 8 additions and 15 deletions

View file

@ -140,8 +140,7 @@ public class BaseUITestCase extends BaseTestCase {
if (pfile != null && pfile.getTimestamp() >= file.getLocalTimeStamp()) { if (pfile != null && pfile.getTimestamp() >= file.getLocalTimeStamp()) {
return; return;
} }
} } finally {
finally {
index.releaseReadLock(); index.releaseReadLock();
int time= (int) (endTime- System.currentTimeMillis()); int time= (int) (endTime- System.currentTimeMillis());
if (time > 0) { if (time > 0) {
@ -301,11 +300,9 @@ public class BaseUITestCase extends BaseTestCase {
cands.append('|'); cands.append('|');
} }
cands.append(root.getText()); cands.append(root.getText());
} } catch (SWTException e) {
catch (SWTException e) {
// in case widget was disposed, item may be replaced // in case widget was disposed, item may be replaced
} } catch (IllegalArgumentException e) {
catch (IllegalArgumentException e) {
// item does not yet exist. // item does not yet exist.
} }
} }
@ -326,11 +323,9 @@ public class BaseUITestCase extends BaseTestCase {
if (label.equals(root.getText())) { if (label.equals(root.getText())) {
return root; return root;
} }
} } catch (SWTException e) {
catch (SWTException e) {
// in case widget was disposed, item may be replaced // in case widget was disposed, item may be replaced
} } catch (IllegalArgumentException e) {
catch (IllegalArgumentException e) {
// item does not yet exist. // item does not yet exist.
} }
} }

View file

@ -40,13 +40,11 @@ public class ExtendedTreeViewer extends TreeViewer {
protected void preservingSelection(Runnable updateCode) { protected void preservingSelection(Runnable updateCode) {
if (fPreservingSelection) { if (fPreservingSelection) {
updateCode.run(); updateCode.run();
} } else {
else {
fPreservingSelection= true; fPreservingSelection= true;
try { try {
super.preservingSelection(updateCode); super.preservingSelection(updateCode);
} } finally {
finally {
fPreservingSelection= false; fPreservingSelection= false;
} }
} }