Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrolled line should appear in the middle of the editor #6330

Closed
tolusha opened this issue Sep 19, 2017 · 2 comments
Closed

Scrolled line should appear in the middle of the editor #6330

tolusha opened this issue Sep 19, 2017 · 2 comments
Assignees
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.

Comments

@tolusha
Copy link
Contributor

tolusha commented Sep 19, 2017

We have dozens of places where we programmatically scroll the file to the specific line:

    new Timer() {
      @Override
      public void run() {
             textEditor.setCursorPosition(new TextPosition(lineNumber, 0));
      }
    }.schedule(300);

The scrolled line usually appears in the bottom of the editor that isn't a convenient.
It should be the middle of the editor.

https://orionhub.org/jsdoc/symbols/orion.editor.TextViewShowOptions.html

The goal of the task is to rework method https://github.com/eclipse/che/blob/fc3a2d2b2db7b1a319c33ff1774be9fb3969ec93/ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionEditorPresenter.java#L743
to avoid using timer and to display scrolled line in the middle of the editor.

https://github.com/eclipse/che/blob/6e9825c699d34eef6b8bf36fc0194ff871cbee84/ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionTextViewOverlay.java#L128
https://github.com/eclipse/che/blob/6e9825c699d34eef6b8bf36fc0194ff871cbee84/ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionTextViewShowOptionsOverlay.java#L15

@tolusha tolusha added team/ide status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it. and removed team/ide labels Sep 19, 2017
@tolusha tolusha added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Oct 27, 2017
@vinokurig vinokurig self-assigned this Dec 14, 2017
@vinokurig vinokurig added status/in-progress This issue has been taken by an engineer and is under active development. and removed status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it. labels Dec 14, 2017
@tsmaeder
Copy link
Contributor

#6673 duplicate?

@vinokurig
Copy link
Contributor

No that's another problem.

@vinokurig vinokurig added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. and removed status/in-progress This issue has been taken by an engineer and is under active development. labels Dec 18, 2017
@tolusha tolusha removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Dec 20, 2017
@tolusha tolusha closed this as completed Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

No branches or pull requests

3 participants