diff --git a/designer-base/src/com/fr/design/env/RemoteWorkspace.java b/designer-base/src/com/fr/design/env/RemoteWorkspace.java index 49f0595e74..4994dcc5f9 100644 --- a/designer-base/src/com/fr/design/env/RemoteWorkspace.java +++ b/designer-base/src/com/fr/design/env/RemoteWorkspace.java @@ -1,7 +1,6 @@ package com.fr.design.env; import com.fr.env.operator.decision.DecisionOperator; -import com.fr.locale.InterProviderFactory; import com.fr.workspace.WorkContext; import com.fr.workspace.Workspace; import com.fr.workspace.connect.WorkspaceClient; @@ -16,20 +15,11 @@ public class RemoteWorkspace implements Workspace { private final WorkspaceClient client; private final String address; - - private final String userName; - + RemoteWorkspace(WorkspaceClient client, WorkspaceConnection connection) { this.client = client; this.address = connection.getUrl(); - this.userName = connection.getUserName(); - } - - @Override - public String getName() { - - return userName; } @Override @@ -37,13 +27,7 @@ public class RemoteWorkspace implements Workspace { return address; } - - @Override - public String getDescription() { - return InterProviderFactory.getProvider().getLocText("Fine-Designer_Basic_Remote_Env"); - } - @Override public boolean isWarDeploy() { diff --git a/designer-base/src/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/com/fr/design/mainframe/DesignerFrame.java index f4766b798e..13b40ef53b 100644 --- a/designer-base/src/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/com/fr/design/mainframe/DesignerFrame.java @@ -12,6 +12,7 @@ import com.fr.design.actions.core.ActionFactory; import com.fr.design.constants.UIConstants; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.TableDataTreePane; +import com.fr.design.env.DesignerWorkspaceInfo; import com.fr.design.event.DesignerOpenedListener; import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; @@ -40,6 +41,7 @@ import com.fr.file.FileNodeFILE; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralContext; import com.fr.general.Inter; +import com.fr.locale.InterProviderFactory; import com.fr.log.FineLoggerFactory; import com.fr.plugin.context.PluginContext; import com.fr.plugin.injectable.PluginModule; @@ -654,7 +656,12 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta String envName = DesignerEnvManager.getEnvManager().getCurEnvName(); Workspace workspace = WorkContext.getCurrent(); if (workspace != null) { - defaultTitleSB.append(workspace.getDescription()); + if (workspace.isLocal()) { + defaultTitleSB.append("@").append(envName).append("[").append(InterProviderFactory.getProvider().getLocText("FR-Engine-Local_Workspace")).append("]"); + } else { + DesignerWorkspaceInfo info = DesignerEnvManager.getEnvManager().getWorkspaceInfo(envName); + defaultTitleSB.append(info.getName()).append("@").append(envName).append("[").append(InterProviderFactory.getProvider().getLocText("Fine-Designer_Basic_Remote_Env")).append("]"); + } if (editingTemplate != null) { String path = editingTemplate.getEditingFILE().getPath(); if (!editingTemplate.getEditingFILE().exists()) {