• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-cqtcocoa誰得pythonphprubygameguibathyscaphec翻訳計画中(planning stage)omegatframeworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

OmegaT のメニューバーにフォルダーツリー参照用のメニューを追加します。


Commit MetaInfo

Revision47 (tree)
Time2014-04-25 16:52:53
Authoryu-tang

Log Message

Force FolderMenu class to be singleton

Change Summary

Incremental Difference

--- trunk/src/jp/sourceforge/users/yutang/omegat/plugin/foldermenu/FolderMenu.java (revision 46)
+++ trunk/src/jp/sourceforge/users/yutang/omegat/plugin/foldermenu/FolderMenu.java (revision 47)
@@ -31,14 +31,17 @@
3131 */
3232 public class FolderMenu implements IApplicationEventListener, IProjectEventListener {
3333
34- private static FolderMenu _this = new FolderMenu();
34+ private static boolean instantiated = false;
3535
3636 private MenuManager menuManager;
3737
3838 public static void loadPlugins() {
3939 try {
40- // Not initialize in console mode.
41- CoreEvents.registerApplicationEventListener(_this);
40+ // Not initialize in console mode
41+ if (!instantiated) {
42+ instantiated = true;
43+ CoreEvents.registerApplicationEventListener(new FolderMenu());
44+ }
4245 } catch (Throwable ex) {
4346 String msg = ex.getMessage();
4447 Log.logErrorRB(msg);