Browse Source

Merge branch 'release/10.0' of https://cloud.finedevelop.com/scm/~hades/design into release/10.0

feature/big-screen
hades 5 years ago
parent
commit
6232ef5651
  1. 4
      designer-form/src/main/java/com/fr/design/designer/beans/events/CreatorEventListenerTable.java
  2. 8
      designer-form/src/test/java/com/fr/design/designer/beans/models/SelectionModelTest.java

4
designer-form/src/main/java/com/fr/design/designer/beans/events/CreatorEventListenerTable.java

@ -1,8 +1,8 @@
package com.fr.design.designer.beans.events; package com.fr.design.designer.beans.events;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.designer.creator.XComponent; import com.fr.design.designer.creator.XComponent;
import com.fr.design.fun.DesignerEditListenerProvider; import com.fr.design.fun.DesignerEditListenerProvider;
import com.fr.form.main.ExtraFormClassManager;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.injectable.PluginModule;
@ -44,7 +44,7 @@ public class CreatorEventListenerTable {
} }
//触发插件的事件 //触发插件的事件
ExtraFormClassManager manager = PluginModule.getAgent(PluginModule.ExtraForm); ExtraDesignClassManager manager = PluginModule.getAgent(PluginModule.ExtraDesign);
Set<DesignerEditListenerProvider> providers = manager.getArray(DesignerEditListenerProvider.XML_TAG); Set<DesignerEditListenerProvider> providers = manager.getArray(DesignerEditListenerProvider.XML_TAG);
for (DesignerEditListenerProvider provider : providers) { for (DesignerEditListenerProvider provider : providers) {
provider.fireCreatorModified(evt); provider.fireCreatorModified(evt);

8
designer-form/src/test/java/com/fr/design/designer/beans/models/SelectionModelTest.java

@ -6,7 +6,6 @@ import com.fr.design.designer.creator.XCreator;
import com.fr.design.fun.ClipboardHandlerProvider; import com.fr.design.fun.ClipboardHandlerProvider;
import com.fr.design.fun.impl.AbstractClipboardHandlerProvider; import com.fr.design.fun.impl.AbstractClipboardHandlerProvider;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.form.main.ExtraFormClassManager;
import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.injectable.PluginModule;
import com.fr.stable.fun.mark.Mutable; import com.fr.stable.fun.mark.Mutable;
import org.easymock.EasyMock; import org.easymock.EasyMock;
@ -59,18 +58,15 @@ public class SelectionModelTest {
EasyMock.expect(designManager.getArray(ClipboardHandlerProvider.XML_TAG)) EasyMock.expect(designManager.getArray(ClipboardHandlerProvider.XML_TAG))
.andReturn(providers) .andReturn(providers)
.anyTimes(); .anyTimes();
ExtraFormClassManager formManager = EasyMock.mock(ExtraFormClassManager.class); EasyMock.expect(designManager.getArray("DesignerEditListenerProvider"))
EasyMock.expect(formManager.getArray("DesignerEditListenerProvider"))
.andReturn(new HashSet<Mutable>()) .andReturn(new HashSet<Mutable>())
.anyTimes(); .anyTimes();
EasyMock.replay(designManager, formManager); EasyMock.replay(designManager);
PowerMock.mockStatic(PluginModule.class); PowerMock.mockStatic(PluginModule.class);
EasyMock.expect(PluginModule.getAgent(PluginModule.ExtraDesign)) EasyMock.expect(PluginModule.getAgent(PluginModule.ExtraDesign))
.andReturn(designManager) .andReturn(designManager)
.anyTimes(); .anyTimes();
EasyMock.expect(PluginModule.getAgent(PluginModule.ExtraForm))
.andReturn(formManager).anyTimes();
PowerMock.replayAll(); PowerMock.replayAll();
} }

Loading…
Cancel
Save