connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/OnDeviceConnectionAction.java
branchRCL_2_4
changeset 857 d66843399035
parent 0 fb279309251b
equal deleted inserted replaced
855:3f37e327885c 857:d66843399035
    17 
    17 
    18 
    18 
    19 package com.nokia.carbide.remoteconnections.settings.ui;
    19 package com.nokia.carbide.remoteconnections.settings.ui;
    20 
    20 
    21 import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator;
    21 import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator;
       
    22 import com.nokia.carbide.remoteconnections.view.ConnectionsView;
       
    23 import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
    22 
    24 
    23 import org.eclipse.jface.action.IAction;
    25 import org.eclipse.jface.action.IAction;
    24 import org.eclipse.jface.viewers.ISelection;
    26 import org.eclipse.jface.viewers.ISelection;
    25 import org.eclipse.ui.*;
    27 import org.eclipse.ui.*;
    26 
    28 
    35 		this.window = window;
    37 		this.window = window;
    36 	}
    38 	}
    37 
    39 
    38 	public void run(IAction action) {
    40 	public void run(IAction action) {
    39 		// Ensure the remote connections view is visible
    41 		// Ensure the remote connections view is visible
    40         IWorkbenchPage page = window.getActivePage();
    42         try {
    41         if (page != null) {
    43         	WorkbenchUtils.getView(ConnectionsView.VIEW_ID);
    42             try {
    44         } 
    43                 page.showView("com.nokia.carbide.remoteconnections.view.ConnectionsView"); //$NON-NLS-1$
    45         catch (PartInitException e) {
    44             } 
    46         	RemoteConnectionsActivator.logError(e);
    45             catch (PartInitException e) {
       
    46             	RemoteConnectionsActivator.logError(e);
       
    47             }
       
    48         }
    47         }
    49 		
    48 		
    50 		// Launch the new connection wizard
    49 		// Launch the new connection wizard
    51 		SettingsWizard wizard = new SettingsWizard();
    50 		SettingsWizard wizard = new SettingsWizard();
    52 		wizard.open(window.getShell());
    51 		wizard.open(window.getShell());