简体   繁体   English

如何有选择地在启动时打开最后一个intellij项目(或不打开)?

[英]How to optionally open last intellij project (or not) on startup?

I have just read this question: Stop intellij opening projects on startup 我刚刚读了这个问题: 停止intellij在启动时打开项目

Ideally, I would like to have 2 intellij icons on my desktop - one which opens the last project and one which doesn't. 理想情况下,我希望在桌面上有2个intellij图标-一个打开最后一个项目,一个不打开。

In other words, I would like the flexibility of both functions. 换句话说,我想要这两个功能的灵活性。

Perhaps intellij has some command-line argument that specify which "mode" I desire on startup? 也许intellij有一些命令行参数可以指定启动时需要的“模式”?

I'd rather not have to fire up an editor and edit the xml each time I start up IntelliJ. 我宁愿不必在每次启动IntelliJ时都启动编辑器并编辑xml。

File --> Settings --> Appearance '&' Behavior --> System Settings. 文件->设置->外观'&'行为->系统设置。

CLICK on System Settings, not a sub-tab, and uncheck the box that says "Reopen last project on startup." 单击“系统设置”,而不是子选项卡,然后取消选中“重新启动时重新打开上一个项目”框。

As far as separate projects are concerned you could, perhaps, make a shortcut to the IML or intellij project file in it's respective directory to your desktop and use that. 就单独的项目而言,您也许可以在桌面的相应目录中为IML或intellij项目文件创建快捷方式并使用它。 This way you could link as many projects as you'd like, though passing arguments to the intellij exe is also viable it may be a bit impractical. 这样,您可以链接任意数量的项目,尽管将​​参数传递给intellij exe也可行,但这可能不切实际。 A plugin would most likely be best to automate that process, but I don't know the technicalities so take these tips with a few grains of salt. 一个插件最有可能是使该过程自动化的最佳方法,但是我不知道其技术性,因此请花些盐了解这些技巧。

EDIT: I also think it's worth mentioning that intellij's settings, as is the spirit of java, has pretty close to uniform and connected preferences accross platforms whether windows or linux or mac, but extending features have to be made compatable to the specific platform if it utilizes a native function (like passing parameters to an exe in windows or doing the same with an shell script in linux.) 编辑:我也认为值得一提的是,intellij的设置和Java的精神一样,在Windows,Linux或Mac平台上具有接近统一的连接偏好,但是如果要扩展功能,则必须使其与特定平台兼容利用本机功能(例如,在Windows中将参数传递给exe或在Linux中对shell脚本执行相同操作。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM