Participants の名前変更

org.eclipse.ltk.core.refactoring.renameParticipants

3.0

この拡張ポイントを使用して、リファクタリング名前変更 participants を定義します。 式のリーダーは、<with variable="..."> 式エレメントを介して参照可能な、以下の事前定義値を提供します。 式の評価の際に使用されるデフォルトの変数は、エレメント変数にバウンドされます。

<!ELEMENT extension (renameParticipant*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT renameParticipant (enablement)>

<!ATTLIST renameParticipant

id    CDATA #REQUIRED

name  CDATA #REQUIRED

class CDATA #REQUIRED>


以下の例では、型の名前変更に参加する、名前変更 participant を定義しています。 リファクタリングによって影響を受けるプロジェクトの 1 つが Java ネーチャーを持つ場合で、 しかも名前変更される型が JUnit テストであるとき、participant が使用可能になります。

<renameParticipant id=

"org.eclipse.jdt.junit.renameTypeParticipant"

name=

"%RenameTypeParticipant.name"

class=

"org.eclipse.jdt.internal.junit.ui.TypeRenameParticipant"

>

<enablement>

<with variable=

"affectedNatures"

>

<iterate operator=

"or"

>

<equals value=

"org.eclipse.jdt.core.javanature"

/>

</iterate>

</with>

<with variable=

"element"

>

<instanceof value=

"org.eclipse.jdt.core.IType"

/>

<test property=

"org.eclipse.jdt.junit.isTest"

/>

</with>

</enablement>

</renameParticipant>

提供されたクラスは、 org.eclipse.ltk.core.refactoring.participants.RenameParticipant を拡張しなければなりません。