Browse Source

Merge branch 'release/10.0' of http://cloud.finedevelop.com:2015/scm/~plough/10-design into release/10.0

final/10.0
plough 6 years ago
parent
commit
2704c0c135
  1. 19
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 2
      designer-base/src/main/java/com/fr/design/actions/help/WebDemoAction.java
  3. 2
      designer-base/src/main/java/com/fr/design/extra/PluginUtils.java
  4. 1
      designer-base/src/main/java/com/fr/design/utils/DesignUtils.java
  5. 9
      designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java
  6. 5
      designer-realize/src/main/java/com/fr/start/Designer.java

19
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

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

2
designer-base/src/main/java/com/fr/design/actions/help/WebDemoAction.java

@ -1,6 +1,7 @@
package com.fr.design.actions.help;
import com.fr.base.BaseUtils;
import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
@ -23,6 +24,7 @@ public class WebDemoAction extends UpdateAction {
* @param evt 事件
*/
public void actionPerformed(ActionEvent evt) {
DesignerEnvManager.getEnvManager().setCurrentEnv2Default();
ServerStarter.browserDemoURL();
}

2
designer-base/src/main/java/com/fr/design/extra/PluginUtils.java

@ -229,7 +229,7 @@ public class PluginUtils {
jo.put("free", pluginContext.isFree());
jo.put("licDamaged", pluginContext.isLicDamaged());
jo.put("available", pluginContext.isAvailable());
jo.put("leftDays", String.valueOf(pluginContext.getLeftDays()));
jo.put("leftDays", pluginContext.getLeftDays());
jo.put("trial", pluginContext.isOnTrial());
jo.put("deadline", getDeadline(pluginContext));
jo.put("registerFailed", pluginContext.isRegisterFailed());

1
designer-base/src/main/java/com/fr/design/utils/DesignUtils.java

@ -128,6 +128,7 @@ public class DesignUtils {
String line = null;
while ((line = reader.readLine()) != null) {
if (line.startsWith("demo")) {
DesignerEnvManager.getEnvManager().setCurrentEnv2Default();
ServerStarter.browserDemoURL();
} else if (StringUtils.isNotEmpty(line)) {
File f = new File(line);

9
designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java

@ -136,15 +136,6 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
allCharts[i] = rowChart;
}
//异步加载图片
new Thread(new Runnable() {
@Override
public void run() {
initAllChartsDemoImage(allCharts);
}
}).start();
return child;
}

5
designer-realize/src/main/java/com/fr/start/Designer.java

@ -150,11 +150,6 @@ public class Designer extends BaseDesigner {
private static SplashStrategy createSplash() {
// 这里可以开接口加载自定义启动画面
if (OperatingSystem.isWindows()) {
return new SplashFx();
} else if (OperatingSystem.isMacOS()) {
return new SplashMac();
}
return new SplashFx();
}

Loading…
Cancel
Save