¸¶Ä¿ ÇØ»óµµ Á¦°ø

Ç÷¯±×ÀÎÀº ¸¶Ä¿°¡ Workbench ºü¸¥ ¼öÁ¤... ±â´É¿¡ °ü¿©ÇÒ ¼ö ÀÖµµ·Ï ¸¶Ä¿ ÇØ»óµµ¸¦ Á¤ÀÇÇÒ ¼öµµ ÀÖ½À´Ï´Ù. »ç¿ëÀÚ´Â ¸¶Ä¿¿¡ Á¦°øµÈ ÇØ»óµµ°¡ ÀÖ´Â °æ¿ì ¸¶Ä¿¸¦ ¼±ÅÃÇÏ°í ÆË¾÷ ¸Þ´º¿¡¼­ ºü¸¥ ¼öÁ¤...À» ¼±ÅÃÇÒ ¼ö ÀÖ½À´Ï´Ù.

¸¶Ä¿ ÇØ»óµµ´Â org.eclipse.ui.markerResolution È®ÀåÁ¡À» »ç¿ëÇÏ¿© Á¦°øµË´Ï´Ù. ÀÌ È®ÀåÁ¡À» »ç¿ëÇÏ¿© Ç÷¯±×ÀÎÀº IMarkerResolutionGenerator¸¦ ±¸ÇöÇϴ Ŭ·¡½º¸¦ ƯÁ¤ À¯ÇüÀÇ ¸¶Ä¿¿¡ ¿¬°ü½Ãų ¼ö ÀÖ½À´Ï´Ù. ¸¶Ä¿´Â ¸¶Ä¿ À¯Çü¿¡ ÀÇÇØ¼­¸¸ ±ÔÁ¤µÇ°Å³ª Çϳª ÀÌ»óÀÇ ¼Ó¼º °ª¿¡ ÀÇÇØ ´õ ÀÚ¼¼È÷ ±ÔÁ¤µÉ ¼ö ÀÖ½À´Ï´Ù. readme µµ±¸´Â ¸î °³ÀÇ ´Ù¸¥ ¸¶Ä¿ ÇØ»óµµ¸¦ ¼±¾ðÇÕ´Ï´Ù.

<extension point="org.eclipse.ui.markerResolution"> 
   <markerResolutionGenerator 
      class="org.eclipse.ui.examples.readmetool.ReadmeMarkerResolutionGenerator" 
      markerType="org.eclipse.ui.examples.readmetool.readmemarker"> 
      <attribute name="org.eclipse.ui.examples.readmetool.id" value= "1234"/> 
   </markerResolutionGenerator> 
   <markerResolutionGenerator 
      class="org.eclipse.ui.examples.readmetool.ReadmeMarkerResolutionGenerator" 
      markerType="org.eclipse.ui.examples.readmetool.readmemarker"> 
      <attribute name="org.eclipse.ui.examples.readmetool.level" value= "7"/> 
   </markerResolutionGenerator> 
   <markerResolutionGenerator
      class="org.eclipse.ui.examples.readmetool.ReadmeMarkerResolutionGenerator" 
      markerType="org.eclipse.ui.examples.readmetool.readmemarker"> 
      <attribute name="org.eclipse.ui.examples.readmetool.code" value= "red"/> 
      <attribute name="org.eclipse.ui.examples.readmetool.language" value= "english"/> 
   </markerResolutionGenerator> 
   </extension> 

°¢ ¸¶Ä¿ ÇØ»óµµ »ý¼º±â´Â readme ¸¶Ä¿ À¯Çü¿¡ ´ëÇØ Á¤ÀǵÇÁö¸¸ ´Ù¸¥ ¼Ó¼º °ª Á¶ÇÕ¿¡ ¿¬°üµË´Ï´Ù. Ã¹ ¹øÂ° ¸¶Ä¿ ÇØ»óµµ »ý¼º±â´Â ID ¼Ó¼ºÀÌ "1234"·Î ¼³Á¤µÇ´Â ¸¶Ä¿¿¡ »ç¿ëµË´Ï´Ù. ÀÌ Æ¯¼ö ¿¹Á¦¿¡¼­ readme µµ±¸´Â ¸ðµç °æ¿ì¿¡ µ¿ÀÏÇÑ ¸¶Ä¿ ÇØ¼® »ý¼º±â¸¦ »ç¿ëÇÕ´Ï´Ù. ÀÌ´Â ÀϹÝÀûÀÌÁö´Â ¾ÊÁö¸¸ ƯÁ¤ ¼Ó¼º °ª Á¶ÇÕ¿¡ ´ëÇØ »ç¿ë °¡´ÉÇÑ ÇϳªÀÇ ÇØ»óµµ¸¸ ÀÖ´Â °æ¿ì¿¡´Â ÇØ´çµË´Ï´Ù.

¸¶Ä¿ ÇØ»óµµ »ý¼º±â´Â ºü¸¥ ¼öÁ¤... ´ëÈ­ »óÀÚ¿¡ Ç¥½ÃµÇ´Â ¸¶Ä¿ ÇØ»óµµ(IMarkerResolution)ÀÇ ¹è¿­À» ¸®ÅÏÇØ¾ß ÇÕ´Ï´Ù. »ç¿ëÀÚ°¡ ´ëÈ­ »óÀÚ¿¡¼­ ÇØ»óµµ¸¦ ¼±ÅÃÇÑ °æ¿ì ÇØ»óµµ´Â run()ÀÔ´Ï´Ù. ´ÙÀ½Àº ReadmeMarkerResolutionGeneratorÀÇ ±¸ÇöÀÔ´Ï´Ù.

public class ReadmeMarkerResolutionGenerator implements IMarkerResolutionGenerator {
	public IMarkerResolution[] getResolutions(IMarker marker) {
		return new IMarkerResolution[] {new AddSentenceResolution()};
	}
}

AddSentenceResolutionÀº ÇØ»óµµÀÇ ´ëÈ­ »óÀÚ ·¹À̺íÀ» Á¤ÀÇÇϰí ÇØ»óµµ ÀÚü¸¦ ±¸ÇöÇÕ´Ï´Ù.

Copyright IBM Corporation and others 2000, 2003.