Skip to content

Commit

Permalink
improve DebugTab screen updates a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
vladdu committed Jun 15, 2012
1 parent 0b1fc6e commit b61f13c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
6 changes: 3 additions & 3 deletions org.erlide.ui/src/org/erlide/ui/launch/DebugTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ public static void addModules(final Collection<String> interpret,
if (p != null) {
final String mName = pm[1];
try {
final String s = CommonUtils
.isErlangFileContentFileName(mName) ? mName
: mName + ".erl";
final boolean isErlangFile = CommonUtils
.isErlangFileContentFileName(mName);
final String s = isErlangFile ? mName : mName + ".erl";
module = p.getModule(s);
} catch (final ErlModelException e) {
ErlLogger.warn(e);
Expand Down
18 changes: 11 additions & 7 deletions org.erlide.ui/src/org/erlide/ui/launch/DebugTreeItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,22 @@ private void updateMenuCategoryCheckedState(
}

public void setChecked(final CheckboxTreeViewer checkboxTreeViewer,
final Collection<IErlModule> list) {
final Collection<IErlModule> modules) {
final Control tree = checkboxTreeViewer.getControl();
tree.setRedraw(false);
try {
setGrayChecked(checkboxTreeViewer, false, list.contains(item));
for (final DebugTreeItem c : children) {
c.setChecked(checkboxTreeViewer, list);
c.getParent()
.updateMenuCategoryCheckedState(checkboxTreeViewer);
}
doSetChecked(checkboxTreeViewer, modules);
} finally {
tree.setRedraw(true);
}
}

private void doSetChecked(final CheckboxTreeViewer checkboxTreeViewer,
final Collection<IErlModule> modules) {
setGrayChecked(checkboxTreeViewer, false, modules.contains(item));
for (final DebugTreeItem c : children) {
c.setChecked(checkboxTreeViewer, modules);
c.getParent().updateMenuCategoryCheckedState(checkboxTreeViewer);
}
}
}

0 comments on commit b61f13c

Please sign in to comment.