|
|
@ -22,7 +22,8 @@ import com.fr.workspace.WorkContextCallback; |
|
|
|
import com.fr.workspace.Workspace; |
|
|
|
import com.fr.workspace.Workspace; |
|
|
|
import com.fr.workspace.connect.AuthException; |
|
|
|
import com.fr.workspace.connect.AuthException; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.JOptionPane; |
|
|
|
|
|
|
|
import javax.swing.UIManager; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.Iterator; |
|
|
|
import java.util.Iterator; |
|
|
@ -108,9 +109,8 @@ public class SwitchExistEnv extends MenuDef { |
|
|
|
try { |
|
|
|
try { |
|
|
|
workspace = DesignerWorkspaceGenerator.generate(selectedEnv); |
|
|
|
workspace = DesignerWorkspaceGenerator.generate(selectedEnv); |
|
|
|
if (workspace == null) { |
|
|
|
if (workspace == null) { |
|
|
|
JOptionPane.showMessageDialog( |
|
|
|
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"FR-Designer_M-SwitchWorkspace", "Failed"}), |
|
|
|
DesignerContext.getDesignerFrame(), |
|
|
|
null, 0, UIManager.getIcon("OptionPane.errorIcon")); |
|
|
|
Inter.getLocText(new String[]{"FR-Designer_M-SwitchWorkspace", "Failed"})); |
|
|
|
|
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
WorkContext.switchTo(workspace, new WorkContextCallback() { |
|
|
|
WorkContext.switchTo(workspace, new WorkContextCallback() { |
|
|
@ -125,9 +125,8 @@ public class SwitchExistEnv extends MenuDef { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} catch (AuthException exception) { |
|
|
|
} catch (AuthException exception) { |
|
|
|
JOptionPane.showMessageDialog( |
|
|
|
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"Fine-Designer_Basic_Remote_Connect_Auth_Failed", "Failed"}), |
|
|
|
DesignerContext.getDesignerFrame(), |
|
|
|
null, 0, UIManager.getIcon("OptionPane.errorIcon")); |
|
|
|
Inter.getLocText(new String[]{"Fine-Designer_Basic_Remote_Connect_Auth_Failed"})); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|