• R/O
  • SSH
  • HTTPS

コミット

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

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


コミットメタ情報

リビジョン65 (tree)
日時2014-08-11 04:15:16
作者yu-tang

ログメッセージ

Java Web Start 実行環境下でエラーが発生する問題について、そもそも Java Web Start 実行環境下では初期化しないように修正

変更サマリ

差分

--- trunk/manifest.mf (revision 64)
+++ trunk/manifest.mf (revision 65)
@@ -1,8 +1,8 @@
11 Manifest-Version: 1.0
22 Main-Class: org.omegat.Main
33 License: GNU Public License version 3 or later
4-Specification-Version: 0.4
5-Implementation-Version: 0.4
4+Specification-Version: 0.4.20140811
5+Implementation-Version: 0.4.20140811
66 Permissions: all-permissions
77 Class-Path: lib/lib-mnemonics.jar
88 OmegaT-Plugins:
--- trunk/src/jp/sourceforge/users/yutang/omegat/plugin/foldermenu/FolderMenu.java (revision 64)
+++ trunk/src/jp/sourceforge/users/yutang/omegat/plugin/foldermenu/FolderMenu.java (revision 65)
@@ -37,14 +37,17 @@
3737 public static void loadPlugins() {
3838 try {
3939 // Not initialize in console mode
40- if (!instantiated) {
40+ if (instantiated) {
41+ throw new RuntimeException("FolderMenu plugin could be instantiated only once.");
42+ } else if (isRunningJavaWebStart()) {
43+ // Just log it, no error.
44+ Log.log("FolderMenu plugin is not working with Java Web Start.");
45+ } else {
4146 CoreEvents.registerApplicationEventListener(new FolderMenu());
42- } else {
43- throw new RuntimeException("FolderMenu plugin could be instantiated only once.");
4447 }
4548 } catch (Throwable ex) {
4649 String msg = ex.getMessage();
47- Log.logErrorRB(msg);
50+ Log.logErrorRB("LD_ERROR", msg);
4851 Core.pluginLoadingError(msg);
4952 }
5053 }
@@ -82,4 +85,15 @@
8285 }
8386 }
8487
88+ private static boolean isRunningJavaWebStart() {
89+ boolean hasJNLP = false;
90+ try {
91+ Class.forName("javax.jnlp.ServiceManager");
92+ hasJNLP = true;
93+ } catch (ClassNotFoundException ex) {
94+ // ignore
95+ }
96+ return hasJNLP;
97+ }
98+
8599 }
\ No newline at end of file