Participants の削除

org.eclipse.ltk.core.refactoring.deleteParticipants

3.0

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

<!ELEMENT extension (deleteParticipant*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT deleteParticipant (enablement)>

<!ATTLIST deleteParticipant

id    CDATA #REQUIRED

name  CDATA #REQUIRED

class CDATA #REQUIRED>


削除 participant を定義する例を、以下に示します。 リファクタリングによって影響を受けるプロジェクトの 1 つが Java ネーチャーを持つ場合で、 削除されるエレメントのタイプが ICompilationUnit であるときに、participant が使用可能になります。

<deleteParticipant id=

"org.myCompany.deleteParticipant"

name=

"%DeleteParticipant.name"

class=

"org.myCompany.Participant"

>

<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.ICompilationUnit"

/>

</with>

</enablement>

</deleteParticipant>

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