I want to open the Eclipse internal Web browser programmatically on the right side of the editor area, regardless of the open perspective.
I have no problem doing it in the main editor area, but when I open the browser as (or inside) a View, it is opened at the bottom position.
How do I do that? So far I tried:
- PlatformUI.getWorkbench().getBrowserSupport().createBrowser
- create a view and call ShowView
- create a fast view and open it using org.eclipse.ui.perspectiveExtensions
but none of them gave me any control over the position.
I don't want to create my own perspective, because the browser I want to add must not change the user's environment.
Thanks for your help,
Yaron.
Related
I want to achieve something during run time.
I have a customized editor plugin. Now, what I want is whenever someone opens this editor, there should be a view displayed in bottom folder no matter what the current perspective is.
What I meant from above is, say currently "Java" perspective is shown on active page , so whenever someone opens my custom editor, I want to add a view in bottom folder(where we see "Problems" tab). Similarly, for any current perspective, my view should get rendered as soon as my custom editor is opened.
I know about initial layout and adding a place holder view, but I can not add place holder to each and every perspective. I want this to work for any perspective opened.
Can someone please suggest workaround for this ?
Thanks in Advance !
I was running my app when suddenly the layout of eclips changed.Now, the project explorer is at the top and the editor below it.What I want is the explorer to be to the left side and the editor to the right.Just like it used to be.It might be simple issue but very annoying as I can't see the files without having to scroll down in the explorer window.I tried reset perspective but didn't work! Any ideas?
You can use the menu command Window > Reset Perspective to restore it to it's default layout. Otherwise, you can move Views around however you like to get a custom layout.
I use dual monitor for work and I prefer to have the editor on my main screen while the rest of eclipse in my laptop monitor.
However, when I open a new file, that is. I open a file with Cmd-Shift-R, files are opened in my laptop monitor as opposed to the editor that I dragged to my main screen.
I find this mildly annoying. Any ideas?
Are using the Window -> New Window feature? In that case it depends on which window you're working on at the time you press Ctrl+Shift+R.
However, if you're streching only one Eclipse window along both monitors, then the Open Resource dialog will be opened in your "monitor number 1" (and that depends on your graphic configuration: Laptop+Main or Main+Laptop).
I found easier to avoid the new window menu and just to drag those views out of eclipse. This creates a secondary window but the project explorer is linked to the old window so double click will open the file on the main window.
I recommend to save everything as a new perspective that I usually call "Java 2 Windows". This way I can change perspectives when I do not have an auxiliar screen.
P.S. Just avoid closing the auxiliar window when leaving eclipse.
I have an eclipse view and whenever I open that view, I want it to default open in Right Side of the eclipse.
How to make this possible
while being in an eclipse perspective place the views in the locations you want. After exiting and reopening eclipse the views will remain in the positions you placed them in the respective perspective.
If you want to programatically position your view, right away when it is opened for the first time, you can create your own perspective, adn in that perspective you either include the view in the desired location, or you include a placeholder to define where the view should appear as soon as it's opened. See API for org.eclipse.ui.IPageLayout, method addPlaceholder.
If you don't create your own perspective, you may not be able to influence where your view is initially positioned. You can only manually position the view after it had been opened, and Eclipse will then remember this location in the workspace.
Does anyone know of a way to make Eclipse an SDI application rather than an MDI one?
SDI - Single document interface, each pane is its own window
MDI - Multiple document interface, all of the panes are stuck inside one "master" window.
Eclipse is an MDI application. All of the little panes (like the call stack, variable viewer, etc) are part of the one master Eclipse window. Rather than having all of the windows stuck inside one master "eclipse" window, I'd like them to all be their own free-floating windows.
To make a pane "free-floatting" just drag that pane outside the main eclipse window.
If you have only one monitor, you have to resize first your eclipse window: you can not leave eclipse maximized on all the screen space.
Then you have to drag your pane outside the eclipse window until you see the cursor change into a little window with a '+' in the middle.
Once all your panes are in the required position, save your configuration in a new perspective. (Menu Window\Save Perspective As)
That way, you can switch between panes configurations easily.
Regarding the SDI aspect however, the editor part of eclipse is made to edit several document (so, MDI only).
Karl's double-click suggestion is the most effective to focus on one of those edited document.
Hit the little X next to each document until there is only one open.
Alternatively, doubleclick on the tab to maximize it.
Then edit your question to give some more information about what you really want to do.
No, Unfortuantly Eclipse 3.x and lower do not allow the editor window to be outside the application window. You can drag other windows outside the main window to give you more editor space, but you cannot for example drag an editor outside the main eclipse window onto a second monitor and to have another code window open on the main monitor. This feature seems to be scheduled for Eclipse 4. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=8886 for this feature.