Theia: Add an ability to open editor in the specified column

Created on 20 Nov 2018  路  13Comments  路  Source: eclipse-theia/theia

Add an enum [Active, One, two, Three] to EditorOpenerOptions parameters and open the editor in the specified column when EditorManager.openEditor(params: EditorOpenerOptions) is called:
screenshot-localhost-3000-2018 11 21-10-32-38

is needed for #2801

todo

All 13 comments

What do you mean by a separate area? Do you mean opening to the side? There are already options for it, please look at ApplicationShell.WidgetOptions.

If you click on file in the navigator, it will be opened in a new tab:
screenshot-localhost-3000-2018 11 20-17-05-49
But I would like to have an ability to open the next editor in a separate tab:
screenshot-localhost-3000-2018 11 20-17-07-02

Try widgetOptions: { mode: 'split-right' } or widgetOptions: { mode: 'split-bottom' } to open a new tab bar area to right or to bottom relative to last focused widget.

Ok, thanks

can we close this?

Let me try the proposed solution. I'll close it if it would work for me.

@akosyakov Thank you for your advice but it didn't solves my issue. I've studied the vscode plugin system and found that current solution doesn't fit it. This can only open the editor in a new column, but I need to open the editor in the specified column as well.
P.S. Rephrased the issue

Our areas don't have the notion of columns. I think first you will need to simulate it somehow on the top of existing APIs in the plugin extension. Later if it is turned out to be useful for extension developers we can introduce such modes in the core.

Our areas don't have the notion of columns

Column may be a wrong word but, anyway it is possible to open several editors in the same area (see the screen-shot in the description), so this issue is actual.

You can align the terminology with the one from the vs code API.

Can you link to the respective part in vscode.d.ts?

Found it 'ViewColumn'.

I think that can be modelled within the plug-in extensions without modfiying the application shell too much.

This is already implemented by widgetOptions: { ref: widget } in OpenerOptions. I'll open a PR for plugin side.

Was this page helpful?
0 / 5 - 0 ratings