Browse Source

REPORT-114392 FR-FBP版本本地设计适配 去除Activator体系

fbp-1.0
Destiny.Lin 5 months ago
parent
commit
825e118477
  1. 21
      designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java
  2. 5
      designer-realize/src/main/java/com/fanruan/boot/env/function/ChartDesignerComponent.java
  3. 10
      designer-realize/src/main/java/com/fanruan/boot/env/function/app/DesignAppComponent.java
  4. 2
      designer-realize/src/main/java/com/fr/start/module/DesignerInitActivator.java

21
designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java vendored

@ -109,6 +109,27 @@ import java.util.Objects;
})
public class DesignEnvComponent {
/**
* prepare
*/
@Supplemental
public void prepare() {
Carina.getApplicationContext().group(AnalyzerMutableGroup.class).add(AnalyzerConfiguration.create((builder, typeDescription, classLoader, module) -> builder
.method(ElementMatchers.isAnnotatedWith(Focus.class))
.intercept(MethodDelegation.to(FocusInterceptor.class))));
Carina.getApplicationContext().group(AnalyzerMutableGroup.class).add(AnalyzerConfiguration.create((builder, typeDescription, classLoader, module) -> builder
.method(ElementMatchers.isAnnotatedWith(Compute.class))
.intercept(MethodDelegation.to(MonitorInterceptor.class))));
Carina.getApplicationContext().group(AnalyzerMutableGroup.class).add(AnalyzerConfiguration.create((builder, typeDescription, classLoader, module) -> builder
.method(ElementMatchers.isAnnotatedWith(DBMetrics.class))
.intercept(MethodDelegation.to(DBMonitorInterceptor.class))));
Carina.getApplicationContext().group(AnalyzerMutableGroup.class).add(AnalyzerConfiguration.create((builder, typeDescription, classLoader, module) -> builder
.method(ElementMatchers.isAnnotatedWith(PerformancePoint.class))
.intercept(MethodDelegation.to(PerformancePointInterceptor.class))));
Carina.getApplicationContext().group(AnalyzerMutableGroup.class).add(AnalyzerConfiguration.create((builder, typeDescription, classLoader, module) -> builder
.method(ElementMatchers.isAnnotatedWith(FaultTolerance.class))
.intercept(MethodDelegation.to(FaultToleranceInterceptor.class))));
}
@Start
public void start() throws Exception {

5
designer-realize/src/main/java/com/fanruan/boot/env/function/ChartDesignerComponent.java vendored

@ -66,7 +66,10 @@ public class ChartDesignerComponent {
ChartTypeInterfaceManager.addPluginChangedListener();
}
@Override
/**
* prepare
*/
@Supplemental
public void prepare() {
Carina.getApplicationContext().group(InterMutableKey.class).add(LocaleMarker.create("com/fr/design/i18n/chart", LocaleScope.DESIGN));
}

10
designer-realize/src/main/java/com/fanruan/boot/env/function/app/DesignAppComponent.java vendored

@ -38,7 +38,10 @@ public class DesignAppComponent {
PluginRemote.getInstance().start();
}
@Override
/**
* stop
*/
@Stop
public void stop() {
List<App> appList = new ArrayList<>(Carina.getApplicationContext().group(AppGroup.class).getAll());
@ -48,7 +51,10 @@ public class DesignAppComponent {
PluginRemote.getInstance().stop();
}
@Override
/**
* prepare
*/
@Supplemental
public void prepare() {
Carina.getApplicationContext().group(AppGroup.class).addAll(new CptApp(), new CptxApp(), new FormApp(), new XlsApp(), new XlsxApp());
}

2
designer-realize/src/main/java/com/fr/start/module/DesignerInitActivator.java

@ -3,7 +3,7 @@ package com.fr.start.module;
import com.fanruan.boot.key.StartupArgsShell;
import com.fanruan.carina.Carina;
import com.fr.design.PluginClassRefreshManager;
import com.fr.design.mainframe.app.DesignerAppUtils;
import com.fanruan.boot.env.function.app.DesignerAppUtils;
import com.fr.io.repository.base.fs.FileSystemRepository;
import com.fr.io.utils.ResourceIOUtils;
import com.fr.module.Activator;

Loading…
Cancel
Save