Participants のコピー

org.eclipse.ltk.core.refactoring.copyParticipants

3.1

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

<!ELEMENT extension (copyParticipant*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT copyParticipant (enablement)>

<!ATTLIST copyParticipant

id              CDATA #REQUIRED

name            CDATA #REQUIRED

class           CDATA #REQUIRED

processOnCancel CDATA #IMPLIED>


ファイル・コピーの participant を定義する例を、以下に示します。リファクタリングによって影響を受けるプロジェクトの 1 つが Java ネーチャーを持つ場合は、 participant が使用可能になります。

<copyParticipant id=

"org.eclipse.samples.copyParticipant"

name=

"%CopyFileParticipant.name"

class=

"org.eclipse.samples.CopyFileParticipant"

>

<enablement>

<with variable=

"affectedNatures"

>

<iterate operator=

"or"

>

<equals value=

"org.eclipse.jdt.core.javanature"

/>

</iterate>

</with>

<with variable=

"element"

>

<instanceof value=

"org.eclipse.core.resources.IFile"

/>

</with>

</enablement>

</copyParticipant>

コントリビュート・クラスは、org.eclipse.ltk.core.refactoring.participants.CopyParticipant を拡張しなければなりません。