(empty log message)
@@ -396,6 +396,37 @@ | ||
396 | 396 | |
397 | 397 | </pointCut> |
398 | 398 | |
399 | + <!-- Javadoc ホバーで添付ソースより Javadoc 指定を優先する (3.2 以降) 2007.12.13 --> | |
400 | + <pointCut editPoint="call" timing="around"> | |
401 | + <advice><![CDATA[ | |
402 | + java.lang.String s = $1.getAttachedJavadoc(null); | |
403 | + if (s != null) $_ = new java.io.StringReader(s); | |
404 | + if (s == null) $_ = $proceed($$); | |
405 | + ]]></advice> | |
406 | + | |
407 | + <jointPoint className="org.eclipse.jdt.ui.JavadocContentAccess" | |
408 | + methodName="getHTMLContentReader" | |
409 | + descriptor="(Lorg/eclipse/jdt/core/IMember;ZZ)Ljava/io/Reader;"/> | |
410 | + | |
411 | + </pointCut> | |
412 | + | |
413 | + <!-- デフォルトの Javadoc URL を日本語版のものに変更 2007.12.13 --> | |
414 | + <pointCut editPoint="execution" timing="after"> | |
415 | + <advice><![CDATA[ | |
416 | + if ($_ == null) return $_; | |
417 | + java.lang.String url = $_.getPath(); | |
418 | + if (url.contains("/6/")) $_ = new java.net.URL("http://java.sun.com/javase/ja/6/docs/ja/api/"); | |
419 | + if (url.contains("/1.5")) $_ = new java.net.URL("http://java.sun.com/j2se/1.5.0/ja/docs/ja/api/"); | |
420 | + if (url.contains("/1.4")) $_ = new java.net.URL("http://sdc.sun.co.jp/java/docs/j2se/1.4/ja/docs/ja/api/"); | |
421 | + if (url.contains("/1.3")) $_ = new java.net.URL("http://sdc.sun.co.jp/java/docs/j2se/1.3/ja/docs/ja/api/"); | |
422 | + ]]></advice> | |
423 | + | |
424 | + <jointPoint | |
425 | + className="org.eclipse.jdt.internal.launching.StandardVMType" | |
426 | + methodName="getDefaultJavadocLocation"/> | |
427 | + | |
428 | + </pointCut> | |
429 | + | |
399 | 430 | <!-- |
400 | 431 | ########################################################################### |
401 | 432 | メソッド実行 (editPoint="execution") |
@@ -62,6 +62,7 @@ | ||
62 | 62 | * ただし、{@link ExcludesClassList 変換除外クラス・リスト} |
63 | 63 | * に処理するクラス名が含まれる場合、何も行いません。 |
64 | 64 | */ |
65 | + @Override | |
65 | 66 | protected byte[] transform( |
66 | 67 | ClassLoader loader, |
67 | 68 | String className, |
@@ -68,7 +69,7 @@ | ||
68 | 69 | ProtectionDomain protectionDomain, |
69 | 70 | byte[] bytecode) |
70 | 71 | throws CannotCompileException, NotFoundException, IOException { |
71 | - | |
72 | + | |
72 | 73 | // 変換除外クラスの場合は何もしない |
73 | 74 | boolean isClean = Pleiades.getInstance().getPleiadesOption().isClean(); |
74 | 75 | ExcludesClassList excludeList = ExcludesClassList.getInstance(); |
@@ -63,8 +63,8 @@ | ||
63 | 63 | |
64 | 64 | try { |
65 | 65 | // バイトコード変換に必要な関連クラスパスを保管 |
66 | - if (protectionDomain != null) { | |
67 | - | |
66 | + if (protectionDomain != null) { | |
67 | + | |
68 | 68 | URL location = protectionDomain.getCodeSource().getLocation(); |
69 | 69 | if (location != null) { |
70 | 70 |
@@ -73,6 +73,8 @@ | ||
73 | 73 | locationPath.contains("org.eclipse.osgi_") || |
74 | 74 | locationPath.contains("org.eclipse.core.resources_") || |
75 | 75 | locationPath.contains("org.eclipse.ui.workbench_") || |
76 | + locationPath.contains("org.eclipse.jdt.core_") || | |
77 | + locationPath.contains("org.eclipse.jdt.ui_") || | |
76 | 78 | locationPath.contains("org.eclipse.swt.") || |
77 | 79 | locationPath.contains("mergedoc.jstyle.swt")) |
78 | 80 | { |
@@ -79,10 +81,10 @@ | ||
79 | 81 | String classPath = FileSystem.decodePath(locationPath); |
80 | 82 | relatedClassPathSet.add(classPath); |
81 | 83 | } |
82 | - } | |
83 | - } | |
84 | + } | |
85 | + } | |
84 | 86 | |
85 | - // バイトコード変換テンプレート・メソッドの呼び出し | |
87 | + // バイトコード変換テンプレート・メソッドの呼び出し | |
86 | 88 | String className = internalName.replace('/', '.'); |
87 | 89 | return transform(loader, className, protectionDomain, bytecode); |
88 | 90 |
@@ -127,16 +129,16 @@ | ||
127 | 129 | ProtectionDomain protectionDomain) throws IOException, NotFoundException { |
128 | 130 | |
129 | 131 | // クラスプールの作成 |
130 | - ClassPool classPool = new ClassPool(); | |
131 | - classPool.appendSystemPath(); | |
132 | - synchronized (this) { | |
132 | + ClassPool classPool = new ClassPool(); | |
133 | + classPool.appendSystemPath(); | |
134 | + synchronized (this) { | |
133 | 135 | for (String relatedClassPath : relatedClassPathSet) { |
134 | - classPool.appendClassPath(relatedClassPath); | |
136 | + classPool.appendClassPath(relatedClassPath); | |
135 | 137 | } |
136 | 138 | } |
137 | 139 | |
138 | 140 | // CtClass オブジェクトを作成 |
139 | - return classPool.makeClass(new ByteArrayInputStream(bytecode)); | |
141 | + return classPool.makeClass(new ByteArrayInputStream(bytecode)); | |
140 | 142 | } |
141 | 143 | |
142 | 144 | /** |
@@ -256,6 +256,7 @@ | ||
256 | 256 | ─────────────────────────────────────── |
257 | 257 | |
258 | 258 | 1.2.1.p16 - 2007. |
259 | +・Javadoc ホバーの日本語表示対応(添付ソースより Javadoc 指定を優先にした) | |
259 | 260 | ・Eclipsemail、DLTK の訳を追加 |
260 | 261 | |
261 | 262 | 1.2.1.p15 - 2007.11.19 |