score:46
You are probably looking for this:
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("viewId");
score:0
In e4, the EPartService is responsible for opening Parts. This can also be used to open e3 ViewParts. Instantiate the following class through your IEclipseContext, call the openPart-Method, and you should see the Eclipse internal browser view.
public class Opener {
@Inject
EPartService partService;
public void openPart() {
MPart part = partService.createPart("org.eclipse.ui.browser.view");
part.setLabel("Browser");
partService.showPart(part, PartState.ACTIVATE);
}
}
Here you can find an example of how this works together with your Application.e4xmi.
score:4
I found the need to bring the view to the front after it had been opened and pushed to the background. The activate method does the trick.
PlatformUI.getWorkbench()
.getActiveWorkbenchWindow()
.getActivePage()
.activate(workbenchPartToActivate);
NOTE: The workbenchPartToActivate is an instance of IWorkbenchPart
.
score:20
If called from handler of a command
HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().showView(viewId);
would be better, as I know.
Source: stackoverflow.com
Related Query
- Programmatically showing a View from an Eclipse Plug-in
- Can Eclipse be configured to prevent certain warnings from showing up in the Problems view pane?
- Showing JUnit view in Eclipse when running tests from Code
- Eclipse Problems View not showing Errors anymore
- Remove project .jars from project explorer view in Eclipse
- How do I stop the error log view showing in eclipse
- How to prevent Eclipse from showing the opened file in package explorer
- "Servers" view missing from Eclipse Indigo
- How to remove native support from an Android Project in eclipse because eclipse is showing errors in jni?
- Annotation processor-generated Errors/warnings not showing in Eclipse editor or Problems view
- Change Menu Items Programmatically From Eclipse Plugin
- Programmatically list open projects in an eclipse workspace from outside of eclipse
- Eclipse showing java project src folder view as all packages and subpackages
- Programmatically add source folder from Eclipse plugin
- view native code from Eclipse
- Programmatically capture compiler errors from Eclipse
- How to remove file path viewer from eclipse editor view
- Remove view name from Eclipse menu Window -> Show View
- How to programmatically find a .java file in an Eclipse plugin from full classname?
- Collapsing sub-packages from NetBeans or Eclipse in java project view
- passing data to view from part in eclipse 4 RCP
- WebContents folder not visible from Eclipse Project View
- Eclipse is not showing any projects from my workspace folder even the projects are there?
- View Eclipse Run As configurations from filesystem
- Open Eclipse Custom Editor file programmatically from file system
- Unable to view any folders on DFS locations connecting to hadoop from eclipse
- Eclipse not showing classes from an external JAR file
- Tasks view in Eclipse not showing TODOs?
- Interactive Chart sample from google developers showing error eclipse
- Showing markers in the Eclipse "file compare" view
More Query from same tag
- Trying to make a simple app with addition of variables, having some problems
- FXML layout not loaded when run jar outside Eclipse
- Cost effective Eclipse plugin license solution
- Program provides correct output for println(String s); but not print(String s); why?
- Does eclipse.org have a user feedback forum?
- I'm trying to install eclipse egit but there's this error saying
- How to enable changes on commit in eclipse using egit plugin
- Smalltalk-style method browsing for eclipse Java?
- Eclipse+Node.js error when debugging: "Failed to connect to Standalone V8 VM connect timed out"
- Trying to use Eclipse for c++ project on Mac
- How do I add the JJIL libraries to my Android Eclipse project?
- eclipse / aptana - text compare show code syntax highliging
- Eclipse configuration issue for android
- Monitoring heap in java android app
- android - the apk must be signed with the same certificates as the previous version
- debug Blender Python in Eclipse and PyDev?
- How to configure eclipse background color for pop ups in Java Editor
- How to Set Java Path On Windows?
- How can I Browse Eclipse Juno Source Code from within Eclipse?
- Getting "new" dependency from org.eclipse.xtext.common.types
- Automatic Install of Maven Projects in Eclipse upon Build
- MySQL Non Registering Driver
- Socket data type giving error even after importing java.net.*;
- How do I run eclipse remotely using Cygwin?
- Which Eclipse package for total noob to download, and can I change it later?
- Eclipse with ADT - JUnit Test Not Running With EclEmma
- nutch2.0 with cassandra
- debugging a node application with eclipse
- How to print a string formatted properly
- Get mysql and java to work together