Commit 55fa1d48 authored by Michael Schwarz's avatar Michael Schwarz

collapse decls, precs and imports in outline

parent f5a86b5f
......@@ -151,7 +151,7 @@ public class CupContentOutlinePage extends ContentOutlinePage implements
result.accept(visitor, null);
OutlineEntry tree = visitor.getTree();
viewer.setInput(tree);
try {
// viewer.getControl().setRedraw(false);
viewer.getTree().setRedraw(false);
......@@ -167,6 +167,11 @@ public class CupContentOutlinePage extends ContentOutlinePage implements
{
viewer.expandToLevel(2);
}
// Even though we expanded before, we want to collapse decls and precs
// and imports
viewer.setExpandedState(visitor.getDeclsAndPrec(), false);
viewer.setExpandedState(visitor.getImports(), false);
}
finally {
viewer.getTree().setRedraw(true);
......@@ -256,6 +261,14 @@ public class CupContentOutlinePage extends ContentOutlinePage implements
return root;
}
public OutlineEntry getDeclsAndPrec(){
return declsAndPrec;
}
public OutlineEntry getImports(){
return imports;
}
public int getProductionCount() {
return productionCount;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment