I have an API which opens up a new workbench window with my own editor as default editor.
Now when I call this API in a wizard , which has always-on-top behavior, my new workbench window opens up but when I even click on this window it gets below the already opened wizard. When I close this wizard, the newly workbench window works fine.
So my question is, can I open a new workbench window on top of a wizard using -
PlatformUI.getWorkbench().openWorkbenchWindow(<my_perspective_id>, null);
Detailed example, say X is my initial workbench window , I open a wizard W from that workbench window X...........
Now in that wizard I call an API to open up my new workbench window , but this workbench window doesn't stay in focus. Any Solutions ?
Thanks in Advance !
No you can't get the window above the wizard. The always on top setting for the wizard applies to the entire application.
Related
I have created a custom eclipse editor and want a view to be opened in the event the editor is active. If the view is already open then nothing should be done. I also want this functionality for the console in that the console should be open in the event my custom editor is active. Is this possible to do in Eclipse plugin development environment?
You can open the view in the init method of your editor using something like:
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
page.showView("org.eclipse.ui.console.ConsoleView");
This will open the view if it is not open or make it the active view if it is already open.
When I open the package explorer perspective in eclipse, it always opens in a new window. I would want this to be attached to the editor. Please refer the image below
My preferences for perspective is as follows
I could not find a way to solve this. Please help. I am using eclipse Luna
From navigation bar select 'Window' >>> 'New window'.
It looks like you have the editor area maximized, so there is no space for other views on the main window.
Double click on the editor tab bar to restore the editor area to normal (not maximized) and the package explorer should display as normal.
Closing all open perspectives and opening package explorer again solved it.
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.
Is there a function that would arrange windows in Eclipse into state that was previously saved?
I always resize windows (Package Explorer, panels with views etc.) based on current needs and then I have to put it back.
Maximizing and minimizing is great but this would be really a killer feature. A click to arrange windows to the desired state would be perfect
You can save your Perspective how you like it and then when that Perspective gets loaded it will come back to the saved state:
Window > Save Perspective As...
To reset:
Window > Reset Perspective...
Click on windows > Perspective > Reset Perspective
Open new window it will set a default view for eclipse
window->new window
I was wondering if there is a manner to make it impossible to open more than 1 editor at a time? what I have now is a button that each time it is pressed gives a new editor.
I am using eclipse RCP
thanks
You could add an IPartListener on the IPartService of the IWorkbenchWindow that close all other editors when a new editor is opened. You find the current set of editors via IWorkbenchPage.getEditorReferences().