2012-07-14 1 views
2

일부 프로젝트 구성의 경우 프로젝트 루트에 configuration.xml을 사용하는 Eclipse RCP 응용 프로그램을 빌드했습니다. 나는 아이콘을 사용자 정의하고 기본 XML 편집기를 유지하고 싶습니다. 하나의 블로그 post을 찾았습니다. 정확히 property 파일을 찾고 있습니다. 나는 그것을 추출 :xml 구성 파일 용 eclipse rcp 아이콘 변경

<extension point="org.eclipse.core.contenttype.contentTypes"> 
    <content-type base-type="org.eclipse.core.runtime.properties" 
    file-extensions="config" 
    id="in.cypal.eclipse.myConfig" 
    name="My Config File" 
    priority="normal"> 
    </content-type> 
</extension> 

<extension point="org.eclipse.ui.editors"> 
    <editor class="org.eclipse.jdt.internal.ui.propertiesfileeditor.PropertiesFileEditor" 
    default="false" 
    extensions="config" 
    icon="icons/sample.gif" 
    id="in.cypal.eclipse.editors.myConfigEditor" 
    name="My Config Editor"> 
     <contentTypeBinding contentTypeId="in.cypal.eclipse.myConfig"> 
     </contentTypeBinding> 
    </editor> 
</extension> 

나는 기본적으로 이클립스의 XML 편집기의 구현에 editor 요소의 속성 class을 조정할 필요가 있다고 생각한다. org.eclipse.wst.xml_ui.feature.feature.group을 설치했습니다. 올바른 구현을 찾을 수 없습니다. 제발 도와주세요 :) 고마워요!

답변

2

나는 내 문제를 해결할 수있다, 누군가가 같은 문제를 가져야한다면 내 해결책이 여기에있다.

<extension 
     point="org.eclipse.core.contenttype.contentTypes"> 
    <content-type 
      base-type="org.eclipse.core.runtime.xml" 
      file-names="configuration.xml" 
      id="org.eclipse.core.runtime.xml.spl" 
      name="Software Product Line Configuration" 
      priority="normal"> 
    </content-type> 
    </extension> 
    <extension 
     point="org.eclipse.ui.editors"> 
    <editor 
      class="org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart" 
      default="true" 
      icon="icons/configuration.png" 
      id="YOUR_ID" 
      name="Software Product Line Configuration"> 
     <contentTypeBinding 
       contentTypeId="org.eclipse.core.runtime.xml.spl"> 
     </contentTypeBinding> 
    </editor> 
    </extension> 

나는 내 작업 공간으로 org.eclipse.wst.xml.ui 번들을 가져오고 MANIFEST.MF 파일의 확장 탭에보고했다. 확장 점 org.eclipse.ui.editors가 등장했습니다. 그래서 class 속성의 구현을 사용하고는 :)

편집을했다 : 나는 Eclipse Plugin Spy에 대해 알고 싶다면,이 더 쉬웠을 것이다. 따라서 기능이 이미있는 경우에는 바로 가기를 사용하여 구현 세부 사항을 확인하십시오.