|
|
@ -24,6 +24,7 @@ import com.fr.design.utils.gui.GUIPaintUtils; |
|
|
|
import com.fr.design.worker.WorkerManager; |
|
|
|
import com.fr.design.worker.WorkerManager; |
|
|
|
import com.fr.design.worker.save.CallbackSaveWorker; |
|
|
|
import com.fr.design.worker.save.CallbackSaveWorker; |
|
|
|
import com.fr.file.FILE; |
|
|
|
import com.fr.file.FILE; |
|
|
|
|
|
|
|
import com.fr.file.FileNodeFILE; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.IOUtils; |
|
|
|
import com.fr.general.IOUtils; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
@ -282,7 +283,8 @@ public class MultiTemplateTabPane extends JComponent { |
|
|
|
private void locateTemplate(JTemplate<?, ?> template) { |
|
|
|
private void locateTemplate(JTemplate<?, ?> template) { |
|
|
|
FILE currentTemplate = template.getEditingFILE(); |
|
|
|
FILE currentTemplate = template.getEditingFILE(); |
|
|
|
//模板不属于当前环境,跟预览一样先提示保存,再定位模板
|
|
|
|
//模板不属于当前环境,跟预览一样先提示保存,再定位模板
|
|
|
|
if (!currentTemplate.exists()) { |
|
|
|
//如果是拖拽进来的模板单单用exist不能判断,这边参考预览的判断逻辑(browserTemplate),补充一下
|
|
|
|
|
|
|
|
if (!currentTemplate.exists() || !(currentTemplate instanceof FileNodeFILE)) { |
|
|
|
int selVal = showConfirmDialog( |
|
|
|
int selVal = showConfirmDialog( |
|
|
|
DesignerContext.getDesignerFrame(), |
|
|
|
DesignerContext.getDesignerFrame(), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Web_Preview_Message"), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Web_Preview_Message"), |
|
|
|