|
|
@ -50,6 +50,9 @@ public abstract class BaseDesigner extends ToolBarMenuDock { |
|
|
|
|
|
|
|
|
|
|
|
private final String[] args; |
|
|
|
private final String[] args; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//判断是否是通过打开指定模板来启动设计器,如果是则置false
|
|
|
|
|
|
|
|
private Boolean openFlag = true; |
|
|
|
|
|
|
|
|
|
|
|
public BaseDesigner(String[] args) { |
|
|
|
public BaseDesigner(String[] args) { |
|
|
|
|
|
|
|
|
|
|
|
this.args = args; |
|
|
|
this.args = args; |
|
|
@ -126,6 +129,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock { |
|
|
|
FILE file = null; |
|
|
|
FILE file = null; |
|
|
|
if (args != null && args.length > 0) { |
|
|
|
if (args != null && args.length > 0) { |
|
|
|
file = DesignerStartupUtil.convertArgs2FILE(args); |
|
|
|
file = DesignerStartupUtil.convertArgs2FILE(args); |
|
|
|
|
|
|
|
setOpenFlag(false); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
file = getLastOpenFile(); |
|
|
|
file = getLastOpenFile(); |
|
|
|
} |
|
|
|
} |
|
|
@ -197,8 +201,9 @@ public abstract class BaseDesigner extends ToolBarMenuDock { |
|
|
|
//启动时打开指定文件的接口
|
|
|
|
//启动时打开指定文件的接口
|
|
|
|
DesignerStartOpenFileProcessor processor = ExtraDesignClassManager.getInstance().getSingle(DesignerStartOpenFileProcessor.XML_TAG); |
|
|
|
DesignerStartOpenFileProcessor processor = ExtraDesignClassManager.getInstance().getSingle(DesignerStartOpenFileProcessor.XML_TAG); |
|
|
|
// 如果插件没有,且又开启了启动时打开空文件,则使用启动时打开空文件
|
|
|
|
// 如果插件没有,且又开启了启动时打开空文件,则使用启动时打开空文件
|
|
|
|
if (processor == null && DesignerEnvManager.getEnvManager().isStartWithEmptyFile()) { |
|
|
|
if (processor == null && DesignerEnvManager.getEnvManager().isStartWithEmptyFile() && isOpenAppoint()) { |
|
|
|
processor = DesignerStartWithEmptyFile.getInstance(); |
|
|
|
processor = DesignerStartWithEmptyFile.getInstance(); |
|
|
|
|
|
|
|
setOpenFlag(true); |
|
|
|
} |
|
|
|
} |
|
|
|
if (processor != null) { |
|
|
|
if (processor != null) { |
|
|
|
FILE f = processor.fileToShow(); |
|
|
|
FILE f = processor.fileToShow(); |
|
|
@ -264,6 +269,14 @@ public abstract class BaseDesigner extends ToolBarMenuDock { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Boolean isOpenAppoint() { |
|
|
|
|
|
|
|
return openFlag; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setOpenFlag(Boolean openFlag) { |
|
|
|
|
|
|
|
this.openFlag = openFlag; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 收集用户信息码
|
|
|
|
// 收集用户信息码
|
|
|
|
protected void collectUserInformation() { |
|
|
|
protected void collectUserInformation() { |
|
|
|
|
|
|
|
|
|
|
|