Browse Source

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

plough 8 years ago
parent
commit
af1f2e58d7
  1. 42
      designer_base/src/com/fr/start/Demo.java
  2. 7
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java

42
designer_base/src/com/fr/start/Demo.java

@ -8,42 +8,42 @@ import com.fr.stable.StableUtils;
import java.io.IOException; import java.io.IOException;
public class Demo { public class Demo {
public static void main(String[] args) { public static void main(String[] args) {
String installHome = StableUtils.getInstallHome(); String installHome = StableUtils.getInstallHome();
if (installHome == null) { if (installHome == null) {
FRContext.getLogger().error("Can not find the install home, please check it."); FRContext.getLogger().error("Can not find the install home, please check it.");
return; return;
} }
String executorPath; String executorPath;
if (OperatingSystem.isMacOS()) { if (OperatingSystem.isMacOS()) {
executorPath = StableUtils.pathJoin(installHome, "bin", "designer.app --args demo"); executorPath = StableUtils.pathJoin(installHome, "bin", "designer.app");
} else { } else {
executorPath = StableUtils.pathJoin(installHome, "bin", "designer.exe demo"); executorPath = StableUtils.pathJoin(installHome, "bin", "designer.exe demo");
} }
if (!new java.io.File(executorPath).exists()) { if (!new java.io.File(executorPath).exists()) {
FRContext.getLogger().error(executorPath + " can not be found."); FRContext.getLogger().error(executorPath + " can not be found.");
} }
if (OperatingSystem.isMacOS()) { if (OperatingSystem.isMacOS()) {
ProcessBuilder builder = new ProcessBuilder(); ProcessBuilder builder = new ProcessBuilder();
builder.command("open -a", executorPath); builder.command("open", "-a", executorPath, "--args", "demo");
try { try {
builder.start(); builder.start();
} catch (IOException e) { } catch (IOException e) {
FRContext.getLogger().error(e.getMessage(), e); FRContext.getLogger().error(e.getMessage(), e);
} }
} else { } else {
// ProcessBuilder这种方式在window下报错:系统找不到指定文件 // ProcessBuilder这种方式在window下报错:系统找不到指定文件
Runtime rt = Runtime.getRuntime(); Runtime rt = Runtime.getRuntime();
try { try {
rt.exec(executorPath); rt.exec(executorPath);
} catch (IOException e) { } catch (IOException e) {
FRContext.getLogger().error(e.getMessage(), e); FRContext.getLogger().error(e.getMessage(), e);
} }
} }
System.exit(0); System.exit(0);
} }
} }

7
designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java

@ -659,13 +659,6 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
private void populateHyperlink(Plot plot) { private void populateHyperlink(Plot plot) {
HashMap paneMap = renewMapWithPlot(plot); HashMap paneMap = renewMapWithPlot(plot);
//安装平台内打开插件时,添加相应按钮
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG);
for (HyperlinkProvider provider : providers) {
NameableCreator nc = provider.createHyperlinkCreator();
paneMap.put(nc.getHyperlink(), nc.getUpdatePane());
}
List<UIMenuNameableCreator> list = refreshList(paneMap); List<UIMenuNameableCreator> list = refreshList(paneMap);
superLink.refreshMenuAndAddMenuAction(list); superLink.refreshMenuAndAddMenuAction(list);

Loading…
Cancel
Save