|
|
@ -8,12 +8,15 @@ import com.fr.base.FRContext; |
|
|
|
import com.fr.base.Utils; |
|
|
|
import com.fr.base.Utils; |
|
|
|
import com.fr.design.actions.help.alphafine.AlphaFineConfigManager; |
|
|
|
import com.fr.design.actions.help.alphafine.AlphaFineConfigManager; |
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
|
|
|
|
import com.fr.design.data.DesignTableDataManager; |
|
|
|
import com.fr.design.env.DesignerWorkspaceGenerator; |
|
|
|
import com.fr.design.env.DesignerWorkspaceGenerator; |
|
|
|
import com.fr.design.env.DesignerWorkspaceInfo; |
|
|
|
import com.fr.design.env.DesignerWorkspaceInfo; |
|
|
|
import com.fr.design.env.DesignerWorkspaceType; |
|
|
|
import com.fr.design.env.DesignerWorkspaceType; |
|
|
|
import com.fr.design.env.LocalDesignerWorkspaceInfo; |
|
|
|
import com.fr.design.env.LocalDesignerWorkspaceInfo; |
|
|
|
import com.fr.design.env.RemoteDesignerWorkspaceInfo; |
|
|
|
import com.fr.design.env.RemoteDesignerWorkspaceInfo; |
|
|
|
|
|
|
|
import com.fr.design.file.HistoryTemplateListPane; |
|
|
|
import com.fr.design.style.color.ColorSelectConfigManager; |
|
|
|
import com.fr.design.style.color.ColorSelectConfigManager; |
|
|
|
|
|
|
|
import com.fr.design.utils.DesignUtils; |
|
|
|
import com.fr.file.FILEFactory; |
|
|
|
import com.fr.file.FILEFactory; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.FRLogFormatter; |
|
|
|
import com.fr.general.FRLogFormatter; |
|
|
@ -37,6 +40,7 @@ import com.fr.stable.xml.XMLTools; |
|
|
|
import com.fr.stable.xml.XMLWriter; |
|
|
|
import com.fr.stable.xml.XMLWriter; |
|
|
|
import com.fr.stable.xml.XMLableReader; |
|
|
|
import com.fr.stable.xml.XMLableReader; |
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
|
|
|
|
import com.fr.workspace.WorkContextCallback; |
|
|
|
import com.fr.workspace.connect.AuthException; |
|
|
|
import com.fr.workspace.connect.AuthException; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.SwingWorker; |
|
|
|
import javax.swing.SwingWorker; |
|
|
@ -498,7 +502,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { |
|
|
|
* 返回默认环境 |
|
|
|
* 返回默认环境 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public DesignerWorkspaceInfo getDefaultConfig() { |
|
|
|
public DesignerWorkspaceInfo getDefaultConfig() { |
|
|
|
String installHome = StableUtils.getInstallHome(); |
|
|
|
String installHome = StableUtils.getInstallHome(); |
|
|
|
String defaultenvPath = getDefaultenvPath(installHome); |
|
|
|
String defaultenvPath = getDefaultenvPath(installHome); |
|
|
|
defaultenvPath = new File(defaultenvPath).getPath(); |
|
|
|
defaultenvPath = new File(defaultenvPath).getPath(); |
|
|
|
Iterator<Entry<String, DesignerWorkspaceInfo>> entryIt = nameEnvMap.entrySet().iterator(); |
|
|
|
Iterator<Entry<String, DesignerWorkspaceInfo>> entryIt = nameEnvMap.entrySet().iterator(); |
|
|
@ -549,7 +553,18 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
try { |
|
|
|
try { |
|
|
|
WorkContext.switchTo(DesignerWorkspaceGenerator.generate(getDefaultConfig())); |
|
|
|
String envName = getDefaultEnvName(); |
|
|
|
|
|
|
|
WorkContext.switchTo(DesignerWorkspaceGenerator.generate(getDefaultConfig()),new WorkContextCallback() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void done() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DesignerEnvManager.getEnvManager().setCurEnvName(envName); |
|
|
|
|
|
|
|
DesignUtils.refreshDesignerFrame(); |
|
|
|
|
|
|
|
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshToolArea(); |
|
|
|
|
|
|
|
DesignTableDataManager.fireDSChanged(new HashMap<String, String>()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
} catch (AuthException e) { |
|
|
|
} catch (AuthException e) { |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
} |
|
|
|
} |
|
|
|