Commit 55fa1d48 authored by Michael Schwarz's avatar Michael Schwarz 🤔
Browse files

collapse decls, precs and imports in outline

parent f5a86b5f
...@@ -167,6 +167,11 @@ public class CupContentOutlinePage extends ContentOutlinePage implements ...@@ -167,6 +167,11 @@ public class CupContentOutlinePage extends ContentOutlinePage implements
{ {
viewer.expandToLevel(2); 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 { finally {
viewer.getTree().setRedraw(true); viewer.getTree().setRedraw(true);
...@@ -256,6 +261,14 @@ public class CupContentOutlinePage extends ContentOutlinePage implements ...@@ -256,6 +261,14 @@ public class CupContentOutlinePage extends ContentOutlinePage implements
return root; return root;
} }
public OutlineEntry getDeclsAndPrec(){
return declsAndPrec;
}
public OutlineEntry getImports(){
return imports;
}
public int getProductionCount() { public int getProductionCount() {
return productionCount; return productionCount;
} }
......
Supports Markdown
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