mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 06:45:43 +02:00
Cosmetics.
This commit is contained in:
parent
db9abf589f
commit
9790fbc6ab
2 changed files with 8 additions and 15 deletions
|
@ -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) {
|
||||||
|
@ -287,7 +286,7 @@ public class BaseUITestCase extends BaseTestCase {
|
||||||
Tree tree= null;
|
Tree tree= null;
|
||||||
TreeItem root= null;
|
TreeItem root= null;
|
||||||
StringBuilder cands= new StringBuilder();
|
StringBuilder cands= new StringBuilder();
|
||||||
for (int i=0; i<400; i++) {
|
for (int i= 0; i < 400; i++) {
|
||||||
cands.setLength(0);
|
cands.setLength(0);
|
||||||
Control[] trees= findControls(part.getSite().getShell(), Tree.class);
|
Control[] trees= findControls(part.getSite().getShell(), Tree.class);
|
||||||
for (int j = 0; j < trees.length; j++) {
|
for (int j = 0; j < trees.length; j++) {
|
||||||
|
@ -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.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue