Changeset 25682

Show
Ignore:
Timestamp:
28.05.2012 23:44:13 (7 years ago)
Author:
davidb
Message:

Changed to using RSyntaxTextArea to get coloured highlighting and other goodies for the Greenstone3 format manager

Location:
main/trunk/gli
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/gli.bat

    r24829 r25682  
    157157 
    158158:: Run GS3 if version = 3 
    159 if "%_VERSION%" == "3" "%JAVA_EXECUTABLE%" -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl "%GSDLHOME%" -gsdlos %GSDLOS% -gsdl3 "%GSDL3HOME%" -gsdl3src "%GSDL3SRCHOME%" -perl "%PERLPATH%" %1 %2 %3 %4 %5 %6 %7 %8 %9 
     159if "%_VERSION%" == "3" "%JAVA_EXECUTABLE%" -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg -gsdl "%GSDLHOME%" -gsdlos %GSDLOS% -gsdl3 "%GSDL3HOME%" -gsdl3src "%GSDL3SRCHOME%" -perl "%PERLPATH%" %1 %2 %3 %4 %5 %6 %7 %8 %9 
    160160if "%_VERSION%" == "3" goto finRun 
    161161 
     
    173173    ) 
    174174 
    175     "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl "%GSDLHOME%" -gsdlos %GSDLOS% -perl "%PERLPATH%" -local_library "%locallib%" %1 %2 %3 %4 %5 %6 %7 %8 %9 
     175    "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg -gsdl "%GSDLHOME%" -gsdlos %GSDLOS% -perl "%PERLPATH%" -local_library "%locallib%" %1 %2 %3 %4 %5 %6 %7 %8 %9 
    176176    if ERRORLEVEL 2 ( 
    177177        goto localLib 
     
    180180 
    181181:webLib 
    182     "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl "%GSDLHOME%" -gsdlos %GSDLOS% -perl "%PERLPATH%" %1 %2 %3 %4 %5 %6 %7 %8 %9 
     182    "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg -gsdl "%GSDLHOME%" -gsdlos %GSDLOS% -perl "%PERLPATH%" %1 %2 %3 %4 %5 %6 %7 %8 %9 
    183183    if ERRORLEVEL 2 ( 
    184184        goto webLib 
  • main/trunk/gli/makegli.bat

    r25678 r25682  
    119119    if "%GLILANG%" == "ru" echo Š®¬¯š«šà®¢ ­š¥ %1 š § ¢šáš¬ë¥ ª« ááë... 
    120120 
    121     "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar %1 
     121    "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar %1 
    122122 
    123123    if "%GLILANG%" == "en" echo Done! 
     
    140140:: Compile the GLI 
    141141:: Sun compiler (tested with 1.5 and 1.6) didn't compile DragTreeSelectionModel.java or MetadataAuditTableModel.java automatically, so we need to put them in explicitly 
    142 "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar src/org/greenstone/gatherer/GathererProg.java src/org/greenstone/gatherer/util/DragTreeSelectionModel.java src/org/greenstone/gatherer/metadata/MetadataAuditTableModel.java  
    143 "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar src/org/greenstone/gatherer/GathererApplet.java 
    144 :: "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar src/org/greenstone/gatherer/GathererApplet4gs3.java 
     142"%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar;;lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/GathererProg.java src/org/greenstone/gatherer/util/DragTreeSelectionModel.java src/org/greenstone/gatherer/metadata/MetadataAuditTableModel.java  
     143"%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar;;lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/GathererApplet.java 
     144:: "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar;;lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/GathererApplet4gs3.java 
    145145 
    146146:: Compile the GEMS 
    147 "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar src/org/greenstone/gatherer/gems/GEMS.java 
     147"%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar;;lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/gems/GEMS.java 
    148148 
    149149:: Compile the standalone programs needed on the server for remote building 
  • main/trunk/gli/makejar.bat

    r24829 r25682  
    119119  "!JARPATH!\jar" xf ..\lib\apache.jar com org 
    120120  "!JARPATH!\jar" xf ..\lib\qfslib.jar de 
    121  
     121  "!JARPATH!\jar" xf ..\lib\rsyntaxtextarea.jar org 
    122122  cd .. 
    123123) 
  • main/trunk/gli/src/org/greenstone/gatherer/cdm/Format4gs3Manager.java

    r25610 r25682  
    3333import javax.xml.parsers.DocumentBuilderFactory; 
    3434 
     35import org.fife.ui.rsyntaxtextarea.*; 
     36 
    3537import org.greenstone.gatherer.Configuration; 
    3638import org.greenstone.gatherer.DebugStream; 
     
    297299 
    298300            editor_textarea = new NumberedJTextArea(); 
     301 
     302                /* Fields specific to RSyntaxQuery inherited class */ 
     303            editor_textarea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_XML); 
     304            editor_textarea.setBracketMatchingEnabled(true); 
     305            editor_textarea.setAnimateBracketMatching(true); 
     306            editor_textarea.setAntiAliasingEnabled(true); 
     307            editor_textarea.setAutoIndentEnabled(true); 
     308            editor_textarea.setPaintMarkOccurrencesBorder(false); 
     309             
     310            /* Standard fields to JTextArea */ 
    299311            editor_textarea.setOpaque(false); 
    300312            editor_textarea.setBackground(Configuration.getColor("coloring.editable_background", false)); 
     
    824836         * A textarea with the line number next to each line of the text 
    825837         */ 
    826         public class NumberedJTextArea extends JTextArea 
     838        public class NumberedJTextArea extends RSyntaxTextArea /*JTextArea*/ 
    827839        { 
    828840            public void paintComponent(Graphics g) 
     
    832844                g.setColor(Color.white); 
    833845                g.fillRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height); 
     846 
     847                super.paintComponent(g); 
     848 
    834849                if (rectangle.x < insets.left) 
    835850                { 
     
    860875                        line_number_start_point++; 
    861876                    } 
    862                 } 
    863                 super.paintComponent(g); 
     877                }                
    864878            } 
    865879