Browse Source

REPORT-9423 跟设计器相关的逻辑和信息都移动到设计器里

master
ju 6 years ago
parent
commit
279904b605
  1. 18
      designer-base/src/com/fr/design/env/RemoteWorkspace.java
  2. 9
      designer-base/src/com/fr/design/mainframe/DesignerFrame.java

18
designer-base/src/com/fr/design/env/RemoteWorkspace.java vendored

@ -1,7 +1,6 @@
package com.fr.design.env; package com.fr.design.env;
import com.fr.env.operator.decision.DecisionOperator; import com.fr.env.operator.decision.DecisionOperator;
import com.fr.locale.InterProviderFactory;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import com.fr.workspace.Workspace; import com.fr.workspace.Workspace;
import com.fr.workspace.connect.WorkspaceClient; import com.fr.workspace.connect.WorkspaceClient;
@ -16,20 +15,11 @@ public class RemoteWorkspace implements Workspace {
private final WorkspaceClient client; private final WorkspaceClient client;
private final String address; private final String address;
private final String userName;
RemoteWorkspace(WorkspaceClient client, WorkspaceConnection connection) { RemoteWorkspace(WorkspaceClient client, WorkspaceConnection connection) {
this.client = client; this.client = client;
this.address = connection.getUrl(); this.address = connection.getUrl();
this.userName = connection.getUserName();
}
@Override
public String getName() {
return userName;
} }
@Override @Override
@ -37,13 +27,7 @@ public class RemoteWorkspace implements Workspace {
return address; return address;
} }
@Override
public String getDescription() {
return InterProviderFactory.getProvider().getLocText("Fine-Designer_Basic_Remote_Env");
}
@Override @Override
public boolean isWarDeploy() { public boolean isWarDeploy() {

9
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.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.event.DesignerOpenedListener; import com.fr.design.event.DesignerOpenedListener;
import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener; import com.fr.design.event.TargetModifiedListener;
@ -40,6 +41,7 @@ import com.fr.file.FileNodeFILE;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.context.PluginContext; import com.fr.plugin.context.PluginContext;
import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.injectable.PluginModule;
@ -654,7 +656,12 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
String envName = DesignerEnvManager.getEnvManager().getCurEnvName(); String envName = DesignerEnvManager.getEnvManager().getCurEnvName();
Workspace workspace = WorkContext.getCurrent(); Workspace workspace = WorkContext.getCurrent();
if (workspace != null) { 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) { if (editingTemplate != null) {
String path = editingTemplate.getEditingFILE().getPath(); String path = editingTemplate.getEditingFILE().getPath();
if (!editingTemplate.getEditingFILE().exists()) { if (!editingTemplate.getEditingFILE().exists()) {

Loading…
Cancel
Save