| Summary: | [Editor]Need option not to show annotation in the ruler. | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | libing wang <libingw> |
| Component: | Client | Assignee: | Silenio Quarti <Silenio_Quarti> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Silenio_Quarti |
| Version: | 0.4 | ||
| Target Milestone: | 0.5 M1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
libing wang
There are at least two options here: 1) We let the annotation factory decide which rulers to create in createAnnotationRulers(). There are a few small changes in the editor to get this done so that it can live without the annotation/overview rulers but still have the annotation model/styler. We could also change the default factory in editorFeatures.js to take booleans specifying which rulers to create or you could just subclass the factory. 2) We add API in editor to decide which rulers are visible. Something like: editor.setAnnotationRulerVisible(false) editor.setOverviewRulerVisible(false) editor.setLineRulerVisible(false) The second option allows for dynamically controlling this after the editor is created. I can see it being useful for the line number ruler. For example, in eclipse the user can hide it. I am not this applies to the annotation/overview rulers. Of course, we could do both things as well. Any preferences? (In reply to comment #1) > There are at least two options here: > > 1) We let the annotation factory decide which rulers to create in > createAnnotationRulers(). There are a few small changes in the editor to get > this done so that it can live without the annotation/overview rulers but still > have the annotation model/styler. We could also change the default factory in > editorFeatures.js to take booleans specifying which rulers to create or you > could just subclass the factory. > > 2) We add API in editor to decide which rulers are visible. Something like: > > editor.setAnnotationRulerVisible(false) > editor.setOverviewRulerVisible(false) > editor.setLineRulerVisible(false) > > The second option allows for dynamically controlling this after the editor is > created. I can see it being useful for the line number ruler. For example, in > eclipse the user can hide it. I am not this applies to the annotation/overview > rulers. > > Of course, we could do both things as well. > > Any preferences? I prefer to the second. And even more, editor.setAnnotationRulerVisible(false) should be called automatically. Lets say if the compare editor supports find in the future. When the find&replace slide out is there the annotation ruler should show up. I think we should have kind of logic to let certain types of annotation to be visible (search) and other type not visible(char diff) in the ruler. If there are no visible annotations the ruler has to be removed. Just a thought though. Added editor.setXXXRulerVisible(). Fixed http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=7df014b7afbc53f87a2a24e4bb4dc3cba63a133b We already have a mechanism to filter which annotations are shown in the rulers and in the annotation styler. They will not be shown unless their type has been added to the ruler/styler by calling: ruler/styler.addAnnotationType(type); |