|
|
|
@ -163,7 +163,11 @@ public class GuideCreateUtils {
|
|
|
|
|
InputStream inputStream = GuideCreateUtils.class.getResourceAsStream(StableUtils.pathJoin(sourcePath, fileName + suffix)); |
|
|
|
|
byte[] data = ResourceIOUtils.inputStream2Bytes(inputStream); |
|
|
|
|
WorkContext.getWorkResource().write(fileWorkPath, data); |
|
|
|
|
DesignerContext.getDesignerFrame().openTemplate(new FileNodeFILE(new FileNode(fileWorkPath, false))); |
|
|
|
|
FileNodeFILE fileNodeFILE= new FileNodeFILE(new FileNode(fileWorkPath, false)); |
|
|
|
|
if (!fileNodeFILE.exists()) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
DesignerContext.getDesignerFrame().openTemplate(fileNodeFILE); |
|
|
|
|
return fileWorkPath; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -200,6 +204,15 @@ public class GuideCreateUtils {
|
|
|
|
|
JOptionPane.WARNING_MESSAGE); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void showNoFileAuthAlert() { |
|
|
|
|
FineJOptionPane.showMessageDialog( |
|
|
|
|
DesignerContext.getDesignerFrame(), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Warning_Template_Do_Not_Exsit"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), |
|
|
|
|
JOptionPane.INFORMATION_MESSAGE |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static JDialog showConfirmDialog(Window parent, Object message, |
|
|
|
|
String title, int optionType) { |
|
|
|
|
JOptionPane pane = new JOptionPane(message, JOptionPane.QUESTION_MESSAGE, optionType, null, FineJOptionPane.OPTION_OK_CANCEL, FineJOptionPane.OPTION_OK_CANCEL[0]); |
|
|
|
|