From 47f249e7d6d6ec84e27113ed7a3d6eac67a2bb8a Mon Sep 17 00:00:00 2001 From: UnAfraid Date: Mon, 25 Sep 2017 21:15:49 +0300 Subject: [PATCH] Upstream sync --- .gitattributes | 11 + .gitignore | 23 + ESPlorer/_lua/test100lines.lua | 100 - ESPlorer/build.xml | 73 - ESPlorer/manifest.mf | 3 - ESPlorer/nbproject/private/config.properties | 0 .../nbproject/private/profiler/attach.xml | 12 - .../private/profiler/configurations.xml | 116 - .../profiler/snapshot-1419433859405.nps | Bin 30036 -> 0 bytes ESPlorer/nbproject/project.xml | 17 - ESPlorer/run/run-dir | 0 ESPlorer/src/jssc/SerialNativeInterface.java | 486 - ESPlorer/src/jssc/SerialPort.java | 1313 -- ESPlorer/src/jssc/SerialPortEvent.java | 192 - .../src/jssc/SerialPortEventListener.java | 34 - ESPlorer/src/jssc/SerialPortException.java | 95 - ESPlorer/src/jssc/SerialPortList.java | 348 - .../src/jssc/SerialPortTimeoutException.java | 64 - ESPlorer/src/libs/linux/libjSSC-2.8_armhf.so | Bin 10631 -> 0 bytes ESPlorer/src/libs/linux/libjSSC-2.8_armsf.so | Bin 10779 -> 0 bytes ESPlorer/src/libs/linux/libjSSC-2.8_x86.so | Bin 13720 -> 0 bytes ESPlorer/src/libs/linux/libjSSC-2.8_x86_64.so | Bin 14464 -> 0 bytes .../src/libs/mac_os_x/libjSSC-2.8_ppc.jnilib | Bin 14504 -> 0 bytes .../libs/mac_os_x/libjSSC-2.8_ppc64.jnilib | Bin 18696 -> 0 bytes .../src/libs/mac_os_x/libjSSC-2.8_x86.jnilib | Bin 18328 -> 0 bytes .../libs/mac_os_x/libjSSC-2.8_x86_64.jnilib | Bin 14536 -> 0 bytes ESPlorer/src/libs/solaris/libjSSC-2.8_x86.so | Bin 14072 -> 0 bytes .../src/libs/solaris/libjSSC-2.8_x86_64.so | Bin 17832 -> 0 bytes ESPlorer/src/libs/windows/jSSC-2.8_x86.dll | Bin 67072 -> 0 bytes ESPlorer/src/libs/windows/jSSC-2.8_x86_64.dll | Bin 122880 -> 0 bytes ESPlorer/src/org/fife/io/DocumentReader.java | 218 - ESPlorer/src/org/fife/io/UnicodeReader.java | 270 - ESPlorer/src/org/fife/io/UnicodeWriter.java | 274 - ESPlorer/src/org/fife/io/package.html | 5 - .../src/org/fife/print/RPrintUtilities.java | 530 - ESPlorer/src/org/fife/print/package.html | 5 - .../ui/autocomplete/AbstractCompletion.java | 178 - .../AbstractCompletionProvider.java | 248 - .../autocomplete/AutoCompleteDescWindow.java | 591 - .../AutoCompleteDescWindow.properties | 1 - .../AutoCompleteDescWindow_ar.properties | 1 - .../AutoCompleteDescWindow_de.properties | 1 - .../AutoCompleteDescWindow_es.properties | 1 - .../AutoCompleteDescWindow_fr.properties | 1 - .../AutoCompleteDescWindow_hu.properties | 1 - .../AutoCompleteDescWindow_in.properties | 1 - .../AutoCompleteDescWindow_it.properties | 1 - .../AutoCompleteDescWindow_ja.properties | 1 - .../AutoCompleteDescWindow_ko.properties | 1 - .../AutoCompleteDescWindow_nl.properties | 1 - .../AutoCompleteDescWindow_pl.properties | 1 - .../AutoCompleteDescWindow_pt_BR.properties | 1 - .../AutoCompleteDescWindow_ru.properties | 1 - .../AutoCompleteDescWindow_tr.properties | 1 - .../AutoCompleteDescWindow_zh_CN.properties | 1 - .../AutoCompleteDescWindow_zh_TW.properties | 1 - .../autocomplete/AutoCompletePopupWindow.java | 1007 -- .../fife/ui/autocomplete/AutoCompletion.java | 1515 --- .../ui/autocomplete/AutoCompletionEvent.java | 71 - .../autocomplete/AutoCompletionListener.java | 31 - .../AutoCompletionStyleContext.java | 120 - .../fife/ui/autocomplete/BasicCompletion.java | 144 - .../org/fife/ui/autocomplete/Completion.java | 153 - .../autocomplete/CompletionCellRenderer.java | 697 - .../ui/autocomplete/CompletionListModel.java | 88 - .../ui/autocomplete/CompletionProvider.java | 213 - .../autocomplete/CompletionProviderBase.java | 264 - .../ui/autocomplete/CompletionXMLParser.java | 446 - .../fife/ui/autocomplete/CompletionXml.dtd | 30 - .../DefaultCompletionProvider.java | 373 - .../autocomplete/DelegatingCellRenderer.java | 94 - .../ui/autocomplete/DescWindowCallback.java | 35 - .../org/fife/ui/autocomplete/EmptyIcon.java | 49 - .../ui/autocomplete/ExternalURLHandler.java | 46 - .../org/fife/ui/autocomplete/FastListUI.java | 189 - .../ui/autocomplete/FunctionCompletion.java | 322 - .../LanguageAwareCompletionProvider.java | 427 - .../fife/ui/autocomplete/LinkRedirector.java | 20 - .../ui/autocomplete/MarkupTagCompletion.java | 240 - .../autocomplete/OutlineHighlightPainter.java | 143 - .../ParameterChoicesProvider.java | 40 - .../autocomplete/ParameterizedCompletion.java | 172 - .../ParameterizedCompletionChoicesWindow.java | 314 - .../ParameterizedCompletionContext.java | 1236 -- ...meterizedCompletionDescriptionToolTip.java | 211 - .../ParameterizedCompletionInsertionInfo.java | 251 - .../RoundRobinAutoCompletion.java | 156 - .../ui/autocomplete/ShorthandCompletion.java | 117 - .../org/fife/ui/autocomplete/SizeGrip.java | 257 - .../SortByRelevanceComparator.java | 33 - .../ui/autocomplete/TemplateCompletion.java | 384 - .../fife/ui/autocomplete/TemplatePiece.java | 86 - .../src/org/fife/ui/autocomplete/TipUtil.java | 179 - .../src/org/fife/ui/autocomplete/Util.java | 330 - .../ui/autocomplete/VariableCompletion.java | 196 - .../org/fife/ui/autocomplete/arrow_left.png | Bin 345 -> 0 bytes .../org/fife/ui/autocomplete/arrow_right.png | Bin 349 -> 0 bytes .../org/fife/ui/autocomplete/bullet_black.png | Bin 221 -> 0 bytes .../org/fife/ui/autocomplete/osx_sizegrip.png | Bin 4876 -> 0 bytes .../AbstractJFlexCTokenMaker.java | 288 - .../AbstractJFlexTokenMaker.java | 52 - .../rsyntaxtextarea/AbstractTokenMaker.java | 67 - .../AbstractTokenMakerFactory.java | 134 - .../rsyntaxtextarea/ActiveLineRangeEvent.java | 68 - .../ActiveLineRangeListener.java | 44 - .../rsyntaxtextarea/CodeTemplateManager.java | 389 - .../DefaultOccurrenceMarker.java | 109 - .../rsyntaxtextarea/DefaultTokenFactory.java | 137 - .../ui/rsyntaxtextarea/ErrorStrip.properties | 3 - .../rsyntaxtextarea/ErrorStrip_ar.properties | 3 - .../rsyntaxtextarea/ErrorStrip_de.properties | 3 - .../rsyntaxtextarea/ErrorStrip_es.properties | 3 - .../rsyntaxtextarea/ErrorStrip_fr.properties | 3 - .../rsyntaxtextarea/ErrorStrip_hu.properties | 3 - .../rsyntaxtextarea/ErrorStrip_in.properties | 3 - .../rsyntaxtextarea/ErrorStrip_it.properties | 3 - .../rsyntaxtextarea/ErrorStrip_ja.properties | 3 - .../rsyntaxtextarea/ErrorStrip_ko.properties | 3 - .../rsyntaxtextarea/ErrorStrip_nl.properties | 3 - .../rsyntaxtextarea/ErrorStrip_pl.properties | 3 - .../ErrorStrip_pt_BR.properties | 3 - .../rsyntaxtextarea/ErrorStrip_ru.properties | 3 - .../rsyntaxtextarea/ErrorStrip_tr.properties | 3 - .../ErrorStrip_zh_CN.properties | 3 - .../ErrorStrip_zh_TW.properties | 3 - .../ui/rsyntaxtextarea/FileFileLocation.java | 121 - .../FoldingAwareIconRowHeader.java | 251 - .../rsyntaxtextarea/HtmlOccurrenceMarker.java | 407 - .../ui/rsyntaxtextarea/LinkGenerator.java | 50 - .../rsyntaxtextarea/LinkGeneratorResult.java | 53 - .../MarkOccurrencesSupport.java | 286 - .../ui/rsyntaxtextarea/OccurrenceMarker.java | 63 - .../ui/rsyntaxtextarea/ParserManager.java | 819 -- .../rsyntaxtextarea/PopupWindowDecorator.java | 68 - .../org/fife/ui/rsyntaxtextarea/RSTAView.java | 62 - .../RSyntaxTextArea.properties | 14 - .../RSyntaxTextAreaDefaultInputMap.java | 77 - .../RSyntaxTextArea_ar.properties | 14 - .../RSyntaxTextArea_de.properties | 14 - .../RSyntaxTextArea_es.properties | 14 - .../RSyntaxTextArea_fr.properties | 14 - .../RSyntaxTextArea_hu.properties | 14 - .../RSyntaxTextArea_in.properties | 14 - .../RSyntaxTextArea_it.properties | 14 - .../RSyntaxTextArea_ja.properties | 14 - .../RSyntaxTextArea_ko.properties | 14 - .../RSyntaxTextArea_nl.properties | 14 - .../RSyntaxTextArea_pl.properties | 15 - .../RSyntaxTextArea_pt_BR.properties | 14 - .../RSyntaxTextArea_ru.properties | 14 - .../RSyntaxTextArea_tr.properties | 14 - .../RSyntaxTextArea_zh_CN.properties | 14 - .../RSyntaxTextArea_zh_TW.properties | 14 - .../fife/ui/rsyntaxtextarea/RTfToText.java | 229 - .../fife/ui/rsyntaxtextarea/RtfGenerator.java | 479 - .../ui/rsyntaxtextarea/RtfTransferable.java | 91 - .../SelectRegionLinkGeneratorResult.java | 59 - .../org/fife/ui/rsyntaxtextarea/Style.java | 196 - .../ui/rsyntaxtextarea/TextEditorPane.java | 717 - .../fife/ui/rsyntaxtextarea/TokenFactory.java | 67 - .../fife/ui/rsyntaxtextarea/TokenImpl.java | 872 -- .../ui/rsyntaxtextarea/TokenIterator.java | 124 - .../fife/ui/rsyntaxtextarea/TokenMaker.java | 190 - .../ui/rsyntaxtextarea/TokenMakerBase.java | 327 - .../ui/rsyntaxtextarea/TokenMakerFactory.java | 124 - .../org/fife/ui/rsyntaxtextarea/TokenMap.java | 277 - .../ui/rsyntaxtextarea/TokenOrientedView.java | 61 - .../fife/ui/rsyntaxtextarea/TokenTypes.java | 85 - .../ui/rsyntaxtextarea/URLFileLocation.java | 160 - .../VisibleWhitespaceTokenPainter.java | 185 - .../rsyntaxtextarea/WrappedSyntaxView2.java | 157 - .../rsyntaxtextarea/XmlOccurrenceMarker.java | 228 - .../focusabletip/FocusableTip.properties | 1 - .../focusabletip/FocusableTip_ar.properties | 1 - .../focusabletip/FocusableTip_de.properties | 1 - .../focusabletip/FocusableTip_es.properties | 1 - .../focusabletip/FocusableTip_fr.properties | 1 - .../focusabletip/FocusableTip_hu.properties | 1 - .../focusabletip/FocusableTip_in.properties | 1 - .../focusabletip/FocusableTip_it.properties | 1 - .../focusabletip/FocusableTip_ja.properties | 1 - .../focusabletip/FocusableTip_ko.properties | 1 - .../focusabletip/FocusableTip_nl.properties | 1 - .../focusabletip/FocusableTip_pl.properties | 1 - .../FocusableTip_pt_BR.properties | 1 - .../focusabletip/FocusableTip_ru.properties | 1 - .../focusabletip/FocusableTip_tr.properties | 1 - .../FocusableTip_zh_CN.properties | 1 - .../FocusableTip_zh_TW.properties | 1 - .../focusabletip/SizeGrip.java | 255 - .../rsyntaxtextarea/focusabletip/TipUtil.java | 235 - .../focusabletip/osx_sizegrip.png | Bin 4876 -> 0 bytes .../rsyntaxtextarea/focusabletip/package.html | 5 - .../folding/CurlyFoldParser.java | 317 - .../fife/ui/rsyntaxtextarea/folding/Fold.java | 567 - .../folding/FoldCollapser.java | 106 - .../rsyntaxtextarea/folding/FoldManager.java | 731 - .../rsyntaxtextarea/folding/FoldParser.java | 41 - .../ui/rsyntaxtextarea/folding/FoldType.java | 59 - .../folding/JsonFoldParser.java | 161 - .../folding/LatexFoldParser.java | 108 - .../folding/LispFoldParser.java | 35 - .../folding/NsisFoldParser.java | 156 - .../folding/XmlFoldParser.java | 148 - .../ui/rsyntaxtextarea/folding/package.html | 5 - .../modes/AbstractMarkupTokenMaker.java | 52 - .../rsyntaxtextarea/modes/DtdTokenMaker.flex | 346 - .../rsyntaxtextarea/modes/DtdTokenMaker.java | 831 -- .../modes/PlainTextTokenMaker.flex | 227 - .../modes/PlainTextTokenMaker1.java | 647 - .../modes/PropertiesFileTokenMaker.flex | 233 - .../modes/PropertiesFileTokenMaker.java | 660 - .../modes/WindowsBatchTokenMaker.java | 641 - .../rsyntaxtextarea/modes/XMLTokenMaker.java | 997 -- .../ui/rsyntaxtextarea/modes/package.html | 5 - .../org/fife/ui/rsyntaxtextarea/package.html | 5 - .../parser/AbstractParser.java | 95 - .../parser/DefaultParseResult.java | 145 - .../parser/ExtendedHyperlinkListener.java | 38 - .../rsyntaxtextarea/parser/ParseResult.java | 84 - .../ui/rsyntaxtextarea/parser/Parser.java | 76 - .../rsyntaxtextarea/parser/ParserNotice.java | 185 - .../rsyntaxtextarea/parser/ToolTipInfo.java | 95 - .../ui/rsyntaxtextarea/parser/XmlParser.java | 224 - .../ui/rsyntaxtextarea/parser/package.html | 9 - .../templates/AbstractCodeTemplate.java | 134 - .../templates/CodeTemplate.java | 74 - .../templates/StaticCodeTemplate.java | 263 - .../ui/rsyntaxtextarea/templates/package.html | 5 - .../fife/ui/rsyntaxtextarea/themes/dark.xml | 78 - .../ui/rsyntaxtextarea/themes/default-alt.xml | 78 - .../ui/rsyntaxtextarea/themes/default.xml | 78 - .../ui/rsyntaxtextarea/themes/eclipse.xml | 78 - .../fife/ui/rsyntaxtextarea/themes/idea.xml | 78 - .../fife/ui/rsyntaxtextarea/themes/theme.dtd | 79 - .../org/fife/ui/rsyntaxtextarea/themes/vs.xml | 78 - .../ui/rtextarea/AbstractGutterComponent.java | 124 - .../rtextarea/BackgroundPainterStrategy.java | 44 - ...ufferedImageBackgroundPainterStrategy.java | 124 - .../fife/ui/rtextarea/ClipboardHistory.java | 136 - .../ui/rtextarea/ClipboardHistoryPopup.java | 436 - .../ColorBackgroundPainterStrategy.java | 110 - .../fife/ui/rtextarea/ConfigurableCaret.java | 682 - .../org/fife/ui/rtextarea/FoldIndicator.java | 704 - .../org/fife/ui/rtextarea/GutterIconInfo.java | 53 - .../src/org/fife/ui/rtextarea/IconGroup.java | 247 - .../ImageBackgroundPainterStrategy.java | 171 - .../ui/rtextarea/LineHighlightManager.java | 208 - .../org/fife/ui/rtextarea/LineNumberList.java | 738 - .../src/org/fife/ui/rtextarea/RDocument.java | 65 - .../ui/rtextarea/RDocumentCharSequence.java | 119 - .../fife/ui/rtextarea/RTextArea.properties | 34 - .../ui/rtextarea/RTextAreaHighlighter.java | 339 - .../fife/ui/rtextarea/RTextArea_ar.properties | 34 - .../fife/ui/rtextarea/RTextArea_de.properties | 34 - .../fife/ui/rtextarea/RTextArea_es.properties | 34 - .../fife/ui/rtextarea/RTextArea_fr.properties | 34 - .../fife/ui/rtextarea/RTextArea_hu.properties | 34 - .../fife/ui/rtextarea/RTextArea_in.properties | 34 - .../fife/ui/rtextarea/RTextArea_it.properties | 34 - .../fife/ui/rtextarea/RTextArea_ja.properties | 34 - .../fife/ui/rtextarea/RTextArea_ko.properties | 34 - .../fife/ui/rtextarea/RTextArea_nl.properties | 34 - .../fife/ui/rtextarea/RTextArea_pl.properties | 34 - .../ui/rtextarea/RTextArea_pt_BR.properties | 34 - .../fife/ui/rtextarea/RTextArea_ru.properties | 34 - .../fife/ui/rtextarea/RTextArea_tr.properties | 34 - .../ui/rtextarea/RTextArea_zh_CN.properties | 34 - .../ui/rtextarea/RTextArea_zh_TW.properties | 34 - .../org/fife/ui/rtextarea/RUndoManager.java | 258 - .../ui/rtextarea/RecordableTextAction.java | 289 - .../fife/ui/rtextarea/RegExReplaceInfo.java | 85 - .../org/fife/ui/rtextarea/SearchContext.java | 398 - .../org/fife/ui/rtextarea/SearchEngine.java | 981 -- .../ui/rtextarea/SmartHighlightPainter.java | 159 - .../fife/ui/rtextarea/ToolTipSupplier.java | 39 - ...olatileImageBackgroundPainterStrategy.java | 138 - .../src/org/fife/ui/rtextarea/package.html | 5 - ESPlorer/src/org/fife/util/package.html | 5 - .../beansbinding/AbstractBindingListener.java | 89 - .../jdesktop/beansbinding/AutoBinding.java | 254 - .../jdesktop/beansbinding/BeanProperty.java | 1020 -- .../org/jdesktop/beansbinding/Binding.java | 1625 --- .../jdesktop/beansbinding/BindingGroup.java | 292 - .../beansbinding/BindingListener.java | 67 - .../org/jdesktop/beansbinding/Bindings.java | 82 - .../org/jdesktop/beansbinding/Converter.java | 230 - .../org/jdesktop/beansbinding/ELProperty.java | 923 -- .../jdesktop/beansbinding/ObjectProperty.java | 132 - .../org/jdesktop/beansbinding/Property.java | 119 - .../jdesktop/beansbinding/PropertyHelper.java | 229 - .../jdesktop/beansbinding/PropertyPath.java | 150 - .../PropertyResolutionException.java | 43 - .../beansbinding/PropertyStateEvent.java | 252 - .../beansbinding/PropertyStateListener.java | 26 - .../jdesktop/beansbinding/TempELContext.java | 106 - .../org/jdesktop/beansbinding/Validator.java | 86 - .../beansbinding/ext/BeanAdapterFactory.java | 222 - .../beansbinding/ext/BeanAdapterProvider.java | 18 - .../jdesktop/beansbinding/ext/package.html | 53 - .../org/jdesktop/beansbinding/package.html | 97 - .../src/org/jdesktop/el/ArrayELResolver.java | 330 - .../src/org/jdesktop/el/BeanELResolver.java | 542 - .../org/jdesktop/el/CompositeELResolver.java | 475 - ESPlorer/src/org/jdesktop/el/ELContext.java | 211 - .../src/org/jdesktop/el/ELContextEvent.java | 37 - .../org/jdesktop/el/ELContextListener.java | 25 - ESPlorer/src/org/jdesktop/el/ELException.java | 56 - ESPlorer/src/org/jdesktop/el/ELResolver.java | 324 - ESPlorer/src/org/jdesktop/el/ELUtil.java | 156 - ESPlorer/src/org/jdesktop/el/Expression.java | 186 - .../org/jdesktop/el/ExpressionFactory.java | 212 - .../src/org/jdesktop/el/FunctionMapper.java | 36 - .../src/org/jdesktop/el/ListELResolver.java | 362 - .../src/org/jdesktop/el/MapELResolver.java | 357 - .../src/org/jdesktop/el/MethodExpression.java | 105 - ESPlorer/src/org/jdesktop/el/MethodInfo.java | 60 - .../jdesktop/el/MethodNotFoundException.java | 54 - .../jdesktop/el/PrivateMessages.properties | 12 - .../el/PropertyNotFoundException.java | 60 - .../el/PropertyNotWritableException.java | 63 - .../jdesktop/el/ResourceBundleELResolver.java | 275 - .../src/org/jdesktop/el/ValueExpression.java | 183 - .../src/org/jdesktop/el/VariableMapper.java | 40 - .../el/impl/ExpressionFactoryImpl.java | 66 - .../org/jdesktop/el/impl/Messages.properties | 51 - .../el/impl/MethodExpressionImpl.java | 302 - .../el/impl/MethodExpressionLiteral.java | 83 - .../jdesktop/el/impl/ValueExpressionImpl.java | 273 - .../el/impl/ValueExpressionLiteral.java | 100 - .../jdesktop/el/impl/lang/ELArithmetic.java | 364 - .../org/jdesktop/el/impl/lang/ELSupport.java | 463 - .../el/impl/lang/EvaluationContext.java | 126 - .../el/impl/lang/ExpressionBuilder.java | 202 - .../el/impl/lang/FunctionMapperFactory.java | 47 - .../el/impl/lang/FunctionMapperImpl.java | 189 - .../el/impl/lang/VariableMapperFactory.java | 41 - .../el/impl/lang/VariableMapperImpl.java | 44 - .../org/jdesktop/el/impl/lang/package.html | 19 - .../src/org/jdesktop/el/impl/package.html | 19 - .../el/impl/parser/ArithmeticNode.java | 29 - .../org/jdesktop/el/impl/parser/AstAnd.java | 40 - .../el/impl/parser/AstBracketSuffix.java | 26 - .../jdesktop/el/impl/parser/AstChoice.java | 38 - .../impl/parser/AstCompositeExpression.java | 46 - .../el/impl/parser/AstDeferredExpression.java | 41 - .../org/jdesktop/el/impl/parser/AstDiv.java | 36 - .../jdesktop/el/impl/parser/AstDotSuffix.java | 26 - .../el/impl/parser/AstDynamicExpression.java | 41 - .../org/jdesktop/el/impl/parser/AstEmpty.java | 49 - .../org/jdesktop/el/impl/parser/AstEqual.java | 35 - .../org/jdesktop/el/impl/parser/AstFalse.java | 26 - .../el/impl/parser/AstFloatingPoint.java | 46 - .../jdesktop/el/impl/parser/AstFunction.java | 125 - .../el/impl/parser/AstGreaterThan.java | 39 - .../el/impl/parser/AstGreaterThanEqual.java | 41 - .../el/impl/parser/AstIdentifier.java | 156 - .../jdesktop/el/impl/parser/AstInteger.java | 46 - .../jdesktop/el/impl/parser/AstLessThan.java | 39 - .../el/impl/parser/AstLessThanEqual.java | 41 - .../el/impl/parser/AstLiteralExpression.java | 51 - .../org/jdesktop/el/impl/parser/AstMinus.java | 36 - .../org/jdesktop/el/impl/parser/AstMod.java | 36 - .../org/jdesktop/el/impl/parser/AstMult.java | 36 - .../jdesktop/el/impl/parser/AstNegative.java | 75 - .../org/jdesktop/el/impl/parser/AstNot.java | 37 - .../jdesktop/el/impl/parser/AstNotEqual.java | 35 - .../org/jdesktop/el/impl/parser/AstNull.java | 31 - .../org/jdesktop/el/impl/parser/AstOr.java | 40 - .../org/jdesktop/el/impl/parser/AstPlus.java | 36 - .../jdesktop/el/impl/parser/AstString.java | 62 - .../org/jdesktop/el/impl/parser/AstTrue.java | 26 - .../org/jdesktop/el/impl/parser/AstValue.java | 158 - .../jdesktop/el/impl/parser/BooleanNode.java | 27 - .../org/jdesktop/el/impl/parser/ELParser.java | 1676 --- .../el/impl/parser/ELParserConstants.java | 130 - .../el/impl/parser/ELParserTokenManager.java | 1285 -- .../el/impl/parser/ELParserTreeConstants.java | 81 - .../el/impl/parser/JJTELParserState.java | 127 - .../src/org/jdesktop/el/impl/parser/Node.java | 57 - .../jdesktop/el/impl/parser/NodeVisitor.java | 16 - .../el/impl/parser/ParseException.java | 196 - .../el/impl/parser/SimpleCharStream.java | 405 - .../jdesktop/el/impl/parser/SimpleNode.java | 147 - .../org/jdesktop/el/impl/parser/Token.java | 85 - .../el/impl/parser/TokenMgrError.java | 137 - .../org/jdesktop/el/impl/parser/package.html | 19 - .../jdesktop/el/impl/util/MessageFactory.java | 59 - .../jdesktop/el/impl/util/ReflectionUtil.java | 209 - .../org/jdesktop/el/impl/util/package.html | 19 - ESPlorer/src/org/jdesktop/el/package.html | 192 - .../ObservableCollections.java | 363 - .../observablecollections/ObservableList.java | 40 - .../ObservableListListener.java | 56 - .../observablecollections/ObservableMap.java | 29 - .../ObservableMapListener.java | 42 - .../observablecollections/package.html | 18 - .../swingbinding/ElementsProperty.java | 146 - .../swingbinding/JComboBoxBinding.java | 393 - .../jdesktop/swingbinding/JListBinding.java | 475 - .../jdesktop/swingbinding/JTableBinding.java | 841 -- .../jdesktop/swingbinding/SwingBindings.java | 369 - .../AbstractButtonAdapterProvider.java | 86 - .../adapters/BeanAdapterBase.java | 115 - .../adapters/JComboBoxAdapterProvider.java | 87 - .../adapters/JListAdapterProvider.java | 178 - .../adapters/JSliderAdapterProvider.java | 106 - .../adapters/JSpinnerAdapterProvider.java | 86 - .../adapters/JTableAdapterProvider.java | 232 - .../JTextComponentAdapterProvider.java | 230 - .../swingbinding/adapters/package.html | 28 - .../impl/AbstractColumnBinding.java | 35 - .../swingbinding/impl/ListBindingManager.java | 269 - .../jdesktop/swingbinding/impl/package.html | 20 - .../org/jdesktop/swingbinding/package.html | 243 - README.md | 24 + build.gradle | 70 + {ESPlorer/src => dist}/ESPlorer.bat | 1 + dist/ESPlorer.sh | 2 + .../org.eclipse.core.resources.prefs | 2 + .../org.eclipse.core.runtime.prefs | 2 + eclipse-settings/org.eclipse.jdt.core.prefs | 406 + eclipse-settings/org.eclipse.jdt.ui.prefs | 125 + .../org.eclipse.wst.sse.core.prefs | 3 + .../org.eclipse.wst.validation.prefs | 12 + .../org.eclipse.wst.xml.core.prefs | 18 + gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 52266 bytes gradle/wrapper/gradle-wrapper.properties | 6 + gradlew | 164 + gradlew.bat | 90 + .../com/github/unafraid/ESPlorer/Main.form | 0 .../com/github/unafraid/ESPlorer/Main.java | 11339 ++++++++++++++++ .../lib/awtextra/AbsoluteConstraints.java | 0 .../netbeans/lib/awtextra/AbsoluteLayout.java | 6 +- .../main}/resources/AlwaysOnTop.png | Bin .../main}/resources/ESP8266-64x64.png | Bin .../main}/resources/ESP8266-96x96.png | Bin .../src => src/main}/resources/abort.png | Bin .../src => src/main}/resources/backup.png | Bin .../main}/resources/backup_delete.png | Bin .../src => src/main}/resources/connect1.png | Bin .../src => src/main}/resources/connect2.png | Bin .../src => src/main}/resources/connect3.png | Bin {ESPlorer/src => src/main}/resources/copy.png | Bin {ESPlorer/src => src/main}/resources/cut.png | Bin .../main}/resources/disconnect1.png | Bin .../main}/resources/disconnect3.png | Bin .../src => src/main}/resources/document.png | Bin .../main}/resources/donate-small.gif | Bin .../src => src/main}/resources/donate.gif | Bin .../src => src/main}/resources/download.png | Bin {ESPlorer/src => src/main}/resources/dump.png | Bin {ESPlorer/src => src/main}/resources/edit.png | Bin .../main}/resources/file manager (delete).png | Bin .../main}/resources/file manager.png | Bin {ESPlorer/src => src/main}/resources/file.png | Bin .../main}/resources/file_remove.png | Bin .../main}/resources/folder closed.png | Bin .../main}/resources/folder open.png | Bin .../main}/resources/folder_open_document.png | Bin {ESPlorer/src => src/main}/resources/get.png | Bin .../main}/resources/information.png | Bin {ESPlorer/src => src/main}/resources/lc.png | Bin .../src => src/main}/resources/led_black.png | Bin .../src => src/main}/resources/led_blue.png | Bin .../src => src/main}/resources/led_green.png | Bin .../src => src/main}/resources/led_grey.png | Bin .../src => src/main}/resources/led_orange.png | Bin .../src => src/main}/resources/led_red.png | Bin .../src => src/main}/resources/led_white.png | Bin .../src => src/main}/resources/led_yellow.png | Bin {ESPlorer/src => src/main}/resources/left.png | Bin .../src => src/main}/resources/level up.png | Bin {ESPlorer/src => src/main}/resources/list.png | Bin src/main/resources/log4j2.xml | 20 + {ESPlorer/src => src/main}/resources/lua.png | Bin .../main}/resources/mnemonic.properties | 0 {ESPlorer/src => src/main}/resources/move.png | Bin .../src => src/main}/resources/paste.png | Bin {ESPlorer/src => src/main}/resources/play.png | Bin .../src => src/main}/resources/redo1.png | Bin .../src => src/main}/resources/refresh.png | Bin .../src => src/main}/resources/refresh3.png | Bin .../src => src/main}/resources/rename.png | Bin .../src => src/main}/resources/reset.png | Bin .../src => src/main}/resources/run_line.png | Bin {ESPlorer/src => src/main}/resources/save.png | Bin .../src => src/main}/resources/save_all.png | Bin .../main}/resources/script (edit).png | Bin .../src => src/main}/resources/script.png | Bin .../main}/resources/script_send.png | Bin .../main}/resources/script_start.png | Bin .../main}/resources/search again.png | Bin .../main}/resources/send_selected.png | Bin .../main}/resources/server1_start.png | Bin {ESPlorer/src => src/main}/resources/set.png | Bin .../src => src/main}/resources/settings1.png | Bin .../src => src/main}/resources/settings2.png | Bin .../main}/resources/terminal_clear.png | Bin .../src => src/main}/resources/transmit.png | Bin .../src => src/main}/resources/trash.png | Bin .../src => src/main}/resources/undo1.png | Bin .../src => src/main}/resources/upload.png | Bin {ESPlorer/src => src/main}/resources/view.png | Bin .../main}/resources/web_server_start.png | Bin {ESPlorer/src => src/main}/resources/wifi.png | Bin .../src => src/main}/resources/wizard.png | Bin .../src => src/main}/resources/zoom in.png | Bin .../src => src/main}/resources/zoom out.png | Bin 509 files changed, 12322 insertions(+), 64776 deletions(-) create mode 100644 .gitattributes create mode 100644 .gitignore delete mode 100644 ESPlorer/_lua/test100lines.lua delete mode 100644 ESPlorer/build.xml delete mode 100644 ESPlorer/manifest.mf delete mode 100644 ESPlorer/nbproject/private/config.properties delete mode 100644 ESPlorer/nbproject/private/profiler/attach.xml delete mode 100644 ESPlorer/nbproject/private/profiler/configurations.xml delete mode 100644 ESPlorer/nbproject/private/profiler/snapshot-1419433859405.nps delete mode 100644 ESPlorer/nbproject/project.xml delete mode 100644 ESPlorer/run/run-dir delete mode 100644 ESPlorer/src/jssc/SerialNativeInterface.java delete mode 100644 ESPlorer/src/jssc/SerialPort.java delete mode 100644 ESPlorer/src/jssc/SerialPortEvent.java delete mode 100644 ESPlorer/src/jssc/SerialPortEventListener.java delete mode 100644 ESPlorer/src/jssc/SerialPortException.java delete mode 100644 ESPlorer/src/jssc/SerialPortList.java delete mode 100644 ESPlorer/src/jssc/SerialPortTimeoutException.java delete mode 100644 ESPlorer/src/libs/linux/libjSSC-2.8_armhf.so delete mode 100644 ESPlorer/src/libs/linux/libjSSC-2.8_armsf.so delete mode 100644 ESPlorer/src/libs/linux/libjSSC-2.8_x86.so delete mode 100644 ESPlorer/src/libs/linux/libjSSC-2.8_x86_64.so delete mode 100644 ESPlorer/src/libs/mac_os_x/libjSSC-2.8_ppc.jnilib delete mode 100644 ESPlorer/src/libs/mac_os_x/libjSSC-2.8_ppc64.jnilib delete mode 100644 ESPlorer/src/libs/mac_os_x/libjSSC-2.8_x86.jnilib delete mode 100644 ESPlorer/src/libs/mac_os_x/libjSSC-2.8_x86_64.jnilib delete mode 100644 ESPlorer/src/libs/solaris/libjSSC-2.8_x86.so delete mode 100644 ESPlorer/src/libs/solaris/libjSSC-2.8_x86_64.so delete mode 100644 ESPlorer/src/libs/windows/jSSC-2.8_x86.dll delete mode 100644 ESPlorer/src/libs/windows/jSSC-2.8_x86_64.dll delete mode 100644 ESPlorer/src/org/fife/io/DocumentReader.java delete mode 100644 ESPlorer/src/org/fife/io/UnicodeReader.java delete mode 100644 ESPlorer/src/org/fife/io/UnicodeWriter.java delete mode 100644 ESPlorer/src/org/fife/io/package.html delete mode 100644 ESPlorer/src/org/fife/print/RPrintUtilities.java delete mode 100644 ESPlorer/src/org/fife/print/package.html delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AbstractCompletion.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AbstractCompletionProvider.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_ar.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_de.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_es.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_fr.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_hu.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_in.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_it.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_ja.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_ko.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_nl.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_pl.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_pt_BR.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_ru.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_tr.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_zh_CN.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow_zh_TW.properties delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompletePopupWindow.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompletion.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompletionEvent.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompletionListener.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/AutoCompletionStyleContext.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/BasicCompletion.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/Completion.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/CompletionCellRenderer.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/CompletionListModel.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/CompletionProvider.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/CompletionProviderBase.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/CompletionXMLParser.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/CompletionXml.dtd delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/DefaultCompletionProvider.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/DelegatingCellRenderer.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/DescWindowCallback.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/EmptyIcon.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/ExternalURLHandler.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/FastListUI.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/FunctionCompletion.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/LanguageAwareCompletionProvider.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/LinkRedirector.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/MarkupTagCompletion.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/OutlineHighlightPainter.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/ParameterChoicesProvider.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletion.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletionChoicesWindow.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletionContext.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletionDescriptionToolTip.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletionInsertionInfo.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/RoundRobinAutoCompletion.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/ShorthandCompletion.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/SizeGrip.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/SortByRelevanceComparator.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/TemplateCompletion.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/TemplatePiece.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/TipUtil.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/Util.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/VariableCompletion.java delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/arrow_left.png delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/arrow_right.png delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/bullet_black.png delete mode 100644 ESPlorer/src/org/fife/ui/autocomplete/osx_sizegrip.png delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/AbstractJFlexCTokenMaker.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/AbstractJFlexTokenMaker.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/AbstractTokenMaker.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/AbstractTokenMakerFactory.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ActiveLineRangeEvent.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ActiveLineRangeListener.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/CodeTemplateManager.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/DefaultOccurrenceMarker.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/DefaultTokenFactory.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ar.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_de.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_es.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_fr.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_hu.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_in.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_it.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ja.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ko.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_nl.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_pl.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_pt_BR.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ru.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_tr.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_zh_CN.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_zh_TW.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/FileFileLocation.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/FoldingAwareIconRowHeader.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/HtmlOccurrenceMarker.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/LinkGenerator.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/LinkGeneratorResult.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/MarkOccurrencesSupport.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/OccurrenceMarker.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/ParserManager.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/PopupWindowDecorator.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSTAView.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextAreaDefaultInputMap.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ar.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_de.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_es.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_fr.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_hu.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_in.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_it.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ja.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ko.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_nl.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_pl.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_pt_BR.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ru.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_tr.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_zh_CN.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_zh_TW.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RTfToText.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RtfGenerator.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/RtfTransferable.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/SelectRegionLinkGeneratorResult.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/Style.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/TextEditorPane.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenFactory.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenImpl.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenIterator.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMaker.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMakerBase.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMakerFactory.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMap.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenOrientedView.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenTypes.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/URLFileLocation.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/VisibleWhitespaceTokenPainter.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/WrappedSyntaxView2.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/XmlOccurrenceMarker.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ar.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_de.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_es.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_fr.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_hu.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_in.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_it.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ja.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ko.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_nl.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_pl.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_pt_BR.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ru.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_tr.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_zh_CN.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_zh_TW.properties delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/SizeGrip.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/TipUtil.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/osx_sizegrip.png delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/package.html delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/CurlyFoldParser.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/Fold.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/FoldCollapser.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/FoldManager.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/FoldParser.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/FoldType.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/JsonFoldParser.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/LatexFoldParser.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/LispFoldParser.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/NsisFoldParser.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/XmlFoldParser.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/package.html delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/AbstractMarkupTokenMaker.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/DtdTokenMaker.flex delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/DtdTokenMaker.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PlainTextTokenMaker.flex delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PlainTextTokenMaker1.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PropertiesFileTokenMaker.flex delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PropertiesFileTokenMaker.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/WindowsBatchTokenMaker.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/XMLTokenMaker.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/package.html delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/package.html delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/AbstractParser.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/DefaultParseResult.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ExtendedHyperlinkListener.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ParseResult.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/Parser.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ParserNotice.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ToolTipInfo.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/XmlParser.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/package.html delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/templates/AbstractCodeTemplate.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/templates/CodeTemplate.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/templates/StaticCodeTemplate.java delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/templates/package.html delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/themes/dark.xml delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/themes/default-alt.xml delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/themes/default.xml delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/themes/eclipse.xml delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/themes/idea.xml delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/themes/theme.dtd delete mode 100644 ESPlorer/src/org/fife/ui/rsyntaxtextarea/themes/vs.xml delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/AbstractGutterComponent.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/BackgroundPainterStrategy.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/BufferedImageBackgroundPainterStrategy.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/ClipboardHistory.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/ClipboardHistoryPopup.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/ColorBackgroundPainterStrategy.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/ConfigurableCaret.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/FoldIndicator.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/GutterIconInfo.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/IconGroup.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/ImageBackgroundPainterStrategy.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/LineHighlightManager.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/LineNumberList.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RDocument.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RDocumentCharSequence.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextAreaHighlighter.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_ar.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_de.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_es.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_fr.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_hu.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_in.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_it.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_ja.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_ko.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_nl.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_pl.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_pt_BR.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_ru.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_tr.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_zh_CN.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RTextArea_zh_TW.properties delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RUndoManager.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RecordableTextAction.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/RegExReplaceInfo.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/SearchContext.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/SearchEngine.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/SmartHighlightPainter.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/ToolTipSupplier.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/VolatileImageBackgroundPainterStrategy.java delete mode 100644 ESPlorer/src/org/fife/ui/rtextarea/package.html delete mode 100644 ESPlorer/src/org/fife/util/package.html delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/AbstractBindingListener.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/AutoBinding.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/BeanProperty.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/Binding.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/BindingGroup.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/BindingListener.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/Bindings.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/Converter.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/ELProperty.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/ObjectProperty.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/Property.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/PropertyHelper.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/PropertyPath.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/PropertyResolutionException.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/PropertyStateEvent.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/PropertyStateListener.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/TempELContext.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/Validator.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/ext/BeanAdapterFactory.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/ext/BeanAdapterProvider.java delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/ext/package.html delete mode 100644 ESPlorer/src/org/jdesktop/beansbinding/package.html delete mode 100644 ESPlorer/src/org/jdesktop/el/ArrayELResolver.java delete mode 100644 ESPlorer/src/org/jdesktop/el/BeanELResolver.java delete mode 100644 ESPlorer/src/org/jdesktop/el/CompositeELResolver.java delete mode 100644 ESPlorer/src/org/jdesktop/el/ELContext.java delete mode 100644 ESPlorer/src/org/jdesktop/el/ELContextEvent.java delete mode 100644 ESPlorer/src/org/jdesktop/el/ELContextListener.java delete mode 100644 ESPlorer/src/org/jdesktop/el/ELException.java delete mode 100644 ESPlorer/src/org/jdesktop/el/ELResolver.java delete mode 100644 ESPlorer/src/org/jdesktop/el/ELUtil.java delete mode 100644 ESPlorer/src/org/jdesktop/el/Expression.java delete mode 100644 ESPlorer/src/org/jdesktop/el/ExpressionFactory.java delete mode 100644 ESPlorer/src/org/jdesktop/el/FunctionMapper.java delete mode 100644 ESPlorer/src/org/jdesktop/el/ListELResolver.java delete mode 100644 ESPlorer/src/org/jdesktop/el/MapELResolver.java delete mode 100644 ESPlorer/src/org/jdesktop/el/MethodExpression.java delete mode 100644 ESPlorer/src/org/jdesktop/el/MethodInfo.java delete mode 100644 ESPlorer/src/org/jdesktop/el/MethodNotFoundException.java delete mode 100644 ESPlorer/src/org/jdesktop/el/PrivateMessages.properties delete mode 100644 ESPlorer/src/org/jdesktop/el/PropertyNotFoundException.java delete mode 100644 ESPlorer/src/org/jdesktop/el/PropertyNotWritableException.java delete mode 100644 ESPlorer/src/org/jdesktop/el/ResourceBundleELResolver.java delete mode 100644 ESPlorer/src/org/jdesktop/el/ValueExpression.java delete mode 100644 ESPlorer/src/org/jdesktop/el/VariableMapper.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/ExpressionFactoryImpl.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/Messages.properties delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/MethodExpressionImpl.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/MethodExpressionLiteral.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/ValueExpressionImpl.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/ValueExpressionLiteral.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/lang/ELArithmetic.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/lang/ELSupport.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/lang/EvaluationContext.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/lang/ExpressionBuilder.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/lang/FunctionMapperFactory.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/lang/FunctionMapperImpl.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/lang/VariableMapperFactory.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/lang/VariableMapperImpl.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/lang/package.html delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/package.html delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/ArithmeticNode.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstAnd.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstBracketSuffix.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstChoice.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstCompositeExpression.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstDeferredExpression.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstDiv.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstDotSuffix.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstDynamicExpression.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstEmpty.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstEqual.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstFalse.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstFloatingPoint.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstFunction.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstGreaterThan.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstGreaterThanEqual.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstIdentifier.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstInteger.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstLessThan.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstLessThanEqual.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstLiteralExpression.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstMinus.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstMod.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstMult.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstNegative.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstNot.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstNotEqual.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstNull.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstOr.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstPlus.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstString.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstTrue.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/AstValue.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/BooleanNode.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/ELParser.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/ELParserConstants.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/ELParserTokenManager.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/ELParserTreeConstants.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/JJTELParserState.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/Node.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/NodeVisitor.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/ParseException.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/SimpleCharStream.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/SimpleNode.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/Token.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/TokenMgrError.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/parser/package.html delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/util/MessageFactory.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/util/ReflectionUtil.java delete mode 100644 ESPlorer/src/org/jdesktop/el/impl/util/package.html delete mode 100644 ESPlorer/src/org/jdesktop/el/package.html delete mode 100644 ESPlorer/src/org/jdesktop/observablecollections/ObservableCollections.java delete mode 100644 ESPlorer/src/org/jdesktop/observablecollections/ObservableList.java delete mode 100644 ESPlorer/src/org/jdesktop/observablecollections/ObservableListListener.java delete mode 100644 ESPlorer/src/org/jdesktop/observablecollections/ObservableMap.java delete mode 100644 ESPlorer/src/org/jdesktop/observablecollections/ObservableMapListener.java delete mode 100644 ESPlorer/src/org/jdesktop/observablecollections/package.html delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/ElementsProperty.java delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/JComboBoxBinding.java delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/JListBinding.java delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/JTableBinding.java delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/SwingBindings.java delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/adapters/AbstractButtonAdapterProvider.java delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/adapters/BeanAdapterBase.java delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/adapters/JComboBoxAdapterProvider.java delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/adapters/JListAdapterProvider.java delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/adapters/JSliderAdapterProvider.java delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/adapters/JSpinnerAdapterProvider.java delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/adapters/JTableAdapterProvider.java delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/adapters/JTextComponentAdapterProvider.java delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/adapters/package.html delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/impl/AbstractColumnBinding.java delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/impl/ListBindingManager.java delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/impl/package.html delete mode 100644 ESPlorer/src/org/jdesktop/swingbinding/package.html create mode 100644 build.gradle rename {ESPlorer/src => dist}/ESPlorer.bat (72%) create mode 100755 dist/ESPlorer.sh create mode 100644 eclipse-settings/org.eclipse.core.resources.prefs create mode 100644 eclipse-settings/org.eclipse.core.runtime.prefs create mode 100644 eclipse-settings/org.eclipse.jdt.core.prefs create mode 100644 eclipse-settings/org.eclipse.jdt.ui.prefs create mode 100644 eclipse-settings/org.eclipse.wst.sse.core.prefs create mode 100644 eclipse-settings/org.eclipse.wst.validation.prefs create mode 100644 eclipse-settings/org.eclipse.wst.xml.core.prefs create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100755 gradlew create mode 100644 gradlew.bat rename ESPlorer/src/ESPlorer/ESPlorer.form => src/main/java/com/github/unafraid/ESPlorer/Main.form (100%) create mode 100644 src/main/java/com/github/unafraid/ESPlorer/Main.java rename {ESPlorer/src => src/main/java}/org/netbeans/lib/awtextra/AbsoluteConstraints.java (100%) rename {ESPlorer/src => src/main/java}/org/netbeans/lib/awtextra/AbsoluteLayout.java (96%) rename {ESPlorer/src => src/main}/resources/AlwaysOnTop.png (100%) rename {ESPlorer/src => src/main}/resources/ESP8266-64x64.png (100%) rename {ESPlorer/src => src/main}/resources/ESP8266-96x96.png (100%) rename {ESPlorer/src => src/main}/resources/abort.png (100%) rename {ESPlorer/src => src/main}/resources/backup.png (100%) rename {ESPlorer/src => src/main}/resources/backup_delete.png (100%) rename {ESPlorer/src => src/main}/resources/connect1.png (100%) rename {ESPlorer/src => src/main}/resources/connect2.png (100%) rename {ESPlorer/src => src/main}/resources/connect3.png (100%) rename {ESPlorer/src => src/main}/resources/copy.png (100%) rename {ESPlorer/src => src/main}/resources/cut.png (100%) rename {ESPlorer/src => src/main}/resources/disconnect1.png (100%) rename {ESPlorer/src => src/main}/resources/disconnect3.png (100%) rename {ESPlorer/src => src/main}/resources/document.png (100%) rename {ESPlorer/src => src/main}/resources/donate-small.gif (100%) rename {ESPlorer/src => src/main}/resources/donate.gif (100%) rename {ESPlorer/src => src/main}/resources/download.png (100%) rename {ESPlorer/src => src/main}/resources/dump.png (100%) rename {ESPlorer/src => src/main}/resources/edit.png (100%) rename {ESPlorer/src => src/main}/resources/file manager (delete).png (100%) rename {ESPlorer/src => src/main}/resources/file manager.png (100%) rename {ESPlorer/src => src/main}/resources/file.png (100%) rename {ESPlorer/src => src/main}/resources/file_remove.png (100%) rename {ESPlorer/src => src/main}/resources/folder closed.png (100%) rename {ESPlorer/src => src/main}/resources/folder open.png (100%) rename {ESPlorer/src => src/main}/resources/folder_open_document.png (100%) rename {ESPlorer/src => src/main}/resources/get.png (100%) rename {ESPlorer/src => src/main}/resources/information.png (100%) rename {ESPlorer/src => src/main}/resources/lc.png (100%) rename {ESPlorer/src => src/main}/resources/led_black.png (100%) rename {ESPlorer/src => src/main}/resources/led_blue.png (100%) rename {ESPlorer/src => src/main}/resources/led_green.png (100%) rename {ESPlorer/src => src/main}/resources/led_grey.png (100%) rename {ESPlorer/src => src/main}/resources/led_orange.png (100%) rename {ESPlorer/src => src/main}/resources/led_red.png (100%) rename {ESPlorer/src => src/main}/resources/led_white.png (100%) rename {ESPlorer/src => src/main}/resources/led_yellow.png (100%) rename {ESPlorer/src => src/main}/resources/left.png (100%) rename {ESPlorer/src => src/main}/resources/level up.png (100%) rename {ESPlorer/src => src/main}/resources/list.png (100%) create mode 100644 src/main/resources/log4j2.xml rename {ESPlorer/src => src/main}/resources/lua.png (100%) rename {ESPlorer/src => src/main}/resources/mnemonic.properties (100%) rename {ESPlorer/src => src/main}/resources/move.png (100%) rename {ESPlorer/src => src/main}/resources/paste.png (100%) rename {ESPlorer/src => src/main}/resources/play.png (100%) rename {ESPlorer/src => src/main}/resources/redo1.png (100%) rename {ESPlorer/src => src/main}/resources/refresh.png (100%) rename {ESPlorer/src => src/main}/resources/refresh3.png (100%) rename {ESPlorer/src => src/main}/resources/rename.png (100%) rename {ESPlorer/src => src/main}/resources/reset.png (100%) rename {ESPlorer/src => src/main}/resources/run_line.png (100%) rename {ESPlorer/src => src/main}/resources/save.png (100%) rename {ESPlorer/src => src/main}/resources/save_all.png (100%) rename {ESPlorer/src => src/main}/resources/script (edit).png (100%) rename {ESPlorer/src => src/main}/resources/script.png (100%) rename {ESPlorer/src => src/main}/resources/script_send.png (100%) rename {ESPlorer/src => src/main}/resources/script_start.png (100%) rename {ESPlorer/src => src/main}/resources/search again.png (100%) rename {ESPlorer/src => src/main}/resources/send_selected.png (100%) rename {ESPlorer/src => src/main}/resources/server1_start.png (100%) rename {ESPlorer/src => src/main}/resources/set.png (100%) rename {ESPlorer/src => src/main}/resources/settings1.png (100%) rename {ESPlorer/src => src/main}/resources/settings2.png (100%) rename {ESPlorer/src => src/main}/resources/terminal_clear.png (100%) rename {ESPlorer/src => src/main}/resources/transmit.png (100%) rename {ESPlorer/src => src/main}/resources/trash.png (100%) rename {ESPlorer/src => src/main}/resources/undo1.png (100%) rename {ESPlorer/src => src/main}/resources/upload.png (100%) rename {ESPlorer/src => src/main}/resources/view.png (100%) rename {ESPlorer/src => src/main}/resources/web_server_start.png (100%) rename {ESPlorer/src => src/main}/resources/wifi.png (100%) rename {ESPlorer/src => src/main}/resources/wizard.png (100%) rename {ESPlorer/src => src/main}/resources/zoom in.png (100%) rename {ESPlorer/src => src/main}/resources/zoom out.png (100%) diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6f8d729 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,11 @@ +# Set the default behavior, in case people don't have core.autocrlf set. +* text=auto + +# Explicitly declare text files you want to always be normalized and converted +# to native line endings on checkout. +*.java text +*.xml text +*.properties text + +# SH files must always use LF. +*.sh eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6aab8ef --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +# Eclipse +.classpath +.project +.settings +.metadata +bin/ +/.recommenders/ + +# Idea +*.iml +/.idea/ + +# Gradle +/.gradle/ +*/build/ + + +.DS_Store +.directory +*.log + +/log/ +/build/ \ No newline at end of file diff --git a/ESPlorer/_lua/test100lines.lua b/ESPlorer/_lua/test100lines.lua deleted file mode 100644 index c9b3746..0000000 --- a/ESPlorer/_lua/test100lines.lua +++ /dev/null @@ -1,100 +0,0 @@ -print("This is line number 1") -print("This is line number 2") -print("This is line number 3") -print("This is line number 4") -print("This is line number 5") -print("This is line number 6") -print("This is line number 7") -print("This is line number 8") -print("This is line number 9") -print("This is line number 10") -print("This is line number 11") -print("This is line number 12") -print("This is line number 13") -print("This is line number 14") -print("This is line number 15") -print("This is line number 16") -print("This is line number 17") -print("This is line number 18") -print("This is line number 19") -print("This is line number 20") -print("This is line number 21") -print("This is line number 22") -print("This is line number 23") -print("This is line number 24") -print("This is line number 25") -print("This is line number 26") -print("This is line number 27") -print("This is line number 28") -print("This is line number 29") -print("This is line number 30") -print("This is line number 31") -print("This is line number 32") -print("This is line number 33") -print("This is line number 34") -print("This is line number 35") -print("This is line number 36") -print("This is line number 37") -print("This is line number 38") -print("This is line number 39") -print("This is line number 40") -print("This is line number 41") -print("This is line number 42") -print("This is line number 43") -print("This is line number 44") -print("This is line number 45") -print("This is line number 46") -print("This is line number 47") -print("This is line number 48") -print("This is line number 49") -print("This is line number 50") -print("This is line number 51") -print("This is line number 52") -print("This is line number 53") -print("This is line number 54") -print("This is line number 55") -print("This is line number 56") -print("This is line number 57") -print("This is line number 58") -print("This is line number 59") -print("This is line number 60") -print("This is line number 61") -print("This is line number 62") -print("This is line number 63") -print("This is line number 64") -print("This is line number 65") -print("This is line number 66") -print("This is line number 67") -print("This is line number 68") -print("This is line number 69") -print("This is line number 70") -print("This is line number 71") -print("This is line number 72") -print("This is line number 73") -print("This is line number 74") -print("This is line number 75") -print("This is line number 76") -print("This is line number 77") -print("This is line number 78") -print("This is line number 79") -print("This is line number 80") -print("This is line number 81") -print("This is line number 82") -print("This is line number 83") -print("This is line number 84") -print("This is line number 85") -print("This is line number 86") -print("This is line number 87") -print("This is line number 88") -print("This is line number 89") -print("This is line number 90") -print("This is line number 91") -print("This is line number 92") -print("This is line number 93") -print("This is line number 94") -print("This is line number 95") -print("This is line number 96") -print("This is line number 97") -print("This is line number 98") -print("This is line number 99") -print("This is line number 100") diff --git a/ESPlorer/build.xml b/ESPlorer/build.xml deleted file mode 100644 index 8215e0c..0000000 --- a/ESPlorer/build.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - Builds, tests, and runs the project ESPlorer. - - - diff --git a/ESPlorer/manifest.mf b/ESPlorer/manifest.mf deleted file mode 100644 index 328e8e5..0000000 --- a/ESPlorer/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/ESPlorer/nbproject/private/config.properties b/ESPlorer/nbproject/private/config.properties deleted file mode 100644 index e69de29..0000000 diff --git a/ESPlorer/nbproject/private/profiler/attach.xml b/ESPlorer/nbproject/private/profiler/attach.xml deleted file mode 100644 index dcaafc3..0000000 --- a/ESPlorer/nbproject/private/profiler/attach.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - -false -Приложение Java -Windows, 64bit JVM -true -false -Приложение Java - - diff --git a/ESPlorer/nbproject/private/profiler/configurations.xml b/ESPlorer/nbproject/private/profiler/configurations.xml deleted file mode 100644 index e7a7b09..0000000 --- a/ESPlorer/nbproject/private/profiler/configurations.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - -1000 -false -profiler.simple.filter -false - -8 -true - -10 -false -false -0 -false -true -2 -false -false -false -profiler.simple.filter -32 -false -1 -true -3 -10 -1 -true -Анализ памяти -false -10 -1 -true -10 -0 -profiler.simple.filter -0 -false -true - - -1 -true - - -false -10 -false -true -false -false -32 -Быстрый фильтр... -false -0 -false -0 - -10 -0 -true -true - -true -10 - -1000 -0 -profiler.simple.filter -false -Анализ производительности - -1 -0 - -0 -false -profiler.simple.filter -Быстрый фильтр... -true -false -0 -true - -0 -false -32 - -0 -false -Профилировать все классы -0 -0 -profiler.simple.filter -true -1 -10 -false -false -10 -false -true -false -false -Быстрый фильтр... -0 -false - -128 -Наблюдение за приложением -1000 -false -true - diff --git a/ESPlorer/nbproject/private/profiler/snapshot-1419433859405.nps b/ESPlorer/nbproject/private/profiler/snapshot-1419433859405.nps deleted file mode 100644 index bed485a15d9aa19c2da5f998970ffaf8db8452c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30036 zcmV(tKfG7!)H~}Ug2ACNKK>!1j1Rfwk1O!1E$RE)JNZGlLaX|m$;FoE0qxf|-ZarwH4ZPg_q+W%q zM%Ad%j+?FGjhS@oemb3QPvJM^X8I6rLS6Ngev*ZHJKm5#{hw>W0RO4ePHM$FaiyJ# zUq0UtKFNAQ{%q5ob~~+?qlBGLUg(G5EIi&;(y9~}qfWiD88^dg5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lorer/run/run-dir deleted file mode 100644 index e69de29..0000000 diff --git a/ESPlorer/src/jssc/SerialNativeInterface.java b/ESPlorer/src/jssc/SerialNativeInterface.java deleted file mode 100644 index c5264f5..0000000 --- a/ESPlorer/src/jssc/SerialNativeInterface.java +++ /dev/null @@ -1,486 +0,0 @@ -/* jSSC (Java Simple Serial Connector) - serial port communication library. - * © Alexey Sokolov (scream3r), 2010-2014. - * - * This file is part of jSSC. - * - * jSSC is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * jSSC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with jSSC. If not, see . - * - * If you use jSSC in public project you can inform me about this by e-mail, - * of course if you want it. - * - * e-mail: scream3r.org@gmail.com - * web-site: http://scream3r.org | http://code.google.com/p/java-simple-serial-connector/ - */ -package jssc; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.io.InputStreamReader; - -/** - * - * @author scream3r - */ -public class SerialNativeInterface { - - private static final String libVersion = "2.8"; //jSSC-2.8.0 Release from 24.01.2014 - private static final String libMinorSuffix = "0"; //since 0.9.0 - - public static final int OS_LINUX = 0; - public static final int OS_WINDOWS = 1; - public static final int OS_SOLARIS = 2;//since 0.9.0 - public static final int OS_MAC_OS_X = 3;//since 0.9.0 - - private static int osType = -1; - - /** - * @since 2.3.0 - */ - public static final long ERR_PORT_BUSY = -1; - /** - * @since 2.3.0 - */ - public static final long ERR_PORT_NOT_FOUND = -2; - /** - * @since 2.3.0 - */ - public static final long ERR_PERMISSION_DENIED = -3; - /** - * @since 2.3.0 - */ - public static final long ERR_INCORRECT_SERIAL_PORT = -4; - - /** - * @since 2.6.0 - */ - public static final String PROPERTY_JSSC_NO_TIOCEXCL = "JSSC_NO_TIOCEXCL"; - /** - * @since 2.6.0 - */ - public static final String PROPERTY_JSSC_IGNPAR = "JSSC_IGNPAR"; - /** - * @since 2.6.0 - */ - public static final String PROPERTY_JSSC_PARMRK = "JSSC_PARMRK"; - - static { - String libFolderPath; - String libName; - - String osName = System.getProperty("os.name"); - String architecture = System.getProperty("os.arch"); - String userHome = System.getProperty("user.home"); - String fileSeparator = System.getProperty("file.separator"); - String tmpFolder = System.getProperty("java.io.tmpdir"); - - //since 2.3.0 -> - String libRootFolder = new File(userHome).canWrite() ? userHome : tmpFolder; - //<- since 2.3.0 - - String javaLibPath = System.getProperty("java.library.path");//since 2.1.0 - - if(osName.equals("Linux")){ - osName = "linux"; - osType = OS_LINUX; - } - else if(osName.startsWith("Win")){ - osName = "windows"; - osType = OS_WINDOWS; - }//since 0.9.0 -> - else if(osName.equals("SunOS")){ - osName = "solaris"; - osType = OS_SOLARIS; - } - else if(osName.equals("Mac OS X") || osName.equals("Darwin")){//os.name "Darwin" since 2.6.0 - osName = "mac_os_x"; - osType = OS_MAC_OS_X; - }//<- since 0.9.0 - - if(architecture.equals("i386") || architecture.equals("i686")){ - architecture = "x86"; - } - else if(architecture.equals("amd64") || architecture.equals("universal")){//os.arch "universal" since 2.6.0 - architecture = "x86_64"; - } - else if(architecture.equals("arm")) {//since 2.1.0 - String floatStr = "sf"; - if(javaLibPath.toLowerCase().contains("gnueabihf") || javaLibPath.toLowerCase().contains("armhf")){ - floatStr = "hf"; - } - else { - try { - Process readelfProcess = Runtime.getRuntime().exec("readelf -A /proc/self/exe"); - BufferedReader reader = new BufferedReader(new InputStreamReader(readelfProcess.getInputStream())); - String buffer = ""; - while((buffer = reader.readLine()) != null && !buffer.isEmpty()){ - if(buffer.toLowerCase().contains("Tag_ABI_VFP_args".toLowerCase())){ - floatStr = "hf"; - break; - } - } - reader.close(); - } - catch (Exception ex) { - //Do nothing - } - } - architecture = "arm" + floatStr; - } - - libFolderPath = libRootFolder + fileSeparator + ".jssc" + fileSeparator + osName; - libName = "jSSC-" + libVersion + "_" + architecture; - libName = System.mapLibraryName(libName); - - if(libName.endsWith(".dylib")){//Since 2.1.0 MacOSX 10.8 fix - libName = libName.replace(".dylib", ".jnilib"); - } - - boolean loadLib = false; - - if(isLibFolderExist(libFolderPath)){ - if(isLibFileExist(libFolderPath + fileSeparator + libName)){ - loadLib = true; - } - else { - if(extractLib((libFolderPath + fileSeparator + libName), osName, libName)){ - loadLib = true; - } - } - } - else { - if(new File(libFolderPath).mkdirs()){ - if(extractLib((libFolderPath + fileSeparator + libName), osName, libName)){ - loadLib = true; - } - } - } - - if (loadLib) { - System.load(libFolderPath + fileSeparator + libName); - String versionBase = getLibraryBaseVersion(); - String versionNative = getNativeLibraryVersion(); - if (!versionBase.equals(versionNative)) { - System.err.println("Warning! jSSC Java and Native versions mismatch (Java: " + versionBase + ", Native: " + versionNative + ")"); - } - } - } - - /** - * Is library folder exists - * - * @param libFolderPath - * - * @since 0.8 - */ - private static boolean isLibFolderExist(String libFolderPath) { - boolean returnValue = false; - File folder = new File(libFolderPath); - if(folder.exists() && folder.isDirectory()){ - returnValue = true; - } - return returnValue; - } - - /** - * Is library file exists - * - * @param libFilePath - * - * @since 0.8 - */ - private static boolean isLibFileExist(String libFilePath) { - boolean returnValue = false; - File folder = new File(libFilePath); - if(folder.exists() && folder.isFile()){ - returnValue = true; - } - return returnValue; - } - - /** - * Extract lib to lib folder - * - * @param libFilePath - * @param osName - * @param libName - * - * @since 0.8 - */ - private static boolean extractLib(String libFilePath, String osName, String libName) { - boolean returnValue = false; - File libFile = new File(libFilePath); - InputStream input = null; - FileOutputStream output = null; - input = SerialNativeInterface.class.getResourceAsStream("/libs/" + osName + "/" + libName); - if(input != null){ - int read; - byte[] buffer = new byte[4096]; - try { - output = new FileOutputStream(libFilePath); - while((read = input.read(buffer)) != -1){ - output.write(buffer, 0, read); - } - output.close(); - input.close(); - returnValue = true; - } - catch (Exception ex) { - try { - output.close(); - if(libFile.exists()){ - libFile.delete(); - } - } - catch (Exception ex_out) { - //Do nothing - } - try { - input.close(); - } - catch (Exception ex_in) { - //Do nothing - } - } - } - return returnValue; - } - - /** - * Get OS type (OS_LINUX || OS_WINDOWS || OS_SOLARIS) - * - * @since 0.8 - */ - public static int getOsType() { - return osType; - } - - /** - * Get jSSC version. The version of library is Base Version + Minor Suffix - * - * @since 0.8 - */ - public static String getLibraryVersion() { - return libVersion + "." + libMinorSuffix; - } - - /** - * Get jSSC Base Version - * - * @since 0.9.0 - */ - public static String getLibraryBaseVersion() { - return libVersion; - } - - /** - * Get jSSC minor suffix. For example in version 0.8.1 - 1 is a minor suffix - * - * @since 0.9.0 - */ - public static String getLibraryMinorSuffix() { - return libMinorSuffix; - } - - /** - * Get jSSC native library version - * - * @return native lib version (for jSSC-2.8.0 should be 2.8 for example) - * - * @since 2.8.0 - */ - public static native String getNativeLibraryVersion(); - - /** - * Open port - * - * @param portName name of port for opening - * @param useTIOCEXCL enable/disable using of TIOCEXCL. Take effect only on *nix based systems - * - * @return handle of opened port or -1 if opening of the port was unsuccessful - */ - public native long openPort(String portName, boolean useTIOCEXCL); - - /** - * Setting the parameters of opened port - * - * @param handle handle of opened port - * @param baudRate data transfer rate - * @param dataBits number of data bits - * @param stopBits number of stop bits - * @param parity parity - * @param setRTS initial state of RTS line (ON/OFF) - * @param setDTR initial state of DTR line (ON/OFF) - * @param flags additional Native settings. Take effect only on *nix based systems - * - * @return If the operation is successfully completed, the method returns true, otherwise false - */ - public native boolean setParams(long handle, int baudRate, int dataBits, int stopBits, int parity, boolean setRTS, boolean setDTR, int flags); - - /** - * Purge of input and output buffer - * - * @param handle handle of opened port - * @param flags flags specifying required actions for purgePort method - * - * @return If the operation is successfully completed, the method returns true, otherwise false - */ - public native boolean purgePort(long handle, int flags); - - /** - * Close port - * - * @param handle handle of opened port - * - * @return If the operation is successfully completed, the method returns true, otherwise false - */ - public native boolean closePort(long handle); - - /** - * Set events mask - * - * @param handle handle of opened port - * @param mask events mask - * - * @return If the operation is successfully completed, the method returns true, otherwise false - */ - public native boolean setEventsMask(long handle, int mask); - - /** - * Get events mask - * - * @param handle handle of opened port - * - * @return Method returns event mask as a variable of int type - */ - public native int getEventsMask(long handle); - - /** - * Wait events - * - * @param handle handle of opened port - * - * @return Method returns two-dimensional array containing event types and their values - * (events[i][0] - event type, events[i][1] - event value). - */ - public native int[][] waitEvents(long handle); - - /** - * Change RTS line state - * - * @param handle handle of opened port - * @param value true - ON, false - OFF - * - * @return If the operation is successfully completed, the method returns true, otherwise false - */ - public native boolean setRTS(long handle, boolean value); - - /** - * Change DTR line state - * - * @param handle handle of opened port - * @param value true - ON, false - OFF - * - * @return If the operation is successfully completed, the method returns true, otherwise false - */ - public native boolean setDTR(long handle, boolean value); - - /** - * Read data from port - * - * @param handle handle of opened port - * @param byteCount count of bytes required to read - * - * @return Method returns the array of read bytes - */ - public native byte[] readBytes(long handle, int byteCount); - - /** - * Write data to port - * - * @param handle handle of opened port - * @param buffer array of bytes to write - * - * @return If the operation is successfully completed, the method returns true, otherwise false - */ - public native boolean writeBytes(long handle, byte[] buffer); - - /** - * Get bytes count in buffers of port - * - * @param handle handle of opened port - * - * @return Method returns the array that contains info about bytes count in buffers: - *
element 0 - input buffer
- *
element 1 - output buffer
- * - * @since 0.8 - */ - public native int[] getBuffersBytesCount(long handle); - - /** - * Set flow control mode - * - * @param handle handle of opened port - * @param mask mask of flow control mode - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @since 0.8 - */ - public native boolean setFlowControlMode(long handle, int mask); - - /** - * Get flow control mode - * - * @param handle handle of opened port - * - * @return Mask of setted flow control mode - * - * @since 0.8 - */ - public native int getFlowControlMode(long handle); - - /** - * Get serial port names like an array of String - * - * @return unsorted array of String with port names - */ - public native String[] getSerialPortNames(); - - /** - * Getting lines states - * - * @param handle handle of opened port - * - * @return Method returns the array containing information about lines in following order: - *
element 0 - CTS line state
- *
element 1 - DSR line state
- *
element 2 - RING line state
- *
element 3 - RLSD line state
- */ - public native int[] getLinesStatus(long handle); - - /** - * Send Break singnal for setted duration - * - * @param handle handle of opened port - * @param duration duration of Break signal - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @since 0.8 - */ - public native boolean sendBreak(long handle, int duration); -} diff --git a/ESPlorer/src/jssc/SerialPort.java b/ESPlorer/src/jssc/SerialPort.java deleted file mode 100644 index e5f43b4..0000000 --- a/ESPlorer/src/jssc/SerialPort.java +++ /dev/null @@ -1,1313 +0,0 @@ -/* jSSC (Java Simple Serial Connector) - serial port communication library. - * © Alexey Sokolov (scream3r), 2010-2014. - * - * This file is part of jSSC. - * - * jSSC is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * jSSC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with jSSC. If not, see . - * - * If you use jSSC in public project you can inform me about this by e-mail, - * of course if you want it. - * - * e-mail: scream3r.org@gmail.com - * web-site: http://scream3r.org | http://code.google.com/p/java-simple-serial-connector/ - */ -package jssc; - -import java.io.UnsupportedEncodingException; -import java.lang.reflect.Method; -import java.nio.charset.Charset; - -/** - * - * @author scream3r - */ -public class SerialPort { - - private SerialNativeInterface serialInterface; - private SerialPortEventListener eventListener; - private long portHandle; - private String portName; - private boolean portOpened = false; - private boolean maskAssigned = false; - private boolean eventListenerAdded = false; - - //since 2.2.0 -> - private Method methodErrorOccurred = null; - //<- since 2.2.0 - - public static final int BAUDRATE_110 = 110; - public static final int BAUDRATE_300 = 300; - public static final int BAUDRATE_600 = 600; - public static final int BAUDRATE_1200 = 1200; - public static final int BAUDRATE_4800 = 4800; - public static final int BAUDRATE_9600 = 9600; - public static final int BAUDRATE_14400 = 14400; - public static final int BAUDRATE_19200 = 19200; - public static final int BAUDRATE_38400 = 38400; - public static final int BAUDRATE_57600 = 57600; - public static final int BAUDRATE_115200 = 115200; - public static final int BAUDRATE_128000 = 128000; - public static final int BAUDRATE_256000 = 256000; - - - public static final int DATABITS_5 = 5; - public static final int DATABITS_6 = 6; - public static final int DATABITS_7 = 7; - public static final int DATABITS_8 = 8; - - - public static final int STOPBITS_1 = 1; - public static final int STOPBITS_2 = 2; - public static final int STOPBITS_1_5 = 3; - - - public static final int PARITY_NONE = 0; - public static final int PARITY_ODD = 1; - public static final int PARITY_EVEN = 2; - public static final int PARITY_MARK = 3; - public static final int PARITY_SPACE = 4; - - - public static final int PURGE_RXABORT = 0x0002; - public static final int PURGE_RXCLEAR = 0x0008; - public static final int PURGE_TXABORT = 0x0001; - public static final int PURGE_TXCLEAR = 0x0004; - - - public static final int MASK_RXCHAR = 1; - public static final int MASK_RXFLAG = 2; - public static final int MASK_TXEMPTY = 4; - public static final int MASK_CTS = 8; - public static final int MASK_DSR = 16; - public static final int MASK_RLSD = 32; - public static final int MASK_BREAK = 64; - public static final int MASK_ERR = 128; - public static final int MASK_RING = 256; - - - //since 0.8 -> - public static final int FLOWCONTROL_NONE = 0; - public static final int FLOWCONTROL_RTSCTS_IN = 1; - public static final int FLOWCONTROL_RTSCTS_OUT = 2; - public static final int FLOWCONTROL_XONXOFF_IN = 4; - public static final int FLOWCONTROL_XONXOFF_OUT = 8; - //<- since 0.8 - - //since 0.8 -> - public static final int ERROR_FRAME = 0x0008; - public static final int ERROR_OVERRUN = 0x0002; - public static final int ERROR_PARITY = 0x0004; - //<- since 0.8 - - //since 2.6.0 -> - private static final int PARAMS_FLAG_IGNPAR = 1; - private static final int PARAMS_FLAG_PARMRK = 2; - //<- since 2.6.0 - - public SerialPort(String portName) { - this.portName = portName; - serialInterface = new SerialNativeInterface(); - } - - /** - * Getting port name under operation - * - * @return Method returns port name under operation as a String - */ - public String getPortName(){ - return portName; - } - - /** - * Getting port state - * - * @return Method returns true if port is open, otherwise false - */ - public boolean isOpened() { - return portOpened; - } - - /** - * Port opening - *

- * Note: If port busy TYPE_PORT_BUSY exception will be thrown. - * If port not found TYPE_PORT_NOT_FOUND exception will be thrown. - * - * @return If the operation is successfully completed, the method returns true - * - * @throws SerialPortException - */ - public boolean openPort() throws SerialPortException { - if(portOpened){ - throw new SerialPortException(portName, "openPort()", SerialPortException.TYPE_PORT_ALREADY_OPENED); - } - if(portName != null){ - boolean useTIOCEXCL = (System.getProperty(SerialNativeInterface.PROPERTY_JSSC_NO_TIOCEXCL) == null && - System.getProperty(SerialNativeInterface.PROPERTY_JSSC_NO_TIOCEXCL.toLowerCase()) == null); - portHandle = serialInterface.openPort(portName, useTIOCEXCL);//since 2.3.0 -> (if JSSC_NO_TIOCEXCL defined, exclusive lock for serial port will be disabled) - } - else { - throw new SerialPortException(portName, "openPort()", SerialPortException.TYPE_NULL_NOT_PERMITTED);//since 2.1.0 -> NULL port name fix - } - if(portHandle == SerialNativeInterface.ERR_PORT_BUSY){ - throw new SerialPortException(portName, "openPort()", SerialPortException.TYPE_PORT_BUSY); - } - else if(portHandle == SerialNativeInterface.ERR_PORT_NOT_FOUND){ - throw new SerialPortException(portName, "openPort()", SerialPortException.TYPE_PORT_NOT_FOUND); - } - else if(portHandle == SerialNativeInterface.ERR_PERMISSION_DENIED){ - throw new SerialPortException(portName, "openPort()", SerialPortException.TYPE_PERMISSION_DENIED); - } - else if(portHandle == SerialNativeInterface.ERR_INCORRECT_SERIAL_PORT){ - throw new SerialPortException(portName, "openPort()", SerialPortException.TYPE_INCORRECT_SERIAL_PORT); - } - portOpened = true; - return true; - } - - /** - * Setting the parameters of port. RTS and DTR lines are enabled by default - * - * @param baudRate data transfer rate - * @param dataBits number of data bits - * @param stopBits number of stop bits - * @param parity parity - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @throws SerialPortException - */ - public boolean setParams(int baudRate, int dataBits, int stopBits, int parity) throws SerialPortException { - return setParams(baudRate, dataBits, stopBits, parity, true, true); - } - - /** - * Setting the parameters of port - * - * @param baudRate data transfer rate - * @param dataBits number of data bits - * @param stopBits number of stop bits - * @param parity parity - * @param setRTS initial state of RTS line(ON/OFF) - * @param setDTR initial state of DTR line(ON/OFF) - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @throws SerialPortException - * - * @since 0.8 - */ - public boolean setParams(int baudRate, int dataBits, int stopBits, int parity, boolean setRTS, boolean setDTR) throws SerialPortException { - checkPortOpened("setParams()"); - if(stopBits == 1){ - stopBits = 0; - } - else if(stopBits == 3){ - stopBits = 1; - } - int flags = 0; - if(System.getProperty(SerialNativeInterface.PROPERTY_JSSC_IGNPAR) != null || System.getProperty(SerialNativeInterface.PROPERTY_JSSC_IGNPAR.toLowerCase()) != null){ - flags |= PARAMS_FLAG_IGNPAR; - } - if(System.getProperty(SerialNativeInterface.PROPERTY_JSSC_PARMRK) != null || System.getProperty(SerialNativeInterface.PROPERTY_JSSC_PARMRK.toLowerCase()) != null){ - flags |= PARAMS_FLAG_PARMRK; - } - return serialInterface.setParams(portHandle, baudRate, dataBits, stopBits, parity, setRTS, setDTR, flags); - } - - /** - * Purge of input and output buffer. Required flags shall be sent to the input. Variables with prefix - * "PURGE_", for example "PURGE_RXCLEAR". Sent parameter "flags" is additive value, - * so addition of flags is allowed. For example, if input or output buffer shall be purged, - * parameter "PURGE_RXCLEAR | PURGE_TXCLEAR". - *
Note: some devices or drivers may not support this function - * - * @return If the operation is successfully completed, the method returns true, otherwise false. - * - * @throws SerialPortException - */ - public boolean purgePort(int flags) throws SerialPortException { - checkPortOpened("purgePort()"); - return serialInterface.purgePort(portHandle, flags); - } - - /** - * Events mask for Linux OS - * - * @since 0.8 - */ - private int linuxMask; - - /** - * Set events mask. Required flags shall be sent to the input. Variables with prefix - * "MASK_", shall be used as flags, for example "MASK_RXCHAR". - * Sent parameter "mask" is additive value, so addition of flags is allowed. - * For example if messages about data receipt and CTS and DSR status changing - * shall be received, it is required to set the mask - "MASK_RXCHAR | MASK_CTS | MASK_DSR" - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @throws SerialPortException - */ - public boolean setEventsMask(int mask) throws SerialPortException { - checkPortOpened("setEventsMask()"); - if(SerialNativeInterface.getOsType() == SerialNativeInterface.OS_LINUX || - SerialNativeInterface.getOsType() == SerialNativeInterface.OS_SOLARIS || - SerialNativeInterface.getOsType() == SerialNativeInterface.OS_MAC_OS_X){//since 0.9.0 - linuxMask = mask; - if(mask > 0){ - maskAssigned = true; - } - else { - maskAssigned = false; - } - return true; - } - boolean returnValue = serialInterface.setEventsMask(portHandle, mask); - if(!returnValue){ - throw new SerialPortException(portName, "setEventsMask()", SerialPortException.TYPE_CANT_SET_MASK); - } - if(mask > 0){ - maskAssigned = true; - } - else { - maskAssigned = false; - } - return returnValue; - } - - /** - * Getting events mask for the port - * - * @return Method returns events mask as int type variable. This variable is an additive value - * - * @throws SerialPortException - */ - public int getEventsMask() throws SerialPortException { - checkPortOpened("getEventsMask()"); - if(SerialNativeInterface.getOsType() == SerialNativeInterface.OS_LINUX || - SerialNativeInterface.getOsType() == SerialNativeInterface.OS_SOLARIS || - SerialNativeInterface.getOsType() == SerialNativeInterface.OS_MAC_OS_X){//since 0.9.0 - return linuxMask; - } - return serialInterface.getEventsMask(portHandle); - } - - /** - * Getting events mask for the port is Linux OS (for internal use) - * - * @since 0.8 - */ - private int getLinuxMask() { - return linuxMask; - } - - /** - * Change RTS line state. Set "true" for switching ON and "false" for switching OFF RTS line - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @throws SerialPortException - */ - public boolean setRTS(boolean enabled) throws SerialPortException { - checkPortOpened("setRTS()"); - return serialInterface.setRTS(portHandle, enabled); - } - - /** - * Change DTR line state. Set "true" for switching ON and "false" for switching OFF DTR line - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @throws SerialPortException - */ - public boolean setDTR(boolean enabled) throws SerialPortException { - checkPortOpened("setDTR()"); - return serialInterface.setDTR(portHandle, enabled); - } - - /** - * Write byte array to port - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @throws SerialPortException - */ - public boolean writeBytes(byte[] buffer) throws SerialPortException { - checkPortOpened("writeBytes()"); - return serialInterface.writeBytes(portHandle, buffer); - } - - /** - * Write single byte to port - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @throws SerialPortException - * - * @since 0.8 - */ - public boolean writeByte(byte singleByte) throws SerialPortException { - checkPortOpened("writeByte()"); - return writeBytes(new byte[]{singleByte}); - } - - /** - * Write String to port - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @throws SerialPortException - * - * @since 0.8 - */ - public boolean writeString(String string) throws SerialPortException { - checkPortOpened("writeString()"); - return writeBytes(string.getBytes()); - } - - /** - * Write String to port - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @throws SerialPortException - * - * @since 2.8.0 - */ - public boolean writeString(String string, String charsetName) throws SerialPortException, UnsupportedEncodingException { - checkPortOpened("writeString()"); - return writeBytes(string.getBytes(charsetName)); - } - - /** - * Write int value (in range from 0 to 255 (0x00 - 0xFF)) to port - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @throws SerialPortException - * - * @since 0.8 - */ - public boolean writeInt(int singleInt) throws SerialPortException { - checkPortOpened("writeInt()"); - return writeBytes(new byte[]{(byte)singleInt}); - } - - /** - * Write int array (in range from 0 to 255 (0x00 - 0xFF)) to port - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @throws SerialPortException - * - * @since 0.8 - */ - public boolean writeIntArray(int[] buffer) throws SerialPortException { - checkPortOpened("writeIntArray()"); - byte[] byteArray = new byte[buffer.length]; - for(int i = 0; i < buffer.length; i++){ - byteArray[i] = (byte)buffer[i]; - } - return writeBytes(byteArray); - } - - /** - * Read byte array from port - * - * @param byteCount count of bytes for reading - * - * @return byte array with "byteCount" length - * - * @throws SerialPortException - */ - public byte[] readBytes(int byteCount) throws SerialPortException { - checkPortOpened("readBytes()"); - return serialInterface.readBytes(portHandle, byteCount); - } - - /** - * Read string from port - * - * @param byteCount count of bytes for reading - * - * @return byte array with "byteCount" length converted to String - * - * @throws SerialPortException - * - * @since 0.8 - */ - public String readString(int byteCount) throws SerialPortException { - checkPortOpened("readString()"); - return new String(readBytes(byteCount)); - } - - /** - * Read Hex string from port (example: FF 0A FF). Separator by default is a space - * - * @param byteCount count of bytes for reading - * - * @return byte array with "byteCount" length converted to Hexadecimal String - * - * @throws SerialPortException - * - * @since 0.8 - */ - public String readHexString(int byteCount) throws SerialPortException { - checkPortOpened("readHexString()"); - return readHexString(byteCount, " "); - } - - /** - * Read Hex string from port with setted separator (example if separator is "::": FF::0A::FF) - * - * @param byteCount count of bytes for reading - * - * @return byte array with "byteCount" length converted to Hexadecimal String - * - * @throws SerialPortException - * - * @since 0.8 - */ - public String readHexString(int byteCount, String separator) throws SerialPortException { - checkPortOpened("readHexString()"); - String[] strBuffer = readHexStringArray(byteCount); - String returnString = ""; - boolean insertSeparator = false; - for(String value : strBuffer){ - if(insertSeparator){ - returnString += separator; - } - returnString += value; - insertSeparator = true; - } - return returnString; - } - - /** - * Read Hex String array from port - * - * @param byteCount count of bytes for reading - * - * @return String array with "byteCount" length and Hexadecimal String values - * - * @throws SerialPortException - * - * @since 0.8 - */ - public String[] readHexStringArray(int byteCount) throws SerialPortException { - checkPortOpened("readHexStringArray()"); - int[] intBuffer = readIntArray(byteCount); - String[] strBuffer = new String[intBuffer.length]; - for(int i = 0; i < intBuffer.length; i++){ - String value = Integer.toHexString(intBuffer[i]).toUpperCase(); - if(value.length() == 1) { - value = "0" + value; - } - strBuffer[i] = value; - } - return strBuffer; - } - - /** - * Read int array from port - * - * @param byteCount count of bytes for reading - * - * @return int array with values in range from 0 to 255 - * - * @throws SerialPortException - * - * @since 0.8 - */ - public int[] readIntArray(int byteCount) throws SerialPortException { - checkPortOpened("readIntArray()"); - byte[] buffer = readBytes(byteCount); - int[] intBuffer = new int[buffer.length]; - for(int i = 0; i < buffer.length; i++){ - if(buffer[i] < 0){ - intBuffer[i] = 256 + buffer[i]; - } - else { - intBuffer[i] = buffer[i]; - } - } - return intBuffer; - } - - private void waitBytesWithTimeout(String methodName, int byteCount, int timeout) throws SerialPortException, SerialPortTimeoutException { - checkPortOpened("waitBytesWithTimeout()"); - boolean timeIsOut = true; - long startTime = System.currentTimeMillis(); - while((System.currentTimeMillis() - startTime) < timeout){ - if(getInputBufferBytesCount() >= byteCount){ - timeIsOut = false; - break; - } - try { - Thread.sleep(0, 100);//Need to sleep some time to prevent high CPU loading - } - catch (InterruptedException ex) { - //Do nothing - } - } - if(timeIsOut){ - throw new SerialPortTimeoutException(portName, methodName, timeout); - } - } - - /** - * Read byte array from port - * - * @param byteCount count of bytes for reading - * @param timeout timeout in milliseconds - * - * @return byte array with "byteCount" length - * - * @throws SerialPortException - * @throws SerialPortTimeoutException - * - * @since 2.0 - */ - public byte[] readBytes(int byteCount, int timeout) throws SerialPortException, SerialPortTimeoutException { - checkPortOpened("readBytes()"); - waitBytesWithTimeout("readBytes()", byteCount, timeout); - return readBytes(byteCount); - } - - /** - * Read string from port - * - * @param byteCount count of bytes for reading - * @param timeout timeout in milliseconds - * - * @return byte array with "byteCount" length converted to String - * - * @throws SerialPortException - * @throws SerialPortTimeoutException - * - * @since 2.0 - */ - public String readString(int byteCount, int timeout) throws SerialPortException, SerialPortTimeoutException { - checkPortOpened("readString()"); - waitBytesWithTimeout("readString()", byteCount, timeout); - return readString(byteCount); - } - - /** - * Read Hex string from port (example: FF 0A FF). Separator by default is a space - * - * @param byteCount count of bytes for reading - * @param timeout timeout in milliseconds - * - * @return byte array with "byteCount" length converted to Hexadecimal String - * - * @throws SerialPortException - * @throws SerialPortTimeoutException - * - * @since 2.0 - */ - public String readHexString(int byteCount, int timeout) throws SerialPortException, SerialPortTimeoutException { - checkPortOpened("readHexString()"); - waitBytesWithTimeout("readHexString()", byteCount, timeout); - return readHexString(byteCount); - } - - /** - * Read Hex string from port with setted separator (example if separator is "::": FF::0A::FF) - * - * @param byteCount count of bytes for reading - * @param timeout timeout in milliseconds - * - * @return byte array with "byteCount" length converted to Hexadecimal String - * - * @throws SerialPortException - * @throws SerialPortTimeoutException - * - * @since 2.0 - */ - public String readHexString(int byteCount, String separator, int timeout) throws SerialPortException, SerialPortTimeoutException { - checkPortOpened("readHexString()"); - waitBytesWithTimeout("readHexString()", byteCount, timeout); - return readHexString(byteCount, separator); - } - - /** - * Read Hex String array from port - * - * @param byteCount count of bytes for reading - * @param timeout timeout in milliseconds - * - * @return String array with "byteCount" length and Hexadecimal String values - * - * @throws SerialPortException - * @throws SerialPortTimeoutException - * - * @since 2.0 - */ - public String[] readHexStringArray(int byteCount, int timeout) throws SerialPortException, SerialPortTimeoutException { - checkPortOpened("readHexStringArray()"); - waitBytesWithTimeout("readHexStringArray()", byteCount, timeout); - return readHexStringArray(byteCount); - } - - /** - * Read int array from port - * - * @param byteCount count of bytes for reading - * @param timeout timeout in milliseconds - * - * @return int array with values in range from 0 to 255 - * - * @throws SerialPortException - * @throws SerialPortTimeoutException - * - * @since 2.0 - */ - public int[] readIntArray(int byteCount, int timeout) throws SerialPortException, SerialPortTimeoutException { - checkPortOpened("readIntArray()"); - waitBytesWithTimeout("readIntArray()", byteCount, timeout); - return readIntArray(byteCount); - } - - /** - * Read all available bytes from port like a byte array - * - * @return If input buffer is empty null will be returned, else byte array with all data from port - * - * @throws SerialPortException - * - * @since 0.8 - */ - public byte[] readBytes() throws SerialPortException { - checkPortOpened("readBytes()"); - int byteCount = getInputBufferBytesCount(); - if(byteCount <= 0){ - return null; - } - return readBytes(byteCount); - } - - /** - * Read all available bytes from port like a String - * - * @return If input buffer is empty null will be returned, else byte array with all data from port converted to String - * - * @throws SerialPortException - * - * @since 0.8 - */ - public String readString() throws SerialPortException { - checkPortOpened("readString()"); - int byteCount = getInputBufferBytesCount(); - if(byteCount <= 0){ - return null; - } - return readString(byteCount); - } - - /** - * Read all available bytes from port like a Hex String - * - * @return If input buffer is empty null will be returned, else byte array with all data from port converted to Hex String - * - * @throws SerialPortException - * - * @since 0.8 - */ - public String readHexString() throws SerialPortException { - checkPortOpened("readHexString()"); - int byteCount = getInputBufferBytesCount(); - if(byteCount <= 0){ - return null; - } - return readHexString(byteCount); - } - - /** - * Read all available bytes from port like a Hex String with setted separator - * - * @return If input buffer is empty null will be returned, else byte array with all data from port converted to Hex String - * - * @throws SerialPortException - * - * @since 0.8 - */ - public String readHexString(String separator) throws SerialPortException { - checkPortOpened("readHexString()"); - int byteCount = getInputBufferBytesCount(); - if(byteCount <= 0){ - return null; - } - return readHexString(byteCount, separator); - } - - /** - * Read all available bytes from port like a Hex String array - * - * @return If input buffer is empty null will be returned, else byte array with all data from port converted to Hex String array - * - * @throws SerialPortException - * - * @since 0.8 - */ - public String[] readHexStringArray() throws SerialPortException { - checkPortOpened("readHexStringArray()"); - int byteCount = getInputBufferBytesCount(); - if(byteCount <= 0){ - return null; - } - return readHexStringArray(byteCount); - } - - /** - * Read all available bytes from port like a int array (values in range from 0 to 255) - * - * @return If input buffer is empty null will be returned, else byte array with all data from port converted to int array - * - * @throws SerialPortException - * - * @since 0.8 - */ - public int[] readIntArray() throws SerialPortException { - checkPortOpened("readIntArray()"); - int byteCount = getInputBufferBytesCount(); - if(byteCount <= 0){ - return null; - } - return readIntArray(byteCount); - } - - /** - * Get count of bytes in input buffer - * - * @return Count of bytes in input buffer or -1 if error occured - * - * @throws SerialPortException - * - * @since 0.8 - */ - public int getInputBufferBytesCount() throws SerialPortException { - checkPortOpened("getInputBufferBytesCount()"); - return serialInterface.getBuffersBytesCount(portHandle)[0]; - } - - /** - * Get count of bytes in output buffer - * - * @return Count of bytes in output buffer or -1 if error occured - * - * @throws SerialPortException - * - * @since 0.8 - */ - public int getOutputBufferBytesCount() throws SerialPortException { - checkPortOpened("getOutputBufferBytesCount()"); - return serialInterface.getBuffersBytesCount(portHandle)[1]; - } - - /** - * Set flow control mode. For required mode use variables with prefix "FLOWCONTROL_". - * Example of hardware flow control mode(RTS/CTS): setFlowControlMode(FLOWCONTROL_RTSCTS_IN | FLOWCONTROL_RTSCTS_OUT); - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @throws SerialPortException - * - * @since 0.8 - */ - public boolean setFlowControlMode(int mask) throws SerialPortException { - checkPortOpened("setFlowControlMode()"); - return serialInterface.setFlowControlMode(portHandle, mask); - } - - /** - * Get flow control mode - * - * @return Mask of setted flow control mode - * - * @throws SerialPortException - * - * @since 0.8 - */ - public int getFlowControlMode() throws SerialPortException { - checkPortOpened("getFlowControlMode()"); - return serialInterface.getFlowControlMode(portHandle); - } - - /** - * Send Break singnal for setted duration - * - * @param duration duration of Break signal - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @throws SerialPortException - * - * @since 0.8 - */ - public boolean sendBreak(int duration)throws SerialPortException { - checkPortOpened("sendBreak()"); - return serialInterface.sendBreak(portHandle, duration); - } - - private int[][] waitEvents() { - return serialInterface.waitEvents(portHandle); - } - - /** - * Check port opened (since jSSC-0.8 String "EMPTY" was replaced with "portName" variable) - * - * @param methodName method name - * - * @throws SerialPortException - */ - private void checkPortOpened(String methodName) throws SerialPortException { - if(!portOpened){ - throw new SerialPortException(portName, methodName, SerialPortException.TYPE_PORT_NOT_OPENED); - } - } - - /** - * Getting lines status. Lines status is sent as 0 – OFF and 1 - ON - * - * @return Method returns the array containing information about lines in following order: - *
element 0 - CTS line state
- *
element 1 - DSR line state
- *
element 2 - RING line state
- *
element 3 - RLSD line state
- * - * @throws SerialPortException - */ - public int[] getLinesStatus() throws SerialPortException { - checkPortOpened("getLinesStatus()"); - return serialInterface.getLinesStatus(portHandle); - } - - /** - * Get state of CTS line - * - * @return If line is active, method returns true, otherwise false - * - * @throws SerialPortException - */ - public boolean isCTS() throws SerialPortException { - checkPortOpened("isCTS()"); - if(serialInterface.getLinesStatus(portHandle)[0] == 1){ - return true; - } - else { - return false; - } - } - - /** - * Get state of DSR line - * - * @return If line is active, method returns true, otherwise false - * - * @throws SerialPortException - */ - public boolean isDSR() throws SerialPortException { - checkPortOpened("isDSR()"); - if(serialInterface.getLinesStatus(portHandle)[1] == 1){ - return true; - } - else { - return false; - } - } - - /** - * Get state of RING line - * - * @return If line is active, method returns true, otherwise false - * - * @throws SerialPortException - */ - public boolean isRING() throws SerialPortException { - checkPortOpened("isRING()"); - if(serialInterface.getLinesStatus(portHandle)[2] == 1){ - return true; - } - else { - return false; - } - } - - /** - * Get state of RLSD line - * - * @return If line is active, method returns true, otherwise false - * - * @throws SerialPortException - */ - public boolean isRLSD() throws SerialPortException { - checkPortOpened("isRLSD()"); - if(serialInterface.getLinesStatus(portHandle)[3] == 1){ - return true; - } - else { - return false; - } - } - - /** - * Add event listener. Object of "SerialPortEventListener" type shall - * be sent to the method. This object shall be properly described, as it will - * be in charge for handling of occurred events. This method will independently - * set the mask in "MASK_RXCHAR" state if it was not set beforehand - * - * @throws SerialPortException - */ - public void addEventListener(SerialPortEventListener listener) throws SerialPortException { - addEventListener(listener, MASK_RXCHAR, false); - } - - /** - * Add event listener. Object of "SerialPortEventListener" type shall be sent - * to the method. This object shall be properly described, as it will be in - * charge for handling of occurred events. Also events mask shall be sent to - * this method, to do it use variables with prefix "MASK_" for example "MASK_RXCHAR" - * - * @see #setEventsMask(int) setEventsMask(int mask) - * - * @throws SerialPortException - */ - public void addEventListener(SerialPortEventListener listener, int mask) throws SerialPortException { - addEventListener(listener, mask, true); - } - - /** - * Internal method. Add event listener. Object of "SerialPortEventListener" type shall be sent - * to the method. This object shall be properly described, as it will be in - * charge for handling of occurred events. Also events mask shall be sent to - * this method, to do it use variables with prefix "MASK_" for example "MASK_RXCHAR". If - * overwriteMask == true and mask has been already assigned it value will be rewrited by mask - * value, if overwriteMask == false and mask has been already assigned the new mask value will be ignored, - * if there is no assigned mask to this serial port the mask value will be used for setting it up in spite of - * overwriteMask value - * - * @see #setEventsMask(int) setEventsMask(int mask) - * - * @throws SerialPortException - */ - private void addEventListener(SerialPortEventListener listener, int mask, boolean overwriteMask) throws SerialPortException { - checkPortOpened("addEventListener()"); - if(!eventListenerAdded){ - if((maskAssigned && overwriteMask) || !maskAssigned) { - setEventsMask(mask); - } - eventListener = listener; - eventThread = getNewEventThread(); - eventThread.setName("EventThread " + portName); - //since 2.2.0 -> - try { - Method method = eventListener.getClass().getMethod("errorOccurred", new Class[]{SerialPortException.class}); - method.setAccessible(true); - methodErrorOccurred = method; - } - catch (SecurityException ex) { - //Do nothing - } - catch (NoSuchMethodException ex) { - //Do nothing - } - //<- since 2.2.0 - eventThread.start(); - eventListenerAdded = true; - } - else { - throw new SerialPortException(portName, "addEventListener()", SerialPortException.TYPE_LISTENER_ALREADY_ADDED); - } - } - - /** - * Create new EventListener Thread depending on the type of operating system - * - * @since 0.8 - */ - private EventThread getNewEventThread() { - if(SerialNativeInterface.getOsType() == SerialNativeInterface.OS_LINUX || - SerialNativeInterface.getOsType() == SerialNativeInterface.OS_SOLARIS || - SerialNativeInterface.getOsType() == SerialNativeInterface.OS_MAC_OS_X){//since 0.9.0 - return new LinuxEventThread(); - } - return new EventThread(); - } - - /** - * Delete event listener. Mask is set to 0. So at the next addition of event - * handler you shall set required event mask again - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @throws SerialPortException - */ - public boolean removeEventListener() throws SerialPortException { - checkPortOpened("removeEventListener()"); - if(!eventListenerAdded){ - throw new SerialPortException(portName, "removeEventListener()", SerialPortException.TYPE_CANT_REMOVE_LISTENER); - } - eventThread.terminateThread(); - setEventsMask(0); - if(Thread.currentThread().getId() != eventThread.getId()){ - if(eventThread.isAlive()){ - try { - eventThread.join(5000); - } - catch (InterruptedException ex) { - throw new SerialPortException(portName, "removeEventListener()", SerialPortException.TYPE_LISTENER_THREAD_INTERRUPTED); - } - } - } - methodErrorOccurred = null; - eventListenerAdded = false; - return true; - } - - /** - * Close port. This method deletes event listener first, then closes the port - * - * @return If the operation is successfully completed, the method returns true, otherwise false - * - * @throws SerialPortException - */ - public boolean closePort() throws SerialPortException { - checkPortOpened("closePort()"); - if(eventListenerAdded){ - removeEventListener(); - } - boolean returnValue = serialInterface.closePort(portHandle); - if(returnValue){ - maskAssigned = false; - portOpened = false; - } - return returnValue; - } - - private EventThread eventThread; - - private class EventThread extends Thread { - - private boolean threadTerminated = false; - - @Override - public void run() { - while(!threadTerminated){ - int[][] eventArray = waitEvents(); - for(int i = 0; i < eventArray.length; i++){ - if(eventArray[i][0] > 0 && !threadTerminated){ - eventListener.serialEvent(new SerialPortEvent(portName, eventArray[i][0], eventArray[i][1])); - //FIXME - /*if(methodErrorOccurred != null){ - try { - methodErrorOccurred.invoke(eventListener, new Object[]{new SerialPortException("port", "method", "exception")}); - } - catch (Exception ex) { - System.out.println(ex); - } - }*/ - } - } - } - } - - private void terminateThread(){ - threadTerminated = true; - } - } - - /** - * EventListener for Linux OS - * - * @since 0.8 - */ - private class LinuxEventThread extends EventThread { - - //Essential interruptions for events: BREAK, ERR, TXEMPTY - private final int INTERRUPT_BREAK = 512; - private final int INTERRUPT_TX = 1024; - private final int INTERRUPT_FRAME = 2048; - private final int INTERRUPT_OVERRUN = 4096; - private final int INTERRUPT_PARITY = 8192; - - //Count of interruptions - private int interruptBreak; - private int interruptTX; - private int interruptFrame; - private int interruptOverrun; - private int interruptParity; - - //Previous states if lines (then state change event will be generated) - private int preCTS; - private int preDSR; - private int preRLSD; - private int preRING; - - //Need to get initial states - public LinuxEventThread(){ - int[][] eventArray = waitEvents(); - for(int i = 0; i < eventArray.length; i++){ - int eventType = eventArray[i][0]; - int eventValue = eventArray[i][1]; - switch(eventType){ - case INTERRUPT_BREAK: - interruptBreak = eventValue; - break; - case INTERRUPT_TX: - interruptTX = eventValue; - break; - case INTERRUPT_FRAME: - interruptFrame = eventValue; - break; - case INTERRUPT_OVERRUN: - interruptOverrun = eventValue; - break; - case INTERRUPT_PARITY: - interruptParity = eventValue; - break; - case MASK_CTS: - preCTS = eventValue; - break; - case MASK_DSR: - preDSR = eventValue; - break; - case MASK_RING: - preRING = eventValue; - break; - case MASK_RLSD: - preRLSD = eventValue; - break; - } - } - } - - @Override - public void run() { - while(!super.threadTerminated){ - int[][] eventArray = waitEvents(); - int mask = getLinuxMask(); - boolean interruptTxChanged = false; - int errorMask = 0; - for(int i = 0; i < eventArray.length; i++){ - boolean sendEvent = false; - int eventType = eventArray[i][0]; - int eventValue = eventArray[i][1]; - if(eventType > 0 && !super.threadTerminated){ - switch(eventType){ - case INTERRUPT_BREAK: - if(eventValue != interruptBreak){ - interruptBreak = eventValue; - if((mask & MASK_BREAK) == MASK_BREAK){ - eventType = MASK_BREAK; - eventValue = 0; - sendEvent = true; - } - } - break; - case INTERRUPT_TX: - if(eventValue != interruptTX){ - interruptTX = eventValue; - interruptTxChanged = true; - } - break; - case INTERRUPT_FRAME: - if(eventValue != interruptFrame){ - interruptFrame = eventValue; - errorMask |= ERROR_FRAME; - } - break; - case INTERRUPT_OVERRUN: - if(eventValue != interruptOverrun){ - interruptOverrun = eventValue; - errorMask |= ERROR_OVERRUN; - } - break; - case INTERRUPT_PARITY: - if(eventValue != interruptParity){ - interruptParity = eventValue; - errorMask |= ERROR_PARITY; - } - if((mask & MASK_ERR) == MASK_ERR && errorMask != 0){ - eventType = MASK_ERR; - eventValue = errorMask; - sendEvent = true; - } - break; - case MASK_CTS: - if(eventValue != preCTS){ - preCTS = eventValue; - if((mask & MASK_CTS) == MASK_CTS){ - sendEvent = true; - } - } - break; - case MASK_DSR: - if(eventValue != preDSR){ - preDSR = eventValue; - if((mask & MASK_DSR) == MASK_DSR){ - sendEvent = true; - } - } - break; - case MASK_RING: - if(eventValue != preRING){ - preRING = eventValue; - if((mask & MASK_RING) == MASK_RING){ - sendEvent = true; - } - } - break; - case MASK_RLSD: /*DCD*/ - if(eventValue != preRLSD){ - preRLSD = eventValue; - if((mask & MASK_RLSD) == MASK_RLSD){ - sendEvent = true; - } - } - break; - case MASK_RXCHAR: - if(((mask & MASK_RXCHAR) == MASK_RXCHAR) && (eventValue > 0)){ - sendEvent = true; - } - break; - /*case MASK_RXFLAG: - //Do nothing at this moment - if(((mask & MASK_RXFLAG) == MASK_RXFLAG) && (eventValue > 0)){ - sendEvent = true; - } - break;*/ - case MASK_TXEMPTY: - if(((mask & MASK_TXEMPTY) == MASK_TXEMPTY) && (eventValue == 0) && interruptTxChanged){ - sendEvent = true; - } - break; - } - if(sendEvent){ - eventListener.serialEvent(new SerialPortEvent(portName, eventType, eventValue)); - } - } - } - //Need to sleep some time - try { - Thread.sleep(0, 100); - } - catch (Exception ex) { - //Do nothing - } - } - } - } -} diff --git a/ESPlorer/src/jssc/SerialPortEvent.java b/ESPlorer/src/jssc/SerialPortEvent.java deleted file mode 100644 index 01ec732..0000000 --- a/ESPlorer/src/jssc/SerialPortEvent.java +++ /dev/null @@ -1,192 +0,0 @@ -/* jSSC (Java Simple Serial Connector) - serial port communication library. - * © Alexey Sokolov (scream3r), 2010-2014. - * - * This file is part of jSSC. - * - * jSSC is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * jSSC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with jSSC. If not, see . - * - * If you use jSSC in public project you can inform me about this by e-mail, - * of course if you want it. - * - * e-mail: scream3r.org@gmail.com - * web-site: http://scream3r.org | http://code.google.com/p/java-simple-serial-connector/ - */ -package jssc; - -/** - * - * @author scream3r - */ -public class SerialPortEvent { - - private String portName; - private int eventType; - private int eventValue; - - public static final int RXCHAR = 1; - public static final int RXFLAG = 2; - public static final int TXEMPTY = 4; - public static final int CTS = 8; - public static final int DSR = 16; - public static final int RLSD = 32; - public static final int BREAK = 64; - public static final int ERR = 128; - public static final int RING = 256; - - public SerialPortEvent(String portName, int eventType, int eventValue){ - this.portName = portName; - this.eventType = eventType; - this.eventValue = eventValue; - } - - /** - * Getting port name which sent the event - */ - public String getPortName() { - return portName; - } - - /** - * Getting event type - */ - public int getEventType() { - return eventType; - } - - /** - * Getting event value - *

- *
Event values depending on their types:
- *
RXCHAR - bytes count in input buffer
- *
RXFLAG - bytes count in input buffer (Not supported in Linux)
- *
TXEMPTY - bytes count in output buffer
- *
CTS - state of CTS line (0 - OFF, 1 - ON)
- *
DSR - state of DSR line (0 - OFF, 1 - ON)
- *
RLSD - state of RLSD line (0 - OFF, 1 - ON)
- *
BREAK - 0
- *
RING - state of RING line (0 - OFF, 1 - ON)
- *
ERR - mask of errors
- */ - public int getEventValue() { - return eventValue; - } - - /** - * Method returns true if event of type "RXCHAR" is received and otherwise false - */ - public boolean isRXCHAR() { - if(eventType == RXCHAR){ - return true; - } - else { - return false; - } - } - - /** - * Method returns true if event of type "RXFLAG" is received and otherwise false - */ - public boolean isRXFLAG() { - if(eventType == RXFLAG){ - return true; - } - else { - return false; - } - } - - /** - * Method returns true if event of type "TXEMPTY" is received and otherwise false - */ - public boolean isTXEMPTY() { - if(eventType == TXEMPTY){ - return true; - } - else { - return false; - } - } - - /** - * Method returns true if event of type "CTS" is received and otherwise false - */ - public boolean isCTS() { - if(eventType == CTS){ - return true; - } - else { - return false; - } - } - - /** - * Method returns true if event of type "DSR" is received and otherwise false - */ - public boolean isDSR() { - if(eventType == DSR){ - return true; - } - else { - return false; - } - } - - /** - * Method returns true if event of type "RLSD" is received and otherwise false - */ - public boolean isRLSD() { - if(eventType == RLSD){ - return true; - } - else { - return false; - } - } - - /** - * Method returns true if event of type "BREAK" is received and otherwise false - */ - public boolean isBREAK() { - if(eventType == BREAK){ - return true; - } - else { - return false; - } - } - - /** - * Method returns true if event of type "ERR" is received and otherwise false - */ - public boolean isERR() { - if(eventType == ERR){ - return true; - } - else { - return false; - } - } - - /** - * Method returns true if event of type "RING" is received and otherwise false - */ - public boolean isRING() { - if(eventType == RING){ - return true; - } - else { - return false; - } - } -} diff --git a/ESPlorer/src/jssc/SerialPortEventListener.java b/ESPlorer/src/jssc/SerialPortEventListener.java deleted file mode 100644 index 9a2441a..0000000 --- a/ESPlorer/src/jssc/SerialPortEventListener.java +++ /dev/null @@ -1,34 +0,0 @@ -/* jSSC (Java Simple Serial Connector) - serial port communication library. - * © Alexey Sokolov (scream3r), 2010-2014. - * - * This file is part of jSSC. - * - * jSSC is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * jSSC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with jSSC. If not, see . - * - * If you use jSSC in public project you can inform me about this by e-mail, - * of course if you want it. - * - * e-mail: scream3r.org@gmail.com - * web-site: http://scream3r.org | http://code.google.com/p/java-simple-serial-connector/ - */ -package jssc; - -/** - * - * @author scream3r - */ -public interface SerialPortEventListener { - - public abstract void serialEvent(SerialPortEvent serialPortEvent); -} diff --git a/ESPlorer/src/jssc/SerialPortException.java b/ESPlorer/src/jssc/SerialPortException.java deleted file mode 100644 index 18aca2f..0000000 --- a/ESPlorer/src/jssc/SerialPortException.java +++ /dev/null @@ -1,95 +0,0 @@ -/* jSSC (Java Simple Serial Connector) - serial port communication library. - * © Alexey Sokolov (scream3r), 2010-2014. - * - * This file is part of jSSC. - * - * jSSC is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * jSSC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with jSSC. If not, see . - * - * If you use jSSC in public project you can inform me about this by e-mail, - * of course if you want it. - * - * e-mail: scream3r.org@gmail.com - * web-site: http://scream3r.org | http://code.google.com/p/java-simple-serial-connector/ - */ -package jssc; - -/** - * - * @author scream3r - */ -public class SerialPortException extends Exception { - - final public static String TYPE_PORT_ALREADY_OPENED = "Port already opened"; - final public static String TYPE_PORT_NOT_OPENED = "Port not opened"; - final public static String TYPE_CANT_SET_MASK = "Can't set mask"; - final public static String TYPE_LISTENER_ALREADY_ADDED = "Event listener already added"; - final public static String TYPE_LISTENER_THREAD_INTERRUPTED = "Event listener thread interrupted"; - final public static String TYPE_CANT_REMOVE_LISTENER = "Can't remove event listener, because listener not added"; - /** - * @since 0.8 - */ - final public static String TYPE_PARAMETER_IS_NOT_CORRECT = "Parameter is not correct"; - /** - * @since 0.8 - */ - final public static String TYPE_NULL_NOT_PERMITTED = "Null not permitted"; - /** - * @since 0.9.0 - */ - final public static String TYPE_PORT_BUSY = "Port busy"; - /** - * @since 0.9.0 - */ - final public static String TYPE_PORT_NOT_FOUND = "Port not found"; - /** - * @since 2.2.0 - */ - final public static String TYPE_PERMISSION_DENIED = "Permission denied"; - /** - * @since 2.3.0 - */ - final public static String TYPE_INCORRECT_SERIAL_PORT = "Incorrect serial port"; - - private String portName; - private String methodName; - private String exceptionType; - - public SerialPortException(String portName, String methodName, String exceptionType){ - super("Port name - " + portName + "; Method name - " + methodName + "; Exception type - " + exceptionType + "."); - this.portName = portName; - this.methodName = methodName; - this.exceptionType = exceptionType; - } - - /** - * Getting port name during operation with which the exception was called - */ - public String getPortName(){ - return portName; - } - - /** - * Getting method name during execution of which the exception was called - */ - public String getMethodName(){ - return methodName; - } - - /** - * Getting exception type - */ - public String getExceptionType(){ - return exceptionType; - } -} diff --git a/ESPlorer/src/jssc/SerialPortList.java b/ESPlorer/src/jssc/SerialPortList.java deleted file mode 100644 index b511cff..0000000 --- a/ESPlorer/src/jssc/SerialPortList.java +++ /dev/null @@ -1,348 +0,0 @@ -/* jSSC (Java Simple Serial Connector) - serial port communication library. - * © Alexey Sokolov (scream3r), 2010-2014. - * - * This file is part of jSSC. - * - * jSSC is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * jSSC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with jSSC. If not, see . - * - * If you use jSSC in public project you can inform me about this by e-mail, - * of course if you want it. - * - * e-mail: scream3r.org@gmail.com - * web-site: http://scream3r.org | http://code.google.com/p/java-simple-serial-connector/ - */ -package jssc; - -import java.io.File; -import java.util.Comparator; -import java.util.TreeSet; -import java.util.regex.Pattern; - -/** - * - * @author scream3r - */ -public class SerialPortList { - - private static SerialNativeInterface serialInterface; - private static final Pattern PORTNAMES_REGEXP; - private static final String PORTNAMES_PATH; - - static { - serialInterface = new SerialNativeInterface(); - switch (SerialNativeInterface.getOsType()) { - case SerialNativeInterface.OS_LINUX: { - PORTNAMES_REGEXP = Pattern.compile("(ttyS|ttyUSB|ttyACM|ttyAMA|rfcomm|ttyO)[0-9]{1,3}"); - PORTNAMES_PATH = "/dev/"; - break; - } - case SerialNativeInterface.OS_SOLARIS: { - PORTNAMES_REGEXP = Pattern.compile("[0-9]*|[a-z]*"); - PORTNAMES_PATH = "/dev/term/"; - break; - } - case SerialNativeInterface.OS_MAC_OS_X: { - PORTNAMES_REGEXP = Pattern.compile("tty.(serial|usbserial|usbmodem).*|cu.*"); - PORTNAMES_PATH = "/dev/"; - break; - } - case SerialNativeInterface.OS_WINDOWS: { - PORTNAMES_REGEXP = Pattern.compile(""); - PORTNAMES_PATH = ""; - break; - } - default: { - PORTNAMES_REGEXP = null; - PORTNAMES_PATH = null; - break; - } - } - } - - //since 2.1.0 -> Fully rewrited port name comparator - private static final Comparator PORTNAMES_COMPARATOR = new Comparator() { - - @Override - public int compare(String valueA, String valueB) { - - if(valueA.equalsIgnoreCase(valueB)){ - return valueA.compareTo(valueB); - } - - int minLength = Math.min(valueA.length(), valueB.length()); - - int shiftA = 0; - int shiftB = 0; - - for(int i = 0; i < minLength; i++){ - char charA = valueA.charAt(i - shiftA); - char charB = valueB.charAt(i - shiftB); - if(charA != charB){ - if(Character.isDigit(charA) && Character.isDigit(charB)){ - int[] resultsA = getNumberAndLastIndex(valueA, i - shiftA); - int[] resultsB = getNumberAndLastIndex(valueB, i - shiftB); - - if(resultsA[0] != resultsB[0]){ - return resultsA[0] - resultsB[0]; - } - - if(valueA.length() < valueB.length()){ - i = resultsA[1]; - shiftB = resultsA[1] - resultsB[1]; - } - else { - i = resultsB[1]; - shiftA = resultsB[1] - resultsA[1]; - } - } - else { - if(Character.toLowerCase(charA) - Character.toLowerCase(charB) != 0){ - return Character.toLowerCase(charA) - Character.toLowerCase(charB); - } - } - } - } - return valueA.compareToIgnoreCase(valueB); - } - - /** - * Evaluate port index/number from startIndex to the number end. For example: - * for port name serial-123-FF you should invoke this method with startIndex = 7 - * - * @return If port index/number correctly evaluated it value will be returned
- * returnArray[0] = index/number
- * returnArray[1] = stopIndex
- * - * If incorrect:
- * returnArray[0] = -1
- * returnArray[1] = startIndex
- * - * For this name serial-123-FF result is: - * returnArray[0] = 123
- * returnArray[1] = 10
- */ - private int[] getNumberAndLastIndex(String str, int startIndex) { - String numberValue = ""; - int[] returnValues = {-1, startIndex}; - for(int i = startIndex; i < str.length(); i++){ - returnValues[1] = i; - char c = str.charAt(i); - if(Character.isDigit(c)){ - numberValue += c; - } - else { - break; - } - } - try { - returnValues[0] = Integer.valueOf(numberValue); - } - catch (Exception ex) { - //Do nothing - } - return returnValues; - } - }; - //<-since 2.1.0 - - /** - * Get sorted array of serial ports in the system using default settings:
- * - * Search path
- * Windows - ""(always ignored)
- * Linux - "/dev/"
- * Solaris - "/dev/term/"
- * MacOSX - "/dev/"
- * - * RegExp
- * Windows - ""
- * Linux - "(ttyS|ttyUSB|ttyACM|ttyAMA|rfcomm)[0-9]{1,3}"
- * Solaris - "[0-9]*|[a-z]*"
- * MacOSX - "tty.(serial|usbserial|usbmodem).*"
- * - * @return String array. If there is no ports in the system String[] - * with zero length will be returned (since jSSC-0.8 in previous versions null will be returned) - */ - public static String[] getPortNames() { - return getPortNames(PORTNAMES_PATH, PORTNAMES_REGEXP, PORTNAMES_COMPARATOR); - } - - /** - * Get sorted array of serial ports in the system located on searchPath - * - * @param searchPath Path for searching serial ports (not null)
- * The default search paths:
- * Linux, MacOSX: /dev/
- * Solaris: /dev/term/
- * Windows: this parameter ingored - * - * @return String array. If there is no ports in the system String[] - * - * @since 2.3.0 - */ - public static String[] getPortNames(String searchPath) { - return getPortNames(searchPath, PORTNAMES_REGEXP, PORTNAMES_COMPARATOR); - } - - /** - * Get sorted array of serial ports in the system matched pattern - * - * @param pattern RegExp pattern for matching port names (not null) - * - * @return String array. If there is no ports in the system String[] - * - * @since 2.3.0 - */ - public static String[] getPortNames(Pattern pattern) { - return getPortNames(PORTNAMES_PATH, pattern, PORTNAMES_COMPARATOR); - } - - /** - * Get sorted array of serial ports in the system matched pattern - * - * @param comparator Comparator for sotring port names (not null) - * - * @return String array. If there is no ports in the system String[] - * - * @since 2.3.0 - */ - public static String[] getPortNames(Comparator comparator) { - return getPortNames(PORTNAMES_PATH, PORTNAMES_REGEXP, comparator); - } - - /** - * Get sorted array of serial ports in the system located on searchPath, matched pattern - * - * @param searchPath Path for searching serial ports (not null)
- * The default search paths:
- * Linux, MacOSX: /dev/
- * Solaris: /dev/term/
- * Windows: this parameter ingored - * @param pattern RegExp pattern for matching port names (not null) - * - * @return String array. If there is no ports in the system String[] - * - * @since 2.3.0 - */ - public static String[] getPortNames(String searchPath, Pattern pattern) { - return getPortNames(searchPath, pattern, PORTNAMES_COMPARATOR); - } - - /** - * Get sorted array of serial ports in the system located on searchPath and sorted by comparator - * - * @param searchPath Path for searching serial ports (not null)
- * The default search paths:
- * Linux, MacOSX: /dev/
- * Solaris: /dev/term/
- * Windows: this parameter ingored - * @param comparator Comparator for sotring port names (not null) - * - * @return String array. If there is no ports in the system String[] - * - * @since 2.3.0 - */ - public static String[] getPortNames(String searchPath, Comparator comparator) { - return getPortNames(searchPath, PORTNAMES_REGEXP, comparator); - } - - /** - * Get sorted array of serial ports in the system matched pattern and sorted by comparator - * - * @param pattern RegExp pattern for matching port names (not null) - * @param comparator Comparator for sotring port names (not null) - * - * @return String array. If there is no ports in the system String[] - * - * @since 2.3.0 - */ - public static String[] getPortNames(Pattern pattern, Comparator comparator) { - return getPortNames(PORTNAMES_PATH, pattern, comparator); - } - - /** - * Get sorted array of serial ports in the system located on searchPath, matched pattern and sorted by comparator - * - * @param searchPath Path for searching serial ports (not null)
- * The default search paths:
- * Linux, MacOSX: /dev/
- * Solaris: /dev/term/
- * Windows: this parameter ingored - * @param pattern RegExp pattern for matching port names (not null) - * @param comparator Comparator for sotring port names (not null) - * - * @return String array. If there is no ports in the system String[] - * - * @since 2.3.0 - */ - public static String[] getPortNames(String searchPath, Pattern pattern, Comparator comparator) { - if(searchPath == null || pattern == null || comparator == null){ - return new String[]{}; - } - if(SerialNativeInterface.getOsType() == SerialNativeInterface.OS_WINDOWS){ - return getWindowsPortNames(pattern, comparator); - } - return getUnixBasedPortNames(searchPath, pattern, comparator); - } - - /** - * Get serial port names in Windows - * - * @since 2.3.0 - */ - private static String[] getWindowsPortNames(Pattern pattern, Comparator comparator) { - String[] portNames = serialInterface.getSerialPortNames(); - if(portNames == null){ - return new String[]{}; - } - TreeSet ports = new TreeSet(comparator); - for(String portName : portNames){ - if(pattern.matcher(portName).find()){ - ports.add(portName); - } - } - return ports.toArray(new String[ports.size()]); - } - - /** - * Universal method for getting port names of _nix based systems - */ - private static String[] getUnixBasedPortNames(String searchPath, Pattern pattern, Comparator comparator) { - searchPath = (searchPath.equals("") ? searchPath : (searchPath.endsWith("/") ? searchPath : searchPath + "/")); - String[] returnArray = new String[]{}; - File dir = new File(searchPath); - if(dir.exists() && dir.isDirectory()){ - File[] files = dir.listFiles(); - if(files.length > 0){ - TreeSet portsTree = new TreeSet(comparator); - for(File file : files){ - String fileName = file.getName(); - if(!file.isDirectory() && !file.isFile() && pattern.matcher(fileName).find()){ - String portName = searchPath + fileName; - long portHandle = serialInterface.openPort(portName, false);//Open port without TIOCEXCL - if(portHandle < 0 && portHandle != SerialNativeInterface.ERR_PORT_BUSY){ - continue; - } - else if(portHandle != SerialNativeInterface.ERR_PORT_BUSY) { - serialInterface.closePort(portHandle); - } - portsTree.add(portName); - } - } - returnArray = portsTree.toArray(returnArray); - } - } - return returnArray; - } -} diff --git a/ESPlorer/src/jssc/SerialPortTimeoutException.java b/ESPlorer/src/jssc/SerialPortTimeoutException.java deleted file mode 100644 index 802535c..0000000 --- a/ESPlorer/src/jssc/SerialPortTimeoutException.java +++ /dev/null @@ -1,64 +0,0 @@ -/* jSSC (Java Simple Serial Connector) - serial port communication library. - * © Alexey Sokolov (scream3r), 2010-2014. - * - * This file is part of jSSC. - * - * jSSC is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * jSSC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with jSSC. If not, see . - * - * If you use jSSC in public project you can inform me about this by e-mail, - * of course if you want it. - * - * e-mail: scream3r.org@gmail.com - * web-site: http://scream3r.org | http://code.google.com/p/java-simple-serial-connector/ - */ -package jssc; - -/** - * - * @author scream3r - */ -public class SerialPortTimeoutException extends Exception { - - private String portName; - private String methodName; - private int timeoutValue; - - public SerialPortTimeoutException(String portName, String methodName, int timeoutValue) { - super("Port name - " + portName + "; Method name - " + methodName + "; Serial port operation timeout (" + timeoutValue + " ms)."); - this.portName = portName; - this.methodName = methodName; - this.timeoutValue = timeoutValue; - } - - /** - * Getting port name during operation with which the exception was called - */ - public String getPortName(){ - return portName; - } - - /** - * Getting method name during execution of which the exception was called - */ - public String getMethodName(){ - return methodName; - } - - /** - * Getting timeout value in millisecond - */ - public int getTimeoutValue(){ - return timeoutValue; - } -} diff --git a/ESPlorer/src/libs/linux/libjSSC-2.8_armhf.so b/ESPlorer/src/libs/linux/libjSSC-2.8_armhf.so deleted file mode 100644 index 3742fbe08f4313d2b997ce0acaf96dffad5602b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10631 zcmcIq4|r77mA`Lh5+=z&MiMY$lmQ}*HN@eMZmPJBfE7#BDMUqUcVGo_p@O=iWCjt8Z@nqM|6mdYqzGkZUOyVixdFjSvnYie?F)C`Mbg zxRmXQu1P{zupN2?mjw2=KfcLA5Q-?w2*bW1dlGWMMs(-_6w7u8a2@pP&_*yi$aZUt z4!sNZ_2_^H&!?-ea@O}PSX z*8x5UxCAg0a4i6CiHiZ_0apV!r;7l57_Z9>N+3!?j0MyJt_0KrrT{o@31Bq9dM*R; zdC61(BlKb_;3|L{Fat0OPzUe>{*s4t<731WnDOEB1wg4m{po)V5RC(j0Zao-0({!@ zS7=}?E2P3i;0coU0#BFpHNcEzndFJ8Z8S*_z(-=(!?-ezi~(Uvk9&?kSh2NXv#Ua^ z2?|Fh>vH=7f(4}qq!ufLT_%Lpq4AI6bBa$PwW#)XfvXV!_oPM*@!H}u-&u8e zAz2lzHqF>&5y7ArXi|=`F$%bu@ ze*IU=?)b((ynO8LOQ-+(?Pc{f6R%L7AM;^8zW7(B2Os~xii?5ADOatQ`@!HV#UYb4 z{%5Xvut%(iyp1*D%Y3pPABYnc15EulhVkRAB$DlKJ3dmN{?U(EqyNur1G2q%82{QZ z{qkYiO#jTVc6;8k4!nmAklkr2dByvM z`_SKo4L%#=j73(nMpR8Q+s9(ZPeFSINqryU$o4SsTPP;?L52J=*z331n}PP%(azjw z`xnsvm)LN%lIK3N@?$LWqYC{`qnJD(?f>gAdoIWi+U$KW%>N(2?;cF@ptOGyd=u=| zNd8;s??-{M{5?0U|1tQt9rn53=x;A@5Kj6bC;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`pbS(Se@PD$n5ygdt`5P*7%lICNGs^hxiFY64?>qPnAI-+!2h==ie*Y&= zs6yut&llo55JTLNMIGL6k>6q?@&|WmF%d$XCq`Hy5_LO`zef>=L01C!lM{cR4PsEz zK46>&#`paSV6MaYLLoi?=dg5f+CZ%1jo|+vd5Hd^$M{HWdFax?i7D_#!v3o z`D*7ym&76+zFGCx*3X>Qa8)u9n|`IqiJO?A#@9iiOa)nVttc*bDJ(9*T9!&D(~%{jz9XKF)-UbotY6X@YipSnYY_&wEQ0T2^)0J9 zQmficjPHa-%X0Za($0j?mW;Mh-y{-kX;E){C#_FMSAsUamewcZ#y5!in-<89# z$ym!uQ6F6vYQ?v{sM#|VNhTw!%$^o~e=`QcAd&W1GrWnzuxSwAG(>%KyuBUY;7ptR zBp6%L$?sgB;bG1p6^*U^0WhHkU_H!TK9d2=Tb2OkGNB7#wG$KgcR{~HzEO|4P8gDH zK!y(WY5^RZdfWp96~Hlo3_UL}SDHNaxMv95E7k)SjHdzrGw-R#oF}9~TmDf_xEa8G zLYjMp5C&}@7p!Ok;0|K+;a(%q7t0dB~?0ILm67ibkULT2Owzg77@ zMXw(^EaS`>*5H~?(R&f?iqzxZ8r6P^-ahDX&1jExk$n(rIXqg^MUAA0@6^k{?6&jF;Fn|!D@$s~>c*+zH=09y$| vi2r^Hz3CPMOdUSN(7W)Qhu)bB+{g8ppXO6$%wd*|r=12HFKQy9rbYZOginWh diff --git a/ESPlorer/src/libs/linux/libjSSC-2.8_armsf.so b/ESPlorer/src/libs/linux/libjSSC-2.8_armsf.so deleted file mode 100644 index 894ec80876869e481b4ca60e8dba39a18dcd49bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10779 zcmcIq4{%h~xj%Pz6P6IjLIOs}g9}8AO5z0~O%>}xP_af>Au9fRyPITzwIRFBZunE} zun48R*3=9{$~eT_7V7gU^GK_{u~dC4@F-9Fe6-pQW!mv>uJ;LO1!u5Bm74ea-8~ns zTb$T=^G@c=_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Ebu(e~ zb;jDMpC^*-X;Ei?eOs4~tpja;iCfp1u)i9qo4@pqI*2)co{YDx6Lqmw;T8A_GL|11 zj&^oN*XKt%^h2$f2$Mut$6Mh|0*3Pj@l}hcYfY?PjjsmtHu+6uyrqj@zkS)pTtf=l zNBS%N_dY

(rII3xRjE}VlJ(43ok%zc6m z;2g|Z+Ts~tUX!OD&kBKO#A!T>Yz+YBJN20BgfwW!KgtO=19(12^NbK8pxyI=70m$L zQ|vK3V+8u**du1mdl2C0@k|nUR@u+>IeIHV(^sB#{=S01^*PP48->8pbIx1PStR2>@XdbG=V`TLzk1$wl>_B#M+<|Z5U@LAV|#y-M30N6@89Wm%RV<>a%5pzzb gJpsMb4g>7gV}9n_D0^)UE}nYxT)e1`it0A;zhsNm;s5{u diff --git a/ESPlorer/src/libs/linux/libjSSC-2.8_x86.so b/ESPlorer/src/libs/linux/libjSSC-2.8_x86.so deleted file mode 100644 index 8ea5d6e21e6a8259c97500e3d0e76646e849599d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13720 zcmeHOe{@vUwLX&>!k~ef+CbAv$!G@)3Ng{xg)Q0`mqP2 zFvMDXUHtbvx@Vt#_C9;>v(G+1?&an|UwN6$W)oJi3%ekdoFYUqaCMQvDHa|vQOpuo zi_b{DB`@*y_ytTL;TDpAsz8WSw;Qk?3R?i#CO-?bNB+do41Ma-bFM6lG^6chgD_8u_ znW?WH@D63oU3=U6Gr==MBUrxyFc)w&fCa-7p9fF}LL$o?{N|Z;q8xw+a18*%5z_&m z1ULa#0Ic#URIW9Nslb>Tkq`Ks*~aiQ_Flj&vn>;GOjh9-8Gn|~8ffgd5H-dqvs?w@ zGl0pNjb|fkwh_$$Ow6FCWz<=nltEu<)~Sh7RH40!@~JsVT|Y>=Zs_ExLIyjjvYJp z+MlPye_hquU7WR|@a`wC_io+u%8Q-vOgZ8__|B1UE}wqez_dTiC|4Ih_SoHbIR0u| z@v}c{d*FEIA4m2-GA)0B?>8rY^|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3phiZUy0gOP5b>RzzKO^u7N3UNLS^g z+1A%I?bEkm>-EWV=Vr_1W&`72UUG6ne(?A4e~bpDGtW!}W+E^Xftd)*L|`TYGZC1H zz)S>YA}|wynF!28U?u|pha%vDEqHGu{@=BLPNR=^C!&w{9s*Vx5CWoKWk7x}!}9#j zg<-7$`MnVL@jgR9ycZD=Gyxk8=r`ax1GX@fe(+VY56*Q~jV^Xgd`N$63yc?W=$7la z_&vb`20jA%8UsH8ymgKpfA#-@vPREP);hj{0j+Z!rSL%3~3;0(g zlKM$J@}FApuUqi-64{NY%a4Grvy&XN(0eWTZVP_Uf*-fw-?!j@W5Lf`@b@hEZ!GvH zdAvZf;CM%C+F5XC9w+25@uDw4`xCT;C*PwYq}rp%VApXamcW*w}b=V$#c7k<^y*}*@sh;CInBB8cOH}S766#mtV zvNalS!*5S85KCYn+}?Rpy8Z(VrM)K}R$^UUkM|@<)#Pjz?2)_1i;?s+7qNjV?G?$_q z2__a{YMYahcv}PbrxE*PB-I#rcseSLB%9unLhT>Cq>yO|;g?p^2ryV54s4v->ipiA z25)yX6)^&=Y+1Gv8Dq&Xm3QN^RlFZUJ#7z%m~}%>XDml<#80&vqABc?9N7bIu}`~u z5-EM}s4Y>JXp6P%U>FZ|3h)F2CDPs9#lNmnwyCOunvv{^hhouGud<_-lyEzojwTb4 zNSo2=GCRDTt2S+DYF%DiyMmPVa6A>W^rKzj6zuGbbV36u@ld=g8H+>`78XueOP5p4 n(oIHUk#NdFNQK*DJ;@GIQen6lO7U;PQekM<(I+^Pd3O3=>2|a@ diff --git a/ESPlorer/src/libs/mac_os_x/libjSSC-2.8_ppc64.jnilib b/ESPlorer/src/libs/mac_os_x/libjSSC-2.8_ppc64.jnilib deleted file mode 100644 index f32ae9be7dbc03de74d8b22f8fc2b9ccd7b9bf39..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18696 zcmeHPeQ;aVl|N6CEtxoulDNUFjghH=q%oEg3?pL0${*}1bw~{{TbEL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7`d874s?ObPOhtgJ&Zvp&lpB7yqw z0z_;nH5e440QI@Xvs407>Y_*=z)ZPIg?JNRtA7Fb0B{j76L%>$0B!@^3D^Mm2A~=6 zO~9jorvTpr{21^i;1_@o02cxCp>wP8#_SBQnT*7Df96|2lV`=wTu`XT_g`M4KFj%j z>$;IkY2GG0PKJ>-;Zl`6z8yBx6X$iF{MKhMe=w@^?lpxjgW=Ul=`vztEWGr<548dL z4wp9N&4-oemAo?8+#`6u&(sG@8=L^99eBUb#QS}wegpIVpJ@n~HaTa|R{cX##39Rh zQHEbAZ05VbHau`L-t=A6WX5#u=?CCCeJf2^;vi)$zP~OFi*I4LeX$U zxzkl0Z*>)gcSJ%hfhaRO!mX|qEAv*dpt9N*TD5kKYvuA4D{klC8q``DZ2H`_;@bkB zyN*BhxvPXC;m=*Cr4d!aP0CJxG~ikvXbnX177aG2RYENxB@~FcmZ7}G9}UG^_*MP^ zm%A~fgrn%(9eFEOEL)Mca^>3P_@%PCwxZtG;K!q`#@(&{9iax17xd%xn_kcYW^DHk zSvZFAs!K1`3uAm^r8A;|mM|0m3&7Vq*)IR*gm4Nx>R}=#lmgffw#)x9Asj^BIu6=}zkO4#5WxRQA#@{8 zIW|vSl)DGOKCs_>k4*5IodSd-d^53(X&-=j`lJkTjk0XR zOl+6%9e^qK3glja+*(t}kRi!)gDJ=T^c>`}SYRY`9M6C@<#-km%Y>+*Oj;LY8PmT4 zOgWx)wnA>XEYUwqJHKp^<2j}aa@J((`^h!R9Uqr-UP<4-Lyk75{jMbU&bZta^$kD{ vcgtZQnK%yqo@^%5e(!@}j)`SUVU%(U!^{q&jD2$fn0Bu~9MQA#)0F!k%VSY8 diff --git a/ESPlorer/src/libs/solaris/libjSSC-2.8_x86_64.so b/ESPlorer/src/libs/solaris/libjSSC-2.8_x86_64.so deleted file mode 100644 index b67dccbaeb465a07a75d914b8f5a9be260806a3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17832 zcmeHOeQ=w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tC!Zs_fLOy8z&*LUcH`jEa; z-=z=hyY)T#h(4)Ci59>#C7W4!Qf`!3ij5kw)r9p47ELa|_2y#I&s0Q_5 zWw0hVJ6IQN55|JYpcU*2uEN@A4Mw94!Cs6=n}VA$r}YQ71V=+-p+lh~p@ML6xHMcA z=E7>YCR`U@6mAa3u%_q^_k=fwH-~qGhr+|*J>k9Kec{7lT1*|n>owzMbM@R}j9+Uo zUTxy~xB+e(H^}Yec5@@#7`LB0!g+kfzA3&kUxiP_NMGk`^fmk1eIAT6UW_iBpbIrZ z9me)%j4c*Ml{FYoHeoCoz$mgqpdL!SlX@ogO6rl+8>uH!FQgtwy^nex^*ZWt)Z3`1 zQ7@w&M!k!A7WFFXQPi8LCs8k=9z?xo5bHSVKh$@q-%y{S{z83)`U&+B>L1iMs9#W@ zp#DI8f%*aU0c!u$_Nm=do2T|pZJpXVwQ*|S)V8TzQ=6vtOl^5k-QpkcZ}o5UZ};!; z5Bi7vJN>)-!~Wg=J^m5@sDH12%)igS-+#z|*nh;&0-iuYpfKRJy$@@5Zd?1XHnv9Z y(KqP5`ewaP@7K4Cw>Y=8xh?JZ7KXa+&a>w(4_Cmk-aPy4m~rGPem$j diff --git a/ESPlorer/src/libs/windows/jSSC-2.8_x86_64.dll b/ESPlorer/src/libs/windows/jSSC-2.8_x86_64.dll deleted file mode 100644 index d4e19e069ffb54a74a00dd10f1108dcc0b5a5d06..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 122880 zcmdSC349bq_6I(bWMTq@4#!9kSVjz*C}0Lf6G(K1%wPv5ZV*u95HynYKt<^R55&Ql z0or!lc&@wadaplLUGGJRib;SBml|N@^guken-K-vjUlM>|Gui~IS^gq`v3ete?A{F z-Bqt%y?XWPy;rY}uAWkF$+TE3S@<81TP!Q^OaEN#@6Z1UAiMj(hVGWva^E?5h1K`Y z$rG=-dah&6O*j1RrpvE$)Lwr5^*1PvD`q)v@?Y<``g(`ww-X%K-EifsVR?C73I*yK zuf=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3VOf99BQ{_}8bv|WH+tZG; zGu@hYr#anq};n=8QAr%D6M#nSqQqqh!LF z=NuP!=e@Tnqkoio2{_g4ZCAG zB^S=k_kw3(V8OdEwxBG8ajt+l%ycrl CohQct diff --git a/ESPlorer/src/org/fife/io/DocumentReader.java b/ESPlorer/src/org/fife/io/DocumentReader.java deleted file mode 100644 index 70c090c..0000000 --- a/ESPlorer/src/org/fife/io/DocumentReader.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * 02/24/2004 - * - * DocumentReader.java - A reader for javax.swing.text.Document - * objects. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.io; - -import java.io.Reader; -import javax.swing.text.BadLocationException; -import javax.swing.text.Document; -import javax.swing.text.Segment; - - -/** - * A Reader for javax.swing.text.Document objects. - * - * @author Robert Futrell - * @version 1.0 - */ -public class DocumentReader extends Reader { - - /** - * The stream's position in the document. - */ - private long position; - - /** - * A remembered position in the document. - */ - private long mark; - - /** - * The document we're working on. - */ - private Document document; - - /** - * Used for fast character access. - */ - private Segment segment; - - - /** - * Constructor. - * - * @param document The document we're 'reading'. - */ - public DocumentReader(Document document) { - position = 0; - mark = -1; - this.document = document; - this.segment = new Segment(); - } - - - /** - * This currently does nothing... - */ - @Override - public void close() { - } - - - /** - * Marks the present position in the stream. Subsequent calls to - * reset() will reposition the stream to this point. - * - * @param readAheadLimit Ignored. - */ - @Override - public void mark(int readAheadLimit) { - mark = position; - } - - - /** - * Tells whether this reader supports the mark operation. - * This always returns true for DocumentReader. - */ - @Override - public boolean markSupported() { - return true; - } - - - /** - * Reads the single character at the current position in the document. - */ - @Override - public int read() { - if(position>=document.getLength()) { - return -1; // Read past end of document. - } - try { - document.getText((int)position,1, segment); - position++; - return segment.array[segment.offset]; - } catch (BadLocationException ble) { - /* Should never happen?? */ - ble.printStackTrace(); - return -1; - } - } - - - /** - * Read array.length characters from the beginning - * of the document into array. - * - * @param array The array to read characters into. - * @return The number of characters read. - */ - @Override - public int read(char array[]) { - return read(array, 0, array.length); - } - - - /** - * Reads characters into a portion of an array. - * - * @param cbuf The destination buffer. - * @param off Offset at which to start storing characters. - * @param len Maximum number of characters to read. - * @return The number of characters read, or -1 if the - * end of the stream (document) has been reached. - */ - @Override - public int read(char cbuf[], int off, int len) { - int k; - if(position>=document.getLength()) { - return -1; // Read past end of document. - } - k = len; - if((position+k)>=document.getLength()) - k = document.getLength() - (int)position; - if(off + k >= cbuf.length) - k = cbuf.length - off; - try { - document.getText((int)position, k, segment); - position += k; - System.arraycopy(segment.array,segment.offset, - cbuf,off, - k); - return k; - } catch (BadLocationException ble) { - /* Should never happen ? */ - return -1; - } - } - - - /** - * Tells whether this reader is ready to be read without - * blocking for input. DocumentReader will - * always return true. - * - * @return true if the next read operation will - * return without blocking. - */ - @Override - public boolean ready() { - return true; - } - - - /** - * Resets the stream. If the stream has been marked, then attempt to - * reposition it at the mark. If the stream has not been marked, then - * move it to the beginning of the document. - */ - @Override - public void reset() { - if(mark==-1) { - position = 0; - } - else { - position = mark; - mark = -1; - } - } - - - /** - * Skips characters. This will not 'skip' past the end of the document. - * - * @param n The number of characters to skip. - * @return The number of characters actually skipped. - */ - @Override - public long skip(long n) { - if (position+n<=document.getLength()) { - position += n; - return n; - } - long temp = position; - position = document.getLength(); - return document.getLength() - temp; - } - - - /** - * Move to the specified position in the document. If pos - * is greater than the document's length, the stream's position is moved - * to the end of the document. - * - * @param pos The position in the document to move to. - */ - public void seek(long pos) { - position = Math.min(pos, document.getLength()); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/io/UnicodeReader.java b/ESPlorer/src/org/fife/io/UnicodeReader.java deleted file mode 100644 index ece9624..0000000 --- a/ESPlorer/src/org/fife/io/UnicodeReader.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * 09/23/2004 - * - * UnicodeReader.java - A reader for Unicode input streams that is capable of - * discerning which particular encoding is being used via the BOM. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.io; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.io.PushbackInputStream; -import java.io.Reader; - - -/** - * A reader capable of identifying Unicode streams by their BOMs. This class - * will recognize the following encodings: - *

    - *
  • UTF-8 - *
  • UTF-16LE - *
  • UTF-16BE - *
  • UTF-32LE - *
  • UTF-32BE - *
- * If the stream is not found to be any of the above, then a default encoding - * is used for reading. The user can specify this default encoding, or a system - * default will be used.

- * - * For optimum performance, it is recommended that you wrap all instances of - * UnicodeReader with a java.io.BufferedReader.

- * - * This class is mostly ripped off from the workaround in the description of - * Java Bug 4508058. - * - * @author Robert Futrell - * @version 0.9 - */ -public class UnicodeReader extends Reader { - - /** - * The input stream from which we're really reading. - */ - private InputStreamReader internalIn = null; - - /** - * The encoding being used. We keep our own instead of using the string - * returned by java.io.InputStreamReader since that class - * does not return user-friendly names. - */ - private String encoding; - - /** - * The size of a BOM. - */ - private static final int BOM_SIZE = 4; - - - /** - * This utility constructor is here because you will usually use a - * UnicodeReader on files.

- * Creates a reader using the encoding specified by the BOM in the file; - * if there is no recognized BOM, then a system default encoding is used. - * - * @param file The file from which you want to read. - * @throws IOException If an error occurs when checking for/reading the - * BOM. - * @throws FileNotFoundException If the file does not exist, is a - * directory, or cannot be opened for reading. - * @throws SecurityException If a security manager exists and its - * checkRead method denies read access to the file. - */ - public UnicodeReader(String file) throws IOException, - FileNotFoundException, SecurityException { - this(new File(file)); - } - - - /** - * This utility constructor is here because you will usually use a - * UnicodeReader on files.

- * Creates a reader using the encoding specified by the BOM in the file; - * if there is no recognized BOM, then a system default encoding is used. - * - * @param file The file from which you want to read. - * @throws IOException If an error occurs when checking for/reading the - * BOM. - * @throws FileNotFoundException If the file does not exist, is a - * directory, or cannot be opened for reading. - * @throws SecurityException If a security manager exists and its - * checkRead method denies read access to the file. - */ - public UnicodeReader(File file) throws IOException, FileNotFoundException, - SecurityException { - this(new FileInputStream(file)); - } - - - /** - * This utility constructor is here because you will usually use a - * UnicodeReader on files.

- * Creates a reader using the encoding specified by the BOM in the file; - * if there is no recognized BOM, then a specified default encoding is - * used. - * - * @param file The file from which you want to read. - * @param defaultEncoding The encoding to use if no BOM is found. If - * this value is null, a system default is used. - * @throws IOException If an error occurs when checking for/reading the - * BOM. - * @throws FileNotFoundException If the file does not exist, is a - * directory, or cannot be opened for reading. - * @throws SecurityException If a security manager exists and its - * checkRead method denies read access to the file. - */ - public UnicodeReader(File file, String defaultEncoding) - throws IOException, FileNotFoundException, - SecurityException { - this(new FileInputStream(file), defaultEncoding); - } - - - /** - * Creates a reader using the encoding specified by the BOM in the file; - * if there is no recognized BOM, then a system default encoding is used. - * - * @param in The input stream from which to read. - * @throws IOException If an error occurs when checking for/reading the - * BOM. - */ - public UnicodeReader(InputStream in) throws IOException { - this(in, null); - } - - - /** - * Creates a reader using the encoding specified by the BOM in the file; - * if there is no recognized BOM, then defaultEncoding is - * used. - * - * @param in The input stream from which to read. - * @param defaultEncoding The encoding to use if no recognized BOM is - * found. If this value is null, a system default - * is used. - * @throws IOException If an error occurs when checking for/reading the - * BOM. - */ - public UnicodeReader(InputStream in, String defaultEncoding) - throws IOException { - init(in, defaultEncoding); - } - - - /** - * Closes this reader. - */ - @Override - public void close() throws IOException { - internalIn.close(); - } - - - /** - * Returns the encoding being used to read this input stream (i.e., the - * encoding of the file). If a BOM was recognized, then the specific - * Unicode type is returned; otherwise, either the default encoding passed - * into the constructor or the system default is returned. - * - * @return The encoding of the stream. - */ - public String getEncoding() { - return encoding; - } - - - /** - * Read-ahead four bytes and check for BOM marks. Extra bytes are - * unread back to the stream, only BOM bytes are skipped. - * - * @param defaultEncoding The encoding to use if no BOM was recognized. If - * this value is null, then a system default is used. - * @throws IOException If an error occurs when trying to read a BOM. - */ - protected void init(InputStream in, String defaultEncoding) - throws IOException { - - PushbackInputStream tempIn = new PushbackInputStream(in, BOM_SIZE); - - byte bom[] = new byte[BOM_SIZE]; - int n, unread; - n = tempIn.read(bom, 0, bom.length); - - if ((bom[0]==(byte)0x00) && (bom[1]==(byte)0x00) && - (bom[2]==(byte)0xFE) && (bom[3]==(byte)0xFF)) { - encoding = "UTF-32BE"; - unread = n - 4; - } - - else if (n==BOM_SIZE && // Last 2 bytes are 0; could be an empty UTF-16 - (bom[0]==(byte)0xFF) && (bom[1]==(byte)0xFE) && - (bom[2]==(byte)0x00) && (bom[3]==(byte)0x00)) { - encoding = "UTF-32LE"; - unread = n - 4; - } - - else if ((bom[0]==(byte)0xEF) && - (bom[1]==(byte)0xBB) && - (bom[2]==(byte)0xBF)) { - encoding = "UTF-8"; - unread = n - 3; - } - - else if ((bom[0]==(byte)0xFE) && (bom[1] == (byte)0xFF)) { - encoding = "UTF-16BE"; - unread = n - 2; - } - - else if ((bom[0]==(byte)0xFF) && (bom[1]== (byte)0xFE)) { - encoding = "UTF-16LE"; - unread = n - 2; - } - - else { - // Unicode BOM mark not found, unread all bytes - encoding = defaultEncoding; - unread = n; - } - - if (unread > 0) - tempIn.unread(bom, (n - unread), unread); - else if (unread < -1) - tempIn.unread(bom, 0, 0); - - // Use given encoding - if (encoding == null) { - internalIn = new InputStreamReader(tempIn); - encoding = internalIn.getEncoding(); // Get the default. - } - else { - internalIn = new InputStreamReader(tempIn, encoding); - } - - } - - - /** - * Read characters into a portion of an array. This method will block until - * some input is available, an I/O error occurs, or the end of the stream - * is reached. - * - * @param cbuf The buffer into which to read. - * @param off The offset at which to start storing characters. - * @param len The maximum number of characters to read. - * - * @return The number of characters read, or -1 if the end - * of the stream has been reached. - */ - @Override - public int read(char[] cbuf, int off, int len) throws IOException { - return internalIn.read(cbuf, off, len); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/io/UnicodeWriter.java b/ESPlorer/src/org/fife/io/UnicodeWriter.java deleted file mode 100644 index 97b57c6..0000000 --- a/ESPlorer/src/org/fife/io/UnicodeWriter.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * 09/24/2004 - * - * UnicodeWriter.java - Writes Unicode output with the proper BOM. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.io; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.UnsupportedEncodingException; -import java.io.Writer; - - -/** - * Writes Unicode text to an output stream. If the specified encoding is a - * Unicode, then the text is preceded by the proper Unicode BOM. If it is any - * other encoding, this class behaves just like OutputStreamWriter. - * This class is here because Java's OutputStreamWriter apparently - * doesn't believe in writing BOMs. - *

- * - * For optimum performance, it is recommended that you wrap all instances of - * UnicodeWriter with a java.io.BufferedWriter. - * - * @author Robert Futrell - * @version 0.7 - */ -public class UnicodeWriter extends Writer { - - /** - * If this system property evaluates to "false", ignoring - * case, files written out as UTF-8 will not have a BOM written for them. - * Otherwise (even if the property is not set), UTF-8 files will have a - * BOM written. - */ - public static final String PROPERTY_WRITE_UTF8_BOM = - "UnicodeWriter.writeUtf8BOM"; - - - /** - * The writer actually doing the writing. - */ - private OutputStreamWriter internalOut; - - private static final byte[] UTF8_BOM = new byte[] { - (byte)0xEF, - (byte)0xBB, - (byte)0xBF - }; - - private static final byte[] UTF16LE_BOM = new byte[] { - (byte)0xFF, - (byte)0xFE - }; - - private static final byte[] UTF16BE_BOM = new byte[] { - (byte)0xFE, - (byte)0xFF - }; - - private static final byte[] UTF32LE_BOM = new byte[] { - (byte)0xFF, - (byte)0xFE, - (byte)0x00, - (byte)0x00 - }; - - private static final byte[] UTF32BE_BOM = new byte[] { - (byte)0x00, - (byte)0x00, - (byte)0xFE, - (byte)0xFF - }; - - - /** - * This is a utility constructor since the vast majority of the time, this - * class will be used to write Unicode files. - * - * @param fileName The file to which to write the Unicode output. - * @param encoding The encoding to use. - * @throws UnsupportedEncodingException If the specified encoding is not - * supported. - * @throws IOException If an IO exception occurs. - */ - public UnicodeWriter(String fileName, String encoding) - throws UnsupportedEncodingException, IOException { - this(new FileOutputStream(fileName), encoding); - } - - - - /** - * This is a utility constructor since the vast majority of the time, this - * class will be used to write Unicode files. - * - * @param file The file to which to write the Unicode output. - * @param encoding The encoding to use. - * @throws UnsupportedEncodingException If the specified encoding is not - * supported. - * @throws IOException If an IO exception occurs. - */ - public UnicodeWriter(File file, String encoding) - throws UnsupportedEncodingException, IOException { - this(new FileOutputStream(file), encoding); - } - - - - /** - * Creates a new writer. - * - * @param out The output stream to write. - * @param encoding The encoding to use. - * @throws UnsupportedEncodingException If the specified encoding is not - * supported. - * @throws IOException If an IO exception occurs. - */ - public UnicodeWriter(OutputStream out, String encoding) - throws UnsupportedEncodingException, IOException { - init(out, encoding); - } - - - /** - * Closes this writer. - * - * @throws IOException If an IO exception occurs. - */ - @Override - public void close() throws IOException { - internalOut.close(); - } - - - /** - * Flushes the stream. - * - * @throws IOException If an IO exception occurs. - */ - @Override - public void flush() throws IOException { - internalOut.flush(); - } - - - /** - * Returns the encoding being used to write this output stream (i.e., the - * encoding of the file). - * - * @return The encoding of the stream. - */ - public String getEncoding() { - return internalOut.getEncoding(); - } - - - /** - * Returns whether UTF-8 files should have a BOM in them when written. - * - * @return Whether to write a BOM for UTF-8 files. - * @see #setWriteUtf8BOM(boolean) - * @see UnicodeWriter - */ - public static boolean getWriteUtf8BOM() { - String prop = System.getProperty(PROPERTY_WRITE_UTF8_BOM); - // We default to writing the BOM, for some reason. - if (prop!=null && Boolean.valueOf(prop).equals(Boolean.FALSE)) { - return false; - } - return true; - } - - - /** - * Initializes the internal output stream and writes the BOM if the - * specified encoding is a Unicode encoding. - * - * @param out The output stream we are writing. - * @param encoding The encoding in which to write. - * @throws UnsupportedEncodingException If the specified encoding isn't - * supported. - * @throws IOException If an I/O error occurs while writing a BOM. - */ - private void init(OutputStream out, String encoding) - throws UnsupportedEncodingException, IOException { - - internalOut = new OutputStreamWriter(out, encoding); - - // Write the proper BOM if they specified a Unicode encoding. - // NOTE: Creating an OutputStreamWriter with encoding "UTF-16" DOES - // DOES write out the BOM; "UTF-16LE", "UTF-16BE", "UTF-32", "UTF-32LE" - // and "UTF-32BE" don't. - if ("UTF-8".equals(encoding)) { - if (getWriteUtf8BOM()) { - out.write(UTF8_BOM, 0, UTF8_BOM.length); - } - } - else if ("UTF-16LE".equals(encoding)) { - out.write(UTF16LE_BOM, 0, UTF16LE_BOM.length); - } - else if (/*"UTF-16".equals(encoding) || */"UTF-16BE".equals(encoding)) { - out.write(UTF16BE_BOM, 0, UTF16BE_BOM.length); - } - else if ("UTF-32LE".equals(encoding)) { - out.write(UTF32LE_BOM, 0, UTF32LE_BOM.length); - } - else if ("UTF-32".equals(encoding) || "UTF-32BE".equals(encoding)) { - out.write(UTF32BE_BOM, 0, UTF32BE_BOM.length); - } - - } - - - /** - * Sets whether UTF-8 files should have a BOM written in them. - * - * @param write Whether to write a BOM. - * @see #getWriteUtf8BOM() - * @see UnicodeWriter - */ - public static void setWriteUtf8BOM(boolean write) { - System.setProperty(UnicodeWriter.PROPERTY_WRITE_UTF8_BOM, - Boolean.toString(write)); - } - - - /** - * Writes a portion of an array of characters. - * - * @param cbuf The buffer of characters. - * @param off The offset from which to start writing characters. - * @param len The number of characters to write. - * @throws IOException If an I/O error occurs. - */ - @Override - public void write(char[] cbuf, int off, int len) throws IOException { - internalOut.write(cbuf, off, len); - } - - - /** - * Writes a single character. - * - * @param c An integer specifying the character to write. - * @throws IOException If an IO error occurs. - */ - @Override - public void write(int c) throws IOException { - internalOut.write(c); - } - - - /** - * Writes a portion of a string. - * - * @param str The string from which to write. - * @param off The offset from which to start writing characters. - * @param len The number of characters to write. - * @throws IOException If an IO error occurs. - */ - @Override - public void write(String str, int off, int len) throws IOException { - internalOut.write(str, off, len); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/io/package.html b/ESPlorer/src/org/fife/io/package.html deleted file mode 100644 index 1232ab4..0000000 --- a/ESPlorer/src/org/fife/io/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - - Utility I/O classes. - - diff --git a/ESPlorer/src/org/fife/print/RPrintUtilities.java b/ESPlorer/src/org/fife/print/RPrintUtilities.java deleted file mode 100644 index 2e53b82..0000000 --- a/ESPlorer/src/org/fife/print/RPrintUtilities.java +++ /dev/null @@ -1,530 +0,0 @@ -/* - * 11/14/2003 - * - * RPrintUtilities.java - A collection of static methods useful for printing - * text from Swing text components. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.print; - -import javax.swing.text.BadLocationException; -import javax.swing.text.Document; -import javax.swing.text.Element; -import javax.swing.text.Segment; -import javax.swing.text.JTextComponent; -import javax.swing.text.TabExpander; -import javax.swing.text.Utilities; -import java.awt.Color; -import java.awt.Font; -import java.awt.FontMetrics; -import java.awt.Graphics; -import java.awt.print.*; - - - -/** - * A collection of static methods useful for printing text from Swing text components. - * - * @author Robert Futrell - * @version 1.0 - */ -public abstract class RPrintUtilities { - - private static int currentDocLineNumber; // The line number in the document we are currently on. - private static int numDocLines; // The number of lines in the current document. - private static Element rootElement; // The first Element (line) in the current document. - - // The characters at which to break a line if implementing word wrap. - private static final char [] breakChars = { ' ', '\t', ',', '.', ';', '?', '!' }; - - // These variables are 'global' because RPrintTabExpander uses them. - private static int xOffset; // The x-offset (for the page margin) when printing. - private static int tabSizeInSpaces; // The length of a tab, in spaces. - private static FontMetrics fm; // The metrics of the font currently being used to print. - - - /** - * Returns the position closest to, but before, position maxCharsPerLine in - * line of one of the chars in breakChars, or simply returns - * maxCharsPerLine-1 if none of the breakChars comes before - * that position. This position represents the logical line break for this java.lang.String - * if it is being printed in a monospaced font when lines can only be maxCharsPerLine - * characters long. - * - * @param line The text being printed. - * @param maxCharsPerLine Only up-to this many characters from - * line can be printed on one line. - * @return The logical position at which to stop printing line - * to simulate word wrap. - */ - private static int getLineBreakPoint(String line, final int maxCharsPerLine) { - - int breakPoint = -1; - for (int i=0; i breakPoint) - breakPoint = breakCharPos; - } - - return (breakPoint==-1 ? maxCharsPerLine-1 : breakPoint); - - } - - - /** - * Prints a Document using a monospaced font, and does no word wrapping (ie, - * words will wrap mid-word to the next line). This method is expected to be called from - * Printable 'print(Graphics g)' functions. - * - * @param g The graphics context to write to. - * @param doc The javax.swing.text.Document to print. - * @param fontSize the point size to use for the monospaced font. - * @param pageIndex The page number to print. - * @param pageFormat The format to print the page with. - * @param tabSize The number of spaces to expand tabs to. - * - * @see #printDocumentMonospacedWordWrap - */ - public static int printDocumentMonospaced(Graphics g, Document doc, int fontSize, int pageIndex, - PageFormat pageFormat, int tabSize) { - - g.setColor(Color.BLACK); - g.setFont(new Font("Monospaced", Font.PLAIN, fontSize)); - - // Initialize our static variables (these are used by our tab expander below). - tabSizeInSpaces = tabSize; - fm = g.getFontMetrics(); - - // Create our tab expander. - //RPrintTabExpander tabExpander = new RPrintTabExpander(); - - // Get width and height of characters in this monospaced font. - int fontWidth = fm.charWidth('w'); // Any character will do as font is monospaced. - int fontHeight = fm.getHeight(); - - int MAX_CHARS_PER_LINE = (int)pageFormat.getImageableWidth() / fontWidth; - int MAX_LINES_PER_PAGE = (int)pageFormat.getImageableHeight() / fontHeight; - - final int STARTING_LINE_NUMBER = MAX_LINES_PER_PAGE * pageIndex; - - // The (x,y) coordinate to print at (in pixels, not characters). - // Since y is the baseline of where we'll start printing (not the top-left - // corner), we offset it by the font's ascent ( + 1 just for good measure). - xOffset = (int)pageFormat.getImageableX(); - int y = (int)pageFormat.getImageableY() + fm.getAscent() + 1; - - // A counter to keep track of the number of lines that WOULD HAVE been - // printed if we were printing all lines. - int numPrintedLines = 0; - - // Keep going while there are more lines in the document. - currentDocLineNumber = 0; // The line number of the document we're currently on. - rootElement = doc.getDefaultRootElement(); // To shorten accesses in our loop. - numDocLines = rootElement.getElementCount(); // The number of lines in our document. - while (currentDocLineNumber -1) { - int spacesNeeded = tabSizeInSpaces - (tabIndex % tabSizeInSpaces); - String replacementString = ""; - for (int i=0; i MAX_CHARS_PER_LINE) { - - numPrintedLines++; - if (numPrintedLines > STARTING_LINE_NUMBER) { - g.drawString(curLineString.substring(0,MAX_CHARS_PER_LINE), xOffset,y); - y += fontHeight; - if (numPrintedLines==STARTING_LINE_NUMBER+MAX_LINES_PER_PAGE) - return Printable.PAGE_EXISTS; - } - - curLineString = curLineString.substring(MAX_CHARS_PER_LINE, curLineString.length()); - - } - - currentDocLineNumber += 1; // We have printed one more line from the document. - - numPrintedLines++; - if (numPrintedLines>STARTING_LINE_NUMBER) { - g.drawString(curLineString, xOffset,y); - y += fontHeight; - if (numPrintedLines==STARTING_LINE_NUMBER+MAX_LINES_PER_PAGE) - return Printable.PAGE_EXISTS; - } - - - } - - // Now, the whole document has been "printed." Decide if this page had any text on it or not. - if (numPrintedLines > STARTING_LINE_NUMBER) - return Printable.PAGE_EXISTS; - return Printable.NO_SUCH_PAGE; - - } - - - /** - * Prints a Document using a monospaced font, word wrapping on - * the characters ' ', '\t', '\n', ',', '.', and ';'. This method is - * expected to be called from Printable 'print(Graphics g)' functions. - * - * @param g The graphics context to write to. - * @param doc The javax.swing.text.Document to print. - * @param fontSize the point size to use for the monospaced font. - * @param pageIndex The page number to print. - * @param pageFormat The format to print the page with. - * @param tabSize The number of spaces to expand tabs to. - * - * @see #printDocumentMonospaced - */ - public static int printDocumentMonospacedWordWrap(Graphics g, Document doc, - int fontSize, int pageIndex, - PageFormat pageFormat, int tabSize) { - - g.setColor(Color.BLACK); - g.setFont(new Font("Monospaced", Font.PLAIN, fontSize)); - - // Initialize our static variables (these are used by our tab expander below). - tabSizeInSpaces = tabSize; - fm = g.getFontMetrics(); - - // Create our tab expander. - //RPrintTabExpander tabExpander = new RPrintTabExpander(); - - // Get width and height of characters in this monospaced font. - int fontWidth = fm.charWidth('w'); // Any character will do here, since font is monospaced. - int fontHeight = fm.getHeight(); - - int MAX_CHARS_PER_LINE = (int)pageFormat.getImageableWidth() / fontWidth; - int MAX_LINES_PER_PAGE = (int)pageFormat.getImageableHeight() / fontHeight; - - final int STARTING_LINE_NUMBER = MAX_LINES_PER_PAGE * pageIndex; - - // The (x,y) coordinate to print at (in pixels, not characters). - // Since y is the baseline of where we'll start printing (not the top-left - // corner), we offset it by the font's ascent ( + 1 just for good measure). - xOffset = (int)pageFormat.getImageableX(); - int y = (int)pageFormat.getImageableY() + fm.getAscent() + 1; - - // A counter to keep track of the number of lines that WOULD HAVE been - // printed if we were printing all lines. - int numPrintedLines = 0; - - // Keep going while there are more lines in the document. - currentDocLineNumber = 0; // The line number of the document we're currently on. - rootElement = doc.getDefaultRootElement(); // To shorten accesses in our loop. - numDocLines = rootElement.getElementCount(); // The number of lines in our document. - while (currentDocLineNumber -1) { - int spacesNeeded = tabSizeInSpaces - (tabIndex % tabSizeInSpaces); - String replacementString = ""; - for (int i=0; i MAX_CHARS_PER_LINE) { - - int breakPoint = getLineBreakPoint(curLineString, MAX_CHARS_PER_LINE) + 1; - - numPrintedLines++; - if (numPrintedLines > STARTING_LINE_NUMBER) { - g.drawString(curLineString.substring(0,breakPoint), xOffset,y); - y += fontHeight; - if (numPrintedLines==STARTING_LINE_NUMBER+MAX_LINES_PER_PAGE) - return Printable.PAGE_EXISTS; - } - - curLineString = curLineString.substring(breakPoint, curLineString.length()); - - } - - currentDocLineNumber += 1; // We have printed one more line from the document. - - numPrintedLines++; - if (numPrintedLines>STARTING_LINE_NUMBER) { - g.drawString(curLineString, xOffset,y); - y += fontHeight; - if (numPrintedLines==STARTING_LINE_NUMBER+MAX_LINES_PER_PAGE) - return Printable.PAGE_EXISTS; - } - - - } - - // Now, the whole document has been "printed." Decide if this page had any text on it or not. - if (numPrintedLines > STARTING_LINE_NUMBER) - return Printable.PAGE_EXISTS; - return Printable.NO_SUCH_PAGE; - - } - - - /** - * Prints a Document using the specified font, word wrapping - * on the characters ' ', '\t', '\n', ',', '.', and ';'. This method is - * expected to be called from Printable 'print(Graphics g)' functions. - * - * @param g The graphics context to write to. - * @param textComponent The javax.swing.text.JTextComponent - * whose text you're printing. - * @param font The font to use for printing. If null, then - * textComponent's font is used. - * @param pageIndex The page number to print. - * @param pageFormat The format to print the page with. - * @param tabSize The number of spaces to convert tabs to. - * - */ - public static int printDocumentWordWrap(Graphics g, JTextComponent textComponent, - Font font, int pageIndex, - PageFormat pageFormat, - int tabSize) { - - // Initialize our graphics object. - g.setColor(Color.BLACK); - g.setFont(font!=null ? font : textComponent.getFont()); - - // Initialize our static variables (these are used by our tab expander below). - tabSizeInSpaces = tabSize; - fm = g.getFontMetrics(); - int fontHeight = fm.getHeight(); - - final int LINE_LENGTH_IN_PIXELS = (int)pageFormat.getImageableWidth(); - final int MAX_LINES_PER_PAGE = (int)pageFormat.getImageableHeight() / fontHeight; - - final int STARTING_LINE_NUMBER = MAX_LINES_PER_PAGE * pageIndex; - - // Create our tab expander. - RPrintTabExpander tabExpander = new RPrintTabExpander(); - - // The (x,y) coordinate to print at (in pixels, not characters). - // Since y is the baseline of where we'll start printing (not the top-left - // corner), we offset it by the font's ascent ( + 1 just for good measure). - xOffset = (int)pageFormat.getImageableX(); - int y = (int)pageFormat.getImageableY() + fm.getAscent() + 1; - - // A counter to keep track of the number of lines that WOULD HAVE been - // printed if we were printing all lines. - int numPrintedLines = 0; - - // Keep going while there are more lines in the document. - Document doc = textComponent.getDocument(); - rootElement = doc.getDefaultRootElement(); - numDocLines = rootElement.getElementCount(); // The number of lines in our document. - currentDocLineNumber = 0; // The line number of the document we're currently on. - int startingOffset = 0; // Used when a line is so long it has to be wrapped. - while (currentDocLineNumber LINE_LENGTH_IN_PIXELS) { - -//System.err.println("'" + currentLineSeg + "' - " + currentLineLengthInPixels + "/" + LINE_LENGTH_IN_PIXELS); - - // Remove any spaces and/or tabs from the end of the segment (would cause problems if you left 'em). - currentLineSeg = removeEndingWhitespace(currentLineSeg); - - // currentPos will be the last position in the current text of a "line break character." - currentPos = -1; - String currentLineString = currentLineSeg.toString(); - for (int i=0; i-1 && pos>currentPos) - // currentPos = pos; - if (pos>0 && pos>currentPos & pos!=currentLineString.length()) - currentPos = pos; - } - - // If we didn't find a line break character, we'll simply break the line at - // the last character that fits on a printed line. - // So here, we set currentPos to be the position of the last character that fits - // on the current printed line. - if (currentPos == -1) { - - // Fix currentLineSeg so that it contains exactly enough text to fit in - // LINE_LENGTH_IN_PIXELS pixels... - currentPos = 0; - do { - currentPos++; - try { - doc.getText(currentLineStart+startingOffset, currentPos, currentLineSeg); - } catch (BadLocationException ble) { - System.err.println(ble); - return Printable.NO_SUCH_PAGE; - } - currentLineLengthInPixels = Utilities. - getTabbedTextWidth(currentLineSeg, fm, 0, tabExpander, 0); - } while (currentLineLengthInPixels <= LINE_LENGTH_IN_PIXELS); - currentPos--; - - } - - try { - doc.getText((currentLineStart+startingOffset), currentPos, currentLineSeg); - } catch (BadLocationException ble) { - System.err.println("BadLocationException in print (a):"); - System.err.println("==> currentLineStart: " + currentLineStart + - "; startingOffset: " + startingOffset + "; currentPos: " + currentPos); - System.err.println("==> Range: " + (currentLineStart+startingOffset) + " - " + - (currentLineStart+startingOffset+currentPos)); - ble.printStackTrace(); - return Printable.NO_SUCH_PAGE; - } - - currentLineLengthInPixels = Utilities.getTabbedTextWidth(currentLineSeg, fm, 0, tabExpander, 0); - } // End of while (currentLineLengthInPixels > LINE_LENGTH_IN_PIXELS). - - startingOffset += currentPos; // Where to start (offset from line's start), since this line wraps. - - } // End of else. - - numPrintedLines++; - if (numPrintedLines>STARTING_LINE_NUMBER) { - //g.drawString(currentLineSeg.toString(), xOffset,y); - Utilities.drawTabbedText(currentLineSeg, xOffset,y, g, tabExpander, 0); - y += fontHeight; - if (numPrintedLines==STARTING_LINE_NUMBER+MAX_LINES_PER_PAGE) - return Printable.PAGE_EXISTS; - } - - } - - // Now, the whole document has been "printed." Decide if this page had any text on it or not. - if (numPrintedLines > STARTING_LINE_NUMBER) - return Printable.PAGE_EXISTS; - return Printable.NO_SUCH_PAGE; - - } - - - /** - * Removes any spaces or tabs from the end of the segment. - * - * @param segment The segment from which to remove tailing whitespace. - * @return segment with trailing whitespace removed. - */ - private static Segment removeEndingWhitespace(Segment segment) { - int toTrim = 0; - char currentChar = segment.setIndex(segment.getEndIndex()-1); - while ((currentChar==' ' || currentChar=='\t') && currentChar!=Segment.DONE) { - toTrim++; - currentChar = segment.previous(); - } - String stringVal = segment.toString(); - String newStringVal = stringVal.substring(0,stringVal.length()-toTrim); - return new Segment(newStringVal.toCharArray(), 0, newStringVal.length()); - } - - - /** - * A tab expander for the document currently being printed with the - * font being used for the printing. - */ - private static class RPrintTabExpander implements TabExpander { - - RPrintTabExpander() { - } - - public float nextTabStop(float x, int tabOffset) { - if (tabSizeInSpaces == 0) - return x; - int tabSizeInPixels = tabSizeInSpaces * fm.charWidth(' '); - int ntabs = (((int) x) - xOffset) / tabSizeInPixels; - return xOffset + ((ntabs + 1) * tabSizeInPixels); - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/print/package.html b/ESPlorer/src/org/fife/print/package.html deleted file mode 100644 index 9328d2a..0000000 --- a/ESPlorer/src/org/fife/print/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - - Utility methods for printing text in a JTextComponent. - - diff --git a/ESPlorer/src/org/fife/ui/autocomplete/AbstractCompletion.java b/ESPlorer/src/org/fife/ui/autocomplete/AbstractCompletion.java deleted file mode 100644 index c0ae083..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/AbstractCompletion.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * 12/21/2008 - * - * AbstractCompletion.java - Base class for possible completions. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import javax.swing.Icon; -import javax.swing.text.JTextComponent; - - -/** - * Base class for possible completions. Most, if not all, {@link Completion} - * implementations can extend this class. It remembers the - * CompletionProvider that returns this completion, and also implements - * Comparable, allowing such completions to be compared - * lexicographically (ignoring case).

- * - * This implementation assumes the input text and replacement text are the - * same value. It also returns the input text from its {@link #toString()} - * method (which is what DefaultListCellRenderer uses to render - * objects). Subclasses that wish to override any of this behavior can simply - * override the corresponding method(s) needed to do so. - * - * @author Robert Futrell - * @version 1.0 - */ -public abstract class AbstractCompletion implements Completion { - - /** - * The provider that created this completion; - */ - private CompletionProvider provider; - - /** - * The icon to use for this completion. - */ - private Icon icon; - - /** - * The relevance of this completion. Completion instances with higher - * "relevance" values are inserted higher into the list of possible - * completions than those with lower values. Completion instances with - * equal relevance values are sorted alphabetically. - */ - private int relevance; - - - /** - * Constructor. - * - * @param provider The provider that created this completion. - */ - protected AbstractCompletion(CompletionProvider provider) { - this.provider = provider; - } - - - /** - * Constructor. - * - * @param provider The provider that created this completion. - * @param icon The icon for this completion. - */ - protected AbstractCompletion(CompletionProvider provider, Icon icon) { - this(provider); - setIcon(icon); - } - - - /** - * {@inheritDoc} - */ - public int compareTo(Completion c2) { - if (c2==this) { - return 0; - } - else if (c2!=null) { - return toString().compareToIgnoreCase(c2.toString()); - } - return -1; - } - - - /** - * {@inheritDoc} - */ - public String getAlreadyEntered(JTextComponent comp) { - return provider.getAlreadyEnteredText(comp); - } - - - /** - * {@inheritDoc} - */ - public Icon getIcon() { - return icon; - } - - - /** - * Returns the text the user has to (start) typing for this completion - * to be offered. The default implementation simply returns - * {@link #getReplacementText()}. - * - * @return The text the user has to (start) typing for this completion. - * @see #getReplacementText() - */ - public String getInputText() { - return getReplacementText(); - } - - - /** - * {@inheritDoc} - */ - public CompletionProvider getProvider() { - return provider; - } - - - /** - * {@inheritDoc} - */ - public int getRelevance() { - return relevance; - } - - - /** - * The default implementation returns null. Subclasses - * can override this method. - * - * @return The tool tip text. - */ - public String getToolTipText() { - return null; - } - - - /** - * Sets the icon to use for this completion. - * - * @param icon The icon to use. - * @see #getIcon() - */ - public void setIcon(Icon icon) { - this.icon = icon; - } - - - /** - * Sets the relevance of this completion. - * - * @param relevance The new relevance of this completion. - * @see #getRelevance() - */ - public void setRelevance(int relevance) { - this.relevance = relevance; - } - - - /** - * Returns a string representation of this completion. The default - * implementation returns {@link #getInputText()}. - * - * @return A string representation of this completion. - */ - @Override - public String toString() { - return getInputText(); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/AbstractCompletionProvider.java b/ESPlorer/src/org/fife/ui/autocomplete/AbstractCompletionProvider.java deleted file mode 100644 index 1cfe3cf..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/AbstractCompletionProvider.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * 12/21/2008 - * - * AbstractCompletionProvider.java - Base class for completion providers. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.List; - -import javax.swing.text.JTextComponent; - - -/** - * A base class for completion providers. {@link Completion}s are kept in - * a sorted list. To get the list of completions that match a given input, - * a binary search is done to find the first matching completion, then all - * succeeding completions that also match are also returned. - * - * @author Robert Futrell - * @version 1.0 - */ -public abstract class AbstractCompletionProvider - extends CompletionProviderBase { - - /** - * The completions this provider is aware of. Subclasses should ensure - * that this list is sorted alphabetically (case-insensitively). - */ - protected List completions; - - /** - * Compares a {@link Completion} against a String. - */ - protected CaseInsensitiveComparator comparator; - - - /** - * Constructor. - */ - public AbstractCompletionProvider() { - comparator = new CaseInsensitiveComparator(); - clearParameterizedCompletionParams(); - completions = new ArrayList(); - } - - - /** - * Adds a single completion to this provider. If you are adding multiple - * completions to this provider, for efficiency reasons please consider - * using {@link #addCompletions(List)} instead. - * - * @param c The completion to add. - * @throws IllegalArgumentException If the completion's provider isn't - * this CompletionProvider. - * @see #addCompletions(List) - * @see #removeCompletion(Completion) - * @see #clear() - */ - public void addCompletion(Completion c) { - checkProviderAndAdd(c); - Collections.sort(completions); - } - - - /** - * Adds {@link Completion}s to this provider. - * - * @param completions The completions to add. This cannot be - * null. - * @throws IllegalArgumentException If a completion's provider isn't - * this CompletionProvider. - * @see #addCompletion(Completion) - * @see #removeCompletion(Completion) - * @see #clear() - */ - public void addCompletions(List completions) { - //this.completions.addAll(completions); - for (Completion c : completions) { - checkProviderAndAdd(c); - } - Collections.sort(this.completions); - } - - - /** - * Adds simple completions for a list of words. - * - * @param words The words. - * @see BasicCompletion - */ - protected void addWordCompletions(String[] words) { - int count = words==null ? 0 : words.length; - for (int i=0; iCompletionProvider, if there is one. - * - * @see #addCompletion(Completion) - * @see #addCompletions(List) - * @see #removeCompletion(Completion) - */ - public void clear() { - completions.clear(); - } - - - /** - * Returns a list of Completions in this provider with the - * specified input text. - * - * @param inputText The input text to search for. - * @return A list of {@link Completion}s, or null if there - * are no matching Completions. - */ - @SuppressWarnings("unchecked") - public List getCompletionByInputText(String inputText) { - - // Find any entry that matches this input text (there may be > 1). - int end = Collections.binarySearch(completions, inputText, comparator); - if (end<0) { - return null; - } - - // There might be multiple entries with the same input text. - int start = end; - while (start>0 && - comparator.compare(completions.get(start-1), inputText)==0) { - start--; - } - int count = completions.size(); - while (++end getCompletionsImpl(JTextComponent comp) { - - List retVal = new ArrayList(); - String text = getAlreadyEnteredText(comp); - - if (text!=null) { - - int index = Collections.binarySearch(completions, text, comparator); - if (index<0) { // No exact match - index = -index - 1; - } - else { - // If there are several overloads for the function being - // completed, Collections.binarySearch() will return the index - // of one of those overloads, but we must return all of them, - // so search backward until we find the first one. - int pos = index - 1; - while (pos>0 && - comparator.compare(completions.get(pos), text)==0) { - retVal.add(completions.get(pos)); - pos--; - } - } - - while (indextrue if this provider contained the specified - * completion. - * @see #clear() - * @see #addCompletion(Completion) - * @see #addCompletions(List) - */ - public boolean removeCompletion(Completion c) { - // Don't just call completions.remove(c) as it'll be a linear search. - int index = Collections.binarySearch(completions, c); - if (index<0) { - return false; - } - completions.remove(index); - return true; - } - - - /** - * A comparator that compares the input text of a {@link Completion} - * against a String lexicographically, ignoring case. - */ - @SuppressWarnings("rawtypes") - public static class CaseInsensitiveComparator implements Comparator, - Serializable { - - public int compare(Object o1, Object o2) { - String s1 = o1 instanceof String ? (String)o1 : - ((Completion)o1).getInputText(); - String s2 = o2 instanceof String ? (String)o2 : - ((Completion)o2).getInputText(); - return String.CASE_INSENSITIVE_ORDER.compare(s1, s2); - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow.java b/ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow.java deleted file mode 100644 index a6db32c..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/AutoCompleteDescWindow.java +++ /dev/null @@ -1,591 +0,0 @@ -/* - * 12/21/2008 - * - * AutoCompleteDescWindow.java - A window containing a description of the - * currently selected completion. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.BorderLayout; -import java.awt.Component; -import java.awt.ComponentOrientation; -import java.awt.Graphics; -import java.awt.Insets; -import java.awt.Window; -import java.awt.event.ActionEvent; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; -import java.util.ResourceBundle; -import javax.swing.AbstractAction; -import javax.swing.Action; -import javax.swing.BorderFactory; -import javax.swing.Icon; -import javax.swing.ImageIcon; -import javax.swing.JButton; -import javax.swing.JEditorPane; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JToolBar; -import javax.swing.JWindow; -import javax.swing.SwingUtilities; -import javax.swing.Timer; -import javax.swing.UIManager; -import javax.swing.border.AbstractBorder; -import javax.swing.border.Border; -import javax.swing.event.HyperlinkEvent; -import javax.swing.event.HyperlinkListener; - -import org.fife.ui.rsyntaxtextarea.PopupWindowDecorator; - - -/** - * The optional "description" window that describes the currently selected - * item in the auto-completion window. - * - * @author Robert Futrell - * @version 1.0 - */ -class AutoCompleteDescWindow extends JWindow implements HyperlinkListener, - DescWindowCallback { - - /** - * The parent AutoCompletion instance. - */ - private AutoCompletion ac; - - /** - * Renders the HTML description. - */ - private JEditorPane descArea; - - /** - * The scroll pane that {@link #descArea} is in. - */ - private JScrollPane scrollPane; - - /** - * The bottom panel, containing the toolbar and size grip. - */ - private JPanel bottomPanel; - - /** - * The toolbar with "back" and "forward" buttons. - */ - private JToolBar descWindowNavBar; - - /** - * Action that goes to the previous description displayed. - */ - private Action backAction; - - /** - * Action that goes to the next description displayed. - */ - private Action forwardAction; - - /** - * History of descriptions displayed. - */ - private List history; - - /** - * The current position in {@link #history}. - */ - private int historyPos; - - /** - * Provides a slight delay between asking to set a description and actually - * displaying it, so that if the user is scrolling quickly through - * completions, those with slow-to-calculate summaries won't bog down the - * scrolling. - */ - private Timer timer; - - /** - * The action that listens for the timer to fire. - */ - private TimerAction timerAction; - - /** - * The resource bundle for this window. - */ - private ResourceBundle bundle; - - /** - * The amount of time to wait after the user changes the selected - * completion to refresh the description. This delay is in place to help - * performance for {@link Completion}s that may be slow to compute their - * summary text. - */ - private static final int INITIAL_TIMER_DELAY = 120; - - /** - * The resource bundle name. - */ - private static final String MSG = - "org.fife.ui.autocomplete.AutoCompleteDescWindow"; - - - /** - * Constructor. - * - * @param owner The parent window. - * @param ac The parent auto-completion. - */ - public AutoCompleteDescWindow(Window owner, AutoCompletion ac) { - - super(owner); - this.ac = ac; - - ComponentOrientation o = ac.getTextComponentOrientation(); - - JPanel cp = new JPanel(new BorderLayout()); - cp.setBorder(TipUtil.getToolTipBorder()); - - descArea = new JEditorPane("text/html", null); - TipUtil.tweakTipEditorPane(descArea); - descArea.addHyperlinkListener(this); - scrollPane = new JScrollPane(descArea); - Border b = BorderFactory.createEmptyBorder(); - scrollPane.setBorder(b); - scrollPane.setViewportBorder(b); - scrollPane.setBackground(descArea.getBackground()); - scrollPane.getViewport().setBackground(descArea.getBackground()); - cp.add(scrollPane); - - descWindowNavBar = new JToolBar(); - backAction = new ToolBarBackAction(o.isLeftToRight()); - forwardAction = new ToolBarForwardAction(o.isLeftToRight()); - descWindowNavBar.setFloatable(false); - descWindowNavBar.add(new JButton(backAction)); - descWindowNavBar.add(new JButton(forwardAction)); - - bottomPanel = new JPanel(new BorderLayout()); - b = new AbstractBorder() { - @Override - public Insets getBorderInsets(Component c) { - return new Insets(1, 0, 0, 0); - } - @Override - public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { - g.setColor(UIManager.getColor("controlDkShadow")); - g.drawLine(x,y, x+w-1,y); - } - }; - bottomPanel.setBorder(b); - SizeGrip rp = new SizeGrip(); - bottomPanel.add(descWindowNavBar, BorderLayout.LINE_START); - bottomPanel.add(rp, BorderLayout.LINE_END); - cp.add(bottomPanel, BorderLayout.SOUTH); - setContentPane(cp); - - applyComponentOrientation(o); - setFocusableWindowState(false); - - // Give apps a chance to decorate us with drop shadows, etc. - if (Util.getShouldAllowDecoratingMainAutoCompleteWindows()) { - PopupWindowDecorator decorator = PopupWindowDecorator.get(); - if (decorator!=null) { - decorator.decorate(this); - } - } - - history = new ArrayList(1); // Usually small - historyPos = -1; - - timerAction = new TimerAction(); - timer = new Timer(INITIAL_TIMER_DELAY, timerAction); - timer.setRepeats(false); - - } - - - /** - * Sets the currently displayed description and updates the history. - * - * @param historyItem The item to add to the history. - */ - private void addToHistory(HistoryEntry historyItem) { - history.add(++historyPos, historyItem); - clearHistoryAfterCurrentPos(); - setActionStates(); - } - - - /** - * Clears the history of viewed descriptions. - */ - private void clearHistory() { - history.clear(); // Try to free some memory. - historyPos = -1; - if (descWindowNavBar!=null) { - setActionStates(); - } - } - - - /** - * Makes the current history page the last one in the history. - */ - private void clearHistoryAfterCurrentPos() { - for (int i=history.size()-1; i>historyPos; i--) { - history.remove(i); - } - setActionStates(); - } - - - /** - * Copies from the description text area, if it is visible and there is - * a selection. - * - * @return Whether a copy occurred. - */ - public boolean copy() { - if (isVisible() && - descArea.getSelectionStart()!=descArea.getSelectionEnd()) { - descArea.copy(); - return true; - } - return false; - } - - - /** - * Returns the localized message for the specified key. - * - * @param key The key. - * @return The localized message. - */ - private String getString(String key) { - if (bundle==null) { - bundle = ResourceBundle.getBundle(MSG); - } - return bundle.getString(key); - } - - - /** - * Called when a hyperlink is clicked. - * - * @param e The event. - */ - public void hyperlinkUpdate(HyperlinkEvent e) { - - HyperlinkEvent.EventType type = e.getEventType(); - if (!type.equals(HyperlinkEvent.EventType.ACTIVATED)) { - return; - } - - // Users can redirect URL's, perhaps to a local copy of documentation. - URL url = e.getURL(); - if (url!=null) { - LinkRedirector redirector = AutoCompletion.getLinkRedirector(); - if (redirector!=null) { - URL newUrl = redirector.possiblyRedirect(url); - if (newUrl!=null && newUrl!=url) { - url = newUrl; - e = new HyperlinkEvent(e.getSource(), e.getEventType(), - newUrl, e.getDescription(), e.getSourceElement()); - } - } - } - - // Custom hyperlink handler for this completion type - ExternalURLHandler handler = ac.getExternalURLHandler(); - if (handler!=null) { - HistoryEntry current = history.get(historyPos); - handler.urlClicked(e, current.completion, this); - return; - } - - // No custom handler... - if (url!=null) { - // Try loading in external browser (Java 6+ only). - try { - Util.browse(new URI(url.toString())); - } catch (/*IO*/URISyntaxException ioe) { - UIManager.getLookAndFeel().provideErrorFeedback(descArea); - ioe.printStackTrace(); - } - } - else { // Assume simple function name text, like in c.xml - // FIXME: This is really a hack, and we assume we can find the - // linked-to item in the same CompletionProvider. - AutoCompletePopupWindow parent = - (AutoCompletePopupWindow)getParent(); - CompletionProvider p = parent.getSelection().getProvider(); - if (p instanceof AbstractCompletionProvider) { - String name = e.getDescription(); - List l = ((AbstractCompletionProvider)p). - getCompletionByInputText(name); - if (l!=null && !l.isEmpty()) { - // Just use the 1st one if there's more than 1 - Completion c = l.get(0); - setDescriptionFor(c, true); - } - else { - UIManager.getLookAndFeel().provideErrorFeedback(descArea); - } - } - } - - } - - - /** - * Enables or disables the back and forward actions as appropriate. - */ - private void setActionStates() { - // TODO: Localize this text! - String desc = null; - if (historyPos>0) { - backAction.setEnabled(true); - desc = "Back to " + history.get(historyPos-1); - } - else { - backAction.setEnabled(false); - } - backAction.putValue(Action.SHORT_DESCRIPTION, desc); - if (historyPos>-1 && historyPosnull if none. - * @param addToHistory Whether to add this page to the page history - * (as opposed to clearing it and starting anew). - */ - protected void setDescriptionFor(Completion item, String anchor, - boolean addToHistory) { - timer.stop(); - timerAction.setCompletion(item, anchor, addToHistory); - timer.start(); - } - - - private void setDisplayedDesc(Completion completion, final String anchor, - boolean addToHistory) { - - String desc = completion==null ? null : completion.getSummary(); - if (desc==null) { - desc = "" + getString("NoDescAvailable") + ""; - } - descArea.setText(desc); - if (anchor!=null) { - SwingUtilities.invokeLater(new Runnable() { - public void run() { - descArea.scrollToReference(anchor); - } - }); - } - else { - descArea.setCaretPosition(0); // In case of scrolling - } - - if (!addToHistory) { - // Remove everything first if this is going to be the only - // thing in history. - clearHistory(); - } - addToHistory(new HistoryEntry(completion, desc, null)); - - } - - - /** - * {@inheritDoc} - */ - @Override - public void setVisible(boolean visible) { - if (!visible) { - clearHistory(); - } - super.setVisible(visible); - } - - - /** - * Callback for custom ExternalURLHandlers. - * - * @param completion The completion to display. - * @param anchor The anchor in the HTML to jump to, or null - * if none. - */ - public void showSummaryFor(Completion completion, String anchor) { - setDescriptionFor(completion, anchor, true); - } - - - /** - * Called by the parent completion popup window the LookAndFeel is updated. - */ - public void updateUI() { - SwingUtilities.updateComponentTreeUI(this); - // Update editor pane for new font, bg, selection colors, etc. - TipUtil.tweakTipEditorPane(descArea); - scrollPane.setBackground(descArea.getBackground()); - scrollPane.getViewport().setBackground(descArea.getBackground()); - ((JPanel)getContentPane()).setBorder(TipUtil.getToolTipBorder()); - } - - - /** - * A completion and its cached summary text. - */ - private static class HistoryEntry { - - public Completion completion; - public String summary; - public String anchor; - - public HistoryEntry(Completion completion, String summary, - String anchor) { - this.completion = completion; - this.summary = summary; - this.anchor = anchor; - } - - /** - * Overridden to display a short name for the completion, since it's - * used in the tool tips for the "back" and "forward" buttons. - * - * @return A string representation of this history entry. - */ - @Override - public String toString() { - return completion.getInputText(); - } - - } - - - /** - * Action that actually updates the summary text displayed. - */ - private class TimerAction extends AbstractAction { - - private Completion completion; - private String anchor; - private boolean addToHistory; - - /** - * Called when the timer is fired. - */ - public void actionPerformed(ActionEvent e) { - setDisplayedDesc(completion, anchor, addToHistory); - } - - public void setCompletion(Completion c, String anchor, - boolean addToHistory) { - this.completion = c; - this.anchor = anchor; - this.addToHistory = addToHistory; - } - - } - - - /** - * Action that moves to the previous description displayed. - */ - class ToolBarBackAction extends AbstractAction { - - public ToolBarBackAction(boolean ltr) { - String img = "org/fife/ui/autocomplete/arrow_" + - (ltr ? "left.png" : "right.png"); - ClassLoader cl = getClass().getClassLoader(); - Icon icon = new ImageIcon(cl.getResource(img)); - putValue(Action.SMALL_ICON, icon); - } - - public void actionPerformed(ActionEvent e) { - if (historyPos>0) { - HistoryEntry pair = history.get(--historyPos); - descArea.setText(pair.summary); - if (pair.anchor!=null) { - //System.out.println("Scrolling to: " + pair.anchor); - descArea.scrollToReference(pair.anchor); - } - else { - descArea.setCaretPosition(0); - } - setActionStates(); - } - } - - } - - - /** - * Action that moves to the previous description displayed. - */ - class ToolBarForwardAction extends AbstractAction { - - public ToolBarForwardAction(boolean ltr) { - String img = "org/fife/ui/autocomplete/arrow_" + - (ltr ? "right.png" : "left.png"); - ClassLoader cl = getClass().getClassLoader(); - Icon icon = new ImageIcon(cl.getResource(img)); - putValue(Action.SMALL_ICON, icon); - } - - public void actionPerformed(ActionEvent e) { - if (history!=null && historyPosnull if nothing is selected. - * - * @return The selected value. - */ - public Completion getSelection() { - return isShowing() ? (Completion)list.getSelectedValue():lastSelection; - } - - - /** - * Inserts the currently selected completion. - * - * @see #getSelection() - */ - private void insertSelectedCompletion() { - Completion comp = getSelection(); - ac.insertCompletion(comp); - } - - - /** - * Registers keyboard actions to listen for in the text component and - * intercept. - * - * @see #uninstallKeyBindings() - */ - private void installKeyBindings() { - - if (AutoCompletion.getDebug()) { - System.out.println("PopupWindow: Installing keybindings"); - } - if (keyBindingsInstalled) { - System.err.println("Error: key bindings were already installed"); - Thread.dumpStack(); - return; - } - - if (escapeKap==null) { // Lazily create actions. - createKeyActionPairs(); - } - - JTextComponent comp = ac.getTextComponent(); - InputMap im = comp.getInputMap(); - ActionMap am = comp.getActionMap(); - - replaceAction(im, am, KeyEvent.VK_ESCAPE, escapeKap, oldEscape); - if (AutoCompletion.getDebug() && oldEscape.action==escapeKap.action) { - Thread.dumpStack(); - } - replaceAction(im, am, KeyEvent.VK_UP, upKap, oldUp); - replaceAction(im, am, KeyEvent.VK_LEFT, leftKap, oldLeft); - replaceAction(im, am, KeyEvent.VK_DOWN, downKap, oldDown); - replaceAction(im, am, KeyEvent.VK_RIGHT, rightKap, oldRight); - replaceAction(im, am, KeyEvent.VK_ENTER, enterKap, oldEnter); - replaceAction(im, am, KeyEvent.VK_TAB, tabKap, oldTab); - replaceAction(im, am, KeyEvent.VK_HOME, homeKap, oldHome); - replaceAction(im, am, KeyEvent.VK_END, endKap, oldEnd); - replaceAction(im, am, KeyEvent.VK_PAGE_UP, pageUpKap, oldPageUp); - replaceAction(im, am, KeyEvent.VK_PAGE_DOWN, pageDownKap, oldPageDown); - - // Make Ctrl+C copy from description window. This isn't done - // automagically because the desc. window is not focusable, and copying - // from text components can only be done from focused components. - KeyStroke ks = getCopyKeyStroke(); - oldCtrlC.key = im.get(ks); - im.put(ks, ctrlCKap.key); - oldCtrlC.action = am.get(ctrlCKap.key); - am.put(ctrlCKap.key, ctrlCKap.action); - - comp.addCaretListener(this); - - keyBindingsInstalled = true; - - } - - - public void mouseClicked(MouseEvent e) { - if (e.getClickCount()==2) { - insertSelectedCompletion(); - } - } - - - public void mouseEntered(MouseEvent e) { - } - - - public void mouseExited(MouseEvent e) { - } - - - public void mousePressed(MouseEvent e) { - } - - - public void mouseReleased(MouseEvent e) { - } - - - /** - * Positions the description window relative to the completion choices - * window. We assume there is room on one side of the other for this - * entire window to fit. - */ - private void positionDescWindow() { - - boolean showDescWindow = descWindow!=null && ac.getShowDescWindow(); - if (!showDescWindow) { - return; - } - - // Don't use getLocationOnScreen() as this throws an exception if - // window isn't visible yet, but getLocation() doesn't, and is in - // screen coordinates! - Point p = getLocation(); - Rectangle screenBounds = Util.getScreenBoundsForPoint(p.x, p.y); - //Dimension screenSize = getToolkit().getScreenSize(); - //int totalH = Math.max(getHeight(), descWindow.getHeight()); - - // Try to position to the right first (LTR) - int x; - if (ac.getTextComponentOrientation().isLeftToRight()) { - x = getX() + getWidth() + 5; - if (x+descWindow.getWidth()>screenBounds.x+screenBounds.width) { // doesn't fit - x = getX() - 5 - descWindow.getWidth(); - } - } - else { // RTL - x = getX() - 5 - descWindow.getWidth(); - if (xkey. - * @param old A buffer in which to place the old key/Action pair. - * @see #putBackAction(InputMap, ActionMap, int, KeyActionPair) - */ - private void replaceAction(InputMap im, ActionMap am, int key, - KeyActionPair kap, KeyActionPair old) { - KeyStroke ks = KeyStroke.getKeyStroke(key, 0); - old.key = im.get(ks); - im.put(ks, kap.key); - old.action = am.get(kap.key); - am.put(kap.key, kap.action); - } - - - /** - * Selects the first item in the completion list. - * - * @see #selectLastItem() - */ - private void selectFirstItem() { - if (model.getSize() > 0) { - list.setSelectedIndex(0); - list.ensureIndexIsVisible(0); - } - } - - - /** - * Selects the last item in the completion list. - * - * @see #selectFirstItem() - */ - private void selectLastItem() { - int index = model.getSize() - 1; - if (index > -1) { - list.setSelectedIndex(index); - list.ensureIndexIsVisible(index); - } - } - - - /** - * Selects the next item in the completion list. - * - * @see #selectPreviousItem() - */ - private void selectNextItem() { - int index = list.getSelectedIndex(); - if (index > -1) { - index = (index + 1) % model.getSize(); - list.setSelectedIndex(index); - list.ensureIndexIsVisible(index); - } - } - - - /** - * Selects the completion item one "page down" from the currently selected - * one. - * - * @see #selectPageUpItem() - */ - private void selectPageDownItem() { - int visibleRowCount = list.getVisibleRowCount(); - int i = Math.min(list.getModel().getSize()-1, - list.getSelectedIndex()+visibleRowCount); - list.setSelectedIndex(i); - list.ensureIndexIsVisible(i); - } - - - /** - * Selects the completion item one "page up" from the currently selected - * one. - * - * @see #selectPageDownItem() - */ - private void selectPageUpItem() { - int visibleRowCount = list.getVisibleRowCount(); - int i = Math.max(0, list.getSelectedIndex()-visibleRowCount); - list.setSelectedIndex(i); - list.ensureIndexIsVisible(i); - } - - - /** - * Selects the previous item in the completion list. - * - * @see #selectNextItem() - */ - private void selectPreviousItem() { - int index = list.getSelectedIndex(); - switch (index) { - case 0: - index = list.getModel().getSize() - 1; - break; - case -1: // Check for an empty list (would be an error) - index = list.getModel().getSize() - 1; - if (index == -1) { - return; - } - break; - default: - index = index - 1; - break; - } - list.setSelectedIndex(index); - list.ensureIndexIsVisible(index); - } - - - /** - * Sets the completions to display in the choices list. The first - * completion is selected. - * - * @param completions The completions to display. - */ - public void setCompletions(List completions) { - model.setContents(completions); - selectFirstItem(); - } - - - /** - * Sets the size of the description window. - * - * @param size The new size. This cannot be null. - */ - public void setDescriptionWindowSize(Dimension size) { - if (descWindow!=null) { - descWindow.setSize(size); - } - else { - preferredDescWindowSize = size; - } - } - - - /** - * Sets the default list cell renderer to use when a completion provider - * does not supply its own. - * - * @param renderer The renderer to use. If this is null, - * a default renderer is used. - * @see #getListCellRenderer() - */ - public void setListCellRenderer(ListCellRenderer renderer) { - DelegatingCellRenderer dcr = (DelegatingCellRenderer)list. - getCellRenderer(); - dcr.setFallbackCellRenderer(renderer); - } - - - /** - * Sets the location of this window to be "good" relative to the specified - * rectangle. That rectangle should be the location of the text - * component's caret, in screen coordinates. - * - * @param r The text component's caret position, in screen coordinates. - */ - public void setLocationRelativeTo(Rectangle r) { - - // Multi-monitor support - make sure the completion window (and - // description window, if applicable) both fit in the same window in - // a multi-monitor environment. To do this, we decide which monitor - // the rectangle "r" is in, and use that one (just pick top-left corner - // as the defining point). - Rectangle screenBounds = Util.getScreenBoundsForPoint(r.x, r.y); - //Dimension screenSize = getToolkit().getScreenSize(); - - boolean showDescWindow = descWindow!=null && ac.getShowDescWindow(); - int totalH = getHeight(); - if (showDescWindow) { - totalH = Math.max(totalH, descWindow.getHeight()); - } - - // Try putting our stuff "below" the caret first. We assume that the - // entire height of our stuff fits on the screen one way or the other. - aboveCaret = false; - int y = r.y + r.height + VERTICAL_SPACE; - if (y+totalH>screenBounds.height) { - y = r.y - VERTICAL_SPACE - getHeight(); - aboveCaret = true; - } - - // Get x-coordinate of completions. Try to align left edge with the - // caret first. - int x = r.x; - if (!ac.getTextComponentOrientation().isLeftToRight()) { - x -= getWidth(); // RTL => align right edge - } - if (xscreenBounds.x+screenBounds.width) { // completions don't fit - x = screenBounds.x + screenBounds.width - getWidth(); - } - - setLocation(x, y); - - // Position the description window, if necessary. - if (showDescWindow) { - positionDescWindow(); - } - - } - - - /** - * Toggles the visibility of this popup window. - * - * @param visible Whether this window should be visible. - */ - @Override - public void setVisible(boolean visible) { - - if (visible!=isVisible()) { - - if (visible) { - installKeyBindings(); - lastLine = ac.getLineOfCaret(); - selectFirstItem(); - if (descWindow==null && ac.getShowDescWindow()) { - descWindow = createDescriptionWindow(); - positionDescWindow(); - } - // descWindow needs a kick-start the first time it's displayed. - // Also, the newly-selected item in the choices list is - // probably different from the previous one anyway. - if (descWindow!=null) { - Completion c = (Completion)list.getSelectedValue(); - if (c!=null) { - descWindow.setDescriptionFor(c); - } - } - } - else { - uninstallKeyBindings(); - } - - super.setVisible(visible); - - // Some languages, such as Java, can use quite a lot of memory - // when displaying hundreds of completion choices. We pro-actively - // clear our list model here to make them available for GC. - // Otherwise, they stick around, and consider the following: a - // user starts code-completion for Java 5 SDK classes, then hides - // the dialog, then changes the "class path" to use a Java 6 SDK - // instead. On pressing Ctrl+space, a new array of Completions is - // created. If this window holds on to the previous Completions, - // you're getting roughly 2x the necessary Completions in memory - // until the Completions are actually passed to this window. - if (!visible) { // Do after super.setVisible(false) - lastSelection = (Completion)list.getSelectedValue(); - model.clear(); - } - - // Must set descWindow's visibility one way or the other each time, - // because of the way child JWindows' visibility is handled - in - // some ways it's dependent on the parent, in other ways it's not. - if (descWindow!=null) { - descWindow.setVisible(visible && ac.getShowDescWindow()); - } - - } - - } - - - /** - * Stops intercepting certain keystrokes from the text component. - * - * @see #installKeyBindings() - */ - private void uninstallKeyBindings() { - - if (AutoCompletion.getDebug()) { - System.out.println("PopupWindow: Removing keybindings"); - } - if (!keyBindingsInstalled) { - return; - } - - JTextComponent comp = ac.getTextComponent(); - InputMap im = comp.getInputMap(); - ActionMap am = comp.getActionMap(); - - putBackAction(im, am, KeyEvent.VK_ESCAPE, oldEscape); - putBackAction(im, am, KeyEvent.VK_UP, oldUp); - putBackAction(im, am, KeyEvent.VK_DOWN, oldDown); - putBackAction(im, am, KeyEvent.VK_LEFT, oldLeft); - putBackAction(im, am, KeyEvent.VK_RIGHT, oldRight); - putBackAction(im, am, KeyEvent.VK_ENTER, oldEnter); - putBackAction(im, am, KeyEvent.VK_TAB, oldTab); - putBackAction(im, am, KeyEvent.VK_HOME, oldHome); - putBackAction(im, am, KeyEvent.VK_END, oldEnd); - putBackAction(im, am, KeyEvent.VK_PAGE_UP, oldPageUp); - putBackAction(im, am, KeyEvent.VK_PAGE_DOWN, oldPageDown); - - // Ctrl+C - KeyStroke ks = getCopyKeyStroke(); - am.put(im.get(ks), oldCtrlC.action); // Original action - im.put(ks, oldCtrlC.key); // Original key - - comp.removeCaretListener(this); - - keyBindingsInstalled = false; - - } - - - /** - * Updates the LookAndFeel of this window and the description - * window. - */ - public void updateUI() { - SwingUtilities.updateComponentTreeUI(this); - if (descWindow!=null) { - descWindow.updateUI(); - } - } - - - /** - * Called when a new item is selected in the popup list. - * - * @param e The event. - */ - public void valueChanged(ListSelectionEvent e) { - if (!e.getValueIsAdjusting()) { - Object value = list.getSelectedValue(); - if (value!=null && descWindow!=null) { - descWindow.setDescriptionFor((Completion)value); - positionDescWindow(); - } - } - } - - - class CopyAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - boolean doNormalCopy = false; - if (descWindow!=null && descWindow.isVisible()) { - doNormalCopy = !descWindow.copy(); - } - if (doNormalCopy) { - ac.getTextComponent().copy(); - } - } - - } - - - class DownAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - if (isVisible()) { - selectNextItem(); - } - } - - } - - - class EndAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - if (isVisible()) { - selectLastItem(); - } - } - - } - - - class EnterAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - if (isVisible()) { - insertSelectedCompletion(); - } - } - - } - - - class EscapeAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - if (isVisible()) { - setVisible(false); - } - } - - } - - - class HomeAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - if (isVisible()) { - selectFirstItem(); - } - } - - } - - - /** - * A mapping from a key (an Object) to an Action. - */ - private static class KeyActionPair { - - public Object key; - public Action action; - - public KeyActionPair() { - } - - public KeyActionPair(Object key, Action a) { - this.key = key; - this.action = a; - } - - } - - - class LeftAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - if (isVisible()) { - JTextComponent comp = ac.getTextComponent(); - Caret c = comp.getCaret(); - int dot = c.getDot(); - if (dot > 0) { - c.setDot(--dot); - // Ensure moving left hasn't moved us up a line, thus - // hiding the popup window. - if (comp.isVisible()) { - if (lastLine!=-1) { - doAutocomplete(); - } - } - } - } - } - - } - - - class PageDownAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - if (isVisible()) { - selectPageDownItem(); - } - } - - } - - - class PageUpAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - if (isVisible()) { - selectPageUpItem(); - } - } - - } - - - /** - * The actual list of completion choices in this popup window. - */ - private class PopupList extends JList { - - public PopupList(CompletionListModel model) { - super(model); - } - - @Override - public void setUI(ListUI ui) { - if (Util.getUseSubstanceRenderers() && - SUBSTANCE_LIST_UI.equals(ui.getClass().getName())) { - // Substance requires its special ListUI be installed for - // its renderers to actually render (!), but long completion - // lists (e.g. PHPCompletionProvider in RSTALanguageSupport) - // will simply populate too slowly on initial display (when - // calculating preferred size of all items), so in this case - // we give a prototype cell value. - CompletionProvider p = ac.getCompletionProvider(); - BasicCompletion bc = new BasicCompletion(p, "Hello world"); - setPrototypeCellValue(bc); - } - else { - // Our custom UI that is faster for long HTML completion lists. - ui = new FastListUI(); - setPrototypeCellValue(null); - } - super.setUI(ui); - } - - } - - - class RightAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - if (isVisible()) { - JTextComponent comp = ac.getTextComponent(); - Caret c = comp.getCaret(); - int dot = c.getDot(); - if (dot < comp.getDocument().getLength()) { - c.setDot(++dot); - // Ensure moving right hasn't moved us up a line, thus - // hiding the popup window. - if (comp.isVisible()) { - if (lastLine!=-1) { - doAutocomplete(); - } - } - } - } - } - - } - - - class UpAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - if (isVisible()) { - selectPreviousItem(); - } - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/AutoCompletion.java b/ESPlorer/src/org/fife/ui/autocomplete/AutoCompletion.java deleted file mode 100644 index 3b0b19e..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/AutoCompletion.java +++ /dev/null @@ -1,1515 +0,0 @@ -/* - * 12/21/2008 - * - * AutoCompletion.java - Handles auto-completion for a text component. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.*; -import java.awt.event.*; -import java.beans.*; -import java.util.List; -import javax.swing.*; -import javax.swing.Timer; -import javax.swing.event.*; -import javax.swing.text.*; - - -/** - * Adds auto-completion to a text component. Provides a popup window with a - * list of auto-complete choices on a given keystroke, such as Crtrl+Space.

- * - * Depending on the {@link CompletionProvider} installed, the following - * auto-completion features may be enabled: - * - *

    - *
  • An auto-complete choices list made visible via e.g. Ctrl+Space
  • - *
  • A "description" window displayed alongside the choices list that - * provides documentation on the currently selected completion choice - * (as seen in Eclipse and NetBeans).
  • - *
  • Parameter assistance. If this is enabled, if the user enters a - * "parameterized" completion, such as a method or a function, then they - * will receive a tool tip describing the arguments they have to enter to - * the completion. Also, the arguments can be navigated via tab and - * shift+tab (a la Eclipse and NetBeans).
  • - *
- * - * @author Robert Futrell - * @version 1.0 - */ -/* This class handles intercepting window and hierarchy events from the text - * component, so the popup window is only visible when it should be visible. It - * also handles communication between the CompletionProvider and the actual - * popup Window. - */ -public class AutoCompletion { - - /** - * The text component we're providing completion for. - */ - private JTextComponent textComponent; - - /** - * The parent window of {@link #textComponent}. - */ - private Window parentWindow; - - /** - * The popup window containing completion choices. - */ - private AutoCompletePopupWindow popupWindow; - - /** - * The preferred size of the completion choices window. This field exists - * because the user will likely set the preferred size of the window before - * it is actually created. - */ - private Dimension preferredChoicesWindowSize; - - /** - * The preferred size of the optional description window. This field only - * exists because the user may (and usually will) set the size of the - * description window before it exists (it must be parented to a Window). - */ - private Dimension preferredDescWindowSize; - - /** - * Manages any parameterized completions that are inserted. - */ - private ParameterizedCompletionContext pcc; - - /** - * Provides the completion options relevant to the current caret position. - */ - private CompletionProvider provider; - - /** - * The renderer to use for the completion choices. If this is - * null, then a default renderer is used. - */ - private ListCellRenderer renderer; - - /** - * The handler to use when an external URL is clicked in the help - * documentation. - */ - private ExternalURLHandler externalURLHandler; - - /** - * An optional redirector that converts URL's to some other location before - * being handed over to externalURLHandler. - */ - private static LinkRedirector linkRedirector; - - /** - * Whether the description window should be displayed along with the - * completion choice window. - */ - private boolean showDescWindow; - - /** - * Whether auto-complete is enabled. - */ - private boolean autoCompleteEnabled; - - /** - * Whether the auto-activation of auto-complete (after a delay, after the - * user types an appropriate character) is enabled. - */ - private boolean autoActivationEnabled; - - /** - * Whether or not, when there is only a single auto-complete option that - * matches the text at the current text position, that text should be - * auto-inserted, instead of the completion window displaying. - */ - private boolean autoCompleteSingleChoices; - - /** - * Whether parameter assistance is enabled. - */ - private boolean parameterAssistanceEnabled; - - /** - * A renderer used for {@link Completion}s in the optional parameter choices - * popup window (displayed when a {@link ParameterizedCompletion} is - * code-completed). If this isn't set, a default renderer is used. - */ - private ListCellRenderer paramChoicesRenderer; - - /** - * The keystroke that triggers the completion window. - */ - private KeyStroke trigger; - - /** - * The previous key in the text component's InputMap for the - * trigger key. - */ - private Object oldTriggerKey; - - /** - * The action previously assigned to {@link #trigger}, so we can reset it if - * the user disables auto-completion. - */ - private Action oldTriggerAction; - - /** - * The previous key in the text component's InputMap for the - * parameter completion trigger key. - */ - private Object oldParenKey; - - /** - * The action previously assigned to the parameter completion key, so we can - * reset it when we uninstall. - */ - private Action oldParenAction; - - /** - * Listens for events in the parent window that affect the visibility of the - * popup windows. - */ - private ParentWindowListener parentWindowListener; - - /** - * Listens for events from the text component that affect the visibility of - * the popup windows. - */ - private TextComponentListener textComponentListener; - - /** - * Listens for events in the text component that cause the popup windows to - * automatically activate. - */ - private AutoActivationListener autoActivationListener; - - /** - * Listens for LAF changes so the auto-complete windows automatically update - * themselves accordingly. - */ - private LookAndFeelChangeListener lafListener; - - /** - * Listens for events from the popup window. - */ - private PopupWindowListener popupWindowListener; - - /** - * All listeners registered on this component. - */ - private EventListenerList listeners; - - /** - * Whether or not the popup should be hidden when user types a space (or any - * character that resets the completion list to "all completions"). Defaults - * to true. - */ - private boolean hideOnNoText; - - /** - * Whether or not the popup should be hidden when the CompletionProvider - * changes. If set to false, caller has to ensure refresh of the popup - * content. Defaults to true. - */ - private boolean hideOnCompletionProviderChange; - - /** - * The key used in the input map for the AutoComplete action. - */ - private static final String PARAM_TRIGGER_KEY = "AutoComplete"; - - /** - * Key used in the input map for the parameter completion action. - */ - private static final String PARAM_COMPLETE_KEY = "AutoCompletion.FunctionStart"; - - /** - * Stores how to render auto-completion-specific highlights in text - * components. - */ - private static final AutoCompletionStyleContext styleContext = new AutoCompletionStyleContext(); - - /** - * Whether debug messages should be printed to stdout as AutoCompletion - * runs. - */ - private static final boolean DEBUG = initDebug(); - - - /** - * Constructor. - * - * @param provider The completion provider. This cannot be null - */ - public AutoCompletion(CompletionProvider provider) { - - setChoicesWindowSize(350, 200); - setDescriptionWindowSize(350, 250); - - setCompletionProvider(provider); - setTriggerKey(getDefaultTriggerKey()); - setAutoCompleteEnabled(true); - setAutoCompleteSingleChoices(true); - setAutoActivationEnabled(false); - setShowDescWindow(false); - setHideOnCompletionProviderChange(true); - setHideOnNoText(true); - parentWindowListener = new ParentWindowListener(); - textComponentListener = new TextComponentListener(); - autoActivationListener = new AutoActivationListener(); - lafListener = new LookAndFeelChangeListener(); - popupWindowListener = new PopupWindowListener(); - listeners = new EventListenerList(); - - } - - - /** - * Adds a listener interested in popup window events from this instance. - * - * @param l The listener to add. - * @see #removeAutoCompletionListener(AutoCompletionListener) - */ - public void addAutoCompletionListener(AutoCompletionListener l) { - listeners.add(AutoCompletionListener.class, l); - } - - - /** - * Displays the popup window. Hosting applications can call this method to - * programmatically begin an auto-completion operation. - */ - public void doCompletion() { - refreshPopupWindow(); - } - - - /** - * Fires an {@link AutoCompletionEvent} of the specified type. - * - * @param type The type of event to fire. - */ - protected void fireAutoCompletionEvent(AutoCompletionEvent.Type type) { - - // Guaranteed to return a non-null array - Object[] listeners = this.listeners.getListenerList(); - AutoCompletionEvent e = null; - - // Process the listeners last to first, notifying those that are - // interested in this event - for (int i=listeners.length-2; i>=0; i-=2) { - if (listeners[i] == AutoCompletionListener.class) { - if (e==null) { - e = new AutoCompletionEvent(this, type); - } - ((AutoCompletionListener)listeners[i+1]).autoCompleteUpdate(e); - } - } - - } - - - /** - * Returns the delay between when the user types a character and when the - * code completion popup should automatically appear (if applicable). - * - * @return The delay, in milliseconds. - * @see #setAutoActivationDelay(int) - */ - public int getAutoActivationDelay() { - return autoActivationListener.timer.getDelay(); - } - - - /** - * Returns whether, if a single auto-complete choice is available, it should - * be automatically inserted, without displaying the popup menu. - * - * @return Whether to auto-complete single choices. - * @see #setAutoCompleteSingleChoices(boolean) - */ - public boolean getAutoCompleteSingleChoices() { - return autoCompleteSingleChoices; - } - - - /** - * Returns the completion provider. - * - * @return The completion provider. - */ - public CompletionProvider getCompletionProvider() { - return provider; - } - - - /** - * Returns whether debug is enabled for AutoCompletion. - * - * @return Whether debug is enabled. - */ - static boolean getDebug() { - return DEBUG; - } - - - /** - * Returns the default auto-complete "trigger key" for this OS. For Windows, - * for example, it is Ctrl+Space. - * - * @return The default auto-complete trigger key. - */ - public static KeyStroke getDefaultTriggerKey() { - // Default to CTRL, even on Mac, since Ctrl+Space activates Spotlight - int mask = InputEvent.CTRL_MASK; - return KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, mask); - } - - - /** - * Returns the handler to use when an external URL is clicked in the - * description window. - * - * @return The handler. - * @see #setExternalURLHandler(ExternalURLHandler) - * @see #getLinkRedirector() - */ - public ExternalURLHandler getExternalURLHandler() { - return externalURLHandler; - } - - - int getLineOfCaret() { - Document doc = textComponent.getDocument(); - Element root = doc.getDefaultRootElement(); - return root.getElementIndex(textComponent.getCaretPosition()); - } - - - /** - * Returns the link redirector, if any. - * - * @return The link redirector, or null if none. - * @see #setLinkRedirector(LinkRedirector) - */ - public static LinkRedirector getLinkRedirector() { - return linkRedirector; - } - - - /** - * Returns the default list cell renderer used when a completion provider - * does not supply its own. - * - * @return The default list cell renderer. - * @see #setListCellRenderer(ListCellRenderer) - */ - public ListCellRenderer getListCellRenderer() { - return renderer; - } - - - /** - * Returns the renderer to use for {@link Completion}s in the optional - * parameter choices popup window (displayed when a - * {@link ParameterizedCompletion} is code-completed). If this returns - * null, a default renderer is used. - * - * @return The renderer to use. - * @see #setParamChoicesRenderer(ListCellRenderer) - * @see #isParameterAssistanceEnabled() - */ - public ListCellRenderer getParamChoicesRenderer() { - return paramChoicesRenderer; - } - - - /** - * Returns the text to replace with in the document. This is a "last-chance" - * hook for subclasses to make special modifications to the completion text - * inserted. The default implementation simply returns - * c.getReplacementText(). You usually will not need to modify this - * method. - * - * @param c The completion being inserted. - * @param doc The document being modified. - * @param start The start of the text being replaced. - * @param len The length of the text being replaced. - * @return The text to replace with. - */ - protected String getReplacementText(Completion c, Document doc, int start, - int len) { - return c.getReplacementText(); - } - - - /** - * Returns whether the "description window" should be shown alongside the - * completion window. - * - * @return Whether the description window should be shown. - * @see #setShowDescWindow(boolean) - */ - public boolean getShowDescWindow() { - return showDescWindow; - } - - - /** - * Returns the style context describing how auto-completion related - * highlights in the editor are rendered. - * - * @return The style context. - */ - public static AutoCompletionStyleContext getStyleContext() { - return styleContext; - } - - - /** - * Returns the text component for which auto-completion is enabled. - * - * @return The text component, or null if this - * {@link AutoCompletion} is not installed on any text component. - * @see #install(JTextComponent) - */ - public JTextComponent getTextComponent() { - return textComponent; - } - - - /** - * Returns the orientation of the text component we're installed to. - * - * @return The orientation of the text component, or null if we - * are not installed on one. - */ - ComponentOrientation getTextComponentOrientation() { - return textComponent == null ? null : textComponent - .getComponentOrientation(); - } - - - /** - * Returns the "trigger key" used for auto-complete. - * - * @return The trigger key. - * @see #setTriggerKey(KeyStroke) - */ - public KeyStroke getTriggerKey() { - return trigger; - } - - - /** - * Hides any child windows being displayed by the auto-completion system. - * - * @return Whether any windows were visible. - */ - public boolean hideChildWindows() { - // return hidePopupWindow() || hideToolTipWindow(); - boolean res = hidePopupWindow(); - res |= hideParameterCompletionPopups(); - return res; - } - - - /** - * Hides and disposes of any parameter completion-related popups. - * - * @return Whether any such windows were visible (and thus hidden). - */ - private boolean hideParameterCompletionPopups() { - if (pcc != null) { - pcc.deactivate(); - pcc = null; - return true; - } - return false; - } - - - /** - * Hides the popup window, if it is visible. - * - * @return Whether the popup window was visible. - */ - protected boolean hidePopupWindow() { - if (popupWindow != null) { - if (popupWindow.isVisible()) { - setPopupVisible(false); - return true; - } - } - return false; - } - - - /** - * Determines whether debug should be enabled for the AutoCompletion - * library. This method checks a system property, but takes care of - * {@link SecurityException}s in case we're in an applet or WebStart. - * - * @return Whether debug should be enabled. - */ - private static final boolean initDebug() { - boolean debug = false; - try { - debug = Boolean.getBoolean("AutoCompletion.debug"); - } catch (SecurityException se) { // We're in an applet or WebStart. - debug = false; - } - return debug; - } - - - /** - * Inserts a completion. Any time a code completion event occurs, the actual - * text insertion happens through this method. - * - * @param c A completion to insert. This cannot be null. - */ - protected final void insertCompletion(Completion c) { - insertCompletion(c, false); - } - - - /** - * Inserts a completion. Any time a code completion event occurs, the actual - * text insertion happens through this method. - * - * @param c A completion to insert. This cannot be null. - * @param typedParamListStartChar Whether the parameterized completion start - * character was typed (typically '('). - */ - protected void insertCompletion(Completion c, - boolean typedParamListStartChar) { - - JTextComponent textComp = getTextComponent(); - String alreadyEntered = c.getAlreadyEntered(textComp); - hidePopupWindow(); - Caret caret = textComp.getCaret(); - - int dot = caret.getDot(); - int len = alreadyEntered.length(); - int start = dot - len; - String replacement = getReplacementText(c, textComp.getDocument(), - start, len); - - caret.setDot(start); - caret.moveDot(dot); - textComp.replaceSelection(replacement); - - if (isParameterAssistanceEnabled() - && (c instanceof ParameterizedCompletion)) { - ParameterizedCompletion pc = (ParameterizedCompletion) c; - startParameterizedCompletionAssistance(pc, typedParamListStartChar); - } - - } - - - /** - * Installs this auto-completion on a text component. If this - * {@link AutoCompletion} is already installed on another text component, - * it is uninstalled first. - * - * @param c The text component. - * @see #uninstall() - */ - public void install(JTextComponent c) { - - if (textComponent != null) { - uninstall(); - } - - this.textComponent = c; - installTriggerKey(getTriggerKey()); - - // Install the function completion key, if there is one. - // NOTE: We cannot do this if the start char is ' ' (e.g. just a space - // between the function name and parameters) because it overrides - // RSTA's special space action. It seems KeyStorke.getKeyStroke(' ') - // hoses ctrl+space, shift+space, etc., even though I think it - // shouldn't... - char start = provider.getParameterListStart(); - if (start != 0 && start != ' ') { - InputMap im = c.getInputMap(); - ActionMap am = c.getActionMap(); - KeyStroke ks = KeyStroke.getKeyStroke(start); - oldParenKey = im.get(ks); - im.put(ks, PARAM_COMPLETE_KEY); - oldParenAction = am.get(PARAM_COMPLETE_KEY); - am.put(PARAM_COMPLETE_KEY, new ParameterizedCompletionStartAction( - start)); - } - - textComponentListener.addTo(this.textComponent); - // In case textComponent is already in a window... - textComponentListener.hierarchyChanged(null); - - if (isAutoActivationEnabled()) { - autoActivationListener.addTo(this.textComponent); - } - - UIManager.addPropertyChangeListener(lafListener); - updateUI(); // In case there have been changes since we uninstalled - - } - - - /** - * Installs a "trigger key" action onto the current text component. - * - * @param ks The keystroke that should trigger the action. - * @see #uninstallTriggerKey() - */ - private void installTriggerKey(KeyStroke ks) { - InputMap im = textComponent.getInputMap(); - oldTriggerKey = im.get(ks); - im.put(ks, PARAM_TRIGGER_KEY); - ActionMap am = textComponent.getActionMap(); - oldTriggerAction = am.get(PARAM_TRIGGER_KEY); - am.put(PARAM_TRIGGER_KEY, createAutoCompleteAction()); - } - - - /** - * Creates and returns the action to call when the user presses the - * auto-completion trigger key (e.g. ctrl+space). This is a hook for - * subclasses that want to provide their own behavior in this scenario. - * The default implementation returns an {@link AutoCompleteAction}. - * - * @return The action to use. - * @see AutoCompleteAction - */ - protected Action createAutoCompleteAction() { - return new AutoCompleteAction(); - } - - - /** - * Returns whether auto-activation is enabled (that is, whether the - * completion popup will automatically appear after a delay when the user - * types an appropriate character). Note that this parameter will be ignored - * if auto-completion is disabled. - * - * @return Whether auto-activation is enabled. - * @see #setAutoActivationEnabled(boolean) - * @see #getAutoActivationDelay() - * @see #isAutoCompleteEnabled() - */ - public boolean isAutoActivationEnabled() { - return autoActivationEnabled; - } - - - /** - * Returns whether auto-completion is enabled. - * - * @return Whether auto-completion is enabled. - * @see #setAutoCompleteEnabled(boolean) - */ - public boolean isAutoCompleteEnabled() { - return autoCompleteEnabled; - } - - - /** - * Whether or not the popup should be hidden when the CompletionProvider - * changes. If set to false, caller has to ensure refresh of the popup - * content. - * - * @see #setHideOnCompletionProviderChange(boolean) - */ - protected boolean isHideOnCompletionProviderChange() { - return hideOnCompletionProviderChange; - } - - - /** - * Whether or not the popup should be hidden when user types a space (or - * any character that resets the completion list to "all completions"). - * - * @see #setHideOnNoText(boolean) - */ - protected boolean isHideOnNoText() { - return hideOnNoText; - } - - - /** - * Returns whether parameter assistance is enabled. - * - * @return Whether parameter assistance is enabled. - * @see #setParameterAssistanceEnabled(boolean) - */ - public boolean isParameterAssistanceEnabled() { - return parameterAssistanceEnabled; - } - - - /** - * Returns whether the completion popup window is visible. - * - * @return Whether the completion popup window is visible. - */ - public boolean isPopupVisible() { - return popupWindow != null && popupWindow.isVisible(); - } - - - /** - * Refreshes the popup window. First, this method gets the possible - * completions for the current caret position. If there are none, and the - * popup is visible, it is hidden. If there are some completions and the - * popup is hidden, it is made visible and made to display the completions. - * If there are some completions and the popup is visible, its list is - * updated to the current set of completions. - * - * @return The current line number of the caret. - */ - protected int refreshPopupWindow() { - - // A return value of null => don't suggest completions - String text = provider.getAlreadyEnteredText(textComponent); - if (text == null && !isPopupVisible()) { - return getLineOfCaret(); - } - - // If the popup is currently visible, and they type a space (or any - // character that resets the completion list to "all completions"), - // the popup window should be hidden instead of being reset to show - // everything. - int textLen = text == null ? 0 : text.length(); - if (textLen == 0 && isHideOnNoText()) { - if (isPopupVisible()) { - hidePopupWindow(); - return getLineOfCaret(); - } - } - - final List completions = provider - .getCompletions(textComponent); - int count = completions==null ? 0 : completions.size(); - - if (count > 1 || (count == 1 && (isPopupVisible() || textLen == 0)) - || (count == 1 && !getAutoCompleteSingleChoices())) { - - if (popupWindow == null) { - popupWindow = new AutoCompletePopupWindow(parentWindow, this); - popupWindowListener.install(popupWindow); - // Completion is usually done for code, which is always done - // LTR, so make completion stuff RTL only if text component is - // also RTL. - popupWindow - .applyComponentOrientation(getTextComponentOrientation()); - if (renderer != null) { - popupWindow.setListCellRenderer(renderer); - } - if (preferredChoicesWindowSize != null) { - popupWindow.setSize(preferredChoicesWindowSize); - } - if (preferredDescWindowSize != null) { - popupWindow - .setDescriptionWindowSize(preferredDescWindowSize); - } - } - - popupWindow.setCompletions(completions); - - if (!popupWindow.isVisible()) { - Rectangle r = null; - try { - r = textComponent.modelToView(textComponent - .getCaretPosition()); - } catch (BadLocationException ble) { - ble.printStackTrace(); - return -1; - } - Point p = new Point(r.x, r.y); - SwingUtilities.convertPointToScreen(p, textComponent); - r.x = p.x; - r.y = p.y; - popupWindow.setLocationRelativeTo(r); - setPopupVisible(true); - } - - } - - else if (count == 1) { // !isPopupVisible && autoCompleteSingleChoices - SwingUtilities.invokeLater(new Runnable() { - - public void run() { - insertCompletion(completions.get(0)); - } - }); - } - - else { - hidePopupWindow(); - } - - return getLineOfCaret(); - - } - - - /** - * Removes a listener interested in popup window events from this instance. - * - * @param l The listener to remove. - * @see #addAutoCompletionListener(AutoCompletionListener) - */ - public void removeAutoCompletionListener(AutoCompletionListener l) { - listeners.remove(AutoCompletionListener.class, l); - } - - - /** - * Sets the delay between when the user types a character and when the code - * completion popup should automatically appear (if applicable). - * - * @param ms The delay, in milliseconds. This should be greater than zero. - * @see #getAutoActivationDelay() - */ - public void setAutoActivationDelay(int ms) { - ms = Math.max(0, ms); - autoActivationListener.timer.stop(); - autoActivationListener.timer.setInitialDelay(ms); - } - - - /** - * Toggles whether auto-activation is enabled. Note that auto-activation - * also depends on auto-completion itself being enabled. - * - * @param enabled Whether auto-activation is enabled. - * @see #isAutoActivationEnabled() - * @see #setAutoActivationDelay(int) - */ - public void setAutoActivationEnabled(boolean enabled) { - if (enabled != autoActivationEnabled) { - autoActivationEnabled = enabled; - if (textComponent != null) { - if (autoActivationEnabled) { - autoActivationListener.addTo(textComponent); - } - else { - autoActivationListener.removeFrom(textComponent); - } - } - } - } - - - /** - * Sets whether auto-completion is enabled. - * - * @param enabled Whether auto-completion is enabled. - * @see #isAutoCompleteEnabled() - */ - public void setAutoCompleteEnabled(boolean enabled) { - if (enabled != autoCompleteEnabled) { - autoCompleteEnabled = enabled; - hidePopupWindow(); - } - } - - - /** - * Sets whether, if a single auto-complete choice is available, it should be - * automatically inserted, without displaying the popup menu. - * - * @param autoComplete Whether to auto-complete single choices. - * @see #getAutoCompleteSingleChoices() - */ - public void setAutoCompleteSingleChoices(boolean autoComplete) { - autoCompleteSingleChoices = autoComplete; - } - - - /** - * Sets the completion provider being used. - * - * @param provider The new completion provider. This cannot be - * null. - * @throws IllegalArgumentException If provider is - * null. - */ - public void setCompletionProvider(CompletionProvider provider) { - if (provider == null) { - throw new IllegalArgumentException("provider cannot be null"); - } - this.provider = provider; - if (isHideOnCompletionProviderChange()) { - hidePopupWindow(); // In case new choices should be displayed. - } - } - - - /** - * Sets the size of the completion choices window. - * - * @param w The new width. - * @param h The new height. - * @see #setDescriptionWindowSize(int, int) - */ - public void setChoicesWindowSize(int w, int h) { - preferredChoicesWindowSize = new Dimension(w, h); - if (popupWindow != null) { - popupWindow.setSize(preferredChoicesWindowSize); - } - } - - - /** - * Sets the size of the description window. - * - * @param w The new width. - * @param h The new height. - * @see #setChoicesWindowSize(int, int) - */ - public void setDescriptionWindowSize(int w, int h) { - preferredDescWindowSize = new Dimension(w, h); - if (popupWindow != null) { - popupWindow.setDescriptionWindowSize(preferredDescWindowSize); - } - } - - - /** - * Sets the handler to use when an external URL is clicked in the - * description window. This handler can perform some action, such as open - * the URL in a web browser. The default implementation will open the URL in - * a browser, but only if running in Java 6. If you want browser support for - * Java 5 and below, or otherwise want to respond to hyperlink clicks, you - * will have to install your own handler to do so. - * - * @param handler The new handler. - * @see #getExternalURLHandler() - */ - public void setExternalURLHandler(ExternalURLHandler handler) { - this.externalURLHandler = handler; - } - - - /** - * Sets whether or not the popup should be hidden when the - * CompletionProvider changes. If set to false, caller has to ensure refresh - * of the popup content. - * - * @see #isHideOnCompletionProviderChange() - */ - protected void setHideOnCompletionProviderChange( - boolean hideOnCompletionProviderChange) { - this.hideOnCompletionProviderChange = hideOnCompletionProviderChange; - } - - - /** - * Sets whether or not the popup should be hidden when user types a space - * (or any character that resets the completion list to "all completions"). - * - * @see #isHideOnNoText() - */ - protected void setHideOnNoText(boolean hideOnNoText) { - this.hideOnNoText = hideOnNoText; - } - - - /** - * Sets the redirector for external URL's found in code completion - * documentation. When a non-local link in completion popups is clicked, - * this redirector is given the chance to modify the URL fetched and - * displayed. - * - * @param linkRedirector The link redirector, or null for none. - * @see #getLinkRedirector() - */ - public static void setLinkRedirector(LinkRedirector linkRedirector) { - AutoCompletion.linkRedirector = linkRedirector; - } - - - /** - * Sets the default list cell renderer to use when a completion provider - * does not supply its own. - * - * @param renderer The renderer to use. If this is null, a - * default renderer is used. - * @see #getListCellRenderer() - */ - public void setListCellRenderer(ListCellRenderer renderer) { - this.renderer = renderer; - if (popupWindow != null) { - popupWindow.setListCellRenderer(renderer); - hidePopupWindow(); - } - } - - - /** - * Sets the renderer to use for {@link Completion}s in the optional - * parameter choices popup window (displayed when a - * {@link ParameterizedCompletion} is code-completed). If this isn't set, a - * default renderer is used. - * - * @param r The renderer to use. - * @see #getParamChoicesRenderer() - * @see #setParameterAssistanceEnabled(boolean) - */ - public void setParamChoicesRenderer(ListCellRenderer r) { - paramChoicesRenderer = r; - } - - - /** - * Sets whether parameter assistance is enabled. If parameter assistance is - * enabled, and a "parameterized" completion (such as a function or method) - * is inserted, the user will get "assistance" in inserting the parameters - * in the form of a popup window with documentation and easy tabbing through - * the arguments (as seen in Eclipse and NetBeans). - * - * @param enabled Whether parameter assistance should be enabled. - * @see #isParameterAssistanceEnabled() - */ - public void setParameterAssistanceEnabled(boolean enabled) { - parameterAssistanceEnabled = enabled; - } - - - /** - * Toggles the visibility of the auto-completion popup window. This fires - * an {@link AutoCompletionEvent} of the appropriate type. - * - * @param visible Whether the window should be made visible or hidden. - * @see #isPopupVisible() - */ - protected void setPopupVisible(boolean visible) { - if (visible!=popupWindow.isVisible()) { - popupWindow.setVisible(visible); - } - } - - - /** - * Sets whether the "description window" should be shown beside the - * completion window. - * - * @param show Whether to show the description window. - * @see #getShowDescWindow() - */ - public void setShowDescWindow(boolean show) { - hidePopupWindow(); // Needed to force it to take effect - showDescWindow = show; - } - - - /** - * Sets the keystroke that should be used to trigger the auto-complete popup - * window. - * - * @param ks The keystroke. - * @throws IllegalArgumentException If ks is null. - * @see #getTriggerKey() - */ - public void setTriggerKey(KeyStroke ks) { - if (ks == null) { - throw new IllegalArgumentException("trigger key cannot be null"); - } - if (!ks.equals(trigger)) { - if (textComponent != null) { - // Put old trigger action back. - uninstallTriggerKey(); - // Grab current action for new trigger and replace it. - installTriggerKey(ks); - } - trigger = ks; - } - } - - - /** - * Displays a "tool tip" detailing the inputs to the function just entered. - * - * @param pc The completion. - * @param typedParamListStartChar Whether the parameterized completion list - * starting character was typed. - */ - private void startParameterizedCompletionAssistance( - ParameterizedCompletion pc, boolean typedParamListStartChar) { - - // Get rid of the previous tool tip window, if there is one. - hideParameterCompletionPopups(); - - // Don't bother with a tool tip if there are no parameters, but if - // they typed e.g. the opening '(', make them overtype the ')'. - if (pc.getParamCount() == 0 && !(pc instanceof TemplateCompletion)) { - CompletionProvider p = pc.getProvider(); - char end = p.getParameterListEnd(); // Might be '\0' - String text = end == '\0' ? "" : Character.toString(end); - if (typedParamListStartChar) { - String template = "${}" + text + "${cursor}"; - textComponent.replaceSelection(Character.toString(p - .getParameterListStart())); - TemplateCompletion tc = new TemplateCompletion(p, null, null, - template); - pc = tc; - } - else { - text = p.getParameterListStart() + text; - textComponent.replaceSelection(text); - return; - } - } - - pcc = new ParameterizedCompletionContext(parentWindow, this, pc); - pcc.activate(); - - } - - - /** - * Uninstalls this auto-completion from its text component. If it is not - * installed on any text component, nothing happens. - * - * @see #install(JTextComponent) - */ - public void uninstall() { - - if (textComponent != null) { - - hidePopupWindow(); // Unregisters listeners, actions, etc. - - uninstallTriggerKey(); - - // Uninstall the function completion key. - char start = provider.getParameterListStart(); - if (start != 0) { - KeyStroke ks = KeyStroke.getKeyStroke(start); - InputMap im = textComponent.getInputMap(); - im.put(ks, oldParenKey); - ActionMap am = textComponent.getActionMap(); - am.put(PARAM_COMPLETE_KEY, oldParenAction); - } - - textComponentListener.removeFrom(textComponent); - if (parentWindow != null) { - parentWindowListener.removeFrom(parentWindow); - } - - if (isAutoActivationEnabled()) { - autoActivationListener.removeFrom(textComponent); - } - - UIManager.removePropertyChangeListener(lafListener); - - textComponent = null; - popupWindowListener.uninstall(popupWindow); - popupWindow = null; - - } - - } - - - /** - * Replaces the "trigger key" action with the one that was there before - * auto-completion was installed. - * - * @see #installTriggerKey(KeyStroke) - */ - private void uninstallTriggerKey() { - InputMap im = textComponent.getInputMap(); - im.put(trigger, oldTriggerKey); - ActionMap am = textComponent.getActionMap(); - am.put(PARAM_TRIGGER_KEY, oldTriggerAction); - } - - - /** - * Updates the LookAndFeel of the popup window. Applications can call this - * method as appropriate if they support changing the LookAndFeel at - * runtime. - */ - private void updateUI() { - if (popupWindow != null) { - popupWindow.updateUI(); - } - if (pcc != null) { - pcc.updateUI(); - } - // Will practically always be a JComponent (a JLabel) - if (paramChoicesRenderer instanceof JComponent) { - ((JComponent) paramChoicesRenderer).updateUI(); - } - } - - /** - * Listens for events in the text component to auto-activate the code - * completion popup. - */ - private class AutoActivationListener extends FocusAdapter implements - DocumentListener, CaretListener, ActionListener { - - private Timer timer; - private boolean justInserted; - - public AutoActivationListener() { - timer = new Timer(200, this); - timer.setRepeats(false); - } - - public void actionPerformed(ActionEvent e) { - doCompletion(); - } - - public void addTo(JTextComponent tc) { - tc.addFocusListener(this); - tc.getDocument().addDocumentListener(this); - tc.addCaretListener(this); - } - - public void caretUpdate(CaretEvent e) { - if (justInserted) { - justInserted = false; - } - else { - timer.stop(); - } - } - - public void changedUpdate(DocumentEvent e) { - // Ignore - } - - @Override - public void focusLost(FocusEvent e) { - timer.stop(); - // hideChildWindows(); Other listener will do this - } - - public void insertUpdate(DocumentEvent e) { - justInserted = false; - if (isAutoCompleteEnabled() && isAutoActivationEnabled() - && e.getLength() == 1) { - if (provider.isAutoActivateOkay(textComponent)) { - timer.restart(); - justInserted = true; - } - else { - timer.stop(); - } - } - else { - timer.stop(); - } - } - - public void removeFrom(JTextComponent tc) { - tc.removeFocusListener(this); - tc.getDocument().removeDocumentListener(this); - tc.removeCaretListener(this); - timer.stop(); - justInserted = false; - } - - public void removeUpdate(DocumentEvent e) { - timer.stop(); - } - - } - - /** - * The Action that displays the popup window if auto-completion - * is enabled. - */ - protected class AutoCompleteAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - if (isAutoCompleteEnabled()) { - refreshPopupWindow(); - } - else if (oldTriggerAction != null) { - oldTriggerAction.actionPerformed(e); - } - } - - } - - /** - * Listens for LookAndFeel changes and updates the various popup windows - * involved in auto-completion accordingly. - */ - private class LookAndFeelChangeListener implements PropertyChangeListener { - - public void propertyChange(PropertyChangeEvent e) { - String name = e.getPropertyName(); - if ("lookAndFeel".equals(name)) { - updateUI(); - } - } - - } - - /** - * Action that starts a parameterized completion, e.g. after '(' is typed. - */ - private class ParameterizedCompletionStartAction extends AbstractAction { - - private String start; - - - public ParameterizedCompletionStartAction(char ch) { - this.start = Character.toString(ch); - } - - public void actionPerformed(ActionEvent e) { - - // Prevents keystrokes from messing up - boolean wasVisible = hidePopupWindow(); - - // Only proceed if they were selecting a completion - if (!wasVisible || !isParameterAssistanceEnabled()) { - textComponent.replaceSelection(start); - return; - } - - Completion c = popupWindow.getSelection(); - if (c instanceof ParameterizedCompletion) { // Should always be true - // Fixes capitalization of the entered text. - insertCompletion(c, true); - } - - } - - } - - /** - * Listens for events in the parent window of the text component with - * auto-completion enabled. - */ - private class ParentWindowListener extends ComponentAdapter implements - WindowFocusListener { - - public void addTo(Window w) { - w.addComponentListener(this); - w.addWindowFocusListener(this); - } - - @Override - public void componentHidden(ComponentEvent e) { - hideChildWindows(); - } - - @Override - public void componentMoved(ComponentEvent e) { - hideChildWindows(); - } - - @Override - public void componentResized(ComponentEvent e) { - hideChildWindows(); - } - - public void removeFrom(Window w) { - w.removeComponentListener(this); - w.removeWindowFocusListener(this); - } - - public void windowGainedFocus(WindowEvent e) { - } - - public void windowLostFocus(WindowEvent e) { - hideChildWindows(); - } - - } - - - /** - * Listens for events from the popup window. - */ - private class PopupWindowListener extends ComponentAdapter { - - @Override - public void componentHidden(ComponentEvent e) { - fireAutoCompletionEvent(AutoCompletionEvent.Type.POPUP_HIDDEN); - } - - @Override - public void componentShown(ComponentEvent e) { - fireAutoCompletionEvent(AutoCompletionEvent.Type.POPUP_SHOWN); - } - - public void install(AutoCompletePopupWindow popupWindow) { - popupWindow.addComponentListener(this); - } - - public void uninstall(AutoCompletePopupWindow popupWindow) { - if (popupWindow!=null) { - popupWindow.removeComponentListener(this); - } - } - - } - - - /** - * Listens for events from the text component we're installed on. - */ - private class TextComponentListener extends FocusAdapter implements - HierarchyListener { - - void addTo(JTextComponent tc) { - tc.addFocusListener(this); - tc.addHierarchyListener(this); - } - - /** - * Hide the auto-completion windows when the text component loses focus. - */ - @Override - public void focusLost(FocusEvent e) { - hideChildWindows(); - } - - /** - * Called when the component hierarchy for our text component changes. - * When the text component is added to a new {@link Window}, this method - * registers listeners on that Window. - * - * @param e The event. - */ - public void hierarchyChanged(HierarchyEvent e) { - - // NOTE: e many be null as we call this method at other times. - // System.out.println("Hierarchy changed! " + e); - - Window oldParentWindow = parentWindow; - parentWindow = SwingUtilities.getWindowAncestor(textComponent); - if (parentWindow != oldParentWindow) { - if (oldParentWindow != null) { - parentWindowListener.removeFrom(oldParentWindow); - } - if (parentWindow != null) { - parentWindowListener.addTo(parentWindow); - } - } - - } - - public void removeFrom(JTextComponent tc) { - tc.removeFocusListener(this); - tc.removeHierarchyListener(this); - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/AutoCompletionEvent.java b/ESPlorer/src/org/fife/ui/autocomplete/AutoCompletionEvent.java deleted file mode 100644 index 9174a4c..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/AutoCompletionEvent.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 02/08/2014 - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.util.EventObject; - - -/** - * An event fired by an instance of {@link AutoCompletion}. This can be - * used by applications that wish to be notified of the auto-complete popup - * window showing and hiding. - * - * @author Robert Futrell - * @version 1.0 - */ -public class AutoCompletionEvent extends EventObject { - - /** - * The type of this event. - */ - private Type type; - - - /** - * Constructor. - * - * @param source The AutoCompletion instance that fired - * this event. - * @param type The event type. - */ - public AutoCompletionEvent(AutoCompletion source, Type type) { - super(source); - this.type = type; - } - - - /** - * Returns the source AutoCompletion instance. This is just - * shorthand for return (AutoCompletion)getSource();. - * - * @return The source AutoCompletion instance. - */ - public AutoCompletion getAutoCompletion() { - return (AutoCompletion)getSource(); - } - - - /** - * Returns the type of this event. - * - * @return The type of this event. - */ - public Type getEventType() { - return type; - } - - - /** - * Enumeration of the various types of this event. - */ - public static enum Type { - POPUP_SHOWN, - POPUP_HIDDEN - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/AutoCompletionListener.java b/ESPlorer/src/org/fife/ui/autocomplete/AutoCompletionListener.java deleted file mode 100644 index da1ab88..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/AutoCompletionListener.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 02/08/2014 - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.util.EventListener; - - -/** - * An interface that allows listening for interesting events from an - * {@link AutoCompletion}. - * - * @author Robert Futrell - * @version 1.0 - */ -public interface AutoCompletionListener extends EventListener { - - - /** - * Callback notified when a change to the AutoCompletion's - * status occurs. - * - * @param e The event. - */ - void autoCompleteUpdate(AutoCompletionEvent e); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/AutoCompletionStyleContext.java b/ESPlorer/src/org/fife/ui/autocomplete/AutoCompletionStyleContext.java deleted file mode 100644 index fd83edb..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/AutoCompletionStyleContext.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * 06/24/2012 - * - * AutoCompletionStyleContext.java - Manages styles related to auto-completion. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.Color; - - -/** - * Manages the colors shared across the library. - * - * @author Robert Futrell - * @version 1.0 - */ -public class AutoCompletionStyleContext { - - /** - * The color used to denote the ending caret position for parameterized - * completions. - */ - private Color parameterizedCompletionCursorPositionColor; - - /** - * The color used to highlight copies of editable parameters in - * parameterized completions. - */ - private Color parameterCopyColor; - - /** - * The color of the outline highlight used to denote editable parameters - * in parameterized completions. - */ - private Color parameterOutlineColor; - - - public AutoCompletionStyleContext() { - setParameterOutlineColor(Color.gray); - setParameterCopyColor(new Color(0xb4d7ff)); - setParameterizedCompletionCursorPositionColor(new Color(0x00b400)); - } - - - /** - * Returns the color of the highlight painted on copies of editable - * parameters in parameterized completions. - * - * @return The color used. - * @see #setParameterCopyColor(Color) - */ - public Color getParameterCopyColor() { - return parameterCopyColor; - } - - - /** - * Returns the color used to denote the ending caret position for - * parameterized completions. - * - * @return The color used. - * @see #setParameterizedCompletionCursorPositionColor(Color) - */ - public Color getParameterizedCompletionCursorPositionColor() { - return parameterizedCompletionCursorPositionColor; - } - - - /** - * Returns the color of the outline highlight used to denote editable - * parameters in parameterized completions. - * - * @return The color used. - * @see #setParameterOutlineColor(Color) - */ - public Color getParameterOutlineColor() { - return parameterOutlineColor; - } - - - /** - * Sets the color of the highlight painted on copies of editable - * parameters in parameterized completions. - * - * @param color The color to use. - * @see #setParameterCopyColor(Color) - */ - public void setParameterCopyColor(Color color) { - this.parameterCopyColor = color; - } - - - /** - * Sets the color used to denote the ending caret position for - * parameterized completions. - * - * @param color The color to use. - * @see #getParameterizedCompletionCursorPositionColor() - */ - public void setParameterizedCompletionCursorPositionColor(Color color) { - this.parameterizedCompletionCursorPositionColor = color; - } - - - /** - * Sets the color of the outline highlight used to denote editable - * parameters in parameterized completions. - * - * @param color The color to use. - * @see #getParameterOutlineColor() - */ - public void setParameterOutlineColor(Color color) { - this.parameterOutlineColor = color; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/BasicCompletion.java b/ESPlorer/src/org/fife/ui/autocomplete/BasicCompletion.java deleted file mode 100644 index 5cbf29c..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/BasicCompletion.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * 01/03/2009 - * - * BasicCompletion.java - A straightforward Completion implementation. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - - -/** - * A straightforward {@link Completion} implementation. This implementation - * can be used if you have a relatively short number of static completions - * with no (or short) summaries.

- * - * This implementation uses the replacement text as the input text. It also - * includes a "short description" field, which (if non-null), is - * used in the completion choices list. - * - * @author Robert Futrell - * @version 1.0 - */ -public class BasicCompletion extends AbstractCompletion { - - private String replacementText; - private String shortDesc; - private String summary; - - - /** - * Constructor. - * - * @param provider The parent completion provider. - * @param replacementText The text to replace. - */ - public BasicCompletion(CompletionProvider provider, String replacementText){ - this(provider, replacementText, null); - } - - - /** - * Constructor. - * - * @param provider The parent completion provider. - * @param replacementText The text to replace. - * @param shortDesc A short description of the completion. This will be - * displayed in the completion list. This may be null. - */ - public BasicCompletion(CompletionProvider provider, String replacementText, - String shortDesc) { - this(provider, replacementText, shortDesc, null); - } - - - /** - * Constructor. - * - * @param provider The parent completion provider. - * @param replacementText The text to replace. - * @param shortDesc A short description of the completion. This will be - * displayed in the completion list. This may be null. - * @param summary The summary of this completion. This should be HTML. - * This may be null. - */ - public BasicCompletion(CompletionProvider provider, String replacementText, - String shortDesc, String summary) { - super(provider); - this.replacementText = replacementText; - this.shortDesc = shortDesc; - this.summary = summary; - } - - - /** - * {@inheritDoc} - */ - public String getReplacementText() { - return replacementText; - } - - - /** - * Returns the short description of this completion, usually used in - * the completion choices list. - * - * @return The short description, or null if there is none. - * @see #setShortDescription(String) - */ - public String getShortDescription() { - return shortDesc; - } - - - /** - * {@inheritDoc} - */ - public String getSummary() { - return summary; - } - - - /** - * Sets the short description of this completion. - * - * @param shortDesc The short description of this completion. - * @see #getShortDescription() - */ - public void setShortDescription(String shortDesc) { - this.shortDesc = shortDesc; - } - - - /** - * Sets the summary for this completion. - * - * @param summary The summary for this completion. - * @see #getSummary() - */ - public void setSummary(String summary) { - this.summary = summary; - } - - - /** - * Returns a string representation of this completion. If the short - * description is not null, this method will return: - * - * getInputText() + " - " + shortDesc - * - * otherwise, it will return getInputText(). - * - * @return A string representation of this completion. - */ - @Override - public String toString() { - if (shortDesc==null) { - return getInputText(); - } - return getInputText() + " - " + shortDesc; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/Completion.java b/ESPlorer/src/org/fife/ui/autocomplete/Completion.java deleted file mode 100644 index 9b3697a..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/Completion.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * 12/21/2008 - * - * Completion.java - Represents a single completion choice. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import javax.swing.Icon; -import javax.swing.text.JTextComponent; - - -/** - * Represents a completion choice. A {@link CompletionProvider} returns lists - * of objects implementing this interface. A Completion contains the - * following information: - * - *

    - *
  • The text the user must (begin to) input for this to be a completion - * choice. - *
  • The text that will be filled in if the user chooses this completion. - * Note that often, this is the same as the text the user must (begin to) - * enter, but this doesn't have to be the case. - *
  • Summary HTML that describes this completion. This is information that - * can be displayed in a helper "tooltip"-style window beside the - * completion list. This may be null. It may also be - * lazily generated to cut down on memory usage. - *
  • The CompletionProvider that returned this completion. - *
  • Tool tip text that can be displayed when a mouse hovers over this - * completion in a text component. - *
- * - * @author Robert Futrell - * @version 1.0 - * @see AbstractCompletion - */ -public interface Completion extends Comparable { - - - /** - * Compares this completion to another one lexicographically, ignoring - * case. - * - * @param other Another completion instance. - * @return How this completion compares to the other one. - */ - public int compareTo(Completion other); - - - /** - * Returns the portion of this completion that has already been entered - * into the text component. The match is case-insensitive.

- * - * This is a convenience method for: - * getProvider().getAlreadyEnteredText(comp). - * - * @param comp The text component. - * @return The already-entered portion of this completion. - */ - public String getAlreadyEntered(JTextComponent comp); - - - /** - * Returns the icon to use for this completion. - * - * @return The icon, or null for none. - */ - public Icon getIcon(); - - - /** - * Returns the text that the user has to (start) typing for this completion - * to be offered. Note that this will usually be the same value as - * {@link #getReplacementText()}, but not always (a completion could be - * a way to implement shorthand, for example, "sysout" mapping - * to "System.out.println("). - * - * @return The text the user has to (start) typing for this completion to - * be offered. - * @see #getReplacementText() - */ - public String getInputText(); - - - /** - * Returns the provider that returned this completion. - * - * @return The provider. - */ - public CompletionProvider getProvider(); - - - /** - * Returns the "relevance" of this completion. This is used when sorting - * completions by their relevance. It is an abstract concept that may - * mean different things to different languages, and may depend on the - * context of the completion.

- * - * By default, all completions have a relevance of 0. The - * higher the value returned by this method, the higher up in the list - * this completion will be; the lower the value returned, the lower it will - * be. Completions with equal relevance values will be - * sorted alphabetically. - * - * @return The relevance of this completion. - */ - public int getRelevance(); - - - /** - * Returns the text to insert as the result of this auto-completion. This - * is the "complete" text, including any text that replaces what the user - * has already typed. - * - * @return The replacement text. - * @see #getInputText() - */ - public String getReplacementText(); - - - /** - * Returns the description of this auto-complete choice. This can be - * used in a popup "description window." - * - * @return This item's description. This should be HTML. It may be - * null if there is no description for this - * completion. - */ - public String getSummary(); - - - /** - * Returns the tool tip text to display for mouse hovers over this - * completion.

    - *
  • {@link FunctionCompletion}s
  • - *
  • {@link VariableCompletion}s
  • - *
  • {@link MarkupTagCompletion}s
  • - *
  • {@link ShorthandCompletion}s
  • - *
  • {@link TemplateCompletion}s
  • - *
- * - * @author Robert Futrell - * @version 1.0 - */ -public class CompletionCellRenderer extends DefaultListCellRenderer { - - /** - * The alternating background color, or null if alternating - * row colors should not be used. - */ - private static Color altBG; - - /** - * The font to use when rendering items, or null if the - * list's default font should be used. - */ - private Font font; - - /** - * Whether to display the types of fields and return types of functions - * in the completion text. - */ - private boolean showTypes; - - /** - * The color to use when rendering types in completion text. - */ - private String typeColor; - - /** - * During rendering, whether the item being rendered is selected. - */ - private boolean selected; - - /** - * During rendering, this is the "real" background color of the item being - * rendered (i.e., what its background color is if it isn't selected). - */ - private Color realBG; - - /** - * The color to use for function arguments. - */ - private String paramColor; - - /** - * An icon to use when no appropriate icon is found. - */ - private Icon emptyIcon; - - /** - * Used in rendering calculations. - */ - private Rectangle paintTextR; - - /** - * An optional delegate renderer (primarily for Substance). - */ - private DefaultListCellRenderer delegate; - - private static final String SUBSTANCE_RENDERER_CLASS_NAME = - "org.pushingpixels.substance.api.renderers.SubstanceDefaultListCellRenderer"; - - /** - * Keeps the HTML descriptions from "wrapping" in the list, which cuts off - * words. - */ - private static final String PREFIX = ""; - - - /** - * Constructor. - */ - public CompletionCellRenderer() { - init(); - } - - - /** - * Constructor. This is primarily a hook for Substance, or any other - * Look and Feel whose renderers look drastically different than standard - * DefaultListCellRenderers. Everything except for the text - * rendering will be done by the delegate. In almost all scenarios, you - * will want to use the no-argument constructor instead of this one. - * - * @param delegate The delegate renderer. - * @see #delegateToSubstanceRenderer() - */ - public CompletionCellRenderer(DefaultListCellRenderer delegate) { - setDelegateRenderer(delegate); - init(); - } - - - /** - * Creates the icon to use if no icon is found for a specific completion. - * The default implementation returns a 16x16 empty icon. - * - * @return The icon. - * @see #getEmptyIcon() - */ - protected Icon createEmptyIcon() { - return new EmptyIcon(16); - } - - - /** - * Returns a decent "parameter" color based on the current default - * foreground color. - * - * @return The parameter color to use. - */ - private String createParamColor() { - return Util.isLightForeground(getForeground()) ? - Util.getHexString(Util.getHyperlinkForeground()): "#aa0077"; - } - - - /** - * Returns a decent "type" color based on the current default foreground - * color. - * - * @return The type color to use. - */ - private String createTypeColor() { - return "#808080"; - } - - - /** - * Attempts to delegate rendering to a Substance cell renderer. This - * should only be called if Substance is known to be on the classpath. - * - * @throws Exception If Substance is not on the classpath, or some other - * error occurs creating the Substance cell renderer. - * @see Util#getUseSubstanceRenderers() - * @see #setDelegateRenderer(DefaultListCellRenderer) - */ - public void delegateToSubstanceRenderer() throws Exception { - Class clazz = Class.forName(SUBSTANCE_RENDERER_CLASS_NAME); - DefaultListCellRenderer delegate = - (DefaultListCellRenderer)clazz.newInstance(); - setDelegateRenderer(delegate); - } - - - /** - * Returns the background color to use on alternating lines. - * - * @return The alternate background color. If this is null, - * alternating colors are not used. - * @see #setAlternateBackground(Color) - */ - public static Color getAlternateBackground() { - return altBG; - } - - - /** - * Returns the delegate renderer, or null if there is none. - * - * @return The delegate renderer. - * @see #setDelegateRenderer(DefaultListCellRenderer) - */ - public DefaultListCellRenderer getDelegateRenderer() { - return delegate; - } - - - /** - * Returns the font used when rendering completions. - * - * @return The font. If this is null, then the default list - * font is used. - * @see #setDisplayFont(Font) - */ - public Font getDisplayFont() { - return font; - } - - - /** - * Returns the icon to use if no icon is found for a specific completion. - * This icon is lazily created if necessary. - * - * @return The icon. - * @see #createEmptyIcon() - */ - protected Icon getEmptyIcon() { - if (emptyIcon==null) { - emptyIcon = createEmptyIcon(); - } - return emptyIcon; - } - - - /** - * Returns an icon. - * - * @param resource The icon to retrieve. This should either be a file, - * or a resource loadable by the current ClassLoader. - * @return The icon. - */ - protected Icon getIcon(String resource) { - URL url = getClass().getResource(resource); - if (url==null) { - File file = new File(resource); - try { - url = file.toURI().toURL(); - } catch (MalformedURLException mue) { - mue.printStackTrace(); // Never happens - } - } - return url!=null ? new ImageIcon(url) : null; - } - - - /** - * Returns the renderer. - * - * @param list The list of choices being rendered. - * @param value The {@link Completion} being rendered. - * @param index The index into list being rendered. - * @param selected Whether the item is selected. - * @param hasFocus Whether the item has focus. - */ - @Override - public Component getListCellRendererComponent(JList list, Object value, - int index, boolean selected, boolean hasFocus) { - - super.getListCellRendererComponent(list,value,index,selected,hasFocus); - if (font!=null) { - setFont(font); // Overrides super's setFont(list.getFont()). - } - this.selected = selected; - this.realBG = altBG!=null && (index&1)==1 ? altBG : list.getBackground(); - - Completion c = (Completion)value; - setIcon(c.getIcon()); - - if (c instanceof FunctionCompletion) { - FunctionCompletion fc = (FunctionCompletion)value; - prepareForFunctionCompletion(list, fc, index, selected, hasFocus); - } - else if (c instanceof VariableCompletion) { - VariableCompletion vc = (VariableCompletion)value; - prepareForVariableCompletion(list, vc, index, selected, hasFocus); - } - else if (c instanceof TemplateCompletion) { - TemplateCompletion tc = (TemplateCompletion)value; - prepareForTemplateCompletion(list, tc, index, selected, hasFocus); - } - else if (c instanceof MarkupTagCompletion) { - MarkupTagCompletion mtc = (MarkupTagCompletion)value; - prepareForMarkupTagCompletion(list, mtc, index, selected, hasFocus); - } - else { - prepareForOtherCompletion(list, c, index, selected, hasFocus); - } - - // A delegate renderer might do its own alternate row striping - // (Substance does). - if (delegate!=null) { - delegate.getListCellRendererComponent(list, getText(), index, - selected, hasFocus); - delegate.setFont(getFont()); - delegate.setIcon(getIcon()); - return delegate; - } - - if (!selected && (index&1)==1 && altBG!=null) { - setBackground(altBG); - } - - return this; - - } - - - /** - * Returns whether the types of fields and return types of methods are - * shown in the completion text. - * - * @return Whether to show the types. - * @see #setShowTypes(boolean) - */ - public boolean getShowTypes() { - return showTypes; - } - - - private void init() { - //setDisplayFont(new Font("Monospaced", Font.PLAIN, 12)); - setShowTypes(true); - typeColor = createTypeColor(); - paramColor = createParamColor(); - paintTextR = new Rectangle(); - } - - - @Override - protected void paintComponent(Graphics g) { - - //super.paintComponent(g); - - g.setColor(realBG); - int iconW = 0; - if (getIcon()!=null) { - iconW = getIcon().getIconWidth(); - } - if (selected && iconW>0) { // The icon area is never in the "selection" - g.fillRect(0, 0, iconW, getHeight()); - g.setColor(getBackground()); - g.fillRect(iconW,0, getWidth()-iconW,getHeight()); - } - else { - g.setColor(getBackground()); - g.fillRect(0, 0, getWidth(), getHeight()); - } - if (getIcon()!=null) { - getIcon().paintIcon(this, g, 0, 0); - } - - String text = getText(); - if (text != null) { - paintTextR.setBounds(iconW,0, getWidth()-iconW,getHeight()); - paintTextR.x += 3; // Force a slight margin - int space = paintTextR.height - g.getFontMetrics().getHeight(); - View v = (View)getClientProperty(BasicHTML.propertyKey); - if (v != null) { - // HTML rendering doesn't auto-center vertically, for some - // reason - paintTextR.y += space/2; - paintTextR.height -= space; - v.paint(g, paintTextR); - } - else { - int textX = paintTextR.x; - int textY = paintTextR.y;// + g.getFontMetrics().getAscent(); - //System.out.println(g.getFontMetrics().getAscent()); - g.drawString(text, textX, textY); - } - } - - } - - - /** - * Prepares this renderer to display a function completion. - * - * @param list The list of choices being rendered. - * @param fc The completion to render. - * @param index The index into list being rendered. - * @param selected Whether the item is selected. - * @param hasFocus Whether the item has focus. - */ - protected void prepareForFunctionCompletion(JList list, - FunctionCompletion fc, int index, boolean selected, boolean hasFocus) { - - StringBuilder sb = new StringBuilder(PREFIX); - sb.append(fc.getName()); - - char paramListStart = fc.getProvider().getParameterListStart(); - if (paramListStart!=0) { // 0 => no start char - sb.append(paramListStart); - } - - int paramCount = fc.getParamCount(); - for (int i=0; i"); - } - sb.append(type); - if (!selected) { - sb.append(""); - } - if (name!=null) { - sb.append(' '); - } - } - if (name!=null) { - sb.append(name); - } - if (i No parameter list end char - sb.append(paramListEnd); - } - - if (getShowTypes() && fc.getType()!=null) { - sb.append(" : "); - if (!selected) { - sb.append(""); - } - sb.append(fc.getType()); - if (!selected) { - sb.append(""); - } - } - - setText(sb.toString()); - - } - - - /** - * Prepares this renderer to display a markup tag completion. - * - * @param list The list of choices being rendered. - * @param mc The completion to render. - * @param index The index into list being rendered. - * @param selected Whether the item is selected. - * @param hasFocus Whether the item has focus. - */ - protected void prepareForMarkupTagCompletion(JList list, - MarkupTagCompletion mc, int index, boolean selected, boolean hasFocus) { - - StringBuilder sb = new StringBuilder(PREFIX); - sb.append(mc.getName()); - - setText(sb.toString()); - - } - - - /** - * Prepares this renderer to display a completion not specifically handled - * elsewhere. - * - * @param list The list of choices being rendered. - * @param c The completion to render. - * @param index The index into list being rendered. - * @param selected Whether the item is selected. - * @param hasFocus Whether the item has focus. - */ - protected void prepareForOtherCompletion(JList list, - Completion c, int index, boolean selected, boolean hasFocus) { - - StringBuilder sb = new StringBuilder(PREFIX); - sb.append(c.getInputText()); - - if (c instanceof BasicCompletion) { - String definition = ((BasicCompletion)c).getShortDescription(); - if (definition!=null) { - sb.append(" - "); - if (!selected) { - sb.append(""); - } - sb.append(definition); - if (!selected) { - sb.append(""); - } - } - } - - setText(sb.toString()); - - } - - - /** - * Prepares this renderer to display a template completion. - * - * @param list The list of choices being rendered. - * @param tc The completion to render. - * @param index The index into list being rendered. - * @param selected Whether the item is selected. - * @param hasFocus Whether the item has focus. - */ - protected void prepareForTemplateCompletion(JList list, - TemplateCompletion tc, int index, boolean selected, boolean hasFocus) { - - StringBuilder sb = new StringBuilder(PREFIX); - sb.append(tc.getInputText()); - - String definition = tc.getShortDescription(); - if (definition!=null) { - sb.append(" - "); - if (!selected) { - sb.append(""); - } - sb.append(definition); - if (!selected) { - sb.append(""); - } - } - - setText(sb.toString()); - - } - - - /** - * Prepares this renderer to display a variable completion. - * - * @param list The list of choices being rendered. - * @param vc The completion to render. - * @param index The index into list being rendered. - * @param selected Whether the item is selected. - * @param hasFocus Whether the item has focus. - */ - protected void prepareForVariableCompletion(JList list, - VariableCompletion vc, int index, boolean selected, boolean hasFocus) { - - StringBuilder sb = new StringBuilder(PREFIX); - sb.append(vc.getName()); - - if (getShowTypes() && vc.getType()!=null) { - sb.append(" : "); - if (!selected) { - sb.append(""); - } - sb.append(vc.getType()); - if (!selected) { - sb.append(""); - } - } - - setText(sb.toString()); - - } - - - /** - * Sets the background color to use on alternating lines. - * - * @param altBG The new alternate background color. If this is - * null, alternating lines will not use different - * background colors. - * @see #getAlternateBackground() - */ - public static void setAlternateBackground(Color altBG) { - CompletionCellRenderer.altBG = altBG; - } - - - /** - * Sets the delegate renderer. Most users will never use this method; it - * is primarily a hook for Substance and other Look and Feels whose - * renderers look drastically different from the standard - * DefaultListCellRenderer. - * - * @param delegate The new delegate renderer. If this is null, - * the default rendering of this component is used. - * @see #getDelegateRenderer() - * @see #delegateToSubstanceRenderer() - */ - public void setDelegateRenderer(DefaultListCellRenderer delegate) { - this.delegate = delegate; - } - - - /** - * Sets the font to use when rendering completion items. - * - * @param font The font to use. If this is null, then - * the default list font is used. - * @see #getDisplayFont() - */ - public void setDisplayFont(Font font) { - this.font = font; - } - - - /** - * Sets the icon to display based off of a completion, falling back to the - * empty icon if the completion has no icon. - * - * @param completion The completion to check. - * @see #setIconWithDefault(Completion, Icon) - */ - protected void setIconWithDefault(Completion completion) { - setIconWithDefault(completion, getEmptyIcon()); - } - - - /** - * Sets the icon to display based off of a completion, falling back to a - * default icon if the completion has no icon. - * - * @param completion The completion to check. - * @param defaultIcon The icon to use if completion does not - * specify an icon. - * @see #setIconWithDefault(Completion) - */ - protected void setIconWithDefault(Completion completion, Icon defaultIcon) { - Icon icon = completion.getIcon(); - setIcon(icon!=null ? icon : - (defaultIcon!=null ? defaultIcon : emptyIcon)); - } - - - /** - * Sets the color to use for function arguments. - * - * @param color The color to use. This is ignored if null. - * @see #setTypeColor(Color) - */ - public void setParamColor(Color color) { - if (color!=null) { - paramColor = Util.getHexString(color); - } - } - - - /** - * Sets whether the types of fields and return types of methods are - * shown in the completion text. - * - * @param show Whether to show the types. - * @see #getShowTypes() - */ - public void setShowTypes(boolean show) { - this.showTypes = show; - } - - - /** - * Sets the color to use for function/field types. Note that if - * {@link #getShowTypes()} returns false, this property - * effectively does nothing. - * - * @param color The color to use for types. This is ignored if - * null. - * @see #setShowTypes(boolean) - * @see #setParamColor(Color) - */ - public void setTypeColor(Color color) { - if (color!=null) { - typeColor = Util.getHexString(color); - } - } - - - /** - * Overridden to update our delegate, if necessary. - */ - @Override - public void updateUI() { - super.updateUI(); - if (delegate!=null) { - SwingUtilities.updateComponentTreeUI(delegate); - } - paramColor = createParamColor(); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/CompletionListModel.java b/ESPlorer/src/org/fife/ui/autocomplete/CompletionListModel.java deleted file mode 100644 index abb79d1..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/CompletionListModel.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 12/22/2008 - * - * CompletionListModel.java - A model that allows bulk addition of elements. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import javax.swing.AbstractListModel; - - -/** - * A list model implementation that allows the bulk addition of elements. - * This is the only feature missing from DefaultListModel that - * we need. - * - * @author Robert Futrell - * @version 1.0 - */ -class CompletionListModel extends AbstractListModel { - - /** - * Container for items in this model. - */ - private List delegate; - - - /** - * Constructor. - */ - public CompletionListModel() { - delegate = new ArrayList(); - } - - - /** - * Removes all of the elements from this list. The list will - * be empty after this call returns (unless it throws an exception). - * - * @see #setContents(Collection) - */ - public void clear() { - int end = delegate.size()-1; - delegate.clear(); - if (end >= 0) { - fireIntervalRemoved(this, 0, end); - } - } - - - /** - * {@inheritDoc} - */ - public Object getElementAt(int index) { - return delegate.get(index); - } - - - /** - * {@inheritDoc} - */ - public int getSize() { - return delegate.size(); - } - - - /** - * Sets the contents of this model. All previous contents are removed. - * - * @param contents The new contents of this model. - */ - public void setContents(Collection contents) { - clear(); - int count = contents.size(); - if (count>0) { - delegate.addAll(contents); - fireIntervalAdded(this, 0, count-1); // endpoints included (!) - } - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/CompletionProvider.java b/ESPlorer/src/org/fife/ui/autocomplete/CompletionProvider.java deleted file mode 100644 index f11af5a..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/CompletionProvider.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * 12/21/2008 - * - * CompletionProvider.java - Provides autocompletion values based on the - * text currently in a text component. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.Point; -import java.util.List; - -import javax.swing.ListCellRenderer; -import javax.swing.text.JTextComponent; - - -/** - * Provides autocompletion values to an {@link AutoCompletion}.

- * - * Completion providers can have an optional parent. Parents are searched for - * completions when their children are. This allows for chaining of completion - * providers. - * - * @author Robert Futrell - * @version 1.0 - */ -public interface CompletionProvider { - - - /** - * Clears the values used to identify and insert "parameterized completions" - * (e.g. functions or methods). After this method is called, functions and - * methods will not have their parameters auto-completed. - * - * @see #setParameterizedCompletionParams(char, String, char) - */ - public void clearParameterizedCompletionParams(); - - - /** - * Returns the text just before the current caret position that could be - * the start of something auto-completable. - * - * @param comp The text component. - * @return The text. A return value of null means nothing - * should be auto-completed; a value of an empty string - * ("") means auto-completion should still be - * considered (i.e., all possible choices are valid). - */ - public String getAlreadyEnteredText(JTextComponent comp); - - - /** - * Gets the possible completions for the text component at the current - * caret position. - * - * @param comp The text component. - * @return The list of {@link Completion}s. If no completions are - * available, this method should return an empty list. - */ - public List getCompletions(JTextComponent comp); - - - /** - * Returns the completions that have been entered at the specified visual - * location. This can be used for tool tips when the user hovers the - * mouse over completed text. - * - * @param comp The text component. - * @param p The position, usually from a MouseEvent. - * @return The completions, or an empty list if there are none. - */ - public List getCompletionsAt(JTextComponent comp, Point p); - - - /** - * Returns the cell renderer for completions returned from this provider. - * - * @return The cell renderer, or null if the default should - * be used. - * @see #setListCellRenderer(ListCellRenderer) - */ - public ListCellRenderer getListCellRenderer(); - - - /** - * Returns an object that can return a list of completion choices for - * parameters. This is used when a user code-completes a parameterized - * completion, such as a function or method. For any parameter to the - * function/method, this object can return possible completions. - * - * @return The parameter choices provider, or null if - * none is installed. - */ - public ParameterChoicesProvider getParameterChoicesProvider(); - - - /** - * Returns a list of parameterized completions that have been entered - * at the current caret position of a text component (and thus can have - * their completion choices displayed). - * - * @param tc The text component. - * @return The list of {@link ParameterizedCompletion}s. If no completions - * are available, this may be null. - */ - public List getParameterizedCompletions(JTextComponent tc); - - - /** - * Returns the text that marks the end of a list of parameters to a - * function or method. - * - * @return The text for a parameter list end, for example, - * ')'. - * @see #getParameterListStart() - * @see #getParameterListSeparator() - * @see #setParameterizedCompletionParams(char, String, char) - */ - public char getParameterListEnd(); - - - /** - * Returns the text that separates parameters to a function or method. - * - * @return The text that separates parameters, for example, - * ", ". - * @see #getParameterListStart() - * @see #getParameterListEnd() - * @see #setParameterizedCompletionParams(char, String, char) - */ - public String getParameterListSeparator(); - - - /** - * Returns the text that marks the start of a list of parameters to a - * function or method. - * - * @return The text for a parameter list start, for example, - * "(". - * @see #getParameterListEnd() - * @see #getParameterListSeparator() - * @see #setParameterizedCompletionParams(char, String, char) - */ - public char getParameterListStart(); - - - /** - * Returns the parent completion provider. - * - * @return The parent completion provider. - * @see #setParent(CompletionProvider) - */ - public CompletionProvider getParent(); - - - /** - * This method is called if auto-activation is enabled in the parent - * {@link AutoCompletion} after the user types a single character. This - * provider should check the text at the current caret position of the - * text component, and decide whether auto-activation would be appropriate - * here. For example, a CompletionProvider for Java might - * want to return true for this method only if the last - * character typed was a '.'. - * - * @param tc The text component. - * @return Whether auto-activation would be appropriate. - */ - public boolean isAutoActivateOkay(JTextComponent tc); - - - /** - * Sets the renderer to use when displaying completion choices. - * - * @param r The renderer to use. - * @see #getListCellRenderer() - */ - public void setListCellRenderer(ListCellRenderer r); - - - /** - * Sets the values used to identify and insert "parameterized completions" - * (e.g. functions or methods). If this method isn't called, functions - * and methods will not have their parameters auto-completed. - * - * @param listStart The character that marks the beginning of a list of - * parameters, such as '(' in C or Java. - * @param separator Text that should separate parameters in a parameter - * list when one is inserted. For example, ", ". - * @param listEnd The character that marks the end of a list of parameters, - * such as ')' in C or Java. - * @throws IllegalArgumentException If either listStart or - * listEnd is not printable ASCII, or if - * separator is null or an empty string. - * @see #clearParameterizedCompletionParams() - */ - public void setParameterizedCompletionParams(char listStart, - String separator, char listEnd); - - - /** - * Sets the parent completion provider. - * - * @param parent The parent provider. null means there will - * be no parent provider. - * @see #getParent() - */ - public void setParent(CompletionProvider parent); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/CompletionProviderBase.java b/ESPlorer/src/org/fife/ui/autocomplete/CompletionProviderBase.java deleted file mode 100644 index 969ef40..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/CompletionProviderBase.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * 02/06/2010 - * - * CompletionProviderBase.java - Base completion provider implementation. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.util.Collections; -import java.util.Comparator; -import java.util.List; -import javax.swing.ListCellRenderer; -import javax.swing.text.BadLocationException; -import javax.swing.text.Document; -import javax.swing.text.JTextComponent; -import javax.swing.text.Segment; - - -/** - * A base class for all standard completion providers. This class implements - * functionality that should be sharable across all CompletionProvider - * implementations. - * - * @author Robert Futrell - * @version 1.0 - * @see AbstractCompletionProvider - */ -public abstract class CompletionProviderBase implements CompletionProvider { - - /** - * The parent completion provider. - */ - private CompletionProvider parent; - - /** - * The renderer to use for completions from this provider. If this is - * null, a default renderer is used. - */ - private ListCellRenderer listCellRenderer; - - /** - * Text that marks the beginning of a parameter list, for example, '('. - */ - private char paramListStart; - - /** - * Text that marks the end of a parameter list, for example, ')'. - */ - private char paramListEnd; - - /** - * Text that separates items in a parameter list, for example, ", ". - */ - private String paramListSeparator; - - /** - * Whether auto-activation should occur after letters. - */ - private boolean autoActivateAfterLetters; - - /** - * Non-letter chars that should cause auto-activation to occur. - */ - private String autoActivateChars; - - /** - * Provides completion choices for a parameterized completion's parameters. - */ - private ParameterChoicesProvider paramChoicesProvider; - - /** - * A segment to use for fast char access. - */ - private Segment s = new Segment(); - - protected static final String EMPTY_STRING = ""; - - /** - * Comparator used to sort completions by their relevance before sorting - * them lexicographically. - */ - private static final Comparator sortByRelevanceComparator = - new SortByRelevanceComparator(); - - - /** - * {@inheritDoc} - */ - public void clearParameterizedCompletionParams() { - paramListEnd = paramListStart = 0; - paramListSeparator = null; - } - - - /** - * {@inheritDoc} - */ - public List getCompletions(JTextComponent comp) { - - List completions = getCompletionsImpl(comp); - if (parent!=null) { - List parentCompletions = parent.getCompletions(comp); - if (parentCompletions!=null) { - completions.addAll(parentCompletions); - Collections.sort(completions); - } - } - - // NOTE: We can't sort by relevance prior to this; we need to have - // things alphabetical so we can easily narrow down completions to - // those starting with what was already typed. - if (/*sortByRelevance*/true) { - Collections.sort(completions, sortByRelevanceComparator); - } - - return completions; - - } - - - /** - * Does the dirty work of creating a list of completions. - * - * @param comp The text component to look in. - * @return The list of possible completions, or an empty list if there - * are none. - */ - protected abstract List getCompletionsImpl(JTextComponent comp); - - - /** - * {@inheritDoc} - */ - public ListCellRenderer getListCellRenderer() { - return listCellRenderer; - } - - - /** - * {@inheritDoc} - */ - public ParameterChoicesProvider getParameterChoicesProvider() { - return paramChoicesProvider; - } - - - /** - * {@inheritDoc} - */ - public char getParameterListEnd() { - return paramListEnd; - } - - - /** - * {@inheritDoc} - */ - public String getParameterListSeparator() { - return paramListSeparator; - } - - - /** - * {@inheritDoc} - */ - public char getParameterListStart() { - return paramListStart; - } - - - /** - * {@inheritDoc} - */ - public CompletionProvider getParent() { - return parent; - } - - - /** - * {@inheritDoc} - */ - public boolean isAutoActivateOkay(JTextComponent tc) { - Document doc = tc.getDocument(); - char ch = 0; - try { - doc.getText(tc.getCaretPosition(), 1, s); - ch = s.first(); - } catch (BadLocationException ble) { // Never happens - ble.printStackTrace(); - } - return (autoActivateAfterLetters && Character.isLetter(ch)) || - (autoActivateChars!=null && autoActivateChars.indexOf(ch)>-1); - } - - - /** - * Sets the characters that auto-activation should occur after. A Java - * completion provider, for example, might want to set others - * to ".", to allow auto-activation for members of an object. - * - * @param letters Whether auto-activation should occur after any letter. - * @param others A string of (non-letter) chars that auto-activation should - * occur after. This may be null. - */ - public void setAutoActivationRules(boolean letters, String others) { - autoActivateAfterLetters = letters; - autoActivateChars = others; - } - - - /** - * Sets the param choices provider. This is used when a user - * code-completes a parameterized completion, such as a function or method. - * For any parameter to the function/method, this object can return - * possible completions. - * - * @param pcp The parameter choices provider, or null for - * none. - * @see #getParameterChoicesProvider() - */ - public void setParameterChoicesProvider(ParameterChoicesProvider pcp) { - paramChoicesProvider = pcp; - } - - - /** - * {@inheritDoc} - */ - public void setListCellRenderer(ListCellRenderer r) { - listCellRenderer = r; - } - - - /** - * {@inheritDoc} - */ - public void setParameterizedCompletionParams(char listStart, - String separator, char listEnd) { - if (listStart<0x20 || listStart==0x7F) { - throw new IllegalArgumentException("Invalid listStart"); - } - if (listEnd<0x20 || listEnd==0x7F) { - throw new IllegalArgumentException("Invalid listEnd"); - } - if (separator==null || separator.length()==0) { - throw new IllegalArgumentException("Invalid separator"); - } - paramListStart = listStart; - paramListSeparator = separator; - paramListEnd = listEnd; - } - - - /** - * {@inheritDoc} - */ - public void setParent(CompletionProvider parent) { - this.parent = parent; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/CompletionXMLParser.java b/ESPlorer/src/org/fife/ui/autocomplete/CompletionXMLParser.java deleted file mode 100644 index 60944c8..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/CompletionXMLParser.java +++ /dev/null @@ -1,446 +0,0 @@ -/* - * 02/06/2010 - * - * CompletionXMLParser.java - Parses XML representing code completion for a - * C-like language. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.lang.reflect.Constructor; -import java.util.ArrayList; -import java.util.List; -import org.xml.sax.Attributes; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.helpers.DefaultHandler; - - -/** - * Parser for an XML file describing a procedural language such as C. XML - * files will be validated against the CompletionXml.dtd DTD - * found in this package. - * - * @author Robert Futrell - * @version 1.0 - */ -public class CompletionXMLParser extends DefaultHandler { - - /** - * The completions found after parsing the XML. - */ - private List completions; - - /** - * The provider we're getting completions for. - */ - private CompletionProvider provider; - - /** - * The completion provider to use when loading classes, such as custom - * {@link FunctionCompletion}s. - */ - private ClassLoader completionCL; - - - private String name; - private String type; - private String returnType; - private StringBuilder returnValDesc; - private StringBuilder desc; - private String paramName; - private String paramType; - private StringBuilder paramDesc; - private List params; - private String definedIn; - private boolean doingKeywords; - private boolean inKeyword; - private boolean gettingReturnValDesc; - private boolean gettingDesc; - private boolean gettingParams; - private boolean inParam; - private boolean gettingParamDesc; - private boolean inCompletionTypes; - private char paramStartChar; - private char paramEndChar; - private String paramSeparator; - - /** - * If specified in the XML, this class will be used instead of - * {@link FunctionCompletion} when appropriate. This class should extend - * FunctionCompletion, or stuff will break. - */ - private String funcCompletionType; - - /** - * The class loader to use to load custom completion classes, such as - * the one defined by {@link #funcCompletionType}. If this is - * null, then a default class loader is used. This field - * will usually be null. - */ - private static ClassLoader DEFAULT_COMPLETION_CLASS_LOADER; - - - /** - * Constructor. - * - * @param provider The provider to get completions for. - * @see #reset(CompletionProvider) - */ - public CompletionXMLParser(CompletionProvider provider) { - this(provider, null); - } - - - /** - * Constructor. - * - * @param provider The provider to get completions for. - * @param cl The class loader to use, if necessary, when loading classes - * from the XML (custom {@link FunctionCompletion}s, for example). - * This may be null if the default is to be used, or - * if the XML does not define specific classes for completion types. - * @see #reset(CompletionProvider) - */ - public CompletionXMLParser(CompletionProvider provider, ClassLoader cl) { - this.provider = provider; - this.completionCL = cl; - if (completionCL==null) { - // May also be null, but that's okay. - completionCL = DEFAULT_COMPLETION_CLASS_LOADER; - } - completions = new ArrayList(); - params = new ArrayList(1); - desc = new StringBuilder(); - paramDesc = new StringBuilder(); - returnValDesc = new StringBuilder(); - paramStartChar = paramEndChar = 0; - paramSeparator = null; - } - - - /** - * Called when character data inside an element is found. - */ - @Override - public void characters(char[] ch, int start, int length) { - if (gettingDesc) { - desc.append(ch, start, length); - } - else if (gettingParamDesc) { - paramDesc.append(ch, start, length); - } - else if (gettingReturnValDesc) { - returnValDesc.append(ch, start, length); - } - } - - - private FunctionCompletion createFunctionCompletion() { - - FunctionCompletion fc = null; - if (funcCompletionType!=null) { - try { - Class clazz = null; - if (completionCL!=null) { - clazz = Class.forName(funcCompletionType, true, - completionCL); - } - else { - clazz = Class.forName(funcCompletionType); - } - Constructor c = clazz.getDeclaredConstructor( - CompletionProvider.class, String.class, String.class); - fc = (FunctionCompletion)c.newInstance(provider, name, - returnType); - } catch (RuntimeException re) { // FindBugs - throw re; - } catch (Exception e) { - e.printStackTrace(); - } - } - - if (fc==null) { // Fallback if completion failed for some reason - fc = new FunctionCompletion(provider, name, returnType); - } - - if (desc.length()>0) { - fc.setShortDescription(desc.toString()); - desc.setLength(0); - } - fc.setParams(params); - fc.setDefinedIn(definedIn); - if (returnValDesc.length()>0) { - fc.setReturnValueDescription(returnValDesc.toString()); - returnValDesc.setLength(0); - } - - return fc; - - } - - - private BasicCompletion createOtherCompletion() { - BasicCompletion bc = new BasicCompletion(provider, name); - if (desc.length()>0) { - bc.setSummary(desc.toString()); - desc.setLength(0); - } - return bc; - } - - - private MarkupTagCompletion createMarkupTagCompletion() { - MarkupTagCompletion mc = new MarkupTagCompletion(provider, - name); - if (desc.length()>0) { - mc.setDescription(desc.toString()); - desc.setLength(0); - } - mc.setAttributes(params); - mc.setDefinedIn(definedIn); - return mc; - } - - - private VariableCompletion createVariableCompletion() { - VariableCompletion vc = new VariableCompletion(provider, - name, returnType); - if (desc.length()>0) { - vc.setShortDescription(desc.toString()); - desc.setLength(0); - } - vc.setDefinedIn(definedIn); - return vc; - } - - - /** - * Called when an element is closed. - */ - @Override - public void endElement(String uri, String localName, String qName) { - - if ("keywords".equals(qName)) { - doingKeywords = false; - } - - else if (doingKeywords) { - - if ("keyword".equals(qName)) { - Completion c = null; - if ("function".equals(type)) { - c = createFunctionCompletion(); - } - else if ("constant".equals(type)) { - c = createVariableCompletion(); - } - else if ("tag".equals(type)) { // Markup tag, such as HTML - c = createMarkupTagCompletion(); - } - else if ("other".equals(type)) { - c = createOtherCompletion(); - } - else { - throw new InternalError("Unexpected type: " + type); - } - completions.add(c); - inKeyword = false; - } - else if (inKeyword) { - if ("returnValDesc".equals(qName)) { - gettingReturnValDesc = false; - } - else if (gettingParams) { - if ("params".equals(qName)) { - gettingParams = false; - } - else if ("param".equals(qName)) { - FunctionCompletion.Parameter param = - new FunctionCompletion.Parameter(paramType, - paramName); - if (paramDesc.length()>0) { - param.setDescription(paramDesc.toString()); - paramDesc.setLength(0); - } - params.add(param); - inParam = false; - } - else if (inParam) { - if ("desc".equals(qName)) { - gettingParamDesc = false; - } - } - } - else if ("desc".equals(qName)) { - gettingDesc = false; - } - } - - } - - else if (inCompletionTypes) { - if ("completionTypes".equals(qName)) { - inCompletionTypes = false; - } - } - - } - - - @Override - public void error(SAXParseException e) throws SAXException { - throw e; - } - - /** - * Returns the completions found after parsing the XML. - * - * @return The completions. - */ - public List getCompletions() { - return completions; - } - - - /** - * Returns the parameter end character specified. - * - * @return The character, or 0 if none was specified. - */ - public char getParamEndChar() { - return paramEndChar; - } - - - /** - * Returns the parameter end string specified. - * - * @return The string, or null if none was specified. - */ - public String getParamSeparator() { - return paramSeparator; - } - - - /** - * Returns the parameter start character specified. - * - * @return The character, or 0 if none was specified. - */ - public char getParamStartChar() { - return paramStartChar; - } - - - private static final char getSingleChar(String str) { - return str.length()==1 ? str.charAt(0) : 0; - } - - - /** - * Resets this parser to grab more completions. - * - * @param provider The new provider to get completions for. - */ - public void reset(CompletionProvider provider) { - this.provider = provider; - completions.clear(); - doingKeywords = inKeyword = gettingDesc = gettingParams = inParam = - gettingParamDesc = false; - paramStartChar = paramEndChar = 0; - paramSeparator = null; - } - - - @Override - public InputSource resolveEntity(String publicID, - String systemID) throws SAXException { - return new InputSource(getClass(). - getResourceAsStream("CompletionXml.dtd")); - } - - /** - * Sets the class loader to use when loading custom classes to use for - * various {@link Completion} types, such as {@link FunctionCompletion}s, - * from XML.

- * - * Users should very rarely have a need to use this method. - * - * @param cl The class loader to use. If this is null, then - * a default is used. - */ - public static void setDefaultCompletionClassLoader(ClassLoader cl) { - DEFAULT_COMPLETION_CLASS_LOADER = cl; - } - - - /** - * Called when an element starts. - */ - @Override - public void startElement(String uri, String localName, String qName, - Attributes attrs) { - if ("keywords".equals(qName)) { - doingKeywords = true; - } - else if (doingKeywords) { - if ("keyword".equals(qName)) { - name = attrs.getValue("name"); - type = attrs.getValue("type"); - returnType = attrs.getValue("returnType"); - params.clear(); - definedIn = attrs.getValue("definedIn"); - inKeyword = true; - } - else if (inKeyword) { - if ("returnValDesc".equals(qName)) { - gettingReturnValDesc = true; - } - else if ("params".equals(qName)) { - gettingParams = true; - } - else if (gettingParams) { - if ("param".equals(qName)) { - paramName = attrs.getValue("name"); - paramType = attrs.getValue("type"); - inParam = true; - } - if (inParam) { - if ("desc".equals(qName)) { - gettingParamDesc = true; - } - } - } - else if ("desc".equals(qName)) { - gettingDesc = true; - } - } - } - else if ("environment".equals(qName)) { - paramStartChar = getSingleChar(attrs.getValue("paramStartChar")); - paramEndChar = getSingleChar(attrs.getValue("paramEndChar")); - paramSeparator = attrs.getValue("paramSeparator"); - //paramTerminal = attrs.getValua("terminal"); - } - else if ("completionTypes".equals(qName)) { - inCompletionTypes = true; - } - else if (inCompletionTypes) { - if ("functionCompletionType".equals(qName)) { - funcCompletionType = attrs.getValue("type"); - } - } - } - - - @Override - public void warning(SAXParseException e) throws SAXException { - throw e; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/CompletionXml.dtd b/ESPlorer/src/org/fife/ui/autocomplete/CompletionXml.dtd deleted file mode 100644 index 10b81e8..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/CompletionXml.dtd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/ESPlorer/src/org/fife/ui/autocomplete/DefaultCompletionProvider.java b/ESPlorer/src/org/fife/ui/autocomplete/DefaultCompletionProvider.java deleted file mode 100644 index d4ba92e..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/DefaultCompletionProvider.java +++ /dev/null @@ -1,373 +0,0 @@ -/* - * 12/21/2008 - * - * DefaultCompletionProvider.java - A basic completion provider implementation. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.Point; -import java.io.BufferedInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; -import javax.swing.text.BadLocationException; -import javax.swing.text.Document; -import javax.swing.text.Element; -import javax.swing.text.JTextComponent; -import javax.swing.text.Segment; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; -import org.xml.sax.SAXException; - - -/** - * A basic completion provider implementation. This provider has no - * understanding of language semantics. It simply checks the text entered up - * to the caret position for a match against known completions. This is all - * that is needed in the majority of cases. - * - * @author Robert Futrell - * @version 1.0 - */ -public class DefaultCompletionProvider extends AbstractCompletionProvider { - - protected Segment seg; - - /** - * Used to speed up {@link #getCompletionsAt(JTextComponent, Point)}. - */ - private String lastCompletionsAtText; - - /** - * Used to speed up {@link #getCompletionsAt(JTextComponent, Point)}, - * since this may be called multiple times in succession (this is usually - * called by JTextComponent.getToolTipText(), and if the user - * wiggles the mouse while a tool tip is displayed, this method gets - * repeatedly called. It can be costly so we try to speed it up a tad). - */ - private List lastParameterizedCompletionsAt; - - /** - * Constructor. The returned provider will not be aware of any completions. - * - * @see #addCompletion(Completion) - */ - public DefaultCompletionProvider() { - init(); - } - - - /** - * Creates a completion provider that provides completion for a simple - * list of words. - * - * @param words The words to offer as completion suggestions. If this is - * null, no completions will be known. - * @see BasicCompletion - */ - public DefaultCompletionProvider(String[] words) { - init(); - addWordCompletions(words); - } - - - /** - * Returns the text just before the current caret position that could be - * the start of something auto-completable.

- * - * This method returns all characters before the caret that are matched - * by {@link #isValidChar(char)}. - * - * {@inheritDoc} - */ - public String getAlreadyEnteredText(JTextComponent comp) { - - Document doc = comp.getDocument(); - - int dot = comp.getCaretPosition(); - Element root = doc.getDefaultRootElement(); - int index = root.getElementIndex(dot); - Element elem = root.getElement(index); - int start = elem.getStartOffset(); - int len = dot-start; - try { - doc.getText(start, len, seg); - } catch (BadLocationException ble) { - ble.printStackTrace(); - return EMPTY_STRING; - } - - int segEnd = seg.offset + len; - start = segEnd - 1; - while (start>=seg.offset && isValidChar(seg.array[start])) { - start--; - } - start++; - - len = segEnd - start; - return len==0 ? EMPTY_STRING : new String(seg.array, start, len); - - } - - - /** - * {@inheritDoc} - */ - public List getCompletionsAt(JTextComponent tc, Point p) { - - int offset = tc.viewToModel(p); - if (offset<0 || offset>=tc.getDocument().getLength()) { - lastCompletionsAtText = null; - return lastParameterizedCompletionsAt = null; - } - - Segment s = new Segment(); - Document doc = tc.getDocument(); - Element root = doc.getDefaultRootElement(); - int line = root.getElementIndex(offset); - Element elem = root.getElement(line); - int start = elem.getStartOffset(); - int end = elem.getEndOffset() - 1; - - try { - - doc.getText(start, end-start, s); - - // Get the valid chars before the specified offset. - int startOffs = s.offset + (offset-start) - 1; - while (startOffs>=s.offset && isValidChar(s.array[startOffs])) { - startOffs--; - } - - // Get the valid chars at and after the specified offset. - int endOffs = s.offset + (offset-start); - while (endOffs list = getCompletionByInputText(text); - lastCompletionsAtText = text; - return lastParameterizedCompletionsAt = list; - - } catch (BadLocationException ble) { - ble.printStackTrace(); // Never happens - } - - lastCompletionsAtText = null; - return lastParameterizedCompletionsAt = null; - - } - - - /** - * {@inheritDoc} - */ - public List getParameterizedCompletions( - JTextComponent tc) { - - List list = null; - - // If this provider doesn't support parameterized completions, - // bail out now. - char paramListStart = getParameterListStart(); - if (paramListStart==0) { - return list; // null - } - - int dot = tc.getCaretPosition(); - Segment s = new Segment(); - Document doc = tc.getDocument(); - Element root = doc.getDefaultRootElement(); - int line = root.getElementIndex(dot); - Element elem = root.getElement(line); - int offs = elem.getStartOffset(); - int len = dot - offs - 1/*paramListStart.length()*/; - if (len<=0) { // Not enough chars on line for a method. - return list; // null - } - - try { - - doc.getText(offs, len, s); - - // Get the identifier preceding the '(', ignoring any whitespace - // between them. - offs = s.offset + len - 1; - while (offs>=s.offset && Character.isWhitespace(s.array[offs])) { - offs--; - } - int end = offs; - while (offs>=s.offset && isValidChar(s.array[offs])) { - offs--; - } - - String text = new String(s.array, offs+1, end-offs); - - // Get a list of all Completions matching the text, but then - // narrow it down to just the ParameterizedCompletions. - List l = getCompletionByInputText(text); - if (l!=null && !l.isEmpty()) { - for (int i=0; i(1); - } - list.add((ParameterizedCompletion)o); - } - } - } - - } catch (BadLocationException ble) { - ble.printStackTrace(); // Never happens - } - - return list; - - } - - - /** - * Initializes this completion provider. - */ - protected void init() { - seg = new Segment(); - } - - - /** - * Returns whether the specified character is valid in an auto-completion. - * The default implementation is equivalent to - * "Character.isLetterOrDigit(ch) || ch=='_'". Subclasses - * can override this method to change what characters are matched. - * - * @param ch The character. - * @return Whether the character is valid. - */ - protected boolean isValidChar(char ch) { - return Character.isLetterOrDigit(ch) || ch=='_' || ch=='.'; - } - - - /** - * Loads completions from an XML file. The XML should validate against - * CompletionXml.dtd. - * - * @param file An XML file to load from. - * @throws IOException If an IO error occurs. - */ - public void loadFromXML(File file) throws IOException { - BufferedInputStream bin = new BufferedInputStream( - new FileInputStream(file)); - try { - loadFromXML(bin); - } finally { - bin.close(); - } - } - - - /** - * Loads completions from an XML input stream. The XML should validate - * against CompletionXml.dtd. - * - * @param in The input stream to read from. - * @throws IOException If an IO error occurs. - */ - public void loadFromXML(InputStream in) throws IOException { - loadFromXML(in, null); - } - - - /** - * Loads completions from an XML input stream. The XML should validate - * against CompletionXml.dtd. - * - * @param in The input stream to read from. - * @param cl The class loader to use when loading any extra classes defined - * in the XML, such as custom {@link FunctionCompletion}s. This - * may be null if the default is to be used, or if no - * custom completions are defined in the XML. - * @throws IOException If an IO error occurs. - */ - public void loadFromXML(InputStream in, ClassLoader cl) throws IOException { - - //long start = System.currentTimeMillis(); - - SAXParserFactory factory = SAXParserFactory.newInstance(); - factory.setValidating(true); - CompletionXMLParser handler = new CompletionXMLParser(this, cl); - BufferedInputStream bin = new BufferedInputStream(in); - try { - SAXParser saxParser = factory.newSAXParser(); - saxParser.parse(bin, handler); - List completions = handler.getCompletions(); - addCompletions(completions); - char startChar = handler.getParamStartChar(); - if (startChar!=0) { - char endChar = handler.getParamEndChar(); - String sep = handler.getParamSeparator(); - if (endChar!=0 && sep!=null && sep.length()>0) { // Sanity - setParameterizedCompletionParams(startChar, sep, endChar); - } - } - } catch (SAXException se) { - throw new IOException(se.toString()); - } catch (ParserConfigurationException pce) { - throw new IOException(pce.toString()); - } finally { - //long time = System.currentTimeMillis() - start; - //System.out.println("XML loaded in: " + time + "ms"); - bin.close(); - } - - } - - - /** - * Loads completions from an XML file. The XML should validate against - * CompletionXml.dtd. - * - * @param resource A resource the current ClassLoader can get to. - * @throws IOException If an IO error occurs. - */ - public void loadFromXML(String resource) throws IOException { - ClassLoader cl = getClass().getClassLoader(); - InputStream in = cl.getResourceAsStream(resource); - if (in==null) { - File file = new File(resource); - if (file.isFile()) { - in = new FileInputStream(file); - } - else { - throw new IOException("No such resource: " + resource); - } - } - BufferedInputStream bin = new BufferedInputStream(in); - try { - loadFromXML(bin); - } finally { - bin.close(); - } - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/DelegatingCellRenderer.java b/ESPlorer/src/org/fife/ui/autocomplete/DelegatingCellRenderer.java deleted file mode 100644 index 226d182..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/DelegatingCellRenderer.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 12/22/2008 - * - * DelegatingCellRenderer.java - A renderer for Completions that will delegate - * to the Completion's provider's renderer, if there is one. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.Component; -import javax.swing.DefaultListCellRenderer; -import javax.swing.JComponent; -import javax.swing.JList; -import javax.swing.ListCellRenderer; - - -/** - * List cell renderer that delegates to a {@link CompletionProvider}'s - * renderer, if it has one. If it doesn't, it calls into a fallback renderer. - * If a fallback renderer isn't specified, it simply renders - * (({@link Completion})value).toString(). - * - * @author Robert Futrell - * @version 1.0 - */ -class DelegatingCellRenderer extends DefaultListCellRenderer { - - /** - * The renderer to fall back on if one isn't specified by a provider. - * This is usually this. - */ - private ListCellRenderer fallback; - - - /** - * Returns the fallback cell renderer. - * - * @return The fallback cell renderer. - * @see #setFallbackCellRenderer(ListCellRenderer) - */ - public ListCellRenderer getFallbackCellRenderer() { - return fallback; - } - - - /** - * {@inheritDoc} - */ - @Override - public Component getListCellRendererComponent(JList list, Object value, - int index, boolean selected, boolean hasFocus) { - Completion c = (Completion)value; - CompletionProvider p = c.getProvider(); - ListCellRenderer r = p.getListCellRenderer(); - if (r!=null) { - return r.getListCellRendererComponent(list, value, index, selected, - hasFocus); - } - if (fallback==null) { - return super.getListCellRendererComponent(list, value, index, - selected, hasFocus); - } - return fallback.getListCellRendererComponent(list, value, index, - selected, hasFocus); - } - - - /** - * Sets the fallback cell renderer. - * - * @param fallback The fallback cell renderer. If this is - * null, this will be used. - * @see #getFallbackCellRenderer() - */ - public void setFallbackCellRenderer(ListCellRenderer fallback) { - this.fallback = fallback; - } - - - /** - * {@inheritDoc} - */ - @Override - public void updateUI() { - super.updateUI(); - if ((fallback instanceof JComponent) && fallback!=this) { - ((JComponent)fallback).updateUI(); - } - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/DescWindowCallback.java b/ESPlorer/src/org/fife/ui/autocomplete/DescWindowCallback.java deleted file mode 100644 index de17da8..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/DescWindowCallback.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 05/11/2012 - * - * Copyright (C) 2012 Robert Futrell - * robert_futrell at users.sourceforge.net - * http://fifesoft.com/rsyntaxtextarea - * - * This library is distributed under a modified BSD license. See the included - * RSTALanguageSupport.License.txt file for details. - */ -package org.fife.ui.autocomplete; - - -/** - * Passed to {@link ExternalURLHandler}s as a way for them to display a summary - * for a new completion in response to a link event. - * - * @author Robert Futrell - * @version 1.0 - * @see ExternalURLHandler - */ -public interface DescWindowCallback { - - - /** - * Callback allowing a new code completion's description to be displayed - * in the description window. - * - * @param completion The new completion. - * @param anchor The anchor to scroll to, or null if none. - */ - public void showSummaryFor(Completion completion, String anchor); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/EmptyIcon.java b/ESPlorer/src/org/fife/ui/autocomplete/EmptyIcon.java deleted file mode 100644 index 3be6036..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/EmptyIcon.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 04/29/2010 - * - * EmptyIcon.java - The canonical icon that paints nothing. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.Component; -import java.awt.Graphics; -import java.io.Serializable; -import javax.swing.Icon; - - -/** - * A standard icon that doesn't paint anything. This can be used when some - * Completions have icons and others don't, to visually align the - * text of all completions. - * - * @author Robert Futrell - * @version 1.0 - */ -public class EmptyIcon implements Icon, Serializable { - - private int size; - - - public EmptyIcon(int size) { - this.size = size; - } - - - public int getIconHeight() { - return size; - } - - - public int getIconWidth() { - return size; - } - - - public void paintIcon(Component c, Graphics g, int x, int y) { - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/ExternalURLHandler.java b/ESPlorer/src/org/fife/ui/autocomplete/ExternalURLHandler.java deleted file mode 100644 index ff78c40..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/ExternalURLHandler.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 12/23/2008 - * - * ExternalURLHandler.java - Implementations can be registered as a callback - * to handle the user clicking on external URL's. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import javax.swing.event.HyperlinkEvent; - - -/** - * A callback for when an external URL is clicked in the description window. - * If no handler is installed, and if running in Java 6, the system default - * web browser is used to open the URL. If not running Java 6, nothing will - * happen. If you want browser support for pre-Java 6 JRE's, you will need - * to register one of these callbacks on your {@link AutoCompletion}, and - * open the URL in a web browser yourself.

- * - * Alternatively, folks implementing robust code completion support for a - * language might install an ExternalURLHandler to handle - * navigating through linked documentation of objects, functions, etc. - * - * @author Robert Futrell - * @version 1.0 - * @see AutoCompletion#setExternalURLHandler(ExternalURLHandler) - */ -public interface ExternalURLHandler { - - - /** - * Called when an external URL is clicked in the description window. - * - * @param e The event containing the hyperlink clicked. - * @param c The completion currently being displayed. - * @param callback Allows you to display new content in the description - * window. - */ - public void urlClicked(HyperlinkEvent e, Completion c, - DescWindowCallback callback); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/FastListUI.java b/ESPlorer/src/org/fife/ui/autocomplete/FastListUI.java deleted file mode 100644 index f9bc72a..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/FastListUI.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * 04/26/2010 - * - * FastListUI.java - A JList UI implementation that computes the preferred size - * of all cells really fast, to facilitate lists of possibly thousands of items - * rendered with HTML, which is slow with BasicListUI extensions. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.Color; -import java.awt.Dimension; -import java.awt.SystemColor; -import javax.swing.JViewport; -import javax.swing.ListCellRenderer; -import javax.swing.ListModel; -import javax.swing.UIManager; -import javax.swing.plaf.basic.BasicListUI; - - -/** - * A custom list UI, used by the completion choices list. If the number of - * completion choices is "large," it does a fast estimate of the preferred - * width and height of list items. This allows HTML renderers to be used (such - * as {@link CompletionCellRenderer}), with thousands of completion choices, - * with no performance penalty. With standard BasicListUI subclasses, this can - * cause very poor performance each time the list is displayed, which - * is bad for lists that are repeatedly hidden and re-displayed, such as - * completion choices. This is all because the calculation to get the - * preferred size of each list item, when it is displayed with HTML, is slow. - * - * @author Robert Futrell - * @version 1.0 - */ -class FastListUI extends BasicListUI { - - /** - * Whether the selection background was overridden (usually because of - * Nimbus) so we know to manually uninstall the color we installed. - */ - private boolean overriddenBackground; - - /** - * Whether the selection foreground was overridden (usually because of - * Nimbus) so we know to manually uninstall the color we installed. - */ - private boolean overriddenForeground; - - /** - * If there are more than this many completions in a single list, this - * UI will estimate the cell width and height needed for each item instead - * of computing it, for performance reasons. - */ - private static final int ESTIMATION_THRESHOLD = 200; - - - private Color determineSelectionBackground() { - Color c = UIManager.getColor("List.selectionBackground"); - if (c==null) { - c = UIManager.getColor("nimbusSelectionBackground"); - if (c==null) { // Not Nimbus, but still need a value - fallback - c = UIManager.getColor("textHighlight"); - if (c==null) { - c = SystemColor.textHighlight; - } - } - } - - // Nimbus unfortunately requires a Color, not a ColorUIResource, for - // the background override to work. This causes this color to "stick" - // even if the LAF is changed to something else later. "c" here may - // actually be a ColorUIResource - return new Color(c.getRGB());//new ColorUIResource(c); - - } - - - private Color determineSelectionForeground() { - Color c = UIManager.getColor("List.selectionForeground"); - if (c==null) { - c = UIManager.getColor("nimbusSelectedText"); - if (c==null) { // Not Nimbus, but still need a value - fallback - c = UIManager.getColor("textHighlightText"); - if (c==null) { - c = SystemColor.textHighlightText; - } - } - } - // Nimbus unfortunately requires Color, not ColorUIResource, and "c" - // may actually be a ColorUIResource - return new Color(c.getRGB()); - } - - - /** - * Overridden to ensure we have selection background/foreground colors - * defined, even if we're in some weirdo LAF such as Nimbus which doesn't - * define them. Since FastListUI extends BasicListUI, we need these values - * to be defined. - */ - @Override - protected void installDefaults() { - - super.installDefaults(); - - if (list.getSelectionBackground()==null) { - list.setSelectionBackground(determineSelectionBackground()); - overriddenBackground = true; - } - - if (list.getSelectionForeground()==null) { - list.setSelectionForeground(determineSelectionForeground()); - overriddenForeground = true; - } - } - - - /** - * Overridden to work around a Nimbus issue. - */ - @Override - protected void uninstallDefaults() { - - super.uninstallDefaults(); - - if (overriddenBackground) { - list.setSelectionBackground(null); - } - - if (overriddenForeground) { - list.setSelectionForeground(null); - } - - } - - - /** - * Recalculates the cell width and height of each cell in the list. This - * method is overridden to do a fast estimation if the completion list is - * too long, to improve performance for lists with huge amounts of - * completions. - */ - @Override - protected void updateLayoutState() { - - ListModel model = list.getModel(); - int itemCount = model.getSize(); - - // If the item count is small enough to run fast on practically all - // machines, go ahead and use the super implementation to determine - // the optimal cell sizes. - if (itemCount0) { - Object value = model.getElementAt(0); - java.awt.Component c = renderer.getListCellRendererComponent(list, - value, 0, false, false); - rendererPane.add(c); - Dimension cellSize = c.getPreferredSize(); - cellHeight = cellSize.height; - cellWidth = Math.max(cellWidth, cellSize.width); - } - else { - cellHeight = 20; - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/FunctionCompletion.java b/ESPlorer/src/org/fife/ui/autocomplete/FunctionCompletion.java deleted file mode 100644 index df707e6..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/FunctionCompletion.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * 12/22/2008 - * - * FunctionCompletion.java - A completion representing a function. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.util.ArrayList; -import java.util.List; -import javax.swing.text.BadLocationException; -import javax.swing.text.JTextComponent; -import javax.swing.text.Position; - - -/** - * A completion choice representing a function. - * - * @author Robert Futrell - * @version 1.0 - */ -public class FunctionCompletion extends VariableCompletion - implements ParameterizedCompletion { - - /** - * Parameters to the function. - */ - private List params; - - /** - * A description of the return value of this function. - */ - private String returnValDesc; - - - /** - * Constructor. - * - * @param provider The parent provider. - * @param name The name of this function. - * @param returnType The return type of this function. - */ - public FunctionCompletion(CompletionProvider provider, String name, - String returnType) { - super(provider, name, returnType); - } - - - @Override - protected void addDefinitionString(StringBuilder sb) { - sb.append(""); - sb.append(getDefinitionString()); - sb.append(""); - } - - - /** - * Adds HTML describing the parameters to this function to a buffer. - * - * @param sb The buffer to append to. - */ - protected void addParameters(StringBuilder sb) { - - // TODO: Localize me - - int paramCount = getParamCount(); - if (paramCount>0) { - sb.append("Parameters:
"); - sb.append("

"); - for (int i=0; i"); - sb.append(param.getName()!=null ? param.getName() : - param.getType()); - sb.append(" "); - String desc = param.getDescription(); - if (desc!=null) { - sb.append(desc); - } - sb.append("
"); - } - sb.append("


"); - } - - if (returnValDesc!=null) { - sb.append("Returns:
"); - sb.append(returnValDesc); - sb.append("


"); - } - - } - - - /** - * Returns the "definition string" for this function completion. For - * example, for the C "printf" function, this would return - * "int printf(const char *, ...)". - * - * @return The definition string. - */ - @Override - public String getDefinitionString() { - - StringBuilder sb = new StringBuilder(); - - // Add the return type if applicable (C macros like NULL have no type). - String type = getType(); - if (type!=null) { - sb.append(type).append(' '); - } - - // Add the item being described's name. - sb.append(getName()); - - // Add parameters for functions. - CompletionProvider provider = getProvider(); - char start = provider.getParameterListStart(); - if (start!=0) { - sb.append(start); - } - for (int i=0; i 2 - - // thanks to Matthew Adereth! - String sep = getProvider().getParameterListSeparator(); - if (i0 ? (dot+firstParamLen) : dot; - info.setInitialSelection(dot, selectionEnd); - info.setTextToInsert(sb.toString()); - return info; - - } - - - /** - * {@inheritDoc} - */ - public Parameter getParam(int index) { - return params.get(index); - } - - - /** - * Returns the number of parameters to this function. - * - * @return The number of parameters to this function. - * @see #getParam(int) - */ - public int getParamCount() { - return params==null ? 0 : params.size(); - } - - - /** - * {@inheritDoc} - */ - public boolean getShowParameterToolTip() { - return true; - } - - - /** - * Returns the text to insert for a parameter. - * - * @param param The parameter. - * @return The text. - */ - private String getParamText(ParameterizedCompletion.Parameter param) { - String text = param.getName(); - if (text==null) { - text = param.getType(); - if (text==null) { // Shouldn't ever happen - text = "arg"; - } - } - return text; - } - - - /** - * Returns the description of the return value of this function. - * - * @return The description, or null if there is none. - * @see #setReturnValueDescription(String) - */ - public String getReturnValueDescription() { - return returnValDesc; - } - - - /** - * {@inheritDoc} - */ - @Override - public String getSummary() { - StringBuilder sb = new StringBuilder(); - addDefinitionString(sb); - if (!possiblyAddDescription(sb)) { - sb.append("


"); - } - addParameters(sb); - possiblyAddDefinedIn(sb); - return sb.toString(); - } - - - /** - * {@inheritDoc} - */ - @Override - public String getToolTipText() { - String text = getSummary(); - if (text==null) { - text = getDefinitionString(); - } - return text; - } - - - /** - * Sets the parameters to this function. - * - * @param params The parameters. This should be a list of - * {@link ParameterizedCompletion.Parameter}s. - * @see #getParam(int) - * @see #getParamCount() - */ - public void setParams(List params) { - if (params!=null) { - // Deep copy so parsing can re-use its array. - this.params = new ArrayList(params); - } - } - - - /** - * Sets the description of the return value of this function. - * - * @param desc The description. - * @see #getReturnValueDescription() - */ - public void setReturnValueDescription(String desc) { - this.returnValDesc = desc; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/LanguageAwareCompletionProvider.java b/ESPlorer/src/org/fife/ui/autocomplete/LanguageAwareCompletionProvider.java deleted file mode 100644 index c0840ec..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/LanguageAwareCompletionProvider.java +++ /dev/null @@ -1,427 +0,0 @@ -/* - * 01/03/2009 - * - * LanguageAwareCompletionProvider.java - A completion provider that is aware - * of the language it is working with. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.Point; -import java.awt.event.MouseEvent; -import java.util.Collections; -import java.util.List; -import javax.swing.text.JTextComponent; - -import org.fife.ui.rsyntaxtextarea.RSyntaxDocument; -import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; -import org.fife.ui.rsyntaxtextarea.RSyntaxUtilities; -import org.fife.ui.rsyntaxtextarea.Token; -import org.fife.ui.rtextarea.RTextArea; -import org.fife.ui.rtextarea.ToolTipSupplier; - - -/** - * A completion provider for the C programming language (and other languages - * with similar syntax). This provider simply delegates to another provider, - * depending on whether the caret is in: - * - *
    - *
  • Code (plain text)
  • - *
  • A string
  • - *
  • A comment
  • - *
  • A documentation comment
  • - *
- * - * This allows for different completion choices in comments than in code, - * for example.

- * - * This provider also implements the - * org.fife.ui.rtextarea.ToolTipSupplier interface, which allows it - * to display tooltips for completion choices. Thus the standard - * {@link VariableCompletion} and {@link FunctionCompletion} completions should - * be able to display tooltips with the variable declaration or function - * definition (provided the RSyntaxTextArea was registered with the - * javax.swing.ToolTipManager). - * - * @author Robert Futrell - * @version 1.0 - */ -public class LanguageAwareCompletionProvider extends CompletionProviderBase - implements ToolTipSupplier { - - /** - * The provider to use when no provider is assigned to a particular token - * type. - */ - private CompletionProvider defaultProvider; - - /** - * The provider to use when completing in a string. - */ - private CompletionProvider stringCompletionProvider; - - /** - * The provider to use when completing in a comment. - */ - private CompletionProvider commentCompletionProvider; - - /** - * The provider to use while in documentation comments. - */ - private CompletionProvider docCommentCompletionProvider; - - - /** - * Constructor subclasses can use when they don't have their default - * provider created at construction time. They should call - * {@link #setDefaultCompletionProvider(CompletionProvider)} in this - * constructor. - */ - protected LanguageAwareCompletionProvider() { - } - - - /** - * Constructor. - * - * @param defaultProvider The provider to use when no provider is assigned - * to a particular token type. This cannot be null. - */ - public LanguageAwareCompletionProvider(CompletionProvider defaultProvider) { - setDefaultCompletionProvider(defaultProvider); - } - - - /** - * Calling this method will result in an - * {@link UnsupportedOperationException} being thrown. To set the - * parameter completion parameters, do so on the provider returned by - * {@link #getDefaultCompletionProvider()}. - * - * @throws UnsupportedOperationException Always. - * @see #setParameterizedCompletionParams(char, String, char) - */ - @Override - public void clearParameterizedCompletionParams() { - throw new UnsupportedOperationException(); - } - - - /** - * {@inheritDoc} - */ - public String getAlreadyEnteredText(JTextComponent comp) { - if (!(comp instanceof RSyntaxTextArea)) { - return EMPTY_STRING; - } - CompletionProvider provider = getProviderFor(comp); - return provider!=null ? provider.getAlreadyEnteredText(comp) : null; - } - - - /** - * Returns the completion provider to use for comments. - * - * @return The completion provider to use. - * @see #setCommentCompletionProvider(CompletionProvider) - */ - public CompletionProvider getCommentCompletionProvider() { - return commentCompletionProvider; - } - - - /** - * {@inheritDoc} - */ - public List getCompletionsAt(JTextComponent tc, Point p) { - return defaultProvider==null ? null : - defaultProvider.getCompletionsAt(tc, p); - } - - - /** - * Does the dirty work of creating a list of completions. - * - * @param comp The text component to look in. - * @return The list of possible completions, or an empty list if there - * are none. - */ - @Override - protected List getCompletionsImpl(JTextComponent comp) { - if (comp instanceof RSyntaxTextArea) { - CompletionProvider provider = getProviderFor(comp); - if (provider!=null) { - return provider.getCompletions(comp); - } - } - return Collections.emptyList(); - } - - - /** - * Returns the completion provider used when one isn't defined for a - * particular token type. - * - * @return The completion provider to use. - * @see #setDefaultCompletionProvider(CompletionProvider) - */ - public CompletionProvider getDefaultCompletionProvider() { - return defaultProvider; - } - - - /** - * Returns the completion provider to use for documentation comments. - * - * @return The completion provider to use. - * @see #setDocCommentCompletionProvider(CompletionProvider) - */ - public CompletionProvider getDocCommentCompletionProvider() { - return docCommentCompletionProvider; - } - - - /** - * {@inheritDoc} - */ - public List getParameterizedCompletions( - JTextComponent tc) { - // Parameterized completions can only come from the "code" completion - // provider. We do not do function/method completions while editing - // strings or comments. - CompletionProvider provider = getProviderFor(tc); - return provider==defaultProvider ? - provider.getParameterizedCompletions(tc) : null; - } - - - /** - * {@inheritDoc} - */ - @Override - public char getParameterListEnd() { - return defaultProvider.getParameterListEnd(); - } - - - /** - * {@inheritDoc} - */ - @Override - public String getParameterListSeparator() { - return defaultProvider.getParameterListSeparator(); - } - - - /** - * {@inheritDoc} - */ - @Override - public char getParameterListStart() { - return defaultProvider.getParameterListStart(); - } - - - /** - * Returns the completion provider to use at the current caret position in - * a text component. - * - * @param comp The text component to check. - * @return The completion provider to use. - */ - private CompletionProvider getProviderFor(JTextComponent comp) { - - RSyntaxTextArea rsta = (RSyntaxTextArea)comp; - RSyntaxDocument doc = (RSyntaxDocument)rsta.getDocument(); - int line = rsta.getCaretLineNumber(); - Token t = doc.getTokenListForLine(line); - if (t==null) { - return getDefaultCompletionProvider(); - } - - int dot = rsta.getCaretPosition(); - Token curToken = RSyntaxUtilities.getTokenAtOffset(t, dot); - - if (curToken==null) { // At end of the line - - int type = doc.getLastTokenTypeOnLine(line); - if (type==Token.NULL) { - Token temp = t.getLastPaintableToken(); - if (temp==null) { - return getDefaultCompletionProvider(); - } - type = temp.getType(); - } - - // TokenMakers can use types < 0 for "internal types." This - // gives them a chance to map their internal types back to "real" - // types to get completion providers. - else if (type<0) { - type = doc.getClosestStandardTokenTypeForInternalType(type); - } - - switch (type) { - case Token.ERROR_STRING_DOUBLE: - return getStringCompletionProvider(); - case Token.COMMENT_EOL: - case Token.COMMENT_MULTILINE: - return getCommentCompletionProvider(); - case Token.COMMENT_DOCUMENTATION: - return getDocCommentCompletionProvider(); - default: - return getDefaultCompletionProvider(); - } - - } - - // FIXME: This isn't always a safe assumption. - if (dot==curToken.getOffset()) { // At the very beginning of a new token - // Need to check previous token for its type before deciding. - // Previous token may also be on previous line! - return getDefaultCompletionProvider(); - } - - switch (curToken.getType()) { - case Token.LITERAL_STRING_DOUBLE_QUOTE: - case Token.ERROR_STRING_DOUBLE: - return getStringCompletionProvider(); - case Token.COMMENT_EOL: - case Token.COMMENT_MULTILINE: - return getCommentCompletionProvider(); - case Token.COMMENT_DOCUMENTATION: - return getDocCommentCompletionProvider(); - case Token.NULL: - case Token.WHITESPACE: - case Token.IDENTIFIER: - case Token.VARIABLE: - case Token.PREPROCESSOR: - case Token.DATA_TYPE: - case Token.FUNCTION: - case Token.OPERATOR: - return getDefaultCompletionProvider(); - } - - return null; // In a token type we can't auto-complete from. - - } - - - /** - * Returns the completion provider to use for strings. - * - * @return The completion provider to use. - * @see #setStringCompletionProvider(CompletionProvider) - */ - public CompletionProvider getStringCompletionProvider() { - return stringCompletionProvider; - } - - - /** - * {@inheritDoc} - */ - @Override - public boolean isAutoActivateOkay(JTextComponent tc) { - CompletionProvider provider = getProviderFor(tc); - return provider!=null ? provider.isAutoActivateOkay(tc) : false; - } - - - /** - * Sets the comment completion provider. - * - * @param provider The provider to use in comments. - * @see #getCommentCompletionProvider() - */ - public void setCommentCompletionProvider(CompletionProvider provider) { - this.commentCompletionProvider = provider; - } - - - /** - * Sets the default completion provider. - * - * @param provider The provider to use when no provider is assigned to a - * particular token type. This cannot be null. - * @see #getDefaultCompletionProvider() - */ - public void setDefaultCompletionProvider(CompletionProvider provider) { - if (provider==null) { - throw new IllegalArgumentException("provider cannot be null"); - } - this.defaultProvider = provider; - } - - - /** - * Sets the documentation comment completion provider. - * - * @param provider The provider to use in comments. - * @see #getDocCommentCompletionProvider() - */ - public void setDocCommentCompletionProvider(CompletionProvider provider) { - this.docCommentCompletionProvider = provider; - } - - - /** - * Calling this method will result in an - * {@link UnsupportedOperationException} being thrown. To set the - * parameter completion parameters, do so on the provider returned by - * {@link #getDefaultCompletionProvider()}. - * - * @throws UnsupportedOperationException Always. - * @see #clearParameterizedCompletionParams() - */ - @Override - public void setParameterizedCompletionParams(char listStart, - String separator, char listEnd) { - throw new UnsupportedOperationException(); - } - - - /** - * Sets the completion provider to use while in a string. - * - * @param provider The provider to use. - * @see #getStringCompletionProvider() - */ - public void setStringCompletionProvider(CompletionProvider provider) { - stringCompletionProvider = provider; - } - - - /** - * Returns the tool tip to display for a mouse event.

- * - * For this method to be called, the RSyntaxTextArea must be - * registered with the javax.swing.ToolTipManager like so: - * - *

-	 * ToolTipManager.sharedInstance().registerComponent(textArea);
-	 * 
- * - * @param textArea The text area. - * @param e The mouse event. - * @return The tool tip text, or null if none. - */ - public String getToolTipText(RTextArea textArea, MouseEvent e) { - - String tip = null; - - List completions = getCompletionsAt(textArea, e.getPoint()); - if (completions!=null && completions.size()>0) { - // Only ever 1 match for us in C... - Completion c = completions.get(0); - tip = c.getToolTipText(); - } - - return tip; - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/LinkRedirector.java b/ESPlorer/src/org/fife/ui/autocomplete/LinkRedirector.java deleted file mode 100644 index f59a718..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/LinkRedirector.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.fife.ui.autocomplete; - -import java.net.URL; - - -/** - * Possibly redirects one URL to another. Useful if you want "external" URL's - * in code completion documentation to point to a local copy instead, for - * example. - * - * @author Robert Futrell - * @version 1.0 - */ -public interface LinkRedirector { - - - public URL possiblyRedirect(URL original); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/MarkupTagCompletion.java b/ESPlorer/src/org/fife/ui/autocomplete/MarkupTagCompletion.java deleted file mode 100644 index b6a9a01..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/MarkupTagCompletion.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * 01/06/2009 - * - * MarkupTagComletion.java - A completion representing a tag in markup, such - * as HTML or XML. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.util.ArrayList; -import java.util.List; - -import org.fife.ui.autocomplete.ParameterizedCompletion.Parameter; - - -/** - * A completion representing a tag in markup, such as HTML or XML. - * - * @author Robert Futrell - * @version 1.0 - */ -public class MarkupTagCompletion extends AbstractCompletion { - - private String name; - private String desc; - private String definedIn; - - /** - * Attributes of the tag. - */ - private List attrs; - - - /** - * Constructor. - * - * @param provider The parent provider instance. - * @param name The name of the tag. - */ - public MarkupTagCompletion(CompletionProvider provider, String name) { - super(provider); - this.name = name; - } - - - /** - * Adds HTML describing the attributes of this tag to a buffer. - * - * @param sb The buffer to append to. - */ - protected void addAttributes(StringBuilder sb) { - - // TODO: Localize me. - - int attrCount = getAttributeCount(); - if (attrCount>0) { - sb.append("Attributes:
"); - sb.append("
"); - for (int i=0; i"); - sb.append(attr.getName()!=null ? attr.getName() : - attr.getType()); - sb.append(" "); - String desc = attr.getDescription(); - if (desc!=null) { - sb.append(desc); - } - sb.append("
"); - } - sb.append("


"); - } - - } - - - protected void addDefinitionString(StringBuilder sb) { - sb.append("").append(name).append(""); - } - - - /** - * Returns all attributes of this tag. - * - * @return A list of {@link ParameterizedCompletion.Parameter}s. - * @see #getAttribute(int) - * @see #getAttributeCount() - */ - public List getAttributes() { - return attrs; - } - - - /** - * Returns the specified {@link ParameterizedCompletion.Parameter}. - * - * @param index The index of the attribute to retrieve. - * @return The attribute. - * @see #getAttributeCount() - */ - public Parameter getAttribute(int index) { - return attrs.get(index); - } - - - /** - * Returns the number of attributes of this tag. - * - * @return The number of attributes of this tag. - * @see #getAttribute(int) - */ - public int getAttributeCount() { - return attrs==null ? 0 : attrs.size(); - } - - - /** - * Returns where this variable is defined. - * - * @return Where this variable is defined. - * @see #setDefinedIn(String) - */ - public String getDefinedIn() { - return definedIn; - } - - - /** - * Returns a short description of this variable. This should be an - * HTML snippet. - * - * @return A short description of this variable. This may be - * null. - * @see #setDescription(String) - */ - public String getDescription() { - return desc; - } - - - /** - * Returns the name of this tag. - * - * @return The name of this tag. - */ - public String getName() { - return name; - } - - - /** - * {@inheritDoc} - */ - public String getReplacementText() { - return getName(); - } - - - /** - * {@inheritDoc} - */ - public String getSummary() { - StringBuilder sb = new StringBuilder(); - addDefinitionString(sb); - possiblyAddDescription(sb); - addAttributes(sb); - possiblyAddDefinedIn(sb); - return sb.toString(); - } - - - /** - * Adds some HTML describing where this variable is defined, if this - * information is known. - * - * @param sb The buffer to append to. - */ - protected void possiblyAddDefinedIn(StringBuilder sb) { - if (definedIn!=null) { - sb.append("
Defined in:"); // TODO: Localize me - sb.append(" ").append(definedIn).append(""); - } - } - - - /** - * Adds the description text as HTML to a buffer, if a description is - * defined. - * - * @param sb The buffer to append to. - */ - protected void possiblyAddDescription(StringBuilder sb) { - if (desc!=null) { - sb.append("

"); - sb.append(desc); - sb.append("


"); - } - } - - - /** - * Sets where this variable is defined. - * - * @param definedIn Where this variable is defined. - * @see #getDefinedIn() - */ - public void setDefinedIn(String definedIn) { - this.definedIn = definedIn; - } - - - /** - * Sets the short description of this tag. This should be an - * HTML snippet. - * - * @param desc A short description of this tag. This may be - * null. - * @see #getDescription() - */ - public void setDescription(String desc) { - this.desc = desc; - } - - - /** - * Sets the attributes of this tag. - * - * @param attrs The attributes. - * @see #getAttribute(int) - * @see #getAttributeCount() - */ - public void setAttributes(List attrs) { - // Deep copy so parsing can re-use its array. - this.attrs = new ArrayList(attrs); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/OutlineHighlightPainter.java b/ESPlorer/src/org/fife/ui/autocomplete/OutlineHighlightPainter.java deleted file mode 100644 index 57d0c5a..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/OutlineHighlightPainter.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 04/26/2009 - * - * OutlineHighlightPainter.java - Highlight painter that draws an outline - * around its text. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.Color; -import java.awt.Graphics; -import java.awt.Rectangle; -import java.awt.Shape; -import javax.swing.text.BadLocationException; -import javax.swing.text.DefaultHighlighter; -import javax.swing.text.JTextComponent; -import javax.swing.text.Position; -import javax.swing.text.View; - - -/** - * Highlight painter that draws an outline around the text. This is used to - * draw bounds around function/method parameters. - * - * @author Robert Futrell - * @version 1.0 - */ -/* - * NOTE: Whenever you see text like "Workaround for Java Highlight issues", - * this is because highlighted text in a JTextComponent gets "pushed" forward - * when the caret is at the Highlight's start, when we need it to instead get - * prepended to. For this reason, the auto-complete package adds its Highlights - * 1 char too long (1 char earlier than where it should really start), but only - * paint the Highlight from the 2nd char on. - */ -class OutlineHighlightPainter extends - DefaultHighlighter.DefaultHighlightPainter { - - /** - * DefaultHighlightPainter doesn't allow changing color, so we must cache - * ours here. - */ - private Color color; - - - /** - * Constructor. - * - * @param color The color to draw the bounding boxes with. This cannot - * be null. - */ - public OutlineHighlightPainter(Color color) { - super(color); - setColor(color); - } - - - /** - * Returns the color to paint bounding boxes with. - * - * @return The color. - * @see #setColor(Color) - */ - @Override - public Color getColor() { - return color; - } - - - /** - * {@inheritDoc} - */ - @Override - public Shape paintLayer(Graphics g, int p0, int p1, Shape viewBounds, - JTextComponent c, View view) { - - g.setColor(getColor()); - p0++; // Workaround for Java Highlight issues. - - // This special case isn't needed for most standard Swing Views (which - // always return a width of 1 for modelToView() calls), but it is - // needed for RSTA views, which actually return the width of chars for - // modelToView calls. But this should be faster anyway, as we - // short-circuit and do only one modelToView() for one offset. - if (p0==p1) { - try { - Shape s = view.modelToView(p0, viewBounds, - Position.Bias.Forward); - Rectangle r = s.getBounds(); - g.drawLine(r.x, r.y, r.x, r.y+r.height); - return r; - } catch (BadLocationException ble) { - ble.printStackTrace(); // Never happens - return null; - } - } - - if (p0 == view.getStartOffset() && p1 == view.getEndOffset()) { - // Contained in view, can just use bounds. - Rectangle alloc; - if (viewBounds instanceof Rectangle) { - alloc = (Rectangle) viewBounds; - } else { - alloc = viewBounds.getBounds(); - } - g.drawRect(alloc.x, alloc.y, alloc.width - 1, alloc.height - 1); - return alloc; - } - - // Should only render part of View. - try { - // --- determine locations --- - Shape shape = view.modelToView(p0, Position.Bias.Forward, p1, - Position.Bias.Backward, viewBounds); - Rectangle r = (shape instanceof Rectangle) ? (Rectangle) shape - : shape.getBounds(); - g.drawRect(r.x, r.y, r.width - 1, r.height - 1); - return r; - } catch (BadLocationException e) { // Never happens - e.printStackTrace(); - return null; - } - - } - - - /** - * Sets the color to paint the bounding boxes with. - * - * @param color The new color. This cannot be null. - * @see #getColor() - */ - public void setColor(Color color) { - if (color==null) { - throw new IllegalArgumentException("color cannot be null"); - } - this.color = color; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/ParameterChoicesProvider.java b/ESPlorer/src/org/fife/ui/autocomplete/ParameterChoicesProvider.java deleted file mode 100644 index 497238f..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/ParameterChoicesProvider.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 12/14/2010 - * - * ParameterChoicesProvider.java - Provides completions for a - * ParameterizedCompletion's parameters. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.util.List; -import javax.swing.text.JTextComponent; - - -/** - * Provides completions for a {@link ParameterizedCompletion}'s parameters. - * So, for example, if the user code-completes a function or method, if - * a ParameterChoicesProvider is installed, it can return possible - * completions for the parameters to that function or method. - * - * @author Robert Futrell - * @version 1.0 - */ -public interface ParameterChoicesProvider { - - - /** - * Returns a list of choices for a specific parameter. - * - * @param tc The text component. - * @param param The currently focused parameter. - * @return The list of parameters. This may be null for - * "no parameters," but might also be an empty list. - */ - public List getParameterChoices(JTextComponent tc, - ParameterizedCompletion.Parameter param); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletion.java b/ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletion.java deleted file mode 100644 index 4359d9e..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletion.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * 12/11/2010 - * - * ParameterizedCompletion.java - A completion option. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import javax.swing.text.JTextComponent; - - -/** - * A completion option that takes parameters, such as a function or method. - * - * @author Robert Futrell - * @version 1.0 - */ -public interface ParameterizedCompletion extends Completion { - - - /** - * Returns the "definition string" for this completion. For example, - * for the C "printf" function, this would return - * "int printf(const char *, ...)". - * - * @return The definition string. - */ - public String getDefinitionString(); - - - /** - * Returns the specified {@link Parameter}. - * - * @param index The index of the parameter to retrieve. - * @return The parameter. - * @see #getParamCount() - */ - public Parameter getParam(int index); - - - /** - * Returns the number of parameters this completion takes. - * - * @return The number of parameters this completion takes. - * @see #getParam(int) - */ - public int getParamCount(); - - - public ParameterizedCompletionInsertionInfo getInsertionInfo( - JTextComponent tc, boolean replaceTabsWithSpaces); - - - /** - * Returns whether a tool tip displaying assistance for each parameter - * while it is being edited is appropriate for this completion. - * - * @return Whether the tool tip is appropriate to display. - */ - public boolean getShowParameterToolTip(); - - - /** - * A parameter passed to a parameterized {@link Completion}. - */ - public static class Parameter { - - private String name; - private Object type; - private String desc; - private boolean isEndParam; - - /** - * Constructor. - * - * @param type The type of this parameter. This may be - * null for languages without specific types, - * dynamic typing, etc. Usually you'll pass a String for this - * value, but you may pass any object representing a type in - * your language, as long as its toString() method - * returns a string representation of the type. - * @param name The name of the parameter. - */ - public Parameter(Object type, String name) { - this(type, name, false); - } - - /** - * Constructor. - * - * @param type The type of this parameter. This may be - * null for languages without specific types, - * dynamic typing, etc. Usually you'll pass a String for this - * value, but you may pass any object representing a type in - * your language, as long as its toString() method - * returns a string representation of the type. - * @param name The name of the parameter. - * @param endParam Whether this parameter is an "ending parameter;" - * that is, whether this parameter is at a logical "ending - * point" in the completion text. If the user types in a - * parameter that is an ending point, parameter completion mode - * terminates. Set this to true for a trailing - * parameter after a function call's closing ')', for example. - */ - public Parameter(Object type, String name, boolean endParam) { - this.name = name; - this.type = type; - this.isEndParam = endParam; - } - - public String getDescription() { - return desc; - } - - public String getName() { - return name; - } - - /** - * Returns the type of this parameter, as a string. - * - * @return The type of the parameter, or null for none. - */ - public String getType() { - return type==null ? null : type.toString(); - } - - /** - * Returns the object used to describe the type of this parameter. - * - * @return The type object, or null for none. - */ - public Object getTypeObject() { - return type; - } - - /** - * @return Whether this parameter is an "ending parameter;" - * that is, whether this parameter is at a logical "ending - * point" in the completion text. If the user types in a - * parameter that is an ending point, parameter completion mode - * terminates. - */ - public boolean isEndParam() { - return isEndParam; - } - - public void setDescription(String desc) { - this.desc = desc; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - if (getType()!=null) { - sb.append(getType()); - } - if (getName()!=null) { - if (getType()!=null) { - sb.append(' '); - } - sb.append(getName()); - } - return sb.toString(); - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletionChoicesWindow.java b/ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletionChoicesWindow.java deleted file mode 100644 index 378301c..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletionChoicesWindow.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * 12/11/2010 - * - * ParameterizedCompletionChoicesWindow.java - A list of likely choices for a - * parameter. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.ComponentOrientation; -import java.awt.Dimension; -import java.awt.Rectangle; -import java.awt.Window; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.List; -import javax.swing.DefaultListModel; -import javax.swing.JList; -import javax.swing.JScrollPane; -import javax.swing.JWindow; -import javax.swing.SwingUtilities; -import javax.swing.text.JTextComponent; - -import org.fife.ui.rsyntaxtextarea.PopupWindowDecorator; - - -/** - * A small popup window offering a list of likely choices for a parameter - * when the user has code-completed a parameterized completion. For example, - * if they have just code-completed the C function "fprintf", - * when entering the file name, this popup might display all local variables - * of type "char *". - * - * @author Robert Futrell - * @version 1.0 - */ -public class ParameterizedCompletionChoicesWindow extends JWindow { - - /** - * The parent AutoCompletion instance. - */ - private AutoCompletion ac; - - /** - * The list of completion choices. - */ - private JList list; - - /** - * The currently displayed completion choices. - */ - private DefaultListModel model; - - /** - * A list of lists of choices for each parameter. - */ - private List> choicesListList; - - /** - * The scroll pane containing the list. - */ - private JScrollPane sp; - - /** - * Comparator used to sort completions by their relevance before sorting - * them lexicographically. - */ - private static final Comparator sortByRelevanceComparator = - new SortByRelevanceComparator(); - - - /** - * Constructor. - * - * @param parent The parent window (hosting the text component). - * @param ac The auto-completion instance. - * @param context The completion context. - */ - public ParameterizedCompletionChoicesWindow(Window parent, - AutoCompletion ac, - final ParameterizedCompletionContext context) { - - super(parent); - this.ac = ac; - ComponentOrientation o = ac.getTextComponentOrientation(); - - model = new DefaultListModel(); - list = new JList(model); - if (ac.getParamChoicesRenderer()!=null) { - list.setCellRenderer(ac.getParamChoicesRenderer()); - } - list.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent e) { - if (e.getClickCount()==2) { - context.insertSelectedChoice(); - } - } - }); - sp = new JScrollPane(list); - - setContentPane(sp); - applyComponentOrientation(o); - setFocusableWindowState(false); - - // Give apps a chance to decorate us with drop shadows, etc. - PopupWindowDecorator decorator = PopupWindowDecorator.get(); - if (decorator!=null) { - decorator.decorate(this); - } - - } - - - /** - * Returns the selected value. - * - * @return The selected value, or null if nothing is - * selected. - */ - public String getSelectedChoice() { - Completion c = (Completion)list.getSelectedValue(); - return c==null ? null : c.toString(); - } - - - /** - * Changes the selected index. - * - * @param amount The amount by which to change the selected index. - */ - public void incSelection(int amount) { - int selection = list.getSelectedIndex(); - selection += amount; - if (selection<0) { - // Account for nothing selected yet - selection = model.getSize()-1;//+= model.getSize(); - } - else { - selection %= model.getSize(); - } - list.setSelectedIndex(selection); - list.ensureIndexIsVisible(selection); - } - - - /** - * Initializes this window to offer suggestions for the parameters of - * a specific completion. - * - * @param pc The completion whose parameters we should offer suggestions - * for. - */ - public void initialize(ParameterizedCompletion pc) { - - CompletionProvider provider = pc.getProvider(); - ParameterChoicesProvider pcp = provider.getParameterChoicesProvider(); - if (pcp==null) { - choicesListList = null; - return; - } - - int paramCount = pc.getParamCount(); - choicesListList = new ArrayList>(paramCount); - JTextComponent tc = ac.getTextComponent(); - - for (int i=0; i choices = pcp.getParameterChoices(tc, param); - choicesListList.add(choices); - } - - } - - - /** - * Sets the location of this window relative to the given rectangle. - * - * @param r The visual position of the caret (in screen coordinates). - */ - public void setLocationRelativeTo(Rectangle r) { - - // Multi-monitor support - make sure the completion window (and - // description window, if applicable) both fit in the same window in - // a multi-monitor environment. To do this, we decide which monitor - // the rectangle "r" is in, and use that one (just pick top-left corner - // as the defining point). - Rectangle screenBounds = Util.getScreenBoundsForPoint(r.x, r.y); - //Dimension screenSize = tooltip.getToolkit().getScreenSize(); - - // Try putting our stuff "below" the caret first. - int y = r.y + r.height + 5; - - // Get x-coordinate of completions. Try to align left edge with the - // caret first. - int x = r.x; - if (xscreenBounds.x+screenBounds.width) { // completions don't fit - x = screenBounds.x + screenBounds.width - getWidth(); - } - - setLocation(x, y); - - } - - - /** - * Displays the choices for the specified parameter matching the given - * text. This will display or hide this popup window as necessary. - * - * @param param The index of the parameter the caret is currently in. - * This may be -1 if not in a parameter (i.e., on - * the comma between parameters). - * @param prefix Text in the parameter before the dot. This may - * be null to represent the empty string. - */ - public void setParameter(int param, String prefix) { - - model.clear(); - List temp = new ArrayList(); - - if (choicesListList!=null && param>=0 && param choices = choicesListList.get(param); - if (choices!=null) { - for (Completion c : choices) { - String choice = c.getReplacementText(); - if (prefix==null || Util.startsWithIgnoreCase(choice, prefix)) { - temp.add(c); - } - } - } - - // Sort completions appropriately. - Comparator c = null; - if (/*sortByRelevance*/true) { - c = sortByRelevanceComparator; - } - Collections.sort(temp, c); - for (int i=0; i0) { - Dimension size = getPreferredSize(); - if (size.width<150) { - setSize(150, size.height); - } - else { - pack(); - } - // Make sure nothing is ever obscured by vertical scroll bar. - if (sp.getVerticalScrollBar()!=null && - sp.getVerticalScrollBar().isVisible()) { - size = getSize(); - int w = size.width + sp.getVerticalScrollBar().getWidth()+5; - setSize(w, size.height); - } - list.setSelectedIndex(0); - list.ensureIndexIsVisible(0); - if (!isVisible()) { - setVisible(true); - } - } - - } - - else { - setVisible(false); - } - - } - - - /** - * Toggles the visibility of this popup window. - * - * @param visible Whether this window should be visible. - */ - @Override - public void setVisible(boolean visible) { - if (visible!=isVisible()) { - // i.e. if no possibilities matched what's been typed - if (visible && model.size()==0) {//list.getVisibleRowCount()==0) { - return; - } - super.setVisible(visible); - } - } - - - /** - * Updates the LookAndFeel of this window. - */ - public void updateUI() { - SwingUtilities.updateComponentTreeUI(this); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletionContext.java b/ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletionContext.java deleted file mode 100644 index f87a162..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletionContext.java +++ /dev/null @@ -1,1236 +0,0 @@ -/* - * 06/17/2012 - * - * ParameritizedCompletionContext.java - Manages the state of parameterized - * completion-related UI components during code completion. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.Point; -import java.awt.Rectangle; -import java.awt.Window; -import java.awt.event.ActionEvent; -import java.awt.event.FocusEvent; -import java.awt.event.FocusListener; -import java.awt.event.InputEvent; -import java.awt.event.KeyEvent; -import java.util.ArrayList; -import java.util.List; -import javax.swing.AbstractAction; -import javax.swing.Action; -import javax.swing.ActionMap; -import javax.swing.InputMap; -import javax.swing.KeyStroke; -import javax.swing.SwingUtilities; -import javax.swing.UIManager; -import javax.swing.event.CaretEvent; -import javax.swing.event.CaretListener; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; -import javax.swing.text.AbstractDocument; -import javax.swing.text.BadLocationException; -import javax.swing.text.DefaultEditorKit; -import javax.swing.text.Document; -import javax.swing.text.Highlighter; -import javax.swing.text.JTextComponent; -import javax.swing.text.Position; -import javax.swing.text.Highlighter.Highlight; -import javax.swing.text.Highlighter.HighlightPainter; - -import org.fife.ui.autocomplete.ParameterizedCompletion.Parameter; -import org.fife.ui.autocomplete.ParameterizedCompletionInsertionInfo.ReplacementCopy; -import org.fife.ui.rsyntaxtextarea.DocumentRange; -import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; -import org.fife.ui.rtextarea.ChangeableHighlightPainter; - - -/** - * Manages UI and state specific to parameterized completions - the parameter - * description tool tip, the parameter completion choices list, the actual - * highlights in the editor, etc. This component installs new key bindings - * when appropriate to allow the user to cycle through the parameters of the - * completion, and optionally cycle through completion choices for those - * parameters. - * - * @author Robert Futrell - * @version 1.0 - */ -class ParameterizedCompletionContext { - - /** - * The parent window. - */ - private Window parentWindow; - - /** - * The parent AutoCompletion instance. - */ - private AutoCompletion ac; - - /** - * The completion being described. - */ - private ParameterizedCompletion pc; - - /** - * Whether parameterized completion assistance is active. - */ - private boolean active; - - /** - * A tool tip displaying the currently edited parameter name and type. - */ - private ParameterizedCompletionDescriptionToolTip tip; - - /** - * The painter to paint borders around the variables. - */ - private Highlighter.HighlightPainter p; - - private Highlighter.HighlightPainter endingP; - - private Highlighter.HighlightPainter paramCopyP; - - /** - * The tags for the highlights around parameters. - */ - private List tags; - - private List paramCopyInfos; - - private transient boolean ignoringDocumentEvents; - - /** - * Listens for events in the text component while this window is visible. - */ - private Listener listener; - - /** - * The minimum offset into the document that the caret can move to - * before this tool tip disappears. - */ - private int minPos; - - /** - * The maximum offset into the document that the caret can move to - * before this tool tip disappears. - */ - private Position maxPos; // Moves with text inserted. - - private Position defaultEndOffs; - - /** - * The currently "selected" parameter in the displayed text. - */ - private int lastSelectedParam; - - /** - * A small popup window giving likely choices for parameterized completions. - */ - private ParameterizedCompletionChoicesWindow paramChoicesWindow; - - /** - * The text before the caret for the current parameter. If - * {@link #paramChoicesWindow} is non-null, this is used to - * determine what parameter choices to actually show. - */ - private String paramPrefix; - - private Object oldTabKey; - private Action oldTabAction; - private Object oldShiftTabKey; - private Action oldShiftTabAction; - private Object oldUpKey; - private Action oldUpAction; - private Object oldDownKey; - private Action oldDownAction; - private Object oldEnterKey; - private Action oldEnterAction; - private Object oldEscapeKey; - private Action oldEscapeAction; - private Object oldClosingKey; - private Action oldClosingAction; - - private static final String IM_KEY_TAB = "ParamCompKey.Tab"; - private static final String IM_KEY_SHIFT_TAB = "ParamCompKey.ShiftTab"; - private static final String IM_KEY_UP = "ParamCompKey.Up"; - private static final String IM_KEY_DOWN = "ParamCompKey.Down"; - private static final String IM_KEY_ESCAPE = "ParamCompKey.Escape"; - private static final String IM_KEY_ENTER = "ParamCompKey.Enter"; - private static final String IM_KEY_CLOSING = "ParamCompKey.Closing"; - - - /** - * Constructor. - */ - public ParameterizedCompletionContext(Window owner, - AutoCompletion ac, ParameterizedCompletion pc) { - - this.parentWindow = owner; - this.ac = ac; - this.pc = pc; - listener = new Listener(); - - AutoCompletionStyleContext sc = AutoCompletion.getStyleContext(); - p = new OutlineHighlightPainter(sc.getParameterOutlineColor()); - endingP = new OutlineHighlightPainter( - sc.getParameterizedCompletionCursorPositionColor()); - paramCopyP = new ChangeableHighlightPainter(sc.getParameterCopyColor()); - tags = new ArrayList(1); // Usually small - paramCopyInfos = new ArrayList(1); - - } - - - /** - * Activates parameter completion support. - * - * @see #deactivate() - */ - public void activate() { - - if (active) { - return; - } - - active = true; - JTextComponent tc = ac.getTextComponent(); - lastSelectedParam = -1; - - if (pc.getShowParameterToolTip()) { - tip = new ParameterizedCompletionDescriptionToolTip( - parentWindow, this, ac, pc); - try { - int dot = tc.getCaretPosition(); - Rectangle r = tc.modelToView(dot); - Point p = new Point(r.x, r.y); - SwingUtilities.convertPointToScreen(p, tc); - r.x = p.x; - r.y = p.y; - tip.setLocationRelativeTo(r); - tip.setVisible(true); - } catch (BadLocationException ble) { // Should never happen - UIManager.getLookAndFeel().provideErrorFeedback(tc); - ble.printStackTrace(); - tip = null; - } - } - - listener.install(tc); - // First time through, we'll need to create this window. - if (paramChoicesWindow==null) { - paramChoicesWindow = createParamChoicesWindow(); - } - lastSelectedParam = getCurrentParameterIndex(); - prepareParamChoicesWindow(); - paramChoicesWindow.setVisible(true); - - } - - - /** - * Creates the completion window offering suggestions for parameters. - * - * @return The window. - */ - private ParameterizedCompletionChoicesWindow createParamChoicesWindow() { - ParameterizedCompletionChoicesWindow pcw = - new ParameterizedCompletionChoicesWindow(parentWindow, - ac, this); - pcw.initialize(pc); - return pcw; - } - - - /** - * Hides any popup windows and terminates parameterized completion - * assistance. - * - * @see #activate() - */ - public void deactivate() { - if (!active) { - return; - } - active = false; - listener.uninstall(); - if (tip!=null) { - tip.setVisible(false); - } - if (paramChoicesWindow!=null) { - paramChoicesWindow.setVisible(false); - } - } - - - /** - * Returns the text inserted for the parameter containing the specified - * offset. - * - * @param offs The offset into the document. - * @return The text of the parameter containing the offset, or - * null if the offset is not in a parameter. - */ - public String getArgumentText(int offs) { - List paramHighlights = getParameterHighlights(); - if (paramHighlights==null || paramHighlights.size()==0) { - return null; - } - for (Highlight h : paramHighlights) { - if (offs>=h.getStartOffset() && offs<=h.getEndOffset()) { - int start = h.getStartOffset() + 1; - int len = h.getEndOffset() - start; - JTextComponent tc = ac.getTextComponent(); - Document doc = tc.getDocument(); - try { - return doc.getText(start, len); - } catch (BadLocationException ble) { - UIManager.getLookAndFeel().provideErrorFeedback(tc); - ble.printStackTrace(); - return null; - } - } - } - return null; - } - - - /** - * Returns the highlight of the current parameter. - * - * @return The current parameter's highlight, or null if - * the caret is not in a parameter's bounds. - * @see #getCurrentParameterStartOffset() - */ - private Highlight getCurrentParameterHighlight() { - - JTextComponent tc = ac.getTextComponent(); - int dot = tc.getCaretPosition(); - if (dot>0) { - dot--; // Workaround for Java Highlight issues - } - - List paramHighlights = getParameterHighlights(); - for (Highlight h : paramHighlights) { - if (dot>=h.getStartOffset() && dot0) { - dot--; // Workaround for Java Highlight issues - } - - List paramHighlights = getParameterHighlights(); - for (int i=0; i=h.getStartOffset() && dot-1 if - * the caret is not in a parameter's bounds. - * @see #getCurrentParameterHighlight() - */ - private int getCurrentParameterStartOffset() { - Highlight h = getCurrentParameterHighlight(); - return h!=null ? h.getStartOffset()+1 : -1; - } - - - /** - * Returns the highlight from a list that comes "first" in a list. Even - * though most parameter highlights are ordered, sometimes they aren't - * (e.g. the "cursor" parameter in a template completion is always last, - * even though it can be anywhere in the template). - * - * @param highlights The list of highlights. Assumed to be non-empty. - * @return The highlight that comes first in the document. - * @see #getLastHighlight(List) - */ - private static final int getFirstHighlight(List highlights) { - int first = -1; - Highlight firstH = null; - for (int i=0; i highlights) { - int last = -1; - Highlight lastH = null; - for (int i=highlights.size()-1; i>=0; i--) { - Highlight h = highlights.get(i); - if (lastH==null || h.getStartOffset()>lastH.getStartOffset()) { - lastH = h; - last = i; - } - } - return last; - } - - - public List getParameterHighlights() { - List paramHighlights = new ArrayList(2); - JTextComponent tc = ac.getTextComponent(); - Highlight[] highlights = tc.getHighlighter().getHighlights(); - for (int i=0; ifalse - * if the window is not visible, or no choice is selected. - */ - boolean insertSelectedChoice() { - if (paramChoicesWindow!=null && paramChoicesWindow.isVisible()) { - String choice = paramChoicesWindow.getSelectedChoice(); - if (choice!=null) { - JTextComponent tc = ac.getTextComponent(); - Highlight h = getCurrentParameterHighlight(); - if (h!=null) { - // "+1" is a workaround for Java Highlight issues. - tc.setSelectionStart(h.getStartOffset()+1); - tc.setSelectionEnd(h.getEndOffset()); - tc.replaceSelection(choice); - moveToNextParam(); - } - else { - UIManager.getLookAndFeel().provideErrorFeedback(tc); - } - return true; - } - } - return false; - } - - - /** - * Installs key bindings on the text component that facilitate the user - * editing this completion's parameters. - * - * @see #uninstallKeyBindings() - */ - private void installKeyBindings() { - - if (AutoCompletion.getDebug()) { - System.out.println("CompletionContext: Installing keybindings"); - } - - JTextComponent tc = ac.getTextComponent(); - InputMap im = tc.getInputMap(); - ActionMap am = tc.getActionMap(); - - KeyStroke ks = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0); - oldTabKey = im.get(ks); - im.put(ks, IM_KEY_TAB); - oldTabAction = am.get(IM_KEY_TAB); - am.put(IM_KEY_TAB, new NextParamAction()); - - ks = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK); - oldShiftTabKey = im.get(ks); - im.put(ks, IM_KEY_SHIFT_TAB); - oldShiftTabAction = am.get(IM_KEY_SHIFT_TAB); - am.put(IM_KEY_SHIFT_TAB, new PrevParamAction()); - - ks = KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0); - oldUpKey = im.get(ks); - im.put(ks, IM_KEY_UP); - oldUpAction = am.get(IM_KEY_UP); - am.put(IM_KEY_UP, new NextChoiceAction(-1, oldUpAction)); - - ks = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0); - oldDownKey = im.get(ks); - im.put(ks, IM_KEY_DOWN); - oldDownAction = am.get(IM_KEY_DOWN); - am.put(IM_KEY_DOWN, new NextChoiceAction(1, oldDownAction)); - - ks = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0); - oldEnterKey = im.get(ks); - im.put(ks, IM_KEY_ENTER); - oldEnterAction = am.get(IM_KEY_ENTER); - am.put(IM_KEY_ENTER, new GotoEndAction()); - - ks = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0); - oldEscapeKey = im.get(ks); - im.put(ks, IM_KEY_ESCAPE); - oldEscapeAction = am.get(IM_KEY_ESCAPE); - am.put(IM_KEY_ESCAPE, new HideAction()); - - char end = pc.getProvider().getParameterListEnd(); - ks = KeyStroke.getKeyStroke(end); - oldClosingKey = im.get(ks); - im.put(ks, IM_KEY_CLOSING); - oldClosingAction = am.get(IM_KEY_CLOSING); - am.put(IM_KEY_CLOSING, new ClosingAction()); - - } - - - /** - * Moves to and selects the next parameter. - * - * @see #moveToPreviousParam() - */ - private void moveToNextParam() { - - JTextComponent tc = ac.getTextComponent(); - int dot = tc.getCaretPosition(); - int tagCount = tags.size(); - if (tagCount==0) { - tc.setCaretPosition(maxPos.getOffset()); - deactivate(); - } - - Highlight currentNext = null; - int pos = -1; - List highlights = getParameterHighlights(); - for (int i=0; idot && - hl.getStartOffset()<=currentNext.getStartOffset())) { - currentNext = hl; - pos = i; - } - } - - // No params after caret - go to first one - if (currentNext.getStartOffset()+1<=dot) { - int nextIndex = getFirstHighlight(highlights); - currentNext = highlights.get(nextIndex); - pos = 0; - } - - // "+1" is a workaround for Java Highlight issues. - tc.setSelectionStart(currentNext.getStartOffset()+1); - tc.setSelectionEnd(currentNext.getEndOffset()); - updateToolTipText(pos); - - } - - - /** - * Moves to and selects the previous parameter. - * - * @see #moveToNextParam() - */ - private void moveToPreviousParam() { - - JTextComponent tc = ac.getTextComponent(); - - int tagCount = tags.size(); - if (tagCount==0) { // Should never happen - tc.setCaretPosition(maxPos.getOffset()); - deactivate(); - } - - int dot = tc.getCaretPosition(); - int selStart = tc.getSelectionStart()-1; // Workaround for Java Highlight issues. - Highlight currentPrev = null; - int pos = 0; - List highlights = getParameterHighlights(); - - for (int i=0; i=dot || - (h.getStartOffset()currentPrev.getStartOffset() || - pos==lastSelectedParam))) { - currentPrev = h; - pos = i; - } - } - - // Loop back from param 0 to last param. - int firstIndex = getFirstHighlight(highlights); - //if (pos==0 && lastSelectedParam==0 && highlights.size()>1) { - if (pos==firstIndex && lastSelectedParam==firstIndex && highlights.size()>1) { - pos = getLastHighlight(highlights); - currentPrev = highlights.get(pos); - // "+1" is a workaround for Java Highlight issues. - tc.setSelectionStart(currentPrev.getStartOffset()+1); - tc.setSelectionEnd(currentPrev.getEndOffset()); - updateToolTipText(pos); - } - else if (currentPrev!=null && dot>currentPrev.getStartOffset()) { - // "+1" is a workaround for Java Highlight issues. - tc.setSelectionStart(currentPrev.getStartOffset()+1); - tc.setSelectionEnd(currentPrev.getEndOffset()); - updateToolTipText(pos); - } - else { - tc.setCaretPosition(maxPos.getOffset()); - deactivate(); - } - - } - - - private void possiblyUpdateParamCopies(Document doc) { - - int index = getCurrentParameterIndex(); - // FunctionCompletions add an extra param at end of inserted text - if (index>-1 && index stop parameter assistance. - Parameter param = pc.getParam(index); - if (param.isEndParam()) { - deactivate(); - return; - } - - // Get the current value of the current parameter. - List paramHighlights = getParameterHighlights(); - Highlight h = paramHighlights.get(index); - int start = h.getStartOffset() + 1; // param offsets are offset (!) by 1 - int len = h.getEndOffset() - start; - String replacement = null; - try { - replacement = doc.getText(start, len); - } catch (BadLocationException ble) { - ble.printStackTrace(); // Never happens - } - - // Replace any param copies tracking this parameter with the - // value of this parameter. - for (ParamCopyInfo pci : paramCopyInfos) { - if (pci.paramName.equals(param.getName())) { - pci.h = replaceHighlightedText(doc, pci.h, replacement); - } - } - - } - - else { // Probably the "end parameter" for FunctionCompletions. - deactivate(); - } - - } - - - /** - * Updates the optional window listing likely completion choices, - */ - private void prepareParamChoicesWindow() { - - // If this window was set to null, the user pressed Escape to hide it - if (paramChoicesWindow!=null) { - - int offs = getCurrentParameterStartOffset(); - if (offs==-1) { - paramChoicesWindow.setVisible(false); - return; - } - - JTextComponent tc = ac.getTextComponent(); - try { - Rectangle r = tc.modelToView(offs); - Point p = new Point(r.x, r.y); - SwingUtilities.convertPointToScreen(p, tc); - r.x = p.x; - r.y = p.y; - paramChoicesWindow.setLocationRelativeTo(r); - } catch (BadLocationException ble) { // Should never happen - UIManager.getLookAndFeel().provideErrorFeedback(tc); - ble.printStackTrace(); - } - - // Toggles visibility, if necessary. - paramChoicesWindow.setParameter(lastSelectedParam, paramPrefix); - - } - - } - - - /** - * Removes the bounding boxes around parameters. - */ - private void removeParameterHighlights() { - JTextComponent tc = ac.getTextComponent(); - Highlighter h = tc.getHighlighter(); - for (int i=0; iHighlight classes are funny about insertions at - * their start offsets. - * - * @param doc The document. - * @param h The highlight whose text to change. - * @param replacement The new text to be in the highlight. - * @return The replacement highlight for h. - */ - private Highlight replaceHighlightedText(Document doc, Highlight h, - String replacement) { - try { - - int start = h.getStartOffset(); - int len = h.getEndOffset() - start; - Highlighter highlighter = ac.getTextComponent().getHighlighter(); - highlighter.removeHighlight(h); - - if (doc instanceof AbstractDocument) { - ((AbstractDocument)doc).replace(start, len, replacement, null); - } - else { - doc.remove(start, len); - doc.insertString(start, replacement, null); - } - - int newEnd = start + replacement.length(); - h = (Highlight)highlighter.addHighlight(start, newEnd, paramCopyP); - return h; - - } catch (BadLocationException ble) { - ble.printStackTrace(); // Never happens - } - - return null; - - } - - - /** - * Removes the key bindings we installed. - * - * @see #installKeyBindings() - */ - private void uninstallKeyBindings() { - - if (AutoCompletion.getDebug()) { - System.out.println("CompletionContext Uninstalling keybindings"); - } - - JTextComponent tc = ac.getTextComponent(); - InputMap im = tc.getInputMap(); - ActionMap am = tc.getActionMap(); - - KeyStroke ks = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0); - im.put(ks, oldTabKey); - am.put(IM_KEY_TAB, oldTabAction); - - ks = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK); - im.put(ks, oldShiftTabKey); - am.put(IM_KEY_SHIFT_TAB, oldShiftTabAction); - - ks = KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0); - im.put(ks, oldUpKey); - am.put(IM_KEY_UP, oldUpAction); - - ks = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0); - im.put(ks, oldDownKey); - am.put(IM_KEY_DOWN, oldDownAction); - - ks = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0); - im.put(ks, oldEnterKey); - am.put(IM_KEY_ENTER, oldEnterAction); - - ks = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0); - im.put(ks, oldEscapeKey); - am.put(IM_KEY_ESCAPE, oldEscapeAction); - - char end = pc.getProvider().getParameterListEnd(); - ks = KeyStroke.getKeyStroke(end); - im.put(ks, oldClosingKey); - am.put(IM_KEY_CLOSING, oldClosingAction); - - } - - - /** - * Updates the text in the tool tip to have the current parameter - * displayed in bold. The "current parameter" is determined from the - * current caret position. - * - * @return The "prefix" of text in the caret's parameter before the caret. - */ - private String updateToolTipText() { - - JTextComponent tc = ac.getTextComponent(); - int dot = tc.getSelectionStart(); - int mark = tc.getSelectionEnd(); - int index = -1; - String paramPrefix = null; - - List paramHighlights = getParameterHighlights(); - for (int i=0; i=start && dot<=h.getEndOffset()) { - try { - // All text selected => offer all suggestions, otherwise - // use prefix before selection - if (dot!=start || mark!=h.getEndOffset()) { - paramPrefix = tc.getText(start, dot-start); - } - } catch (BadLocationException ble) { - ble.printStackTrace(); - } - index = i; - break; - } - } - - updateToolTipText(index); - return paramPrefix; - - } - - - private void updateToolTipText(int selectedParam) { - if (selectedParam!=lastSelectedParam) { - if (tip!=null) { - tip.updateText(selectedParam); - } - this.lastSelectedParam = selectedParam; - } - } - - - /** - * Updates the LookAndFeel of all popup windows this context - * manages. - */ - public void updateUI() { - if (tip!=null) { - tip.updateUI(); - } - if (paramChoicesWindow!=null) { - paramChoicesWindow.updateUI(); - } - } - - - /** - * Called when the user presses Enter while entering parameters. - */ - private class GotoEndAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - - // If the param choices window is visible and something is chosen, - // replace the parameter with it and move to the next one. - if (paramChoicesWindow!=null && paramChoicesWindow.isVisible()) { - if (insertSelectedChoice()) { - return; - } - } - - // Otherwise, just move to the end. - deactivate(); - JTextComponent tc = ac.getTextComponent(); - int dot = tc.getCaretPosition(); - if (dot!=defaultEndOffs.getOffset()) { - tc.setCaretPosition(defaultEndOffs.getOffset()); - } - else { - // oldEnterAction isn't what we're looking for (wrong key) - Action a = getDefaultEnterAction(tc); - if (a!=null) { - a.actionPerformed(e); - } - else { - tc.replaceSelection("\n"); - } - } - - } - - private Action getDefaultEnterAction(JTextComponent tc) { - ActionMap am = tc.getActionMap(); - return am.get(DefaultEditorKit.insertBreakAction); - } - - } - - - /** - * Called when the user types the character marking the closing of the - * parameter list, such as ')'. - */ - private class ClosingAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - - JTextComponent tc = ac.getTextComponent(); - int dot = tc.getCaretPosition(); - char end = pc.getProvider().getParameterListEnd(); - - // Are they at or past the end of the parameters? - if (dot>=maxPos.getOffset()-2) { // ">=" for overwrite mode - - // Try to decide if we're closing a paren that is a part - // of the (last) arg being typed. - String text = getArgumentText(dot); - if (text!=null) { - char start = pc.getProvider().getParameterListStart(); - int startCount = getCount(text, start); - int endCount = getCount(text, end); - if (startCount>endCount) { // Just closing a paren - tc.replaceSelection(Character.toString(end)); - return; - } - } - //tc.setCaretPosition(maxPos.getOffset()); - tc.setCaretPosition(Math.min(tc.getCaretPosition()+1, - tc.getDocument().getLength())); - - deactivate(); - - } - - // If not (in the middle of parameters), just insert the paren. - else { - tc.replaceSelection(Character.toString(end)); - } - - } - - public int getCount(String text, char ch) { - int count = 0; - int old = 0; - int pos = 0; - while ((pos=text.indexOf(ch, old))>-1) { - count++; - old = pos + 1; - } - - return count; - } - - } - - - /** - * Action performed when the user hits the escape key. - */ - private class HideAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - // On first escape press, if the param choices window is visible, - // just remove it, but keep ability to tab through params. If - // param choices window isn't visible, or second escape press, - // exit tabbing through params entirely. - if (paramChoicesWindow!=null && paramChoicesWindow.isVisible()) { - paramChoicesWindow.setVisible(false); - paramChoicesWindow = null; - } - else { - deactivate(); - } - } - - } - - - /** - * Listens for various events in the text component while this tool tip - * is visible. - */ - private class Listener implements FocusListener, CaretListener, - DocumentListener { - - private boolean markOccurrencesEnabled; - - /** - * Called when the text component's caret moves. - * - * @param e The event. - */ - public void caretUpdate(CaretEvent e) { - if (maxPos==null) { // Sanity check - deactivate(); - return; - } - int dot = e.getDot(); - if (dotmaxPos.getOffset()) { - deactivate(); - return; - } - paramPrefix = updateToolTipText(); - if (active) { - prepareParamChoicesWindow(); - } - } - - - public void changedUpdate(DocumentEvent e) { - } - - - /** - * Called when the text component gains focus. - * - * @param e The event. - */ - public void focusGained(FocusEvent e) { - // Do nothing - } - - - /** - * Called when the text component loses focus. - * - * @param e The event. - */ - public void focusLost(FocusEvent e) { - deactivate(); - } - - - private void handleDocumentEvent(final DocumentEvent e) { - if (!ignoringDocumentEvents) { - ignoringDocumentEvents = true; - SwingUtilities.invokeLater(new Runnable() { - public void run() { - possiblyUpdateParamCopies(e.getDocument()); - ignoringDocumentEvents = false; - } - }); - } - } - - - public void insertUpdate(DocumentEvent e) { - handleDocumentEvent(e); - } - - - /** - * Installs this listener onto a text component. - * - * @param tc The text component to install onto. - * @see #uninstall() - */ - public void install(JTextComponent tc) { - - boolean replaceTabs = false; - if (tc instanceof RSyntaxTextArea) { - RSyntaxTextArea textArea = (RSyntaxTextArea)tc; - markOccurrencesEnabled = textArea.getMarkOccurrences(); - textArea.setMarkOccurrences(false); - replaceTabs = textArea.getTabsEmulated(); - } - - Highlighter h = tc.getHighlighter(); - - try { - - // Insert the parameter text - ParameterizedCompletionInsertionInfo info = - pc.getInsertionInfo(tc, replaceTabs); - tc.replaceSelection(info.getTextToInsert()); - - // Add highlights around the parameters. - final int replacementCount = info.getReplacementCount(); - for (int i=0; iscreenBounds.x+screenBounds.width) { // completions don't fit - x = screenBounds.x + screenBounds.width - tooltip.getWidth(); - } - - tooltip.setLocation(x, y); - - } - - - /** - * Toggles the visibility of this tool tip. - * - * @param visible Whether this tool tip should be visible. - * @see #isVisible() - */ - public void setVisible(boolean visible) { - tooltip.setVisible(visible); - } - - - /** - * Updates the text in the tool tip to have the current parameter - * displayed in bold. - * - * @param selectedParam The index of the selected parameter. - * @return Whether the text needed to be updated. - */ - public boolean updateText(int selectedParam) { - - StringBuilder sb = new StringBuilder(""); - int paramCount = pc.getParamCount(); - for (int i=0; i"); - } - - // Some parameter types may have chars in them unfriendly to HTML - // (such as type parameters in Java). We need to take care to - // escape these. - String temp = pc.getParam(i).toString(); - sb.append(RSyntaxUtilities.escapeForHtml(temp, "
", false)); - - if (i==selectedParam) { - sb.append(""); - } - if (i=0 && selectedParam"); - sb.append(desc); - } - } - - descLabel.setText(sb.toString()); - tooltip.pack(); - - return true; - - } - - - /** - * Updates the LookAndFeel of this window and the description - * window. - */ - public void updateUI() { - SwingUtilities.updateComponentTreeUI(tooltip); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletionInsertionInfo.java b/ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletionInsertionInfo.java deleted file mode 100644 index 4ac0991..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/ParameterizedCompletionInsertionInfo.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * 05/26/2012 - * - * ParameterizedCompletionInsertionInfo.java - Used internally to track the - * changes required for a specific parameterized completion. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.util.ArrayList; -import java.util.List; -import javax.swing.text.Position; - -import org.fife.ui.rsyntaxtextarea.DocumentRange; - - -/** - * Describes a parameterized completion - what's being inserted, where the - * parameters are in the inserted text, etc. - * - * @author Robert Futrell - * @version 1.0 - */ -class ParameterizedCompletionInsertionInfo { - - private int minOffs; - private Position maxOffs; - private int defaultEnd; - private int selStart; - private int selEnd; - private String textToInsert; - private List replacementLocations; - private List replacementCopies; - - - public ParameterizedCompletionInsertionInfo() { - defaultEnd = -1; - } - - - public void addReplacementCopy(String id, int start, int end) { - if (replacementCopies==null) { - replacementCopies = new ArrayList(1); - } - replacementCopies.add(new ReplacementCopy(id, start, end)); - } - - - /** - * Marks a region of the replacement text as representing a variable name - * or some other construct that the user should replace. - * - * @param start The start offset. - * @param end The end offset. - * @see #getReplacementCount() - * @see #getReplacementLocation(int) - */ - public void addReplacementLocation(int start, int end) { - if (replacementLocations==null) { - replacementLocations = new ArrayList(1); - } - replacementLocations.add(new DocumentRange(start, end)); - } - - - public int getDefaultEndOffs() { - return defaultEnd>-1 ? defaultEnd : getMaxOffset().getOffset(); - } - - - /** - * Returns the maximum offset the caret can move to before being outside - * of the text inserted for this completion. - * - * @return The maximum offset. - * @see #getMinOffset() - */ - public Position getMaxOffset() { - return maxOffs; - } - - - /** - * Returns the minimum offset the caret can move to before being outside - * of the text inserted for this completion. - * - * @return The minimum offset. - * @see #getMaxOffset() - */ - public int getMinOffset() { - return minOffs; - } - - - public int getReplacementCopyCount() { - return replacementCopies==null ? 0 : replacementCopies.size(); - } - - - /** - * Returns the number of replacements in the completion. - * - * @return The number of replacements in the completion. - */ - public int getReplacementCount() { - return replacementLocations==null ? 0 : replacementLocations.size(); - } - - - public ReplacementCopy getReplacementCopy(int index) { - return replacementCopies.get(index); - } - - - /** - * Returns the starting- and ending-offsets of the replacement regions - * in the completion. - * - * @param index The replacement region. - * @return The range in the document of that replacement region. - * @see #getReplacementCount() - */ - public DocumentRange getReplacementLocation(int index) { - return replacementLocations.get(index); - } - - - /** - * Returns the offset that should be the end of the initially selected - * text when the completion is inserted (i.e., the end offset of the first - * replacement region). - * - * @return The end offset for the initial selection. - * @see #getSelectionStart() - */ - public int getSelectionEnd() { - return selEnd; - } - - - /** - * Returns the offset that should be the start of the initially selected - * text when the completion is inserted (i.e., the start offset of the - * first replacement region). - * - * @return The start offset for the initial selection. - * @see #getSelectionEnd() - */ - public int getSelectionStart() { - return selStart; - } - - - /** - * Returns the actual text to insert when the completion is selected. - * - * @return The text to insert. - * @see #setTextToInsert(String) - */ - public String getTextToInsert() { - return textToInsert; - } - - - /** - * Returns whether or not there is an initial selected region for the - * completion (i.e., whether the completion actually has any parameters). - * - * @return Whether there is a region to initially select for the completion. - */ - public boolean hasSelection() { - return selEnd!=selStart; - } - - - /** - * Sets the initially selected region for the completion. - * - * @param selStart The selection start. - * @param selEnd The selection end. - * @see #getSelectionEnd() - * @see #getSelectionStart() - */ - public void setInitialSelection(int selStart, int selEnd) { - this.selStart = selStart; - this.selEnd = selEnd; - } - - - /** - * Sets the document range the caret can move around in before being - * outside of the text inserted for the completion. - * - * @param minOffs The minimum offset. - * @param maxOffs The maximum offset, that will track its location as the - * document is modified. - * @see #getMinOffset() - * @see #getMaxOffset() - */ - public void setCaretRange(int minOffs, Position maxOffs) { - this.minOffs = minOffs; - this.maxOffs = maxOffs; - } - - - public void setDefaultEndOffs(int end) { - defaultEnd = end; - } - - - /** - * Sets the text to insert for the completion. - * - * @param text The text to insert. - * @see #getTextToInsert() - */ - public void setTextToInsert(String text) { - this.textToInsert = text; - } - - - public static class ReplacementCopy { - - private String id; - private int start; - private int end; - - public ReplacementCopy(String id, int start, int end) { - this.id = id; - this.start = start; - this.end = end; - } - - public int getEnd() { - return end; - } - - public String getId() { - return id; - } - - public int getStart() { - return start; - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/RoundRobinAutoCompletion.java b/ESPlorer/src/org/fife/ui/autocomplete/RoundRobinAutoCompletion.java deleted file mode 100644 index 91bd342..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/RoundRobinAutoCompletion.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * 12/02/2013 - * - * Copyright (C) 2013 Robert Futrell - * robert_futrell at users.sourceforge.net - * http://fifesoft.com/rsyntaxtextarea - * - * This library is distributed under a modified BSD license. See the included - * RSTALanguageSupport.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.util.*; -import java.awt.event.*; -import javax.swing.*; - - -/** - * An AutoCompletion that adds the ability to cycle through a set - * of CompletionProviders via the trigger key. This allows the - * application to logically "group together" completions of similar kinds; - * for example, Java code completions vs. template completions.

- * - * Usage: - *

- * XPathDynamicCompletionProvider dynamicProvider = new XPathDynamicCompletionProvider();
- * RoundRobinAutoCompletion ac = new RoundRobinAutoCompletion(dynamicProvider);
- * XPathCompletionProvider staticProvider = new XPathCompletionProvider();
- * ac.addCompletionProvider(staticProvider);
- * ac.setXXX(..);
- * ...
- * ac.install(textArea);
- * 
- * - * @author mschlegel - */ -public class RoundRobinAutoCompletion extends AutoCompletion { - - /** The List of CompletionProviders to use */ - private List cycle = new ArrayList(); - - - /** - * Constructor. - * - * @param provider A single completion provider. - * @see #addCompletionProvider(CompletionProvider) - */ - public RoundRobinAutoCompletion(CompletionProvider provider) { - - super(provider); - cycle.add(provider); - - // principal requirement for round-robin - setHideOnCompletionProviderChange(false); - // this is required since otherwise, on empty list of completions for - // one of the CompletionProviders, round-robin completion would not - // work - setHideOnNoText(false); - // this is required to prevent single choice of 1st provider to choose - // the completion since the user may want the second provider to be - // chosen. - setAutoCompleteSingleChoices(false); - - } - - - /** - * Adds an additional CompletionProvider to the list to - * cycle through. - * - * @param provider The new completion provider. - */ - public void addCompletionProvider(CompletionProvider provider) { - cycle.add(provider); - } - - - /** - * Moves to the next Provider internally. Needs refresh of the popup window - * to display the changes. - * - * @return true if the next provider was the default one (thus returned to - * the default view). May be used in case you like to hide the - * popup in this case. - */ - public boolean advanceProvider() { - CompletionProvider currentProvider = getCompletionProvider(); - int i = (cycle.indexOf(currentProvider)+1) % cycle.size(); - setCompletionProvider(cycle.get(i)); - return i==0; - } - - - /** - * Overridden to provide our own implementation of the action. - */ - @Override - protected Action createAutoCompleteAction() { - return new CycleAutoCompleteAction(); - } - - - /** - * Resets the cycle to use the default provider on next refresh. - */ - public void resetProvider() { - CompletionProvider currentProvider = getCompletionProvider(); - CompletionProvider defaultProvider = cycle.get(0); - if (currentProvider != defaultProvider) { - setCompletionProvider(defaultProvider); - } - } - - - /** - * An implementation of the auto-complete action that ensures the proper - * CompletionProvider is displayed based on the context in - * which the user presses the trigger key. - */ - private class CycleAutoCompleteAction extends AutoCompleteAction { - - @Override - public void actionPerformed(ActionEvent e) { - if (isAutoCompleteEnabled()) { - if (isPopupVisible()) { - // The popup is already visible, and user pressed the - // trigger-key. In this case, move to next provider. - advanceProvider(); - } - else { - // Be sure to start with the default provider - resetProvider(); - } - //Check if there are completions from the current provider. If not, advance to the next provider and display that one. - //A completion provider can force displaying "his" empty completion pop-up by returning an empty BasicCompletion. This is useful when the user is typing backspace and you like to display the first provider always first. - for (int i=1; i completions = getCompletionProvider().getCompletions(getTextComponent()); - if (completions.size() > 0) { - //nothing to do, just let the current provider display - break; - } - else{ - //search for non-empty completions - advanceProvider(); - } - } - } - super.actionPerformed(e); - } - - } - - - // TODO add label "Ctrl-Space for " to the popup window -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/ShorthandCompletion.java b/ESPlorer/src/org/fife/ui/autocomplete/ShorthandCompletion.java deleted file mode 100644 index 0a0d361..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/ShorthandCompletion.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 12/22/2008 - * - * ShorhandCompletion.java - A completion that is shorthand for some other - * text. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - - -/** - * A completion where the input text is shorthand for (really, just different - * than) the actual text to be inserted. For example, the input text - * "sysout" could be associated with the completion - * "System.out.println(" in Java. - * - * @author Robert Futrell - * @version 1.0 - */ -public class ShorthandCompletion extends BasicCompletion { - - /** - * The text the user can start typing that will match this completion. - */ - private String inputText; - - - /** - * Constructor. - * - * @param provider The provider that returns this completion. - * @param inputText The text the user inputs to get this completion. - * @param replacementText The replacement text of the completion. - */ - public ShorthandCompletion(CompletionProvider provider, String inputText, - String replacementText) { - super(provider, replacementText); - this.inputText = inputText; - } - - - /** - * Constructor. - * - * @param provider The provider that returns this completion. - * @param inputText The text the user inputs to get this completion. - * @param replacementText The replacement text of the completion. - * @param shortDesc A short description of the completion. This will be - * displayed in the completion list. This may be null. - */ - public ShorthandCompletion(CompletionProvider provider, String inputText, - String replacementText, String shortDesc) { - super(provider, replacementText, shortDesc); - this.inputText = inputText; - } - - - /** - * Constructor. - * - * @param provider The provider that returns this completion. - * @param inputText The text the user inputs to get this completion. - * @param replacementText The replacement text of the completion. - * @param shortDesc A short description of the completion. This will be - * displayed in the completion list. This may be null. - * @param summary The summary of this completion. This should be HTML. - * This may be null. - */ - public ShorthandCompletion(CompletionProvider provider, String inputText, - String replacementText, String shortDesc, String summary) { - super(provider, replacementText, shortDesc, summary); - this.inputText = inputText; - } - - - /** - * Returns the text the user must start typing to get this completion. - * - * @return The text the user must start to input. - */ - @Override - public String getInputText() { - return inputText; - } - - - /** - * If a summary has been set, that summary is returned. Otherwise, the - * replacement text is returned. - * - * @return A description of this completion (the text that will be - * inserted). - * @see #getReplacementText() - */ - @Override - public String getSummary() { - String summary = super.getSummary(); - return summary!=null ? summary : ("" + getSummaryBody()); - } - - - /** - * Returns the "body" of the HTML returned by {@link #getSummary()} when - * no summary text has been set. This is defined to return the replacement - * text in a monospaced font. - * - * @return The summary text's body, if no other summary has been defined. - * @see #getReplacementText() - */ - protected String getSummaryBody() { - return "" + getReplacementText(); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/SizeGrip.java b/ESPlorer/src/org/fife/ui/autocomplete/SizeGrip.java deleted file mode 100644 index e2b7dd8..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/SizeGrip.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * 12/23/2008 - * - * SizeGrip.java - A size grip component that sits at the bottom of the window, - * allowing the user to easily resize that window. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.Color; -import java.awt.ComponentOrientation; -import java.awt.Cursor; -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.Image; -import java.awt.Point; -import java.awt.Window; -import java.awt.event.MouseEvent; -import java.io.File; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import javax.imageio.ImageIO; -import javax.swing.JPanel; -import javax.swing.SwingUtilities; -import javax.swing.UIManager; -import javax.swing.event.MouseInputAdapter; - - -/** - * A component that allows its parent window to be resizable, similar to the - * size grip seen on status bars. This is essentially a copy of the class with - * the same name in RSyntaxTextArea, but is duplicated to prevent a dependency - * on that library. - * - * @author Robert Futrell - * @version 1.0 - */ -class SizeGrip extends JPanel { - - /** - * The size grip to use if we're on OS X. - */ - private Image osxSizeGrip; - - - public SizeGrip() { - MouseHandler adapter = new MouseHandler(); - addMouseListener(adapter); - addMouseMotionListener(adapter); - setPreferredSize(new Dimension(16, 16)); - } - - - /** - * Overridden to ensure that the cursor for this component is appropriate - * for the orientation. - * - * @param o The new orientation. - */ - @Override - public void applyComponentOrientation(ComponentOrientation o) { - possiblyFixCursor(o.isLeftToRight()); - super.applyComponentOrientation(o); - } - - - /** - * Creates and returns the OS X size grip image. - * - * @return The OS X size grip. - */ - private Image createOSXSizeGrip() { - ClassLoader cl = getClass().getClassLoader(); - URL url = cl.getResource("org/fife/ui/autocomplete/osx_sizegrip.png"); - if (url==null) { - // We're not running in a jar - we may be debugging in Eclipse, - // for example - File f = new File("../AutoComplete/src/org/fife/ui/autocomplete/osx_sizegrip.png"); - if (f.isFile()) { - try { - url = f.toURI().toURL(); - } catch (MalformedURLException mue) { // Never happens - mue.printStackTrace(); - return null; - } - } - else { - return null; // Can't find resource or image file - } - } - Image image = null; - try { - image = ImageIO.read(url); - } catch (IOException ioe) { // Never happens - ioe.printStackTrace(); - } - return image; - } - - - /** - * Paints this panel. - * - * @param g The graphics context. - */ - @Override - protected void paintComponent(Graphics g) { - - super.paintComponent(g); - - Dimension dim = getSize(); - - if (osxSizeGrip!=null) { - g.drawImage(osxSizeGrip, dim.width-16, dim.height-16, null); - return; - } - - Color c1 = UIManager.getColor("Label.disabledShadow"); - Color c2 = UIManager.getColor("Label.disabledForeground"); - ComponentOrientation orientation = getComponentOrientation(); - - if (orientation.isLeftToRight()) { - int width = dim.width -= 3; - int height = dim.height -= 3; - g.setColor(c1); - g.fillRect(width-9,height-1, 3,3); - g.fillRect(width-5,height-1, 3,3); - g.fillRect(width-1,height-1, 3,3); - g.fillRect(width-5,height-5, 3,3); - g.fillRect(width-1,height-5, 3,3); - g.fillRect(width-1,height-9, 3,3); - g.setColor(c2); - g.fillRect(width-9,height-1, 2,2); - g.fillRect(width-5,height-1, 2,2); - g.fillRect(width-1,height-1, 2,2); - g.fillRect(width-5,height-5, 2,2); - g.fillRect(width-1,height-5, 2,2); - g.fillRect(width-1,height-9, 2,2); - } - else { - int height = dim.height -= 3; - g.setColor(c1); - g.fillRect(10,height-1, 3,3); - g.fillRect(6,height-1, 3,3); - g.fillRect(2,height-1, 3,3); - g.fillRect(6,height-5, 3,3); - g.fillRect(2,height-5, 3,3); - g.fillRect(2,height-9, 3,3); - g.setColor(c2); - g.fillRect(10,height-1, 2,2); - g.fillRect(6,height-1, 2,2); - g.fillRect(2,height-1, 2,2); - g.fillRect(6,height-5, 2,2); - g.fillRect(2,height-5, 2,2); - g.fillRect(2,height-9, 2,2); - } - - } - - - /** - * Ensures that the cursor for this component is appropriate for the - * orientation. - * - * @param ltr Whether the current component orientation is LTR. - */ - protected void possiblyFixCursor(boolean ltr) { - int cursor = Cursor.NE_RESIZE_CURSOR; - if (ltr) { - cursor = Cursor.NW_RESIZE_CURSOR; - } - if (cursor!=getCursor().getType()) { - setCursor(Cursor.getPredefinedCursor(cursor)); - } - } - - - @Override - public void updateUI() { - super.updateUI(); - // TODO: Key off of Aqua LaF, not just OS X, as this size grip looks - // bad on other LaFs on Mac such as Nimbus. - if (System.getProperty("os.name").contains("OS X")) { - if (osxSizeGrip==null) { - osxSizeGrip = createOSXSizeGrip(); - } - } - else { // Clear memory in case of runtime LaF change. - osxSizeGrip = null; - } - - } - - - /** - * Listens for mouse events on this panel and resizes the parent window - * appropriately. - */ - /* - * NOTE: We use SwingUtilities.convertPointToScreen() instead of just using - * the locations relative to the corner component because the latter proved - * buggy - stretch the window too wide and some kind of arithmetic error - * started happening somewhere - our window would grow way too large. - */ - private class MouseHandler extends MouseInputAdapter { - - private Point origPos; - - @Override - public void mouseDragged(MouseEvent e) { - Point newPos = e.getPoint(); - SwingUtilities.convertPointToScreen(newPos, SizeGrip.this); - int xDelta = newPos.x - origPos.x; - int yDelta = newPos.y - origPos.y; - Window wind = SwingUtilities.getWindowAncestor(SizeGrip.this); - if (wind!=null) { // Should always be true - if (getComponentOrientation().isLeftToRight()) { - int w = wind.getWidth(); - if (newPos.x>=wind.getX()) { - w += xDelta; - } - int h = wind.getHeight(); - if (newPos.y>=wind.getY()) { - h += yDelta; - } - wind.setSize(w,h); - } - else { // RTL - int newW = Math.max(1, wind.getWidth()-xDelta); - int newH = Math.max(1, wind.getHeight()+yDelta); - wind.setBounds(newPos.x, wind.getY(), newW, newH); - } - // invalidate()/validate() needed pre-1.6. - wind.invalidate(); - wind.validate(); - } - origPos.setLocation(newPos); - } - - @Override - public void mousePressed(MouseEvent e) { - origPos = e.getPoint(); - SwingUtilities.convertPointToScreen(origPos, SizeGrip.this); - } - - @Override - public void mouseReleased(MouseEvent e) { - origPos = null; - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/SortByRelevanceComparator.java b/ESPlorer/src/org/fife/ui/autocomplete/SortByRelevanceComparator.java deleted file mode 100644 index 2a0b6a2..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/SortByRelevanceComparator.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 12/17/2010 - * - * SortByRelevanceComparator.java - Sorts two Completions by relevance before - * sorting them lexicographically. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.util.Comparator; - - -/** - * Compares two Completions by their relevance before - * sorting them lexicographically. - * - * @author Robert Futrell - * @version 1.0 - */ -public class SortByRelevanceComparator implements Comparator { - - - public int compare(Completion c1, Completion c2) { - int rel1 = c1.getRelevance(); - int rel2 = c2.getRelevance(); - int diff = rel2 - rel1;//rel1 - rel2; - return diff==0 ? c1.compareTo(c2) : diff; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/TemplateCompletion.java b/ESPlorer/src/org/fife/ui/autocomplete/TemplateCompletion.java deleted file mode 100644 index 9bf3aa9..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/TemplateCompletion.java +++ /dev/null @@ -1,384 +0,0 @@ -/* - * 05/26/2012 - * - * TemplateCompletion.java - A completion used to insert boilerplate code - * snippets that have arbitrary sections the user will want to change, such as - * for-loops. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.util.ArrayList; -import java.util.List; -import javax.swing.text.BadLocationException; -import javax.swing.text.Document; -import javax.swing.text.JTextComponent; -import javax.swing.text.PlainDocument; -import javax.swing.text.Position; - -import org.fife.ui.autocomplete.TemplatePiece.Param; -import org.fife.ui.autocomplete.TemplatePiece.ParamCopy; -import org.fife.ui.autocomplete.TemplatePiece.Text; -import org.fife.ui.rsyntaxtextarea.RSyntaxUtilities; - - -/** - * A completion made up of a template with arbitrary parameters that the user - * can tab through and fill in. This completion type is useful for inserting - * common boilerplate code, such as for-loops.

- * - * The format of a template is similar to those in Eclipse. The following - * example would be the format for a for-loop template: - * - *

- * for (int ${i} = 0; ${i} < ${array}.length; ${i}++) {
- *    ${cursor}
- * }
- * 
- * - * In the above example, the first ${i} is a parameter for the - * user to type into; all the other ${i} instances are - * automatically changed to what the user types in the first one. The parameter - * named ${cursor} is the "ending position" of the template. It's - * where the caret moves after it cycles through all other parameters. If the - * user types into it, template mode terminates. If more than one - * ${cursor} parameter is specified, behavior is undefined.

- * - * Two dollar signs in a row ("$$") will be evaluated as a single - * dollar sign. Otherwise, the template parsing is pretty straightforward and - * fault-tolerant.

- * - * Leading whitespace is automatically added to lines if the template spans - * more than one line, and if used with a text component using a - * PlainDocument, tabs will be converted to spaces if requested. - * - * @author Robert Futrell - * @version 1.0 - */ -public class TemplateCompletion extends AbstractCompletion - implements ParameterizedCompletion { - - private List pieces; - - private String inputText; - - private String definitionString; - - private String shortDescription; - - private String summary; - - /** - * The template's parameters. - */ - private List params; - - - public TemplateCompletion(CompletionProvider provider, - String inputText, String definitionString, String template) { - this(provider, inputText, definitionString, template, null, null); - } - - - public TemplateCompletion(CompletionProvider provider, - String inputText, String definitionString, String template, - String shortDescription, String summary) { - super(provider); - this.inputText = inputText; - this.definitionString = definitionString; - this.shortDescription = shortDescription; - this.summary = summary; - pieces = new ArrayList(3); - params = new ArrayList(3); - parse(template); - } - - - private void addTemplatePiece(TemplatePiece piece) { - pieces.add(piece); - if (piece instanceof Param && !"cursor".equals(piece.getText())) { - final String type = null; // TODO - Parameter param = new Parameter(type, piece.getText()); - params.add(param); - } - } - - - @Override - public String getInputText() { - return inputText; - } - - - private String getPieceText(int index, String leadingWS) { - TemplatePiece piece = pieces.get(index); - String text = piece.getText(); - if (text.indexOf('\n')>-1) { - text = text.replaceAll("\n", "\n" + leadingWS); - } - return text; - } - - - /** - * Returns null; template completions insert all of their - * text via getInsertionInfo(). - * - * @return null always. - */ - public String getReplacementText() { - return null; - } - - - public String getSummary() { - return summary; - } - - - public String getDefinitionString() { - return definitionString; - } - - public String getShortDescription() { - return shortDescription; - } - - - /** - * {@inheritDoc} - */ - public boolean getShowParameterToolTip() { - return false; - } - - - public ParameterizedCompletionInsertionInfo getInsertionInfo( - JTextComponent tc, boolean replaceTabsWithSpaces) { - - ParameterizedCompletionInsertionInfo info = - new ParameterizedCompletionInsertionInfo(); - - StringBuilder sb = new StringBuilder(); - int dot = tc.getCaretPosition(); - - // Get the range in which the caret can move before we hide - // this tool tip. - int minPos = dot; - Position maxPos = null; - int defaultEndOffs = -1; - try { - maxPos = tc.getDocument().createPosition(dot); - } catch (BadLocationException ble) { - ble.printStackTrace(); // Never happens - } - info.setCaretRange(minPos, maxPos); - int selStart = dot; // Default value - int selEnd = selStart; - - Document doc = tc.getDocument(); - String leadingWS = null; - try { - leadingWS = RSyntaxUtilities.getLeadingWhitespace(doc, dot); - } catch (BadLocationException ble) { // Never happens - ble.printStackTrace(); - leadingWS = ""; - } - - // Create the text to insert (keep it one completion for - // performance and simplicity of undo/redo). - int start = dot; - for (int i=0; i-1) { // ${cursor} specified - selStart = selEnd = defaultEndOffs; - } - } - info.setInitialSelection(selStart, selEnd); - - if (defaultEndOffs>-1) { - // Keep this location "after" all others when tabbing - info.addReplacementLocation(defaultEndOffs, defaultEndOffs); - } - info.setDefaultEndOffs(defaultEndOffs); - info.setTextToInsert(sb.toString()); - - return info; - - } - - - /** - * {@inheritDoc} - */ - public Parameter getParam(int index) { - return params.get(index); - } - - - /** - * {@inheritDoc} - */ - public int getParamCount() { - return params==null ? 0 : params.size(); - } - - - /** - * Returns whether a parameter is already defined with a specific name. - * - * @param name The name. - * @return Whether a parameter is defined with that name. - */ - private boolean isParamDefined(String name) { - for (int i=0; i-1 && offs escaped single dollar sign - addTemplatePiece(new TemplatePiece.Text( - template.substring(lastOffs, offs+1))); - lastOffs = offs + 2; - break; - case '{': // "${...}" => variable - int closingCurly = template.indexOf('}', offs+2); - if (closingCurly>-1) { - addTemplatePiece(new TemplatePiece.Text( - template.substring(lastOffs, offs))); - String varName = template.substring(offs+2, closingCurly); - if (!"cursor".equals(varName) && isParamDefined(varName)) { - addTemplatePiece(new TemplatePiece.ParamCopy(varName)); - } - else { - addTemplatePiece(new TemplatePiece.Param(varName)); - } - lastOffs = closingCurly + 1; - } - break; - } - - } - - if (lastOffs-1) { - - int startLen = sb.length(); - - int size = 4; - Document doc = tc.getDocument(); - if (doc != null) { - Integer i = (Integer) doc.getProperty(PlainDocument.tabSizeAttribute); - if (i != null) { - size = i.intValue(); - } - } - String tabStr = ""; - for (int i=0; i-1); - sb.append(text.substring(lastOffs)); - - start += sb.length() - startLen; - - } - else { - sb.append(text); - start += text.length(); - } - - return start; - - } - - - /** - * Sets the short description of this template completion. - * - * @param shortDesc The new short description. - * @see #getShortDescription() - */ - public void setShortDescription(String shortDesc) { - this.shortDescription = shortDesc; - } - - - @Override - public String toString() { - return getDefinitionString(); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/TemplatePiece.java b/ESPlorer/src/org/fife/ui/autocomplete/TemplatePiece.java deleted file mode 100644 index 4cb4212..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/TemplatePiece.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 06/17/2012 - * - * TemplatePiece.java - A logical piece of a template completion. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - - -/** - * A piece of a TemplateCompletion. You add instances of this - * class to template completions to define them. - * - * @author Robert Futrell - * @version 1.0 - * @see TemplateCompletion - */ -interface TemplatePiece { - - - String getText(); - - - public class Text implements TemplatePiece { - - private String text; - - public Text(String text) { - this.text = text; - } - - public String getText() { - return text; - } - - @Override - public String toString() { - return "[TemplatePiece.Text: text=" + text + "]"; - } - - } - - - public class Param implements TemplatePiece { - - String text; - - public Param(String text) { - this.text = text; - } - - public String getText() { - return text; - } - - @Override - public String toString() { - return "[TemplatePiece.Param: param=" + text + "]"; - } - - } - - - public class ParamCopy implements TemplatePiece { - - private String text; - - public ParamCopy(String text) { - this.text = text; - } - - public String getText() { - return text; - } - - @Override - public String toString() { - return "[TemplatePiece.ParamCopy: param=" + text + "]"; - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/TipUtil.java b/ESPlorer/src/org/fife/ui/autocomplete/TipUtil.java deleted file mode 100644 index d06d3cc..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/TipUtil.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * 08/13/2009 - * - * TipUtil.java - Utility methods for homemade tool tips. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.Color; -import java.awt.Font; -import java.awt.SystemColor; -import java.net.URL; -import javax.swing.BorderFactory; -import javax.swing.JEditorPane; -import javax.swing.UIManager; -import javax.swing.border.Border; -import javax.swing.plaf.ColorUIResource; -import javax.swing.text.html.HTMLDocument; - - -/** - * Static utility methods for homemade tool tips.

- * - * This is blatantly ripped off from RSyntaxTextArea's "FocusableTips" class - * of the same name, but isn't re-used to prevent a hard dependency on the - * RSTA library. - * - * @author Robert Futrell - * @version 1.0 - */ -class TipUtil { - - - private TipUtil() { - } - - - /** - * Returns the default background color to use for tool tip windows. - * - * @return The default background color. - */ - public static Color getToolTipBackground() { - - Color c = UIManager.getColor("ToolTip.background"); - - // Tooltip.background is wrong color on Nimbus (!) - boolean isNimbus = isNimbusLookAndFeel(); - if (c==null || isNimbus) { - c = UIManager.getColor("info"); // Used by Nimbus (and others) - if (c==null || (isNimbus && isDerivedColor(c))) { - c = SystemColor.info; // System default - } - } - - // Workaround for a bug (?) with Nimbus - calling JLabel.setBackground() - // with a ColorUIResource does nothing, must be a normal Color - if (c instanceof ColorUIResource) { - c = new Color(c.getRGB()); - } - - return c; - - } - - - /** - * Returns the border used by tool tips in this look and feel. - * - * @return The border. - */ - public static Border getToolTipBorder() { - - Border border = UIManager.getBorder("ToolTip.border"); - - if (border==null || isNimbusLookAndFeel()) { - border = UIManager.getBorder("nimbusBorder"); - if (border==null) { - border = BorderFactory.createLineBorder(SystemColor.controlDkShadow); - } - } - - return border; - - } - - - /** - * Returns whether a color is a Nimbus DerivedColor, which is troublesome - * in that it doesn't use its RGB values (uses HSB instead?) and so - * querying them is useless. - * - * @param c The color to check. - * @return Whether it is a DerivedColor - */ - private static final boolean isDerivedColor(Color c) { - return c!=null && (c.getClass().getName().endsWith(".DerivedColor") || - c.getClass().getName().endsWith(".DerivedColor$UIResource")); - } - - - /** - * Returns whether the Nimbus Look and Feel is installed. - * - * @return Whether the current LAF is Nimbus. - */ - private static final boolean isNimbusLookAndFeel() { - return UIManager.getLookAndFeel().getName().equals("Nimbus"); - } - - - /** - * Tweaks a JEditorPane so it can be used to render the - * content in a focusable pseudo-tool tip. It is assumed that the editor - * pane is using an HTMLDocument. - * - * @param textArea The editor pane to tweak. - */ - public static void tweakTipEditorPane(JEditorPane textArea) { - - // Jump through a few hoops to get things looking nice in Nimbus - boolean isNimbus = isNimbusLookAndFeel(); - if (isNimbus) { - Color selBG = textArea.getSelectionColor(); - Color selFG = textArea.getSelectedTextColor(); - textArea.setUI(new javax.swing.plaf.basic.BasicEditorPaneUI()); - textArea.setSelectedTextColor(selFG); - textArea.setSelectionColor(selBG); - } - - textArea.setEditable(false); // Required for links to work! - textArea.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); - - // Make selection visible even though we are not (initially) focusable. - textArea.getCaret().setSelectionVisible(true); - - // Set the foreground color. Important because when rendering HTML, - // default foreground becomes black, which may not match all LAF's - // (e.g. Substance). - Color fg = UIManager.getColor("Label.foreground"); - if (fg==null || (isNimbus && isDerivedColor(fg))) { - fg = SystemColor.textText; - } - textArea.setForeground(fg); - - // Make it use the "tool tip" background color. - textArea.setBackground(TipUtil.getToolTipBackground()); - - // Force JEditorPane to use a certain font even in HTML. - // All standard LookAndFeels, even Nimbus (!), define Label.font. - Font font = UIManager.getFont("Label.font"); - if (font == null) { // Try to make a sensible default - font = new Font("SansSerif", Font.PLAIN, 12); - } - HTMLDocument doc = (HTMLDocument) textArea.getDocument(); - doc.getStyleSheet().addRule( - "body { font-family: " + font.getFamily() + - "; font-size: " + font.getSize() + "pt" + - "; color: " + Util.getHexString(fg) + "; }"); - - // Always add link foreground rule. Unfortunately these CSS rules - // stack each time the LaF is changed (how can we overwrite them - // without clearing out the important "standard" ones?). - Color linkFG = Util.getHyperlinkForeground(); - doc.getStyleSheet().addRule( - "a { color: " + Util.getHexString(linkFG) + "; }"); - - URL url = TipUtil.class.getResource("bullet_black.png"); - if (url!=null) { - doc.getStyleSheet().addRule( - "ul { list-style-image: '" + url.toString() + "'; }"); - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/Util.java b/ESPlorer/src/org/fife/ui/autocomplete/Util.java deleted file mode 100644 index 0c2c271..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/Util.java +++ /dev/null @@ -1,330 +0,0 @@ -/* - * 12/21/2008 - * - * Util.java - Utility methods for the autocompletion package. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.Color; -import java.awt.GraphicsConfiguration; -import java.awt.GraphicsDevice; -import java.awt.GraphicsEnvironment; -import java.awt.Rectangle; -import java.lang.reflect.Method; -import java.net.URI; -import java.security.AccessControlException; -import java.util.regex.Pattern; -import javax.swing.JLabel; -import javax.swing.UIManager; - -import org.fife.ui.rsyntaxtextarea.PopupWindowDecorator; - - -/** - * Utility methods for the auto-complete framework. - * - * @author Robert Futrell - * @version 1.0 - */ -public class Util { - - /** - * If a system property is defined with this name and set, ignoring case, - * to true, this library will not attempt to use Substance - * renderers. Otherwise, if a Substance Look and Feel is installed, we - * will attempt to use Substance cell renderers in all of our dropdowns.

- * - * Note that we do not have a build dependency on Substance, so all access - * to Substance stuff is done via reflection. We will fall back onto - * default renderers if something goes horribly wrong. - */ - public static final String PROPERTY_DONT_USE_SUBSTANCE_RENDERERS = - "org.fife.ui.autocomplete.DontUseSubstanceRenderers"; - - /** - * If this system property is true, then even the "main" two - * auto-complete windows will allow window decorations via - * {@link PopupWindowDecorator}. If this property is undefined or - * false, they won't honor such decorations. This is due to - * certain performance issues with translucent windows (used for drop - * shadows), even as of Java 7u2. - */ - public static final String PROPERTY_ALLOW_DECORATED_AUTOCOMPLETE_WINDOWS = - "org.fife.ui.autocomplete.allowDecoratedAutoCompleteWindows"; - - /** - * Used for the color of hyperlinks when a LookAndFeel uses light text - * against a dark background. - */ - private static final Color LIGHT_HYPERLINK_FG = new Color(0xd8ffff); - - private static final Pattern TAG_PATTERN = Pattern.compile("<[^>]*>"); - - private static final boolean useSubstanceRenderers; - private static boolean desktopCreationAttempted; - private static Object desktop; - private static final Object LOCK_DESKTOP_CREATION = new Object(); - - - /** - * Attempts to open a web browser to the specified URI. - * - * @param uri The URI to open. If this is null, nothing - happens and this method returns false. - * @return Whether the operation was successful. This will be - * false on JRE's older than 1.6. - */ - public static boolean browse(URI uri) { - - boolean success = false; - - if (uri!=null) { - Object desktop = getDesktop(); - if (desktop!=null) { - try { - Method m = desktop.getClass().getDeclaredMethod( - "browse", new Class[] { URI.class }); - m.invoke(desktop, new Object[] { uri }); - success = true; - } catch (RuntimeException re) { - throw re; // Keep FindBugs happy - } catch (Exception e) { - // Ignore, just return "false" below. - } - } - } - - return success; - - } - - - /** - * Returns the singleton java.awt.Desktop instance, or - * null if it is unsupported on this platform (or the JRE - * is older than 1.6). - * - * @return The desktop, as an {@link Object}. - */ - private static Object getDesktop() { - - synchronized (LOCK_DESKTOP_CREATION) { - - if (!desktopCreationAttempted) { - - desktopCreationAttempted = true; - - try { - Class desktopClazz = Class.forName("java.awt.Desktop"); - Method m = desktopClazz. - getDeclaredMethod("isDesktopSupported"); - - boolean supported= ((Boolean)m.invoke(null)).booleanValue(); - if (supported) { - m = desktopClazz.getDeclaredMethod("getDesktop"); - desktop = m.invoke(null); - } - - } catch (RuntimeException re) { - throw re; // Keep FindBugs happy - } catch (Exception e) { - // Ignore; keeps desktop as null. - } - - } - - } - - return desktop; - - } - - - /** - * Returns a hex string for the specified color, suitable for HTML. - * - * @param c The color. - * @return The string representation, in the form "#rrggbb", - * or null if c is null. - */ - public static String getHexString(Color c) { - - if (c==null) { - return null; - } - - // Don't assume 0xff alpha - //return "#" + Integer.toHexString(c.getRGB()&0xffffff).substring(2); - - StringBuilder sb = new StringBuilder("#"); - int r = c.getRed(); - if (r<16) { - sb.append('0'); - } - sb.append(Integer.toHexString(r)); - int g = c.getGreen(); - if (g<16) { - sb.append('0'); - } - sb.append(Integer.toHexString(g)); - int b = c.getBlue(); - if (b<16) { - sb.append('0'); - } - sb.append(Integer.toHexString(b)); - - return sb.toString(); - - } - - - /** - * Returns the color to use for hyperlink-style components. This method - * will return Color.blue unless it appears that the current - * LookAndFeel uses light text on a dark background, in which case a - * brighter alternative is returned. - * - * @return The color to use for hyperlinks. - */ - static final Color getHyperlinkForeground() { - - // This property is defined by all standard LaFs, even Nimbus (!), - // but you never know what crazy LaFs there are... - Color fg = UIManager.getColor("Label.foreground"); - if (fg==null) { - fg = new JLabel().getForeground(); - } - - return isLightForeground(fg) ? LIGHT_HYPERLINK_FG : Color.blue; - - } - - - /** - * Returns the screen coordinates for the monitor that contains the - * specified point. This is useful for setups with multiple monitors, - * to ensure that popup windows are positioned properly. - * - * @param x The x-coordinate, in screen coordinates. - * @param y The y-coordinate, in screen coordinates. - * @return The bounds of the monitor that contains the specified point. - */ - public static Rectangle getScreenBoundsForPoint(int x, int y) { - GraphicsEnvironment env = GraphicsEnvironment. - getLocalGraphicsEnvironment(); - GraphicsDevice[] devices = env.getScreenDevices(); - for (int i=0; ifalse, we'll use our - * standard rendering for completions, even when Substance is being used. - * - * @return Whether to use Substance renderers if Substance is installed. - */ - public static boolean getUseSubstanceRenderers() { - return useSubstanceRenderers; - } - - - /** - * Returns whether the specified color is "light" to use as a foreground. - * Colors that return true indicate that the current Look and - * Feel probably uses light text colors on a dark background. - * - * @param fg The foreground color. - * @return Whether it is a "light" foreground color. - */ - public static final boolean isLightForeground(Color fg) { - return fg.getRed()>0xa0 && fg.getGreen()>0xa0 && fg.getBlue()>0xa0; - } - - - /** - * Returns whether str starts with start, - * ignoring case. - * - * @param str The string to check. - * @param start The prefix to check for. - * @return Whether str starts with start, - * ignoring case. - */ - public static boolean startsWithIgnoreCase(String str, String start) { - int startLen = start.length(); - if (str.length()>=startLen) { - for (int i=0; i<html>" for markup tags to be stripped. - * - * @param text The string. - * @return The string, with any HTML stripped. - */ - public static String stripHtml(String text) { - if (text==null || !text.startsWith("")) { - return text; - } - // TODO: Micro-optimize me, might be called in renderers and loops - return TAG_PATTERN.matcher(text).replaceAll(""); - } - - - static { - - boolean use = true; - try { - use = !Boolean.getBoolean(PROPERTY_DONT_USE_SUBSTANCE_RENDERERS); - } catch (AccessControlException ace) { // We're in an applet. - use = true; - } - useSubstanceRenderers = use; - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/VariableCompletion.java b/ESPlorer/src/org/fife/ui/autocomplete/VariableCompletion.java deleted file mode 100644 index 1e97287..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/VariableCompletion.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 12/22/2008 - * - * VariableCompletion.java - A completion for a variable. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import javax.swing.text.JTextComponent; - - -/** - * A completion for a variable (or constant) in a programming language.

- * - * This completion type uses its shortDescription property as part of - * its summary returned by {@link #getSummary()}; for this reason, it may be - * a little longer (even much longer), if desired, than what is recommended - * for BasicCompletions (where the shortDescription is used - * in {@link #toString()} for ListCellRenderers). - * - * @author Robert Futrell - * @version 1.0 - */ -public class VariableCompletion extends BasicCompletion { - - /** - * The variable's type. - */ - private String type; - - /** - * What library (for example) this variable is defined in. - */ - private String definedIn; - - - /** - * Constructor. - * - * @param provider The parent provider. - * @param name The name of this variable. - * @param type The type of this variable (e.g. "int", - * "String", etc.). - */ - public VariableCompletion(CompletionProvider provider, String name, - String type) { - super(provider, name); - this.type = type; - } - - - protected void addDefinitionString(StringBuilder sb) { - sb.append("").append(getDefinitionString()).append(""); - } - - - public String getDefinitionString() { - - StringBuilder sb = new StringBuilder(); - - // Add the return type if applicable (C macros like NULL have no type). - if (type!=null) { - sb.append(type).append(' '); - } - - // Add the item being described's name. - sb.append(getName()); - - return sb.toString(); - - } - - - /** - * Returns where this variable is defined. - * - * @return Where this variable is defined. - * @see #setDefinedIn(String) - */ - public String getDefinedIn() { - return definedIn; - } - - - /** - * Returns the name of this variable. - * - * @return The name. - */ - public String getName() { - return getReplacementText(); - } - - - /** - * {@inheritDoc} - */ - @Override - public String getSummary() { - StringBuilder sb = new StringBuilder(); - addDefinitionString(sb); - possiblyAddDescription(sb); - possiblyAddDefinedIn(sb); - return sb.toString(); - } - - - /** - * Returns the tool tip text to display for mouse hovers over this - * completion.

- * - * Note that for this functionality to be enabled, a - * JTextComponent must be registered with the - * ToolTipManager, and the text component must know to search - * for this value. In the case of an - * RSyntaxTextArea, this - * can be done with a org.fife.ui.rtextarea.ToolTipSupplier that - * calls into - * {@link CompletionProvider#getCompletionsAt(JTextComponent, java.awt.Point)}. - * - * @return The tool tip text for this completion, or null if - * none. - */ - @Override - public String getToolTipText() { - return getDefinitionString(); - } - - - /** - * Returns the type of this variable. - * - * @return The type. - */ - public String getType() { - return type; - } - - - /** - * Adds some HTML describing where this variable is defined, if this - * information is known. - * - * @param sb The buffer to append to. - */ - protected void possiblyAddDefinedIn(StringBuilder sb) { - if (definedIn!=null) { - sb.append("


Defined in:"); // TODO: Localize me - sb.append(" ").append(definedIn).append(""); - } - } - - - /** - * Adds the description text as HTML to a buffer, if a description is - * defined. - * - * @param sb The buffer to append to. - * @return Whether there was a description to add. - */ - protected boolean possiblyAddDescription(StringBuilder sb) { - if (getShortDescription()!=null) { - sb.append("

"); - sb.append(getShortDescription()); - sb.append("


"); - return true; - } - return false; - } - - - /** - * Sets where this variable is defined. - * - * @param definedIn Where this variable is defined. - * @see #getDefinedIn() - */ - public void setDefinedIn(String definedIn) { - this.definedIn = definedIn; - } - - - /** - * Overridden to return the name of the variable being completed. - * - * @return A string representation of this completion. - */ - @Override - public String toString() { - return getName(); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/arrow_left.png b/ESPlorer/src/org/fife/ui/autocomplete/arrow_left.png deleted file mode 100644 index 5dc696781e6135d37b5bf2e98e46fd94f020c48d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 345 zcmV-f0jBq$gGR5;6H z{Qv(y10{fofkH6I3@AO3$p*x`Nil#0jeqs;pT9Ds7{CaN1)$9r#n~kE{`~pF@bLXZ zhF?E_GyM7i!oL`P0x_8Wj$ni2F7#hzWPxfvDaIo>#A+qW*AYQLZl(!&BX$x7Ik;qO170ssEM z@$bKXf%rGW?|(r27bf-TSv zD}TdX0CM*JhkLO)8|Y^+n~Q^sK~hqR;q|N647YFGy>NTZJsWr!5CaSfwJm@a><8NX v2&h?|yGq%gzvv3epMS6VUgTO+t)&4yg_Z9&?~wX1XYz3g^%vJ} zsd8-%W7^RuT(Z`*)5+_lkeLp*VoUZVu_vDAcINajHbe`4`F-)spS_>!?T=Y$yPY}I Rd=F?fgQu&X%Q~loCICsSQ$YX# diff --git a/ESPlorer/src/org/fife/ui/autocomplete/osx_sizegrip.png b/ESPlorer/src/org/fife/ui/autocomplete/osx_sizegrip.png deleted file mode 100644 index 07fa8b19e32736a66b30471f5d4410a6fc310ab8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4876 zcmeH~_dnEuAICq)5i(MeY_dm2GBVD}=A3M@M|Ae-PT|bUj0%Ob_m(c3vN8`BXOBzS zBYXSy{Wrdk@B8t1zhCe7jOaaKU3U209d#U0BA-42%!dm(SN&VX_cvJfalfIA@mq%?uvWT-g7egesAj9PAten&4;HvHQv$M;+mMVf2?hLa$!1`=eOglIL*@O$}lsq)m9SKaDStfas@R9c5e^p}ziY{$3>?R8#q)eU{;Krb^o zv>{kT4U7F5UXOm>;}N|LoqQ3U1(BPWjg^Pf1Jd`tbwmTepc(qhV{ekJVaL*EbcsNq zG8)R+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yAx$;MWmDo*)XHHW_2-wSX(R&x#mEEo{tDx|9Cl`MZu>+ z*B58LKzpIKGpqqp$|hS&LJ4!K?AC0$nz#d$5l&#vTgeMKt;(HBMw(qB=JfdFBd{QSGp7pJs?Rs$?1|{9Z^;xLnOrVd}{x zvJ?FI!qL5_X*%mNwkqJ+Rl@L@2iuuhkV8=ARUmt9yWh0V&f(cfm?8ZcWO+A`b)ux@ zD^6gTWqB)S^dfI5WSSpUKfHNrny5v^bM_KJ;Siw3`pHa12e5GE%lr>3T+r>AFTW@cw+S65fBuCD$) z-2adN6Zjt{FlHVq^zS@oe+_egsF#a>puMj%U}WzO^A|JFFyVwtiAl+nEEDhl+tJci z2b%~$9qly9Xa+KhL!C%u3`|5lX^Kh9X;=kFIhASwske!qAVzee69|n9a{|TDNrf{A o;Ye=-C6RV$AdJqRLgAAa$@~opi9``}=YO$kYZ$0ks@jG92OQi35dZ)H diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/AbstractJFlexCTokenMaker.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/AbstractJFlexCTokenMaker.java deleted file mode 100644 index 3a4c299..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/AbstractJFlexCTokenMaker.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * 01/25/2009 - * - * AbstractJFlexCTokenMaker.java - Base class for token makers that use curly - * braces to denote code blocks, such as C, C++, Java, Perl, etc. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.awt.event.ActionEvent; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import javax.swing.Action; -import javax.swing.UIManager; -import javax.swing.text.BadLocationException; - -import org.fife.ui.rtextarea.RTextArea; - - -/** - * Base class for JFlex-based token makers using C-style syntax. This class - * knows how to: - * - *
    - *
  • Auto-indent after opening braces and parens - *
  • Automatically close multi-line and documentation comments - *
- * - * @author Robert Futrell - * @version 1.0 - */ -public abstract class AbstractJFlexCTokenMaker extends AbstractJFlexTokenMaker { - - private final Action INSERT_BREAK_ACTION; - - private static final Pattern MLC_PATTERN = - Pattern.compile("([ \\t]*)(/?[\\*]+)([ \\t]*)"); - - - protected AbstractJFlexCTokenMaker() { - INSERT_BREAK_ACTION = createInsertBreakAction(); - } - - - /** - * Creates and returns the action to use when the user inserts a newline. - * The default implementation intelligently closes multi-line comments. - * Subclasses can override. - * - * @return The action. - * @see #getInsertBreakAction() - */ - protected Action createInsertBreakAction() { - return new CStyleInsertBreakAction(); - } - - - /** - * Returns true always as C-style languages use curly braces - * to denote code blocks. - * - * @return true always. - */ - @Override - public boolean getCurlyBracesDenoteCodeBlocks(int languageIndex) { - return true; - } - - - /** - * Returns an action to handle "insert break" key presses (i.e. Enter). - * An action is returned that handles newlines differently in multi-line - * comments. - * - * @return The action. - */ - @Override - public Action getInsertBreakAction() { - return INSERT_BREAK_ACTION; - } - - - /** - * {@inheritDoc} - */ - @Override - public boolean getMarkOccurrencesOfTokenType(int type) { - return type==Token.IDENTIFIER || type==Token.FUNCTION; - } - - - /** - * {@inheritDoc} - */ - @Override - public boolean getShouldIndentNextLineAfter(Token t) { - if (t!=null && t.length()==1) { - char ch = t.charAt(0); - return ch=='{' || ch=='('; - } - return false; - } - - - /** - * Returns whether a given token is an internal token type that represents - * an MLC or documentation comment continuing on to the next line. This is - * done by languages such as JavaScript that are a little more verbose - * than necessary so that their code can be copy-and-pasted into other - * TokenMakers that use them as nested languages (such as - * HTML, JSP, etc.). - * - * @param t The token to check. This cannot be null. - * @return Whether the token is an internal token representing the end of - * a line for an MLC/doc comment continuing on to the next line. - */ - private boolean isInternalEolTokenForMLCs(Token t) { - int type = t.getType(); - if (type<0) { - type = getClosestStandardTokenTypeForInternalType(type); - return type==TokenTypes.COMMENT_MULTILINE || - type==TokenTypes.COMMENT_DOCUMENTATION; - } - return false; - } - - - /** - * Action that knows how to special-case inserting a newline in a - * multi-line comment for languages like C and Java. - */ - protected class CStyleInsertBreakAction extends - RSyntaxTextAreaEditorKit.InsertBreakAction { - - @Override - public void actionPerformedImpl(ActionEvent e, RTextArea textArea) { - - if (!textArea.isEditable() || !textArea.isEnabled()) { - UIManager.getLookAndFeel().provideErrorFeedback(textArea); - return; - } - - RSyntaxTextArea rsta = (RSyntaxTextArea)getTextComponent(e); - RSyntaxDocument doc = (RSyntaxDocument)rsta.getDocument(); - - int line = textArea.getCaretLineNumber(); - int type = doc.getLastTokenTypeOnLine(line); - if (type<0) { - type = doc.getClosestStandardTokenTypeForInternalType(type); - } - - // Only in MLC's should we try this - if (type==Token.COMMENT_DOCUMENTATION || - type==Token.COMMENT_MULTILINE) { - insertBreakInMLC(e, rsta, line); - } - else { - handleInsertBreak(rsta, true); - } - - } - - - /** - * Returns whether the MLC token containing offs appears - * to have a "nested" comment (i.e., contains "/*" - * somewhere inside of it). This implies that it is likely a "new" MLC - * and needs to be closed. While not foolproof, this is usually good - * enough of a sign. - * - * @param textArea - * @param line - * @param offs - * @return Whether a comment appears to be nested inside this one. - */ - private boolean appearsNested(RSyntaxTextArea textArea, - int line, int offs) { - - final int firstLine = line; // Remember the line we start at. - - while (line=start && - dotalmost could - * be factored out into this class, but cannot because they reference JFlex - * variables that we cannot access from this class. - * - * @author Robert Futrell - * @version 0.1 - */ -public abstract class AbstractJFlexTokenMaker extends TokenMakerBase { - - protected Segment s; - - protected int start; // Just for states. - protected int offsetShift; // As parser always starts at 0, but our line doesn't. - - - /** - * Declared here so we can define overloads that refer to this method. - * - * @param newState The new JFlex state to enter. - */ - public abstract void yybegin(int newState); - - - /** - * Starts a new JFlex state and changes the current language index. - * - * @param state The new JFlex state to enter. - * @param languageIndex The new language index. - */ - protected void yybegin(int state, int languageIndex) { - yybegin(state); - setLanguageIndex(languageIndex); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/AbstractTokenMaker.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/AbstractTokenMaker.java deleted file mode 100644 index 0c14a42..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/AbstractTokenMaker.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 11/07/2004 - * - * AbstractTokenMaker.java - An abstract implementation of TokenMaker. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - - -/** - * An abstract implementation of the - * {@link org.fife.ui.rsyntaxtextarea.TokenMaker} interface. It should - * be overridden for every language for which you want to provide - * syntax highlighting.

- * - * @see Token - * - * @author Robert Futrell - * @version 0.2 - */ -public abstract class AbstractTokenMaker extends TokenMakerBase { - - /** - * Hash table of words to highlight and what token type they are. - * The keys are the words to highlight, and their values are the - * token types, for example, Token.RESERVED_WORD or - * Token.FUNCTION. - */ - protected TokenMap wordsToHighlight; - - - /** - * Constructor. - */ - public AbstractTokenMaker() { - wordsToHighlight = getWordsToHighlight(); - } - - - /** - * Returns the words to highlight for this programming language. - * - * @return A TokenMap containing the words to highlight for - * this programming language. - */ - public abstract TokenMap getWordsToHighlight(); - - - /** - * Removes the token last added from the linked list of tokens. The - * programmer should never have to call this directly; it can be called - * by subclasses of TokenMaker if necessary. - */ - public void removeLastToken() { - if (previousToken==null) { - firstToken = currentToken = null; - } - else { - currentToken = previousToken; - currentToken.setNextToken(null); - } - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/AbstractTokenMakerFactory.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/AbstractTokenMakerFactory.java deleted file mode 100644 index e4ef6e6..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/AbstractTokenMakerFactory.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 12/14/08 - * - * AbstractTokenMakerFactory.java - Base class for TokenMaker implementations. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - - -/** - * Base class for {@link TokenMakerFactory} implementations. A mapping from - * language keys to the names of {@link TokenMaker} classes is stored. - * - * @author Robert Futrell - * @version 1.0 - */ -public abstract class AbstractTokenMakerFactory extends TokenMakerFactory { - - /** - * A mapping from keys to the names of {@link TokenMaker} implementation - * class names. When {@link #getTokenMaker(String)} is called with a key - * defined in this map, a TokenMaker of the corresponding type - * is returned. - */ - private Map tokenMakerMap; - - - /** - * Constructor. - */ - protected AbstractTokenMakerFactory() { - tokenMakerMap = new HashMap(); - initTokenMakerMap(); - } - - - /** - * Returns a {@link TokenMaker} for the specified key. - * - * @param key The key. - * @return The corresponding TokenMaker, or null - * if none matches the specified key. - */ - @Override - protected TokenMaker getTokenMakerImpl(String key) { - TokenMakerCreator tmc = (TokenMakerCreator)tokenMakerMap.get(key); - if (tmc!=null) { - try { - return tmc.create(); - } catch (RuntimeException re) { // FindBugs - throw re; - } catch (Exception e) { - e.printStackTrace(); - } - } - return null; - } - - - /** - * Populates the mapping from keys to instances of - * TokenMakerCreators. Subclasses should override this method - * and call one of the putMapping overloads to register - * {@link TokenMaker}s for syntax constants. - * - * @see #putMapping(String, String) - * @see #putMapping(String, String, ClassLoader) - */ - protected abstract void initTokenMakerMap(); - - - /** - * {@inheritDoc} - */ - @Override - public Set keySet() { - return tokenMakerMap.keySet(); - } - - - /** - * Adds a mapping from a key to a TokenMaker implementation - * class name. - * - * @param key The key. - * @param className The TokenMaker class name. - * @see #putMapping(String, String, ClassLoader) - */ - public void putMapping(String key, String className) { - putMapping(key, className, null); - } - - - /** - * Adds a mapping from a key to a TokenMaker implementation - * class name. - * - * @param key The key. - * @param className The TokenMaker class name. - * @param cl The class loader to use when loading the class. - * @see #putMapping(String, String) - */ - public void putMapping(String key, String className, ClassLoader cl) { - tokenMakerMap.put(key, new TokenMakerCreator(className, cl)); - } - - - /** - * Wrapper that handles the creation of TokenMaker instances. - */ - private static class TokenMakerCreator { - - private String className; - private ClassLoader cl; - - public TokenMakerCreator(String className, ClassLoader cl) { - this.className = className; - this.cl = cl!=null ? cl : getClass().getClassLoader(); - } - - public TokenMaker create() throws Exception { - return (TokenMaker)Class.forName(className, true, cl).newInstance(); - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ActiveLineRangeEvent.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ActiveLineRangeEvent.java deleted file mode 100644 index 4615d81..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ActiveLineRangeEvent.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 02/06/2011 - * - * ActiveLineRangeEvent.java - Notifies listeners of an "active line range" - * change in an RSyntaxTextArea. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.util.EventObject; - - -/** - * The event fired by {@link RSyntaxTextArea}s when the active line range - * changes. - * - * @author Robert Futrell - * @version 1.0 - */ -public class ActiveLineRangeEvent extends EventObject { - - private int min; - private int max; - - - /** - * Constructor. - * - * @param source The text area. - * @param min The first line in the active line range, or - * -1 if the line range is being cleared. - * @param max The last line in the active line range, or - * -1 if the line range is being cleared. - */ - public ActiveLineRangeEvent(RSyntaxTextArea source, int min, int max) { - super(source); - this.min = min; - this.max = max; - } - - - /** - * Returns the last line in the active line range. - * - * @return The last line, or -1 if the range is being - * cleared. - * @see #getMin() - */ - public int getMax() { - return max; - } - - - /** - * Returns the first line in the active line range. - * - * @return The first line, or -1 if the range is being - * cleared. - * @see #getMax() - */ - public int getMin() { - return min; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ActiveLineRangeListener.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ActiveLineRangeListener.java deleted file mode 100644 index 45a7f46..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ActiveLineRangeListener.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 02/06/2011 - * - * ActiveLineRangeListener.java - Listens for "active line range" changes - * in an RSyntaxTextArea. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.util.EventListener; - - -/** - * Listens for "active line range" events from an RSyntaxTextArea. - * If a text area contains some semantic knowledge of the programming language - * being edited, it may broadcast {@link ActiveLineRangeEvent}s whenever the - * caret moves into a new "block" of code. Listeners can listen for these - * events and respond accordingly.

- * - * See the RSTALanguageSupport project at - * http://fifesoft.com for some - * LanguageSupport implementations that may broadcast these - * events. Note that if an RSTA/LanguageSupport does not support broadcasting - * these events, the listener will simply never receive any notifications. - * - * @author Robert Futrell - * @version 1.0 - */ -public interface ActiveLineRangeListener extends EventListener { - - - /** - * Called whenever the "active line range" changes. - * - * @param e Information about the line range change. If there is no longer - * an "active line range," the "minimum" and "maximum" line values - * should both be -1. - */ - public void activeLineRangeChanged(ActiveLineRangeEvent e); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/CodeTemplateManager.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/CodeTemplateManager.java deleted file mode 100644 index b522203..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/CodeTemplateManager.java +++ /dev/null @@ -1,389 +0,0 @@ -/* - * 02/21/2005 - * - * CodeTemplateManager.java - manages code templates. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.beans.XMLDecoder; -import java.beans.XMLEncoder; -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileFilter; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.Serializable; -import java.util.*; -import javax.swing.text.BadLocationException; -import javax.swing.text.Document; -import javax.swing.text.Segment; - -import org.fife.ui.rsyntaxtextarea.templates.CodeTemplate; - - -/** - * Manages "code templates."

- * - * All methods in this class are synchronized for thread safety, but as a - * best practice, you should probably only modify the templates known to a - * CodeTemplateManager on the EDT. Modifying a - * CodeTemplate retrieved from a CodeTemplateManager - * while not on the EDT could cause problems.

- * - * For more flexible boilerplate code insertion, consider using the - * TemplateCompletion - * class in the - * AutoComplete - * add-on library. - * - * @author Robert Futrell - * @version 1.0 - */ -public class CodeTemplateManager { - - private int maxTemplateIDLength; - private List templates; - - private Segment s; - private TemplateComparator comparator; - private File directory; - - - /** - * Constructor. - */ - public CodeTemplateManager() { - s = new Segment(); - comparator = new TemplateComparator(); - templates = new ArrayList(); - } - - - /** - * Registers the specified template with this template manager. - * - * @param template The template to register. - * @throws IllegalArgumentException If template is - * null. - * @see #removeTemplate(CodeTemplate) - * @see #removeTemplate(String) - */ - public synchronized void addTemplate(CodeTemplate template) { - if (template==null) { - throw new IllegalArgumentException("template cannot be null"); - } - templates.add(template); - sortTemplates(); - } - - - /** - * Returns the template that should be inserted at the current caret - * position, assuming the trigger character was pressed. - * - * @param textArea The text area that's getting text inserted into it. - * @return A template that should be inserted, if appropriate, or - * null if no template should be inserted. - */ - public synchronized CodeTemplate getTemplate(RSyntaxTextArea textArea) { - int caretPos = textArea.getCaretPosition(); - int charsToGet = Math.min(caretPos, maxTemplateIDLength); - try { - Document doc = textArea.getDocument(); - doc.getText(caretPos-charsToGet, charsToGet, s); - @SuppressWarnings("unchecked") - int index = Collections.binarySearch(templates, s, comparator); - return index>=0 ? (CodeTemplate)templates.get(index) : null; - } catch (BadLocationException ble) { - ble.printStackTrace(); - throw new InternalError("Error in CodeTemplateManager"); - } - } - - - /** - * Returns the number of templates this manager knows about. - * - * @return The template count. - */ - public synchronized int getTemplateCount() { - return templates.size(); - } - - - /** - * Returns the templates currently available. - * - * @return The templates available. - */ - public synchronized CodeTemplate[] getTemplates() { - CodeTemplate[] temp = new CodeTemplate[templates.size()]; - return templates.toArray(temp); - } - - - /** - * Returns whether the specified character is a valid character for a - * CodeTemplate id. - * - * @param ch The character to check. - * @return Whether the character is a valid template character. - */ - public static final boolean isValidChar(char ch) { - return RSyntaxUtilities.isLetterOrDigit(ch) || ch=='_'; - } - - - /** - * Returns the specified code template. - * - * @param template The template to remove. - * @return true if the template was removed, false - * if the template was not in this template manager. - * @throws IllegalArgumentException If template is - * null. - * @see #removeTemplate(String) - * @see #addTemplate(CodeTemplate) - */ - public synchronized boolean removeTemplate(CodeTemplate template) { - - if (template==null) { - throw new IllegalArgumentException("template cannot be null"); - } - - // TODO: Do a binary search - return templates.remove(template); - - } - - - /** - * Returns the code template with the specified id. - * - * @param id The id to check for. - * @return The code template that was removed, or null if - * there was no template with the specified ID. - * @throws IllegalArgumentException If id is null. - * @see #removeTemplate(CodeTemplate) - * @see #addTemplate(CodeTemplate) - */ - public synchronized CodeTemplate removeTemplate(String id) { - - if (id==null) { - throw new IllegalArgumentException("id cannot be null"); - } - - // TODO: Do a binary search - for (Iterator i=templates.iterator(); i.hasNext(); ) { - CodeTemplate template = i.next(); - if (id.equals(template.getID())) { - i.remove(); - return template; - } - } - - return null; - - } - - - /** - * Replaces the current set of available templates with the ones - * specified. - * - * @param newTemplates The new set of templates. Note that we will - * be taking a shallow copy of these and sorting them. - */ - public synchronized void replaceTemplates(CodeTemplate[] newTemplates) { - templates.clear(); - if (newTemplates!=null) { - for (int i=0; i-1 if the specified directory does not exist. - */ - public synchronized int setTemplateDirectory(File dir) { - - if (dir!=null && dir.isDirectory()) { - - this.directory = dir; - - File[] files = dir.listFiles(new XMLFileFilter()); - int newCount = files==null ? 0 : files.length; - int oldCount = templates.size(); - - List temp = - new ArrayList(oldCount+newCount); - temp.addAll(templates); - - for (int i=0; i i=templates.iterator(); i.hasNext(); ) { - CodeTemplate temp = i.next(); - if (temp==null || temp.getID()==null) { - i.remove(); - } - else { - maxTemplateIDLength = Math.max(maxTemplateIDLength, - temp.getID().length()); - } - } - - Collections.sort(templates); - - } - - - /** - * A comparator that takes a CodeTemplate as its first - * parameter and a Segment as its second, and knows - * to compare the template's ID to the segment's text. - */ - @SuppressWarnings("rawtypes") - private static class TemplateComparator implements Comparator, Serializable{ - - public int compare(Object template, Object segment) { - - // Get template start index (0) and length. - CodeTemplate t = (CodeTemplate)template; - final char[] templateArray = t.getID().toCharArray(); - int i = 0; - int len1 = templateArray.length; - - // Find "token" part of segment and get its offset and length. - Segment s = (Segment)segment; - char[] segArray = s.array; - int len2 = s.count; - int j = s.offset + len2 - 1; - while (j>=s.offset && isValidChar(segArray[j])) { - j--; - } - j++; - int segShift = j - s.offset; - len2 -= segShift; - - int n = Math.min(len1, len2); - while (n-- != 0) { - char c1 = templateArray[i++]; - char c2 = segArray[j++]; - if (c1 != c2) - return c1 - c2; - } - return len1 - len2; - - } - - } - - - /** - * A file filter that accepts only XML files. - */ - private static class XMLFileFilter implements FileFilter { - public boolean accept(File f) { - return f.getName().toLowerCase().endsWith(".xml"); - } - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/DefaultOccurrenceMarker.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/DefaultOccurrenceMarker.java deleted file mode 100644 index f214278..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/DefaultOccurrenceMarker.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 03/09/2013 - * - * DefaultOccurrenceMarker - Marks occurrences of the current token for most - * languages. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import javax.swing.text.BadLocationException; -import javax.swing.text.Caret; - -import org.fife.ui.rtextarea.SmartHighlightPainter; - - -/** - * The default implementation of {@link OccurrenceMarker}. It goes through - * the document and marks all instances of the specified token. - * - * @author Robert Futrell - * @version 1.0 - */ -class DefaultOccurrenceMarker implements OccurrenceMarker { - - - /** - * {@inheritDoc} - */ - public Token getTokenToMark(RSyntaxTextArea textArea) { - - // Get the token at the caret position. - int line = textArea.getCaretLineNumber(); - Token tokenList = textArea.getTokenListForLine(line); - Caret c = textArea.getCaret(); - int dot = c.getDot(); - - Token t = RSyntaxUtilities.getTokenAtOffset(tokenList, dot); - if (t==null /* EOL */ || !isValidType(textArea, t) || - RSyntaxUtilities.isNonWordChar(t)) { - // Try to the "left" of the caret. - dot--; - try { - if (dot>=textArea.getLineStartOffset(line)) { - t = RSyntaxUtilities.getTokenAtOffset(tokenList, dot); - } - } catch (BadLocationException ble) { - ble.printStackTrace(); // Never happens - } - } - - return t; - - } - - - /** - * {@inheritDoc} - */ - public boolean isValidType(RSyntaxTextArea textArea, Token t) { - return textArea.getMarkOccurrencesOfTokenType(t.getType()); - } - - - /** - * {@inheritDoc} - */ - public void markOccurrences(RSyntaxDocument doc, Token t, - RSyntaxTextAreaHighlighter h, SmartHighlightPainter p) { - markOccurrencesOfToken(doc, t, h, p); - } - - - /** - * Highlights all instances of tokens identical to t in the - * specified document. - * - * @param doc The document. - * @param t The document whose relevant occurrences should be marked. - * @param h The highlighter to add the highlights to. - * @param p The painter for the highlights. - */ - public static final void markOccurrencesOfToken(RSyntaxDocument doc, - Token t, RSyntaxTextAreaHighlighter h, SmartHighlightPainter p) { - - char[] lexeme = t.getLexeme().toCharArray(); - int type = t.getType(); - int lineCount = doc.getDefaultRootElement().getElementCount(); - - for (int i=0; icreateToken is called. Instead, it internally keeps a stack of - * available already-created tokens. When more tokens are needed to properly - * display a line, more tokens are added to the available stack. This saves - * from needless repetitive memory allocation. However, it makes it IMPERATIVE - * that users call resetTokenList when creating a new token list so - * that the token maker can keep an accurate list of available tokens.

- * - * NOTE: This class should only be used by {@link TokenMaker}; nobody else - * needs it! - * - * @author Robert Futrell - * @version 0.1 - */ -class DefaultTokenFactory implements TokenFactory { - - private int size; - private int increment; - private TokenImpl[] tokenList; - private int currentFreeToken; - - protected static final int DEFAULT_START_SIZE = 30; - protected static final int DEFAULT_INCREMENT = 10; - - - /** - * Constructor. - */ - public DefaultTokenFactory() { - this(DEFAULT_START_SIZE, DEFAULT_INCREMENT); - } - - - /** - * Constructor. - * - * @param size The initial number of tokens in this factory. - * @param increment How many tokens to increment by when the stack gets - * empty. - */ - public DefaultTokenFactory(int size, int increment) { - - this.size = size; - this.increment = increment; - this.currentFreeToken = 0; - - // Give us some tokens to initially work with. - tokenList = new TokenImpl[size]; - for (int i=0; iTokenMaker every time a token list is generated for - * a new line so the tokens can be reused. - */ - public void resetAllTokens() { - currentFreeToken = 0; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip.properties deleted file mode 100644 index 4eec7a6..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=Line: {0} -MultipleMarkers=Multiple markers at this line: -OccurrenceOf=Occurrence of "{0}" diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ar.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ar.properties deleted file mode 100644 index 2939fad..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ar.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=Line: {0} -MultipleMarkers=\u0647\u0646\u0627\u0643 \u0639\u062f\u0629 \u062a\u062d\u062f\u064a\u062f\u0627\u062a \u0641\u064a \u0647\u0630\u0627 \u0627\u0644\u0633\u0637\u0631: -OccurrenceOf=\u0639\u062f\u062f \u0645\u0631\u0627\u062a \u062d\u062f\u0648\u062b"{0}" diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_de.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_de.properties deleted file mode 100644 index 9f6b0b1..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_de.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=Zeile: {0} -MultipleMarkers=Mehrfache Markierungen in dieser Zeile: -OccurrenceOf=Auftreten von "{0}" diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_es.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_es.properties deleted file mode 100644 index 09ac660..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_es.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=Linea: {0} -MultipleMarkers=M\u00faltiples marcadores en esta linea: -OccurrenceOf=Ocurrencia de "{0}" diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_fr.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_fr.properties deleted file mode 100644 index b038619..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_fr.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=Ligne: {0} -MultipleMarkers=Plusieurs rep\u00e8res sur cette ligne: -OccurrenceOf=Pr\u00e9sence de "{0}" diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_hu.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_hu.properties deleted file mode 100644 index a9d031e..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_hu.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=Sor: {0} -MultipleMarkers=T\u00f6bb jel\u00f6l\u0151 ebben a sorban: -OccurrenceOf=A(z) "{0}" el\u0151fordul\u00e1sa diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_in.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_in.properties deleted file mode 100644 index 4eec7a6..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_in.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=Line: {0} -MultipleMarkers=Multiple markers at this line: -OccurrenceOf=Occurrence of "{0}" diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_it.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_it.properties deleted file mode 100644 index 5ebc89c..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_it.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=Linea: {0} -MultipleMarkers=Multipli punti a questa linea: -OccurrenceOf=Occorrenze di "{0}" diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ja.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ja.properties deleted file mode 100644 index 6c98681..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ja.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=\u884c: {0} -MultipleMarkers=\u3053\u306e\u884c\u306e\u4e2d\u306b\u3044\u304f\u3064\u306e\u30de\u30fc\u30ab\u30fc\u306f\u3042\u308a\u307e\u3059: -OccurrenceOf=\u51fa\u73fe\u56de\u6570 "{0}" diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ko.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ko.properties deleted file mode 100644 index b8874fa..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ko.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=\ud589: {0} -MultipleMarkers=\uc774 \ud589\uc5d0 \ubcf5\uc218\uc758 \ub9c8\ucee4 \uc874\uc7ac: -OccurrenceOf="{0}" \ubc1c\uc0dd diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_nl.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_nl.properties deleted file mode 100644 index 4eec7a6..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_nl.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=Line: {0} -MultipleMarkers=Multiple markers at this line: -OccurrenceOf=Occurrence of "{0}" diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_pl.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_pl.properties deleted file mode 100644 index 549da57..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_pl.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=Linia: {0} -MultipleMarkers=Wiele znacznik w tej linii: -OccurrenceOf=Wyst\u0119powanie "{0}" diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_pt_BR.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_pt_BR.properties deleted file mode 100644 index 2c3b58b..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_pt_BR.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=Linha: {0} -MultipleMarkers=M\u00faltiplos marcadores nesta linha: -OccurrenceOf=Ocorr\u00eancia de: "{0}" diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ru.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ru.properties deleted file mode 100644 index c38042f..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_ru.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=\u0421\u0442\u0440\u043e\u043a\u0430: {0} -MultipleMarkers=\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u0432 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435: -OccurrenceOf=\u0412\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 "{0}" diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_tr.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_tr.properties deleted file mode 100644 index 44b69d0..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_tr.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=Sat\u0131r: {0} -MultipleMarkers=Bu sat\u0131rda birden fazla i\u015faret\u00e7i: -OccurrenceOf="{0}"\u0131n bulunmas\u0131 diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_zh_CN.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_zh_CN.properties deleted file mode 100644 index 50fe917..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_zh_CN.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=\u884c: {0} -MultipleMarkers=\u6b64\u884c\u6709\u591a\u6807\u8bb0 -OccurrenceOf=\u6709"{0}"\u51fa\u73b0 diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_zh_TW.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_zh_TW.properties deleted file mode 100644 index 4eec7a6..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ErrorStrip_zh_TW.properties +++ /dev/null @@ -1,3 +0,0 @@ -Line=Line: {0} -MultipleMarkers=Multiple markers at this line: -OccurrenceOf=Occurrence of "{0}" diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/FileFileLocation.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/FileFileLocation.java deleted file mode 100644 index d382a90..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/FileFileLocation.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * 11/13/2008 - * - * FileFileLocation.java - The location of a local file. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.io.IOException; -import java.io.OutputStream; - - -/** - * The location of a local file. - * - * @author Robert Futrell - * @version 1.0 - */ -class FileFileLocation extends FileLocation { - - /** - * The file. This may or may not actually exist. - */ - private File file; - - - /** - * Constructor. - * - * @param file The local file. - */ - public FileFileLocation(File file) { - try { - // Useful on Windows and OS X. - this.file = file.getCanonicalFile(); - } catch (IOException ioe) { - this.file = file; - } - } - - - /** - * {@inheritDoc} - */ - @Override - protected long getActualLastModified() { - return file.lastModified(); - } - - - /** - * Returns the full path to the file. - * - * @return The full path to the file. - * @see #getFileName() - */ - @Override - public String getFileFullPath() { - return file.getAbsolutePath(); - } - - - /** - * {@inheritDoc} - */ - @Override - public String getFileName() { - return file.getName(); - } - - - /** - * {@inheritDoc} - */ - @Override - protected InputStream getInputStream() throws IOException { - return new FileInputStream(file); - } - - - /** - * {@inheritDoc} - */ - @Override - protected OutputStream getOutputStream() throws IOException { - return new FileOutputStream(file); - } - - - /** - * Always returns true. - * - * @return true always. - * @see #isLocalAndExists() - */ - @Override - public boolean isLocal() { - return true; - } - - - /** - * Since file locations of this type are guaranteed to be local, this - * method returns whether the file exists. - * - * @return Whether this local file actually exists. - * @see #isLocal() - */ - @Override - public boolean isLocalAndExists() { - return file.exists(); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/FoldingAwareIconRowHeader.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/FoldingAwareIconRowHeader.java deleted file mode 100644 index d3fbeb8..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/FoldingAwareIconRowHeader.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * 03/07/2012 - * - * FoldingAwareIconRowHeader - Icon row header that paints itself correctly - * even when code folding is enabled. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.awt.Color; -import java.awt.Graphics; -import java.awt.Point; -import javax.swing.Icon; -import javax.swing.text.BadLocationException; -import javax.swing.text.Document; -import javax.swing.text.Element; - -import org.fife.ui.rsyntaxtextarea.folding.FoldManager; -import org.fife.ui.rtextarea.GutterIconInfo; -import org.fife.ui.rtextarea.IconRowHeader; - - -/** - * A row header component that takes code folding into account when painting - * itself. - * - * @author Robert Futrell - * @version 1.0 - */ -public class FoldingAwareIconRowHeader extends IconRowHeader { - - - /** - * Constructor. - * - * @param textArea The parent text area. - */ - public FoldingAwareIconRowHeader(RSyntaxTextArea textArea) { - super(textArea); - } - - - /** - * {@inheritDoc} - */ - @Override - protected void paintComponent(Graphics g) { - - // When line wrap is not enabled, take the faster code path. - if (textArea==null) { - return; - } - RSyntaxTextArea rsta = (RSyntaxTextArea)textArea; - FoldManager fm = rsta.getFoldManager(); - if (!fm.isCodeFoldingSupportedAndEnabled()) { - super.paintComponent(g); - return; - } - - visibleRect = g.getClipBounds(visibleRect); - if (visibleRect==null) { // ??? - visibleRect = getVisibleRect(); - } - //System.out.println("IconRowHeader repainting: " + visibleRect); - if (visibleRect==null) { - return; - } - paintBackgroundImpl(g, visibleRect); - - if (textArea.getLineWrap()) { - paintComponentWrapped(g); - return; - } - - Document doc = textArea.getDocument(); - Element root = doc.getDefaultRootElement(); - textAreaInsets = textArea.getInsets(textAreaInsets); - if (visibleRect.y-1 && activeLineRangeEnd>-1) { - Color activeLineRangeColor = getActiveLineRangeColor(); - g.setColor(activeLineRangeColor); - try { - - int realY1 = rsta.yForLine(activeLineRangeStart); - if (realY1>-1) { // Not in a collapsed fold... - - int y1 = realY1;//Math.max(y, realY1); - - int y2 = rsta.yForLine(activeLineRangeEnd); - if (y2==-1) { // In a collapsed fold - y2 = y1; - } - y2 += cellHeight - 1; - - if (y2visibleRect.y+visibleRect.height) { - //System.out.println("... nothing to paint, bailing..."); - return; - } - y1 = Math.max(y, realY1); - y2 = Math.min(y2, visibleRect.y+visibleRect.height); - //System.out.println(y1 + "... " + y2 + "; " + realY1 + ", " + visibleRect); - - int j = y1; - while (j<=y2) { - int yEnd = Math.min(y2, j+getWidth()); - int xEnd = yEnd-j; - g.drawLine(0,j, xEnd,yEnd); - j += 2; - } - - int i = 2; - while (i=y && realY1=y && y2=0; i--) { // Last to first - GutterIconInfo ti = getTrackingIcon(i); - int offs = ti.getMarkedOffset(); - if (offs>=0 && offs<=doc.getLength()) { - int line = root.getElementIndex(offs); - if (line<=lastLine && line>=topLine) { - try { - Icon icon = ti.getIcon(); - if (icon!=null) { - int lineY = rsta.yForLine(line); - if (lineY>=y && lineY<=visibleRect.y+visibleRect.height) { - int y2 = lineY + (cellHeight-icon.getIconHeight())/2; - icon.paintIcon(this, g, 0, y2); - lastLine = line-1; // Paint only 1 icon per line - } - } - } catch (BadLocationException ble) { - ble.printStackTrace(); // Never happens - } - } - else if (line=0; i--) { // Last to first - GutterIconInfo ti = getTrackingIcon(i); - Icon icon = ti.getIcon(); - if (icon!=null) { - int iconH = icon.getIconHeight(); - int offs = ti.getMarkedOffset(); - if (offs>=0 && offs<=doc.getLength()) { - int line = root.getElementIndex(offs); - if (line<=lastLine && line>=topLine) { - try { - int lineY = rsta.yForLine(line); - if (lineY<=bottomY && (lineY+iconH>=topY)) { - int y2 = lineY + (cellHeight-iconH)/2; - ti.getIcon().paintIcon(this, g, 0, y2); - lastLine = line-1; // Paint only 1 icon per line - } - } catch (BadLocationException ble) { - ble.printStackTrace(); // Never happens - } - } - else if (line' }; - - private static final Set TAGS_REQUIRING_CLOSING = - getRequiredClosingTags(); - - public static final Set getRequiredClosingTags() { - final String[] tags = { - "html", - "head", - "title", - "style", - "script", - "noscript", - "body", - "section", - "nav", - "article", - "aside", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "header", - "footer", - "address", - "pre", - "dialog", - "blockquote", - "ol", - "ul", - "dl", - "a", - "q", - "cite", - "em", - "strong", - "small", - "mark", - "dfn", - "abbr", - "time", - "progress", - "meter", - "code", - "var", - "samp", - "kbd", - "sub", - "sup", - "span", - "i", - "b", - "bdo", - "ruby", - "rt", - "rp", - "ins", - "del", - "figure", - "iframe", - "object", - "video", - "audio", - "canvas", - "map", - "table", - "caption", - "form", - "fieldset", - "label", - "button", - "select", - "datalist", - "textarea", - "output", - "details", - "bb", - "menu", - "legend", - "div", - // Obsolete elements - "acronym", - "applet", - "big", - "blink", - "center", - "dir", - "font", - "frame", - "frameset", - "isindex", - "listing", - "marquee", - "nobr", - "noembed", - "noframes", - "plaintext", - "s", - "spacer", - "strike", - "tt", - "u", - "xmp", - }; - return new HashSet(Arrays.asList(tags)); - } - - - /** - * If the caret is inside of a tag, this method returns the token - * representing the tag name; otherwise, null is returned.

- * - * Currently, this method only checks for tag names on the same line as - * the caret, for simplicity. In the future it could check prior lines - * until the tag name is found. - * - * @param textArea The text area. - * @param occurrenceMarker The occurrence marker. - * @return The token to mark occurrences of. Note that, if the - * specified occurrence marker identifies tokens other than - * tag names, these other element types may be returned. - */ - public static final Token getTagNameTokenForCaretOffset( - RSyntaxTextArea textArea, OccurrenceMarker occurrenceMarker) { - - // Get the tag name token. - // For now, we only check for tags on the current line, for simplicity. - - int dot = textArea.getCaretPosition(); - Token t = textArea.getTokenListForLine(textArea.getCaretLineNumber()); - Token toMark = null; - - while (t!=null && t.isPaintable()) { - if (t.getType()==Token.MARKUP_TAG_NAME) { - toMark = t; - } - // Check for the token containing the caret before checking - // if it's the close token. - if (t.getEndOffset()==dot || t.containsPosition(dot)) { - // Some languages, like PHP, mark functions/variables (PHP, - // JavaScirpt) as well as HTML tags. - if (occurrenceMarker.isValidType(textArea, t) && - t.getType()!=Token.MARKUP_TAG_NAME) { - return t; - } - if (t.containsPosition(dot)) { - break; - } - } - if (t.getType()==Token.MARKUP_TAG_DELIMITER) { - if (t.isSingleChar('>') || t.is(TAG_SELF_CLOSE)) { - toMark = null; - } - } - t = t.getNextToken(); - } - - return toMark; - - } - - - /** - * {@inheritDoc} - */ - public Token getTokenToMark(RSyntaxTextArea textArea) { - return getTagNameTokenForCaretOffset(textArea, this); - } - - - /** - * {@inheritDoc} - */ - public boolean isValidType(RSyntaxTextArea textArea, Token t) { - return textArea.getMarkOccurrencesOfTokenType(t.getType()); - } - - - /** - * {@inheritDoc} - */ - public void markOccurrences(RSyntaxDocument doc, Token t, - RSyntaxTextAreaHighlighter h, SmartHighlightPainter p) { - - if (t.getType()!=Token.MARKUP_TAG_NAME) { - DefaultOccurrenceMarker.markOccurrencesOfToken(doc, t, h, p); - return; - } - - String lexemeStr = t.getLexeme(); - char[] lexeme = lexemeStr.toCharArray(); - lexemeStr = lexemeStr.toLowerCase(); - int tokenOffs = t.getOffset(); - Element root = doc.getDefaultRootElement(); - int lineCount = root.getElementCount(); - int curLine = root.getElementIndex(t.getOffset()); - int depth = 0; - - // For now, we only check for tags on the current line, for - // simplicity. Tags spanning multiple lines aren't common anyway. - boolean found = false; - boolean forward = true; - t = doc.getTokenListForLine(curLine); - while (t!=null && t.isPaintable()) { - if (t.getType()==Token.MARKUP_TAG_DELIMITER) { - if (t.isSingleChar('<') && t.getOffset()+1==tokenOffs) { - // Don't try to match a tag that is optionally closed (or - // closing is forbidden entirely). - if (TAGS_REQUIRING_CLOSING.contains(lexemeStr)) { - found = true; - } - break; - } - else if (t.is(CLOSE_TAG_START) && t.getOffset()+2==tokenOffs) { - // Searching backward, we assume we can find the opening - // tag. Don't really care if it's valid or not. - found = true; - forward = false; - break; - } - } - t = t.getNextToken(); - } - - if (!found) { - return; - } - - if (forward) { - - t = t.getNextToken().getNextToken(); - - do { - - while (t!=null && t.isPaintable()) { - if (t.getType()==Token.MARKUP_TAG_DELIMITER) { - if (t.is(CLOSE_TAG_START)) { - Token match = t.getNextToken(); - if (match!=null && match.is(lexeme)) { - if (depth>0) { - depth--; - } - else { - try { - int end = match.getOffset() + match.length(); - h.addMarkedOccurrenceHighlight(match.getOffset(), end, p); - end = tokenOffs + match.length(); - h.addMarkedOccurrenceHighlight(tokenOffs, end, p); - } catch (BadLocationException ble) { - ble.printStackTrace(); // Never happens - } - return; // We're done! - } - } - } - else if (t.isSingleChar('<')) { - t = t.getNextToken(); - if (t!=null && t.is(lexeme)) { - depth++; - } - } - } - t = t==null ? null : t.getNextToken(); - } - - if (++curLine openCloses = new ArrayList(); - boolean inPossibleMatch = false; - t = doc.getTokenListForLine(curLine); - final int endBefore = tokenOffs - 2; // Stop before "')) { - inPossibleMatch = false; - } - else if (inPossibleMatch && t.is(TAG_SELF_CLOSE)) { - openCloses.remove(openCloses.size()-1); - inPossibleMatch = false; - } - else if (t.is(CLOSE_TAG_START)) { - Token next = t.getNextToken(); - if (next!=null) { - // Invalid XML might not have a match - if (next.is(lexeme)) { - openCloses.add(new Entry(false, next)); - } - t = next; - } - } - } - t = t.getNextToken(); - } - - for (int i=openCloses.size()-1; i>=0; i--) { - Entry entry = openCloses.get(i); - depth += entry.open ? -1 : 1; - if (depth==-1) { - try { - Token match = entry.t; - int end = match.getOffset() + match.length(); - h.addMarkedOccurrenceHighlight(match.getOffset(), end, p); - end = tokenOffs + match.length(); - h.addMarkedOccurrenceHighlight(tokenOffs, end, p); - } catch (BadLocationException ble) { - ble.printStackTrace(); // Never happens - } - openCloses.clear(); - return; - } - } - - openCloses.clear(); - if (--curLine>=0) { - t = doc.getTokenListForLine(curLine); - } - - } while (curLine>=0); - - - } - - } - - - /** - * Used internally when searching backward for a matching "open" tag. - */ - private static class Entry { - - public boolean open; - public Token t; - - public Entry(boolean open, Token t) { - this.open = open; - this.t = t; - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/LinkGenerator.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/LinkGenerator.java deleted file mode 100644 index bae987a..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/LinkGenerator.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 02/16/2012 - * - * Copyright (C) 2013 Robert Futrell - * robert_futrell at users.sourceforge.net - * http://fifesoft.com/rsyntaxtextarea - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - - -/** - * Generates hyperlinks in a document. If one of these is installed on an - * RSyntaxTextArea it is queried when the mouse is moved and - * hyperlinks are enabled. If the user is not hovering over a "real" hyperlink - * (e.g. "http://www.google.com"), the link generator is asked if a text region - * at the mouse position should be considered a hyperlink. If so, a result - * object is returned, describing exactly what region of text is the link, and - * where it goes to.

- * - * This interface is typically used by applications providing advanced support - * for programming languages, such as IDEs. For example, an implementation of - * this class could identify the token under the mouse position as a "variable," - * and the hyperlink returned would select the variable's declaration in the - * document. - * - * @author Robert Futrell - * @version 1.0 - */ -public interface LinkGenerator { - - - /** - * If a region of text under the mouse position should be considered a - * hyperlink, a result object is returned. This object describes what - * region of text is the link, and what action to perform if the link is - * clicked. - * - * @param textArea The text component. - * @param offs The offset in the document under the mouse position. - * @return The link information, or null if no link is at the - * specified offset. - */ - public LinkGeneratorResult isLinkAtOffset(RSyntaxTextArea textArea, - int offs); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/LinkGeneratorResult.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/LinkGeneratorResult.java deleted file mode 100644 index c7b5e31..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/LinkGeneratorResult.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 02/16/2012 - * - * Copyright (C) 2013 Robert Futrell - * robert_futrell at users.sourceforge.net - * http://fifesoft.com/rsyntaxtextarea - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import javax.swing.event.HyperlinkEvent; - - -/** - * A result object from a {@link LinkGenerator}. Implementations of this class - * specify what action to execute when the user clicks on the "link" specified - * by the LinkGenerator. Typically, this will do something like - * select another region of text in the document (the declaration of the - * variable at the mouse position), or open another file in the parent - * application, etc. - * - * @author Robert Futrell - * @version 1.0 - * @see SelectRegionLinkGeneratorResult - */ -public interface LinkGeneratorResult { - - - /** - * Executes the action associated with this object. If the result is a - * URL to open, a standard hyperlink event can be returned. Alternatively, - * null can be returned and the action performed in this - * method itself. - * - * @return The hyperlink event to broadcast from the text area, or - * null if the action's behavior occurs in this method - * directly. - */ - public HyperlinkEvent execute(); - - - /** - * Returns the starting offset of the link specified by the parent - * LinkGenerator. - * - * @return The offset. - */ - public int getSourceOffset(); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/MarkOccurrencesSupport.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/MarkOccurrencesSupport.java deleted file mode 100644 index 32bb785..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/MarkOccurrencesSupport.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * 01/06/2009 - * - * MarkOccurrencesSupport.java - Handles marking all occurrences of the - * currently selected identifier in a text area. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.awt.Color; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import javax.swing.Timer; -import javax.swing.event.CaretEvent; -import javax.swing.event.CaretListener; -import javax.swing.text.Caret; - -import org.fife.ui.rtextarea.SmartHighlightPainter; - - -/** - * Marks all occurrences of the token at the current caret position, if it is - * an identifier. - * - * @author Robert Futrell - * @version 1.0 - * @see OccurrenceMarker - */ -class MarkOccurrencesSupport implements CaretListener, ActionListener { - - private RSyntaxTextArea textArea; - private Timer timer; - private SmartHighlightPainter p; - - /** - * The default color used to mark occurrences. - */ - public static final Color DEFAULT_COLOR = new Color(224, 224, 224); - - /** - * The default delay. - */ - private static final int DEFAULT_DELAY_MS = 1000; - - - /** - * Constructor. Creates a listener with a 1 second delay. - */ - public MarkOccurrencesSupport() { - this(DEFAULT_DELAY_MS); - } - - - /** - * Constructor. - * - * @param delay The delay between when the caret last moves and when the - * text should be scanned for matching occurrences. This should - * be in milliseconds. - */ - public MarkOccurrencesSupport(int delay) { - this(delay, DEFAULT_COLOR); - } - - - /** - * Constructor. - * - * @param delay The delay between when the caret last moves and when the - * text should be scanned for matching occurrences. This should - * be in milliseconds. - * @param color The color to use to mark the occurrences. This cannot be - * null. - */ - public MarkOccurrencesSupport(int delay, Color color) { - timer = new Timer(delay, this); - timer.setRepeats(false); - p = new SmartHighlightPainter(); - setColor(color); - } - - - /** - * Called after the caret has been moved and a fixed time delay has - * elapsed. This locates and highlights all occurrences of the identifier - * at the caret position, if any.

- * - * Callers should not call this method directly, but should rather prefer - * {@link #doMarkOccurrences()} to mark occurrences. - * - * @param e The event. - * @see #doMarkOccurrences() - */ - public void actionPerformed(ActionEvent e) { - - // Don't do anything if they are selecting text. - Caret c = textArea.getCaret(); - if (c.getDot()!=c.getMark()) { - return; - } - - RSyntaxDocument doc = (RSyntaxDocument)textArea.getDocument(); - OccurrenceMarker occurrenceMarker = doc.getOccurrenceMarker(); - boolean occurrencesChanged = false; - - if (occurrenceMarker!=null) { - - doc.readLock(); - try { - - Token t = occurrenceMarker.getTokenToMark(textArea); - - if (t!=null && occurrenceMarker.isValidType(textArea, t) && - !RSyntaxUtilities.isNonWordChar(t)) { - clear(); - RSyntaxTextAreaHighlighter h = (RSyntaxTextAreaHighlighter) - textArea.getHighlighter(); - occurrenceMarker.markOccurrences(doc, t, h, p); - //textArea.repaint(); - // TODO: Do a textArea.repaint() instead of repainting each - // marker as it's added if count is huge - occurrencesChanged = true; - } - - } finally { - doc.readUnlock(); - //time = System.currentTimeMillis() - time; - //System.out.println("MarkOccurrencesSupport took: " + time + " ms"); - } - - } - - if (occurrencesChanged) { - textArea.fireMarkedOccurrencesChanged(); - } - - } - - - /** - * Called when the caret moves in the text area. - * - * @param e The event. - */ - public void caretUpdate(CaretEvent e) { - timer.restart(); - } - - - /** - * Removes all highlights added to the text area by this listener. - */ - void clear() { - if (textArea!=null) { - RSyntaxTextAreaHighlighter h = (RSyntaxTextAreaHighlighter) - textArea.getHighlighter(); - h.clearMarkOccurrencesHighlights(); - } - } - - - /** - * Immediately marks all occurrences of the token at the current caret - * position. - */ - public void doMarkOccurrences() { - timer.stop(); - actionPerformed(null); - } - - - /** - * Returns the color being used to mark occurrences. - * - * @return The color being used. - * @see #setColor(Color) - */ - public Color getColor() { - return (Color)p.getPaint(); - } - - - /** - * Returns the delay, in milliseconds. - * - * @return The delay. - * @see #setDelay(int) - */ - public int getDelay() { - return timer.getDelay(); - } - - - /** - * Returns whether a border is painted around marked occurrences. - * - * @return Whether a border is painted. - * @see #setPaintBorder(boolean) - * @see #getColor() - */ - public boolean getPaintBorder() { - return p.getPaintBorder(); - } - - - /** - * Installs this listener on a text area. If it is already installed on - * another text area, it is uninstalled first. - * - * @param textArea The text area to install on. - */ - public void install(RSyntaxTextArea textArea) { - if (this.textArea!=null) { - uninstall(); - } - this.textArea = textArea; - textArea.addCaretListener(this); - if (textArea.getMarkOccurrencesColor()!=null) { - setColor(textArea.getMarkOccurrencesColor()); - } - } - - - /** - * Sets the color to use when marking occurrences. - * - * @param color The color to use. - * @see #getColor() - * @see #setPaintBorder(boolean) - */ - public void setColor(Color color) { - p.setPaint(color); - if (textArea!=null) { - clear(); - caretUpdate(null); // Force a highlight repaint. - } - } - - - /** - * Sets the delay between the last caret position change and when the - * text is scanned for matching identifiers. A delay is needed to prevent - * repeated scanning while the user is typing. - * - * @param delay The new delay. - * @see #getDelay() - */ - public void setDelay(int delay) { - timer.setDelay(delay); - } - - - /** - * Toggles whether a border is painted around marked highlights. - * - * @param paint Whether to paint a border. - * @see #getPaintBorder() - * @see #setColor(Color) - */ - public void setPaintBorder(boolean paint) { - if (paint!=p.getPaintBorder()) { - p.setPaintBorder(paint); - if (textArea!=null) { - textArea.repaint(); - } - } - } - - - /** - * Uninstalls this listener from the current text area. Does nothing if - * it not currently installed on any text area. - * - * @see #install(RSyntaxTextArea) - */ - public void uninstall() { - if (textArea!=null) { - clear(); - textArea.removeCaretListener(this); - } - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/OccurrenceMarker.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/OccurrenceMarker.java deleted file mode 100644 index d441dc9..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/OccurrenceMarker.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 03/09/2013 - * - * OccurrenceMarker - Marks occurrences of the current token. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import org.fife.ui.rtextarea.SmartHighlightPainter; - - -/** - * An OccurrenceMarker is called when the caret stops moving after - * a short period. If the current {@link TokenMaker} returns an instance of - * this class, it is told to mark all occurrences of the identifier at the - * caret position. - * - * @author Robert Futrell - * @version 1.0 - */ -public interface OccurrenceMarker { - - - /** - * Returns the token to mark occurrences, of, provided it matches the - * criteria put forth by {@link #isValidType(RSyntaxTextArea, Token)}. - * For most languages, this method should return the token at the caret - * position. - * - * @param textArea The text area. - * @return The token to (possibly) mark occurrences of, or - * null if none. - */ - public Token getTokenToMark(RSyntaxTextArea textArea); - - - /** - * Returns whether the specified token is a type that we can do a - * "mark occurrences" of. Typically, this will delegate to - * {@link RSyntaxTextArea#getMarkOccurrencesOfTokenType(int)}. - * - * @param textArea The text area. - * @param t The token. - * @return Whether we should mark all occurrences of this token. - */ - public boolean isValidType(RSyntaxTextArea textArea, Token t); - - - /** - * Called when occurrences of a token should be marked. - * - * @param doc The document. - * @param t The document whose relevant occurrences should be marked. - * @param h The highlighter to add the highlights to. - * @param p The painter for the highlights. - */ - public void markOccurrences(RSyntaxDocument doc, Token t, - RSyntaxTextAreaHighlighter h, SmartHighlightPainter p); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ParserManager.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ParserManager.java deleted file mode 100644 index 29a0b82..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/ParserManager.java +++ /dev/null @@ -1,819 +0,0 @@ -/* - * 09/26/2005 - * - * ParserManager.java - Manages the parsing of an RSyntaxTextArea's document, - * if necessary. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.awt.Color; -import java.awt.Point; -import java.awt.Rectangle; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.MouseEvent; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.net.URL; -import java.security.AccessControlException; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import javax.swing.Timer; -import javax.swing.ToolTipManager; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; -import javax.swing.event.HyperlinkEvent; -import javax.swing.event.HyperlinkListener; -import javax.swing.text.BadLocationException; -import javax.swing.text.Document; -import javax.swing.text.Element; -import javax.swing.text.Position; - -import org.fife.ui.rsyntaxtextarea.focusabletip.FocusableTip; -import org.fife.ui.rsyntaxtextarea.parser.ParseResult; -import org.fife.ui.rsyntaxtextarea.parser.Parser; -import org.fife.ui.rsyntaxtextarea.parser.ParserNotice; -import org.fife.ui.rsyntaxtextarea.parser.ToolTipInfo; -import org.fife.ui.rtextarea.RDocument; -import org.fife.ui.rtextarea.RTextAreaHighlighter.HighlightInfo; - - - -/** - * Manages running a parser object for an RSyntaxTextArea. - * - * @author Robert Futrell - * @version 0.9 - */ -class ParserManager implements DocumentListener, ActionListener, - HyperlinkListener, PropertyChangeListener { - - private RSyntaxTextArea textArea; - private List parsers; - private Timer timer; - private boolean running; - private Parser parserForTip; - private Position firstOffsetModded; - private Position lastOffsetModded; - - /** - * Mapping of notices to their highlights in the editor. Can't use a Map - * since parsers could return two ParserNotices that compare - * equally via equals(). Real-world example: The Perl - * compiler will return 2+ identical error messages if the same error is - * committed in a single line more than once. - */ - private List noticeHighlightPairs; - - /** - * Painter used to underline errors. - */ - private SquiggleUnderlineHighlightPainter parserErrorHighlightPainter = - new SquiggleUnderlineHighlightPainter(Color.RED); - - /** - * If this system property is set to true, debug messages - * will be printed to stdout to help diagnose parsing issues. - */ - private static final String PROPERTY_DEBUG_PARSING = "rsta.debugParsing"; - - /** - * Whether to print debug messages while running parsers. - */ - private static final boolean DEBUG_PARSING; - - /** - * The default delay between the last key press and when the document - * is parsed, in milliseconds. - */ - private static final int DEFAULT_DELAY_MS = 1250; - - - /** - * Constructor. - * - * @param textArea The text area whose document the parser will be - * parsing. - */ - public ParserManager(RSyntaxTextArea textArea) { - this(DEFAULT_DELAY_MS, textArea); - } - - - /** - * Constructor. - * - * @param delay The delay between the last key press and when the document - * is parsed. - * @param textArea The text area whose document the parser will be - * parsing. - */ - public ParserManager(int delay, RSyntaxTextArea textArea) { - this.textArea = textArea; - textArea.getDocument().addDocumentListener(this); - textArea.addPropertyChangeListener("document", this); - parsers = new ArrayList(1); // Usually small - timer = new Timer(delay, this); - timer.setRepeats(false); - running = true; - } - - - /** - * Called when the timer fires (e.g. it's time to parse the document). - * - * @param e The event. - */ - public void actionPerformed(ActionEvent e) { - - // Sanity check - should have >1 parser if event is fired. - int parserCount = getParserCount(); - if (parserCount==0) { - return; - } - - long begin = 0; - if (DEBUG_PARSING) { - begin = System.currentTimeMillis(); - } - - RSyntaxDocument doc = (RSyntaxDocument)textArea.getDocument(); - - Element root = doc.getDefaultRootElement(); - int firstLine = firstOffsetModded==null ? 0 : root.getElementIndex(firstOffsetModded.getOffset()); - int lastLine = lastOffsetModded==null ? root.getElementCount()-1 : root.getElementIndex(lastOffsetModded.getOffset()); - firstOffsetModded = lastOffsetModded = null; - if (DEBUG_PARSING) { - System.out.println("[DEBUG]: Minimum lines to parse: " + firstLine + "-" + lastLine); - } - - String style = textArea.getSyntaxEditingStyle(); - doc.readLock(); - try { - for (int i=0; inull, nothing - * happens. - * @see #getParser(int) - * @see #removeParser(Parser) - */ - public void addParser(Parser parser) { - if (parser!=null && !parsers.contains(parser)) { - if (running) { - timer.stop(); - } - parsers.add(parser); - if (parsers.size()==1) { - // Okay to call more than once. - ToolTipManager.sharedInstance().registerComponent(textArea); - } - if (running) { - timer.restart(); - } - } - } - - - /** - * Adds highlights for a list of parser notices. Any current notices - * from the same Parser, in the same parsed range, are removed. - * - * @param res The result of a parsing. - * @see #clearParserNoticeHighlights() - */ - private void addParserNoticeHighlights(ParseResult res) { - - // Parsers are supposed to return at least empty ParseResults, but - // we'll be defensive here. - if (res==null) { - return; - } - - if (DEBUG_PARSING) { - System.out.println("[DEBUG]: Adding parser notices from " + - res.getParser()); - } - - if (noticeHighlightPairs==null) { - noticeHighlightPairs = new ArrayList(); - } - - removeParserNotices(res); - - List notices = res.getNotices(); - if (notices.size()>0) { // Guaranteed non-null - - RSyntaxTextAreaHighlighter h = (RSyntaxTextAreaHighlighter) - textArea.getHighlighter(); - - for (ParserNotice notice : notices) { - if (DEBUG_PARSING) { - System.out.println("[DEBUG]: ... adding: " + notice); - } - try { - HighlightInfo highlight = null; - if (notice.getShowInEditor()) { - highlight = h.addParserHighlight(notice, - parserErrorHighlightPainter); - } - noticeHighlightPairs.add(new NoticeHighlightPair(notice, highlight)); - } catch (BadLocationException ble) { // Never happens - ble.printStackTrace(); - } - } - - } - - if (DEBUG_PARSING) { - System.out.println("[DEBUG]: Done adding parser notices from " + - res.getParser()); - } - - } - - - /** - * Called when the document is modified. - * - * @param e The document event. - */ - public void changedUpdate(DocumentEvent e) { - } - - - private void clearParserNoticeHighlights() { - RSyntaxTextAreaHighlighter h = (RSyntaxTextAreaHighlighter) - textArea.getHighlighter(); - if (h!=null) { - h.clearParserHighlights(); - } - if (noticeHighlightPairs!=null) { - noticeHighlightPairs.clear(); - } - } - - - /** - * Removes all parser notice highlights for a specific parser. - * - * @param parser The parser whose highlights to remove. - */ - private void clearParserNoticeHighlights(Parser parser) { - RSyntaxTextAreaHighlighter h = (RSyntaxTextAreaHighlighter) - textArea.getHighlighter(); - if (h!=null) { - h.clearParserHighlights(parser); - } - if (noticeHighlightPairs!=null) { - for (Iterator i=noticeHighlightPairs.iterator(); i.hasNext(); ) { - NoticeHighlightPair pair = i.next(); - if (pair.notice.getParser()==parser) { - i.remove(); - } - } - } - } - - - /** - * Removes all parsers and any highlights they have created. - * - * @see #addParser(Parser) - */ - public void clearParsers() { - timer.stop(); - clearParserNoticeHighlights(); - parsers.clear(); - textArea.fireParserNoticesChange(); - } - - - /** - * Forces the given {@link Parser} to re-parse the content of this text - * area.

- * - * This method can be useful when a Parser can be configured - * as to what notices it returns. For example, if a Java language parser - * can be configured to set whether no serialVersionUID is a warning, - * error, or ignored, this method can be called after changing the expected - * notice type to have the document re-parsed. - * - * @param parser The index of the Parser to re-run. - * @see #getParser(int) - */ - public void forceReparsing(int parser) { - Parser p = getParser(parser); - RSyntaxDocument doc = (RSyntaxDocument)textArea.getDocument(); - String style = textArea.getSyntaxEditingStyle(); - doc.readLock(); - try { - if (p.isEnabled()) { - ParseResult res = p.parse(doc, style); - addParserNoticeHighlights(res); - } - else { - clearParserNoticeHighlights(p); - } - textArea.fireParserNoticesChange(); - } finally { - doc.readUnlock(); - } - } - - - /** - * Returns the delay between the last "concurrent" edit and when the - * document is re-parsed. - * - * @return The delay, in milliseconds. - * @see #setDelay(int) - */ - public int getDelay() { - return timer.getDelay(); - } - - - /** - * Returns the specified parser. - * - * @param index The index of the parser. - * @return The parser. - * @see #getParserCount() - * @see #addParser(Parser) - * @see #removeParser(Parser) - */ - public Parser getParser(int index) { - return parsers.get(index); - } - - - /** - * Returns the number of registered parsers. - * - * @return The number of registered parsers. - */ - public int getParserCount() { - return parsers.size(); - } - - - /** - * Returns a list of the current parser notices for this text area. - * This method (like most Swing methods) should only be called on the - * EDT. - * - * @return The list of notices. This will be an empty list if there are - * none. - */ - public List getParserNotices() { - List notices = new ArrayList(); - if (noticeHighlightPairs!=null) { - for (NoticeHighlightPair pair : noticeHighlightPairs) { - notices.add(pair.notice); - } - } - return notices; - } - - - /** - * Returns the tool tip to display for a mouse event at the given - * location. This method is overridden to give a registered parser a - * chance to display a tool tip (such as an error description when the - * mouse is over an error highlight). - * - * @param e The mouse event. - * @return The tool tip to display, and possibly a hyperlink event handler. - */ - public ToolTipInfo getToolTipText(MouseEvent e) { - - String tip = null; - HyperlinkListener listener = null; - parserForTip = null; - Point p = e.getPoint(); - -// try { - int pos = textArea.viewToModel(p); - /* - Highlighter.Highlight[] highlights = textArea.getHighlighter(). - getHighlights(); - for (int i=0; i=pos) { - //return pnh.getMessage(); - return textArea.getText(start, end-start); - } - //} - } - */ - if (noticeHighlightPairs!=null) { - for (NoticeHighlightPair pair : noticeHighlightPairs) { - ParserNotice notice = pair.notice; - if (noticeContainsPosition(notice, pos) && - noticeContainsPointInView(notice, p)) { - tip = notice.getToolTipText(); - parserForTip = notice.getParser(); - if (parserForTip instanceof HyperlinkListener) { - listener = (HyperlinkListener)parserForTip; - } - break; - } - } - } -// } catch (BadLocationException ble) { -// ble.printStackTrace(); // Should never happen. -// } - - URL imageBase = parserForTip==null ? null : parserForTip.getImageBase(); - return new ToolTipInfo(tip, listener, imageBase); - - } - - - /** - * Called when the document is modified. - * - * @param e The document event. - */ - public void handleDocumentEvent(DocumentEvent e) { - if (running && parsers.size()>0) { - timer.restart(); - } - } - - - /** - * Called when the user clicks a hyperlink in a {@link FocusableTip}. - * - * @param e The event. - */ - public void hyperlinkUpdate(HyperlinkEvent e) { - if (parserForTip!=null && parserForTip.getHyperlinkListener()!=null) { - parserForTip.getHyperlinkListener().linkClicked(textArea, e); - } - } - - - /** - * Called when the document is modified. - * - * @param e The document event. - */ - public void insertUpdate(DocumentEvent e) { - - // Keep track of the first and last offset modified. Some parsers are - // smart and will only re-parse this section of the file. - try { - int offs = e.getOffset(); - if (firstOffsetModded==null || offslastOffsetModded.getOffset()) { - lastOffsetModded = e.getDocument().createPosition(offs); - } - } catch (BadLocationException ble) { - ble.printStackTrace(); // Shouldn't happen - } - - handleDocumentEvent(e); - - } - - - /** - * Returns whether a parser notice contains the specified offset. - * - * @param notice The notice. - * @param offs The offset. - * @return Whether the notice contains the offset. - */ - private final boolean noticeContainsPosition(ParserNotice notice, int offs){ - if (notice.getKnowsOffsetAndLength()) { - return notice.containsPosition(offs); - } - Document doc = textArea.getDocument(); - Element root = doc.getDefaultRootElement(); - int line = notice.getLine(); - if (line<0) { // Defensive against possible bad user-defined notices. - return false; - } - Element elem = root.getElement(line); - return offs>=elem.getStartOffset() && offsviewToModel() returns the closest model - * position, and the position doesn't necessarily contain the - * point passed in as an argument, this method checks whether the point is - * indeed contained in the view rectangle for the specified offset. - * - * @param notice The parser notice. - * @param p The point possibly contained in the view range of the - * parser notice. - * @return Whether the parser notice actually contains the specified point - * in the view. - */ - private final boolean noticeContainsPointInView(ParserNotice notice, - Point p) { - - try { - - int start, end; - if (notice.getKnowsOffsetAndLength()) { - start = notice.getOffset(); - end = start + notice.getLength() - 1; - } - else { - Document doc = textArea.getDocument(); - Element root = doc.getDefaultRootElement(); - int line = notice.getLine(); - // Defend against possible bad user-defined notices. - if (line<0) { - return false; - } - Element elem = root.getElement(line); - start = elem.getStartOffset(); - end = elem.getEndOffset() - 1; - } - - Rectangle r1 = textArea.modelToView(start); - Rectangle r2 = textArea.modelToView(end); - if (r1.y!=r2.y) { - // If the notice spans multiple lines, give them the benefit - // of the doubt. This is only "wrong" if the user is in empty - // space "to the right" of the error marker when it ends at the - // end of a line anyway. - return true; - } - - r1.y--; // Be a tiny bit lenient. - r1.height += 2; // Ditto - return p.x>=r1.x && p.x<(r2.x+r2.width) && - p.y>=r1.y && p.y<(r1.y+r1.height); - - } catch (BadLocationException ble) { // Never occurs - // Give them the benefit of the doubt, should 99% of the time be - // true anyway - return true; - } - - } - - - /** - * Called when a property we're interested in changes. - * - * @param e The property change event. - */ - public void propertyChange(PropertyChangeEvent e) { - - String name = e.getPropertyName(); - - if ("document".equals(name)) { - // The document switched out from under us - RDocument old = (RDocument)e.getOldValue(); - if (old != null) { - old.removeDocumentListener(this); - } - RDocument newDoc = (RDocument)e.getNewValue(); - if (newDoc != null) { - newDoc.addDocumentListener(this); - } - } - - } - - - /** - * Removes a parser. - * - * @param parser The parser to remove. - * @return Whether the parser was found. - * @see #addParser(Parser) - * @see #getParser(int) - */ - public boolean removeParser(Parser parser) { - removeParserNotices(parser); - boolean removed = parsers.remove(parser); - if (removed) { - textArea.fireParserNoticesChange(); - } - return removed; - } - - - /** - * Removes all parser notices (and clears highlights in the editor) from - * a particular parser. - * - * @param parser The parser. - */ - private void removeParserNotices(Parser parser) { - if (noticeHighlightPairs!=null) { - RSyntaxTextAreaHighlighter h = (RSyntaxTextAreaHighlighter) - textArea.getHighlighter(); - for (Iterator i=noticeHighlightPairs.iterator(); i.hasNext(); ) { - NoticeHighlightPair pair = i.next(); - if (pair.notice.getParser()==parser && pair.highlight!=null) { - h.removeParserHighlight(pair.highlight); - i.remove(); - } - } - } - } - - - /** - * Removes any currently stored notices (and the corresponding highlights - * from the editor) from the same Parser, and in the given line range, - * as in the results. - * - * @param res The results. - */ - private void removeParserNotices(ParseResult res) { - if (noticeHighlightPairs!=null) { - RSyntaxTextAreaHighlighter h = (RSyntaxTextAreaHighlighter) - textArea.getHighlighter(); - for (Iterator i=noticeHighlightPairs.iterator(); i.hasNext(); ) { - NoticeHighlightPair pair = i.next(); - boolean removed = false; - if (shouldRemoveNotice(pair.notice, res)) { - if (pair.highlight!=null) { - h.removeParserHighlight(pair.highlight); - } - i.remove(); - removed = true; - } - if (DEBUG_PARSING) { - String text = removed ? "[DEBUG]: ... notice removed: " : - "[DEBUG]: ... notice not removed: "; - System.out.println(text + pair.notice); - } - } - - } - - } - - - /** - * Called when the document is modified. - * - * @param e The document event. - */ - public void removeUpdate(DocumentEvent e) { - - // Keep track of the first and last offset modified. Some parsers are - // smart and will only re-parse this section of the file. Note that - // for removals, only the line at the removal start needs to be - // re-parsed. - try { - int offs = e.getOffset(); - if (firstOffsetModded==null || offslastOffsetModded.getOffset()) { - lastOffsetModded = e.getDocument().createPosition(offs); - } - } catch (BadLocationException ble) { // Never happens - ble.printStackTrace(); - } - - handleDocumentEvent(e); - - } - - - /** - * Restarts parsing the document. - * - * @see #stopParsing() - */ - public void restartParsing() { - timer.restart(); - running = true; - } - - - /** - * Sets the delay between the last "concurrent" edit and when the document - * is re-parsed. - * - * @param millis The new delay, in milliseconds. This must be greater - * than 0. - * @see #getDelay() - */ - public void setDelay(int millis) { - if (running) { - timer.stop(); - } - timer.setInitialDelay(millis); - timer.setDelay(millis); - if (running) { - timer.start(); - } - } - - - /** - * Returns whether a parser notice should be removed, based on a parse - * result. - * - * @param notice The notice in question. - * @param res The result. - * @return Whether the notice should be removed. - */ - private final boolean shouldRemoveNotice(ParserNotice notice, - ParseResult res) { - - if (DEBUG_PARSING) { - System.out.println("[DEBUG]: ... ... shouldRemoveNotice " + - notice + ": " + (notice.getParser()==res.getParser())); - } - - // NOTE: We must currently remove all notices for the parser. Parser - // implementors are required to parse the entire document each parsing - // request, as RSTA is not yet sophisticated enough to determine the - // minimum range of text to parse (and ParserNotices' locations aren't - // updated when the Document is mutated, which would be a requirement - // for this as well). - // return same_parser && (in_reparsed_range || in_deleted_end_of_doc) - return notice.getParser()==res.getParser(); - - } - - - /** - * Stops parsing the document. - * - * @see #restartParsing() - */ - public void stopParsing() { - timer.stop(); - running = false; - } - - - /** - * Mapping of a parser notice to its highlight in the editor. - */ - private static class NoticeHighlightPair { - - public ParserNotice notice; - public HighlightInfo highlight; - - public NoticeHighlightPair(ParserNotice notice, HighlightInfo highlight) { - this.notice = notice; - this.highlight = highlight; - } - - } - - - static { - boolean debugParsing = false; - try { - debugParsing = Boolean.getBoolean(PROPERTY_DEBUG_PARSING); - } catch (AccessControlException ace) { - // Likely an applet's security manager. - debugParsing = false; // FindBugs - } - DEBUG_PARSING = debugParsing; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/PopupWindowDecorator.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/PopupWindowDecorator.java deleted file mode 100644 index 740f780..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/PopupWindowDecorator.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 01/11/2011 - * - * PopupWindowDecorator.java - Hook allowing hosting applications to decorate - * JWindows created by the AutoComplete library. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import javax.swing.JWindow; - - -/** - * A hook allowing hosting applications to decorate JWindows created by the - * AutoComplete library. For example, you could use the - * JGoodies library to add drop shadows - * to the windows. - * - * @author Robert Futrell - * @version 1.0 - */ -public abstract class PopupWindowDecorator { - - /** - * The singleton instance of this class. - */ - private static PopupWindowDecorator decorator; - - - /** - * Callback called whenever an appropriate JWindow is created by the - * AutoComplete library. Implementations can decorate the window however - * they see fit. - * - * @param window The newly-created window. - */ - public abstract void decorate(JWindow window); - - - /** - * Returns the singleton instance of this class. This should only be - * called on the EDT. - * - * @return The singleton instance of this class, or null - * for none. - * @see #set(PopupWindowDecorator) - */ - public static PopupWindowDecorator get() { - return decorator; - } - - - /** - * Sets the singleton instance of this class. This should only be called - * on the EDT. - * - * @param decorator The new instance of this class. This may be - * null. - * @see #get() - */ - public static void set(PopupWindowDecorator decorator) { - PopupWindowDecorator.decorator = decorator; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSTAView.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSTAView.java deleted file mode 100644 index 86bff54..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSTAView.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 02/10/2009 - * - * RSTAView.java - An RSyntaxTextArea view. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.awt.Rectangle; - -import javax.swing.text.BadLocationException; - - -/** - * Utility methods for RSyntaxTextArea's views. - * - * @author Robert Futrell - * @version 1.0 - */ -interface RSTAView { - - - /** - * Returns the y-coordinate of the specified line.

- * - * This method is quicker than using traditional - * modelToView(int) calls, as the entire bounding box isn't - * computed. - * - * @param alloc The area the text area can render into. - * @param line The line number. - * @return The y-coordinate of the top of the line, or -1 if - * this text area doesn't yet have a positive size or the line is - * hidden (i.e. from folding). - * @throws BadLocationException If line isn't a valid line - * number for this document. - */ - public int yForLine(Rectangle alloc, int line) throws BadLocationException; - - - /** - * Returns the y-coordinate of the line containing a specified offset.

- * - * This method is quicker than using traditional - * modelToView(int) calls, as the entire bounding box isn't - * computed. - * - * @param alloc The area the text area can render into. - * @param offs The offset info the document. - * @return The y-coordinate of the top of the offset, or -1 if - * this text area doesn't yet have a positive size or the line is - * hidden (i.e. from folding). - * @throws BadLocationException If offs isn't a valid offset - * into the document. - */ - public int yForLineContaining(Rectangle alloc, int offs) - throws BadLocationException; - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea.properties deleted file mode 100644 index 26d2181..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=Folding - -Action.ToggleCurrentFold.Name=Toggle Current Fold -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=Toggles the fold at the caret position. -Action.CollapseAllFolds.Name=Collapse All Folds -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=Collapses all folds. -Action.CollapseCommentFolds.Name=Collapse All Comments -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=Collapses all comment folds. -Action.ExpandAllFolds.Name=Expand All Folds -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=Expands all folds. diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextAreaDefaultInputMap.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextAreaDefaultInputMap.java deleted file mode 100644 index a6c60d8..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextAreaDefaultInputMap.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 10/27/2004 - * - * RSyntaxTextAreaDefaultInputMap.java - The default input map for - * RSyntaxTextAreas. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.awt.event.InputEvent; -import java.awt.event.KeyEvent; -import javax.swing.KeyStroke; - -import org.fife.ui.rtextarea.RTADefaultInputMap; - - -/** - * The default input map for an RSyntaxTextArea. - * Currently, the new key bindings include: - *

    - *
  • Shift+Tab indents the current line or currently selected lines - * to the left. - *
- * - * @author Robert Futrell - * @version 1.0 - */ -public class RSyntaxTextAreaDefaultInputMap extends RTADefaultInputMap { - - /** - * Constructs the default input map for an RSyntaxTextArea. - */ - public RSyntaxTextAreaDefaultInputMap() { - - int defaultMod = getDefaultModifier(); - //int ctrl = InputEvent.CTRL_MASK; - int shift = InputEvent.SHIFT_MASK; - //int alt = InputEvent.ALT_MASK; - int defaultShift = defaultMod|shift; - - put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, shift), RSyntaxTextAreaEditorKit.rstaDecreaseIndentAction); - put(KeyStroke.getKeyStroke('}'), RSyntaxTextAreaEditorKit.rstaCloseCurlyBraceAction); - - put(KeyStroke.getKeyStroke('/'), RSyntaxTextAreaEditorKit.rstaCloseMarkupTagAction); - int os = RSyntaxUtilities.getOS(); - if (os==RSyntaxUtilities.OS_WINDOWS || os==RSyntaxUtilities.OS_MAC_OSX) { - // *nix causes trouble with CloseMarkupTagAction and ToggleCommentAction. - // It triggers both KEY_PRESSED ctrl+'/' and KEY_TYPED '/' events when the - // user presses ctrl+'/', but Windows and OS X do not. If we try to "move" - // the KEY_TYPED event for '/' to KEY_PRESSED, it'll work for Linux boxes - // with QWERTY keyboard layouts, but non-QUERTY users won't be able to type - // a '/' character at all then (!). Rather than try to hack together a - // solution by trying to detect the IM locale and do different things for - // different OSes & keyboard layouts, we do the simplest thing and - // (unfortunately) don't have a ToggleCommentAction for *nix out-of-the-box. - // Applications can add one easily enough if they want one. - put(KeyStroke.getKeyStroke(KeyEvent.VK_SLASH, defaultMod), RSyntaxTextAreaEditorKit.rstaToggleCommentAction); - } - - put(KeyStroke.getKeyStroke(KeyEvent.VK_OPEN_BRACKET, defaultMod), RSyntaxTextAreaEditorKit.rstaGoToMatchingBracketAction); - put(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, defaultMod), RSyntaxTextAreaEditorKit.rstaCollapseFoldAction); - put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, defaultMod), RSyntaxTextAreaEditorKit.rstaExpandFoldAction); - put(KeyStroke.getKeyStroke(KeyEvent.VK_DIVIDE, defaultMod), RSyntaxTextAreaEditorKit.rstaCollapseAllFoldsAction); - put(KeyStroke.getKeyStroke(KeyEvent.VK_MULTIPLY, defaultMod), RSyntaxTextAreaEditorKit.rstaExpandAllFoldsAction); - - // NOTE: no modifiers => mapped to keyTyped. If we had "0" as a second - // second parameter, we'd get the template action (keyPressed) AND the - // default space action (keyTyped). - //put(KeyStroke.getKeyStroke(' '), RSyntaxTextAreaEditorKit.rstaPossiblyInsertTemplateAction); - put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, defaultShift), RSyntaxTextAreaEditorKit.rstaPossiblyInsertTemplateAction); - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ar.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ar.properties deleted file mode 100644 index aefa81c..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ar.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=\u0637\u0648\u064a - -Action.ToggleCurrentFold.Name=\u063a\u064a\u0651\u0631 \u0648\u0636\u0639\u064a\u0629 \u0627\u0644\u0637\u0648\u064a\u0629 \u0627\u0644\u062d\u0627\u0644\u064a\u0629 -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=\u0645\u0646 \u0623\u062c\u0644 \u062a\u063a\u064a\u064a\u0631 \u0648\u0636\u0639\u064a\u0629 \u0627\u0644\u0637\u0648\u064a\u0629 \u0641\u064a \u0645\u0648\u0642\u0639 \u0627\u0644\u0645\u0624\u0634\u0631 \u0627\u0644\u062d\u0627\u0644\u064a -Action.CollapseAllFolds.Name=\u0642\u0644\u0635 \u062c\u0645\u064a\u0639 \u0627\u0644\u0637\u064a\u0627\u062a -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=\u0645\u0646 \u0623\u062c\u0644 \u062a\u0642\u0644\u064a\u0635 \u062c\u0645\u064a\u0639 \u0627\u0644\u0637\u064a\u0627\u062a -Action.CollapseCommentFolds.Name=\u0642\u0644\u0635 \u062c\u0645\u064a\u0639 \u0627\u0644\u062a\u0639\u0644\u064a\u0642\u0627\u062a -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=\u0645\u0646 \u0623\u062c\u0644 \u062a\u0642\u0644\u064a\u0635 \u062c\u0645\u064a\u0639 \u0637\u064a\u0627\u062a \u0627\u0644\u062a\u0639\u0644\u064a\u0642\u0627\u062a -Action.ExpandAllFolds.Name=\u0648\u0633\u0639 \u062c\u0645\u064a\u0639 \u0627\u0644\u0637\u064a\u0627\u062a -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=\u0645\u0646 \u0623\u062c\u0644 \u062a\u0648\u0633\u064a\u0639 \u062c\u0645\u064a\u0639 \u0627\u0644\u0637\u064a\u0627\u062a. diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_de.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_de.properties deleted file mode 100644 index 06b1fe7..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_de.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=Klappung - -Action.ToggleCurrentFold.Name=Aktuellen Block umschalten -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=Schaltet den Block an der Position der Schreibmarke um. -Action.CollapseAllFolds.Name=Action.CollapseAllFolds.Name=Alle Bl\u00f6cke zuklappen -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=Klappt alle Bl\u00f6cke zu. -Action.CollapseCommentFolds.Name=Alle Kommentarbl\u00f6cke zuklappen -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=Klappt alle Kommentarbl\u00f6cke zu. -Action.ExpandAllFolds.Name=Alle Bl\u00f6cke aufklappen -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=Klappt alle Bl\u00f6cke auf. diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_es.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_es.properties deleted file mode 100644 index 3fc3e58..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_es.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=Folding - -Action.ToggleCurrentFold.Name=Ver Fold (solapa) actual -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=Mostrar el fold en la posici\u00f3n del cursor -Action.CollapseAllFolds.Name=Ocultar todos los folds -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=Oculta todos los folds -Action.CollapseCommentFolds.Name=Ocultar todos los comentarios -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=Oculta todos los comentarios -Action.ExpandAllFolds.Name=Expandir todos las solapas (folds) -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=Expande todas las solapas (folds) diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_fr.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_fr.properties deleted file mode 100644 index cf0e154..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_fr.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=Pliage - -Action.ToggleCurrentFold.Name=Active ou d\u00e9sactive le pli actuel -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=Active ou d\u00e9sactive le pli \u00e0 la position du curseur. -Action.CollapseAllFolds.Name=Comprimer tous les plis -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=Comprime tous les plis. -Action.CollapseCommentFolds.Name=Comprimer tous les commentaires -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=Comprime tous les plis commentaires. -Action.ExpandAllFolds.Name=D\u00e9comrpimer tous les plis -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=D\u00e9comrpime tous les plis. diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_hu.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_hu.properties deleted file mode 100644 index 2d36e8f..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_hu.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=\u00d6sszevon\u00e1s - -Action.ToggleCurrentFold.Name=A jelenlegi \u00f6sszevon\u00e1s megjelen\u00edt\u00e9se/rejt\u00e9se. -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=Megjelen\u00edti, illetve elt\u00fcnteti az \u00f6sszevon\u00e1st a kurzor poz\u00edci\u00f3j\u00e1ban. -Action.CollapseAllFolds.Name=\u00d6sszevon\u00e1sok rejt\u00e9se. -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=\u00d6sszevon\u00e1sok rejt\u00e9se. -Action.CollapseCommentFolds.Name=Az \u00f6sszes megjegyz\u00e9s elrejt\u00e9se -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=Megjegyz\u00e9s \u00f6sszevon\u00e1sok rejt\u00e9se. -Action.ExpandAllFolds.Name=\u00d6sszevon\u00e1sok kiterjeszt\u00e9se -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=\u00d6sszevon\u00e1sok kiterjeszt\u00e9se. diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_in.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_in.properties deleted file mode 100644 index 26d2181..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_in.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=Folding - -Action.ToggleCurrentFold.Name=Toggle Current Fold -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=Toggles the fold at the caret position. -Action.CollapseAllFolds.Name=Collapse All Folds -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=Collapses all folds. -Action.CollapseCommentFolds.Name=Collapse All Comments -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=Collapses all comment folds. -Action.ExpandAllFolds.Name=Expand All Folds -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=Expands all folds. diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_it.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_it.properties deleted file mode 100644 index 1ac2556..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_it.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=Folding - -Action.ToggleCurrentFold.Name=Imposta il fold corrente -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=Imposta il fold alla posizione corrente. -Action.CollapseAllFolds.Name=Raggruppa tutti i fold -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=Raggruppa tutti i fold. -Action.CollapseCommentFolds.Name=Raggruppa tutti i commenti -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=Raggruppa tutti i commenti. -Action.ExpandAllFolds.Name=Espandi tutti i fold -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=Espandi tutti i fold. diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ja.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ja.properties deleted file mode 100644 index 3b6f19f..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ja.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=\u30d5\u30a9\u30eb\u30c7\u30a3\u30f3\u30b0 - -Action.ToggleCurrentFold.Name=\u30ad\u30e3\u30ec\u30c3\u30c8\u5074\u306e\u30d5\u30a9\u30eb\u30c9\u3092\u30c8\u30b0\u30eb\u3059\u308b\u3002 -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=\u30ad\u30e3\u30ec\u30c3\u30c8\u5074\u306e\u30d5\u30a9\u30eb\u30c9\u3092\u30c8\u30b0\u30eb\u3059\u308b\u3002 -Action.CollapseAllFolds.Name=\u5168\u3066\u306e\u30d5\u30a9\u30eb\u30c9\u3092\u6298\u308a\u305f\u305f\u3080 -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=\u5168\u3066\u306e\u3075\u3049\u308b\u3069\u3092\u6298\u308a\u305f\u305f\u3080 -Action.CollapseCommentFolds.Name=\u5168\u3066\u306e\u30b3\u30e1\u30f3\u30c8\u306e\u30d5\u30a9\u30eb\u30c9\u3092\u6298\u308a\u305f\u305f\u3080 -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=\u5168\u3066\u306e\u30b3\u30e1\u30f3\u30c8\u306e\u30d5\u30a9\u30eb\u30c9\u3092\u6298\u308a\u305f\u305f\u3080 -Action.ExpandAllFolds.Name=\u5168\u3066\u306e\u30d5\u30a9\u30eb\u30c9\u3092\u5c55\u958b\u3059\u308b -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=\u5168\u3066\u306e\u30d5\u30a9\u30eb\u30c9\u3092\u5c55\u958b\u3059\u308b diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ko.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ko.properties deleted file mode 100644 index 7b4412f..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ko.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=\ucf54\ub4dc \uac10\ucd94\uae30 - -Action.ToggleCurrentFold.Name=\ud604\uc7ac \ucf54\ub4dc \uac10\ucd94\uae30 \ud1a0\uae00 -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=\uce90\ub7ff \uc704\uce58\uc5d0\uc11c \ucf54\ub4dc \uac10\ucd94\uae30\ub97c \ud1a0\uae00\ud569\ub2c8\ub2e4. -Action.CollapseAllFolds.Name=\ubaa8\ub4e0 \ucf54\ub4dc \uac10\ucd94\uae30 \uc811\uae30 -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=\ubaa8\ub4e0 \ucf54\ub4dc \uac10\ucd94\uae30\ub97c \uc811\uc2b5\ub2c8\ub2e4. -Action.CollapseCommentFolds.Name=\ubaa8\ub4e0 \uc8fc\uc11d \uac10\ucd94\uae30 \uc811\uae30 -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=\ubaa8\ub4e0 \uc8fc\uc11d \uac10\ucd94\uae30\ub97c \uc811\uc2b5\ub2c8\ub2e4. -Action.ExpandAllFolds.Name=\ubaa8\ub4e0 \ucf54\ub4dc \uac10\ucd94\uae30 \ud3bc\uce58\uae30 -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=\ubaa8\ub4e0 \ucf54\ub4dc \uac10\ucd94\uae30\ub97c \ud3bc\uce69\ub2c8\ub2e4. diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_nl.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_nl.properties deleted file mode 100644 index 26d2181..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_nl.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=Folding - -Action.ToggleCurrentFold.Name=Toggle Current Fold -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=Toggles the fold at the caret position. -Action.CollapseAllFolds.Name=Collapse All Folds -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=Collapses all folds. -Action.CollapseCommentFolds.Name=Collapse All Comments -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=Collapses all comment folds. -Action.ExpandAllFolds.Name=Expand All Folds -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=Expands all folds. diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_pl.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_pl.properties deleted file mode 100644 index f437ef4..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_pl.properties +++ /dev/null @@ -1,15 +0,0 @@ -ContextMenu.Folding=Zwijanie - -Action.ToggleCurrentFold.Name=Reguluj zwini\u0119cie -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=Ustawia zwini\u0119cie na pozycji karetki. -Action.CollapseAllFolds.Name=Zwi\u0144 wszystkie zwini\u0119cia -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=Zwija wszystkie zwini\u0119cia. -Action.CollapseCommentFolds.Name=Zwi\u0144 wszystkie komentarze -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=Zwija wszystkie zwini\u0119cia z komentarzami. -Action.ExpandAllFolds.Name=Rozwi\u0144 zwini\u0119cia -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=Rozwija wszystkie zwini\u0119cia. - diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_pt_BR.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_pt_BR.properties deleted file mode 100644 index 94e099d..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_pt_BR.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=Dobramento de c\u00f3digo - -Action.ToggleCurrentFold.Name=Alternar o dobramento atual -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=Alterna o dobramento na posi\u00e7\u00e3o do cursor. -Action.CollapseAllFolds.Name=Recolher o dobramento de c\u00f3digo -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=Recolher o dobramento de c\u00f3digo. -Action.CollapseCommentFolds.Name=Recolher o dobramento de coment\u00e1rios -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=Recolher o dobramento de coment\u00e1rios. -Action.ExpandAllFolds.Name=Expandir o dobramento de c\u00f3digo -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=Expandir o dobramento de c\u00f3digo. diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ru.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ru.properties deleted file mode 100644 index 4095dea..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_ru.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=\u0421\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 - -Action.ToggleCurrentFold.Name=\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0431\u043b\u043e\u043a -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0431\u043b\u043e\u043a\u0430 \u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043a\u0443\u0440\u0441\u043e\u0440\u0430 -Action.CollapseAllFolds.Name=\u0421\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0435 \u0431\u043b\u043e\u043a\u0438 -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=\u0421\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 -Action.CollapseCommentFolds.Name=\u0421\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=\u0421\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0431\u043b\u043e\u043a\u0430 -Action.ExpandAllFolds.Name=\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0435 \u0431\u043b\u043e\u043a\u0438 -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_tr.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_tr.properties deleted file mode 100644 index b60e397..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_tr.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=Katlama - -Action.ToggleCurrentFold.Name=\u015eu Anki Kat\u0131 Geni\u015flet/Katla -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=\u0130\u015faret\u00e7inin bulundu\u011fu kat\u0131 geni\u015fletir/katlar. -Action.CollapseAllFolds.Name=T\u00fcm Katlar\u0131 Katla -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=T\u00fcm katlar\u0131 katlar. -Action.CollapseCommentFolds.Name=T\u00fcm Yorumlar\u0131 Katla -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=T\u00fcm yorumlar\u0131 katlar. -Action.ExpandAllFolds.Name=T\u00fcm Katlar\u0131 Geni\u015flet -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=T\u00fcm katlar\u0131 geni\u015fletir. diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_zh_CN.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_zh_CN.properties deleted file mode 100644 index 17d973c..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_zh_CN.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=\u6298\u53e0 - -Action.ToggleCurrentFold.Name=\u6298\u53e0/\u5f00\u542f\u672c\u533a\u6bb5 -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=\u6298\u53e0/\u5f00\u542f\u63d2\u5165\u7b26\u6240\u5728\u4f4d\u7f6e. -Action.CollapseAllFolds.Name=\u53d6\u6d88\u6240\u6709\u4ee3\u7801\u6298\u53e0 -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=\u53d6\u6d88\u6240\u6709\u4ee3\u7801\u6298\u53e0. -Action.CollapseCommentFolds.Name=\u53d6\u6d88\u6ce8\u91ca\u4ee3\u7801\u6298\u53e0 -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=\u53d6\u6d88\u6ce8\u91ca\u4ee3\u7801\u6298\u53e0. -Action.ExpandAllFolds.Name=\u6253\u5f00\u6240\u6709\u4ee3\u7801\u6298\u53e0 -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=\u6253\u5f00\u6240\u6709\u4ee3\u7801\u6298\u53e0. diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_zh_TW.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_zh_TW.properties deleted file mode 100644 index 26d2181..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea_zh_TW.properties +++ /dev/null @@ -1,14 +0,0 @@ -ContextMenu.Folding=Folding - -Action.ToggleCurrentFold.Name=Toggle Current Fold -Action.ToggleCurrentFold.Mnemonic=F -Action.ToggleCurrentFold.Desc=Toggles the fold at the caret position. -Action.CollapseAllFolds.Name=Collapse All Folds -Action.CollapseAllFolds.Mnemonic=O -Action.CollapseAllFolds.Desc=Collapses all folds. -Action.CollapseCommentFolds.Name=Collapse All Comments -Action.CollapseCommentFolds.Mnemonic=C -Action.CollapseCommentFolds.Desc=Collapses all comment folds. -Action.ExpandAllFolds.Name=Expand All Folds -Action.ExpandAllFolds.Mnemonic=E -Action.ExpandAllFolds.Desc=Expands all folds. diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RTfToText.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RTfToText.java deleted file mode 100644 index 1c7e589..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RTfToText.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * 07/28/2008 - * - * RtfToText.java - Returns the plain text version of RTF documents. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.io.*; - - -/** - * Gets the plain text version of RTF documents.

- * - * This is used by RtfTransferable to return the plain text - * version of the transferable when the receiver does not support RTF. - * - * @author Robert Futrell - * @version 1.0 - */ -class RtfToText { - - private Reader r; - private StringBuilder sb; - private StringBuilder controlWord; - private int blockCount; - private boolean inControlWord; - - - /** - * Private constructor. - * - * @param r The reader to read RTF text from. - */ - private RtfToText(Reader r) { - this.r = r; - sb = new StringBuilder(); - controlWord = new StringBuilder(); - blockCount = 0; - inControlWord = false; - } - - - /** - * Converts the RTF text read from this converter's Reader - * into plain text. It is the caller's responsibility to close the - * reader after this method is called. - * - * @return The plain text. - * @throws IOException If an IO error occurs. - */ - private String convert() throws IOException { - - // Skip over first curly brace as the whole file is in '{' and '}' - int i = r.read(); - if (i!='{') { - throw new IOException("Invalid RTF file"); - } - - while ((i=r.read())!=-1) { - - char ch = (char)i; - switch (ch) { - case '{': - if (inControlWord && controlWord.length()==0) { // "\{" - sb.append('{'); - controlWord.setLength(0); - inControlWord = false; - } - else { - blockCount++; - } - break; - case '}': - if (inControlWord && controlWord.length()==0) { // "\}" - sb.append('}'); - controlWord.setLength(0); - inControlWord = false; - } - else { - blockCount--; - } - break; - case '\\': - if (blockCount==0) { - if (inControlWord) { - if (controlWord.length()==0) { // "\\" - sb.append('\\'); - controlWord.setLength(0); - inControlWord = false; - } - else { - endControlWord(); - inControlWord = true; - } - } - else { - inControlWord = true; - } - } - break; - case ' ': - if (blockCount==0) { - if (inControlWord) { - endControlWord(); - } - else { - sb.append(' '); - } - } - break; - case '\r': - case '\n': - if (blockCount==0) { - if (inControlWord) { - endControlWord(); - } - // Otherwise, ignore - } - break; - default: - if (blockCount==0) { - if (inControlWord) { - controlWord.append(ch); - } - else { - sb.append(ch); - } - } - break; - } - - } - - return sb.toString(); - - } - - - /** - * Ends a control word. Checks whether it is a common one that affects - * the plain text output (such as "par" or "tab") - * and updates the text buffer accordingly. - */ - private void endControlWord() { - String word = controlWord.toString(); - if ("par".equals(word)) { - sb.append('\n'); - } - else if ("tab".equals(word)) { - sb.append('\t'); - } - controlWord.setLength(0); - inControlWord = false; - } - - - /** - * Converts the contents of the specified byte array representing - * an RTF document into plain text. - * - * @param rtf The byte array representing an RTF document. - * @return The contents of the RTF document, in plain text. - * @throws IOException If an IO error occurs. - */ - public static String getPlainText(byte[] rtf) throws IOException { - return getPlainText(new ByteArrayInputStream(rtf)); - } - - - /** - * Converts the contents of the specified RTF file to plain text. - * - * @param file The RTF file to convert. - * @return The contents of the file, in plain text. - * @throws IOException If an IO error occurs. - */ - public static String getPlainText(File file) throws IOException { - return getPlainText(new BufferedReader(new FileReader(file))); - } - - - /** - * Converts the contents of the specified input stream to plain text. - * The input stream will be closed when this method returns. - * - * @param in The input stream to convert. This will be closed when this - * method returns. - * @return The contents of the stream, in plain text. - * @throws IOException If an IO error occurs. - */ - public static String getPlainText(InputStream in) throws IOException { - return getPlainText(new InputStreamReader(in, "US-ASCII")); - } - - - /** - * Converts the contents of the specified Reader to plain text. - * - * @param r The Reader. This will be closed when this method - * returns. - * @return The contents of the Reader, in plain text. - * @throws IOException If an IO error occurs. - */ - private static String getPlainText(Reader r) throws IOException { - try { - RtfToText converter = new RtfToText(r); - return converter.convert(); - } finally { - r.close(); - } - } - - - /** - * Converts the contents of the specified String to plain text. - * - * @param rtf A string whose contents represent an RTF document. - * @return The contents of the String, in plain text. - * @throws IOException If an IO error occurs. - */ - public static String getPlainText(String rtf) throws IOException { - return getPlainText(new StringReader(rtf)); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RtfGenerator.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RtfGenerator.java deleted file mode 100644 index bcbd15c..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RtfGenerator.java +++ /dev/null @@ -1,479 +0,0 @@ -/* - * 07/28/2008 - * - * RtfGenerator.java - Generates RTF via a simple Java API. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.awt.Color; -import java.awt.Font; -import java.awt.Toolkit; -import java.util.ArrayList; -import java.util.List; - -import org.fife.ui.rtextarea.RTextArea; - - -/** - * Generates RTF text via a simple Java API.

- * - * The following RTF features are supported: - *

    - *
  • Fonts - *
  • Font sizes - *
  • Foreground and background colors - *
  • Bold, italic, and underline - *
- * - * The RTF generated isn't really "optimized," but it will do, especially for - * small amounts of text, such as what's common when copy-and-pasting. It - * tries to be sufficient for the use case of copying syntax highlighted - * code: - *
    - *
  • It assumes that tokens changing foreground color often is fairly - * common. - *
  • It assumes that background highlighting is fairly uncommon. - *
- * - * @author Robert Futrell - * @version 1.0 - */ -public class RtfGenerator { - - private List fontList; - private List colorList; - private StringBuilder document; - private boolean lastWasControlWord; - private int lastFontIndex; - private int lastFGIndex; - private boolean lastBold; - private boolean lastItalic; - private int lastFontSize; - - /** - * Java2D assumes a 72 dpi screen resolution, but on Windows the screen - * resolution is either 96 dpi or 120 dpi, depending on your font display - * settings. This is an attempt to make the RTF generated match the - * size of what's displayed in the RSyntaxTextArea. - */ - private int screenRes; - - /** - * The default font size for RTF. This is point size, in half - * points. - */ - private static final int DEFAULT_FONT_SIZE = 12;//24; - - - /** - * Constructor. - */ - public RtfGenerator() { - fontList = new ArrayList(1); // Usually only 1. - colorList = new ArrayList(1); // Usually only 1. - document = new StringBuilder(); - reset(); - } - - - /** - * Adds a newline to the RTF document. - * - * @see #appendToDoc(String, Font, Color, Color) - */ - public void appendNewline() { - document.append("\\par"); - document.append('\n'); // Just for ease of reading RTF. - lastWasControlWord = false; - } - - - /** - * Appends styled text to the RTF document being generated. - * - * @param text The text to append. - * @param f The font of the text. If this is null, the - * default font is used. - * @param fg The foreground of the text. If this is null, - * the default foreground color is used. - * @param bg The background color of the text. If this is - * null, the default background color is used. - * @see #appendNewline() - */ - public void appendToDoc(String text, Font f, Color fg, Color bg) { - appendToDoc(text, f, fg, bg, false); - } - - - /** - * Appends styled text to the RTF document being generated. - * - * @param text The text to append. - * @param f The font of the text. If this is null, the - * default font is used. - * @param bg The background color of the text. If this is - * null, the default background color is used. - * @param underline Whether the text should be underlined. - * @see #appendNewline() - */ - public void appendToDocNoFG(String text, Font f, Color bg, - boolean underline) { - appendToDoc(text, f, null, bg, underline, false); - } - - - /** - * Appends styled text to the RTF document being generated. - * - * @param text The text to append. - * @param f The font of the text. If this is null, the - * default font is used. - * @param fg The foreground of the text. If this is null, - * the default foreground color is used. - * @param bg The background color of the text. If this is - * null, the default background color is used. - * @param underline Whether the text should be underlined. - * @see #appendNewline() - */ - public void appendToDoc(String text, Font f, Color fg, Color bg, - boolean underline) { - appendToDoc(text, f, fg, bg, underline, true); - } - - - /** - * Appends styled text to the RTF document being generated. - * - * @param text The text to append. - * @param f The font of the text. If this is null, the - * default font is used. - * @param fg The foreground of the text. If this is null, - * the default foreground color is used. - * @param bg The background color of the text. If this is - * null, the default background color is used. - * @param underline Whether the text should be underlined. - * @param setFG Whether the foreground specified by fg should - * be honored (if it is non-null). - * @see #appendNewline() - */ - public void appendToDoc(String text, Font f, Color fg, Color bg, - boolean underline, boolean setFG) { - - if (text!=null) { - - // Set font to use, if different from last addition. - int fontIndex = f==null ? 0 : (getFontIndex(fontList, f)+1); - if (fontIndex!=lastFontIndex) { - document.append("\\f").append(fontIndex); - lastFontIndex = fontIndex; - lastWasControlWord = true; - } - - // Set styles to use. - if (f!=null) { - int fontSize = fixFontSize(f.getSize2D()*2); // Half points! - if (fontSize!=lastFontSize) { - document.append("\\fs").append(fontSize); - lastFontSize = fontSize; - lastWasControlWord = true; - } - if (f.isBold()!=lastBold) { - document.append(lastBold ? "\\b0" : "\\b"); - lastBold = !lastBold; - lastWasControlWord = true; - } - if (f.isItalic()!=lastItalic) { - document.append(lastItalic ? "\\i0" : "\\i"); - lastItalic = !lastItalic; - lastWasControlWord = true; - } - } - else { // No font specified - assume neither bold nor italic. - if (lastFontSize!=DEFAULT_FONT_SIZE) { - document.append("\\fs").append(DEFAULT_FONT_SIZE); - lastFontSize = DEFAULT_FONT_SIZE; - lastWasControlWord = true; - } - if (lastBold) { - document.append("\\b0"); - lastBold = false; - lastWasControlWord = true; - } - if (lastItalic) { - document.append("\\i0"); - lastItalic = false; - lastWasControlWord = true; - } - } - if (underline) { - document.append("\\ul"); - lastWasControlWord = true; - } - - // Set the foreground color. - if (setFG) { - int fgIndex = 0; - if (fg!=null) { // null => fg color index 0 - fgIndex = getColorIndex(colorList, fg)+1; - } - if (fgIndex!=lastFGIndex) { - document.append("\\cf").append(fgIndex); - lastFGIndex = fgIndex; - lastWasControlWord = true; - } - } - - // Set the background color. - if (bg!=null) { - int pos = getColorIndex(colorList, bg); - document.append("\\highlight").append(pos+1); - lastWasControlWord = true; - } - - if (lastWasControlWord) { - document.append(' '); // Delimiter - lastWasControlWord = false; - } - escapeAndAdd(document, text); - - // Reset everything that was set for this text fragment. - if (bg!=null) { - document.append("\\highlight0"); - lastWasControlWord = true; - } - if (underline) { - document.append("\\ul0"); - lastWasControlWord = true; - } - - } - - } - - - /** - * Appends some text to a buffer, with special care taken for special - * characters as defined by the RTF spec: - * - *
    - *
  • All tab characters are replaced with the string - * "\tab" - *
  • '\', '{' and '}' are changed to "\\", "\{" and "\}" - *
- * - * @param text The text to append (with tab chars substituted). - * @param sb The buffer to append to. - */ - private final void escapeAndAdd(StringBuilder sb, String text) { - int count = text.length(); - for (int i=0; i - * - * Java2D assumes 72 dpi. On systems with larger dpi (Windows, GTK, etc.), - * font rendering will appear too small if we simply return a Java "Font" - * object's getSize() value. We need to adjust it for the screen - * resolution. - * - * @param pointSize A Java Font's point size, as returned from - * getSize2D(). - * @return The font point size, adjusted for the current screen resolution. - * This will allow other applications to render fonts the same - * size as they appear in the Java application. - */ - private int fixFontSize(float pointSize) { - if (screenRes!=72) { // Java2D assumes 72 dpi - pointSize = Math.round(pointSize*72f/screenRes); - } - return (int)pointSize; - } - - - /** - * Returns the index of the specified item in a list. If the item - * is not in the list, it is added, and its new index is returned. - * - * @param list The list (possibly) containing the item. - * @param item The item to get the index of. - * @return The index of the item. - */ - private static int getColorIndex(List list, Color item) { - int pos = list.indexOf(item); - if (pos==-1) { - list.add(item); - pos = list.size()-1; - } - return pos; - } - - - private String getColorTableRtf() { - - // Example: - // "{\\colortbl ;\\red255\\green0\\blue0;\\red0\\green0\\blue255; }" - - StringBuilder sb = new StringBuilder(); - - sb.append("{\\colortbl ;"); - for (Color c : colorList) { - sb.append("\\red").append(c.getRed()); - sb.append("\\green").append(c.getGreen()); - sb.append("\\blue").append(c.getBlue()); - sb.append(';'); - } - sb.append("}"); - - return sb.toString(); - - } - - - /** - * Returns the index of the specified font in a list of fonts. This - * method only checks for a font by its family name; its attributes such - * as bold and italic are ignored.

- * - * If the font is not in the list, it is added, and its new index is - * returned. - * - * @param list The list (possibly) containing the font. - * @param font The font to get the index of. - * @return The index of the font. - */ - private static int getFontIndex(List list, Font font) { - String fontName = font.getFamily(); - for (int i=0; iString. - */ - public String getRtf() { - - StringBuilder sb = new StringBuilder(); - sb.append("{"); - - // Header - sb.append("\\rtf1\\ansi\\ansicpg1252"); - sb.append("\\deff0"); // First font in font table is the default - sb.append("\\deflang1033"); - sb.append("\\viewkind4"); // "Normal" view - sb.append("\\uc\\pard\\f0"); - sb.append("\\fs20"); // Font size in half-points (default 24) - sb.append(getFontTableRtf()).append('\n'); - sb.append(getColorTableRtf()).append('\n'); - - // Content - sb.append(document); - - sb.append("}"); - - //System.err.println("*** " + sb.length()); - return sb.toString(); - - } - - - /** - * Resets this generator. All document information and content is - * cleared. - */ - public void reset() { - fontList.clear(); - colorList.clear(); - document.setLength(0); - lastWasControlWord = false; - lastFontIndex = 0; - lastFGIndex = 0; - lastBold = false; - lastItalic = false; - lastFontSize = DEFAULT_FONT_SIZE; - screenRes = Toolkit.getDefaultToolkit().getScreenResolution(); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RtfTransferable.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RtfTransferable.java deleted file mode 100644 index 87ce40e..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/RtfTransferable.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * 07/28/2008 - * - * RtfTransferable.java - Used during drag-and-drop to represent RTF text. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.awt.datatransfer.*; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.StringReader; - - -/** - * Object used during copy/paste and DnD operations to represent RTF text. - * It can return the text being moved as either RTF or plain text. This - * class is basically the same as - * java.awt.datatransfer.StringSelection, except that it can also - * return the text as RTF. - * - * @author Robert Futrell - * @version 1.0 - */ -class RtfTransferable implements Transferable { - - /** - * The RTF data, in bytes (the RTF is 7-bit ascii). - */ - private byte[] data; - - - /** - * The "flavors" the text can be returned as. - */ - private final DataFlavor[] FLAVORS = { - new DataFlavor("text/rtf", "RTF"), - DataFlavor.stringFlavor, - DataFlavor.plainTextFlavor // deprecated - }; - - - /** - * Constructor. - * - * @param data The RTF data. - */ - public RtfTransferable(byte[] data) { - this.data = data; - } - - - public Object getTransferData(DataFlavor flavor) - throws UnsupportedFlavorException, IOException { - if (flavor.equals(FLAVORS[0])) { // RTF - return new ByteArrayInputStream(data==null ? new byte[0] : data); - } - else if (flavor.equals(FLAVORS[1])) { // stringFlavor - return data==null ? "" : RtfToText.getPlainText(data); - } - else if (flavor.equals(FLAVORS[2])) { // plainTextFlavor (deprecated) - String text = ""; // Valid if data==null - if (data!=null) { - text = RtfToText.getPlainText(data); - } - return new StringReader(text); - } - else { - throw new UnsupportedFlavorException(flavor); - } - } - - - public DataFlavor[] getTransferDataFlavors() { - return FLAVORS.clone(); - } - - - public boolean isDataFlavorSupported(DataFlavor flavor) { - for (int i=0; iRSyntaxTextArea has a corresponding Style; this - * Style tells us the following things: - * - *

    - *
  • What foreground color to use for tokens of this type.
  • - *
  • What background color to use.
  • - *
  • The font to use.
  • - *
  • Whether the token should be underlined.
  • - *
- * - * @author Robert Futrell - * @version 0.6 - */ -public class Style implements Cloneable { - - public static final Color DEFAULT_FOREGROUND = Color.BLACK; - public static final Color DEFAULT_BACKGROUND = null; - public static final Font DEFAULT_FONT = null; - - public Color foreground; - public Color background; - public boolean underline; - public Font font; - - FontMetrics fontMetrics; - - - /** - * Creates a new style defaulting to black foreground, no - * background, and no styling. - */ - public Style() { - this(DEFAULT_FOREGROUND); - } - - - /** - * Creates a new style with the specified foreground and no styling. - * - * @param fg The foreground color to use. - */ - public Style(Color fg) { - this(fg, DEFAULT_BACKGROUND); - } - - - /** - * Creates a new style with the specified colors and no styling. - * - * @param fg The foreground color to use. - * @param bg The background color to use. - */ - public Style(Color fg, Color bg) { - this(fg, bg, DEFAULT_FONT); - } - - - /** - * Creates a new style. - * - * @param fg The foreground color to use. - * @param bg The background color to use. - * @param font The font for this syntax scheme. - */ - public Style(Color fg, Color bg, Font font) { - this(fg, bg, font, false); - } - - - /** - * Creates a new style. - * - * @param fg The foreground color to use. - * @param bg The background color to use. - * @param font The font for this syntax scheme. - * @param underline Whether or not to underline tokens with this style. - */ - public Style(Color fg, Color bg, Font font, boolean underline) { - foreground = fg; - background = bg; - this.font = font; - this.underline = underline; - this.fontMetrics = font==null ? null : - new JPanel().getFontMetrics(font); // Default, no rendering hints! - } - - - /** - * Returns whether or not two (possibly null) objects are - * equal. - */ - private boolean areEqual(Object o1, Object o2) { - return (o1==null && o2==null) || (o1!=null && o1.equals(o2)); - } - - - /** - * Returns a deep copy of this object. - * - * @return The copy. - */ - @Override - public Object clone() { - Style clone = null; - try { - clone = (Style)super.clone(); - } catch (CloneNotSupportedException cnse) { // Never happens - cnse.printStackTrace(); - return null; - } - clone.foreground = foreground; - clone.background = background; - clone.font = font; - clone.underline = underline; - clone.fontMetrics = fontMetrics; - return clone; - } - - - /** - * Returns whether or not two syntax schemes are equal. - * - * @param o2 The object with which to compare this syntax scheme. - * @return Whether or not these two syntax schemes represent the same - * scheme. - */ - @Override - public boolean equals(Object o2) { - if (o2 instanceof Style) { - Style ss2 = (Style)o2; - if (this.underline==ss2.underline && - areEqual(foreground, ss2.foreground) && - areEqual(background, ss2.background) && - areEqual(font, ss2.font) && - areEqual(fontMetrics, ss2.fontMetrics)) - return true; - } - return false; - } - - - /** - * Computes the hash code to use when adding this syntax scheme to - * hash tables.

- * - * This method is implemented, since {@link #equals(Object)} is implemented, - * to keep FindBugs happy. - * - * @return The hash code. - */ - @Override - public int hashCode() { - int hashCode = underline ? 1 : 0; - if (foreground!=null) { - hashCode ^= foreground.hashCode(); - } - if (background!=null) { - hashCode ^= background.hashCode(); - } - return hashCode; - } - - - /** - * Returns a string representation of this style. - * - * @return A string representation of this style. - */ - @Override - public String toString() { - return "[Style: foreground: " + foreground + - ", background: " + background + ", underline: " + - underline + ", font: " + font + "]"; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TextEditorPane.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TextEditorPane.java deleted file mode 100644 index a833e44..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TextEditorPane.java +++ /dev/null @@ -1,717 +0,0 @@ -/* - * 11/25/2008 - * - * TextEditorPane.java - A syntax highlighting text area that has knowledge of - * the file it is editing on disk. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.OutputStream; -import java.nio.charset.Charset; -import java.nio.charset.UnsupportedCharsetException; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; -import javax.swing.text.Document; - -import org.fife.io.UnicodeReader; -import org.fife.io.UnicodeWriter; -import org.fife.ui.rtextarea.RTextAreaEditorKit; - - -/** - * An extension of {@link org.fife.ui.rsyntaxtextarea.RSyntaxTextArea} - * that adds information about the file being edited, such as: - * - *

    - *
  • Its name and location. - *
  • Is it dirty? - *
  • Is it read-only? - *
  • The last time it was loaded or saved to disk (local files only). - *
  • The file's encoding on disk. - *
  • Easy access to the line separator. - *
- * - * Loading and saving is also built into the editor.

- * - * When saving UTF-8 files, whether or not a BOM is written is controlled by - * the {@link UnicodeWriter} class. - * Use {@link UnicodeWriter#setWriteUtf8BOM(boolean)} to toggle writing BOMs - * for UTF-8 files.

- * - * Both local and remote files (e.g. ftp) are supported. See the - * {@link FileLocation} class for more information. - * - * @author Robert Futrell - * @version 1.0 - * @see FileLocation - */ -public class TextEditorPane extends RSyntaxTextArea implements - DocumentListener { - - private static final long serialVersionUID = 1L; - - public static final String FULL_PATH_PROPERTY = "TextEditorPane.fileFullPath"; - public static final String DIRTY_PROPERTY = "TextEditorPane.dirty"; - public static final String READ_ONLY_PROPERTY = "TextEditorPane.readOnly"; - - /** - * The location of the file being edited. - */ - private FileLocation loc; - - /** - * The charset to use when reading or writing this file. - */ - private String charSet; - - /** - * Whether the file should be treated as read-only. - */ - private boolean readOnly; - - /** - * Whether the file is dirty. - */ - private boolean dirty; - - /** - * The last time this file was modified on disk, for local files. - * For remote files, this value should always be - * {@link #LAST_MODIFIED_UNKNOWN}. - */ - private long lastSaveOrLoadTime; - - /** - * The value returned by {@link #getLastSaveOrLoadTime()} for remote files. - */ - public static final long LAST_MODIFIED_UNKNOWN = 0; - - /** - * The default name given to files if none is specified in a constructor. - */ - private static final String DEFAULT_FILE_NAME = "Untitled.txt"; - - - /** - * Constructor. The file will be given a default name. - */ - public TextEditorPane() { - this(INSERT_MODE); - } - - - /** - * Constructor. The file will be given a default name. - * - * @param textMode Either INSERT_MODE or - * OVERWRITE_MODE. - */ - public TextEditorPane(int textMode) { - this(textMode, false); - } - - - /** - * Creates a new TextEditorPane. The file will be given - * a default name. - * - * @param textMode Either INSERT_MODE or - * OVERWRITE_MODE. - * @param wordWrapEnabled Whether or not to use word wrap in this pane. - */ - public TextEditorPane(int textMode, boolean wordWrapEnabled) { - super(textMode); - setLineWrap(wordWrapEnabled); - try { - init(null, null); - } catch (IOException ioe) { // Never happens - ioe.printStackTrace(); - } - } - - - /** - * Creates a new TextEditorPane. - * - * @param textMode Either INSERT_MODE or - * OVERWRITE_MODE. - * @param wordWrapEnabled Whether or not to use word wrap in this pane. - * @param loc The location of the text file being edited. If this value - * is null, a file named "Untitled.txt" in the current - * directory is used. - * @throws IOException If an IO error occurs reading the file at - * loc. This of course won't happen if - * loc is null. - */ - public TextEditorPane(int textMode, boolean wordWrapEnabled, - FileLocation loc) throws IOException { - this(textMode, wordWrapEnabled, loc, null); - } - - - /** - * Creates a new TextEditorPane. - * - * @param textMode Either INSERT_MODE or - * OVERWRITE_MODE. - * @param wordWrapEnabled Whether or not to use word wrap in this pane. - * @param loc The location of the text file being edited. If this value - * is null, a file named "Untitled.txt" in the current - * directory is used. This file is displayed as empty even if it - * actually exists. - * @param defaultEnc The default encoding to use when opening the file, - * if the file is not Unicode. If this value is null, - * a system default value is used. - * @throws IOException If an IO error occurs reading the file at - * loc. This of course won't happen if - * loc is null. - */ - public TextEditorPane(int textMode, boolean wordWrapEnabled, - FileLocation loc, String defaultEnc) throws IOException { - super(textMode); - setLineWrap(wordWrapEnabled); - init(loc, defaultEnc); - } - - - /** - * Callback for when styles in the current document change. - * This method is never called. - * - * @param e The document event. - */ - public void changedUpdate(DocumentEvent e) { - } - - - - /** - * Returns the default encoding for this operating system. - * - * @return The default encoding. - */ - private static final String getDefaultEncoding() { - // NOTE: The "file.encoding" system property is not guaranteed to be - // set by the spec, so we cannot rely on it. - String encoding = Charset.defaultCharset().name(); - if (encoding==null) { - try { - File f = File.createTempFile("rsta", null); - FileWriter w = new FileWriter(f); - encoding = w.getEncoding(); - w.close(); - f.deleteOnExit();//delete(); Keep FindBugs happy - } catch (IOException ioe) { - encoding = "US-ASCII"; - } - } - return encoding; - } - - - /** - * Returns the encoding to use when reading or writing this file. - * - * @return The encoding. - * @see #setEncoding(String) - */ - public String getEncoding() { - return charSet; - } - - - /** - * Returns the full path to this document. - * - * @return The full path to the document. - */ - public String getFileFullPath() { - return loc==null ? null : loc.getFileFullPath(); - } - - - /** - * Returns the file name of this document. - * - * @return The file name. - */ - public String getFileName() { - return loc==null ? null : loc.getFileName(); - } - - - /** - * Returns the timestamp for when this file was last loaded or saved - * by this editor pane. If the file has been modified on disk by - * another process after it was loaded into this editor pane, this method - * will not return the actual file's last modified time.

- * - * For remote files, this method will always return - * {@link #LAST_MODIFIED_UNKNOWN}. - * - * @return The timestamp when this file was last loaded or saved by this - * editor pane, if it is a local file, or - * {@link #LAST_MODIFIED_UNKNOWN} if it is a remote file. - * @see #isModifiedOutsideEditor() - */ - public long getLastSaveOrLoadTime() { - return lastSaveOrLoadTime; - } - - - /** - * Returns the line separator used when writing this file (e.g. - * "\n", "\r\n", or "\r").

- * - * Note that this value is an Object and not a - * String as that is the way the {@link Document} interface - * defines its property values. If you always use - * {@link #setLineSeparator(String)} to modify this value, then the value - * returned from this method will always be a String. - * - * @return The line separator. If this value is null, then - * the system default line separator is used (usually the value - * of System.getProperty("line.separator")). - * @see #setLineSeparator(String) - * @see #setLineSeparator(String, boolean) - */ - public Object getLineSeparator() { - return getDocument().getProperty( - RTextAreaEditorKit.EndOfLineStringProperty); - } - - - /** - * Initializes this editor with the specified file location. - * - * @param loc The file location. If this is null, a default - * location is used and an empty file is displayed. - * @param defaultEnc The default encoding to use when opening the file, - * if the file is not Unicode. If this value is null, - * a system default value is used. - * @throws IOException If an IO error occurs reading from loc. - * If loc is null, this cannot happen. - */ - private void init(FileLocation loc, String defaultEnc) throws IOException { - - if (loc==null) { - // Don't call load() just in case Untitled.txt actually exists, - // just to ensure there is no chance of an IOException being thrown - // in the default case. - this.loc = FileLocation.create(DEFAULT_FILE_NAME); - charSet = defaultEnc==null ? getDefaultEncoding() : defaultEnc; - // Ensure that line separator always has a value, even if the file - // does not exist (or is the "default" file). This makes life - // easier for host applications that want to display this value. - setLineSeparator(System.getProperty("line.separator")); - } - else { - load(loc, defaultEnc); // Sets this.loc - } - - if (this.loc.isLocalAndExists()) { - File file = new File(this.loc.getFileFullPath()); - lastSaveOrLoadTime = file.lastModified(); - setReadOnly(!file.canWrite()); - } - else { - lastSaveOrLoadTime = LAST_MODIFIED_UNKNOWN; - setReadOnly(false); - } - - setDirty(false); - - } - - - /** - * Callback for when text is inserted into the document. - * - * @param e Information on the insertion. - */ - public void insertUpdate(DocumentEvent e) { - if (!dirty) { - setDirty(true); - } - } - - - /** - * Returns whether or not the text in this editor has unsaved changes. - * - * @return Whether or not the text has unsaved changes. - * @see #setDirty(boolean) - */ - public boolean isDirty() { - return dirty; - } - - - /** - * Returns whether this file is a local file. - * - * @return Whether this is a local file. - */ - public boolean isLocal() { - return loc.isLocal(); - } - - - /** - * Returns whether this is a local file that already exists. - * - * @return Whether this is a local file that already exists. - */ - public boolean isLocalAndExists() { - return loc.isLocalAndExists(); - } - - - /** - * Returns whether the text file has been modified outside of this editor - * since the last load or save operation. Note that if this is a remote - * file, this method will always return false.

- * - * This method may be used by applications to implement a reloading - * feature, where the user is prompted to reload a file if it has been - * modified since their last open or save. - * - * @return Whether the text file has been modified outside of this - * editor. - * @see #getLastSaveOrLoadTime() - */ - public boolean isModifiedOutsideEditor() { - return loc.getActualLastModified()>getLastSaveOrLoadTime(); - } - - - /** - * Returns whether or not the text area should be treated as read-only. - * - * @return Whether or not the text area should be treated as read-only. - * @see #setReadOnly(boolean) - */ - public boolean isReadOnly() { - return readOnly; - } - - - /** - * Loads the specified file in this editor. This method fires a property - * change event of type {@link #FULL_PATH_PROPERTY}. - * - * @param loc The location of the file to load. This cannot be - * null. - * @param defaultEnc The encoding to use when loading/saving the file. - * This encoding will only be used if the file is not Unicode. - * If this value is null, the system default encoding - * is used. - * @throws IOException If an IO error occurs. - * @see #save() - * @see #saveAs(FileLocation) - */ - public void load(FileLocation loc, String defaultEnc) throws IOException { - - // For new local files, just go with it. - if (loc.isLocal() && !loc.isLocalAndExists()) { - this.charSet = defaultEnc!=null ? defaultEnc : getDefaultEncoding(); - this.loc = loc; - setText(null); - discardAllEdits(); - setDirty(false); - return; - } - - // Old local files and remote files, load 'em up. UnicodeReader will - // check for BOMs and handle them correctly in all cases, then pass - // rest of stream down to InputStreamReader. - UnicodeReader ur = new UnicodeReader(loc.getInputStream(), defaultEnc); - - // Remove listener so dirty flag doesn't get set when loading a file. - Document doc = getDocument(); - doc.removeDocumentListener(this); - BufferedReader r = new BufferedReader(ur); - try { - read(r, null); - } finally { - doc.addDocumentListener(this); - r.close(); - } - - // No IOException thrown, so we can finally change the location. - charSet = ur.getEncoding(); - String old = getFileFullPath(); - this.loc = loc; - setDirty(false); - setCaretPosition(0); - firePropertyChange(FULL_PATH_PROPERTY, old, getFileFullPath()); - - } - - - /** - * Reloads this file from disk. The file must exist for this operation - * to not throw an exception.

- * - * The file's "dirty" state will be set to false after this - * operation. If this is a local file, its "last modified" time is - * updated to reflect that of the actual file.

- * - * Note that if the file has been modified on disk, and is now a Unicode - * encoding when before it wasn't (or if it is a different Unicode now), - * this will cause this {@link TextEditorPane}'s encoding to change. - * Otherwise, the file's encoding will stay the same. - * - * @throws IOException If the file does not exist, or if an IO error - * occurs reading the file. - * @see #isLocalAndExists() - */ - public void reload() throws IOException { - String oldEncoding = getEncoding(); - UnicodeReader ur = new UnicodeReader(loc.getInputStream(), oldEncoding); - String encoding = ur.getEncoding(); - BufferedReader r = new BufferedReader(ur); - try { - read(r, null); // Dumps old contents. - } finally { - r.close(); - } - setEncoding(encoding); - setDirty(false); - syncLastSaveOrLoadTimeToActualFile(); - discardAllEdits(); // Prevent user from being able to undo the reload - } - - - /** - * Called whenever text is removed from this editor. - * - * @param e The document event. - */ - public void removeUpdate(DocumentEvent e) { - if (!dirty) { - setDirty(true); - } - } - - - /** - * Saves the file in its current encoding.

- * - * The text area's "dirty" state is set to false, and if - * this is a local file, its "last modified" time is updated. - * - * @throws IOException If an IO error occurs. - * @see #saveAs(FileLocation) - * @see #load(FileLocation, String) - */ - public void save() throws IOException { - saveImpl(loc); - setDirty(false); - syncLastSaveOrLoadTimeToActualFile(); - } - - - /** - * Saves this file in a new local location. This method fires a property - * change event of type {@link #FULL_PATH_PROPERTY}. - * - * @param loc The location to save to. - * @throws IOException If an IO error occurs. - * @see #save() - * @see #load(FileLocation, String) - */ - public void saveAs(FileLocation loc) throws IOException { - saveImpl(loc); - // No exception thrown - we can "rename" the file. - String old = getFileFullPath(); - this.loc = loc; - setDirty(false); - lastSaveOrLoadTime = loc.getActualLastModified(); - firePropertyChange(FULL_PATH_PROPERTY, old, getFileFullPath()); - } - - - /** - * Saves the text in this editor to the specified location. - * - * @param loc The location to save to. - * @throws IOException If an IO error occurs. - */ - private void saveImpl(FileLocation loc) throws IOException { - OutputStream out = loc.getOutputStream(); - BufferedWriter w = new BufferedWriter( - new UnicodeWriter(out, getEncoding())); - try { - write(w); - } finally { - w.close(); - } - } - - - /** - * Sets whether or not this text in this editor has unsaved changes. - * This fires a property change event of type {@link #DIRTY_PROPERTY}.

- * - * Applications will usually have no need to call this method directly; the - * only time you might have a need to call this method directly is if you - * have to initialize an instance of TextEditorPane with content that does - * not come from a file. TextEditorPane automatically sets its - * own dirty flag when its content is edited, when its encoding is changed, - * or when its line ending property is changed. It is cleared whenever - * load(), reload(), save(), or - * saveAs() are called. - * - * @param dirty Whether or not the text has been modified. - * @see #isDirty() - */ - public void setDirty(boolean dirty) { - if (this.dirty!=dirty) { - this.dirty = dirty; - firePropertyChange(DIRTY_PROPERTY, !dirty, dirty); - } - } - - - /** - * Sets the document for this editor. - * - * @param doc The new document. - */ - @Override - public void setDocument(Document doc) { - Document old = getDocument(); - if (old!=null) { - old.removeDocumentListener(this); - } - super.setDocument(doc); - doc.addDocumentListener(this); - } - - - /** - * Sets the encoding to use when reading or writing this file. This - * method sets the editor's dirty flag when the encoding is changed. - * - * @param encoding The new encoding. - * @throws UnsupportedCharsetException If the encoding is not supported. - * @throws NullPointerException If encoding is - * null. - * @see #getEncoding() - */ - public void setEncoding(String encoding) { - if (encoding==null) { - throw new NullPointerException("encoding cannot be null"); - } - else if (!Charset.isSupported(encoding)) { - throw new UnsupportedCharsetException(encoding); - } - if (charSet==null || !charSet.equals(encoding)) { - charSet = encoding; - setDirty(true); - } - } - - - /** - * Sets the line separator sequence to use when this file is saved (e.g. - * "\n", "\r\n" or "\r"). - * - * Besides parameter checking, this method is preferred over - * getDocument().putProperty() because it sets the editor's - * dirty flag when the line separator is changed. - * - * @param separator The new line separator. - * @throws NullPointerException If separator is - * null. - * @throws IllegalArgumentException If separator is not one - * of "\n", "\r\n" or "\r". - * @see #getLineSeparator() - */ - public void setLineSeparator(String separator) { - setLineSeparator(separator, true); - } - - - /** - * Sets the line separator sequence to use when this file is saved (e.g. - * "\n", "\r\n" or "\r"). - * - * Besides parameter checking, this method is preferred over - * getDocument().putProperty() because can set the editor's - * dirty flag when the line separator is changed. - * - * @param separator The new line separator. - * @param setDirty Whether the dirty flag should be set if the line - * separator is changed. - * @throws NullPointerException If separator is - * null. - * @throws IllegalArgumentException If separator is not one - * of "\n", "\r\n" or "\r". - * @see #getLineSeparator() - */ - public void setLineSeparator(String separator, boolean setDirty) { - if (separator==null) { - throw new NullPointerException("terminator cannot be null"); - } - if (!"\r\n".equals(separator) && !"\n".equals(separator) && - !"\r".equals(separator)) { - throw new IllegalArgumentException("Invalid line terminator"); - } - Document doc = getDocument(); - Object old = doc.getProperty( - RTextAreaEditorKit.EndOfLineStringProperty); - if (!separator.equals(old)) { - doc.putProperty(RTextAreaEditorKit.EndOfLineStringProperty, - separator); - if (setDirty) { - setDirty(true); - } - } - } - - - /** - * Sets whether or not this text area should be treated as read-only. - * This fires a property change event of type {@link #READ_ONLY_PROPERTY}. - * - * @param readOnly Whether or not the document is read-only. - * @see #isReadOnly() - */ - public void setReadOnly(boolean readOnly) { - if (this.readOnly!=readOnly) { - this.readOnly = readOnly; - firePropertyChange(READ_ONLY_PROPERTY, !readOnly, readOnly); - } - } - - - /** - * Syncs this text area's "last saved or loaded" time to that of the file - * being edited, if that file is local and exists. If the file is - * remote or is local but does not yet exist, nothing happens.

- * - * You normally do not have to call this method, as the "last saved or - * loaded" time for {@link TextEditorPane}s is kept up-to-date internally - * during such operations as {@link #save()}, {@link #reload()}, etc. - * - * @see #getLastSaveOrLoadTime() - * @see #isModifiedOutsideEditor() - */ - public void syncLastSaveOrLoadTimeToActualFile() { - if (loc.isLocalAndExists()) { - lastSaveOrLoadTime = loc.getActualLastModified(); - } - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenFactory.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenFactory.java deleted file mode 100644 index 6bd4d30..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenFactory.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 10/28/2004 - * - * TokenFactory.java - Interface for a class that generates tokens of some type. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import javax.swing.text.Segment; - - -/** - * Interface for a class that generates tokens somehow. - * - * @author Robert Futrell - * @version 0.1 - */ -interface TokenFactory { - - - /** - * Returns a null token. - * - * @return A null token. - */ - public TokenImpl createToken(); - - - /** - * Returns a token. - * - * @param line The segment from which to get the token's text. - * @param beg The starting offset of the token's text in the segment. - * @param end The ending offset of the token's text in the segment. - * @param startOffset The offset in the document of the token. - * @param type The type of token. - * @return The token. - */ - public TokenImpl createToken(final Segment line, final int beg, - final int end, final int startOffset, final int type); - - - /** - * Returns a token. - * - * @param line The char array from which to get the token's text. - * @param beg The starting offset of the token's text in the char array. - * @param end The ending offset of the token's text in the char array. - * @param startOffset The offset in the document of the token. - * @param type The type of token. - * @return The token. - */ - public TokenImpl createToken(final char[] line, final int beg, - final int end, final int startOffset, final int type); - - - /** - * Resets the state of this token maker. This method should be called - * by the TokenMaker every time a token list is generated for - * a new line so the tokens can be reused. - */ - public void resetAllTokens(); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenImpl.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenImpl.java deleted file mode 100644 index ac31726..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenImpl.java +++ /dev/null @@ -1,872 +0,0 @@ -/* - * 02/21/2004 - * - * Token.java - A token used in syntax highlighting. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.awt.Color; -import java.awt.Font; -import java.awt.FontMetrics; -import java.awt.Rectangle; -import javax.swing.text.Segment; -import javax.swing.text.TabExpander; -import javax.swing.text.Utilities; - - -/** - * The default implementation of {@link Token}.

- * - * Note: The instances of Token returned by - * {@link RSyntaxDocument}s are pooled and should always be treated as - * immutable. They should not be cast to TokenImpl and modified. - * Modifying tokens you did not create yourself can and will result in - * rendering issues and/or runtime exceptions. You have been warned! - * - * @author Robert Futrell - * @version 0.3 - */ -public class TokenImpl implements Token { - - /** - * The text this token represents. This is implemented as a segment so we - * can point directly to the text in the document without having to make a - * copy of it. - */ - public char[] text; - public int textOffset; - public int textCount; - - /** - * The offset into the document at which this token resides. - */ - private int offset; - - /** - * The type of token this is; for example, {@link #FUNCTION}. - */ - private int type; - - /** - * Whether this token is a hyperlink. - */ - private boolean hyperlink; - - /** - * The next token in this linked list. - */ - private Token nextToken; - - /** - * The language this token is in, >= 0. - */ - private int languageIndex; - - - /** - * Creates a "null token." The token itself is not null; rather, it - * signifies that it is the last token in a linked list of tokens and - * that it is not part of a "multi-line token." - */ - public TokenImpl() { - this.text = null; - this.textOffset = -1; - this.textCount = -1; - this.setType(NULL); - setOffset(-1); - hyperlink = false; - nextToken = null; - } - - - /** - * Constructor. - * - * @param line The segment from which to get the token. - * @param beg The first character's position in line. - * @param end The last character's position in line. - * @param startOffset The offset into the document at which this - * token begins. - * @param type A token type listed as "generic" above. - * @param languageIndex The language index for this token. - */ - public TokenImpl(Segment line, int beg, int end, int startOffset, int type, - int languageIndex) { - this(line.array, beg,end, startOffset, type, languageIndex); - } - - - /** - * Constructor. - * - * @param line The segment from which to get the token. - * @param beg The first character's position in line. - * @param end The last character's position in line. - * @param startOffset The offset into the document at which this - * token begins. - * @param type A token type listed as "generic" above. - * @param languageIndex The language index for this token. - */ - public TokenImpl(char[] line, int beg, int end, int startOffset, int type, - int languageIndex) { - this(); - set(line, beg,end, startOffset, type); - setLanguageIndex(languageIndex); - } - - - /** - * Creates this token as a copy of the passed-in token. - * - * @param t2 The token from which to make a copy. - */ - public TokenImpl(Token t2) { - this(); - copyFrom(t2); - } - - - public StringBuilder appendHTMLRepresentation(StringBuilder sb, - RSyntaxTextArea textArea, - boolean fontFamily) { - return appendHTMLRepresentation(sb, textArea, fontFamily, false); - } - - - public StringBuilder appendHTMLRepresentation(StringBuilder sb, - RSyntaxTextArea textArea, boolean fontFamily, - boolean tabsToSpaces) { - - SyntaxScheme colorScheme = textArea.getSyntaxScheme(); - Style scheme = colorScheme.getStyle(getType()); - Font font = textArea.getFontForTokenType(getType());//scheme.font; - - if (font.isBold()) sb.append(""); - if (font.isItalic()) sb.append(""); - if (scheme.underline || isHyperlink()) sb.append(""); - - if (!isWhitespace()) { - sb.append(""); - } - - // NOTE: Don't use getLexeme().trim() because whitespace tokens will - // be turned into NOTHING. - appendHtmlLexeme(textArea, sb, tabsToSpaces); - - if (!isWhitespace()) { - sb.append(""); - } - if (scheme.underline || isHyperlink()) sb.append(""); - if (font.isItalic()) sb.append(""); - if (font.isBold()) sb.append(""); - - return sb; - - } - - - /** - * Appends an HTML version of the lexeme of this token (i.e. no style - * HTML, but replacing chars such as \t, < - * and > with their escapes). - * - * @param textArea The text area. - * @param sb The buffer to append to. - * @param tabsToSpaces Whether to convert tabs into spaces. - * @return The same buffer. - */ - private final StringBuilder appendHtmlLexeme(RSyntaxTextArea textArea, - StringBuilder sb, boolean tabsToSpaces) { - - boolean lastWasSpace = false; - int i = textOffset; - int lastI = i; - String tabStr = null; - - while (i': - sb.append(text, lastI, i-lastI); - lastI = i+1; - sb.append(">"); - lastWasSpace = false; - break; - default: - lastWasSpace = false; - break; - } - i++; - } - if (lastI=getOffset() && postextCount) { - return false; - } - final int start = textOffset + textCount - ch.length; - for (int i=0; iString of the form "#xxxxxx" good for use - * in HTML, representing the given color. - * - * @param color The color to get a string for. - * @return The HTML form of the color. If color is - * null, #000000 is returned. - */ - private static final String getHTMLFormatForColor(Color color) { - if (color==null) { - return "black"; - } - String hexRed = Integer.toHexString(color.getRed()); - if (hexRed.length()==1) - hexRed = "0" + hexRed; - String hexGreen = Integer.toHexString(color.getGreen()); - if (hexGreen.length()==1) - hexGreen = "0" + hexGreen; - String hexBlue = Integer.toHexString(color.getBlue()); - if (hexBlue.length()==1) - hexBlue = "0" + hexBlue; - return "#" + hexRed + hexGreen + hexBlue; - } - - - public String getHTMLRepresentation(RSyntaxTextArea textArea) { - StringBuilder buf = new StringBuilder(); - appendHTMLRepresentation(buf, textArea, true); - return buf.toString(); - } - - - public int getLanguageIndex() { - return languageIndex; - } - - - public Token getLastNonCommentNonWhitespaceToken() { - - Token last = null; - - for (Token t=this; t!=null && t.isPaintable(); t=t.getNextToken()) { - switch (t.getType()) { - case COMMENT_DOCUMENTATION: - case COMMENT_EOL: - case COMMENT_MULTILINE: - case COMMENT_KEYWORD: - case COMMENT_MARKUP: - case WHITESPACE: - break; - default: - last = t; - break; - } - } - - return last; - - } - - - public Token getLastPaintableToken() { - Token t = this; - while (t.isPaintable()) { - Token next = t.getNextToken(); - if (next==null || !next.isPaintable()) { - return t; - } - t = next; - } - return null; - } - - - public String getLexeme() { - return text==null ? null : new String(text, textOffset, textCount); - } - - - public int getListOffset(RSyntaxTextArea textArea, TabExpander e, - float x0, float x) { - - // If the coordinate in question is before this line's start, quit. - if (x0 >= x) - return getOffset(); - - float currX = x0; // x-coordinate of current char. - float nextX = x0; // x-coordinate of next char. - float stableX = x0; // Cached ending x-coord. of last tab or token. - TokenImpl token = this; - int last = getOffset(); - FontMetrics fm = null; - - while (token != null && token.isPaintable()) { - - fm = textArea.getFontMetricsForTokenType(token.getType()); - char[] text = token.text; - int start = token.textOffset; - int end = start + token.textCount; - - for (int i = start; i < end; i++) { - currX = nextX; - if (text[i] == '\t') { - nextX = e.nextTabStop(nextX, 0); - stableX = nextX; // Cache ending x-coord. of tab. - start = i + 1; // Do charsWidth() from next char. - } - else { - nextX = stableX + fm.charsWidth(text, start, i - start + 1); - } - if (x >= currX && x < nextX) { - if ((x - currX) < (nextX - x)) { - return last + i - token.textOffset; - } - return last + i + 1 - token.textOffset; - } - } - - stableX = nextX; // Cache ending x-coordinate of token. - last += token.textCount; - token = (TokenImpl)token.getNextToken(); - - } - - // If we didn't find anything, return the end position of the text. - return last; - - } - - - public Token getNextToken() { - return nextToken; - } - - - public int getOffset() { - return offset; - } - - - public int getOffsetBeforeX(RSyntaxTextArea textArea, TabExpander e, - float startX, float endBeforeX) { - - FontMetrics fm = textArea.getFontMetricsForTokenType(getType()); - int i = textOffset; - int stop = i + textCount; - float x = startX; - - while (iendBeforeX) { - // If not even the first character fits into the space, go - // ahead and say the first char does fit so we don't go into - // an infinite loop. - int intoToken = Math.max(i-textOffset, 1); - return getOffset() + intoToken; - } - i++; - } - - // If we got here, the whole token fit in (endBeforeX-startX) pixels. - return getOffset() + textCount - 1; - - } - - - public char[] getTextArray() { - return text; - } - - - public int getTextOffset() { - return textOffset; - } - - - public int getType() { - return type; - } - - - public float getWidth(RSyntaxTextArea textArea, TabExpander e, float x0) { - return getWidthUpTo(textCount, textArea, e, x0); - } - - - public float getWidthUpTo(int numChars, RSyntaxTextArea textArea, - TabExpander e, float x0) { - float width = x0; - FontMetrics fm = textArea.getFontMetricsForTokenType(getType()); - if (fm != null) { - int w; - int currentStart = textOffset; - int endBefore = textOffset + numChars; - for (int i = currentStart; i < endBefore; i++) { - if (text[i] == '\t') { - // Since TokenMaker implementations usually group all - // adjacent whitespace into a single token, there - // aren't usually any characters to compute a width - // for here, so we check before calling. - w = i - currentStart; - if (w > 0) - width += fm.charsWidth(text, currentStart, w); - currentStart = i + 1; - width = e.nextTabStop(width, 0); - } - } - // Most (non-whitespace) tokens will have characters at this - // point to get the widths for, so we don't check for w>0 (mini- - // optimization). - w = endBefore - currentStart; - width += fm.charsWidth(text, currentStart, w); - } - return width - x0; - } - - - @Override - public int hashCode() { - return offset + (getLexeme()==null ? 0 : getLexeme().hashCode()); - } - - - public boolean is(char[] lexeme) { - if (textCount==lexeme.length) { - for (int i=0; i=Token.COMMENT_EOL && getType()<=Token.COMMENT_MARKUP; - } - - - public boolean isCommentOrWhitespace() { - return isComment() || isWhitespace(); - } - - - public boolean isHyperlink() { - return hyperlink; - } - - - public boolean isIdentifier() { - return getType()==IDENTIFIER; - } - - - public boolean isLeftCurly() { - return getType()==SEPARATOR && isSingleChar('{'); - } - - - public boolean isRightCurly() { - return getType()==SEPARATOR && isSingleChar('}'); - } - - - public boolean isPaintable() { - return getType()>Token.NULL; - } - - - public boolean isSingleChar(char ch) { - return textCount==1 && text[textOffset]==ch; - } - - - public boolean isSingleChar(int type, char ch) { - return this.getType()==type && isSingleChar(ch); - } - - - public boolean isWhitespace() { - return getType()==WHITESPACE; - } - - - public int length() { - return textCount; - } - - - public Rectangle listOffsetToView(RSyntaxTextArea textArea, TabExpander e, - int pos, int x0, Rectangle rect) { - - int stableX = x0; // Cached ending x-coord. of last tab or token. - TokenImpl token = this; - FontMetrics fm = null; - Segment s = new Segment(); - - while (token != null && token.isPaintable()) { - - fm = textArea.getFontMetricsForTokenType(token.getType()); - if (fm == null) { - return rect; // Don't return null as things'll error. - } - char[] text = token.text; - int start = token.textOffset; - int end = start + token.textCount; - - // If this token contains the position for which to get the - // bounding box... - if (token.containsPosition(pos)) { - - s.array = token.text; - s.offset = token.textOffset; - s.count = pos - token.getOffset(); - - // Must use this (actually fm.charWidth()), and not - // fm.charsWidth() for returned value to match up with where - // text is actually painted on OS X! - int w = Utilities.getTabbedTextWidth(s, fm, stableX, e, - token.getOffset()); - rect.x = stableX + w; - end = token.documentToToken(pos); - - if (text[end] == '\t') { - rect.width = fm.charWidth(' '); - } - else { - rect.width = fm.charWidth(text[end]); - } - - return rect; - - } - - // If this token does not contain the position for which to get - // the bounding box... - else { - s.array = token.text; - s.offset = token.textOffset; - s.count = token.textCount; - stableX += Utilities.getTabbedTextWidth(s, fm, stableX, e, - token.getOffset()); - } - - token = (TokenImpl)token.getNextToken(); - - } - - // If we didn't find anything, we're at the end of the line. Return - // a width of 1 (so selection highlights don't extend way past line's - // text). A ConfigurableCaret will know to paint itself with a larger - // width. - rect.x = stableX; - rect.width = 1; - return rect; - - } - - - /** - * Makes this token start at the specified offset into the document.

- * - * Note: You should not modify Token instances you - * did not create yourself (e.g., came from an - * RSyntaxDocument). If you do, rendering issues and/or - * runtime exceptions will likely occur. You have been warned! - * - * @param pos The offset into the document this token should start at. - * Note that this token must already contain this position; if - * it doesn't, an exception is thrown. - * @throws IllegalArgumentException If pos is not already contained by - * this token. - * @see #moveOffset(int) - */ - public void makeStartAt(int pos) { - if (pos=(getOffset()+textCount)) { - throw new IllegalArgumentException("pos " + pos + - " is not in range " + getOffset() + "-" + (getOffset()+textCount-1)); - } - int shift = pos - getOffset(); - setOffset(pos); - textOffset += shift; - textCount -= shift; - } - - - /** - * Moves the starting offset of this token.

- * - * Note: You should not modify Token instances you - * did not create yourself (e.g., came from an - * RSyntaxDocument). If you do, rendering issues and/or - * runtime exceptions will likely occur. You have been warned! - * - * @param amt The amount to move the starting offset. This should be - * between 0 and textCount, inclusive. - * @throws IllegalArgumentException If amt is an invalid value. - * @see #makeStartAt(int) - */ - public void moveOffset(int amt) { - if (amt<0 || amt>textCount) { - throw new IllegalArgumentException("amt " + amt + - " is not in range 0-" + textCount); - } - setOffset(getOffset() + amt); - textOffset += amt; - textCount -= amt; - } - - - /** - * Sets the value of this token to a particular segment of a document. - * The "next token" value is cleared. - * - * @param line The segment from which to get the token. - * @param beg The first character's position in line. - * @param end The last character's position in line. - * @param offset The offset into the document at which this token begins. - * @param type A token type listed as "generic" above. - */ - public void set(final char[] line, final int beg, final int end, - final int offset, final int type) { - this.text = line; - this.textOffset = beg; - this.textCount = end - beg + 1; - this.setType(type); - this.setOffset(offset); - nextToken = null; - } - - - /** - * Sets whether this token is a hyperlink. - * - * @param hyperlink Whether this token is a hyperlink. - * @see #isHyperlink() - */ - public void setHyperlink(boolean hyperlink) { - this.hyperlink = hyperlink; - } - - - /** - * Sets the language index for this token. If this value is positive, it - * denotes a specific "secondary" language this token represents (such as - * JavaScript code or CSS embedded in an HTML file). If this value is - * 0, this token is in the "main" language being edited. - * Negative values are invalid and treated as 0. - * - * @param languageIndex The new language index. A value of - * 0 denotes the "main" language, any positive value - * denotes a specific secondary language. Negative values will - * be treated as 0. - * @see #getLanguageIndex() - */ - public void setLanguageIndex(int languageIndex) { - this.languageIndex = languageIndex; - } - - - /** - * Sets the "next token" pointer of this token to point to the specified - * token. - * - * @param nextToken The new next token. - * @see #getNextToken() - */ - public void setNextToken(Token nextToken) { - this.nextToken = nextToken; - } - - - /** - * Sets the offset into the document at which this token resides. - * - * @param offset The new offset into the document. - * @see #getOffset() - */ - public void setOffset(int offset) { - this.offset = offset; - } - - - /** - * {@inheritDoc} - */ - public void setType(int type) { - this.type = type; - } - - - /** - * {@inheritDoc} - */ - public boolean startsWith(char[] chars) { - if (chars.length<=textCount){ - for (int i=0; iString, which is useful for - * debugging. - * - * @return A string describing this token. - */ - @Override - public String toString() { - return "[Token: " + - (getType()==Token.NULL ? "" : - "text: '" + - (text==null ? "" : getLexeme() + "'; " + - "offset: " + getOffset() + "; type: " + getType() + "; " + - "isPaintable: " + isPaintable() + - "; nextToken==null: " + (nextToken==null))) + - "]"; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenIterator.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenIterator.java deleted file mode 100644 index a129708..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenIterator.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * 08/28/2013 - * - * TokenIterator.java - An iterator over the Tokens in an RSyntaxDocument. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.util.Iterator; - - -/** - * Allows you to iterate through all paintable tokens in an - * RSyntaxDocument. - * - * @author Robert Futrell - * @version 1.0 - */ -class TokenIterator implements Iterator { - - private RSyntaxDocument doc; - private int curLine; - private Token token; - - - /** - * Constructor. - * - * @param doc The document whose tokens we should iterate over. - */ - public TokenIterator(RSyntaxDocument doc) { - this.doc = doc; - loadTokenListForCurLine(); - int lineCount = getLineCount(); - while ((token==null || !token.isPaintable()) && curLineToken removal is not supported. - * - * @throws UnsupportedOperationException always. - */ - public void remove() { - throw new UnsupportedOperationException(); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMaker.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMaker.java deleted file mode 100644 index 0bdcc75..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMaker.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * 02/24/2004 - * - * TokenMaker.java - An object that can take a chunk of text and return a - * linked list of Tokens representing it. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import javax.swing.Action; -import javax.swing.text.Segment; - - -/** - * An implementation of TokenMaker is a class that turns text into - * a linked list of Tokens for syntax highlighting - * in a particular language. - * - * @see Token - * @see AbstractTokenMaker - * - * @author Robert Futrell - * @version 0.2 - */ -public interface TokenMaker { - - - /** - * Adds a null token to the end of the current linked list of tokens. - * This should be put at the end of the linked list whenever the last - * token on the current line is NOT a multi-line token. - */ - public void addNullToken(); - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param array The character array from which to get the text. - * @param start Start offset in segment of token. - * @param end End offset in segment of token. - * @param tokenType The token's type. - * @param startOffset The offset in the document at which this token - * occurs. - */ - public void addToken(char[] array, int start, int end, int tokenType, - int startOffset); - - - /** - * Returns the closest {@link TokenTypes "standard" token type} for a given - * "internal" token type (e.g. one whose value is < 0). - * - * @param type The token type. - * @return The closest "standard" token type. If a mapping is not defined - * for this language, then type is returned. - */ - public int getClosestStandardTokenTypeForInternalType(int type); - - - /** - * Returns whether this programming language uses curly braces - * ('{' and '}') to denote code blocks. - * - * @param languageIndex The language index at the offset in question. - * Since some TokenMakers effectively have nested - * languages (such as JavaScript in HTML), this parameter tells the - * TokenMaker what sub-language to look at. - * @return Whether curly braces denote code blocks. - */ - public boolean getCurlyBracesDenoteCodeBlocks(int languageIndex); - - - /** - * Returns the last token on this line's type if the token is "unfinished", - * or {@link Token#NULL} if it was finished. For example, if C-style - * syntax highlighting is being implemented, and text - * contained a line of code that contained the beginning of a comment but - * no end-comment marker ("*\/"), then this method would return - * {@link Token#COMMENT_MULTILINE} for that line. This is useful - * for doing syntax highlighting. - * - * @param text The line of tokens to examine. - * @param initialTokenType The token type to start with (i.e., the value - * of getLastTokenTypeOnLine for the line before - * text). - * @return The last token on this line's type, or {@link Token#NULL} - * if the line was completed. - */ - public int getLastTokenTypeOnLine(Segment text, int initialTokenType); - - - /** - * Returns the text to place at the beginning and end of a - * line to "comment" it in this programming language. - * - * @param languageIndex The language index at the offset in question. - * Since some TokenMakers effectively have nested - * languages (such as JavaScript in HTML), this parameter tells the - * TokenMaker what sub-language to look at. - * @return The start and end strings to add to a line to "comment" - * it out. A null value for either means there - * is no string to add for that part. A value of - * null for the array means this language - * does not support commenting/uncommenting lines. - */ - public String[] getLineCommentStartAndEnd(int languageIndex); - - - /** - * Returns an action to handle "insert break" key presses (i.e. Enter). - * - * @return The action, or null if the default action should - * be used. - */ - public Action getInsertBreakAction(); - - - /** - * Returns whether tokens of the specified type should have "mark - * occurrences" enabled for the current programming language. - * - * @param type The token type. - * @return Whether tokens of this type should have "mark occurrences" - * enabled. - */ - public boolean getMarkOccurrencesOfTokenType(int type); - - - /** - * Returns the object in charge of marking all occurrences of the token - * at the current caret position, if it is a relevant token. If - * null is returned, a default OccurrenceMarker - * is used. - * - * @return The occurrence marker for this language, or null - * for none. - */ - public OccurrenceMarker getOccurrenceMarker(); - - - /** - * If a line ends in the specified token, this method returns whether - * a new line inserted after that line should be indented. - * - * @param token The token the previous line ends with. - * @return Whether the next line should be indented. - */ - public boolean getShouldIndentNextLineAfter(Token token); - - - /** - * Returns the first token in the linked list of tokens generated - * from text. This method must be implemented by - * subclasses so they can correctly implement syntax highlighting. - * - * @param text The text from which to get tokens. - * @param initialTokenType The token type we should start with. - * @param startOffset The offset into the document at which - * text starts. - * @return The first Token in a linked list representing - * the syntax highlighted text. - */ - public Token getTokenList(Segment text, int initialTokenType, - int startOffset); - - - /** - * Returns whether a character could be part of an "identifier" token - * in a specific language. This is used to identify such things as the - * bounds of the "word" to select on double-clicking. - * - * @param languageIndex The language index the character was found in. - * @param ch The character. - * @return Whether the character could be part of an "identifier" token. - */ - public boolean isIdentifierChar(int languageIndex, char ch); - - - /** - * Returns whether this language is a markup language. - * - * @return Whether this language is markup. - */ - public boolean isMarkupLanguage(); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMakerBase.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMakerBase.java deleted file mode 100644 index ea6c832..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMakerBase.java +++ /dev/null @@ -1,327 +0,0 @@ -/* - * 08/26/2004 - * - * TokenMakerBase.java - A base class for token makers. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import javax.swing.Action; -import javax.swing.text.Segment; - - -/** - * Base class for token makers. - * - * @author Robert Futrell - * @version 1.0 - */ -public abstract class TokenMakerBase implements TokenMaker { - - /** - * The first token in the returned linked list. - */ - protected TokenImpl firstToken; - - /** - * Used in the creation of the linked list. - */ - protected TokenImpl currentToken; - - /** - * Used in the creation of the linked list. - */ - protected TokenImpl previousToken; - - /** - * The factory that gives us our tokens to use. - */ - private TokenFactory tokenFactory; - - /** - * Highlights occurrences of the current token in the editor, if it is - * relevant. - */ - private OccurrenceMarker occurrenceMarker; - - /** - * "0" implies this is the "main" language being highlighted. Positive - * values imply various "secondary" or "embedded" languages, such as CSS - * or JavaScript in HTML. While this value is non-zero, tokens will be - * generated with this language index so they can (possibly) be painted - * differently, so "embedded" languages can be rendered with a special - * background. - */ - private int languageIndex; - - - /** - * Constructor. - */ - public TokenMakerBase() { - firstToken = currentToken = previousToken = null; - tokenFactory = new DefaultTokenFactory(); - } - - - /** - * {@inheritDoc} - */ - public void addNullToken() { - if (firstToken==null) { - firstToken = tokenFactory.createToken(); - currentToken = firstToken; - } - else { - TokenImpl next = tokenFactory.createToken(); - currentToken.setNextToken(next); - previousToken = currentToken; - currentToken = next; - } - currentToken.setLanguageIndex(languageIndex); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param segment Segment to get text from. - * @param start Start offset in segment of token. - * @param end End offset in segment of token. - * @param tokenType The token's type. - * @param startOffset The offset in the document at which this token - * occurs. - */ - public void addToken(Segment segment, int start, int end, int tokenType, - int startOffset) { - addToken(segment.array, start,end, tokenType, startOffset); - } - - - /** - * {@inheritDoc} - */ - public void addToken(char[] array, int start, int end, int tokenType, - int startOffset) { - addToken(array, start, end, tokenType, startOffset, false); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param array The character array. - * @param start The starting offset in the array. - * @param end The ending offset in the array. - * @param tokenType The token's type. - * @param startOffset The offset in the document at which this token - * occurs. - * @param hyperlink Whether this token is a hyperlink. - */ - public void addToken(char[] array, int start, int end, int tokenType, - int startOffset, boolean hyperlink) { - - if (firstToken==null) { - firstToken = tokenFactory.createToken(array, start, end, - startOffset, tokenType); - currentToken = firstToken; // previous token is still null. - } - else { - TokenImpl next = tokenFactory.createToken(array, start,end, - startOffset, tokenType); - currentToken.setNextToken(next); - previousToken = currentToken; - currentToken = next; - } - - currentToken.setLanguageIndex(languageIndex); - currentToken.setHyperlink(hyperlink); - - } - - - /** - * Returns the occurrence marker to use for this token maker. Subclasses - * can override to use different implementations. - * - * @return The occurrence marker to use. - */ - protected OccurrenceMarker createOccurrenceMarker() { - return new DefaultOccurrenceMarker(); - } - - - /** - * Returns the closest {@link TokenTypes "standard" token type} for a given - * "internal" token type (e.g. one whose value is < 0).

- * - * The default implementation returns type always, which - * denotes that a mapping from internal token types to standard token types - * is not defined; subclasses can override. - * - * @param type The token type. - * @return The closest "standard" token type. - */ - public int getClosestStandardTokenTypeForInternalType(int type) { - return type; - } - - - /** - * Returns whether this programming language uses curly braces - * ('{' and '}') to denote code blocks. - * - * The default implementation returns false; subclasses can - * override this method if necessary. - * - * @param languageIndex The language index at the offset in question. - * Since some TokenMakers effectively have nested - * languages (such as JavaScript in HTML), this parameter tells the - * TokenMaker what sub-language to look at. - * @return Whether curly braces denote code blocks. - */ - public boolean getCurlyBracesDenoteCodeBlocks(int languageIndex) { - return false; - } - - - /** - * Returns an action to handle "insert break" key presses (i.e. Enter). - * The default implementation returns null. Subclasses - * can override. - * - * @return The default implementation always returns null. - */ - public Action getInsertBreakAction() { - return null; - } - - - /** - * Returns the current language index. - * - * @return The current language index. - * @see #setLanguageIndex(int) - */ - protected int getLanguageIndex() { - return languageIndex; - } - - - /** - * {@inheritDoc} - */ - public int getLastTokenTypeOnLine(Segment text, int initialTokenType) { - - // Last parameter doesn't matter if we're not painting. - Token t = getTokenList(text, initialTokenType, 0); - - while (t.getNextToken()!=null) - t = t.getNextToken(); - - return t.getType(); - - } - - - /** - * {@inheritDoc} - */ - public String[] getLineCommentStartAndEnd(int languageIndex) { - return null; - } - - - /** - * Returns whether tokens of the specified type should have "mark - * occurrences" enabled for the current programming language. The default - * implementation returns true if type is {@link Token#IDENTIFIER}. - * Subclasses can override this method to support other token types, such - * as {@link Token#VARIABLE}. - * - * @param type The token type. - * @return Whether tokens of this type should have "mark occurrences" - * enabled. - */ - public boolean getMarkOccurrencesOfTokenType(int type) { - return type==Token.IDENTIFIER; - } - - - /** - * {@inheritDoc} - */ - public OccurrenceMarker getOccurrenceMarker() { - if (occurrenceMarker==null) { - occurrenceMarker = createOccurrenceMarker(); - } - return occurrenceMarker; - } - - - /** - * The default implementation returns false always. Languages - * that wish to better support auto-indentation can override this method. - * - * @param token The token the previous line ends with. - * @return Whether the next line should be indented. - */ - public boolean getShouldIndentNextLineAfter(Token token) { - return false; - } - - - /** - * Returns whether a character could be part of an "identifier" token - * in a specific language. The default implementation returns - * true for letters, numbers, and certain symbols. - */ - public boolean isIdentifierChar(int languageIndex, char ch) { - return Character.isLetterOrDigit(ch) || ch=='_' || ch=='$'; - } - - - /** - * The default implementation returns false always. - * Subclasses that are highlighting a markup language should override this - * method to return true. - * - * @return false always. - */ - public boolean isMarkupLanguage() { - return false; - } - - - /** - * Deletes the linked list of tokens so we can begin anew. This should - * never have to be called by the programmer, as it is automatically - * called whenever the user calls - * {@link #getLastTokenTypeOnLine(Segment, int)} or - * {@link #getTokenList(Segment, int, int)}. - */ - protected void resetTokenList() { - firstToken = currentToken = previousToken = null; - tokenFactory.resetAllTokens(); - } - - - /** - * Sets the language index to assign to tokens moving forward. This - * property is used to designate tokens as being in "secondary" languages - * (such as CSS or JavaScript in HTML). - * - * @param languageIndex The new language index. A value of - * 0 denotes the "main" language, any positive value - * denotes a specific secondary language. Negative values will - * be treated as 0. - * @see #getLanguageIndex() - */ - protected void setLanguageIndex(int languageIndex) { - this.languageIndex = Math.max(0, languageIndex); - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMakerFactory.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMakerFactory.java deleted file mode 100644 index 64e9a8e..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMakerFactory.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * 12/12/2008 - * - * TokenMakerFactory.java - A factory for TokenMakers. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.util.Set; - -import org.fife.ui.rsyntaxtextarea.modes.PlainTextTokenMaker; - - -/** - * A factory that maps syntax styles to {@link TokenMaker}s capable of splitting - * text into tokens for those syntax styles. - * - * @author Robert Futrell - * @version 1.0 - */ -public abstract class TokenMakerFactory { - - /** - * If this system property is set, a custom TokenMakerFactory - * of the specified class will be used as the default token maker factory. - */ - public static final String PROPERTY_DEFAULT_TOKEN_MAKER_FACTORY = - "TokenMakerFactory"; - - /** - * The singleton default TokenMakerFactory instance. - */ - private static TokenMakerFactory DEFAULT_INSTANCE; - - - /** - * Returns the default TokenMakerFactory instance. This is - * the factory used by all {@link RSyntaxDocument}s by default. - * - * @return The factory. - * @see #setDefaultInstance(TokenMakerFactory) - */ - public static synchronized TokenMakerFactory getDefaultInstance() { - if (DEFAULT_INSTANCE==null) { - String clazz = null; - try { - clazz= System.getProperty(PROPERTY_DEFAULT_TOKEN_MAKER_FACTORY); - } catch (java.security.AccessControlException ace) { - clazz = null; // We're in an applet; take default. - } - if (clazz==null) { - clazz = "org.fife.ui.rsyntaxtextarea.DefaultTokenMakerFactory"; - } - try { - DEFAULT_INSTANCE = (TokenMakerFactory)Class.forName(clazz). - newInstance(); - } catch (RuntimeException re) { // FindBugs - throw re; - } catch (Exception e) { - e.printStackTrace(); - throw new InternalError("Cannot find TokenMakerFactory: " + - clazz); - } - } - return DEFAULT_INSTANCE; - } - - - /** - * Returns a {@link TokenMaker} for the specified key. - * - * @param key The key. - * @return The corresponding TokenMaker, or - * {@link PlainTextTokenMaker} if none matches the specified key. - */ - public final TokenMaker getTokenMaker(String key) { - TokenMaker tm = getTokenMakerImpl(key); - if (tm==null) { - tm = new PlainTextTokenMaker(); - } - return tm; - } - - - /** - * Returns a {@link TokenMaker} for the specified key. - * - * @param key The key. - * @return The corresponding TokenMaker, or null - * if none matches the specified key. - */ - protected abstract TokenMaker getTokenMakerImpl(String key); - - - /** - * Returns the set of keys that this factory maps to token makers. - * - * @return The set of keys. - */ - public abstract Set keySet(); - - - /** - * Sets the default TokenMakerFactory instance. This is - * the factory used by all future {@link RSyntaxDocument}s by default. - * RSyntaxDocuments that have already been created are not - * affected. - * - * @param tmf The factory. - * @throws IllegalArgumentException If tmf is - * null. - * @see #getDefaultInstance() - */ - public static synchronized void setDefaultInstance(TokenMakerFactory tmf) { - if (tmf==null) { - throw new IllegalArgumentException("tmf cannot be null"); - } - DEFAULT_INSTANCE = tmf; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMap.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMap.java deleted file mode 100644 index 42ff7d1..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenMap.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * 08/26/2004 - * - * TokenMap.java - Similar to a Map in Java, only designed specifically for - * org.fife.ui.rsyntaxtextarea.Tokens. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import javax.swing.text.Segment; - - -/** - * A hash table for reserved words, etc. defined by a {@link TokenMaker}. - * This class is designed for the quick lookup of tokens, as it can compare - * Segments without the need to allocate a new string.

- * - * The org.fife.ui.rsyntaxtextarea package uses this class to help - * identify reserved words in programming languages. An instance of - * {@link TokenMaker} will create and initialize an instance of this class - * containing all reserved words, data types, and all other words that need to - * be syntax-highlighted for that particular language. When the token maker - * parses a line and identifies an individual token, it is looked up in the - * TokenMap to see if it should be syntax-highlighted. - * - * @author Robert Futrell - * @version 0.6 - */ -public class TokenMap { - - private int size; - private TokenMapToken[] tokenMap; - private boolean ignoreCase; - - private static final int DEFAULT_TOKEN_MAP_SIZE = 52; - - - /** - * Constructs a new token map that is case-sensitive. - */ - public TokenMap() { - this(DEFAULT_TOKEN_MAP_SIZE); - } - - - /** - * Constructs a new token map that is case-sensitive. - * - * @param size The size of the token map. - */ - public TokenMap(int size) { - this(size, false); - } - - - /** - * Constructs a new token map. - * - * @param ignoreCase Whether or not this token map should ignore case - * when comparing tokens. - */ - public TokenMap(boolean ignoreCase) { - this(DEFAULT_TOKEN_MAP_SIZE, ignoreCase); - } - - - /** - * Constructs a new token map. - * - * @param size The size of the token map. - * @param ignoreCase Whether or not this token map should ignore case - * when comparing tokens. - */ - public TokenMap(int size, boolean ignoreCase) { - this.size = size; - tokenMap = new TokenMapToken[size]; - this.ignoreCase = ignoreCase; - } - - - /** - * Adds a token to a specified bucket in the token map. - * - * @param bucket The bucket in which to add the token. - * @param token The token to add. - */ - private void addTokenToBucket(int bucket, TokenMapToken token) { - TokenMapToken old = tokenMap[bucket]; - token.nextToken = old; - tokenMap[bucket] = token; - } - - - /** - * Returns the token type associated with the given text, if the given - * text is in this token map. If it isn't, -1 is returned. - * - * @param text The segment from which to get the text to compare. - * @param start The starting index in the segment of the text. - * @param end The ending index in the segment of the text. - * @return The token type associated with the given text, or - * -1 if this token was not specified in this map. - */ - public int get(Segment text, int start, int end) { - return get(text.array, start, end); - } - - - /** - * Returns the token type associated with the given text, if the given - * text is in this token map. If it isn't, -1 is returned. - * - * @param array1 An array of characters containing the text. - * @param start The starting index in the array of the text. - * @param end The ending index in the array of the text. - * @return The token type associated with the given text, or - * -1 if this token was not specified in this map. - */ - public int get(char[] array1, int start, int end) { - - int length1 = end - start + 1; - - int hash = getHashCode(array1, start, length1); - TokenMapToken token = tokenMap[hash]; - - char[] array2; - int offset2; - int offset1; - int length; - - /* We check whether or not to ignore case before doing any looping to - * minimize the number of extraneous comparisons we do. This makes - * for slightly redundant code, but it'll be a little more efficient. - */ - - // If matches are case-sensitive (C, C++, Java, etc.)... - if (ignoreCase==false) { - - mainLoop: - while (token!=null) { - if (token.length==length1) { - array2 = token.text; - offset2 = token.offset; - offset1 = start; - length = length1; - while (length-- > 0) { - if (array1[offset1++]!=array2[offset2++]) { - token = token.nextToken; - continue mainLoop; - } - } - return token.tokenType; - } - token = token.nextToken; - } - - } - - // If matches are NOT case-sensitive (HTML)... - // Note that all tokens saved in this map were converted to - // lower-case already. - else { - - mainLoop2: - while (token!=null) { - if (token.length==length1) { - array2 = token.text; - offset2 = token.offset; - offset1 = start; - length = length1; - while (length-- > 0) { - if (RSyntaxUtilities.toLowerCase( - array1[offset1++]) != array2[offset2++]) { - token = token.nextToken; - continue mainLoop2; - } - } - return token.tokenType; - } - token = token.nextToken; - } - - } - - // Didn't match any of the tokens in the bucket. - return -1; - - } - - - /** - * Returns the hash code for a given string. - * - * @param text The text to hash. - * @param offset The offset into the text at which to start hashing. - * @param length The last character in the text to hash. - * @return The hash code. - */ - private final int getHashCode(char[] text, int offset, int length) { - return (RSyntaxUtilities.toLowerCase(text[offset]) + - RSyntaxUtilities.toLowerCase(text[offset+length-1])) % size; - } - - - /** - * Returns whether this token map ignores case when checking for tokens. - * This property is set in the constructor and cannot be changed, as this - * is an intrinsic property of a particular programming language. - * - * @return Whether or not this token maker is ignoring case. - */ - protected boolean isIgnoringCase() { - return ignoreCase; - } - - - /** - * Adds a string to this token map. - * - * @param string The string to add. - * @param tokenType The type of token the string is. - */ - public void put(final String string, final int tokenType) { - if (isIgnoringCase()) - put(string.toLowerCase().toCharArray(), tokenType); - else - put(string.toCharArray(), tokenType); - } - - - /** - * Adds a string to this token map. The char array passed-in will be used - * as the actual data for the token, so it may well be modified (such as - * lower-casing it if ignoreCase is true). This - * shouldn't be an issue though as this method is only called from the - * public put method, which allocates a new char array. - * - * @param string The string to add. - * @param tokenType The type of token the string is. - */ - private void put(char[] string, int tokenType) { - int hashCode = getHashCode(string, 0, string.length); - addTokenToBucket(hashCode, new TokenMapToken(string, tokenType)); - } - - - /** - * The "token" used by a token map. Note that this isn't the same thing - * as the {@link Token} class, but it's basically a 1-1 correspondence - * for reserved words, etc. - */ - private static class TokenMapToken { - - char[] text; - int offset; - int length; - int tokenType; - TokenMapToken nextToken; - - TokenMapToken(char[] text, int tokenType) { - this.text = text; - this.offset = 0; - this.length = text.length; - this.tokenType = tokenType; - } - - @Override - public String toString() { - return "[TokenMapToken: " + new String(text,offset,length) + "]"; - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenOrientedView.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenOrientedView.java deleted file mode 100644 index 57e7d89..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenOrientedView.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 08/06/2004 - * - * TokenOrientedView.java - An interface for the syntax-highlighting token- - * oriented views for token-oriented methods. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - - -/** - * An interface for the syntax-highlighting token oriented views for - * token-oriented methods. This way callers won't need to know what specific - * class a view is an instance of to access its tokens.

- * - * Currently, this interface is only useful for obtaining token lists for - * "physical lines" (i.e., a word-wrapped view's logical lines may be - * represented as several physical lines, thus getting the "physical line" above - * a given position may prove complicated). - * - * @author Robert Futrell - * @version 0.1 - */ -public interface TokenOrientedView { - - - /** - * Returns a token list for the physical line above the physical - * line containing the specified offset into the document. Note that for - * a plain (non-wrapped) view, this is simply the token list for the - * logical line above the line containing offset, since lines - * are not wrapped. For a wrapped view, this may or may not be tokens from - * the same line. - * - * @param offset The offset in question. - * @return A token list for the physical (and in this view, logical) line - * before this one. If no physical line is above the one - * containing offset, null is returned. - */ - public Token getTokenListForPhysicalLineAbove(int offset); - - - /** - * Returns a token list for the physical line below the physical - * line containing the specified offset into the document. Note that for - * a plain (non-wrapped) view, this is simply the token list for the - * logical line below the line containing offset, since lines - * are not wrapped. For a wrapped view, this may or may not be tokens from - * the same line. - * - * @param offset The offset in question. - * @return A token list for the physical (and in this view, logical) line - * after this one. If no physical line is after the one - * containing offset, null is returned. - */ - public Token getTokenListForPhysicalLineBelow(int offset); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenTypes.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenTypes.java deleted file mode 100644 index 66a94f8..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/TokenTypes.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 12/04/2011 - * - * TokenTypes.java - All token types supported by RSyntaxTextArea. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - - -/** - * All token types supported by RSyntaxTextArea.

- * - * Note that all valid token types are >= 0, so extensions of the TokenMaker - * class are free to internally use all ints < 0 ONLY for "end-of-line" - * style markers; they are ignored by painting implementations. - * - * @author Robert Futrell - * @version 1.0 - */ -public interface TokenTypes { - - /** - * Tokens of type NULL mark the end of lines with no - * multi-line token at the end (such as a block comment in C++). - */ - public static final int NULL = 0; - - public static final int COMMENT_EOL = 1; - public static final int COMMENT_MULTILINE = 2; - public static final int COMMENT_DOCUMENTATION = 3; - public static final int COMMENT_KEYWORD = 4; - public static final int COMMENT_MARKUP = 5; - - public static final int RESERVED_WORD = 6; - public static final int RESERVED_WORD_2 = 7; - - public static final int FUNCTION = 8; - - public static final int LITERAL_BOOLEAN = 9; - public static final int LITERAL_NUMBER_DECIMAL_INT = 10; - public static final int LITERAL_NUMBER_FLOAT = 11; - public static final int LITERAL_NUMBER_HEXADECIMAL = 12; - public static final int LITERAL_STRING_DOUBLE_QUOTE = 13; - public static final int LITERAL_CHAR = 14; - public static final int LITERAL_BACKQUOTE = 15; - - public static final int DATA_TYPE = 16; - - public static final int VARIABLE = 17; - - public static final int REGEX = 18; - - public static final int ANNOTATION = 19; - - public static final int IDENTIFIER = 20; - - public static final int WHITESPACE = 21; - - public static final int SEPARATOR = 22; - - public static final int OPERATOR = 23; - - public static final int PREPROCESSOR = 24; - - public static final int MARKUP_TAG_DELIMITER = 25; - public static final int MARKUP_TAG_NAME = 26; - public static final int MARKUP_TAG_ATTRIBUTE = 27; - public static final int MARKUP_TAG_ATTRIBUTE_VALUE = 28; - public static final int MARKUP_COMMENT = 29; - public static final int MARKUP_DTD = 30; - public static final int MARKUP_PROCESSING_INSTRUCTION = 31; - public static final int MARKUP_CDATA_DELIMITER = 32; - public static final int MARKUP_CDATA = 33; - public static final int MARKUP_ENTITY_REFERENCE = 34; - - public static final int ERROR_IDENTIFIER = 35; - public static final int ERROR_NUMBER_FORMAT = 36; - public static final int ERROR_STRING_DOUBLE = 37; - public static final int ERROR_CHAR = 38; - - public static final int DEFAULT_NUM_TOKEN_TYPES = 39; - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/URLFileLocation.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/URLFileLocation.java deleted file mode 100644 index d28f4fa..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/URLFileLocation.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * 11/13/2008 - * - * URLFileLocation.java - The location of a file at a (remote) URL. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.io.InputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.net.URL; - - -/** - * The location of a file at a (remote) URL. - * - * @author Robert Futrell - * @version 1.0 - */ -class URLFileLocation extends FileLocation { - - /** - * URL of the remote file. - */ - private URL url; - - /** - * A prettied-up full path of the URL (password removed, etc.). - */ - private String fileFullPath; - - /** - * A prettied-up filename (leading slash, and possibly "%2F", - * removed). - */ - private String fileName; - - - /** - * Constructor. - * - * @param url The URL of the file. - */ - URLFileLocation(URL url) { - this.url = url; - fileFullPath = createFileFullPath(); - fileName = createFileName(); - } - - - /** - * Creates a "prettied-up" URL to use. This will be stripped of - * sensitive information such as passwords. - * - * @return The full path to use. - */ - private String createFileFullPath() { - String fullPath = url.toString(); - fullPath = fullPath.replaceFirst("://([^:]+)(?:.+)@", "://$1@"); - return fullPath; - } - - - /** - * Creates the "prettied-up" filename to use. - * - * @return The base name of the file of this URL. - */ - private String createFileName() { - String fileName = url.getPath(); - if (fileName.startsWith("/%2F/")) { // Absolute path - fileName = fileName.substring(4); - } - else if (fileName.startsWith("/")) { // All others - fileName = fileName.substring(1); - } - return fileName; - } - - - /** - * Returns the last time this file was modified, or - * {@link TextEditorPane#LAST_MODIFIED_UNKNOWN} if this value cannot be - * computed (such as for a remote file). - * - * @return The last time this file was modified. This will always be - * {@link TextEditorPane#LAST_MODIFIED_UNKNOWN} for URL's. - */ - @Override - protected long getActualLastModified() { - return TextEditorPane.LAST_MODIFIED_UNKNOWN; - } - - - /** - * {@inheritDoc} - */ - @Override - public String getFileFullPath() { - return fileFullPath; - } - - - /** - * {@inheritDoc} - */ - @Override - public String getFileName() { - return fileName; - } - - - /** - * {@inheritDoc} - */ - @Override - protected InputStream getInputStream() throws IOException { - return url.openStream(); - } - - - /** - * {@inheritDoc} - */ - @Override - protected OutputStream getOutputStream() throws IOException { - return url.openConnection().getOutputStream(); - } - - - /** - * Returns whether this file location is a local file. - * - * @return Whether this is a local file. - * @see #isLocalAndExists() - */ - @Override - public boolean isLocal() { - return "file".equalsIgnoreCase(url.getProtocol()); - } - - - /** - * Returns whether this file location is a local file and already - * exists. This method always returns false since we - * cannot check this value easily. - * - * @return false always. - * @see #isLocal() - */ - @Override - public boolean isLocalAndExists() { - return false; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/VisibleWhitespaceTokenPainter.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/VisibleWhitespaceTokenPainter.java deleted file mode 100644 index 02dd3fe..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/VisibleWhitespaceTokenPainter.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * 03/16/2013 - * - * VisibleWhitespaceTokenPainter - Renders tokens in an instance of - * RSyntaxTextArea, with special glyphs to denote spaces and tabs. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.awt.Color; -import java.awt.FontMetrics; -import java.awt.Graphics2D; -import javax.swing.text.TabExpander; - - -/** - * A token painter that visibly renders whitespace (spaces and tabs).

- * - * The current implementation paints as follows: - *

    - *
  • The first tab or space, if any, is found in the token.
  • - *
  • If a tab was found, all characters up to it are painted as a - * group.
  • - *
  • If a space was found, all characters up to and including it are - * painted (it is painted with a special symbol to denote it as - * a space).
  • - *
  • If neither a tab nor a whitespace was found, all characters in the - * token are painted.
  • - *
  • Repeat until all characters are painted.
  • - *
- * This means that rendering hints are applied to all groups of characters - * within a token, excluding whitespace and tabs.

- * - * A problem with this implementation is that FontMetrics.charsWidth() is still - * used to calculate the width of a group of chars painted. Thus, the group of - * characters will be painted with the rendering hints specified, but the - * following tab (or group of characters if the current group was the end of a - * token) will not necessarily be painted at the proper x-coordinate (as - * FontMetrics.charsWidth() returns an int and not a - * float). The way around this would be to calculate the token's - * width in such a way that a float is returned (Font.getStringBounds()?). - * - * @author Robert Futrell - * @version 1.0 - */ -class VisibleWhitespaceTokenPainter extends DefaultTokenPainter { - - - /** - * {@inheritDoc} - */ - @Override - protected float paintImpl(Token token, Graphics2D g, float x, float y, - RSyntaxTextArea host, TabExpander e, float clipStart, - boolean selected, boolean useSTC) { - - int origX = (int)x; - int textOffs = token.getTextOffset(); - char[] text = token.getTextArray(); - int end = textOffs + token.length(); - float nextX = x; - int flushLen = 0; - int flushIndex = textOffs; - Color fg = useSTC ? host.getSelectedTextColor() : - host.getForegroundForToken(token); - Color bg = selected ? null : host.getBackgroundForToken(token); - g.setFont(host.getFontForTokenType(token.getType())); - FontMetrics fm = host.getFontMetricsForTokenType(token.getType()); - - int ascent = fm.getAscent(); - int height = fm.getHeight(); - - for (int i=textOffs; i 0) { - g.drawChars(text, flushIndex, flushLen, (int)x,(int)y); - flushLen = 0; - } - flushIndex = i + 1; - - // Draw an arrow representing the tab. - int halfHeight = height / 2; - int quarterHeight = halfHeight / 2; - int ymid = (int)y - ascent + halfHeight; - g.drawLine((int)nextX,ymid, (int)nextNextX,ymid); - g.drawLine((int)nextNextX,ymid, (int)nextNextX-4,ymid-quarterHeight); - g.drawLine((int)nextNextX,ymid, (int)nextNextX-4,ymid+quarterHeight); - - x = nextNextX; - break; - - case ' ': - - // NOTE: There is a little bit of a "fudge factor" - // here when "smooth text" is enabled, as "width" - // below may well not be the width given to the space - // by fm.charsWidth() (it depends on how it places the - // space with respect to the preceding character). - // But, we assume the approximation is close enough for - // our drawing a dot for the space. - - // "flushLen+1" ensures text is aligned correctly (or, - // aligned the same as in getWidth()). - nextX = x+fm.charsWidth(text, flushIndex,flushLen+1); - int width = fm.charWidth(' '); - - // Paint background. - if (bg!=null) { - paintBackground(x,y, nextX-x,height, g, - ascent, host, bg); - } - g.setColor(fg); - - // Paint chars before space. - if (flushLen>0) { - g.drawChars(text, flushIndex, flushLen, (int)x,(int)y); - flushLen = 0; - } - - // Paint a dot representing the space. - int dotX = (int)(nextX - width/2f); // "2.0f" for FindBugs - int dotY = (int)(y - ascent + height/2f); // Ditto - g.drawLine(dotX, dotY, dotX, dotY); - flushIndex = i + 1; - x = nextX; - break; - - - case '\f': - // ??? - // fall-through for now. - - default: - flushLen += 1; - break; - - } - } - - nextX = x+fm.charsWidth(text, flushIndex,flushLen); - - if (flushLen>0 && nextX>=clipStart) { - if (bg!=null) { - paintBackground(x,y, nextX-x,height, g, - ascent, host, bg); - } - g.setColor(fg); - g.drawChars(text, flushIndex, flushLen, (int)x,(int)y); - } - - if (host.getUnderlineForToken(token)) { - g.setColor(fg); - int y2 = (int)(y+1); - g.drawLine(origX,y2, (int)nextX,y2); - } - - // Don't check if it's whitespace - some TokenMakers may return types - // other than Token.WHITESPACE for spaces (such as Token.IDENTIFIER). - // This also allows us to paint tab lines for MLC's. - if (host.getPaintTabLines() && origX==host.getMargin().left) {// && isWhitespace()) { - paintTabLines(token, origX, (int)y, (int)nextX, g, e, host); - } - - return nextX; - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/WrappedSyntaxView2.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/WrappedSyntaxView2.java deleted file mode 100644 index 6c84414..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/WrappedSyntaxView2.java +++ /dev/null @@ -1,157 +0,0 @@ -package org.fife.ui.rsyntaxtextarea; - -//import java.awt.Graphics; -//import java.awt.Rectangle; -//import java.awt.Shape; - -//import javax.swing.text.CompositeView; -import javax.swing.text.Element; -//import javax.swing.text.View; - - -/** - * Replacement for the old WrappedSyntaxView class, designed to - * be faster with large wrapped documents. Heavily based off of - * BoxView, but streamlined to only care about the y-axis, and - * takes code folding into account.

- * - * This class is not currently used. - * - * @author Robert Futrell - * @version 1.0 - */ -public class WrappedSyntaxView2 {//extends CompositeView { - -// private Rectangle tempRect; -// private int[] cachedOffsets; -// private int[] cachedSpans; -// private boolean sizeRequirementsValid; - - - public WrappedSyntaxView2(Element root) { - //super(root); -// tempRect = new Rectangle(); -// cachedOffsets = new int[0]; -// cachedSpans = new int[0]; -// sizeRequirementsValid = false; - } - - -// protected void childAllocation(int index, Rectangle alloc) { -// alloc.y += getOffset(index); -// alloc.height = getHeight(index); -// } -// -// -// private int getHeight(int childIndex) { -// return cachedSpans[childIndex]; -// } -// -// -// private int getOffset(int childIndex) { -// return cachedOffsets[childIndex]; -// } -// -// -// protected View getViewAtPoint(int x, int y, Rectangle alloc) { -// // TODO Auto-generated method stub -// return null; -// } -// -// -// /** -// * @param alloc The allocated region; this is the area inside of the insets -// * @return Whether the point lies after the region. -// */ -// protected boolean isAfter(int x, int y, Rectangle alloc) { -// return y > (alloc.y + alloc.height); -// } -// -// -// /** -// * @param alloc The allocated region; this is the area inside of the insets -// * @return Whether the point lies before the region. -// */ -// protected boolean isBefore(int x, int y, Rectangle alloc) { -// return y < alloc.y; -// } -// -// -// public float getPreferredSpan(int axis) { -// if (axis==X_AXIS) { -// return preferredWidth + getLeftInset() + getRightInset(); -// } -// else { -// return preferredHeight + getTopInset() + getBottomInset(); -// } -// } -// -// -// public void paint(Graphics g, Shape allocation) { -// -// Rectangle alloc = (allocation instanceof Rectangle) ? -// (Rectangle)allocation : allocation.getBounds(); -// int n = getViewCount(); -// -// int x = alloc.x + getLeftInset(); -// int y = alloc.y + getTopInset(); -// Rectangle clip = g.getClipBounds(); -// int preferredWidth = (int)getPreferredSpan(X_AXIS); -// -// for (int i = 0; i < n; i++) { -// tempRect.x = x; -// tempRect.y = y + getOffset(i); -// tempRect.width = preferredWidth; -// tempRect.height = getHeight(i); -// if (tempRect.intersects(clip)) { -// paintChild(g, tempRect, i); -// } -// } -// -// } -// -// -// /** -// * Called when a child view's preferred span changes. This invalidates -// * our layout cache and calls the super implementation. -// */ -// public void preferenceChanged(View child, boolean widthPreferenceChanged, -// boolean heightPreferenceChanged) { -// -// if (heightPreferenceChanged) { -// sizeRequirementsValid = false; -//// majorAllocValid = false; -// } -//// if (width) { -//// minorReqValid = false; -//// minorAllocValid = false; -//// } -// -// super.preferenceChanged(child, widthPreferenceChanged, heightPreferenceChanged); -// -// } -// -// public void replace(int index, int length, View[] elems) { -// -// super.replace(index, length, elems); -// -// // Invalidate cache -// int insertCount = elems==null ? 0 : elems.length; -// cachedOffsets = updateLayoutArray(cachedOffsets, index, insertCount); -// majorReqValid = false; -// majorAllocValid = false; -// -// } -// -// -// private int[] updateLayoutArray(int[] oldArray, int offset, int nInserted) { -// int n = getViewCount(); // Called after super.replace() so this is accurate -// int[] newArray = new int[n]; -// System.arraycopy(oldArray, 0, newArray, 0, offset); -// System.arraycopy(oldArray, offset, -// newArray, offset + nInserted, n - nInserted - offset); -// return newArray; -// } -// - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/XmlOccurrenceMarker.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/XmlOccurrenceMarker.java deleted file mode 100644 index 2bd5536..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/XmlOccurrenceMarker.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 03/09/2013 - * - * XmlOccurrenceMarker - Marks occurrences of the current token for XML. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea; - -import java.util.ArrayList; -import java.util.List; -import javax.swing.text.BadLocationException; -import javax.swing.text.Element; - -import org.fife.ui.rtextarea.SmartHighlightPainter; - - -/** - * Marks occurrences of the current token for XML. - * - * @author Robert Futrell - * @version 1.0 - */ -public class XmlOccurrenceMarker implements OccurrenceMarker { - - private static final char[] CLOSE_TAG_START = { '<', '/' }; - private static final char[] TAG_SELF_CLOSE = { '/', '>' }; - - - /** - * {@inheritDoc} - */ - public Token getTokenToMark(RSyntaxTextArea textArea) { - return HtmlOccurrenceMarker.getTagNameTokenForCaretOffset( - textArea, this); - } - - - /** - * {@inheritDoc} - */ - public boolean isValidType(RSyntaxTextArea textArea, Token t) { - return textArea.getMarkOccurrencesOfTokenType(t.getType()); - } - - - /** - * {@inheritDoc} - */ - public void markOccurrences(RSyntaxDocument doc, Token t, - RSyntaxTextAreaHighlighter h, SmartHighlightPainter p) { - - char[] lexeme = t.getLexeme().toCharArray(); - int tokenOffs = t.getOffset(); - Element root = doc.getDefaultRootElement(); - int lineCount = root.getElementCount(); - int curLine = root.getElementIndex(t.getOffset()); - int depth = 0; - - // For now, we only check for tags on the current line, for - // simplicity. Tags spanning multiple lines aren't common anyway. - boolean found = false; - boolean forward = true; - t = doc.getTokenListForLine(curLine); - while (t!=null && t.isPaintable()) { - if (t.getType()==Token.MARKUP_TAG_DELIMITER) { - if (t.isSingleChar('<') && t.getOffset()+1==tokenOffs) { - found = true; - break; - } - else if (t.is(CLOSE_TAG_START) && t.getOffset()+2==tokenOffs) { - found = true; - forward = false; - break; - } - } - t = t.getNextToken(); - } - - if (!found) { - return; - } - - if (forward) { - - t = t.getNextToken().getNextToken(); - - do { - - while (t!=null && t.isPaintable()) { - if (t.getType()==Token.MARKUP_TAG_DELIMITER) { - if (t.is(CLOSE_TAG_START)) { - Token match = t.getNextToken(); - if (match!=null && match.is(lexeme)) { - if (depth>0) { - depth--; - } - else { - try { - int end = match.getOffset() + match.length(); - h.addMarkedOccurrenceHighlight(match.getOffset(), end, p); - end = tokenOffs + match.length(); - h.addMarkedOccurrenceHighlight(tokenOffs, end, p); - } catch (BadLocationException ble) { - ble.printStackTrace(); // Never happens - } - return; // We're done! - } - } - } - else if (t.isSingleChar('<')) { - t = t.getNextToken(); - if (t!=null && t.is(lexeme)) { - depth++; - } - } - } - t = t==null ? null : t.getNextToken(); - } - - if (++curLine openCloses = new ArrayList(); - boolean inPossibleMatch = false; - t = doc.getTokenListForLine(curLine); - final int endBefore = tokenOffs - 2; // Stop before "')) { - inPossibleMatch = false; - } - else if (inPossibleMatch && t.is(TAG_SELF_CLOSE)) { - openCloses.remove(openCloses.size()-1); - inPossibleMatch = false; - } - else if (t.is(CLOSE_TAG_START)) { - Token next = t.getNextToken(); - if (next!=null) { - // Invalid XML might not have a match - if (next.is(lexeme)) { - openCloses.add(new Entry(false, next)); - } - t = next; - } - } - } - t = t.getNextToken(); - } - - for (int i=openCloses.size()-1; i>=0; i--) { - Entry entry = openCloses.get(i); - depth += entry.open ? -1 : 1; - if (depth==-1) { - try { - Token match = entry.t; - int end = match.getOffset() + match.length(); - h.addMarkedOccurrenceHighlight(match.getOffset(), end, p); - end = tokenOffs + match.length(); - h.addMarkedOccurrenceHighlight(tokenOffs, end, p); - } catch (BadLocationException ble) { - ble.printStackTrace(); // Never happens - } - openCloses.clear(); - return; - } - } - - openCloses.clear(); - if (--curLine>=0) { - t = doc.getTokenListForLine(curLine); - } - - } while (curLine>=0); - - - } - - } - - - /** - * Used internally when searching backward for a matching "open" tag. - */ - private static class Entry { - - public boolean open; - public Token t; - - public Entry(boolean open, Token t) { - this.open = open; - this.t = t; - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip.properties deleted file mode 100644 index c23859d..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=Press 'F2' for focus diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ar.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ar.properties deleted file mode 100644 index ebbefc3..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ar.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=\u0627\u0636\u063a\u0637 'F2' \u0645\u0646 \u0627\u062c\u0644 \u0627\u0644\u062a\u0631\u0643\u064a\u0632 diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_de.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_de.properties deleted file mode 100644 index 720e386..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_de.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=Zum Fokussieren 'F2' dr\u00fccken \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_es.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_es.properties deleted file mode 100644 index 75a869e..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_es.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=Presionar 'F2' para enfocar diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_fr.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_fr.properties deleted file mode 100644 index 9dfdf4b..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_fr.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=Press 'F2' pour se concentrer diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_hu.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_hu.properties deleted file mode 100644 index 6a1efec..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_hu.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=Nyomja meg az 'F2' billenty\u0171t a f\u00f3kuszba \u00e1ll\u00edt\u00e1shoz diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_in.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_in.properties deleted file mode 100644 index c23859d..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_in.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=Press 'F2' for focus diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_it.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_it.properties deleted file mode 100644 index b959339..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_it.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=Premi 'F2' per il focus diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ja.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ja.properties deleted file mode 100644 index 7a3815f..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ja.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=\u30d5\u30a9\u30fc\u30ab\u30b9\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u300c\uff26\uff12\u300d\u3092\u62bc\u3057\u3066\u304f\u3060\u3055\u3044\u3002 diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ko.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ko.properties deleted file mode 100644 index bf5c351..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ko.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=\ud3ec\ucee4\uc2a4\ub97c \uc8fc\ub824\uba74 'F2'\ub97c \ub204\ub974\uc138\uc694 diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_nl.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_nl.properties deleted file mode 100644 index c23859d..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_nl.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=Press 'F2' for focus diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_pl.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_pl.properties deleted file mode 100644 index a662c64..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_pl.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=Naci\u015bnij 'F2' aby wy\u015bwietli\u0107 diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_pt_BR.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_pt_BR.properties deleted file mode 100644 index ccf4be9..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_pt_BR.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=Aperte 'F2' para focar diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ru.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ru.properties deleted file mode 100644 index 74cbb44..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_ru.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=\u041d\u0430\u0436\u0430\u0442\u044c 'F2' \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_tr.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_tr.properties deleted file mode 100644 index 816176d..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_tr.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=Odaklanmak i\u00e7in 'F2'e bas\u0131n\u0131z diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_zh_CN.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_zh_CN.properties deleted file mode 100644 index 1165854..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_zh_CN.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=\u6309'F2' \u805a\u7126 diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_zh_TW.properties b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_zh_TW.properties deleted file mode 100644 index c23859d..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/FocusableTip_zh_TW.properties +++ /dev/null @@ -1 +0,0 @@ -FocusHotkey=Press 'F2' for focus diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/SizeGrip.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/SizeGrip.java deleted file mode 100644 index 0c582d9..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/SizeGrip.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * 12/23/2008 - * - * SizeGrip.java - A size grip component that sits at the bottom of the window, - * allowing the user to easily resize that window. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.focusabletip; - -import java.awt.Color; -import java.awt.ComponentOrientation; -import java.awt.Cursor; -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.Image; -import java.awt.Point; -import java.awt.Window; -import java.awt.event.MouseEvent; -import java.io.File; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import javax.imageio.ImageIO; -import javax.swing.JPanel; -import javax.swing.SwingUtilities; -import javax.swing.UIManager; -import javax.swing.event.MouseInputAdapter; - - -/** - * A component that allows its parent window to be resizable, similar to the - * size grip seen on status bars. - * - * @author Robert Futrell - * @version 1.0 - */ -class SizeGrip extends JPanel { - - /** - * The size grip to use if we're on OS X. - */ - private Image osxSizeGrip; - - - public SizeGrip() { - MouseHandler adapter = new MouseHandler(); - addMouseListener(adapter); - addMouseMotionListener(adapter); - setPreferredSize(new Dimension(16, 16)); - } - - - /** - * Overridden to ensure that the cursor for this component is appropriate - * for the orientation. - * - * @param o The new orientation. - */ - @Override - public void applyComponentOrientation(ComponentOrientation o) { - possiblyFixCursor(o.isLeftToRight()); - super.applyComponentOrientation(o); - } - - - /** - * Creates and returns the OS X size grip image. - * - * @return The OS X size grip. - */ - private Image createOSXSizeGrip() { - ClassLoader cl = getClass().getClassLoader(); - URL url = cl.getResource("org/fife/ui/rsyntaxtextarea/focusabletip/osx_sizegrip.png"); - if (url==null) { - // We're not running in a jar - we may be debugging in Eclipse, - // for example - File f = new File("../RSyntaxTextArea/src/org/fife/ui/rsyntaxtextarea/focusabletip/osx_sizegrip.png"); - if (f.isFile()) { - try { - url = f.toURI().toURL(); - } catch (MalformedURLException mue) { // Never happens - mue.printStackTrace(); - return null; - } - } - else { - return null; // Can't find resource or image file - } - } - Image image = null; - try { - image = ImageIO.read(url); - } catch (IOException ioe) { // Never happens - ioe.printStackTrace(); - } - return image; - } - - - /** - * Paints this panel. - * - * @param g The graphics context. - */ - @Override - protected void paintComponent(Graphics g) { - - super.paintComponent(g); - - Dimension dim = getSize(); - - if (osxSizeGrip!=null) { - g.drawImage(osxSizeGrip, dim.width-16, dim.height-16, null); - return; - } - - Color c1 = UIManager.getColor("Label.disabledShadow"); - Color c2 = UIManager.getColor("Label.disabledForeground"); - ComponentOrientation orientation = getComponentOrientation(); - - if (orientation.isLeftToRight()) { - int width = dim.width -= 3; - int height = dim.height -= 3; - g.setColor(c1); - g.fillRect(width-9,height-1, 3,3); - g.fillRect(width-5,height-1, 3,3); - g.fillRect(width-1,height-1, 3,3); - g.fillRect(width-5,height-5, 3,3); - g.fillRect(width-1,height-5, 3,3); - g.fillRect(width-1,height-9, 3,3); - g.setColor(c2); - g.fillRect(width-9,height-1, 2,2); - g.fillRect(width-5,height-1, 2,2); - g.fillRect(width-1,height-1, 2,2); - g.fillRect(width-5,height-5, 2,2); - g.fillRect(width-1,height-5, 2,2); - g.fillRect(width-1,height-9, 2,2); - } - else { - int height = dim.height -= 3; - g.setColor(c1); - g.fillRect(10,height-1, 3,3); - g.fillRect(6,height-1, 3,3); - g.fillRect(2,height-1, 3,3); - g.fillRect(6,height-5, 3,3); - g.fillRect(2,height-5, 3,3); - g.fillRect(2,height-9, 3,3); - g.setColor(c2); - g.fillRect(10,height-1, 2,2); - g.fillRect(6,height-1, 2,2); - g.fillRect(2,height-1, 2,2); - g.fillRect(6,height-5, 2,2); - g.fillRect(2,height-5, 2,2); - g.fillRect(2,height-9, 2,2); - } - - } - - - /** - * Ensures that the cursor for this component is appropriate for the - * orientation. - * - * @param ltr Whether the current component orientation is LTR. - */ - protected void possiblyFixCursor(boolean ltr) { - int cursor = Cursor.NE_RESIZE_CURSOR; - if (ltr) { - cursor = Cursor.NW_RESIZE_CURSOR; - } - if (cursor!=getCursor().getType()) { - setCursor(Cursor.getPredefinedCursor(cursor)); - } - } - - - @Override - public void updateUI() { - super.updateUI(); - // TODO: Key off of Aqua LaF, not just OS X, as this size grip looks - // bad on other LaFs on Mac such as Nimbus. - if (System.getProperty("os.name").contains("OS X")) { - if (osxSizeGrip==null) { - osxSizeGrip = createOSXSizeGrip(); - } - } - else { // Clear memory in case of runtime LaF change. - osxSizeGrip = null; - } - - } - - - /** - * Listens for mouse events on this panel and resizes the parent window - * appropriately. - */ - /* - * NOTE: We use SwingUtilities.convertPointToScreen() instead of just using - * the locations relative to the corner component because the latter proved - * buggy - stretch the window too wide and some kind of arithmetic error - * started happening somewhere - our window would grow way too large. - */ - private class MouseHandler extends MouseInputAdapter { - - private Point origPos; - - @Override - public void mouseDragged(MouseEvent e) { - Point newPos = e.getPoint(); - SwingUtilities.convertPointToScreen(newPos, SizeGrip.this); - int xDelta = newPos.x - origPos.x; - int yDelta = newPos.y - origPos.y; - Window wind = SwingUtilities.getWindowAncestor(SizeGrip.this); - if (wind!=null) { // Should always be true - if (getComponentOrientation().isLeftToRight()) { - int w = wind.getWidth(); - if (newPos.x>=wind.getX()) { - w += xDelta; - } - int h = wind.getHeight(); - if (newPos.y>=wind.getY()) { - h += yDelta; - } - wind.setSize(w,h); - } - else { // RTL - int newW = Math.max(1, wind.getWidth()-xDelta); - int newH = Math.max(1, wind.getHeight()+yDelta); - wind.setBounds(newPos.x, wind.getY(), newW, newH); - } - // invalidate()/validate() needed pre-1.6. - wind.invalidate(); - wind.validate(); - } - origPos.setLocation(newPos); - } - - @Override - public void mousePressed(MouseEvent e) { - origPos = e.getPoint(); - SwingUtilities.convertPointToScreen(origPos, SizeGrip.this); - } - - @Override - public void mouseReleased(MouseEvent e) { - origPos = null; - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/TipUtil.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/TipUtil.java deleted file mode 100644 index 75c806e..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/TipUtil.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 08/13/2009 - * - * TipUtil.java - Utility methods for homemade tool tips. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.focusabletip; - -import java.awt.Color; -import java.awt.Font; -import java.awt.GraphicsConfiguration; -import java.awt.GraphicsDevice; -import java.awt.GraphicsEnvironment; -import java.awt.Rectangle; -import java.awt.SystemColor; -import javax.swing.BorderFactory; -import javax.swing.JEditorPane; -import javax.swing.UIManager; -import javax.swing.border.Border; -import javax.swing.plaf.ColorUIResource; -import javax.swing.text.html.HTMLDocument; - -import org.fife.ui.rsyntaxtextarea.RSyntaxUtilities; - - -/** - * Static utility methods for focusable tips. - * - * @author Robert Futrell - * @version 1.0 - */ -public class TipUtil { - - - private TipUtil() { - } - - - /** - * Returns a hex string for the specified color, suitable for HTML. - * - * @param c The color. - * @return The string representation, in the form "#rrggbb", - * or null if c is null. - */ - private static final String getHexString(Color c) { - - if (c==null) { - return null; - } - - StringBuilder sb = new StringBuilder("#"); - int r = c.getRed(); - if (r<16) { - sb.append('0'); - } - sb.append(Integer.toHexString(r)); - int g = c.getGreen(); - if (g<16) { - sb.append('0'); - } - sb.append(Integer.toHexString(g)); - int b = c.getBlue(); - if (b<16) { - sb.append('0'); - } - sb.append(Integer.toHexString(b)); - - return sb.toString(); - - } - - - /** - * Returns the screen coordinates for the monitor that contains the - * specified point. This is useful for setups with multiple monitors, - * to ensure that popup windows are positioned properly. - * - * @param x The x-coordinate, in screen coordinates. - * @param y The y-coordinate, in screen coordinates. - * @return The bounds of the monitor that contains the specified point. - */ - public static Rectangle getScreenBoundsForPoint(int x, int y) { - GraphicsEnvironment env = GraphicsEnvironment. - getLocalGraphicsEnvironment(); - GraphicsDevice[] devices = env.getScreenDevices(); - for (int i=0; iJEditorPane so it can be used to render the - * content in a focusable pseudo-tool tip. It is assumed that the editor - * pane is using an HTMLDocument. - * - * @param textArea The editor pane to tweak. - */ - public static void tweakTipEditorPane(JEditorPane textArea) { - - // Jump through a few hoops to get things looking nice in Nimbus - boolean isNimbus = isNimbusLookAndFeel(); - if (isNimbus) { - Color selBG = textArea.getSelectionColor(); - Color selFG = textArea.getSelectedTextColor(); - textArea.setUI(new javax.swing.plaf.basic.BasicEditorPaneUI()); - textArea.setSelectedTextColor(selFG); - textArea.setSelectionColor(selBG); - } - - textArea.setEditable(false); // Required for links to work! - textArea.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); - - // Make selection visible even though we are not (initially) focusable. - textArea.getCaret().setSelectionVisible(true); - - // Set the foreground color. Important because when rendering HTML, - // default foreground becomes black, which may not match all LAF's - // (e.g. Substance). - Color fg = UIManager.getColor("Label.foreground"); - if (fg==null || (isNimbus && isDerivedColor(fg))) { - fg = SystemColor.textText; - } - textArea.setForeground(fg); - - // Make it use the "tool tip" background color. - textArea.setBackground(TipUtil.getToolTipBackground()); - - // Force JEditorPane to use a certain font even in HTML. - // All standard LookAndFeels, even Nimbus (!), define Label.font. - Font font = UIManager.getFont("Label.font"); - if (font == null) { // Try to make a sensible default - font = new Font("SansSerif", Font.PLAIN, 12); - } - HTMLDocument doc = (HTMLDocument) textArea.getDocument(); - doc.getStyleSheet().addRule( - "body { font-family: " + font.getFamily() + - "; font-size: " + font.getSize() + "pt" + - "; color: " + getHexString(fg) + "; }"); - - // Always add link foreground rule. Unfortunately these CSS rules - // stack each time the LaF is changed (how can we overwrite them - // without clearing out the important "standard" ones?). - Color linkFG = RSyntaxUtilities.getHyperlinkForeground(); - doc.getStyleSheet().addRule( - "a { color: " + getHexString(linkFG) + "; }"); - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/osx_sizegrip.png b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/osx_sizegrip.png deleted file mode 100644 index 07fa8b19e32736a66b30471f5d4410a6fc310ab8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4876 zcmeH~_dnEuAICq)5i(MeY_dm2GBVD}=A3M@M|Ae-PT|bUj0%Ob_m(c3vN8`BXOBzS zBYXSy{Wrdk@B8t1zhCe7jOaaKU3U209d#U0BA-42%!dm(SN&VX_cvJfalfIA@mq%?uvWT-g7egesAj9PAten&4;HvHQv$M;+mMVf2?hLa$!1`=eOglIL*@O$}lsq)m9SKaDStfas@R9c5e^p}ziY{$3>?R8#q)eU{;Krb^o zv>{kT4U7F5UXOm>;}N|LoqQ3U1(BPWjg^Pf1Jd`tbwmTepc(qhV{ekJVaL*EbcsNq zG8)R+qOYvX?UY6Cz`1I`t>$P^EaP0VUMuAsLJsWTBeCng;PI=V2u;2o`hH2dcJ?!{ zgC%>Ld6MY)%{QpR&RUTKqZ2dD&8&F`_<2@QLGI%QD*-&M=cX*1YQB7d0DuE?X!Oe? zPT!sFgRpNHvYq);h3)euF3xD9PzEV=U>ik-+S9XbntWs zy?bWOY4#Q>0GvJTbUzABi+ov>k2U#RSF4w>5s0vgG}X9$KSnZ7Cx0zs3UWXso0rzF zi>Y%D@NN`6B?T=;dC`?HPjiS#kUZJc>mRUZGDr!mK*fJ~F;rs_^e`HlP|!n>VJ|ky zpU{AT=hZ9!P1|+aNj}0JzL7)Vz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wtiAl+nEEDhl+tJci z2b%~$9qly9Xa+KhL!C%u3`|5lX^Kh9X;=kFIhASwske!qAVzee69|n9a{|TDNrf{A o;Ye=-C6RV$AdJqRLgAAa$@~opi9``}=YO$kYZ$0ks@jG92OQi35dZ)H diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/package.html b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/package.html deleted file mode 100644 index 062c3eb..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/focusabletip/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - - An implementation of a focusable tooltip. - - diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/CurlyFoldParser.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/CurlyFoldParser.java deleted file mode 100644 index 5143882..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/CurlyFoldParser.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * 10/08/2011 - * - * CurlyFoldParser.java - Fold parser for languages with C-style syntax. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.folding; - -import java.util.ArrayList; -import java.util.List; -import javax.swing.text.BadLocationException; - -import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; -import org.fife.ui.rsyntaxtextarea.Token; -import org.fife.ui.rsyntaxtextarea.TokenMaker; - - -/** - * A basic fold parser that can be used for languages such as C, that use - * curly braces to denote code blocks. This parser searches for curly brace - * pairs and creates code folds out of them. It can also optionally find - * C-style multi-line comments ("/* ... */") and make them - * foldable as well.

- * - * This parser knows nothing about language semantics; it uses - * RSyntaxTextArea's syntax highlighting tokens to identify - * curly braces. By default, it looks for single-char tokens of type - * {@link Token#SEPARATOR}, with lexemes '{' or '}'. - * If your {@link TokenMaker} uses a different token type for curly braces, you - * should override the {@link #isLeftCurly(Token)} and - * {@link #isRightCurly(Token)} methods with your own definitions. In theory, - * you could extend this fold parser to parse languages that use completely - * different tokens than curly braces to denote foldable regions by overriding - * those two methods.

- * - * Note also that this class may impose somewhat of a performance penalty on - * large source files, since it re-parses the entire document each time folds - * are reevaluated. - * - * @author Robert Futrell - * @version 1.0 - */ -public class CurlyFoldParser implements FoldParser { - - /** - * Whether to scan for C-style multi-line comments and make them foldable. - */ - private boolean foldableMultiLineComments; - - /** - * Whether this parser is folding Java. - */ - private final boolean java; - - /** - * Used to find import statements when folding Java code. - */ - private static final char[] KEYWORD_IMPORT = "import".toCharArray(); - - /** - * Ending of a multi-line comment in C, C++, Java, etc. - */ - protected static final char[] C_MLC_END = "*/".toCharArray(); - - - /** - * Creates a fold parser that identifies foldable regions via curly braces - * as well as C-style multi-line comments. - */ - public CurlyFoldParser() { - this(true, false); - } - - - /** - * Constructor. - * - * @param cStyleMultiLineComments Whether to scan for C-style multi-line - * comments and make them foldable. - * @param java Whether this parser is folding Java. This adds extra - * parsing rules, such as grouping all import statements into a - * fold section. - */ - public CurlyFoldParser(boolean cStyleMultiLineComments, boolean java) { - this.foldableMultiLineComments = cStyleMultiLineComments; - this.java = java; - } - - - /** - * Returns whether multi-line comments are foldable with this parser. - * - * @return Whether multi-line comments are foldable. - * @see #setFoldableMultiLineComments(boolean) - */ - public boolean getFoldableMultiLineComments() { - return foldableMultiLineComments; - } - - - /** - * {@inheritDoc} - */ - public List getFolds(RSyntaxTextArea textArea) { - - List folds = new ArrayList(); - - Fold currentFold = null; - int lineCount = textArea.getLineCount(); - boolean inMLC = false; - int mlcStart = 0; - int importStartLine = -1; - int lastSeenImportLine = -1; - int importGroupStartOffs = -1; - int importGroupEndOffs = -1; - - try { - - for (int line=0; line-1) { - if (lastSeenImportLine>importStartLine) { - Fold fold = null; - // Any imports found *should* be a top-level fold, - // but we're extra lenient here and allow groups - // of them anywhere to keep our parser better-behaved - // if they have random "imports" throughout code. - if (currentFold==null) { - fold = new Fold(FoldType.IMPORTS, - textArea, importGroupStartOffs); - folds.add(fold); - } - else { - fold = currentFold.createChild(FoldType.IMPORTS, - importGroupStartOffs); - } - fold.setEndOffset(importGroupEndOffs); - } - importStartLine = lastSeenImportLine = - importGroupStartOffs = importGroupEndOffs = -1; - } - - } - - if (inMLC) { - // If we found the end of an MLC that started - // on a previous line... - if (t.endsWith(C_MLC_END)) { - int mlcEnd = t.getEndOffset() - 1; - if (currentFold==null) { - currentFold = new Fold(FoldType.COMMENT, textArea, mlcStart); - currentFold.setEndOffset(mlcEnd); - folds.add(currentFold); - currentFold = null; - } - else { - currentFold = currentFold.createChild(FoldType.COMMENT, mlcStart); - currentFold.setEndOffset(mlcEnd); - currentFold = currentFold.getParent(); - } - //System.out.println("Ending MLC at: " + mlcEnd + ", parent==" + currentFold); - inMLC = false; - mlcStart = 0; - } - // Otherwise, this MLC is continuing on to yet - // another line. - } - else { - // If we're an MLC that ends on a later line... - if (t.getType()!=Token.COMMENT_EOL && !t.endsWith(C_MLC_END)) { - //System.out.println("Starting MLC at: " + t.offset); - inMLC = true; - mlcStart = t.getOffset(); - } - } - - } - - else if (isLeftCurly(t)) { - - // Java-specific stuff - if (java) { - - if (importStartLine>-1) { - if (lastSeenImportLine>importStartLine) { - Fold fold = null; - // Any imports found *should* be a top-level fold, - // but we're extra lenient here and allow groups - // of them anywhere to keep our parser better-behaved - // if they have random "imports" throughout code. - if (currentFold==null) { - fold = new Fold(FoldType.IMPORTS, - textArea, importGroupStartOffs); - folds.add(fold); - } - else { - fold = currentFold.createChild(FoldType.IMPORTS, - importGroupStartOffs); - } - fold.setEndOffset(importGroupEndOffs); - } - importStartLine = lastSeenImportLine = - importGroupStartOffs = importGroupEndOffs = -1; - } - - } - - if (currentFold==null) { - currentFold = new Fold(FoldType.CODE, textArea, t.getOffset()); - folds.add(currentFold); - } - else { - currentFold = currentFold.createChild(FoldType.CODE, t.getOffset()); - } - - } - - else if (isRightCurly(t)) { - - if (currentFold!=null) { - currentFold.setEndOffset(t.getOffset()); - Fold parentFold = currentFold.getParent(); - //System.out.println("... Adding regular fold at " + t.offset + ", parent==" + parentFold); - // Don't add fold markers for single-line blocks - if (currentFold.isOnSingleLine()) { - if (!currentFold.removeFromParent()) { - folds.remove(folds.size()-1); - } - } - currentFold = parentFold; - } - - } - - // Java-specific folding rules - else if (java) { - - if (t.is(Token.RESERVED_WORD, KEYWORD_IMPORT)) { - if (importStartLine==-1) { - importStartLine = line; - importGroupStartOffs = t.getOffset(); - importGroupEndOffs = t.getOffset(); - } - lastSeenImportLine = line; - } - - else if (importStartLine>-1 && - t.isIdentifier() &&//SEPARATOR && - t.isSingleChar(';')) { - importGroupEndOffs = t.getOffset(); - } - - } - - t = t.getNextToken(); - - } - - } - - } catch (BadLocationException ble) { // Should never happen - ble.printStackTrace(); - } - - return folds; - - } - - - /** - * Returns whether the token is a left curly brace. This method exists - * so subclasses can provide their own curly brace definition. - * - * @param t The token. - * @return Whether it is a left curly brace. - * @see #isRightCurly(Token) - */ - public boolean isLeftCurly(Token t) { - return t.isLeftCurly(); - } - - - /** - * Returns whether the token is a right curly brace. This method exists - * so subclasses can provide their own curly brace definition. - * - * @param t The token. - * @return Whether it is a right curly brace. - * @see #isLeftCurly(Token) - */ - public boolean isRightCurly(Token t) { - return t.isRightCurly(); - } - - - /** - * Sets whether multi-line comments are foldable with this parser. - * - * @param foldable Whether multi-line comments are foldable. - * @see #getFoldableMultiLineComments() - */ - public void setFoldableMultiLineComments(boolean foldable) { - this.foldableMultiLineComments = foldable; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/Fold.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/Fold.java deleted file mode 100644 index fe81c01..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/Fold.java +++ /dev/null @@ -1,567 +0,0 @@ -/* - * 10/08/2011 - * - * Fold.java - A foldable region of text in an RSyntaxTextArea instance. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.folding; - -import java.util.ArrayList; -import java.util.List; -import javax.swing.text.BadLocationException; -import javax.swing.text.Element; -import javax.swing.text.Position; - -import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; - - -/** - * Information about a foldable region.

- * - * A Fold has zero or more children, and Folds thus - * form a hierarchical structure, with "parent" folds containing the info about - * any "child" folds they contain.

- * - * Fold regions are denoted by a starting and ending offset, but the actual - * folding is done on a per-line basis, so Fold instances provide - * methods for retrieving both starting and ending offsets and lines. The - * starting and ending offsets/lines are "sticky" and correctly track their - * positions even as the document is modified. - * - * @author Robert Futrell - * @version 1.0 - */ -public class Fold implements Comparable { - - private int type; - private RSyntaxTextArea textArea; - private Position startOffs; - private Position endOffs; - private Fold parent; - private List children; - private boolean collapsed; - private int childCollapsedLineCount; - - private int lastStartOffs = -1; - private int cachedStartLine; - - private int lastEndOffs = -1; - private int cachedEndLine; - - - public Fold(int type, RSyntaxTextArea textArea, int startOffs) - throws BadLocationException { - this.type = type; - this.textArea = textArea; - this.startOffs = textArea.getDocument().createPosition(startOffs); - } - - - /** - * Creates a fold that is a child of this one. - * - * @param type The type of fold. - * @param startOffs The starting offset of the fold. - * @return The child fold. - * @throws BadLocationException If startOffs is invalid. - * @see FoldType - */ - public Fold createChild(int type, int startOffs) throws BadLocationException { - Fold child = new Fold(type, textArea, startOffs); - child.parent = this; - if (children==null) { - children = new ArrayList(); - } - children.add(child); - return child; - } - - - /** - * Two folds are considered equal if they start at the same offset. - * - * @param otherFold Another fold to compare this one to. - * @return How this fold compares to the other. - */ - public int compareTo(Fold otherFold) { - int result = -1; - if (otherFold!=null) { - result = startOffs.getOffset() - otherFold.startOffs.getOffset(); - //result = getStartLine() - otherFold.getStartLine(); - } - return result; - } - - - /** - * Returns whether the specified line would be hidden in this fold. Since - * RSTA displays the "first" line in a fold, this means that the line must - * must be between (getStartLine()+1) and - * getEndLine(), inclusive. - * - * @param line The line to check. - * @return Whether the line would be hidden if this fold is collapsed. - * @see #containsOffset(int) - * @see #containsOrStartsOnLine(int) - */ - public boolean containsLine(int line) { - return line>getStartLine() && line<=getEndLine(); - } - - - /** - * Returns whether the given line is in the range - * [getStartLine(), getEndLine()], inclusive. - * - * @param line The line to check. - * @return Whether this fold contains, or starts on, the line. - * @see #containsLine(int) - */ - public boolean containsOrStartsOnLine(int line) { - return line>=getStartLine() && line<=getEndLine(); - } - - - /** - * Returns whether the specified offset is "inside" the fold. This method - * returns true if the offset is greater than the fold start - * offset, and no further than the last offset of the last folded line. - * - * @param offs The offset to check. - * @return Whether the offset is "inside" the fold. - * @see #containsLine(int) - */ - public boolean containsOffset(int offs) { - boolean contained = false; - if (offs>getStartOffset()) { - // Use Elements to avoid BadLocationExceptions - Element root = textArea.getDocument().getDefaultRootElement(); - int line = root.getElementIndex(offs); - contained = line<=getEndLine(); - } - return contained; - } - - - /** - * Two folds are considered equal if they have the same starting offset. - * - * @param otherFold Another fold to compare this one to. - * @return Whether the two folds are equal. - * @see #compareTo(Fold) - */ - @Override - public boolean equals(Object otherFold) { - return otherFold instanceof Fold && compareTo((Fold)otherFold)==0; - } - - - /** - * Returns a specific child fold. - * - * @param index The index of the child fold. - * @return The child fold. - * @see #getChildCount() - */ - public Fold getChild(int index) { - return children.get(index); - } - - - /** - * Returns the number of child folds. - * - * @return The number of child folds. - * @see #getChild(int) - */ - public int getChildCount() { - return children==null ? 0 : children.size(); - } - - - /** - * Returns the array of child folds. This is a shallow copy. - * - * @return The array of child folds, or null if there are - * none. - */ - List getChildren() { - return children; - } - - - /** - * Returns the number of collapsed lines under this fold. If this fold - * is collapsed, this method returns {@link #getLineCount()}, otherwise - * it returns the sum of all collapsed lines of all child folds of this - * one.

- * - * The value returned is cached, so this method returns quickly and - * shouldn't affect performance. - * - * @return The number of collapsed lines under this fold. - */ - public int getCollapsedLineCount() { - return collapsed ? getLineCount() : childCollapsedLineCount; - } - - - /** - * Returns the "deepest" fold containing the specified offset. It is - * assumed that it's already been verified that offs is indeed - * contained in this fold. - * - * @param offs The offset. - * @return The fold, or null if no child fold also contains - * the offset. - * @see FoldManager#getDeepestFoldContaining(int) - */ - Fold getDeepestFoldContaining(int offs) { - Fold deepestFold = this; - for (int i=0; ioffs is - * indeed contained in this fold. - * - * @param offs The offset. - * @return The fold, or null if no open fold contains the - * offset. - * @see FoldManager#getDeepestOpenFoldContaining(int) - */ - Fold getDeepestOpenFoldContaining(int offs) { - - Fold deepestFold = this; - - for (int i=0; i - * - * The value returned by this method will automatically update as the - * text area's contents are modified, to track the ending line of the - * code block. - * - * @return The end line of this code block. - * @see #getEndOffset() - * @see #getStartLine() - */ - public int getEndLine() { - int endOffs = getEndOffset(); - if (lastEndOffs==endOffs) { - return cachedEndLine; - } - lastEndOffs = endOffs; - Element root = textArea.getDocument().getDefaultRootElement(); - return cachedEndLine = root.getElementIndex(endOffs); - } - - - /** - * Returns the end offset of this fold. For example, in languages such as - * C and Java, this might be the offset of the closing curly brace of a - * code block.

- * - * The value returned by this method will automatically update as the - * text area's contents are modified, to track the ending offset of the - * code block. - * - * @return The end offset of this code block, or {@link Integer#MAX_VALUE} - * if this fold region isn't closed properly. The latter causes - * this fold to collapsed all lines through the end of the file. - * @see #getEndLine() - * @see #getStartOffset() - */ - public int getEndOffset() { - return endOffs!=null ? endOffs.getOffset() : Integer.MAX_VALUE; - } - - - /** - * Returns the type of fold this is. This will be one of the values in - * {@link FoldType}, or a user-defined value. - * - * @return The type of fold this is. - */ - public int getFoldType() { - return type; - } - - - /** - * Returns whether this fold has any child folds. - * - * @return Whether this fold has any children. - * @see #getChildCount() - */ - public boolean getHasChildFolds() { - return getChildCount()>0; - } - - - /** - * Returns the last child fold. - * - * @return The last child fold, or null if this fold does not - * have any children. - * @see #getChild(int) - * @see #getHasChildFolds() - */ - public Fold getLastChild() { - int childCount = getChildCount(); - return childCount==0 ? null : getChild(childCount-1); - } - - - /** - * Returns the number of lines that are hidden when this fold is - * collapsed. - * - * @return The number of lines hidden. - * @see #getStartLine() - * @see #getEndLine() - */ - public int getLineCount() { - return getEndLine() - getStartLine(); - } - - - /** - * Returns the parent fold of this one. - * - * @return The parent fold, or null if this is a top-level - * fold. - */ - public Fold getParent() { - return parent; - } - - - /** - * Returns the starting line of this fold region. This is the only line - * in the fold region that is not hidden when a fold is collapsed.

- * - * The value returned by this method will automatically update as the - * text area's contents are modified, to track the starting line of the - * code block. - * - * @return The starting line of the code block. - * @see #getEndLine() - * @see #getStartOffset() - */ - public int getStartLine() { - int startOffs = getStartOffset(); - if (lastStartOffs==startOffs) { - return cachedStartLine; - } - lastStartOffs = startOffs; - Element root = textArea.getDocument().getDefaultRootElement(); - return cachedStartLine = root.getElementIndex(startOffs); - } - - - /** - * Returns the starting offset of this fold region. For example, for - * languages such as C and Java, this would be the offset of the opening - * curly brace of a code block.

- * - * The value returned by this method will automatically update as the - * text area's contents are modified, to track the starting offset of the - * code block. - * - * @return The start offset of this fold. - * @see #getStartLine() - * @see #getEndOffset() - */ - public int getStartOffset() { - return startOffs.getOffset(); - } - - - @Override - public int hashCode() { - return getStartLine(); - } - - - /** - * Returns whether this fold is collapsed. - * - * @return Whether this fold is collapsed. - * @see #setCollapsed(boolean) - * @see #toggleCollapsedState() - */ - public boolean isCollapsed() { - return collapsed; - } - - - /** - * Returns whether this fold is entirely on a single line. In general, - * a {@link FoldParser} should not remember fold regions all on a single - * line, since there's really nothing to fold. - * - * @return Whether this fold is on a single line. - * @see #removeFromParent() - */ - public boolean isOnSingleLine() { - return getStartLine()==getEndLine(); - } - - - /** - * Removes this fold from its parent. This should only be called by - * {@link FoldParser} implementations if they determine that a fold is all - * on a single line (and thus shouldn't be remembered) after creating it. - * - * @return Whether this fold had a parent to be removed from. - * @see #isOnSingleLine() - */ - public boolean removeFromParent() { - if (parent!=null) { - parent.removeMostRecentChild(); - parent = null; - return true; - } - return false; - } - - - private void removeMostRecentChild() { - children.remove(children.size()-1); - } - - - /** - * Sets whether this Fold is collapsed. Calling this method - * will update both the text area and all Gutter components. - * - * @param collapsed Whether this fold should be collapsed. - * @see #isCollapsed() - * @see #toggleCollapsedState() - */ - public void setCollapsed(boolean collapsed) { - - if (collapsed!=this.collapsed) { - - // Change our fold state and cached info about folded line count. - int lineCount = getLineCount(); - int linesToCollapse = lineCount - childCollapsedLineCount; - if (!collapsed) { // If we're expanding - linesToCollapse = -linesToCollapse; - } - //System.out.println("Hiding lines: " + linesToCollapse + - // " (" + lineCount + ", " + linesToCollapse + ")"); - this.collapsed = collapsed; - if (parent!=null) { - parent.updateChildCollapsedLineCount(linesToCollapse); - } - - // If an end point of the selection is being hidden, move the caret - // "out" of the fold. - if (collapsed) { - int dot = textArea.getSelectionStart(); // Forgive variable name - Element root = textArea.getDocument().getDefaultRootElement(); - int dotLine = root.getElementIndex(dot); - boolean updateCaret = containsLine(dotLine); - if (!updateCaret) { - int mark = textArea.getSelectionEnd(); - if (mark!=dot) { - int markLine = root.getElementIndex(mark); - updateCaret = containsLine(markLine); - } - } - if (updateCaret) { - dot = root.getElement(getStartLine()).getEndOffset() - 1; - textArea.setCaretPosition(dot); - } - } - - textArea.foldToggled(this); - - } - - } - - - /** - * Sets the ending offset of this fold, such as the closing curly brace - * of a code block in C or Java. {@link FoldParser} implementations should - * call this on an existing Fold upon finding its end. If - * this method isn't called, then this Fold is considered to - * have no end, i.e., it will collapse everything to the end of the file. - * - * @param endOffs The end offset of this fold. - * @throws BadLocationException If endOffs is not a valid - * location in the text area. - */ - public void setEndOffset(int endOffs) throws BadLocationException { - this.endOffs = textArea.getDocument().createPosition(endOffs); - } - - - /** - * Toggles the collapsed state of this fold. - * - * @see #setCollapsed(boolean) - */ - public void toggleCollapsedState() { - setCollapsed(!collapsed); - } - - - private void updateChildCollapsedLineCount(int count) { - childCollapsedLineCount += count; - //if (childCollapsedLineCount>getLineCount()) { - // Thread.dumpStack(); - //} - if (!collapsed && parent!=null) { - parent.updateChildCollapsedLineCount(count); - } - } - - - /** - * Overridden for debugging purposes. - * - * @return A string representation of this Fold. - */ - @Override - public String toString() { - return "[Fold: " + - "startOffs=" + getStartOffset() + - ", endOffs=" + getEndOffset() + - ", collapsed=" + collapsed + - "]"; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/FoldCollapser.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/FoldCollapser.java deleted file mode 100644 index b3e44ba..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/FoldCollapser.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 10/23/2011 - * - * FoldCollapser.java - Goes through an RSTA instance and collapses folds of - * specific types, such as comments. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.folding; - -import java.util.ArrayList; -import java.util.List; - - -/** - * Collapses folds based on their type. You can create an instance of this - * class to collapse all comment blocks when opening a new file, for example. - * - * @author Robert Futrell - * @version 1.0 - */ -public class FoldCollapser { - - private List typesToCollapse; - - - /** - * Creates an instance that collapses all comment blocks. - */ - public FoldCollapser() { - this(FoldType.COMMENT); - } - - - /** - * Creates an instance that collapses all blocks of the specified - * type. - * - * @param typeToCollapse The type to collapse. - * @see FoldType - */ - public FoldCollapser(int typeToCollapse) { - typesToCollapse = new ArrayList(3); - addTypeToCollapse(typeToCollapse); - } - - - /** - * Adds a type of fold to collapse. - * - * @param typeToCollapse The type of fold to collapse. - */ - public void addTypeToCollapse(int typeToCollapse) { - typesToCollapse.add(Integer.valueOf(typeToCollapse)); - } - - - /** - * Collapses any relevant folds known by the fold manager. - * - * @param fm The fold manager. - */ - public void collapseFolds(FoldManager fm) { - for (int i=0; i folds; - private boolean codeFoldingEnabled; - private PropertyChangeSupport support; - private Listener l; - - - /** - * Property fired when folds have been updated. - */ - public static final String PROPERTY_FOLDS_UPDATED = "FoldsUpdated"; - - - /** - * Constructor. - * - * @param textArea The text area whose folds we are managing. - */ - public FoldManager(RSyntaxTextArea textArea) { - this.textArea = textArea; - support = new PropertyChangeSupport(this); - l = new Listener(); - textArea.getDocument().addDocumentListener(l); - textArea.addPropertyChangeListener(RSyntaxTextArea.SYNTAX_STYLE_PROPERTY, l); - textArea.addPropertyChangeListener("document", l); - folds = new ArrayList(); - updateFoldParser(); - } - - - /** - * Adds a property change listener to this fold manager. - * - * @param l The new listener. - * @see #removePropertyChangeListener(PropertyChangeListener) - */ - public void addPropertyChangeListener(PropertyChangeListener l) { - support.addPropertyChangeListener(l); - } - - - /** - * Removes all folds. - */ - public void clear() { - folds.clear(); - } - - - /** - * Ensures that the specified offset is not hidden in a collapsed fold. - * Any folds containing this offset that are collapsed will be expanded. - * - * @param offs The offset. - * @return Whether any folds had to be opened. - * @see #getDeepestFoldContaining(int) - */ - public boolean ensureOffsetNotInClosedFold(int offs) { - boolean foldsOpened = false; - Fold fold = getDeepestFoldContaining(offs); - while (fold!=null) { - if (fold.isCollapsed()) { - fold.setCollapsed(false); - foldsOpened = true; - } - fold = fold.getParent(); - } - return foldsOpened; - } - - - /** - * Returns the "deepest" nested fold containing the specified offset. - * - * @param offs The offset. - * @return The deepest fold containing the offset, or null if - * no fold contains the offset. - */ - public Fold getDeepestFoldContaining(int offs) { - Fold deepestFold = null; - if (offs>-1) { - for (int i=0; inull if no open fold contains the - * offset. - */ - public Fold getDeepestOpenFoldContaining(int offs) { - - Fold deepestFold = null; - - if (offs>-1) { - for (int i=0; inull if the line is not the start - * of a fold region. - * @see #isFoldStartLine(int) - */ - public Fold getFoldForLine(int line) { - return getFoldForLineImpl(null, folds, line); - } - - -private Fold getFoldForLineImpl(Fold parent, List folds, int line) { - - int low = 0; - int high = folds.size() - 1; - - while (low <= high) { - int mid = (low + high) >> 1; - Fold midFold = folds.get(mid); - int startLine = midFold.getStartLine(); - if (line==startLine) { - return midFold; - } - else if (line=endLine) { - low = mid + 1; - } - else { // line>startLine && line<=endLine - List children = midFold.getChildren(); - return children!=null ? getFoldForLineImpl(midFold, children, line) : null; - } - } - } - - return null; // No fold for this line -} - - - /** - * Returns the total number of hidden (folded) lines. - * - * @return The total number of hidden (folded) lines. - * @see #getHiddenLineCountAbove(int) - */ - public int getHiddenLineCount() { - int count = 0; - for (Fold fold : folds) { - count += fold.getCollapsedLineCount(); - } - return count; - } - - - /** - * Returns the number of lines "hidden" by collapsed folds above the - * specified line. - * - * @param line The line. This is the line number for a logical line. - * For the line number of a physical line (i.e. visible, not folded), - * use getHiddenLineCountAbove(int, true). - * @return The number of lines hidden in folds above line. - * @see #getHiddenLineCountAbove(int, boolean) - */ - public int getHiddenLineCountAbove(int line) { - return getHiddenLineCountAbove(line, false); - } - - - /** - * Returns the number of lines "hidden" by collapsed folds above the - * specified line. - * - * @param line The line. - * @param physical Whether line is the number of a physical - * line (i.e. visible, not code-folded), or a logical one (i.e. any - * line from the model). If line was determined by a - * raw line calculation (i.e. (visibleTopY / lineHeight)), - * this value should be true. It should be - * false when it was calculated from an offset in the - * document (for example). - * @return The number of lines hidden in folds above line. - */ - public int getHiddenLineCountAbove(int line, boolean physical) { - - int count = 0; - - for (Fold fold : folds) { - int comp = physical ? line+count : line; - if (fold.getStartLine()>=comp) { - break; - } - count += getHiddenLineCountAboveImpl(fold, comp, physical); - } - - return count; - - } - - - /** - * Returns the number of lines "hidden" by collapsed folds above the - * specified line. - * - * @param fold The current fold in the recursive algorithm. It and its - * children are examined. - * @param line The line. - * @param physical Whether line is the number of a physical - * line (i.e. visible, not code-folded), or a logical one (i.e. any - * line from the model). If line was determined by a - * raw line calculation (i.e. (visibleTopY / lineHeight)), - * this value should be true. It should be - * false when it was calculated from an offset in the - * document (for example). - * @return The number of lines hidden in folds that are descendants of - * fold, or fold itself, above - * line. - */ - private int getHiddenLineCountAboveImpl(Fold fold, int line, boolean physical) { - - int count = 0; - - if (fold.getEndLine()=comp) { - break; - } - count += getHiddenLineCountAboveImpl(child, comp, physical); - } - } - - return count; - - } - - - /** - * Returns the last visible line in the text area, taking into account - * folds. - * - * @return The last visible line. - */ - public int getLastVisibleLine() { - - int lastLine = textArea.getLineCount() - 1; - - if (isCodeFoldingSupportedAndEnabled()) { - int foldCount = getFoldCount(); - if (foldCount>0) { - Fold lastFold = getFold(foldCount-1); - if (lastFold.containsLine(lastLine)) { - if (lastFold.isCollapsed()) { - lastLine = lastFold.getStartLine(); - } - else { // Child fold may end on the same line as parent - while (lastFold.getHasChildFolds()) { - lastFold = lastFold.getLastChild(); - if (lastFold.containsLine(lastLine)) { - if (lastFold.isCollapsed()) { - lastLine = lastFold.getStartLine(); - break; - } - } - else { // Higher up - break; - } - } - } - } - } - } - - return lastLine; - - } - - - public int getVisibleLineAbove(int line) { - - if (line<=0 || line>=textArea.getLineCount()) { - return -1; - } - - do { - line--; - } while (line>=0 && isLineHidden(line)); - - return line; - - } - - - public int getVisibleLineBelow(int line) { - - int lineCount = textArea.getLineCount(); - if (line<0 || line>=lineCount-1) { - return -1; - } - - do { - line++; - } while (line> 1; -// Fold midVal = (Fold)allFolds.get(mid); -// if (midVal.containsLine(line)) { -// return mid; -// } -// if (line<=midVal.getStartLine()) { -// high = mid - 1; -// } -// else { // line > midVal.getEndLine() -// low = mid + 1; -// } -// } -// -// return -(low + 1); // key not found -// -// } - - - /** - * Returns whether code folding is enabled. Note that only certain - * languages support code folding; those that do not will ignore this - * property. - * - * @return Whether code folding is enabled. - * @see #setCodeFoldingEnabled(boolean) - */ - public boolean isCodeFoldingEnabled() { - return codeFoldingEnabled; - } - - - /** - * Returns true if and only if code folding is enabled for - * this text area, AND folding is supported for the language it is editing. - * Whether or not folding is supported for a language depends on whether - * a fold parser is registered for that language with the - * FoldParserManager. - * - * @return Whether folding is supported and enabled for this text area. - * @see FoldParserManager - */ - public boolean isCodeFoldingSupportedAndEnabled() { - return codeFoldingEnabled && parser!=null; - } - - - /** - * Returns whether the specified line contains the start of a fold region. - * - * @param line The line. - * @return Whether the line contains the start of a fold region. - * @see #getFoldForLine(int) - */ - public boolean isFoldStartLine(int line) { - return getFoldForLine(line)!=null; - } - - - /** - * Returns whether a line is hidden in a collapsed fold. - * - * @param line The line to check. - * @return Whether the line is hidden in a collapsed fold. - */ - public boolean isLineHidden(int line) { - for (Fold fold : folds) { - if (fold.containsLine(line)) { - if (fold.isCollapsed()) { - return true; - } - else { - return isLineHiddenImpl(fold, line); - } - } - } - return false; - } - - - private boolean isLineHiddenImpl(Fold parent, int line) { - for (int i=0; i oldFolds) { - int previousLoc = Collections.binarySearch(oldFolds, newFold); - //System.out.println(newFold + " => " + previousLoc); - if (previousLoc>=0) { - Fold prevFold = oldFolds.get(previousLoc); - newFold.setCollapsed(prevFold.isCollapsed()); - } - else { - //previousLoc = -(insertion point) - 1; - int insertionPoint = -(previousLoc + 1); - if (insertionPoint>0) { - Fold possibleParentFold = oldFolds.get(insertionPoint-1); - if (possibleParentFold.containsOffset( - newFold.getStartOffset())) { - List children = possibleParentFold.getChildren(); - if (children!=null) { - keepFoldState(newFold, children); - } - } - } - } - } - - - /** - * Called when new folds come in from the fold parser. Checks whether any - * folds from the "old" fold list are still in the "new" list; if so, their - * collapsed state is preserved. - * - * @param newFolds The "new" folds after an edit occurred. This cannot be - * null. - * @param oldFolds The previous folds before the edit occurred. - */ - private void keepFoldStates(List newFolds, List oldFolds) { - for (Fold newFold : newFolds) { - keepFoldState(newFold, folds); - List newChildFolds = newFold.getChildren(); - if (newChildFolds!=null) { - keepFoldStates(newChildFolds, oldFolds); - } - } - } - - - /** - * Removes a property change listener from this fold manager. - * - * @param l The listener to remove. - * @see #addPropertyChangeListener(PropertyChangeListener) - */ - public void removePropertyChangeListener(PropertyChangeListener l) { - support.removePropertyChangeListener(l); - } - - - /** - * Forces an immediate reparsing for folds, if folding is enabled. This - * usually does not need to be called by the programmer, since fold - * parsing is done automatically by RSTA. - */ - public void reparse() { - - if (codeFoldingEnabled && parser!=null) { - - // Re-calculate folds. Keep the fold state of folds that are - // still around. - List newFolds = parser.getFolds(textArea); - if (newFolds==null) { - newFolds = Collections.emptyList(); - } - else { - keepFoldStates(newFolds, folds); - } - folds = newFolds; - - // Let folks (gutter, etc.) know that folds have been updated. - support.firePropertyChange(PROPERTY_FOLDS_UPDATED, null, folds); - textArea.repaint(); - - } - else { - folds.clear(); - } - - } - - - /** - * Sets whether code folding is enabled. Note that only certain - * languages will support code folding out of the box. Those languages - * which do not support folding will ignore this property. - * - * @param enabled Whether code folding should be enabled. - * @see #isCodeFoldingEnabled() - */ - public void setCodeFoldingEnabled(boolean enabled) { - if (enabled!=codeFoldingEnabled) { - codeFoldingEnabled = enabled; - if (tempParser!=null) { - textArea.removeParser(tempParser); - } - if (enabled) { - tempParser = new AbstractParser() { - public ParseResult parse(RSyntaxDocument doc, String style) { - reparse(); - return new DefaultParseResult(this); - } - }; - textArea.addParser(tempParser); - support.firePropertyChange(PROPERTY_FOLDS_UPDATED, null, null); - //reparse(); - } - else { - folds = Collections.emptyList(); - textArea.repaint(); - support.firePropertyChange(PROPERTY_FOLDS_UPDATED, null, null); - } - } - } -private Parser tempParser; - - - /** - * Sets the folds for this fold manager. - * - * @param folds The new folds. This should not be null. - */ - public void setFolds(List folds) { - this.folds = folds; - } - - - /** - * Updates the fold parser to be the one appropriate for the language - * currently being highlighted. - */ - private void updateFoldParser() { - parser = FoldParserManager.get().getFoldParser( - textArea.getSyntaxEditingStyle()); - } - - - /** - * Listens for events in the text editor. - */ - private class Listener implements DocumentListener, PropertyChangeListener { - - public void changedUpdate(DocumentEvent e) { - } - - public void insertUpdate(DocumentEvent e) { - // Adding text containing a newline to the visible line of a folded - // Fold causes that Fold to unfold. Check only start offset of - // insertion since that's the line that was "modified". - int startOffs = e.getOffset(); - int endOffs = startOffs + e.getLength(); - Document doc = e.getDocument(); - Element root = doc.getDefaultRootElement(); - int startLine = root.getElementIndex(startOffs); - int endLine = root.getElementIndex(endOffs); - if (startLine!=endLine) { // Inserted text covering > 1 line... - Fold fold = getFoldForLine(startLine); - if (fold!=null && fold.isCollapsed()) { - fold.toggleCollapsedState(); - } - } - } - - public void propertyChange(PropertyChangeEvent e) { - - String name = e.getPropertyName(); - - if (RSyntaxTextArea.SYNTAX_STYLE_PROPERTY.equals(name)) { - // Syntax style changed in editor. - updateFoldParser(); - reparse(); // Even if no fold parser change, highlighting did - } - - else if ("document".equals(name)) { - // The document switched out from under us - RDocument old = (RDocument)e.getOldValue(); - if (old != null) { - old.removeDocumentListener(this); - } - RDocument newDoc = (RDocument)e.getNewValue(); - if (newDoc != null) { - newDoc.addDocumentListener(this); - } - reparse(); - } - - } - - public void removeUpdate(DocumentEvent e) { - // Removing text from the visible line of a folded Fold causes that - // Fold to unfold. We only need to check the removal offset since - // that's the new caret position. - int offs = e.getOffset(); - try { - int lastLineModified = textArea.getLineOfOffset(offs); - //System.out.println(">>> " + lastLineModified); - Fold fold = getFoldForLine(lastLineModified); - //System.out.println("&&& " + fold); - if (fold!=null && fold.isCollapsed()) { - fold.toggleCollapsedState(); - } - } catch (BadLocationException ble) { - ble.printStackTrace(); // Never happens - } - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/FoldParser.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/FoldParser.java deleted file mode 100644 index 7c95bfe..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/FoldParser.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 10/08/2011 - * - * FoldParser.java - Locates folds in an RSyntaxTextArea instance. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.folding; - -import java.util.List; - -import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; - - -/** - * Locates folds in a document. If you are implementing a language that has - * sections of source code that can be logically "folded," you can create an - * instance of this interface that locates those regions and represents them - * as {@link Fold}s. RSyntaxTextArea knows how to take it from - * there and implement code folding in the editor. - * - * @author Robert Futrell - * @version 1.0 - * @see CurlyFoldParser - * @see XmlFoldParser - */ -public interface FoldParser { - - - /** - * Returns a list of all folds in the text area. - * - * @param textArea The text area whose contents should be analyzed. - * @return The list of folds. If this method returns null, - * it is treated as if no folds were found. - */ - public List getFolds(RSyntaxTextArea textArea); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/FoldType.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/FoldType.java deleted file mode 100644 index af52192..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/FoldType.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 10/08/2011 - * - * FoldType.java - Types of folds found in many programming languages. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.folding; - - -/** - * Constants representing the "type" of a folded region. Implementations of - * {@link FoldParser} can also define their own folded region types, provided - * they give them values of at least {@link #FOLD_TYPE_USER_DEFINED_MIN}. This - * allows you to identify and auto-fold specific regions of source code when - * opening files; for example, a Java editor could identify all import - * statements in a file as a foldable region, and give it a user-defined value - * for fold type. Then, the UI could provide a means for the user to specify - * that they always want the import region folded when opening a new file.

- * - * The majority of the time, however, code editors won't need to be that fancy, - * and can simply use the standard CODE and COMMENT - * fold types. - * - * @author Robert Futrell - * @version 1.0 - * @see Fold - */ -public interface FoldType { - - /** - * Denotes a Fold as being a region of code. - */ - public static final int CODE = 0; - - /** - * Denotes a Fold as being a multi-line comment. - */ - public static final int COMMENT = 1; - - /** - * Denotes a Fold as being a section of import statements - * (Java), include statements (C), etc. - */ - public static final int IMPORTS = 2; - - /** - * Users building advanced editors such as IDE's, that want to allow their - * users to auto-expand/collapse foldable regions of a specific type other - * than comments, should define their custom fold types using values - * FOLD_TYPE_USER_DEFINED_MIN + n. That way, if - * new default fold types are added to this interface in the future, your - * code won't suddenly break when upgrading to a new version of RSTA. - */ - public static final int FOLD_TYPE_USER_DEFINED_MIN = 1000; - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/JsonFoldParser.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/JsonFoldParser.java deleted file mode 100644 index 7fb6918..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/JsonFoldParser.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * 12/23/2012 - * - * JsonFoldParser.java - Fold parser for JSON. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.folding; - -import java.util.ArrayList; -import java.util.List; -import java.util.Stack; -import javax.swing.text.BadLocationException; - -import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; -import org.fife.ui.rsyntaxtextarea.Token; -import org.fife.ui.rsyntaxtextarea.TokenTypes; - - -/** - * The fold parser for JSON. Objects ("{ ... }") and arrays - * ("[ ... ]") that span multiple lines are considered fold - * regions. - * - * @author Robert Futrell - * @version 1.0 - */ -public class JsonFoldParser implements FoldParser { - - private static final Object OBJECT_BLOCK = new Object(); - private static final Object ARRAY_BLOCK = new Object(); - - - /** - * {@inheritDoc} - */ - public List getFolds(RSyntaxTextArea textArea) { - - Stack blocks = new Stack(); - List folds = new ArrayList(); - - Fold currentFold = null; - int lineCount = textArea.getLineCount(); - - try { - - for (int line=0; linetrue. Otherwise, return false. - * - * @param stack The stack. - * @param value The value to check for. - * @return Whether the value was found on top of the stack. - */ - private static final boolean popOffTop(Stack stack, Object value) { - if (stack.size()>0 && stack.peek()==value) { - stack.pop(); - return true; - } - return false; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/LatexFoldParser.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/LatexFoldParser.java deleted file mode 100644 index e2889f4..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/LatexFoldParser.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 04/24/2012 - * - * LatexFoldParser.java - Fold parser for LaTeX. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.folding; - -import java.util.ArrayList; -import java.util.List; -import java.util.Stack; -import javax.swing.text.BadLocationException; - -import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; -import org.fife.ui.rsyntaxtextarea.Token; - - -/** - * A fold parser for LaTeX documents. This is likely incomplete and/or not - * quite right; feedback is appreciated. - * - * @author Robert Futrell - * @version 1.0 - */ -public class LatexFoldParser implements FoldParser { - - private static final char[] BEGIN = "\\begin".toCharArray(); - private static final char[] END = "\\end".toCharArray(); - - - /** - * {@inheritDoc} - */ - public List getFolds(RSyntaxTextArea textArea) { - - List folds = new ArrayList(); - Stack expectedStack = new Stack(); - - Fold currentFold = null; - int lineCount = textArea.getLineCount(); - - try { - - for (int line=0; line - * - * Note that this class may impose somewhat of a performance penalty on large - * source files, since it re-parses the entire document each time folds are - * reevaluated. - * - * @author Robert Futrell - * @version 1.0 - */ -public class NsisFoldParser implements FoldParser { - - private static final char[] KEYWORD_FUNCTION = "Function".toCharArray(); - private static final char[] KEYWORD_FUNCTION_END = "FunctionEnd".toCharArray(); - private static final char[] KEYWORD_SECTION = "Section".toCharArray(); - private static final char[] KEYWORD_SECTION_END = "SectionEnd".toCharArray(); - - protected static final char[] C_MLC_END = "*/".toCharArray(); - - - private static final boolean foundEndKeyword(char[] keyword, Token t, - Stack endWordStack) { - return t.is(Token.RESERVED_WORD, keyword) && !endWordStack.isEmpty() && - keyword==endWordStack.peek(); - } - - - /** - * {@inheritDoc} - */ - public List getFolds(RSyntaxTextArea textArea) { - - List folds = new ArrayList(); - - Fold currentFold = null; - int lineCount = textArea.getLineCount(); - boolean inMLC = false; - int mlcStart = 0; - Stack endWordStack = new Stack(); - - try { - - for (int line=0; line' }; - private static final char[] MLC_END = { '-', '-', '>' }; - - - /** - * {@inheritDoc} - */ - public List getFolds(RSyntaxTextArea textArea) { - - List folds = new ArrayList(); - - Fold currentFold = null; - int lineCount = textArea.getLineCount(); - boolean inMLC = false; - int mlcStart = 0; - - try { - - for (int line=0; linefolds list, and is removed from that. - * - * @param fold The fold to remove. - * @param folds The list of top-level folds. - */ - private static final void removeFold(Fold fold, List folds) { - if (!fold.removeFromParent()) { - folds.remove(folds.size()-1); - } - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/package.html b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/package.html deleted file mode 100644 index 250cfb3..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/folding/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - - Code folding functionality. - - diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/AbstractMarkupTokenMaker.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/AbstractMarkupTokenMaker.java deleted file mode 100644 index d73f555..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/AbstractMarkupTokenMaker.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 10/03/2009 - * - * AbstractMarkupTokenMaker.java - Base class for token makers for markup - * languages. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.modes; - -import org.fife.ui.rsyntaxtextarea.AbstractJFlexTokenMaker; - - -/** - * Base class for token makers for markup languages. - * - * @author Robert Futrell - * @version 1.0 - */ -public abstract class AbstractMarkupTokenMaker extends AbstractJFlexTokenMaker { - - - /** - * Returns whether markup close tags should be completed. - * - * @return Whether closing markup tags are to be completed. - */ - public abstract boolean getCompleteCloseTags(); - - - /** - * {@inheritDoc} - */ - @Override - public String[] getLineCommentStartAndEnd(int languageIndex) { - return new String[] { "" }; - } - - - /** - * Overridden to return true. - * - * @return true always. - */ - @Override - public final boolean isMarkupLanguage() { - return true; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/DtdTokenMaker.flex b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/DtdTokenMaker.flex deleted file mode 100644 index dcd61dd..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/DtdTokenMaker.flex +++ /dev/null @@ -1,346 +0,0 @@ -/* - * 04/12/2012 - * - * DtdTokenMaker.java - Generates tokens for DTD syntax highlighting. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.modes; - -import java.io.*; -import javax.swing.text.Segment; - -import org.fife.ui.rsyntaxtextarea.*; - - -/** - * Scanner for DTD files. - * - * This implementation was created using - * JFlex 1.4.1; however, the generated file - * was modified for performance. Memory allocation needs to be almost - * completely removed to be competitive with the handwritten lexers (subclasses - * of AbstractTokenMaker, so this class has been modified so that - * Strings are never allocated (via yytext()), and the scanner never has to - * worry about refilling its buffer (needlessly copying chars around). - * We can achieve this because RText always scans exactly 1 line of tokens at a - * time, and hands the scanner this line as an array of characters (a Segment - * really). Since tokens contain pointers to char arrays instead of Strings - * holding their contents, there is no need for allocating new memory for - * Strings.

- * - * The actual algorithm generated for scanning has, of course, not been - * modified.

- * - * If you wish to regenerate this file yourself, keep in mind the following: - *

    - *
  • The generated XMLTokenMaker.java file will contain two - * definitions of both zzRefill and yyreset. - * You should hand-delete the second of each definition (the ones - * generated by the lexer), as these generated methods modify the input - * buffer, which we'll never have to do.
  • - *
  • You should also change the declaration/definition of zzBuffer to NOT - * be initialized. This is a needless memory allocation for us since we - * will be pointing the array somewhere else anyway.
  • - *
  • You should NOT call yylex() on the generated scanner - * directly; rather, you should use getTokenList as you would - * with any other TokenMaker instance.
  • - *
- * - * @author Robert Futrell - * @version 1.0 - */ -%% - -%public -%class DtdTokenMaker -%extends AbstractJFlexTokenMaker -%unicode -%type org.fife.ui.rsyntaxtextarea.Token - - -%{ - - /** - * Token type specific to XMLTokenMaker denoting a line ending with an - * unclosed XML tag; thus a new line is beginning still inside of the tag. - */ - public static final int INTERNAL_INTAG_START = -1; - - /** - * Token type specific to XMLTokenMaker denoting a line ending with an - * unclosed DOCTYPE element. - */ - public static final int INTERNAL_INTAG_ELEMENT = -2; - - /** - * Token type specific to XMLTokenMaker denoting a line ending with an - * unclosed, locally-defined DTD in a DOCTYPE element. - */ - public static final int INTERNAL_INTAG_ATTLIST = -3; - - /** - * Token type specific to XMLTokenMaker denoting a line ending with an - * unclosed comment. The state to return to when this comment ends is - * embedded in the token type as well. - */ - public static final int INTERNAL_IN_COMMENT = -(1<<11); - - /** - * The state we were in prior to the current one. This is used to know - * what state to resume after an MLC ends. - */ - private int prevState; - - - /** - * Constructor. This must be here because JFlex does not generate a - * no-parameter constructor. - */ - public DtdTokenMaker() { - } - - - /** - * Adds the token specified to the current linked list of tokens as an - * "end token;" that is, at zzMarkedPos. - * - * @param tokenType The token's type. - */ - private void addEndToken(int tokenType) { - addToken(zzMarkedPos,zzMarkedPos, tokenType); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param tokenType The token's type. - * @see #addToken(int, int, int) - */ - private void addHyperlinkToken(int start, int end, int tokenType) { - int so = start + offsetShift; - addToken(zzBuffer, start,end, tokenType, so, true); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param tokenType The token's type. - */ - private void addToken(int tokenType) { - addToken(zzStartRead, zzMarkedPos-1, tokenType); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param tokenType The token's type. - */ - private void addToken(int start, int end, int tokenType) { - int so = start + offsetShift; - addToken(zzBuffer, start,end, tokenType, so); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param array The character array. - * @param start The starting offset in the array. - * @param end The ending offset in the array. - * @param tokenType The token's type. - * @param startOffset The offset in the document at which this token - * occurs. - */ - @Override - public void addToken(char[] array, int start, int end, int tokenType, int startOffset) { - super.addToken(array, start,end, tokenType, startOffset); - zzStartRead = zzMarkedPos; - } - - - /** - * Always returns false, as you never want "mark occurrences" - * working in XML files. - * - * @param type The token type. - * @return Whether tokens of this type should have "mark occurrences" - * enabled. - */ - public boolean getMarkOccurrencesOfTokenType(int type) { - return false; - } - - - /** - * Returns the first token in the linked list of tokens generated - * from text. This method must be implemented by - * subclasses so they can correctly implement syntax highlighting. - * - * @param text The text from which to get tokens. - * @param initialTokenType The token type we should start with. - * @param startOffset The offset into the document at which - * text starts. - * @return The first Token in a linked list representing - * the syntax highlighted text. - */ - public Token getTokenList(Segment text, int initialTokenType, int startOffset) { - - resetTokenList(); - this.offsetShift = -text.offset + startOffset; - prevState = YYINITIAL; - - // Start off in the proper state. - int state = YYINITIAL; - switch (initialTokenType) { - case INTERNAL_INTAG_START: - state = INTAG_START; - break; - case INTERNAL_INTAG_ELEMENT: - state = INTAG_ELEMENT; - break; - case INTERNAL_INTAG_ATTLIST: - state = INTAG_ATTLIST; - break; - default: - if (initialTokenType<-1024) { // INTERNAL_IN_COMMENT - prevState - int main = -(-initialTokenType & 0xffffff00); - switch (main) { - default: // Should never happen - case INTERNAL_IN_COMMENT: - state = COMMENT; - break; - } - prevState = -initialTokenType&0xff; - } - else { // Shouldn't happen - state = YYINITIAL; - } - } - - start = text.offset; - s = text; - try { - yyreset(zzReader); - yybegin(state); - return yylex(); - } catch (IOException ioe) { - ioe.printStackTrace(); - return new TokenImpl(); - } - - } - - - /** - * Refills the input buffer. - * - * @return true if EOF was reached, otherwise - * false. - */ - private boolean zzRefill() { - return zzCurrentPos>=s.offset+s.count; - } - - - /** - * Resets the scanner to read from a new input stream. - * Does not close the old reader. - * - * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). - * Lexical state is set to YY_INITIAL. - * - * @param reader the new input stream - */ - public final void yyreset(java.io.Reader reader) { - // 's' has been updated. - zzBuffer = s.array; - /* - * We replaced the line below with the two below it because zzRefill - * no longer "refills" the buffer (since the way we do it, it's always - * "full" the first time through, since it points to the segment's - * array). So, we assign zzEndRead here. - */ - //zzStartRead = zzEndRead = s.offset; - zzStartRead = s.offset; - zzEndRead = zzStartRead + s.count - 1; - zzCurrentPos = zzMarkedPos = zzPushbackPos = s.offset; - zzLexicalState = YYINITIAL; - zzReader = reader; - zzAtBOL = true; - zzAtEOF = false; - } - - -%} - -Whitespace = ([ \t\f]) -LineTerminator = ([\n]) -UnclosedString = ([\"][^\"]*) -UnclosedChar = ([\'][^\']*) - -URLGenDelim = ([:\/\?#\[\]@]) -URLSubDelim = ([\!\$&'\(\)\*\+,;=]) -URLUnreserved = ([A-Za-z_0-9\-\.\~]) -URLCharacter = ({URLGenDelim}|{URLSubDelim}|{URLUnreserved}|[%]) -URLCharacters = ({URLCharacter}*) -URLEndCharacter = ([\/\$A-Za-z0-9]) -URL = (((https?|f(tp|ile))"://"|"www.")({URLCharacters}{URLEndCharacter})?) - -%state COMMENT -%state INTAG_START -%state INTAG_ELEMENT -%state INTAG_ATTLIST - -%% - - { - ([^ \t\f<]+) { /* Not really valid */ addToken(Token.IDENTIFIER); } - "" { int temp = zzMarkedPos; addToken(start,zzStartRead+2, Token.COMMENT_MULTILINE); start = temp; yybegin(prevState); } - "-" {} - {LineTerminator} | - <> { addToken(start,zzStartRead-1, Token.COMMENT_MULTILINE); addEndToken(INTERNAL_IN_COMMENT - prevState); return firstToken; } -} - - { - ("ELEMENT") { addToken(Token.MARKUP_TAG_NAME); yybegin(INTAG_ELEMENT); } - ("ATTLIST") { addToken(Token.MARKUP_TAG_NAME); yybegin(INTAG_ATTLIST); } - ([^ \t\f>]+) { addToken(Token.IDENTIFIER); } - {Whitespace}+ { addToken(Token.WHITESPACE); } - (">") { addToken(Token.MARKUP_TAG_DELIMITER); yybegin(YYINITIAL); } - <> { addEndToken(INTERNAL_INTAG_START); return firstToken; } -} - - { - ([^ \t\f>]+) { addToken(Token.MARKUP_TAG_ATTRIBUTE); } - {Whitespace}+ { addToken(Token.WHITESPACE); } - (">") { addToken(Token.MARKUP_TAG_DELIMITER); yybegin(YYINITIAL); } - <> { addEndToken(INTERNAL_INTAG_ELEMENT); return firstToken; } -} - - { - ("CDATA"|"#IMPLIED"|"#REQUIRED") { addToken(Token.MARKUP_PROCESSING_INSTRUCTION); } - ([^ \t\f>\"\']+) { addToken(Token.MARKUP_TAG_ATTRIBUTE); } - ({UnclosedString}[\"]?) { addToken(Token.MARKUP_TAG_ATTRIBUTE_VALUE); } - ({UnclosedChar}[\']?) { addToken(Token.MARKUP_TAG_ATTRIBUTE_VALUE); } - {Whitespace}+ { addToken(Token.WHITESPACE); } - (">") { addToken(Token.MARKUP_TAG_DELIMITER); yybegin(YYINITIAL); } - <> { addEndToken(INTERNAL_INTAG_ATTLIST); return firstToken; } -} diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/DtdTokenMaker.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/DtdTokenMaker.java deleted file mode 100644 index 8a5793d..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/DtdTokenMaker.java +++ /dev/null @@ -1,831 +0,0 @@ -/* The following code was generated by JFlex 1.4.1 on 4/14/12 10:23 AM */ - -/* - * 04/12/2012 - * - * DtdTokenMaker.java - Generates tokens for DTD syntax highlighting. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.modes; - -import java.io.*; -import javax.swing.text.Segment; - -import org.fife.ui.rsyntaxtextarea.*; - - -/** - * Scanner for DTD files. - * - * This implementation was created using - * JFlex 1.4.1; however, the generated file - * was modified for performance. Memory allocation needs to be almost - * completely removed to be competitive with the handwritten lexers (subclasses - * of AbstractTokenMaker, so this class has been modified so that - * Strings are never allocated (via yytext()), and the scanner never has to - * worry about refilling its buffer (needlessly copying chars around). - * We can achieve this because RText always scans exactly 1 line of tokens at a - * time, and hands the scanner this line as an array of characters (a Segment - * really). Since tokens contain pointers to char arrays instead of Strings - * holding their contents, there is no need for allocating new memory for - * Strings.

- * - * The actual algorithm generated for scanning has, of course, not been - * modified.

- * - * If you wish to regenerate this file yourself, keep in mind the following: - *

    - *
  • The generated XMLTokenMaker.java file will contain two - * definitions of both zzRefill and yyreset. - * You should hand-delete the second of each definition (the ones - * generated by the lexer), as these generated methods modify the input - * buffer, which we'll never have to do.
  • - *
  • You should also change the declaration/definition of zzBuffer to NOT - * be initialized. This is a needless memory allocation for us since we - * will be pointing the array somewhere else anyway.
  • - *
  • You should NOT call yylex() on the generated scanner - * directly; rather, you should use getTokenList as you would - * with any other TokenMaker instance.
  • - *
- * - * @author Robert Futrell - * @version 1.0 - */ - -public class DtdTokenMaker extends AbstractJFlexTokenMaker { - - /** This character denotes the end of file */ - public static final int YYEOF = -1; - - /** lexical states */ - public static final int INTAG_START = 2; - public static final int INTAG_ELEMENT = 3; - public static final int YYINITIAL = 0; - public static final int INTAG_ATTLIST = 4; - public static final int COMMENT = 1; - - /** - * Translates characters to character classes - */ - private static final String ZZ_CMAP_PACKED = - "\11\0\1\1\1\2\1\0\1\1\23\0\1\1\1\24\1\3\1\41"+ - "\1\7\1\5\1\5\1\4\5\5\1\25\1\22\1\6\12\7\1\20"+ - "\1\5\1\23\1\5\1\26\2\5\1\34\1\7\1\37\1\40\1\27"+ - "\3\7\1\35\2\7\1\30\1\31\1\32\1\7\1\42\1\44\1\43"+ - "\1\36\1\33\1\45\5\7\1\5\1\0\1\5\1\0\1\5\1\0"+ - "\4\7\1\17\1\14\1\7\1\10\1\15\2\7\1\16\3\7\1\12"+ - "\2\7\1\13\1\11\2\7\1\21\3\7\3\0\1\5\uff81\0"; - - /** - * Translates characters to character classes - */ - private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); - - /** - * Translates DFA states to action switch labels. - */ - private static final int [] ZZ_ACTION = zzUnpackAction(); - - private static final String ZZ_ACTION_PACKED_0 = - "\5\0\1\1\1\2\1\3\1\4\1\5\4\4\1\3"+ - "\1\6\2\3\2\7\2\10\2\7\1\11\5\0\2\3"+ - "\1\10\3\7\5\0\1\12\2\3\3\7\1\13\2\0"+ - "\1\14\2\3\3\7\2\0\2\3\1\15\2\7\2\3"+ - "\2\7\1\16\1\17\1\7"; - - private static int [] zzUnpackAction() { - int [] result = new int[70]; - int offset = 0; - offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAction(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do result[j++] = value; while (--count > 0); - } - return j; - } - - - /** - * Translates a state to a row index in the transition table - */ - private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); - - private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\46\0\114\0\162\0\230\0\276\0\344\0\u010a"+ - "\0\u0130\0\u0156\0\u017c\0\u01a2\0\u01c8\0\u01ee\0\u0214\0\u0156"+ - "\0\u023a\0\u0260\0\u0286\0\u02ac\0\u02d2\0\u02f8\0\u031e\0\u0344"+ - "\0\u036a\0\u0390\0\u03b6\0\u03dc\0\u0402\0\u0428\0\u044e\0\u0474"+ - "\0\u0156\0\u049a\0\u04c0\0\u04e6\0\u050c\0\u0532\0\u0558\0\u057e"+ - "\0\u05a4\0\u0156\0\u05ca\0\u05f0\0\u0616\0\u063c\0\u0662\0\u0156"+ - "\0\u0688\0\u06ae\0\u06d4\0\u06fa\0\u0720\0\u0746\0\u076c\0\u0792"+ - "\0\u07b8\0\u06d4\0\u07de\0\u0804\0\u02ac\0\u082a\0\u0850\0\u0876"+ - "\0\u089c\0\u08c2\0\u08e8\0\u0214\0\u0214\0\u090e"; - - private static int [] zzUnpackRowMap() { - int [] result = new int[70]; - int offset = 0; - offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackRowMap(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int high = packed.charAt(i++) << 16; - result[j++] = high | packed.charAt(i++); - } - return j; - } - - /** - * The transition table of the DFA - */ - private static final int [] ZZ_TRANS = zzUnpackTrans(); - - private static final String ZZ_TRANS_PACKED_0 = - "\1\6\1\7\21\6\1\10\22\6\2\11\1\12\5\11"+ - "\1\13\3\11\1\14\4\11\1\15\3\11\1\16\20\11"+ - "\1\17\1\7\24\17\1\20\1\21\4\17\1\22\11\17"+ - "\1\23\1\7\24\23\1\20\17\23\1\24\1\7\1\24"+ - "\1\25\1\26\21\24\1\20\10\24\1\27\1\24\1\30"+ - "\4\24\1\6\1\0\21\6\1\0\22\6\1\0\1\7"+ - "\70\0\1\31\21\0\2\11\1\0\5\11\1\0\3\11"+ - "\1\0\4\11\1\0\3\11\1\0\20\11\57\0\1\32"+ - "\45\0\1\33\3\0\1\34\51\0\1\35\51\0\1\36"+ - "\20\0\1\17\1\0\24\17\1\0\20\17\1\0\24\17"+ - "\1\0\1\17\1\37\16\17\1\0\24\17\1\0\4\17"+ - "\1\40\12\17\1\23\1\0\24\23\1\0\17\23\1\24"+ - "\1\0\1\24\2\0\21\24\1\0\17\24\3\25\1\41"+ - "\42\25\4\26\1\41\41\26\1\24\1\0\1\24\2\0"+ - "\21\24\1\0\11\24\1\42\6\24\1\0\1\24\2\0"+ - "\21\24\1\0\6\24\1\43\5\24\1\44\2\24\25\0"+ - "\1\45\31\0\1\46\46\0\1\47\51\0\1\50\50\0"+ - "\1\51\52\0\1\52\17\0\1\17\1\0\24\17\1\0"+ - "\1\53\17\17\1\0\24\17\1\0\4\17\1\54\12\17"+ - "\1\24\1\0\1\24\2\0\21\24\1\0\5\24\1\55"+ - "\12\24\1\0\1\24\2\0\21\24\1\0\2\24\1\56"+ - "\15\24\1\0\1\24\2\0\21\24\1\0\1\57\16\24"+ - "\25\0\1\60\32\0\1\61\53\0\1\62\44\0\1\47"+ - "\50\0\1\63\23\0\1\17\1\0\24\17\1\0\2\17"+ - "\1\64\15\17\1\0\24\17\1\0\1\17\1\65\15\17"+ - "\1\24\1\0\1\24\2\0\21\24\1\0\4\24\1\66"+ - "\13\24\1\0\1\24\2\0\21\24\1\0\13\24\1\67"+ - "\4\24\1\0\1\24\2\0\21\24\1\0\15\24\1\70"+ - "\1\24\13\0\1\47\4\0\1\62\33\0\1\71\43\0"+ - "\2\72\12\63\1\72\1\63\1\72\1\0\2\72\1\0"+ - "\12\63\1\72\4\63\1\17\1\0\24\17\1\0\1\73"+ - "\17\17\1\0\24\17\1\0\6\17\1\74\10\17\1\24"+ - "\1\0\1\24\2\0\21\24\1\0\5\24\1\75\12\24"+ - "\1\0\1\24\2\0\21\24\1\0\1\24\1\76\16\24"+ - "\1\0\1\24\2\0\21\24\1\0\16\24\1\77\6\0"+ - "\1\63\37\0\1\17\1\0\24\17\1\0\3\17\1\100"+ - "\14\17\1\0\24\17\1\0\7\17\1\101\7\17\1\24"+ - "\1\0\1\24\2\0\21\24\1\0\6\24\1\102\11\24"+ - "\1\0\1\24\2\0\21\24\1\0\6\24\1\103\10\24"+ - "\1\17\1\0\24\17\1\0\4\17\1\104\13\17\1\0"+ - "\24\17\1\0\4\17\1\105\12\17\1\24\1\0\1\24"+ - "\2\0\21\24\1\0\1\106\17\24\1\0\1\24\2\0"+ - "\21\24\1\0\14\24\1\102\3\24\1\0\1\24\2\0"+ - "\21\24\1\0\11\24\1\75\5\24"; - - private static int [] zzUnpackTrans() { - int [] result = new int[2356]; - int offset = 0; - offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackTrans(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - value--; - do result[j++] = value; while (--count > 0); - } - return j; - } - - - /* error codes */ - private static final int ZZ_UNKNOWN_ERROR = 0; - private static final int ZZ_NO_MATCH = 1; - private static final int ZZ_PUSHBACK_2BIG = 2; - - /* error messages for the codes above */ - private static final String ZZ_ERROR_MSG[] = { - "Unkown internal scanner error", - "Error: could not match input", - "Error: pushback value was too large" - }; - - /** - * ZZ_ATTRIBUTE[aState] contains the attributes of state aState - */ - private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); - - private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\5\0\4\1\1\11\5\1\1\11\11\1\5\0\2\1"+ - "\1\11\3\1\5\0\1\11\5\1\1\11\2\0\6\1"+ - "\2\0\14\1"; - - private static int [] zzUnpackAttribute() { - int [] result = new int[70]; - int offset = 0; - offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAttribute(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do result[j++] = value; while (--count > 0); - } - return j; - } - - /** the input device */ - private java.io.Reader zzReader; - - /** the current state of the DFA */ - private int zzState; - - /** the current lexical state */ - private int zzLexicalState = YYINITIAL; - - /** this buffer contains the current text to be matched and is - the source of the yytext() string */ - private char zzBuffer[]; - - /** the textposition at the last accepting state */ - private int zzMarkedPos; - - /** the current text position in the buffer */ - private int zzCurrentPos; - - /** startRead marks the beginning of the yytext() string in the buffer */ - private int zzStartRead; - - /** endRead marks the last character in the buffer, that has been read - from input */ - private int zzEndRead; - - /** zzAtEOF == true <=> the scanner is at the EOF */ - private boolean zzAtEOF; - - /* user code: */ - - /** - * Token type specific to XMLTokenMaker denoting a line ending with an - * unclosed XML tag; thus a new line is beginning still inside of the tag. - */ - public static final int INTERNAL_INTAG_START = -1; - - /** - * Token type specific to XMLTokenMaker denoting a line ending with an - * unclosed DOCTYPE element. - */ - public static final int INTERNAL_INTAG_ELEMENT = -2; - - /** - * Token type specific to XMLTokenMaker denoting a line ending with an - * unclosed, locally-defined DTD in a DOCTYPE element. - */ - public static final int INTERNAL_INTAG_ATTLIST = -3; - - /** - * Token type specific to XMLTokenMaker denoting a line ending with an - * unclosed comment. The state to return to when this comment ends is - * embedded in the token type as well. - */ - public static final int INTERNAL_IN_COMMENT = -(1<<11); - - /** - * The state we were in prior to the current one. This is used to know - * what state to resume after an MLC ends. - */ - private int prevState; - - - /** - * Constructor. This must be here because JFlex does not generate a - * no-parameter constructor. - */ - public DtdTokenMaker() { - } - - - /** - * Adds the token specified to the current linked list of tokens as an - * "end token;" that is, at zzMarkedPos. - * - * @param tokenType The token's type. - */ - private void addEndToken(int tokenType) { - addToken(zzMarkedPos,zzMarkedPos, tokenType); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param tokenType The token's type. - * @see #addToken(int, int, int) - */ - private void addHyperlinkToken(int start, int end, int tokenType) { - int so = start + offsetShift; - addToken(zzBuffer, start,end, tokenType, so, true); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param tokenType The token's type. - */ - private void addToken(int tokenType) { - addToken(zzStartRead, zzMarkedPos-1, tokenType); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param tokenType The token's type. - */ - private void addToken(int start, int end, int tokenType) { - int so = start + offsetShift; - addToken(zzBuffer, start,end, tokenType, so); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param array The character array. - * @param start The starting offset in the array. - * @param end The ending offset in the array. - * @param tokenType The token's type. - * @param startOffset The offset in the document at which this token - * occurs. - */ - @Override - public void addToken(char[] array, int start, int end, int tokenType, int startOffset) { - super.addToken(array, start,end, tokenType, startOffset); - zzStartRead = zzMarkedPos; - } - - - /** - * Always returns false, as you never want "mark occurrences" - * working in XML files. - * - * @param type The token type. - * @return Whether tokens of this type should have "mark occurrences" - * enabled. - */ - @Override - public boolean getMarkOccurrencesOfTokenType(int type) { - return false; - } - - - /** - * Returns the first token in the linked list of tokens generated - * from text. This method must be implemented by - * subclasses so they can correctly implement syntax highlighting. - * - * @param text The text from which to get tokens. - * @param initialTokenType The token type we should start with. - * @param startOffset The offset into the document at which - * text starts. - * @return The first Token in a linked list representing - * the syntax highlighted text. - */ - public Token getTokenList(Segment text, int initialTokenType, int startOffset) { - - resetTokenList(); - this.offsetShift = -text.offset + startOffset; - prevState = YYINITIAL; - - // Start off in the proper state. - int state = YYINITIAL; - switch (initialTokenType) { - case INTERNAL_INTAG_START: - state = INTAG_START; - break; - case INTERNAL_INTAG_ELEMENT: - state = INTAG_ELEMENT; - break; - case INTERNAL_INTAG_ATTLIST: - state = INTAG_ATTLIST; - break; - default: - if (initialTokenType<-1024) { // INTERNAL_IN_COMMENT - prevState - int main = -(-initialTokenType & 0xffffff00); - switch (main) { - default: // Should never happen - case INTERNAL_IN_COMMENT: - state = COMMENT; - break; - } - prevState = -initialTokenType&0xff; - } - else { // Shouldn't happen - state = YYINITIAL; - } - } - - start = text.offset; - s = text; - try { - yyreset(zzReader); - yybegin(state); - return yylex(); - } catch (IOException ioe) { - ioe.printStackTrace(); - return new TokenImpl(); - } - - } - - - /** - * Refills the input buffer. - * - * @return true if EOF was reached, otherwise - * false. - */ - private boolean zzRefill() { - return zzCurrentPos>=s.offset+s.count; - } - - - /** - * Resets the scanner to read from a new input stream. - * Does not close the old reader. - * - * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). - * Lexical state is set to YY_INITIAL. - * - * @param reader the new input stream - */ - public final void yyreset(java.io.Reader reader) { - // 's' has been updated. - zzBuffer = s.array; - /* - * We replaced the line below with the two below it because zzRefill - * no longer "refills" the buffer (since the way we do it, it's always - * "full" the first time through, since it points to the segment's - * array). So, we assign zzEndRead here. - */ - //zzStartRead = zzEndRead = s.offset; - zzStartRead = s.offset; - zzEndRead = zzStartRead + s.count - 1; - zzCurrentPos = zzMarkedPos = s.offset; - zzLexicalState = YYINITIAL; - zzReader = reader; - zzAtEOF = false; - } - - - - - /** - * Creates a new scanner - * There is also a java.io.InputStream version of this constructor. - * - * @param in the java.io.Reader to read input from. - */ - public DtdTokenMaker(java.io.Reader in) { - this.zzReader = in; - } - - /** - * Creates a new scanner. - * There is also java.io.Reader version of this constructor. - * - * @param in the java.io.Inputstream to read input from. - */ - public DtdTokenMaker(java.io.InputStream in) { - this(new java.io.InputStreamReader(in)); - } - - /** - * Unpacks the compressed character translation table. - * - * @param packed the packed character translation table - * @return the unpacked character translation table - */ - private static char [] zzUnpackCMap(String packed) { - char [] map = new char[0x10000]; - int i = 0; /* index in packed string */ - int j = 0; /* index in unpacked array */ - while (i < 138) { - int count = packed.charAt(i++); - char value = packed.charAt(i++); - do map[j++] = value; while (--count > 0); - } - return map; - } - - - /** - * Closes the input stream. - */ - public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ - zzEndRead = zzStartRead; /* invalidate buffer */ - - if (zzReader != null) - zzReader.close(); - } - - - /** - * Returns the current lexical state. - */ - public final int yystate() { - return zzLexicalState; - } - - - /** - * Enters a new lexical state - * - * @param newState the new lexical state - */ - @Override -public final void yybegin(int newState) { - zzLexicalState = newState; - } - - - /** - * Returns the text matched by the current regular expression. - */ - public final String yytext() { - return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); - } - - - /** - * Returns the character at position pos from the - * matched text. - * - * It is equivalent to yytext().charAt(pos), but faster - * - * @param pos the position of the character to fetch. - * A value from 0 to yylength()-1. - * - * @return the character at position pos - */ - public final char yycharat(int pos) { - return zzBuffer[zzStartRead+pos]; - } - - - /** - * Returns the length of the matched text region. - */ - public final int yylength() { - return zzMarkedPos-zzStartRead; - } - - - /** - * Reports an error that occured while scanning. - * - * In a wellformed scanner (no or only correct usage of - * yypushback(int) and a match-all fallback rule) this method - * will only be called with things that "Can't Possibly Happen". - * If this method is called, something is seriously wrong - * (e.g. a JFlex bug producing a faulty scanner etc.). - * - * Usual syntax/scanner level error handling should be done - * in error fallback rules. - * - * @param errorCode the code of the errormessage to display - */ - private void zzScanError(int errorCode) { - String message; - try { - message = ZZ_ERROR_MSG[errorCode]; - } - catch (ArrayIndexOutOfBoundsException e) { - message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; - } - - throw new Error(message); - } - - - /** - * Pushes the specified amount of characters back into the input stream. - * - * They will be read again by then next call of the scanning method - * - * @param number the number of characters to be read again. - * This number must not be greater than yylength()! - */ - public void yypushback(int number) { - if ( number > yylength() ) - zzScanError(ZZ_PUSHBACK_2BIG); - - zzMarkedPos -= number; - } - - - /** - * Resumes scanning until the next regular expression is matched, - * the end of input is encountered or an I/O-Error occurs. - * - * @return the next token - * @exception java.io.IOException if any I/O-Error occurs - */ - public org.fife.ui.rsyntaxtextarea.Token yylex() throws java.io.IOException { - int zzInput; - int zzAction; - - // cached fields: - int zzCurrentPosL; - int zzMarkedPosL; - int zzEndReadL = zzEndRead; - char [] zzBufferL = zzBuffer; - char [] zzCMapL = ZZ_CMAP; - - int [] zzTransL = ZZ_TRANS; - int [] zzRowMapL = ZZ_ROWMAP; - int [] zzAttrL = ZZ_ATTRIBUTE; - - while (true) { - zzMarkedPosL = zzMarkedPos; - - zzAction = -1; - - zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; - - zzState = zzLexicalState; - - - zzForAction: { - while (true) { - - if (zzCurrentPosL < zzEndReadL) - zzInput = zzBufferL[zzCurrentPosL++]; - else if (zzAtEOF) { - zzInput = YYEOF; - break zzForAction; - } - else { - // store back cached positions - zzCurrentPos = zzCurrentPosL; - zzMarkedPos = zzMarkedPosL; - boolean eof = zzRefill(); - // get translated positions and possibly new buffer - zzCurrentPosL = zzCurrentPos; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - zzEndReadL = zzEndRead; - if (eof) { - zzInput = YYEOF; - break zzForAction; - } - else { - zzInput = zzBufferL[zzCurrentPosL++]; - } - } - int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; - if (zzNext == -1) break zzForAction; - zzState = zzNext; - - int zzAttributes = zzAttrL[zzState]; - if ( (zzAttributes & 1) == 1 ) { - zzAction = zzState; - zzMarkedPosL = zzCurrentPosL; - if ( (zzAttributes & 8) == 8 ) break zzForAction; - } - - } - } - - // store back cached position - zzMarkedPos = zzMarkedPosL; - - switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 3: - { addToken(Token.IDENTIFIER); - } - case 16: break; - case 12: - { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.COMMENT_MULTILINE); addHyperlinkToken(temp,zzMarkedPos-1, Token.COMMENT_MULTILINE); start = zzMarkedPos; - } - case 17: break; - case 2: - { addToken(Token.WHITESPACE); - } - case 18: break; - case 1: - { /* Not really valid */ addToken(Token.IDENTIFIER); - } - case 19: break; - case 9: - { addToken(Token.MARKUP_TAG_DELIMITER); yybegin(INTAG_START); - } - case 20: break; - case 6: - { addToken(Token.MARKUP_TAG_DELIMITER); yybegin(YYINITIAL); - } - case 21: break; - case 11: - { start = zzStartRead; prevState = zzLexicalState; yybegin(COMMENT); - } - case 22: break; - case 7: - { addToken(Token.MARKUP_TAG_ATTRIBUTE); - } - case 23: break; - case 10: - { int temp = zzMarkedPos; addToken(start,zzStartRead+2, Token.COMMENT_MULTILINE); start = temp; yybegin(prevState); - } - case 24: break; - case 15: - { addToken(Token.MARKUP_TAG_NAME); yybegin(INTAG_ATTLIST); - } - case 25: break; - case 14: - { addToken(Token.MARKUP_TAG_NAME); yybegin(INTAG_ELEMENT); - } - case 26: break; - case 13: - { addToken(Token.MARKUP_PROCESSING_INSTRUCTION); - } - case 27: break; - case 4: - { - } - case 28: break; - case 5: - { addToken(start,zzStartRead-1, Token.COMMENT_MULTILINE); addEndToken(INTERNAL_IN_COMMENT - prevState); return firstToken; - } - case 29: break; - case 8: - { addToken(Token.MARKUP_TAG_ATTRIBUTE_VALUE); - } - case 30: break; - default: - if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { - zzAtEOF = true; - switch (zzLexicalState) { - case INTAG_START: { - addEndToken(INTERNAL_INTAG_START); return firstToken; - } - case 71: break; - case INTAG_ELEMENT: { - addEndToken(INTERNAL_INTAG_ELEMENT); return firstToken; - } - case 72: break; - case YYINITIAL: { - addNullToken(); return firstToken; - } - case 73: break; - case INTAG_ATTLIST: { - addEndToken(INTERNAL_INTAG_ATTLIST); return firstToken; - } - case 74: break; - case COMMENT: { - addToken(start,zzStartRead-1, Token.COMMENT_MULTILINE); addEndToken(INTERNAL_IN_COMMENT - prevState); return firstToken; - } - case 75: break; - default: - return null; - } - } - else { - zzScanError(ZZ_NO_MATCH); - } - } - } - } - - -} diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PlainTextTokenMaker.flex b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PlainTextTokenMaker.flex deleted file mode 100644 index 26d269f..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PlainTextTokenMaker.flex +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 11/07/2008 - * - * PlainTextTokenMaker.flex - Scanner for plain text files. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.modes; - -import java.io.*; -import javax.swing.text.Segment; - -import org.fife.ui.rsyntaxtextarea.*; - - -/** - * Scanner for plain text files. - * - * This implementation was created using - * JFlex 1.4.1; however, the generated file - * was modified for performance. Memory allocation needs to be almost - * completely removed to be competitive with the handwritten lexers (subclasses - * of AbstractTokenMaker), so this class has been modified so that - * Strings are never allocated (via yytext()), and the scanner never has to - * worry about refilling its buffer (needlessly copying chars around). - * We can achieve this because RText always scans exactly 1 line of tokens at a - * time, and hands the scanner this line as an array of characters (a Segment - * really). Since tokens contain pointers to char arrays instead of Strings - * holding their contents, there is no need for allocating new memory for - * Strings.

- * - * The actual algorithm generated for scanning has, of course, not been - * modified.

- * - * If you wish to regenerate this file yourself, keep in mind the following: - *

    - *
  • The generated PlainTextTokenMaker.java file will contain - * two definitions of both zzRefill and yyreset. - * You should hand-delete the second of each definition (the ones - * generated by the lexer), as these generated methods modify the input - * buffer, which we'll never have to do.
  • - *
  • You should also change the declaration/definition of zzBuffer to NOT - * be initialized. This is a needless memory allocation for us since we - * will be pointing the array somewhere else anyway.
  • - *
  • You should NOT call yylex() on the generated scanner - * directly; rather, you should use getTokenList as you would - * with any other TokenMaker instance.
  • - *
- * - * @author Robert Futrell - * @version 0.5 - * - */ -%% - -%public -%class PlainTextTokenMaker -%extends AbstractJFlexTokenMaker -%unicode -%type org.fife.ui.rsyntaxtextarea.Token - - -%{ - - - /** - * Constructor. This must be here because JFlex does not generate a - * no-parameter constructor. - */ - public PlainTextTokenMaker() { - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param tokenType The token's type. - * @param link Whether this token is a hyperlink. - */ - private void addToken(int tokenType, boolean link) { - int so = zzStartRead + offsetShift; - super.addToken(zzBuffer, zzStartRead,zzMarkedPos-1, tokenType, so, link); - zzStartRead = zzMarkedPos; - } - - - /** - * Always returns Token.NULL, as there are no multiline - * tokens in properties files. - * - * @param text The line of tokens to examine. - * @param initialTokenType The token type to start with (i.e., the value - * of getLastTokenTypeOnLine for the line before - * text). - * @return Token.NULL. - */ - public int getLastTokenTypeOnLine(Segment text, int initialTokenType) { - return Token.NULL; - } - - - /** - * Returns the text to place at the beginning and end of a - * line to "comment" it in a this programming language. - * - * @return null, as there are no comments in plain text. - */ - @Override - public String[] getLineCommentStartAndEnd(int languageIndex) { - return null; - } - - - /** - * Always returns false, as you never want "mark occurrences" - * working in plain text files. - * - * @param type The token type. - * @return Whether tokens of this type should have "mark occurrences" - * enabled. - */ - public boolean getMarkOccurrencesOfTokenType(int type) { - return false; - } - - - /** - * Returns the first token in the linked list of tokens generated - * from text. This method must be implemented by - * subclasses so they can correctly implement syntax highlighting. - * - * @param text The text from which to get tokens. - * @param initialTokenType The token type we should start with. - * @param startOffset The offset into the document at which - * text starts. - * @return The first Token in a linked list representing - * the syntax highlighted text. - */ - public Token getTokenList(Segment text, int initialTokenType, int startOffset) { - - resetTokenList(); - this.offsetShift = -text.offset + startOffset; - - // Start off in the proper state. - s = text; - try { - yyreset(zzReader); - yybegin(YYINITIAL); - return yylex(); - } catch (IOException ioe) { - ioe.printStackTrace(); - return new TokenImpl(); - } - - } - - - /** - * Refills the input buffer. - * - * @return true if EOF was reached, otherwise - * false. - * @exception IOException if any I/O-Error occurs. - */ - private boolean zzRefill() { - return zzCurrentPos>=s.offset+s.count; - } - - - /** - * Resets the scanner to read from a new input stream. - * Does not close the old reader. - * - * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). - * Lexical state is set to YY_INITIAL. - * - * @param reader the new input stream - */ - public final void yyreset(java.io.Reader reader) { - // 's' has been updated. - zzBuffer = s.array; - /* - * We replaced the line below with the two below it because zzRefill - * no longer "refills" the buffer (since the way we do it, it's always - * "full" the first time through, since it points to the segment's - * array). So, we assign zzEndRead here. - */ - //zzStartRead = zzEndRead = s.offset; - zzStartRead = s.offset; - zzEndRead = zzStartRead + s.count - 1; - zzCurrentPos = zzMarkedPos = zzPushbackPos = s.offset; - zzLexicalState = YYINITIAL; - zzReader = reader; - zzAtBOL = true; - zzAtEOF = false; - } - - -%} - -LetterOrDigit = ([a-zA-Z0-9]) -Identifier = ({LetterOrDigit}+) -Separator = ([^a-zA-Z0-9 \t\n]) -WhiteSpace = ([ \t]+) -LineTerminator = ([\n]) - -URLGenDelim = ([:\/\?#\[\]@]) -URLSubDelim = ([\!\$&'\(\)\*\+,;=]) -URLUnreserved = ({LetterOrDigit}|[_\-\.\~]) -URLCharacter = ({URLGenDelim}|{URLSubDelim}|{URLUnreserved}|[%]) -URLCharacters = ({URLCharacter}*) -URLEndCharacter = ([\/\$]|{LetterOrDigit}) -URL = (((https?|f(tp|ile))"://"|"www.")({URLCharacters}{URLEndCharacter})?) - -%% - - { - {URL} { addToken(Token.IDENTIFIER, true); } - {Identifier} { addToken(Token.IDENTIFIER, false); } - {Separator} { addToken(Token.IDENTIFIER, false); } - {WhiteSpace} { addToken(Token.WHITESPACE, false); } - {LineTerminator} { addNullToken(); return firstToken; } - <> { addNullToken(); return firstToken; } - . { /* Never happens */ addToken(Token.IDENTIFIER, false); } -} diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PlainTextTokenMaker1.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PlainTextTokenMaker1.java deleted file mode 100644 index 1b898e2..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PlainTextTokenMaker1.java +++ /dev/null @@ -1,647 +0,0 @@ -/* The following code was generated by JFlex 1.4.1 on 12/9/11 6:40 PM */ - -/* - * 11/07/2008 - * - * PlainTextTokenMaker.flex - Scanner for plain text files. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.modes; - -import java.io.*; -import javax.swing.text.Segment; - -import org.fife.ui.rsyntaxtextarea.*; - - -/** - * Scanner for plain text files. - * - * This implementation was created using - * JFlex 1.4.1; however, the generated file - * was modified for performance. Memory allocation needs to be almost - * completely removed to be competitive with the handwritten lexers (subclasses - * of AbstractTokenMaker), so this class has been modified so that - * Strings are never allocated (via yytext()), and the scanner never has to - * worry about refilling its buffer (needlessly copying chars around). - * We can achieve this because RText always scans exactly 1 line of tokens at a - * time, and hands the scanner this line as an array of characters (a Segment - * really). Since tokens contain pointers to char arrays instead of Strings - * holding their contents, there is no need for allocating new memory for - * Strings.

- * - * The actual algorithm generated for scanning has, of course, not been - * modified.

- * - * If you wish to regenerate this file yourself, keep in mind the following: - *

    - *
  • The generated PlainTextTokenMaker.java file will contain - * two definitions of both zzRefill and yyreset. - * You should hand-delete the second of each definition (the ones - * generated by the lexer), as these generated methods modify the input - * buffer, which we'll never have to do.
  • - *
  • You should also change the declaration/definition of zzBuffer to NOT - * be initialized. This is a needless memory allocation for us since we - * will be pointing the array somewhere else anyway.
  • - *
  • You should NOT call yylex() on the generated scanner - * directly; rather, you should use getTokenList as you would - * with any other TokenMaker instance.
  • - *
- * - * @author Robert Futrell - * @version 0.5 - * - */ - -public class PlainTextTokenMaker1 extends AbstractJFlexTokenMaker { - - /** This character denotes the end of file */ - public static final int YYEOF = -1; - - /** lexical states */ - public static final int YYINITIAL = 0; - - /** - * Translates characters to character classes - */ - private static final String ZZ_CMAP_PACKED = - "\11\0\1\3\1\2\25\0\1\3\1\4\1\0\1\4\1\6\1\4"+ - "\7\4\1\4\1\21\1\5\12\1\1\17\1\4\1\0\1\4\1\0"+ - "\2\4\32\1\1\4\1\0\1\4\1\0\1\4\1\0\4\1\1\16"+ - "\1\13\1\1\1\7\1\14\2\1\1\15\3\1\1\11\2\1\1\12"+ - "\1\10\2\1\1\20\3\1\3\0\1\4\uff81\0"; - - /** - * Translates characters to character classes - */ - private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); - - /** - * Translates DFA states to action switch labels. - */ - private static final int [] ZZ_ACTION = zzUnpackAction(); - - private static final String ZZ_ACTION_PACKED_0 = - "\1\0\2\1\1\2\1\3\14\1\1\0\1\4\2\0"; - - private static int [] zzUnpackAction() { - int [] result = new int[21]; - int offset = 0; - offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAction(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do result[j++] = value; while (--count > 0); - } - return j; - } - - - /** - * Translates a state to a row index in the transition table - */ - private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); - - private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\22\0\44\0\22\0\66\0\110\0\132\0\154"+ - "\0\176\0\220\0\242\0\264\0\306\0\330\0\352\0\374"+ - "\0\u010e\0\u0120\0\u0132\0\u0144\0\u0132"; - - private static int [] zzUnpackRowMap() { - int [] result = new int[21]; - int offset = 0; - offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackRowMap(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int high = packed.charAt(i++) << 16; - result[j++] = high | packed.charAt(i++); - } - return j; - } - - /** - * The transition table of the DFA - */ - private static final int [] ZZ_TRANS = zzUnpackTrans(); - - private static final String ZZ_TRANS_PACKED_0 = - "\1\2\1\3\1\4\1\5\3\2\1\6\3\3\1\7"+ - "\3\3\1\2\1\10\1\2\23\0\1\3\5\0\10\3"+ - "\1\0\1\3\4\0\1\5\17\0\1\3\5\0\1\3"+ - "\1\11\6\3\1\0\1\3\2\0\1\3\5\0\1\3"+ - "\1\12\3\3\1\13\2\3\1\0\1\3\2\0\1\3"+ - "\5\0\10\3\1\0\1\14\2\0\1\3\5\0\1\3"+ - "\1\15\6\3\1\0\1\3\2\0\1\3\5\0\2\3"+ - "\1\16\5\3\1\0\1\3\2\0\1\3\5\0\6\3"+ - "\1\17\1\3\1\0\1\3\2\0\1\3\5\0\10\3"+ - "\1\0\1\20\2\0\1\3\5\0\2\3\1\21\5\3"+ - "\1\0\1\3\2\0\1\3\5\0\10\3\1\22\1\3"+ - "\2\0\1\3\5\0\7\3\1\16\1\0\1\3\2\0"+ - "\1\3\5\0\10\3\1\0\1\3\1\23\1\0\1\3"+ - "\5\0\3\3\1\16\4\3\1\22\1\3\6\0\1\24"+ - "\15\0\1\23\2\0\1\25\12\23\1\25\1\23\1\25"+ - "\5\0\1\23\14\0"; - - private static int [] zzUnpackTrans() { - int [] result = new int[342]; - int offset = 0; - offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackTrans(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - value--; - do result[j++] = value; while (--count > 0); - } - return j; - } - - - /* error codes */ - private static final int ZZ_UNKNOWN_ERROR = 0; - private static final int ZZ_NO_MATCH = 1; - private static final int ZZ_PUSHBACK_2BIG = 2; - - /* error messages for the codes above */ - private static final String ZZ_ERROR_MSG[] = { - "Unkown internal scanner error", - "Error: could not match input", - "Error: pushback value was too large" - }; - - /** - * ZZ_ATTRIBUTE[aState] contains the attributes of state aState - */ - private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); - - private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\1\0\1\11\1\1\1\11\15\1\1\0\1\1\2\0"; - - private static int [] zzUnpackAttribute() { - int [] result = new int[21]; - int offset = 0; - offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAttribute(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do result[j++] = value; while (--count > 0); - } - return j; - } - - /** the input device */ - private java.io.Reader zzReader; - - /** the current state of the DFA */ - private int zzState; - - /** the current lexical state */ - private int zzLexicalState = YYINITIAL; - - /** this buffer contains the current text to be matched and is - the source of the yytext() string */ - private char zzBuffer[]; - - /** the textposition at the last accepting state */ - private int zzMarkedPos; - - /** the current text position in the buffer */ - private int zzCurrentPos; - - /** startRead marks the beginning of the yytext() string in the buffer */ - private int zzStartRead; - - /** endRead marks the last character in the buffer, that has been read - from input */ - private int zzEndRead; - - /** zzAtEOF == true <=> the scanner is at the EOF */ - private boolean zzAtEOF; - - /* user code: */ - - - /** - * Constructor. This must be here because JFlex does not generate a - * no-parameter constructor. - */ - public PlainTextTokenMaker1() { - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param tokenType The token's type. - * @param link Whether this token is a hyperlink. - */ - private void addToken(int tokenType, boolean link) { - int so = zzStartRead + offsetShift; - super.addToken(zzBuffer, zzStartRead,zzMarkedPos-1, tokenType, so, link); - zzStartRead = zzMarkedPos; - } - - - /** - * Always returns Token.NULL, as there are no multiline - * tokens in properties files. - * - * @param text The line of tokens to examine. - * @param initialTokenType The token type to start with (i.e., the value - * of getLastTokenTypeOnLine for the line before - * text). - * @return Token.NULL. - */ - @Override - public int getLastTokenTypeOnLine(Segment text, int initialTokenType) { - return Token.NULL; - } - - - /** - * Returns the text to place at the beginning and end of a - * line to "comment" it in a this programming language. - * - * @return null, as there are no comments in plain text. - */ - @Override - public String[] getLineCommentStartAndEnd(int languageIndex) { - return null; - } - - - /** - * Always returns false, as you never want "mark occurrences" - * working in plain text files. - * - * @param type The token type. - * @return Whether tokens of this type should have "mark occurrences" - * enabled. - */ - @Override - public boolean getMarkOccurrencesOfTokenType(int type) { - return false; - } - - - /** - * Returns the first token in the linked list of tokens generated - * from text. This method must be implemented by - * subclasses so they can correctly implement syntax highlighting. - * - * @param text The text from which to get tokens. - * @param initialTokenType The token type we should start with. - * @param startOffset The offset into the document at which - * text starts. - * @return The first Token in a linked list representing - * the syntax highlighted text. - */ - public Token getTokenList(Segment text, int initialTokenType, int startOffset) { - - resetTokenList(); - this.offsetShift = -text.offset + startOffset; - - // Start off in the proper state. - s = text; - try { - yyreset(zzReader); - yybegin(YYINITIAL); - return yylex(); - } catch (IOException ioe) { - ioe.printStackTrace(); - return new TokenImpl(); - } - - } - - - /** - * Refills the input buffer. - * - * @return true if EOF was reached, otherwise - * false. - * @exception IOException if any I/O-Error occurs. - */ - private boolean zzRefill() { - return zzCurrentPos>=s.offset+s.count; - } - - - /** - * Resets the scanner to read from a new input stream. - * Does not close the old reader. - * - * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). - * Lexical state is set to YY_INITIAL. - * - * @param reader the new input stream - */ - public final void yyreset(java.io.Reader reader) { - // 's' has been updated. - zzBuffer = s.array; - /* - * We replaced the line below with the two below it because zzRefill - * no longer "refills" the buffer (since the way we do it, it's always - * "full" the first time through, since it points to the segment's - * array). So, we assign zzEndRead here. - */ - //zzStartRead = zzEndRead = s.offset; - zzStartRead = s.offset; - zzEndRead = zzStartRead + s.count - 1; - zzCurrentPos = zzMarkedPos = s.offset; - zzLexicalState = YYINITIAL; - zzReader = reader; - zzAtEOF = false; - } - - - - - /** - * Creates a new scanner - * There is also a java.io.InputStream version of this constructor. - * - * @param in the java.io.Reader to read input from. - */ - public PlainTextTokenMaker1(java.io.Reader in) { - this.zzReader = in; - } - - /** - * Creates a new scanner. - * There is also java.io.Reader version of this constructor. - * - * @param in the java.io.Inputstream to read input from. - */ - public PlainTextTokenMaker1(java.io.InputStream in) { - this(new java.io.InputStreamReader(in)); - } - - /** - * Unpacks the compressed character translation table. - * - * @param packed the packed character translation table - * @return the unpacked character translation table - */ - private static char [] zzUnpackCMap(String packed) { - char [] map = new char[0x10000]; - int i = 0; /* index in packed string */ - int j = 0; /* index in unpacked array */ - while (i < 94) { - int count = packed.charAt(i++); - char value = packed.charAt(i++); - do map[j++] = value; while (--count > 0); - } - return map; - } - - - /** - * Closes the input stream. - */ - public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ - zzEndRead = zzStartRead; /* invalidate buffer */ - - if (zzReader != null) - zzReader.close(); - } - - - /** - * Returns the current lexical state. - */ - public final int yystate() { - return zzLexicalState; - } - - - /** - * Enters a new lexical state - * - * @param newState the new lexical state - */ - @Override -public final void yybegin(int newState) { - zzLexicalState = newState; - } - - - /** - * Returns the text matched by the current regular expression. - */ - public final String yytext() { - return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); - } - - - /** - * Returns the character at position pos from the - * matched text. - * - * It is equivalent to yytext().charAt(pos), but faster - * - * @param pos the position of the character to fetch. - * A value from 0 to yylength()-1. - * - * @return the character at position pos - */ - public final char yycharat(int pos) { - return zzBuffer[zzStartRead+pos]; - } - - - /** - * Returns the length of the matched text region. - */ - public final int yylength() { - return zzMarkedPos-zzStartRead; - } - - - /** - * Reports an error that occured while scanning. - * - * In a wellformed scanner (no or only correct usage of - * yypushback(int) and a match-all fallback rule) this method - * will only be called with things that "Can't Possibly Happen". - * If this method is called, something is seriously wrong - * (e.g. a JFlex bug producing a faulty scanner etc.). - * - * Usual syntax/scanner level error handling should be done - * in error fallback rules. - * - * @param errorCode the code of the errormessage to display - */ - private void zzScanError(int errorCode) { - String message; - try { - message = ZZ_ERROR_MSG[errorCode]; - } - catch (ArrayIndexOutOfBoundsException e) { - message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; - } - - throw new Error(message); - } - - - /** - * Pushes the specified amount of characters back into the input stream. - * - * They will be read again by then next call of the scanning method - * - * @param number the number of characters to be read again. - * This number must not be greater than yylength()! - */ - public void yypushback(int number) { - if ( number > yylength() ) - zzScanError(ZZ_PUSHBACK_2BIG); - - zzMarkedPos -= number; - } - - - /** - * Resumes scanning until the next regular expression is matched, - * the end of input is encountered or an I/O-Error occurs. - * - * @return the next token - * @exception java.io.IOException if any I/O-Error occurs - */ - public org.fife.ui.rsyntaxtextarea.Token yylex() throws java.io.IOException { - int zzInput; - int zzAction; - - // cached fields: - int zzCurrentPosL; - int zzMarkedPosL; - int zzEndReadL = zzEndRead; - char [] zzBufferL = zzBuffer; - char [] zzCMapL = ZZ_CMAP; - - int [] zzTransL = ZZ_TRANS; - int [] zzRowMapL = ZZ_ROWMAP; - int [] zzAttrL = ZZ_ATTRIBUTE; - - while (true) { - zzMarkedPosL = zzMarkedPos; - - zzAction = -1; - - zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; - - zzState = zzLexicalState; - - - zzForAction: { - while (true) { - - if (zzCurrentPosL < zzEndReadL) - zzInput = zzBufferL[zzCurrentPosL++]; - else if (zzAtEOF) { - zzInput = YYEOF; - break zzForAction; - } - else { - // store back cached positions - zzCurrentPos = zzCurrentPosL; - zzMarkedPos = zzMarkedPosL; - boolean eof = zzRefill(); - // get translated positions and possibly new buffer - zzCurrentPosL = zzCurrentPos; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - zzEndReadL = zzEndRead; - if (eof) { - zzInput = YYEOF; - break zzForAction; - } - else { - zzInput = zzBufferL[zzCurrentPosL++]; - } - } - int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; - if (zzNext == -1) break zzForAction; - zzState = zzNext; - - int zzAttributes = zzAttrL[zzState]; - if ( (zzAttributes & 1) == 1 ) { - zzAction = zzState; - zzMarkedPosL = zzCurrentPosL; - if ( (zzAttributes & 8) == 8 ) break zzForAction; - } - - } - } - - // store back cached position - zzMarkedPos = zzMarkedPosL; - - switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 3: - { addToken(Token.WHITESPACE, false); - } - case 5: break; - case 2: - { addNullToken(); return firstToken; - } - case 6: break; - case 4: - { addToken(Token.IDENTIFIER, true); - } - case 7: break; - case 1: - { addToken(Token.IDENTIFIER, false); - } - case 8: break; - default: - if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { - zzAtEOF = true; - switch (zzLexicalState) { - case YYINITIAL: { - addNullToken(); return firstToken; - } - case 22: break; - default: - return null; - } - } - else { - zzScanError(ZZ_NO_MATCH); - } - } - } - } - - -} diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PropertiesFileTokenMaker.flex b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PropertiesFileTokenMaker.flex deleted file mode 100644 index 3352606..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PropertiesFileTokenMaker.flex +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 03/21/2005 - * - * PropertiesFileTokenMaker.java - Scanner for properties files. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.modes; - -import java.io.*; -import javax.swing.text.Segment; - -import org.fife.ui.rsyntaxtextarea.*; - - -/** - * This class splits up text into tokens representing a Java properties file.

- * - * This implementation was created using - * JFlex 1.4.1; however, the generated file - * was modified for performance. Memory allocation needs to be almost - * completely removed to be competitive with the handwritten lexers (subclasses - * of AbstractTokenMaker, so this class has been modified so that - * Strings are never allocated (via yytext()), and the scanner never has to - * worry about refilling its buffer (needlessly copying chars around). - * We can achieve this because RText always scans exactly 1 line of tokens at a - * time, and hands the scanner this line as an array of characters (a Segment - * really). Since tokens contain pointers to char arrays instead of Strings - * holding their contents, there is no need for allocating new memory for - * Strings.

- * - * The actual algorithm generated for scanning has, of course, not been - * modified.

- * - * If you wish to regenerate this file yourself, keep in mind the following: - *

    - *
  • The generated PropertiesFileTokenMaker.java file will - * contain two definitions of both zzRefill and - * yyreset. You should hand-delete the second of each - * definition (the ones generated by the lexer), as these generated - * methods modify the input buffer, which we'll never have to do. - *
  • You should also change the declaration/definition of zzBuffer to NOT - * be initialized. This is a needless memory allocation for us since we - * will be pointing the array somewhere else anyway. - *
  • You should NOT call yylex() on the generated scanner - * directly; rather, you should use getTokenList as you would - * with any other TokenMaker instance. - *
- * - * @author Robert Futrell - * @version 0.4 - * - */ -%% - -%public -%class PropertiesFileTokenMaker -%extends AbstractJFlexTokenMaker -%unicode -%type org.fife.ui.rsyntaxtextarea.Token - - -%{ - - - /** - * Constructor. This must be here because JFlex does not generate a - * no-parameter constructor. - */ - public PropertiesFileTokenMaker() { - super(); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param tokenType The token's type. - */ - private void addToken(int tokenType) { - addToken(zzStartRead, zzMarkedPos-1, tokenType); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param tokenType The token's type. - */ - private void addToken(int start, int end, int tokenType) { - int so = start + offsetShift; - addToken(zzBuffer, start,end, tokenType, so); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param array The character array. - * @param start The starting offset in the array. - * @param end The ending offset in the array. - * @param tokenType The token's type. - * @param startOffset The offset in the document at which this token - * occurs. - */ - @Override - public void addToken(char[] array, int start, int end, int tokenType, int startOffset) { - super.addToken(array, start,end, tokenType, startOffset); - zzStartRead = zzMarkedPos; - } - - - /** - * {@inheritDoc} - */ - @Override - public String[] getLineCommentStartAndEnd(int languageIndex) { - return new String[] { "#", null }; - } - - - /** - * Returns the first token in the linked list of tokens generated - * from text. This method must be implemented by - * subclasses so they can correctly implement syntax highlighting. - * - * @param text The text from which to get tokens. - * @param initialTokenType The token type we should start with. - * @param startOffset The offset into the document at which - * text starts. - * @return The first Token in a linked list representing - * the syntax highlighted text. - */ - public Token getTokenList(Segment text, int initialTokenType, int startOffset) { - - resetTokenList(); - this.offsetShift = -text.offset + startOffset; - - // Start off in the proper state. - int state = Token.NULL; - switch (initialTokenType) { - case Token.LITERAL_STRING_DOUBLE_QUOTE: - state = VALUE; - start = text.offset; - break; - default: - state = Token.NULL; - } - - s = text; - try { - yyreset(zzReader); - yybegin(state); - return yylex(); - } catch (IOException ioe) { - ioe.printStackTrace(); - return new TokenImpl(); - } - - } - - - /** - * Refills the input buffer. - * - * @return true if EOF was reached, otherwise - * false. - * @exception IOException if any I/O-Error occurs. - */ - private boolean zzRefill() { - return zzCurrentPos>=s.offset+s.count; - } - - - /** - * Resets the scanner to read from a new input stream. - * Does not close the old reader. - * - * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). - * Lexical state is set to YY_INITIAL. - * - * @param reader the new input stream - */ - public final void yyreset(java.io.Reader reader) { - // 's' has been updated. - zzBuffer = s.array; - /* - * We replaced the line below with the two below it because zzRefill - * no longer "refills" the buffer (since the way we do it, it's always - * "full" the first time through, since it points to the segment's - * array). So, we assign zzEndRead here. - */ - //zzStartRead = zzEndRead = s.offset; - zzStartRead = s.offset; - zzEndRead = zzStartRead + s.count - 1; - zzCurrentPos = zzMarkedPos = zzPushbackPos = s.offset; - zzLexicalState = YYINITIAL; - zzReader = reader; - zzAtBOL = true; - zzAtEOF = false; - } - - -%} - -Equals = ([=\:]) -Name = ([^=\: \t\n#!]*) -Whitespace = ([ \t]+) -Comment = ([#!].*) -SingleQuote = (') - -%state VALUE - -%% - - { - {Name} { addToken(Token.RESERVED_WORD); } - {Equals} { start = zzMarkedPos; addToken(Token.OPERATOR); yybegin(VALUE); } - {Whitespace} { addToken(Token.WHITESPACE); } - {Comment} { addToken(Token.COMMENT_EOL); } - <> { addNullToken(); return firstToken; } -} - - { - {SingleQuote}[^']*{SingleQuote}? { addToken(start, zzMarkedPos-1, Token.LITERAL_STRING_DOUBLE_QUOTE); start = zzMarkedPos; } - [^'\{\\]+ {} - "{"[^\}]*"}"? { int temp=zzStartRead; addToken(start, zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addToken(temp, zzMarkedPos-1, Token.VARIABLE); start = zzMarkedPos; } - [\\]. {} - [\\] { addToken(start, zzEndRead, Token.LITERAL_STRING_DOUBLE_QUOTE); return firstToken; } - <> { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addNullToken(); return firstToken; } -} diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PropertiesFileTokenMaker.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PropertiesFileTokenMaker.java deleted file mode 100644 index ffa41d0..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/PropertiesFileTokenMaker.java +++ /dev/null @@ -1,660 +0,0 @@ -/* The following code was generated by JFlex 1.4.1 on 1/28/11 4:16 PM */ - -/* - * 03/21/2005 - * - * PropertiesFileTokenMaker.java - Scanner for properties files. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.modes; - -import java.io.*; -import javax.swing.text.Segment; - -import org.fife.ui.rsyntaxtextarea.*; - - -/** - * This class splits up text into tokens representing a Java properties file.

- * - * This implementation was created using - * JFlex 1.4.1; however, the generated file - * was modified for performance. Memory allocation needs to be almost - * completely removed to be competitive with the handwritten lexers (subclasses - * of AbstractTokenMaker, so this class has been modified so that - * Strings are never allocated (via yytext()), and the scanner never has to - * worry about refilling its buffer (needlessly copying chars around). - * We can achieve this because RText always scans exactly 1 line of tokens at a - * time, and hands the scanner this line as an array of characters (a Segment - * really). Since tokens contain pointers to char arrays instead of Strings - * holding their contents, there is no need for allocating new memory for - * Strings.

- * - * The actual algorithm generated for scanning has, of course, not been - * modified.

- * - * If you wish to regenerate this file yourself, keep in mind the following: - *

    - *
  • The generated PropertiesFileTokenMaker.java file will - * contain two definitions of both zzRefill and - * yyreset. You should hand-delete the second of each - * definition (the ones generated by the lexer), as these generated - * methods modify the input buffer, which we'll never have to do. - *
  • You should also change the declaration/definition of zzBuffer to NOT - * be initialized. This is a needless memory allocation for us since we - * will be pointing the array somewhere else anyway. - *
  • You should NOT call yylex() on the generated scanner - * directly; rather, you should use getTokenList as you would - * with any other TokenMaker instance. - *
- * - * @author Robert Futrell - * @version 0.4 - * - */ - -public class PropertiesFileTokenMaker extends AbstractJFlexTokenMaker { - - /** This character denotes the end of file */ - public static final int YYEOF = -1; - - /** initial size of the lookahead buffer */ - private static final int ZZ_BUFFERSIZE = 16384; - - /** lexical states */ - public static final int YYINITIAL = 0; - public static final int VALUE = 1; - - /** - * Translates characters to character classes - */ - private static final String ZZ_CMAP_PACKED = - "\11\0\1\3\1\2\25\0\1\3\1\4\1\0\1\4\3\0\1\5"+ - "\22\0\1\1\2\0\1\1\36\0\1\6\36\0\1\7\1\0\1\10"+ - "\uff82\0"; - - /** - * Translates characters to character classes - */ - private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); - - /** - * Translates DFA states to action switch labels. - */ - private static final int [] ZZ_ACTION = zzUnpackAction(); - - private static final String ZZ_ACTION_PACKED_0 = - "\1\1\1\0\1\1\1\2\1\3\1\4\1\5\1\6"+ - "\1\7\1\10\1\6\1\5\1\10"; - - private static int [] zzUnpackAction() { - int [] result = new int[13]; - int offset = 0; - offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAction(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do result[j++] = value; while (--count > 0); - } - return j; - } - - - /** - * Translates a state to a row index in the transition table - */ - private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); - - private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\11\0\22\0\33\0\44\0\55\0\66\0\77"+ - "\0\110\0\121\0\33\0\33\0\33"; - - private static int [] zzUnpackRowMap() { - int [] result = new int[13]; - int offset = 0; - offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackRowMap(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int high = packed.charAt(i++) << 16; - result[j++] = high | packed.charAt(i++); - } - return j; - } - - /** - * The transition table of the DFA - */ - private static final int [] ZZ_TRANS = zzUnpackTrans(); - - private static final String ZZ_TRANS_PACKED_0 = - "\1\3\1\4\1\0\1\5\1\6\4\3\5\7\1\10"+ - "\1\11\1\12\1\7\1\3\4\0\4\3\14\0\1\5"+ - "\5\0\2\6\1\0\6\6\5\7\3\0\1\7\5\10"+ - "\1\13\3\10\2\14\1\0\6\14\10\12\1\15"; - - private static int [] zzUnpackTrans() { - int [] result = new int[90]; - int offset = 0; - offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackTrans(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - value--; - do result[j++] = value; while (--count > 0); - } - return j; - } - - - /* error codes */ - private static final int ZZ_UNKNOWN_ERROR = 0; - private static final int ZZ_NO_MATCH = 1; - private static final int ZZ_PUSHBACK_2BIG = 2; - - /* error messages for the codes above */ - private static final String ZZ_ERROR_MSG[] = { - "Unkown internal scanner error", - "Error: could not match input", - "Error: pushback value was too large" - }; - - /** - * ZZ_ATTRIBUTE[aState] contains the attributes of state aState - */ - private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); - - private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\1\1\1\0\1\1\1\11\6\1\3\11"; - - private static int [] zzUnpackAttribute() { - int [] result = new int[13]; - int offset = 0; - offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAttribute(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do result[j++] = value; while (--count > 0); - } - return j; - } - - /** the input device */ - private java.io.Reader zzReader; - - /** the current state of the DFA */ - private int zzState; - - /** the current lexical state */ - private int zzLexicalState = YYINITIAL; - - /** this buffer contains the current text to be matched and is - the source of the yytext() string */ - private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; - - /** the textposition at the last accepting state */ - private int zzMarkedPos; - - /** the current text position in the buffer */ - private int zzCurrentPos; - - /** startRead marks the beginning of the yytext() string in the buffer */ - private int zzStartRead; - - /** endRead marks the last character in the buffer, that has been read - from input */ - private int zzEndRead; - - /** zzAtEOF == true <=> the scanner is at the EOF */ - private boolean zzAtEOF; - - /* user code: */ - - - /** - * Constructor. This must be here because JFlex does not generate a - * no-parameter constructor. - */ - public PropertiesFileTokenMaker() { - super(); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param tokenType The token's type. - */ - private void addToken(int tokenType) { - addToken(zzStartRead, zzMarkedPos-1, tokenType); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param tokenType The token's type. - */ - private void addToken(int start, int end, int tokenType) { - int so = start + offsetShift; - addToken(zzBuffer, start,end, tokenType, so); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param array The character array. - * @param start The starting offset in the array. - * @param end The ending offset in the array. - * @param tokenType The token's type. - * @param startOffset The offset in the document at which this token - * occurs. - */ - @Override - public void addToken(char[] array, int start, int end, int tokenType, int startOffset) { - super.addToken(array, start,end, tokenType, startOffset); - zzStartRead = zzMarkedPos; - } - - - /** - * {@inheritDoc} - */ - @Override - public String[] getLineCommentStartAndEnd(int languageIndex) { - return new String[] { "#", null }; - } - - - /** - * Returns the first token in the linked list of tokens generated - * from text. This method must be implemented by - * subclasses so they can correctly implement syntax highlighting. - * - * @param text The text from which to get tokens. - * @param initialTokenType The token type we should start with. - * @param startOffset The offset into the document at which - * text starts. - * @return The first Token in a linked list representing - * the syntax highlighted text. - */ - public Token getTokenList(Segment text, int initialTokenType, int startOffset) { - - resetTokenList(); - this.offsetShift = -text.offset + startOffset; - - // Start off in the proper state. - int state = Token.NULL; - switch (initialTokenType) { - case Token.LITERAL_STRING_DOUBLE_QUOTE: - state = VALUE; - start = text.offset; - break; - default: - state = Token.NULL; - } - - s = text; - try { - yyreset(zzReader); - yybegin(state); - return yylex(); - } catch (IOException ioe) { - ioe.printStackTrace(); - return new TokenImpl(); - } - - } - - - /** - * Refills the input buffer. - * - * @return true if EOF was reached, otherwise - * false. - * @exception IOException if any I/O-Error occurs. - */ - private boolean zzRefill() { - return zzCurrentPos>=s.offset+s.count; - } - - - /** - * Resets the scanner to read from a new input stream. - * Does not close the old reader. - * - * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). - * Lexical state is set to YY_INITIAL. - * - * @param reader the new input stream - */ - public final void yyreset(java.io.Reader reader) { - // 's' has been updated. - zzBuffer = s.array; - /* - * We replaced the line below with the two below it because zzRefill - * no longer "refills" the buffer (since the way we do it, it's always - * "full" the first time through, since it points to the segment's - * array). So, we assign zzEndRead here. - */ - //zzStartRead = zzEndRead = s.offset; - zzStartRead = s.offset; - zzEndRead = zzStartRead + s.count - 1; - zzCurrentPos = zzMarkedPos = s.offset; - zzLexicalState = YYINITIAL; - zzReader = reader; - zzAtEOF = false; - } - - - - - /** - * Creates a new scanner - * There is also a java.io.InputStream version of this constructor. - * - * @param in the java.io.Reader to read input from. - */ - public PropertiesFileTokenMaker(java.io.Reader in) { - this.zzReader = in; - } - - /** - * Creates a new scanner. - * There is also java.io.Reader version of this constructor. - * - * @param in the java.io.Inputstream to read input from. - */ - public PropertiesFileTokenMaker(java.io.InputStream in) { - this(new java.io.InputStreamReader(in)); - } - - /** - * Unpacks the compressed character translation table. - * - * @param packed the packed character translation table - * @return the unpacked character translation table - */ - private static char [] zzUnpackCMap(String packed) { - char [] map = new char[0x10000]; - int i = 0; /* index in packed string */ - int j = 0; /* index in unpacked array */ - while (i < 42) { - int count = packed.charAt(i++); - char value = packed.charAt(i++); - do map[j++] = value; while (--count > 0); - } - return map; - } - - - /** - * Closes the input stream. - */ - public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ - zzEndRead = zzStartRead; /* invalidate buffer */ - - if (zzReader != null) - zzReader.close(); - } - - - /** - * Returns the current lexical state. - */ - public final int yystate() { - return zzLexicalState; - } - - - /** - * Enters a new lexical state - * - * @param newState the new lexical state - */ - @Override -public final void yybegin(int newState) { - zzLexicalState = newState; - } - - - /** - * Returns the text matched by the current regular expression. - */ - public final String yytext() { - return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); - } - - - /** - * Returns the character at position pos from the - * matched text. - * - * It is equivalent to yytext().charAt(pos), but faster - * - * @param pos the position of the character to fetch. - * A value from 0 to yylength()-1. - * - * @return the character at position pos - */ - public final char yycharat(int pos) { - return zzBuffer[zzStartRead+pos]; - } - - - /** - * Returns the length of the matched text region. - */ - public final int yylength() { - return zzMarkedPos-zzStartRead; - } - - - /** - * Reports an error that occured while scanning. - * - * In a wellformed scanner (no or only correct usage of - * yypushback(int) and a match-all fallback rule) this method - * will only be called with things that "Can't Possibly Happen". - * If this method is called, something is seriously wrong - * (e.g. a JFlex bug producing a faulty scanner etc.). - * - * Usual syntax/scanner level error handling should be done - * in error fallback rules. - * - * @param errorCode the code of the errormessage to display - */ - private void zzScanError(int errorCode) { - String message; - try { - message = ZZ_ERROR_MSG[errorCode]; - } - catch (ArrayIndexOutOfBoundsException e) { - message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; - } - - throw new Error(message); - } - - - /** - * Pushes the specified amount of characters back into the input stream. - * - * They will be read again by then next call of the scanning method - * - * @param number the number of characters to be read again. - * This number must not be greater than yylength()! - */ - public void yypushback(int number) { - if ( number > yylength() ) - zzScanError(ZZ_PUSHBACK_2BIG); - - zzMarkedPos -= number; - } - - - /** - * Resumes scanning until the next regular expression is matched, - * the end of input is encountered or an I/O-Error occurs. - * - * @return the next token - * @exception java.io.IOException if any I/O-Error occurs - */ - public org.fife.ui.rsyntaxtextarea.Token yylex() throws java.io.IOException { - int zzInput; - int zzAction; - - // cached fields: - int zzCurrentPosL; - int zzMarkedPosL; - int zzEndReadL = zzEndRead; - char [] zzBufferL = zzBuffer; - char [] zzCMapL = ZZ_CMAP; - - int [] zzTransL = ZZ_TRANS; - int [] zzRowMapL = ZZ_ROWMAP; - int [] zzAttrL = ZZ_ATTRIBUTE; - - while (true) { - zzMarkedPosL = zzMarkedPos; - - zzAction = -1; - - zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; - - zzState = zzLexicalState; - - - zzForAction: { - while (true) { - - if (zzCurrentPosL < zzEndReadL) - zzInput = zzBufferL[zzCurrentPosL++]; - else if (zzAtEOF) { - zzInput = YYEOF; - break zzForAction; - } - else { - // store back cached positions - zzCurrentPos = zzCurrentPosL; - zzMarkedPos = zzMarkedPosL; - boolean eof = zzRefill(); - // get translated positions and possibly new buffer - zzCurrentPosL = zzCurrentPos; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - zzEndReadL = zzEndRead; - if (eof) { - zzInput = YYEOF; - break zzForAction; - } - else { - zzInput = zzBufferL[zzCurrentPosL++]; - } - } - int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; - if (zzNext == -1) break zzForAction; - zzState = zzNext; - - int zzAttributes = zzAttrL[zzState]; - if ( (zzAttributes & 1) == 1 ) { - zzAction = zzState; - zzMarkedPosL = zzCurrentPosL; - if ( (zzAttributes & 8) == 8 ) break zzForAction; - } - - } - } - - // store back cached position - zzMarkedPos = zzMarkedPosL; - - switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 7: - { addToken(start, zzEndRead, Token.LITERAL_STRING_DOUBLE_QUOTE); return firstToken; - } - case 9: break; - case 2: - { start = zzMarkedPos; addToken(Token.OPERATOR); yybegin(VALUE); - } - case 10: break; - case 8: - { int temp=zzStartRead; addToken(start, zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addToken(temp, zzMarkedPos-1, Token.VARIABLE); start = zzMarkedPos; - } - case 11: break; - case 3: - { addToken(Token.WHITESPACE); - } - case 12: break; - case 6: - { addToken(start, zzMarkedPos-1, Token.LITERAL_STRING_DOUBLE_QUOTE); start = zzMarkedPos; - } - case 13: break; - case 1: - { addToken(Token.RESERVED_WORD); - } - case 14: break; - case 5: - { - } - case 15: break; - case 4: - { addToken(Token.COMMENT_EOL); - } - case 16: break; - default: - if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { - zzAtEOF = true; - switch (zzLexicalState) { - case YYINITIAL: { - addNullToken(); return firstToken; - } - case 14: break; - case VALUE: { - addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addNullToken(); return firstToken; - } - case 15: break; - default: - return null; - } - } - else { - zzScanError(ZZ_NO_MATCH); - } - } - } - } - - -} diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/WindowsBatchTokenMaker.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/WindowsBatchTokenMaker.java deleted file mode 100644 index da351fc..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/WindowsBatchTokenMaker.java +++ /dev/null @@ -1,641 +0,0 @@ -/* - * 03/07/2004 - * - * WindowsBatchTokenMaker.java - Scanner for Windows batch files. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.modes; - -import javax.swing.text.Segment; - -import org.fife.ui.rsyntaxtextarea.*; - - -/** - * A token maker that turns text into a linked list of - * Tokens for syntax highlighting Microsoft - * Windows batch files. - * - * @author Robert Futrell - * @version 0.1 - */ -public class WindowsBatchTokenMaker extends AbstractTokenMaker { - - protected final String operators = "@:*<>=?"; - - private int currentTokenStart; - private int currentTokenType; - - private VariableType varType; - - - /** - * Constructor. - */ - public WindowsBatchTokenMaker() { - super(); // Initializes tokensToHighlight. - } - - - /** - * Checks the token to give it the exact ID it deserves before - * being passed up to the super method. - * - * @param segment Segment to get text from. - * @param start Start offset in segment of token. - * @param end End offset in segment of token. - * @param tokenType The token's type. - * @param startOffset The offset in the document at which the token occurs. - */ - @Override - public void addToken(Segment segment, int start, int end, int tokenType, int startOffset) { - - switch (tokenType) { - // Since reserved words, functions, and data types are all passed - // into here as "identifiers," we have to see what the token - // really is... - case Token.IDENTIFIER: - int value = wordsToHighlight.get(segment, start,end); - if (value!=-1) - tokenType = value; - break; - } - - super.addToken(segment, start, end, tokenType, startOffset); - - } - - - /** - * {@inheritDoc} - */ - @Override - public String[] getLineCommentStartAndEnd(int languageIndex) { - return new String[] { "rem ", null }; - } - - - /** - * Returns whether tokens of the specified type should have "mark - * occurrences" enabled for the current programming language. - * - * @param type The token type. - * @return Whether tokens of this type should have "mark occurrences" - * enabled. - */ - @Override - public boolean getMarkOccurrencesOfTokenType(int type) { - return type==Token.IDENTIFIER || type==Token.VARIABLE; - } - - - /** - * Returns the words to highlight for Windows batch files. - * - * @return A TokenMap containing the words to highlight for - * Windows batch files. - * @see org.fife.ui.rsyntaxtextarea.AbstractTokenMaker#getWordsToHighlight - */ - @Override - public TokenMap getWordsToHighlight() { - - TokenMap tokenMap = new TokenMap(true); // Ignore case. - int reservedWord = Token.RESERVED_WORD; - - // Batch-file specific stuff (?) - tokenMap.put("goto", reservedWord); - tokenMap.put("if", reservedWord); - tokenMap.put("shift", reservedWord); - tokenMap.put("start", reservedWord); - - // General command line stuff - tokenMap.put("ansi.sys", reservedWord); - tokenMap.put("append", reservedWord); - tokenMap.put("arp", reservedWord); - tokenMap.put("assign", reservedWord); - tokenMap.put("assoc", reservedWord); - tokenMap.put("at", reservedWord); - tokenMap.put("attrib", reservedWord); - tokenMap.put("break", reservedWord); - tokenMap.put("cacls", reservedWord); - tokenMap.put("call", reservedWord); - tokenMap.put("cd", reservedWord); - tokenMap.put("chcp", reservedWord); - tokenMap.put("chdir", reservedWord); - tokenMap.put("chkdsk", reservedWord); - tokenMap.put("chknfts", reservedWord); - tokenMap.put("choice", reservedWord); - tokenMap.put("cls", reservedWord); - tokenMap.put("cmd", reservedWord); - tokenMap.put("color", reservedWord); - tokenMap.put("comp", reservedWord); - tokenMap.put("compact", reservedWord); - tokenMap.put("control", reservedWord); - tokenMap.put("convert", reservedWord); - tokenMap.put("copy", reservedWord); - tokenMap.put("ctty", reservedWord); - tokenMap.put("date", reservedWord); - tokenMap.put("debug", reservedWord); - tokenMap.put("defrag", reservedWord); - tokenMap.put("del", reservedWord); - tokenMap.put("deltree", reservedWord); - tokenMap.put("dir", reservedWord); - tokenMap.put("diskcomp", reservedWord); - tokenMap.put("diskcopy", reservedWord); - tokenMap.put("do", reservedWord); - tokenMap.put("doskey", reservedWord); - tokenMap.put("dosshell", reservedWord); - tokenMap.put("drivparm", reservedWord); - tokenMap.put("echo", reservedWord); - tokenMap.put("edit", reservedWord); - tokenMap.put("edlin", reservedWord); - tokenMap.put("emm386", reservedWord); - tokenMap.put("erase", reservedWord); - tokenMap.put("exist", reservedWord); - tokenMap.put("exit", reservedWord); - tokenMap.put("expand", reservedWord); - tokenMap.put("extract", reservedWord); - tokenMap.put("fasthelp", reservedWord); - tokenMap.put("fc", reservedWord); - tokenMap.put("fdisk", reservedWord); - tokenMap.put("find", reservedWord); - tokenMap.put("for", reservedWord); - tokenMap.put("format", reservedWord); - tokenMap.put("ftp", reservedWord); - tokenMap.put("graftabl", reservedWord); - tokenMap.put("help", reservedWord); - tokenMap.put("ifshlp.sys", reservedWord); - tokenMap.put("in", reservedWord); - tokenMap.put("ipconfig", reservedWord); - tokenMap.put("keyb", reservedWord); - tokenMap.put("kill", reservedWord); - tokenMap.put("label", reservedWord); - tokenMap.put("lh", reservedWord); - tokenMap.put("loadfix", reservedWord); - tokenMap.put("loadhigh", reservedWord); - tokenMap.put("lock", reservedWord); - tokenMap.put("md", reservedWord); - tokenMap.put("mem", reservedWord); - tokenMap.put("mkdir", reservedWord); - tokenMap.put("mklink", reservedWord); - tokenMap.put("mode", reservedWord); - tokenMap.put("more", reservedWord); - tokenMap.put("move", reservedWord); - tokenMap.put("msav", reservedWord); - tokenMap.put("msd", reservedWord); - tokenMap.put("mscdex", reservedWord); - tokenMap.put("nbtstat", reservedWord); - tokenMap.put("net", reservedWord); - tokenMap.put("netstat", reservedWord); - tokenMap.put("nlsfunc", reservedWord); - tokenMap.put("not", reservedWord); - tokenMap.put("nslookup", reservedWord); - tokenMap.put("path", reservedWord); - tokenMap.put("pathping", reservedWord); - tokenMap.put("pause", reservedWord); - tokenMap.put("ping", reservedWord); - tokenMap.put("power", reservedWord); - tokenMap.put("print", reservedWord); - tokenMap.put("prompt", reservedWord); - tokenMap.put("pushd", reservedWord); - tokenMap.put("popd", reservedWord); - tokenMap.put("qbasic", reservedWord); - tokenMap.put("rd", reservedWord); - tokenMap.put("ren", reservedWord); - tokenMap.put("rename", reservedWord); - tokenMap.put("rmdir", reservedWord); - tokenMap.put("route", reservedWord); - tokenMap.put("sc", reservedWord); - tokenMap.put("scandisk", reservedWord); - tokenMap.put("scandreg", reservedWord); - tokenMap.put("set", reservedWord); - tokenMap.put("setx", reservedWord); - tokenMap.put("setver", reservedWord); - tokenMap.put("share", reservedWord); - tokenMap.put("shutdown", reservedWord); - tokenMap.put("smartdrv", reservedWord); - tokenMap.put("sort", reservedWord); - tokenMap.put("subset", reservedWord); - tokenMap.put("switches", reservedWord); - tokenMap.put("sys", reservedWord); - tokenMap.put("time", reservedWord); - tokenMap.put("tracert", reservedWord); - tokenMap.put("tree", reservedWord); - tokenMap.put("type", reservedWord); - tokenMap.put("undelete", reservedWord); - tokenMap.put("unformat", reservedWord); - tokenMap.put("unlock", reservedWord); - tokenMap.put("ver", reservedWord); - tokenMap.put("verify", reservedWord); - tokenMap.put("vol", reservedWord); - tokenMap.put("xcopy", reservedWord); - - return tokenMap; - - } - - - /** - * Returns a list of tokens representing the given text. - * - * @param text The text to break into tokens. - * @param startTokenType The token with which to start tokenizing. - * @param startOffset The offset at which the line of tokens begins. - * @return A linked list of tokens representing text. - */ - public Token getTokenList(Segment text, int startTokenType, final int startOffset) { - - resetTokenList(); - - char[] array = text.array; - int offset = text.offset; - int count = text.count; - int end = offset + count; - - // See, when we find a token, its starting position is always of the form: - // 'startOffset + (currentTokenStart-offset)'; but since startOffset and - // offset are constant, tokens' starting positions become: - // 'newStartOffset+currentTokenStart' for one less subtraction operation. - int newStartOffset = startOffset - offset; - - currentTokenStart = offset; - currentTokenType = startTokenType; - -//beginning: - for (int i=offset; i-1) { - addToken(text, currentTokenStart,i, Token.OPERATOR, newStartOffset+currentTokenStart); - currentTokenType = Token.NULL; - break; - } - else { - currentTokenType = Token.IDENTIFIER; - break; - } - - } // End of switch (c). - - break; - - case Token.WHITESPACE: - - switch (c) { - - case ' ': - case '\t': - break; // Still whitespace. - - case '"': - addToken(text, currentTokenStart,i-1, Token.WHITESPACE, newStartOffset+currentTokenStart); - currentTokenStart = i; - currentTokenType = Token.ERROR_STRING_DOUBLE; - break; - - case '%': - addToken(text, currentTokenStart,i-1, Token.WHITESPACE, newStartOffset+currentTokenStart); - currentTokenStart = i; - currentTokenType = Token.VARIABLE; - break; - - // The "separators". - case '(': - case ')': - addToken(text, currentTokenStart,i-1, Token.WHITESPACE, newStartOffset+currentTokenStart); - addToken(text, i,i, Token.SEPARATOR, newStartOffset+i); - currentTokenType = Token.NULL; - break; - - // The "separators2". - case ',': - case ';': - addToken(text, currentTokenStart,i-1, Token.WHITESPACE, newStartOffset+currentTokenStart); - addToken(text, i,i, Token.IDENTIFIER, newStartOffset+i); - currentTokenType = Token.NULL; - break; - - // Newer version of EOL comments, or a label - case ':': - addToken(text, currentTokenStart,i-1, Token.WHITESPACE, newStartOffset+currentTokenStart); - currentTokenStart = i; - // If the previous (whitespace) token was the first token - // added, this is a new-style comment or a label - if (firstToken.getNextToken()==null) { - if (i-1) { - addToken(text, currentTokenStart,i, Token.OPERATOR, newStartOffset+currentTokenStart); - currentTokenType = Token.NULL; - break; - } - else { - currentTokenType = Token.IDENTIFIER; - } - - } // End of switch (c). - - break; - - default: // Should never happen - case Token.IDENTIFIER: - - switch (c) { - - case ' ': - case '\t': - // Check for REM comments. - if (i-currentTokenStart==3 && - (array[i-3]=='r' || array[i-3]=='R') && - (array[i-2]=='e' || array[i-2]=='E') && - (array[i-1]=='m' || array[i-1]=='M')) { - currentTokenType = Token.COMMENT_EOL; - break; - } - addToken(text, currentTokenStart,i-1, Token.IDENTIFIER, newStartOffset+currentTokenStart); - currentTokenStart = i; - currentTokenType = Token.WHITESPACE; - break; - - case '"': - addToken(text, currentTokenStart,i-1, Token.IDENTIFIER, newStartOffset+currentTokenStart); - currentTokenStart = i; - currentTokenType = Token.ERROR_STRING_DOUBLE; - break; - - case '%': - addToken(text, currentTokenStart,i-1, Token.IDENTIFIER, newStartOffset+currentTokenStart); - currentTokenStart = i; - currentTokenType = Token.VARIABLE; - break; - - // Should be part of identifiers, but not at end of "REM". - case '\\': - // Check for REM comments. - if (i-currentTokenStart==3 && - (array[i-3]=='r' || array[i-3]=='R') && - (array[i-2]=='e' || array[i-2]=='E') && - (array[i-1]=='m' || array[i-1]=='M')) { - currentTokenType = Token.COMMENT_EOL; - } - break; - - case '.': - case '_': - break; // Characters good for identifiers. - - // The "separators". - case '(': - case ')': - addToken(text, currentTokenStart,i-1, Token.IDENTIFIER, newStartOffset+currentTokenStart); - addToken(text, i,i, Token.SEPARATOR, newStartOffset+i); - currentTokenType = Token.NULL; - break; - - // The "separators2". - case ',': - case ';': - addToken(text, currentTokenStart,i-1, Token.IDENTIFIER, newStartOffset+currentTokenStart); - addToken(text, i,i, Token.IDENTIFIER, newStartOffset+i); - currentTokenType = Token.NULL; - break; - - default: - - // Just to speed things up a tad, as this will usually be the case. - if (RSyntaxUtilities.isLetterOrDigit(c) || c=='\\') { - break; - } - - int indexOf = operators.indexOf(c); - if (indexOf>-1) { - addToken(text, currentTokenStart,i-1, Token.IDENTIFIER, newStartOffset+currentTokenStart); - addToken(text, i,i, Token.OPERATOR, newStartOffset+i); - currentTokenType = Token.NULL; - break; - } - - // Otherwise, fall through and assume we're still okay as an IDENTIFIER... - - } // End of switch (c). - - break; - - case Token.COMMENT_EOL: - i = end - 1; - addToken(text, currentTokenStart,i, Token.COMMENT_EOL, newStartOffset+currentTokenStart); - // We need to set token type to null so at the bottom we don't add one more token. - currentTokenType = Token.NULL; - break; - - case Token.PREPROCESSOR: // Used for labels - i = end - 1; - addToken(text, currentTokenStart,i, Token.PREPROCESSOR, newStartOffset+currentTokenStart); - // We need to set token type to null so at the bottom we don't add one more token. - currentTokenType = Token.NULL; - break; - - case Token.ERROR_STRING_DOUBLE: - - if (c=='"') { - addToken(text, currentTokenStart,i, Token.LITERAL_STRING_DOUBLE_QUOTE, newStartOffset+currentTokenStart); - currentTokenStart = i + 1; - currentTokenType = Token.NULL; - } - // Otherwise, we're still an unclosed string... - - break; - - case Token.VARIABLE: - - if (i==currentTokenStart+1) { // first character after '%'. - varType = VariableType.NORMAL_VAR; - switch (c) { - case '{': - varType = VariableType.BRACKET_VAR; - break; - case '~': - varType = VariableType.TILDE_VAR; - break; - case '%': - varType = VariableType.DOUBLE_PERCENT_VAR; - break; - default: - if (RSyntaxUtilities.isLetter(c) || c=='_' || c==' ') { // No tab, just space; spaces are okay in variable names. - break; - } - else if (RSyntaxUtilities.isDigit(c)) { // Single-digit command-line argument ("%1"). - addToken(text, currentTokenStart,i, Token.VARIABLE, newStartOffset+currentTokenStart); - currentTokenType = Token.NULL; - break; - } - else { // Anything else, ???. - addToken(text, currentTokenStart,i-1, Token.VARIABLE, newStartOffset+currentTokenStart); // ??? - i--; - currentTokenType = Token.NULL; - break; - } - } // End of switch (c). - } - else { // Character other than first after the '%'. - switch (varType) { - case BRACKET_VAR: - if (c=='}') { - addToken(text, currentTokenStart,i, Token.VARIABLE, newStartOffset+currentTokenStart); - currentTokenType = Token.NULL; - } - break; - case TILDE_VAR: - if (!RSyntaxUtilities.isLetterOrDigit(c)) { - addToken(text, currentTokenStart,i-1, Token.VARIABLE, newStartOffset+currentTokenStart); - i--; - currentTokenType = Token.NULL; - } - break; - case DOUBLE_PERCENT_VAR: - // Can be terminated with "%%", or (essentially) a space. - // substring chars are valid - if (c=='%') { - if (iJFlex 1.4.1; however, the generated file - * was modified for performance. Memory allocation needs to be almost - * completely removed to be competitive with the handwritten lexers (subclasses - * of AbstractTokenMaker, so this class has been modified so that - * Strings are never allocated (via yytext()), and the scanner never has to - * worry about refilling its buffer (needlessly copying chars around). - * We can achieve this because RText always scans exactly 1 line of tokens at a - * time, and hands the scanner this line as an array of characters (a Segment - * really). Since tokens contain pointers to char arrays instead of Strings - * holding their contents, there is no need for allocating new memory for - * Strings.

- * - * The actual algorithm generated for scanning has, of course, not been - * modified.

- * - * If you wish to regenerate this file yourself, keep in mind the following: - *

    - *
  • The generated XMLTokenMaker.java file will contain two - * definitions of both zzRefill and yyreset. - * You should hand-delete the second of each definition (the ones - * generated by the lexer), as these generated methods modify the input - * buffer, which we'll never have to do.
  • - *
  • You should also change the declaration/definition of zzBuffer to NOT - * be initialized. This is a needless memory allocation for us since we - * will be pointing the array somewhere else anyway.
  • - *
  • You should NOT call yylex() on the generated scanner - * directly; rather, you should use getTokenList as you would - * with any other TokenMaker instance.
  • - *
- * - * @author Robert Futrell - * @version 0.5 - * - */ - -public class XMLTokenMaker extends AbstractMarkupTokenMaker { - - /** This character denotes the end of file */ - public static final int YYEOF = -1; - - /** lexical states */ - public static final int INTAG = 4; - public static final int DTD = 3; - public static final int INATTR_DOUBLE = 5; - public static final int YYINITIAL = 0; - public static final int COMMENT = 1; - public static final int CDATA = 7; - public static final int INATTR_SINGLE = 6; - public static final int PI = 2; - - /** - * Translates characters to character classes - */ - private static final String ZZ_CMAP_PACKED = - "\11\0\1\6\1\4\1\0\1\3\23\0\1\6\1\12\1\11\1\22"+ - "\1\30\1\22\1\7\1\25\5\22\1\2\1\42\1\24\12\27\1\23"+ - "\1\10\1\5\1\44\1\21\1\43\1\22\1\16\1\26\1\14\1\15"+ - "\17\26\1\17\6\26\1\13\1\0\1\20\1\0\1\1\1\0\4\26"+ - "\1\40\1\35\1\26\1\31\1\36\2\26\1\37\3\26\1\33\2\26"+ - "\1\34\1\32\2\26\1\41\3\26\3\0\1\22\uff81\0"; - - /** - * Translates characters to character classes - */ - private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); - - /** - * Translates DFA states to action switch labels. - */ - private static final int [] ZZ_ACTION = zzUnpackAction(); - - private static final String ZZ_ACTION_PACKED_0 = - "\5\0\2\1\1\0\2\2\1\3\1\4\1\5\1\6"+ - "\2\1\1\7\4\1\1\10\2\1\1\11\1\1\1\12"+ - "\1\13\1\14\2\15\1\16\1\17\1\20\1\21\1\22"+ - "\1\1\1\23\3\1\1\24\1\25\1\4\1\26\1\6"+ - "\5\0\1\27\4\0\1\30\1\31\5\0\1\32\1\33"+ - "\3\0\1\34\1\35\6\0\1\36"; - - private static int [] zzUnpackAction() { - int [] result = new int[77]; - int offset = 0; - offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAction(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do result[j++] = value; while (--count > 0); - } - return j; - } - - - /** - * Translates a state to a row index in the transition table - */ - private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); - - private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\45\0\112\0\157\0\224\0\271\0\336\0\u0103"+ - "\0\u0128\0\u014d\0\u0172\0\u0197\0\u01bc\0\u01e1\0\u0206\0\u022b"+ - "\0\u0172\0\u0250\0\u0275\0\u029a\0\u02bf\0\u0172\0\u02e4\0\u0309"+ - "\0\u0172\0\u032e\0\u0172\0\u0172\0\u0172\0\u0353\0\u0378\0\u0172"+ - "\0\u0172\0\u039d\0\u0172\0\u0172\0\u03c2\0\u0172\0\u03e7\0\u040c"+ - "\0\u0431\0\u0456\0\u047b\0\u04a0\0\u0172\0\u0172\0\u04c5\0\u04ea"+ - "\0\u050f\0\u0534\0\u0559\0\u0172\0\u057e\0\u05a3\0\u05c8\0\u05ed"+ - "\0\u0612\0\u0172\0\u0637\0\u065c\0\u0681\0\u06a6\0\u06cb\0\u0172"+ - "\0\u0172\0\u06f0\0\u0715\0\u073a\0\u075f\0\u0172\0\u0784\0\u07a9"+ - "\0\u075f\0\u07ce\0\u07f3\0\u0818\0\u0172"; - - private static int [] zzUnpackRowMap() { - int [] result = new int[77]; - int offset = 0; - offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackRowMap(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int high = packed.charAt(i++) << 16; - result[j++] = high | packed.charAt(i++); - } - return j; - } - - /** - * The transition table of the DFA - */ - private static final int [] ZZ_TRANS = zzUnpackTrans(); - - private static final String ZZ_TRANS_PACKED_0 = - "\3\11\1\12\1\13\1\14\1\15\1\16\35\11\2\17"+ - "\1\20\1\17\1\21\24\17\1\22\3\17\1\23\3\17"+ - "\1\24\3\17\4\25\1\26\36\25\1\27\1\25\4\30"+ - "\1\31\1\32\5\30\1\33\4\30\1\34\1\35\23\30"+ - "\3\36\1\37\1\0\1\36\1\15\2\36\1\40\7\36"+ - "\1\41\2\36\1\42\1\43\16\36\1\44\11\45\1\46"+ - "\33\45\25\47\1\46\17\47\20\50\1\51\24\50\4\11"+ - "\4\0\40\11\1\12\2\0\1\15\1\0\35\11\46\0"+ - "\1\52\10\0\1\53\1\0\4\52\3\0\1\52\1\54"+ - "\1\0\1\52\2\0\11\52\1\0\1\55\4\0\1\15"+ - "\2\0\1\15\36\0\6\16\1\0\1\16\1\56\34\16"+ - "\2\17\1\0\1\17\1\0\24\17\1\0\3\17\1\0"+ - "\3\17\1\0\3\17\2\0\1\57\74\0\1\60\44\0"+ - "\1\61\3\0\1\62\47\0\1\63\3\0\4\25\1\0"+ - "\36\25\1\0\1\25\21\0\1\64\23\0\4\30\2\0"+ - "\5\30\1\0\4\30\2\0\23\30\12\0\1\65\32\0"+ - "\4\36\1\0\1\36\1\0\2\36\1\0\7\36\1\0"+ - "\2\36\2\0\16\36\1\0\3\36\1\37\1\0\1\36"+ - "\1\15\2\36\1\0\7\36\1\0\2\36\2\0\16\36"+ - "\22\0\1\41\23\0\11\45\1\0\33\45\25\47\1\0"+ - "\17\47\20\50\1\0\24\50\20\0\1\66\25\0\2\52"+ - "\11\0\4\52\3\0\1\52\2\0\2\52\1\0\12\52"+ - "\4\0\1\67\10\0\1\70\32\0\1\71\12\0\4\71"+ - "\3\0\1\71\2\0\1\71\2\0\11\71\24\0\1\72"+ - "\55\0\1\73\45\0\1\74\50\0\1\75\46\0\1\76"+ - "\5\0\1\77\63\0\1\100\25\0\1\101\56\0\1\102"+ - "\31\0\2\71\11\0\4\71\3\0\1\71\2\0\2\71"+ - "\1\0\12\71\35\0\1\103\34\0\1\104\61\0\1\74"+ - "\46\0\1\105\4\0\1\106\57\0\1\107\52\0\1\104"+ - "\10\0\1\74\34\0\1\110\21\0\2\111\4\0\2\111"+ - "\1\0\2\111\4\105\1\111\1\0\2\111\1\105\1\111"+ - "\14\105\3\111\16\0\1\112\52\0\1\105\37\0\1\113"+ - "\43\0\1\114\41\0\1\115\31\0"; - - private static int [] zzUnpackTrans() { - int [] result = new int[2109]; - int offset = 0; - offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackTrans(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - value--; - do result[j++] = value; while (--count > 0); - } - return j; - } - - - /* error codes */ - private static final int ZZ_UNKNOWN_ERROR = 0; - private static final int ZZ_NO_MATCH = 1; - private static final int ZZ_PUSHBACK_2BIG = 2; - - /* error messages for the codes above */ - private static final String ZZ_ERROR_MSG[] = { - "Unkown internal scanner error", - "Error: could not match input", - "Error: pushback value was too large" - }; - - /** - * ZZ_ATTRIBUTE[aState] contains the attributes of state aState - */ - private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); - - private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\5\0\2\1\1\0\2\1\1\11\5\1\1\11\4\1"+ - "\1\11\2\1\1\11\1\1\3\11\2\1\2\11\1\1"+ - "\2\11\1\1\1\11\6\1\2\11\5\0\1\11\4\0"+ - "\1\1\1\11\5\0\2\11\3\0\1\1\1\11\6\0"+ - "\1\11"; - - private static int [] zzUnpackAttribute() { - int [] result = new int[77]; - int offset = 0; - offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAttribute(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do result[j++] = value; while (--count > 0); - } - return j; - } - - /** the input device */ - private java.io.Reader zzReader; - - /** the current state of the DFA */ - private int zzState; - - /** the current lexical state */ - private int zzLexicalState = YYINITIAL; - - /** this buffer contains the current text to be matched and is - the source of the yytext() string */ - private char zzBuffer[]; - - /** the textposition at the last accepting state */ - private int zzMarkedPos; - - /** the current text position in the buffer */ - private int zzCurrentPos; - - /** startRead marks the beginning of the yytext() string in the buffer */ - private int zzStartRead; - - /** endRead marks the last character in the buffer, that has been read - from input */ - private int zzEndRead; - - /** zzAtEOF == true <=> the scanner is at the EOF */ - private boolean zzAtEOF; - - /* user code: */ - - /** - * Type specific to XMLTokenMaker denoting a line ending with an unclosed - * double-quote attribute. - */ - public static final int INTERNAL_ATTR_DOUBLE = -1; - - - /** - * Type specific to XMLTokenMaker denoting a line ending with an unclosed - * single-quote attribute. - */ - public static final int INTERNAL_ATTR_SINGLE = -2; - - - /** - * Token type specific to XMLTokenMaker denoting a line ending with an - * unclosed XML tag; thus a new line is beginning still inside of the tag. - */ - public static final int INTERNAL_INTAG = -3; - - /** - * Token type specific to XMLTokenMaker denoting a line ending with an - * unclosed DOCTYPE element. - */ - public static final int INTERNAL_DTD = -4; - - /** - * Token type specific to XMLTokenMaker denoting a line ending with an - * unclosed, locally-defined DTD in a DOCTYPE element. - */ - public static final int INTERNAL_DTD_INTERNAL = -5; - - /** - * Token type specific to XMLTokenMaker denoting a line ending with an - * unclosed comment. The state to return to when this comment ends is - * embedded in the token type as well. - */ - public static final int INTERNAL_IN_XML_COMMENT = -(1<<11); - - /** - * Whether closing markup tags are automatically completed for HTML. - */ - private static boolean completeCloseTags; - - /** - * Whether the DTD we're currently in is a locally-defined one. This - * field is only valid when in a DOCTYPE element (the state). - */ - private boolean inInternalDtd; - - /** - * The state we were in prior to the current one. This is used to know - * what state to resume after an MLC ends. - */ - private int prevState; - - - /** - * Constructor. This must be here because JFlex does not generate a - * no-parameter constructor. - */ - public XMLTokenMaker() { - } - - - static { - completeCloseTags = true; - } - - - /** - * Adds the token specified to the current linked list of tokens as an - * "end token;" that is, at zzMarkedPos. - * - * @param tokenType The token's type. - */ - private void addEndToken(int tokenType) { - addToken(zzMarkedPos,zzMarkedPos, tokenType); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param tokenType The token's type. - * @see #addToken(int, int, int) - */ - private void addHyperlinkToken(int start, int end, int tokenType) { - int so = start + offsetShift; - addToken(zzBuffer, start,end, tokenType, so, true); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param tokenType The token's type. - */ - private void addToken(int tokenType) { - addToken(zzStartRead, zzMarkedPos-1, tokenType); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param tokenType The token's type. - */ - private void addToken(int start, int end, int tokenType) { - int so = start + offsetShift; - addToken(zzBuffer, start,end, tokenType, so); - } - - - /** - * Adds the token specified to the current linked list of tokens. - * - * @param array The character array. - * @param start The starting offset in the array. - * @param end The ending offset in the array. - * @param tokenType The token's type. - * @param startOffset The offset in the document at which this token - * occurs. - */ - @Override - public void addToken(char[] array, int start, int end, int tokenType, int startOffset) { - super.addToken(array, start,end, tokenType, startOffset); - zzStartRead = zzMarkedPos; - } - - - /** - * {@inheritDoc} - */ - @Override - protected OccurrenceMarker createOccurrenceMarker() { - return new XmlOccurrenceMarker(); - } - - - /** - * Returns whether markup close tags should be completed. For XML, the - * default value is true. - * - * @return Whether closing markup tags are completed. - * @see #setCompleteCloseTags(boolean) - */ - @Override - public boolean getCompleteCloseTags() { - return completeCloseTags; - } - - - /** - * Static version of {@link #getCompleteCloseTags()}. This hack is - * unfortunately needed for applications to be able to query this value - * without instantiating this class. - * - * @return Whether closing markup tags are completed. - * @see #setCompleteCloseTags(boolean) - */ - public static boolean getCompleteCloseMarkupTags() { - return completeCloseTags; - } - - - /** - * Returns Token.MARKUP_TAG_NAME. - * - * @param type The token type. - * @return Whether tokens of this type should have "mark occurrences" - * enabled. - */ - @Override - public boolean getMarkOccurrencesOfTokenType(int type) { - return type==Token.MARKUP_TAG_NAME; - } - - - /** - * Returns the first token in the linked list of tokens generated - * from text. This method must be implemented by - * subclasses so they can correctly implement syntax highlighting. - * - * @param text The text from which to get tokens. - * @param initialTokenType The token type we should start with. - * @param startOffset The offset into the document at which - * text starts. - * @return The first Token in a linked list representing - * the syntax highlighted text. - */ - public Token getTokenList(Segment text, int initialTokenType, int startOffset) { - - resetTokenList(); - this.offsetShift = -text.offset + startOffset; - prevState = YYINITIAL; - inInternalDtd = false; - - // Start off in the proper state. - int state = YYINITIAL; - switch (initialTokenType) { - case Token.MARKUP_COMMENT: - state = COMMENT; - break; - case INTERNAL_DTD: - state = DTD; - break; - case INTERNAL_DTD_INTERNAL: - state = DTD; - inInternalDtd = true; - break; - case INTERNAL_ATTR_DOUBLE: - state = INATTR_DOUBLE; - break; - case INTERNAL_ATTR_SINGLE: - state = INATTR_SINGLE; - break; - case Token.MARKUP_PROCESSING_INSTRUCTION: - state = PI; - break; - case INTERNAL_INTAG: - state = INTAG; - break; - case Token.MARKUP_CDATA: - state = CDATA; - break; - default: - if (initialTokenType<-1024) { // INTERNAL_IN_XML_COMMENT - prevState - int main = -(-initialTokenType & 0xffffff00); - switch (main) { - default: // Should never happen - case INTERNAL_IN_XML_COMMENT: - state = COMMENT; - break; - } - prevState = -initialTokenType&0xff; - } - else { // Shouldn't happen - state = Token.NULL; - } - } - - start = text.offset; - s = text; - try { - yyreset(zzReader); - yybegin(state); - return yylex(); - } catch (IOException ioe) { - ioe.printStackTrace(); - return new TokenImpl(); - } - - } - - - /** - * Sets whether markup close tags should be completed. - * - * @param complete Whether closing markup tags are completed. - * @see #getCompleteCloseTags() - */ - public static void setCompleteCloseTags(boolean complete) { - completeCloseTags = complete; - } - - - /** - * Refills the input buffer. - * - * @return true if EOF was reached, otherwise - * false. - */ - private boolean zzRefill() { - return zzCurrentPos>=s.offset+s.count; - } - - - /** - * Resets the scanner to read from a new input stream. - * Does not close the old reader. - * - * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). - * Lexical state is set to YY_INITIAL. - * - * @param reader the new input stream - */ - public final void yyreset(java.io.Reader reader) { - // 's' has been updated. - zzBuffer = s.array; - /* - * We replaced the line below with the two below it because zzRefill - * no longer "refills" the buffer (since the way we do it, it's always - * "full" the first time through, since it points to the segment's - * array). So, we assign zzEndRead here. - */ - //zzStartRead = zzEndRead = s.offset; - zzStartRead = s.offset; - zzEndRead = zzStartRead + s.count - 1; - zzCurrentPos = zzMarkedPos = s.offset; - zzLexicalState = YYINITIAL; - zzReader = reader; - zzAtEOF = false; - } - - - - - /** - * Creates a new scanner - * There is also a java.io.InputStream version of this constructor. - * - * @param in the java.io.Reader to read input from. - */ - public XMLTokenMaker(java.io.Reader in) { - this.zzReader = in; - } - - /** - * Creates a new scanner. - * There is also java.io.Reader version of this constructor. - * - * @param in the java.io.Inputstream to read input from. - */ - public XMLTokenMaker(java.io.InputStream in) { - this(new java.io.InputStreamReader(in)); - } - - /** - * Unpacks the compressed character translation table. - * - * @param packed the packed character translation table - * @return the unpacked character translation table - */ - private static char [] zzUnpackCMap(String packed) { - char [] map = new char[0x10000]; - int i = 0; /* index in packed string */ - int j = 0; /* index in unpacked array */ - while (i < 116) { - int count = packed.charAt(i++); - char value = packed.charAt(i++); - do map[j++] = value; while (--count > 0); - } - return map; - } - - - /** - * Closes the input stream. - */ - public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ - zzEndRead = zzStartRead; /* invalidate buffer */ - - if (zzReader != null) - zzReader.close(); - } - - - /** - * Returns the current lexical state. - */ - public final int yystate() { - return zzLexicalState; - } - - - /** - * Enters a new lexical state - * - * @param newState the new lexical state - */ - @Override -public final void yybegin(int newState) { - zzLexicalState = newState; - } - - - /** - * Returns the text matched by the current regular expression. - */ - public final String yytext() { - return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); - } - - - /** - * Returns the character at position pos from the - * matched text. - * - * It is equivalent to yytext().charAt(pos), but faster - * - * @param pos the position of the character to fetch. - * A value from 0 to yylength()-1. - * - * @return the character at position pos - */ - public final char yycharat(int pos) { - return zzBuffer[zzStartRead+pos]; - } - - - /** - * Returns the length of the matched text region. - */ - public final int yylength() { - return zzMarkedPos-zzStartRead; - } - - - /** - * Reports an error that occured while scanning. - * - * In a wellformed scanner (no or only correct usage of - * yypushback(int) and a match-all fallback rule) this method - * will only be called with things that "Can't Possibly Happen". - * If this method is called, something is seriously wrong - * (e.g. a JFlex bug producing a faulty scanner etc.). - * - * Usual syntax/scanner level error handling should be done - * in error fallback rules. - * - * @param errorCode the code of the errormessage to display - */ - private void zzScanError(int errorCode) { - String message; - try { - message = ZZ_ERROR_MSG[errorCode]; - } - catch (ArrayIndexOutOfBoundsException e) { - message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; - } - - throw new Error(message); - } - - - /** - * Pushes the specified amount of characters back into the input stream. - * - * They will be read again by then next call of the scanning method - * - * @param number the number of characters to be read again. - * This number must not be greater than yylength()! - */ - public void yypushback(int number) { - if ( number > yylength() ) - zzScanError(ZZ_PUSHBACK_2BIG); - - zzMarkedPos -= number; - } - - - /** - * Resumes scanning until the next regular expression is matched, - * the end of input is encountered or an I/O-Error occurs. - * - * @return the next token - * @exception java.io.IOException if any I/O-Error occurs - */ - public org.fife.ui.rsyntaxtextarea.Token yylex() throws java.io.IOException { - int zzInput; - int zzAction; - - // cached fields: - int zzCurrentPosL; - int zzMarkedPosL; - int zzEndReadL = zzEndRead; - char [] zzBufferL = zzBuffer; - char [] zzCMapL = ZZ_CMAP; - - int [] zzTransL = ZZ_TRANS; - int [] zzRowMapL = ZZ_ROWMAP; - int [] zzAttrL = ZZ_ATTRIBUTE; - - while (true) { - zzMarkedPosL = zzMarkedPos; - - zzAction = -1; - - zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; - - zzState = zzLexicalState; - - - zzForAction: { - while (true) { - - if (zzCurrentPosL < zzEndReadL) - zzInput = zzBufferL[zzCurrentPosL++]; - else if (zzAtEOF) { - zzInput = YYEOF; - break zzForAction; - } - else { - // store back cached positions - zzCurrentPos = zzCurrentPosL; - zzMarkedPos = zzMarkedPosL; - boolean eof = zzRefill(); - // get translated positions and possibly new buffer - zzCurrentPosL = zzCurrentPos; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - zzEndReadL = zzEndRead; - if (eof) { - zzInput = YYEOF; - break zzForAction; - } - else { - zzInput = zzBufferL[zzCurrentPosL++]; - } - } - int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; - if (zzNext == -1) break zzForAction; - zzState = zzNext; - - int zzAttributes = zzAttrL[zzState]; - if ( (zzAttributes & 1) == 1 ) { - zzAction = zzState; - zzMarkedPosL = zzCurrentPosL; - if ( (zzAttributes & 8) == 8 ) break zzForAction; - } - - } - } - - // store back cached position - zzMarkedPos = zzMarkedPosL; - - switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 25: - { int temp = zzMarkedPos; addToken(start,zzStartRead+2, Token.MARKUP_COMMENT); start = temp; yybegin(prevState); - } - case 31: break; - case 19: - { yybegin(INTAG); addToken(start,zzStartRead, Token.MARKUP_TAG_ATTRIBUTE_VALUE); - } - case 32: break; - case 3: - { addNullToken(); return firstToken; - } - case 33: break; - case 29: - { int temp = zzStartRead; addToken(start,zzStartRead-1, Token.MARKUP_DTD); start = temp; prevState = zzLexicalState; yybegin(COMMENT); - } - case 34: break; - case 11: - { inInternalDtd = false; - } - case 35: break; - case 4: - { addToken(Token.MARKUP_TAG_DELIMITER); yybegin(INTAG); - } - case 36: break; - case 24: - { int count = yylength(); - addToken(zzStartRead,zzStartRead+1, Token.MARKUP_TAG_DELIMITER); - addToken(zzMarkedPos-(count-2), zzMarkedPos-1, Token.MARKUP_TAG_NAME); - yybegin(INTAG); - } - case 37: break; - case 9: - { addToken(start,zzStartRead-1, Token.MARKUP_DTD); addEndToken(inInternalDtd ? INTERNAL_DTD_INTERNAL : INTERNAL_DTD); return firstToken; - } - case 38: break; - case 16: - { addToken(Token.MARKUP_TAG_DELIMITER); /* Not valid but we'll still accept it */ - } - case 39: break; - case 7: - { addToken(start,zzStartRead-1, Token.MARKUP_COMMENT); addEndToken(INTERNAL_IN_XML_COMMENT - prevState); return firstToken; - } - case 40: break; - case 5: - { addToken(Token.WHITESPACE); - } - case 41: break; - case 27: - { start = zzStartRead; prevState = zzLexicalState; yybegin(COMMENT); - } - case 42: break; - case 26: - { int temp=zzStartRead; yybegin(YYINITIAL); addToken(start,zzStartRead-1, Token.MARKUP_CDATA); addToken(temp,zzMarkedPos-1, Token.MARKUP_CDATA_DELIMITER); - } - case 43: break; - case 6: - { addToken(Token.MARKUP_ENTITY_REFERENCE); - } - case 44: break; - case 12: - { if (!inInternalDtd) { yybegin(YYINITIAL); addToken(start,zzStartRead, Token.MARKUP_DTD); } - } - case 45: break; - case 2: - { addToken(Token.IDENTIFIER); - } - case 46: break; - case 10: - { inInternalDtd = true; - } - case 47: break; - case 23: - { yybegin(YYINITIAL); addToken(start,zzStartRead+1, Token.MARKUP_PROCESSING_INSTRUCTION); - } - case 48: break; - case 21: - { start = zzMarkedPos-2; inInternalDtd = false; yybegin(DTD); - } - case 49: break; - case 20: - { int count = yylength(); - addToken(zzStartRead,zzStartRead, Token.MARKUP_TAG_DELIMITER); - addToken(zzMarkedPos-(count-1), zzMarkedPos-1, Token.MARKUP_TAG_NAME); - yybegin(INTAG); - } - case 50: break; - case 22: - { start = zzMarkedPos-2; yybegin(PI); - } - case 51: break; - case 8: - { addToken(start,zzStartRead-1, Token.MARKUP_PROCESSING_INSTRUCTION); return firstToken; - } - case 52: break; - case 14: - { start = zzMarkedPos-1; yybegin(INATTR_DOUBLE); - } - case 53: break; - case 28: - { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.MARKUP_COMMENT); addHyperlinkToken(temp,zzMarkedPos-1, Token.MARKUP_COMMENT); start = zzMarkedPos; - } - case 54: break; - case 15: - { yybegin(YYINITIAL); addToken(Token.MARKUP_TAG_DELIMITER); - } - case 55: break; - case 17: - { start = zzMarkedPos-1; yybegin(INATTR_SINGLE); - } - case 56: break; - case 18: - { addToken(Token.OPERATOR); - } - case 57: break; - case 30: - { addToken(Token.MARKUP_CDATA_DELIMITER); start = zzMarkedPos; yybegin(CDATA); - } - case 58: break; - case 13: - { addToken(Token.MARKUP_TAG_ATTRIBUTE); - } - case 59: break; - case 1: - { - } - case 60: break; - default: - if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { - zzAtEOF = true; - switch (zzLexicalState) { - case INTAG: { - addToken(start,zzStartRead-1, INTERNAL_INTAG); return firstToken; - } - case 78: break; - case DTD: { - addToken(start,zzStartRead-1, Token.MARKUP_DTD); addEndToken(inInternalDtd ? INTERNAL_DTD_INTERNAL : INTERNAL_DTD); return firstToken; - } - case 79: break; - case INATTR_DOUBLE: { - addToken(start,zzStartRead-1, Token.MARKUP_TAG_ATTRIBUTE_VALUE); addEndToken(INTERNAL_ATTR_DOUBLE); return firstToken; - } - case 80: break; - case YYINITIAL: { - addNullToken(); return firstToken; - } - case 81: break; - case COMMENT: { - addToken(start,zzStartRead-1, Token.MARKUP_COMMENT); addEndToken(INTERNAL_IN_XML_COMMENT - prevState); return firstToken; - } - case 82: break; - case CDATA: { - addToken(start,zzStartRead-1, Token.MARKUP_CDATA); return firstToken; - } - case 83: break; - case INATTR_SINGLE: { - addToken(start,zzStartRead-1, Token.MARKUP_TAG_ATTRIBUTE_VALUE); addEndToken(INTERNAL_ATTR_SINGLE); return firstToken; - } - case 84: break; - case PI: { - addToken(start,zzStartRead-1, Token.MARKUP_PROCESSING_INSTRUCTION); return firstToken; - } - case 85: break; - default: - return null; - } - } - else { - zzScanError(ZZ_NO_MATCH); - } - } - } - } - - -} diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/package.html b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/package.html deleted file mode 100644 index ea57d4e..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/modes/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - - Scanners that tokenize source in RSyntaxTextArea. - - diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/package.html b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/package.html deleted file mode 100644 index b4680d6..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - - A syntax-highlighting text editor. - - diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/AbstractParser.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/AbstractParser.java deleted file mode 100644 index f5d38fd..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/AbstractParser.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 07/31/2009 - * - * AbstractParser.java - A base implementation for parsers. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.parser; - -import java.net.URL; - -import org.fife.ui.rsyntaxtextarea.focusabletip.FocusableTip; - - -/** - * A base class for {@link Parser} implementations. Most Parsers - * should be able to extend this class. - * - * @author Robert Futrell - * @version 1.0 - */ -public abstract class AbstractParser implements Parser { - - /** - * Whether this parser is enabled. If this is false, then - * this parser will not be run. - */ - private boolean enabled; - - /** - * Listens for events from {@link FocusableTip}s generated from this - * parser's notices. - */ - private ExtendedHyperlinkListener linkListener; - - - /** - * Constructor. - */ - protected AbstractParser() { - setEnabled(true); - } - - - /** - * {@inheritDoc} - */ - public ExtendedHyperlinkListener getHyperlinkListener() { - return linkListener; - } - - - /** - * Returns null. Parsers that wish to show images in their - * tool tips should override this method to return the image base URL. - * - * @return null always. - */ - public URL getImageBase() { - return null; - } - - - /** - * {@inheritDoc} - */ - public boolean isEnabled() { - return enabled; - } - - - /** - * Toggles whether this parser is enabled. - * - * @param enabled Whether this parser is enabled. - * @see #isEnabled() - */ - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - - /** - * Returns the listener for this parser. - * - * @param listener The new listener. - * @see #getHyperlinkListener() - */ - public void setHyperlinkListener(ExtendedHyperlinkListener listener) { - linkListener = listener; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/DefaultParseResult.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/DefaultParseResult.java deleted file mode 100644 index c8571fc..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/DefaultParseResult.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * 07/27/2009 - * - * DefaultParseResult.java - A basic implementation of a ParseResult. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.parser; - -import java.util.ArrayList; -import java.util.List; - - -/** - * A basic implementation of {@link ParseResult}. Most, if not all, - * Parsers can return instances of this class. - * - * @author Robert Futrell - * @version 1.0 - * @see Parser - */ -public class DefaultParseResult implements ParseResult { - - private Parser parser; - private int firstLineParsed; - private int lastLineParsed; - private List notices; - private long parseTime; - private Exception error; - - - public DefaultParseResult(Parser parser) { - this.parser = parser; - notices = new ArrayList(); - } - - - /** - * Adds a parser notice. - * - * @param notice The new notice. - * @see #clearNotices() - */ - public void addNotice(ParserNotice notice) { - notices.add(notice); - } - - - /** - * Clears any parser notices in this result. - * - * @see #addNotice(ParserNotice) - */ - public void clearNotices() { - notices.clear(); - } - - - /** - * {@inheritDoc} - */ - public Exception getError() { - return error; - } - - - /** - * {@inheritDoc} - */ - public int getFirstLineParsed() { - return firstLineParsed; - } - - - /** - * {@inheritDoc} - */ - public int getLastLineParsed() { - return lastLineParsed; - } - - - /** - * {@inheritDoc} - */ - public List getNotices() { - return notices; - } - - - /** - * {@inheritDoc} - */ - public long getParseTime() { - return parseTime; - } - - - /** - * {@inheritDoc} - */ - public Parser getParser() { - return parser; - } - - - /** - * Sets the error that occurred when last parsing the document, if - * any. - * - * @param e The error that occurred, or null if no error - * occurred. - */ - public void setError(Exception e) { - this.error = e; - } - - - /** - * Sets the amount of time it took for this parser to parse the document. - * - * @param time The amount of time, in milliseconds. - * @see #getParseTime() - */ - public void setParseTime(long time) { - parseTime = time; - } - - - /** - * Sets the line range parsed. - * - * @param first The first line parsed, inclusive. - * @param last The last line parsed, inclusive. - * @see #getFirstLineParsed() - * @see #getLastLineParsed() - */ - public void setParsedLines(int first, int last) { - firstLineParsed = first; - lastLineParsed = last; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ExtendedHyperlinkListener.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ExtendedHyperlinkListener.java deleted file mode 100644 index 08784b8..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ExtendedHyperlinkListener.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 07/31/2009 - * - * ExtendedHyeprlinkListener.java - A hyperlink event from a FocusableTip. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.parser; - -import java.util.EventListener; -import javax.swing.event.HyperlinkEvent; - -import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; -import org.fife.ui.rsyntaxtextarea.focusabletip.FocusableTip; - - -/** - * Listens for hyperlink events from {@link FocusableTip}s. In addition to - * the link event, the text area that the tip is for is also received, which - * allows the listener to modify the displayed content, if desired. - * - * @author Robert Futrell - * @version 1.0 - */ -public interface ExtendedHyperlinkListener extends EventListener { - - - /** - * Called when a link in a {@link FocusableTip} is clicked. - * - * @param textArea The text area displaying the tip. - * @param e The event. - */ - public void linkClicked(RSyntaxTextArea textArea, HyperlinkEvent e); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ParseResult.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ParseResult.java deleted file mode 100644 index 99c19ad..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ParseResult.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 07/27/2009 - * - * ParseResult.java - The result of a Parser parsing some section of an - * RSyntaxTextArea. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.parser; - -import java.util.List; - - -/** - * The result from a {@link Parser}. This contains the section of lines - * parsed and any notices for that section. - * - * @author Robert Futrell - * @version 1.0 - * @see DefaultParseResult - * @see ParserNotice - */ -public interface ParseResult { - - - /** - * Returns an error that occurred while parsing the document, if any. - * - * @return The error, or null if the document was - * successfully parsed. - */ - public Exception getError(); - - - /** - * Returns the first line parsed. All parser implementations should - * currently set this to 0 and parse the entire document. - * - * @return The first line parsed. - * @see #getLastLineParsed() - */ - public int getFirstLineParsed(); - - - /** - * Returns the first line parsed. All parser implementations should - * currently set this to the document's line count and parse the entire - * document. - * - * @return The last line parsed. - * @see #getFirstLineParsed() - */ - public int getLastLineParsed(); - - - /** - * Returns the notices for the parsed section. - * - * @return A list of {@link ParserNotice}s. - */ - public List getNotices(); - - - /** - * Returns the parser that generated these notices. - * - * @return The parser. - */ - public Parser getParser(); - - - /** - * Returns the amount of time this parser took to parse the specified - * range of text. This is an optional operation; parsers are permitted - * to return 0 for this value. - * - * @return The parse time, in milliseconds, or 0 if the - * parse time was not recorded. - */ - public long getParseTime(); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/Parser.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/Parser.java deleted file mode 100644 index 75a508b..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/Parser.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 09/23/2005 - * - * Parser.java - An interface for a parser for RSyntaxTextArea. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.parser; - -import java.net.URL; - -import org.fife.ui.rsyntaxtextarea.RSyntaxDocument; -import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; -import org.fife.ui.rsyntaxtextarea.SyntaxConstants; -import org.fife.ui.rsyntaxtextarea.focusabletip.FocusableTip; - - -/** - * An interface for a parser for content in an {@link RSyntaxTextArea}. - * A Parser returns a list of issues it finds in the text area's - * content, which the text area can flag (e.g. squiggle underline). It can - * also return descriptions of the issues, to be used in tool tips.

- * - * To install a Parser, simply call - * {@link RSyntaxTextArea#addParser(Parser)}. - * - * @author Robert Futrell - * @version 0.5 - * @see AbstractParser - */ -public interface Parser { - - - /** - * Returns the listener for hyperlink events from {@link FocusableTip}s, - * or null if none. - * - * @return The listener. - */ - public ExtendedHyperlinkListener getHyperlinkListener(); - - - /** - * Returns the base URL for any images displayed in returned - * {@link ParserNotice} HTML text. Note that if a parser notice's text - * is not HTML, this URL is not used. - * - * @return The URL. This may be null. - */ - public URL getImageBase(); - - - /** - * Returns whether this parser is enabled. If this returns - * false, it will not be run. - * - * @return Whether this parser is enabled. - */ - public boolean isEnabled(); - - - /** - * Parses input from the specified document. - * - * @param doc The document to parse. This document is in a read lock, - * so it cannot be modified while parsing is occurring. - * @param style The language being rendered, such as - * {@link SyntaxConstants#SYNTAX_STYLE_JAVA}. - * @return An object describing the section of the document parsed and the - * results. This is guaranteed to be non-null. - */ - public ParseResult parse(RSyntaxDocument doc, String style); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ParserNotice.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ParserNotice.java deleted file mode 100644 index eb22901..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ParserNotice.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * 09/23/2005 - * - * ParserNotice.java - A notice (i.e, and error or warning) from a parser. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.parser; - -import java.awt.Color; - - -/** - * A notice (e.g., a warning or error) from a parser.

- * - * Since different parsers have different levels of precision when it comes - * to identifying errors in code, this class supports marking parser notices - * on either a per-line basis or arbitrary regions of a document. For any - * ParserNotice, {@link #getLine()} is guaranteed to return the - * (primary) line containing the notice, but {@link #getOffset()} and - * {@link #getLength()} are allowed to return -1 if that - * particular notice isn't mapped to a specific region of code. Applications - * can check whether an instance of this class only has line-level information - * with the - * - * @author Robert Futrell - * @version 1.0 - * @see DefaultParserNotice - */ -public interface ParserNotice extends Comparable { - - /** - * Returns whether this parser notice contains the specified location - * in the document. - * - * @param pos The position in the document. - * @return Whether the position is contained. This will always return - * false if {@link #getOffset()} returns - * -1. - */ - public boolean containsPosition(int pos); - - - /** - * Returns the color to use when painting this notice. - * - * @return The color. - */ - public Color getColor(); - - - /** - * Returns the length of the code the message is concerned with. - * - * @return The length of the code the message is concerned with, or - * -1 if unknown. - * @see #getOffset() - * @see #getLine() - */ - public int getLength(); - - - /** - * Returns the level of this notice. - * - * @return A value from the {@link Level} enumeration. - */ - public Level getLevel(); - - - /** - * Returns the line number the notice is about. - * - * @return The line number. - */ - public int getLine(); - - - /** - * Returns whether this parser notice has offset and length information - * (as opposed to just what line number to mark). - * - * @return Whether the offset and length of the notice are specified. - * @see #getLine() - * @see #getOffset() - * @see #getLength() - */ - public boolean getKnowsOffsetAndLength(); - - - /** - * Returns the message from the parser. - * - * @return The message from the parser. - */ - public String getMessage(); - - - /** - * Returns the offset of the code the message is concerned with. - * - * @return The offset, or -1 if unknown. - * @see #getLength() - * @see #getLine() - */ - public int getOffset(); - - - /** - * Returns the parser that created this message. - * - * @return The parser. - */ - public Parser getParser(); - - - /** - * Whether a squiggle underline should be drawn in the editor for this - * notice. - * - * @return Whether a squiggle underline should be drawn. - */ - public boolean getShowInEditor(); - - - /** - * Returns the tool tip text to display for this notice. - * - * @return The tool tip text. If none has been explicitly set, this - * method returns the same text as {@link #getMessage()}. - */ - public String getToolTipText(); - - - /** - * Denotes the severity of a parser notice. - */ - public static enum Level { - - /** - * Indicates an informational notice. - */ - INFO(2), - - /** - * Indicates a warning notice. - */ - WARNING(1), - - /** - * Indicates an error notice. - */ - ERROR(0); - - private int value; - - private Level(int value) { - this.value = value; - } - - /** - * Returns the value of this notice level, as an integer. - * - * @return A numeric value for this notice level. - */ - public int getNumericValue() { - return value; - } - - /** - * Returns whether this level is as sever as, or worse than, another - * level. - * - * @param other The other level. - * @return Whether this level is equal to or more severe. - */ - public boolean isEqualToOrWorseThan(Level other) { - return value<=other.getNumericValue(); - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ToolTipInfo.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ToolTipInfo.java deleted file mode 100644 index a01391d..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/ToolTipInfo.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 07/29/2009 - * - * ToolTipInfo.java - A tool tip's text and hyperlink listener. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.parser; - -import java.net.URL; -import javax.swing.event.HyperlinkListener; - -import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; -import org.fife.ui.rsyntaxtextarea.focusabletip.FocusableTip; - - -/** - * Wrapper for a tool tip and a listener for hyperlink events in the tool - * tip (assuming the tip is HTML). If the {@link RSyntaxTextArea} instance - * has {@link FocusableTip}s enabled, and the user clicks on a hyperlink in - * the tool tip, the specified {@link HyperlinkListener} will be called. - * - * @author Robert Futrell - * @version 1.0 - */ -public class ToolTipInfo { - - private String text; - private HyperlinkListener listener; - private URL imageBase; - - - /** - * Constructor. - * - * @param text The tool tip text, or null for none. - * @param listener The hyperlink listener, or null for none. - */ - public ToolTipInfo(String text, HyperlinkListener listener) { - this(text, listener, null); - } - - - /** - * Constructor. - * - * @param text The tool tip text, or null for none. - * @param l The hyperlink listener, or null for none. - * @param imageBase The base URL for images in the HTML text, - * or null for the default. - */ - public ToolTipInfo(String text, HyperlinkListener l, URL imageBase) { - this.text = text; - this.listener = l; - this.imageBase = imageBase; - } - - - /** - * Returns the listener to call when hyperlinks are clicked in the tool - * tip. - * - * @return The listener, or null for none. - */ - public HyperlinkListener getHyperlinkListener() { - return listener; - } - - - /** - * Returns the base URL that any images in the HTML tool tip live in. - * This allows you to reference images in a jar file in your - * {@link FocusableTip}s. - * Note that if what {@link #getToolTipText()} returns isn't HTML, this - * value is effectively ignored. - * - * @return The image base, or null for the default. - */ - public URL getImageBase() { - return imageBase; - } - - - /** - * Returns the tool tip text to display. - * - * @return The tool tip text, or null for none. - */ - public String getToolTipText() { - return text; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/XmlParser.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/XmlParser.java deleted file mode 100644 index 808fe95..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/XmlParser.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * 08/16/2008 - * - * XMLParser.java - Simple XML parser. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.parser; - -import java.io.IOException; -import javax.swing.text.Document; -import javax.swing.text.Element; -import javax.xml.parsers.FactoryConfigurationError; -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; -import org.xml.sax.*; -import org.xml.sax.helpers.*; - -import org.fife.io.DocumentReader; -import org.fife.ui.rsyntaxtextarea.RSyntaxDocument; - - -/** - * A parser for XML documents. Adds squiggle underlines for any XML errors - * found (though most XML parsers don't really have error recovery and so only - * can find one error at a time).

- * - * This class isn't actually used by RSyntaxTextArea anywhere, but you can - * install and use it yourself. Doing so is as simple as: - * - *

- * XmlParser xmlParser = new XmlParser();
- * textArea.addParser(xmlParser);
- * 
- * - * To support DTD validation, specify an entity resolver when creating the - * parser, and enable validation like so: - * - *
- * XmlParser xmlParser = new XmlParser(new MyEntityResolver());
- * xmlParser.setValidating(true);
- * textArea.addParser(xmlParser);
- * 
- * - * Also note that a single instance of this class can be installed on - * multiple instances of RSyntaxTextArea.

- * - * For a more complete XML parsing/validation solution, see the - * RSTALanguageSupport - * project's XmlLanguageSupport class. - * - * @author Robert Futrell - * @version 1.1 - */ -public class XmlParser extends AbstractParser { - - private SAXParserFactory spf; - private DefaultParseResult result; - private EntityResolver entityResolver; - - - public XmlParser() { - this(null); - } - - - /** - * Constructor allowing DTD validation of documents. - * - * @param resolver An entity resolver to use if validation is enabled. - * @see #setValidating(boolean) - */ - public XmlParser(EntityResolver resolver) { - this.entityResolver = resolver; - result = new DefaultParseResult(this); - try { - spf = SAXParserFactory.newInstance(); - } catch (FactoryConfigurationError fce) { - fce.printStackTrace(); - } - } - - - /** - * Returns whether this parser does DTD validation. - * - * @return Whether this parser does DTD validation. - * @see #setValidating(boolean) - */ - public boolean isValidating() { - return spf.isValidating(); - } - - - /** - * {@inheritDoc} - */ - public ParseResult parse(RSyntaxDocument doc, String style) { - - result.clearNotices(); - Element root = doc.getDefaultRootElement(); - result.setParsedLines(0, root.getElementCount()-1); - - if (spf==null || doc.getLength()==0) { - return result; - } - - try { - SAXParser sp = spf.newSAXParser(); - Handler handler = new Handler(doc); - DocumentReader r = new DocumentReader(doc); - InputSource input = new InputSource(r); - sp.parse(input, handler); - r.close(); - } catch (SAXParseException spe) { - // A fatal parse error - ignore; a ParserNotice was already created. - } catch (Exception e) { - //e.printStackTrace(); // Will print if DTD specified and can't be found - result.addNotice(new DefaultParserNotice(this, - "Error parsing XML: " + e.getMessage(), 0, -1, -1)); - } - - return result; - - } - - - /** - * Sets whether this parser will use DTD validation if required. - * - * @param validating Whether DTD validation should be enabled. If this is - * true, documents must specify a DOCTYPE, and you - * should have used the constructor specifying an entity resolver. - * @see #isValidating() - */ - public void setValidating(boolean validating) { - spf.setValidating(validating); - } - -/* - public static void main(String[] args) { - javax.swing.JFrame frame = new javax.swing.JFrame(); - org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea = new - org.fife.ui.rsyntaxtextarea.RSyntaxTextArea(25, 40); - textArea.setSyntaxEditingStyle("text/xml"); - XmlParser parser = new XmlParser(new EntityResolver() { - public InputSource resolveEntity(String publicId, String systemId) - throws SAXException, IOException { - if ("http://fifesoft.com/rsyntaxtextarea/theme.dtd".equals(systemId)) { - return new org.xml.sax.InputSource(getClass().getResourceAsStream("/theme.dtd")); - } - return null; - } - }); - parser.setValidating(true); - textArea.addParser(parser); - try { - textArea.read(new java.io.BufferedReader(new java.io.FileReader("C:/temp/test.xml")), null); - } catch (Exception e) { - e.printStackTrace(); - } - frame.setContentPane(new org.fife.ui.rtextarea.RTextScrollPane(textArea)); - frame.pack(); - frame.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE); - frame.setVisible(true); - } -*/ - - /** - * Callback notified when errors are found in the XML document. Adds a - * notice to be squiggle-underlined. - */ - private class Handler extends DefaultHandler { - - private Document doc; - - private Handler(Document doc) { - this.doc = doc; - } - - private void doError(SAXParseException e, ParserNotice.Level level) { - int line = e.getLineNumber() - 1; - Element root = doc.getDefaultRootElement(); - Element elem = root.getElement(line); - int offs = elem.getStartOffset(); - int len = elem.getEndOffset() - offs; - if (line==root.getElementCount()-1) { - len++; - } - DefaultParserNotice pn = new DefaultParserNotice(XmlParser.this, - e.getMessage(), line, offs, len); - pn.setLevel(level); - result.addNotice(pn); - } - - @Override - public void error(SAXParseException e) { - doError(e, ParserNotice.Level.ERROR); - } - - @Override - public void fatalError(SAXParseException e) { - doError(e, ParserNotice.Level.ERROR); - } - - @Override - public InputSource resolveEntity(String publicId, String systemId) - throws IOException, SAXException { - if (entityResolver!=null) { - return entityResolver.resolveEntity(publicId, systemId); - } - return super.resolveEntity(publicId, systemId); - } - - @Override - public void warning(SAXParseException e) { - doError(e, ParserNotice.Level.WARNING); - } - - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/package.html b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/package.html deleted file mode 100644 index 96feedb..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/parser/package.html +++ /dev/null @@ -1,9 +0,0 @@ - - - Interfaces for parsing text in RSyntaxTextAreas and identifying errors, - warnings, etc. Implementations of the Parser interface - are notified when the document has been modified, so they can add - squiggle-underline markers to instances of RSTA to signify code errors and - other important snippets. - - diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/templates/AbstractCodeTemplate.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/templates/AbstractCodeTemplate.java deleted file mode 100644 index 2c53c3e..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/templates/AbstractCodeTemplate.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 12/01/2008 - * - * AbstractCodeTemplate.java - Base class for code templates. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.templates; - - -/** - * A base class to build code templates on top of. - * - * @author Robert Futrell - * @version 1.0 - */ -public abstract class AbstractCodeTemplate implements CodeTemplate { - - /** - * The ID of this template. - */ - private String id; - - - /** - * This no-arg constructor is required for serialization purposes. - */ - public AbstractCodeTemplate() { - } - - - /** - * Creates a new template. - * - * @param id The ID for this template. - * @throws IllegalArgumentException If id is null. - */ - public AbstractCodeTemplate(String id) { - setID(id); - } - - - /** - * Creates a deep copy of this template. - * - * @return A deep copy of this template. - */ - @Override - public Object clone() { - // This method can't be abstract as compilers don't like concrete - // subclassses calling super.clone() on an abstract super. - try { - return super.clone(); - } catch (CloneNotSupportedException e) { - throw new InternalError( - "CodeTemplate implementation not Cloneable: " + - getClass().getName()); - } - } - - - - /** - * Compares the StaticCodeTemplate to another. - * - * @param o Another StaticCodeTemplate object. - * @return A negative integer, zero, or a positive integer as this - * object is less than, equal-to, or greater than the passed-in - * object. - * @throws ClassCastException If o is - * not an instance of CodeTemplate. - */ - public int compareTo(CodeTemplate o) { - if (o==null) { - return -1; - } - return getID().compareTo(o.getID()); - } - - - /** - * Overridden to return "true" iff - * {@link #compareTo(CodeTemplate)} returns 0. - * - * @return Whether this code template is equal to another. - */ - @Override - public boolean equals(Object obj) { - if (obj instanceof CodeTemplate) { - return compareTo(((CodeTemplate)obj))==0; - } - return false; - } - - - /** - * Returns the ID of this code template. - * - * @return The template's ID. - * @see #setID(String) - */ - public String getID() { - return id; - } - - - /** - * Returns the hash code for this template. - * - * @return The hash code for this template. - */ - @Override - public int hashCode() { - return id.hashCode(); - } - - - /** - * Sets the ID for this template. - * - * @param id The ID for this template. - * @throws IllegalArgumentException If id is null. - * @see #getID() - */ - public void setID(String id) { - if (id==null) { - throw new IllegalArgumentException("id cannot be null"); - } - this.id = id; - } - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/templates/CodeTemplate.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/templates/CodeTemplate.java deleted file mode 100644 index 62c7934..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/templates/CodeTemplate.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 11/29/2008 - * - * CodeTemplate.java - A "template" (macro) for commonly-typed code. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.templates; - -import java.io.Serializable; -import javax.swing.text.BadLocationException; - -import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; - - -/** - * A "code template" is a kind of macro for commonly-typed code. It - * associates a short identifier with a longer code snippet, then when the - * code template is enabled and the short identifier is typed, it is - * replaced with the longer code snippet.

- * - * For example, you can associate the identifier forb - * (short for "for-block") with the following code:

- * - *

- *   for (<caret>) {
- *
- *   }
- * 
- * - * Then, whenever you type forb followed by a trigger - * (e.g., a space) into a text area with this CodeTemplate, - * the code snippet is added in place of forb. Further, - * the caret is placed at the position denoted by <caret>.

- * - * Static text replacements are done with {@link StaticCodeTemplate}. Dynamic - * templates can also be created and used. - * - * @author Robert Futrell - * @version 0.1 - * @see StaticCodeTemplate - */ -public interface CodeTemplate extends Cloneable, Comparable, - Serializable { - - - /** - * Creates a deep copy of this template. - * - * @return A deep copy of this template. - */ - public Object clone(); - - - /** - * Returns the ID of this code template. - * - * @return The template's ID. - */ - public String getID(); - - - /** - * Invokes this code template. The changes are made to the given text - * area. - * - * @param textArea The text area to operate on. - * @throws BadLocationException If something bad happens. - */ - public void invoke(RSyntaxTextArea textArea) throws BadLocationException; - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/templates/StaticCodeTemplate.java b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/templates/StaticCodeTemplate.java deleted file mode 100644 index cb5471e..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/templates/StaticCodeTemplate.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * 02/21/2005 - * - * CodeTemplate.java - A "template" (macro) for commonly-typed code. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.rsyntaxtextarea.templates; - -import java.io.IOException; -import java.io.ObjectInputStream; -import javax.swing.text.BadLocationException; -import javax.swing.text.Caret; -import javax.swing.text.Element; - -import org.fife.ui.rsyntaxtextarea.RSyntaxDocument; -import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; -import org.fife.ui.rsyntaxtextarea.RSyntaxUtilities; - - -/** - * A code template that inserts static text before and after the caret.

- * - * For example, you can associate the identifier forb - * (short for "for-block") with the following code:

- * - *

- *   for (<caret>) {
- *
- *   }
- * 
- * - * Then, whenever you type forb followed by a trigger - * (e.g., a space) into a text area with this CodeTemplate, - * the code snippet is added in place of forb. Further, - * the caret is placed at the position denoted by <caret>. - * - * @author Robert Futrell - * @version 0.1 - * @see CodeTemplate - */ -public class StaticCodeTemplate extends AbstractCodeTemplate { - - private static final long serialVersionUID = 1; - - /** - * The code inserted before the caret position. - */ - private String beforeCaret; - - /** - * The code inserted after the caret position. - */ - private String afterCaret; - - /** - * Cached value representing whether beforeCaret contains - * one or more newlines. - */ - private transient int firstBeforeNewline; - - /** - * Cached value representing whether afterCaret contains - * one or more newlines. - */ - private transient int firstAfterNewline; - - private static final String EMPTY_STRING = ""; - - - /** - * Constructor. This constructor only exists to support persistance - * through serialization. - */ - public StaticCodeTemplate() { - } - - - /** - * Constructor. - * - * @param id The ID of this code template. - * @param beforeCaret The text to place before the caret. - * @param afterCaret The text to place after the caret. - */ - public StaticCodeTemplate(String id, String beforeCaret, String afterCaret){ - super(id); - setBeforeCaretText(beforeCaret); - setAfterCaretText(afterCaret); - } - - - /** - * Returns the text that will be placed after the caret. - * - * @return The text. - * @see #setAfterCaretText - */ - public String getAfterCaretText() { - return afterCaret; - } - - - /** - * Returns the text that will be placed before the caret. - * - * @return The text. - * @see #setBeforeCaretText - */ - public String getBeforeCaretText() { - return beforeCaret; - } - - - /** - * Returns the "after caret" text, with each new line indented by - * the specified amount. - * - * @param indent The amount to indent. - * @return The "after caret" text. - */ - private String getAfterTextIndented(String indent) { - return getTextIndented(getAfterCaretText(), firstAfterNewline, indent); - } - - - /** - * Returns the "before caret" text, with each new line indented by - * the specified amount. - * - * @param indent The amount to indent. - * @return The "before caret" text. - */ - private String getBeforeTextIndented(String indent) { - return getTextIndented(getBeforeCaretText(),firstBeforeNewline,indent); - } - - - /** - * Returns text with newlines indented by the specified amount. - * - * @param text The original text. - * @param firstNewline The index of the first '\n' character. - * @param indent The amount to indent. - * @return The indented text. - */ - private String getTextIndented(String text,int firstNewline,String indent) { - if (firstNewline==-1) { - return text; - } - int pos = 0; - int old = firstNewline+1; - StringBuilder sb = new StringBuilder(text.substring(0, old)); - sb.append(indent); - while ((pos=text.indexOf('\n', old))>-1) { - sb.append(text.substring(old, pos+1)); - sb.append(indent); - old = pos+1; - } - if (old - - Facilitates adding code templates to an RSyntaxTextArea. - - diff --git a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/themes/dark.xml b/ESPlorer/src/org/fife/ui/rsyntaxtextarea/themes/dark.xml deleted file mode 100644 index c9283f3..0000000 --- a/ESPlorer/src/org/fife/ui/rsyntaxtextarea/themes/dark.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- * - * Note that for this functionality to be enabled, a - * JTextComponent must be registered with the - * ToolTipManager, and the text component must know to search - * for this value. In the case of an - * RSyntaxTextArea, this - * can be done with a org.fife.ui.rtextarea.ToolTipSupplier that - * calls into - * {@link CompletionProvider#getCompletionsAt(JTextComponent, java.awt.Point)}. - * - * @return The tool tip text for this completion, or null if - * none. - */ - public String getToolTipText(); - - -} \ No newline at end of file diff --git a/ESPlorer/src/org/fife/ui/autocomplete/CompletionCellRenderer.java b/ESPlorer/src/org/fife/ui/autocomplete/CompletionCellRenderer.java deleted file mode 100644 index 16e59aa..0000000 --- a/ESPlorer/src/org/fife/ui/autocomplete/CompletionCellRenderer.java +++ /dev/null @@ -1,697 +0,0 @@ -/* - * 12/23/2008 - * - * CompletionCellRenderer.java - Cell renderer that can render the standard - * completion types like Eclipse or NetBeans does. - * - * This library is distributed under a modified BSD license. See the included - * RSyntaxTextArea.License.txt file for details. - */ -package org.fife.ui.autocomplete; - -import java.awt.Color; -import java.awt.Component; -import java.awt.Font; -import java.awt.Graphics; -import java.awt.Rectangle; -import java.io.File; -import java.net.MalformedURLException; -import java.net.URL; - -import javax.swing.DefaultListCellRenderer; -import javax.swing.Icon; -import javax.swing.ImageIcon; -import javax.swing.JList; -import javax.swing.SwingUtilities; -import javax.swing.plaf.basic.BasicHTML; -import javax.swing.text.View; - - -/** - * A cell renderer that adds some pizazz when rendering the standard - * {@link Completion} types, like Eclipse and NetBeans do. Specifically, - * this renderer handles: - * - *