Browse Source

1、更新对话框在插件管理背面的问题

2、下载插件和更新插件时提醒登陆
master
vito 9 years ago
parent
commit
54b0ac13b7
  1. 10
      designer_base/src/com/fr/design/extra/PluginManagerPane.java
  2. 7
      designer_base/src/com/fr/design/extra/exe/InstallOnlineExecutor.java
  3. 7
      designer_base/src/com/fr/design/extra/exe/UpdateOnlineExecutor.java

10
designer_base/src/com/fr/design/extra/PluginManagerPane.java

@ -42,6 +42,7 @@ public class PluginManagerPane extends BasicPane {
if (StableUtils.isDebug()) { if (StableUtils.isDebug()) {
URL url = ClassLoader.getSystemResource(""); URL url = ClassLoader.getSystemResource("");
installHome = url.getPath(); installHome = url.getPath();
addPane(installHome);
} else { } else {
installHome = StableUtils.getInstallHome(); installHome = StableUtils.getInstallHome();
File file = new File(StableUtils.pathJoin(installHome, "scripts")); File file = new File(StableUtils.pathJoin(installHome, "scripts"));
@ -57,16 +58,21 @@ public class PluginManagerPane extends BasicPane {
downloadShopScripts(); downloadShopScripts();
} }
} else { } else {
addPane(installHome);
updateShopScripts(); updateShopScripts();
} }
} }
PluginWebPane webPane = new PluginWebPane(new File(installHome).getAbsolutePath());
add(webPane, BorderLayout.CENTER);
} else { } else {
initTraditionalStore(); initTraditionalStore();
} }
} }
private void addPane(String installHome) {
PluginWebPane webPane = new PluginWebPane(new File(installHome).getAbsolutePath());
add(webPane, BorderLayout.CENTER);
}
private void initTraditionalStore() { private void initTraditionalStore() {
UITabbedPane tabbedPane = new UITabbedPane(); UITabbedPane tabbedPane = new UITabbedPane();
add(tabbedPane, BorderLayout.CENTER); add(tabbedPane, BorderLayout.CENTER);

7
designer_base/src/com/fr/design/extra/exe/InstallOnlineExecutor.java

@ -4,10 +4,12 @@ import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.RestartHelper; import com.fr.design.RestartHelper;
import com.fr.design.extra.After; import com.fr.design.extra.After;
import com.fr.design.extra.LoginCheckContext;
import com.fr.design.extra.PluginHelper; import com.fr.design.extra.PluginHelper;
import com.fr.design.extra.Process; import com.fr.design.extra.Process;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.PluginVerifyException; import com.fr.plugin.PluginVerifyException;
import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -38,6 +40,10 @@ public class InstallOnlineExecutor implements Executor {
@Override @Override
public void run(final Process<String> process) { public void run(final Process<String> process) {
if(StringUtils.isBlank(DesignerEnvManager.getEnvManager().getBBSName())){
LoginCheckContext.fireLoginCheckListener();
}
if(StringUtils.isNotBlank(DesignerEnvManager.getEnvManager().getBBSName())) {
String username = DesignerEnvManager.getEnvManager().getBBSName(); String username = DesignerEnvManager.getEnvManager().getBBSName();
String password = DesignerEnvManager.getEnvManager().getBBSPassword(); String password = DesignerEnvManager.getEnvManager().getBBSPassword();
try { try {
@ -51,6 +57,7 @@ public class InstallOnlineExecutor implements Executor {
FRContext.getLogger().error(e.getMessage(), e); FRContext.getLogger().error(e.getMessage(), e);
} }
} }
}
}, },
new Command() { new Command() {
@Override @Override

7
designer_base/src/com/fr/design/extra/exe/UpdateOnlineExecutor.java

@ -4,11 +4,13 @@ import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.RestartHelper; import com.fr.design.RestartHelper;
import com.fr.design.extra.After; import com.fr.design.extra.After;
import com.fr.design.extra.LoginCheckContext;
import com.fr.design.extra.PluginHelper; import com.fr.design.extra.PluginHelper;
import com.fr.design.extra.Process; import com.fr.design.extra.Process;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.Plugin; import com.fr.plugin.Plugin;
import com.fr.plugin.PluginLoader; import com.fr.plugin.PluginLoader;
import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import java.io.File; import java.io.File;
@ -41,6 +43,10 @@ public class UpdateOnlineExecutor implements Executor {
@Override @Override
public void run(Process<String> process) { public void run(Process<String> process) {
if(StringUtils.isBlank(DesignerEnvManager.getEnvManager().getBBSName())){
LoginCheckContext.fireLoginCheckListener();
}
if(StringUtils.isNotBlank(DesignerEnvManager.getEnvManager().getBBSName())){
for (int i = 0; i < pluginIDs.length; i++) { for (int i = 0; i < pluginIDs.length; i++) {
Plugin plugin = PluginLoader.getLoader().getPluginById(pluginIDs[i]); Plugin plugin = PluginLoader.getLoader().getPluginById(pluginIDs[i]);
String id = null; String id = null;
@ -78,6 +84,7 @@ public class UpdateOnlineExecutor implements Executor {
} }
} }
} }
}
}; };
} }

Loading…
Cancel
Save