|
|
|
@ -17,8 +17,8 @@ import com.fr.design.file.FileToolbarStateChangeListener;
|
|
|
|
|
import com.fr.design.file.HistoryTemplateListCache; |
|
|
|
|
import com.fr.design.file.HistoryTemplateListPane; |
|
|
|
|
import com.fr.design.file.MutilTempalteTabPane; |
|
|
|
|
import com.fr.design.file.SaveSomeTemplatePane; |
|
|
|
|
import com.fr.design.file.TemplateTreePane; |
|
|
|
|
import com.fr.design.fun.LocalResourceProvider; |
|
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.design.gui.imenu.UIMenuHighLight; |
|
|
|
@ -34,10 +34,13 @@ import com.fr.design.menu.KeySetUtils;
|
|
|
|
|
import com.fr.design.menu.ShortCut; |
|
|
|
|
import com.fr.design.menu.ToolBarDef; |
|
|
|
|
import com.fr.design.roleAuthority.RolesAlreadyEditedPane; |
|
|
|
|
import com.fr.design.ui.util.UIUtil; |
|
|
|
|
import com.fr.design.utils.DesignUtils; |
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
import com.fr.file.FileNodeFILE; |
|
|
|
|
import com.fr.file.filetree.FileNode; |
|
|
|
|
import com.fr.file.filetree.FileNodes; |
|
|
|
|
import com.fr.file.filetree.LocalFileNodes; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
@ -46,6 +49,8 @@ import com.fr.plugin.injectable.PluginModule;
|
|
|
|
|
import com.fr.plugin.manage.PluginFilter; |
|
|
|
|
import com.fr.plugin.observer.PluginEvent; |
|
|
|
|
import com.fr.plugin.observer.PluginEventListener; |
|
|
|
|
import com.fr.plugin.observer.PluginEventType; |
|
|
|
|
import com.fr.plugin.observer.PluginListenerRegistration; |
|
|
|
|
import com.fr.stable.CoreConstants; |
|
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
@ -53,6 +58,11 @@ import com.fr.stable.project.ProjectConstants;
|
|
|
|
|
import com.fr.third.org.apache.commons.io.FilenameUtils; |
|
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
|
|
|
|
|
|
import com.fr.workspace.engine.base.FineObjectPool; |
|
|
|
|
import com.fr.workspace.engine.resource.FineWorkResource; |
|
|
|
|
import com.fr.workspace.resource.WorkResource; |
|
|
|
|
import com.fr.workspace.server.lock.LocalTplOperator; |
|
|
|
|
import com.fr.workspace.server.lock.TplOperator; |
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.JDialog; |
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
@ -98,6 +108,30 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
|
|
|
|
|
return context.contain(PluginModule.ExtraDesign, ShortCut.TEMPLATE_TREE); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
PluginFilter filter = pluginContext -> pluginContext.contain(PluginModule.ExtraDesign, LocalResourceProvider.XML_TAG); |
|
|
|
|
|
|
|
|
|
PluginListenerRegistration.getInstance().listen(PluginEventType.AfterStop, new PluginEventListener() { |
|
|
|
|
@Override |
|
|
|
|
public void on(PluginEvent event) { |
|
|
|
|
FineObjectPool.getInstance().getLocalPool().put(WorkResource.class, FineWorkResource.getInstance()); |
|
|
|
|
FineObjectPool.getInstance().getLocalPool().put(FileNodes.class, new LocalFileNodes()); |
|
|
|
|
FineObjectPool.getInstance().getLocalPool().put(TplOperator.class, new LocalTplOperator()); |
|
|
|
|
UIUtil.invokeLaterIfNeeded(() -> DesignerFrameFileDealerPane.getInstance().refresh()); |
|
|
|
|
} |
|
|
|
|
}, filter); |
|
|
|
|
|
|
|
|
|
PluginListenerRegistration.getInstance().listen(PluginEventType.AfterRun, new PluginEventListener() { |
|
|
|
|
@Override |
|
|
|
|
public void on(PluginEvent event) { |
|
|
|
|
LocalResourceProvider provider = ExtraDesignClassManager.getInstance().getSingle(LocalResourceProvider.XML_TAG); |
|
|
|
|
if (provider != null) { |
|
|
|
|
FineObjectPool.getInstance().getLocalPool().put(WorkResource.class, provider.createResource()); |
|
|
|
|
FineObjectPool.getInstance().getLocalPool().put(FileNodes.class, provider.createFileNodes()); |
|
|
|
|
FineObjectPool.getInstance().getLocalPool().put(TplOperator.class, provider.createTplOperator()); |
|
|
|
|
UIUtil.invokeLaterIfNeeded(() -> DesignerFrameFileDealerPane.getInstance().refresh()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, filter); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private List<FileToolbarStateChangeListener> otherToolbarStateChangeListeners = new ArrayList<>(); |
|
|
|
|