• R/O
  • SSH
  • HTTPS

mergedoc: Commit


Commit MetaInfo

Revisión16 (tree)
Tiempo2007-12-14 01:23:26
Autorcypher256

Log Message

(empty log message)

Cambiar Resumen

Diferencia incremental

--- trunk/Pleiades/conf/pleiades-config.xml (revision 15)
+++ trunk/Pleiades/conf/pleiades-config.xml (revision 16)
@@ -396,6 +396,37 @@
396396
397397 </pointCut>
398398
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+
399430 <!--
400431 ###########################################################################
401432 メソッド実行 (editPoint="execution")
--- trunk/Pleiades/src/jp/sourceforge/mergedoc/pleiades/aspect/TranslationTransformer.java (revision 15)
+++ trunk/Pleiades/src/jp/sourceforge/mergedoc/pleiades/aspect/TranslationTransformer.java (revision 16)
@@ -62,6 +62,7 @@
6262 * ただし、{@link ExcludesClassList 変換除外クラス・リスト}
6363 * に処理するクラス名が含まれる場合、何も行いません。
6464 */
65+ @Override
6566 protected byte[] transform(
6667 ClassLoader loader,
6768 String className,
@@ -68,7 +69,7 @@
6869 ProtectionDomain protectionDomain,
6970 byte[] bytecode)
7071 throws CannotCompileException, NotFoundException, IOException {
71-
72+
7273 // 変換除外クラスの場合は何もしない
7374 boolean isClean = Pleiades.getInstance().getPleiadesOption().isClean();
7475 ExcludesClassList excludeList = ExcludesClassList.getInstance();
--- trunk/Pleiades/src/jp/sourceforge/mergedoc/pleiades/aspect/AbstractTransformer.java (revision 15)
+++ trunk/Pleiades/src/jp/sourceforge/mergedoc/pleiades/aspect/AbstractTransformer.java (revision 16)
@@ -63,8 +63,8 @@
6363
6464 try {
6565 // バイトコード変換に必要な関連クラスパスを保管
66- if (protectionDomain != null) {
67-
66+ if (protectionDomain != null) {
67+
6868 URL location = protectionDomain.getCodeSource().getLocation();
6969 if (location != null) {
7070
@@ -73,6 +73,8 @@
7373 locationPath.contains("org.eclipse.osgi_") ||
7474 locationPath.contains("org.eclipse.core.resources_") ||
7575 locationPath.contains("org.eclipse.ui.workbench_") ||
76+ locationPath.contains("org.eclipse.jdt.core_") ||
77+ locationPath.contains("org.eclipse.jdt.ui_") ||
7678 locationPath.contains("org.eclipse.swt.") ||
7779 locationPath.contains("mergedoc.jstyle.swt"))
7880 {
@@ -79,10 +81,10 @@
7981 String classPath = FileSystem.decodePath(locationPath);
8082 relatedClassPathSet.add(classPath);
8183 }
82- }
83- }
84+ }
85+ }
8486
85- // バイトコード変換テンプレート・メソッドの呼び出し
87+ // バイトコード変換テンプレート・メソッドの呼び出し
8688 String className = internalName.replace('/', '.');
8789 return transform(loader, className, protectionDomain, bytecode);
8890
@@ -127,16 +129,16 @@
127129 ProtectionDomain protectionDomain) throws IOException, NotFoundException {
128130
129131 // クラスプールの作成
130- ClassPool classPool = new ClassPool();
131- classPool.appendSystemPath();
132- synchronized (this) {
132+ ClassPool classPool = new ClassPool();
133+ classPool.appendSystemPath();
134+ synchronized (this) {
133135 for (String relatedClassPath : relatedClassPathSet) {
134- classPool.appendClassPath(relatedClassPath);
136+ classPool.appendClassPath(relatedClassPath);
135137 }
136138 }
137139
138140 // CtClass オブジェクトを作成
139- return classPool.makeClass(new ByteArrayInputStream(bytecode));
141+ return classPool.makeClass(new ByteArrayInputStream(bytecode));
140142 }
141143
142144 /**
--- trunk/Pleiades/readme/readme_pleiades.txt (revision 15)
+++ trunk/Pleiades/readme/readme_pleiades.txt (revision 16)
@@ -256,6 +256,7 @@
256256 ───────────────────────────────────────
257257
258258 1.2.1.p16 - 2007.
259+・Javadoc ホバーの日本語表示対応(添付ソースより Javadoc 指定を優先にした)
259260 ・Eclipsemail、DLTK の訳を追加
260261
261262 1.2.1.p15 - 2007.11.19
Show on old repository browser