구성원 이동

org.eclipse.ltk.core.refactoring.moveParticipants

3.0

이 확장점은 구성원 이동 리팩토링을 정의하는 데 사용됩니다. 이 표현식의 읽기 프로그램은 <with variable="..."> 표현식 요소를 통해 참조될 수 있는 다음의 사전정의된 변수를 제공합니다. 표현식 평가 중 사용되는 기본 변수는 요소 변수에 바인드됩니다.

<!ELEMENT extension (moveParticipant*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT moveParticipant (enablement)>

<!ATTLIST moveParticipant

id    CDATA #REQUIRED

name  CDATA #REQUIRED

class CDATA #REQUIRED>


아래의 예제는 유형 이동 구성원을 정의합니다. 이 구성원은 리팩토링의 영향을 받는 프로젝트 중 하나가 Java 네이처를 갖고 있는 경우와 이동될 유형이 JUnit 테스트일 때 사용 가능합니다.

<moveParticipant id=

"org.eclipse.jdt.junit.moveTypeParticipant"

name=

"%MoveTypeParticipant.name"

class=

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

>

<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>

</moveParticipant>

제공된 클래스는 org.eclipse.ltk.core.refactoring.participants.MoveParticipant를 확장해야 합니다.