Browse Source

Merge remote-tracking branch 'origin/master'

master
Mars.Ma 5 years ago
parent
commit
43a4348db1
  1. 2
      src/main/java/com/fanruan/api/runtime/EnvKit.java
  2. 20
      src/main/java/com/fanruan/api/runtime/PluginKit.java
  3. 2
      src/test/java/com/fanruan/api/runtime/EnvKitTest.java

2
src/main/java/com/fanruan/api/env/EnvKit.java → src/main/java/com/fanruan/api/runtime/EnvKit.java

@ -1,4 +1,4 @@
package com.fanruan.api.env; package com.fanruan.api.runtime;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;

20
src/main/java/com/fanruan/api/runtime/PluginKit.java

@ -0,0 +1,20 @@
package com.fanruan.api.runtime;
import com.fr.plugin.context.PluginContexts;
/**
* @author richie
* @version 10.0
* Created by richie on 2019-08-30
* 插件相关的工具类
*/
public class PluginKit {
/**
* 当前插件是否可用例如插件授权文件过期时该犯法会返回false
* @return 插件可用则返回true不可用则返回false
*/
public static boolean isCurrentPluginAvailable() {
return PluginContexts.currentContext().isAvailable();
}
}

2
src/test/java/com/fanruan/api/env/EnvKitTest.java → src/test/java/com/fanruan/api/runtime/EnvKitTest.java

@ -1,4 +1,4 @@
package com.fanruan.api.env; package com.fanruan.api.runtime;
import com.fanruan.api.Prepare; import com.fanruan.api.Prepare;
import org.junit.Assert; import org.junit.Assert;
Loading…
Cancel
Save