Browse Source

Merge pull request #193 in DESIGN/design from ~JU/design:release/10.0 to release/10.0

* commit '279904b60508c99917a249552845324fc5fc8fd1':
  REPORT-9423 跟设计器相关的逻辑和信息都移动到设计器里
  REPORT-9423
  REPORT-9423
master
ju 6 years ago
parent
commit
b291c3dc56
  1. 21
      designer-base/src/com/fr/design/env/RemoteWorkspace.java
  2. 9
      designer-base/src/com/fr/design/mainframe/DesignerFrame.java
  3. 2
      designer-base/src/com/fr/env/EnvListPane.java

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

@ -1,8 +1,6 @@
package com.fr.design.env;
import com.fr.env.operator.decision.DecisionOperator;
import com.fr.general.Inter;
import com.fr.report.util.RemoteDesignAuthenticateUtils;
import com.fr.workspace.WorkContext;
import com.fr.workspace.Workspace;
import com.fr.workspace.connect.WorkspaceClient;
@ -17,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
@ -38,13 +27,7 @@ public class RemoteWorkspace implements Workspace {
return address;
}
@Override
public String getDescription() {
return userName + "@" + "[" + Inter.getLocText("Fine-Designer_Basic_Remote_Env") + "]";
}
@Override
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.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()) {

2
designer-base/src/com/fr/env/EnvListPane.java vendored

@ -58,7 +58,7 @@ public class EnvListPane extends JListControlPane {
*/
@Override
public NameableCreator[] createNameableCreators() {
NameableCreator local = new NameObjectCreator(Inter.getLocText("Env-Local_Directory"), "com/fr/design/images/data/bind/localconnect.png",
NameableCreator local = new NameObjectCreator(Inter.getLocText("FR-Engine-Local_Workspace"), "com/fr/design/images/data/bind/localconnect.png",
LocalDesignerWorkspaceInfo.class, LocalEnvPane.class);
NameableCreator remote = new NameObjectCreator(Inter.getLocText("Env-Remote_Server"), "com/fr/design/images/data/bind/distanceconnect.png",
RemoteDesignerWorkspaceInfo.class, RemoteEnvPane.class);

Loading…
Cancel
Save