Package org.eclipse.ui

Examples of org.eclipse.ui.IWorkbenchListener


     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
     */
    public void start(BundleContext context) throws Exception {
        super.start(context);
        INSTANCE = this;
        PlatformUI.getWorkbench().addWorkbenchListener(new IWorkbenchListener() {

            public void postShutdown(IWorkbench workbench) {
            }

            public boolean preShutdown(IWorkbench workbench, boolean forced) {
View Full Code Here


    this(interfacePath, project);
    this.repository = repository;
    this.workspace = workspace;
    this.workspacePassword = workspacePassword;
    IWorkbench workBench = PlatformUI.getWorkbench();
    workBench.addWorkbenchListener(new IWorkbenchListener() {
     
      @Override
      public boolean preShutdown(IWorkbench workBench, boolean forced) {
        try {
          closeWorkspace();
View Full Code Here

   * @since 3.2
   */
  boolean firePreShutdown(final boolean forced) {
    Object list[] = workbenchListeners.getListeners();
    for (int i = 0; i < list.length; i++) {
      final IWorkbenchListener l = (IWorkbenchListener) list[i];
      final boolean[] result = new boolean[] { false };
      SafeRunnable.run(new SafeRunnable() {
        public void run() {
          result[0] = l.preShutdown(Workbench.this, forced);
        }
      });
      if (!result[0]) {
        return false;
      }
View Full Code Here

   * @since 3.2
   */
  void firePostShutdown() {
    Object list[] = workbenchListeners.getListeners();
    for (int i = 0; i < list.length; i++) {
      final IWorkbenchListener l = (IWorkbenchListener) list[i];
      SafeRunnable.run(new SafeRunnable() {
        public void run() {
          l.postShutdown(Workbench.this);
        }
      });
    }
  }
View Full Code Here

   
    public static void start(String name) {
        instance = new LogConsole(name);
       
        // due to JobManager shutting down we need to stop early
        PlatformUI.getWorkbench().addWorkbenchListener(new IWorkbenchListener() {
           
            @Override
            public boolean preShutdown(IWorkbench workbench, boolean forced) {
                stop();
                return true;
View Full Code Here

    bundleContext = context;

    checkRutaInterpreter();

    IWorkbench workbench = PlatformUI.getWorkbench();
    workbench.addWorkbenchListener(new IWorkbenchListener() {
      public boolean preShutdown(IWorkbench workbench, boolean forced) {
        // close all CAS Editors if on is focused when exiting Eclipse
        final IWorkbenchPage activePage = workbench.getActiveWorkbenchWindow().getActivePage();
        IEditorPart activeEditor = activePage.getActiveEditor();
        if (activeEditor != null
View Full Code Here

    di.generateFromDI();
  }

  private void addWorkbenchListener() {
    if (workbenchListener==null) {
      workbenchListener = new IWorkbenchListener() {
        @Override
        public boolean preShutdown(IWorkbench workbench, boolean forced) {
          workbenchShutdown = true;
          return true;
        }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IWorkbenchListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.