diff options
author | Pawel Piech | 2013-03-11 19:03:45 +0000 |
---|---|---|
committer | Pawel Piech | 2013-03-11 19:03:45 +0000 |
commit | ecd0359c873caf394e4bdf18dd5a1fc094503311 (patch) | |
tree | 75ed96a822a46c41b969d39ccefe86e4ac045ed9 | |
parent | e859d55406f5ae33cf329228ff97252b8c850d10 (diff) | |
download | eclipse.platform.debug-ecd0359c873caf394e4bdf18dd5a1fc094503311.tar.gz eclipse.platform.debug-ecd0359c873caf394e4bdf18dd5a1fc094503311.tar.xz eclipse.platform.debug-ecd0359c873caf394e4bdf18dd5a1fc094503311.zip |
Revert "Bug 402946 - WatchExpressionTests.testDeferredExpression fails"
This reverts commit e859d55406f5ae33cf329228ff97252b8c850d10.
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java | 61 |
1 files changed, 28 insertions, 33 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java index ce7163aa0..40f047092 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java @@ -393,16 +393,14 @@ public class ExpressionView extends VariablesView { } private String[] loadWorkingSetNames(IMemento memento) { - if (memento != null) { - IMemento[] workingsets = memento.getChildren(PREF_ELEMENT_WORKINGSET); - if (workingsets != null) { - List list = new ArrayList(); - for (int j=0; j<workingsets.length; j++) { - list.add(workingsets[j].getID()); - } - return (String[])list.toArray(new String[list.size()]); - } - } + IMemento[] workingsets = memento.getChildren(PREF_ELEMENT_WORKINGSET); + if (workingsets != null) { + List list = new ArrayList(); + for (int j=0; j<workingsets.length; j++) { + list.add(workingsets[j].getID()); + } + return (String[])list.toArray(new String[list.size()]); + } return new String[0]; } @@ -419,30 +417,27 @@ public class ExpressionView extends VariablesView { } private void initWorkingSetMementos() { - IMemento memento = getMemento(); - if (memento != null) { - IMemento[] workingsetMementos = memento.getChildren(PREF_ELEMENT_WORKINGSET_MEMENTOS); - if (workingsetMementos != null) { - for (int j=0; j<workingsetMementos.length; j++) { - String[] workingSetNames = loadWorkingSetNames(workingsetMementos[j]); - String string = workingsetMementos[j].getID(); - if(string.length() > 0 && workingSetNames != null) { - ByteArrayInputStream bin = new ByteArrayInputStream(string.getBytes()); - InputStreamReader reader = new InputStreamReader(bin); - try { - XMLMemento workingSetsKey = XMLMemento.createReadRoot(reader); - fWorkingSetMementos.put( new XMLMementoKey(workingSetsKey), workingSetNames ); - } catch (WorkbenchException e) { - } finally { - try { - reader.close(); - bin.close(); - } catch (IOException e){} - } - } - } + IMemento[] workingsetMementos = getMemento().getChildren(PREF_ELEMENT_WORKINGSET_MEMENTOS); + if (workingsetMementos != null) { + for (int j=0; j<workingsetMementos.length; j++) { + String[] workingSetNames = loadWorkingSetNames(workingsetMementos[j]); + String string = workingsetMementos[j].getID(); + if(string.length() > 0 && workingSetNames != null) { + ByteArrayInputStream bin = new ByteArrayInputStream(string.getBytes()); + InputStreamReader reader = new InputStreamReader(bin); + try { + XMLMemento workingSetsKey = XMLMemento.createReadRoot(reader); + fWorkingSetMementos.put( new XMLMementoKey(workingSetsKey), workingSetNames ); + } catch (WorkbenchException e) { + } finally { + try { + reader.close(); + bin.close(); + } catch (IOException e){} + } + } } - } + } } public void saveViewerState(IMemento memento) { |